@font-face { font-family: 'Arada'; src: local('Arada Light'), local('Arada-Light'), url('fonts/Arada-Light.ttf') format('truetype'); font-weight: 300; font-display: swap; }
@font-face { font-family: 'Arada'; src: local('Arada'), local('Arada-Regular'), url('fonts/Arada-Regular.ttf') format('truetype'); font-weight: 400 500; font-display: swap; }
@font-face { font-family: 'Arada'; src: local('Arada Bold'), local('Arada-Bold'), url('fonts/Arada-Bold.ttf') format('truetype'); font-weight: 600 900; font-display: swap; }

/* Black & white, matching The Reset logo */
:root {
  --bg: #f4f4f4;
  --card: #ffffff;
  --ink: #0a0a0a;
  --muted: #6b6b6b;
  --line: #e0e0e0;
  --accent: #0a0a0a;
  --accent-ink: #ffffff;
  --accent-soft: #ededed;
  --warn: #0a0a0a;
  --rest: #f0f0f0;
  --p: #0a0a0a;   /* protein = solid black */
  --c: #7a7a7a;   /* carbs = mid grey */
  --f: #b4b4b4;   /* fat = light grey */
  --c-text: #4d4d4d;  /* readable text versions of the bar greys */
  --f-text: #767676;
  --glow: rgba(0, 0, 0, .45);
  --fig-skin: #bdbdbd; --fig-cloth: #161616; --fig-cloth2: #4a4a4a; --fig-grey1: #7d7d7d; --fig-grey2: #d6d6d6;   /* illustrated figures */
  --logo-l: block;    /* black logo on light backgrounds */
  --logo-d: none;     /* white logo on dark backgrounds */
  --radius: 14px;
}
/* dark values: follow the phone/PC setting unless light is chosen explicitly; data-theme="dark" forces it */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #000000; --card: #111111; --ink: #f5f5f5; --muted: #9a9a9a; --line: #262626;
    --accent: #ffffff; --accent-ink: #000000; --accent-soft: #1e1e1e; --warn: #ffffff; --rest: #0b0b0b;
    --p: #ffffff; --c: #a3a3a3; --f: #5e5e5e; --c-text: #c4c4c4; --f-text: #9a9a9a;
    --glow: rgba(255, 255, 255, .75); --logo-l: none; --logo-d: block;
    --fig-skin: #8a8a8a; --fig-cloth: #ececec; --fig-cloth2: #b5b5b5; --fig-grey1: #9c9c9c; --fig-grey2: #5c5c5c;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #000000; --card: #111111; --ink: #f5f5f5; --muted: #9a9a9a; --line: #262626;
  --accent: #ffffff; --accent-ink: #000000; --accent-soft: #1e1e1e; --warn: #ffffff; --rest: #0b0b0b;
  --p: #ffffff; --c: #a3a3a3; --f: #5e5e5e; --c-text: #c4c4c4; --f-text: #9a9a9a;
  --glow: rgba(255, 255, 255, .75); --logo-l: none; --logo-d: block;
  --fig-skin: #8a8a8a; --fig-cloth: #ececec; --fig-cloth2: #b5b5b5; --fig-grey1: #9c9c9c; --fig-grey2: #5c5c5c;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.5 'Arada', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
input, button, select, textarea { font-family: inherit; }
main {
  max-width: 920px; margin: 0 auto; padding-block: 16px;
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
}
/* paints the phone's status-bar band so content never scrolls visibly behind it */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--card); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
button { font: inherit; cursor: pointer; }
[hidden] { display: none !important; }

.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding-block: 12px; background: var(--card); border-bottom: 1px solid var(--line);
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5;
}
.brand { display: block; line-height: 0; }
.brand img { height: 30px; width: auto; }
.brand .logo-l { display: var(--logo-l); }
.brand .logo-d { display: var(--logo-d); }
@media (max-width: 560px) { .brand img { height: 22px; } }
.topbar nav { display: flex; gap: 8px; flex-wrap: wrap; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 16px; }
.hero h1 { font-size: clamp(1.6rem, 4vw, 2.3rem); }
.hero p { color: var(--muted); }
.ticks { padding: 0; list-style: none; margin: 16px 0 22px; }
.ticks li { padding-left: 28px; position: relative; margin: 8px 0; }
.ticks li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); font-weight: 800; }
.fine { font-size: .85rem; color: var(--muted); }

/* power "switch on" button (The Reset logo mark) */
.power-wrap { display: flex; align-items: center; gap: 20px; margin: 10px 0 8px; flex-wrap: wrap; }
.power {
  position: relative; flex: none; width: 124px; height: 124px; padding: 0; border: 0; border-radius: 50%;
  background: none; color: var(--ink); transition: transform .2s ease, color .3s ease, filter .3s ease;
}
.power-icon { display: block; width: 100%; height: 100%; fill: currentColor; }
.power::after {
  content: ""; position: absolute; inset: -9px; border-radius: 50%; border: 2px solid var(--accent);
  opacity: 0; animation: powerPulse 2.6s ease-in-out infinite; pointer-events: none;
}
.power:hover { transform: scale(1.04); filter: drop-shadow(0 0 10px var(--glow)); }
.power:focus-visible { outline: none; filter: drop-shadow(0 0 10px var(--glow)); }
.power:focus-visible::after { opacity: .8; animation: none; }
.power:active { transform: scale(.95); }
.power.on { filter: drop-shadow(0 0 22px var(--glow)); }
.power.on .power-icon { animation: powerSpin .8s cubic-bezier(.5, 0, .2, 1); }
.power.on::after { animation: none; opacity: 0; }
.power-label b { display: block; font-size: 1.3rem; }
.power-label span { color: var(--muted); font-size: .95rem; }
@keyframes powerPulse { 0%, 100% { opacity: 0; transform: scale(.94); } 50% { opacity: .45; transform: scale(1); } }
@keyframes powerSpin { from { transform: rotate(0); } to { transform: rotate(-360deg); } } /* follows the logo's reset arrow */
.primary .ico { width: 1.25em; height: 1.25em; fill: currentColor; vertical-align: -.27em; margin-right: 6px; }
@media (prefers-reduced-motion: reduce) {
  .power::after, .power.on .power-icon { animation: none; }
}

