/* Steady 5K: a dark fitness-app layout with daily goal rings and a bottom tab bar.
   Our own palette: night-track navy, run blue, water teal, sleep violet, bib yellow for actions. */
:root {
  --bg: #0A1222;
  --surface: #121D33;
  --surface-2: #1A2843;
  --ink: #F1F5FB;
  --ink-2: #C2CCDD;
  --muted: #8796B0;
  --line: #24344F;
  --c-run: #4C8DFF;
  --c-water: #2FD3C6;
  --c-sleep: #A68CFF;
  --c-cal: #FF8A5B;
  --track: #1F4FB8;
  --lane: rgba(255,255,255,.5);
  --bib: #FFC93C;
  --bib-ink: #2B1F00;
  --flag: #FF6B7D;
  --flag-bg: #3A1522;
  --r-lg: 24px; --r-md: 18px; --r-sm: 12px;
  --display: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif;
  --body: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
button { font: inherit; cursor: pointer; color: inherit; }
:focus-visible { outline: 3px solid var(--bib); outline-offset: 2px; border-radius: 8px; }
[hidden] { display: none !important; }
.app { max-width: 520px; margin: 0 auto; padding: 0 16px; min-height: 100vh; }

/* ---------- Top bar ---------- */
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 14px 0 6px; position: sticky; top: 0; background: var(--bg); z-index: 6; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-style: italic; font-weight: 700; font-size: 22px; }
.brand b { color: var(--bib); font-weight: 800; }
.logo { width: 28px; height: 28px; border-radius: 8px; background:
  linear-gradient(90deg, transparent 72%, var(--bib) 72%, var(--bib) 80%, transparent 80%),
  repeating-linear-gradient(180deg, var(--track) 0 7px, var(--lane) 7px 8px); }
