@import url('./food-experience.css');

/* The two brand fonts ship with the app (css/fonts, SIL Open Font License): no font server, the right
   letters from the first frame, offline too. Variable fonts: one file covers every weight used. */
@font-face { font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 200 800; font-display: swap; src: url('../../css/fonts/plus-jakarta-sans-latin-wght-normal.woff2') format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 200 800; font-display: swap; src: url('../../css/fonts/plus-jakarta-sans-latin-ext-wght-normal.woff2') format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Space Grotesk"; font-style: normal; font-weight: 300 700; font-display: swap; src: url('../../css/fonts/space-grotesk-latin-wght-normal.woff2') format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Space Grotesk"; font-style: normal; font-weight: 300 700; font-display: swap; src: url('../../css/fonts/space-grotesk-latin-ext-wght-normal.woff2') format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }

/* Tenra v2 — Tenra brand (lime on ink), Plus Jakarta Sans + Space Grotesk.
   Mobile-first single column (max 520px), thumb-zone actions at the bottom. */
:root {
  --bg: #f4f6f1;
  --surface: #ffffff;
  --surface-2: #eef1ea;
  --ink: #0e120e;
  --on-ink: #f4f6f1;
  --text: #141813;
  --muted: #5d6658;
  --line: #e2e6dd;
  --lime: #c8f542;
  --lime-2: #a9d71c;
  --lime-ink: #476700;
  --lime-soft: #eef9cc;
  --food: #e07a2e;
  --food-2: #c4621a;
  --food-ink: #944308;
  --food-soft: #fceede;
  --food-surface: #fdfaf5;
  --food-surface-2: #f4ede2;
  --food-line: #e8dccb;
  --danger: #c42f34;
  --danger-soft: #fde8e8;
  --warn: #9a6400;
  --warn-soft: #fff3d6;
  --r-lg: 24px;
  --r: 18px;
  --r-sm: 12px;
  --shadow: 0 1px 2px rgba(14, 18, 14, 0.025), 0 12px 28px -20px rgba(14, 18, 14, 0.22);
  --shadow-lg: 0 -1px 0 rgba(14, 18, 14, 0.04), 0 24px 60px -20px rgba(14, 18, 14, 0.45);
  --hair: rgba(14, 18, 14, 0.06);
  --check: #c8f542; /* the tick on an ink-filled selection: lime on dark ink, deep green on light ink */
  --sheen: rgba(255, 255, 255, 0.7);
  --glow: rgba(200, 245, 66, 0.16); /* the soft lime light at the top of every screen */
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Space Grotesk", "Plus Jakarta Sans", system-ui, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b0d0b; --surface: #151915; --surface-2: #1c211b; --ink: #f1f5ec; --on-ink: #0b0d0b;
    --text: #eef2ea; --muted: #9aa394; --line: #262c24; --lime-ink: #c8f542; --lime-soft: #232c0f; --toast-accent: #476700;
    --food: #f09246; --food-2: #d97736; --food-ink: #f5a665; --food-soft: #2c1f14; --food-surface: #1b1714; --food-surface-2: #241e1a; --food-line: #332a22;
    --danger: #ff6b6f; --danger-soft: #3a1c1d; --warn: #f0b545; --warn-soft: #33290f;
    --shadow: 0 1px 0 rgba(255, 255, 255, 0.025), 0 12px 28px -20px rgba(0, 0, 0, 0.55);
    --shadow-lg: 0 -1px 0 rgba(255, 255, 255, 0.04), 0 24px 60px -20px rgba(0, 0, 0, 0.9);
    --hair: rgba(255, 255, 255, 0.07); --sheen: rgba(255, 255, 255, 0.06); --check: #3f5f00; --glow: rgba(200, 245, 66, 0.07);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b0d0b; --surface: #151915; --surface-2: #1c211b; --ink: #f1f5ec; --on-ink: #0b0d0b;
  --text: #eef2ea; --muted: #9aa394; --line: #262c24; --lime-ink: #c8f542; --lime-soft: #232c0f; --toast-accent: #476700;
  --food: #f09246; --food-2: #d97736; --food-ink: #f5a665; --food-soft: #2c1f14; --food-surface: #1b1714; --food-surface-2: #241e1a; --food-line: #332a22;
  --danger: #ff6b6f; --danger-soft: #3a1c1d; --warn: #f0b545; --warn-soft: #33290f;
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.025), 0 12px 28px -20px rgba(0, 0, 0, 0.55);
  --shadow-lg: 0 -1px 0 rgba(255, 255, 255, 0.04), 0 24px 60px -20px rgba(0, 0, 0, 0.9);
  --hair: rgba(255, 255, 255, 0.07); --sheen: rgba(255, 255, 255, 0.06); --check: #3f5f00; --glow: rgba(200, 245, 66, 0.07);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; color: var(--text); font-family: var(--font); font-size: 16px; line-height: 1.45; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
/* A soft lime light at the top of every screen, over the flat brand background. */
html { background: radial-gradient(130% 420px at 50% -120px, var(--glow), transparent 70%) no-repeat, var(--bg); }
body { min-height: 100dvh; background: transparent; }
::selection { background: color-mix(in srgb, var(--lime) 55%, transparent); color: var(--text); }
#shell, #flow { opacity: 0; transition: opacity 0.2s; }
body.ready #shell, body.ready #flow { opacity: 1; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--lime-2); outline-offset: 2px; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
p { margin: 0; }
p, li, .why, .callout { text-wrap: pretty; }
.mono { font-family: var(--display); font-variant-numeric: tabular-nums; }
/* Numbers line up in every list, stat and timer. */
.ex-load, .nt-delta, .delta, .stats3 strong, .fin-stats strong, .st-val, .ws-clock, .ring span, .ob-count, .h-date, .tests li span:last-child { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
[hidden] { display: none !important; }

/* Icons */
.ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ic.big { width: 40px; height: 40px; }
.ic.micro { width: 13px; height: 13px; }
@keyframes spin { to { transform: rotate(360deg); } }
.ic.spin { animation: spin 1s linear infinite; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px; border-radius: 999px; border: 1px solid transparent; font-weight: 700; font-size: 1rem; text-decoration: none; background: var(--surface-2); color: var(--text); transition: transform 0.12s var(--ease), background 0.15s; }
.btn:active { transform: scale(0.98); }
.btn.cta { background: linear-gradient(180deg, #d6fb63, var(--lime) 45%, var(--lime-2)); color: #0e120e; letter-spacing: -0.005em; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), inset 0 -1px 0 rgba(14, 18, 14, 0.1), 0 8px 18px -12px rgba(130, 180, 10, 0.4); }
.btn.cta:active { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 4px 12px -10px rgba(130, 180, 10, 0.35); }
@media (hover: hover) { .btn:hover { filter: brightness(1.03); } .chip:hover, .pick button:hover, .opt:hover { border-color: color-mix(in srgb, var(--text) 22%, var(--line)); } }
.btn.big { min-height: 60px; font-size: 1.08rem; width: 100%; }
.btn.big small { font-weight: 600; opacity: 0.65; font-size: 0.85rem; margin-left: 4px; }
.btn.dark { background: linear-gradient(180deg, color-mix(in srgb, var(--ink) 88%, var(--on-ink)), var(--ink)); color: var(--on-ink); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 10px 22px -14px rgba(14, 18, 14, 0.7); }
/* Sign in with Apple: black with white text, white with black text in dark mode (Apple's own styles). */
.btn.apple { min-height: 52px; background: #000; color: #fff; font-size: 1.02rem; }
.btn.apple .apple-logo { width: 17px; height: 20px; margin-top: -3px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn.apple { background: #fff; color: #000; } }
:root[data-theme="dark"] .btn.apple { background: #fff; color: #000; }
.btn.ghost { background: color-mix(in srgb, var(--surface) 70%, transparent); border-color: color-mix(in srgb, var(--text) 12%, var(--line)); box-shadow: inset 0 1px 0 var(--sheen); }
.btn.danger { background: var(--danger); color: var(--on-ink); }
.btn.danger-ghost { background: transparent; color: var(--danger); border-color: color-mix(in srgb, var(--danger) 35%, transparent); }
.btn.small { min-height: 40px; padding: 0 16px; font-size: 0.92rem; }
.icon-btn { width: 44px; height: 44px; border-radius: 999px; border: 0; background: var(--surface-2); color: var(--text); display: grid; place-items: center; box-shadow: inset 0 0 0 1px var(--hair); transition: transform 0.12s var(--ease); }
.icon-btn:active { transform: scale(0.94); }
.link.on-dark { color: var(--lime); align-self: flex-start; }
.link { background: none; border: 0; color: var(--lime-ink); font-weight: 700; padding: 8px 0; text-decoration: underline; text-underline-offset: 3px; }
.row2 { display: flex; gap: 8px; flex-wrap: wrap; }
.row2 .btn { flex: 1; }
.stack { display: flex; flex-direction: column; gap: 10px; }

/* Chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-weight: 600; font-size: 0.92rem; display: inline-flex; align-items: center; transition: background 0.15s, border-color 0.15s, transform 0.12s var(--ease); }
.chip:active { transform: scale(0.97); }
/* One selected language across the app: ink plus a lime check (chips, option cards, pick rows). */
.chip.on { background: var(--ink); color: var(--on-ink); border-color: var(--ink); padding-left: 12px; gap: 6px; }
.chips:not(.static) .chip.on::before { content: ''; width: 14px; height: 14px; background: var(--check); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 14px no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 14px no-repeat; }
.chips.static .chip { min-height: 32px; padding: 0 12px; font-size: 0.85rem; }
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); font-size: 0.72rem; font-weight: 700; vertical-align: middle; }
.pill .ic { width: 14px; height: 14px; }
.pill.lime { background: var(--lime); color: #0e120e; }

/* Cards */
.card { background: var(--surface); border-radius: var(--r-lg); padding: 18px; box-shadow: inset 0 1px 0 var(--sheen), 0 0 0 1px var(--hair), var(--shadow); display: flex; flex-direction: column; gap: 12px; }
.card.flat { box-shadow: none; border: 1px solid var(--line); }
.kicker { display: inline-flex; align-items: center; gap: 6px; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.11em; text-transform: uppercase; color: var(--muted); }
.kicker .ic { width: 16px; height: 16px; color: var(--lime-ink); }
.sheet-label { font-size: 0.8rem; font-weight: 700; color: var(--muted); margin-top: 4px; }

/* Avatars */
.avatar { --c: #ff6b4a; width: 40px; height: 40px; border-radius: 999px; display: inline-grid; place-items: center; background: var(--c); color: #0e120e; font-family: var(--display); font-weight: 700; flex: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 25%, transparent); }
.avatar.photo { background-size: cover; background-position: center; }
.avatar.sm { width: 26px; height: 26px; font-size: 0.8rem; box-shadow: none; }
.avatar.lg { width: 48px; height: 48px; font-size: 1.2rem; }
.avatar.xl { width: 84px; height: 84px; font-size: 2.1rem; }

/* Shell */
#shell { min-height: 100dvh; }
.view { max-width: 520px; margin: 0 auto; padding: calc(12px + var(--safe-t)) 16px calc(180px + var(--safe-b)); }
.page { display: flex; flex-direction: column; gap: 14px; }
.page-title { font-family: var(--display); font-size: 2rem; letter-spacing: -0.02em; padding: 8px 2px 2px; }
.tabbar { position: fixed; left: 0; right: 0; bottom: calc(10px + var(--safe-b)); z-index: 20; width: min(100% - 32px, 380px); margin: 0 auto; display: flex; gap: 4px; padding: 6px; border-radius: 999px; background: color-mix(in srgb, var(--surface) 78%, transparent); backdrop-filter: saturate(1.6) blur(22px); -webkit-backdrop-filter: saturate(1.6) blur(22px); box-shadow: inset 0 1px 0 var(--sheen), 0 0 0 1px var(--hair), 0 18px 40px -18px rgba(14, 18, 14, 0.45); }
/* Content fades out under the floating bar instead of running into the screen edge. */
#shell::after { content: ''; position: fixed; left: 0; right: 0; bottom: 0; z-index: 18; height: calc(116px + var(--safe-b)); background: linear-gradient(to top, var(--bg) 52%, color-mix(in srgb, var(--bg) 0%, transparent)); pointer-events: none; }
.tab { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 52px; padding: 4px 0; border: 0; border-radius: 999px; background: none; color: var(--muted); font-size: 0.7rem; font-weight: 700; letter-spacing: 0.01em; transition: background 0.25s var(--ease), color 0.2s; }
.tab .ic { width: 22px; height: 22px; }
.tab:active { transform: scale(0.97); }
.tab.on { color: var(--on-ink); background: var(--ink); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 8px 18px -10px rgba(14, 18, 14, 0.6); }
.tab.on .ic { color: var(--check); }
/* The Start button sits right above the floating bar; its fade runs down behind the bar to the screen edge. */
.start-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 19; padding: 36px 16px calc(90px + var(--safe-b)); max-width: 520px; margin: 0 auto; background: linear-gradient(to top, var(--bg) 78%, color-mix(in srgb, var(--bg) 0%, transparent)); }

/* Today */
.today-head { display: flex; flex-direction: column; gap: 4px; padding: 6px 2px 2px; }
/* The date, and the way to the coach on the right: the same place on every kind of day. */
.th-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; min-height: 40px; }
/* Too tight for both (large text, a long language): the button goes under the date, not over it. */
.th-top .date { flex: 1 1 7.5em; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.th-top .date::before { display: inline-block; margin-right: 8px; vertical-align: 1px; }
.th-top .d-short { display: none; }
@media (max-width: 380px) { .th-top .d-long { display: none; } .th-top .d-short { display: inline; } }
.date { display: inline-flex; align-items: center; gap: 8px; font-size: 0.85rem; font-weight: 600; color: var(--muted); }
.date::before { content: ''; width: 7px; height: 7px; border-radius: 999px; background: var(--lime); box-shadow: 0 0 0 3px color-mix(in srgb, var(--lime) 28%, transparent); }
.hello { font-family: var(--display); font-size: 1.8rem; line-height: 1.1; letter-spacing: -0.02em; }
.hello.long { font-size: 1.4rem; line-height: 1.15; }
.powered { display: inline-flex; align-items: center; gap: 6px; font-size: 0.8rem; font-weight: 600; color: var(--muted); margin-top: 4px; }
.powered img { border-radius: 5px; }
.week { padding: 14px 16px; gap: 10px; }
.week-row { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.wd { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 6px; }
.wd-l { font-size: 0.72rem; font-weight: 700; color: var(--muted); line-height: 1; }
.wd-dot { flex: none; width: 32px; height: 32px; border-radius: 999px; background: transparent; display: grid; place-items: center; position: relative; }
.wd.rest .wd-dot::after { content: ''; width: 6px; height: 6px; border-radius: 999px; background: var(--line); }
.wd-dot .ic { width: 16px; height: 16px; stroke-width: 3; }
.wd.planned .wd-dot { box-shadow: inset 0 0 0 2px var(--line); background: transparent; }
.wd.bonus .wd-dot { box-shadow: inset 0 0 0 2px var(--line); background: transparent; border: 2px dashed var(--line); }
.wd.done .wd-dot { background: linear-gradient(180deg, #d6fb63, var(--lime-2)); color: #0e120e; box-shadow: 0 6px 14px -8px rgba(130, 180, 10, 0.9); }
/* Today: a ringed target, not a solid disc (reads the same in both themes). */
.wd.today .wd-dot, .road li.now .dot { background: var(--surface); box-shadow: inset 0 0 0 2px var(--ink), 0 0 0 4px color-mix(in srgb, var(--lime) 55%, transparent); }
.wd.today .wd-dot::after, .road li.now .dot::after { content: ''; width: 10px; height: 10px; border-radius: 999px; background: var(--ink); }
.wd.today .wd-l { color: var(--text); }
/* A day that passed without training reads like a rest day: no alarm. Missing one doesn't break the plan. */
.wd.missed .wd-dot::after { content: ''; width: 6px; height: 6px; border-radius: 999px; background: var(--line); }
.week-meta { font-size: 0.82rem; color: var(--muted); font-weight: 600; }
.session-card { gap: 10px; }
.sc-top { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 8px; }
.sc-title { grid-column: 1 / -1; font-family: var(--display); font-size: 1.3rem; letter-spacing: -0.01em; margin: 0; }
.time-chips { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 3px; background: var(--surface-2); padding: 3px; border-radius: 12px; }
.tchip { min-width: 0; min-height: 44px; padding: 4px; border: 0; border-radius: 9px; background: transparent; font-family: var(--display); font-weight: 700; font-size: 0.82rem; color: var(--muted); white-space: normal; }
.tchip.on { background: var(--surface); color: var(--text); box-shadow: 0 2px 8px -4px rgba(0, 0, 0, 0.3); }
.rest-day { font-size: 0.88rem; color: var(--muted); }
.rest-day strong { color: var(--text); }
/* Plan & settings behind the person's initial, top right, where most apps keep them. */
.me-btn { position: relative; flex: none; width: 40px; height: 40px; border-radius: 999px; border: 0; display: grid; place-items: center; background: var(--surface); color: var(--text); font-family: var(--display); font-weight: 700; font-size: 1rem; box-shadow: inset 0 1px 0 var(--sheen), 0 0 0 1px var(--hair), var(--shadow); cursor: pointer; transition: transform 0.12s var(--ease); }
.me-btn .ic { width: 18px; height: 18px; }
/* A comfortable thumb target (~48 px) around a 40 px circle. */
.me-btn::after { content: ''; position: absolute; inset: -4px; border-radius: inherit; }
.me-btn:active { transform: scale(0.94); }
/* "Talk to coach": a quiet full-width row under Workout · Food, the same place every day. The coach's
   mark on the left, what it is for in one line, an arrow. Light, so the workout stays the hero. */
.talk-row { position: relative; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; width: 100%; min-height: 58px; padding: 9px 12px 9px 9px;
  border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); color: var(--text); text-align: left; font: inherit; cursor: pointer;
  box-shadow: inset 0 1px 0 var(--sheen); -webkit-tap-highlight-color: transparent; transition: transform 0.12s var(--ease), border-color 0.2s; }
.talk-row:active { transform: scale(0.985); }
@media (hover: hover) { .talk-row:hover { border-color: color-mix(in srgb, var(--lime-2) 55%, var(--line)); } }
.talk-mark { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--lime-soft); color: var(--lime-ink); }
.talk-mark .ic { width: 20px; height: 20px; }
.talk-mark:has(.avatar) { background: none; }
.talk-mark .avatar { width: 38px; height: 38px; font-size: 0.95rem; box-shadow: none; }
.talk-t { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.talk-t strong { font-family: var(--display); font-size: 0.98rem; font-weight: 600; letter-spacing: -0.01em; }
.talk-t small { font-size: 0.8rem; color: var(--muted); line-height: 1.3; }
.talk-go { width: 32px; height: 32px; border-radius: 999px; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); }
.talk-go .ic { width: 16px; height: 16px; }
.ex-list.tappable li { display: block; padding: 0; counter-increment: ex; }
.ex-list.tappable li::before { content: none; }
.ex-list.tappable button { width: 100%; display: grid; grid-template-columns: 28px 1fr auto; align-items: center; gap: 8px; padding: 11px 0; border: 0; background: none; text-align: left; font-size: 0.95rem; color: var(--text); }
.ex-list.tappable button::before { content: counter(ex); font-family: var(--display); font-weight: 700; font-size: 0.8rem; color: var(--muted); width: 24px; height: 24px; border-radius: 8px; background: var(--surface-2); display: grid; place-items: center; }
.why { display: flex; gap: 6px; align-items: flex-start; background: var(--lime-soft); color: var(--text); border-radius: var(--r-sm); padding: 8px 10px; font-size: 0.82rem; line-height: 1.35; font-weight: 500; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--lime-2) 22%, transparent); }
.why .ic { color: var(--lime-ink); width: 16px; height: 16px; margin-top: 1px; flex: none; }
.ex-list { list-style: none; margin: 0; padding: 0; counter-reset: ex; }
.ex-list li { counter-increment: ex; display: grid; grid-template-columns: 28px 1fr auto; align-items: center; gap: 8px; padding: 11px 0; border-top: 1px solid var(--line); font-size: 0.95rem; }
.ex-list li::before { content: counter(ex); font-family: var(--display); font-weight: 700; font-size: 0.8rem; color: var(--muted); width: 24px; height: 24px; border-radius: 8px; background: var(--surface-2); display: grid; place-items: center; }
.ex-name { font-weight: 600; min-width: 0; }
.ex-load { font-size: 0.85rem; color: var(--muted); white-space: nowrap; }
.ex-list.dim li { opacity: 0.75; }
/* Something the coach is asking: a soft lime wash and a fine solid edge (dashed lines read as a draft). */
.question { background: linear-gradient(160deg, color-mix(in srgb, var(--lime-soft) 70%, var(--surface)), var(--surface) 70%); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--lime-2) 38%, transparent), var(--shadow); }
.q-text { font-weight: 700; font-size: 1.02rem; }
.q-src { font-size: 0.8rem; color: var(--muted); margin-top: -6px; }
/* A card's two answers share a row only when both fit on one line each: a longer one ("Save your
   progress", "Guarda tu progreso") takes the full width rather than breaking inside its pill. */
.today .question .row2 .btn { flex: 1 1 auto; }
.checkin { background: linear-gradient(160deg, var(--lime-soft), var(--surface) 75%); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--lime-2) 45%, transparent), var(--shadow); }
.checkin .kicker, .checkin .kicker .ic { color: var(--lime-ink); }
.checkin .link.on-dark { color: var(--lime-ink); }
.tests { list-style: none; margin: 0; padding: 0; }
.tests li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid color-mix(in srgb, currentColor 14%, transparent); font-size: 0.92rem; }
.review .stats3, .fin-stats { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; }
.stats3 div, .fin-stats div { background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--hair); border-radius: var(--r-sm); padding: 14px 14px 12px; display: flex; flex-direction: column; gap: 6px; }
.fin-stats div { background: var(--surface); box-shadow: inset 0 1px 0 var(--sheen), 0 0 0 1px var(--hair), var(--shadow); }
.stats3 strong, .fin-stats strong { font-family: var(--display); font-size: 1.6rem; line-height: 1; letter-spacing: -0.02em; display: inline-flex; align-items: center; gap: 4px; }
.fin-stats strong { font-size: 2rem; letter-spacing: -0.03em; }
.stats3 span, .fin-stats span { font-size: 0.66rem; color: var(--muted); font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }
/* The weekly review's three boxes share the card evenly: a long label ("settimane di fila",
   "allenamenti") on a small phone or at large text breaks onto lines instead of pushing a box
   past the card's edge. */