.primary, .ghost, .small {
  border-radius: 10px; border: 1px solid transparent; padding: 10px 18px; font-weight: 600;
}
.primary { background: var(--accent); color: var(--accent-ink); }
.primary:hover { filter: brightness(1.05); }
.primary.big { font-size: 1.1rem; padding: 14px 26px; }
.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.ghost:hover { border-color: var(--accent); }
.small { padding: 5px 10px; font-size: .85rem; background: transparent; border-color: var(--line); color: var(--muted); }
.small:hover { color: var(--accent); border-color: var(--accent); }

/* wizard */
.progress { height: 6px; background: var(--line); border-radius: 6px; overflow: hidden; }
#progressBar { height: 100%; background: var(--accent); width: 25%; transition: width .25s; }
.stepcount { color: var(--muted); font-size: .85rem; margin: 8px 0 0; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { font-size: 1.4rem; font-weight: 700; margin: 10px 0 14px; padding: 0; }
.field { display: block; margin: 0 0 18px; font-weight: 600; }
.opt { font-weight: 400; color: var(--muted); font-size: .85rem; }
.field input[type=text], .field input[type=number], .field input[type=date] {
  display: block; width: 100%; margin-top: 6px; padding: 11px 12px; font: inherit;
  border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--ink);
}
.field input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.row { display: flex; gap: 12px; }
.row .field { flex: 1; }
.chips, .cards { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; font-weight: 400; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.chips label, .cards label { position: relative; }
.chips input, .cards input { position: absolute; opacity: 0; pointer-events: none; }
.chips span, .cards span {
  display: block; border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px;
  background: var(--bg); cursor: pointer; user-select: none;
}
.cards span { border-radius: 12px; padding: 12px 14px; height: 100%; }
.cards small { display: block; color: var(--muted); }
.chips input:checked + span, .cards input:checked + span {
  border-color: var(--ink); background: var(--ink); color: var(--card);
}
.cards input:checked + span small { color: var(--card); opacity: .75; }
.chips span:hover, .cards span:hover { border-color: var(--ink); }
.chips input:focus-visible + span, .cards input:focus-visible + span { outline: 2px solid var(--accent); }
.wizard-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 10px; }
.error { color: var(--warn); font-weight: 700; border-left: 3px solid var(--warn); padding-left: 10px; }
.error::before { content: "⚠ "; }

