/* MuscleUp — design system CSS.
 * Dark-neon aesthetic lifted from the FitDan donor (fitdan.html:1-370,
 * READ-ONLY reference), recolored from lime/navy to the MuscleUp
 * turquoise/navy palette. Dark is the default; a light variant overrides
 * the SAME tokens under html[data-theme="light"] (see the end of the
 * design-token block below).
 */

/* ---------- fonts ---------- */
/* Ploni: Dan's licensed Hebrew display/body font (regular cut — he vetoed Round). unicode-range
 * restricts it to the Hebrew block so Latin/digits fall through to
 * Space Grotesk in the stack below, instead of Ploni's own (unused)
 * Latin glyphs. */
/* Space Grotesk: latin + digits (variable weight 500-700, one file
 * covers both — see task-11-report.md for how that was verified). Kept
 * for headings (h1/h2) and .num (tabular-nums digits) — see below. */
@font-face{
  font-family:'Space Grotesk';
  src:url('../fonts/space-grotesk-latin.woff2') format('woff2');
  font-weight:500 700; font-style:normal; font-display:swap;
  unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+2000-206F, U+2122, U+2191, U+2193, U+2212, U+2215;
}
/* Manrope: fix round 1 amendment — Dan dislikes Ploni for English body
 * copy, so Latin text now renders in Manrope first (Ploni stays only as
 * the Hebrew-glyph fallback, per its unicode-range above). Fetched the
 * same way as Space Grotesk (task-11): Google's CSS2 API response for
 * family=Manrope:wght@400;500;700;800 — all four weights' "latin" subset
 * resolved to the exact same byte-identical woff2 URL (a single
 * variable-weight file spanning 400-800), so only one file was needed:
 * app/fonts/manrope-latin.woff2. unicode-range copied verbatim from that
 * response's latin block. */
@font-face{
  font-family:'Manrope';
  src:url('../fonts/manrope-latin.woff2') format('woff2');
  font-weight:400 800; font-style:normal; font-display:swap;
  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;
}

/* ---------- per-script premium overlay (Task 18) ----------
 * Same family names, extra unicode-range faces (declared AFTER the latin
 * faces): Hebrew -> Ploni (regular cut, per Dan), Arabic -> Cairo (variable), Cyrillic ->
 * Manrope-cyrillic (variable). Latin is untouched; font-family lists unchanged. */
