/* こども栄養バランス — スマホ前提のやさしい配色 */
:root {
  --green: #4caf82;
  --green-d: #3c9a70;
  --bg: #f5f8f6;
  --card: #ffffff;
  --ink: #2b3a34;
  --muted: #7a8a84;
  --line: #e3ece8;
  --ok: #4caf82;
  --low: #f0a030;
  --unmet: #e8604c;
  --over: #b060c0;
  --p: #f2a65a;
  --f: #f0d060;
  --c: #7bc4a0;
  --radius: 14px;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Hiragino Sans", "Noto Sans JP", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}
h1, h2, h3, h4 { margin: 0 0 .5em; }
.hidden { display: none !important; }
.muted { color: var(--muted); font-size: .85em; }

/* App bar */
.appbar {
  position: sticky; top: 0; z-index: 10;
  background: var(--green); color: #fff;
  padding: env(safe-area-inset-top) 16px 0;
  display: flex; align-items: center; justify-content: space-between;
  min-height: 56px; gap: 12px;
}
.appbar h1 { font-size: 1.05rem; margin: 0; padding: 12px 0; flex: 1 1 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* 子ども切替＋⚙は自然サイズを保持（h1側が縮む）。⚙は常に表示される */
.child-switch { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; min-width: 0; justify-content: flex-end; }
.child-switch select {
  border: none; border-radius: 10px; padding: 8px 10px; font-size: .9rem;
  background: rgba(255,255,255,.9); color: var(--ink); margin-top: 0;
  width: auto; flex: 0 1 auto; min-width: 3.5em; max-width: 40vw;
}
.settings-btn {
  flex: none !important; height: 38px; border-radius: 10px;
  border: none; background: rgba(255,255,255,.9); color: var(--green-d);
  line-height: 1; cursor: pointer; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 5px; padding: 0 12px;
}
.settings-btn .gear { font-size: 1.1rem; }
.settings-btn .settings-label { font-size: .85rem; font-weight: 700; }
.settings-btn:hover { background: #fff; }
/* お子さん設定ヘッダー（⚙から開いたモード） */
.settings-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 4px 2px 10px; }
.settings-title { font-size: 1.05rem; margin: 0; color: var(--green-d); }
.back-btn { width: auto; padding: 8px 14px; font-size: .85rem; }

/* Tabs */
.tabs {
  display: flex; background: var(--card); border-bottom: 1px solid var(--line);
  position: sticky; top: 56px; z-index: 9; overflow-x: auto;
}
.tab {
  flex: 1 0 auto; border: none; background: none; padding: 12px 10px;
  font-size: .85rem; color: var(--muted); border-bottom: 3px solid transparent;
  white-space: nowrap; cursor: pointer;
}
.tab.is-active { color: var(--green-d); border-bottom-color: var(--green); font-weight: 700; }

main { padding: 12px; max-width: 640px; margin: 0 auto; }
.tab-panel { display: none; }
.tab-panel.is-active { display: block; }

/* Cards */
.card {
  background: var(--card); border-radius: var(--radius); padding: 16px;
  margin-bottom: 14px; box-shadow: 0 1px 3px rgba(0,0,0,.05);
}
.card h2 { font-size: 1.05rem; }

/* Forms */
label { display: block; font-size: .85rem; color: var(--muted); margin-bottom: 8px; }
input, select {
  width: 100%; padding: 11px; border: 1px solid var(--line); border-radius: 10px;
  font-size: 1rem; background: #fff; color: var(--ink); margin-top: 3px;
}
.row { display: flex; gap: 10px; flex-wrap: wrap; }
.row > label { flex: 1; min-width: 90px; }
.checkbox-row { display: flex; align-items: center; gap: 8px; }
.checkbox-row input { width: auto; margin: 0; }
.primary-btn {
  background: var(--green); color: #fff; border: none; border-radius: 10px;
  padding: 13px; font-size: 1rem; font-weight: 700; cursor: pointer; width: auto; flex: 1;
}
.primary-btn:disabled { background: #b9d5c9; cursor: default; }
.ghost-btn { background: none; border: 1px solid var(--line); border-radius: 10px; padding: 13px; color: var(--muted); }
.file-btn { flex: 1; text-align: center; cursor: pointer; margin: 0; }
.icon-btn { width: 44px; height: 44px; border: 1px solid var(--line); background: #fff; border-radius: 10px; font-size: 1.4rem; color: var(--green-d); }

/* Allergen chips */
.allergen-set { border: 1px solid var(--line); border-radius: 10px; padding: 10px; margin: 6px 0 12px; }
.allergen-set legend { font-size: .8rem; color: var(--muted); padding: 0 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-check { display: inline-flex; align-items: center; gap: 4px; background: var(--bg); border-radius: 20px; padding: 6px 12px; margin: 0; font-size: .85rem; color: var(--ink); }
.chip-check input { width: auto; margin: 0; }
.chip { background: var(--bg); border: 1px solid var(--line); border-radius: 20px; padding: 7px 12px; font-size: .85rem; color: var(--green-d); cursor: pointer; }

/* Profile list */
.profile-item { display: flex; justify-content: space-between; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 8px; }
.profile-item.is-active { border-color: var(--green); background: #f2faf6; }
.pi-main { display: flex; flex-direction: column; }
.pi-actions { display: flex; gap: 6px; }
.pi-actions button { padding: 7px 10px; font-size: .8rem; border: 1px solid var(--line); background: #fff; border-radius: 8px; width: auto; }
.pi-actions .danger { color: var(--unmet); border-color: #f3cfc9; }

/* Meal */
.date-row { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.date-row input { flex: 1; }
.add-food select[size] { height: auto; margin: 8px 0; }
.serving-label { font-size: .8rem; color: var(--muted); }
.gram-hint { min-height: 18px; }
.meal-group { margin-bottom: 10px; }
.meal-group-head { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--line); padding-bottom: 4px; }
.meal-group h3 { font-size: .9rem; color: var(--green-d); }
.meal-group-head h3 { border-bottom: none; padding-bottom: 0; }
.fav-save-btn { background: none; border: none; color: var(--green); font-size: .78rem; padding: 2px 4px; cursor: pointer; }
.meal-item { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: .95rem; }
.x-btn { width: 30px; height: 30px; border-radius: 50%; border: none; background: var(--bg); color: var(--unmet); font-size: 1.1rem; }
.meal-total { text-align: right; font-weight: 700; color: var(--green-d); margin-top: 10px; }

/* よく使う献立（お気に入り）と再利用 */
.fav-bar { margin-bottom: 10px; }
.fav-bar-title { font-size: .78rem; color: var(--muted); margin-bottom: 6px; }
.fav-chip { display: inline-flex; align-items: center; gap: 0; padding: 0; overflow: hidden; }
.fav-chip .fav-add { background: none; border: none; color: var(--green-d); font-size: .85rem; padding: 7px 8px 7px 12px; cursor: pointer; }
.fav-chip .fav-del { background: none; border: none; border-left: 1px solid var(--line); color: var(--muted); font-size: 1rem; line-height: 1; padding: 6px 10px; cursor: pointer; }
.reuse-row { margin-bottom: 10px; }
.reuse-row .ghost-btn { width: 100%; padding: 10px; font-size: .9rem; }

/* Gap bars */
.gap-row { margin-bottom: 14px; }
.gap-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 5px; font-size: .9rem; }
.gap-name { font-weight: 600; }
.gap-vals { font-size: .8rem; color: var(--muted); }
.bar { position: relative; height: 14px; background: var(--bg); border-radius: 7px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 7px; transition: width .3s; }
.bar-fill.ok { background: var(--ok); }
.bar-fill.low { background: var(--low); }
.bar-fill.unmet { background: var(--unmet); }
.bar-fill.over { background: var(--over); }
.bar-100 { position: absolute; top: 0; left: 100%; width: 0; }
.badge { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: .72rem; color: #fff; margin-left: 4px; }
.badge.ok { background: var(--ok); } .badge.low { background: var(--low); }
.badge.unmet { background: var(--unmet); } .badge.over { background: var(--over); }
.badge.info { background: var(--muted); }

/* PFC */
.pfc { margin: 6px 0 18px; }
.pfc-title { font-size: .85rem; margin-bottom: 6px; display: flex; flex-direction: column; gap: 2px; }
.pfc-bar { display: flex; height: 26px; border-radius: 8px; overflow: hidden; }
.pfc-seg { display: flex; align-items: center; justify-content: center; color: #4a3a1a; font-size: .75rem; font-weight: 700; min-width: 0; }
.pfc-seg.p { background: var(--p); } .pfc-seg.f { background: var(--f); } .pfc-seg.c { background: var(--c); }

/* Suggest */
.suggest-group { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; }
.suggest-group h4 { font-size: .92rem; color: var(--unmet); }
.suggest-group ul { margin: 6px 0 0; padding-left: 18px; font-size: .9rem; }
.suggest-group li { margin-bottom: 4px; }
.ok-note { color: var(--green-d); font-weight: 600; }

/* Week */
.week-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: .85rem; }
.wr-date { width: 44px; color: var(--muted); }
.wr-bar { flex: 1; height: 12px; background: var(--bg); border-radius: 6px; overflow: hidden; }
.wr-bar .bar-fill { display: block; }
.wr-info { width: 130px; text-align: right; color: var(--muted); }

/* 追加ソースのサブタブ */
.src-tabs { display: flex; gap: 6px; margin-bottom: 10px; }
.src-tab { flex: 1; padding: 9px 4px; border: 1px solid var(--line); background: #fff; border-radius: 8px; color: var(--muted); font-size: .85rem; cursor: pointer; white-space: nowrap; }
.src-tab.is-active { background: var(--green); color: #fff; border-color: var(--green); font-weight: 700; }
.shared-timing { margin-bottom: 10px; }
.src-panel { display: none; }
.src-panel.is-active { display: block; }
.prod-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 8px 0; }
.prod-grid label { font-size: .78rem; margin-bottom: 0; }
.ingredients { font-size: .85rem; color: var(--muted); background: var(--bg); border-radius: 8px; padding: 8px 10px; margin: 6px 0; }
.builder { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 8px; }
.builder summary { cursor: pointer; color: var(--green-d); font-weight: 600; font-size: .9rem; padding: 4px 0; }
.builder-emphasis { border-top: none; margin-top: 16px; }
.builder-emphasis > summary { display: block; background: #f2faf6; border: 1.5px solid var(--green); border-radius: 10px; padding: 13px 14px; font-size: .95rem; font-weight: 700; }
.builder-emphasis[open] > summary { border-radius: 10px 10px 0 0; margin-bottom: 4px; }
.mini-badge { display: inline-block; background: var(--green); color: #fff; font-size: .68rem; padding: 1px 6px; border-radius: 8px; vertical-align: middle; }
.parse-box { background: #f2faf6; border: 2px dashed var(--green); border-radius: 12px; padding: 12px; margin: 10px 0; }
.parse-box-head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.parse-box-head label, .parse-box-head span:last-child { font-weight: 700; color: var(--green-d); font-size: .88rem; }
.parse-box-step2 { margin-top: 10px; }
.step-badge { flex: none; background: var(--green); color: #fff; font-size: .68rem; font-weight: 700; padding: 2px 8px; border-radius: 10px; letter-spacing: .02em; }
.parse-box-desc { font-size: .78rem; color: var(--muted); margin: 0 0 6px; }
.parse-box textarea { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 10px; font-size: .95rem; font-family: inherit; resize: vertical; margin-top: 3px; background: #fff; }
.parse-btn { width: 100%; margin-top: 6px; }
.manual-add { margin-top: 6px; }
.parsed-head { display: flex; align-items: center; gap: 6px; font-size: .82rem; color: var(--green-d); font-weight: 700; margin: 8px 0 6px; }
.parsed-row { display: grid; grid-template-columns: 1fr 1fr 62px; gap: 6px; align-items: center; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.parsed-row .pr-raw { font-size: .82rem; color: var(--ink); grid-column: 1 / -1; }
.parsed-row .pr-food, .parsed-row .pr-grams { margin: 0; font-size: .85rem; padding: 7px; }
.parsed-row .pr-note { grid-column: 1 / -1; font-size: .72rem; color: var(--unmet); }
.parsed-row.unmatched { background: #fff6f4; border-radius: 6px; padding: 6px; }
#rbParsed .primary-btn { margin-top: 10px; }
.builder-subtitle { font-size: .85rem; font-weight: 700; color: var(--green-d); margin: 14px 0 4px; }
.rb-cat { margin-bottom: 6px; }
.hint-inline { display: block; margin-top: 4px; font-size: .75rem; }
.rb-list-box { border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px 8px; margin: 8px 0 12px; background: #fbfdfc; }
.rb-list-title { font-size: .8rem; font-weight: 700; color: var(--muted); margin-bottom: 2px; }
.rb-list-box .meal-item:last-child { border-bottom: none; }
.recipe-edit-btn { display: block; margin-top: 8px; }
.rb-edit-note { background: #f2faf6; border: 1px solid var(--green); border-radius: 8px; padding: 8px 10px; font-size: .82rem; color: var(--green-d); font-weight: 700; margin: 4px 0 10px; }

/* Growth chart */
.chart-tabs { display: flex; gap: 8px; margin: 6px 0 10px; }
.chart-tab { flex: 1; padding: 9px; border: 1px solid var(--line); background: #fff; border-radius: 8px; color: var(--muted); font-size: .9rem; cursor: pointer; }
.chart-tab.is-active { background: var(--green); color: #fff; border-color: var(--green); font-weight: 700; }
.curve-title { font-size: .9rem; font-weight: 700; color: var(--green-d); margin: 0; }
/* 年齢帯の切替（左右スワイプ／矢印ボタン共通）。ボタンは date-row の .icon-btn を流用。 */
.growth-win-nav { display: flex; align-items: center; gap: 8px; margin: 6px 0 8px; }
.growth-win-nav .icon-btn { flex: none; width: 36px; height: 36px; font-size: 1.2rem; }
.growth-win-nav .icon-btn:disabled { opacity: .3; cursor: default; }
.growth-win-mid { flex: 1; min-width: 0; text-align: center; }
.growth-win-dots { display: flex; justify-content: center; gap: 5px; margin-top: 4px; }
.growth-win-dots span { width: 6px; height: 6px; border-radius: 50%; background: var(--line); }
.growth-win-dots span.is-active { background: var(--green); }
.gsvg .infant-note { fill: #b0608c; font-size: 9px; }
.growth-chart { width: 100%; touch-action: pan-y; }
.gsvg { width: 100%; height: auto; display: block; background: #fbfdfc; border-radius: 8px; }
.gsvg .band { fill: rgba(76,175,130,.12); stroke: none; }
.gsvg .curve { fill: none; stroke: #cfe3d9; stroke-width: 1; }
.gsvg .curve.mid { stroke: var(--green); stroke-width: 1.8; }
.gsvg .own-line { fill: none; stroke: #e8604c; stroke-width: 1.6; }
.gsvg .dot { fill: #e8604c; stroke: #fff; stroke-width: 1.5; }
.gsvg .axlabel { fill: var(--muted); font-size: 9px; }
.curve-legend { font-size: .78rem; color: var(--muted); margin-top: 8px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.mid-key { display: inline-block; width: 16px; height: 3px; background: var(--green); }
.band-key { display: inline-block; width: 16px; height: 10px; background: rgba(76,175,130,.2); margin-left: 8px; }
.own-key { display: inline-block; width: 16px; height: 3px; background: #e8604c; margin-left: 8px; }
.chart-note { margin-top: 6px; }

/* カード見出し＋右上トグル */
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.card-head h2 { margin: 0; }
.view-toggle { width: auto; padding: 7px 12px; font-size: .8rem; border: 1px solid var(--line); background: #fff; color: var(--green-d); border-radius: 999px; white-space: nowrap; }
.view-toggle[aria-pressed="true"] { background: var(--green); color: #fff; border-color: var(--green); }

/* 乳児バナー */
.infant-banner { font-size: .82rem; line-height: 1.6; color: #7a5a2a; background: #fff6e6; border: 1px solid #f0dcb0; border-radius: 10px; padding: 10px 12px; margin: 8px 0 4px; }

/* レーダーチャート */
.gap-radar { width: 100%; }
.rsvg { width: 100%; max-width: 360px; height: auto; display: block; margin: 6px auto 0; }
.rsvg .ring { fill: none; stroke: var(--line); stroke-width: 1; }
.rsvg .ring.target { stroke: var(--green); stroke-width: 1.4; stroke-dasharray: 4 3; }
.rsvg .axis { stroke: var(--line); stroke-width: 1; }
.rsvg .rarea { fill: rgba(76,175,130,.18); stroke: var(--green); stroke-width: 2; }
.rsvg .rdot { stroke: #fff; stroke-width: 1.4; }
.rsvg .rdot.ok { fill: var(--ok); } .rsvg .rdot.low { fill: var(--low); }
.rsvg .rdot.unmet { fill: var(--unmet); } .rsvg .rdot.over { fill: var(--over); }
.rsvg .rlabel { fill: var(--ink); font-size: 11px; font-weight: 700; }
.rsvg .rpct { font-size: 10px; }
.rsvg .rpct.ok { fill: var(--green-d); } .rsvg .rpct.low { fill: var(--low); }
.rsvg .rpct.unmet { fill: var(--unmet); } .rsvg .rpct.over { fill: var(--over); }
.radar-legend { font-size: .76rem; line-height: 1.6; margin-top: 6px; }

.empty-note { text-align: center; color: var(--muted); padding: 40px 20px; }
.disclaimer { font-size: .75rem; color: var(--muted); line-height: 1.6; padding: 4px 4px 20px; }
.result-note { font-size: .74rem; line-height: 1.6; margin-top: 12px; border-top: 1px dashed var(--line); padding-top: 10px; }

/* Footer */
.site-footer { max-width: 640px; margin: 0 auto; padding: 18px 16px calc(28px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
.foot-disclaimer { font-size: .74rem; color: var(--muted); line-height: 1.6; margin: 0 0 10px; }
.foot-links { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 8px; }
.foot-links a { color: var(--green-d); font-size: .82rem; text-decoration: none; }
.foot-links a:hover { text-decoration: underline; }
.foot-copy { font-size: .72rem; color: var(--muted); line-height: 1.6; margin: 0; }

/* 広告枠（既定は非表示。ONにしたとき週間サマリー・設定タブの最下部にのみ表示） */
.ad-slot { margin: 4px 0 8px; min-height: 0; }
.ad-placeholder { border: 1px dashed var(--line); border-radius: 10px; padding: 22px 10px; text-align: center; color: var(--muted); font-size: .8rem; background: repeating-linear-gradient(45deg, #fafafa, #fafafa 10px, #f2f2f2 10px, #f2f2f2 20px); }
.ad-notice { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; background: #2b3a34; color: #fff; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); font-size: .78rem; display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
/* hidden 属性を尊重（display:flex が UA の [hidden]{display:none} を上書きしてしまうため明示） */
.ad-notice[hidden] { display: none; }
.ad-notice a { color: #cfe3d9; }
.ad-notice-actions { display: flex; align-items: center; gap: 12px; }
.ad-notice button { background: var(--green); color: #fff; border: none; border-radius: 8px; padding: 8px 14px; font-size: .8rem; cursor: pointer; white-space: nowrap; }

/* 法務ページ */
.legal { max-width: 680px; margin: 0 auto; padding: 20px 18px 60px; color: var(--ink); }
.legal h1 { font-size: 1.4rem; margin-top: .3em; }
.legal h2 { font-size: 1.05rem; margin-top: 1.6em; color: var(--green-d); }
.legal p, .legal li { font-size: .92rem; line-height: 1.8; }
.legal ul { padding-left: 1.2em; }
.legal a { color: var(--green-d); }
.legal-contact { margin: .6em 0 1em; font-size: .92rem; line-height: 1.8; }
.legal-contact dt { font-weight: 700; color: var(--green-d); margin-top: .4em; }
.legal-contact dd { margin: 0 0 .2em; padding-left: 1em; }

/* 食育タブ（離乳の目安と安全のための注意）
   安全注意は「箇条書き＋タップで詳細を開く」形。判定は出さない方針のため、
   ○×やスコアの類の装飾は持たせない。 */
.debut-phase-label { font-size: 1.05rem; font-weight: 700; margin: 0 0 8px; }
.debut-phase-label .muted { font-weight: 400; margin-left: 6px; }
.debut-dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0 0 10px; }
.debut-dl dt { color: var(--muted); font-size: .85rem; }
.debut-dl dd { margin: 0; font-size: .95rem; line-height: 1.6; }
.debut-note { margin: 6px 0 0; line-height: 1.7; }
.debut-src { font-size: .78rem; margin: 8px 0 0; }
.debut-badge { display: inline-block; margin-left: 8px; padding: 1px 8px; border-radius: 999px; background: var(--line); color: var(--muted); font-size: .7rem; font-weight: 400; vertical-align: middle; }
.debut-sources { display: block; line-height: 1.7; margin: 0 4px 8px; }

/* 安全のための注意（トグル式の箇条書き） */
.safety-list { border-top: 1px solid var(--line); }
.safety-item { border-bottom: 1px solid var(--line); border-left: 4px solid transparent; }
.safety-item > summary {
  list-style: none; cursor: pointer; padding: 12px 8px 12px 12px; min-height: 46px;
  display: flex; align-items: center; gap: 10px; font-size: .93rem; font-weight: 700;
}
.safety-item > summary::-webkit-details-marker { display: none; }
/* 開閉の三角は自前で描く（右端） */
.safety-item > summary::after {
  content: ''; margin-left: auto; flex: none; width: 8px; height: 8px;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: rotate(45deg); transition: transform .15s;
}
.safety-item[open] > summary::after { transform: rotate(-135deg); }
.safety-title { flex: 1 1 auto; }
.safety-body { padding: 0 12px 14px; }
.safety-body p { margin: 0; font-size: .9rem; line-height: 1.8; }
/* 重要度の色分け（左の帯と見出し色だけ。塗りつぶしはしない） */
.debut-priority { border-left-color: var(--green-d); }
.debut-priority > summary { color: var(--green-d); }
.debut-prohibited { border-left-color: var(--unmet); }
.debut-prohibited > summary { color: #c04030; }
.debut-caution { border-left-color: var(--low); }
.debut-caution > summary { color: #b57515; }
.debut-howto { border-left-color: var(--line); }

/* アレルギーチェックの記録（Todoリスト形式）
   評判のよいTodoアプリの作法に合わせる: 左に丸いチェック、行全体を大きめのタップ領域、
   完了は消さずに薄くして下へ送る、取り消しがいつでもできる。
   ※達成率バー・バッジ等の達成演出は入れない（除去中の食材を試させる圧力になるため）。 */
.check-head {
  font-size: .85rem; color: var(--muted); font-weight: 700;
  margin: 18px 0 6px; display: flex; align-items: center; gap: 8px;
}
.check-head:first-child { margin-top: 6px; }
.check-head-concern { color: #b57515; }
.check-count { font-weight: 400; font-size: .8rem; color: var(--muted); }

.check-list { border-top: 1px solid var(--line); }
.check-row {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 11px 2px; border-bottom: 1px solid var(--line); min-height: 46px;
}
.check-box {
  flex: none; width: 24px; height: 24px; margin-top: 1px; border-radius: 50%;
  border: 2px solid #c8d6d0; background: none; cursor: pointer; padding: 0;
  transition: background-color .15s, border-color .15s;
}
.check-box:hover { border-color: var(--green); }
.check-box.is-checked { background: var(--green); border-color: var(--green); position: relative; }
.check-box.is-checked::after {
  content: ''; position: absolute; left: 6px; top: 2px; width: 5px; height: 11px;
  border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.check-main { flex: 1 1 auto; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.check-name { font-size: .95rem; line-height: 1.4; }
.check-tier {
  margin-left: 8px; padding: 1px 7px; border-radius: 999px; background: var(--line);
  color: var(--muted); font-size: .68rem; vertical-align: middle; white-space: nowrap;
}
.check-meta { font-size: .78rem; color: var(--muted); }
.check-note { font-size: .8rem; color: var(--ink); opacity: .8; word-break: break-word; }
.check-del {
  flex: none; border: none; background: none; color: var(--muted);
  font-size: .75rem; line-height: 1; padding: 6px 4px; cursor: pointer; text-decoration: underline;
}

/* 記録済みは消さずに薄くする（後ろのセクションへ回る） */
.check-list-done .check-row { opacity: .55; }
.check-list-done .check-row:hover { opacity: .8; }
/* 「気になる様子があった」は薄くしない。忘れて再び与えないための記録だから。 */
.check-row.is-concern { opacity: 1; border-left: 3px solid var(--low); padding-left: 9px; background: #fdf8ef; }

.check-form { padding: 12px; margin: 0 0 10px; background: #f7faf9; border-radius: 10px; border: 1px solid var(--line); }
.check-form label { margin-bottom: 10px; }
.check-form input[type=date], .check-form input[type=text] { width: 100%; }
.check-results { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.check-results .chip {
  display: inline-flex; align-items: center; gap: 6px; margin: 0;
  padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--card); font-size: .85rem; color: var(--ink); cursor: pointer;
}
.check-results .chip:has(input:checked) { border-color: var(--green); background: #eef7f3; font-weight: 700; }
.check-form-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.check-clear { color: var(--unmet); }

.check-add { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.check-add-row { display: flex; gap: 8px; }
.check-add-row input { flex: 1 1 auto; }
.check-add-row button { flex: none; }

/* バランスタブ内の「1日 / 週間」切替（サブタブは食事タブと同じ .src-tab を流用） */
.balance-panel { display: none; }
.balance-panel.is-active { display: block; }