/* results */
.res-head h1 { font-size: clamp(1.4rem, 3.5vw, 2rem); }
.res-head p { color: var(--muted); margin: 0; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin: 16px 0; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.stat .k { font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.stat .v { font-size: 1.35rem; font-weight: 800; }
.stat .s { font-size: .8rem; color: var(--muted); }

.tabs { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.tabs button {
  background: none; border: 0; border-bottom: 3px solid transparent; padding: 10px 14px;
  color: var(--muted); font-weight: 600; white-space: nowrap;
}
.tabs button[aria-selected=true] { color: var(--ink); border-bottom-color: var(--accent); }
.panel { display: none; }
.panel.active { display: block; }

.callout { background: var(--accent-soft); border-left: 3px solid var(--ink); border-radius: 12px; padding: 14px 16px; margin-bottom: 14px; }
.callout p { margin: 4px 0; }

details.day { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 12px; }
details.day > summary {
  list-style: none; cursor: pointer; padding: 14px 18px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
details.day > summary::-webkit-details-marker { display: none; }
details.day > summary::after { content: "▾"; margin-left: auto; color: var(--muted); transition: transform .2s; }
details.day[open] > summary::after { transform: rotate(180deg); }
.daynum { font-weight: 800; background: var(--accent); color: var(--accent-ink); border-radius: 8px; padding: 2px 9px; font-size: .85rem; }
details.rest .daynum { background: var(--muted); color: var(--card); }
details.rest { background: var(--rest); }
.daytitle { font-weight: 700; }
.daymeta { color: var(--muted); font-size: .9rem; }
.daybody { padding: 0 18px 18px; }
.daybody h4 { margin: 16px 0 6px; font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.daybody ul { margin: 0; padding-left: 20px; }
.daybody li { margin: 3px 0; }

.ex-list { list-style: none; padding: 0 !important; margin: 0; }
/* exercise row: [tick] [picture] [name / sets x reps / tip] */
.ex { display: grid; grid-template-columns: 28px 104px minmax(0, 1fr) auto; gap: 4px 12px; padding: 12px 0; border-top: 1px solid var(--line); align-items: start; }
.ex:first-child { border-top: 0; }
.ex input[type=checkbox] { grid-column: 1; grid-row: 1; width: 20px; height: 20px; margin-top: 2px; accent-color: var(--accent); }
.ex-pic { grid-column: 2; grid-row: 1 / span 3; position: relative; width: 104px; aspect-ratio: 4 / 3; padding: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--accent-soft); color: var(--muted); cursor: zoom-in; }
.ex-pic .ph { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ex-pic-fb { position: absolute; inset: 0; display: grid; place-items: center; }
.ex-pic:hover, .ex-pic:focus-visible { border-color: var(--ink); outline: none; }
.ex-pic::after { content: "⤢"; position: absolute; right: 4px; bottom: 3px; width: 20px; height: 20px; border-radius: 6px; background: rgba(0, 0, 0, .55); color: #fff; font-size: 13px; line-height: 20px; text-align: center; }
.ex-name { grid-column: 3; grid-row: 1; font-weight: 700; }
.ex-name .tag { font-size: .7rem; font-weight: 700; color: var(--accent); border: 1px solid var(--accent); border-radius: 6px; padding: 0 5px; margin-left: 6px; vertical-align: 2px; }
.ex-tip { grid-column: 3 / 5; grid-row: 2; color: var(--muted); font-size: .88rem; }
.ex-rx { grid-column: 4; grid-row: 1; text-align: right; white-space: nowrap; font-weight: 700; }
.ex.done .ex-pic { opacity: .5; }

/* week status + today marker */
.week-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; margin-bottom: 14px; }
.week-card p { margin: 0; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.week-card .ico { width: 22px; height: 22px; }
.week-card.done { border-color: var(--ink); }
.week-card.done h3 { display: flex; gap: 8px; align-items: center; margin: 0 0 6px; font-size: 1.1rem; }
.week-card.done p { display: block; color: var(--muted); }
.sub-card { padding: 18px; }
.sub-list { list-style: none; padding: 0; margin: 12px 0 14px; display: grid; gap: 8px; }
.sub-list li { display: flex; gap: 8px; align-items: center; font-weight: 600; }
.sub-list .ico, .sub-thanks .ico { width: 20px; height: 20px; stroke-width: 2.4; }
.sub-card .primary.wide { display: block; width: 100%; }
.week-card .sub-thanks { display: flex; color: var(--ink); font-weight: 600; margin-top: 4px; }
.today-tag { font-size: .7rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; background: var(--ink); color: var(--card); border-radius: 6px; padding: 2px 7px; }

/* workout tab: day buttons + one day card */
.wpills button { position: relative; min-width: 64px; }
.wpills button.is-done { border-color: var(--ink); }
.pill-check { position: absolute; top: -7px; right: -7px; width: 20px; height: 20px; border-radius: 50%; background: var(--ink); color: var(--card); display: grid; place-items: center; }
.pill-check .ico { width: 13px; height: 13px; stroke-width: 3; }
.wday { display: none; }
.wday.active { display: block; }
.dcard { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px 6px; margin-bottom: 14px; }
.dcard.rest { background: var(--rest); }
.dcard.is-done { border-color: var(--ink); }
.dcard-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.dcard-head h3 { flex-basis: 100%; margin: 6px 0 0; font-size: 1.3rem; }
.dcard-head .daymeta { flex-basis: 100%; margin: 0; }
.dcard .daybody { padding: 0; }
.dcard-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 6px; }
.start-btn { flex: 1 1 100%; font-size: 1.1rem; padding: 15px 18px; border-radius: 14px; display: flex; align-items: center; justify-content: center; gap: 4px; }
.dcard-actions .ghost { flex: 1 1 auto; }
.done-banner { display: flex; gap: 8px; align-items: center; margin: 14px 0 0; padding: 10px 12px; border-radius: 12px; background: var(--ink); color: var(--card); font-weight: 700; }
.done-banner .ico { width: 20px; height: 20px; stroke-width: 2.6; }
.callout.more summary { cursor: pointer; }
.callout.more p { margin-top: 8px; }

.numbers-h { font-size: 1.1rem; margin: 26px 0 0; }
.res-head p { margin-bottom: 12px; }

/* week progress */
.wk-progress { display: flex; align-items: center; gap: 10px; margin-top: 10px; flex-wrap: wrap; font-size: .9rem; }
.wk-dots { display: flex; gap: 5px; }
.wk-dot { width: 22px; height: 8px; border-radius: 4px; background: var(--line); }
.wk-dot.rest { width: 12px; }
.wk-dot.on { background: var(--ink); }
.wk-dot.today { outline: 2px solid var(--ink); outline-offset: 1px; }

/* guided workout mode (full screen) */
body.wm-open { overflow: hidden; }
.wmode { position: fixed; inset: 0; z-index: 60; background: var(--bg); color: var(--ink); display: flex; flex-direction: column;
  padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); animation: popIn .2s ease; }
.wm-top { display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 10px; padding: 10px max(16px, env(safe-area-inset-right, 0px)) 10px max(16px, env(safe-area-inset-left, 0px)); }
.wm-x { width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--accent-soft); color: var(--ink); display: grid; place-items: center; }
.wm-x .ico { width: 20px; height: 20px; }
.wm-bar { height: 6px; border-radius: 6px; background: var(--line); overflow: hidden; }
.wm-bar i { display: block; height: 100%; background: var(--ink); transition: width .3s ease; }
.wm-label { font-size: .82rem; color: var(--muted); font-weight: 600; white-space: nowrap; }
.wm-body { flex: 1; overflow: auto; display: flex; flex-direction: column; max-width: 560px; width: 100%; margin: 0 auto;
  padding: 4px max(16px, env(safe-area-inset-right, 0px)) 16px max(16px, env(safe-area-inset-left, 0px)); }
.wm-step { flex: 1; }
.wm-step h2 { font-size: clamp(1.5rem, 6vw, 2rem); margin: 12px 0 6px; text-wrap: balance; }
.wm-pic { position: relative; border-radius: 18px; overflow: hidden; aspect-ratio: 4 / 3; background: var(--accent-soft); color: var(--muted); max-height: 42svh; width: 100%; }
.wm-pic .ph { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #111; }
.wm-pic .ex-pic-fb { position: absolute; inset: 0; display: grid; place-items: center; }
.wm-pic .ex-pic-fb .ico { width: 64px; height: 64px; }
.wm-sets { display: flex; gap: 6px; margin: 4px 0 8px; }
.wm-sets i { flex: 1; max-width: 48px; height: 8px; border-radius: 4px; background: var(--line); }
.wm-sets i.on { background: var(--ink); }
.wm-sets i.now { background: var(--ink); opacity: .45; }
.wm-big { font-size: 1.35rem; margin: 0 0 4px; }
.wm-sub { color: var(--muted); margin: 0 0 8px; }
.wm-tip { color: var(--muted); font-size: .95rem; margin: 0; }
.wm-list { padding-left: 20px; margin: 10px 0; display: grid; gap: 8px; font-size: 1.05rem; }
.wm-foot { display: grid; gap: 8px; padding-top: 14px; }
.wm-skip { justify-self: center; border: 0 !important; }
.wm-rest { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 6px; }
.wm-kicker { font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 0; }
.wm-clock { font-size: clamp(4rem, 22vw, 6.5rem); font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1; }
.wm-next { color: var(--muted); margin: 6px 0 14px; }
.wm-row { display: flex; gap: 10px; }
.wm-row button { min-width: 120px; }
.wm-finish { text-align: center; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.wm-trophy { width: 120px; height: 120px; border-radius: 50%; background: var(--ink); color: var(--card); display: grid; place-items: center; margin-bottom: 6px; animation: pop .5s cubic-bezier(.3, 1.6, .5, 1); }
.wm-foot .primary .ico { width: 20px; height: 20px; vertical-align: -4px; stroke-width: 2.6; }
@keyframes pop { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }

/* weight entry, swap, personal bests (guided mode) */
.wm-weight { display: flex; align-items: center; gap: 10px; margin: 10px 0 4px; }
.wm-weight > button { width: 48px; height: 48px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font-size: 1.5rem; font-weight: 700; }
.wm-weight label { flex: 1; display: flex; align-items: baseline; justify-content: center; gap: 6px; border-bottom: 2px solid var(--line); }
.wm-weight input { width: 5ch; border: 0; background: none; color: var(--ink); font: inherit; font-size: 2rem; font-weight: 800; text-align: center; -moz-appearance: textfield; }
.wm-weight input::-webkit-outer-spin-button, .wm-weight input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.wm-weight input:focus { outline: none; }
.wm-weight label:focus-within { border-bottom-color: var(--ink); }
.wm-weight span { color: var(--muted); font-weight: 600; }
.wm-last { font-size: .88rem; color: var(--muted); margin: 0 0 8px; text-align: center; }
.wm-minor { display: flex; justify-content: center; gap: 8px; }
.wm-minor .small { border: 0; display: inline-flex; align-items: center; gap: 4px; }
.wm-minor .ico { width: 16px; height: 16px; }
.wm-pbs { display: grid; gap: 4px; background: var(--accent-soft); border-radius: 14px; padding: 12px 16px; margin: 6px 0 10px; }
.wm-pbs b { display: flex; justify-content: center; gap: 6px; align-items: center; }
.wm-pbs .ico { width: 20px; height: 20px; }
.ghost.wide { width: 100%; padding: 13px 18px; border-radius: 14px; }
.ex-last { display: block; color: var(--ink); font-weight: 600; font-size: .82rem; margin-top: 4px; }
.ex-swap { display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--muted); font-size: .78rem; font-weight: 600; }
.ex-swap:hover { color: var(--ink); border-color: var(--ink); }
.ex-swap .ico { width: 14px; height: 14px; }
.streak { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); }
.streak .ico { width: 18px; height: 18px; }
.streak.on { color: var(--ink); }

/* meals eaten + water */
.eat-tick { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 8px; font-weight: 600; font-size: .9rem; cursor: pointer; }
.eat-tick input { width: 18px; height: 18px; accent-color: var(--ink); }
.meal.eaten { border-color: var(--ink); }
.meal.eaten h4 { text-decoration: line-through; text-decoration-thickness: 1px; color: var(--muted); }
.eaten-line { margin: -4px 0 10px; font-size: .9rem; color: var(--muted); }
.eaten-line b { color: var(--ink); }
.water { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; margin-bottom: 12px; }
.water-head { display: flex; justify-content: space-between; font-size: .9rem; margin-bottom: 6px; }
.water-head span { color: var(--muted); }
.glasses { display: flex; flex-wrap: wrap; gap: 4px; }
.glass { width: 30px; height: 34px; border: 1px solid var(--line); border-radius: 8px; background: transparent; color: var(--muted); padding: 0; display: grid; place-items: center; }
.glass .ico { width: 18px; height: 18px; }
.glass.full { background: var(--ink); color: var(--card); border-color: var(--ink); }
.glass.full .ico path { fill: currentColor; }

/* progress tab */
.prog-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 14px; }
.prog-card h3 { display: flex; align-items: center; gap: 6px; margin: 0 0 10px; font-size: 1.1rem; }
.prog-card h3 .ico { width: 22px; height: 22px; }
.prog-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.prog-stats div { background: var(--accent-soft); border-radius: 12px; padding: 10px; text-align: center; }
.prog-stats b { display: block; font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.prog-stats span { font-size: .78rem; color: var(--muted); }
.prog-chart { margin-top: 12px; }
.c-goal { stroke: var(--muted); stroke-width: 2; stroke-dasharray: 6 6; }
.weigh { margin-top: 12px; }
.weigh label { font-weight: 600; font-size: .9rem; }
.weigh-row { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.weigh-row input { width: 110px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--ink); font: inherit; font-size: 1.1rem; }
.weigh-row input:focus { outline: 2px solid var(--ink); }
.weigh-row span { color: var(--muted); }
.weigh-row .primary { margin-left: auto; }
.lifts { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.lifts li { display: flex; gap: 8px; align-items: baseline; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.lifts li span { flex: 1; min-width: 0; }
.lifts em { font-style: normal; font-weight: 800; background: var(--ink); color: var(--card); border-radius: 6px; padding: 1px 6px; font-size: .8rem; }

/* "Day completed" note */
.toast { position: fixed; left: 50%; bottom: max(20px, env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 70; display: flex; gap: 10px; align-items: center;
  background: var(--ink); color: var(--card); padding: 12px 16px; border-radius: 14px; font-weight: 600; box-shadow: 0 8px 30px rgba(0, 0, 0, .25); width: max-content; max-width: calc(100% - 32px); animation: popIn .2s ease; transition: opacity .5s; }
.toast .ico { width: 22px; height: 22px; flex: none; }
.toast.out { opacity: 0; }
@media (prefers-reduced-motion: reduce) { .wmode, .wm-trophy, .toast { animation: none; } }

/* pop-out picture */
.pop { position: fixed; inset: 0; z-index: 50; background: rgba(0, 0, 0, .72); display: grid; place-items: center; animation: popIn .18s ease;
  padding: max(16px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) max(16px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); }
.pop-card { position: relative; width: min(560px, 100%); max-height: 100%; overflow: auto; background: var(--card); color: var(--ink); border-radius: 18px; }
.pop-img { display: block; width: 100%; max-height: 62vh; object-fit: contain; background: #111; }
.pop-noimg { height: 200px; display: grid; place-items: center; color: var(--muted); background: var(--accent-soft); }
.pop-body { padding: 14px 18px 18px; }
.pop-body h3 { margin: 0 0 4px; font-size: 1.2rem; }
.pop-rx { margin: 0 0 8px; }
.pop-tip { margin: 0; color: var(--muted); }
.pop-close { position: absolute; top: 10px; right: 10px; width: 38px; height: 38px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .6); color: #fff; display: grid; place-items: center; z-index: 1; }
.pop-close .ico { width: 20px; height: 20px; }
@keyframes popIn { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .pop { animation: none; } }
.ex-rx small { display: block; font-weight: 400; color: var(--muted); }
.ex.done .ex-name { text-decoration: line-through; color: var(--muted); }

.daypills { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 12px; }
.daypills button {
  border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 10px;
  padding: 6px 12px; font-weight: 600; white-space: nowrap;
}
.daypills button small { display: block; font-weight: 400; color: var(--muted); font-size: .72rem; }
.daypills button[aria-pressed=true] { border-color: var(--ink); background: var(--ink); color: var(--card); }
.daypills button[aria-pressed=true] small { color: var(--card); opacity: .75; }
.nday { display: none; }
.nday.active { display: block; }
.nday h3 { margin-top: 4px; }

.totals { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 8px 0 14px; }
.tot { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; font-size: .85rem; }
.tot b { display: block; font-size: 1.05rem; }
.bar { height: 5px; border-radius: 4px; background: var(--line); margin-top: 5px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--accent); }
.tot.p .bar i { background: var(--p); }
.tot.c .bar i { background: var(--c); }
.tot.f .bar i { background: var(--f); }

.meal { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 10px; }
.meal-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.meal-slot { font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; }
.meal h4 { margin: 2px 0 8px; font-size: 1.05rem; }
.meal ul { margin: 0 0 8px; padding-left: 20px; }
.meal li { margin: 2px 0; }
.meal .amt { font-weight: 700; }
.meal .hh { color: var(--muted); font-size: .88rem; }
.meal .how { color: var(--muted); font-size: .88rem; margin: 0 0 8px; }
.macros { display: flex; gap: 12px; flex-wrap: wrap; font-size: .85rem; font-weight: 600; }
.macros .p { color: var(--p); } .macros .c { color: var(--c-text); } .macros .f { color: var(--f-text); }

.groc { columns: 2 260px; column-gap: 16px; }
.groc section { break-inside: avoid; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; margin-bottom: 14px; }
.groc h3 { font-size: 1rem; }
.groc label { display: flex; gap: 8px; align-items: baseline; padding: 4px 0; }
.groc label span:last-child { margin-left: auto; color: var(--muted); white-space: nowrap; font-size: .9rem; }
.groc input { accent-color: var(--accent); }

.guide h3 { margin-top: 18px; }
.guide p, .guide li { color: var(--ink); }
.muted { color: var(--muted); }

.foot {
  max-width: 920px; margin: 12px auto 14px; font-size: .78rem; color: var(--muted); text-align: center;
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.confirming { border-color: var(--ink) !important; background: var(--ink) !important; color: var(--card) !important; }

/* ---------- landing: photo fading into the page, centred headline and power button ---------- */
/* sizes scale with the screen height (svh) so the whole landing fits on one phone screen */
.landing { max-width: 560px; margin: 0 auto; text-align: center; display: flex; flex-direction: column; align-items: center; }
main:has(> .landing:not([hidden])) { padding-block: 10px 0; }
.landing-photo { position: relative; width: 100%; border-radius: 20px; overflow: hidden; margin-bottom: -44px; }
.landing-photo:has(img)::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, var(--bg) 100%); pointer-events: none; }
.hero-photo { display: block; width: 100%; height: clamp(135px, 27svh, 300px); object-fit: cover; object-position: 50% 15%; }
.landing-photo:not(:has(img)) { margin-bottom: 8px; }
.landing-title { position: relative; font-size: clamp(1.9rem, min(9.5vw, 5.4svh), 3rem); font-weight: 800; line-height: 1.02; letter-spacing: -.02em; margin: 0 0 8px; text-wrap: balance; }
.hero-sub { color: var(--muted); font-size: 1rem; line-height: 1.35; margin: 0 0 clamp(10px, 2svh, 20px); max-width: 32ch; }
.landing .power-wrap { flex-direction: column; justify-content: center; gap: clamp(6px, 1.4svh, 14px); margin: 0 0 clamp(8px, 1.8svh, 18px); }
.landing .power { width: clamp(100px, 16svh, 150px); height: clamp(100px, 16svh, 150px); }
.landing .power::after { inset: -14px; border-width: 2px; }
.landing .power::before { content: ""; position: absolute; inset: -30px; border-radius: 50%; background: radial-gradient(circle, var(--glow) 0%, transparent 65%); opacity: .35; animation: powerGlow 2.6s ease-in-out infinite; pointer-events: none; z-index: -1; }
@keyframes powerGlow { 0%, 100% { opacity: .18; transform: scale(.92); } 50% { opacity: .45; transform: scale(1.04); } }
.landing .power-label b { font-size: 1.2rem; letter-spacing: .02em; }
.landing .power-label span { display: block; }
.landing-chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.landing-chips li { border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 4px 9px; font-size: .74rem; font-weight: 600; white-space: nowrap; }
.landing-chips li::before { content: "✓"; margin-right: 6px; font-weight: 800; }
.landing .fine { margin: 0; }
@media (prefers-reduced-motion: reduce) { .landing .power::before { animation: none; } }

/* ---------- quiz: one question per screen ---------- */
.quiz { max-width: 560px; margin: 0 auto; padding-bottom: 110px; }
body.in-quiz .foot { display: none; }
.qhead { display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 10px; margin: 4px 0 18px; }
.qback { width: 40px; height: 40px; border: 0; background: none; color: var(--ink); border-radius: 50%; display: grid; place-items: center; padding: 0; }
.qback:hover, .qback:focus-visible { background: var(--accent-soft); outline: none; }
.qbar { height: 6px; border-radius: 6px; background: var(--line); overflow: hidden; }
.qbar i { display: block; height: 100%; background: var(--ink); border-radius: 6px; transition: width .3s ease; }
.qcount { font-size: .85rem; color: var(--muted); font-variant-numeric: tabular-nums; min-width: 38px; text-align: right; }
.qscreen { animation: qIn .28s ease both; }
@keyframes qIn { from { opacity: .001; transform: translateX(14px); } to { opacity: 1; transform: none; } }
.qtitle { font-size: clamp(1.5rem, 5.5vw, 2rem); font-weight: 700; line-height: 1.18; margin: 0 0 8px; text-wrap: balance; }
.qsub { color: var(--muted); margin: 0 0 16px; }
.qtext { font-size: 1.05rem; margin: 16px 0 0; }
.qlead { font-weight: 700; font-size: 1.1rem; margin: 8px 0 0; }
.center { text-align: center; }
.qscreen > .olist, .qscreen > .pgrid { margin-top: 18px; }

/* icons */
.ico { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ico .f { fill: currentColor; stroke: none; }
.ico .e { fill: currentColor; stroke: none; opacity: .18; }
.ico.sm { width: 20px; height: 20px; }
.ico.xl { width: 72px; height: 72px; stroke-width: 1.3; }
.ico-row { display: inline-flex; gap: 1px; }
.ico.pw { width: 1.3em; height: 1.3em; fill: currentColor; stroke: none; vertical-align: -.28em; margin-right: 6px; }

/* option cards */
.olist { display: flex; flex-direction: column; gap: 12px; }
.opt {
  position: relative; display: flex; align-items: center; gap: 14px; width: 100%; min-height: 64px; padding: 14px 18px;
  text-align: left; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  font-size: 1.05rem; transition: border-color .15s, background .15s, transform .1s;
}
.opt:hover { border-color: var(--ink); }
.opt:active { transform: scale(.99); }
.opt:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.otext { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.olabel { font-weight: 600; }
.osub { color: var(--muted); font-size: .9rem; }
.oico { color: var(--ink); display: flex; }
.opt.sel { background: var(--ink); color: var(--card); border-color: var(--ink); }
.opt.sel .osub, .opt.sel .oico { color: var(--card); }
.opt.sel .osub { opacity: .75; }
.badge { font-style: normal; font-size: .72rem; font-weight: 700; letter-spacing: .03em; background: var(--ink); color: var(--card); border-radius: 6px; padding: 2px 7px; margin-left: 6px; vertical-align: 2px; white-space: nowrap; }
.opt.sel .badge { background: var(--card); color: var(--ink); }
.otick { position: absolute; top: -1px; right: -1px; width: 26px; height: 26px; border-radius: 0 16px 0 10px; background: var(--card); color: var(--ink); display: none; place-items: center; }
.otick .ico { width: 16px; height: 16px; stroke-width: 2.4; }
.opt.sel .otick { display: grid; }
.opt.has-thumb { padding-left: 0; overflow: hidden; }
.othumb { width: 76px; align-self: stretch; margin: -14px 0; position: relative; flex: none; display: grid; place-items: center; background: var(--accent-soft); border-radius: 15px 0 0 15px; overflow: hidden; }
.othumb .ph { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.othumb-fb { display: grid; place-items: center; color: var(--ink); }
.opt.sel .othumb { background: var(--card); }
/* body map figures (focus areas) */
.bodymap { width: 46px; height: 64px; }
.bodymap .bm-off { fill: var(--muted); opacity: .28; }
.bodymap .bm-on { fill: var(--ink); }
.bodymap .bm-line { stroke: var(--card); stroke-width: 1.2; fill: none; opacity: .8; }

/* picture cards */
.pgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.pgrid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pcard { padding: 0; border: 2px solid var(--line); background: var(--card); border-radius: 18px; overflow: hidden; color: var(--ink); display: flex; flex-direction: column; text-align: center; transition: border-color .15s, transform .1s; }
.pcard:hover, .pcard:focus-visible { border-color: var(--ink); outline: none; }
.pcard:active { transform: scale(.98); }
.pimg { position: relative; display: block; aspect-ratio: 2 / 3; background: var(--accent-soft); overflow: hidden; }   /* matches the 2:3 portrait photos */
.pimg .ph { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ph + .fb { display: none !important; }   /* a photo hides the placeholder; if it fails to load, the img is removed */
.pfb { position: absolute; inset: 0; display: grid; place-items: center; }
.sil { width: 46%; height: auto; fill: var(--muted); opacity: .55; }
/* illustrated placeholder figures */
.fig { width: 74%; height: 92%; margin-top: 6%; }
.fig-skin, .fig-cloth2s { fill: none; stroke-linecap: round; }
.fig-skin { stroke: var(--fig-skin); }
.fig-skinf { fill: var(--fig-skin); }
.fig-cloth { fill: var(--fig-cloth); }
.fig-cloth2 { fill: var(--fig-cloth2); }
.fig-cloth2s { stroke: var(--fig-cloth2); }
.fig-shoe { fill: var(--fig-cloth); }
.fig-line { fill: none; stroke: var(--fig-skin); stroke-width: 1.4; stroke-linecap: round; opacity: .55; }
.fig-hair { fill: var(--fig-cloth); }
.fig-hair2 { fill: var(--fig-grey1); }
.fig-hair3 { fill: var(--fig-grey2); }
.ng-card .pimg .fig { width: 70%; }

/* photo banners on question/info screens (photos keep their original colours) */
.qbanner { border-radius: 16px; overflow: hidden; margin: 0 0 16px; aspect-ratio: 2 / 1; background: var(--accent-soft); }
.qbanner:empty { display: none; }
.qbanner img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; }   /* faces sit near the top of the portrait photos */
.qinfo .qbanner { aspect-ratio: 16 / 9; width: 100%; }
.qinfo .qbanner img { object-position: 50% 12%; }   /* keep heads in frame */
/* per-photo crop tweaks (0% = show the very top of the photo) */
.qbanner[data-banner="q-activity"] img { object-position: 50% 0%; }
.qbanner[data-banner="q-energy"] img { object-position: 50% 4%; }
/* pain thumbnails: centre on the sore spot */
.othumb[data-thumb$="pain-back"] .ph { object-position: 68% 68%; }
.othumb[data-thumb$="pain-knee"] .ph { object-position: 55% 52%; }
.othumb[data-thumb$="pain-shoulder"] .ph { object-position: 72% 38%; }
.othumb[data-thumb$="pain-none"] { background: #fff; }
.othumb[data-thumb$="pain-none"] .ph { object-fit: contain; padding: 6px; }
.ng-line { display: none; align-items: center; gap: 6px; flex-wrap: wrap; margin: 4px 0 0; }
.ng-line .ico { width: 18px; height: 18px; }
.has-banner .nowgoal { display: none; }
.has-banner .ng-line { display: flex; }
.plabel { display: block; padding: 10px 6px 12px; font-weight: 700; font-size: 1.02rem; }
.pcard.sel { border-color: var(--ink); background: var(--ink); color: var(--card); }

/* number entry */
.seg { display: flex; width: max-content; margin: 18px auto 6px; background: var(--accent-soft); border-radius: 12px; padding: 4px; }
.seg button { border: 0; background: none; color: var(--ink); font-weight: 700; padding: 8px 22px; border-radius: 9px; }
.seg button[aria-pressed=true] { background: var(--ink); color: var(--card); }
.bignum { display: flex; align-items: baseline; justify-content: center; gap: 8px; margin: 18px 0 10px; }
.bignum input { width: 4.2ch; font: inherit; font-size: 3.2rem; font-weight: 700; text-align: center; border: 0; border-bottom: 2px solid var(--line); background: none; color: var(--ink); padding: 0 0 2px; -moz-appearance: textfield; }
.bignum input::-webkit-outer-spin-button, .bignum input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.bignum input:focus { outline: none; border-bottom-color: var(--ink); }
.bignum span { font-size: 1.3rem; color: var(--muted); }
.qerr { text-align: center; font-weight: 600; margin: 0 0 8px; }
.qnote { display: flex; gap: 12px; align-items: flex-start; background: var(--accent-soft); border-radius: 14px; padding: 14px 16px; margin-top: 14px; }
.qnote .ico { width: 24px; height: 24px; margin-top: 1px; }
.qnote b { display: block; }
.qnote span { color: var(--muted); font-size: .92rem; }
.qinput { display: block; width: 100%; margin-top: 8px; padding: 14px 14px; font: inherit; font-size: 1.1rem; border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--ink); }
.qinput:focus { outline: 2px solid var(--ink); outline-offset: 1px; }
.qfield { display: block; font-weight: 600; margin-top: 16px; }
.opt-note { font-weight: 400; color: var(--muted); }

/* sticky continue bar */
.qfoot {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; background: var(--bg); border-top: 1px solid var(--line);
  padding-top: 12px; padding-bottom: max(14px, env(safe-area-inset-bottom, 0px));
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.qfoot .primary { display: block; width: 100%; max-width: 560px; margin: 0 auto; }
.primary.wide { font-size: 1.08rem; padding: 15px 18px; border-radius: 14px; }
.primary:disabled { opacity: .35; cursor: not-allowed; filter: none; }

/* info screens */
.nowgoal { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 8px; margin-top: 18px; }
.ng-card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; text-align: center; }
.ng-lbl { display: block; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; font-size: .78rem; padding-top: 10px; }
.ng-sub { display: block; color: var(--muted); font-size: .9rem; padding-bottom: 10px; }
.ng-arrow .ico { width: 28px; height: 28px; }
.chart { display: block; width: 100%; height: auto; margin-top: 18px; }
.c-area { fill: var(--ink); opacity: .08; }
.c-line { fill: none; stroke: var(--ink); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.c-dot { fill: var(--card); stroke: var(--ink); stroke-width: 2.5; }
.c-dot.big { fill: var(--ink); }
.c-lbl { fill: var(--muted); font-size: 13px; font-family: inherit; }
.c-lbl.strong { fill: var(--ink); font-weight: 700; }
.proj-goal { text-align: center; font-size: clamp(1.4rem, 5vw, 1.8rem); font-weight: 800; text-decoration: underline; text-underline-offset: 6px; margin: 4px 0 0; }
.info-hero { margin: -4px 0 18px; border-radius: 16px; overflow: hidden; background: var(--accent-soft); min-height: 140px; display: grid; place-items: center; position: relative; }
.info-hero .ph { display: block; width: 100%; max-height: 360px; object-fit: cover; object-position: 50% 6%; }   /* faces near the top */
.info-ico { padding: 30px; color: var(--ink); }
.bmi-card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 18px; margin-top: 14px; }
.bmi-card h3 { font-size: 1.05rem; margin: 0 0 40px; }
.bmi-scale { position: relative; height: 8px; border-radius: 8px; background: linear-gradient(90deg, var(--f) 0%, var(--c) 45%, var(--ink) 100%); }
.bmi-scale i { position: absolute; top: 50%; width: 20px; height: 20px; border-radius: 50%; background: var(--card); border: 3px solid var(--ink); transform: translate(-50%, -50%); }
.bmi-you { position: absolute; bottom: 18px; transform: translateX(-50%); background: var(--ink); color: var(--card); font-weight: 700; font-size: .85rem; padding: 4px 10px; border-radius: 8px; white-space: nowrap; }
.bmi-labels { position: relative; height: 1.2em; color: var(--muted); font-size: .78rem; margin-top: 10px; }
.bmi-labels span { position: absolute; top: 0; transform: translateX(-50%); white-space: nowrap; }
.bmi-labels span.start { transform: none; }
.bmi-labels span.end { transform: translateX(-100%); }
.bmi-scale .tick { position: absolute; top: -3px; width: 2px; height: 14px; background: var(--card); transform: translateX(-1px); }
.bmi-msg { background: var(--accent-soft); border-left: 3px solid var(--ink); border-radius: 10px; padding: 12px 14px; margin: 16px 0 6px; }
.prof { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 12px; }
.prof li { display: flex; gap: 12px; align-items: center; }
.prof small { display: block; color: var(--muted); font-size: .8rem; }
.prof span { font-weight: 600; }

/* loader */
.loader { text-align: center; padding-top: 30px; }
.loader-pw { width: 110px; height: 110px; margin: 0 auto 20px; color: var(--ink); }
.loader-pw .ico.pw { width: 100%; height: 100%; margin: 0; animation: powerSpin 1.1s cubic-bezier(.5, 0, .2, 1) infinite; filter: drop-shadow(0 0 14px var(--glow)); }
.lsteps { list-style: none; padding: 0; margin: 22px auto 0; max-width: 320px; text-align: left; display: grid; gap: 12px; }
.lsteps li { display: flex; gap: 10px; align-items: center; color: var(--muted); }
.lsteps .ico { width: 22px; height: 22px; stroke-width: 2.4; opacity: .25; }
.lsteps li.done { color: var(--ink); font-weight: 600; }
.lsteps li.done .ico { opacity: 1; }

/* results: goal + coach notes */
.notes { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 16px; }
.notes h3 { font-size: 1rem; margin: 6px 0 6px; }
.notes ul { margin: 0; padding-left: 20px; }
.notes li { margin: 5px 0; }
.goal-line { display: flex; gap: 10px; align-items: center; margin: 0 0 8px; }
.goal-line .ico { width: 26px; height: 26px; }

@media (prefers-reduced-motion: reduce) {
  .qscreen, .loader-pw .ico.pw { animation: none; }
  .qbar i { transition: none; }
}

@media (max-width: 560px) {
  .card { padding: 16px; }
  .row { flex-wrap: wrap; }
  .totals { grid-template-columns: repeat(2, 1fr); }
  .ex { grid-template-columns: 24px 92px minmax(0, 1fr); gap: 4px 10px; }
  .ex-pic { width: 92px; }
  .ex-rx { grid-column: 3; grid-row: 2; text-align: left; }
  .ex-tip { grid-column: 3; grid-row: 3; }
  .topbar nav .ghost { padding: 7px 10px; font-size: .85rem; }
}

@media print {
  body { background: #fff; color: #000; font-size: 12px; }
  .topbar, .tabs, .daypills, .foot, .small, .ex input { display: none !important; }
  main { max-width: none; padding: 0; }
  .panel, .nday { display: block !important; }
  .panel { page-break-before: always; }
  .panel:first-of-type { page-break-before: auto; }
  details.day { break-inside: avoid; }
  details.day > summary::after { display: none; }
  .meal, .groc section { break-inside: avoid; }
  .card, .stat, .meal, details.day, .tot { border-color: #bbb; }
}
