/* Dark-first gym log. Big tap targets, one column, timer docked at the bottom. */
:root {
  --bg: #11161a; --surface: #182027; --surface2: #1f2a33; --line: #2a353e; --fg: #e4e9ec; --muted: #93a1ab;
  --accent: #f0a93b; --accent-ink: #1a1206; --good: #5cc29a; --bad: #e8735f; --warn: #e3c35a; --cool: #7fa6c9;
  --field: #66737d;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #f5f6f4; --surface: #ffffff; --surface2: #eef1f2; --line: #d9dedf; --fg: #1a2228; --muted: #5b6a74;
  --accent: #9c5c00; --accent-ink: #ffffff; --good: #1b7d56; --bad: #c0442f; --warn: #8a6d00; --cool: #3b6f9e;
  --field: #7d8890;
  color-scheme: light;
}
* { box-sizing: border-box; }
/* Keyboard focus and jumps on the page stop clear of the sticky tabs and, while it shows, the timer bar. On the page
   only: scroll padding on the whole document would also scroll it when a tab itself takes focus. */
main * { scroll-margin-top: calc(64px + env(safe-area-inset-top, 0px)); }
html:has(#timerBar:not([hidden])) main * { scroll-margin-bottom: calc(150px + env(safe-area-inset-bottom, 0px)); }
body { margin: 0; background: var(--bg); color: var(--fg); font: 1rem/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; padding-bottom: calc(150px + env(safe-area-inset-bottom, 0px)); }
button { font: inherit; color: inherit; cursor: pointer; }
::placeholder { color: var(--muted); opacity: 1; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
h2, h3 { margin: 0; line-height: 1.2; text-wrap: balance; }
h2 { font-size: 1.35rem; } h3 { font-size: 1.05rem; margin-top: 8px; }
p { margin: 0; }
.muted { color: var(--muted); } .small { font-size: .85rem; }
.eyebrow { font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.top { position: sticky; top: 0; z-index: 5; background: var(--bg); border-bottom: 1px solid var(--line); padding-top: env(safe-area-inset-top, 0px); }
.tabs { display: grid; grid-template-columns: repeat(5, minmax(max-content, 1fr)); max-width: 720px; margin: 0 auto; overflow-x: auto; scrollbar-width: none; }
.tabs button { background: none; border: 0; padding: 14px 6px; white-space: nowrap; color: var(--muted); font-weight: 600; font-size: clamp(.75rem, 3.5vw, .95rem); border-bottom: 3px solid transparent; }
.tabs button[aria-current="page"] { color: var(--fg); border-bottom-color: var(--accent); }
main { max-width: 720px; margin: 0 auto; padding-inline: 16px; padding-block: 16px; display: grid; gap: 14px; }
.datebar { display: grid; grid-template-columns: 48px 1fr 48px; align-items: center; text-align: center; gap: 8px; }
.iconbtn { width: 48px; height: 48px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); font-size: 1.5rem; }
.datebar .link { padding: 0 8px; font-size: .88rem; font-weight: 600; }
.dayhead { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; }
.tag { font-size: .8rem; color: var(--muted); }
.link { background: none; border: 0; color: var(--accent); padding: 0 0 0 8px; min-height: 44px; text-decoration: underline; }
.daily { display: flex; flex-wrap: wrap; gap: 10px 20px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.check { display: flex; gap: 10px; align-items: center; min-height: 44px; font-weight: 600; }
.check input { width: 24px; height: 24px; accent-color: var(--accent); }
.steps { display: flex; gap: 8px; align-items: center; color: var(--muted); }
.steps input { width: 110px; }
input[type="number"], input[type="password"], input[type="text"], input[type="url"], input[type="time"], input[type="date"], textarea, select { background: var(--surface2); color: var(--fg); border: 1px solid var(--field); border-radius: 8px; padding: 10px; font: inherit; font-variant-numeric: tabular-nums; min-width: 0; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px; display: grid; gap: 8px; }
.card.done { border-color: color-mix(in srgb, var(--good) 60%, var(--line)); }
.cardhead { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.exname { background: none; border: 0; padding: 0; min-height: 44px; text-align: left; font-weight: 700; font-size: 1.08rem; display: inline-flex; align-items: center; gap: 8px; }
.info { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--accent); color: var(--accent); font-size: .78rem; font-style: italic; font-family: Georgia, serif; flex: none; }
.count { font-variant-numeric: tabular-nums; color: var(--muted); font-weight: 600; }
.card.done .count { color: var(--good); }
.target { color: var(--muted); font-size: .9rem; }
.last { font-size: .88rem; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips:empty { display: none; }
.chip { background: var(--surface2); border: 1px solid var(--line); border-radius: 999px; min-height: 40px; padding: 4px 12px; font-size: .88rem; font-variant-numeric: tabular-nums; }
.chip span { color: var(--muted); margin-left: 2px; }
.inputs { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.inputs label, .inputs .lbl { display: grid; gap: 4px; font-size: .78rem; color: var(--muted); }
.stepper { display: grid; grid-template-columns: 44px 72px 44px; }
.stepper input { text-align: center; border-radius: 0; height: 48px; }
.sbtn { height: 48px; border: 1px solid var(--field); background: var(--surface2); font-size: 1.3rem; }
.sbtn:first-child { border-radius: 8px 0 0 8px; } .sbtn:last-child { border-radius: 0 8px 8px 0; }
.primary { background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 10px; padding: 0 18px; height: 48px; font-weight: 700; flex: 1 1 120px; }
.ghost { background: none; border: 1px solid var(--field); border-radius: 10px; padding: 0 16px; height: 48px; }
.primary.wide, .ghost.wide { flex-basis: 100%; }
.primary:disabled { background: var(--surface2); color: var(--muted); cursor: default; }
/* A finished card's button steps back, so the next thing to do stands out. */
.card.done .primary { background: none; color: var(--fg); border: 1px solid var(--field); }
.nowrap { white-space: nowrap; }
.err { color: var(--bad); font-size: .88rem; }
.pill { display: inline-block; font-size: .78rem; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.pill.up { color: var(--good); border-color: var(--good); } .pill.down { color: var(--bad); border-color: var(--bad); }
.timerbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; background: var(--surface2); border-top: 2px solid var(--accent); padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px)); display: grid; gap: 6px; overflow: hidden; }
.timerbar[data-kind="hold"] { border-top-color: var(--cool); }
.timerbar[data-done="true"] { background: color-mix(in srgb, var(--good) 25%, var(--surface2)); }
.timerbar[data-done="true"] :is(.tkind, .tlabel) { color: var(--fg); }
.timerbar[data-done="true"] .tkind { font-size: 1.1rem; }
.tfill { position: absolute; left: 0; top: 0; height: 4px; background: var(--accent); width: 0; }
.tmain { display: flex; align-items: baseline; gap: 12px; max-width: 720px; width: 100%; margin: 0 auto; }
.tkind { font-weight: 700; text-transform: uppercase; letter-spacing: .06em; font-size: .8rem; color: var(--muted); }
.tclock { font-size: 2.4rem; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1; }
.tlabel { font-size: .9rem; color: var(--muted); max-width: 720px; width: 100%; margin: 0 auto; }
.tbtns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; max-width: 720px; width: 100%; margin: 0 auto; }
.tbtns button { height: 44px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); font-weight: 600; }
.verdict { border-radius: 12px; padding: 14px 16px; border: 1px solid var(--line); border-left: 5px solid var(--muted); background: var(--surface); display: grid; gap: 8px; }
.verdict[data-level="exceeding"] { border-left-color: var(--good); } .verdict[data-level="meeting"] { border-left-color: var(--cool); } .verdict[data-level="needs"] { border-left-color: var(--bad); }
.vlabel { font-size: 1.5rem; font-weight: 800; }
.verdict ul, .plain { margin: 0; padding-left: 1.1em; display: grid; gap: 4px; }
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.stat { border-top: 1px solid var(--line); padding-top: 8px; display: grid; }
.stat b { font-size: 1.5rem; font-variant-numeric: tabular-nums; } .stat span { color: var(--muted); font-size: .82rem; }
.weekgrid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.wd { border: 1px solid var(--line); border-radius: 8px; padding: 6px 2px; text-align: center; display: grid; gap: 2px; font-size: .75rem; color: var(--muted); }
.wd b { color: var(--fg); font-size: .82rem; }
.wd[data-state="ok"] { border-color: var(--good); } .wd[data-state="ok"] b { color: var(--good); }
.wd[data-state="part"] { border-color: var(--warn); } .wd[data-state="miss"] { border-color: var(--bad); } .wd[data-state="miss"] b { color: var(--bad); }
.tbl { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: .9rem; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); }
th { font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; }
td.n { font-variant-numeric: tabular-nums; white-space: nowrap; }
.liblist { display: grid; gap: 8px; }
.libitem { display: grid; gap: 2px; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.libitem span:first-child { font-weight: 600; } .libitem .muted { font-size: .82rem; }
.libgroup { display: grid; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
/* An exercise's alternatives open inside its own card. */
.libgroup > .libitem { border: 0; background: none; }
.altlist { margin: 0 14px; border-top: 1px solid var(--line); }
.altlist summary { cursor: pointer; color: var(--accent); font-size: .88rem; padding: 12px 0; }
.altitems { display: grid; gap: 4px; padding: 0 0 12px 12px; border-left: 2px solid var(--line); margin-left: 4px; }
.libitem.alt { padding: 10px 12px; background: var(--surface2); }
.headright { display: inline-flex; align-items: center; gap: 10px; flex: none; }
.swapbtn { background: none; border: 1px solid var(--field); border-radius: 999px; padding: 6px 14px; font-size: .85rem; color: var(--fg); min-height: 44px; }
.swapnote { font-size: .85rem; color: var(--cool); }
#sheetBody { display: grid; gap: 10px; }
.swaplist { display: grid; gap: 6px; }
.swapopt { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding-right: 12px; }
.swapopt.on { border-color: var(--accent); }
.swapopt .pick { flex: 1; display: grid; gap: 2px; text-align: left; background: none; border: 0; padding: 12px 14px; min-height: 56px; }
.swapopt .pick > span:first-child { font-weight: 600; }
.swapopt .pick .muted { font-size: .82rem; }
.swapopt .info { width: 40px; height: 40px; background: none; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px; display: grid; gap: 10px; }
.field { display: grid; gap: 4px; color: var(--muted); font-size: .85rem; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
#syncStatus[data-ok="false"] { color: var(--bad); } #syncStatus[data-ok="true"] { color: var(--good); }
a { color: var(--accent); }
dialog { background: var(--bg); color: var(--fg); border: 1px solid var(--line); border-radius: 14px; padding: 18px 16px; width: min(640px, calc(100vw - 24px));
  max-height: calc(100dvh - 24px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)); }
dialog::backdrop { background: rgb(0 0 0 / .6); }
#guideBody { display: grid; gap: 10px; }
#guideBody ol, #guideBody ul { margin: 0; padding-left: 1.2em; display: grid; gap: 6px; }
.close { position: sticky; top: 0; float: right; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); font-size: 1.4rem; z-index: 1; }
.fig { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 8px; display: grid; gap: 4px; }
.fig svg { width: 100%; max-width: 420px; margin: 0 auto; display: block; }
.fig figcaption { text-align: center; font-size: .82rem; color: var(--muted); }
.fig .limb { stroke: var(--fg); stroke-width: 7; stroke-linecap: round; fill: none; }
.fig .far { opacity: .55; }
.fig .torso { stroke: var(--fg); stroke-width: 9; stroke-linecap: round; }
.fig .headc { fill: var(--fg); }
.fig .eq { stroke: var(--muted); stroke-linecap: round; fill: none; opacity: .8; }
.fig .eqfill { fill: var(--muted); opacity: .8; }
.fig .gear { fill: var(--accent); }
.fig .cable { stroke: var(--accent); stroke-width: 1.5; stroke-dasharray: 4 3; }
.fig .pad { stroke: var(--muted); stroke-width: 12; stroke-linecap: round; opacity: .8; }
.fig .band { stroke: var(--cool); stroke-width: 3; stroke-linecap: round; }
.kneenote { background: var(--surface); border-left: 4px solid var(--cool); border-radius: 8px; padding: 10px 12px; font-size: .92rem; }
.part { margin-top: 10px; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.exname.static { cursor: default; }
.incl { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.inc { height: 44px; padding: 0; border-radius: 8px; border: 1px solid var(--line); background: var(--surface2); font-size: .9rem; font-variant-numeric: tabular-nums; font-weight: 600; }
.inc[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.walkclock { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; background: var(--surface2); border-radius: 10px; padding: 10px 14px; }
.bigclock { font-size: 2.6rem; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1; }
.bigclock[data-over="true"] { color: var(--good); }
.stations { display: grid; gap: 10px; }
.sgroup { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.sgroup .eyebrow { grid-column: 1 / -1; }
.station { display: flex; align-items: center; gap: 8px; text-align: left; background: var(--surface2); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; min-height: 52px; }
.station.empty { border-style: dashed; color: var(--muted); background: none; }
.sn { flex: none; display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--surface); border: 1px solid var(--line); font-size: .75rem; font-weight: 700; color: var(--muted); }
.stn { flex: 1; min-width: 0; display: grid; font-size: .9rem; line-height: 1.25; overflow-wrap: break-word; }
.stn small { color: var(--muted); font-size: .78rem; font-variant-numeric: tabular-nums; }
.wpanel { border-left: 5px solid var(--muted); }
.wpanel[data-level="on"] { border-left-color: var(--good); } .wpanel[data-level="behind"] { border-left-color: var(--warn); } .wpanel[data-level="off"] { border-left-color: var(--bad); }
.wtop { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.wtop b { font-size: 2rem; font-variant-numeric: tabular-nums; line-height: 1; } .wtop span { color: var(--muted); }
.wverdict { font-weight: 700; }
.wchart { width: 100%; height: auto; display: block; }
.wchart text { fill: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.wchart .grid { stroke: var(--line); stroke-width: 1; }
.wchart .goal { fill: none; stroke: var(--good); stroke-width: 1.5; stroke-dasharray: 5 4; }
.wchart .dot { fill: var(--muted); }
.wchart .avg { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.legend i { display: inline-block; vertical-align: middle; margin-right: 6px; }
.ldot { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.lavg { width: 16px; height: 3px; border-radius: 2px; background: var(--accent); }
.lgoal { width: 16px; border-top: 2px dashed var(--good); }
/* Breathing coach: the disc grows as you breathe in, holds, and shrinks as you breathe out. */
.techs { display: flex; flex-wrap: wrap; gap: 6px; }
.tech { min-height: 44px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface2); font-weight: 600; font-size: .9rem; }
.tech[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.tech:disabled:not([aria-pressed="true"]) { opacity: .45; }
.customs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.customs .lbl { display: grid; gap: 4px; font-size: .78rem; color: var(--muted); }
.customs .stepper { grid-template-columns: 44px minmax(0, 1fr) 44px; }
.breath { display: grid; justify-items: center; gap: 10px; padding: 6px 0; }
.bring { position: relative; width: min(76vw, 300px); aspect-ratio: 1; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; }
.breath[data-phase="1"] .bring, .breath[data-phase="3"] .bring { border-color: var(--cool); }
.bdisc { position: absolute; inset: 0; border-radius: 50%; transform: scale(.42); will-change: transform;
  background: radial-gradient(circle at 50% 38%, color-mix(in srgb, var(--accent) 60%, var(--surface)), color-mix(in srgb, var(--accent) 24%, var(--surface))); }
.btxt { position: relative; display: grid; justify-items: center; text-align: center; gap: 2px; }
.bword { font-size: 1.5rem; font-weight: 800; }
.bcount { font-size: 3.4rem; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.bcount:empty { display: none; }
.breath[data-state="done"] .bword { color: var(--fg); font-size: 1.25rem; }
.bleft { color: var(--muted); font-variant-numeric: tabular-nums; }
.breathrow { flex-wrap: nowrap; justify-content: space-between; background: var(--surface2); border-radius: 10px; padding: 6px 6px 6px 14px; }
.breathrow > span { min-width: 0; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
[hidden] { display: none !important; }
/* Food: a bar against the day's calories and one-tap usual foods. */
.fbbar { display: block; height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; }
.fbbar i { display: block; height: 100%; width: 0; border-radius: 4px; background: var(--good); }
.fbbar[data-over="true"] i { background: var(--bad); }
#fdNote[data-bad="true"] { color: var(--bad); font-weight: 600; }
.fdhead, .shead { position: sticky; top: -18px; z-index: 1; margin-top: -18px; padding: 18px 48px 8px 0; background: var(--bg); display: grid; gap: 6px; }
.close { z-index: 2; }
/* A sheet with a sticky header (food, measurements) keeps clear of the close button there, so the rest of the sheet can
   use the full width. */
dialog:has(.fdhead, .shead) .close { margin-left: -44px; }
.meals { display: grid; gap: 6px; }
.meals > div { display: flex; gap: 6px; }
.meals .tech { flex: 1 1 auto; min-width: 0; padding: 0 4px; font-size: .85rem; }
.newfood { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 5fr) auto; gap: 8px; align-items: end; }
.newfood label { display: grid; gap: 4px; font-size: .78rem; color: var(--muted); }
.newfood input { padding: 10px 8px; -moz-appearance: textfield; appearance: textfield; }
.newfood input::-webkit-inner-spin-button, .newfood input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.newfood .primary { padding: 0 16px; }
.fdlog .chip { text-align: left; }
/* Describe it: Claude's estimate, checked and edited before it's added. */
.aibox { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 0 12px; }
.aibox summary { cursor: pointer; font-weight: 700; color: var(--accent); padding: 12px 0; }
.aibox[open] summary { padding-bottom: 6px; }
#aiBody { display: grid; gap: 10px; padding-bottom: 12px; }
textarea { width: 100%; resize: vertical; min-height: 4.6em; line-height: 1.4; }
.aiphoto { display: flex; align-items: flex-end; gap: 4px; }
.aiphoto img { display: block; max-width: 65%; max-height: 180px; border-radius: 8px; border: 1px solid var(--line); }
.aibtns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.aibtns .ghost { padding: 0 4px; font-size: .875rem; }
.aibtns .primary { grid-column: 1 / -1; }
.airows { display: grid; gap: 12px; }
.airow { display: grid; grid-template-columns: 24px repeat(2, minmax(0, 1fr)); gap: 6px 8px; align-items: center; }
.airow [data-af="n"] { grid-column: 2 / -1; }
.airow label:first-of-type { grid-column: 2; }
.airow label { display: grid; gap: 2px; color: var(--muted); font-size: .75rem; }
.airow[data-off] [data-af] { opacity: .45; }
.airows input[type="checkbox"] { width: 22px; height: 22px; margin: 0; accent-color: var(--accent); }
.airows textarea, .airows input[type="number"] { padding: 8px; }
/* The food's name wraps onto as many lines as it needs. */
.airows textarea { min-height: 0; resize: none; field-sizing: content; }
.airows input[type="number"] { width: 100%; -moz-appearance: textfield; appearance: textfield; }
#aiAdd { height: auto; min-height: 48px; padding: 8px 12px; }
.airows input::-webkit-inner-spin-button, .airows input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.xbtn { flex: none; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: none; color: var(--bad); font-size: 1.1rem; }
.fdlog { display: grid; gap: 8px; }
.mealgroup { display: grid; gap: 4px; }
.kc { font-variant-numeric: tabular-nums; }
.kc[data-over="true"] { color: var(--bad); font-weight: 700; }
.meter { display: inline-block; vertical-align: middle; width: 48px; height: 6px; margin-right: 8px; border-radius: 3px; background: var(--line); overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--accent); }
.okmsg { color: var(--good); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
/* Health Connect and reminders */
.src { font-size: .75rem; font-weight: 600; letter-spacing: .02em; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 1px 7px; }
.remind { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; justify-content: space-between; }
.remind input:disabled { opacity: .45; }
.setup summary { cursor: pointer; color: var(--accent); font-size: .88rem; padding: 12px 2px; }
.setup ol { margin: 6px 0 0; padding-left: 1.2em; display: grid; gap: 6px; color: var(--muted); }
/* Goals on Today: each one beating, meeting, behind or still to do, and the toast that says so as numbers come in. */
.goals { display: grid; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px 4px; }
.ghead { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding-bottom: 4px; }
.ghead h3 { margin: 0; }
.grow { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 4px 10px; padding: 9px 0; border-top: 1px solid var(--line); text-align: left; }
.gname { font-weight: 600; min-width: 0; }
.gval { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.gval small { font-weight: 400; color: var(--muted); }
.gst { justify-self: end; min-width: 6.4em; text-align: center; font-size: .78rem; font-weight: 700; white-space: nowrap; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.grow[data-st="beat"] .gst { background: var(--good); border-color: var(--good); color: var(--surface); }
.grow[data-st="meet"] .gst, .grow[data-st="done"] .gst { color: var(--good); border-color: var(--good); }
.grow[data-st="behind"] .gst { color: var(--warn); border-color: var(--warn); }
.grow[data-st="over"] .gst, .grow[data-st="miss"] .gst { color: var(--bad); border-color: var(--bad); }
.gnote { grid-column: 1 / -1; color: var(--muted); font-size: .85rem; }
.grow .fbbar { grid-column: 1 / -1; }
.gfood { display: grid; width: calc(100% + 16px); margin: 0 -8px; padding: 0 8px; background: none; border: 0; border-radius: 8px; text-align: left; }
.gfood:active { background: var(--surface2); }
.gsub { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0 2px; border-top: 1px solid var(--line); font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.gsub span:last-child { color: var(--accent); letter-spacing: 0; text-transform: none; font-size: .85rem; font-weight: 600; }
.gsub + .grow { border-top: 0; }
.toast { position: fixed; z-index: 20; top: calc(64px + env(safe-area-inset-top, 0px)); left: 50%; transform: translateX(-50%); width: min(560px, calc(100vw - 32px));
  background: var(--surface2); color: var(--fg); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 10px; padding: 10px 14px;
  font-size: .92rem; font-weight: 600; white-space: pre-line; box-shadow: 0 8px 24px rgb(0 0 0 / .35); pointer-events: none; }
.toast[data-st="beat"], .toast[data-st="meet"], .toast[data-st="done"] { border-left-color: var(--good); }
.toast .tundo { float: right; margin: -6px -8px 0 12px; min-height: 44px; padding: 0 14px; pointer-events: auto; background: none; border: 1px solid var(--line); border-radius: 8px; color: var(--accent); font-weight: 700; }
.toast[data-st="behind"], .toast[data-st="todo"] { border-left-color: var(--warn); }
.toast[data-st="over"], .toast[data-st="miss"] { border-left-color: var(--bad); }
.gform { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.gform .field { align-content: end; }
.link.start { padding: 0; text-align: left; }
.panel { scroll-margin-top: 64px; }
/* Progress: sets per muscle, strength over time and body measurements. */
.mpanel { gap: 8px; }
.mrow { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 4px 10px; }
.mname { font-weight: 600; }
.mval { color: var(--muted); font-variant-numeric: tabular-nums; }
.mrow[data-full="true"] .mval { color: var(--good); }
.mbar { grid-column: 1 / -1; display: block; height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; }
.mbar i { display: block; height: 100%; border-radius: 4px; background: var(--accent); }
.mrow[data-full="true"] .mbar i { background: var(--good); }
select { width: 100%; height: 48px; }
.liftout { display: grid; gap: 8px; }
.wtop .pill { align-self: center; }
.wchart .lift { fill: var(--accent); }
.wchart .best { fill: var(--good); stroke: var(--surface); stroke-width: 2; }
.lbest { width: 9px; height: 9px; border-radius: 50%; background: var(--good); }
.spark { display: block; width: 48px; height: 20px; overflow: visible; }
.mtbl td:last-child, .mtbl th:last-child { padding-left: 2px; padding-right: 0; }
.spark polyline { fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
.spark circle { fill: var(--accent); }
.mhist { display: grid; gap: 6px; margin-top: 6px; }
.mh { display: grid; gap: 2px; text-align: left; background: var(--surface2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.mfield { display: grid; gap: 4px; }
.mfield .field b { color: var(--fg); }
.mdue { flex-basis: 100%; display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; padding-top: 10px; border-top: 1px solid var(--line); font-size: .9rem; }
.mdue .link { padding: 0; font-weight: 600; }
/* History: the whole stretch of weigh-ins, imported workouts and Settings → Import history. */
button.wd { background: none; min-width: 0; }
button.wd:active { background: var(--surface2); }
.wchart .dot.sm { opacity: .8; }
.wchart .mgrid { stroke-dasharray: 2 3; }
.htbl th, .htbl td { padding: 8px 3px; }
.htbl th { letter-spacing: 0; }
.htbl td:first-child .link { font-weight: 600; }
.acts { gap: 6px; }
.acts .ghead { padding-bottom: 0; }
.actrow { display: flex; justify-content: space-between; gap: 10px; padding-top: 6px; border-top: 1px solid var(--line); }
.prompt { margin: 6px 0 0; padding: 10px; max-height: 260px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; font: .8rem/1.45 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--fg); background: var(--surface2); border: 1px solid var(--line); border-radius: 8px; }
#histText { font: .85rem/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; }
.histout { display: grid; gap: 8px; }
.histout:empty { display: none; }
.histout code { font-size: .85em; }
.histhave { display: grid; gap: 8px; padding-top: 10px; border-top: 1px solid var(--line); }
/* Settings: the row of section names that jumps to each one. */
.jump { display: flex; flex-wrap: wrap; gap: 6px; }
.jump .tech { min-height: 44px; padding: 0 12px; font-size: .85rem; font-weight: 500; background: var(--surface); }
