/* Halachoo! design system (build 21). Loaded BEFORE style.css; style.css maps its old variable names onto these.
   Tokens: design/brand/brand-handoff.md §1, verbatim (DAY / NIGHT). Gold accent is a FILL only; gold text uses
   --hc-gold-text. Every text/background pair is checked by tests/contrast.cjs (WCAG AA, 4.5:1).
   Theme: the system's, unless Settings chose light/dark (data-theme on <html>, app.js). "Fewer animations and mascot
   appearances" (Settings) sets data-calm on <html>; prefers-reduced-motion stops motion too. */

:root{
  /* DAY */
  --hc-primary:#175CE5;--hc-gold:#FFC547;--hc-gold-text:#805000;--hc-bg:#FFF9F0;--hc-card:#FFFFFF;--hc-text:#17234A;
  --hc-muted:#59677D;--hc-border:#E6DFD5;--hc-success:#177451;--hc-warning:#925000;--hc-error:#B52D45;
  /* derived surfaces (not text colours) */
  --hc-on-primary:#FFFFFF;--hc-on-gold:#17234A;--hc-parchment:#FBF0D9;--hc-parchment-edge:#EBD5A8;--hc-track:#EDE4D3;
  --hc-success-bg:#E3F3EA;--hc-warning-bg:#FFF1D6;--hc-error-bg:#FBE6EA;--hc-soft:#F3EEE6;
  --hc-tint-blue:#E2EDFF;--hc-tint-gold:#FFF0C7;--hc-tint-lavender:#EEE6FF;--hc-tint-mint:#DDF5E8;--hc-tint-coral:#FFE2DD;
  --hc-tint-peach:#FFE8D2;--hc-tint-teal:#D9F3F1;--hc-tint-rose:#FCE2EC;--hc-tint-sky:#DDF1FF;
  --hc-hl:#FFE68A;--hc-sl:#FFCB94;--hc-sl-line:#C46A12;--hc-glow:#175CE5;
  --hc-hero:url(assets/art/hills-day-720.webp);--hc-hero-2x:url(assets/art/hills-day.webp);
  --hc-scrim:linear-gradient(180deg,rgba(255,249,240,.55) 0%,rgba(255,249,240,0) 30%,rgba(255,249,240,0) 70%,rgba(255,249,240,.85) 100%);
  /* shape, depth, type */
  --hc-r1:12px;--hc-r2:20px;--hc-r3:28px;
  --hc-shadow-1:0 1px 2px rgba(23,35,74,.06),0 2px 8px rgba(23,35,74,.06);
  --hc-shadow-2:0 6px 24px rgba(23,35,74,.14),0 2px 6px rgba(23,35,74,.08);
  --hc-display:"Fredoka",system-ui,sans-serif;--hc-body:"Nunito Sans",system-ui,-apple-system,"Segoe UI",sans-serif;
  --hc-hebrew:"Noto Sans Hebrew","Nunito Sans",sans-serif;
  --hc-t13:13px;--hc-t15:15px;--hc-t17:17px;--hc-t20:20px;--hc-t24:24px;--hc-t32:32px;
}
/* NIGHT: the system's dark mode unless the person chose light, or the person chose dark */
@media (prefers-color-scheme:dark){:root:not([data-theme=light]){
  --hc-primary:#78A8FF;--hc-gold:#FFC95B;--hc-gold-text:#FFC95B;--hc-bg:#101B35;--hc-card:#1C2B4A;--hc-text:#F5F7FF;
  --hc-muted:#B8C5DC;--hc-border:#354665;--hc-success:#6EE1AA;--hc-warning:#FFD47A;--hc-error:#FF8598;
  --hc-on-primary:#101B35;--hc-on-gold:#101B35;--hc-parchment:#2A3350;--hc-parchment-edge:#4A5577;--hc-track:#3A4766;
  --hc-success-bg:#173A33;--hc-warning-bg:#3A3320;--hc-error-bg:#3D2333;--hc-soft:#243556;
  --hc-tint-blue:#22355E;--hc-tint-gold:#3A3423;--hc-tint-lavender:#30294F;--hc-tint-mint:#1D3B37;--hc-tint-coral:#40283A;
  --hc-tint-peach:#3E2F2B;--hc-tint-teal:#193B42;--hc-tint-rose:#3B2741;--hc-tint-sky:#1D3756;
  --hc-hl:#5A4B12;--hc-sl:#6A3A12;--hc-sl-line:#F0A04B;--hc-glow:#78A8FF;
  --hc-hero:url(assets/art/hills-night-720.webp);--hc-hero-2x:url(assets/art/hills-night.webp);
  --hc-scrim:linear-gradient(180deg,rgba(16,27,53,.55) 0%,rgba(16,27,53,0) 30%,rgba(16,27,53,0) 70%,rgba(16,27,53,.9) 100%);
}}
:root[data-theme=dark]{
  --hc-primary:#78A8FF;--hc-gold:#FFC95B;--hc-gold-text:#FFC95B;--hc-bg:#101B35;--hc-card:#1C2B4A;--hc-text:#F5F7FF;
  --hc-muted:#B8C5DC;--hc-border:#354665;--hc-success:#6EE1AA;--hc-warning:#FFD47A;--hc-error:#FF8598;
  --hc-on-primary:#101B35;--hc-on-gold:#101B35;--hc-parchment:#2A3350;--hc-parchment-edge:#4A5577;--hc-track:#3A4766;
  --hc-success-bg:#173A33;--hc-warning-bg:#3A3320;--hc-error-bg:#3D2333;--hc-soft:#243556;
  --hc-tint-blue:#22355E;--hc-tint-gold:#3A3423;--hc-tint-lavender:#30294F;--hc-tint-mint:#1D3B37;--hc-tint-coral:#40283A;
  --hc-tint-peach:#3E2F2B;--hc-tint-teal:#193B42;--hc-tint-rose:#3B2741;--hc-tint-sky:#1D3756;
  --hc-hl:#5A4B12;--hc-sl:#6A3A12;--hc-sl-line:#F0A04B;--hc-glow:#78A8FF;
  --hc-hero:url(assets/art/hills-night-720.webp);--hc-hero-2x:url(assets/art/hills-night.webp);
  --hc-scrim:linear-gradient(180deg,rgba(16,27,53,.55) 0%,rgba(16,27,53,0) 30%,rgba(16,27,53,0) 70%,rgba(16,27,53,.9) 100%);
}