@font-face{
  font-family:'Manrope';
  src:url('../fonts/cairo-arabic.woff2') format('woff2');
  font-weight:100 900; font-style:normal; font-display:swap;
  unicode-range:U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF;
}
@font-face{
  font-family:'Manrope';
  src:url('../fonts/manrope-cyrillic.woff2') format('woff2');
  font-weight:100 900; font-style:normal; font-display:swap;
  unicode-range:U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face{
  font-family:'Manrope';
  src:url('../fonts/manrope-cyrillic-ext.woff2') format('woff2');
  font-weight:100 900; font-style:normal; font-display:swap;
  unicode-range:U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face{
  font-family:'Space Grotesk';
  src:url('../fonts/cairo-arabic.woff2') format('woff2');
  font-weight:100 900; font-style:normal; font-display:swap;
  unicode-range:U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF;
}
@font-face{
  font-family:'Space Grotesk';
  src:url('../fonts/manrope-cyrillic.woff2') format('woff2');
  font-weight:100 900; font-style:normal; font-display:swap;
  unicode-range:U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face{
  font-family:'Space Grotesk';
  src:url('../fonts/manrope-cyrillic-ext.woff2') format('woff2');
  font-weight:100 900; font-style:normal; font-display:swap;
  unicode-range:U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face{
  font-family:'Manrope';
  src:url('../fonts/ploni-regular.woff2?v=2') format('woff2');
  font-weight:100 400; font-style:normal; font-display:swap;
  unicode-range:U+0590-05FF, U+FB1D-FB4F;
}
@font-face{
  font-family:'Manrope';
  src:url('../fonts/ploni-medium.woff2?v=2') format('woff2');
  font-weight:500; font-style:normal; font-display:swap;
  unicode-range:U+0590-05FF, U+FB1D-FB4F;
}
@font-face{
  font-family:'Manrope';
  src:url('../fonts/ploni-demibold.woff2?v=2') format('woff2');
  font-weight:600; font-style:normal; font-display:swap;
  unicode-range:U+0590-05FF, U+FB1D-FB4F;
}
@font-face{
  font-family:'Manrope';
  src:url('../fonts/ploni-bold.woff2?v=2') format('woff2');
  font-weight:700; font-style:normal; font-display:swap;
  unicode-range:U+0590-05FF, U+FB1D-FB4F;
}
@font-face{
  font-family:'Manrope';
  src:url('../fonts/ploni-ultrabold.woff2?v=2') format('woff2');
  font-weight:800 900; font-style:normal; font-display:swap;
  unicode-range:U+0590-05FF, U+FB1D-FB4F;
}
@font-face{
  font-family:'Space Grotesk';
  src:url('../fonts/ploni-regular.woff2?v=2') format('woff2');
  font-weight:100 400; font-style:normal; font-display:swap;
  unicode-range:U+0590-05FF, U+FB1D-FB4F;
}
@font-face{
  font-family:'Space Grotesk';
  src:url('../fonts/ploni-medium.woff2?v=2') format('woff2');
  font-weight:500; font-style:normal; font-display:swap;
  unicode-range:U+0590-05FF, U+FB1D-FB4F;
}
@font-face{
  font-family:'Space Grotesk';
  src:url('../fonts/ploni-demibold.woff2?v=2') format('woff2');
  font-weight:600; font-style:normal; font-display:swap;
  unicode-range:U+0590-05FF, U+FB1D-FB4F;
}
@font-face{
  font-family:'Space Grotesk';
  src:url('../fonts/ploni-bold.woff2?v=2') format('woff2');
  font-weight:700; font-style:normal; font-display:swap;
  unicode-range:U+0590-05FF, U+FB1D-FB4F;
}
@font-face{
  font-family:'Space Grotesk';
  src:url('../fonts/ploni-ultrabold.woff2?v=2') format('woff2');
  font-weight:800 900; font-style:normal; font-display:swap;
  unicode-range:U+0590-05FF, U+FB1D-FB4F;
}


/* ---------- design tokens ---------- */
/* Task 12b premium pass: 8px spacing grid (--s1..--s6), a hairline border
 * tone (#1b2942) for resting surfaces, and --dim raised from #5b6b90
 * (3.5:1 on navy — failed AA) to #7d8fb5 (5.8:1). */
:root{
  color-scheme:dark;
  --bg:#0B1220;
  --card:#111a2e;
  --card2:#182444;
  --line:#1b2942;
  --line2:#26375c;
  --accent:#2DD4BF;
  --accent2:#06B6D4;
  --danger:#F43F5E;
  --good:#34D399;
  --warn:#FBBF24;
  --text:#e8eefc;
  --sub:#8fa3c8;
  --dim:#7d8fb5;
  --on-accent:#04211d;
  --grad:linear-gradient(135deg, var(--accent), var(--accent2));
  --glow:0 0 24px rgba(45,212,191,.22);
  --accent-ink:#2DD4BF;   /* accent used AS TEXT/ICON ink (light theme darkens it for AA) */
  --accent2-ink:#06B6D4;
  --tile-40:rgba(24,36,68,.4); --tile-45:rgba(24,36,68,.45); --tile-55:rgba(24,36,68,.55); --tile-60:rgba(24,36,68,.6);
  --glass-55:rgba(17,26,46,.55); --glass-60:rgba(17,26,46,.6); --glass-80:rgba(17,26,46,.8); --glass-90:rgba(17,26,46,.9); --glass-94:rgba(17,26,46,.94);
  --card-0:rgba(17,26,46,0);
  --bg-0:rgba(11,18,32,0);
  --sel-bg:#0f2230;       /* selected quiz tile fill (under the gradient border) */
  --hover-bg:#14203a;
  --ph:#3a4d78;           /* decorative placeholder ink */
  --shadow-card:none;
  --nav-shadow:0 12px 40px -8px rgba(0,0,0,.6);
  --neg-ink:#fb7185;
  --photo-frame:var(--line);
  --r:20px;
  --r-md:16px;
  --s1:8px; --s2:16px; --s3:24px; --s4:32px; --s5:40px; --s6:48px;
  --gutter:20px;
  --ease:cubic-bezier(.2,.7,.2,1);
  --font-display:'Space Grotesk',system-ui,-apple-system,'Segoe UI',Arial,sans-serif;
  /* gradient check glyph for selected badges (dark stroke on --grad) */
  --check:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-7' fill='none' stroke='%2304211d' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* ---------- light theme ----------
 * Overrides the SAME tokens as :root (dark values above are never edited).
 * Brand teal/cyan accent + gradient stay identical; only the accent used as
 * text ink is darkened (--accent-ink) because #2DD4BF on white is ~1.7:1.
 * CTA fill keeps dark ink (--on-accent) on the teal gradient. */
html[data-theme="light"]{
  color-scheme:light;
  --bg:#F4F7FB;
  --card:#FFFFFF;
  --card2:#EAF0F7;
  --line:rgba(11,18,32,.08);
  --line2:rgba(11,18,32,.16);
  --danger:#BE123C;
  --good:#047857;
  --warn:#B45309;
  --text:#0B1220;
  --sub:#5B6B84;
  --dim:#5B6B84;
  --accent-ink:#0F766E;
  --accent2-ink:#0E7490;
  --glow:0 0 22px rgba(45,212,191,.16);
  --tile-40:rgba(11,18,32,.035); --tile-45:rgba(11,18,32,.04); --tile-55:rgba(11,18,32,.05); --tile-60:rgba(11,18,32,.055);
  --glass-55:rgba(255,255,255,.7); --glass-60:rgba(255,255,255,.75); --glass-80:rgba(255,255,255,.86); --glass-90:rgba(255,255,255,.95); --glass-94:rgba(255,255,255,.96);
  --card-0:rgba(255,255,255,0);
  --bg-0:rgba(244,247,251,0);
  --sel-bg:#EAFBF8;
  --hover-bg:#EEF3F9;
  --ph:#B4BFD1;
  --shadow-card:0 1px 2px rgba(11,18,32,.05), 0 6px 18px -8px rgba(11,18,32,.12);
  --nav-shadow:0 10px 30px -10px rgba(11,18,32,.22);
  --neg-ink:#BE123C;
  --photo-frame:#FFFFFF;
}
html[data-theme="light"] body{
  background-image:
    radial-gradient(640px 420px at 85% -8%, rgba(45,212,191,.12), transparent 60%),
    radial-gradient(520px 380px at -10% 32%, rgba(6,182,212,.08), transparent 60%);
}
html[data-theme="light"] ::selection{color:var(--text)}
html[data-theme="light"] nav#tabs .in{border-color:var(--line)}
/* gradient-clipped text is ~1.9:1 on white: the 11px selected tab label uses solid ink in light */
html[data-theme="light"] nav#tabs button.sel .lbl{background:none; color:var(--accent-ink)}
html[data-theme="light"] .quiz-body-option:not(.sel){box-shadow:0 0 0 1px var(--line), var(--shadow-card)}
html[data-theme="light"] .qn-outline{fill:rgba(11,18,32,.02)}
html[data-theme="light"] .qn-muscle{fill:rgba(11,18,32,.06)}
html[data-theme="light"] .qn-muscle:not(.qn-muscle-burned):not(.qn-muscle-notfelt):hover{fill:rgba(11,18,32,.14)}
html[data-theme="light"] .qn-muscle-notfelt{fill:rgba(91,107,132,.35)}
html[data-theme="light"] .chip.muted,
html[data-theme="light"] .req-status-declined{background:rgba(91,107,132,.10); border-color:rgba(91,107,132,.3)}
html[data-theme="light"] .req-status-new{background:rgba(91,107,132,.10); border-color:rgba(91,107,132,.3)}
html[data-theme="light"] .chip.accent,
html[data-theme="light"] .req-status-in_progress{background:rgba(45,212,191,.16); border-color:rgba(15,118,110,.35)}
html[data-theme="light"] .chip.warn{background:rgba(251,191,36,.18); border-color:rgba(180,83,9,.35)}
html[data-theme="light"] .chip.danger{background:rgba(244,63,94,.10); border-color:rgba(190,18,60,.35)}
html[data-theme="light"] .tint-coral{--tint-fg:var(--neg-ink)}
html[data-theme="light"] .tint-teal{--tint-fg:var(--accent-ink)}
html[data-theme="light"] .tint-cyan{--tint-fg:var(--accent2-ink)}

/* ---------- header side buttons: account (start) + theme toggle (end), 44px targets ---------- */
.theme-toggle,.account-btn{
  flex:0 0 auto; display:inline-flex; align-items:center; justify-content:center;
  width:44px; height:44px; border-radius:50%;
  color:var(--sub);
  transition:color .2s ease, background-color .2s ease;
}
.theme-toggle{justify-self:end}
.account-btn{justify-self:start}
.theme-toggle .icn,.account-btn .icn{width:22px; height:22px}
.theme-toggle:active,.account-btn:active{background:var(--line)}
.account-btn.sel{color:var(--accent-ink)}
@media (hover:hover){ .theme-toggle:hover,.account-btn:hover{color:var(--text); background:var(--line)} }

/* My Account (Round 4): the Settings module in account mode */
.account-section-title{font-family:var(--font-display); font-size:20px; margin:var(--s4) 0 0}
.account-library-row{border-bottom:0; padding:2px 0}
.account-library-row .grow{display:flex; flex-direction:column; gap:2px}
.account-row-title{font-size:16px; font-weight:800}
.account-row-sub{color:var(--sub); font-size:13px; font-weight:500}
.nutrition-soon-list{color:var(--sub); font-size:15px; margin:0; text-wrap:pretty}

/* ---------- reset / base ---------- */
*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%; scrollbar-width:thin; scrollbar-color:var(--line2) transparent}
html,body{height:100%}
/* Defense-in-depth against sideways scroll on phones (Round 4): `clip`, not `hidden`,
 * so position:sticky (quiz/player topbars) keeps working. The root causes are fixed at
 * their source (grid tracks use minmax(0,1fr)); this only catches a future regression. */
html,body{overflow-x:clip}
body{
  margin:0;
  background:var(--bg);
  background-image:
    radial-gradient(640px 420px at 85% -8%, rgba(45,212,191,.10), transparent 60%),
    radial-gradient(520px 380px at -10% 32%, rgba(6,182,212,.10), transparent 60%);
  background-attachment:fixed;
  color:var(--text);
  /* Manrope first for Latin body copy; Ploni's unicode-range limits
   * it to the Hebrew block, so it stays the Hebrew-glyph fallback. */
  font-family:'Manrope','Space Grotesk',system-ui,-apple-system,'Segoe UI',Arial,sans-serif;
  font-size:16px; line-height:1.5;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  -webkit-tap-highlight-color:transparent;
  text-rendering:optimizeLegibility;
}
::selection{background:rgba(45,212,191,.32); color:#fff}
::-webkit-scrollbar{width:8px; height:8px}
::-webkit-scrollbar-thumb{background:var(--line2); border-radius:99px}
::-webkit-scrollbar-track{background:transparent}

h1,h2,h3{font-weight:800; margin:0; letter-spacing:-.01em}
/* Display headings keep the geometric Space Grotesk; h3 falls through to
 * the Manrope-first body stack. */
h1,h2{font-family:var(--font-display)}
/* Negative tracking suits Space Grotesk but cramps Hebrew letterforms. */
[dir="rtl"] h1,[dir="rtl"] h2,[dir="rtl"] h3{letter-spacing:0}
button{font-family:inherit; color:inherit; background:none; border:none; cursor:pointer; padding:0; -webkit-tap-highlight-color:transparent}
input,select,textarea{font-family:inherit; color:inherit}
a{color:var(--accent-ink)}

/* One consistent keyboard focus ring everywhere (mouse/touch never see it). */
:focus{outline:none}
:focus-visible{outline:2px solid var(--accent); outline-offset:3px}

/* Space Grotesk digits — tabular numerals for anything that ticks. */
.num{
  font-family:'Space Grotesk',system-ui,sans-serif;
  font-variant-numeric:tabular-nums;
}

/* Generic flex-row / flex-grow utilities — today.js/player.js have used
 * this exact vocabulary (`class="row ..."`, `class="grow"`) since Task 13,
 * but no rule for either ever landed; adding them here (Task 15, which
 * needs the same combo for its own cards) rather than duplicating a
 * one-off rule per screen. */
.row{display:flex; align-items:center; gap:var(--s2)}
.grow{flex:1; min-width:0}

/* ---------- shell ---------- */
#views{
  max-width:560px;
  margin:0 auto;
  min-height:100vh; min-height:100dvh;
  padding:var(--s2) var(--gutter) calc(112px + env(safe-area-inset-bottom, 0px));
}

/* ---------- brand header (visual round 2) ----------
 * Slim, in-flow (scrolls with content, never fixed) logo lockup above the
 * four main views. Always LTR — it's a logo, not text flow. 28px mark +
 * 10px block padding = 48px total. Hidden in the quiz and the player (see
 * main.js showTabs). */
#brandbar[hidden]{display:none}
#brandbar .in{
  max-width:560px; margin:0 auto;
  /* Round 4: account | logo | toggle. The 1fr/auto/1fr tracks keep the logo truly centered
   * whatever the side buttons weigh; minmax(0,1fr) so a track never outgrows the phone. */
  display:grid; grid-template-columns:minmax(0, 1fr) auto minmax(0, 1fr); align-items:center; gap:10px;
  padding:10px var(--gutter) 10px;
  padding-top:calc(10px + env(safe-area-inset-top, 0px));
}
.brand-lockup{display:flex; align-items:center; gap:10px; min-width:0}
.brand-mark,.quiz-brand-mark{
  flex:0 0 auto; display:block; width:28px; height:28px; border-radius:8px;
  box-shadow:0 0 0 1px rgba(45,212,191,.18), 0 0 14px rgba(45,212,191,.18);
}
.brand-word{
  font-family:'Space Grotesk',system-ui,sans-serif; font-weight:800;
  font-size:17px; line-height:1; letter-spacing:.06em; white-space:nowrap;
  background:var(--grad); -webkit-background-clip:text; background-clip:text;
  -webkit-text-fill-color:transparent; color:var(--accent-ink);
}
#brandbar:not([hidden]) + #views{padding-top:var(--s1)}

/* ---------- card ---------- */
.card{
  background:var(--card);
  border:1px solid var(--line);
  box-shadow:var(--shadow-card);
  border-radius:var(--r);
  padding:20px;
  margin-top:var(--s2);
}
.card h3{font-size:17px; margin-bottom:var(--s1)}

/* ---------- chip ---------- */
.chip{
  display:inline-flex; align-items:center; gap:6px;
  font-size:12.5px; font-weight:700; letter-spacing:.02em;
  padding:4px 10px; border-radius:99px;
  background:var(--card2); color:var(--sub); border:1px solid var(--line);
}
.chip.accent{background:rgba(45,212,191,.12); color:var(--accent-ink); border-color:rgba(45,212,191,.35)}
.chip.warn{background:rgba(251,191,36,.12); color:var(--warn); border-color:rgba(251,191,36,.35)}
.chip.danger{background:rgba(244,63,94,.12); color:var(--danger); border-color:rgba(244,63,94,.35)}

/* ---------- buttons ---------- */
.btn{
  display:flex; align-items:center; justify-content:center; gap:var(--s1);
  width:100%; min-height:56px;
  background:var(--grad);
  color:var(--on-accent);
  font-weight:700; font-size:17px; letter-spacing:.01em;
  border-radius:var(--r-md); padding:14px 20px;
  box-shadow:0 8px 28px -6px rgba(45,212,191,.45), 0 0 0 1px rgba(255,255,255,.06) inset;
  transition:transform .12s ease, opacity .2s ease, box-shadow .2s ease, background-color .2s ease;
}
.btn:active{transform:scale(.98)}
.btn.ghost{
  background:transparent; color:var(--text);
  box-shadow:none; border:1px solid var(--line2); font-weight:600;
}
.btn.small{width:auto; min-height:40px; padding:9px 16px; font-size:14px; border-radius:12px}
.btn.dangerous{background:none; border:1px solid rgba(244,63,94,.4); color:var(--danger); box-shadow:none; font-weight:600}
.btn[disabled]{opacity:.4; box-shadow:none; pointer-events:none}
.btn:focus-visible{outline-offset:4px}
@media (hover:hover){
  .btn:hover{box-shadow:0 10px 34px -6px rgba(45,212,191,.6), 0 0 0 1px rgba(255,255,255,.1) inset}
  .btn.ghost:hover{border-color:var(--accent); box-shadow:var(--glow)}
}

/* ---------- tab bar (floating pill) ---------- */
nav#tabs{
  position:fixed; z-index:40;
  left:12px; right:12px; bottom:calc(12px + env(safe-area-inset-bottom, 0px));
  pointer-events:none; /* only the pill itself takes taps */
}
nav#tabs .in{
  pointer-events:auto;
  max-width:536px; margin:0 auto;
  display:grid; grid-auto-flow:column; grid-auto-columns:minmax(0,1fr); /* 5 or 6 tabs (Compete is opt-out) */
  padding:8px;
  border-radius:24px;
  background:var(--glass-80);
  -webkit-backdrop-filter:blur(14px) saturate(140%); backdrop-filter:blur(14px) saturate(140%);
  border:1px solid rgba(143,163,200,.14);
  box-shadow:var(--nav-shadow);
}
nav#tabs button{
  position:relative;
  display:flex; flex-direction:column; align-items:center; gap:2px;
  padding:6px 0 10px; min-height:52px;
  color:var(--sub); font-size:11px; font-weight:700; letter-spacing:.01em;
  border-radius:16px;
  transition:color .2s ease, background-color .2s ease;
}
nav#tabs button .ic{font-size:21px; line-height:1.1; filter:grayscale(.55) opacity(.75); transition:filter .2s ease, transform .2s var(--ease)}
nav#tabs button .lbl{line-height:1.2}
nav#tabs button::after{
  content:""; position:absolute; bottom:3px; left:50%;
  width:4px; height:4px; margin-left:-2px; border-radius:50%;
  background:var(--accent); box-shadow:0 0 8px 1px rgba(45,212,191,.8);
  opacity:0; transform:scale(0); transition:opacity .2s ease, transform .25s var(--ease);
}
nav#tabs button.sel{background:rgba(45,212,191,.07)}
nav#tabs button.sel .ic{filter:none; transform:translateY(-1px)}
nav#tabs button.sel .lbl{
  background:var(--grad); -webkit-background-clip:text; background-clip:text;
  color:transparent;
}
nav#tabs button.sel::after{opacity:1; transform:scale(1)}
@media (hover:hover){ nav#tabs button:not(.sel):hover{color:var(--text)} }

/* ---------- empty state (placeholder tabs) ---------- */
.empty-state{
  display:flex; flex-direction:column; align-items:center; text-align:center; gap:12px;
  margin-top:12vh; padding:var(--s5) var(--s3);
  background:linear-gradient(180deg, var(--glass-90), var(--glass-55));
  border:1px solid var(--line); border-radius:24px;
}
.empty-state-icon{
  width:88px; height:88px; border-radius:50%; margin-bottom:var(--s1);
  display:flex; align-items:center; justify-content:center; font-size:40px;
  background:radial-gradient(circle at 50% 40%, rgba(45,212,191,.22), rgba(6,182,212,.05) 70%);
  box-shadow:0 0 0 1px rgba(45,212,191,.25), var(--glow);
}
.empty-state h1{font-size:28px; line-height:1.2; letter-spacing:-.02em}
.empty-state-sub{margin:0; max-width:300px; color:var(--sub); font-size:15px; font-weight:500}

/* ---------- animation ---------- */
.fadeUp{animation:fadeUp .4s var(--ease) both}
@keyframes fadeUp{from{opacity:0; transform:translateY(12px)} to{opacity:1; transform:none}}
@keyframes fadeOut{to{opacity:0; transform:translateY(-6px)}}
@keyframes pop{0%{transform:scale(.4); opacity:0} 70%{transform:scale(1.12); opacity:1} 100%{transform:scale(1)}}

/* ======================================================================
 * Onboarding quiz
 * ==================================================================== */
#views.quiz-mode{padding-bottom:calc(var(--s3) + env(safe-area-inset-bottom, 0px))}

.quiz{
  display:flex; flex-direction:column;
  min-height:calc(100vh - 40px); min-height:calc(100dvh - 40px);
}

/* small centered brand mark above the progress row — scrolls away (it is
 * outside the sticky topbar), takes over the topbar's negative top margin */
.quiz-brand{
  display:flex; align-items:center; justify-content:center; gap:8px;
  margin-top:calc(var(--s2) * -1); padding-top:12px;
  opacity:.92;
}
.quiz-brand .quiz-brand-mark{border-radius:7px}
.quiz-brand .brand-word{font-size:13px; letter-spacing:.1em}
.quiz-brand + .quiz-topbar{margin-top:0; padding-top:10px}

/* top bar: back · progress · counter */
.quiz-topbar{
  position:sticky; top:0; z-index:5;
  display:flex; align-items:center; gap:12px;
  margin:calc(var(--s2) * -1) calc(var(--gutter) * -1) 0;
  padding:var(--s2) var(--gutter) 12px;
  background:linear-gradient(var(--bg) 70%, var(--bg-0));
}
.quiz-back{
  flex:0 0 auto; width:40px; height:40px; border-radius:50%;
  border:1px solid var(--line); background:var(--glass-60);
  display:flex; align-items:center; justify-content:center; color:var(--text);
  transition:border-color .2s ease, box-shadow .2s ease, transform .12s ease;
}
.quiz-back svg{width:20px; height:20px}
[dir="rtl"] .quiz-back svg{transform:scaleX(-1)}
.quiz-back:active{transform:scale(.94)}
.quiz-back[hidden]{display:flex; visibility:hidden}
@media (hover:hover){ .quiz-back:hover{border-color:rgba(45,212,191,.5); box-shadow:var(--glow)} }
.quiz-progress{flex:1; height:4px; border-radius:99px; background:var(--line); overflow:hidden}
.quiz-progress-fill{
  height:100%; border-radius:99px; background:var(--grad);
  box-shadow:0 0 10px rgba(45,212,191,.6);
  transition:width .3s ease;
}
.quiz-counter{flex:0 0 auto; min-width:40px; text-align:end; color:var(--sub); font-size:14px; font-weight:600}

/* stage / body — content optically centered, CTA anchored to the bottom */
.quiz-stage{flex:1; display:flex; flex-direction:column}
.quiz-body{flex:1; display:flex; flex-direction:column; padding-top:var(--s2)}
.quiz-body::before{content:""; flex:1 1 0; max-height:10vh}
.quiz-body.enter{animation:fadeUp .32s var(--ease) backwards}
.quiz-body.is-leaving{animation:fadeOut .12s ease forwards; pointer-events:none}
.quiz-cta{margin-top:auto; flex:0 0 auto}
.quiz-body > :not(.quiz-cta):nth-last-child(2){margin-bottom:var(--s3)}

.quiz-title{
  font-size:28px; font-weight:800; line-height:1.35; letter-spacing:-.02em;
  margin:0 0 var(--s1); text-wrap:balance;
}
.quiz-subtitle{
  color:var(--sub); font-size:15px; font-weight:500; line-height:1.5;
  margin:0 0 var(--s3); text-wrap:pretty;
}
.quiz-title + :not(.quiz-subtitle){margin-top:var(--s3)}

/* staggered entrance for every option-type element (only on a new step) */
.quiz-body.enter :is(.quiz-option,.quiz-body-option,.quiz-chip-opt,.quiz-weekday,.quiz-summary-ex,.quiz-tile){
  animation:fadeUp .38s var(--ease) backwards; /* backwards, not both: a held end-state transform would block the :active press scale */
  animation-delay:calc(80ms + var(--i, 0) * 40ms);
}

/* ---- single-select option cards ---- */
.quiz-options{display:flex; flex-direction:column; gap:12px}
.quiz-option{
  position:relative;
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  width:100%; min-height:56px; text-align:start;
  padding:15px 17px; /* 16/18 minus the 1px border */
  background:var(--card); border:1px solid var(--line); border-radius:var(--r-md);
  font-size:16px; font-weight:600; line-height:1.35; color:var(--text);
  transition:transform .12s ease, border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}
/* optional decorative leading icon (q3 goal, q7 location, q12a time) —
 * a soft tile so every row's label starts on the same vertical line */
.quiz-option-icon{
  flex:0 0 auto; width:36px; height:36px; border-radius:11px;
  display:flex; align-items:center; justify-content:center;
  background:rgba(45,212,191,.08); font-size:19px; line-height:1;
  margin-inline-end:-2px;
}
.quiz-options.has-icons .quiz-option{justify-content:flex-start; min-height:64px}
.quiz-options.has-icons .quiz-option-label{flex:1}
/* radio-style badge: empty ring at rest, gradient check when selected */
.quiz-option::after{
  content:""; flex:0 0 auto; width:22px; height:22px; border-radius:50%;
  border:1.5px solid var(--line2);
  transition:border-color .2s ease;
}
.quiz-option:active{transform:scale(.98)}
.quiz-option.sel{
  padding:14px 16px; border:2px solid transparent;
  background:linear-gradient(var(--sel-bg), var(--sel-bg)) padding-box, var(--grad) border-box;
  box-shadow:var(--glow);
}
.quiz-option.sel::after{
  border:0; background:var(--check) center/14px no-repeat, var(--grad);
  animation:pop .28s var(--ease) both;
}
@media (hover:hover){
  .quiz-option:not(.sel):hover{border-color:var(--line2); background-color:var(--hover-bg)}
  .quiz-option:not(.sel):hover::after{border-color:rgba(45,212,191,.5)}
}

/* ---- q4/q5 body-photo hero cards ---- */
.quiz-photo-grid{display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:12px}
.quiz-body-option{
  position:relative; display:block; overflow:hidden;
  padding:2px; border-radius:18px;
  background:var(--photo-frame);
  transition:transform .12s ease, box-shadow .25s ease, background-color .2s ease;
}
/* q5 dream body (3 levels): one clean row of three — all visible without
 * scrolling at phone width; label tightened to fit the narrower cards */
.quiz-photo-grid-3{grid-template-columns:repeat(3, minmax(0, 1fr)); gap:10px}
.quiz-photo-grid-3 .quiz-body-label{padding:28px 6px 10px; font-size:13px}
.quiz-photo-grid-3 .quiz-body-option::after{top:8px; inset-inline-end:8px; width:22px; height:22px; background-size:13px, auto}
/* q1 gender: two portrait photo cards + a slim "other" text card below */
.quiz-gender-grid .quiz-body-label{font-size:16px; padding-bottom:14px}
.quiz-gender-other{margin-top:12px}
.quiz-signin{margin:var(--s3) 0 0; text-align:center}
.quiz-skip-row{margin:var(--s3) 0 0; text-align:center}
.quiz-option.quiz-option-slim{min-height:48px; padding-block:11px; justify-content:center; text-align:center; color:var(--sub)}
.quiz-option.quiz-option-slim.sel{padding-block:10px; color:var(--text)}
.quiz-option.quiz-option-slim::after{position:absolute; inset-inline-end:16px}
/* q4 current body (5 levels), visual round 5: every card the SAME size as
 * q5's — a centered 3 + 2 on a 6-track grid (each card spans 2 tracks; the
 * 4th starts at track 2 so the second row sits centered). Replaces the old
 * "lone last card spans the row" rule, which also caught q5's third card
 * and blew it up to half-width (owner screenshot). */
.quiz-photo-grid-5{grid-template-columns:repeat(6, minmax(0, 1fr)); gap:10px}
.quiz-photo-grid-5 .quiz-body-option{grid-column:span 2}
.quiz-photo-grid-5 .quiz-body-option:nth-child(4){grid-column:2 / span 2}
.quiz-photo-grid-5 .quiz-body-label{padding:28px 6px 10px; font-size:13px}
.quiz-photo-grid-5 .quiz-body-option::after{top:8px; inset-inline-end:8px; width:22px; height:22px; background-size:13px, auto}
/* q7b home equipment, visual round 5: 1:1 product-photo cards, multi-select
 * — an empty ring badge at rest (so "pick several" reads at a glance), the
 * gradient check when picked; photo dimmed until selected. */
.quiz-equip-card .quiz-body-photo{aspect-ratio:1/1}
.quiz-equip-card .quiz-body-label{padding:22px 6px 9px; font-size:12.5px; line-height:1.25}
.quiz-equip-card::after{
  opacity:1; transform:none;
  background:rgba(6,10,20,.45);
  box-shadow:inset 0 0 0 1.5px rgba(255,255,255,.75), 0 2px 8px rgba(0,0,0,.35);
}
.quiz-equip-card.sel::after{
  background:var(--check) center/13px no-repeat, var(--grad);
  box-shadow:0 2px 10px rgba(0,0,0,.4);
  animation:pop .28s var(--ease) both;
}
.quiz-equip-none{margin-top:12px}
/* q7c cardio machines: 7 equal cards, the lone last one centered under the 3-up rows */
.quiz-cardio-grid .quiz-body-option:last-child:nth-child(3n+1){grid-column:2}
.quiz-body-photo{
  display:block; width:100%; aspect-ratio:2/3; object-fit:cover;
  border-radius:16px; background:var(--card2);
  filter:brightness(.75) saturate(.9);
  transition:filter .25s ease;
}
.quiz-body-label{
  position:absolute; left:2px; right:2px; bottom:2px;
  padding:32px 12px 12px; border-radius:0 0 16px 16px;
  background:linear-gradient(180deg, rgba(6,10,20,0), rgba(6,10,20,.88));
  color:#fff; font-size:14px; font-weight:700; line-height:1.3; text-align:center;
  text-shadow:0 1px 8px rgba(0,0,0,.5);
}
.quiz-body-option::after{ /* selected check badge, top end corner */
  content:""; position:absolute; top:12px; inset-inline-end:12px;
  width:26px; height:26px; border-radius:50%;
  background:var(--check) center/15px no-repeat, var(--grad);
  box-shadow:0 2px 10px rgba(0,0,0,.4);
  opacity:0; transform:scale(.4);
  transition:opacity .2s ease, transform .25s var(--ease);
}
.quiz-body-option:active{transform:scale(.98)}
.quiz-body-option.sel{background:var(--grad); box-shadow:0 0 28px rgba(45,212,191,.32)}
.quiz-body-option.sel .quiz-body-photo{filter:none}
.quiz-body-option.sel::after{opacity:1; transform:scale(1)}
@media (hover:hover){ .quiz-body-option:not(.sel):hover .quiz-body-photo{filter:brightness(.92)} }

/* ---- segmented pill control (q13 units, q4/q5 photo-set toggle) ---- */
.quiz-segmented{
  display:flex; gap:4px; padding:4px; margin-bottom:var(--s3);
  background:var(--card); border:1px solid var(--line); border-radius:99px;
}
.quiz-segmented .quiz-chip-opt{
  flex:1; min-height:40px; padding:8px 12px; border:0; border-radius:99px;
  background:transparent; color:var(--sub); text-align:center;
  font-size:15px; font-weight:700;
}
.quiz-segmented .quiz-chip-opt.sel{
  background:var(--grad); color:var(--on-accent);
  box-shadow:0 4px 14px -4px rgba(45,212,191,.55);
}
.quiz-body.enter .quiz-segmented .quiz-chip-opt{animation:none}

/* ---- multi-select chips (q7b equipment, q11 injuries) ---- */
.quiz-chips{display:flex; flex-wrap:wrap; gap:12px}
.quiz-chip-opt{
  display:inline-flex; align-items:center; gap:var(--s1);
  min-height:48px; padding:11px 17px;
  background:var(--card); border:1px solid var(--line); border-radius:99px;
  font-size:16px; font-weight:600; color:var(--text);
  transition:transform .12s ease, border-color .2s ease, box-shadow .2s ease, background-color .2s ease, color .2s ease;
}
.quiz-chip-opt:active{transform:scale(.98)}
.quiz-chips .quiz-chip-opt.sel{
  padding-block:10px; padding-inline:12px 16px; border:2px solid transparent;
  background:linear-gradient(var(--sel-bg), var(--sel-bg)) padding-box, var(--grad) border-box;
  box-shadow:var(--glow);
}
.quiz-chips .quiz-chip-opt.sel::before{
  content:""; width:20px; height:20px; border-radius:50%; flex:0 0 auto;
  background:var(--check) center/12px no-repeat, var(--grad);
  animation:pop .28s var(--ease) both;
}
@media (hover:hover){ .quiz-chips .quiz-chip-opt:not(.sel):hover{border-color:var(--line2); background-color:var(--hover-bg)} }

/* ---- visual tiles (visual round 3) ----
 * Grid sibling of the icon-row option: visual on top, label below. Same
 * resting card, same gradient-ring selected state and corner check badge
 * as the photo cards. Used by q8 (track cards), q9 (minutes), q10a (days),
 * q7b/q11 (multi-select), and the player's feel screen. */
.quiz-tiles{display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:12px}
.quiz-tiles-3{grid-template-columns:repeat(3, minmax(0, 1fr)); gap:10px}
.quiz-tile{
  position:relative; min-width:0;
  display:flex; flex-direction:column; align-items:center; justify-content:center; gap:10px;
  min-height:112px; padding:16px 10px 14px; text-align:center;
  background:var(--card); border:1px solid var(--line); border-radius:var(--r-md);
  font-size:15px; font-weight:600; line-height:1.3; color:var(--text);
  transition:transform .12s ease, border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}
.quiz-tile .quiz-option-icon{width:48px; height:48px; border-radius:14px; font-size:26px; margin:0}
.quiz-tile-label{overflow-wrap:anywhere}
.quiz-tile::after{ /* selected check badge, top end corner */
  content:""; position:absolute; top:8px; inset-inline-end:8px;
  width:20px; height:20px; border-radius:50%;
  background:var(--check) center/12px no-repeat, var(--grad);
  opacity:0; transform:scale(.4);
  transition:opacity .2s ease, transform .25s var(--ease);
}
.quiz-tile:active{transform:scale(.98)}
.quiz-tile.sel{
  padding:15px 9px 13px; border:2px solid transparent;
  background:linear-gradient(var(--sel-bg), var(--sel-bg)) padding-box, var(--grad) border-box;
  box-shadow:var(--glow);
}
.quiz-tile.sel::after{opacity:1; transform:scale(1)}
.quiz-tile.sel .quiz-option-icon{background:rgba(45,212,191,.16)}
@media (hover:hover){ .quiz-tile:not(.sel):hover{border-color:var(--line2); background-color:var(--hover-bg)} }
/* full-width "none" tile under a multi-select grid: a slim icon row */
.quiz-tile.quiz-tile-wide{grid-column:1 / -1; flex-direction:row; min-height:60px; padding-block:10px; gap:12px}
.quiz-tile.quiz-tile-wide.sel{padding-block:9px}
.quiz-tile.quiz-tile-wide .quiz-option-icon{width:36px; height:36px; border-radius:11px; font-size:19px}
.quiz-tile.quiz-tile-wide::after{top:50%; margin-top:-10px; inset-inline-end:14px}
/* q9/q10a stat tiles: the number is the hero */
.quiz-tile-stat{gap:4px; min-height:132px}
.quiz-tile-num{font-size:36px; font-weight:700; line-height:1.05; letter-spacing:-.02em}
.quiz-tile.sel .quiz-tile-num{
  background:var(--grad); -webkit-background-clip:text; background-clip:text; color:transparent;
}
.quiz-tile-unit{color:var(--sub); font-size:13px; font-weight:600}
.quiz-tile-clock{
  display:flex; align-items:flex-end; justify-content:center; height:36px; margin-bottom:4px;
  font-size:calc(20px * var(--scale, 1)); line-height:1;
}
.quiz-week-dots{display:flex; gap:4px; margin-top:8px}
.quiz-week-dots i{width:7px; height:7px; border-radius:50%; background:var(--line2)}
.quiz-week-dots i.on{background:var(--grad); box-shadow:0 0 6px rgba(45,212,191,.5)}
/* q8 track: two tall half-width cards (a mini q1) */
.quiz-track-card{min-height:230px; gap:18px; padding:22px 12px; font-size:16px; font-weight:700; line-height:1.35}
.quiz-track-card.sel{padding:21px 11px}
.quiz-tile .quiz-track-icon{
  width:88px; height:88px; border-radius:50%; font-size:46px;
  background:radial-gradient(circle, rgba(45,212,191,.20), rgba(45,212,191,.04) 70%);
  box-shadow:inset 0 0 0 1px rgba(45,212,191,.18);
}
.quiz-tile.sel .quiz-track-icon{box-shadow:inset 0 0 0 2px rgba(45,212,191,.55), 0 0 28px rgba(45,212,191,.35)}
.quiz-track-card::after{top:12px; inset-inline-end:12px; width:24px; height:24px; background-size:14px, auto}

/* ---- round hero badge above an input screen's title (q2 age, q15 name) ---- */
.quiz-hero-badge{
  position:relative; align-self:center; flex:0 0 auto;
  width:80px; height:80px; margin-bottom:var(--s2);
  display:flex; align-items:center; justify-content:center;
  border-radius:50%; background:radial-gradient(circle, rgba(45,212,191,.16), transparent 70%);
}
.quiz-hero-badge::before{ /* gradient ring */
  content:""; position:absolute; inset:0; border-radius:50%; padding:2px;
  background:var(--grad);
  -webkit-mask:linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite:xor; mask-composite:exclude;
  box-shadow:0 0 28px rgba(45,212,191,.28);
}

.quiz-hero-mark{width:52px; height:52px; border-radius:12px}
.quiz-body.enter .quiz-hero-badge{animation:pop .45s var(--ease) .05s both}
/* a centered badge wants a centered heading under it */
.quiz-hero-badge ~ :is(.quiz-title,.quiz-subtitle){text-align:center}
.quiz-greeting{
  display:flex; align-items:center; justify-content:center; gap:8px;
  margin:var(--s2) 0 0; color:var(--accent-ink); font-size:16px; font-weight:700; text-align:center;
}
.quiz-greeting[hidden]{display:none}
.quiz-greeting-wave{font-size:20px; line-height:1}

/* ---- q10b weekday picker ---- */
.quiz-weekdays{display:grid; grid-template-columns:repeat(7, minmax(0, 1fr)); gap:6px}
.quiz-weekday{
  aspect-ratio:1; max-width:52px; width:100%; justify-self:center; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  background:var(--card); border:1px solid var(--line);
  font-size:13px; font-weight:700; color:var(--sub);
  transition:transform .12s ease, background-color .2s ease, color .2s ease, box-shadow .2s ease;
}
.quiz-weekday:active{transform:scale(.94)}
.quiz-weekday.sel{background:var(--grad); color:var(--on-accent); border-color:transparent; box-shadow:var(--glow)}
.quiz-days-count{margin:var(--s2) 0 0; text-align:center; color:var(--sub); font-size:15px; font-weight:600}
.quiz-days-count.done{color:var(--accent-ink)}

/* ---- text / number fields ---- */
.quiz-field{margin-bottom:var(--s2)}
.quiz-field label{display:block; margin-bottom:var(--s1); color:var(--sub); font-size:13px; font-weight:700; letter-spacing:.04em; text-transform:uppercase}
/* q13: small decorative icon leading each field label */
.quiz-label-icon{display:inline-block; margin-inline-end:6px; font-size:15px; line-height:1; vertical-align:-1px}
[dir="rtl"] .quiz-field label{letter-spacing:0}
.quiz-field input,
.quiz-num{
  width:100%; background:var(--card); border:1px solid var(--line); border-radius:var(--r-md);
  transition:border-color .2s ease, box-shadow .2s ease;
}
.quiz-field input{padding:15px 16px; font-size:16px; color:var(--text)}
.quiz-field input::placeholder{color:var(--dim); opacity:1}
.quiz-field input:focus,
.quiz-num:focus-within{outline:none; border-color:var(--accent); box-shadow:0 0 0 3px rgba(45,212,191,.18), var(--glow)}
.quiz-field input:focus-visible{outline:none}
/* hide number spinners — the big values are typed, not stepped */
.quiz-field input[type=number]{-moz-appearance:textfield; appearance:textfield}
.quiz-field input::-webkit-outer-spin-button,
.quiz-field input::-webkit-inner-spin-button{-webkit-appearance:none; margin:0}

/* q2 age / q15 name: one hero input */
.quiz-field-hero{margin-bottom:0}
.quiz-field .quiz-big-input{
  min-height:72px; padding:16px 20px; text-align:center;
  font-size:24px; font-weight:700;
}
.quiz-field .quiz-big-input.num{font-size:32px}
.quiz-field .quiz-big-input::placeholder{font-size:18px; font-weight:600; font-family:'Manrope',system-ui,sans-serif}

/* q13 big centered values with unit suffix */
.quiz-num{display:flex; align-items:baseline; justify-content:center; gap:6px; padding:12px 16px}
.quiz-field .quiz-num input{
  width:100%; min-width:0; flex:1 1 auto; padding:0; border:0; background:none; box-shadow:none;
  text-align:center; font-size:28px; font-weight:700; line-height:1.3;
}
.quiz-field .quiz-num input:focus{box-shadow:none}
.quiz-field .quiz-num input::placeholder{color:var(--ph)} /* decorative ghost "0"; the label names the field */
.quiz-num-unit{flex:0 0 auto; color:var(--sub); font-size:15px; font-weight:600}
.quiz-imperial-row{display:flex; gap:12px}
.quiz-imperial-row .quiz-num{flex:1}
.quiz-field-pair{display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:12px}
/* q13 live goal delta ("−7 kg to go"), shown once both weights are in */
.quiz-delta{
  display:flex; align-items:center; justify-content:center; gap:10px;
  margin:var(--s1) 0 0; padding:12px 16px; border-radius:12px;
  background:rgba(45,212,191,.06); border:1px solid rgba(45,212,191,.18);
  color:var(--accent-ink); font-size:17px; font-weight:700; text-align:center;
  animation:fadeUp .3s var(--ease) both;
}
.quiz-delta[hidden]{display:none}
.quiz-delta-icon{font-size:20px; line-height:1}

/* ---- q14 building animation ---- */
.quiz-building{display:flex; flex-direction:column; align-items:center; text-align:center; gap:var(--s3); padding-top:var(--s1)}
.quiz-building-head .quiz-subtitle{margin-bottom:0}
@property --p{syntax:'<integer>'; inherits:true; initial-value:0}
.quiz-ring{
  --p:0;
  position:relative; width:132px; height:132px; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  animation:ringFill 2.3s cubic-bezier(.45,.05,.3,1) forwards, ringPulse 1.6s ease-in-out infinite;
}
.quiz-ring::before{ /* the arc */
  content:""; position:absolute; inset:0; border-radius:50%;
  background:conic-gradient(var(--accent), var(--accent2) calc(var(--p) * 1%), var(--line) 0);
  -webkit-mask:radial-gradient(farthest-side, transparent calc(100% - 9px), #000 calc(100% - 8px));
          mask:radial-gradient(farthest-side, transparent calc(100% - 9px), #000 calc(100% - 8px));
}
.quiz-ring::after{ /* soft inner glow disc */
  content:""; position:absolute; inset:18px; border-radius:50%;
  background:radial-gradient(circle, rgba(45,212,191,.16), transparent 70%);
}
.quiz-ring-pct{position:relative; z-index:1; font-size:30px; font-weight:700; letter-spacing:-.02em}
.quiz-ring-pct::after{counter-reset:p var(--p); content:counter(p) "%"}
@keyframes ringFill{to{--p:100}}
@keyframes ringPulse{
  0%,100%{box-shadow:0 0 24px rgba(45,212,191,.18)}
  50%{box-shadow:0 0 48px rgba(45,212,191,.40)}
}
.quiz-building-lines{list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:12px; width:100%; max-width:340px}
.quiz-building-line{
  display:flex; align-items:center; gap:12px; text-align:start;
  padding:12px 16px; border-radius:14px;
  background:var(--card); border:1px solid var(--line);
  color:var(--sub); font-size:15px; font-weight:600;
  opacity:0; transform:translateY(8px);
  transition:opacity .35s ease, transform .35s var(--ease), color .3s ease, border-color .3s ease;
}
.quiz-building-line .tick{
  flex:0 0 auto; width:22px; height:22px; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  border:2px solid var(--line2); color:transparent;
}
.quiz-building-line .tick svg{width:14px; height:14px}
.quiz-building-line.active,
.quiz-building-line.done{opacity:1; transform:none}
.quiz-building-line.active{color:var(--text); border-color:var(--line2)}
.quiz-building-line.active .tick{border-color:var(--line2); border-top-color:var(--accent); animation:spin .8s linear infinite}
.quiz-building-line.done{color:var(--text)}
.quiz-building-line.done .tick{border:0; background:var(--grad); color:var(--on-accent); animation:pop .3s var(--ease) both}
@keyframes spin{to{transform:rotate(360deg)}}

/* ---- q14 summary: gradient-border hero plan card ---- */
.quiz-plan-card{
  position:relative; padding:20px; border-radius:var(--r);
  border:1.5px solid transparent;
  background:
    linear-gradient(160deg, #122236, #0f1a2d) padding-box,
    linear-gradient(135deg, rgba(45,212,191,.9), rgba(6,182,212,.35) 45%, rgba(27,41,66,.9)) border-box;
  box-shadow:0 20px 50px -20px rgba(45,212,191,.35);
}
.quiz-body.enter .quiz-plan-card{animation:fadeUp .5s var(--ease) .12s both}
.quiz-plan-head{display:flex; align-items:center; justify-content:space-between; gap:var(--s1); flex-wrap:wrap}
.quiz-summary-chip{color:var(--accent-ink); font-size:14px; font-weight:700}
.quiz-plan-goal{
  display:flex; align-items:baseline; justify-content:space-between; gap:var(--s1);
  margin-top:var(--s2); padding:12px 16px; border-radius:12px;
  background:rgba(45,212,191,.06); border:1px solid rgba(45,212,191,.18);
}
.quiz-plan-goal-label{color:var(--sub); font-size:13px; font-weight:700; letter-spacing:.04em; text-transform:uppercase}
[dir="rtl"] .quiz-plan-goal-label{letter-spacing:0}
.quiz-plan-goal-value{font-family:var(--font-display); font-size:17px; font-weight:700}
.quiz-summary-list{list-style:none; margin:var(--s2) 0 0; padding:0; display:flex; flex-direction:column; gap:var(--s1)}
.quiz-summary-ex{
  display:flex; align-items:center; gap:12px;
  padding:10px 12px; border-radius:12px;
  background:var(--tile-55); border:1px solid var(--line);
  font-size:15px; font-weight:600;
}
.quiz-body.enter .quiz-summary-ex{animation-delay:calc(260ms + var(--i, 0) * 50ms)}
.quiz-summary-icon{ /* the exercise's primary-muscle line icon */
  flex:0 0 auto; width:34px; height:34px; border-radius:10px;
  display:flex; align-items:center; justify-content:center;
  background:rgba(45,212,191,.10); font-size:19px; line-height:1;
}
.quiz-summary-name{flex:1; min-width:0}
.quiz-summary-min{
  flex:0 0 auto; padding:3px 9px; border-radius:99px;
  background:var(--card2); border:1px solid var(--line2);
  color:var(--sub); font-size:12.5px; font-weight:700; white-space:nowrap;
}

/* ---- q16 final ---- */
.quiz-final{display:flex; flex-direction:column; align-items:center; text-align:center}
.quiz-final-badge{
  position:relative; width:112px; height:112px; margin-bottom:var(--s3);
  display:flex; align-items:center; justify-content:center;
}
.quiz-final-badge::before{
  content:""; position:absolute; inset:0; border-radius:50%; padding:2px;
  background:var(--grad);
  -webkit-mask:linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite:xor; mask-composite:exclude;
  box-shadow:0 0 40px rgba(45,212,191,.35);
}
.quiz-final-badge{width:132px; height:132px; background:radial-gradient(circle, rgba(45,212,191,.18), transparent 70%); border-radius:50%}
.quiz-final-mark{position:relative; width:72px; height:72px; border-radius:16px}
.quiz-final-echo{ /* the chosen goal's line icon, perched on the ring */
  position:absolute; bottom:2px; inset-inline-end:2px;
  width:42px; height:42px; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  background:var(--card2); border:2px solid var(--accent);
  font-size:21px; line-height:1; box-shadow:0 4px 16px rgba(0,0,0,.4);
}
.quiz-body.enter .quiz-final-badge{animation:pop .5s var(--ease) .1s both}
.quiz-body.enter .quiz-final-echo{animation:pop .45s var(--ease) .45s both}
.quiz-final-goal{
  display:inline-flex; align-items:center; gap:10px;
  margin-top:var(--s1); padding-block:6px; padding-inline:6px 16px; border-radius:99px;
  background:rgba(45,212,191,.06); border:1px solid rgba(45,212,191,.22);
  font-weight:700; font-size:15px;
}
.quiz-final-goal .quiz-option-icon{width:32px; height:32px; border-radius:50%; font-size:17px; margin:0}
.quiz-final .quiz-subtitle{max-width:320px}
/* multi-goal spec: q3 goal tiles (pick 1-2), the q14 plan line, q16 goal chips */
.quiz-goal-tiles .quiz-tile{min-height:96px; padding:12px 8px 11px; gap:8px}
.quiz-goal-tiles .quiz-tile.sel{padding:11px 7px 10px}
.quiz-goal-tiles .quiz-tile .quiz-option-icon{width:42px; height:42px; font-size:22px}
.quiz-tile.is-capped, .quiz-chip-opt.is-capped{opacity:.45}
.quiz-plan-goal{flex-wrap:wrap}
.quiz-plan-goal-value{min-width:0; overflow-wrap:anywhere; text-align:end}
.quiz-plan-goal-plan{margin:var(--s1) 0 0; color:var(--sub); font-size:14px; line-height:1.45}
.quiz-final-goals{display:flex; flex-wrap:wrap; justify-content:center; gap:8px; margin-top:var(--s1)}
.quiz-final-goals .quiz-final-goal{margin-top:0}
.settings-goal-chips{margin-top:var(--s1)}
.goal-status{min-height:1.4em; margin:var(--s1) 0 0; font-size:13.5px; font-weight:700; color:var(--accent-ink)}
.goal-status:empty{min-height:0; margin:0}

/* ---- small screens ---- */
@media (max-width:360px){
  :root{--gutter:16px}
  .quiz-title{font-size:25px}
  .quiz-field .quiz-num input{font-size:24px}
  .quiz-tiles-3{gap:8px}
  .quiz-tile-num{font-size:32px}
  .quiz-track-card{min-height:210px}
}

/* ---- reduced motion: no transforms, no animations ---- */
@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{animation:none!important; transition:none!important; scroll-behavior:auto!important}
  .quiz-option:active,.quiz-body-option:active,.quiz-chip-opt:active,.quiz-weekday:active,.quiz-tile:active,.btn:active,.quiz-back:active{transform:none}
  .quiz-tile::after{transform:none}
  .quiz-building-line{transform:none}
  .quiz-ring{--p:100}
}

/* ======================================================================
 * Today screen + workout player (Task 13)
 * Deliberately reuses the quiz's vocabulary rather than inventing a
 * second one: `.card`/`.chip`/`.btn`, `.quiz-segmented`/`.quiz-chip-opt`
 * (location toggle, focus-minutes picker), `.quiz-options`/`.quiz-option`
 * (feel screen), `.num`, `--grad`/`--glow`/`--r`/`--r-md`/`--s*` tokens.
 * ==================================================================== */

/* ---- Today: header / streak ---- */
.today-header{display:flex; align-items:center; justify-content:space-between; gap:var(--s2); margin-bottom:var(--s1)}
.today-date{font-family:var(--font-display); font-size:19px; font-weight:700}

/* ---- Today: rest-day / resume cards ---- */
.today-rest-card{text-align:center}
.today-rest-card .btn{width:auto; margin-inline:auto; padding-inline:var(--s3)}
.today-unforce{text-align:center;margin:-4px 0 8px}
.today-move{text-align:center;margin:4px 0 12px}
.today-equip-link{display:block;margin:10px auto 0;min-height:44px;background:none;border:0;box-shadow:none;text-decoration:underline;color:var(--muted,inherit);font-size:.85rem}
.today-rest-icon{font-size:34px; line-height:1; margin-bottom:var(--s1)}
.today-rest-sub{color:var(--sub); font-size:14px; font-weight:500; margin:4px 0 var(--s2)}
.today-resume-card .today-rest-sub{margin-bottom:var(--s2)}
.today-resume-actions{display:flex; gap:10px}
.today-resume-actions .btn{flex:1}

/* ---- Today: location segmented toggle ---- */
.today-location-toggle{margin-top:var(--s2)}

/* ---- Today: main workout card ---- */
.today-main-card{padding-bottom:20px}
.today-main-head{margin-bottom:2px}
.today-total-min{color:var(--accent-ink); font-weight:700; margin-bottom:var(--s1)}
.today-ex-list{display:flex; flex-direction:column; gap:10px; margin-top:var(--s2)}
.today-ex-row{display:flex; align-items:center; gap:12px; padding:10px 12px; border-radius:14px; background:var(--tile-40); border:1px solid var(--line)}
.today-ex-icon{flex:0 0 auto; width:38px; height:38px; border-radius:12px; display:flex; align-items:center; justify-content:center; font-size:18px; background:var(--card2)}
.today-ex-name{font-size:15px; font-weight:700; line-height:1.3}
.today-ex-sub{color:var(--sub); font-size:12.5px; font-weight:500; margin-top:2px}
.today-ex-min{flex:0 0 auto; font-size:12px}
/* Workout tab (Round 4): tap-to-peek exercise preview */
.workout-preview-hint{color:var(--sub); font-size:13.5px; margin:var(--s1) 0 0}
.workout-ex-btn{width:100%; text-align:start; color:inherit}
.workout-ex-btn .grow{display:flex; flex-direction:column}
.workout-video-dot{flex:0 0 auto; display:inline-flex; color:var(--accent-ink)}
.workout-video-dot .icn{width:18px; height:18px}
.workout-peek{margin:6px 4px 2px; padding:10px 12px; border-radius:12px; background:var(--card2); border:1px solid var(--line)}
.workout-peek-media{display:flex; flex-direction:column; align-items:center; margin-bottom:8px}
.workout-peek .player-video{max-width:100%; margin-top:0}
.workout-peek .player-embed{border:0}
.workout-peek .player-ai-note,.workout-peek .player-yt-note{max-width:100%}
.workout-peek-hint{margin:0 0 6px; color:var(--text); font-size:14px; line-height:1.45; text-wrap:pretty}
.workout-peek-meta{color:var(--sub); font-size:12.5px; font-weight:600}
/* Supersets (opt-in): a paired A1/A2 grouped under a small label */
.workout-superset{display:flex; flex-direction:column; gap:8px; min-width:0; padding-inline-start:10px; border-inline-start:3px solid var(--accent-ink)}
.workout-superset-label{align-self:flex-start; display:inline-flex; align-items:center; gap:6px; font-size:12px; font-weight:800}
.workout-superset-label .icn{width:14px; height:14px}

/* ---- Today: focus session ---- */
.today-focus-card .today-focus-minutes-label{color:var(--sub); font-size:12.5px; font-weight:700; letter-spacing:.04em; text-transform:uppercase; margin-top:var(--s2)}
[dir="rtl"] .today-focus-minutes-label{letter-spacing:0}
.today-focus-kinds{margin-top:var(--s2)}
.today-focus-kind{font-weight:700}
/* Fix round (final review) finding 3: an empty pool for the current
   location (e.g. an all-home `stretch` catalog toggled to Gym) renders
   disabled instead of silently no-opping the tap. */
.today-focus-kind.disabled{opacity:.4; pointer-events:none}
.today-focus-unavailable{margin-top:var(--s1)}

/* ---- Today: week strip ---- */
.today-week-strip{margin-top:var(--s2)}
.today-week-grid{display:grid; grid-template-columns:repeat(7, minmax(0, 1fr)); gap:6px; margin-top:var(--s1)}
.today-day-card{
  position:relative; display:flex; flex-direction:column; align-items:center; gap:4px;
  padding:10px 4px 8px; border-radius:14px; text-align:center;
  background:var(--card); border:1px solid var(--line); min-height:76px;
}
.today-day-card.today{border-color:rgba(45,212,191,.55); box-shadow:var(--glow)}
.today-day-card.done{background:rgba(45,212,191,.08); border-color:rgba(45,212,191,.3)}
.today-day-card.off{opacity:.7}
.today-day-icon{font-size:16px; line-height:1}
.today-day-wd{font-size:11px; font-weight:700; color:var(--sub)}
.today-day-sub{max-width:100%; font-size:9.5px; font-weight:600; color:var(--dim); line-height:1.2; min-height:11px; overflow-wrap:anywhere}
.today-day-badge{
  position:absolute; top:-7px; left:50%; transform:translateX(-50%);
  padding:1px 7px; border-radius:99px; background:var(--grad); color:var(--on-accent);
  font-size:9px; font-weight:800; letter-spacing:.03em; white-space:nowrap;
}

/* ---- Player: full-screen view-swap shell ---- */
#views.player-mode{padding-bottom:calc(var(--s3) + env(safe-area-inset-bottom, 0px))}
.player-view{display:flex; flex-direction:column; min-height:calc(100vh - 40px); min-height:calc(100dvh - 40px)}
.player-topbar{
  position:sticky; top:0; z-index:5; display:flex; align-items:center; gap:12px;
  margin:calc(var(--s2) * -1) calc(var(--gutter) * -1) 0; padding:var(--s2) var(--gutter) 12px;
  background:linear-gradient(var(--bg) 70%, var(--bg-0));
}
.player-quit-btn{pointer-events:auto; 
  flex:0 0 auto; width:40px; height:40px; border-radius:50%; font-size:16px;
  border:1px solid var(--line); background:var(--glass-60); color:var(--text);
  display:flex; align-items:center; justify-content:center;
}
.player-quit-btn:active{transform:scale(.94)}
.player-topbar-label{flex:1; color:var(--sub); font-size:14px; font-weight:700; text-align:center}

.player-body{flex:1; display:flex; flex-direction:column; align-items:center; text-align:center; padding-top:var(--s3)}
.player-phase-label{color:var(--sub); font-size:13px; font-weight:700; letter-spacing:.04em; text-transform:uppercase; margin-bottom:var(--s2)}
[dir="rtl"] .player-phase-label{letter-spacing:0}
.player-ex-name{font-family:var(--font-display); font-size:26px; font-weight:800; letter-spacing:-.02em; margin:0}
.player-ex-level{color:var(--accent-ink); font-size:14px; font-weight:700; margin-top:6px}
.player-last-time{color:var(--sub); font-size:13px; margin-top:4px}
.player-ex-hint{color:var(--sub); font-size:14px; font-weight:500; max-width:340px; margin:8px 0 0; text-wrap:pretty}
.player-caption{color:var(--sub); font-size:14px; font-weight:500; margin:8px 0 0}

.player-video-tile{
  display:flex; flex-direction:column; align-items:center; justify-content:center; gap:6px;
  width:100%; max-width:280px; aspect-ratio:16/9; margin-top:var(--s3);
  border-radius:var(--r-md); background:var(--card2); border:1px dashed var(--line2);
  color:var(--dim); font-size:13px; font-weight:600;
}
.player-video-tile span:first-child{font-size:26px}

/* Wave-1 exercise videos — premium card replacing the dashed placeholder
 * tile once a catalog entry's video.status is 'ready' (same footprint as
 * .player-video-tile above: 280px cap, 16:9, same top margin — so swapping
 * one for the other never shifts surrounding layout). 18px radius matches
 * the .quiz-body-option photo-card treatment used elsewhere in the app. */
.player-video{
  display:block; width:100%; max-width:280px; aspect-ratio:16/9; margin-top:var(--s3);
  border-radius:18px; object-fit:cover; background:var(--card2);
  border:1px solid var(--line2); box-shadow:0 8px 24px -8px rgba(0,0,0,.5);
}

/* ---- Immersive work screen (Round 4) ----
 * Full-bleed visual over the top ~55% of the viewport: the AI mp4 (cover) or
 * a muscle-group hero still. Its bottom melts into the page through
 * .player-hero-fade, built ONLY from the --bg / --bg-0 tokens so it lands on
 * the right page colour in both themes. The imagery itself is dark in both
 * themes, so the floating chips/close are dark glass in both too.
 * The hero's height is fixed up front (svh, clamped), so nothing shifts when
 * the video/image arrives; until then .player-backdrop paints a dark studio
 * placeholder. Positions use logical properties (RTL mirrors for free). */
.player-body.player-work{padding-top:0; animation-name:playerFadeIn; animation-duration:.28s}
@keyframes playerFadeIn{from{opacity:0} to{opacity:1}}
.player-hero{
  position:relative; isolation:isolate; overflow:hidden;
  align-self:stretch; margin:calc(var(--s2) * -1) calc(var(--gutter) * -1) 0;
  display:flex; flex-direction:column; justify-content:flex-end;
  height:56vh; height:56svh; min-height:300px; max-height:560px;
  padding:0 var(--gutter) 2px; text-align:center;
}
.player-hero.player-hero-compact{height:44vh; height:44svh; min-height:250px; max-height:460px}
.player-backdrop{
  position:absolute; inset:0; z-index:-2;
  background:radial-gradient(120% 75% at 50% 38%, #172440 0%, #0a0f1c 58%, #05080f 100%);
}
/* top scrim: part of the (always dark) imagery, keeps the chips legible */
.player-backdrop::after{
  content:''; position:absolute; inset:0 0 auto; height:120px;
  background:linear-gradient(rgba(3,6,12,.55), rgba(3,6,12,0));
}
.player-backdrop-media{display:block; width:100%; height:100%; object-fit:cover; object-position:50% 42%}
.player-hero .player-video.player-backdrop-cover{
  max-width:none; aspect-ratio:auto; margin:0; border:0; border-radius:0; box-shadow:none; background:transparent;
  object-position:50% 50%;
}
.player-hero-fade{
  position:absolute; inset:0; z-index:-1; pointer-events:none;
  background:linear-gradient(180deg, var(--bg-0) 0%, var(--bg-0) 44%, var(--bg) 100%);
  background:linear-gradient(180deg,
    var(--bg-0) 0%, var(--bg-0) 40%,
    color-mix(in srgb, var(--bg) 45%, transparent) 60%,
    color-mix(in srgb, var(--bg) 84%, transparent) 78%,
    var(--bg) 96%);
}
/* Sticky floating bar: a zero-height strip in the flow before the hero (same negative margins
 * as the hero, so it sits exactly over the hero's top edge); its content overflows downward
 * and sticks to the viewport top while the page scrolls. Being 0px tall it never blocks taps on
 * the hero/page beneath it; only its children (close, chips) are hit targets. */
.player-hero-top{
  position:sticky; top:0; z-index:5; height:0; align-self:stretch;
  margin:calc(var(--s2) * -1) calc(var(--gutter) * -1) 0;
}
.player-hero-top + .player-hero{margin-top:0}
.player-hero-top-in{pointer-events:none; 
  display:flex; flex-direction:column; gap:10px;
  padding:calc(10px + env(safe-area-inset-top, 0px)) var(--gutter) 0;
}
.player-ex-progress{display:flex; gap:4px}
.player-ex-progress i{flex:1 1 0; min-width:0; height:3px; border-radius:2px; background:rgba(255,255,255,.2)}
.player-ex-progress i.on{background:rgba(255,255,255,.75)}
.player-ex-progress i.cur{background:var(--grad); box-shadow:0 0 8px rgba(45,212,191,.55)}
.player-hero-bar{display:flex; align-items:flex-start; justify-content:space-between; gap:8px}
/* centre label ("Plan A · Exercise 2/5"): the same dark glass as the chips (it floats over page
 * content once the hero has scrolled away), allowed to wrap to two short lines at 360px */
.player-chip.player-hero-label{
  flex:1 1 0; min-width:0; justify-content:center; margin-top:6px;
  white-space:normal; text-align:center; text-wrap:balance; line-height:1.25; font-size:11.5px;
}
.player-hero-close{
  flex:0 0 auto; width:44px; height:44px; border-radius:50%; padding:0;
  display:inline-flex; align-items:center; justify-content:center;
  background:rgba(8,12,22,.55); border:1px solid rgba(255,255,255,.14); color:#fff;
  -webkit-backdrop-filter:blur(10px); backdrop-filter:blur(10px);
}
.player-hero-close .icn{width:18px; height:18px}
.player-hero-close:active{transform:scale(.94)}
.player-hero-chips{min-width:0; display:flex; flex-wrap:wrap; justify-content:flex-end; gap:6px; padding-top:6px}
.player-chip{
  display:inline-flex; align-items:center; gap:7px; max-width:100%; min-width:0;
  padding:6px 12px; border-radius:99px; white-space:nowrap;
  background:rgba(8,12,22,.6); border:1px solid rgba(255,255,255,.13); color:#fff;
  font-size:12px; font-weight:800; line-height:1.2;
  -webkit-backdrop-filter:blur(10px); backdrop-filter:blur(10px);
}
.player-set-chip{pointer-events:auto; letter-spacing:.08em; text-transform:uppercase}
.player-ss-chip{background:var(--grad); border-color:transparent; color:var(--on-accent)}
[dir="rtl"] .player-set-chip{letter-spacing:0}
.player-chip-text{min-width:0; overflow:hidden; text-overflow:ellipsis}
.player-chip-dot{
  flex:0 0 auto; width:7px; height:7px; border-radius:50%; font-style:normal;
  background:#ff3b4f; box-shadow:0 0 0 2px rgba(255,59,79,.22), 0 0 10px 1px rgba(255,59,79,.85);
}
.player-hero-text{position:relative; display:flex; flex-direction:column; align-items:center; min-width:0}
.player-hero .player-ex-name{font-size:30px; line-height:1.12; text-wrap:balance; overflow-wrap:anywhere; text-shadow:0 2px 18px rgba(0,0,0,.35)}
.player-hero .player-ex-level{margin-top:4px}
.player-hero .player-last-time{margin-top:3px}
.player-hero .player-ai-note,.player-soon-note{color:var(--dim); font-size:11px; font-weight:600; max-width:300px; margin:5px auto 0; text-wrap:balance}
html[data-theme="light"] .player-hero .player-ex-name{text-shadow:none}
.player-work .player-stepper{margin-top:14px}
.player-work .player-step-btn{width:56px; height:56px}
.player-work .player-step-val{font-size:46px; line-height:1.1}
.player-work .player-caption{margin-top:2px; font-size:13px}
.player-work .player-timer{margin-top:10px; line-height:1.1}
.player-work .player-set-dots{margin-top:12px}
.player-work .player-actions{margin-top:18px}
.player-work .player-field{margin-top:12px}
.player-work .player-field .player-stepper{margin-top:0}
.player-work .player-calib-hint{margin-top:12px}
/* the interim embed, framed, between the controls and the tips */
.player-yt-card{width:100%; max-width:340px; margin-top:var(--s3); padding:8px}
.player-yt-card .player-embed{max-width:none; margin:0; border-radius:12px; box-shadow:none}
.player-yt-card .player-yt-note{margin:8px auto 2px}
@media (min-width:600px){.player-hero{border-radius:0 0 var(--r) var(--r)}}

/* Form tips block + AI-video note (Task 19) */
.player-ai-note,.player-yt-note{color:var(--dim); font-size:11.5px; font-weight:600; max-width:280px; margin:6px auto 0; text-align:center; text-wrap:balance}
.player-tips{width:100%; max-width:340px; margin-top:var(--s3); padding:14px 16px; text-align:start}
.player-tips-title{color:var(--accent-ink); font-size:12px; font-weight:800; letter-spacing:.06em; text-transform:uppercase; margin-bottom:6px}
[dir="rtl"] .player-tips-title{letter-spacing:0}
.player-tips .player-ex-hint{max-width:none; margin:0 0 8px; color:var(--text)}
.player-tips-list{list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:7px}
.player-tip{position:relative; padding-inline-start:16px; color:var(--sub); font-size:13.5px; font-weight:500; line-height:1.4; text-wrap:pretty}
.player-tip::before{content:''; position:absolute; inset-inline-start:0; top:.55em; width:6px; height:6px; border-radius:50%; background:var(--grad)}
.player-tips.collapsed .player-tip.extra{display:none}
.player-tips-toggle{margin-top:8px; padding:6px 0; background:none; border:0; color:var(--accent-ink); font:inherit; font-size:13px; font-weight:700; cursor:pointer}

.player-stepper{display:flex; align-items:center; justify-content:center; gap:22px; margin-top:var(--s3)}
.player-step-btn{
  width:52px; height:52px; border-radius:50%; font-size:24px; font-weight:700;
  background:var(--card2); border:1px solid var(--line2); color:var(--text);
}
.player-step-btn:active{transform:scale(.92)}
.player-step-val{min-width:64px; font-size:40px; font-weight:800}

.player-timer{font-size:56px; font-weight:800; margin-top:var(--s3)}
.player-timer.rest{color:var(--accent-ink)}

.player-set-dots{display:flex; gap:8px; justify-content:center; margin-top:var(--s3)}
.player-set-dots i{width:9px; height:9px; border-radius:50%; background:var(--line2); font-style:normal}
.player-set-dots i.on{background:var(--grad); box-shadow:0 0 8px rgba(45,212,191,.6)}

.player-field{width:100%; max-width:280px; margin-top:var(--s3); text-align:start}
.player-field label{display:block; margin-bottom:6px; color:var(--sub); font-size:12.5px; font-weight:700; letter-spacing:.04em; text-transform:uppercase}
[dir="rtl"] .player-field label{letter-spacing:0}
.player-calib-hint{margin-top:var(--s2); font-weight:600}

/* ---- invalid input feedback (fix round 1, finding 3) ----
 * Applied to a `.quiz-num` field wrapper (e.g. the player's weighted-kg
 * input) or directly to a bare `input`/`select`/`textarea` when a typed
 * value is rejected — a danger-toned border/glow plus a brief shake, then
 * removed the moment the person edits the field again (see player.js). */
.quiz-num.invalid,
input.invalid,select.invalid,textarea.invalid{
  border-color:var(--danger);
  box-shadow:0 0 0 3px rgba(244,63,94,.18), 0 0 16px rgba(244,63,94,.35);
  animation:invalidShake .32s var(--ease);
}
@keyframes invalidShake{
  0%,100%{transform:translateX(0)}
  20%{transform:translateX(-6px)}
  40%{transform:translateX(5px)}
  60%{transform:translateX(-4px)}
  80%{transform:translateX(3px)}
}
@media (prefers-reduced-motion:reduce){
  .quiz-num.invalid,input.invalid,select.invalid,textarea.invalid{animation:none}
}

.player-actions{display:flex; flex-direction:column; gap:10px; width:100%; max-width:340px; margin-top:var(--s4)}

.player-quit-card{text-align:center; width:100%}

.player-feel-options{width:100%; max-width:340px; margin-top:var(--s3)}
.player-feel-options .quiz-tile{min-height:120px}
.player-feel-options .player-feel-emoji{font-size:28px}
.player-finalize-error{margin-top:var(--s2)}

.player-done-badge{font-size:48px; line-height:1; margin-bottom:var(--s1)}
.player-changes-title{align-self:flex-start; font-size:14px; color:var(--sub); margin:var(--s4) 0 var(--s1)}
.player-done .today-ex-list{width:100%; text-align:start}
.player-change-chip{font-size:11px}

.player-warmup-lines{width:100%; max-width:340px; text-align:start; display:flex; flex-direction:column; gap:10px}
.player-warmup-line{display:flex; align-items:center; gap:10px; font-size:15px; font-weight:600}
.player-warmup-line .tick{color:var(--accent-ink); font-size:12px}

/* ---- done screen: Share (Task 14) ---- */
.player-done-actions{margin-top:var(--s4)}
.player-share-caption{margin-top:0}

/* ======================================================================
 * Post-workout questionnaire (Task 14): body map + emphasize-next chips
 * ==================================================================== */
.qn-screen{width:100%}
.qn-mode-toggle{width:100%; max-width:320px; margin:var(--s2) auto 0}

.qn-figures-row{display:flex; justify-content:center; gap:16px; width:100%; max-width:360px; margin:var(--s3) auto 0}
.qn-figure-wrap{display:flex; flex-direction:column; align-items:center; flex:1 1 0; max-width:150px}
.qn-figure{width:100%; height:auto; overflow:visible}
.qn-figure-caption{margin-top:6px; color:var(--dim); font-size:11px; font-weight:700; letter-spacing:.04em; text-transform:uppercase}
[dir="rtl"] .qn-figure-caption{letter-spacing:0}

/* decorative silhouette — never intercepts a tap meant for a muscle blob */
.qn-outline{fill:rgba(255,255,255,.015); stroke:var(--line2); stroke-width:2; pointer-events:none}

.qn-muscle{
  fill:rgba(143,163,200,.12); stroke:var(--line2); stroke-width:1.75;
  cursor:pointer; transition:fill .15s ease, stroke .15s ease;
}
.qn-muscle-burned{fill:rgba(45,212,191,.55); stroke:var(--accent)}
.qn-muscle-notfelt{fill:rgba(125,143,181,.5); stroke:var(--dim)}
@media (hover:hover){
  .qn-muscle:not(.qn-muscle-burned):not(.qn-muscle-notfelt):hover{fill:rgba(143,163,200,.26)}
}

.qn-legend{width:100%; max-width:340px; margin:var(--s3) auto 0; display:flex; flex-direction:column; gap:8px; text-align:start}
.qn-legend-row{display:flex; align-items:center; gap:8px; flex-wrap:wrap}
.qn-legend-label{flex:0 0 auto; color:var(--sub); font-size:12.5px; font-weight:700; letter-spacing:.02em; min-width:64px}
.chip.muted{background:rgba(125,143,181,.12); color:var(--dim); border-color:rgba(125,143,181,.3)}

.qn-emphasize-chips{width:100%; max-width:400px; margin:var(--s2) auto 0; justify-content:center}
.qn-chip-disabled{opacity:.35; pointer-events:none}
.focus-chip{display:inline-flex; align-items:center; gap:6px}
.focus-chip .icn{width:18px; height:18px; flex:0 0 auto}
.qn-note-label{display:block; width:100%; max-width:400px; margin:var(--s3) auto 4px; color:var(--sub); font-size:13px; font-weight:700; text-align:start}
.qn-note{display:block; width:100%; max-width:400px; margin:0 auto; box-sizing:border-box; padding:10px 12px; border-radius:12px; border:1px solid var(--line2); background:transparent; color:inherit; font:inherit; font-size:15px; resize:none; text-align:start}
.settings-focus-chips{margin:var(--s2) 0; justify-content:flex-start}

.qn-skip-link{
  align-self:center; margin-top:6px; padding:8px 12px;
  color:var(--sub); font-size:14px; font-weight:600;
  text-decoration:underline; text-underline-offset:3px;
}
.qn-skip-link:active{opacity:.6}

/* ======================================================================
 * Progress screen (Task 15): weigh-in + trend chart, photo notes, session
 * history, sins & penance. Reuses `.card`/`.chip`/`.btn`/`.quiz-num`/
 * `.row`/`.grow`/`.num` rather than inventing a parallel vocabulary.
 * ==================================================================== */

.progress-title{font-family:var(--font-display); font-size:24px; margin:4px 0 0}

/* ---- weigh-in card ---- */
.progress-trend-big{display:flex; align-items:baseline; gap:10px; margin:var(--s2) 0 4px}
.progress-trend-big .num{font-family:var(--font-display); font-size:44px; font-weight:800; letter-spacing:-.02em}
.progress-trend-unit{color:var(--sub); font-size:13px; font-weight:600}
.progress-stats{display:flex; flex-wrap:wrap; gap:6px 16px; margin-top:2px; color:var(--sub); font-size:13px}
.progress-stats b{color:var(--text)}
/* Weigh-in row (owner bug, RTL 360px: the row leaked past the start edge). Causes: the bare
 * <input> kept its intrinsic ~20ch width and the .quiz-num flex item had no min-width:0, so it
 * could not shrink; the button was flex:0 0 auto so a long localized label (he/de) could never
 * yield. Fix: field = flex 1 1 120px with min-width:0 and a shrinkable input; the row wraps, so
 * a long label drops under the field instead of overflowing; the button may itself shrink. */
.progress-weigh-row{display:flex; flex-wrap:wrap; gap:10px; align-items:center; margin-top:var(--s2)}
.progress-weigh-row .quiz-num{flex:1 1 120px; min-width:0}
.progress-weigh-row .quiz-num input{flex:1 1 auto; width:100%; min-width:0; padding:0; border:0; background:none; box-shadow:none; color:inherit; text-align:center; font-size:20px; font-weight:700}
.progress-weigh-row .quiz-num input::placeholder{color:var(--ph)}
.progress-weigh-row .btn{width:auto; flex:0 1 auto; max-width:100%; min-width:0; white-space:normal}

/* ---- trend chart ---- */
.progress-chart-card h3{margin-bottom:2px}
.progress-chart-svg{width:100%; height:auto; display:block; margin-top:var(--s1)}
.progress-chart-legend{display:flex; gap:16px; margin-top:6px; color:var(--sub); font-size:12px}
.progress-chart-legend span{display:inline-flex; align-items:center; gap:6px}
.progress-chart-empty,
.progress-history-empty{text-align:center}
.progress-chart-empty-icon{font-size:34px; line-height:1; margin-bottom:var(--s1)}
.progress-history-empty-title{font-weight:700; font-size:15px; margin-top:2px}

/* ---- body-photo note card ---- */
.progress-photo-card .chip{margin-top:6px}

/* ---- session history ---- */
.progress-history-list{display:flex; flex-direction:column; gap:10px; margin-top:var(--s2)}
.progress-history-row{display:flex; align-items:center; gap:12px; padding:10px 12px; border-radius:14px; background:var(--tile-40); border:1px solid var(--line)}
.progress-history-icon{flex:0 0 auto; font-size:20px}
.progress-history-title{font-weight:700; font-size:14.5px}
.progress-history-sub{color:var(--sub); font-size:12.5px; margin-top:2px}

/* ---- sins & penance ---- */
.progress-sin-grid{display:flex; flex-wrap:wrap; gap:10px; margin-top:var(--s2)}
.progress-debt-list{display:flex; flex-direction:column; gap:10px; margin-top:var(--s2)}
.progress-debt-card{
  display:flex; align-items:center; gap:12px; padding:12px;
  border-radius:14px; background:rgba(244,63,94,.08); border:1px solid rgba(244,63,94,.25);
}
.progress-debt-card.done{background:rgba(52,211,153,.08); border-color:rgba(52,211,153,.25); opacity:.65}
.progress-debt-emoji{flex:0 0 auto; font-size:20px}
.progress-debt-sin{font-weight:700; font-size:14px}
.progress-debt-penalty{color:var(--sub); font-size:12.5px; margin-top:2px}
.progress-debt-card.done .progress-debt-sin,
.progress-debt-card.done .progress-debt-penalty{text-decoration:line-through}

/* Shared muted paragraph — the progress screen's own equivalent of
 * today.js's `.today-rest-sub` (same visual treatment, own class so this
 * section doesn't reach across screens for it). */
.progress-sub{color:var(--sub); font-size:14px; font-weight:500; margin:4px 0 var(--s2)}

/* ======================================================================
 * Library screen (Task 16): search, muscle/location/focus filter chips,
 * result cards (sliced to 40 + "show more" — 205-entry perf), detail sheet.
 * Reuses `.card`/`.chip`/`.btn`/`.row`/`.grow`/`.num`/`.fadeUp` throughout.
 * ==================================================================== */

.lib-search-wrap{margin-top:var(--s2)}
.lib-search-input{
  width:100%; padding:15px 16px; font-size:16px; color:var(--text);
  background:var(--card); border:1px solid var(--line); border-radius:var(--r-md);
  transition:border-color .2s ease, box-shadow .2s ease;
}
.lib-search-input::placeholder{color:var(--dim); opacity:1}
.lib-search-input:focus{outline:none; border-color:var(--accent); box-shadow:0 0 0 3px rgba(45,212,191,.18), var(--glow)}

/* ---- filter chip rows (muscle ×16 / location / focus kind) ---- */
.lib-filters{margin-top:var(--s2); display:flex; flex-direction:column; gap:var(--s2)}
.lib-filter-label{color:var(--sub); font-size:12.5px; font-weight:700; letter-spacing:.04em; text-transform:uppercase; margin-bottom:6px}
[dir="rtl"] .lib-filter-label{letter-spacing:0}
.lib-filter-row{
  display:flex; gap:8px; overflow-x:auto; padding-bottom:2px;
  -webkit-overflow-scrolling:touch; scrollbar-width:none;
}
.lib-filter-row::-webkit-scrollbar{display:none}
.lib-chip{
  flex:0 0 auto; display:inline-flex; align-items:center; white-space:nowrap;
  font-size:13px; font-weight:700; padding:8px 14px; border-radius:99px;
  background:var(--card2); color:var(--sub); border:1px solid var(--line);
  transition:border-color .2s ease, background-color .2s ease, color .2s ease;
}
.lib-chip:active{transform:scale(.96)}
.lib-chip.sel{background:rgba(45,212,191,.14); color:var(--accent-ink); border-color:rgba(45,212,191,.4)}
@media (hover:hover){ .lib-chip:not(.sel):hover{border-color:var(--line2); color:var(--text)} }

/* ---- result cards ---- */
.lib-results{margin-top:var(--s1)}
.lib-list{display:flex; flex-direction:column; gap:10px; margin-top:var(--s1)}
.lib-card{
  display:flex; align-items:center; gap:12px; width:100%; text-align:start;
  padding:12px; border-radius:16px;
  background:var(--card); border:1px solid var(--line);
  transition:transform .12s ease, border-color .2s ease, background-color .2s ease;
}
.lib-card:active{transform:scale(.98)}
@media (hover:hover){ .lib-card:hover{border-color:var(--line2); background-color:var(--hover-bg)} }
.lib-card-icon{
  flex:0 0 auto; width:44px; height:44px; border-radius:14px;
  display:flex; align-items:center; justify-content:center; font-size:20px;
  background:var(--card2);
}
.lib-card-name{font-size:15px; font-weight:700; line-height:1.3}
.lib-card-meta{display:flex; flex-wrap:wrap; gap:6px; margin-top:6px}
.lib-card-sub{color:var(--dim); font-size:12.5px; font-weight:600; margin-top:4px}
.lib-show-more{margin-top:var(--s2)}

.lib-empty{text-align:center; padding:var(--s4) var(--s2)}

/* ---- detail sheet (bottom sheet overlay) ----
 * `.lib-sheet-backdrop` and `.lib-sheet` are deliberately SIBLINGS, not
 * parent/child — main.js's one delegated click listener resolves an action
 * via `ev.target.closest('[data-act]')`, so if the sheet card were nested
 * INSIDE the backdrop div, any plain-content tap inside the sheet (nothing
 * itself carrying a data-act) would bubble up and match the backdrop's own
 * `data-act="lib-close"` first — closing the sheet on every tap, including
 * ones meant for its own content. As siblings, the backdrop only ever
 * matches when the dimmed area itself is the actual tap target. */
.lib-sheet-backdrop{
  position:fixed; inset:0; z-index:60;
  background:rgba(6,10,20,.72); -webkit-backdrop-filter:blur(2px); backdrop-filter:blur(2px);
}
.lib-sheet{
  position:fixed; z-index:61; left:0; right:0; bottom:0;
  max-width:560px; margin:0 auto; max-height:82vh; overflow-y:auto;
  padding:20px var(--gutter) calc(28px + env(safe-area-inset-bottom, 0px));
  background:var(--card); border:1px solid var(--line2); border-radius:24px 24px 0 0;
  box-shadow:0 -12px 40px -8px rgba(0,0,0,.6);
}
.lib-sheet-close{
  position:absolute; top:14px; inset-inline-end:14px; z-index:1;
  width:36px; height:36px; border-radius:50%; font-size:14px;
  background:var(--card2); border:1px solid var(--line2); color:var(--text);
  display:flex; align-items:center; justify-content:center;
}
.lib-sheet-close:active{transform:scale(.94)}
.lib-sheet-head{text-align:center; padding-top:6px}
.lib-sheet-head .lib-card-icon{margin:0 auto 6px; width:56px; height:56px; font-size:26px}
.lib-sheet-head .lib-filter-row{justify-content:center; overflow-x:visible; flex-wrap:wrap; margin-top:8px}
.lib-sheet-section{font-size:14px; color:var(--sub); margin:var(--s3) 0 var(--s1)}
.lib-sheet .player-video-tile{margin:var(--s2) auto 0}

.lib-level-list{display:flex; flex-direction:column; gap:10px; margin-top:var(--s1)}
.lib-level-row{
  display:flex; align-items:flex-start; gap:12px; padding:12px; border-radius:14px;
  background:var(--tile-40); border:1px solid var(--line);
}
.lib-level-row.current{background:rgba(45,212,191,.08); border-color:rgba(45,212,191,.3)}
.lib-level-idx{
  flex:0 0 auto; width:24px; height:24px; border-radius:8px; margin-top:1px;
  display:flex; align-items:center; justify-content:center;
  background:var(--card2); color:var(--sub); font-size:12px; font-weight:700;
}
.lib-level-row.current .lib-level-idx{background:var(--grad); color:var(--on-accent)}
.lib-level-name{font-size:14.5px; font-weight:700; display:flex; align-items:center; gap:8px; flex-wrap:wrap}
.lib-level-tag{font-size:10.5px}
.lib-level-hint{color:var(--sub); font-size:12.5px; font-weight:500; margin-top:2px; line-height:1.4}

/* ======================================================================
 * Settings screen (Task 16): stacked `.card` sections, reusing
 * `.quiz-segmented`/`.quiz-weekdays`/`.quiz-field` for controls rather than
 * inventing new form vocabulary — only a switch + a select needed anything new.
 * ==================================================================== */

.quiz-field-label{
  display:block; margin:0 0 var(--s1); color:var(--sub);
  font-size:13px; font-weight:700; letter-spacing:.04em; text-transform:uppercase;
}
[dir="rtl"] .quiz-field-label{letter-spacing:0}

.settings-row{display:flex; align-items:center; justify-content:space-between; gap:var(--s2); padding:6px 0; font-size:15px; font-weight:600}
.settings-supersets-hint{margin-top:0; font-size:13px}

.settings-switch{
  position:relative; flex:0 0 auto; width:48px; height:28px; border-radius:99px;
  background:var(--card2); border:1px solid var(--line2);
  transition:background-color .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.settings-switch-thumb{
  position:absolute; top:2px; inset-inline-start:2px; width:22px; height:22px; border-radius:50%;
  background:var(--dim); transition:transform .2s var(--ease), background-color .2s ease;
}
.settings-switch.on{background:var(--grad); border-color:transparent; box-shadow:var(--glow)}
.settings-switch.on .settings-switch-thumb{transform:translateX(20px); background:var(--on-accent)}
[dir="rtl"] .settings-switch.on .settings-switch-thumb{transform:translateX(-20px)}

.settings-select{
  width:100%; padding:14px 16px; font-size:16px; color:var(--text);
  background:var(--card); border:1px solid var(--line); border-radius:var(--r-md);
}
.settings-select:focus{outline:none; border-color:var(--accent); box-shadow:0 0 0 3px rgba(45,212,191,.18), var(--glow)}

.settings-wipe-confirm{
  margin-top:var(--s2); padding:16px; border-radius:14px;
  background:rgba(244,63,94,.06); border:1px solid rgba(244,63,94,.25);
}
.settings-wipe-confirm h3{font-size:15px; margin-bottom:4px}

/* Re-engagement round: My Account danger section + the delete-account sheet + goodbye. */
.settings-danger{border:1px solid rgba(244,63,94,.3)}
.settings-danger h3{color:var(--neg-ink)}
.settings-delete-list{margin:4px 0 12px; padding-inline-start:20px; line-height:1.6; overflow-wrap:anywhere}
.settings-delete-list li{margin-bottom:2px}
.settings-delete-warning{margin:0 0 12px; color:var(--neg-ink); font-size:14px; line-height:1.5}
.settings-delete-sheet label{overflow-wrap:anywhere}
.settings-delete-sheet input[type="email"]{
  width:100%; padding:14px 16px; font-size:16px; color:var(--text);
  background:var(--card); border:1px solid var(--line); border-radius:var(--r-md);
}
.settings-delete-sheet input[type="email"]:focus-visible{outline:none; border-color:var(--accent); box-shadow:0 0 0 3px rgba(45,212,191,.18)}
.settings-delete-sheet .today-resume-actions{flex-wrap:wrap}
.account-goodbye{max-width:440px; margin:0 auto; padding:48px 16px; text-align:center}
.account-goodbye h1{font-size:24px; margin:16px 0 8px}
.account-goodbye p{color:var(--sub); line-height:1.6; margin:0 0 24px}

/* ======================================================================
 * Visual round 4 — premium line-icon system (app/js/icons.js).
 * Every OS emoji is gone; icons are inline SVG strokes colored by CSS.
 * `.icn` sizes to 1em of its container, so each container's existing
 * font-size still sets the glyph size; the rules below only fine-tune
 * where a line icon wants a different optical size than an emoji did.
 * Default tone is --sub; accent/selected contexts get the turquoise or
 * the brand gradient (#icn-grad paint server, defined in index.html).
 * ==================================================================== */
.icn{
  display:inline-block; flex:0 0 auto; width:1em; height:1em;
  vertical-align:-.14em; overflow:visible;
}
.icn-defs{position:absolute; width:0; height:0; overflow:hidden; pointer-events:none}
.icn-grad{stroke:url(#icn-grad)}
/* the soft accent container (exercise rows, library cards, history rows) */
.icn-tile{
  flex:0 0 auto; width:40px; height:40px; border-radius:12px;
  display:flex; align-items:center; justify-content:center;
  background:rgba(45,212,191,.10); border:1px solid rgba(45,212,191,.22);
  color:var(--accent-ink); font-size:20px; line-height:1;
}

/* ---- tab bar ---- */
nav#tabs button .ic{display:flex; filter:none; opacity:.85}
nav#tabs button .ic .icn{width:22px; height:22px}
nav#tabs button.sel .ic{opacity:1}
nav#tabs button.sel .ic .icn{stroke:url(#icn-grad)}
.empty-state-icon{color:var(--accent-ink)}
.empty-state-icon .icn{width:36px; height:36px; stroke-width:1.5}

/* ---- quiz option / tile icon containers ---- */
.quiz-option-icon{
  width:40px; height:40px; border-radius:12px; color:var(--sub);
  background:rgba(45,212,191,.10); border:1px solid rgba(45,212,191,.18);
}
.quiz-option-icon .icn{width:20px; height:20px}
.quiz-tile .quiz-option-icon{border-radius:14px}
.quiz-tile .quiz-option-icon .icn{width:26px; height:26px}
.quiz-tile.quiz-tile-wide .quiz-option-icon{width:40px; height:40px; border-radius:12px}
.quiz-tile.quiz-tile-wide .quiz-option-icon .icn{width:20px; height:20px}
.quiz-option.sel .quiz-option-icon,
.quiz-tile.sel .quiz-option-icon{color:var(--accent-ink); border-color:rgba(45,212,191,.4)}
.quiz-option.sel .quiz-option-icon .icn,
.quiz-tile.sel .quiz-option-icon .icn{stroke:url(#icn-grad)}
.quiz-tile .quiz-track-icon{border:0; border-radius:50%}
.quiz-tile .quiz-track-icon .icn{width:42px; height:42px; stroke-width:1.5}
.quiz-tile-clock{color:var(--sub)}
.quiz-tile.sel .quiz-tile-clock{color:var(--accent-ink)}
.quiz-tile.sel .quiz-tile-clock .icn{stroke:url(#icn-grad)}
.quiz-hero-icon{display:flex; color:var(--accent-ink)}
.quiz-hero-icon .icn{width:36px; height:36px; stroke-width:1.5; stroke:url(#icn-grad)}
.quiz-label-icon{color:var(--accent-ink)}
.quiz-label-icon .icn{width:16px; height:16px; vertical-align:-3px}
.quiz-delta-icon{display:inline-flex; color:var(--accent-ink)}
.quiz-delta-icon .icn{width:20px; height:20px}
.quiz-greeting-wave{display:inline-flex}
.quiz-greeting-wave .icn{width:20px; height:20px}
.quiz-final-echo{color:var(--accent-ink)}
.quiz-final-echo .icn{width:20px; height:20px}
.quiz-final-goal .quiz-option-icon{border-radius:50%; color:var(--accent-ink)}
.quiz-final-goal .quiz-option-icon .icn{width:17px; height:17px}
.quiz-summary-icon.icn-tile{width:36px; height:36px; border-radius:11px; font-size:18px}

/* ---- chips / segmented toggles / buttons carrying a leading icon ---- */
.quiz-segmented .quiz-chip-opt{display:inline-flex; align-items:center; justify-content:center; gap:6px}
.quiz-chip-opt .icn{width:17px; height:17px}
.chip .icn{width:14px; height:14px}
.streak-chip .icn{width:15px; height:15px}
.btn .icn{width:18px; height:18px}

/* ---- Today ---- */
.today-rest-icon{display:flex; justify-content:center; color:var(--accent-ink)}
.today-rest-icon .icn{width:34px; height:34px; stroke-width:1.5; stroke:url(#icn-grad)}
.today-day-icon{display:flex; justify-content:center; align-items:center; height:16px; color:var(--dim)}
.today-day-icon .icn{width:16px; height:16px}
.today-day-card.today .today-day-icon,
.today-day-card.done .today-day-icon{color:var(--accent-ink)}
.today-day-card.done .today-day-icon .icn{stroke-width:2.25}

/* ---- Player ---- */
.player-quit-btn,
.lib-sheet-close{display:inline-flex; align-items:center; justify-content:center}
.player-quit-btn .icn,
.lib-sheet-close .icn{width:18px; height:18px}
.player-video-tile span:first-child{display:inline-flex; color:var(--sub)}
.player-video-tile span:first-child .icn{width:24px; height:24px; stroke-width:1.5}
.player-feel-options .player-feel-emoji .icn{width:26px; height:26px}
.player-done-badge{display:flex; justify-content:center}
.player-done-badge .icn{width:52px; height:52px; stroke-width:1.4; stroke:url(#icn-grad)}
.player-warmup-line .tick{display:inline-flex}
.player-warmup-line .tick .icn{width:14px; height:14px; stroke-width:2.25}

/* ---- Progress ---- */
.progress-chart-empty-icon{display:flex; justify-content:center; color:var(--sub)}
.progress-chart-empty-icon .icn{width:34px; height:34px; stroke-width:1.5}
.progress-history-icon.icn-tile{font-size:18px}
.progress-feel{width:15px; height:15px; vertical-align:-3px; color:var(--accent-ink)}
.progress-feel-pending{color:var(--dim)}
.progress-focus-badge{display:inline-flex; margin-inline-end:5px; vertical-align:-2px}
.progress-focus-badge .icn{width:15px; height:15px}
.progress-debt-emoji.icn-tile{width:36px; height:36px; border-radius:11px; font-size:18px}

/* ---- Library ---- */
.lib-card-icon.icn-tile{width:44px; height:44px; border-radius:13px; font-size:21px}
.lib-sheet-head .lib-card-icon.icn-tile{width:56px; height:56px; border-radius:16px; font-size:27px}

/* ====================================================================
 * Visual round 5 — color richness + "Did you know?" interstitials
 * ==================================================================== */

/* ---- icon tile tints (owner: "a bit of color for the eyes") ----
 * Three tints, all from the EXISTING palette: teal (--accent), cyan
 * (--accent2) and a soft coral from the --danger hue. quiz.js's
 * ICON_TINTS assigns them per option, deliberately mixed per screen. The
 * selected state still wins: gradient ring + gradient icon stroke. */
.tint-teal{--tint:45,212,191; --tint-a:.12; --tint-fg:#2DD4BF}
.tint-cyan{--tint:6,182,212; --tint-a:.12; --tint-fg:#06B6D4}
.tint-coral{--tint:244,63,94; --tint-a:.10; --tint-fg:#fb7185}
.quiz-option-icon.tinted{
  color:var(--tint-fg);
  background:rgba(var(--tint), var(--tint-a));
  border-color:rgba(var(--tint), .24);
}
.quiz-tile .quiz-option-icon.quiz-track-icon.tinted{
  background:radial-gradient(circle, rgba(var(--tint), .22), rgba(var(--tint), .04) 70%);
  box-shadow:inset 0 0 0 1px rgba(var(--tint), .22);
}
/* selected: one family again — teal-glass tile, full-gradient stroke */
.quiz-option.sel .quiz-option-icon.tinted,
.quiz-tile.sel .quiz-option-icon.tinted{
  color:var(--accent-ink); background:rgba(45,212,191,.16); border-color:rgba(45,212,191,.4);
}
.quiz-tile.sel .quiz-option-icon.quiz-track-icon.tinted{
  background:radial-gradient(circle, rgba(45,212,191,.24), rgba(45,212,191,.05) 70%);
  box-shadow:inset 0 0 0 2px rgba(45,212,191,.55), 0 0 28px rgba(45,212,191,.35);
}
.quiz-final-goal .quiz-option-icon.tinted{color:var(--tint-fg)}

/* ---- "Did you know?" interstitials (quiz steps i3 / i6 / i13) ----
 * The photo lives on a fixed full-viewport layer OUTSIDE the animated
 * stage (a transformed ancestor would re-anchor position:fixed during the
 * fadeUp), under a bottom-up dark scrim so the copy block stays legible. */
.quiz-dyk-bg{
  position:fixed; inset:0; z-index:0; pointer-events:none;
  background:var(--bg) center / cover no-repeat;
  opacity:0; transition:opacity .35s ease;
}
.quiz-dyk-bg::after{
  content:""; position:absolute; inset:0;
  background:linear-gradient(0deg, rgba(6,10,20,.97) 0%, rgba(6,10,20,.88) 32%, rgba(6,10,20,.30) 62%, rgba(6,10,20,.55) 100%);
}
.quiz.is-dyk .quiz-dyk-bg{opacity:1}
.quiz-brand,.quiz-stage{position:relative; z-index:1}
.quiz.is-dyk .quiz-topbar{background:linear-gradient(rgba(6,10,20,.55), rgba(6,10,20,0))}
.quiz-body-dyk::before{max-height:none}
.quiz-dyk{margin-top:auto; padding-bottom:var(--s1)}
.quiz-dyk-eyebrow{
  display:inline-flex; align-items:center; gap:8px; margin:0 0 var(--s2);
  font-family:var(--font-display); font-size:13px; font-weight:700;
  letter-spacing:.14em; text-transform:uppercase;
}
.quiz-dyk-eyebrow-text{
  background:var(--grad); -webkit-background-clip:text; background-clip:text;
  -webkit-text-fill-color:transparent; color:var(--accent-ink);
}
[dir="rtl"] .quiz-dyk-eyebrow{letter-spacing:.02em; font-size:15px}
.quiz-dyk-spark{display:inline-flex}
.quiz-dyk-spark .icn{width:18px; height:18px; stroke:url(#icn-grad)}
.quiz-dyk-title{
  margin:0 0 var(--s2); color:#fff;
  font-size:30px; font-weight:800; line-height:1.25; letter-spacing:-.02em;
  text-wrap:balance; text-shadow:0 2px 18px rgba(0,0,0,.55);
}
[dir="rtl"] .quiz-dyk-title{letter-spacing:0}
.quiz-dyk-text{
  margin:0; color:rgba(232,238,252,.86);
  font-size:16px; font-weight:500; line-height:1.6; text-wrap:pretty;
  text-shadow:0 1px 10px rgba(0,0,0,.5);
}
.quiz-body-dyk .quiz-cta{margin-top:var(--s4)}
@media (max-width:360px){ .quiz-dyk-title{font-size:26px} }
@media (prefers-reduced-motion:reduce){ .quiz-dyk-bg{transition:none} }

/* =====================================================================
 * Feature round A — coach presence, food log, on-device progress photos.
 * Palette/typography untouched: only existing tokens + rgba() of the
 * existing accent/accent2/danger hues and the tint-* classes above.
 * ===================================================================== */

/* ---- coach avatar + chat bubble ---- */
.coach-avatar{
  flex:0 0 auto; display:inline-flex; align-items:center; justify-content:center;
  border-radius:50%; background:var(--grad); padding:2px;
  box-shadow:0 0 18px rgba(45,212,191,.28);
}
.coach-avatar img{display:block; width:100%; height:100%; border-radius:50%; background:var(--bg); object-fit:cover}
.coach-avatar-sm{width:40px; height:40px}
.coach-avatar-lg{width:112px; height:112px; padding:3px; box-shadow:0 0 44px rgba(45,212,191,.35)}
.coach-bubble{
  position:relative; display:flex; align-items:flex-start; gap:12px;
  margin-top:var(--s2); padding:14px 16px;
  background:linear-gradient(135deg, rgba(45,212,191,.10), rgba(6,182,212,.05));
  border:1px solid rgba(45,212,191,.28); border-radius:var(--r);
  border-start-start-radius:6px;
}
.coach-bubble-body{padding-top:1px}
.coach-name{
  font-family:var(--font-display); font-size:12.5px; font-weight:700; letter-spacing:.06em; text-transform:uppercase;
  background:var(--grad); -webkit-background-clip:text; background-clip:text; -webkit-text-fill-color:transparent; color:var(--accent-ink);
}
[dir="rtl"] .coach-name{letter-spacing:0; font-size:13.5px}
.coach-text{margin:3px 0 0; color:var(--text); font-size:15px; font-weight:500; line-height:1.5; text-wrap:pretty}
.coach-dismiss{
  flex:0 0 auto; display:inline-flex; align-items:center; justify-content:center;
  width:32px; height:32px; margin:-6px -8px 0 0; border-radius:50%;
  color:var(--dim); background:none; border:0; opacity:.7;
}
[dir="rtl"] .coach-dismiss{margin:-6px 0 0 -8px}
.coach-dismiss:hover{opacity:1; color:var(--text)}
.coach-dismiss .icn{width:16px; height:16px}
/* Round 4: the Today coach brief — slightly larger presence, still a card. */
.today-coach{padding:16px 18px; border-inline-start:3px solid var(--accent); min-width:0}
.today-coach .coach-avatar-sm{width:48px; height:48px}
.today-coach .coach-bubble-body{min-width:0}
.coach-text-lead{margin-top:4px; font-size:17.5px; font-weight:650; line-height:1.38; letter-spacing:-.005em}
.coach-text-rest{margin-top:6px; font-size:14.5px; font-weight:450; line-height:1.55; color:var(--dim)}
.coach-text-rest:empty{display:none}
.coach-inline{margin-top:var(--s2)}
.coach-inline .coach-text{font-size:14.5px}
.player-done-coach{text-align:start; margin:var(--s2) 0 var(--s1)}

/* ---- one-time onboarding welcome (full screen, after q16) ---- */
#views.coach-mode{padding-bottom:calc(var(--s3) + env(safe-area-inset-bottom, 0px))}
.coach-welcome{min-height:calc(100dvh - var(--s5)); display:flex}
.coach-welcome-bg{
  position:fixed; inset:0; z-index:0; pointer-events:none;
  background:var(--bg) url("../img/bg-sunrise.webp") center / cover no-repeat;
}
.coach-welcome-bg::after{
  content:""; position:absolute; inset:0;
  background:linear-gradient(0deg, rgba(6,10,20,.97) 0%, rgba(6,10,20,.86) 40%, rgba(6,10,20,.35) 72%, rgba(6,10,20,.6) 100%);
}
.coach-welcome-inner{position:relative; z-index:1; flex:1; display:flex; flex-direction:column; padding-top:var(--s5)}
.coach-welcome-top{display:flex; flex-direction:column; align-items:center; gap:var(--s2); margin-top:auto}
.coach-welcome-top .coach-avatar-lg{animation:pop .5s var(--ease) .1s both}
.coach-welcome-eyebrow{
  font-family:var(--font-display); font-size:13px; font-weight:700; letter-spacing:.14em; text-transform:uppercase;
  background:var(--grad); -webkit-background-clip:text; background-clip:text; -webkit-text-fill-color:transparent; color:var(--accent-ink);
}
[dir="rtl"] .coach-welcome-eyebrow{letter-spacing:.02em; font-size:15px}
.coach-welcome-text{
  margin:var(--s3) 0 var(--s4); color:#fff; text-align:center;
  font-size:24px; font-weight:700; line-height:1.4; letter-spacing:-.01em; text-wrap:balance;
  text-shadow:0 2px 18px rgba(0,0,0,.55); animation-delay:.15s;
}
[dir="rtl"] .coach-welcome-text{letter-spacing:0}
.coach-welcome-cta{margin-top:0}
@media (prefers-reduced-motion:reduce){ .coach-welcome-top .coach-avatar-lg{animation:none} }

/* ---- food log ---- */
.food-input{
  width:100%; padding:14px 16px; font-size:16px; color:var(--text);
  background:var(--card2); border:1px solid var(--line); border-radius:var(--r-md);
  transition:border-color .2s ease, box-shadow .2s ease;
}
.food-input::placeholder{color:var(--dim); opacity:1}
.food-input:focus{outline:none; border-color:var(--accent); box-shadow:0 0 0 3px rgba(45,212,191,.18)}
.food-label{margin:var(--s2) 0 var(--s1); color:var(--sub); font-size:12.5px; font-weight:700; letter-spacing:.04em; text-transform:uppercase}
[dir="rtl"] .food-label{letter-spacing:0; font-size:13px}
.food-types{gap:8px}
.food-types .quiz-chip-opt{min-height:40px; padding:8px 14px; font-size:14px}
.food-types .quiz-chip-opt .icn{width:16px; height:16px}
.food-types .quiz-chip-opt.sel{padding-block:7px; padding-inline:10px 14px}
.food-types .quiz-chip-opt.sel .icn{display:none}
.food-types .quiz-chip-opt.sel::before{width:18px; height:18px}
.food-levels{display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:8px; border-radius:var(--r-md)}
.food-levels.invalid{animation:invalidShake .32s var(--ease)}
.food-levels.invalid .food-level{border-color:rgba(244,63,94,.5)}
.food-level{
  display:flex; flex-direction:column; align-items:center; gap:6px;
  padding:12px 6px; border-radius:var(--r-md);
  background:var(--card2); border:1px solid var(--line); color:var(--sub);
  font-size:13.5px; font-weight:700;
  transition:border-color .2s ease, background-color .2s ease, color .2s ease, transform .12s ease;
}
.food-level:active{transform:scale(.98)}
.food-level-icon{
  display:flex; align-items:center; justify-content:center; width:36px; height:36px; border-radius:50%;
  color:var(--tint-fg); background:rgba(var(--tint), var(--tint-a));
}
.food-level-icon .icn{width:19px; height:19px}
.food-level.sel{color:var(--text); border-color:rgba(var(--tint), .7); background:rgba(var(--tint), .12); box-shadow:0 0 0 1px rgba(var(--tint), .35) inset}
.food-error{margin:var(--s1) 0 0; color:var(--danger); font-size:13px; font-weight:600}
.food-save{margin-top:var(--s2)}
.food-recent-title{margin:var(--s3) 0 var(--s1); font-size:14px; color:var(--sub); font-weight:700}
.food-list{display:flex; flex-direction:column; gap:8px}
.food-row{display:flex; align-items:center; gap:12px; padding:10px 12px; border-radius:14px; background:var(--tile-40); border:1px solid var(--line)}
.food-dot{flex:0 0 auto; width:10px; height:10px; border-radius:50%; background:var(--tint-fg); box-shadow:0 0 10px rgba(var(--tint), .5)}
.food-row-name{font-weight:700; font-size:14.5px; overflow-wrap:anywhere}
.food-row-sub{color:var(--sub); font-size:12.5px; margin-top:2px}
.food-badge{flex:0 0 auto}
.food-debt-icon.icn-tile{color:var(--tint-fg); background:rgba(var(--tint), var(--tint-a)); border-color:rgba(var(--tint), .24)}

/* ---- progress photos ---- */
.photo-privacy{display:flex; align-items:flex-start; gap:8px; margin:4px 0 var(--s2); color:var(--sub); font-size:13.5px; line-height:1.5}
.photo-privacy .icn{flex:0 0 auto; width:16px; height:16px; margin-top:2px; color:var(--accent-ink)}
.photo-capture-grid{display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:12px; margin-top:var(--s2)}
.photo-slot{
  position:relative; display:flex; flex-direction:column; align-items:stretch; gap:8px;
  padding:0; background:none; border:0; color:var(--text); text-align:center;
}
.photo-slot-empty,.photo-slot-img{width:100%; aspect-ratio:3 / 4; border-radius:var(--r-md)}
.photo-slot-empty{
  display:flex; flex-direction:column; align-items:center; justify-content:center; gap:8px;
  border:1.5px dashed rgba(45,212,191,.4); background:rgba(45,212,191,.05); color:var(--accent-ink); font-size:13px; font-weight:600;
}
.photo-slot-empty .icn{width:28px; height:28px; stroke-width:1.5}
.photo-slot-img{display:block; object-fit:cover; background:var(--card2); border:1px solid var(--line2)}
.photo-slot-label{font-size:13px; font-weight:700; color:var(--sub)}
.photo-slot:active .photo-slot-empty,.photo-slot:active .photo-slot-img{transform:scale(.98)}
.photo-status{margin-top:var(--s2)}
.photo-panel{margin-top:var(--s2); padding:14px; border-radius:var(--r); background:var(--tile-45); border:1px solid var(--line2)}
.photo-panel-head{margin-bottom:var(--s1)}
.photo-panel-title{font-weight:800; font-size:15px}
.photo-pair{display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:10px}
.photo-big{margin:0; display:flex; flex-direction:column; gap:6px}
.photo-big-img,.photo-big .photo-ph{width:100%; aspect-ratio:3 / 4; border-radius:14px; object-fit:cover; background:var(--card2); border:1px solid var(--line)}
.photo-big figcaption{font-size:12.5px; color:var(--sub); font-weight:600; text-align:center}
.photo-ph{display:flex; align-items:center; justify-content:center; color:var(--dim)}
.photo-ph .icn{width:22px; height:22px; stroke-width:1.5; opacity:.6}
.photo-delete{margin-top:var(--s2)}
.photo-delete.armed{background:rgba(244,63,94,.12)}
.photo-cmp-label{margin:var(--s1) 0 6px; color:var(--sub); font-size:12.5px; font-weight:700}
.photo-cmp-chips{display:flex; flex-wrap:wrap; gap:6px}
.photo-cmp-chip{min-height:34px; padding:6px 12px; font-size:13px; direction:ltr}
.photo-cmp-chip.sel{border-color:var(--accent); color:var(--accent-ink); background:rgba(45,212,191,.1)}
.photo-cmp-row{margin-top:var(--s2)}
.photo-cmp-pose{margin-bottom:6px; font-weight:700; font-size:13.5px}
.photo-share-caption{margin:var(--s2) 0 var(--s1); font-size:13px}
.photo-gallery-head{margin-top:var(--s3)}
.photo-gallery-head h4{font-size:15px}
.photo-compare-btn .icn,.photo-share .icn,.photo-delete .icn,.food-save .icn{width:16px; height:16px}
.photo-timeline{display:flex; flex-direction:column; gap:8px; margin-top:var(--s1)}
.photo-date-row{
  display:flex; align-items:center; gap:12px; width:100%; padding:8px 8px 8px 14px; text-align:start;
  border-radius:14px; background:var(--tile-40); border:1px solid var(--line); color:var(--text);
}
[dir="rtl"] .photo-date-row{padding:8px 14px 8px 8px}
.photo-date-label{font-weight:700; font-size:14px}
.photo-date-thumbs{display:flex; gap:6px}
.photo-thumb{display:block; width:44px; height:58px; border-radius:9px; overflow:hidden; background:var(--card2)}
.photo-thumb-img,.photo-thumb .photo-ph{display:flex; width:100%; height:100%; object-fit:cover}
.photo-thumb .photo-ph .icn{width:16px; height:16px}

/* =====================================================================
 * Feature round B — personal-key Gemini layer: food-photo macros + the
 * AI coach chat sheet. Reuses `.card`/`.chip`/`.btn`/`.lib-sheet*`/
 * `.coach-*`/`.food-*` vocabulary throughout; only genuinely new bits
 * (chat bubbles, macro chips, the typing indicator) get their own rules.
 * ===================================================================== */

/* ---- "Talk to Coach" trigger (coach bubble + player done-screen) ---- */
.coach-chat-trigger{
  display:inline-flex; align-items:center; gap:6px; margin-top:10px; padding:7px 12px;
  border-radius:99px; background:rgba(45,212,191,.12); border:1px solid rgba(45,212,191,.32);
  color:var(--accent-ink); font-size:12.5px; font-weight:700;
}
.coach-chat-trigger:active{transform:scale(.97)}
.coach-chat-trigger .icn{width:14px; height:14px}
@media (hover:hover){ .coach-chat-trigger:hover{background:rgba(45,212,191,.18)} }

/* ---- AI coach chat sheet (reuses .lib-sheet-backdrop/.lib-sheet/.lib-sheet-close) ---- */
.coach-chat-sheet{display:flex; flex-direction:column; max-height:88vh; padding-top:18px}
.coach-chat-head{display:flex; align-items:center; gap:10px; padding-inline-end:36px}
.coach-chat-title{font-weight:800; font-size:16px; display:flex; align-items:center; gap:8px}
.coach-chat-beta{
  padding:2px 8px; font-size:10.5px; font-weight:800; letter-spacing:.04em; text-transform:uppercase;
  background:var(--grad); color:var(--on-accent); border:0;
}
.coach-chat-messages{
  display:flex; flex-direction:column; gap:10px; margin-top:var(--s2); padding-top:2px;
  max-height:52vh; overflow-y:auto;
}
.coach-chat-empty{color:var(--sub); font-size:14px; line-height:1.5; text-align:center; margin:var(--s3) 0}
.coach-chat-msg{max-width:80%; padding:10px 14px; border-radius:16px; font-size:14.5px; line-height:1.5}
.coach-chat-msg-text{margin:0; overflow-wrap:anywhere}
.coach-chat-msg-coach{
  align-self:flex-start; background:var(--tile-60); border:1px solid var(--line);
  border-start-start-radius:6px; color:var(--text);
}
.coach-chat-msg-user{
  align-self:flex-end; background:var(--grad); color:var(--on-accent); font-weight:600;
  border-end-end-radius:6px;
}
.coach-chat-typing{display:flex; align-items:center; gap:5px; padding:12px 16px}
.coach-chat-dot{
  width:6px; height:6px; border-radius:50%; background:var(--dim);
  animation:coachChatDot 1.1s ease-in-out infinite;
}
.coach-chat-dot:nth-child(2){animation-delay:.15s}
.coach-chat-dot:nth-child(3){animation-delay:.3s}
@keyframes coachChatDot{0%,60%,100%{opacity:.3; transform:translateY(0)} 30%{opacity:1; transform:translateY(-3px)}}
.coach-chat-error{margin:var(--s1) 0 0; color:var(--danger); font-size:13px; font-weight:600}
.coach-chat-input-row{display:flex; align-items:center; gap:10px; margin-top:var(--s2)}
.coach-chat-input{
  flex:1; min-width:0; padding:13px 16px; font-size:15px; color:var(--text);
  background:var(--card2); border:1px solid var(--line); border-radius:99px;
}
.coach-chat-input:focus{outline:none; border-color:var(--accent); box-shadow:0 0 0 3px rgba(45,212,191,.18)}
.coach-chat-input:disabled{opacity:.6}
.coach-chat-send{flex:0 0 auto; width:44px; height:44px; padding:0; border-radius:50%; display:flex; align-items:center; justify-content:center}
.coach-chat-send .icn{width:18px; height:18px}
@media (prefers-reduced-motion:reduce){ .coach-chat-dot{animation:none; opacity:.7} }

/* ---- food-photo AI macros (food log card) ---- */
.food-ai-trigger{margin:var(--s2) 0}
.food-ai-consent{display:flex; align-items:flex-start; gap:8px; margin:8px 0 0; color:var(--sub); font-size:12.5px; line-height:1.5}
.food-ai-consent .icn{flex:0 0 auto; width:15px; height:15px; margin-top:1px; color:var(--accent-ink)}
.food-ai-status{margin:var(--s1) 0}
.food-ai-result{
  margin:var(--s2) 0; padding:14px 16px; border-radius:var(--r-md);
  background:rgba(45,212,191,.06); border:1px solid rgba(45,212,191,.25);
}
.food-ai-result-head{display:flex; align-items:center; gap:8px; font-size:12.5px; font-weight:700; letter-spacing:.04em; text-transform:uppercase; color:var(--accent-ink)}
[dir="rtl"] .food-ai-result-head{letter-spacing:0}
.food-ai-result-head .icn{width:15px; height:15px}
.food-ai-name{margin:8px 0 0; font-size:14px; color:var(--text); overflow-wrap:anywhere}
.food-ai-macros{display:flex; align-items:center; flex-wrap:wrap; gap:10px 14px; margin-top:10px}
.food-ai-kcal{font-size:26px; font-weight:800; color:var(--text)}
.food-ai-kcal .num{font-size:30px}
.food-ai-chips{display:flex; flex-wrap:wrap; gap:6px}
.food-ai-hint{margin:8px 0 0; color:var(--warn); font-size:12.5px; font-weight:600}
.food-kcal-badge{color:var(--sub)}

/* ---- Settings: language + country pickers ---- */
.flag{width:24px; height:16px; border-radius:3px; overflow:hidden; flex:0 0 auto; display:block}
.settings-pick-row{
  display:flex; align-items:center; justify-content:space-between; gap:var(--s2); width:100%;
  padding:12px 0; font-size:15px; font-weight:600; color:var(--text); text-align:start;
  border-bottom:1px solid var(--line);
}
.settings-pick-row:active{opacity:.7}
.settings-pick-val{display:inline-flex; align-items:center; gap:8px; color:var(--sub); font-weight:500}
.settings-chev{width:16px; height:16px; color:var(--dim)}
[dir="rtl"] .settings-chev{transform:scaleX(-1)}
.settings-sheet{display:flex; flex-direction:column; gap:var(--s2); max-height:82vh}
.settings-sheet-title{font-size:18px; font-weight:800; margin:0; padding-inline-end:44px}
.settings-opt-list{display:flex; flex-direction:column; overflow-y:auto; min-height:0}
.settings-opt{
  display:flex; align-items:center; gap:12px; width:100%; padding:13px 6px;
  font-size:16px; font-weight:600; color:var(--text); text-align:start;
  border-bottom:1px solid var(--line);
}
.settings-opt:active{background:var(--card2)}
.settings-opt.sel{color:var(--accent-ink)}
.settings-opt-name{flex:1 1 auto}
.settings-opt-code{color:var(--dim); font-size:13px; font-weight:500}
.settings-opt-check{width:18px; height:18px; color:var(--accent-ink)}

/* =====================================================================
 * Round 2 — Compete (Monthly Transformation). Photo-first: the before/now
 * pair is the hero of every card. Reuses the card, chip, btn, lib-sheet and
 * settings-opt vocabulary; logical properties everywhere (RTL-safe).
 * ===================================================================== */
nav#tabs button[hidden]{display:none}
nav#tabs button .lbl{max-width:100%; padding:0 2px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap}

.compete-view{padding-bottom:var(--s2)}
.compete-hero{
  position:relative; overflow:hidden; margin-top:var(--s1);
  border-radius:24px; border:1px solid var(--line2); min-height:208px;
  display:flex; align-items:flex-end; background:var(--card);
  box-shadow:0 18px 40px -18px rgba(0,0,0,.7);
}
.compete-hero-art{
  position:absolute; inset:0;
  background:
    linear-gradient(180deg, rgba(11,18,32,.15) 0%, rgba(11,18,32,.72) 58%, rgba(11,18,32,.96) 100%),
    radial-gradient(420px 220px at 90% 0%, rgba(45,212,191,.28), transparent 70%),
    url("../img/bg-gym.webp") center/cover no-repeat;
}
.compete-hero-body{position:relative; padding:20px; display:flex; flex-direction:column; align-items:flex-start; gap:8px}
.compete-title{font-size:28px; line-height:1.15; letter-spacing:-.02em}
.compete-sub{margin:0; color:var(--sub); font-size:14.5px; font-weight:500; max-width:420px}
.compete-cycle-chip{-webkit-backdrop-filter:blur(6px); backdrop-filter:blur(6px)}
.compete-countdown{background:rgba(11,18,32,.6)}
.compete-countdown .icn,.compete-cycle-chip .icn{width:14px; height:14px}
.compete-flash{margin:var(--s2) 0 0; display:flex; width:fit-content; max-width:100%; white-space:normal}

.compete-section-title{font-size:19px; margin:var(--s4) 0 var(--s1)}
.compete-state-card{text-align:center; display:flex; flex-direction:column; align-items:center; gap:6px}
.compete-state-card .btn{margin-top:var(--s1)}
.compete-state-icon{width:52px; height:52px; border-radius:16px; font-size:24px; margin-bottom:4px}
.compete-state-icon.muted{background:var(--card2); border-color:var(--line2); color:var(--sub)}
.compete-join-card{
  background:linear-gradient(160deg, rgba(45,212,191,.12), rgba(6,182,212,.04) 60%), var(--card);
  border-color:rgba(45,212,191,.3);
}
.compete-join-cta{margin-top:var(--s2)}
.compete-join-cta .icn{width:20px; height:20px}

/* before/now pair — consistent 3:4, rounded, lazy images */
.compete-pair{display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:6px}
.compete-shot{position:relative; margin:0; border-radius:14px; overflow:hidden; background:var(--card2); aspect-ratio:3 / 4}
.compete-img{display:block; width:100%; height:100%; object-fit:cover}
.compete-tag{
  position:absolute; inset-inline-start:8px; bottom:8px; padding:3px 9px; border-radius:99px;
  font-size:11px; font-weight:800; letter-spacing:.04em; text-transform:uppercase;
  background:rgba(11,18,32,.78); color:var(--text); border:1px solid rgba(143,163,200,.25);
}
.compete-tag-now{color:var(--accent-ink); border-color:rgba(45,212,191,.45)}
[dir="rtl"] .compete-tag{letter-spacing:0}
.compete-sk{display:block; aspect-ratio:3 / 4; border-radius:14px; background:linear-gradient(100deg, var(--card2) 30%, #1f2d52 50%, var(--card2) 70%); background-size:200% 100%; animation:competeSk 1.4s ease-in-out infinite}
@keyframes competeSk{0%{background-position:100% 0} 100%{background-position:-100% 0}}
@media (prefers-reduced-motion:reduce){ .compete-sk{animation:none} }

/* gallery */
.compete-scopes{display:flex; gap:8px; margin-bottom:var(--s2)}
.compete-scope{display:inline-flex; align-items:center; gap:8px}
.compete-scope .icn{width:15px; height:15px}
.compete-scope[disabled]{opacity:.45; pointer-events:none}
.compete-gallery{display:flex; flex-direction:column; gap:var(--s2)}
.compete-card{
  position:relative; padding:10px; border-radius:var(--r);
  background:var(--card); border:1px solid var(--line);
  box-shadow:0 14px 34px -20px rgba(0,0,0,.8);
}
.compete-card.own{border-color:rgba(45,212,191,.35)}
.compete-rank{
  position:absolute; z-index:2; top:18px; inset-inline-end:18px; width:28px; height:28px; border-radius:50%;
  display:flex; align-items:center; justify-content:center; font-size:13px; font-weight:800;
  background:rgba(11,18,32,.82); color:var(--text); border:1px solid rgba(143,163,200,.3);
}
.compete-rank.r1{background:var(--grad); color:var(--on-accent); border:0; box-shadow:var(--glow)}
.compete-card-foot{display:flex; align-items:center; gap:10px; padding:10px 4px 2px}
.compete-name{font-weight:800; font-size:15px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.compete-you{font-size:11px}
.compete-votes .icn{width:13px; height:13px}
.compete-vote{
  display:inline-flex; align-items:center; gap:6px; min-height:40px; padding:8px 14px; border-radius:99px;
  background:var(--card2); border:1px solid var(--line2); color:var(--sub); font-weight:800; font-size:14px;
  transition:transform .12s ease, background-color .2s ease, color .2s ease, border-color .2s ease;
}
.compete-vote .icn{width:18px; height:18px}
.compete-vote:active{transform:scale(.94)}
.compete-vote.on{background:rgba(244,63,94,.14); border-color:rgba(244,63,94,.45); color:var(--neg-ink)}
.compete-vote.on .icn{fill:currentColor}
.compete-vote[disabled]{opacity:.7}
.compete-more{
  width:36px; height:36px; border-radius:50%; display:flex; align-items:center; justify-content:center;
  color:var(--dim); flex:0 0 auto;
}
.compete-more .icn{width:18px; height:18px}
.compete-more:active{background:var(--card2)}
.compete-caption{margin:6px 4px 2px; color:var(--sub); font-size:14px; line-height:1.45; overflow-wrap:anywhere}
.compete-menu{
  position:absolute; z-index:3; inset-inline-end:14px; bottom:54px; min-width:160px; padding:6px;
  background:var(--card2); border:1px solid var(--line2); border-radius:14px; box-shadow:0 16px 36px -10px rgba(0,0,0,.7);
}
.compete-menu-item{display:flex; align-items:center; gap:10px; width:100%; padding:10px 12px; border-radius:10px; font-size:14.5px; font-weight:700; color:var(--text); text-align:start}
.compete-menu-item .icn{width:16px; height:16px; color:var(--danger)}
.compete-menu-item:active{background:rgba(244,63,94,.1)}
.compete-empty{text-align:center; display:flex; flex-direction:column; align-items:center; gap:10px}
.compete-empty .btn .icn{width:16px; height:16px}
.cflag{box-shadow:0 0 0 1px rgba(0,0,0,.25)}

/* winners strip */
.compete-winners-strip{display:flex; gap:12px; overflow-x:auto; padding-bottom:6px; scroll-snap-type:x mandatory}
.compete-winner{
  flex:0 0 172px; scroll-snap-align:start; padding:10px; border-radius:var(--r-md);
  background:linear-gradient(170deg, rgba(251,191,36,.10), transparent 55%), var(--card);
  border:1px solid rgba(251,191,36,.28);
}
.compete-winner.global{border-color:rgba(251,191,36,.55); box-shadow:0 0 24px rgba(251,191,36,.12)}
.compete-winner-head{display:flex; align-items:center; gap:6px; margin-bottom:8px; color:var(--warn); font-size:12px; font-weight:800}
.compete-laurel{width:20px; height:20px; color:var(--warn)}
.compete-winner-scope{overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.compete-winner-pair{display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:4px}
.compete-winner-img{display:block; width:100%; aspect-ratio:3 / 4; object-fit:cover; border-radius:10px; background:var(--card2)}
.compete-winner-foot{display:flex; align-items:center; gap:8px; margin-top:8px}
.compete-winner-foot .compete-name{font-size:13.5px}
.compete-winner-votes{display:inline-flex; align-items:center; gap:5px; margin-top:4px; color:var(--sub); font-size:12px; font-weight:700}
.compete-winner-votes .icn{width:12px; height:12px}

/* my entry */
.compete-mine .compete-pair{margin-top:var(--s1)}
.compete-mine-meta{margin:10px 0 var(--s1)}
.compete-mine-actions{flex-wrap:wrap}
.compete-mine-actions .icn{width:16px; height:16px}
.compete-textarea{
  width:100%; resize:vertical; min-height:64px; padding:12px 14px; font-size:15px; line-height:1.45; color:var(--text);
  background:var(--card2); border:1px solid var(--line); border-radius:var(--r-md);
}
.compete-textarea::placeholder{color:var(--dim)}
.compete-textarea:focus{outline:none; border-color:var(--accent); box-shadow:0 0 0 3px rgba(45,212,191,.18)}
.compete-field{margin:var(--s2) 0 0}
.compete-inline-error{display:flex; width:fit-content; max-width:100%; margin:var(--s1) 0 0; white-space:normal; line-height:1.4}
.compete-replace{margin-top:var(--s2); display:flex; flex-direction:column; gap:10px; padding:12px; border-radius:var(--r-md); background:var(--tile-45); border:1px solid var(--line2)}

/* sheets: join wizard, report, withdraw */
.compete-sheet{display:flex; flex-direction:column; gap:var(--s2); max-height:88vh}
.compete-steps{display:flex; gap:6px; margin:0; padding:0; list-style:none}
.compete-steps li{
  flex:1; display:flex; align-items:center; gap:6px; padding:6px 8px; border-radius:10px; min-width:0;
  font-size:12px; font-weight:700; color:var(--dim); background:var(--card2); border:1px solid var(--line);
  overflow:hidden; white-space:nowrap; text-overflow:ellipsis;
}
.compete-steps li .num{flex:0 0 auto; width:18px; height:18px; border-radius:50%; display:flex; align-items:center; justify-content:center; background:var(--line2); color:var(--text); font-size:11px}
.compete-steps li.cur{color:var(--accent-ink); border-color:rgba(45,212,191,.4)}
.compete-steps li.cur .num,.compete-steps li.done .num{background:var(--grad); color:var(--on-accent)}
.compete-slots{display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:10px}
.compete-slot{display:flex; flex-direction:column; gap:6px; text-align:center}
.compete-slot-img,.compete-slot-empty,.compete-slot-ready{
  width:100%; aspect-ratio:3 / 4; border-radius:var(--r-md); display:flex; align-items:center; justify-content:center; object-fit:cover;
}
.compete-slot-img{display:block; background:var(--card2); border:1px solid var(--line2)}
.compete-slot-empty{flex-direction:column; gap:8px; border:1.5px dashed rgba(45,212,191,.4); background:rgba(45,212,191,.05); color:var(--accent-ink); font-size:13px; font-weight:600}
.compete-slot-empty .icn{width:28px; height:28px; stroke-width:1.5}
.compete-slot-ready{background:rgba(45,212,191,.08); color:var(--accent-ink)}
.compete-slot.picking .compete-slot-img,.compete-slot.picking .compete-slot-empty{outline:2px solid var(--accent); outline-offset:2px}
.compete-slot-label{font-size:13px; font-weight:700; color:var(--sub)}
.compete-tip{display:flex; align-items:flex-start; gap:8px; margin:0; font-size:13px}
.compete-tip .icn{flex:0 0 auto; width:15px; height:15px; margin-top:2px; color:var(--accent-ink)}
.compete-picker{display:flex; flex-direction:column; gap:10px; padding:12px; border-radius:var(--r-md); background:var(--tile-45); border:1px solid var(--line2)}
.compete-picker-label{color:var(--sub); font-size:12.5px; font-weight:700; letter-spacing:.04em; text-transform:uppercase}
[dir="rtl"] .compete-picker-label{letter-spacing:0}
.compete-shot-grid{display:grid; grid-template-columns:repeat(4, minmax(0,1fr)); gap:6px; max-height:240px; overflow-y:auto}
.compete-shot-opt{position:relative; border-radius:10px; overflow:hidden; background:var(--card2); aspect-ratio:3 / 4}
.compete-shot-thumb{display:block; width:100%; height:100%; object-fit:cover}
.compete-shot-date{position:absolute; inset-inline:0; bottom:0; padding:2px 0; font-size:10.5px; font-weight:700; background:rgba(11,18,32,.75)}
.compete-shot-opt:active{transform:scale(.96)}
.compete-file-btn .icn{width:16px; height:16px}
.compete-consent-list{margin:0; padding:0; list-style:none; display:flex; flex-direction:column; gap:12px}
.compete-consent-list li{display:flex; align-items:flex-start; gap:12px; font-size:14.5px; line-height:1.5; color:var(--text)}
.compete-consent-list .icn{flex:0 0 auto; width:20px; height:20px; margin-top:1px; color:var(--accent-ink)}
.compete-check{
  display:flex; align-items:center; gap:12px; width:100%; padding:14px; border-radius:var(--r-md); text-align:start;
  background:var(--card2); border:1px solid var(--line2); font-size:15px; font-weight:700; color:var(--text);
}
.compete-check.on{border-color:rgba(45,212,191,.5); background:rgba(45,212,191,.08)}
.compete-check.invalid{border-color:rgba(244,63,94,.6)}
.compete-check-box{
  flex:0 0 auto; width:24px; height:24px; border-radius:7px; display:flex; align-items:center; justify-content:center;
  border:2px solid var(--line2); background:var(--bg); color:var(--on-accent);
}
.compete-check.on .compete-check-box{background:var(--grad); border-color:transparent}
.compete-check-box .icn{width:16px; height:16px; stroke-width:2.5}
.compete-join-nav{justify-content:flex-end}
.compete-join-error{display:flex; flex-direction:column; align-items:flex-start; gap:8px}
.compete-withdraw-body{margin:0; color:var(--text); font-size:15px; line-height:1.55}

/* Today teaser card */
.compete-teaser{position:relative; overflow:hidden; padding:0; border-color:rgba(45,212,191,.25)}
.compete-teaser-art{
  height:92px;
  background:
    linear-gradient(180deg, var(--card-0) 0%, var(--card) 100%),
    url("../img/bg-sunrise.webp") center/cover no-repeat;
}
.compete-teaser-body{padding:0 20px 20px; margin-top:-28px; position:relative}
.compete-teaser-head{align-items:flex-start; margin-bottom:var(--s1)}
.compete-teaser-head h3{margin-bottom:4px}
.compete-teaser-icon{background:var(--card); box-shadow:0 8px 20px -8px rgba(0,0,0,.7)}
.compete-teaser .compete-countdown{background:rgba(45,212,191,.12)}

/* ---- feature-request box (Round 2, Task 9) ---- */
.settings-req-label svg{color:var(--accent-ink)}
.settings-req-label{color:var(--text); font-weight:600}
.settings-requests-host{overflow-y:auto; min-height:0}
.req-view{display:flex; flex-direction:column; gap:var(--s2)}
.req-intro{margin:0}
.req-form{display:flex; flex-direction:column; gap:var(--s1)}
.req-label{color:var(--sub); font-size:13px; font-weight:700; letter-spacing:.04em; text-transform:uppercase}
.req-text{
  width:100%; min-height:104px; resize:vertical; padding:12px 14px; font:inherit; font-size:15px; line-height:1.5;
  color:var(--text); background:var(--card2); border:1px solid var(--line2); border-radius:var(--r-md);
}
.req-text:focus{outline:none; border-color:var(--accent); box-shadow:0 0 0 3px rgba(45,212,191,.18)}
.req-form-foot{display:flex; align-items:center; justify-content:space-between; gap:var(--s2)}
.req-counter{color:var(--dim); font-size:13px; font-weight:700}
.req-counter.over{color:var(--danger)}
.req-flash{display:flex; width:fit-content; max-width:100%; white-space:normal; margin:0}
.req-list-title{margin:var(--s1) 0 0; font-size:15px}
.req-list{list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:var(--s1)}
.req-item{padding:12px 14px; background:var(--card2); border:1px solid var(--line); border-radius:var(--r-md)}
.req-item.pending{opacity:.7}
.req-item-head{display:flex; align-items:center; justify-content:space-between; gap:var(--s1)}
.req-when{color:var(--dim); font-size:12px; font-weight:600}
.req-body{margin:8px 0 0; font-size:15px; line-height:1.5; overflow-wrap:anywhere; white-space:pre-wrap}
.req-note{
  display:flex; gap:8px; align-items:flex-start; margin:10px 0 0; padding:10px 12px; font-size:14px; line-height:1.45;
  color:var(--text); background:rgba(45,212,191,.08); border-inline-start:3px solid var(--accent); border-radius:10px;
}
.req-note .icn{flex:0 0 auto; width:16px; height:16px; margin-top:2px; color:var(--accent-ink)}
.req-status .icn{width:14px; height:14px}
.req-status-new{color:var(--sub); background:rgba(143,163,200,.12); border-color:rgba(143,163,200,.35)}
.req-status-planned{color:var(--accent2-ink); background:rgba(6,182,212,.12); border-color:rgba(6,182,212,.35)}
.req-status-in_progress{color:var(--accent-ink); background:rgba(45,212,191,.12); border-color:rgba(45,212,191,.35)}
.req-status-done{color:var(--good); background:rgba(52,211,153,.12); border-color:rgba(52,211,153,.35)}
.req-status-declined{color:var(--dim); background:rgba(125,143,181,.10); border-color:rgba(125,143,181,.3)}
.req-empty,.req-signedout{display:flex; flex-direction:column; align-items:center; gap:var(--s1); text-align:center; padding:var(--s3) var(--s2)}
.req-empty h3,.req-signedout h3{margin:0}
.req-empty .progress-sub,.req-signedout .progress-sub{margin:0}
.req-empty-ic{display:flex; align-items:center; justify-content:center; width:52px; height:52px; border-radius:50%; background:rgba(45,212,191,.12); color:var(--accent-ink)}
.req-empty-ic .icn{width:26px; height:26px}
.req-error{display:flex; flex-direction:column; align-items:flex-start; gap:var(--s1)}

/* ---- web funnel bridge (Round 2, Task 20): "your plan is ready" ---- */
.funnel-hls{list-style:none; margin:var(--s3) 0 0; padding:0; width:100%; max-width:360px; display:flex; flex-direction:column; gap:10px; text-align:start}
.funnel-hl{
  display:flex; align-items:center; gap:12px;
  padding:12px 14px; border-radius:var(--r-md);
  background:rgba(45,212,191,.06); border:1px solid rgba(45,212,191,.22);
  font-weight:700; font-size:15px; line-height:1.35;
}
.funnel-hl .quiz-option-icon{width:36px; height:36px; border-radius:50%; margin:0; flex:0 0 auto; color:var(--accent-ink)}
.funnel-hl .quiz-option-icon .icn{width:18px; height:18px}
.quiz-body.enter .funnel-hl{animation:fadeUp .4s var(--ease) calc(.25s + var(--i, 0) * 80ms) both}
.funnel-actions{display:flex; flex-direction:column; align-items:stretch; gap:var(--s1); margin-top:auto; padding-top:var(--s3)}
.funnel-actions .btn{text-decoration:none}
.funnel-later{
  background:none; border:0; padding:10px; min-height:44px;
  color:var(--sub); font-weight:600; font-size:15px; text-decoration:underline; text-underline-offset:3px; cursor:pointer;
}
@media (hover:hover){ .funnel-later:hover{color:var(--text)} }
@media (prefers-reduced-motion: reduce){ .quiz-body.enter .funnel-hl{animation:none} }

/* ---- invite friends (Round 2, Task 24) ---- */
.ref-code-card{display:flex; flex-direction:column; align-items:center; gap:var(--s2); padding:var(--s3) var(--s2); border:1px solid var(--line, rgba(255,255,255,.12)); border-radius:var(--r3, 16px); background:rgba(45,212,191,.06)}
.ref-label{color:var(--sub); font-size:13px; font-weight:700; letter-spacing:.04em; text-transform:uppercase}
.ref-code{font-size:38px; font-weight:800; letter-spacing:.14em; color:var(--accent-ink); user-select:all; direction:ltr}
.ref-actions{display:flex; flex-wrap:wrap; justify-content:center; gap:var(--s1)}
.ref-actions .btn{display:inline-flex; align-items:center; gap:8px}
.ref-actions .btn svg{width:18px; height:18px}
.ref-stats{display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:var(--s1)}
.ref-stat{display:flex; flex-direction:column; align-items:center; gap:4px; padding:var(--s2); border-radius:var(--r2, 12px); background:rgba(255,255,255,.04); text-align:center; color:var(--sub); font-size:13px}
.ref-stat .num{font-size:28px; font-weight:800; color:var(--text)}
.ref-how{margin:0}

@font-face{font-family:'Ploni'; src:url('../fonts/ploni-regular.woff2?v=2') format('woff2'); font-weight:400; font-style:normal; font-display:swap}
@font-face{font-family:'Ploni'; src:url('../fonts/ploni-medium.woff2?v=2') format('woff2'); font-weight:500; font-style:normal; font-display:swap}
@font-face{font-family:'Ploni'; src:url('../fonts/ploni-demibold.woff2?v=2') format('woff2'); font-weight:600; font-style:normal; font-display:swap}
@font-face{font-family:'Ploni'; src:url('../fonts/ploni-bold.woff2?v=2') format('woff2'); font-weight:700; font-style:normal; font-display:swap}
@font-face{font-family:'Ploni'; src:url('../fonts/ploni-ultrabold.woff2?v=2') format('woff2'); font-weight:800; font-style:normal; font-display:swap}

/* Dan's directive: Hebrew ALWAYS renders Ploni, hard-forced. The 'Ploni'
 * family here has NO unicode-range: on he pages every element gets it,
 * with Manrope/Space Grotesk as per-glyph fallback for anything Ploni
 * lacks. The unicode-range overlays above remain for mixed-language text
 * on non-he pages. */
html[lang="he"] :is(body,h1,h2,h3,h4,h5,p,a,span,li,b,strong,em,small,div,button,input,select,textarea,label,td,th){
  font-family:'Ploni','Manrope','Space Grotesk',system-ui,sans-serif !important;
}

/* ---------- Cardio view + Today card (Round 3) ----------
 * Reuses .card/.chip/.btn/.quiz-chips/.quiz-segmented/.quiz-field/.lib-sheet*.
 * Logical properties throughout (RTL); everything wraps, nothing scrolls sideways. */
.cardio-view{min-width:0}
.cardio-head{display:flex; align-items:center; gap:var(--s1); margin-bottom:var(--s1)}
.cardio-title{font-size:24px; margin:0}
.cardio-back{
  width:40px; height:40px; border-radius:50%; flex:0 0 auto;
  display:inline-flex; align-items:center; justify-content:center;
  background:var(--card); border:1px solid var(--line2); color:var(--text);
}
.cardio-back:active{transform:scale(.94)}
.cardio-back .icn{width:20px; height:20px; transform:scaleX(-1)}
[dir="rtl"] .cardio-back .icn{transform:none}

/* ring */
.cardio-ring{position:relative; flex:0 0 auto; aspect-ratio:1}
.cardio-ring-lg{width:140px}
.cardio-ring-sm{width:60px}
.cardio-ring svg{display:block; width:100%; height:100%}
.cardio-ring-track{stroke:var(--line2)}
.cardio-ring-bar{transition:stroke-dasharray .7s var(--ease)}
.cardio-ring-center{position:absolute; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:center; line-height:1.05}
.cardio-ring-num{font-family:var(--font-display); font-size:34px; font-weight:700; letter-spacing:-.02em}
.cardio-ring-unit{color:var(--sub); font-size:12px; font-weight:700; margin-top:2px}
.cardio-ring-glyph{color:var(--accent-ink); display:flex}
.cardio-ring-glyph .icn{width:22px; height:22px}
.cardio-ring-check{display:flex; align-items:center; justify-content:center; color:var(--on-accent); background:var(--grad); border-radius:50%; box-shadow:var(--glow)}
.cardio-ring-lg .cardio-ring-check{width:62px; height:62px}
.cardio-ring-sm .cardio-ring-check{width:30px; height:30px}
.cardio-ring-lg .cardio-ring-check .icn{width:32px; height:32px; stroke-width:2.6}
.cardio-ring-sm .cardio-ring-check .icn{width:17px; height:17px; stroke-width:2.8}
.cardio-ring.full .cardio-ring-bar{filter:drop-shadow(0 0 5px rgba(45,212,191,.55))}

.cardio-hero{display:flex; align-items:center; gap:var(--s3); flex-wrap:wrap}
.cardio-hero.reached{border-color:rgba(45,212,191,.45); box-shadow:var(--glow)}
.cardio-hero-text{min-width:0}
.cardio-hero-title{font-family:var(--font-display); font-size:21px; font-weight:700; line-height:1.2}
.cardio-hero-sub{color:var(--sub); font-size:14px; font-weight:500; margin-top:6px}
.cardio-goal-chip{flex-basis:100%; background:none; border:0; padding:4px 0 0; color:var(--sub); font-size:13px; font-weight:500; text-align:start; cursor:pointer; text-decoration:underline; text-decoration-color:rgba(255,255,255,.18); text-underline-offset:3px}
.cardio-goal-editor{flex-basis:100%; display:flex; flex-direction:column; gap:var(--s2); padding-top:var(--s2); border-top:1px solid rgba(255,255,255,.08)}
.cardio-goal-label{color:var(--sub); font-size:13px; font-weight:500}
.cardio-goal-stepper{display:flex; align-items:center; justify-content:space-between; gap:var(--s3)}
.cardio-goal-value{font-family:var(--font-display); font-size:20px; font-weight:700}
.cardio-goal-actions{display:flex; align-items:center; justify-content:space-between; gap:var(--s3)}
.cardio-goal-reset{background:none; border:0; padding:0; color:var(--sub); font-size:13px; cursor:pointer; text-decoration:underline; text-underline-offset:3px}


/* Today card */
.today-cardio-card{padding:0; overflow:hidden}
.today-cardio-btn{
  display:flex; align-items:center; gap:var(--s2); width:100%; padding:14px var(--s2);
  text-align:start; color:var(--text); background:transparent;
}
.today-cardio-btn:active{background:var(--tile-40)}
.today-cardio-text{display:flex; flex-direction:column; gap:2px; min-width:0; flex:1}
.today-cardio-title{font-size:16px; font-weight:800}
.today-cardio-sub{color:var(--sub); font-size:13.5px; font-weight:500}
.today-cardio-meta{color:var(--accent-ink); font-size:13px; font-weight:700}
.today-cardio-go{color:var(--dim); display:flex}
.today-cardio-go .icn{width:20px; height:20px}
[dir="rtl"] .today-cardio-go .icn{transform:scaleX(-1)}

/* log form */
.cardio-log h3{margin-bottom:var(--s2)}
.cardio-saved{display:flex; align-items:center; gap:8px; margin:0 0 var(--s2); color:var(--good); font-size:14px; font-weight:700}
.cardio-saved .icn{width:18px; height:18px}
.cardio-types{gap:8px}
.cardio-types .quiz-chip-opt{min-height:44px; font-size:15px; padding:9px 15px}
.cardio-types .quiz-chip-opt.sel{padding-inline:12px 14px}
.cardio-minutes{margin-top:var(--s3)}
.cardio-minutes-label{display:block; color:var(--sub); font-size:13px; font-weight:700; letter-spacing:.04em; text-transform:uppercase; margin-bottom:var(--s1)}
[dir="rtl"] .cardio-minutes-label{letter-spacing:0}
.cardio-minutes-row{display:flex; align-items:baseline; gap:10px}
.cardio-min-input{
  flex:1; min-width:0; width:100%; padding:10px 16px; text-align:start;
  font-family:var(--font-display); font-size:44px; font-weight:700; line-height:1.15; color:var(--text);
  background:var(--card2); border:1px solid var(--line2); border-radius:var(--r-md);
  -moz-appearance:textfield; appearance:textfield;
  transition:border-color .2s ease, box-shadow .2s ease;
}
.cardio-min-input::placeholder{color:var(--dim); opacity:.6}
.cardio-min-input:focus{outline:none; border-color:var(--accent); box-shadow:0 0 0 3px rgba(45,212,191,.18), var(--glow)}
.cardio-min-input::-webkit-outer-spin-button,.cardio-min-input::-webkit-inner-spin-button{-webkit-appearance:none; margin:0}
.cardio-minutes-unit{color:var(--sub); font-size:16px; font-weight:700}
.cardio-quick{display:flex; gap:8px; margin-top:10px}
.cardio-quick-btn{
  flex:1; min-height:40px; border-radius:12px; font-size:15px; font-weight:700; color:var(--sub);
  background:var(--card); border:1px solid var(--line); transition:transform .12s ease, border-color .2s ease, color .2s ease;
}
.cardio-quick-btn:active{transform:scale(.97)}
.cardio-quick-btn.sel{color:var(--accent-ink); border-color:rgba(45,212,191,.5); background:rgba(45,212,191,.1)}
.cardio-date-row{display:flex; align-items:center; justify-content:space-between; gap:var(--s1); margin-top:var(--s2)}
.cardio-date-row label{display:flex; align-items:center; gap:8px; color:var(--sub); font-size:14px; font-weight:700; flex:0 0 auto}
.cardio-date-row label .icn{width:18px; height:18px}
.cardio-date-row input{
  flex:1 1 150px; min-width:0; min-height:48px; padding:12px 14px; font-size:16px; font-weight:600; color:var(--text); color-scheme:dark;
  background:var(--card); border:1.5px solid var(--accent); border-radius:var(--r-md); cursor:pointer;
  transition:border-color .2s ease, box-shadow .2s ease;
}
html[data-theme="light"] .cardio-date-row input{color-scheme:light}
.cardio-date-row input:focus{outline:none; border-color:var(--accent); box-shadow:0 0 0 3px rgba(45,212,191,.18), var(--glow)}
.cardio-more-toggle{
  display:flex; align-items:center; gap:6px; margin-top:var(--s2); min-height:44px; padding:0 2px;
  color:var(--accent-ink); font-size:14.5px; font-weight:700;
}
.cardio-more-chev{display:flex; transition:transform .2s var(--ease)}
.cardio-more-chev.open{transform:rotate(180deg)}
.cardio-more-chev .icn{width:18px; height:18px}
.cardio-more-body{margin-top:var(--s1)}
.cardio-pair{display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:var(--s1)}
.cardio-pair .quiz-field{min-width:0}
.cardio-intensity-label{color:var(--sub); font-size:13px; font-weight:700; letter-spacing:.04em; text-transform:uppercase; margin-bottom:var(--s1)}
[dir="rtl"] .cardio-intensity-label{letter-spacing:0}
.cardio-intensity{margin-bottom:var(--s2)}
.cardio-error{margin:var(--s1) 0 0; padding:10px 14px; border-radius:12px; font-size:14px; font-weight:600; color:var(--danger); background:rgba(244,63,94,.1); border:1px solid rgba(244,63,94,.35)}
.cardio-error[hidden]{display:none}
.cardio-log .btn[data-act="cardio-save"],.cardio-sheet .btn[data-act="cardio-edit-save"]{margin-top:var(--s2)}

/* stopwatch */
.cardio-sw{display:flex; align-items:center; gap:12px; padding:10px 12px; margin-bottom:var(--s2); border-radius:var(--r-md); background:var(--tile-45); border:1px solid var(--line)}
.cardio-sw.running{border-color:rgba(45,212,191,.5); box-shadow:var(--glow)}
.cardio-sw-icon{display:flex; color:var(--accent-ink)}
.cardio-sw-icon .icn{width:22px; height:22px}
.cardio-sw-time{flex:1; font-family:var(--font-display); font-size:28px; font-weight:700; letter-spacing:.02em; font-variant-numeric:tabular-nums}
.cardio-sw .btn{flex:0 0 auto}

/* history */
.cardio-history-title{font-size:17px; margin:var(--s3) 0 var(--s1)}
.cardio-list{display:flex; flex-direction:column; gap:10px}
.cardio-item{
  display:flex; align-items:center; gap:12px; width:100%; padding:12px 14px; text-align:start; color:var(--text);
  background:var(--card); border:1px solid var(--line); border-radius:var(--r-md);
  transition:transform .12s ease, border-color .2s ease;
}
.cardio-item:active{transform:scale(.99); border-color:var(--line2)}
.cardio-item-icon{flex:0 0 auto; width:40px; height:40px; border-radius:12px; display:flex; align-items:center; justify-content:center; background:var(--card2)}
.cardio-item-icon .icn{width:20px; height:20px}
.cardio-item-main{display:flex; flex-direction:column; gap:2px; min-width:0; flex:1}
.cardio-item-title{font-size:15px; font-weight:700; overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.cardio-item-sub{color:var(--sub); font-size:12.5px; font-weight:500}
.cardio-item-min{flex:0 0 auto}
.cardio-dot{flex:0 0 auto; width:10px; height:10px; border-radius:50%; background:var(--dim)}
.cardio-dot-easy{background:var(--good)}
.cardio-dot-moderate{background:var(--warn)}
.cardio-dot-hard{background:var(--danger)}
.cardio-empty{text-align:center}
.cardio-empty p{color:var(--sub); font-size:14.5px; margin:var(--s1) 0 0}
.cardio-empty-icon{display:flex; justify-content:center; color:var(--accent-ink)}
.cardio-empty-icon .icn{width:34px; height:34px; stroke-width:1.5}

/* first-visit picker + edit sheet */
.cardio-first{text-align:center}
.cardio-first-icon{display:flex; justify-content:center; color:var(--accent-ink)}
.cardio-first-icon .icn{width:34px; height:34px; stroke-width:1.5}
.cardio-first-body{color:var(--sub); font-size:14.5px; margin:4px 0 var(--s2)}
.cardio-first .cardio-first-save{margin-top:var(--s2)}
.cardio-first .cardio-first-skip{margin-top:var(--s1)}
.cardio-sheet{display:flex; flex-direction:column; gap:0; max-height:88vh}
.cardio-sheet-title{font-size:18px; font-weight:800; margin:0 0 var(--s2); padding-inline-end:44px}
.cardio-del{align-self:center; margin-top:var(--s2)}
.cardio-del-confirm{margin-top:var(--s2); padding:12px; border-radius:var(--r-md); background:rgba(244,63,94,.08); border:1px solid rgba(244,63,94,.35); text-align:center}
.cardio-del-confirm p{margin:0 0 var(--s1); font-weight:600}
.cardio-del-actions{display:flex; gap:var(--s1); justify-content:center}

/* week-strip secondary dot (days with cardio) */
.today-day-cardio{position:absolute; top:6px; inset-inline-end:6px; width:6px; height:6px; border-radius:50%; background:var(--accent2); box-shadow:0 0 6px rgba(6,182,212,.7)}

/* Round 3 / Task 5: post-workout cardio finisher card + Progress cardio section (logical properties only: RTL-safe) */
.player-finisher{display:flex; flex-direction:column; gap:var(--s2); text-align:start; margin:var(--s2) 0; padding:var(--s2)}
.player-finisher-title{display:flex; align-items:center; gap:8px; font-weight:700}
.player-finisher-title .icn{flex:none}
.player-finisher .player-caption{margin:4px 0 0}
.player-finisher-actions{display:flex; gap:var(--s1); flex-wrap:wrap}
.qn-cardio-chip{margin-inline-start:0}
.progress-cardio-card h3{margin-bottom:2px}
.progress-cardio-sub{margin:var(--s2) 0 6px; font-size:13px; color:var(--sub); font-weight:700}
.progress-cardio-list{list-style:none; margin:0; padding:0}
.progress-cardio-row{display:flex; justify-content:space-between; gap:var(--s2); padding:6px 0; border-bottom:1px solid var(--line2); font-size:14px}
.progress-cardio-row:last-child{border-bottom:0}
.progress-cardio-longest{margin:0; font-size:14px}
.progress-cardio-empty{text-align:center}

/* ---- Forgot-password link (shared sign-in form: Settings + entitlement gate) ---- */
.forgot-row{margin:var(--s2) 0 0}
.forgot-link{background:none; border:0; padding:4px 0; font:inherit; font-size:13px; color:var(--sub); text-decoration:underline; cursor:pointer}
.forgot-link:disabled{opacity:.5; cursor:default}

/* ---- Mandatory account screen (account-required.js): blocking, full-screen, 360px-safe ---- */
.account-req .quiz-body::before{max-height:6vh}
.acc-head{display:flex; flex-direction:column; align-items:center; text-align:center}
.acc-icon{display:flex; align-items:center; justify-content:center; width:56px; height:56px; margin-bottom:var(--s2); border-radius:50%; background:rgba(45,212,191,.12); color:var(--accent-ink)}
.acc-icon .icn{width:28px; height:28px}
.acc-head .quiz-subtitle{max-width:340px}
.acc-form{width:100%; max-width:420px; margin:0 auto}
.acc-form input{min-width:0}
/* the wrap is dir=ltr like its email/password input: the toggle sits at the input's inline end */
.acc-pw-wrap{position:relative}
.acc-pw-wrap input{padding-inline-end:56px}
.acc-pw-toggle{
  position:absolute; top:50%; inset-inline-end:4px; transform:translateY(-50%);
  width:48px; height:48px; display:flex; align-items:center; justify-content:center;
  background:none; border:0; border-radius:12px; color:var(--sub); cursor:pointer;
}
.acc-pw-toggle .icn{width:22px; height:22px}
.acc-pw-toggle:focus-visible{outline:2px solid var(--accent); outline-offset:-2px}
.acc-pw-toggle:disabled{opacity:.5; cursor:default}
@media (hover:hover){ .acc-pw-toggle:hover{color:var(--text)} }
.acc-msg{display:block; white-space:normal; margin:0 0 var(--s2); line-height:1.45}
.acc-notice{margin:0 0 var(--s2); padding:10px 12px; border-radius:10px; font-size:14px; line-height:1.45; color:var(--text); background:rgba(45,212,191,.08); border-inline-start:3px solid var(--accent)}
.acc-submit{margin-top:var(--s1)}
.acc-submit:disabled{opacity:.6}
.account-req .forgot-row{text-align:center}
.acc-switch{margin:var(--s2) 0 0; text-align:center}

/* ---------- "save to phone" banner (mobile browsers only) ---------- */
#install-host{
  position:fixed; z-index:39;
  inset-inline:12px; bottom:calc(96px + env(safe-area-inset-bottom, 0px));
  max-width:536px; margin-inline:auto;
}
#install-host[hidden]{display:none}
.install-offer{
  display:flex; align-items:center; gap:10px;
  padding-block:12px; padding-inline:14px 12px; border-radius:18px; text-align:start;
  background:var(--glass-94);
  -webkit-backdrop-filter:blur(14px); backdrop-filter:blur(14px);
  border:1px solid rgba(45,212,191,.35);
  box-shadow:0 12px 40px -8px rgba(0,0,0,.6);
}
.install-ico{flex:none; display:grid; place-items:center; width:38px; height:38px; border-radius:12px; color:var(--accent-ink); background:rgba(45,212,191,.12)}
.install-body{flex:1 1 auto; min-width:0}
.install-title{font-weight:800; font-size:14px; color:var(--text)}
.install-line{margin-top:2px; font-size:12.5px; color:var(--sub); line-height:1.35}
.install-btn{
  flex:none; min-height:38px; padding:8px 16px; border:0; border-radius:12px; cursor:pointer;
  font:800 14px/1 inherit; color:#04121a;
  background:linear-gradient(135deg, #2DD4BF, #06B6D4);
}
.install-x{flex:none; display:grid; place-items:center; width:32px; height:32px; border:0; background:none; color:var(--sub); cursor:pointer; border-radius:10px}
.install-x:focus-visible,.install-btn:focus-visible{outline:2px solid var(--accent); outline-offset:2px}

/* ---- Round 4: Nutrition tab (balance, calculator, menu, log) ---- */
.nutrition-view{display:flex; flex-direction:column; gap:var(--s2); min-width:0}
.nutrition-card{min-width:0}
.nutrition-balance-grid{display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:var(--s2); margin-top:var(--s1)}
.nutrition-balance-cell{min-width:0}
.nutrition-balance-val{font-size:19px; font-weight:800; overflow-wrap:anywhere}
.nutrition-balance-empty{font-size:13.5px; font-weight:600; color:var(--sub)}
.nutrition-net{margin:var(--s2) 0 0; padding:8px 12px; border-radius:12px; font-weight:700; font-size:14.5px; background:rgba(var(--tint, 45,212,191), .12)}
.nutrition-net[data-net="surplus"]{background:rgba(244,63,94,.12)}
.nutrition-note{margin:6px 0 0}
.nutrition-disclaimer{margin:var(--s2) 0 0; font-size:12.5px; color:var(--dim)}
.nutrition-activity{margin-top:var(--s1)}
.nutrition-targets{display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:8px; margin-top:var(--s2)}
.nutrition-target{
  display:flex; flex-direction:column; gap:2px; align-items:flex-start; min-width:0; min-height:44px; padding:10px;
  border-radius:14px; border:1px solid var(--line, rgba(143,163,200,.25)); background:transparent; color:var(--text);
  font:inherit; text-align:start; cursor:pointer;
}
.nutrition-target.sel{border-color:var(--accent); background:rgba(45,212,191,.12)}
.nutrition-target-name{font-weight:800; font-size:13.5px; overflow-wrap:anywhere; hyphens:auto}
.nutrition-target-kcal{font-weight:800; font-size:15px; overflow-wrap:anywhere}
.nutrition-target-sub{color:var(--sub); font-size:11.5px; overflow-wrap:anywhere; hyphens:auto}
/* multi-goal fix 1: five targets -> a one-column list on phones (name + sub at the start, kcal at the end) */
@media (max-width:400px){
  .nutrition-targets{grid-template-columns:minmax(0, 1fr)}
  .nutrition-target{display:grid; grid-template-columns:minmax(0, 1fr) auto; grid-template-areas:"name kcal" "sub kcal"; column-gap:12px; row-gap:2px; align-items:center; text-align:start}
  .nutrition-target-name{grid-area:name}
  .nutrition-target-sub{grid-area:sub}
  .nutrition-target-kcal{grid-area:kcal; text-align:end; white-space:nowrap}
}
.nutrition-protein{display:flex; align-items:center; gap:8px; margin:var(--s2) 0 0; padding:10px 12px; border-radius:12px; background:rgba(45,212,191,.08); border:1px solid rgba(45,212,191,.2); font-weight:700; font-size:14px}
.nutrition-protein .icn{width:18px; height:18px; flex:none; color:var(--accent-ink)}
.nutrition-menu-list{display:flex; flex-direction:column; gap:8px; margin-top:var(--s1)}
.nutrition-menu-row{display:flex; align-items:center; gap:12px; padding:10px 12px; border-radius:14px; min-width:0}
.menu-thumb{width:56px; height:56px; flex:0 0 56px; border-radius:12px; object-fit:cover; background:rgba(45,212,191,.12); margin-inline-end:0}
.nutrition-menu-foot{margin-top:var(--s2); align-items:center; gap:8px; flex-wrap:wrap}
.nutrition-log-scroll{max-height:420px; overflow-y:auto; overscroll-behavior:contain; display:flex; flex-direction:column; gap:var(--s2); margin-top:var(--s1)}
.nutrition-log-head{align-items:center; gap:8px}
.progress-debt-because{color:var(--sub); font-size:12px; margin-top:2px}

.photo-backup{margin:var(--s2) 0; padding:var(--s2) 0; border-block:1px solid var(--line2)}
.photo-backup-head{align-items:center; gap:var(--s2)}
.photo-backup-head h4{display:flex; align-items:center; gap:8px}
.photo-backup-head .icn{width:18px; height:18px; color:var(--accent-ink)}
.photo-backup-state{font-size:13px; color:var(--sub); font-weight:600}

/* Per-exercise progress chart (Round 6 Task 4) */
.hist-chart{margin-block-start:var(--s2); min-width:0}
.hist-chart .hist-svg{max-width:100%}
.hist-title{margin-block-end:2px}

/* Swap mid-workout + hidden exercises (Round 6 Task 5) */
.player-swap-btn{display:inline-flex; align-items:center; justify-content:center; gap:8px; margin-top:var(--s2); max-width:100%}
.player-swap-sheet{text-align:start}
.player-swap-title{font-size:20px; font-weight:800; margin:0; padding-inline-end:44px}
.player-swap-sheet .progress-sub{margin-top:6px; overflow-wrap:anywhere}
.player-swap-option{min-width:0}
.player-swap-option-text{display:flex; flex-direction:column; min-width:0}
.player-swap-option .lib-card-name{overflow-wrap:anywhere}
.player-swap-empty{padding:var(--s2) 0}
.player-swap-dislike{
  display:flex; align-items:center; gap:12px; width:100%; margin-top:var(--s3);
  padding:12px; border-radius:14px; text-align:start; min-height:44px;
  background:var(--card2); border:1px solid var(--line); color:var(--text); font-size:14px; font-weight:600;
}
.player-swap-box{
  flex:0 0 22px; width:22px; height:22px; border-radius:6px; border:2px solid var(--line2);
  display:flex; align-items:center; justify-content:center; color:transparent;
}
.player-swap-box .icn{width:16px; height:16px}
.player-swap-dislike.on .player-swap-box{background:var(--accent); border-color:var(--accent); color:var(--on-accent)}
.player-swap-dislike-text{min-width:0; overflow-wrap:anywhere}
.player-swap-dislike-only{width:100%; margin-top:var(--s3); min-height:44px; white-space:normal; overflow-wrap:anywhere}
.settings-hidden-list{display:flex; flex-direction:column; gap:10px; margin-top:var(--s1)}
.settings-hidden-row{display:flex; align-items:center; gap:12px; min-width:0}
.settings-hidden-name{min-width:0; font-weight:700; overflow-wrap:anywhere}
.settings-hidden-row .btn{display:inline-flex; align-items:center; gap:6px; flex:0 0 auto}

/* Monthly "let's improve" feedback dialog (app/js/feedback.js) — reuses .lib-sheet*, .req-text, .btn */
.fb-sheet{text-align:start; display:flex; flex-direction:column; gap:var(--s2); z-index:71}
#feedback-host .lib-sheet-backdrop{z-index:70}
.fb-title{font-size:20px; font-weight:800; margin:0; padding-inline-end:44px; overflow-wrap:anywhere}
.fb-intro{margin:0; overflow-wrap:anywhere}
.fb-field{display:flex; flex-direction:column; gap:6px; min-width:0}
.fb-label{margin:0; color:var(--text); font-size:15px; font-weight:700; overflow-wrap:anywhere}
.fb-text{min-height:76px}
.fb-stars{display:flex; gap:6px; flex-wrap:wrap}
.fb-star{
  width:48px; height:48px; border-radius:14px; display:inline-flex; align-items:center; justify-content:center;
  background:var(--card2); border:1px solid var(--line2); color:var(--dim); cursor:pointer;
}
.fb-star .icn{width:26px; height:26px}
.fb-star.on{color:var(--warn); border-color:var(--warn)}
.fb-star.on .icn{fill:currentColor}
.fb-star:focus-visible{outline:2px solid var(--accent); outline-offset:2px}
.fb-star[disabled]{opacity:.5}
.fb-hint{margin:0; font-size:13px}
.fb-error{display:flex; width:auto; max-width:100%; white-space:normal; margin:0; overflow-wrap:anywhere}
.fb-status{margin:0}
.fb-actions{display:flex; flex-wrap:wrap; gap:var(--s1)}
.fb-actions .btn{flex:1 1 140px; min-height:44px}
.fb-thanks{display:flex; flex-direction:column; align-items:center; text-align:center; gap:var(--s1); padding-top:var(--s2)}
.fb-thanks .fb-title{padding-inline-end:0}
.fb-thanks-ic{color:var(--good)}
.fb-thanks-ic .icn{width:44px; height:44px}
@media (prefers-reduced-motion:reduce){ .fb-sheet{animation:none} }

/* ---- calibration spec B: "how many in a row?" chip rows (quiz q7d + Settings re-calibrate) ---- */
.ability-picker{display:flex; flex-direction:column; gap:var(--s3); margin-bottom:var(--s2)}
.ability-row{min-width:0}
.ability-chips{gap:8px}
.ability-chips .quiz-chip-opt{min-height:40px; padding:8px 13px; font-size:15px}
.ability-chips .quiz-chip-opt.sel{padding-block:7px; padding-inline:9px 12px}
.ability-chips .quiz-chip-opt.sel::before{width:16px; height:16px; background-size:10px, auto}
.ability-chips .ability-unknown{color:var(--sub); font-weight:600}
.recalib-result{margin:var(--s2) 0}
.recalib-list{margin:var(--s1) 0 0; padding-inline-start:18px; display:flex; flex-direction:column; gap:4px; font-size:15px; overflow-wrap:anywhere}
.recalib-none{margin:var(--s2) 0}

/* ---- calibration spec C: "how did you do it" on the set screen ---- */
.player-variant{margin:var(--s1) 0 var(--s2)}
.player-variant-label{margin-bottom:6px}
.player-variant-seg{margin-bottom:var(--s1)}
.player-variant-seg .quiz-chip-opt{min-height:40px; padding:8px 6px; font-size:14px; line-height:1.2}
.player-variant-kg .quiz-num{max-width:220px; margin-inline:auto}

/* Google Play popup for Android web users (play-offer.js) */
.play-offer{text-align:center}
.play-offer-mark{margin:0 auto 8px; border-radius:14px}
.play-offer-body{margin:8px auto 4px; max-width:380px; line-height:1.5}
.play-offer-badge{display:inline-flex; line-height:0; margin:6px auto 2px}
.play-offer-badge img{display:block; height:76px; width:auto}
.play-offer-later{display:block; margin:4px auto 0}