.top-actions { display: flex; gap: 6px; align-items: center; }
.pill { border: 1.5px solid var(--line); background: transparent; border-radius: 999px; padding: 6px 12px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.pill[aria-pressed="true"] { background: var(--bib); color: var(--bib-ink); border-color: var(--bib); }
.icon-btn { border: 0; background: transparent; font-size: 22px; width: 40px; height: 40px; border-radius: 50%; }
.menu { position: absolute; right: 16px; top: 56px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: 0 18px 40px rgba(0,0,0,.45); padding: 6px; z-index: 10; display: flex; flex-direction: column; min-width: 250px; }
.menu button { text-align: left; border: 0; background: transparent; padding: 11px 12px; border-radius: var(--r-sm); }
.menu button:hover { background: var(--surface); }
.menu .danger { color: var(--flag); }
.demo-banner { background: #3A2E08; color: #FFE08A; border-radius: var(--r-sm); padding: 9px 12px; font-size: 14px; margin: 6px 0 10px; }

/* ---------- Type ---------- */
h1, h2, h3, h4 { font-family: var(--display); margin: 0; line-height: 1.02; }
h1 { font-size: 46px; font-weight: 800; font-style: italic; margin: 14px 0 12px; }
.day-label { margin: 8px 0 0; color: var(--muted); font-weight: 600; font-size: 15px; }
.day-title { font-size: 40px; font-style: normal; margin: 0 0 14px; }
.sec-title { font-size: 20px; font-weight: 700; color: var(--ink-2); margin-bottom: 10px; }
.lede { color: var(--ink-2); margin: 0 0 20px; font-size: 17px; max-width: 36ch; }
.small { font-size: 14px; color: var(--muted); }
.label { display: block; font-family: var(--display); font-size: 22px; font-weight: 700; margin-bottom: 10px; }
.notice { font-size: 13px; color: var(--muted); text-align: center; margin: 22px 8px; }
.card { background: var(--surface); border-radius: var(--r-md); padding: 18px; margin: 14px 0; }
.panel { padding-bottom: 110px; }

/* ---------- Onboarding ---------- */
.view { padding-bottom: 24px; }
.hero { padding: 10px 0 4px; }
.hero-lane { position: relative; height: 92px; border-radius: var(--r-lg); background: var(--track); overflow: hidden; margin-top: 6px; }
.hero-lane i { position: absolute; left: 0; right: 0; height: 2px; background: var(--lane); }
.hero-lane i:nth-child(1) { top: 23px; } .hero-lane i:nth-child(2) { top: 46px; } .hero-lane i:nth-child(3) { top: 69px; }
.hero-tape { position: absolute; top: 0; bottom: 0; right: 18%; width: 8px; background: repeating-linear-gradient(180deg, var(--bib) 0 10px, #fff 10px 20px); }

/* ---------- Buttons and composer ---------- */
.composer { display: flex; align-items: flex-end; gap: 8px; background: var(--surface-2); border: 1.5px solid var(--line); border-radius: 20px; padding: 6px 6px 6px 14px; }
.composer:focus-within { border-color: var(--c-run); }
.composer textarea { flex: 1; border: 0; outline: 0; resize: none; background: transparent; color: var(--ink); font: inherit; padding: 9px 0; max-height: 140px; }
.composer textarea::placeholder { color: var(--muted); }
.composer-lg { margin-bottom: 14px; }
.mic, .send { border: 0; width: 44px; height: 44px; border-radius: 14px; flex: none; display: grid; place-items: center; }
.mic { background: var(--surface); color: var(--ink-2); }
.mic.on { background: var(--flag); color: #fff; animation: pulse 1.2s infinite; }
.send { background: var(--bib); color: var(--bib-ink); }
.send:disabled { opacity: .5; }
@keyframes pulse { 50% { opacity: .55; } }
.btn-primary { width: 100%; border: 0; background: var(--bib); color: var(--bib-ink); padding: 15px; border-radius: 16px; font-family: var(--display); font-weight: 700; font-size: 22px; }
.btn-primary:disabled { opacity: .6; }
.btn-link { border: 0; background: transparent; color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; padding: 14px 0 0; width: 100%; font-size: 15px; }
.btn-link.left { width: auto; padding: 12px 0 0; color: var(--c-run); font-weight: 700; text-decoration: none; }
.btn-small { border: 1.5px solid currentColor; background: transparent; border-radius: var(--r-sm); padding: 8px 12px; font-size: 14px; font-weight: 600; margin-top: 10px; align-self: flex-start; }

/* ---------- Rings: the signature element ---------- */
.rings-card { display: grid; grid-template-columns: 170px 1fr; align-items: center; gap: 16px; background: var(--surface); border-radius: var(--r-lg); padding: 16px; }
.rings svg { width: 170px; height: 170px; transform: rotate(-90deg); display: block; }
.r-bg { fill: none; stroke-width: 13; opacity: .18; }
.r-fg { fill: none; stroke-width: 13; stroke-linecap: round; transition: stroke-dashoffset 1s cubic-bezier(.2,.8,.2,1); }
.legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.legend li { display: grid; grid-template-columns: 10px 1fr; column-gap: 8px; align-items: center; }
.legend i { width: 10px; height: 10px; border-radius: 50%; }
.legend span { font-size: 14px; color: var(--muted); font-weight: 600; }
.legend b { grid-column: 2; font-family: var(--display); font-size: 22px; font-weight: 700; line-height: 1.1; }
.mini-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: 10px; margin: 10px 0 14px; }
.mini { background: var(--surface); border-radius: var(--r-md); padding: 12px 14px; }
.mini b { display: block; font-family: var(--display); font-size: clamp(20px, 6vw, 26px); font-weight: 800; line-height: 1.05; white-space: nowrap; }
.mini span { font-size: 14px; color: var(--ink-2); font-weight: 600; }
.mini small { color: var(--muted); font-weight: 500; font-size: 13px; }
@media (max-width: 380px) {
  .rings-card { grid-template-columns: 1fr; justify-items: center; }
  .legend { width: 100%; grid-template-columns: repeat(3, 1fr); }
  .legend b { font-size: 18px; }
}

/* ---------- Coach ---------- */
.coach-card { position: relative; background: var(--surface); border-radius: var(--r-lg); padding: 16px 18px 18px 22px; margin: 0 0 14px; overflow: hidden; }
.coach-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: var(--bib); }
.coach-head { font-size: 14px; font-weight: 700; color: var(--bib); display: flex; gap: 8px; align-items: center; }
.coach-head #coachTime { color: var(--muted); font-weight: 500; }
.coach-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--bib); }
.coach-msg { font-size: 19px; line-height: 1.4; font-weight: 600; margin: 6px 0 0; }
.coach-msg.loading { opacity: .55; }
.flag { background: var(--flag-bg); color: var(--flag); border-radius: var(--r-md); padding: 16px 18px; margin: 0 0 14px; display: flex; flex-direction: column; gap: 4px; border-left: 6px solid var(--flag); }

/* ---------- Next run ---------- */
.next .sec-title { color: var(--c-run); }
.stopwatch { display: flex; align-items: flex-end; gap: 18px; flex-wrap: wrap; }
.sw b { display: block; font-family: var(--display); font-size: 46px; font-weight: 800; line-height: .95; font-variant-numeric: tabular-nums; }
.sw small { display: block; font-size: 14px; color: var(--muted); font-weight: 600; margin-top: 2px; }
.sw.walk b { color: var(--ink-2); font-weight: 600; }
.sw.reps b { color: var(--bib); }
.sw-text { font-family: var(--display); font-size: 28px; font-weight: 700; line-height: 1.05; }
#nextHint { margin: 10px 0 0; }

/* ---------- Plan tab ---------- */
.track-panel { background: var(--track); color: #fff; border-radius: var(--r-lg); padding: 18px 18px 24px; margin: 0 0 14px; }
.track-head { margin-bottom: 20px; }
.finish-title { margin: 0; font-family: var(--display); font-size: 22px; font-weight: 600; line-height: 1.05; }
.finish-title strong { display: block; font-size: 50px; font-weight: 800; font-style: italic; color: var(--bib); }
#finishNote { margin: 6px 0 0; color: rgba(255,255,255,.85); }
.track { position: relative; height: 64px; margin: 0 22px 0 6px; }
.lane-lines { position: absolute; inset: 0 -28px 0 -12px; background:
  linear-gradient(var(--lane), var(--lane)) 0 0 / 100% 2px no-repeat,
  linear-gradient(var(--lane), var(--lane)) 0 100% / 100% 2px no-repeat,
  linear-gradient(rgba(255,255,255,.18), rgba(255,255,255,.18)) 0 50% / 100% 1px no-repeat; }
.marks i { position: absolute; top: 50%; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; border: 2px solid rgba(255,255,255,.6); background: var(--track); }
.marks i.done { background: #fff; border-color: #fff; }
.marks i.now { opacity: 0; }
.tape { position: absolute; top: -8px; bottom: -8px; right: -22px; width: 8px; background: repeating-linear-gradient(180deg, var(--bib) 0 8px, #fff 8px 16px); border-radius: 2px; }
.tape span { position: absolute; top: -22px; left: 50%; transform: translateX(-50%); font-family: var(--display); font-weight: 800; font-style: italic; font-size: 15px; color: var(--bib); }
.runner { --x: 0%; position: absolute; top: 50%; left: var(--x); transform: translate(-50%, -50%); background: var(--bib); color: var(--bib-ink); border-radius: 10px; padding: 3px 9px 4px; text-align: center; box-shadow: 0 6px 16px rgba(0,0,0,.3); transition: left .9s cubic-bezier(.2,.8,.2,1); }
.runner .bib { display: block; font-size: 11px; font-weight: 700; line-height: 1; opacity: .8; }
.runner b { font-family: var(--display); font-size: 26px; font-weight: 800; line-height: 1; }

.blk { border-left: 4px solid var(--line); padding: 4px 0 4px 14px; margin-top: 16px; }
.blk:first-child { margin-top: 4px; }
.blk:nth-of-type(2) { border-color: var(--c-run); }
.blk-h { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.blk-h b { font-family: var(--display); font-size: 21px; font-weight: 700; }
.blk-h span { font-size: 14px; color: var(--muted); font-weight: 600; }
.blk ol, .blk ul { margin: 6px 0 0; padding-left: 20px; font-size: 15px; color: var(--ink-2); }
.blk li { margin: 5px 0; }
.blk.tips { border-color: var(--bib); }
.blk.tips b { display: block; font-family: var(--display); font-size: 21px; font-weight: 700; }

.ladder { list-style: none; margin: 0; padding: 0; }
.ladder li { display: grid; grid-template-columns: 30px 1fr auto; gap: 10px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 15px; }
.ladder li:last-child { border-bottom: 0; }
.ladder .n { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-family: var(--display); font-weight: 700; border: 1.5px solid var(--line); }
.ladder li.done { color: var(--ink-2); }
.ladder li.done .n { background: var(--c-run); border-color: var(--c-run); color: #fff; }
.ladder li.now { color: var(--ink); font-weight: 600; }
.ladder li.now .n { background: var(--bib); border-color: var(--bib); color: var(--bib-ink); }
.ladder em { font-style: normal; font-size: 13px; color: var(--bib); font-weight: 700; }

/* ---------- Coach tab ---------- */
.thread { display: flex; flex-direction: column; gap: 8px; margin: 6px 0 14px; }
.bubble { max-width: 86%; padding: 11px 15px; border-radius: 18px; font-size: 16px; }
.bubble.me { align-self: flex-end; background: var(--c-run); color: #fff; border-bottom-right-radius: 5px; }
.bubble.ai { align-self: flex-start; background: var(--surface); border-bottom-left-radius: 5px; box-shadow: inset 4px 0 0 var(--bib); }
.bubble.ai.red { background: var(--flag-bg); color: var(--flag); box-shadow: inset 4px 0 0 var(--flag); }
.bubble .meta { display: block; font-size: 13px; opacity: .7; margin-top: 4px; }
.bubble.typing { opacity: .6; }

/* ---------- Week tab ---------- */
.weekbars { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; align-items: end; height: 120px; margin-top: 6px; }
.wb { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 4px; font-size: 13px; color: var(--muted); }
.wb span { font-family: var(--display); font-weight: 700; color: var(--ink); font-size: 15px; }
.wb i { display: block; width: 100%; max-width: 30px; background: var(--line); border-radius: 6px 6px 2px 2px; min-height: 4px; }
.wb:not(.today) i:not([style*="height:0%"]) { background: var(--c-run); }
.wb.today i { background: var(--bib); }
.hist-day { border-bottom: 1px solid var(--line); padding: 12px 0; }
.hist-day:last-child { border-bottom: 0; }
.hist-day h4 { margin: 0 0 4px; font-size: 20px; }
.hist-day p { margin: 3px 0; font-size: 15px; color: var(--ink-2); }
.hist-day .said { color: var(--muted); font-style: italic; }

/* ---------- Dock and tab bar ---------- */
.dock { position: fixed; left: 0; right: 0; bottom: calc(64px + env(safe-area-inset-bottom)); padding: 10px 16px; background: linear-gradient(to top, var(--bg) 70%, transparent); z-index: 7; }
.dock .composer { max-width: 488px; margin: 0 auto; }
.spacer { height: 70px; }
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 8; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; max-width: 520px; margin: 0 auto; padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); background: rgba(10,18,34,.94); backdrop-filter: blur(12px); border-top: 1px solid var(--line); }
.tabbar button { border: 0; background: transparent; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 0; font-size: 12px; font-weight: 600; border-radius: 12px; }
.tabbar svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tabbar button[aria-current] { color: var(--bib); }

.toast { position: fixed; left: 50%; bottom: 150px; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 11px 16px; border-radius: 14px; font-size: 15px; max-width: 90vw; z-index: 20; box-shadow: 0 10px 30px rgba(0,0,0,.4); }

@media (prefers-reduced-motion: reduce) { .runner, .r-fg { transition: none; } .mic.on { animation: none; } }
@media (max-width: 360px) { h1 { font-size: 38px; } .finish-title strong { font-size: 42px; } .sw b { font-size: 38px; } }

/* ---------- Goals ---------- */
.goal-choice { display: grid; gap: 10px; margin: 4px 0 18px; }
.goal-opt { text-align: left; border: 2px solid var(--line); background: var(--surface); border-radius: var(--r-md); padding: 14px 16px; display: grid; gap: 2px; }
.goal-opt b { font-family: var(--display); font-size: 24px; font-weight: 700; }
.goal-opt span { font-size: 14px; color: var(--muted); }
.goal-opt[aria-checked="true"] { border-color: var(--bib); background: var(--surface-2); }
.goal-opt[aria-checked="true"] b { color: var(--bib); }
.goal-opt:disabled { opacity: .5; cursor: default; }
.field-hint { margin: -4px 0 12px; }
.goal-list { display: grid; gap: 12px; margin: 6px 0 8px; }
.goal-card { display: grid; grid-template-columns: 64px 1fr auto; gap: 14px; align-items: center; text-align: left; border: 0; background: var(--surface); border-radius: var(--r-lg); padding: 14px; }
.goal-card .g-tape { height: 64px; border-radius: 14px; background: var(--track); display: grid; place-items: center; font-family: var(--display); font-weight: 800; font-style: italic; font-size: 22px; color: var(--bib); box-shadow: inset -6px 0 0 var(--bib); }
.g-text b { display: block; font-family: var(--display); font-size: 24px; font-weight: 700; }
.g-text span { font-size: 14px; color: var(--muted); }
.g-go { font-size: 30px; color: var(--muted); }
.goal-chip { display: flex; align-items: baseline; gap: 8px; width: 100%; text-align: left; border: 0; background: transparent; padding: 0; margin: -6px 0 14px; color: var(--ink-2); }
.goal-chip span { font-size: 14px; color: var(--muted); font-weight: 600; }
.goal-chip b { font-weight: 700; }
.goal-chip em { margin-left: auto; font-style: normal; font-size: 14px; color: var(--c-run); font-weight: 700; }
.btn-link.back { width: auto; padding: 4px 0 8px; text-decoration: none; color: var(--c-run); font-weight: 700; }

/* ---------- Goals in his own words ---------- */
.suggest { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 18px; }
.suggest button { border: 1.5px solid var(--line); background: var(--surface); color: var(--ink-2); border-radius: 999px; padding: 8px 14px; font-size: 15px; font-weight: 600; }
.suggest button:active { border-color: var(--bib); }
.found-goals { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 10px; }
.found-goals li { display: grid; grid-template-columns: 56px 1fr; gap: 12px; align-items: center; background: var(--surface); border-radius: var(--r-md); padding: 12px; }
.g-dot { height: 52px; border-radius: 12px; background: var(--track); display: grid; place-items: center; font-family: var(--display); font-weight: 800; font-style: italic; font-size: 18px; color: var(--bib); }
.found-goals b { display: block; font-family: var(--display); font-size: 22px; font-weight: 700; }
.found-goals small { color: var(--muted); font-size: 14px; }
.q { font-weight: 600; margin: 4px 0 8px; }
.seg { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.seg button { border: 1.5px solid var(--line); background: var(--surface-2); border-radius: 12px; padding: 10px 14px; font-weight: 600; font-size: 15px; color: var(--ink-2); }
.seg button[aria-checked="true"] { background: var(--bib); border-color: var(--bib); color: var(--bib-ink); }
.goal-card { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; background: var(--surface); border-radius: var(--r-lg); padding: 12px 12px 12px 14px; }
.goal-card.focus { box-shadow: inset 0 0 0 2px var(--bib); }
.goal-pick { display: grid; grid-template-columns: 64px 1fr; gap: 14px; align-items: center; text-align: left; border: 0; background: transparent; padding: 0; }
.g-edit { border: 1.5px solid var(--line); background: transparent; color: var(--ink-2); border-radius: 10px; padding: 6px 12px; font-size: 14px; font-weight: 600; }
.g-form { grid-column: 1 / -1; display: grid; gap: 6px; padding-top: 8px; }
.g-form input { background: var(--surface-2); border: 1.5px solid var(--line); border-radius: 10px; color: var(--ink); font: inherit; padding: 10px 12px; }
.g-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-small.danger { color: var(--flag); }
.food-total { margin: 0 0 8px; color: var(--ink-2); }
.food-total b { font-family: var(--display); font-size: 34px; color: var(--ink); }
.meals { list-style: none; margin: 0 0 8px; padding: 0; }
.meals li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 15px; color: var(--ink-2); }
.meals li b { font-weight: 700; color: var(--ink); white-space: nowrap; }
.composer-lg textarea { min-height: 84px; }

/* ---------- Food tab ---------- */
.seg-sm { margin-bottom: 12px; }
.seg-sm button { padding: 8px 12px; font-size: 14px; }
.meal-group { margin-top: 10px; }
.mg-h { display: flex; justify-content: space-between; align-items: baseline; }
.mg-h b { font-family: var(--display); font-size: 19px; font-weight: 700; }
.mg-h span { font-size: 14px; color: var(--muted); font-weight: 600; }
.meals li { align-items: center; }
.meals li span { flex: 1; }
.rm { border: 0; background: transparent; color: var(--muted); font-size: 22px; line-height: 1; width: 32px; height: 32px; border-radius: 8px; flex: none; }
.rm:hover { color: var(--flag); background: var(--flag-bg); }

/* ---------- Water glass ---------- */
.water-card { display: grid; grid-template-columns: 96px 1fr; gap: 18px; align-items: center; background: var(--surface); border-radius: var(--r-lg); padding: 16px 18px; margin: 10px 0 0; }
.glass { position: relative; width: 84px; height: 128px; margin: 0 auto; border: 3px solid rgba(255,255,255,.55); border-top: 0; border-radius: 0 0 18px 18px; clip-path: polygon(0 0, 100% 0, 88% 100%, 12% 100%); background: rgba(47,211,198,.06); overflow: hidden; }
.glass-fill { position: absolute; left: 0; right: 0; bottom: 0; height: 0; background: linear-gradient(180deg, #5FE3D8, var(--c-water)); transition: height .6s cubic-bezier(.2,.8,.2,1); }
.glass-fill::before { content: ""; position: absolute; left: 0; right: 0; top: -3px; height: 6px; background: rgba(255,255,255,.35); border-radius: 50%; }
.glass-marks i { position: absolute; left: 0; width: 22%; height: 1.5px; background: rgba(255,255,255,.45); }
.glass-marks i:nth-child(4n) { width: 40%; background: rgba(255,255,255,.7); }
.water-info .sec-title { color: var(--c-water); margin-bottom: 2px; }
.water-amt { margin: 0; }
.water-amt b { font-family: var(--display); font-size: 40px; font-weight: 800; }
.water-amt span { font-family: var(--display); font-size: 22px; color: var(--muted); font-weight: 600; }
.water-info .small { margin: 2px 0 10px; }
.water-btns { display: flex; gap: 8px; }
.wbtn { border: 1.5px solid var(--line); background: var(--surface-2); border-radius: 12px; height: 44px; min-width: 44px; padding: 0 14px; font-size: 18px; font-weight: 700; color: var(--ink-2); }
.wbtn.plus { background: var(--c-water); border-color: var(--c-water); color: #04201E; font-size: 16px; flex: 1; }
.wbtn:disabled { opacity: .4; }
@media (prefers-reduced-motion: reduce) { .glass-fill { transition: none; } }

/* ---------- Calorie goal and meal ideas ---------- */
.goal-input { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.goal-input input { width: 120px; background: var(--surface-2); border: 1.5px solid var(--line); border-radius: 10px; color: var(--ink); font: inherit; font-family: var(--display); font-size: 22px; font-weight: 700; padding: 6px 10px; }
.goal-input span { color: var(--muted); font-size: 14px; }
.goal-input .btn-small { margin-top: 0; }
#calGoalMsg { margin: 8px 0 0; }
.ideas .slot { display: block; font-family: var(--display); font-size: 16px; color: var(--c-water); }
.ideas li span { color: var(--ink); }

/* ---------- 3D water glass ---------- */
.glass3d { width: 96px; margin: 0 auto; }
.glass3d svg { width: 96px; height: auto; display: block; overflow: visible; }
.water-card { grid-template-columns: 104px 1fr; }

/* ---------- Always-visible "Tell the coach" button on Today ---------- */
.tell-dock { position: fixed; left: 0; right: 0; bottom: calc(64px + env(safe-area-inset-bottom)); z-index: 7; padding: 10px 16px; background: linear-gradient(to top, var(--bg) 65%, transparent); }
.tell-btn { display: flex; flex-direction: column; align-items: center; gap: 0; max-width: 488px; margin: 0 auto; padding: 10px 14px; box-shadow: 0 10px 28px rgba(0,0,0,.4); }
.tell-btn span { font-size: 21px; line-height: 1.1; }
.tell-btn small { font-family: var(--body); font-size: 13px; font-weight: 600; opacity: .75; }
#tab-today { padding-bottom: 170px; }
.mini-add { text-align: left; border: 1.5px dashed var(--line); cursor: pointer; color: var(--ink); }
.mini-add b { color: var(--c-run); }

.sw.seq b { font-size: 38px; letter-spacing: .01em; }

.quick { display: flex; gap: 8px; flex-wrap: wrap; align-self: flex-start; margin-top: 2px; }
.quick button { border: 1.5px solid var(--bib); background: transparent; color: var(--bib); border-radius: 999px; padding: 9px 16px; font-weight: 700; font-size: 15px; }
.quick button:first-child { background: var(--bib); color: var(--bib-ink); }

/* ---------- Steps on a running track ---------- */
.steps-card { background: var(--surface); border-radius: var(--r-lg); padding: 16px 18px; margin: 10px 0 0; }
.steps-head { display: flex; justify-content: space-between; align-items: center; }
.steps-head .sec-title { color: var(--bib); margin: 0; }
.steps-form { padding: 8px 0 0; }
.steps-track { position: relative; margin: 10px 0 4px; }
.steps-track svg { width: 100%; height: auto; display: block; }
#stTrackOuter { stroke: var(--track); stroke-width: 18; }
#stTrackLane { stroke: rgba(255,255,255,.35); stroke-width: 1; stroke-dasharray: 4 5; }
#stProgress { stroke: var(--bib); stroke-width: 8; stroke-linecap: round; transition: stroke-dashoffset 1s cubic-bezier(.2,.8,.2,1); }
.st-start { stroke: #fff; stroke-width: 3; }
#stRunner { fill: var(--bib); stroke: var(--bg); stroke-width: 3; transition: cx 1s, cy 1s; }
.steps-center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.steps-center b { font-family: var(--display); font-size: 40px; font-weight: 800; line-height: 1; }
.steps-center span { font-size: 13px; color: var(--muted); font-weight: 600; }
.steps-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.steps-foot .small { margin: 0; }
.steps-foot .btn-small { margin-top: 0; white-space: nowrap; border-color: var(--bib); color: var(--bib); }
@media (prefers-reduced-motion: reduce) { #stProgress, #stRunner { transition: none; } }

/* ---------- Week tab: one summary per tracker ---------- */
.week-range { margin: -8px 0 6px; }
.week-card { padding-bottom: 14px; }
.wk-head .sec-title { margin-bottom: 6px; }
.wk-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 8px; margin-bottom: 8px; }
.wk-stats b { display: block; font-family: var(--display); font-size: 26px; font-weight: 800; line-height: 1.05; }
.wk-stats span { font-size: 13px; color: var(--muted); font-weight: 600; }
.wk-bars { position: relative; height: 130px; }
.wk-bars .wb i { max-width: 26px; }
.goal-line { position: absolute; left: 0; right: 0; border-top: 1.5px dashed rgba(255,255,255,.35); pointer-events: none; }
.goal-line span { position: absolute; right: 0; top: -16px; font-size: 11px; color: var(--muted); font-weight: 700; }