/* ---------- type ---------- */
body{font-family:var(--hc-body)}
h1,h2,h3,.hc-display,.btn,.tabbar a{font-family:var(--hc-display)}
h1,h2,h3{font-weight:600}
[lang=he]{font-family:var(--hc-hebrew);direction:rtl}
:focus-visible{outline:3px solid var(--hc-primary);outline-offset:2px;border-radius:6px}

/* ---------- buttons ---------- */
.hc-btn{font-family:var(--hc-display);font-weight:600;font-size:var(--hc-t17);border-radius:999px;min-height:48px;padding:0 22px;
  display:inline-flex;align-items:center;justify-content:center;gap:8px;border:0;cursor:pointer;text-decoration:none;white-space:nowrap}
.hc-btn.gold{background:var(--hc-gold);color:var(--hc-on-gold);box-shadow:0 3px 0 rgba(128,80,0,.25)}
.hc-btn.white{background:var(--hc-card);color:var(--hc-text);border:1px solid var(--hc-border)}
.hc-btn.text{background:none;color:var(--hc-primary);padding:0 8px;min-height:44px}
.hc-iconbtn{width:44px;height:44px;border-radius:14px;border:0;background:var(--hc-card);color:var(--hc-text);display:inline-flex;
  align-items:center;justify-content:center;box-shadow:var(--hc-shadow-1);cursor:pointer;text-decoration:none}
.hc-iconbtn svg{width:24px;height:24px}

/* ---------- pills, chips, progress ---------- */
.hc-pill{display:inline-flex;align-items:center;gap:4px;border-radius:999px;padding:3px 10px;font-size:var(--hc-t13);font-weight:700}
.hc-pill.ok{background:var(--hc-success-bg);color:var(--hc-success)}.hc-pill.warn{background:var(--hc-warning-bg);color:var(--hc-warning)}
.hc-pill.soft{background:var(--hc-soft);color:var(--hc-muted)}
.hc-streak{display:inline-flex;flex-direction:column;align-items:center;justify-content:center;background:var(--hc-card);color:var(--hc-text);
  border-radius:16px;padding:4px 8px;min-width:52px;min-height:52px;box-shadow:var(--hc-shadow-1);font-family:var(--hc-display);line-height:1.05}
.hc-streak svg{width:22px;height:22px}.hc-streak b{font-size:var(--hc-t17)}.hc-streak small{font-size:11px;font-weight:500;color:var(--hc-muted)}
.hc-bar{height:10px;border-radius:999px;background:var(--hc-track);overflow:hidden}
.hc-bar span{display:block;height:100%;border-radius:999px;background:var(--hc-gold)}

/* ---------- hero panel: the illustration under a scrim ---------- */
.hc-hero{position:relative;margin:0 -16px;height:min(38vh,340px);min-height:270px;overflow:hidden;
  background:var(--hc-scrim),var(--hc-hero) center 62%/cover no-repeat;border-radius:0 0 var(--hc-r3) var(--hc-r3)}
@media (min-resolution:2dppx){.hc-hero{background:var(--hc-scrim),var(--hc-hero-2x) center 62%/cover no-repeat}}
.hc-hero .hc-menu{position:absolute;left:14px;top:14px}
.hc-hero .hc-logo{position:absolute;left:50%;top:12px;transform:translateX(-50%);height:46px;width:auto;filter:drop-shadow(0 2px 2px rgba(23,35,74,.25))}
.hc-hero .hc-streak{position:absolute;right:14px;top:10px}
.hc-hero .hc-zivi{position:absolute;left:4px;bottom:44px;width:46%;max-width:200px;height:auto;filter:drop-shadow(0 6px 10px rgba(23,35,74,.25))}
.hc-bubble{position:absolute;right:14px;bottom:86px;max-width:52%;background:var(--hc-card);color:var(--hc-text);border-radius:22px;
  padding:10px 14px;box-shadow:var(--hc-shadow-2);font-family:var(--hc-display);font-size:var(--hc-t15);line-height:1.25}
