:root {
  --bg: #f5f4ef;
  --card: #ffffff;
  --ink: #1d2420;
  --muted: #6b736e;
  --line: #e4e2da;
  --brand: #2f7d5b;
  --brand-ink: #ffffff;
  --p: #c2523b;
  --f: #d39a1f;
  --c: #3a6fb0;
  --good: #2f7d5b;
  --warn: #b5562f;
  --alert: #d0221b;
  --radius: 14px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121513;
    --card: #1b201d;
    --ink: #e9ece9;
    --muted: #99a29c;
    --line: #2b322e;
    --brand: #4fae84;
    --brand-ink: #0d1410;
    --p: #e07a63;
    --f: #e6b54a;
    --c: #6c9be0;
    --good: #4fae84;
    --warn: #e2845b;
    --alert: #ff6b5e;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  padding-bottom: calc(76px + env(safe-area-inset-bottom));
}
h1 { font-size: 1.25rem; margin: 0; }
h2 { font-size: 1.05rem; margin: 0 0 .5rem; }
h3 { font-size: 1rem; margin: 0; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.eyebrow { font-size: .8rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.big { font-size: 2rem; font-weight: 700; font-variant-numeric: tabular-nums; }

.top { padding: 12px 16px 0; background: var(--bg); }
.daybar-wrap { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 2; background: var(--bg); padding: 0 16px 8px; border-bottom: 1px solid var(--line); }
.daybar-wrap:has(.daybar[hidden]) { display: none; }
.top-row { display: flex; align-items: center; justify-content: space-between; max-width: 560px; margin: 0 auto; }
main { max-width: 560px; margin: 0 auto; padding: 12px 16px 0; }
.tab { display: none; }
.tab.active { display: block; }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; margin-bottom: 14px;
}
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.row > input, .row > label { flex: 1 1 90px; }
.between { justify-content: space-between; }
.end { justify-content: flex-end; }

button {
  font: inherit; border: 0; border-radius: 10px; padding: 10px 14px;
  background: var(--brand); color: var(--brand-ink); font-weight: 600; cursor: pointer;
}
button.ghost { background: transparent; color: var(--brand); border: 1px solid var(--line); }
button.small { padding: 6px 10px; font-size: .85rem; }
input, select {
  font: inherit; color: var(--ink); background: var(--bg);
  border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; width: 100%; min-width: 0;
}
label { display: block; font-size: .85rem; color: var(--muted); margin-top: 8px; }
label > input, label > select { margin-top: 4px; }

.pill { font-size: .8rem; background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; color: var(--muted); }

.macros { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.macro { background: var(--bg); border-radius: 10px; padding: 8px 10px; }
.macro b { display: block; font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.macro span { font-size: .78rem; color: var(--muted); }
.macro.p b { color: var(--p); } .macro.f b { color: var(--f); } .macro.c b { color: var(--c); }

.meal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.meal-macros { font-size: .82rem; color: var(--muted); font-variant-numeric: tabular-nums; margin-top: 2px; }
.meal-macros .p { color: var(--p); } .meal-macros .f { color: var(--f); } .meal-macros .c { color: var(--c); }
.portions { list-style: none; padding: 0; margin: 12px 0 0; }
.portions li { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-top: 1px solid var(--line); }
.portions li .amt { font-weight: 600; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.portions li .amt small { display: block; font-weight: 400; color: var(--muted); }

.banner { margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: var(--bg); font-size: .9rem; }
.banner .row { margin-top: 6px; }

.list { list-style: none; padding: 0; margin: 0; }
.list li { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.list li:first-child { border-top: 0; }
.x { background: none; color: var(--muted); padding: 4px 8px; font-weight: 400; }

#chart { width: 100%; height: auto; display: block; }
#chart .grid { stroke: var(--line); stroke-width: 1; }
#chart .tick, #chart .lbl, #chart .empty { fill: var(--muted); font-size: 10px; font-family: inherit; }
#chart .lbl.strong { fill: var(--ink); font-weight: 700; }
#chart text { fill: var(--muted); font-size: 10px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; text-align: center; }
.stats b { display: block; font-size: 1.1rem; font-variant-numeric: tabular-nums; }
.stats span { font-size: .78rem; color: var(--muted); }

.store { margin-top: 14px; }
.store h3 { font-size: .9rem; color: var(--brand); margin-bottom: 4px; }
.gitem { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-top: 1px solid var(--line); }
.gitem input { width: 20px; height: 20px; margin-top: 2px; flex: none; accent-color: var(--brand); }
.gitem.done .gtext { text-decoration: line-through; color: var(--muted); }
.gtext { flex: 1; }
.gtext small { display: block; color: var(--muted); }
.gqty { font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }

#reader { border-radius: 10px; overflow: hidden; margin-top: 8px; }
#reader:empty { display: none; }
.product { display: flex; gap: 12px; }
.product img { width: 72px; height: 72px; object-fit: contain; border-radius: 8px; background: #fff; flex: none; }
.tone-good { color: var(--good); font-weight: 600; }
.tone-warn { color: var(--warn); font-weight: 600; }
.tone-ok, .tone-muted { color: var(--muted); font-weight: 600; }

.tabs {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 3;
  display: grid; grid-template-columns: repeat(7, 1fr);
  background: var(--card); border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.tabs button {
  background: none; color: var(--muted); border-radius: 0; padding: 8px 0 10px;
  font-size: .68rem; font-weight: 500; display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.tabs button span { font-size: 1.2rem; line-height: 1; }
.tabs button.active { color: var(--brand); font-weight: 700; }
/* 🐕 tab: red until the dogs are fed for this meal, green once fed, bright green once fed and walked */
.tabs button.dogs-hungry { background: color-mix(in srgb, var(--alert) 18%, transparent); color: var(--alert); font-weight: 800; }
.tabs button.dogs-fed { background: color-mix(in srgb, var(--good) 22%, transparent); color: var(--good); font-weight: 700; }

dialog {
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); color: var(--ink);
  width: min(480px, calc(100vw - 32px)); padding: 18px;
}
dialog { max-height: 88vh; overflow-y: auto; }
.device { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.filebtn { display: inline-block; margin: 0; padding: 6px 10px; border: 1px solid var(--line); border-radius: 10px; color: var(--brand); font-weight: 600; cursor: pointer; flex: none; }
.science li { display: block; padding: 10px 0; }
.science a { color: inherit; }
.fuel { border-left: 3px solid var(--c); }
.fuel-list { margin: 6px 0; padding-left: 18px; }
.portions li small.muted { display: inline; }
dialog::backdrop { background: rgb(0 0 0 / .45); }
.cap::first-letter { text-transform: uppercase; }

/* meal editor */
.meal .meal-head { align-items: center; }
.meal-macros span small { color: var(--muted); }
.meal-macros span.off { text-decoration: underline dotted; text-underline-offset: 3px; }
.portions.editable li { display: block; }
.item-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.item-top select, .small-select { width: auto; max-width: 62%; padding: 6px 8px; font-size: .9rem; background: var(--card); }
.small-select { max-width: 160px; }
.item-slider { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.item-slider input[type=range] { flex: 1; accent-color: var(--brand); padding: 0; border: 0; background: none; }
.lock { background: none; border: 1px solid var(--line); color: var(--muted); font-size: .72rem; font-weight: 600; padding: 3px 7px; border-radius: 999px; min-width: 44px; }
li.locked .lock { color: var(--brand); border-color: var(--brand); }

/* weekly check-in */
.greeting { font-weight: 600; margin-bottom: 2px; }
.checkin h3.q { margin-top: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.chip { background: var(--bg); color: var(--ink); border: 1px solid var(--line); font-weight: 500; padding: 7px 12px; border-radius: 999px; font-size: .88rem; }
.chip.on { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
textarea { font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; width: 100%; resize: vertical; }
.options { display: grid; gap: 6px; margin-top: 6px; }
.opt { display: flex; gap: 10px; align-items: flex-start; margin: 0; padding: 9px 10px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); font-size: .95rem; cursor: pointer; }
.opt.on { border-color: var(--brand); background: var(--bg); }
.opt input { width: auto; margin-top: 3px; accent-color: var(--brand); }
.opt small { display: block; color: var(--muted); }
.badge { font-style: normal; font-size: .72rem; background: var(--brand); color: var(--brand-ink); padding: 1px 7px; border-radius: 999px; margin-left: 4px; }
.custom-macros { padding: 8px 4px; display: grid; gap: 6px; }
.stepper { display: grid; grid-template-columns: 1fr auto 70px auto; align-items: center; gap: 8px; }
.stepper b { text-align: center; font-variant-numeric: tabular-nums; }
.linkish { background: none; color: var(--brand); padding: 0; font-weight: 600; text-decoration: underline; }

/* lifting */
.weeks { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin: 10px 0 4px; }
.wk { text-align: center; padding: 6px 0; border-radius: 8px; background: var(--bg); color: var(--muted); font-weight: 600; font-size: .85rem; font-variant-numeric: tabular-nums; }
.wk.past { color: var(--ink); }
.wk.on { background: var(--brand); color: var(--brand-ink); }
.wk.deload { border: 1px dashed var(--line); }
label.inline { display: flex; align-items: center; gap: 6px; margin: 0; flex: 1 1 120px; }
label.inline select { margin: 0; }
.lift { border-top: 1px solid var(--line); padding: 12px 0; display: grid; gap: 6px; }
.lift select { font-weight: 600; }
.target { font-size: .9rem; }
.sets { display: grid; gap: 6px; margin-top: 2px; }
.setrow { display: grid; grid-template-columns: 44px 1fr auto 1fr 40px; align-items: center; gap: 6px; }
.setrow input { padding: 8px; text-align: center; font-variant-numeric: tabular-nums; }
.setrow.done input { border-color: var(--brand); }
.tick { background: var(--bg); color: var(--brand); border: 1px solid var(--line); padding: 6px 0; font-size: 1rem; }
.setrow.done .tick { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
#libraryList li span small { display: block; }
#libraryList li > span:last-child { text-align: right; }
.plan-preview { background: var(--bg); border-radius: 10px; padding: 8px 10px; margin-top: 10px; }
.plan-preview:empty { display: none; }

/* day bar: eaten vs left */
.daybar { display: block; width: 100%; max-width: 560px; margin: 8px auto 0; padding: 8px 12px; background: var(--card); color: var(--ink);
  border: 1px solid var(--line); border-radius: 12px; text-align: left; font-weight: 400; }
.daybar[hidden] { display: none; }
.daybar-nums { display: flex; align-items: flex-end; gap: 16px; }
.daybar-nums > span { display: flex; flex-direction: column; line-height: 1.1; }
.daybar-nums small { font-size: .7rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.daybar-nums b { font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.daybar-nums .over b { color: var(--warn); }
.daybar-macros { margin-left: auto; text-align: right; align-items: flex-end; }
.daybar-macros > span { display: flex; gap: 6px; }
.daybar-macros em { font-style: normal; font-weight: 600; font-size: .9rem; font-variant-numeric: tabular-nums; }
.daybar-macros em.p { color: var(--p); } .daybar-macros em.f { color: var(--f); } .daybar-macros em.c { color: var(--c); }
.daybar-track { height: 6px; background: var(--bg); border-radius: 999px; margin-top: 6px; overflow: hidden; }
.daybar-track i { display: block; height: 100%; background: var(--brand); border-radius: 999px; transition: width .3s; }
@media (prefers-reduced-motion: reduce) { .daybar-track i { transition: none; } }

/* meal check-in */
.eat-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 10px; }
.eat { width: 100%; }
.meal.eaten { border-color: var(--brand); }
.meal.eaten .portions { opacity: .75; }
.activities li { align-items: center; }
.activities li .amt { margin-left: auto; }
.fuel-item { margin-top: 8px; }
.add-activity { display: grid; gap: 8px; margin-top: 10px; }
.add-activity .row > select { flex: 1 1 110px; }

/* deficit game */
.daybar-game { display: flex; gap: 12px; font-size: .82rem; font-weight: 600; margin-bottom: 4px; font-variant-numeric: tabular-nums; }
.deficit-card .big { font-size: 1.9rem; color: var(--good); }
.deficit-card .big.neg { color: var(--warn); }
.deficit-card .big small { font-size: .85rem; color: var(--muted); font-weight: 500; }
.coins-total { text-align: right; display: flex; flex-direction: column; }
.coins-total b { font-size: 1.2rem; font-variant-numeric: tabular-nums; }
.coins-total small { color: var(--muted); }
.def-track { height: 8px; background: var(--bg); border-radius: 999px; overflow: hidden; margin-top: 8px; }
.def-track i { display: block; height: 100%; background: var(--f); border-radius: 999px; }
.def-nums { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-top: 4px; font-variant-numeric: tabular-nums; }
.kudos { font-weight: 600; margin: 10px 0 6px; }
.d7row { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.d7 { display: flex; flex-direction: column; align-items: center; padding: 6px 0; border-radius: 8px; background: var(--bg); }
.d7 b { font-size: 1rem; line-height: 1.2; }
.d7 small { color: var(--muted); font-size: .7rem; }
.d7.deficit { outline: 1px solid var(--f); }
.d7.today { outline: 1px dashed var(--line); }
details summary { cursor: pointer; color: var(--brand); margin-top: 8px; }

/* whose day: Sandman / Amani */
.who { display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px; max-width: 560px; margin: 10px auto 0; background: var(--card);
  border: 1px solid var(--line); border-radius: 12px; padding: 4px; }
.who-opt { position: relative; margin: 0; text-align: center; padding: 7px 8px; border-radius: 9px; color: var(--ink); font-weight: 600; font-size: .95rem; cursor: pointer; }
.who-opt input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; pointer-events: none; }
.who-opt.on { background: var(--brand); color: var(--brand-ink); }
.who-opt:focus-within { outline: 2px solid var(--brand); outline-offset: 1px; }
.who-opt small { font-weight: 500; opacity: .8; font-size: .72rem; }
.view-banner { max-width: 560px; margin: 8px auto 0; background: var(--bg); border: 1px dashed var(--line); border-radius: 10px; padding: 8px 10px; }
.view-banner[hidden] { display: none; }
body.readonly main .tab:not(#tab-notes) input, body.readonly main .tab:not(#tab-notes) select, body.readonly main .tab:not(#tab-notes) button { opacity: .7; }
.share-head { margin-top: 18px; padding-top: 12px; border-top: 1px solid var(--line); }
.owner-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.owner-btn { padding: 18px 10px; font-size: 1.05rem; }
#profileForm :disabled { opacity: .75; }

/* stats */
.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 10px 0 6px; }
.stat { background: var(--bg); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; }
.stat b { font-size: 1.35rem; font-variant-numeric: tabular-nums; }
.stat span { font-size: .8rem; color: var(--muted); }
#restoreLabel { margin: 0; padding: 10px 14px; }

/* custom meals */
[data-customize] { white-space: nowrap; }
.portions.custom .item-top select { max-width: 85%; }
.grams { width: 90px; flex: 0 0 90px; padding: 8px; text-align: right; font-variant-numeric: tabular-nums; }
.portions.custom .amt { margin-left: auto; font-weight: 600; }
[data-cadd] { margin-top: 10px; }
.manual { margin-top: 8px; }
.manual-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.manual-grid label { margin: 0; font-size: .75rem; }
.manual-grid input { padding: 8px 6px; }
@media (max-width: 360px) { .manual-grid { grid-template-columns: repeat(2, 1fr); } }

/* weight chart */
:root { --chart-avg: #14875a; --chart-raw: #4a7fd0; }
@media (prefers-color-scheme: dark) { :root { --chart-avg: #3a9e72; --chart-raw: #5f8fd8; } }
.chart-wrap { position: relative; margin-top: 8px; }
#chart { overflow: visible; touch-action: pan-y; }
#chart .raw-line { fill: none; stroke: var(--chart-raw); stroke-width: 1.5; stroke-opacity: .45; stroke-linejoin: round; }
#chart .raw { fill: var(--chart-raw); stroke: var(--card); stroke-width: 2; }
#chart .trend { fill: none; stroke: var(--chart-avg); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
#chart .trend-end { fill: var(--chart-avg); stroke: var(--card); stroke-width: 2; }
#chart .goal { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 4 4; }
#chart .plan { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 1 3; stroke-linecap: round; }
#chart .cross { stroke: var(--muted); stroke-width: 1; }
#chart .hit { fill: transparent; cursor: crosshair; }
.chart-tip[hidden] { display: none; }
.chart-tip { position: absolute; top: 0; width: 124px; background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; font-size: .78rem; box-shadow: 0 4px 12px rgb(0 0 0 / .12); display: grid; gap: 2px; pointer-events: none; font-variant-numeric: tabular-nums; }
.legend { display: flex; flex-wrap: wrap; gap: 12px; color: var(--muted); margin-top: 6px; }
.legend span, .chart-tip span { display: inline-flex; align-items: center; gap: 6px; }
.key { display: inline-block; width: 14px; height: 0; border-top: 2.5px solid; }
.key-avg { border-color: var(--chart-avg); }
.key-raw { width: 8px; height: 8px; border: 0; border-radius: 50%; background: var(--chart-raw); }
.key-goal { border-top: 1px dashed var(--muted); }
.key-plan { border-top: 1.5px dotted var(--muted); }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.seg button { background: none; color: var(--muted); border-radius: 0; padding: 5px 10px; font-size: .8rem; }
.seg button.on { background: var(--brand); color: var(--brand-ink); }
.weigh-card.done { border-color: var(--brand); }
.daybar-macros .over { color: var(--warn); }

/* program */
.program-strip { display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; align-items: center; width: 100%; text-align: left; background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; margin-bottom: 14px; font-weight: 400; }
.program-strip .prog-track { grid-column: 1 / -1; grid-row: 2; height: 6px; background: var(--bg); border-radius: 999px; overflow: hidden; }
.program-strip .prog-track i { display: block; height: 100%; background: var(--brand); }
.program.done { border-color: var(--brand); }
.program.done h3 { margin: 4px 0; }
dialog.review { width: min(520px, calc(100vw - 24px)); }
.review h3 { margin-top: 14px; }
.next-opts { display: grid; gap: 8px; }
.next-opt { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.next-opt.rec { border-color: var(--brand); background: var(--bg); }
.next-opt p { margin: 4px 0 8px; }
.set-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 4px; }
.set-tools button:disabled { opacity: .4; }

/* plate calculator */
.setrow.has-plates { grid-template-columns: 44px 1fr 34px auto 1fr 40px; }
.plate-btn { background: var(--bg); color: var(--ink); border: 1px solid var(--line); padding: 6px 0; font-size: 1rem; }
.plate-hint { color: var(--muted); }
.plate-hint b { color: var(--ink); }
.plate-rows { display: grid; gap: 6px; margin: 10px 0; }
.plate-row { display: grid; grid-template-columns: 1fr 44px 36px 44px; align-items: center; gap: 8px; }
.plate-row b { text-align: center; font-size: 1.1rem; font-variant-numeric: tabular-nums; }
.plate-chip { justify-self: start; min-width: 54px; text-align: center; font-weight: 700; border-radius: 999px; padding: 6px 10px; background: var(--bg); border: 2px solid var(--line); font-variant-numeric: tabular-nums; }
.plate-chip::after { content: ' lb'; font-weight: 400; font-size: .75rem; color: var(--muted); }
.plate-total { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; background: var(--bg); border-radius: 10px; }
.plate-total b { font-size: 1.6rem; font-variant-numeric: tabular-nums; }
.add-panel { display: grid; gap: 8px; margin-top: 8px; padding: 10px; border: 1px dashed var(--brand); border-radius: 10px; background: var(--bg); }
.added-tag { color: var(--brand); font-weight: 700; }

/* voice / text commands */
.cmd { display: flex; gap: 6px; margin-top: 10px; }
.cmd input { flex: 1; }
.mic { padding: 8px 10px; font-size: 1.1rem; }
.mic.listening { background: var(--warn); color: #fff; border-color: var(--warn); }
.cmd-result { margin: 6px 0 4px; min-height: 1em; }
.lift-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.move-btns { display: flex; gap: 4px; flex-shrink: 0; }
.move-btns button { min-width: 36px; padding: 4px 8px; }
.move-btns button:disabled { opacity: .3; }
.order-bar { background: var(--bg); border-radius: 10px; padding: 8px 10px; margin: 8px 0; }
.bw-chip { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 10px; border-radius: 10px; background: var(--bg); font-weight: 700; font-size: 14px; white-space: nowrap; }
.bw-ask { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 6px 0; }
.bw-ask input { width: 90px; }
.link-box { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin: 10px 0; }
.link-box p { margin: 0 0 8px; }
.share-code { font-size: 1.15rem; font-weight: 700; letter-spacing: .04em; padding: 6px 10px; background: var(--bg); border-radius: 8px; user-select: all; }

/* Notes tab: post-it board */
.tabs button span { position: relative; }
.tab-badge { position: absolute; top: -4px; right: -10px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: #d33; color: #fff; font-size: .65rem; line-height: 16px; font-style: normal; }
.tab-badge[hidden] { display: none; }
:root { --note-ink: #3b3320; --note-yellow: #fff1a6; --note-pink: #ffd3e2; --note-blue: #cfe6ff; --note-green: #d3f2cc; }
.note-compose textarea { width: 100%; resize: vertical; font: inherit; padding: 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); margin-top: 8px; }
.emoji-row { display: flex; flex-wrap: wrap; gap: 4px; margin: 8px 0; }
.emoji-row .emoji { background: var(--bg); border: 1px solid var(--line); padding: 4px 0; width: 38px; font-size: 1.2rem; line-height: 1.2; border-radius: 10px; }
.note-colors { display: flex; gap: 6px; }
.swatch { width: 28px; height: 28px; padding: 0; border-radius: 50%; border: 2px solid transparent; }
.swatch.on { border-color: var(--ink); }
.note-yellow { background: var(--note-yellow); } .note-pink { background: var(--note-pink); }
.note-blue { background: var(--note-blue); } .note-green { background: var(--note-green); }
.note-day { margin: 18px 4px 8px; font-size: .95rem; color: var(--muted); }
.note-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.postit { margin: 0; padding: 12px 12px 8px; color: var(--note-ink); border-radius: 4px 4px 14px 4px; box-shadow: 0 6px 14px rgba(0,0,0,.12); transform: rotate(var(--tilt, 0deg)); min-height: 120px; display: flex; flex-direction: column; justify-content: space-between; }
.postit blockquote { margin: 0; font-size: 1.02rem; line-height: 1.35; white-space: pre-wrap; overflow-wrap: anywhere; }
.postit figcaption { display: flex; align-items: center; gap: 6px; margin-top: 10px; font-size: .72rem; opacity: .8; }
.postit figcaption span:first-child { flex: 1; }
.postit .x, .postit .heart { background: none; border: none; padding: 2px 4px; color: var(--note-ink); font-size: 1rem; }
.postit .heart-got { font-size: 1rem; }
.center { text-align: center; }

/* Us tab: Notes / Feeling like */
.us-pages { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; margin: 0 0 12px; }
.us-pages button { background: var(--card); color: var(--ink); border: 1px solid var(--line); font-weight: 600; }
.us-pages button.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.us-pages .dot { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 9px; background: #d33; color: #fff; font-size: .7rem; line-height: 18px; }
.kind-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 10px; }
.kind { background: var(--bg); color: var(--ink); border: 1px solid var(--line); padding: 8px 4px; font-size: .78rem; font-weight: 600; display: flex; flex-direction: column; align-items: center; gap: 2px; border-radius: 12px; }
.kind span { font-size: 1.4rem; line-height: 1.1; }
.kind.on { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); background: var(--card); }
.plan-compose input { width: 100%; margin-top: 6px; }
.plan-compose .row input { width: auto; flex: 1; margin-top: 0; }
.when-row, .reply-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.plan { display: flex; gap: 12px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; margin-bottom: 10px; }
.plan.agreed { border-color: var(--brand); }
.plan.done { opacity: .65; }
.plan-icon { font-size: 2rem; line-height: 1; }
.plan-body { flex: 1; min-width: 0; }
.plan-title { font-weight: 700; margin: 2px 0; overflow-wrap: anywhere; }
.plan-note { margin-top: 4px; font-style: italic; }
.plan-reply { margin-top: 6px; }
.past-plans summary { cursor: pointer; }
/* Eating out */
.eatout { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.eatout > input, .eatout > select { width: 100%; }
.eo-seg { display: flex; width: 100%; }
.eo-seg button { flex: 1; }
.eatout p { margin: 2px 0; }
.reply-to { background: var(--bg); border-radius: 8px; padding: 6px 8px; margin-top: 8px; }
.postit-quote { font-size: .75rem; opacity: .75; margin-bottom: 6px; font-style: italic; overflow-wrap: anywhere; }
.postit .reply { background: none; border: none; padding: 2px 4px; color: var(--note-ink); font-size: 1rem; font-weight: 700; }
.past-notes summary { cursor: pointer; }
.past-notes h4.note-day { margin: 12px 4px 6px; }
.sync-line { margin: 0 4px 10px; }
/* Never scroll sideways on a phone. */
html { overflow-x: clip; }
/* Day picker on Today */
.day-nav { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; }
.day-nav > button { min-width: 44px; font-size: 1.2rem; padding: 6px 0; }
.day-nav > button:disabled { opacity: .35; }
.day-pick { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 6px 8px; cursor: pointer; }
.day-pick span { font-weight: 700; }
.day-pick small { color: var(--muted); font-size: .72rem; }
.day-pick input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.day-nav .today-btn { font-size: .85rem; padding: 6px 10px; }
.meal.past h3 { margin: 2px 0 4px; }
.past-day .macros { grid-template-columns: repeat(4, 1fr); }
.past-day .macro { padding: 8px 4px; }
.past-day .macro b { font-size: 1.1rem; }
.past-day .macro span, .past-day .macro small { display: block; font-size: .72rem; }
.past-day .macro small { color: var(--muted); }
/* Saved meal combos */
.combo-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 8px 0 2px; }
.combo-row select { flex: 1 1 100%; min-width: 0; }
.combo-list { margin: 6px 0; }
.portions.custom .item-slider input[type=range] { width: 100%; }
/* Share panel */
.share-dialog { max-width: 520px; width: calc(100% - 32px); }
.share-dialog .share-seg { display: flex; width: 100%; margin: 4px 0 10px; }
.share-dialog .share-seg button { flex: 1; padding: 7px 4px; }
.share-preview { white-space: pre-wrap; font: .82rem/1.45 ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px; max-height: 40vh; overflow: auto; margin: 6px 0; }
#shareRangeWrap[hidden] { display: none; }
select[data-quicksnack] { width: 100%; margin-top: 6px; }
/* Afternoon snack */
.add-snack { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.snack-picks { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.snack-picks .chip { background: var(--bg); color: var(--ink); border: 1px solid var(--line); border-radius: 999px; padding: 6px 10px; font-size: .85rem; font-weight: 600; }
.boot-fail { position: fixed; inset: auto 16px 90px 16px; z-index: 50; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; box-shadow: 0 10px 30px rgba(0,0,0,.18); }
.boot-fail[hidden] { display: none; }
.boot-fail p { margin: 0 0 10px; }
.item-slider .gbox { width: 72px; flex: 0 0 72px; text-align: center; padding: 6px 4px; }

/* Brief tab */
.brief-now .big small { font-size: .8rem; color: var(--muted); font-weight: 500; }
.brief-card .brief-when { font-size: 1.35rem; font-weight: 800; margin: 2px 0 4px; }
.brief-card .score { min-width: 40px; text-align: center; border-radius: 999px; padding: 2px 8px; font-weight: 800; font-size: .85rem; }
.score.good, .hr.good { background: color-mix(in srgb, var(--good) 26%, transparent); color: var(--good); }
.score.ok, .hr.ok { background: color-mix(in srgb, #c99a1a 18%, transparent); color: #9a7410; }
.score.bad, .hr.bad { background: color-mix(in srgb, var(--warn) 16%, transparent); color: var(--warn); }
.paw { font-size: .78rem; font-weight: 700; white-space: nowrap; }
.paw.ok, .paw-t.ok { color: var(--good); } .paw.caution, .paw-t.caution { color: #9a7410; } .paw.unsafe, .paw-t.unsafe { color: var(--warn); }
.hour-strip { display: flex; gap: 6px; overflow-x: auto; padding: 6px 0; -webkit-overflow-scrolling: touch; }
.hour-strip .hr { flex: 0 0 64px; display: flex; flex-direction: column; align-items: center; gap: 2px; border-radius: 12px; padding: 6px 2px; font-size: .78rem; }
.hour-strip .hr b { font-size: .72rem; } .hour-strip .hr span { font-size: 1rem; font-weight: 800; color: var(--ink); } .hour-strip .hr small { color: var(--ink); opacity: .8; }
.gym { border-top: 1px solid var(--line); padding-top: 8px; margin-top: 8px; }
.class-form { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.class-form select, .class-form input[name=name] { flex: 1; }
.day-picks { display: flex; gap: 4px; }
.day-picks label { display: flex; }
.day-picks input { display: none; }
.day-picks span { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; font-size: .75rem; font-weight: 700; }
.day-picks input:checked + span { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.day-plan b { display: inline-block; min-width: 64px; }
/* Dogs: feeding button */
.brief-title { margin: 4px 4px 10px; font-size: 1.25rem; }
.feed-card { display: flex; flex-direction: column; align-items: center; padding: 18px 12px 10px; }
.feed-btn { width: min(165px, 41vw); height: min(165px, 41vw); border-radius: 50%; border: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: #fff; box-shadow: 0 10px 24px rgba(0,0,0,.18), inset 0 -6px 0 rgba(0,0,0,.12); transition: transform .08s; }
.feed-btn:active { transform: scale(.96); }
.feed-btn.hungry { background: radial-gradient(circle at 35% 30%, #f0a35a, #d9692b); }
.feed-btn.fed { background: radial-gradient(circle at 35% 30%, #4fbf8a, #2e7d5b); }
.feed-icon { font-size: 2.6rem; line-height: 1; }
.feed-title { font-size: 1.05rem; text-align: center; line-height: 1.15; font-weight: 800; }
.feed-sub { font-size: .85rem; opacity: .95; }
/* Per-item cooked / raw switch; logged meals are locked */
.meal.eaten .meal-lock { opacity: .72; }
.meal.eaten .meal-lock input[type=range] { filter: grayscale(1); }
.wseg { display: inline-flex; flex: none; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: var(--bg); }
.wseg button { background: none; color: var(--muted); border: 0; border-radius: 0; padding: 5px 8px; font-size: .72rem; font-weight: 600; min-height: 30px; }
.wseg button.on { background: var(--brand); color: var(--brand-ink); font-weight: 700; }

/* − / + portion steppers: [auto/🔒] [cooked|raw  120 g] [− +] */
.stepper { gap: 6px; }
.stepper .lock { min-width: 44px; min-height: 40px; border-radius: 10px; }
.gfield { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 3px 8px 3px 4px; min-height: 40px; }
.gfield .wseg { background: var(--card); }
.gfield input.grams, .stepper .gfield input.gbox { flex: 1; min-width: 0; width: auto; border: 0; background: none; text-align: right; font-size: 1.05rem; font-weight: 600; padding: 4px 0; }
.gfield .g { color: var(--muted); font-size: .9rem; }
.steps { display: inline-flex; flex: none; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--bg); }
.steps button { background: none; color: var(--ink); border: 0; border-radius: 0; width: 44px; min-height: 40px; padding: 0; font-size: 1.35rem; font-weight: 500; touch-action: manipulation; user-select: none; -webkit-user-select: none; }
.steps button + button { border-left: 1px solid var(--line); }
.steps button:active { background: var(--line); }
.portions.custom .stepper .amt { flex: none; min-width: 64px; font-size: .85rem; }

/* Dogs: feed and walk buttons side by side */
.feed-pair { display: flex; justify-content: center; align-items: flex-start; gap: 14px; width: 100%; }
.feed-col { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; }
.feed-col p { margin: 8px 0 0; }
.feed-btn.unwalked { background: radial-gradient(circle at 35% 30%, #6fa3e6, #3a6cc0); }
.feed-sub { text-align: center; padding: 0 8px; }
.tabs button.dogs-done { background: #1fbf5a; color: #fff; font-weight: 800; }
.tabs button.dogs-best { background: linear-gradient(160deg, #ffe27a, #e6a817); color: #3b2a00; font-weight: 800; box-shadow: inset 0 0 0 1px #c98f00; }
/* Dogs: three round buttons (feed, walk, dog park); the third wraps to its own row */
.feed-pair { flex-wrap: wrap; row-gap: 10px; }
.feed-col { flex: 0 1 calc(50% - 7px); }
.feed-btn.nopark { background: radial-gradient(circle at 35% 30%, #a98be8, #6c4fc4); }
.feed-col .linkish { font-size: inherit; }
/* 🏆 dog duty scoreboard */
.duty-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.duty-head .seg button { padding: 5px 10px; font-size: .8rem; }
.duty-table { width: 100%; border-collapse: collapse; margin: 6px 0 8px; font-variant-numeric: tabular-nums; }
.duty-table th, .duty-table td { padding: 7px 4px; text-align: center; border-bottom: 1px solid var(--line); }
.duty-table th[scope=row] { text-align: left; font-weight: 500; }
.duty-table thead th { font-size: .85rem; font-weight: 700; }
.duty-table td { font-size: 1.05rem; font-weight: 700; }
.duty-table tfoot th, .duty-table tfoot td { border-bottom: 0; font-weight: 800; }
.duty-table tfoot td.lead { color: var(--good); font-size: 1.25rem; }
.duty-table .p0 { color: #3a6cc0; } .duty-table .p1 { color: #c0457a; }
.duty-bar { display: flex; height: 10px; border-radius: 999px; overflow: hidden; background: var(--bg); gap: 2px; }
.duty-bar .p0 { background: #3a6cc0; } .duty-bar .p1 { background: #c0457a; }
@media (prefers-color-scheme: dark) { .duty-table .p0 { color: #7fa9ec; } .duty-table .p1 { color: #ec7fb0; } }
.coins { margin-top: 12px; padding: 10px 12px; border-radius: 12px; background: color-mix(in srgb, #e6b422 14%, var(--card)); border: 1px solid color-mix(in srgb, #e6b422 45%, transparent); }
.coins p { margin: 6px 0 0; }
.coin-row { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 6px; font-weight: 700; }
.coin-stack { letter-spacing: -4px; font-size: 1.15rem; margin-left: 4px; }
.coin-months { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 4px; }
.coin-months li { display: grid; grid-template-columns: 3.5em 1fr auto; gap: 8px; font-size: .9rem; }

/* 📺 Watching together (Us tab) */
.us-pages button { padding: 8px 4px; font-size: .85rem; }
.show-views { display: flex; width: 100%; margin-bottom: 10px; }
.show-views button { flex: 1; }
.add-show { width: 100%; margin-bottom: 6px; }
.show-form { display: grid; gap: 10px; }
.show-form .seg { justify-self: start; }
.svc-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.svc-opt { background: var(--bg); color: var(--ink); border: 1px solid var(--line); border-radius: 999px; padding: 6px 10px; font-size: .8rem; font-weight: 600; }
.svc-opt.on { background: var(--svc); color: #fff; border-color: var(--svc); }
.svc { display: inline-block; border-radius: 6px; padding: 2px 7px; font-size: .72rem; font-weight: 800; letter-spacing: .02em; white-space: nowrap; }
.show-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; margin-bottom: 10px; display: grid; gap: 6px; }
.show-card.finished { border-color: color-mix(in srgb, var(--good) 50%, var(--line)); }
.show-card.dropped { opacity: .7; }
.show-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.show-status { font-size: .78rem; color: var(--muted); font-weight: 600; }
.show-title { font-size: 1.1rem; font-weight: 800; overflow-wrap: anywhere; }
.tonight { justify-self: start; background: var(--bg); color: var(--ink); border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; font-weight: 700; }
.tonight.on { background: var(--good); color: #fff; border-color: var(--good); }
.show-rate { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; }
.show-rate .small:first-child { margin-right: 4px; }
.star { background: none; border: 0; padding: 2px 3px; font-size: 1.25rem; line-height: 1; color: var(--line); min-width: 0; }
.star.on { color: #e6b422; }
.stars { color: #e6b422; letter-spacing: -1px; }
.show-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.month-shows { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; margin-bottom: 8px; }
.month-shows summary { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; cursor: pointer; }
.month-list { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 8px; }
.month-list li { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: center; }
.month-list .t { font-weight: 600; overflow-wrap: anywhere; }
.recap .recap-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 10px 0; text-align: center; }
.recap .recap-stats b { display: block; font-size: 1.6rem; font-variant-numeric: tabular-nums; }
.recap .recap-stats small { color: var(--muted); }
.recap p { margin: 6px 0; }
.svc-bars { display: grid; gap: 6px; margin-top: 8px; }
.svc-bar { display: grid; grid-template-columns: 6.5em 1fr 2em; gap: 8px; align-items: center; }
.svc-bar .bar { height: 10px; background: var(--bg); border-radius: 999px; overflow: hidden; }
.svc-bar .bar span { display: block; height: 100%; border-radius: 999px; }
.year-months { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.year-months li { display: grid; grid-template-columns: 3em 1fr; gap: 8px; }

/* 🐶 happy dog days */
.happy-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; text-align: center; margin: 8px 0 10px; }
.happy-stats b { display: block; font-size: 1.6rem; font-variant-numeric: tabular-nums; }
.happy-stats small { color: var(--muted); font-size: .75rem; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-h { text-align: center; font-size: .7rem; color: var(--muted); font-weight: 700; }
.cal { display: grid; place-items: center; aspect-ratio: 1; border-radius: 8px; font-size: .78rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.cal.none { background: var(--bg); color: var(--muted); }
.cal.future { color: var(--line); }
.cal.out { background: color-mix(in srgb, var(--good) 35%, transparent); color: var(--ink); }
.cal.best { background: linear-gradient(160deg, #ffe27a, #e6a817); font-size: .95rem; }
.cal.today { box-shadow: inset 0 0 0 2px var(--brand); }
.cal-key { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.cal-key .cal { width: 20px; height: 20px; aspect-ratio: auto; font-size: .7rem; }
.happy-year { margin-top: 12px; }
.month-bars { display: flex; align-items: flex-end; gap: 4px; height: 90px; margin-top: 8px; }
.mb { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 2px; }
.mb-bar { width: 100%; min-height: 3px; border-radius: 4px 4px 0 0; background: color-mix(in srgb, #e6a817 55%, var(--bg)); }
.mb.mb-top .mb-bar { background: linear-gradient(180deg, #ffe27a, #e6a817); }
.mb-n { font-size: .7rem; font-weight: 700; color: var(--muted); }
.mb-l { font-size: .7rem; color: var(--muted); }

/* 🧸 new toys */
.toy-form { display: grid; gap: 8px; }
.toy-emoji { display: flex; flex-wrap: wrap; gap: 4px; }
.toy-emoji button { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; font-size: 1.3rem; padding: 4px 8px; min-width: 0; }
.toy-emoji button.on { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); background: var(--card); }
.toy-list { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 6px; }
.toy-list li { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; }
.toy-e { font-size: 1.4rem; }

/* Food pages bar (Meals · Weight · Groceries · Scan) */
.subnav { display: flex; width: 100%; margin: 0 0 10px; }
.subnav button { flex: 1; padding: 7px 2px; font-size: .78rem; }
details.help { margin: 4px 2px 12px; }
details.help summary { cursor: pointer; }
/* 🏠 Home */
.home-hello .greeting { font-size: 1.2rem; }
.home-card { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; color: var(--ink); font-weight: 400; }
.home-ico { font-size: 1.6rem; flex: none; }
.home-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; overflow-wrap: anywhere; }
.home-go { color: var(--muted); font-size: 1.4rem; }
.home-dog-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 8px; }
.home-dog { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 4px; border-radius: 14px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); font-weight: 400; }
.home-dog span { font-size: 1.5rem; line-height: 1.1; }
.home-dog b { font-size: .85rem; text-align: center; }
.home-dog small { font-size: .7rem; color: var(--muted); text-align: center; }
.home-dog.done { background: color-mix(in srgb, var(--good) 18%, var(--card)); border-color: var(--good); }
.home-dog.done span { color: var(--good); font-weight: 800; }
.golden-note { color: #b88400; font-weight: 700; }
/* Food › Meals: a compact day header so the meals start near the top */
#tab-today .greeting { display: none; }
#tab-today .day-card { padding: 10px 14px; }
#tab-today .day-card .big { font-size: 1.45rem; line-height: 1.2; }
#tab-today .day-card .row.between { align-items: center; margin-top: 0; }
#tab-today .day-card .pill { font-size: .72rem; padding: 3px 8px; }
#tab-today .macros { margin-top: 8px; gap: 6px; }
#tab-today .macro { padding: 5px 8px; display: flex; align-items: baseline; gap: 6px; }
#tab-today .macro b { display: inline; font-size: 1rem; white-space: nowrap; }
#tab-today .macro { flex-wrap: wrap; row-gap: 0; }
#tab-today .macro span { font-size: .72rem; }
#tab-today #adjustBanner .banner { margin-top: 8px; padding: 6px 10px; font-size: .8rem; }
#tab-today .day-nav { margin-bottom: 8px; }

/* 🐶 Dog profiles */
.dog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-top: 8px; }
.dog-tile { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; text-align: left; background: var(--bg); color: var(--ink); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; font-weight: 400; }
.dog-emoji { font-size: 1.8rem; line-height: 1; }
.dog-name { font-size: 1.25rem; font-weight: 800; }
.dog-full h4 { margin: 14px 0 4px; font-size: .9rem; }
.dog-list li { gap: 8px; }
.vax { display: inline-block; font-size: .72rem; font-weight: 700; border-radius: 999px; padding: 2px 8px; white-space: nowrap; }
.vax.ok { background: color-mix(in srgb, var(--good) 18%, transparent); color: var(--good); }
.vax.soon { background: color-mix(in srgb, #e6a817 25%, transparent); color: #9a6b00; }
.vax.overdue { background: color-mix(in srgb, var(--alert) 18%, transparent); color: var(--alert); }
.vax.unknown { background: var(--bg); color: var(--muted); }
.dog-alerts { list-style: none; padding: 0; margin: 8px 0; display: grid; gap: 4px; font-size: .85rem; }
.dog-alerts .overdue { color: var(--alert); } .dog-alerts .soon { color: #9a6b00; }
.dog-form { display: grid; gap: 8px; }
.dog-form h4 { margin: 8px 0 0; font-size: .9rem; }
.dog-form .row { margin-top: 0; }
.dog-form label.small { flex: 1; display: grid; gap: 2px; }
.edit-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 6px; border: 1px solid var(--line); border-radius: 10px; }
.edit-row input { flex: 1 1 120px; min-width: 0; }
.row.wrap { flex-wrap: wrap; gap: 6px; }
.danger { color: var(--alert); }
.edit-row .date-lbl { flex: 1 1 140px; display: grid; gap: 2px; color: var(--muted); }

/* Dogs: walk times replace the calorie bar at the top */
body[data-tab="brief"] .daybar-wrap { display: none; }
.plan-temp { font-size: .78rem; font-weight: 700; color: var(--muted); background: var(--bg); border-radius: 999px; padding: 1px 7px; white-space: nowrap; }

/* Weigh-in on Food › Meals: one line once today's weight is in */
.weigh-card.done:not(.editing) > .row:not(.between), .weigh-card.done:not(.editing) > p { display: none; }
.weigh-card.done:not(.editing) { padding-top: 10px; padding-bottom: 10px; }
/* Us: no calorie bar */
body[data-tab="notes"] .daybar-wrap { display: none; }
/* The tab you're on gets an outline */
.tabs button { border-radius: 12px; margin: 4px 2px; padding: 4px 0 6px; }
.tabs button.active { outline: 2px solid var(--brand); outline-offset: -2px; background: color-mix(in srgb, var(--brand) 10%, transparent); }

/* Round buttons split in two: left half = first person, right half = second */
.feed-btn.split { position: relative; overflow: hidden; padding: 0; }
.feed-btn.split .feed-face { position: relative; z-index: 1; pointer-events: none; display: flex; flex-direction: column; align-items: center; gap: 2px; transform: translateY(-22%); }
.feed-btn.split .feed-icon { font-size: 2rem; }
.feed-btn.split .feed-title { font-size: .98rem; }
.feed-btn.split .feed-sub { font-size: .74rem; }
.feed-btn.split .halves { position: absolute; inset: 0; display: flex; }
.feed-btn.split .half { flex: 1; background: transparent; border: 0; border-radius: 0; color: #fff; display: flex; flex-direction: column; justify-content: flex-end; padding: 0 4px 10%; gap: 1px; min-width: 0; }
.feed-btn.split .half:first-child { align-items: flex-end; }
.feed-btn.split .half:last-child { align-items: flex-start; }
.feed-btn.split .half + .half { border-left: 2px solid rgba(255, 255, 255, .6); }
.feed-btn.split .half b { font-size: .66rem; font-weight: 800; background: rgba(0, 0, 0, .2); border-radius: 999px; padding: 2px 6px; white-space: nowrap; }
.feed-btn.split .half small { padding: 0 8px; font-size: .68rem; font-weight: 700; line-height: 1.2; }
.feed-btn.split .half small { font-size: .7rem; opacity: .95; }
.feed-btn.split .half:active { background: rgba(0, 0, 0, .14); }
.mini-halves { display: flex; gap: 2px; margin-top: 4px; width: 100%; }
.mini-halves button { flex: 1; min-width: 0; padding: 4px 0; font-size: .56rem; letter-spacing: -.01em; font-weight: 700; border-radius: 8px; background: var(--card); color: var(--ink); border: 1px solid var(--line); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 📅 Calendar */
body[data-tab="calendar"] .daybar-wrap { display: none; }
.cal-grid.month { gap: 3px; margin-top: 8px; }
.cd { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 2px; aspect-ratio: 1; padding: 4px 0 0; border-radius: 10px; background: var(--bg); color: var(--ink); border: 1px solid transparent; font-weight: 600; font-size: .8rem; min-width: 0; }
.cd.today { border-color: var(--brand); }
.cd.sel { background: var(--brand); color: var(--brand-ink); }
.cd .dots { display: flex; gap: 2px; height: 6px; }
.cd .dots i, .cal-key i, .who-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; }
.cal-key i { width: 8px; height: 8px; margin: 0 2px 0 8px; }
.w-both { background: var(--brand); } .cd.sel .dots i.w-both { background: var(--brand-ink); }
.w-p0 { background: #3a6cc0; } .w-p1 { background: #c0457a; }
.who-dot { margin-right: 6px; vertical-align: middle; }
.ev-list { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 6px; }
.ev { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.ev.open { border-color: var(--brand); }
.ev-main { display: grid; grid-template-columns: 64px 1fr auto; gap: 10px; align-items: center; width: 100%; text-align: left; background: none; color: var(--ink); border: 0; border-radius: 0; padding: 10px 12px; font-weight: 400; }
.ev-time { font-size: .78rem; font-weight: 700; color: var(--muted); line-height: 1.25; }
.ev-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.who-chip { font-size: .7rem; font-weight: 800; border-radius: 999px; padding: 2px 8px; color: #fff; white-space: nowrap; }
.who-chip.w-both { background: var(--brand); color: var(--brand-ink); }
.ev-more { padding: 0 12px 12px; }
.ev-more p { margin: 4px 0; }
a.btn { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; border-radius: 10px; padding: 7px 12px; font-weight: 600; background: var(--brand); color: var(--brand-ink); }
a.btn.ghost { background: none; color: var(--brand); border: 1px solid var(--line); }
a.btn.small { font-size: .82rem; padding: 6px 10px; }
.cal-form { display: grid; gap: 10px; }
.cal-form .row { margin-top: 0; }
.cal-form label.small { flex: 1; display: grid; gap: 2px; }
.cal-form label.check { flex: 0 0 auto; display: flex; align-items: center; gap: 6px; }
.who-pick { display: flex; width: 100%; }
.who-pick button { flex: 1; }
.cal-sub summary { cursor: pointer; }
.home-cal small { display: block; }

.repeat-box { display: grid; gap: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; }
.repeat-box label.every { display: flex; align-items: center; gap: 6px; }
.repeat-box label.every input { width: 64px; flex: none; }

.feed-list li { align-items: center; }
.ev.feed { border-style: dashed; }

.iphone-steps { margin: 4px 0; padding-left: 20px; display: grid; gap: 4px; }

.feed-btn.notreat { background: radial-gradient(circle at 35% 30%, #f3a6c8, #c8578f); }

/* Oblong buttons split top / bottom: Sandman on top, Amani below (Treat on top, New toy below) */
.feed-col .btn-head { width: 100%; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 6px; margin: 0 2px 6px; font-size: .95rem; }
.feed-col .btn-head small { width: 100%; color: var(--muted); font-size: .76rem; }
.feed-btn.oblong { width: 100%; height: 132px; border-radius: 24px; }
.feed-btn.hsplit { display: flex; flex-direction: column; padding: 0; overflow: hidden; gap: 0; }
.feed-btn.single { flex-direction: column; gap: 6px; }
.feed-btn.single small { font-size: .78rem; opacity: .95; }
.hhalf { flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; background: transparent; border: 0; border-radius: 0; color: #fff; min-height: 0; padding: 0 8px; }
.hhalf + .hhalf { border-top: 2px solid rgba(255, 255, 255, .75); }
.hhalf:active { background: rgba(0, 0, 0, .14); }
.hhalf.on { background: rgba(0, 0, 0, .16); }
.hhalf small { font-size: .78rem; font-weight: 700; color: #fff; }
.nm { font-weight: 800; font-size: .95rem; padding: 4px 12px; border-radius: 999px; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .18); white-space: nowrap; }
.nm.n0 { color: #1d4fb0; }
.nm.n1 { color: #b4246b; }
.nm.nt { color: #8a3d64; }
.mini-halves button:first-child { color: #1d4fb0; }
.mini-halves button:last-child { color: #b4246b; }
.mini-halves button[data-treat], .mini-halves button[data-newtoy] { color: #8a3d64; }

/* Oval buttons, split cleanly across the middle; once something is logged they turn into a circle */
.feed-btn.oval { width: 100%; height: 118px; border-radius: 50%; box-shadow: 0 8px 18px rgba(0, 0, 0, .16); transition: width .2s, height .2s; }
.feed-btn.oval.fed { width: 136px; height: 136px; align-self: center; }
.feed-btn.oval .hhalf + .hhalf { border-top: 2px solid rgba(255, 255, 255, .95); }
.feed-btn.oval .hhalf { padding: 0 12px; }
.feed-btn.oval .nm { font-size: .9rem; padding: 3px 11px; }
.feed-btn.oval .hhalf small { font-size: .72rem; }
.feed-btn.oval.single .nm { font-size: .95rem; }

.feed-btn.oval .hhalf { width: 100%; margin: 0; align-self: stretch; }
.feed-btn.oval.fed .hhalf { flex-direction: column; gap: 1px; }
.feed-btn.oval.fed .hhalf:first-child { justify-content: flex-end; padding-bottom: 6px; }
.feed-btn.oval.fed .hhalf:last-child { justify-content: flex-start; padding-top: 6px; }
.feed-btn.oval.fed .hhalf small { font-size: .66rem; line-height: 1.1; }
/* Taller than wide: an upright oval (the circle once done stays as is) */
.feed-btn.oval { width: 128px; height: 168px; align-self: center; }
.feed-btn.oval .nm { font-size: .82rem; padding: 3px 9px; }
.feed-btn.oval .hhalf { padding: 0 6px; }

/* Each half: yellow until it happens, green once it's logged */
/* A pale lemon, deliberately unlike the amber gold of a golden day ⭐ */
.feed-btn.hsplit { background: #f1e66a; }
.feed-btn.hsplit .hhalf { background: linear-gradient(180deg, #fdf7b4, #f1e66a); color: #5c5300; }
.feed-btn.hsplit .hhalf small { color: #5c5300; }
.feed-btn.hsplit:not(.fed) .hhalf + .hhalf { border-top-color: #ffffff; }
.feed-btn.hsplit .hhalf.on { background: linear-gradient(180deg, #55c48f, #2e8d5f); color: #fff; }
.feed-btn.hsplit .hhalf.on small { color: #fff; }
.feed-btn.hsplit .hhalf:active { filter: brightness(.92); }

/* 🍷 Drinks with a restaurant meal */
.eo-drinks { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 8px; }
.eo-drinks summary { cursor: pointer; font-weight: 600; }
.drink-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.drink { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: var(--bg); }
.drink.on { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 12%, var(--card)); }
.drink button { background: none; color: var(--ink); border: 0; border-radius: 0; padding: 6px 10px; font-size: .8rem; font-weight: 600; }
.drink .drink-less { border-left: 1px solid var(--line); padding: 6px 10px; color: var(--muted); }

/* Weekly check-in summary */
.ck-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 8px 0; }
.ck-stats div { background: var(--bg); border-radius: 10px; padding: 8px 10px; }
.ck-stats b { display: block; font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.ck-stats small { color: var(--muted); font-size: .72rem; }
.home-checkin { border-color: var(--brand); }

.ck-tools { gap: 6px; margin: 4px 0; }
.home-checkin { border: 2px solid var(--brand); background: color-mix(in srgb, var(--brand) 8%, var(--card)); }
.home-checkin.late { border-color: var(--alert); background: color-mix(in srgb, var(--alert) 8%, var(--card)); }
.home-checkin.late b { color: var(--alert); }
.home-next-ck { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 14px; font-size: .9rem; }

/* 🏡 Dogs up for adoption (bottom of the Dogs tab) */
.adopt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; margin-top: 8px; }
.adopt-card { display: flex; gap: 10px; background: var(--bg); border: 1px solid var(--line); border-radius: 14px; padding: 10px; min-width: 0; }
.adopt-card.s-interested, .adopt-card.s-meet { border-color: #e7a1c0; }
.adopt-card.s-applied, .adopt-card.s-contacted { border-color: var(--brand); }
.adopt-card.s-pass, .adopt-card.s-gone { opacity: .7; }
.adopt-photo { flex: 0 0 96px; width: 96px; height: 120px; border-radius: 10px; overflow: hidden; padding: 0; border: 0; background: var(--line); display: grid; place-items: center; font-size: 2.2rem; }
.adopt-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.adopt-photo.missing::after { content: '🐕'; }
.adopt-photo.missing img { display: none; }
.adopt-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.adopt-body small { overflow-wrap: anywhere; }
.adopt-name { font-size: 1.05rem; }
.adopt-new { font-size: .7rem; font-weight: 700; background: #b4246b; color: #fff; border-radius: 999px; padding: 2px 8px; }
.adopt-notes { margin: 4px 0 2px; white-space: pre-wrap; overflow-wrap: anywhere; }
.adopt-votes { display: flex; align-items: center; gap: 4px; margin-top: 6px; flex-wrap: wrap; }
.adopt-votes .vote { background: transparent; border: 1px solid var(--line); border-radius: 999px; padding: 3px 8px; font-size: 1rem; line-height: 1.2; filter: grayscale(.8); opacity: .75; }
.adopt-votes .vote.on { filter: none; opacity: 1; background: var(--card); border-color: var(--brand); }
.adopt-status { margin-top: 6px; font-size: .85rem; padding: 6px 8px; max-width: 100%; }
.adopt-card .btn-link { font-size: .85rem; font-weight: 600; color: var(--brand); text-decoration: none; padding: 6px 0; margin-right: auto; }
.adopt-form label { display: block; font-size: .85rem; margin-top: 8px; }
.adopt-form label input, .adopt-form label select, .adopt-form label textarea { width: 100%; margin-top: 4px; box-sizing: border-box; }
.adopt-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.adopt-upload { display: inline-block !important; border: 1px dashed var(--line); border-radius: 12px; padding: 10px 12px; cursor: pointer; }

/* 🔐 Household code */
.hh-moved { border: 2px solid #b4246b; }
.hh-fresh { background: var(--bg); border: 1px solid var(--brand); border-radius: 12px; padding: 10px 12px; margin-top: 8px; }
.hh-fresh p { margin: 4px 0; }
.hh-card .share-code { overflow-wrap: anywhere; }
.hh-dialog { padding: 0; border: 0; background: transparent; max-width: min(420px, calc(100vw - 32px)); }
.hh-dialog .hh-card { margin: 0; }
.gym-links { display: flex; flex-wrap: wrap; gap: 4px 10px; justify-content: flex-end; }
.gym-links a { white-space: nowrap; }
.home-gym .gym + .gym { margin-top: 8px; }

/* 👫 Both: a walk or park trip together, a point each */
.both-btn { align-self: center; margin-top: 8px; padding: 6px 14px; border-radius: 999px; font-size: .85rem; font-weight: 700; background: linear-gradient(90deg, #fdf7b4, #f1e66a); color: #5b4a00; border: 1px solid #e3d55a; }
.both-btn.on { background: #2f9e5b; color: #fff; border-color: #2f9e5b; }
.mini-halves button.mini-both { color: #5b4a00; }

/* 💞 2-2-2-2 */
.rhythm-card { background: linear-gradient(160deg, #fff4f7, var(--card) 60%); }
.r-nudge { border-left: 3px solid #e7739b; padding: 6px 0 6px 12px; margin: 8px 0; }
.r-love { margin: 0; font-weight: 600; line-height: 1.35; }
.r-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.r-chip { font-size: .8rem; border-radius: 999px; padding: 3px 10px; background: var(--bg); border: 1px solid var(--line); }
.r-chip.ok { border-color: #8fd0a8; }
.r-chip.soon { border-color: #e7a1c0; background: #fde8f0; color: #8a1f4c; }
.r-chip.due { border-color: #e7739b; background: #e7739b; color: #fff; }
.r-more { margin-top: 10px; }
.r-more > summary { cursor: pointer; color: var(--brand); font-weight: 600; }
.r-rows { list-style: none; padding: 0; margin: 8px 0 0; }
.r-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.r-ico { font-size: 1.4rem; }
.r-main { flex: 1; min-width: 150px; }
.r-act { display: flex; gap: 6px; align-items: center; margin-left: auto; }
.r-act input[type=date] { width: 9.5em; font-size: .8rem; padding: 4px 6px; }
.r-log ul { list-style: none; padding: 0; margin: 6px 0 0; }
.r-log li { display: flex; gap: 8px; align-items: center; justify-content: space-between; font-size: .85rem; padding: 3px 0; }
.r-log li span { flex: 1; }
@media (prefers-color-scheme: dark) {
  .rhythm-card { background: linear-gradient(160deg, #3a2430, var(--card) 60%); }
  .r-chip.soon { background: #4a2233; color: #f6b8d0; }
}

/* 🩻 DEXA / body composition — fat orange, lean blue (validated pair, light + dark) */
:root { --dx-fat: #eb6834; --dx-lean: #2a78d6; }
@media (prefers-color-scheme: dark) { :root { --dx-fat: #d95926; --dx-lean: #3987e5; } }
.dexa-card { position: relative; }
.dx-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 8px; }
.dx-tile { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; display: grid; gap: 2px; min-width: 0; }
.dx-tile b { font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.dx-tile small { font-size: .72rem; overflow-wrap: anywhere; }
.dx-sum { margin: 10px 0 0; }
.dx-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.dx-mini { margin: 0; min-width: 0; }
.dx-mini figcaption { font-size: .8rem; }
.dx-mini svg { width: 100%; height: auto; display: block; overflow: visible; }
.dx-mini .grid { stroke: var(--line); stroke-width: 1; }
.dx-mini .tick { font-size: 8px; fill: var(--muted); }
.dx-mini .dx-line { fill: none; stroke: var(--c); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.dx-mini .dx-weight { fill: none; stroke: var(--chart-avg); stroke-width: 1.2; stroke-opacity: .45; }
.dx-mini .dx-dot { fill: var(--c); stroke: var(--card); stroke-width: 2; }
.dx-mini .dx-hit { fill: transparent; cursor: pointer; }
.dx-mini .dx-end { font-size: 8.5px; font-weight: 700; fill: var(--ink); }
.dx-key { margin-top: 4px; }
.dx-tip { position: absolute; z-index: 2; background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 4px 8px; font-size: .78rem; box-shadow: 0 4px 12px rgb(0 0 0 / .12); pointer-events: none; white-space: nowrap; }
.dx-tip[hidden] { display: none; }
.dx-table { margin-top: 10px; }
.dx-table summary { cursor: pointer; color: var(--brand); font-weight: 600; }
.dx-table .table-scroll { overflow-x: auto; }
.dx-table table { width: 100%; border-collapse: collapse; font-size: .8rem; font-variant-numeric: tabular-nums; margin-top: 6px; }
.dx-table th, .dx-table td { padding: 4px 6px; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; }
.dx-table th:first-child, .dx-table td:first-child { text-align: left; }
.dx-form .dx-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.dx-form label { display: block; font-size: .82rem; margin-top: 8px; }
.dx-form input { width: 100%; box-sizing: border-box; margin-top: 4px; }
#chart .dexa-mark line { stroke: var(--dx-lean); stroke-width: 1; stroke-dasharray: 2 3; opacity: .7; }
#chart .dexa-mark text { font-size: 7px; fill: var(--muted); }

/* ＋ New food */
.myfood-dialog { max-width: min(440px, calc(100vw - 32px)); }
.myfood-dialog label { display: block; font-size: .85rem; margin-top: 8px; }
.myfood-dialog input { width: 100%; box-sizing: border-box; margin-top: 4px; }
.mf-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.mf-cats { margin-top: 4px; }
.mf-list { margin-top: 10px; }
.mf-list summary { cursor: pointer; color: var(--brand); font-weight: 600; }

/* 💞 Us: one page of compact sections */
.us-sec { margin-top: 12px; }
.us-h { margin: 0 0 6px; font-size: 1.05rem; }
.us-more { margin-top: 8px; }
.us-more > summary { cursor: pointer; color: var(--brand); font-weight: 600; font-size: .88rem; padding: 4px 0; }
.us-sec .emoji-row { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.us-sec .note-grid { margin-top: 10px; }
.us-sec .show-views { margin: 4px 0 8px; }
.us-sec .show-form.card { box-shadow: none; border: 1px solid var(--line); }
#tab-privacy .card + .card { margin-top: 12px; }
body[data-tab="privacy"] .daybar-wrap { display: none; }
.us-sec .emoji-row .emoji { flex: 0 0 38px; }

/* ❤️ / ⭐ on the shared calendar */
.cd .marks { font-size: .7rem; line-height: 1; letter-spacing: -1px; }
.cal-key .mk { margin-left: 8px; }
.cal-month-sum { margin: 8px 0 0; }
.mark-list { list-style: none; padding: 0; margin: 6px 0; }
.mark-row { display: flex; gap: 6px; align-items: baseline; padding: 4px 0; font-size: .9rem; }
.mark-row span { flex: 1; }
/* 🍷 logging a date */
.r-dateform { margin: 8px 0; display: grid; gap: 8px; }
.r-types, .r-places { display: flex; flex-wrap: wrap; gap: 6px; }
.r-types .chip { font-size: .82rem; padding: 6px 10px; }
.r-places .chip { font-size: .78rem; padding: 4px 9px; }
.r-dateform input[type=date] { width: 9.5em; }

/* Train: quick picks, 🧗 climbing card, 📈 progress */
.act-picks { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin: 10px 0 4px; }
.act-pick { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 2px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); color: var(--ink); font-size: .68rem; font-weight: 600; min-width: 0; }
.act-pick span { font-size: 1.3rem; line-height: 1.1; }
.climb-meta { display: flex; gap: 10px; align-items: center; margin-top: 8px; }
.climb-meta select { flex: 1; }
.climb-meta input { width: 64px; }
.seg.full { display: flex; width: 100%; margin-top: 10px; }
.seg.full button { flex: 1; padding: 8px 4px; font-size: .85rem; }
.grade-rows { list-style: none; padding: 0; margin: 10px 0 6px; }
.grade-rows li { display: grid; grid-template-columns: 58px 1fr 1fr; align-items: center; gap: 8px; padding: 5px 0; border-top: 1px solid var(--line); }
.grade-rows .g { font-weight: 800; }
.grade-rows .hdr { border-top: 0; font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; padding: 0; }
.cnt { display: flex; align-items: center; justify-content: space-between; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 2px; }
.cnt button { width: 34px; height: 30px; padding: 0; border-radius: 8px; background: var(--card); color: var(--ink); border: 1px solid var(--line); font-size: 1.1rem; }
.cnt b { font-variant-numeric: tabular-nums; }
.cnt.send b { color: var(--brand); }
.progress-card .tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 8px; }
.progress-card .tile { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; display: grid; gap: 2px; min-width: 0; }
.progress-card .tile b { font-size: 1.1rem; font-variant-numeric: tabular-nums; }
.progress-card .tile small { font-size: .72rem; color: var(--muted); }
.progress-card .up, .progress-card .tile small.up { color: var(--good, #1f8a4c); font-weight: 600; }
.progress-card .down, .progress-card .tile small.down { color: var(--alert); font-weight: 600; }
.progress-card .sec-h { display: flex; justify-content: space-between; align-items: baseline; margin-top: 14px; gap: 8px; }
.progress-card .lifts { list-style: none; padding: 0; margin: 6px 0 0; }
.progress-card .lifts li { display: flex; justify-content: space-between; padding: 5px 0; border-top: 1px solid var(--line); font-size: .88rem; }
.progress-card .gb-h { margin-top: 8px; }
.gbars { list-style: none; padding: 0; margin: 4px 0 0; }
.gbars li { display: grid; grid-template-columns: 48px 1fr 56px; align-items: center; gap: 8px; padding: 3px 0; font-size: .82rem; }
.gbar { position: relative; height: 14px; border-radius: 4px; background: color-mix(in srgb, var(--dx-lean) 22%, var(--card)); overflow: hidden; }
.gbar i { position: absolute; inset: 0 auto 0 0; background: var(--dx-lean); border-radius: 4px; }
.gbars .n { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); }
.gkey { display: flex; gap: 12px; font-size: .75rem; color: var(--muted); margin-top: 6px; }
.gkey i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; vertical-align: -1px; margin-right: 4px; }
.gkey .k-sent { background: var(--dx-lean); } .gkey .k-att { background: color-mix(in srgb, var(--dx-lean) 22%, var(--card)); }
.climb-seg button { white-space: nowrap; font-size: .8rem; padding: 8px 2px; }
.climb-seg .dot-on { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: currentColor; margin-left: 4px; vertical-align: 2px; }

/* Train: weather + run / ride windows in one card */
.fit-now b { font-size: 1.6rem; }
.fit-now small { color: var(--muted); }
.fit-rows { margin: 6px 0; }
.fit-row { display: flex; align-items: center; gap: 10px; }
.fit-ico { font-size: 1.3rem; }
.fit-main { flex: 1; display: grid; gap: 2px; min-width: 0; }
.fit-row .score { margin-left: auto; }
/* Sets per muscle: one bar per muscle, a tick at the target */
.msets li { grid-template-columns: 82px 1fr 64px; }
.gbar.solo { background: var(--bg); border: 1px solid var(--line); overflow: visible; }
.gbar.solo i { background: color-mix(in srgb, var(--dx-lean) 60%, var(--card)); }
.gbar.solo i.hit { background: var(--dx-lean); }
.gbar.solo s { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--ink); opacity: .55; text-decoration: none; }
.msets .n small { font-size: .72rem; margin-left: 2px; }

/* Folding cards: tap the title to open or close */
details.fold > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary h2 { margin: 0; }
details.fold > summary::after { content: 'Show ▾'; font-size: .82rem; font-weight: 600; color: var(--brand); }
details.fold[open] > summary::after { content: 'Hide ▴'; }
details.fold[open] > summary { margin-bottom: 8px; }

/* Swipe a food left to remove it */
.portions.editable > li { position: relative; touch-action: pan-y; transition: transform .15s ease; background: var(--card); }
.portions.editable > li.swiping { transition: none; }
.portions.editable > li.swipe-go { background: color-mix(in srgb, var(--alert) 14%, var(--card)); }
.portions.editable .item-top .x { margin-left: 6px; flex: none; }
.swipe-hint { margin: 4px 0 0; }
.undo-toast { position: fixed; left: 50%; bottom: calc(76px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 20; display: flex; gap: 14px; align-items: center; background: var(--ink); color: var(--card); padding: 10px 16px; border-radius: 999px; box-shadow: 0 6px 18px rgb(0 0 0 / .25); font-size: .9rem; }
.undo-toast .linkish { color: #8fe0b4; font-weight: 700; }
.undo-toast[hidden] { display: none; }
.undo-toast { max-width: calc(100vw - 32px); white-space: nowrap; }
.undo-toast span { overflow: hidden; text-overflow: ellipsis; }

/* 💪 encouragement: inline, never a pop-up */
.cheer { font-size: .85rem; color: var(--good, #1f8a4c); font-weight: 600; margin: 6px 0 2px; }
.cheer-home { margin-top: 4px; color: var(--good, #1f8a4c); font-weight: 600; }

/* Daily plan: meals as short summaries; a meal opens on its own page */
.meal-sum .meal-open { cursor: pointer; }
.meal-sum .open-go { font-size: .85rem; font-weight: 700; color: var(--brand); white-space: nowrap; }
.sum-items { list-style: none; padding: 0; margin: 8px 0 0; }
.sum-items li { display: flex; justify-content: space-between; gap: 10px; padding: 4px 0; border-top: 1px solid var(--line); font-size: .9rem; }
.editor-bar { padding: 6px 0; }
.editor-title { margin: 6px 0 2px; }
body.meal-editing #tab-today > :not(#meals) { display: none !important; }
.meal-sum .meal-open > .row > div { flex: 1; min-width: 0; }
.meal-sum .meal-open > .row { flex-wrap: nowrap; gap: 10px; }
.back-bottom { display: block; width: 100%; margin: 12px 0 4px; }
.balanced-note { color: var(--muted); margin-top: 2px; }

/* 📸 Progress photos (this phone only) */
.ph-compare { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; margin: 8px 0; }
.ph-compare figure, .ph-grid figure { margin: 0; position: relative; }
.ph-compare img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 10px; display: block; background: var(--line); }
.ph-compare figcaption { font-size: .72rem; color: var(--muted); margin-top: 3px; }
.ph-compare figcaption b { color: var(--ink); }
.ph-add { align-items: center; gap: 8px; margin-top: 8px; }
.ph-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 10px; }
.ph-grid img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 8px; display: block; background: var(--line); }
.ph-grid figure.star img { outline: 3px solid var(--brand); outline-offset: -3px; }
.ph-grid figcaption { font-size: .68rem; color: var(--muted); }
.ph-star, .ph-del { position: absolute; top: 4px; width: 28px; height: 28px; padding: 0; border-radius: 50%; background: rgb(0 0 0 / .45); color: #fff; border: 0; font-size: .9rem; }
.ph-star { left: 4px; } .ph-del { right: 4px; }
.ph-mini { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--line); }
.ph-add input[type=date] { width: 9.5em; font-size: .85rem; }

/* Home: weight trend sparkline */
.home-weight .home-main { min-width: 0; }
.home-spark { display: block; width: 100%; height: 48px; margin: 4px 0 2px; overflow: visible; }
.home-spark path { fill: none; stroke: var(--chart-avg); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.home-spark circle { fill: var(--chart-avg); stroke: var(--card); stroke-width: 2; }
.home-spark text { font-size: 12px; font-weight: 700; fill: var(--ink); }

/* 👔 Dress for the day */
.dress-person { padding: 10px 0; border-top: 1px solid var(--line); }
.dress-person:first-of-type { border-top: 0; padding-top: 4px; }
.dress-who select { width: auto; max-width: 55%; padding: 4px 8px; font-size: .9rem; }
.dress-temps { display: flex; align-items: center; gap: 3px; flex-wrap: wrap; margin: 8px 0 4px; font-size: .8rem; }
.dress-temps span { background: var(--bg); border-radius: 999px; padding: 2px 7px; white-space: nowrap; }
.dress-temps i { font-style: normal; color: var(--muted); }
.dress-shape { font-weight: 700; margin: 4px 0; }
.dress-layers { list-style: none; padding: 0; margin: 4px 0; }
.dress-layers li { display: flex; gap: 8px; padding: 3px 0; }
.dress-carry { font-style: normal; font-size: .75rem; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 0 6px; white-space: nowrap; }
.dress-when { margin: 4px 0; }
.dress-places { border-top: 1px solid var(--line); padding-top: 8px; margin-top: 4px; }
.dress-places .chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.dress-places .chip { background: var(--bg); border-radius: 999px; padding: 2px 4px 2px 10px; font-size: .85rem; }
.day-plan .dress-row { cursor: pointer; flex-direction: column; align-items: flex-start; gap: 2px; }
.day-plan .dress-row b { min-width: 0; }