.review .stats3 { grid-auto-columns: minmax(0, 1fr); }
.review .stats3 > div { min-width: 0; padding-inline: 12px; }
.review .stats3 span { letter-spacing: 0.06em; -webkit-hyphens: auto; hyphens: auto; overflow-wrap: break-word; }
/* Largest text, three tiles: the label is set a little smaller so "WORKOUTS" stays one word
   (on an iPhone 18 Pro it broke as "WORK-OUTS"); hyphens remain the last resort for longer ones. */
.text-large .review .stats3 span { font-size: 0.54rem; letter-spacing: 0.03em; }
.done-card .kicker .ic, .win .ic { color: var(--lime-ink); }
/* What today was, and what it already moved for next time: their numbers under the day's closing line. */
.done-recap { margin: 2px 0 0; font-weight: 700; font-variant-numeric: tabular-nums; }
.done-next { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.done-next ul { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 6px; }
.done-next li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 2px 10px; font-size: 0.92rem; }
.done-next li span { min-width: 0; }
.done-next li b { margin-left: auto; color: var(--lime-ink); font-variant-numeric: tabular-nums; }
.win { align-items: flex-start; background: linear-gradient(160deg, var(--lime-soft), var(--surface)); }
.win h2 { font-family: var(--display); font-size: 1.4rem; }
.resume p { font-weight: 700; }
.resume .resume-upd { display: flex; gap: 6px; align-items: center; font-weight: 600; color: var(--lime-ink); }
.resume .resume-upd svg { width: 16px; height: 16px; flex: none; }

/* Flow (onboarding, workout, finish) */
.flow { min-height: 100dvh; }
.ob, .ws, .fin { max-width: 520px; margin: 0 auto; min-height: 100dvh; display: flex; flex-direction: column; padding: calc(12px + var(--safe-t)) 16px calc(16px + var(--safe-b)); }
/* The question's header (back, progress, the plan so far) stays put while a long question scrolls,
   below the status bar, the way an iOS navigation bar does. */
/* The sides are painted with shadows, not negative margins: never wider than the phone, whatever its gutter. */
.ob-head { position: sticky; top: var(--safe-t); z-index: 5; margin-top: -12px; padding: 12px 0 8px; background: var(--bg); box-shadow: -16px 0 0 var(--bg), 16px 0 0 var(--bg); }
.ob-top { display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 12px; }
.ob-progress { height: 6px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.ob-progress span { display: block; height: 100%; background: var(--ink); border-radius: 999px; transition: width 0.3s var(--ease); }
.ob-count { font-family: var(--display); font-weight: 700; font-size: 0.85rem; color: var(--muted); }
.ob-body { flex: 1; display: flex; flex-direction: column; gap: 16px; padding: 26px 2px 28px; }
.ob-foot { position: sticky; bottom: 0; z-index: 3; display: flex; flex-direction: column; gap: 8px; padding-top: 28px; background: linear-gradient(to bottom, color-mix(in srgb, var(--bg) 0%, transparent), var(--bg) 26px); }
/* The page's bottom padding (home bar included) moves into the foot: stuck to the bottom of a long
   question, Continue still sits above the home bar, not under it. Unscrolled, nothing moves. */
.ob-foot { padding-bottom: calc(16px + var(--safe-b)); margin-bottom: calc(-16px - var(--safe-b)); }
.ob-foot .btn { width: 100%; min-height: 58px; }
.ob-later { align-self: center; min-height: 44px; }
.legal-note { margin: 0; font-size: 0.75rem; line-height: 1.45; color: var(--muted); text-align: center; text-wrap: balance; }
.legal-note a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.card .legal-note { text-align: left; }
.ob-q { font-family: var(--display); font-size: 1.85rem; line-height: 1.1; letter-spacing: -0.02em; }
.ob-q.center { text-align: center; }
.ob-hint { color: var(--muted); font-size: 0.95rem; }
.ob-hint.warn { color: var(--warn); background: var(--warn-soft); padding: 10px 12px; border-radius: var(--r-sm); }
.opts { display: flex; flex-direction: column; gap: 10px; }
.opt { text-align: left; display: flex; flex-direction: column; gap: 2px; padding: 16px 18px; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); box-shadow: inset 0 1px 0 var(--sheen), var(--shadow); transition: border-color 0.15s, transform 0.12s var(--ease); }
.opt:active { transform: scale(0.99); }
.opt { position: relative; padding-right: 48px; }
.opt.on::before { content: ''; position: absolute; right: 16px; top: 50%; width: 22px; height: 22px; margin-top: -11px; border-radius: 999px; background: var(--ink); animation: pop 0.3s var(--ease) both; }
.opt.on::after { content: ''; position: absolute; right: 20px; top: 50%; width: 14px; height: 14px; margin-top: -7px; background: var(--check); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 14px no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 14px no-repeat; animation: pop 0.3s var(--ease) both; }
.opt.on { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink), 0 0 0 3px color-mix(in srgb, var(--lime) 60%, transparent); }
.opt-title { font-weight: 700; font-size: 1.05rem; }
/* Two short answers side by side ("Yes, roughly" · "No idea"): same cards, taking half the room. */
.opts.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.opts.pair .opt { justify-content: center; min-height: 64px; padding: 14px 40px 14px 16px; }
.opts.pair .opt.on::before { right: 12px; }
.opts.pair .opt.on::after { right: 16px; }
.opt-sub { color: var(--muted); font-size: 0.88rem; }
.num-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.num { aspect-ratio: 1 / 1.05; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); box-shadow: inset 0 1px 0 var(--sheen), var(--shadow); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.num strong { font-family: var(--display); font-size: 2rem; line-height: 1; }
.num span { font-size: 0.78rem; color: var(--muted); font-weight: 600; }
.num.on { background: var(--ink); color: var(--on-ink); border-color: var(--ink); box-shadow: none; }
.num.on span { color: color-mix(in srgb, var(--on-ink) 70%, transparent); }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 0.85rem; font-weight: 700; color: var(--muted); }
textarea, .input { width: 100%; border: 1px solid var(--line); background: var(--surface); border-radius: var(--r-sm); padding: 12px 14px; font-size: 1rem; color: var(--text); resize: vertical; }
textarea:focus, .input:focus { outline: 2px solid var(--lime-2); outline-offset: 0; }

.ob-welcome { display: flex; flex-direction: column; gap: 16px; padding-top: 4px; }
/* The welcome screen's own box is also .ob-welcome: its tighter top still keeps clear of the notch. */
.ob.ob-welcome { padding-top: calc(4px + var(--safe-t)); }
/* The first screen fits the screen. With both ways in on it ("I have my routine", "Build a plan"),
   every iPhone but the largest had to scroll to reach the sign-in link and the legal line (by 90 to
   140 points in Spanish and Italian). On those heights the air above goes, the headline is set a
   step smaller, and the extra line under the two cards, which they already say, is left out. */