.hc-bubble b{display:block;font-size:var(--hc-t17);font-weight:600}
.hc-bubble::after{content:"";position:absolute;left:-9px;bottom:16px;border:10px solid transparent;border-right-color:var(--hc-card);border-left:0}

/* ---------- journey card (parchment, gold bar, gold pill) ---------- */
.hc-journey{position:relative;margin:-58px 0 0;background:var(--hc-parchment);border:2px solid var(--hc-parchment-edge);border-radius:var(--hc-r2);
  padding:14px 16px 12px;box-shadow:var(--hc-shadow-2);z-index:2;color:var(--hc-text)}
.hc-journey .top{display:flex;gap:12px;align-items:center}
.hc-journey .art{width:64px;height:64px;flex:none;object-fit:contain}
.hc-journey .t{flex:1;min-width:0}
.hc-journey .label{font-size:var(--hc-t13);color:var(--hc-muted);font-weight:600}
.hc-journey .title{font-family:var(--hc-display);font-weight:600;font-size:var(--hc-t20);line-height:1.15;margin:1px 0}
.hc-journey .sub{font-size:var(--hc-t13);color:var(--hc-muted)}
.hc-journey .chev{color:var(--hc-text);font-size:24px}
.hc-journey .row2{display:flex;align-items:center;gap:12px;margin-top:10px}
.hc-journey .prog{flex:1;min-width:0}.hc-journey .prog small{display:block;margin-top:4px;font-size:var(--hc-t13);font-weight:700;color:var(--hc-gold-text)}
.hc-journey .acts{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:6px}
.hc-journey p{margin:6px 0 0;font-size:var(--hc-t15)}

/* ---------- headings ---------- */
.hc-h2{display:flex;align-items:flex-end;justify-content:space-between;gap:10px;margin:22px 0 10px;font-family:var(--hc-display);font-weight:600;
  font-size:var(--hc-t20);color:var(--hc-text)}
.hc-tag{font-family:var(--hc-display);font-weight:500;font-size:var(--hc-t13);color:var(--hc-primary);transform:rotate(-6deg);
  line-height:1.15;text-align:right;white-space:nowrap}
.hc-tag::after{content:"";display:block;height:3px;width:70%;margin:2px 0 0 auto;border-radius:3px;background:var(--hc-gold)}

