/* ============================================================
   PREVIEW theme "mono" — Whoop / Apple-web look: pure black, white,
   no green, no colour glows. Opt-in only (?theme=mono, ?theme=classic
   to go back). Nothing here applies unless <html class="theme-mono">.
   ============================================================ */
:root.theme-mono.theme-mono {
  color-scheme: dark;
  --bg:           #000000;
  --bg-card:      #0d0d0e;
  --bg-card2:     #18181a;
  --bg-elev:      #141415;
  --label:        #f5f5f7;
  --label2:       rgba(235,235,245,.56);
  --label3:       rgba(235,235,245,.28);
  --separator:    rgba(255,255,255,.10);
  --fill:         rgba(255,255,255,.14);
  --fill2:        rgba(255,255,255,.07);
  --accent:       #ffffff;
  --accent-dim:   rgba(255,255,255,.10);
  --on-accent:    #000000;
  --accent-glass: rgba(255,255,255,.94);
  --red:          #ff453a;
  --orange:       #ff9f0a;
  --yellow:       #ffd60a;
  --cyan:         #a8c7dc;
  --blue:         #8fb8d8;
  --purple:       #b9b9c4;
  --pink:         #ff6b6b;
  --bar-material: rgba(10,10,11,.82);
  --glass-bg:       rgba(22,22,24,.62);
  --glass-bg-thick: rgba(16,16,18,.90);
  --glass-specular: rgba(255,255,255,.10);
  --glass-rim:      rgba(255,255,255,.08);
  --glass-sheen:    rgba(255,255,255,.04);
  --z-explosive:  #ffffff;
  --z-fast:       #c9d6e2;
  --z-moderate:   #ffd60a;
  --z-slow:       #ff9f0a;
  --z-grind:      #ff453a;
  --g-volume:     #ffffff;
  --g-sets:       #8e8e93;
  --g-time:       #5d5d63;
  --radius-card:  18px;
}
.theme-mono body::before { background: none; }                      /* no coloured ambient glow */
.theme-mono .card, .theme-mono .list, .theme-mono .stat-tile { box-shadow: inset 0 0 0 0.5px rgba(255,255,255,.09); }
.theme-mono h1, .theme-mono .t-large, .theme-mono .nav-title { letter-spacing: -0.035em; font-weight: 700; }
.theme-mono .card-title { font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--label2); }
.theme-mono .card-title svg { color: var(--label2) !important; width: 15px; height: 15px; }
.theme-mono .btn { font-weight: 600; letter-spacing: .01em; text-shadow: none; box-shadow: none; }
.theme-mono .chip[aria-pressed="true"] { background: #fff; color: #000; }
.theme-mono .tabbar [aria-current="page"], .theme-mono .tabbar [aria-selected="true"] { color: #fff; }
.theme-mono .brand-mark { filter: grayscale(1) brightness(1.6); }

/* ---- Liquid Glass "water drop" controls ---- */
.theme-mono .btn.btn-gray, .theme-mono .chip, .theme-mono .seg {
  background: rgba(255,255,255,.07);
  -webkit-backdrop-filter: blur(18px) saturate(170%); backdrop-filter: blur(18px) saturate(170%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.20), inset 0 -1px 0 rgba(255,255,255,.05), inset 0 0 0 .5px rgba(255,255,255,.12), 0 6px 22px rgba(0,0,0,.35);
}
.theme-mono .btn:not(.btn-gray):not(.btn-plain):not(.btn-danger) {       /* prominent glass: a clear white drop */
  background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(255,255,255,.82));
  box-shadow: inset 0 1px 0 #fff, inset 0 -6px 12px rgba(0,0,0,.07), 0 8px 26px rgba(255,255,255,.10), 0 2px 10px rgba(0,0,0,.4);
}
.theme-mono .tabbar { background: rgba(18,18,20,.46);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.22), inset 0 -1px 0 rgba(255,255,255,.06), inset 0 0 0 .5px rgba(255,255,255,.14), 0 12px 36px rgba(0,0,0,.55); }
/* where the real refraction is on, the glass can be clearer: the bent rim does the work */
.lg .theme-mono .tabbar.lg-on, .lg.theme-mono .tabbar.lg-on { background: rgba(14,14,16,.34); }
.lg.theme-mono .tabbar.lg-on::after, .lg.theme-mono .btn.lg-on::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(120% 90% at 50% -10%, rgba(255,255,255,.16), transparent 55%), radial-gradient(90% 70% at 50% 115%, rgba(255,255,255,.07), transparent 60%); }
/* leftovers that were hard-coded green */
.theme-mono .coach-orb { background: linear-gradient(160deg, #fafafa, #b9b9be) !important; color: #000 !important; box-shadow: 0 0 22px rgba(255,255,255,.18) !important; }
.theme-mono .device-hero { background: radial-gradient(120% 120% at 50% 0%, #1b1b1d 0%, #0d0d0e 55%, #060606 100%); }
.theme-mono .device-status.on { color: #f5f5f7; }
.theme-mono .device-status.on .dot-ind { background: #fff; box-shadow: 0 0 8px rgba(255,255,255,.8); }

/* ============================================================
   BACKGROUND TESTS (24-Nov) — glass cards over a backdrop with depth.
   <html data-bg="a|b|c|d">; no attribute = flat black. Switch with ?bg=a…d / ?bg=0,
   and ?bgtest=1 shows a small picker at the top (test only).
   ============================================================ */
.theme-mono[data-bg] {
  --bg-card:  rgba(255,255,255,.055);
  --bg-card2: rgba(255,255,255,.085);
  --bg-elev:  rgba(255,255,255,.09);
}
.theme-mono[data-bg] .card, .theme-mono[data-bg] .list, .theme-mono[data-bg] .stat-tile {
  -webkit-backdrop-filter: blur(26px) saturate(150%); backdrop-filter: blur(26px) saturate(150%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.13), inset 0 0 0 .5px rgba(255,255,255,.10), 0 10px 34px rgba(0,0,0,.30);
}
.theme-mono[data-bg] .card .card, .theme-mono[data-bg] .card .list, .theme-mono[data-bg] .card .stat-tile { -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: inset 0 0 0 .5px rgba(255,255,255,.08); }
.theme-mono[data-bg] body { background: #000; }
.theme-mono[data-bg] body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; }
/* A · Smoke — soft grey light, pure monochrome */
.theme-mono[data-bg="a"] body::before { background:
  radial-gradient(60% 42% at 12% 4%, rgba(255,255,255,.20), transparent 70%),
  radial-gradient(52% 36% at 96% 30%, rgba(190,200,215,.15), transparent 72%),
  radial-gradient(70% 44% at 30% 100%, rgba(255,255,255,.13), transparent 72%),
  linear-gradient(180deg, #0b0c0e, #030304 60%, #08090b); }
/* B · Night blue — the hologram's blue, deep and quiet */
.theme-mono[data-bg="b"] body::before { background:
  radial-gradient(62% 40% at 8% 0%, rgba(40,150,255,.34), transparent 70%),
  radial-gradient(50% 34% at 100% 38%, rgba(0,210,255,.16), transparent 72%),
  radial-gradient(70% 44% at 40% 104%, rgba(30,90,220,.28), transparent 72%),
  linear-gradient(180deg, #03070f, #010204 55%, #030812); }
/* C · Blueprint — fine grid with a light from above, like the 3D machines floor */
.theme-mono[data-bg="c"] body::before { background:
  radial-gradient(90% 55% at 50% -6%, rgba(255,255,255,.17), transparent 70%),
  linear-gradient(rgba(255,255,255,.055) 1px, transparent 1px) 0 0 / 28px 28px,
  linear-gradient(90deg, rgba(255,255,255,.055) 1px, transparent 1px) 0 0 / 28px 28px,
  linear-gradient(180deg, #0a0c10, #020203); }
/* D · Studio — the dark gym set (blurred) behind everything */
.theme-mono[data-bg="d"] body::before { background:
  linear-gradient(180deg, rgba(0,0,0,.25), rgba(0,0,0,.55) 60%, rgba(0,0,0,.82)),
  url(../img/bg-gym.jpg) center top / cover no-repeat #000; }
/* test picker */
.bg-test { position: fixed; top: max(8px, env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); z-index: 90; display: flex; gap: 4px; padding: 4px;
  border-radius: 999px; background: rgba(20,20,22,.72); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); box-shadow: inset 0 0 0 .5px rgba(255,255,255,.16), 0 8px 24px rgba(0,0,0,.5); }
.bg-test button { min-width: 34px; height: 30px; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 600; color: rgba(255,255,255,.75); }
.bg-test button[aria-pressed="true"] { background: #fff; color: #000; }
/* coach chat: white bubble needs dark text; the send button too */
.theme-mono .bubble.user { color: #000; }
.theme-mono .coach-chat .btn svg, .theme-mono .coach-chat .ic-btn svg, .theme-mono .btn:not(.btn-gray):not(.btn-plain):not(.btn-danger) svg { color: #000; stroke: currentColor; }
.theme-mono { --on-accent: #000; }
/* live workout screen re-declares its own palette: bring it into mono (speed-zone colours stay) */
.theme-mono .live-root { --accent: #ffffff; --accent-dim: rgba(255,255,255,.10); --on-accent: #000; --accent-glass: rgba(255,255,255,.94);
  --bg-card: #0d0d0e; --bg-card2: #18181a; --bg-elev: #141415; --separator: rgba(255,255,255,.10); --fill: rgba(255,255,255,.14); --fill2: rgba(255,255,255,.07); }
:root.theme-mono .btn.btn-danger-solid.btn-danger-solid.btn-danger-solid { background: rgba(255,69,58,.16); color: #ff6961; box-shadow: inset 0 0 0 0.5px rgba(255,69,58,.4); backdrop-filter: none; -webkit-backdrop-filter: none; }
:root.theme-mono .btn.btn-danger-solid.btn-danger-solid.btn-danger-solid svg { color: #ff6961; }
.theme-mono .btn.btn-danger-solid::before, .theme-mono .btn.btn-danger-solid::after { display: none; }

.theme-mono .live-root .row-icon { color: #000; }
.theme-mono .live-root .row-icon svg { color: #000; }
/* anything painted with the (now white) accent as background needs dark content */
.theme-mono [style*="background:var(--accent)"], .theme-mono [style*="background: var(--accent)"] { color: #000 !important; }
.theme-mono [style*="background:var(--accent)"] svg, .theme-mono [style*="background: var(--accent)"] svg { color: #000; }
.theme-mono .switch input:checked + .knob::after { background: #000; }

/* ============================================================
   LIGHT (25-Nov) — Settings → Appearance → Light. Same look turned to white:
   black accent, white glass cards over a pale version of the night-blue backdrop.
   The live workout screen keeps its own dark palette on purpose (gym, glare).
   ============================================================ */
:root.theme-mono.theme-mono[data-theme="light"] {
  color-scheme: light;
  --bg:           #f4f6fa;
  --bg-card:      #ffffff;
  --bg-card2:     #eef0f4;
  --bg-elev:      #ffffff;
  --label:        #0b0b0d;
  --label2:       rgba(40,44,54,.64);
  --label3:       rgba(40,44,54,.32);
  --separator:    rgba(0,0,0,.09);
  --fill:         rgba(0,0,0,.09);
  --fill2:        rgba(0,0,0,.045);
  --accent:       #000000;
  --accent-dim:   rgba(0,0,0,.07);
  --on-accent:    #ffffff;
  --accent-glass: rgba(0,0,0,.90);
  --red:          #ff3b30;
  --red-dim:      rgba(255,59,48,.10);
  --orange:       #f08a00;
  --yellow:       #d49b00;
  --cyan:         #4a7d9c;
  --blue:         #2f76b3;
  --purple:       #6e6e78;
  --pink:         #e0484d;
  --bar-material: rgba(250,251,253,.82);
  --grabber:      rgba(40,44,54,.28);
  --glass-bg:       rgba(255,255,255,.60);
  --glass-bg-thick: rgba(255,255,255,.90);
  --glass-specular: rgba(255,255,255,.90);
  --glass-rim:      rgba(0,0,0,.06);
  --glass-sheen:    rgba(255,255,255,.35);
  --glass-shadow:   0 8px 32px rgba(20,40,80,.12);
  --shadow-sheet:   0 -8px 40px rgba(20,40,80,.16);
  --shadow-pop:     0 12px 48px rgba(20,40,80,.20);
  --z-explosive:  #000000;
  --z-fast:       #5b7286;
  --z-moderate:   #d49b00;
  --z-slow:       #f08a00;
  --z-grind:      #ff3b30;
  --g-volume:     #000000;
  --g-sets:       #8e8e93;
  --g-time:       #c3c6cf;
}
.theme-mono[data-theme="light"] .card, .theme-mono[data-theme="light"] .list, .theme-mono[data-theme="light"] .stat-tile { box-shadow: inset 0 0 0 0.5px rgba(0,0,0,.07); }
.theme-mono[data-theme="light"] .chip[aria-pressed="true"] { background: #000; color: #fff; }
.theme-mono[data-theme="light"] .tabbar [aria-current="page"], .theme-mono[data-theme="light"] .tabbar [aria-selected="true"] { color: #000; }
.theme-mono[data-theme="light"] .brand-mark { filter: grayscale(1) brightness(.25); }
.theme-mono[data-theme="light"] .btn.btn-gray, .theme-mono[data-theme="light"] .chip:not([aria-pressed="true"]), .theme-mono[data-theme="light"] .seg {
  background: rgba(255,255,255,.66);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.95), inset 0 0 0 .5px rgba(0,0,0,.08), 0 6px 18px rgba(20,40,80,.09);
}
.theme-mono[data-theme="light"] .btn:not(.btn-gray):not(.btn-plain):not(.btn-danger) {      /* prominent glass: a black drop */
  background: linear-gradient(180deg, #2b2b2e, #060607);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.22), inset 0 -6px 12px rgba(0,0,0,.35), 0 8px 22px rgba(0,0,0,.20);
}
.theme-mono[data-theme="light"] .tabbar { background: rgba(255,255,255,.66);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.95), inset 0 0 0 .5px rgba(0,0,0,.08), 0 12px 32px rgba(20,40,80,.16); }
.lg.theme-mono[data-theme="light"] .tabbar.lg-on { background: rgba(255,255,255,.46); }
.lg.theme-mono[data-theme="light"] .tabbar.lg-on::after, .lg.theme-mono[data-theme="light"] .btn.lg-on::after {
  background: radial-gradient(120% 90% at 50% -10%, rgba(255,255,255,.55), transparent 55%); }
.theme-mono[data-theme="light"] .coach-orb { background: linear-gradient(160deg, #3a3a3e, #000) !important; color: #fff !important; box-shadow: 0 6px 20px rgba(0,0,0,.22) !important; }
/* white glass cards over the pale backdrop */
.theme-mono[data-theme="light"][data-bg] { --bg-card: rgba(255,255,255,.66); --bg-card2: rgba(255,255,255,.80); --bg-elev: rgba(255,255,255,.92); }
.theme-mono[data-theme="light"][data-bg] .card, .theme-mono[data-theme="light"][data-bg] .list, .theme-mono[data-theme="light"][data-bg] .stat-tile {
  box-shadow: inset 0 1px 0 rgba(255,255,255,.95), inset 0 0 0 .5px rgba(0,0,0,.06), 0 10px 30px rgba(20,40,80,.09); }
.theme-mono[data-theme="light"][data-bg] .card .card, .theme-mono[data-theme="light"][data-bg] .card .list, .theme-mono[data-theme="light"][data-bg] .card .stat-tile { box-shadow: inset 0 0 0 .5px rgba(0,0,0,.07); }
.theme-mono[data-theme="light"][data-bg] body { background: #f4f6fa; }
.theme-mono[data-theme="light"][data-bg="a"] body::before { background:
  radial-gradient(60% 42% at 12% 4%, rgba(0,0,0,.07), transparent 70%),
  radial-gradient(70% 44% at 30% 100%, rgba(0,0,0,.06), transparent 72%),
  linear-gradient(180deg, #ffffff, #f3f4f6 60%, #ecedf0); }
.theme-mono[data-theme="light"][data-bg="b"] body::before { background:
  radial-gradient(62% 40% at 8% 0%, rgba(60,150,255,.26), transparent 70%),
  radial-gradient(50% 34% at 100% 38%, rgba(0,200,255,.15), transparent 72%),
  radial-gradient(70% 44% at 40% 104%, rgba(60,110,235,.20), transparent 72%),
  linear-gradient(180deg, #ffffff, #f6f8fc 55%, #eef3fb); }
.theme-mono[data-theme="light"][data-bg="c"] body::before { background:
  radial-gradient(90% 55% at 50% -6%, rgba(255,255,255,.9), transparent 70%),
  linear-gradient(rgba(0,0,0,.05) 1px, transparent 1px) 0 0 / 28px 28px,
  linear-gradient(90deg, rgba(0,0,0,.05) 1px, transparent 1px) 0 0 / 28px 28px,
  linear-gradient(180deg, #f7f8fa, #eceef2); }
.theme-mono[data-theme="light"][data-bg="d"] body::before { background:
  linear-gradient(180deg, rgba(255,255,255,.80), rgba(255,255,255,.90)), url(../img/bg-gym.jpg) center top / cover no-repeat #fff; }
/* content sitting on the (now black) accent */
.theme-mono[data-theme="light"] .bubble.user { color: #fff; }
.theme-mono[data-theme="light"] .coach-chat .btn svg, .theme-mono[data-theme="light"] .coach-chat .ic-btn svg, .theme-mono[data-theme="light"] .btn:not(.btn-gray):not(.btn-plain):not(.btn-danger) svg { color: #fff; }
.theme-mono[data-theme="light"] [style*="background:var(--accent)"], .theme-mono[data-theme="light"] [style*="background: var(--accent)"] { color: #fff !important; }
.theme-mono[data-theme="light"] [style*="background:var(--accent)"] svg, .theme-mono[data-theme="light"] [style*="background: var(--accent)"] svg { color: #fff; }
.theme-mono[data-theme="light"] .switch input:checked + .knob::after { background: #fff; }
:root.theme-mono[data-theme="light"] .btn.btn-danger-solid.btn-danger-solid.btn-danger-solid { background: rgba(255,59,48,.10); color: #d70015; box-shadow: inset 0 0 0 0.5px rgba(255,59,48,.35); }
:root.theme-mono[data-theme="light"] .btn.btn-danger-solid.btn-danger-solid.btn-danger-solid svg { color: #d70015; }
/* the live workout screen stays dark: white accent, so its content on accent is dark again */
.theme-mono[data-theme="light"] .live-root .btn:not(.btn-gray):not(.btn-plain):not(.btn-danger) { background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(255,255,255,.82)); box-shadow: inset 0 1px 0 #fff, inset 0 -6px 12px rgba(0,0,0,.07), 0 2px 10px rgba(0,0,0,.4); }
.theme-mono[data-theme="light"] .live-root .btn:not(.btn-gray):not(.btn-plain):not(.btn-danger) svg { color: #000; }
.theme-mono[data-theme="light"] .live-root .btn.btn-gray, .theme-mono[data-theme="light"] .live-root .chip:not([aria-pressed="true"]), .theme-mono[data-theme="light"] .live-root .seg { background: rgba(255,255,255,.07); box-shadow: inset 0 1px 0 rgba(255,255,255,.20), inset 0 0 0 .5px rgba(255,255,255,.12), 0 6px 22px rgba(0,0,0,.35); }
.theme-mono[data-theme="light"] .live-root .chip[aria-pressed="true"] { background: #fff; color: #000; }
.theme-mono[data-theme="light"] .live-root [style*="background:var(--accent)"], .theme-mono[data-theme="light"] .live-root [style*="background: var(--accent)"] { color: #000 !important; }
.theme-mono[data-theme="light"] .live-root [style*="background:var(--accent)"] svg, .theme-mono[data-theme="light"] .live-root [style*="background: var(--accent)"] svg { color: #000; }
.theme-mono[data-theme="light"] .live-root .switch input:checked + .knob::after { background: #000; }
.theme-mono[data-theme="light"] .live-root .card, .theme-mono[data-theme="light"] .live-root .list, .theme-mono[data-theme="light"] .live-root .stat-tile { box-shadow: inset 0 0 0 .5px rgba(255,255,255,.09); }
/* 3D panels (sensor hero, body hologram, machines, laser view) stay dark islands in Light: give their inside the dark tokens back */
.theme-mono[data-theme="light"] .device-hero, .theme-mono[data-theme="light"] .body3d, .theme-mono[data-theme="light"] .m3-stage, .theme-mono[data-theme="light"] .ld-stage, .theme-mono[data-theme="light"] .curve-game {
  color-scheme: dark; color: #f5f5f7;
  --label: #f5f5f7; --label2: rgba(235,235,245,.56); --label3: rgba(235,235,245,.28);
  --separator: rgba(255,255,255,.10); --fill: rgba(255,255,255,.14); --fill2: rgba(255,255,255,.07);
  --bg-card: #0d0d0e; --bg-card2: #18181a; --bg-elev: #141415;
  --accent: #ffffff; --accent-dim: rgba(255,255,255,.10); --on-accent: #000; --accent-glass: rgba(255,255,255,.94);
  --glass-bg: rgba(22,22,24,.62); --glass-bg-thick: rgba(16,16,18,.90); --glass-specular: rgba(255,255,255,.10); --glass-rim: rgba(255,255,255,.08); --glass-sheen: rgba(255,255,255,.04);
  --z-explosive: #ffffff; --z-fast: #c9d6e2; --z-moderate: #ffd60a; --z-slow: #ff9f0a; --z-grind: #ff453a;
}
.theme-mono[data-theme="light"] :is(.device-hero, .body3d, .m3-stage, .ld-stage) :is(.btn.btn-gray, .chip:not([aria-pressed="true"]), .seg) { background: rgba(255,255,255,.07); box-shadow: inset 0 1px 0 rgba(255,255,255,.20), inset 0 0 0 .5px rgba(255,255,255,.12), 0 6px 22px rgba(0,0,0,.35); }
.theme-mono[data-theme="light"] :is(.device-hero, .body3d, .m3-stage, .ld-stage) .chip[aria-pressed="true"] { background: #fff; color: #000; }
.theme-mono[data-theme="light"] .body3d { max-width: none; border-radius: 18px; overflow: hidden; background: radial-gradient(120% 100% at 50% 0%, #10141b 0%, #06080b 70%); }
/* first run / sign in: same backdrop as the app */
.theme-mono .ob-root { background:
  radial-gradient(62% 40% at 8% 0%, rgba(40,150,255,.34), transparent 70%),
  radial-gradient(50% 34% at 100% 38%, rgba(0,210,255,.16), transparent 72%),
  radial-gradient(70% 44% at 40% 104%, rgba(30,90,220,.28), transparent 72%),
  linear-gradient(180deg, #03070f, #010204 55%, #030812); background-attachment: local; }
.theme-mono[data-theme="light"] .ob-root { background:
  radial-gradient(62% 40% at 8% 0%, rgba(60,150,255,.26), transparent 70%),
  radial-gradient(50% 34% at 100% 38%, rgba(0,200,255,.15), transparent 72%),
  radial-gradient(70% 44% at 40% 104%, rgba(60,110,235,.20), transparent 72%),
  linear-gradient(180deg, #ffffff, #f6f8fc 55%, #eef3fb); }
.theme-mono .ob-points li, .theme-mono .ob-choice, .theme-mono .ob-recap div { -webkit-backdrop-filter: blur(22px) saturate(150%); backdrop-filter: blur(22px) saturate(150%); }
.theme-mono .ob-choice[aria-pressed="true"] { box-shadow: inset 0 0 0 2px var(--accent); }