@media (max-height: 900px) {
  .ob-welcome:not(.creator):has(> .opts) { gap: 14px; }
  .ob-welcome:not(.creator):has(> .opts) .lang-row { margin-top: -14px; }
  .ob-welcome:not(.creator):has(> .opts) .brand { margin-top: 16px; }
  .ob-welcome:not(.creator):has(> .opts) .ob-h1.big { font-size: clamp(2.1rem, 10.2vw, 2.6rem); }
  .ob-welcome:not(.creator):has(> .opts) .ob-points-one { display: none; }
  .ob.ob-welcome:has(.ob-welcome > .opts) .ob-foot { padding-top: 14px; }
}
@media (max-height: 820px) {
  .ob-welcome:not(.creator):has(> .opts) .lang-row { margin-top: -22px; }
  .ob-welcome:not(.creator):has(> .opts) .brand { margin-top: 2px; }
}
.lang-row { display: flex; gap: 6px; justify-content: flex-end; }
.lang { min-width: 44px; min-height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: transparent; font-weight: 700; font-size: 0.8rem; color: var(--muted); }
.lang.on { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
/* Apple's minimum for something you tap is 44 points. These stay as small as they look; the
   area that answers the finger is 44 tall. */
.lang { position: relative; }
.lang::after { content: ''; position: absolute; inset: -4px 0; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 700; letter-spacing: 0.08em; font-size: 1.1rem; margin-top: clamp(4px, 3vh, 32px); }
.brand img { border-radius: 10px; }
.ob-h1 { font-family: var(--display); font-size: 2.1rem; line-height: 1.05; letter-spacing: -0.03em; }
.ob-h1.big { font-size: clamp(2.4rem, 11vw, 3.2rem); }
.ob-lead { font-size: 1.05rem; color: var(--muted); }
.ob-method { font-weight: 700; }
.ob-points { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.ob-points li { display: flex; gap: 10px; align-items: flex-start; font-size: 0.95rem; }
.ob-points .ic { color: var(--lime-ink); margin-top: 2px; }
.ob-points-one { display: flex; gap: 10px; align-items: flex-start; font-size: 0.95rem; }
.ob-points-one .ic { color: var(--lime-ink); margin-top: 2px; flex: none; }
.creator-hero { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }

.ruler-slot { margin: 10px -16px 0; overflow: hidden; }
/* Edge to edge on small phones too, whose gutter is 12 px: -16 px there made About you scroll sideways. */
@media (max-width: 360px) { .ruler-slot { margin-inline: -12px; } }
.tenra-ruler { position: relative; padding: 8px 0 12px; user-select: none; -webkit-user-select: none; }
.tenra-ruler-bubble { position: relative; z-index: 2; width: fit-content; min-width: 5.5rem; margin: 0 auto 8px; padding: 14px 26px; border-radius: 999px; font-family: var(--display); font-size: 1.6rem; font-weight: 700; color: #0e120e; background: linear-gradient(180deg, var(--lime), var(--lime-2)); text-align: center; transition: transform 0.12s var(--ease); }
.tenra-ruler-needle { width: 0; height: 0; margin: 0 auto 14px; border-left: 8px solid transparent; border-right: 8px solid transparent; border-top: 10px solid var(--lime-2); }
.tenra-ruler-track-wrap { position: relative; }
.tenra-ruler-fade { pointer-events: none; position: absolute; top: 0; bottom: 0; width: 64px; z-index: 2; }
.tenra-ruler-fade-left { left: 0; background: linear-gradient(90deg, var(--bg), transparent); }
.tenra-ruler-fade-right { right: 0; background: linear-gradient(270deg, var(--bg), transparent); }
.tenra-ruler-track { display: flex; align-items: flex-start; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 12px 0 40px; touch-action: pan-x; }
.tenra-ruler-track::-webkit-scrollbar { display: none; }
.tenra-ruler-pad { flex: 0 0 auto; height: 1px; }
.tenra-ruler-tick { position: relative; flex: 0 0 28px; width: 28px; height: 56px; padding: 0; border: 0; background: transparent; scroll-snap-align: center; appearance: none; }
.tenra-ruler-tick::before { content: ''; position: absolute; left: 50%; top: 0; width: 2px; height: 22px; transform: translateX(-50%); border-radius: 2px; background: color-mix(in srgb, var(--muted) 45%, transparent); }
.tenra-ruler-tick.is-major::before { height: 40px; width: 3px; background: var(--text); opacity: 0.7; }
.tenra-ruler-tick-label { position: absolute; left: 50%; top: 48px; transform: translateX(-50%); font-family: var(--display); font-size: 0.85rem; font-weight: 600; color: var(--muted); white-space: nowrap; pointer-events: none; }
.tenra-ruler.is-engaged .tenra-ruler-bubble { transform: scale(1.04); }
/* On "About you" the ruler shares the screen with three questions: a tighter version, so all of it
   (labels included) sits above the Continue button on an iPhone. */
.about .tenra-ruler { padding: 2px 0 4px; }
.about .tenra-ruler-bubble { padding: 9px 22px; font-size: 1.4rem; margin-bottom: 6px; }
.about .tenra-ruler-needle { margin-bottom: 8px; }
.about .tenra-ruler-track { padding: 6px 0 22px; }
.ob-about .ob-foot { padding-top: 14px; }
/* Large text, or a short iPhone: "About you" can't fit one screen, and a pinned Continue would sit on
   the bodyweight ruler. Continue then comes after the ruler, a short scroll down. */
.text-large .ob-about .ob-foot { position: static; background: none; }
@media (max-height: 760px) { .ob-about .ob-foot { position: static; background: none; } }

.building { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; padding-bottom: 10vh; }
.pulse { width: 92px; height: 92px; border-radius: 28px; background: var(--ink); display: grid; place-items: center; animation: pulse 1.4s var(--ease) infinite; }
.pulse img, .method-card img { border-radius: 12px; background: #f4f6f1; padding: 5px; }
/* The logo's T is dark: give it a light chip wherever it sits on a dark surface. */
:root[data-theme="dark"] img[src$="tenra-mark.png"] { background: #f4f6f1; padding: 3px; border-radius: 8px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) img[src$="tenra-mark.png"] { background: #f4f6f1; padding: 3px; border-radius: 8px; } }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--lime) 60%, transparent); } 50% { box-shadow: 0 0 0 18px transparent; } }
.build-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; width: 100%; max-width: 340px; }
.build-list li { display: flex; gap: 10px; align-items: center; font-weight: 600; opacity: 0; transform: translateY(6px); animation: rise 0.4s var(--ease) forwards; animation-delay: calc(0.25s + var(--i) * 0.26s); }
.build-list .ic { width: 22px; height: 22px; padding: 3px; border-radius: 999px; background: var(--lime); color: #0e120e; stroke-width: 3; }
@keyframes rise { to { opacity: 1; transform: none; } }
/* Screen change: opacity only, so fixed bars inside the screen don't shift. */
.enter > * { animation: fade-in 0.24s var(--ease) both; }
@keyframes fade-in { from { opacity: 0; } }

.reveal { display: flex; flex-direction: column; gap: 12px; }
.reveal .sec { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); font-weight: 800; margin-top: 8px; }
.method-card { display: flex; gap: 12px; align-items: center; background: var(--ink); color: var(--on-ink); border-radius: var(--r-lg); padding: 16px; }
.method-card h1 { font-family: var(--display); font-size: 1.5rem; letter-spacing: -0.02em; }
.method-card p { font-size: 0.85rem; opacity: 0.8; }
.method-card img { border-radius: 10px; }
.road-mini { list-style: none; margin: 0; padding: 0; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; }
.road-mini.many { grid-auto-flow: row; grid-template-columns: 1fr 1fr; }
.road-mini li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.road-mini li strong { font-size: 0.85rem; hyphens: auto; -webkit-hyphens: auto; }
.road-mini li span { font-size: 0.74rem; color: var(--muted); font-family: var(--display); }
.road-mini li.now { border-color: var(--ink); box-shadow: inset 0 3px 0 var(--lime); }
.week-mini { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.week-mini span { text-align: center; padding: 8px 0; border-radius: 10px; background: var(--surface-2); color: var(--muted); font-weight: 700; font-size: 0.8rem; }
.week-mini span.on { background: var(--lime); color: #0e120e; }
.ex-mini { list-style: none; margin: 0; padding: 0; background: var(--surface); border-radius: var(--r); padding: 4px 14px; }
.ex-mini li { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 0.92rem; }
.ex-mini li:first-child { border-top: 0; }
.ex-mini .mono { color: var(--muted); white-space: nowrap; font-size: 0.85rem; }
.invite { display: flex; gap: 12px; align-items: center; }
.adapted { background: var(--surface); border-radius: var(--r-lg); padding: 16px; box-shadow: inset 0 1px 0 var(--sheen), 0 0 0 1px var(--hair), var(--shadow); display: flex; flex-direction: column; gap: 10px; }
.adapted h2 { font-family: var(--display); font-size: 1.05rem; }
.adapted ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.adapted li { display: flex; gap: 10px; align-items: flex-start; font-size: 0.92rem; }
.adapted li .ic { width: 20px; height: 20px; padding: 3px; border-radius: 999px; background: var(--lime); color: #0e120e; stroke-width: 3; flex: none; }
.callout { display: flex; gap: 10px; align-items: flex-start; background: var(--lime-soft); border-radius: var(--r-sm); padding: 12px 14px; font-size: 0.92rem; }
.callout .ic { color: var(--lime-ink); }
/* Welcome: one real-looking exercise after a workout, the promise shown rather than told. */
.about .name-field { margin-bottom: 4px; }
.fin-cal { display: inline-flex; align-items: center; gap: 6px; padding: 0; margin-top: -6px; font-weight: 700; text-decoration: none; }
.fin-cal .ic { width: 16px; height: 16px; }
.fin-health { display: inline-flex; align-items: center; gap: 6px; padding: 0; margin-top: -6px; font-weight: 700; text-decoration: none; }
.fin-health[hidden] { display: none; }
.fin-health .ic { width: 16px; height: 16px; color: #ff375f; }
.cal-link { display: inline-flex; align-items: center; gap: 6px; align-self: center; margin-top: 6px; }

/* Workout */
.ws { gap: 12px; }
.ws-top { display: flex; align-items: center; gap: 8px; }
.ws-top .icon-btn { flex: none; }
.ws-progress { display: flex; gap: 4px; flex: 1; min-width: 0; margin: 0 4px; }
.pseg { flex: 1; height: 6px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.pseg i { display: block; height: 100%; background: var(--ink); transition: width 0.3s var(--ease); }
.pseg.cur { box-shadow: 0 0 0 2px color-mix(in srgb, var(--lime) 70%, transparent); }
.ws-clock { font-weight: 700; font-size: 0.9rem; color: var(--muted); min-width: 44px; text-align: right; }
/* Back one step, and the stopwatch (its time beside the icon while it counts). */
.ws-back .ic { width: 22px; height: 22px; }
.sw-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.sw-btn .ic { width: 20px; height: 20px; flex: none; }
.sw-run { font-weight: 700; font-size: 0.86rem; font-variant-numeric: tabular-nums; }
.sw-run[hidden] { display: none; }
.icon-btn.sw-btn:has(.sw-run:not([hidden])) { width: auto; padding: 0 12px 0 10px; }
.icon-btn.sw-btn.on { background: var(--lime-soft); color: var(--lime-ink); }
/* A narrow phone with the stopwatch counting: its time takes the workout clock's place, so the
   progress bar keeps its room. */
@media (max-width: 400px) { .ws-top:has(.sw-btn.on) .ws-clock { display: none; } }
/* Alone on its row (no "Add an exercise" beside it): the full width. */
.fin-links .sw-btn:nth-child(odd):last-child { grid-column: 1 / -1; justify-content: center; }
.sw { display: flex; flex-direction: column; align-items: center; gap: 18px; padding: 4px 0; }
.sw-time { margin: 0; font-family: var(--display); font-size: clamp(3.4rem, 18vw, 4.6rem); font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.sw-ctl { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; }
.sw .sheet-note { text-align: center; margin: 0; }
.sw-laps { list-style: none; margin: 0; padding: 0; width: 100%; max-height: 38vh; overflow: auto; }
.sw-laps li { display: grid; grid-template-columns: 1fr auto auto; gap: 18px; padding: 10px 2px; border-top: 1px solid var(--line); font-size: 0.92rem; font-weight: 600; }
.sw-laps .mono { font-variant-numeric: tabular-nums; }
/* "+ Add exercise" under a workout's list (Today, the workout list): a quiet row, dashed like a slot to fill. */
.ex-add { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 48px; margin-top: 4px; border: 1.5px dashed var(--line); border-radius: var(--r-sm); background: none; color: var(--text); font: inherit; font-weight: 700; font-size: 0.92rem; }
.ex-add .ic { width: 18px; height: 18px; }
.ex-add:active { transform: scale(0.98); }
.add-search { margin: 2px 0 12px; }
.add-muscles { margin-bottom: 4px; transition: opacity 0.15s; }
.add-muscles.quiet { opacity: 0.45; }
/* Just added to the workout list: lit like a new exercise on Today. */
.ov li.added { background: var(--lime-soft); border-radius: var(--r-sm); }
.ov li.flash { animation: added-in 0.6s var(--ease); }
@keyframes added-in { from { opacity: 0; transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) { .ov li.flash { animation: none; } }
/* Brought into view above Start next set, not under it. */
.next-up .adjust { scroll-margin-bottom: 110px; }
/* The finish screen's stopwatch: its time on its own line when the label is long (Spanish, a small
   phone), never broken inside a word. */
.fin-links .sw-btn { flex-wrap: wrap; column-gap: 6px; row-gap: 0; }
.fin-links .sw-btn > span { overflow-wrap: normal; word-break: keep-all; }
.fin-links .sw-run { white-space: nowrap; }
.done-links { display: flex; gap: 0 20px; align-items: center; flex-wrap: wrap; }
.link.sw-btn { text-decoration: none; }
.link.sw-btn > span:not(.sw-run) { text-decoration: underline; text-underline-offset: 3px; }
.link.sw-btn .sw-run { padding: 2px 8px; border-radius: 999px; background: var(--lime-soft); }
.link.sw-btn .ic { width: 18px; height: 18px; }
.ws-body { flex: 1; display: flex; flex-direction: column; gap: 12px; }
.ws-card { background: var(--surface); border-radius: var(--r-lg); padding: 18px; box-shadow: inset 0 1px 0 var(--sheen), 0 0 0 1px var(--hair), var(--shadow); display: flex; flex-direction: column; gap: 10px; }
.easier { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; background: var(--surface-2); margin: 10px 0 4px; }
.easier p { margin: 0; font-size: 0.92rem; flex: 1; }
.easier .btn { flex: none; }
.rest-title { margin: 0; }
.nowrap { white-space: nowrap; }
.last-time { font-size: 0.9rem; color: var(--muted); margin: 0 0 14px; }
.last-time b { color: var(--ink); font-weight: 700; }
.ws-name { font-family: var(--display); font-size: 1.75rem; line-height: 1.1; letter-spacing: -0.02em; }
.cue { color: var(--muted); font-size: 0.92rem; font-style: italic; }
.howto-line { font-size: 0.95rem; line-height: 1.5; margin: 0 0 16px; }
.test-hint { display: flex; gap: 8px; align-items: flex-start; background: var(--warn-soft); color: var(--text); padding: 10px 12px; border-radius: var(--r-sm); font-size: 0.9rem; font-weight: 600; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
/* Which set you're on is the biggest thing on the screen: readable at arm's length, mid-workout. */
.setcount { display: flex; flex-direction: column; gap: 0; margin: 2px 0 0; }
.setcount-kicker { font-size: 0.8rem; font-weight: 800; letter-spacing: 0.11em; text-transform: uppercase; color: var(--muted); }
.setcount-big { display: flex; align-items: baseline; gap: 12px; font-family: var(--display); }
.setcount-big b { font-size: 6.5rem; line-height: 0.95; font-weight: 800; letter-spacing: -0.05em; font-variant-numeric: tabular-nums; }
.setcount-big span { font-size: 2.2rem; font-weight: 700; letter-spacing: -0.02em; color: var(--muted); }
.setcount-big b.setcount-test { font-size: 3.2rem; letter-spacing: -0.03em; }
.ws-simple .ws-name { margin: 0; }
/* The target is the control: "6 × 20 kg", each number with its unit and − / + under it. */
.target { display: grid; align-items: start; gap: 4px; padding: 4px 0 0; }
.target.two { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); }
.target.one { grid-template-columns: minmax(0, 220px); }
.big-x { font-family: var(--display); font-size: 2rem; line-height: 3.6rem; color: var(--muted); margin: 0 2px; }
.plates { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 0.8rem; color: var(--muted); font-weight: 600; margin-top: -4px; }
.plates span { margin-right: 2px; }
.plates .plate { font-style: normal; font-family: var(--display); font-weight: 700; font-size: 0.78rem; min-width: 30px; height: 30px; padding: 0 6px; border-radius: 8px; display: inline-grid; place-items: center; background: var(--surface-2); color: var(--text); }
.plate.p25 { background: #d9393f; color: #fff; } .plate.p20 { background: #2f6fdc; color: #fff; } .plate.p15 { background: #e8b31c; color: #141813; }
.plate.p10 { background: #237a45; color: #fff; } .plate.p5 { background: var(--ink); color: var(--on-ink); }
.ramp { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 8px 12px; }
.ramp summary { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 0.9rem; cursor: pointer; list-style: none; }
.ramp summary::-webkit-details-marker { display: none; }
.ramp summary .ic { width: 16px; height: 16px; color: var(--lime-ink); }
.ramp summary .mono { margin-left: auto; color: var(--muted); }
.ramp ul { list-style: none; margin: 6px 0 0; padding: 0; }
.ramp li { display: flex; justify-content: space-between; padding: 6px 0; border-top: 1px solid var(--line); font-size: 0.9rem; }
.adjust { display: flex; gap: 8px; align-items: flex-start; font-size: 0.88rem; font-weight: 600; padding: 9px 12px; border-radius: var(--r-sm); background: var(--lime-soft); }
.adjust .ic { width: 18px; height: 18px; color: var(--lime-ink); }
.adjust.down { background: var(--warn-soft); }
.adjust.down .ic { color: var(--warn); }
/* "Easier" moved the next set up: Keep stays at what was just done. */
.adjust > span { flex: 1; }
/* Inside the sentence, so the line grows no taller (and the next set stays in view on small phones). */
.adjust-keep { display: inline; padding: 6px 2px; margin: -6px 0; border: 0; background: none; color: var(--lime-ink); font: inherit; font-weight: 800; white-space: nowrap; text-decoration: underline; text-underline-offset: 3px; }
.adjust.kept { background: var(--surface-2); }
.adjust.kept .ic { color: var(--text); }
.stepper { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; }
/* --st is the number's size; each screen size below changes only that. Longer numbers ("142.5")
   shrink inside the same box so they never clip, and the layout around them doesn't jump. */
.st-val { --st: 3.6rem; width: 100%; min-width: 0; height: var(--st); text-align: center; border: 0; border-radius: 14px; background: transparent; font-family: var(--display); font-size: var(--st); line-height: 1; letter-spacing: -0.03em; padding: 0; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.st-val[data-len="l"] { font-size: calc(var(--st) * 0.82); }
.st-val[data-len="xl"] { font-size: calc(var(--st) * 0.68); }
.st-val:focus { outline: none; background: var(--surface-2); box-shadow: inset 0 0 0 2px var(--lime-2); }
.st-unit { font-size: 0.82rem; font-weight: 700; color: var(--muted); text-align: center; }
.st-row { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; width: 100%; max-width: 132px; margin-top: 8px; background: var(--surface-2); border-radius: 14px; padding: 4px; }
.st-btn { height: 44px; border-radius: 11px; border: 0; background: var(--surface); display: grid; place-items: center; color: var(--text); box-shadow: 0 1px 2px rgba(14, 18, 14, 0.08), 0 0 0 1px var(--hair); transition: transform 0.1s var(--ease); }
.st-btn:active { transform: scale(0.93); }
.hold-btn { width: 100%; }
.feel-q { font-family: var(--display); font-weight: 700; font-size: 1.05rem; letter-spacing: -0.01em; color: var(--text); text-align: center; }
.feel-hint { font-size: 0.78rem; color: var(--muted); text-align: center; }
/* Harder · As planned · Easier: a thin line with three stops and a knob resting on the plan. The knob
   is the one thing to grab; the line between the plan and it fills in lime, so how far the set went
   from the plan reads at a glance. Each label is its stop's tap target (the whole column, line included). */
.feel-toggle { --i: 1; --rail: 30px; --track: color-mix(in srgb, var(--muted) 24%, var(--bg)); position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); touch-action: pan-y; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; cursor: grab; }
.feel-rail { position: absolute; inset: 0 0 auto; height: var(--rail); pointer-events: none; }
/* The line runs from the first stop to the last (the middle of the outer columns). */
.feel-rail::before { content: ''; position: absolute; left: calc(100% / 6); right: calc(100% / 6); top: 50%; height: 3px; margin-top: -1.5px; border-radius: 2px; background: var(--track); }
.feel-stop { position: absolute; top: 50%; width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px; border-radius: 50%; background: var(--track); transition: background 0.2s var(--ease); }
.feel-stop:nth-child(1) { left: calc(100% / 6); }
.feel-stop:nth-child(2) { left: 50%; }
.feel-stop:nth-child(3) { left: calc(500% / 6); }
.feel-toggle:not(:has([data-feel="right"].on)) .feel-stop:nth-child(2),
.feel-toggle:has([data-feel="hard"].on) .feel-stop:nth-child(1),
.feel-toggle:has([data-feel="easy"].on) .feel-stop:nth-child(3) { background: var(--lime-2); }
/* From the plan to the knob: one stop wide, stretched (or mirrored to the left) by where the knob is. */
.feel-fill { position: absolute; left: 50%; top: 50%; width: calc(100% / 3); height: 3px; margin-top: -1.5px; background: linear-gradient(90deg, color-mix(in srgb, var(--lime-2) 45%, var(--track)), var(--lime-2)); transform-origin: left center; transform: scaleX(calc(var(--i) - 1)); }
.feel-knob { position: absolute; inset: 0; transform: translateX(calc((var(--i) - 1) * 100% / 3)); }
/* The knob: a lime bead in a white bezel, lit from above, sitting just off the line. */
.feel-knob i { position: absolute; left: 50%; top: 50%; width: 20px; height: 20px; margin: -10px 0 0 -10px; border-radius: 50%; background: radial-gradient(circle at 50% 30%, #e4fd8c, var(--lime) 55%, var(--lime-2)); box-shadow: inset 0 -1px 1px rgba(71, 103, 0, 0.25), 0 0 0 3.5px var(--surface), 0 0 0 4.5px var(--hair), 0 1px 2px rgba(14, 18, 14, 0.12), 0 6px 14px -4px rgba(14, 18, 14, 0.28); transition: scale 0.22s var(--ease), box-shadow 0.22s var(--ease); }
/* Moving: knob and fill glide together and settle on the stop with a slight overshoot. */
.feel-knob, .feel-fill { transition: transform 0.34s cubic-bezier(0.3, 1.25, 0.5, 1); }
/* Held: the knob grows a touch and a soft lime halo shows it's in hand. Dragged: it stays under the finger. */
.feel-toggle.pressed .feel-knob i { scale: 1.15; box-shadow: inset 0 -1px 1px rgba(71, 103, 0, 0.25), 0 0 0 3.5px var(--surface), 0 0 0 4.5px var(--hair), 0 0 0 13px rgba(200, 245, 66, 0.26), 0 2px 3px rgba(14, 18, 14, 0.12), 0 10px 20px -6px rgba(14, 18, 14, 0.32); }
/* The first workouts: the knob leans left and right once, so it reads as something to move. */
.feel-toggle.nudge .feel-knob i { animation: feel-nudge 1.1s var(--ease) 0.7s 1 both; }
@keyframes feel-nudge { 0%, 100% { translate: 0; } 25% { translate: -7px; } 60% { translate: 6px; } 80% { translate: -2px; } }
.feel-toggle.dragging { cursor: grabbing; }
.feel-toggle.dragging .feel-knob, .feel-toggle.dragging .feel-fill { transition: transform 0.06s linear; }
.feel-toggle button { position: relative; min-width: 0; padding: calc(var(--rail) + 4px) 4px 4px; border: 0; border-radius: 12px; background: none; font: inherit; font-family: var(--display); font-weight: 600; font-size: 0.92rem; letter-spacing: -0.01em; line-height: 1.15; color: var(--muted); cursor: inherit; transition: color 0.2s var(--ease); }
.feel-toggle button.on { color: var(--text); font-weight: 700; }
.feel-toggle button:focus-visible { outline: 2px solid var(--text); outline-offset: -2px; }
.feel-means { margin: 0; text-align: center; font-size: 0.8rem; font-weight: 600; color: var(--muted); }
@media (prefers-reduced-motion: reduce) { .feel-knob, .feel-fill, .feel-toggle.dragging .feel-knob, .feel-toggle.dragging .feel-fill, .feel-knob i { transition: none; } .feel-toggle.pressed .feel-knob i { scale: none; } .feel-toggle.nudge .feel-knob i { animation: none; } }
/* Log set stays in thumb reach on any phone (Safari's bars leave ~660px on an iPhone): the set's
   details scroll under it instead of pushing it off the screen. */
.ws-set .ws-actions, .ws-rest .ws-actions { position: sticky; bottom: calc(8px + var(--safe-b)); z-index: 2; padding-top: 16px; background: linear-gradient(to bottom, color-mix(in srgb, var(--bg) 0%, transparent), var(--bg) 16px); }
/* What scrolls under the pinned button (large text, a small phone) never shows through it, nor in
   the gap between the button and the bottom of the screen. */
.ws-set .ws-actions::after, .ws-rest .ws-actions::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: calc(8px + var(--safe-b)); background: var(--bg); }
/* The exercise and its moving figure, side by side: what to do, and how it looks. */
.ws-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: start; }
.ws-head.with-demo { grid-template-columns: minmax(0, 1fr) 112px; }
.ws-head-l { min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.ws-head .ws-demo { width: 112px; }
/* The figure, and the how-to under it: a quiet link, not another button competing with Log set. */
.ws-fig { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.ws-info { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-height: 36px; padding: 0 10px; border: 0; border-radius: 999px; background: none; color: var(--muted); font: inherit; font-size: 0.8rem; font-weight: 700; cursor: pointer; }
.ws-info .ic { width: 15px; height: 15px; }
.ws-info:hover { color: var(--text); }
.ws-info:focus-visible { outline: 2px solid var(--text); outline-offset: 0; }
.ws-head.with-demo .ws-name { font-size: 1.5rem; overflow-wrap: anywhere; hyphens: auto; }
/* A hyphenated word ("Chest-supported") is kept whole so it doesn't break at its hyphen for nothing.
   At the largest text sizes, and on the narrowest phones, it no longer fits beside the picture and
   ran underneath it: there it may break. */
.text-large .ws-name .nowrap { white-space: normal; }
@media (max-width: 350px) { .ws-name .nowrap { white-space: normal; } }
.side-now { display: flex; align-items: baseline; gap: 8px; margin: 0; padding: 8px 12px; border-radius: 12px; background: var(--lime-soft); font-size: 0.9rem; }
.side-now b { font-family: var(--display); font-size: 1.05rem; color: var(--lime-ink); }
.side-now span { color: var(--muted); font-weight: 600; }
.ws-swap { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; margin: 2px 0 -6px; padding: 0 4px; border: 0; background: none; color: var(--muted); font: inherit; font-size: 0.86rem; font-weight: 700; cursor: pointer; }
.ws-swap .ic { width: 16px; height: 16px; }
/* Short screens: a tighter set, so the weight and reps stay visible above the pinned rating. */
@media (max-height: 700px) {
  .ws-set .ws-name { font-size: 1.55rem; }
  .ws-set .st-val { --st: 3rem; }
  .ws-set .big-x { line-height: 3rem; }
  .ws-set .setcount-big b { font-size: 4.5rem; }
  .ws-set .setcount-big span { font-size: 1.7rem; }
}
@media (max-height: 600px) {
  .ws-set .feel-hint { display: none; }
}
/* Tall phones: the set card reaches down to Log set instead of leaving a blank gap above it, and the
   numbers sit in the middle of it, with Change exercise resting at its foot. Short phones have no
   spare room, so nothing moves there. */
.ws-set .ws-body > .ws-card { flex: 1 0 auto; }
.ws-set .ws-card > .target { margin-top: auto; }
.ws-set .ws-card > .ws-swap { margin-top: auto; }
/* With that room, the numbers and their − / + grow: easier to read and hit with a sweaty thumb. */
@media (min-height: 780px) {
  .ws-set .st-val { --st: min(4.4rem, 15vw); }
  .ws-set .big-x { line-height: min(4.4rem, 15vw); }
  .ws-set .st-unit { font-size: 0.88rem; }
  .ws-set .st-row { max-width: 152px; margin-top: 12px; }
  .ws-set .st-btn { height: 52px; }
}
.ws-actions { display: flex; flex-direction: column; gap: 8px; margin-top: auto; }
.ws-after { display: flex; align-items: center; gap: 8px; margin: 0 2px; padding: 12px 14px; border-radius: var(--r-md, 16px); background: color-mix(in srgb, var(--surface) 60%, transparent); box-shadow: inset 0 0 0 1px var(--hair); font-size: 0.9rem; min-width: 0; }
.ws-after .kicker { flex: none; margin: 0; }
/* A long name wraps onto a second line rather than being cut ("Neutral-grip lat pulld…"). */
.ws-after b { flex: 1; min-width: 0; font-weight: 700; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ws-after .mono { flex: none; color: var(--muted); font-size: 0.82rem; }
/* Largest text: the next exercise's name was cut mid-word between the label and the dose.
   The dose drops to its own line there, and a long word may break instead of being clipped. */
.ws-after b { overflow-wrap: anywhere; }
.text-large .ws-after { flex-wrap: wrap; }
.text-large .ws-after .mono { flex-basis: 100%; }
.nowrap { white-space: nowrap; }
.ws-name { text-wrap: balance; }
@media (max-height: 700px) { .ws-set .ws-after { display: none; } }
.warm-list { list-style: none; margin: 0; padding: 0; }
.warm-list li { display: flex; justify-content: space-between; padding: 12px 0; border-top: 1px solid var(--line); font-weight: 600; }
.rest-screen { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px; padding-top: 12px; }
.ring { --p: 0%; position: relative; width: min(68vw, 264px); aspect-ratio: 1; border-radius: 999px; display: grid; place-items: center; background: radial-gradient(closest-side, var(--surface) 89%, transparent 89.5%), conic-gradient(var(--lime-2) 0, var(--lime) var(--p), color-mix(in srgb, var(--text) 7%, transparent) 0); box-shadow: 0 0 0 1px var(--hair), 0 34px 70px -40px color-mix(in srgb, var(--lime-2) 90%, transparent), var(--shadow); }
.ring::before { content: ''; position: absolute; inset: 15%; border-radius: 999px; background: radial-gradient(circle at 50% 18%, var(--sheen), transparent 65%); box-shadow: inset 0 0 0 1px var(--hair), inset 0 -18px 36px -24px rgba(14, 18, 14, 0.18); pointer-events: none; }
.ring span { position: relative; }
/* The clock is the pause button. */
button.ring { border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation; transition: transform 0.12s ease; }
button.ring:active { transform: scale(0.98); }
button.ring:focus-visible { outline: 3px solid var(--lime-2); outline-offset: 4px; }
.ring-hint { position: absolute; left: 0; right: 0; bottom: 26%; text-align: center; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.02em; color: var(--muted); }
.ring.paused span { opacity: 0.45; }
.ring.paused .ring-hint { color: var(--text); text-transform: uppercase; letter-spacing: 0.12em; }
.ring span { font-family: var(--display); font-size: 3.6rem; font-weight: 700; letter-spacing: -0.04em; }
.rest-ctl { display: flex; gap: 8px; }
/* The countdown's sound, on or off: a round icon beside −15 s and +30 s (iPhone app only). */
.rest-ctl .rest-sound { width: 44px; padding: 0; display: inline-grid; place-items: center; }
.rest-ctl .rest-sound svg { width: 20px; height: 20px; }
.rest-ctl .rest-sound[aria-pressed="false"] { color: var(--muted); }
/* The last five seconds of a rest: the clock beats once a second, with the beeps. */
.ring.ending #restClock { color: var(--lime-2); animation: rest-beat 1s ease-out infinite; }
@keyframes rest-beat { 0% { transform: scale(1.1); } 45%, 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .ring.ending #restClock { animation: none; } }
/* The clock and "Tap to pause" are sized to the ring, so they stay inside it on a small phone or at
   the largest text (the ring keeps its size to leave room for the switch). Where container units
   aren't known (before iOS 16), the sizes above apply. */
.ring { container-type: inline-size; }
.ring #restClock { font-size: 23cqi; }
.ring .ring-hint { left: 17%; right: 17%; font-size: min(0.72rem, 6.4cqi); }
.rest-time { gap: 6px; }
.rest-time .ic { width: 16px; height: 16px; }
.rest-pick { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.rest-pick .chip { justify-content: center; padding: 0; font-variant-numeric: tabular-nums; }
.rest-pick .chip.on { padding: 0; }
/* What the answer means, and "Add a note" beside it: one line, so the next set stays in view. */
.feel-foot { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 4px 14px; }
.feel-note { display: inline-flex; align-items: center; gap: 5px; padding: 4px 0; min-height: 32px; font-size: 0.8rem; }
.feel-note .ic { width: 16px; height: 16px; }
/* "How did that set go?" under the timer: the switch is the only thing to do while resting, so the
   timer makes room for it (a little smaller) and it reads as part of the screen, not a card. */
.rest-screen.rated { gap: 16px; }
/* Rated, it starts at the top: when the switch moves and the next set's "why" appears below, nothing
   above it moves (centred, the timer and the switch itself would jump up under the finger). */
.rest-screen.rated { justify-content: flex-start; }
.rest-screen.rated .ring { width: min(54vw, 216px); }
.rest-screen.rated .ring span { font-size: 3.1rem; }
.rest-feel { width: 100%; display: flex; flex-direction: column; gap: 8px; }
/* "Set logged · Undo" goes to the top while resting (as on the set screen): the next set's line, which
   the switch changes, stays in view. Short phones: a smaller timer, so the next set is in view too. */
/* An iPhone 15 or 16 (852 points, less the notch and home bar): with the switch moved and the next
   set's "why" showing, the timer gives up a little more room so Start next set stays on screen. */
@media (max-height: 900px) { .rest-screen.rated { gap: 10px; padding-top: 4px; } .rest-screen.rated .ring { width: min(46vw, 176px); } .rest-screen.rated .ring span { font-size: 2.7rem; } }
@media (max-height: 720px) { .rest-screen.rated { gap: 12px; padding-top: 4px; } .rest-screen.rated .ring { width: min(44vw, 160px); } .rest-screen.rated .ring span { font-size: 2.5rem; }
  /* Safari's bars or an SE: a smaller figure in "Next", so the rest fits above Start next set. */
  .rest-screen.rated .next-up { padding: 12px 14px; }
  .rest-screen.rated .next-up.with-demo { grid-template-columns: 1fr 92px; }
  .rest-screen.rated .next-up .demo-btn { width: 92px; } }
@media (max-width: 380px) { .feel-toggle button { font-size: 0.86rem; padding-inline: 2px; } }
.next-up .adjust[hidden] { display: none; }
.next-up { width: 100%; background: var(--surface); border-radius: var(--r-lg); padding: 16px; box-shadow: inset 0 1px 0 var(--sheen), 0 0 0 1px var(--hair), var(--shadow); display: flex; flex-direction: column; gap: 6px; }
.next-up strong { font-size: 1.15rem; }

/* Finish */
.fin { gap: 14px; }
.undo-last { align-self: flex-end; font-size: 0.88rem; padding: 4px 0; }
.fin-head { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding: 18px 2px 4px; }
.fin-head h1 { font-family: var(--display); font-size: 2.1rem; line-height: 1.05; letter-spacing: -0.03em; }
.fin-check { width: 56px; height: 56px; border-radius: 999px; background: linear-gradient(180deg, #d6fb63, var(--lime-2)); color: #0e120e; display: grid; place-items: center; box-shadow: 0 0 0 8px color-mix(in srgb, var(--lime) 18%, transparent), 0 14px 30px -14px rgba(130, 180, 10, 0.9); animation: pop 0.5s var(--ease) both; }
@keyframes pop { from { transform: scale(0.6); opacity: 0; } }
.fin-check .ic { width: 28px; height: 28px; stroke-width: 3; }
.fin-stats { width: 100%; }
.fin-stats .pr strong { color: var(--lime-ink); }
.next-time ul { list-style: none; margin: 0; padding: 0; }
.nt { padding: 12px 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 3px; }
/* Long names and long targets ("Level up: Pronated-grip pull-up") share the row and wrap cleanly. */
.nt-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 10px; align-items: baseline; }
.nt-name { font-weight: 700; flex: 1 1 10rem; min-width: 0; }
.nt-delta { font-weight: 700; font-size: 0.92rem; margin-left: auto; text-align: right; max-width: 100%; }
.nt.up .nt-delta { color: var(--lime-ink); }
.nt.down .nt-delta { color: var(--warn); }
.nt-why { font-size: 0.85rem; color: var(--muted); }
.nt-on { margin-top: -6px; }
.notyet { background: var(--warn-soft); }
.notyet h2 { font-family: var(--display); }
.tests .ci-did { display: block; font-size: 0.82rem; color: var(--muted); font-family: var(--display); }
.tests li { align-items: center; }
.ci { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; font-size: 0.85rem; color: var(--warn); white-space: nowrap; }
.ci .ic { width: 16px; height: 16px; }
.ci.ok { color: var(--lime-ink); }
.seg3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; background: var(--surface-2); padding: 4px; border-radius: 14px; }
.seg3 button { min-height: 42px; border: 0; border-radius: 11px; background: transparent; font-weight: 700; color: var(--muted); }
.seg3 button.on { background: var(--surface); color: var(--text); box-shadow: 0 2px 8px -4px rgba(0, 0, 0, 0.3); }
.tell { display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.remembered { display: flex; gap: 8px; align-items: flex-start; background: var(--lime-soft); padding: 10px 12px; border-radius: var(--r-sm); font-size: 0.9rem; font-weight: 600; }
.remembered .ic { color: var(--lime-ink); }
/* Done is always on screen: the way out never hides below "Next time". */
.fin-foot { position: sticky; bottom: 0; z-index: 2; margin-top: auto; padding: 20px 0 calc(4px + var(--safe-b)); display: flex; flex-direction: column; gap: 8px; background: linear-gradient(to bottom, color-mix(in srgb, var(--bg) 0%, transparent), var(--bg) 40%); }
.fin-feel { gap: 8px; }

/* Progress */
.road { list-style: none; margin: 0; padding: 0; }
.road li { display: grid; grid-template-columns: 28px 1fr; gap: 12px; padding: 10px 0; position: relative; }
.road li:not(:last-child)::after { content: ''; position: absolute; left: 13px; top: 38px; bottom: -6px; width: 2px; background: var(--line); }
.road .dot { width: 28px; height: 28px; border-radius: 999px; background: var(--surface-2); display: grid; place-items: center; color: var(--muted); }
.road .dot .ic { width: 15px; height: 15px; }
.road li.done .dot { background: var(--lime); color: #0e120e; }
.road li > div { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.road li.next strong { color: var(--muted); }
.road li.next .dot { opacity: 0.6; }
.road p { font-size: 0.88rem; color: var(--muted); }
.bar { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; margin-top: 4px; }
.bar i { display: block; height: 100%; background: var(--lime-2); border-radius: 999px; }
.bars { position: relative; height: 130px; margin-top: 6px; display: grid; grid-template-columns: repeat(8, 1fr); gap: 8px; align-items: end; padding-top: 8px; }
.bars .b { height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; }
.bars .b i { width: 100%; max-width: 30px; border-radius: 8px 8px 4px 4px; background: color-mix(in srgb, var(--text) 10%, var(--surface)); }
.bars .b.hit i { background: linear-gradient(180deg, #d6fb63, var(--lime-2)); }
.bars .b.cur i { background: var(--lime-soft); box-shadow: inset 0 0 0 2px var(--lime-2); }
.bars .b.cur.hit i { background: linear-gradient(180deg, #d6fb63, var(--lime-2)); }
.bars .b span { font-size: 0.72rem; font-family: var(--display); color: var(--muted); height: 18px; line-height: 18px; }
/* Bars and the goal line share one scale: the 100px above the 22px label row (18px label + 4px gap). */
.bars .b i { flex-shrink: 0; height: calc((100% - 22px) * var(--h, 0)); }
.bars .b.pre i { height: 3px !important; background: var(--line); border-radius: 2px; }
.goal-line { position: absolute; left: 0; right: 0; bottom: calc(22px + (100% - 30px) * var(--h, 1)); border-top: 1px dashed color-mix(in srgb, var(--muted) 50%, transparent); pointer-events: none; z-index: 1; }
.lifts { list-style: none; margin: 0; padding: 0; }
.lifts li { display: grid; grid-template-columns: 1fr 80px 52px; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.lifts li > div { display: flex; flex-direction: column; min-width: 0; }
.lifts strong { font-size: 0.95rem; line-height: 1.25; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.spark { width: 80px; height: 28px; }
.sp-line { fill: none; stroke: var(--lime-ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.sp-area { fill: color-mix(in srgb, var(--lime) 30%, transparent); stroke: none; }
/* The dot is a round cap on a zero-length line: round at any chart width (a circle would stretch). */
.sp-dot { fill: none; stroke: var(--lime-ink); stroke-width: 6; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.spark.big .sp-line, .spark.wide .sp-line { stroke-width: 2.5; }
.spark.big .sp-dot, .spark.wide .sp-dot { stroke-width: 9; }
.delta { font-family: var(--display); font-weight: 700; font-size: 0.9rem; text-align: right; color: var(--muted); }
.delta.up { color: var(--lime-ink); }
.delta.down { color: var(--warn); }
.hist { list-style: none; margin: 0; padding: 0; }
.hist button { width: 100%; text-align: left; display: grid; grid-template-columns: 92px 1fr; grid-template-rows: auto auto auto; column-gap: 10px; padding: 11px 0; border: 0; border-top: 1px solid var(--line); background: none; }
.h-date { grid-row: span 3; font-size: 0.82rem; color: var(--muted); padding-top: 2px; }
.h-top { display: flex; align-items: center; gap: 5px; margin-top: 2px; font-size: 0.86rem; min-width: 0; }
.h-top > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.h-top.rec { color: var(--lime-ink); font-weight: 700; }
.h-top .ic { flex: none; width: 15px; height: 15px; }
.h-title { font-weight: 700; }
.sets-detail { list-style: none; margin: 0; padding: 0; }
.sets-detail li { display: flex; flex-direction: column; gap: 2px; padding: 10px 0; border-top: 1px solid var(--line); }
.sets-detail .mono { color: var(--muted); font-size: 0.9rem; }

/* Coach */
.method .m-row { display: flex; gap: 12px; align-items: center; }
.method h2 { font-family: var(--display); font-size: 1.4rem; }
.method img { border-radius: 12px; }
.method.has-creator { box-shadow: var(--shadow), inset 0 4px 0 var(--c); }
.method .btn { align-self: flex-start; }
.notes { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.note { border: 1px solid var(--line); border-radius: var(--r); padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.note.proposed { border-color: color-mix(in srgb, var(--lime-2) 38%, transparent); background: color-mix(in srgb, var(--lime-soft) 45%, var(--surface)); }
.note-main { display: flex; flex-direction: column; gap: 3px; text-align: left; border: 0; background: none; padding: 0; }
.note-kind { font-size: 0.7rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--lime-ink); }
.note-text { font-weight: 600; }
.note-eff { font-size: 0.85rem; color: var(--text); opacity: 0.8; }
.note-src { font-size: 0.78rem; color: var(--muted); }
.note-src:empty { display: none; }
.setting { display: flex; flex-direction: column; gap: 6px; }
.seg { display: flex; gap: 4px; background: var(--surface-2); padding: 4px; border-radius: 14px; align-items: center; }
.seg button { flex: 1; min-height: 40px; border: 0; border-radius: 11px; background: transparent; font-weight: 700; color: var(--muted); font-size: 0.9rem; display: grid; place-items: center; }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: 0 2px 8px -4px rgba(0, 0, 0, 0.3); }
.seg.wrap { display: grid; grid-template-columns: 1fr 1fr; }
.seg.wrap button { padding: 6px 8px; line-height: 1.2; text-align: center; }
.seg .bw { flex: 2; text-align: center; font-weight: 700; }
/* "Restore backup" is a label, not a button: centred like its neighbour when a long language wraps it. */
.file-btn { cursor: pointer; text-align: center; }
.ai-status { display: flex; align-items: center; gap: 6px; }
.ai-status .ic { width: 16px; height: 16px; }

/* Sheets & toast */
.sheet-wrap { position: fixed; inset: 0; z-index: 50; }
.sheet-scrim { position: absolute; inset: 0; background: rgba(5, 8, 5, 0.46); backdrop-filter: blur(6px) saturate(1.2); -webkit-backdrop-filter: blur(6px) saturate(1.2); opacity: 0; transition: opacity 0.2s; }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; max-width: 560px; margin: 0 auto; max-height: 86dvh; overflow: auto; background: var(--surface); border-radius: 28px 28px 0 0; padding: 8px 18px calc(22px + var(--safe-b)); box-shadow: inset 0 1px 0 var(--sheen), 0 0 0 1px var(--hair), var(--shadow-lg); transform: translateY(100%); transition: transform 0.34s var(--ease); outline: none; }
.sheet-wrap.open .sheet { transform: none; }
.sheet-wrap.open .sheet-scrim { opacity: 1; }
.sheet-grip { width: 40px; height: 5px; border-radius: 999px; background: color-mix(in srgb, var(--text) 16%, transparent); margin: 4px auto 10px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.sheet-head h2 { font-family: var(--display); font-size: 1.35rem; }
.sheet-body { display: flex; flex-direction: column; gap: 12px; }
.sheet-note { font-size: 0.85rem; color: var(--muted); }
.sheet-sub { font-family: var(--display); font-size: 1.05rem; margin-top: 8px; padding-top: 14px; border-top: 1px solid var(--line); }
.pick { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.pick button { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; text-align: left; padding: 14px 16px; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); font-weight: 700; transition: transform 0.12s var(--ease), border-color 0.15s; }
.pick button:active { transform: scale(0.99); }
.swap-any { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.swap-any-in { position: relative; }
.swap-any-in > .ic { position: absolute; left: 14px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.swap-any-in .input { padding-left: 42px; border-radius: 999px; min-height: 46px; -webkit-appearance: none; appearance: none; }
.swap-any-in .input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.swap-any { scroll-margin-top: 84px; }
.pick button.on { border-color: var(--ink); box-shadow: 0 0 0 3px color-mix(in srgb, var(--lime) 60%, transparent); }
.pick button.on > .ic:last-child { width: 22px; height: 22px; padding: 4px; border-radius: 999px; background: var(--ink); color: var(--check); stroke-width: 3.2; }
.pick.methods button { justify-content: flex-start; }
.pick.methods button > span:nth-child(2) { display: flex; flex-direction: column; flex: 1; }
.pick.methods small { font-weight: 500; color: var(--muted); }
.pick img { border-radius: 8px; }
.pick-ex { display: flex; align-items: center; gap: 12px; min-width: 0; }
/* Ask · Skip full exercise · Skip this set, pinned to the bottom of the swap sheet (edge to edge). */
.ex-more { position: sticky; bottom: calc(-22px - var(--safe-b)); z-index: 2; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 4px -18px calc(-22px - var(--safe-b)); padding: 12px 18px calc(14px + var(--safe-b)); background: var(--surface); border-top: 1px solid var(--line); }
/* Icons on one line across the three tiles, however many lines each label takes ("Skip full exercise"). */
.ex-more button { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 6px; min-height: 66px; padding: 10px 6px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); color: var(--text); font: inherit; font-size: 0.82rem; font-weight: 700; line-height: 1.15; text-align: center; cursor: pointer; transition: transform 0.12s var(--ease), border-color 0.15s; }
.ex-more button:active { transform: scale(0.98); }
.ex-more button:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
.ex-more .ic { width: 20px; height: 20px; flex: none; }
.ex-still { width: 44px; height: 44px; flex: none; border-radius: 10px; object-fit: cover; background: var(--surface-2); box-shadow: 0 0 0 1px var(--hair); }
.ex-still.none { display: grid; place-items: center; color: var(--muted); font-family: var(--display); font-weight: 800; font-size: 1.1rem; }
.ex-still.none .ic { width: 18px; height: 18px; }
.ask-log { display: flex; flex-direction: column; gap: 8px; min-height: 40px; }
/* Before the first question the sheet is just its title and the field: no blank band between them. */
.ask-log:empty { display: none; }
.bubble { padding: 10px 14px; border-radius: 16px; max-width: 88%; font-size: 0.95rem; }
.bubble.me { align-self: flex-end; background: var(--ink); color: var(--on-ink); }
.bubble.coach { align-self: flex-start; background: var(--surface-2); }
.bubble.pending { opacity: 0.6; }
.ask-form { display: flex; gap: 8px; align-items: center; }
/* A chat field: pill-shaped like its Send button. */
.ask-form .input { border-radius: 999px; padding: 0 18px; min-height: 44px; }
.ask-form .input { flex: 1; }
/* The send button keeps its word whole ("Ask", "Preguntar"); the field gives way. */
.ask-form .btn { min-height: 44px; flex: none; overflow-wrap: normal; white-space: nowrap; }
.toast { position: fixed; left: 50%; bottom: calc(150px + var(--safe-b)); transform: translate(-50%, 20px); z-index: 60; display: flex; align-items: center; gap: 12px; max-width: calc(100vw - 32px); width: max-content; padding: 12px 16px; border-radius: 18px; background: color-mix(in srgb, var(--ink) 92%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); color: var(--on-ink); font-weight: 600; font-size: 0.9rem; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), var(--shadow-lg); opacity: 0; pointer-events: none; transition: opacity 0.2s, transform 0.25s var(--ease); }
.toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
/* On the rest screen the toast sits just above the button, clear of the next-set card. */
body:has(.rest-screen) .toast { bottom: calc(90px + var(--safe-b)); }
/* On a set screen the bottom holds Log set and the tools: the toast drops in from the top instead. */
body:has(.ws-set) .toast, body:has(.rest-screen.rated) .toast { bottom: auto; top: calc(10px + var(--safe-t)); transform: translate(-50%, -12px); }
body:has(.ws-set) .toast.show, body:has(.rest-screen.rated) .toast.show { transform: translate(-50%, 0); }
/* Sharing: "Shared" would land on the card's big number, so it drops in from the top too. */
body:has(.share-card-wrap) .toast { bottom: auto; top: calc(10px + var(--safe-t)); transform: translate(-50%, -12px); }
body:has(.share-card-wrap) .toast.show { transform: translate(-50%, 0); }
/* Up there the toast sits over the workout clock: the clock steps aside instead of peeking out from behind it. */
.ws-clock { transition: opacity 0.15s; }
body:has(.toast.show):has(.ws-set) .ws-clock, body:has(.toast.show):has(.rest-screen.rated) .ws-clock { opacity: 0; }
.toast-btn { border: 0; background: none; color: var(--toast-accent, var(--lime)); font-weight: 800; }

/* Phone on its side: timer beside the next set, controls stay on screen. */
@media (orientation: landscape) and (max-height: 520px) {
  .ws-top { position: sticky; top: 0; z-index: 2; background: var(--bg); padding-block: 4px; }
  .rest-screen { display: grid; grid-template-columns: auto 1fr; grid-template-areas: "kicker next" "ring next" "ctl next" "ring feel"; justify-items: center; align-items: center; gap: 8px 20px; padding-top: 0; }
  .rest-screen.rated { grid-template-areas: "kicker feel" "ring feel" "ring next" "ctl next"; }
  .rest-screen.rated .ring { width: min(42vh, 170px); }
  .rest-feel { grid-area: feel; }
  .rest-screen > .kicker { grid-area: kicker; }
  .ring { grid-area: ring; width: min(42vh, 170px); }
  .ring span { font-size: 2.4rem; }
  .rest-ctl { grid-area: ctl; }
  .next-up { grid-area: next; align-self: stretch; justify-content: center; }
  .st-val { --st: 3.2rem; }
  /* Set: the target on the left, Log set on the right, both in view. */
  .ws-set .ws-body { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: start; }
  .ws-name { font-size: 1.45rem; }
  .setcount-big b { font-size: 4.2rem; }
}

@media (min-width: 720px) {
  .view { padding-top: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-delay: 0ms !important; transition-duration: 0.01ms !important; }
  .build-list li { opacity: 1; transform: none; }
}

/* Leaving a social app's browser / adding to the home screen */
.handoff { gap: 8px; box-shadow: inset 4px 0 0 var(--lime), 0 0 0 1px var(--hair), var(--shadow); }
.handoff p { margin: 0; }
.handoff .row2 { margin-top: 4px; }

/* ───────── Personal onboarding & plan editing ───────── */
.has-creator { --accent: var(--c, var(--lime)); }
.coach-says { display: flex; gap: 10px; align-items: flex-start; }
.coach-says p { background: var(--surface); border-radius: 4px 18px 18px 18px; padding: 10px 14px; font-size: 0.92rem; font-weight: 500; box-shadow: 0 0 0 1px var(--hair), var(--shadow); max-width: 92%; }
.coach-says .avatar, .coach-says img { margin-top: 2px; }
.coach-says img { border-radius: 8px; }
.coach-says.big p { font-size: 0.98rem; }
.big-input { font-family: var(--display); font-size: 1.6rem; font-weight: 700; padding: 16px 18px; border-radius: var(--r); letter-spacing: -0.01em; }
.about { display: flex; flex-direction: column; gap: 10px; }
.about .ruler-slot { margin-top: 0; }
.ob-hint.lock { display: flex; gap: 8px; align-items: center; font-size: 0.82rem; }
.ob-hint.lock .ic { width: 16px; height: 16px; }
.chips.age .chip { min-width: 72px; justify-content: center; }
/* Six age bands in one row: the bodyweight ruler below then sits clear of the Continue button. */
.chips.age { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.chips.age .chip { min-width: 0; padding-inline: 2px; font-size: 0.86rem; }
.text-large .chips.age { grid-template-columns: repeat(3, minmax(0, 1fr)); }
/* Six bands don't fit a 320 px phone on one row ("16–" over "24"): two rows of three, as at large text.
   The filled chip says it's picked; a tick beside the range only pushed it onto two lines. */
@media (max-width: 360px) { .chips.age { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.chips.age .chip.on::before { display: none; }
.known { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.known li { display: flex; flex-direction: column; gap: 8px; background: var(--surface); border-radius: var(--r); padding: 14px 16px; box-shadow: 0 0 0 1px var(--hair), var(--shadow); }
.known-name { font-weight: 700; }
.known-in { display: grid; grid-template-columns: 1fr auto 0.8fr; gap: 8px; align-items: center; }
.kin { display: flex; align-items: center; gap: 6px; background: var(--surface-2); border-radius: 12px; padding: 0 12px; min-height: 48px; }
.kin input { width: 100%; min-width: 0; border: 0; background: transparent; font-family: var(--display); font-size: 1.35rem; font-weight: 700; color: var(--text); padding: 8px 0; }
.kin input:focus { outline: none; }
.kin:focus-within { box-shadow: 0 0 0 2px var(--lime-2); }
.kin span { font-size: 0.8rem; font-weight: 700; color: var(--muted); }
.known-in .x { font-family: var(--display); color: var(--muted); font-weight: 700; }
/* Level step: the rungs of a bodyweight ladder as pictures, one tap each (same look as .opt). */
/* "Which pull-up can you do?": balancing the lines would split it at the hyphen. */
.ob-level .ob-q { text-wrap: pretty; }
.ladder { display: grid; gap: 10px; }
.ladder.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ladder.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.rung { min-width: 0; display: flex; flex-direction: column; gap: 8px; padding: 8px 8px 10px; text-align: left; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); box-shadow: inset 0 1px 0 var(--sheen), var(--shadow); transition: border-color 0.15s, transform 0.12s var(--ease); }
.rung:active { transform: scale(0.98); }
.rung.on { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink), 0 0 0 3px color-mix(in srgb, var(--lime) 60%, transparent); }
.rung-pic { aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--surface-2); display: grid; place-items: center; }
.ladder.cols-2 .rung-pic { aspect-ratio: 16 / 10; }
/* Three across: a little less picture and up to three lines, so no two names are cut to the same words. */
.ladder.cols-3 .rung-pic { aspect-ratio: 5 / 4; }
.ladder.cols-3 .rung-name { font-size: 0.78rem; -webkit-line-clamp: 3; }
.rung-pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rung-pic i { font-style: normal; font-family: var(--display); font-weight: 800; font-size: 1.6rem; color: var(--muted); }
.rung-name { padding: 0 2px; font-size: 0.82rem; font-weight: 700; line-height: 1.2; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.ladder-dots { display: flex; gap: 6px; justify-content: center; align-items: center; }
.ladder-dots i { width: 7px; height: 7px; border-radius: 999px; background: var(--line); transition: width 0.2s var(--ease), background 0.2s; }
.ladder-dots i.done { background: var(--muted); }
.ladder-dots i.on { width: 20px; background: var(--ink); }
@media (hover: hover) { .rung:hover { border-color: color-mix(in srgb, var(--text) 22%, var(--line)); } }
.day-pick { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.dp { aspect-ratio: 1 / 1.25; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); box-shadow: inset 0 1px 0 var(--sheen); display: grid; place-items: center; font-family: var(--display); font-weight: 700; font-size: 1rem; color: var(--muted); transition: transform 0.12s var(--ease), background 0.15s; }
.dp:active { transform: scale(0.94); }
.dp.on { background: var(--ink); border-color: var(--ink); color: var(--on-ink); box-shadow: 0 0 0 3px color-mix(in srgb, var(--lime) 55%, transparent); }
.day-count { font-size: 0.9rem; color: var(--muted); }
.day-count strong { color: var(--text); }

/* Creator welcome */
.ob-welcome.creator { gap: 16px; }
.hero-card { position: relative; overflow: hidden; border-radius: 28px; padding: 22px 20px 20px; background:
  radial-gradient(130% 90% at 0% 0%, color-mix(in srgb, var(--c, var(--lime)) 42%, transparent), transparent 62%),
  radial-gradient(90% 70% at 100% 100%, color-mix(in srgb, var(--lime) 22%, transparent), transparent 70%), var(--surface);
  box-shadow: inset 0 1px 0 var(--sheen), 0 0 0 1px var(--hair), var(--shadow); display: flex; flex-direction: column; gap: 18px; margin-top: clamp(4px, 3vh, 32px); }
.hero-top { display: flex; gap: 16px; align-items: center; }
.hero-top .ob-h1 { font-size: 1.9rem; }
.hero-kicker { font-size: 0.72rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.hero-program { display: flex; flex-direction: column; gap: 6px; padding-top: 16px; border-top: 1px solid color-mix(in srgb, var(--text) 10%, transparent); }
.hero-program h2 { font-family: var(--display); font-size: 1.45rem; letter-spacing: -0.02em; }
.hero-program p { color: var(--muted); font-size: 0.95rem; }
.hero-facts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.hero-facts span { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 999px; background: color-mix(in srgb, var(--surface) 70%, transparent); box-shadow: 0 0 0 1px var(--hair); font-size: 0.8rem; font-weight: 700; }
.hero-facts .ic { width: 15px; height: 15px; color: var(--lime-ink); }
.coach-quote { margin: 0; padding: 4px 0 4px 16px; border-left: 3px solid var(--c, var(--lime)); }
.coach-quote p { font-size: 1.08rem; line-height: 1.5; font-weight: 500; }
.coach-quote footer { margin-top: 6px; font-size: 0.85rem; font-weight: 700; color: var(--muted); }

/* Plan reveal */
.reveal-head { display: flex; gap: 12px; align-items: center; }
.reveal-head .ob-q { font-size: 1.6rem; }
.reveal-head img { border-radius: 12px; }
.reveal .method-card { background: radial-gradient(120% 120% at 0% 0%, color-mix(in srgb, var(--c, var(--lime)) 30%, transparent), transparent 65%), var(--surface); color: var(--text); box-shadow: inset 0 1px 0 var(--sheen), 0 0 0 1px var(--hair), var(--shadow); }
.reveal .method-card p { opacity: 1; color: var(--muted); font-size: 0.92rem; margin-top: 4px; }
.reveal .method-card .kicker { color: var(--text); font-size: 0.78rem; }
.kin input::-webkit-outer-spin-button, .kin input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.kin input[type=number] { -moz-appearance: textfield; appearance: textfield; }
.sec-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; }
.sec-row .sec { margin-top: 0; }
.sec-row .link { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; padding: 4px 0; }
.sec-row .link .ic { width: 16px; height: 16px; }
.edit-hint { display: flex; gap: 8px; align-items: center; font-size: 0.85rem; color: var(--muted); }
.edit-hint .ic { width: 16px; height: 16px; color: var(--lime-ink); }
.ex-edit { list-style: none; margin: 0; padding: 4px; background: var(--surface); border-radius: var(--r); box-shadow: 0 0 0 1px var(--hair), var(--shadow); }
/* Dividers start where the text does, not under the picture, like a native list. */
.ex-edit li { position: relative; }
.ex-edit li + li::before { content: ''; position: absolute; top: 0; left: 56px; right: 6px; height: 1px; background: var(--line); pointer-events: none; }
.ex-edit button { width: 100%; display: grid; grid-template-columns: 40px 1fr 34px; gap: 10px; align-items: center; padding: 7px 6px; border: 0; background: none; text-align: left; color: var(--text); border-radius: 14px; }
.ex-edit button:active { background: var(--surface-2); }
.ex-n { width: 24px; height: 24px; border-radius: 8px; background: var(--surface-2); display: grid; place-items: center; font-family: var(--display); font-weight: 700; font-size: 0.78rem; color: var(--muted); }
.ex-t { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.ex-edit .ex-n { justify-self: center; }
.ex-n.pic { width: 40px; height: 40px; position: relative; overflow: hidden; border-radius: 10px; box-shadow: 0 0 0 1px var(--hair); }
.ex-n.pic img { width: 100%; height: 100%; object-fit: cover; }
.ex-n.pic i { position: absolute; left: 2px; top: 2px; font-style: normal; font-size: 0.56rem; line-height: 1; padding: 2px 4px; border-radius: 5px; background: var(--surface); color: var(--muted); }
.ex-t .ex-load { white-space: normal; font-size: 0.8rem; }
.ex-act { width: 32px; height: 32px; border-radius: 999px; display: grid; place-items: center; background: var(--surface-2); color: var(--text); }
.ex-act .ic { width: 15px; height: 15px; }
.btn.ban { align-self: flex-start; margin-top: 4px; }
.btn.ban .ic { width: 18px; height: 18px; }
.btn[disabled] { opacity: 0.45; pointer-events: none; }
/* A main button that isn't ready yet: a quiet grey, not a faded lime (which turns muddy olive in dark mode). */
.btn.cta[disabled] { opacity: 1; background: var(--surface-2); color: var(--muted); box-shadow: inset 0 0 0 1px var(--hair); }

/* Workout overview */
.ov .grip { grid-column: 5; }
.grip { width: 44px; height: 44px; margin: -6px -8px -6px 0; display: grid; place-items: center; border: 0; background: none; border-radius: 12px; color: var(--muted); cursor: grab; touch-action: none; }
.grip .ic { width: 22px; height: 22px; }
.ov li.sliding { transition: transform 0.16s var(--ease); }
.ov li.dragging { position: relative; z-index: 1; background: var(--surface); border-radius: 14px; padding-inline: 8px; box-shadow: 0 10px 28px -10px rgba(14, 18, 14, 0.45), 0 0 0 1px var(--hair); }
.ov li.dragging .grip { cursor: grabbing; color: var(--text); }
.ov { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.ov li { display: grid; grid-template-columns: 30px 44px 1fr auto auto; gap: 12px; align-items: center; padding: 11px 0; border-top: 1px solid var(--line); }
.ov li:first-child { border-top: 0; }
.ov-dot { width: 28px; height: 28px; border-radius: 999px; background: var(--surface-2); display: grid; place-items: center; font-family: var(--display); font-weight: 700; font-size: 0.8rem; color: var(--muted); }
.ov-dot .ic { width: 15px; height: 15px; stroke-width: 3; }
.ov li.done .ov-dot { background: var(--lime); color: #0e120e; }
.ov li.now .ov-dot { background: var(--ink); color: var(--on-ink); }
.ov li.done strong, .ov li.skipped strong { color: var(--muted); }
.ov-t { display: flex; flex-direction: column; min-width: 0; }
.week-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.week-foot .link { padding: 0; white-space: nowrap; text-decoration: none; }
.shaped-tag { margin: 0; }
.shaped-tag .link { padding: 0; font-weight: 700; text-decoration: none; }
.shape-form { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.shape-form .sheet-note, .shape-form .sheet-label { margin: 0; }
.shape-form textarea { min-height: 84px; }
.shape-form .btn { width: 100%; }

/* The message bar of the conversation with the coach: typed, or spoken with the mic. */
.shape-form.tc-composer { flex-direction: row; align-items: flex-end; gap: 4px; margin: 8px 0 0; padding: 4px 4px 4px 18px; border-radius: 28px; background: var(--surface-2); box-shadow: 0 0 0 1px var(--hair); transition: box-shadow 0.2s; }
.shape-form.tc-composer:focus-within { box-shadow: 0 0 0 2px var(--lime-2), 0 0 24px rgba(200, 245, 66, 0.25); }
.shape-form.tc-composer textarea { flex: 1; min-height: 46px; max-height: 140px; padding: 12px 0; border: 0; border-radius: 0; background: transparent; resize: none; outline: none; line-height: 1.35; }
.tc-mic, .tc-send { flex: none; width: 46px; height: 46px; border-radius: 999px; border: 0; display: grid; place-items: center; background: transparent; color: var(--muted); }
.tc-mic .ic, .tc-send .ic { width: 20px; height: 20px; }
.tc-mic.on { background: var(--lime); color: #0e120e; }
.tc-send { background: var(--ink); color: var(--on-ink); transition: background 0.15s, transform 0.12s var(--ease); }
.tc-send:disabled { background: var(--line); color: var(--muted); }
.tc-send:not(:disabled):active { transform: scale(0.92); }
@media (prefers-reduced-motion: no-preference) { .tc-mic.on { animation: tc-ring 1.2s ease-out infinite; } }
@keyframes tc-ring { 0% { box-shadow: 0 0 0 0 rgba(200, 245, 66, 0.6); } 100% { box-shadow: 0 0 0 14px rgba(200, 245, 66, 0); } }
.shape-msg { margin: 0; font-size: 0.9rem; line-height: 1.4; }
.session-card .ex-edit { box-shadow: none; background: transparent; padding: 0; margin: 0 -8px; }
/* Today's list: the whole row is the button, so its arrow is a quiet hint, not six grey discs in a row. */
.session-card .ex-act { background: transparent; color: color-mix(in srgb, var(--muted) 80%, transparent); }
.session-card .ex-edit button:active .ex-act { color: var(--text); }

/* ───────── Coach dashboard ───────── */
.coach-hero { position: relative; overflow: hidden; border-radius: 28px; padding: 18px 18px 16px; display: flex; flex-direction: column; gap: 14px;
  background: radial-gradient(120% 90% at 0% 0%, color-mix(in srgb, var(--c, var(--lime)) 34%, transparent), transparent 60%),
    radial-gradient(80% 60% at 100% 100%, color-mix(in srgb, var(--lime) 16%, transparent), transparent 70%), var(--surface);
  box-shadow: inset 0 1px 0 var(--sheen), 0 0 0 1px var(--hair), var(--shadow); margin-top: 6px; }
.ch-top { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; }
.ch-top img { border-radius: 16px; }
.ch-who h1 { font-family: var(--display); font-size: 1.6rem; line-height: 1.1; letter-spacing: -0.02em; }
.ch-who p { font-size: 0.88rem; }
.ch-say { font-size: 1rem; line-height: 1.5; font-weight: 500; }
.ch-road { display: flex; flex-direction: column; gap: 6px; padding-top: 12px; border-top: 1px solid color-mix(in srgb, var(--text) 9%, transparent); }
.ch-road-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.ch-road .bar { margin-top: 0; }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tile { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 14px; border: 0; border-radius: var(--r); background: var(--surface); box-shadow: inset 0 1px 0 var(--sheen), 0 0 0 1px var(--hair), var(--shadow); text-align: left; color: var(--text); }
.tile-n { font-size: 1.8rem; font-weight: 700; line-height: 1; letter-spacing: -0.03em; display: inline-flex; align-items: center; gap: 4px; }
.tile-n .ic { width: 20px; height: 20px; color: #ff8a3d; }
.tile-l { font-size: 0.72rem; font-weight: 700; color: var(--muted); line-height: 1.2; }
.best-line { display: flex; gap: 8px; align-items: center; font-weight: 600; font-size: 0.92rem; padding: 10px 14px; border-radius: var(--r-sm); background: var(--lime-soft); }
.best-line .ic { color: var(--lime-ink); width: 18px; height: 18px; }
.plan-rows { list-style: none; margin: 0 -6px; padding: 0; }
.plan-rows li + li { border-top: 1px solid var(--line); }
.plan-rows button { width: 100%; display: grid; grid-template-columns: 22px auto minmax(4.5em, 1fr) 18px; gap: 12px; align-items: center; padding: 13px 6px; border: 0; background: none; text-align: left; color: var(--text); border-radius: 12px; }
.plan-rows button:active { background: var(--surface-2); }
.plan-rows .ic { width: 19px; height: 19px; color: var(--muted); }
.plan-rows .ic:last-child { width: 16px; height: 16px; }
.pr-l { font-weight: 600; }
/* A long label (Italian, the largest text) wraps rather than cutting the value to "45 …" (the value
   keeps room for a few words); a long value (two places, two priorities) wraps too, never cut. */
.pr-v { text-align: right; color: var(--muted); font-size: 0.9rem; min-width: 0; overflow-wrap: anywhere; }

/* ───────── Progress ───────── */
.prog-hero { border-radius: 28px; padding: 18px; display: flex; flex-direction: column; gap: 14px; background: linear-gradient(160deg, color-mix(in srgb, var(--lime) 22%, var(--surface)), var(--surface) 70%); box-shadow: inset 0 1px 0 var(--sheen), 0 0 0 1px var(--hair), var(--shadow); }
.ph-grid { display: grid; grid-template-columns: repeat(3, auto); gap: 8px; }
.ph-grid div { min-width: 0; overflow-wrap: anywhere; display: flex; flex-direction: column; gap: 4px; }
.ph-grid strong { font-size: clamp(1.7rem, 8.6vw, 2.3rem); line-height: 1; letter-spacing: -0.04em; white-space: nowrap; }
/* Columns sized by their labels first ("ALLENAMENTI" beside "SERIE"), so a long word stays whole on a
   small phone; only when even that can't fit does it break, with a hyphen where the language allows. */
.ph-grid div > span { font-size: 0.72rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); -webkit-hyphens: auto; hyphens: auto; }
.wk-line { font-weight: 700; font-size: 1.05rem; margin: 2px 0; }
.wk-streak .ic { width: 15px; height: 15px; color: #ff8a3d; vertical-align: -2px; }
.weeks-card .bars { margin-top: 0; }
/* A record from the last four weeks, on its lift's row. */
.lift-new { display: inline-flex; align-items: center; gap: 4px; margin-top: 2px; font-size: 0.76rem; font-weight: 700; color: var(--warn); white-space: nowrap; }
.lift-new .ic { flex: none; }
.lift-new .ic { width: 13px; height: 13px; }
/* A lift's chart: the day and the set at each end. */
.spark-ends { display: flex; justify-content: space-between; gap: 12px; margin-top: -4px; font-size: 0.78rem; color: var(--muted); }
.spark-ends span { display: flex; flex-direction: column; gap: 1px; }
.spark-ends .to { text-align: right; }
.spark-ends b { color: var(--text); font-weight: 700; }
.lift-next { font-size: 0.9rem; color: var(--muted); margin: 0; }
.lift-next b { color: var(--text); }
.lift-outlook { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border-radius: var(--r); background: color-mix(in srgb, var(--lime) 14%, var(--surface)); border: 1px solid var(--hair); }
.lift-outlook p { margin: 0; }
.lift-outlook-big b { font-size: 1.1rem; }
.lift-outlook.muted { background: none; border: 0; padding: 0; }
.mbars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.mbars li { display: grid; grid-template-columns: 92px 1fr 28px; gap: 10px; align-items: center; font-size: 0.85rem; font-weight: 600; }
.mbars i { height: 10px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.mbars b { display: block; height: 100%; border-radius: 999px; background: color-mix(in srgb, var(--text) 30%, var(--surface)); }
.mbars li.focus b { background: linear-gradient(90deg, var(--lime-2), var(--lime)); }
.mbars .mono { text-align: right; color: var(--muted); }
.lifts li { display: block; padding: 0; }
.lifts li button { width: 100%; display: grid; grid-template-columns: 1fr 64px auto; align-items: center; gap: 10px; padding: 11px 0; border: 0; background: none; text-align: left; color: var(--text); }
.lifts li button > div { display: flex; flex-direction: column; min-width: 0; }
/* The best set, big, with how it has moved under it. */
/* Wide enough for most bests ("42.5 kg"), so the rows' trend lines start at the same place (in px:
   at large text the name keeps its room). */
.lift-r { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; min-width: 72px; }
.lift-r b { font-family: var(--display); font-size: 1.05rem; font-weight: 700; letter-spacing: -0.01em; white-space: nowrap; }
.lift-r .delta { font-size: 0.8rem; }
.lift-sub { font-size: 0.78rem; color: var(--muted); font-weight: 600; white-space: nowrap; }
.lifts .spark { width: 64px; }
/* A closed section is one tidy row: no room kept for what it hides. */
details.card:not([open]) { gap: 0; padding-block: 6px; }
.hist-more { align-self: center; min-height: 44px; }
.bw-now { display: flex; align-items: baseline; gap: 6px; }
.bw-now strong { font-size: 2rem; letter-spacing: -0.03em; }
.bw-now > span { color: var(--muted); font-weight: 700; }
.bw-now .delta { margin-left: auto; }
.spark.wide { width: 100%; height: 60px; }
.spark.big { width: 100%; height: 120px; }
.kicker .ic { vertical-align: -3px; }

/* ───────── Premium pass ───────── */
.page { gap: 12px; }
.page-title { font-size: 2.2rem; letter-spacing: -0.035em; padding-top: 12px; }
.card { border-radius: 24px; padding: 16px; }
.card.week { padding: 10px 14px; gap: 6px; border-radius: 20px; }
.card.week .wd-dot { width: 28px; height: 28px; }
.card.week .week-meta { font-size: 0.76rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kicker { letter-spacing: 0.09em; font-weight: 700; }
.hello { font-size: 1.65rem; line-height: 1.08; letter-spacing: -0.03em; }
.session-card { background: radial-gradient(110% 80% at 100% 0%, color-mix(in srgb, var(--accent, var(--lime)) 16%, transparent), transparent 60%), var(--surface); }
.sc-title { font-size: 1.35rem; }
.btn.cta { letter-spacing: -0.01em; }
.ob-q { font-size: 2rem; letter-spacing: -0.03em; }
.opt { border-radius: 20px; padding: 18px 20px; }
.sheet { border-radius: 30px 30px 0 0; }
.ws-name { font-size: 1.9rem; }
@keyframes rise-in { from { opacity: 0; transform: translateY(10px); } }
@media (prefers-reduced-motion: no-preference) {
  .enter .page > * { animation: rise-in 0.45s var(--ease) both; }
  .enter .page > *:nth-child(2) { animation-delay: 0.04s; } .enter .page > *:nth-child(3) { animation-delay: 0.08s; }
  .enter .page > *:nth-child(4) { animation-delay: 0.12s; } .enter .page > *:nth-child(5) { animation-delay: 0.16s; }
  .enter .page > *:nth-child(n+6) { animation-delay: 0.2s; }
}
.sheet .stats3 { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; }
.sheet .stats3 strong { font-size: 1.3rem; white-space: nowrap; align-items: baseline; gap: 3px; }
.sheet .stats3 strong small { font-size: 0.62em; font-weight: 700; color: var(--muted); letter-spacing: 0; }
.sheet .stats3 > div { min-width: 0; padding-inline: 12px; }
.spark.big, .spark.wide { overflow: visible; }
.rest-card { background: radial-gradient(110% 80% at 0% 0%, color-mix(in srgb, #6aa8ff 18%, transparent), transparent 60%), var(--surface); }
.rest-card .kicker .ic { color: #6aa8ff; }
.rest-big { font-family: var(--display); font-size: 1.5rem; line-height: 1.15; letter-spacing: -0.02em; font-weight: 700; }
.fin-next { display: flex; gap: 8px; align-items: center; font-weight: 600; color: var(--muted); }
.fin-next .ic { width: 18px; height: 18px; color: var(--lime-ink); }
.wd.today.resting .wd-dot { box-shadow: inset 0 0 0 2px var(--line); }
.wd.today.resting .wd-dot::after { width: 6px; height: 6px; background: var(--muted); }

/* Your plan: a compact overview, with workouts and progression on demand. */
.pv-open { align-self: flex-start; }
.pv-open .ic { width: 17px; height: 17px; }
.pv-overview { display: flex; flex-direction: column; gap: 4px; }
.pv-schedule { font-family: var(--display); font-size: 1.15rem; font-weight: 700; }
.pv-focus { display: flex; flex-direction: column; gap: 5px; border-left: 3px solid var(--line); padding-left: 12px; }
.pv-focus h3 { font-size: 1rem; }
.pv-workouts { display: flex; flex-direction: column; }
.pv-w { border-bottom: 1px solid var(--line); }
.pv-w > summary { display: flex; align-items: center; gap: 10px; min-height: 72px; padding: 12px 0; cursor: pointer; list-style: none; }
.pv-w > summary::-webkit-details-marker, .pv-progression > summary::-webkit-details-marker { display: none; }
.pv-w-name { display: flex; flex: 1; min-width: 0; flex-direction: column; gap: 4px; }
.pv-w-name strong { font-family: var(--display); font-size: 1.05rem; }
.pv-w-name .small { font-weight: 400; }
.pv-next { flex: none; color: var(--lime-ink); font-weight: 700; }
.pv-chevron { flex: none; width: 16px; height: 16px; color: var(--muted); }
.pv-w[open] > summary .pv-chevron, .pv-progression[open] > summary .pv-chevron { transform: rotate(90deg); }
.pv-w .ex-edit { padding-bottom: 12px; }
.pv-progression > summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 44px; cursor: pointer; list-style: none; font-size: .85rem; font-weight: 600; }
.pv-progression > .small { margin: 8px 0 14px; }
.pv-progression .coach-quote { margin-bottom: 14px; }
.pv-road { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.pv-road li { display: grid; grid-template-columns: 28px 1fr; gap: 10px; }
.pv-road li > div { min-width: 0; }
.pv-dot { width: 26px; height: 26px; border-radius: 999px; display: grid; place-items: center; background: var(--surface-2); font-family: var(--display); font-weight: 700; font-size: 0.8rem; color: var(--muted); }
.pv-dot .ic { width: 14px; height: 14px; stroke-width: 3; }
.pv-road li.done .pv-dot { background: var(--lime); color: #0e120e; }
.pv-road li.now .pv-dot { background: var(--ink); color: var(--on-ink); }
.pv-credit { padding-top: 8px; font-size: .72rem; color: var(--muted); }

/* 3D movement demos */
.demo-wrap { position: relative; display: block; }
.demo { display: block; width: 100%; aspect-ratio: 1; height: auto; border-radius: 22px; background: var(--surface-2); object-fit: cover; }
.demo-wrap.big { max-width: 420px; margin: 0 auto; cursor: pointer; }
.demo-wrap.big .demo { box-shadow: 0 0 0 1px var(--hair); }
.demo-wrap.thumb .demo, .demo-wrap.side .demo { border-radius: 18px; }
.demo-play { position: absolute; inset: 0; display: none; place-items: center; pointer-events: none; }
.demo-play > span { width: 56px; height: 56px; border-radius: 999px; display: grid; place-items: center; background: color-mix(in srgb, var(--ink) 72%, transparent); color: var(--on-ink); }
.demo-play svg { width: 24px; height: 24px; margin-left: 3px; }
.demo-wrap.thumb .demo-play > span, .demo-wrap.side .demo-play > span { width: 36px; height: 36px; }
.demo-wrap.thumb .demo-play svg, .demo-wrap.side .demo-play svg { width: 16px; height: 16px; margin-left: 2px; }
.demo-wrap.blocked .demo-play { display: grid; }
/* Exercise sheet: a compact demo beside the facts, so the swap choices are in view on open. */
.ex-sum { display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: start; }
.ex-sum > div { min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.ex-sum .demo-wrap { width: 112px; box-shadow: 0 0 0 1px var(--hair); border-radius: 18px; cursor: pointer; }
.demo-btn { padding: 0; border: 0; background: none; width: 128px; border-radius: 18px; overflow: hidden; box-shadow: 0 0 0 1px var(--hair), var(--shadow); }
.next-up.with-demo { display: grid; grid-template-columns: 1fr 128px; gap: 4px 14px; align-items: center; }
.next-up.with-demo > div { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.next-up .demo-btn { grid-row: 1 / span 2; grid-column: 2; }
.next-up .adjust { grid-column: 1 / -1; }

/* The coach's judgement: milestones, questions it brings up, what it has learned */
.milestone .ms-text { font-family: var(--display); font-size: 1.18rem; line-height: 1.3; font-weight: 700; }
.moment .link.small { align-self: flex-start; margin-top: -4px; }
.learned-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.learned-list li { position: relative; padding-left: 18px; font-size: 0.94rem; line-height: 1.4; }
.learned-list li::before { content: ''; position: absolute; left: 2px; top: 0.55em; width: 7px; height: 7px; border-radius: 50%; background: var(--lime-2); }
.learned .btn { align-self: flex-start; }
.remembered.pending { background: var(--surface-2, var(--lime-soft)); color: var(--muted); font-weight: 500; }

/* The conversation with the coach */
.chat-log { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; max-height: 360px; overflow-y: auto; }
.msg { max-width: 86%; padding: 10px 13px; border-radius: 16px; font-size: 0.93rem; line-height: 1.4; white-space: pre-wrap; }
.msg.user { align-self: flex-end; background: var(--ink); color: var(--on-ink); border-bottom-right-radius: 6px; }
.msg.coach { align-self: flex-start; background: var(--lime-soft); border-bottom-left-radius: 6px; }
.msg.pending { color: var(--muted); }
.chat-try { gap: 8px; }
.chat-try .chip { font-size: 0.85rem; }

/* One coach, one conversation: the bubble on Today opens it; new replies show there and on the tab. */
.coach-says.tap { width: 100%; border: 0; background: none; padding: 0; text-align: left; color: inherit; font: inherit; cursor: pointer; }
.coach-says.tap p { display: flex; flex-direction: column; gap: 4px; transition: transform 0.12s var(--ease); }
.coach-says.tap:active p { transform: scale(0.98); }
.coach-says .cs-text { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.coach-says .cs-new { font-size: 0.72rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--lime-ink); }
.coach-says .cs-reply { display: inline-flex; align-items: center; gap: 6px; font-size: 0.8rem; font-weight: 700; color: var(--lime-ink); }
.coach-says .cs-reply .ic { width: 15px; height: 15px; }
.coach-says.new p { box-shadow: 0 0 0 1.5px var(--lime-ink), var(--shadow); }
.tab { position: relative; }
.tab-dot { position: absolute; top: 4px; left: calc(50% + 12px); width: 9px; height: 9px; border-radius: 999px; background: var(--danger); box-shadow: 0 0 0 2px var(--bg); }
.coach-hero.compact { gap: 10px; padding: 14px 16px; }
.coach-hero.compact .ch-who h1 { font-size: 1.3rem; }
.coach-hero.compact .ch-say { font-size: 0.92rem; line-height: 1.45; }
.section-h { font-family: var(--display); font-size: 1.15rem; letter-spacing: -0.01em; margin: 10px 4px -2px; }
.card.road { gap: 12px; }
.card.road .ch-road { border-top: 0; padding-top: 0; }
.chat-log { max-height: min(52vh, 460px); }
.chat .chat-try { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -20px; padding: 0 20px; }
.chat .chat-try::-webkit-scrollbar { display: none; }
.chat .chat-try .chip { flex: none; min-height: 34px; padding: 0 13px; }
.msg.aside { font-size: 0.88rem; }
/* A change to today's workout, shown in the conversation: the workout as it now stands. */
.msg.has-card { max-width: 92%; width: 92%; }
.chat-card { white-space: normal; margin-top: 10px; padding: 10px 12px 8px; border-radius: 14px; background: var(--surface); box-shadow: 0 0 0 1px var(--hair); }
.chat-card .cc-top { display: flex; justify-content: space-between; gap: 8px; margin: 0 0 6px; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.chat-card .cc-top .mono { text-transform: none; letter-spacing: 0; font-weight: 600; }
.chat-card .cc-list { margin: 0; padding: 0 0 0 20px; display: flex; flex-direction: column; gap: 3px; font-size: 0.88rem; }
.chat-card .cc-changes { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 0.9rem; font-weight: 600; }
.chat-card .cc-changes li { display: flex; align-items: baseline; gap: 8px; }
.chat-card .cc-changes b { width: 1ch; font-family: var(--display); color: var(--lime-ink); }
.chat-card .cc-changes li.gone { color: var(--muted); font-weight: 500; }
.chat-card .cc-changes li.gone b { color: var(--muted); }
.chat-card .cc-names { margin: 0; font-size: 0.86rem; color: var(--muted); line-height: 1.45; }
/* Only the latest exchange shows; earlier ones are one tap away. */
.chat-earlier { align-self: center; display: inline-flex; align-items: center; gap: 6px; min-height: 34px; margin: -2px auto 2px; padding: 0 12px; border: 0; border-radius: 999px; background: var(--surface-2); color: var(--muted); font: inherit; font-size: 0.8rem; font-weight: 700; cursor: pointer; }
.chat-earlier .ic { width: 14px; height: 14px; }
.chat .chat-log:not(.all) { max-height: none; overflow: visible; }
/* The full history scrolls: its top edge fades instead of cutting a message in half. */
.chat .chat-log.all { -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 36px); mask-image: linear-gradient(to bottom, transparent 0, #000 36px); padding-top: 12px; }
.chat-card .cc-list li::marker { color: var(--muted); font-size: 0.8rem; }
.chat-card .cc-list li.new { font-weight: 700; }
.chat-card .cc-list li.gone { list-style: none; margin-left: -20px; padding-left: 20px; color: var(--muted); text-decoration: line-through; }
.chat-card .cc-new { margin-left: 6px; padding: 1px 6px; border-radius: 999px; background: var(--lime); color: #0e120e; font-size: 0.66rem; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; vertical-align: 1px; }
.chat-card .cc-open { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; padding: 6px 0; border: 0; background: none; color: var(--lime-ink); font: inherit; font-size: 0.84rem; font-weight: 700; cursor: pointer; }
.chat-card .cc-open .ic { width: 15px; height: 15px; }
.chat-card .cc-acts { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.chat-card .cc-open { min-width: 0; text-align: left; }
.chat-card .cc-undo { flex: none; white-space: nowrap; margin-top: 8px; min-height: 32px; padding: 4px 12px; border: 0; border-radius: 999px; background: var(--surface-2); color: var(--text); font: inherit; font-size: 0.82rem; font-weight: 700; cursor: pointer; }
.chat-card.past { opacity: 0.7; }
/* What the coach just brought into today's workout. */
.pill.new { background: var(--lime); color: #0e120e; text-transform: uppercase; letter-spacing: 0.04em; font-size: 0.64rem; padding: 2px 7px; }
.ex-edit li.added button { background: color-mix(in srgb, var(--lime) 9%, transparent); }
@media (prefers-reduced-motion: no-preference) {
  .ex-edit li.added.flash { animation: ex-land 0.7s var(--ease) calc(var(--i, 0) * 90ms + 120ms) both; }
  .ex-edit li.added.flash button { animation: ex-glow 1.6s var(--ease) calc(var(--i, 0) * 90ms + 300ms) both; }
}
@keyframes ex-land { from { opacity: 0; transform: translateY(-8px) scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes ex-glow { 0% { box-shadow: inset 0 0 0 2px var(--lime); } 100% { box-shadow: inset 0 0 0 2px transparent; } }
/* ───────── Food ───────── */
.anchor { scroll-margin-top: 12px; display: flex; flex-direction: column; gap: 14px; }
.food-card, .food-week, .food-preview, .food-setup-card {
  --lime: var(--food);
  --lime-2: var(--food-2);
  --lime-ink: var(--food-ink);
  --lime-soft: var(--food-soft);
  --surface: var(--food-surface);
  --surface-2: var(--food-surface-2);
  --line: var(--food-line);
  scroll-margin-top: 12px;
  background: radial-gradient(110% 80% at 100% 0%, color-mix(in srgb, var(--food) 16%, transparent), transparent 60%), var(--food-surface);
  box-shadow: inset 0 1px 0 var(--sheen), 0 0 0 1px var(--food-line), var(--shadow);
}
.adapted-box, .ings, .food-setup { --lime: var(--food); --lime-2: var(--food-2); --lime-ink: var(--food-ink); --lime-soft: var(--food-soft); }
.note[data-kind="food"] .note-kind, .review-food .ic, .food-sec-h .ic { color: var(--food-ink); }
.food-sec-h { display: flex; align-items: center; gap: 8px; margin-top: 14px; }
.food-sec-h .ic { width: 20px; height: 20px; }
.prog-seg button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.prog-seg button .ic { width: 17px; height: 17px; }
.prog-seg button[data-pfilter="food"].on .ic { color: var(--food-ink); }
.prog-seg button[data-pfilter="train"].on .ic { color: var(--lime-ink); }
@media (forced-colors: active) {
  .food-card, .food-week, .food-preview, .food-setup-card, .meal.next { border: 1px solid CanvasText; }
  .meal.ate .meal-check { outline: 2px solid Highlight; }
}
.day-split { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.day-split button { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 8px; align-items: center; text-align: left; padding: 10px 12px; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); font-weight: 700; }
.day-split button .ic { grid-row: span 2; width: 22px; height: 22px; padding: 6px; box-sizing: content-box; border-radius: 10px; background: var(--lime-soft); color: var(--lime-ink); }
.day-split small { color: var(--muted); font-weight: 600; font-size: 0.8rem; }
.fc-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.fc-count { font-size: 0.8rem; color: var(--muted); font-weight: 700; }
.fc-lead { margin: -4px 0 0; font-size: 0.9rem; color: var(--muted); }
#todayTrain + .food-card, .food-card + #todayTrain { margin-top: 4px; }
.food-card { gap: 10px; }
.meals { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
/* One row per meal: tap the row for the meal, tap the circle when it's eaten. */
.meal { display: flex; align-items: center; gap: 6px; padding-right: 10px; border-radius: var(--r-sm); background: var(--surface-2); border: 1px solid transparent; transition: background 0.15s, border-color 0.15s; }
.meal-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; text-align: left; padding: 8px 4px 8px 12px; background: none; border: 0; border-radius: inherit; }
.meal.next { border-color: var(--ink); background: var(--surface); box-shadow: 0 0 0 2px color-mix(in srgb, var(--lime) 45%, transparent); }
.meal-slot { display: flex; flex-wrap: wrap; align-items: center; gap: 0 4px; font-size: 0.68rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.meal-slot b { color: var(--lime-ink); }
.meal-slot .mono { text-transform: none; letter-spacing: 0; }
.meal-name { font-weight: 700; font-size: 0.94rem; line-height: 1.25; overflow-wrap: anywhere; }
.meal-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0 6px; font-size: 0.8rem; color: var(--muted); }
.meal-meta:empty { display: none; }
.meal-adapted { display: inline-flex; align-items: center; gap: 3px; color: var(--lime-ink); font-weight: 700; }
.meal-adapted .ic { width: 12px; height: 12px; }
.meal-check { flex: none; width: 34px; height: 34px; border-radius: 999px; border: 2px solid color-mix(in srgb, var(--text) 22%, var(--line)); background: var(--surface); color: transparent; display: grid; place-items: center; transition: background 0.15s, border-color 0.15s, transform 0.12s var(--ease); }
.meal-check .ic { width: 17px; height: 17px; stroke-width: 3; }
.meal-check:active { transform: scale(0.9); }
@media (hover: hover) { .meal-check:hover { border-color: var(--lime-2); color: color-mix(in srgb, var(--lime-ink) 45%, transparent); } }
.meal.ate .meal-check { background: var(--lime); border-color: var(--lime-2); color: #0e120e; animation: pop 0.3s var(--ease) both; }
.meal.other .meal-check { border-color: var(--lime-2); color: var(--lime-ink); }
.meal.skipped .meal-check { border-style: dashed; color: var(--muted); }
.meal.ate, .meal.other, .meal.skipped { background: transparent; border-color: var(--line); }
.meal.ate .meal-name, .meal.skipped .meal-name { color: var(--muted); }
.fc-rule { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 0.88rem; font-style: italic; color: var(--muted); }
.fc-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px 12px; flex-wrap: nowrap; padding-top: 10px; border-top: 1px solid var(--line); }
.fc-protein { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.fc-protein .bar { height: 6px; }
.fc-shop { flex: none; gap: 6px; }
.fc-shop .ic { width: 18px; height: 18px; }
/* Onboarding reveal: today's food at a glance */
.food-preview { gap: 10px; }
.fp-list { list-style: none; margin: 0; padding: 0; }
.fp-list li { display: grid; grid-template-columns: 6.4em 1fr auto; gap: 10px; align-items: baseline; padding: 9px 0; border-top: 1px solid var(--line); }
.fp-list li:first-child { border-top: 0; padding-top: 2px; }
.fp-slot { font-size: 0.7rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); line-height: 1.3; }
.fp-name { font-weight: 700; line-height: 1.3; }
.fp-adapted { align-self: center; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 999px; background: var(--lime-soft); color: var(--lime-ink); }
.fp-adapted .ic { width: 13px; height: 13px; }
.fp-note { display: flex; gap: 8px; align-items: center; margin: 0; padding: 10px 12px; border-radius: var(--r-sm); background: var(--lime-soft); font-size: 0.88rem; font-weight: 600; }
.fp-note .ic { width: 16px; height: 16px; flex: none; color: var(--lime-ink); }
/* Meal sheet */
.meal-kicker { margin: -6px 0 0; font-size: 0.75rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.adapted-box { background: var(--lime-soft); border-radius: var(--r-sm); padding: 10px 12px; font-size: 0.9rem; }
.adapted-box ul { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.adapted-box li { display: flex; gap: 8px; align-items: flex-start; }
.adapted-box .ic { width: 16px; height: 16px; flex: none; margin-top: 2px; color: var(--lime-ink); }
.ings { list-style: none; margin: 0; padding: 0; }
.ings li { display: flex; gap: 12px; align-items: baseline; padding: 8px 0; border-top: 1px solid var(--line); }
.ings li:first-child { border-top: 0; }
.ing-amt { flex: none; min-width: 72px; font-weight: 700; }
.ing-amt.soft { font-family: inherit; font-weight: 500; font-size: 0.85rem; color: var(--muted); }
.ing-name { display: inline-flex; gap: 6px; align-items: center; }
.ing-name .ic { width: 14px; height: 14px; color: var(--lime-ink); }
.steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 0.95rem; }
.allergen-line { display: flex; gap: 8px; align-items: flex-start; font-size: 0.85rem; color: var(--muted); margin: 0; }
.allergen-line .ic { width: 16px; height: 16px; flex: none; margin-top: 2px; }
.meal-actions { position: sticky; bottom: -22px; z-index: 1; margin: 4px -18px 0; padding: 14px 18px 22px; background: linear-gradient(to bottom, color-mix(in srgb, var(--surface) 0%, transparent), var(--surface) 22%); }
.meal-ask .answer:empty { display: none; }
.meal-ask .answer { background: var(--surface-2); border-radius: var(--r-sm); padding: 10px 12px; margin: 0; }
/* The food plate (a list), not the barbell plates above: named apart so one never restyles the other. */
ul.plate { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
ul.plate li { display: flex; gap: 8px; align-items: flex-start; padding: 10px; border-radius: var(--r-sm); background: var(--surface-2); font-size: 0.88rem; font-weight: 600; }
.pl-dot { flex: none; width: 14px; height: 14px; border-radius: 999px; margin-top: 2px; }
.pl-protein .pl-dot { background: #e5484d; } .pl-veg .pl-dot { background: #3fa34d; } .pl-carb .pl-dot { background: #f5a524; } .pl-fat .pl-dot { background: #9b6bff; }
.rules { margin: 0; padding-left: 18px; font-size: 0.9rem; color: var(--muted); }
/* Shopping list */
.shop { list-style: none; margin: 0; padding: 0; }
.shop label { display: flex; gap: 10px; align-items: center; padding: 10px 2px; border-top: 1px solid var(--line); }
.shop li:first-child label { border-top: 0; }
.shop input { width: 20px; height: 20px; accent-color: var(--lime-2); }
.shop-name { flex: 1; font-weight: 600; }
.shop label.on .shop-name { text-decoration: line-through; color: var(--muted); }
/* Food setup */
.opts.compact { gap: 8px; }
.opts.compact .opt { padding: 12px 48px 12px 14px; }
.diet-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.diet { position: relative; display: flex; flex-direction: column; gap: 1px; text-align: left; padding: 12px 14px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--surface); box-shadow: inset 0 1px 0 var(--sheen), var(--shadow); transition: border-color 0.15s, transform 0.12s var(--ease); }
.diet:active { transform: scale(0.98); }
.diet .opt-title { font-size: 1rem; }
.diet .opt-sub { font-size: 0.8rem; line-height: 1.3; }
.diet.on { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink), 0 0 0 3px color-mix(in srgb, var(--lime) 60%, transparent); }
.lock-line { display: flex; gap: 8px; align-items: center; margin: 2px 0 0; font-size: 0.82rem; color: var(--muted); }
.lock-line .ic { width: 15px; height: 15px; flex: none; }
.food-setup .sheet-label { margin-top: 8px; }
.meal-counts .opt-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mc-n { font-family: var(--display); font-size: 1.35rem; line-height: 1; margin-right: -2px; }
.mc-tag { font-size: 0.7rem; font-weight: 800; letter-spacing: 0.04em; padding: 3px 8px; border-radius: 999px; background: var(--lime-soft); color: var(--lime-ink); }
.shop-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.shop-head p { margin: 0; }
.shop-head .btn { flex: none; gap: 6px; }
.shop-head .ic { width: 16px; height: 16px; }
.toggle-row { display: flex; gap: 10px; align-items: center; font-weight: 600; padding: 6px 0; }
.toggle-row input { width: 20px; height: 20px; accent-color: var(--lime-2); }
/* Progress: food week */
.fw-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.fw-day { min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.fw-ring { --p: 0%; width: min(36px, 100%); height: auto; aspect-ratio: 1; border-radius: 999px; display: grid; place-items: center; background: conic-gradient(var(--lime-2) var(--p), var(--surface-2) 0); }
.fw-ring span { width: calc(100% - 8px); height: auto; aspect-ratio: 1; border-radius: 999px; background: var(--surface); display: grid; place-items: center; font-size: 0.78rem; font-weight: 800; font-family: var(--mono, inherit); }
.fw-day.on .fw-ring span { background: var(--lime-soft); }
.fw-day.cur .fw-l { color: var(--text); font-weight: 800; }
.fw-l { font-size: 0.72rem; color: var(--muted); font-weight: 700; }
.fw-stats { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.fw-stats li { display: flex; flex-direction: column; gap: 2px; background: var(--surface-2); border-radius: var(--r-sm); padding: 10px; }
.fw-stats strong { font-size: 1.3rem; }
.fw-stats span { font-size: 0.75rem; color: var(--muted); font-weight: 600; line-height: 1.25; }
.food-setup { display: flex; flex-direction: column; gap: 8px; }
.review-food { display: flex; gap: 6px; align-items: center; margin: 0; } .review-food .ic { width: 16px; height: 16px; color: var(--lime-ink); }
.fw-day.pre .fw-ring { background: transparent; box-shadow: inset 0 0 0 1px var(--line); opacity: 0.5; }
.fw-day.pre .fw-ring span { background: transparent; }
.fw-stats strong small { font-size: 0.8rem; color: var(--muted); font-weight: 700; }
/* Cloud save */
.check-row { display: flex; gap: 10px; align-items: flex-start; font-size: 0.9rem; color: var(--text); line-height: 1.4; }
.check-row input { width: 20px; height: 20px; margin-top: 1px; flex: none; accent-color: var(--ink); }
.check-row a { color: inherit; text-decoration: underline; }
.form-err { color: var(--warn); background: var(--warn-soft); padding: 10px 12px; border-radius: var(--r-sm); font-size: 0.9rem; }
.code-input { font-family: var(--display); font-variant-numeric: tabular-nums; font-size: 1.4rem; letter-spacing: 0.3em; text-align: center; }
.cloud-who { display: flex; gap: 10px; align-items: flex-start; }
.cloud-who .ic { flex: none; margin-top: 2px; }
/* A long email at the largest text breaks inside the sheet instead of running off its edge. */
.cloud-who > span { min-width: 0; overflow-wrap: anywhere; }
.ob-signin { display: block; margin: 10px auto 0; }

/* Coach tab: the way into Plan & settings, at the end of the conversation and what it knows. */
.settings-row { display: flex; flex-direction: row; align-items: center; gap: 12px; width: 100%; text-align: left; border: 0; color: var(--text); font: inherit; cursor: pointer; }
.settings-row > .ic { width: 22px; height: 22px; flex: none; color: var(--muted); }
.settings-row > .ic:last-child { width: 18px; height: 18px; }
.settings-row > span { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.settings-row strong { font-size: 1rem; }
.settings-row small { color: var(--muted); font-size: 0.82rem; font-weight: 500; line-height: 1.3; }
.sheet-body .ch-road { margin: 2px 0 6px; padding-top: 0; border-top: 0; }

/* Finish: a milestone is a line under the headline, not a card; the coach and sharing are two quiet buttons. */
.fin-ms { display: flex; gap: 8px; align-items: flex-start; margin: -4px 0 0; font-weight: 600; font-size: 0.98rem; line-height: 1.35; }
.fin-ms .ic { width: 18px; height: 18px; flex: none; margin-top: 1px; color: var(--lime-ink); }
.nt-more { align-self: flex-start; padding: 0; font-weight: 700; text-decoration: none; }
.fin-links { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fin-links .btn { min-width: 0; font-size: 0.9rem; padding-left: 10px; padding-right: 10px; }
/* Two side-by-side actions: icon and label read as one unit when the label needs two lines. */
.fin-links .btn:not(:only-child) { justify-content: flex-start; text-align: left; line-height: 1.2; padding: 8px 14px; border-radius: 18px; }
.fin-links .btn:only-child { grid-column: 1 / -1; }

/* Progress: the sets per muscle, one tap away under this week. */
.mdetails { border-top: 1px solid var(--line); padding-top: 10px; }
.mdetails summary { list-style: none; display: flex; justify-content: space-between; align-items: center; cursor: pointer; font-size: 0.85rem; font-weight: 700; color: var(--muted); min-height: 32px; }
.mdetails summary::-webkit-details-marker { display: none; }
.mdetails summary::after { content: ''; width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); margin: 0 4px 4px 0; transition: transform 0.18s var(--ease); }
.mdetails[open] summary::after { transform: rotate(-135deg); margin-bottom: -4px; }
.mdetails[open] .mbars { margin: 8px 0 10px; }

/* Food keeps one daily decision prominent, with details close by. */
.food-tabs {
  position: sticky;
  top: 8px;
  z-index: 12;
  margin: 2px 0 6px;
  box-shadow: 0 6px 18px -12px rgba(0, 0, 0, 0.35);
  background: var(--surface-2);
  border: 1px solid var(--line);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.food-tabs button {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border-radius: 11px;
  font-weight: 700;
  font-size: 0.9rem;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  color: var(--muted);
}
.food-tabs button.on {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 2px 10px -2px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.food-tabs button.on svg {
  color: var(--lime-ink);
}

/* Flawless transitions between Workout and Food tabs */
.today-sections {
  position: relative;
  width: 100%;
}

.today-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.today-panel.is-hidden {
  display: none !important;
}

/* Switching Workout / Food animates in today.js; a CSS animation here would replay on every re-draw. */

/* View transitions setup */
::view-transition-group(today-header),
::view-transition-group(today-calendar),
::view-transition-group(today-tabs) {
  animation-duration: 0.2s;
}

.today-head { view-transition-name: today-header; }
.week.card { view-transition-name: today-calendar; }
.food-tabs { view-transition-name: today-tabs; }
.today-sections { view-transition-name: today-content; }

@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) {
    animation: none !important;
  }
  .today-panel.is-active {
    animation: none !important;
  }
}

[hidden] { display: none !important; }
.food-check { color: #8a4108; display: block; font-weight: 650; font-size: .78rem; }
.food-warning { border-radius: 14px; background: #fff3df; color: #633607; border: 1px solid #e9c99b; padding: 12px; line-height: 1.5; }
.food-units { display: flex; align-items: center; gap: 12px; justify-content: space-between; }
.food-units .link { font-size: .8rem; white-space: nowrap; min-height: 44px; }
.food-actions { position: sticky; bottom: calc(-22px - var(--safe-b)); background: var(--surface); padding: 12px 18px calc(12px + var(--safe-b)); margin-bottom: 8px; z-index: 2; border-top: 1px solid var(--hair); }
.meal-actions .btn { min-height: 44px; }
.shop-have { margin: 0 0 6px 38px; font-size: .8rem; min-height: 36px; }
.pick small { display: block; margin-top: 4px; color: var(--muted); font-size: .8rem; font-weight: 400; }
.food-week details, .food-card details, .sheet details { margin-top: 10px; }
.food-week summary, .sheet summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; gap: 8px; font-weight: 600; }
@media (prefers-color-scheme: dark) { .food-warning { background: #392d1c; color: #f8d3a4; border-color: #715431; } .food-check { color: #e6b87f; } }
/* The default Food view is one meal and two actions; everything else unfolds on demand. */
.food-card .meal.next { display: block; padding: 16px; }
.food-card .meal.next .meal-main { width: 100%; padding: 0; margin-bottom: 14px; }
.food-card .meal.next .meal-name { font-size: 1.3rem; }
.food-card .meal-primary-actions .btn { min-height: 44px; padding: 10px 12px; }
.food-card [data-rest-meals] > summary { cursor: pointer; padding: 14px 0; font-size: .88rem; font-weight: 600; }
.food-card .fc-foot { align-items: start; justify-content: space-between; gap: 12px; }
.food-plan-details { flex: 1 1 110px; min-width: 0; max-width: 100%; margin: 0 !important; text-align: right; }
.food-plan-details summary { min-height: 44px; cursor: pointer; font-size: .78rem; color: var(--muted); }
.food-plan-details p { text-align: left; }
.food-ask { border-top: 1px solid var(--hair); padding-top: 8px; }
.food-actions { margin-top: 8px; }
.adapted-box summary { font-size: .8rem; min-height: 32px; }
.food-card .meal-primary-actions .btn.cta, .food-actions .btn.cta {
  background: var(--ink); color: var(--surface); box-shadow: none; border-color: transparent;
}

/* Every expandable row in Food shows that it opens, with the same quiet chevron. */
:is(.food-card, .food-week, .food-sheet) summary { list-style: none; display: flex; align-items: center; gap: 8px; cursor: pointer; }
:is(.food-card, .food-week, .food-sheet) summary::-webkit-details-marker { display: none; }
:is(.food-card, .food-week, .food-sheet) summary::after { content: ''; flex: none; width: 7px; height: 7px; margin: 0 5px 3px auto; border: solid currentColor; border-width: 0 2px 2px 0; opacity: .5; transform: rotate(45deg); transition: transform .2s var(--ease); }
:is(.food-card, .food-week, .food-sheet) details[open] > summary::after { transform: rotate(-135deg); margin-bottom: -3px; }
.food-plan-details summary { justify-content: flex-end; }
.food-plan-details summary::after { margin-left: 0; }
.meal-meta { font-size: .76rem; color: var(--muted); font-variant-numeric: tabular-nums; }
/* No photo for this dish: a small plate, not a screen-tall placeholder. */
.sheet .meal-photo.compact:not(.has-art) { height: 92px; }
.sheet .meal-photo.compact:not(.has-art) .meal-photo-fallback { width: auto; height: 74px; aspect-ratio: 1; border-width: 6px; }
.sheet .meal-photo.compact:not(.has-art) .meal-photo-fallback .ic { width: 30px; height: 30px; }
/* Short phones (iPhone SE and the like): the day's first action stays in view above the tab bar.
   A tighter week strip; on Food the next meal comes first (its own label says which meal), with a
   shorter photo, and the day's totals follow it. */
@media (max-height: 700px) {
  .page.today { gap: 8px; }
  .food-tabs { margin: 0; }
  .week { padding: 10px 12px; gap: 6px; }
  .wd { gap: 3px; }
  .wd-dot { width: 26px; height: 26px; }
  .food-card { padding: 12px; }
  .food-card > .fc-top { display: none; }
  .food-card .food-spotlight .meal-photo { height: 100px; }
  .food-card .spotlight-content { padding: 10px 12px 12px; }
  .food-card .food-intake-control { order: 1; }
  .food-card [data-rest-meals] { order: 2; }
  .food-card .fc-foot { order: 3; }
}

/* Onboarding: the plan taking shape under the progress bar, one item per answer. */
.plan-strip { display: flex; align-items: center; gap: 10px; margin-top: 12px; min-height: 30px; overflow: hidden; }
.plan-strip .ps-label { flex: none; font-size: 0.68rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.plan-strip ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; min-width: 0; flex: 1; -webkit-mask-image: linear-gradient(to left, transparent, #000 40px); mask-image: linear-gradient(to left, transparent, #000 40px); }
/* The list spans the strip (flex: 1 above): the fade sits at the screen's edge, not over the end of
   an answer that fits (a lone "Push / Legs" lost its last letters and its pencil). */
.plan-strip ul::-webkit-scrollbar { display: none; }
.plan-strip li { flex: none; display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 10px; border-radius: 999px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--hair); font-size: 0.78rem; font-weight: 700; white-space: nowrap; }
.plan-strip li .ic { width: 14px; height: 14px; color: var(--lime-ink); }
/* The answers are ways back to their question, 28 points tall: the list gets room above and below
   (taken back by the margins, so nothing moves) and each answer's tap area fills it, 44 tall. */
.plan-strip ul { padding-block: 8px; margin-block: -8px; }
.plan-strip li button { position: relative; }
.plan-strip li button::after { content: ''; position: absolute; inset: -8px -3px; }
.plan-strip li.new { background: var(--lime-soft); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--lime-ink) 45%, transparent); animation: chip-in 0.45s var(--ease) both; }
.plan-strip .ps-empty { font-size: 0.8rem; color: var(--muted); }
@keyframes chip-in { from { opacity: 0; transform: translateY(6px) scale(0.92); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .plan-strip li.new { animation: none; } }

/* Onboarding: the ready screen. One card for the first workout, tags for what was made for them. */
.reveal.ready { gap: 14px; }
/* Tighter top, bottom and foot than the questions: with a few tags and the "that's why" line the ready
   screen ran ~50 px past an iPhone 16 Pro, that line half under Start's fade. */
.ob-reveal .ob-body { padding-top: 14px; padding-bottom: 12px; }
.ob-reveal .ob-foot { padding-top: 16px; }
.ready-card { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; width: 100%; padding: 18px; border: 0; border-radius: var(--r-lg); background: var(--surface); color: var(--text); text-align: left; font: inherit; box-shadow: inset 0 1px 0 var(--sheen), 0 0 0 1px var(--hair), var(--shadow); cursor: pointer; transition: transform 0.12s var(--ease); }
.ready-card:active { transform: scale(0.985); }
.ready-card .rc-title { font-family: var(--display); font-size: 1.35rem; letter-spacing: -0.02em; }
.rc-pics { display: flex; gap: 8px; align-items: center; }
.rc-pics .ex-still { width: 56px; height: 56px; border-radius: 14px; }
.rc-more { width: 56px; height: 56px; border-radius: 14px; display: grid; place-items: center; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--hair); font-family: var(--display); font-weight: 700; color: var(--muted); }
.rc-line { font-size: 0.92rem; color: var(--muted); }
.rc-see { display: inline-flex; align-items: center; gap: 6px; font-size: 0.88rem; font-weight: 700; color: var(--lime-ink); }
.rc-see .ic { width: 16px; height: 16px; }
.made-for .sec { margin: 0 0 10px; }
/* What the workout does instead, for the body part they named: one quiet line under the tags. */
.made-for .made-line { margin: 10px 2px 0; font-size: 0.9rem; line-height: 1.4; color: var(--muted); text-wrap: pretty; }
.made-for .tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.made-for .tags li { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border-radius: 999px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--hair); font-size: 0.88rem; font-weight: 600; }
.made-for .tags li .ic { width: 15px; height: 15px; color: var(--lime-ink); }
.made-for .tags li.tap { padding: 0; }
.made-for .tags li.tap button { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border: 0; border-radius: 999px; background: none; color: inherit; font: inherit; cursor: pointer; }
.made-for .tags li.tap button .ic:last-child { color: var(--muted); }
/* Exercise rows without a picture yet: a tile the same size as the pictures, so rows line up. */
.ex-edit .ex-n:not(.pic) { width: 40px; height: 40px; border-radius: 10px; box-shadow: 0 0 0 1px var(--hair); justify-self: center; }
/* About you: the optional name is lighter than the questions that set the weights. */
.about .name-field .input { min-height: 44px; padding: 10px 12px; font-size: 1rem; }
/* Short phones (iPhone SE and the like): the ready screen still fits without scrolling. */
@media (max-height: 720px) {
  .reveal.ready { gap: 12px; }
  .reveal.ready .reveal-head .ob-q { font-size: 1.35rem; }
  .ready-card { padding: 14px 16px; gap: 8px; }
  .ready-card .rc-title { font-size: 1.15rem; }
  .rc-pics .ex-still, .rc-more { width: 46px; height: 46px; border-radius: 12px; }
  .rc-line { font-size: 0.86rem; }
  .made-for .tags li, .made-for .tags li.tap button { min-height: 32px; font-size: 0.82rem; }
  .ob-reveal .ob-body { padding-top: 14px; padding-bottom: 12px; }
  .ob-reveal .ob-foot { padding-top: 16px; }
}

/* Keep long names, translated labels and messages inside their cards. */
.page > *, .sheet-body > *, .sec-row > *, .ch-who { min-width: 0; }
.msg, .ex-name, .sheet-head h2, .ch-who, .food-card h3 { overflow-wrap: anywhere; }
.chip { white-space: normal; text-align: left; padding-block: 9px; }
button:disabled { cursor: default; opacity: .55; }
.chat-log, .sheet { overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.sheet { scroll-padding-block: 20px; }
.sheet-head { position: sticky; top: -8px; z-index: 3; background: var(--surface); padding-block: 10px; }
.sheet-head .icon-btn { flex: none; }
body:has(.sheet-wrap) { overflow: hidden; }
.input, textarea { scroll-margin-block: 100px; }
.kin:focus-within { outline: 2px solid var(--lime-2); outline-offset: 3px; }

/* A wider reading surface on desktop, with progress cards sharing a row. */
@media (min-width: 900px) and (min-height: 600px) {
  .view { max-width: 760px; padding-inline: 28px; }
  .page { gap: 20px; }
  .page-title { font-size: 2.4rem; padding-block: 12px; }
  .start-bar { max-width: 760px; padding-inline: 28px; }
  .progress-page { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .progress-page > .page-title, .progress-page > .prog-seg,
  .progress-page > .section-h { grid-column: 1 / -1; }
  .sheet { top: 50%; bottom: auto; transform: translateY(calc(-50% + 24px)); opacity: 0; border-radius: 28px; max-height: min(84dvh, 820px); padding-bottom: 24px; transition: transform .25s var(--ease), opacity .2s; }
  .sheet-wrap.open .sheet { transform: translateY(-50%); opacity: 1; }
  .sheet-grip { display: none; }
  .ob, .ws, .fin { padding-top: 32px; padding-bottom: 28px; }
}
@media (max-width: 360px) {
  .view, .ob, .ws, .fin { padding-inline: 12px; }
  .week { padding-inline: 10px; }
  .week-row { gap: 3px; }
  .hello { font-size: 1.6rem; }
  .sheet { padding-inline: 14px; }
}
@media (hover: hover) {
  .ex-edit button:hover, .plan-rows button:hover, .lifts li button:hover { background: color-mix(in srgb, var(--text) 3%, var(--surface)); }
  .icon-btn:hover { background: color-mix(in srgb, var(--text) 10%, var(--surface-2)); }
  .tab:not(.on):hover { background: var(--surface-2); color: var(--text); }
}
/* Nutrition controls stay easy to hit without crowding meal titles. */
.meal-check { width: 44px; height: 44px; }
.ing-item-main { flex-wrap: wrap; gap: 2px 10px; }
.ing-name { overflow-wrap: anywhere; }
@media (max-width: 360px) {
  .ings li { flex-wrap: wrap; gap: 4px 10px; }
  .ing-item-main { flex-basis: 100%; }
  .ing-macros { margin-left: auto; }
  .fc-foot { flex-wrap: wrap; }
}
@media (min-width: 900px) and (min-height: 600px) {
  .progress-page > .card:has(.lifts), .progress-page > .card:has(.hist) { grid-column: 1 / -1; }
  .lifts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; }
}

/* Quiet secondary detail and comfortable controls across the app. */
.progress-breakdown > summary, .progress-road > summary, .chat-ideas > summary, .reveal-progression > summary { display: flex; align-items: center; gap: 8px; min-height: 44px; cursor: pointer; font-size: .82rem; font-weight: 600; list-style: none; }
.progress-breakdown > summary::before, .progress-road > summary::before, .chat-ideas > summary::before, .reveal-progression > summary::before { content: '›'; font-size: 1.2em; color: var(--muted); }
.progress-breakdown[open] > summary::before, .progress-road[open] > summary::before, .chat-ideas[open] > summary::before, .reveal-progression[open] > summary::before { transform: rotate(90deg); }
.progress-breakdown > summary::-webkit-details-marker, .progress-road > summary::-webkit-details-marker, .chat-ideas > summary::-webkit-details-marker, .reveal-progression > summary::-webkit-details-marker { display: none; }
/* Sets per muscle is also an .mdetails: one marker (the ›), with the label next to it. */
.progress-breakdown > summary { justify-content: flex-start; }
.progress-breakdown > summary::after { content: none; }
.progress-breakdown .mbars, .progress-road .road, .chat-ideas .chat-try, .reveal-progression .road-mini { margin-top: 10px; }
.progress-breakdown > .small { margin-top: 12px; }
.chat-ideas .chat-try { flex-wrap: wrap; overflow: visible; }
.chat-ideas .chip { min-width: 0; max-width: 100%; white-space: normal; overflow-wrap: anywhere; text-align: left; }
.road-mini li strong { overflow-wrap: anywhere; }
.sheet-head h2, .ob-q, .ws-name, .fin-head h1 { min-width: 0; overflow-wrap: anywhere; }
.target { flex-wrap: wrap; }
.tell textarea, .ask-form .input { min-width: 0; }
.btn { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 380px) {
  /* The best set keeps its own width ("142.5 kg"); the name gives way. */
  .lifts li button { grid-template-columns: minmax(0, 1fr) 44px auto; gap: 8px; }
  .lift-r { min-width: 0; }
  .lifts .spark { width: 44px; }
  .road-mini { grid-auto-flow: row; grid-template-columns: minmax(0, 1fr); }
}

.fc-foot { flex-wrap: wrap; }
.fc-shop { max-width: 100%; }

.sheet { overscroll-behavior-y: contain; }
@media (min-width: 720px) { html { scrollbar-gutter: stable; } }

.shape-compose textarea { border-radius: 18px; }
.prog-seg button, .food-tabs button { min-width: 0; min-height: 44px; padding-inline: 6px; }
.prog-seg button span, .food-tabs button > span { min-width: 0; overflow-wrap: anywhere; hyphens: auto; }

.today { overflow-anchor: none; }
/* Room kept so switching Workout / Food doesn't make the page jump; with no switch (Food off) it would
   only push the cards below a rest day or a finished workout a screen away. */
.today:has(.food-tabs) .today-panel { min-height: calc(100svh - 180px); }
.today-panel.is-active { animation: none; }
/* The smallest phones (320 × 568): the meal's name and Ate it, without the photo and tags. */
@media (max-height: 600px) {
  .food-card .food-spotlight .spotlight-picture, .food-card .spotlight-tags { display: none; }
}

/* ───────────── Ways in: bring your own routine, save the plan ───────────── */
.ob-foot .btn.ghost { min-height: 52px; }
.routine-text { min-height: 168px; line-height: 1.45; font-size: 0.98rem; }
.routine-text::placeholder { color: color-mix(in srgb, var(--muted) 80%, transparent); }
.routine-attach { display: flex; gap: 8px; flex-wrap: wrap; }
.routine-attach .btn { flex: 1 1 140px; cursor: pointer; }
.routine-attach .btn:focus-within { outline: 2px solid var(--lime-2); outline-offset: 2px; }
.routine-attach .ic { width: 18px; height: 18px; }
.routine-files { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.routine-files li { display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 14px; border-radius: var(--r-sm); background: var(--surface); border: 1px solid var(--line); font-weight: 600; font-size: 0.92rem; }
.routine-files li span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.routine-files .ic { width: 18px; height: 18px; color: var(--lime-ink); flex: none; }
.routine-files .icon-btn { width: 36px; height: 36px; flex: none; }
.reading .build-list li { animation-duration: 0.5s; }
.ob-hint.center { text-align: center; }
.routine-days { display: flex; flex-direction: column; gap: 12px; }
.routine-day { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px 6px; box-shadow: inset 0 1px 0 var(--sheen), var(--shadow); }
.routine-day h2 { margin: 0 0 6px; font-family: var(--display); font-size: 1.05rem; letter-spacing: -0.01em; }
.routine-day ol { list-style: none; margin: 0; padding: 0; }
.routine-day li { display: grid; grid-template-columns: 1fr auto; column-gap: 12px; align-items: baseline; padding: 9px 0; border-top: 1px solid var(--hair); }
.routine-day li:first-child { border-top: 0; }
.rd-name { font-weight: 600; }
.rd-dose { color: var(--muted); font-size: 0.88rem; white-space: nowrap; }
.rd-said { grid-column: 1 / -1; color: var(--muted); font-size: 0.8rem; }
.routine-left { border-radius: var(--r-sm); background: var(--surface-2); padding: 12px 14px; }
.routine-left summary { font-weight: 700; cursor: pointer; }
.routine-left ul { margin: 10px 0 6px; padding-left: 18px; }
.ob-account { display: flex; flex-direction: column; gap: 14px; }
.ob-account > p { margin: 0; color: var(--muted); }
.ob-account .btn { width: 100%; min-height: 56px; }
.account-links { justify-content: space-between; }
.btn[aria-busy="true"] { opacity: 0.7; }
.start-choice { margin-top: 4px; }
.opt.choice { display: grid; grid-template-columns: 40px 1fr 20px; align-items: center; gap: 14px; padding: 16px; }
.opt.choice .choice-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--lime-soft); color: var(--lime-ink); }
.opt.choice[data-path="own"] .choice-ic { background: var(--lime); color: #0e120e; }
.opt.choice .choice-t { display: flex; flex-direction: column; gap: 2px; }
.opt.choice > .ic { color: var(--muted); width: 20px; height: 20px; }
.routine-attach .btn { white-space: nowrap; padding: 0 14px; }
@media (max-width: 360px) { .routine-attach .btn { font-size: 0.88rem; padding: 0 10px; gap: 6px; } }
@media (max-height: 720px) { .routine-text { min-height: 112px; } }
/* The welcome with the two ways in: the choices are in the page, so its foot (sign in, legal) just follows them. */
.ob:has(.start-choice) .ob-foot { position: static; padding-top: 12px; background: none; }

/* Coach tab: one conversation, one plan card (with its settings), one card of what the coach knows. */
.chat .tc-composer { margin-top: 12px; }
/* Brought into view after a send (coach.js): clear of the floating tab bar, or just above the
   keyboard while it is up (the bar steps aside then). */
.chat .tc-composer { scroll-margin-bottom: calc(132px + var(--safe-b)); }
.native.kb-open .chat .tc-composer { scroll-margin-bottom: 12px; }
.chat .tc-composer textarea { min-height: 46px; }
.chat-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; margin-top: 2px; }
.chat-foot .chat-ideas { flex: 1 1 100%; }
.chat-foot .chat-ideas[open] { flex-basis: 100%; }
.chat-foot .ai-status { margin: 0; font-size: 0.75rem; }
.chat-foot .ai-status.on .ic { color: var(--lime-ink); }
.road-actions { display: flex; gap: 8px; flex-wrap: wrap; }
/* Side by side only while each label fits on one line; at the largest text they stack, full width,
   instead of breaking into "Open your / plan". */
.road-actions .btn { flex: 1 1 auto; min-width: min(100%, max-content); padding-inline: 10px; white-space: nowrap; }
.card.knows .sheet-label { margin: 6px 0 -2px; }
.card.knows .learned-list { margin: 0; }
.know-hint { margin: 0; }
/* The coach asked back (a note keeps it out): their answer, one tap. */
.chat-ask { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; white-space: normal; }

/* Setup as a conversation: their last answer on the right, like their side of a chat (the same
   bubble as the Coach tab), then the coach's next line on the left. */
.you-said { display: flex; justify-content: flex-end; margin-bottom: -4px; }
.you-said p { max-width: 82%; padding: 10px 14px; border-radius: 18px 18px 6px 18px; background: var(--ink); color: var(--on-ink); font-size: 0.92rem; font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; }
.you-said.new p { animation: chip-in 0.4s var(--ease) both; transform-origin: right bottom; }
@media (prefers-reduced-motion: reduce) { .you-said.new p { animation: none; } }
/* Each answer in "Your plan" is a way back to its question. */
.plan-strip li:has(> button) { padding: 0; }
.plan-strip li > button { display: inline-flex; align-items: center; gap: 5px; height: 100%; padding: 0 8px 0 10px; border: 0; background: none; color: inherit; font: inherit; border-radius: inherit; cursor: pointer; }
.plan-strip li > button .ic:last-child { width: 12px; height: 12px; color: var(--muted); }
/* The goal in their own words, under the examples. */
.goal-own-label { margin: 6px 0 -8px; }
.ob-goal .shape-form.tc-composer { margin-top: 0; }
/* Adding a note to "What I know about you" yourself. */
.card.knows .know-add { align-self: flex-start; margin-top: 4px; }

/* ───────────── Workout Share Photo Frame & Sheet ───────────── */
.share-card-wrap,
.share-sheet-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 4px 0 8px;
}
.share-preview-box {
  position: relative;
  width: 100%;
  max-width: 320px;
  aspect-ratio: 4 / 5;
  border-radius: var(--r);
  overflow: hidden;
  background: #0e120e;
  box-shadow: 0 8px 32px -8px rgba(14, 18, 14, 0.45);
  user-select: none;
  touch-action: none;
}
.share-canvas {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: var(--r);
  object-fit: contain;
  cursor: pointer;
}
.share-canvas.is-draggable {
  cursor: grab;
}
.share-canvas.is-draggable:active {
  cursor: grabbing;
}
.share-preview-hint {
  position: absolute;
  top: 68%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(14, 18, 14, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #f4f6f1;
  border: 1px solid rgba(255, 255, 255, 0.16);
  padding: 8px 16px;
  border-radius: 999px;
  white-space: nowrap;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  transition: transform 0.15s ease, background 0.15s ease;
}
.share-preview-hint:hover {
  background: rgba(14, 18, 14, 0.92);
  transform: translate(-50%, -50%) scale(1.03);
}
.share-preview-hint .ic {
  width: 18px;
  height: 18px;
  color: var(--lime);
}
.share-drag-hint {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(14, 18, 14, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--lime);
  border: 1px solid rgba(200, 245, 66, 0.35);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  pointer-events: none;
  z-index: 2;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}
.share-actions-primary {
  width: 100%;
  max-width: 320px;
}
.share-btn {
  width: 100%;
}
.share-photo-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  width: 100%;
  max-width: 320px;
}
.share-photo-actions .btn {
  cursor: pointer;
  flex: 1 1 auto;
  white-space: nowrap;
}
.share-remove-photo-btn {
  color: var(--muted);
}
.share-remove-photo-btn:hover {
  color: var(--danger);
}
.history-sheet-actions {
  margin-top: 18px;
  display: flex;
  justify-content: center;
}
.history-sheet-actions .btn {
  width: 100%;
}
/* Where on each day, for people who train in more than one place. */
.day-places { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.dpl { display: flex; align-items: center; gap: 10px; }
.dpl-day { width: 44px; flex: none; font-weight: 700; font-size: 0.9rem; }
.dpl-opts { display: flex; flex-wrap: wrap; gap: 6px; }
.dpl-opts .chip { min-height: 36px; padding: 6px 12px; }
.opt-title .pill { margin-left: 6px; vertical-align: 2px; }

/* ───────── The iPhone app (html.native, set by src/app/ios.js) ─────────
   Behaves like an app, not a page: no text selection or long-press menus on controls (text you
   type or read in the chat stays selectable), no double-tap zoom, and the phone's text size
   (ios.js scales the root size) reaches body text too. */
.native body { font-size: 1rem; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.native input, .native textarea, .native [contenteditable="true"], .native .msg { -webkit-user-select: text; user-select: text; -webkit-touch-callout: default; }
.native img, .native video, .native canvas, .native a { -webkit-touch-callout: none; -webkit-user-drag: none; }
.native, .native body { touch-action: manipulation; }
/* The keyboard is up (typing to the coach): the tab bar steps out of its way, as in Messages. */
.native .tabbar { transition: transform 0.28s var(--ease), opacity 0.2s ease; }
/* Typing in setup: the floating bottom row would sit over the form (the keyboard takes the bottom half). */
.native.kb-open .ob-foot { position: static; padding-top: 12px; background: none; }
.native.kb-open .tabbar { transform: translateY(calc(100% + 28px)); opacity: 0; pointer-events: none; }
/* ...and so does the fade under it, which would otherwise wash out the message being typed. */
.native.kb-open #shell::after { opacity: 0; }
/* Under the clock and battery: content scrolling up passes behind a soft frosted strip, as in iOS's
   own apps, instead of colliding with the status bar. Sheets and the workout sit above it. */
.native body::before { content: ""; position: fixed; top: 0; left: 0; right: 0; height: var(--safe-t); z-index: 19; pointer-events: none; background: color-mix(in srgb, var(--bg) 78%, transparent); -webkit-backdrop-filter: saturate(1.6) blur(18px); backdrop-filter: saturate(1.6) blur(18px); }
/* The largest text sizes: tab labels and the big workout numbers keep to one line. */
.native.text-large .tab span { font-size: 0.72rem; }
@media (prefers-reduced-motion: reduce) { .native .tabbar { transition: none; } }
/* Asking before the AI (ai-consent.js): what goes where, in three short lines. */
.ai-consent { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 8px; color: var(--text); font-size: 0.9rem; }
.ai-setting { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