/* ---------- mode cards ---------- */
.hc-modes{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.hc-mode{position:relative;display:flex;flex-direction:column;border-radius:var(--hc-r2);background:var(--tint,var(--hc-card));color:var(--hc-text);
  text-decoration:none;overflow:hidden;box-shadow:var(--hc-shadow-1);border:1px solid rgba(23,35,74,.06);min-height:44px}
.hc-mode .pic{height:104px;display:flex;align-items:flex-end;justify-content:center;padding-top:6px}
.hc-mode .pic img{max-height:100px;max-width:88%;object-fit:contain}
.hc-mode .pic svg{width:44px;height:44px;color:var(--hc-primary);margin-bottom:22px}
.hc-mode .txt{display:flex;align-items:center;gap:6px;padding:8px 12px 12px;background:linear-gradient(180deg,transparent,var(--tint,var(--hc-card)) 30%)}
.hc-mode .txt .t{flex:1;min-width:0}
.hc-mode b{display:block;font-family:var(--hc-display);font-weight:600;font-size:var(--hc-t17);line-height:1.15}
.hc-mode small{display:block;font-size:var(--hc-t13);color:var(--hc-muted);line-height:1.25;margin-top:2px}
.hc-mode .chev{font-size:22px;color:var(--hc-text)}
.hc-mode.dim .pic{opacity:.5;filter:saturate(.35)}
.hc-mode.dim b{color:var(--hc-muted)}
.hc-mode.dim small{font-weight:700}
.t-blue{--tint:var(--hc-tint-blue)}.t-gold{--tint:var(--hc-tint-gold)}.t-lavender{--tint:var(--hc-tint-lavender)}.t-mint{--tint:var(--hc-tint-mint)}
.t-coral{--tint:var(--hc-tint-coral)}.t-peach{--tint:var(--hc-tint-peach)}.t-teal{--tint:var(--hc-tint-teal)}.t-rose{--tint:var(--hc-tint-rose)}
.t-sky{--tint:var(--hc-tint-sky)}
/* kids: three big tiles */
.hc-kidtiles{display:grid;grid-template-columns:1fr;gap:14px;margin-top:16px}
.hc-kidtiles .hc-mode{flex-direction:row;align-items:center;min-height:120px}
.hc-kidtiles .hc-mode .pic{height:120px;width:46%;padding:6px 0 0}
.hc-kidtiles .hc-mode .pic img{max-height:112px}
.hc-kidtiles .hc-mode .txt{background:none;padding:12px}
.hc-kidtiles .hc-mode b{font-size:var(--hc-t24)}.hc-kidtiles .hc-mode small{font-size:var(--hc-t15)}

/* ---------- today strip, start again ---------- */
.hc-today{display:flex;align-items:center;gap:10px;flex-wrap:wrap;background:var(--hc-card);border:1px solid var(--hc-border);border-radius:var(--hc-r2);
  padding:12px 16px;margin:16px 0 0;box-shadow:var(--hc-shadow-1);font-size:var(--hc-t15);color:var(--hc-text)}
.hc-today b{font-family:var(--hc-display);font-weight:600}
.hc-today .flame{width:18px;height:18px;vertical-align:-3px}
.hc-chips{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.hc-chip{display:flex;flex-direction:column;align-items:center;text-align:center;gap:4px;background:var(--hc-card);border:1px solid var(--hc-border);
  border-radius:var(--hc-r2);padding:10px 6px;color:var(--hc-text);text-decoration:none;box-shadow:var(--hc-shadow-1);min-height:44px;
  font-family:var(--hc-display);font-weight:600;font-size:var(--hc-t13);line-height:1.2}
.hc-chip svg{width:24px;height:24px;color:var(--hc-primary)}
.hc-chip small{font-family:var(--hc-body);font-weight:400;color:var(--hc-muted);font-size:12px}

  box-shadow:0 6px 16px rgba(23,92,229,.4);border:4px solid var(--hc-card)}

/* ---------- loading: the wordmark's "oo" stretches to "oooo" and springs back (keyframes only) ---------- */
.hc-loader{display:flex;justify-content:center;padding:28vh 0 0}
.hc-word{--w:220px;position:relative;width:calc(var(--w) * 1.17);height:calc(var(--w) * 109 / 471)}
.hc-word i{position:absolute;top:0;height:100%;background:url(assets/brand/logo.png) no-repeat;background-size:var(--w) 100%}
.hc-word .a{left:0;width:calc(var(--w) * .671);background-position:0 0}
.hc-word .o{left:calc(var(--w) * .671);width:calc(var(--w) * .24);background-position:calc(var(--w) * -.671) 0;transform-origin:left center;
  animation:hc-oo 1.2s cubic-bezier(.3,1.4,.5,1) infinite}
.hc-word .b{left:calc(var(--w) * .911);width:calc(var(--w) * .089);background-position:calc(var(--w) * -.911) 0;
  animation:hc-bang 1.2s cubic-bezier(.3,1.4,.5,1) infinite}
@keyframes hc-oo{0%,15%{transform:scaleX(1)}50%{transform:scaleX(1.7)}80%,100%{transform:scaleX(1)}}
@keyframes hc-bang{0%,15%{transform:translateX(0)}50%{transform:translateX(calc(var(--w) * .168))}80%,100%{transform:translateX(0)}}

/* ---------- motion and mascot reductions ---------- */
@media (prefers-reduced-motion:reduce){.hc-word i{animation:none!important}*{scroll-behavior:auto!important}}
:root[data-calm] .hc-word i{animation:none!important}
:root[data-calm] .hc-zivi-extra{display:none!important}
:root[data-calm] .hc-mode .pic img{display:none}
:root[data-calm] .hc-mode .pic svg.calm{display:block!important}
.hc-mode .pic svg.calm{display:none}
.hc-bubble h1{font-family:var(--hc-display);font-size:var(--hc-t17);font-weight:600;margin:0 0 2px;line-height:1.2}
.hc-bubble span{display:block}
.hc-home{margin-top:0}
/* ---------- refinements after comparing with the mockup (passes 2-3) ---------- */
.hc-hero{border-radius:0;height:min(38vh,350px)}
.hc-hero .hc-logo{height:50px;top:10px}
.hc-journey{margin-top:-74px}
.hc-journey .row2{flex-wrap:wrap}
.hc-journey .row2 .hc-btn{flex:none}
.hc-journey .acts{justify-content:flex-end;margin-top:0}
.hc-journey .acts .hc-btn.text{min-height:40px;font-size:var(--hc-t15)}
.hc-mode .pic{height:122px}.hc-mode .pic img{max-height:118px}
.hc-chip{padding:10px 6px 8px}
/* an odd last card spans the row, art on the left (the mockup's wide bottom-row cards) */
.hc-modes .hc-mode:last-child:nth-child(odd){grid-column:1/-1;flex-direction:row;align-items:center}
.hc-modes .hc-mode:last-child:nth-child(odd) .pic{height:104px;width:42%;flex:none;padding:6px 0 0}
.hc-modes .hc-mode:last-child:nth-child(odd) .txt{flex:1;background:none}

/* ---------- build 21a: back button, loading without words, docked tab bar, now-playing bar ---------- */
.hc-back{display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;flex:none;border-radius:14px;background:var(--hc-card);
  color:var(--hc-text);font-family:var(--hc-display);font-size:30px;line-height:1;text-decoration:none;box-shadow:var(--hc-shadow-1);padding-bottom:4px}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
.hc-loader{position:relative;display:flex;justify-content:center;align-items:center;min-height:60vh;padding:0}
.hc-skel-wrap{padding-top:20px}
.hc-skel{height:76px;border-radius:var(--hc-r2);margin:12px 0;background:linear-gradient(90deg,var(--hc-soft) 25%,var(--hc-card) 50%,var(--hc-soft) 75%);
  background-size:200% 100%;animation:hc-shimmer 1.2s linear infinite}
.hc-skel.h{height:44px;width:60%}
@keyframes hc-shimmer{from{background-position:200% 0}to{background-position:-200% 0}}
@media (prefers-reduced-motion:reduce){.hc-skel{animation:none}}
:root[data-calm] .hc-skel{animation:none}
.sheet{bottom:0;border-radius:18px 18px 0 0;padding-bottom:calc(20px + env(safe-area-inset-bottom));max-height:88vh}
.hc-mini{position:fixed;left:12px;right:12px;bottom:calc(70px + env(safe-area-inset-bottom));max-width:696px;margin:0 auto;z-index:9;display:flex;align-items:center;
  gap:10px;background:var(--hc-primary);color:var(--hc-on-primary);border-radius:18px;padding:6px 6px 6px 16px;box-shadow:var(--hc-shadow-2)}
.hc-mini .t{flex:1;min-width:0;color:var(--hc-on-primary);font-family:var(--hc-display);font-weight:600;text-decoration:none;white-space:nowrap;overflow:hidden;
  text-overflow:ellipsis;min-height:44px;display:flex;align-items:center}
.hc-mini .hc-iconbtn{flex:none}
html .sheet{bottom:0;border-radius:18px 18px 0 0;padding-bottom:calc(20px + env(safe-area-inset-bottom));max-height:88vh}

/* ---------- navigation shell (build 22, Navigation Atlas v1) ---------- */
/* bottom tabs: Home · Explore · Shorts · Progress (HL·35), docked, 56 px row + safe area */
.tabbar{position:fixed;left:0;right:0;bottom:0;z-index:10;display:flex;background:var(--hc-card);border-top:1px solid var(--hc-border);
  box-shadow:0 -4px 18px rgba(23,35,74,.08);padding-bottom:env(safe-area-inset-bottom)}
.tabbar a{flex:1;min-width:0;min-height:56px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;
  font-family:var(--hc-display);font-weight:500;font-size:13px;color:var(--hc-muted);text-decoration:none}
.tabbar a svg{width:24px;height:24px}
.tabbar a.on{color:var(--hc-primary);font-weight:600}
.tabbar a:active{background:var(--hc-soft)}
/* the browsing header: ☰ · logo · streak; then the page title */
.hc-bhead{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:12px 0 2px}
.hc-bhead-logo{height:38px;width:auto;filter:drop-shadow(0 1px 1px rgba(23,35,74,.2))}
.hc-streak-slot{width:52px;height:52px;flex:none}
.hc-title{display:flex;align-items:center;gap:10px;padding:8px 0 6px}
.hc-title h1{font-family:var(--hc-display);font-weight:600;font-size:var(--hc-t24);line-height:1.15;margin:0}
/* icon buttons: ☰, ‹, ✕ — default / pressed (Atlas state rows); dark from the tokens */
.hc-iconbtn,.hc-back{width:44px;height:44px;border-radius:50%;border:0;background:var(--hc-card);color:var(--hc-primary);box-shadow:var(--hc-shadow-1);
  display:inline-flex;align-items:center;justify-content:center;flex:none;cursor:pointer;padding:0;text-decoration:none}
.hc-back svg,.hc-iconbtn svg{width:22px;height:22px}
.hc-iconbtn:active,.hc-back:active,.hc-iconbtn.pressed{background:var(--hc-tint-blue)}
.hc-exit{color:var(--hc-text)}
/* the drawer: from the left over a 40 % scrim; 220 ms; still under reduced motion / calm */
.hc-drawer-host{position:fixed;inset:0;z-index:40}
.hc-scrim{position:absolute;inset:0;background:rgba(16,27,53,.4);opacity:0;transition:opacity .22s ease}
.hc-drawer{position:absolute;left:0;top:0;bottom:0;width:82%;max-width:340px;background:var(--hc-card);color:var(--hc-text);
  transform:translateX(-100%);transition:transform .22s ease;overflow-y:auto;padding:14px 16px calc(24px + env(safe-area-inset-bottom));
  border-radius:0 24px 24px 0;box-shadow:var(--hc-shadow-2)}
.hc-drawer-host.open .hc-scrim{opacity:1}.hc-drawer-host.open .hc-drawer{transform:none}
.hc-drawer-host.still .hc-scrim,.hc-drawer-host.still .hc-drawer{transition:none}
@media (prefers-reduced-motion:reduce){.hc-scrim,.hc-drawer{transition:none!important}}
.hc-drawer .top{display:flex;align-items:center;justify-content:space-between}
.hc-drawer .top img{height:36px;width:auto}
.hc-drawer .who{display:flex;align-items:center;gap:12px;padding:16px 0 14px;border-bottom:1px solid var(--hc-border)}
.hc-drawer .who img{width:56px;height:56px;object-fit:contain}
.hc-drawer .who b{display:block;font-family:var(--hc-display);font-weight:600;font-size:var(--hc-t17)}
.hc-drawer .who small{display:block;color:var(--hc-muted);font-size:var(--hc-t13)}
.hc-drow{display:flex;align-items:center;gap:12px;min-height:60px;padding:8px 0;color:var(--hc-text);text-decoration:none;border-bottom:1px solid var(--hc-border)}
.hc-drow .hc-tile,.hc-source .hc-tile{width:40px;height:40px;border-radius:12px;display:flex;align-items:center;justify-content:center;flex:none;background:var(--tint)}
.hc-drow .hc-tile svg,.hc-source .hc-tile svg{width:22px;height:22px}
.hc-drow .hc-tile.t-coral{color:var(--hc-error)}.hc-drow .hc-tile.t-peach{color:var(--hc-warning)}.hc-drow .hc-tile.t-blue{color:var(--hc-primary)}
.hc-drow .t{flex:1;min-width:0}.hc-drow b{display:block;font-family:var(--hc-display);font-weight:600;font-size:var(--hc-t15)}
.hc-drow small,.hc-dkeep small{display:block;color:var(--hc-muted);font-size:var(--hc-t13);line-height:1.3}
.hc-drow .chev,.hc-dkeep .chev{color:var(--hc-muted);font-size:22px}
.hc-dsec{font-family:var(--hc-display);font-weight:600;font-size:var(--hc-t17);margin:20px 0 8px}
.hc-dkeep{display:flex;align-items:center;gap:10px;padding:12px;border:1px solid var(--hc-border);border-radius:var(--hc-r2);color:var(--hc-text);
  text-decoration:none;background:var(--hc-bg)}
.hc-dkeep .t{flex:1;min-width:0}.hc-dkeep b{display:block;font-family:var(--hc-display);font-weight:600;font-size:var(--hc-t15)}
.hc-dkeep .hc-bar{display:block;height:6px;margin-top:8px}
/* the immersive learning header: ✕ · session progress · "done/total"; then the source block */
.hc-ihead{display:flex;align-items:center;gap:12px;padding:14px 0 10px}
.hc-sbar{flex:1;display:flex;align-items:center;gap:10px;min-width:0}
.hc-sbar .track{flex:1;height:10px;border-radius:999px;background:var(--hc-track);overflow:hidden}
.hc-sbar .track span{display:block;height:100%;border-radius:999px;background:var(--hc-primary);transition:width .3s ease}
.hc-sbar.done .track span{background:var(--hc-success)}
.hc-sbar .count{font-family:var(--hc-display);font-weight:600;font-size:var(--hc-t15);color:var(--hc-text);white-space:nowrap;min-width:40px;text-align:right}
.hc-source{display:flex;align-items:center;gap:12px;background:var(--hc-card);border:1px solid var(--hc-border);border-radius:var(--hc-r2);
  padding:10px 12px;margin:2px 0 12px;box-shadow:var(--hc-shadow-1)}
.hc-source .hc-tile{--tint:var(--hc-tint-blue);color:var(--hc-primary)}
.hc-source .t{min-width:0}.hc-source b{display:block;font-family:var(--hc-display);font-weight:600;font-size:var(--hc-t15)}
.hc-source small{display:block;color:var(--hc-muted);font-size:var(--hc-t13)}
body.immersive{padding-bottom:40px}
/* the now-playing bar: right above the tabs, browsing screens only */
.hc-mini{bottom:calc(64px + env(safe-area-inset-bottom));z-index:11}

/* ---------- Component Atlas v1 (build 23, slice 1): shared pieces; the quiz uses them first ---------- */
/* buttons (panel 1): primary gold · secondary white · tertiary text · success / error outline · disabled · loading */
.hc-btn{min-height:48px}
.hc-btn.wide{display:flex;width:100%}
.hc-btn.ok-outline{background:var(--hc-card);color:var(--hc-success);border:2px solid var(--hc-success)}
.hc-btn.err-outline{background:var(--hc-card);color:var(--hc-error);border:2px solid var(--hc-error)}
.hc-btn.white{box-shadow:var(--hc-shadow-1)}
.hc-btn svg{width:20px;height:20px;flex:none}
.hc-btn:disabled,.hc-btn.is-disabled{background:var(--hc-soft);color:var(--hc-muted);border-color:var(--hc-soft);box-shadow:none;cursor:default}
.hc-btn.is-loading{pointer-events:none}
.hc-btn .spin{width:20px;height:20px;border-radius:50%;border:3px solid currentColor;border-right-color:transparent;animation:hc-spin .8s linear infinite}
@keyframes hc-spin{to{transform:rotate(360deg)}}
@media (prefers-reduced-motion:reduce){.hc-btn .spin{animation:none}}
:root[data-calm] .hc-btn .spin{animation:none}
.hc-btns{display:flex;flex-direction:column;gap:10px;margin:14px 0}
.hc-btns.two{flex-direction:row}.hc-btns.two>*{flex:1}
/* selection (panel 3): segmented tabs · radio cards · picker field + sheet */
.hc-seg{display:flex;gap:4px;padding:4px;border-radius:var(--hc-r1);background:var(--hc-soft);margin:6px 0 14px}
.hc-seg button{flex:1;min-height:44px;border:0;border-radius:10px;background:none;color:var(--hc-text);font-family:var(--hc-display);font-weight:500;
  font-size:var(--hc-t15);cursor:pointer}
.hc-seg button[aria-checked="true"]{background:var(--hc-primary);color:var(--hc-on-primary);font-weight:600}
.hc-label{display:block;font-family:var(--hc-display);font-weight:600;font-size:var(--hc-t15);margin:16px 0 6px;color:var(--hc-text)}
.hc-radios{display:flex;flex-direction:column;gap:10px}
.hc-radio{display:flex;align-items:center;gap:12px;min-height:64px;padding:10px 14px;border-radius:var(--hc-r2);background:var(--hc-card);
  border:2px solid var(--hc-border);cursor:pointer;color:var(--hc-text)}
.hc-radio input{appearance:none;-webkit-appearance:none;width:22px;height:22px;border-radius:50%;border:2px solid var(--hc-muted);margin:0;flex:none;
  display:grid;place-content:center}
.hc-radio input::before{content:"";width:12px;height:12px;border-radius:50%;background:var(--hc-primary);transform:scale(0)}
.hc-radio input:checked{border-color:var(--hc-primary)}.hc-radio input:checked::before{transform:scale(1)}
.hc-radio:has(input:checked){border-color:var(--hc-primary);box-shadow:var(--hc-shadow-1)}
.hc-radio .hc-tile{width:40px;height:40px;border-radius:12px;display:flex;align-items:center;justify-content:center;flex:none;background:var(--tint);color:var(--hc-primary)}
.hc-radio .hc-tile svg{width:22px;height:22px}
.hc-radio .t{flex:1;min-width:0}.hc-radio b{display:block;font-family:var(--hc-display);font-weight:600;font-size:var(--hc-t15)}
.hc-radio small{display:block;color:var(--hc-muted);font-size:var(--hc-t13)}
.hc-picker{display:flex;align-items:center;justify-content:space-between;gap:10px;width:100%;min-height:52px;padding:10px 14px;border-radius:var(--hc-r1);
  border:1px solid var(--hc-border);background:var(--hc-card);color:var(--hc-text);font-size:var(--hc-t15);text-align:left;cursor:pointer}
.hc-picker .v{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.hc-picker svg{width:20px;height:20px;color:var(--hc-muted);flex:none}
.hc-sheet-host{position:fixed;inset:0;z-index:45}
.hc-sheet-host .hc-scrim{opacity:1}
.hc-psheet{position:absolute;left:0;right:0;bottom:0;max-width:720px;margin:0 auto;max-height:80vh;display:flex;flex-direction:column;background:var(--hc-card);
  color:var(--hc-text);border-radius:24px 24px 0 0;padding:8px 16px calc(16px + env(safe-area-inset-bottom));box-shadow:var(--hc-shadow-2);
  animation:hc-up .22s ease}
@keyframes hc-up{from{transform:translateY(100%)}to{transform:none}}
@media (prefers-reduced-motion:reduce){.hc-psheet{animation:none}}
:root[data-calm] .hc-psheet{animation:none}
.hc-isheet .body{overflow:auto;padding:4px 4px 8px;line-height:1.5}
.hc-isheet .body img{display:block;width:100%;height:auto;border-radius:12px;margin-top:12px;border:1px solid var(--hc-border)}
.hc-isheet .body .foot{font-size:.85rem;color:var(--hc-muted);margin-top:12px}
.hc-psheet .grab{width:44px;height:5px;border-radius:3px;background:var(--hc-border);margin:4px auto 8px}
.hc-psheet header{display:flex;align-items:center;justify-content:space-between;padding:0 0 8px}
.hc-psheet header h2{font-family:var(--hc-display);font-size:var(--hc-t20);margin:0}
.hc-psheet input[type=search]{width:100%;min-height:44px;padding:10px 14px;border:1px solid var(--hc-border);border-radius:var(--hc-r1);background:var(--hc-bg);color:var(--hc-text);margin:0 0 8px;font:inherit}
.hc-psheet ul{list-style:none;margin:0;padding:0;overflow-y:auto}
.hc-psheet li button{display:flex;align-items:center;justify-content:space-between;gap:10px;width:100%;min-height:52px;padding:10px 4px;border:0;
  border-bottom:1px solid var(--hc-border);background:none;color:var(--hc-text);font:inherit;text-align:left;cursor:pointer}
.hc-psheet li button small{color:var(--hc-muted)}
.hc-psheet li button[aria-selected="true"]{color:var(--hc-primary);font-weight:700}
/* content card (panel 2): tile · title · subtitle · chevron; image variant with a progress bar */
.hc-ccard{display:flex;align-items:center;gap:12px;min-height:64px;padding:12px 14px;border-radius:var(--hc-r2);background:var(--hc-card);border:1px solid var(--hc-border);
  color:var(--hc-text);text-decoration:none;box-shadow:var(--hc-shadow-1)}
.hc-ccard .hc-tile{width:44px;height:44px;border-radius:12px;display:flex;align-items:center;justify-content:center;flex:none;background:var(--tint);color:var(--hc-primary)}
.hc-ccard .hc-tile svg{width:24px;height:24px}
.hc-ccard img.pic{width:72px;height:72px;border-radius:14px;object-fit:cover;flex:none}
.hc-ccard .t{flex:1;min-width:0}.hc-ccard b{display:block;font-family:var(--hc-display);font-weight:600;font-size:var(--hc-t15)}
.hc-ccard small{display:block;color:var(--hc-muted);font-size:var(--hc-t13)}
.hc-ccard .chev{color:var(--hc-muted);font-size:22px}
.hc-ccard .hc-bar{height:6px;margin-top:8px}
/* the quiz (panels 5-6): question card · Zivi with a bubble · the answer in parchment · self-mark · feedback */
.hc-qcard{background:var(--hc-card);border:1px solid var(--hc-border);border-radius:var(--hc-r2);padding:16px;box-shadow:var(--hc-shadow-1);margin:4px 0 12px}
.hc-qcard h2{font-family:var(--hc-display);font-weight:600;font-size:var(--hc-t20);margin:0 0 6px;color:var(--hc-primary)}
.hc-qcard .qtext{font-size:var(--hc-t17);line-height:1.5;margin:0;color:var(--hc-text)}
.hc-qcard .topic{font-size:var(--hc-t13);color:var(--hc-muted);margin-top:8px}
.hc-zrow{display:flex;align-items:flex-end;gap:8px;margin:4px 0 8px}
.hc-zrow img{width:96px;height:96px;object-fit:contain;flex:none}
.hc-zrow .bub{position:relative;background:var(--hc-card);border:1px solid var(--hc-border);border-radius:18px;padding:10px 14px;font-family:var(--hc-display);
  font-size:var(--hc-t15);color:var(--hc-text);box-shadow:var(--hc-shadow-1);margin-bottom:30px}
.hc-zrow .bub::before{content:"";position:absolute;left:-8px;bottom:14px;border:8px solid transparent;border-right-color:var(--hc-card);border-left:0}
.hc-answer{background:var(--hc-parchment);border:2px solid var(--hc-parchment-edge);border-radius:var(--hc-r2);padding:14px 16px;margin:4px 0 8px;color:var(--hc-text)}
.hc-answer .lbl{font-family:var(--hc-display);font-weight:600;font-size:var(--hc-t13);color:var(--hc-gold-text);margin-bottom:4px}
.hc-answer .src{white-space:pre-line;font-size:var(--hc-t17);line-height:1.5}
.hc-cite{font-size:var(--hc-t13);color:var(--hc-muted);margin:0 0 4px}
.hc-reveal{animation:hc-reveal .28s ease}
@keyframes hc-reveal{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}
@media (prefers-reduced-motion:reduce){.hc-reveal{animation:none}}
:root[data-calm] .hc-reveal{animation:none}
.hc-fb{display:flex;align-items:center;gap:12px;border-radius:var(--hc-r2);padding:12px 14px;margin:4px 0 12px;font-family:var(--hc-display);font-weight:600;font-size:var(--hc-t17)}
.hc-fb svg{width:26px;height:26px;flex:none}
.hc-fb.right{background:var(--hc-success-bg);color:var(--hc-success)}
.hc-fb.missed{background:var(--hc-soft);color:var(--hc-text)}
/* completion (panel 7): confetti burst · Zivi · title · three real stat tiles · actions */
.hc-done{position:relative;text-align:center;padding:8px 0 4px;overflow:hidden}
.hc-done .zivi{width:170px;height:170px;object-fit:contain;margin:4px auto 0;display:block}
.hc-done h1{font-family:var(--hc-display);font-weight:600;font-size:var(--hc-t32);margin:6px 0 2px;color:var(--hc-text)}
.hc-done p.sub{margin:0 0 14px;color:var(--hc-muted);font-size:var(--hc-t15)}
.hc-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:0 0 6px}
.hc-stats div{background:var(--hc-card);border:1px solid var(--hc-border);border-radius:var(--hc-r1);padding:10px 4px;box-shadow:var(--hc-shadow-1)}
.hc-stats b{display:block;font-family:var(--hc-display);font-weight:600;font-size:var(--hc-t24);color:var(--hc-text)}
.hc-stats small{display:block;color:var(--hc-muted);font-size:var(--hc-t13)}
.hc-confetti{position:absolute;inset:0;pointer-events:none}
.hc-confetti i{position:absolute;top:44%;left:50%;width:8px;height:12px;border-radius:2px;opacity:0;animation:hc-burst 1.2s ease-out forwards}
@keyframes hc-burst{0%{opacity:1;transform:translate(0,0) rotate(0)}100%{opacity:0;transform:translate(var(--x),var(--y)) rotate(var(--r))}}
@media (prefers-reduced-motion:reduce){.hc-confetti{display:none}}
:root[data-calm] .hc-confetti{display:none}
.hc-missed{margin:14px 0 0;text-align:left}
.hc-missed summary{cursor:pointer;font-family:var(--hc-display);font-weight:600;min-height:44px;display:flex;align-items:center;color:var(--hc-text)}
.hc-missed .item{background:var(--hc-card);border:1px solid var(--hc-border);border-radius:var(--hc-r1);padding:12px;margin:8px 0}
.hc-missed .item b{display:block;margin-bottom:6px}
/* empty and error states (panel 8) */
.hc-state{text-align:center;padding:24px 8px}
.hc-state img{width:140px;height:140px;object-fit:contain}
.hc-state h2{font-family:var(--hc-display);font-weight:600;font-size:var(--hc-t20);margin:6px 0 4px;color:var(--hc-text)}
.hc-state p{color:var(--hc-muted);margin:0 0 14px}
.hc-state .kind{font-size:var(--hc-t13);color:var(--hc-muted);margin-top:8px}
/* kids: one type step larger in the quiz */
body.kid .hc-qcard h2{font-size:var(--hc-t24)}body.kid .hc-qcard .qtext,body.kid .hc-answer .src{font-size:var(--hc-t20)}
body.kid .hc-fb{font-size:var(--hc-t20)}
.hc-missed summary{list-style:none;justify-content:space-between}.hc-missed summary::-webkit-details-marker{display:none}
.hc-missed summary::after{content:"›";font-size:24px;color:var(--hc-muted);transform:rotate(90deg);transition:transform .2s}.hc-missed[open] summary::after{transform:rotate(-90deg)}
