/* quiz.css — (v206) Daily Lab. Everything is scoped under .hq-*.
   Tokens follow overhaul/design-direction.md §B and are defined locally on
   .hq-root so the Lab looks right before (and after) the global restyle. */

html.hq-lock, html.hq-lock body { overflow: hidden !important; }

/* World-action entry point (lives in the pet card's pixel action bar) */
.pet-world-btn.hq-lab-btn { flex-grow: 1.4; border-color: #d3fb58; color: #d3fb58; }
.pet-world-btn.hq-lab-btn .cd { color: #fff; }

.hq-root {
  /* surfaces */
  --bg-0:#0c0a08; --bg-0:oklch(.145 .006 70);
  --bg-1:#15120f; --bg-1:oklch(.185 .007 70);
  --bg-2:#1e1b18; --bg-2:oklch(.225 .008 70);
  --bg-3:#282521; --bg-3:oklch(.265 .009 70);
  --line:#33302c; --line:oklch(.31 .008 70);
  --line-strong:#4b4743; --line-strong:oklch(.40 .008 70);
  --ink:#f4f1ec;   --ink:oklch(.96 .008 85);
  --ink-2:#c1bdb7; --ink-2:oklch(.80 .010 80);
  --ink-3:#95928b; --ink-3:oklch(.66 .010 80);
  --ink-4:#5a5853; --ink-4:oklch(.46 .008 80);
  --brand:#f9bc8b; --brand:oklch(.84 .095 60);
  --brand-strong:#f2985f; --brand-strong:oklch(.76 .13 52);
  --on-brand:#26160e; --on-brand:oklch(.22 .03 50);
  --volt:#d3fb58; --volt:oklch(.93 .19 122);
  --good:#63d99b; --good:oklch(.80 .14 158);
  --warn:#f2ce59; --warn:oklch(.86 .14 92);
  --bad:#f3625d;  --bad:oklch(.68 .18 25);
  --fuel:#fe8f5b;   --fuel:oklch(.76 .15 45);
  --train:#5fa1f3;  --train:oklch(.70 .14 255);
  --sleep:#a996e2;  --sleep:oklch(.72 .11 295);
  --mind:#65d0dc;   --mind:oklch(.80 .10 205);
  --spirit:#ee8dbd; --spirit:oklch(.76 .13 350);
  --tint: 16%;
  /* type */
  --font-ui: "Bricolage Grotesque", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; /* (v208) */
  --font-display: "Instrument Serif", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --font-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --font-pixel: "Pixelify Sans", var(--font-mono);
  /* space / radii */
  --s-1:4px; --s-2:8px; --s-3:12px; --s-4:16px; --s-5:20px; --s-6:24px; --s-8:32px;
  --r-xs:6px; --r-sm:10px; --r-md:14px; --r-lg:20px; --r-xl:28px; --r-pill:999px;
  /* motion */
  --dur-1:120ms; --dur-2:200ms; --dur-3:280ms; --dur-4:600ms;
  --ease-std:cubic-bezier(.2,0,0,1); --ease-out:cubic-bezier(.05,.7,.1,1);
  --ease-spring:cubic-bezier(.34,1.56,.64,1);
  --ease-spring:linear(0,.5 7%,.96 18%,1.07 26%,1.02 38%,.99 52%,1);
  --hue: var(--brand);
  --c: var(--hue);
  --wash: transparent;
  --hilite: inset 0 1px 0 oklch(1 0 0 / .04);
  --bar-h: 92px;

  position: fixed; inset: 0; z-index: 9000;
  display: none;
  background: var(--bg-0);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 15px; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  overscroll-behavior: contain;
}
.hq-root.is-open { display: block; }
.hq-root *, .hq-root *::before, .hq-root *::after { box-sizing: border-box; }
.hq-root button { font: inherit; color: inherit; }
.hq-root a { color: inherit; }
.hq-root :focus { outline: none; }
.hq-root :focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: var(--r-sm); }
.hq-root .num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }
.hq-root p { margin: 0; }
.hq-root h1, .hq-root h2, .hq-root h3 { margin: 0; font-weight: inherit; }
.hq-root ul, .hq-root ol { margin: 0; padding: 0; list-style: none; }

.hq-wash { position: absolute; inset: 0 0 auto 0; height: 70vh; pointer-events: none;
  background: linear-gradient(to bottom, var(--wash), transparent); }
.hq-view { position: absolute; inset: 0; display: flex; flex-direction: column; animation: hq-in var(--dur-3) var(--ease-out) both; }
@keyframes hq-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.hq-scroll { flex: 1 1 auto; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.hq-wrap { max-width: 480px; margin: 0 auto; padding: 4px 16px calc(32px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 12px; }
.hq-view-session .hq-wrap, .hq-view-genre .hq-wrap { padding-bottom: calc(var(--bar-h) + 24px + env(safe-area-inset-bottom)); }

/* ---------- pixel + icons ---------- */
.hq-pix { width: 16px; height: 16px; flex: none; image-rendering: pixelated; }
.hq-ic { width: 20px; height: 20px; flex: none; }
.hq-pixnum { display: inline-flex; align-items: center; line-height: 1; }
.hq-pn { display: block; height: 1em; width: auto; flex: none; image-rendering: pixelated; }

/* ---------- top bar ---------- */
.hq-topbar { flex: none; height: calc(56px + env(safe-area-inset-top)); padding: env(safe-area-inset-top) 8px 0;
  display: flex; align-items: center; gap: 8px; max-width: 496px; width: 100%; margin: 0 auto; position: relative; z-index: 2; }
.hq-topbar-title { flex: 1; text-align: center; min-width: 0; }
.hq-topbar-label { font-size: 11px; font-weight: 600; letter-spacing: .08em; color: var(--ink-3); }
.hq-topbar-spacer { width: 44px; }
.hq-iconbtn { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border: 0; background: transparent;
  border-radius: var(--r-md); color: var(--ink-2); cursor: pointer; transition: background var(--dur-1) var(--ease-std), transform var(--dur-1) var(--ease-std); }
.hq-iconbtn:hover { background: var(--bg-3); color: var(--ink); }
.hq-iconbtn:active { transform: scale(.94); }
.hq-heart.is-on { color: var(--spirit); }
.hq-heart.is-on .hq-ic { fill: currentColor; }
.hq-heart.is-pop .hq-ic { animation: hq-pop 420ms var(--ease-spring); }
@keyframes hq-pop { 0% { transform: scale(.6); } 60% { transform: scale(1.25); } 100% { transform: scale(1); } }

.hq-flame { display: inline-flex; align-items: center; gap: 6px; height: 44px; padding: 0 10px 0 6px; color: var(--volt); }
.hq-flame .hq-pix { width: 22px; height: 22px; }
.hq-flame .hq-pixnum { font-size: 18px; color: var(--ink); }
.hq-flame.is-zero .hq-pixnum { color: var(--ink-3); }
.hq-flame.is-zero { color: var(--ink-4); }
.hq-flame-sm { height: 32px; padding: 0 2px; gap: 3px; }
.hq-flame-sm .hq-pix { width: 16px; height: 16px; }
.hq-flame-sm .hq-pixnum { font-size: 14px; }

/* ---------- hub ---------- */
.hq-hero { padding: 4px 0 8px; }
.hq-eyebrow { font-size: 11px; line-height: 1.2; font-weight: 600; letter-spacing: .08em; color: var(--ink-3); text-transform: uppercase; }
.hq-display { font-family: var(--font-display); font-size: 40px; line-height: 1.02; letter-spacing: -.01em; margin-top: 6px; color: var(--ink); }
.hq-display em { font-style: italic; color: var(--brand); }
.hq-progress6 { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; margin-top: 14px; }
.hq-progress6 span { height: 6px; border-radius: var(--r-pill); background: var(--bg-3); }
.hq-progress6 span.is-on { background: var(--c); }
.hq-section-label { font-size: 11px; font-weight: 600; letter-spacing: .08em; color: var(--ink-3); margin: 12px 2px -2px; }
.hq-muted { color: var(--ink-3); font-size: 13px; line-height: 1.45; }
.hq-foot { color: var(--ink-3); font-size: 12px; line-height: 1.5; padding: 4px 2px 0; }
.hq-foot a { color: var(--ink-2); text-underline-offset: 2px; }

.hq-card { background: var(--bg-1); border-radius: var(--r-lg); padding: 16px; box-shadow: var(--hilite); position: relative; }
.hq-card-head { display: flex; align-items: center; gap: 10px; min-height: 28px; margin-bottom: 12px; }
.hq-card-title { font-family: var(--font-display); font-size: 22px; line-height: 1.15; color: var(--ink); }
.hq-card-meta { margin-left: auto; font-size: 11px; font-weight: 600; letter-spacing: .08em; color: var(--ink-3); text-align: right; }
.hq-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c); flex: none; }

/* Daily Mix */
.hq-mix { display: grid; grid-template-columns: 48px 1fr; grid-template-areas: "g m" "b b"; gap: 12px 14px; align-items: center;
  background: linear-gradient(135deg, color-mix(in oklab, var(--brand) 13%, var(--bg-1)), var(--bg-1) 70%); }
.hq-mix-glyph { grid-area: g; width: 48px; height: 48px; border-radius: var(--r-md); display: grid; place-items: center;
  background: color-mix(in oklab, var(--brand) var(--tint), transparent); color: var(--brand); }
.hq-mix-glyph .hq-pix { width: 32px; height: 32px; }
.hq-mix-main { grid-area: m; min-width: 0; }
.hq-mix-title { font-family: var(--font-display); font-size: 26px; line-height: 1.05; }
.hq-mix-sub { color: var(--ink-2); font-size: 13px; line-height: 1.4; margin-top: 3px; }
.hq-mix-btn { grid-area: b; width: 100%; }

/* Cartridges */
.hq-carts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hq-cart { --notch: 14px; position: relative; display: flex; flex-direction: column; text-align: left; padding: 0; border: 0; cursor: pointer;
  background: var(--bg-1); border-radius: var(--r-lg); overflow: hidden; min-height: 168px; box-shadow: var(--hilite), inset 0 -3px 0 var(--bg-2);
  clip-path: polygon(0 0, calc(100% - var(--notch)) 0, 100% var(--notch), 100% 100%, 0 100%);
  transition: transform var(--dur-1) var(--ease-std), box-shadow var(--dur-1) var(--ease-std); }
.hq-cart:active { transform: translateY(2px) scale(.985); box-shadow: var(--hilite), inset 0 -1px 0 var(--bg-2); }
.hq-cart:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; clip-path: none; }
.hq-cart-label { position: relative; height: 64px; display: flex; align-items: center; gap: 8px; padding: 0 12px; color: var(--c);
  background:
    radial-gradient(circle at 1px 1px, color-mix(in oklab, var(--c) 30%, transparent) 1px, transparent 1.2px) 0 0 / 6px 6px,
    color-mix(in oklab, var(--c) 14%, var(--bg-2));
  border-bottom: 1px solid color-mix(in oklab, var(--c) 25%, transparent); }
.hq-cart-label::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 7px; height: 2px; border-radius: 2px;
  background: repeating-linear-gradient(90deg, color-mix(in oklab, var(--c) 45%, transparent) 0 6px, transparent 6px 10px); opacity: .7; }
.hq-cart-glyph { width: 32px !important; height: 32px !important; }
.hq-cart-code { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.hq-tile-streak { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; color: var(--ink); font-size: 13px; }
.hq-tile-streak .hq-pix { width: 13px; height: 13px; color: var(--volt); }
.hq-tile-streak.is-risk .hq-pix { color: var(--warn); }
.hq-cart-body { flex: 1; display: flex; flex-direction: column; padding: 12px 12px 12px; gap: 2px; min-width: 0; }
.hq-cart-name { font-size: 16px; font-weight: 600; line-height: 1.25; letter-spacing: -.005em; color: var(--ink); }
.hq-cart-sub { font-size: 12px; line-height: 1.35; color: var(--ink-3); }
.hq-cart-foot { margin-top: auto; padding-top: 10px; display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.hq-cart-best { font-size: 11px; color: var(--ink-3); white-space: nowrap; }

/* chips */
.hq-chip { display: inline-flex; align-items: center; gap: 5px; min-height: 26px; padding: 0 9px; border-radius: var(--r-pill);
  background: var(--bg-3); color: var(--ink-2); font-size: 12px; font-weight: 500; line-height: 1.2; white-space: nowrap; border: 0; text-decoration: none; }
.hq-chip .hq-ic { width: 14px; height: 14px; }
.hq-chip .hq-pix { width: 12px; height: 12px; }
.hq-chip.is-good { background: color-mix(in oklab, var(--good) var(--tint), transparent); color: var(--good); }
.hq-chip.is-mode { background: color-mix(in oklab, var(--brand) var(--tint), transparent); color: var(--brand); font-size: 11px; font-weight: 600; letter-spacing: .06em; }
.hq-chip.is-src { background: color-mix(in oklab, var(--train) var(--tint), transparent); color: var(--train); }
.hq-chip.is-new { background: color-mix(in oklab, var(--volt) 18%, oklch(0 0 0 / .4)); color: var(--volt); font-size: 11px; font-weight: 600; letter-spacing: .08em; }
.hq-chip.is-coin { background: color-mix(in oklab, var(--warn) var(--tint), transparent); color: var(--warn); }
.hq-chip.is-link { min-height: 36px; padding: 0 12px; font-size: 13px; color: var(--ink); cursor: pointer; transition: background var(--dur-1); }
.hq-chip.is-link:hover { background: var(--line); }
.hq-chip.is-link .hq-ic { width: 13px; height: 13px; color: var(--ink-3); }
.hq-chip.is-self { background: color-mix(in oklab, var(--spirit) var(--tint), transparent); color: var(--spirit); min-height: 36px; padding: 0 12px; font-size: 13px; border: 1px solid color-mix(in oklab, var(--spirit) 40%, transparent); }
.hq-chiprow { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.hq-chiprow.is-center { justify-content: center; }
.hq-coin { width: 10px; height: 10px; border-radius: 50%; background: currentColor; box-shadow: inset -2px -2px 0 oklch(0 0 0 / .25); }

/* list rows */
.hq-row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 64px; padding: 10px 12px 10px 12px; border: 0; cursor: pointer; text-align: left;
  background: var(--bg-1); border-radius: var(--r-lg); box-shadow: var(--hilite); transition: transform var(--dur-1) var(--ease-std), background var(--dur-1); }
.hq-row:hover { background: color-mix(in oklab, var(--bg-1) 70%, var(--bg-2)); }
.hq-row:active { transform: scale(.985); }
.hq-row-glyph { width: 44px; height: 44px; flex: none; border-radius: var(--r-md); display: grid; place-items: center;
  background: color-mix(in oklab, var(--c) var(--tint), transparent); color: var(--c); }
.hq-row-glyph .hq-pix { width: 24px; height: 24px; }
.hq-row-art { width: 44px; height: 44px; flex: none; border-radius: var(--r-sm); overflow: hidden; display: block; }
.hq-row-art svg { width: 100%; height: 100%; display: block; }
.hq-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.hq-row-title { font-size: 15px; font-weight: 600; line-height: 1.3; color: var(--ink); overflow: hidden; text-overflow: ellipsis; }
.hq-row-sub { font-size: 13px; color: var(--ink-3); line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hq-row-chev { width: 18px; height: 18px; color: var(--ink-4); }
.hq-list { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }

/* league */
.hq-lg { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; align-items: end; height: 104px; margin: 4px 0 12px; }
.hq-lg-col { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; height: 100%; }
.hq-lg-v { font-size: 12px; font-weight: 600; color: var(--ink-3); }
.hq-lg-bar { width: 100%; max-width: 44px; border-radius: var(--r-xs) var(--r-xs) 2px 2px; background: color-mix(in oklab, var(--ink-3) 35%, var(--bg-3)); }
.hq-lg-x { font-size: 11px; color: var(--ink-3); font-weight: 500; }
.hq-lg-col.is-cur .hq-lg-bar { background: var(--brand); }
.hq-lg-col.is-cur .hq-lg-v, .hq-lg-col.is-cur .hq-lg-x { color: var(--ink); }

.hq-insight { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r-md); background: var(--bg-2); color: var(--ink-2); font-size: 14px; line-height: 1.45; }
.hq-insight .hq-pix { color: var(--brand); margin-top: 2px; }

/* ---------- buttons ---------- */
.hq-btn { --edge: oklch(0 0 0 / .28); position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 20px; border-radius: var(--r-md); border: 0; cursor: pointer; font-size: 15px; font-weight: 600; letter-spacing: -.005em;
  box-shadow: inset 0 -3px 0 var(--edge); transition: transform var(--dur-1) var(--ease-std), box-shadow var(--dur-1) var(--ease-std), background var(--dur-2), opacity var(--dur-2); }
.hq-btn:active:not(:disabled) { transform: translateY(2px); box-shadow: inset 0 -1px 0 var(--edge); }
.hq-btn.is-wide { width: 100%; }
.hq-btn.is-primary { background: var(--brand); color: var(--on-brand); }
.hq-btn.is-secondary { background: var(--bg-3); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line), inset 0 -3px 0 var(--bg-2); }
.hq-btn.is-ghost { background: transparent; color: var(--ink-2); box-shadow: none; }
.hq-btn.is-ghost:hover { background: var(--bg-3); }
.hq-btn.is-ghost .hq-pix { color: var(--volt); }
.hq-btn.is-good { background: var(--good); color: oklch(.2 .04 158); }
.hq-btn.is-calm { background: var(--ink); color: var(--bg-0); }
.hq-btn:disabled { background: var(--bg-3); color: var(--ink-4); box-shadow: none; cursor: default; }

/* ---------- session HUD ---------- */
.hq-hud { flex: none; height: calc(52px + env(safe-area-inset-top)); padding: calc(env(safe-area-inset-top) + 4px) 8px 0; display: flex; align-items: center; gap: 10px;
  max-width: 496px; width: 100%; margin: 0 auto; }
.hq-xpbar { flex: 1; height: 8px; border-radius: var(--r-pill); background: var(--bg-3); overflow: hidden; }
.hq-xpfill { display: block; height: 100%; width: 100%; background: var(--c); border-radius: inherit; transform-origin: left center;
  transition: transform var(--dur-4) var(--ease-out); box-shadow: inset 0 2px 0 oklch(1 0 0 / .22); }
.hq-snacks { display: inline-flex; align-items: center; gap: 4px; color: var(--warn); height: 32px; }
.hq-snacks .hq-pix { width: 16px; height: 16px; }
.hq-snacks .hq-pixnum { font-size: 14px; color: var(--ink); }
.hq-snacks.is-pop .hq-pix { animation: hq-pop 380ms var(--ease-spring); }

/* ---------- question card ---------- */
.hq-qcard { background: var(--bg-1); border-radius: var(--r-lg); padding: 20px; box-shadow: var(--hilite); margin-top: 4px; }
.hq-qcard-top { display: flex; align-items: center; gap: 8px; min-height: 24px; margin-bottom: 14px; }
.hq-qcard-top .hq-eyebrow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hq-moderow { margin: -6px 0 14px; display: flex; }
.hq-timer { position: relative; width: 24px; height: 24px; flex: none; color: var(--c); }
.hq-timer svg { width: 24px; height: 24px; transform: rotate(-90deg); display: block; }
.hq-timer circle { fill: none; stroke-width: 2.2; }
.hq-timer-track { stroke: var(--bg-3); }
.hq-timer-arc { stroke: color-mix(in oklab, var(--c) 70%, transparent); stroke-linecap: round; animation-name: hq-tick; animation-timing-function: linear; animation-fill-mode: forwards; }
@keyframes hq-tick { from { stroke-dashoffset: 0; } to { stroke-dashoffset: var(--C); } }
.hq-timer-s { position: absolute; right: 28px; top: 50%; transform: translateY(-50%); font-size: 11px; color: var(--ink-4); white-space: nowrap; opacity: 0; transition: opacity var(--dur-2); }
.hq-timer.is-over .hq-timer-s { opacity: 1; }
.hq-timer.is-over .hq-timer-s::after { content: " · no rush"; }
.hq-timer.is-over { color: var(--ink-4); }

.hq-prompt { display: flex; flex-direction: column; gap: 12px; color: var(--ink); }
.hq-prompt strong { font-weight: 600; color: var(--ink); }
.hq-prompt.is-quant p, .hq-quant { font-family: var(--font-ui); font-size: 19px; font-weight: 500; line-height: 1.4; letter-spacing: -.005em; }
.hq-serif { font-family: var(--font-display); font-size: 24px; line-height: 1.3; letter-spacing: -.003em; }
.hq-serif strong { font-weight: 400; font-style: italic; color: var(--c); }
.hq-instr { font-family: var(--font-ui) !important; font-size: 14px !important; font-weight: 500 !important; line-height: 1.45 !important; color: var(--ink-3) !important; letter-spacing: 0 !important; }
.hq-instr strong { color: var(--ink-2); }
.hq-figure { font-size: 28px; font-weight: 600; line-height: 1.25; letter-spacing: .02em; color: var(--ink); padding: 14px 16px; border-radius: var(--r-md);
  background: var(--bg-2); text-align: center; word-spacing: .12em; }
.hq-figure.is-verbal { font-family: var(--font-display); font-weight: 400; font-size: 30px; letter-spacing: .01em; word-spacing: normal; }
.hq-blank { display: inline-block; width: 80px; height: 1em; border-bottom: 2px solid var(--c); vertical-align: -0.1em; margin: 0 4px; }
.hq-given { font-size: 17px !important; font-weight: 500; color: var(--ink-2); text-align: center; }
.hq-qc { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.hq-qc > div { background: var(--bg-2); border-radius: var(--r-md); padding: 12px; display: flex; flex-direction: column; gap: 6px; align-items: center; text-align: center; }
.hq-qc-h { font-size: 11px; font-weight: 600; letter-spacing: .08em; color: var(--ink-3); }
.hq-qc-v { font-size: 20px; font-weight: 600; line-height: 1.3; }
.hq-stim { background: var(--bg-2); color: var(--ink-2); font-size: 15px; line-height: 1.55; padding: 14px 16px; border-radius: var(--r-md);
  max-height: 42vh; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; border-left: 3px solid color-mix(in oklab, var(--c) 55%, transparent); }
.hq-stim strong { color: var(--ink); }
.hq-bullets { display: flex; flex-direction: column; gap: 4px; }
.hq-bullets li { position: relative; padding-left: 16px; }
.hq-bullets li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 6px; height: 6px; border-radius: 1px; background: var(--c); opacity: .8; }
.hq-stem { font-size: 16px; font-weight: 600; line-height: 1.45; color: var(--ink); }
.hq-case { background: var(--bg-2); border-radius: var(--r-md); padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; border-top: 3px solid color-mix(in oklab, var(--fuel) 60%, transparent); }
.hq-case-tag { font-size: 11px; font-weight: 600; letter-spacing: .08em; color: var(--fuel); }
.hq-case-p { font-size: 18px; font-weight: 500; line-height: 1.45; }
.hq-n { color: var(--fuel); font-weight: 600; }
.hq-headline { display: flex; flex-direction: column; gap: 12px; }
.hq-fig { margin: 16px 0 0; padding: 14px; border-radius: var(--r-md); background: var(--bg-2); display: flex; justify-content: center; color: var(--ink-2); }
.hq-fig svg { width: 100%; height: auto; max-width: 300px; display: block; }
.hq-fig.is-matrix svg { max-width: 260px; }
.hq-fig.is-rotation svg { max-width: 168px; }
.hq-fig.is-rotation { color: var(--c); }
.hq-fig.is-matrix { color: var(--c); }
.hq-fig.is-table svg { max-width: 100%; }
.hq-fig.is-table { color: var(--ink); padding: 12px 10px; }

/* ---------- options ---------- */
.hq-opts { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.hq-opt { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 10px 14px 10px 12px; text-align: left; cursor: pointer;
  background: var(--bg-2); border: 1.5px solid transparent; border-radius: var(--r-md); box-shadow: 0 3px 0 var(--bg-3);
  font-size: 15px; line-height: 1.4; color: var(--ink);
  transition: transform var(--dur-1) var(--ease-std), box-shadow var(--dur-1) var(--ease-std), background var(--dur-2), border-color var(--dur-2), opacity var(--dur-2); }
.hq-opt:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 0 0 var(--bg-3); }
.hq-opt.is-word .hq-opt-t { font-size: 17px; }
.hq-key { flex: none; width: 26px; height: 26px; border-radius: var(--r-xs); display: grid; place-items: center; font-family: var(--font-mono); font-size: 12px; font-weight: 500;
  background: var(--bg-3); color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line); transition: background var(--dur-2), color var(--dur-2); }
.hq-opt-t { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.hq-opt-ic { width: 20px; height: 20px; }
.hq-opt.is-sel, .hq-tile.is-sel { background: color-mix(in oklab, var(--c) var(--tint), var(--bg-2)); border-color: var(--c); box-shadow: 0 3px 0 color-mix(in oklab, var(--c) 45%, var(--bg-3)); }
.hq-opt.is-sel .hq-key, .hq-tile.is-sel .hq-key { background: var(--c); color: var(--bg-0); box-shadow: none; }
.hq-opt.is-right, .hq-tile.is-right { background: color-mix(in oklab, var(--good) var(--tint), var(--bg-2)); border-color: var(--good); box-shadow: 0 3px 0 color-mix(in oklab, var(--good) 40%, var(--bg-3)); }
.hq-opt.is-right .hq-key, .hq-tile.is-right .hq-key { background: var(--good); color: var(--bg-0); box-shadow: none; }
.hq-opt.is-right .hq-opt-ic { color: var(--good); }
.hq-opt.is-wrong, .hq-tile.is-wrong { background: color-mix(in oklab, var(--bad) 12%, var(--bg-2)); border-color: color-mix(in oklab, var(--bad) 70%, transparent); box-shadow: 0 3px 0 color-mix(in oklab, var(--bad) 30%, var(--bg-3)); }
.hq-opt.is-wrong .hq-key, .hq-tile.is-wrong .hq-key { background: var(--bad); color: var(--bg-0); box-shadow: none; }
.hq-opt.is-wrong .hq-opt-ic { color: var(--bad); }
.hq-opt.is-dim, .hq-tile.is-dim { opacity: .5; }
.hq-opt:disabled, .hq-tile:disabled { cursor: default; }

.hq-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 4px; }
.hq-tile { position: relative; aspect-ratio: 1; display: grid; place-items: center; padding: 14px; cursor: pointer; color: var(--ink-2);
  background: var(--bg-2); border: 1.5px solid transparent; border-radius: var(--r-md); box-shadow: 0 3px 0 var(--bg-3);
  transition: transform var(--dur-1) var(--ease-std), box-shadow var(--dur-1) var(--ease-std), background var(--dur-2), border-color var(--dur-2), opacity var(--dur-2); }
.hq-tile:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 0 0 var(--bg-3); }
.hq-tile svg { width: 100%; height: 100%; max-width: 84px; max-height: 84px; }
.hq-tile .hq-key { position: absolute; left: 6px; top: 6px; width: 22px; height: 22px; font-size: 11px; }
.hq-tile.is-sel { color: var(--c); }
.hq-tile.is-right { color: var(--good); }
.hq-tile.is-wrong { color: var(--bad); }

.hq-kbd-hint { display: none; text-align: center; font-size: 11px; color: var(--ink-4); padding-top: 4px; letter-spacing: .02em; }
@media (hover: hover) and (pointer: fine) { .hq-kbd-hint { display: block; } }

/* ---------- action bar + feedback sheet ---------- */
.hq-actionbar { position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; padding: 12px 16px calc(16px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, var(--bg-0) 70%, transparent); display: flex; flex-direction: column; gap: 10px; }
.hq-actionbar > * { width: 100%; max-width: 448px; margin-left: auto; margin-right: auto; }
.hq-feedback { background: var(--bg-2); border-top-left-radius: var(--r-xl); border-top-right-radius: var(--r-xl); padding-top: 20px;
  box-shadow: 0 -8px 32px oklch(0 0 0 / .5); animation: hq-sheet var(--dur-3) var(--ease-out) both; max-height: 62vh; overflow-y: auto; }
@keyframes hq-sheet { from { transform: translateY(100%); } to { transform: none; } }
.hq-feedback.is-good { background: color-mix(in oklab, var(--good) 13%, var(--bg-2)); }
.hq-feedback.is-bad { background: color-mix(in oklab, var(--bad) 11%, var(--bg-2)); }
.hq-fb-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.hq-fb-ic { width: 26px; height: 26px; padding: 4px; border-radius: 50%; }
.is-good .hq-fb-ic { background: var(--good); color: var(--bg-0); }
.is-bad .hq-fb-ic { background: color-mix(in oklab, var(--bad) 85%, var(--ink)); color: var(--bg-0); }
.hq-fb-title { font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
.is-good .hq-fb-title { color: var(--good); }
.is-bad .hq-fb-title { color: color-mix(in oklab, var(--bad) 70%, var(--ink)); }
.hq-fb-ans { font-size: 14px; color: var(--ink); font-weight: 500; flex-basis: 100%; padding-left: 36px; margin-top: -4px; }
.hq-fb-why { font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.hq-srclink { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); text-decoration: none; min-height: 32px; width: auto !important; margin-left: 0 !important; }
.hq-srclink .hq-ic { width: 14px; height: 14px; }
.hq-srclink:hover { color: var(--ink); text-decoration: underline; }

/* confirm */
.hq-confirm { position: absolute; inset: 0; z-index: 10; background: oklch(0 0 0 / .6); display: grid; place-items: end center; padding: 16px; animation: hq-fade var(--dur-2) both; }
@keyframes hq-fade { from { opacity: 0; } to { opacity: 1; } }
.hq-confirm-card { width: 100%; max-width: 448px; background: var(--bg-2); border-radius: var(--r-xl); padding: 20px; display: flex; flex-direction: column; gap: 8px;
  box-shadow: 0 -8px 32px oklch(0 0 0 / .5); margin-bottom: env(safe-area-inset-bottom); animation: hq-sheet var(--dur-3) var(--ease-out) both; }
.hq-confirm-t { font-size: 17px; font-weight: 600; }
.hq-confirm-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }

/* loading */
.hq-loading { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; color: var(--ink-3); padding-bottom: 80px; }
.hq-loading-glyph { width: 72px; height: 72px; border-radius: var(--r-lg); display: grid; place-items: center; color: var(--c); background: color-mix(in oklab, var(--c) var(--tint), transparent); animation: hq-breathe 1.4s ease-in-out infinite; }
.hq-loading-glyph .hq-pix { width: 40px; height: 40px; }
@keyframes hq-breathe { 50% { transform: scale(.92); opacity: .7; } }

/* ---------- results ---------- */
.hq-results { display: flex; flex-direction: column; align-items: stretch; gap: 16px; padding: 20px 16px; overflow: hidden; }
.hq-res-cart { display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--c); font-size: 13px; font-weight: 600; letter-spacing: .02em; }
.hq-xp { display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--volt); }
.hq-xp .hq-pixnum { font-size: 52px; height: 52px; filter: drop-shadow(0 0 18px color-mix(in oklab, var(--volt) 40%, transparent)); }
.hq-xp-l { font-size: 11px; font-weight: 600; letter-spacing: .1em; color: var(--ink-2); }
.hq-xp.is-muted { color: var(--ink-3); }
.hq-xp.is-muted .hq-pixnum { filter: none; }
.hq-res-row { display: grid; grid-template-columns: 112px 1fr; gap: 16px; align-items: center; }
.hq-ring { position: relative; width: 112px; height: 112px; }
.hq-ring svg { width: 112px; height: 112px; transform: rotate(-90deg); }
.hq-ring circle { fill: none; stroke-width: 10; }
.hq-ring-track { stroke: var(--bg-3); }
.hq-ring-arc { stroke: var(--c); stroke-linecap: round; animation: hq-ring var(--dur-4) var(--ease-out) both; }
@keyframes hq-ring { from { stroke-dashoffset: var(--C); } to { stroke-dashoffset: var(--off); } }
.hq-ring-c { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.hq-ring-v { font-size: 26px; font-weight: 600; letter-spacing: -.02em; line-height: 1; }
.hq-ring-v.is-full { font-size: 23px; }
.hq-ring-l { font-size: 11px; color: var(--ink-3); margin-top: 4px; font-weight: 500; }
.hq-res-pet { display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 0; }
.hq-pet { width: 100%; height: 84px; border-radius: var(--r-md); background:
  linear-gradient(to bottom, transparent 70%, color-mix(in oklab, var(--c) 10%, var(--bg-2)) 70%), var(--bg-2); display: grid; place-items: end center; overflow: hidden; }
.hq-pet-stage { position: relative; width: 120px; height: 84px; display: grid; place-items: end center; }
.hq-pet-img { width: 51px; height: 69px; image-rendering: pixelated; margin-bottom: 6px; animation: hq-munch 900ms steps(2) 3; }
@keyframes hq-munch { 50% { transform: translateY(-3px) scaleY(.96); } }
.hq-pet-snack { position: absolute; left: calc(50% + 22px); bottom: calc(10px + var(--i) * 9px); color: var(--warn); animation: hq-snack 500ms var(--ease-out) both; animation-delay: calc(var(--i) * 90ms + 200ms); }
.hq-pet-snack .hq-pix { width: 12px; height: 12px; }
@keyframes hq-snack { from { opacity: 0; transform: translateY(-14px); } to { opacity: 1; transform: none; } }
.hq-res-react { font-size: 13px; line-height: 1.4; color: var(--ink-2); text-align: center; }
.hq-week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; padding: 12px 8px; border-radius: var(--r-md); background: var(--bg-2); }
.hq-wd { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.hq-wd-dot { width: 26px; height: 26px; border-radius: 50%; background: var(--bg-3); display: grid; place-items: center; color: var(--bg-0); }
.hq-wd-dot .hq-ic { width: 15px; height: 15px; stroke-width: 2.5; }
.hq-wd.is-on .hq-wd-dot { background: var(--c); }
.hq-wd.is-today .hq-wd-dot { box-shadow: 0 0 0 2px var(--bg-2), 0 0 0 3.5px var(--ink-3); }
.hq-wd.is-future .hq-wd-dot { background: transparent; box-shadow: inset 0 0 0 1.5px var(--line); }
.hq-wd-l { font-size: 11px; color: var(--ink-3); font-weight: 500; }
.hq-wd.is-today .hq-wd-l { color: var(--ink); }
.hq-res-streak { display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--ink-2); font-size: 14px; }
.hq-res-streak .hq-pix { color: var(--warn); }
.hq-res-streak strong { color: var(--ink); }
.hq-res-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }

.hq-confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.hq-confetti span { position: absolute; top: -10px; left: var(--x); width: 6px; height: 6px; background: var(--col); transform: rotate(var(--r));
  animation: hq-fall 1.4s var(--ease-std) var(--d) both; }
@keyframes hq-fall { from { transform: translateY(0) rotate(var(--r)); opacity: 1; } to { transform: translateY(380px) rotate(calc(var(--r) + 220deg)); opacity: 0; } }

/* review */
.hq-rvlist { display: flex; flex-direction: column; gap: 10px; counter-reset: rv; }
.hq-rv { background: var(--bg-1); border-radius: var(--r-lg); padding: 14px 16px; box-shadow: var(--hilite); display: flex; flex-direction: column; gap: 6px; }
.hq-rv-top { display: flex; align-items: center; gap: 8px; }
.hq-rv-ic { width: 18px; height: 18px; }
.hq-rv.is-good .hq-rv-ic { color: var(--good); }
.hq-rv.is-bad .hq-rv-ic { color: var(--bad); }
.hq-rv-q { font-size: 15px; line-height: 1.45; color: var(--ink); }
.hq-rv-a { display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.hq-rv-you { color: var(--ink-3); }
.hq-rv-key { color: var(--good); font-weight: 500; }
.hq-rv-why { font-size: 13px; color: var(--ink-2); line-height: 1.5; }

/* ---------- genre card ---------- */
.hq-art { position: relative; margin: 0; aspect-ratio: 1; width: 100%; border-radius: var(--r-lg); overflow: hidden; background: var(--bg-2);
  box-shadow: 0 18px 50px -20px color-mix(in oklab, var(--accent) 45%, transparent); }
.hq-art-svg { width: 100%; height: 100%; display: block; }
.hq-art-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 56px 18px 16px; display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
  background: linear-gradient(to top, oklch(0 0 0 / .78), oklch(0 0 0 / .35) 55%, transparent); }
.hq-art-name { font-family: var(--font-display); font-size: 44px; line-height: 1; letter-spacing: -.015em; color: #fff; text-shadow: 0 2px 12px oklch(0 0 0 / .5); }
.hq-art-aka { font-size: 13px; color: oklch(1 0 0 / .78); }
.hq-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.hq-fact { position: relative; background: var(--bg-1); border-radius: var(--r-md); padding: 12px; display: flex; flex-direction: column; gap: 4px; box-shadow: var(--hilite); min-width: 0; }
.hq-fact:nth-child(2) { grid-row: span 1; }
.hq-fact.is-bpm { grid-column: span 2; flex-direction: row; align-items: baseline; gap: 12px; }
.hq-fact-l { font-size: 11px; font-weight: 600; letter-spacing: .08em; color: var(--ink-3); }
.hq-fact-v { font-size: 14px; line-height: 1.35; color: var(--ink); font-weight: 500; }
.hq-fact.is-bpm .hq-fact-v { font-size: 24px; font-weight: 600; letter-spacing: -.02em; }
.hq-fact.is-bpm small { font-size: 13px; color: var(--ink-3); font-weight: 500; letter-spacing: 0; }
.hq-pulse { margin-left: auto; align-self: center; width: 12px; height: 12px; border-radius: 50%; background: var(--spirit); animation: hq-beat var(--beat) ease-out infinite; }
@keyframes hq-beat { 0% { transform: scale(1.35); opacity: 1; } 60%, 100% { transform: scale(.8); opacity: .45; } }
.hq-vibe { font-family: var(--font-display); font-size: 23px; line-height: 1.3; color: var(--ink); padding: 6px 2px; }
.hq-whynow { border-radius: var(--r-md); padding: 12px 14px; background: color-mix(in oklab, var(--spirit) 10%, var(--bg-1)); display: flex; flex-direction: column; gap: 4px; }
.hq-whynow p { font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.hq-cues { display: flex; flex-direction: column; gap: 10px; }
.hq-cues li { display: flex; gap: 12px; align-items: baseline; font-size: 15px; line-height: 1.45; color: var(--ink-2); }
.hq-cue-bar { flex: none; width: 14px; height: 3px; border-radius: 2px; background: var(--spirit); transform: translateY(-4px); }
.hq-lineage { display: flex; flex-direction: column; gap: 12px; position: relative; }
.hq-lin-row { display: grid; grid-template-columns: 60px 1fr; gap: 10px; align-items: center; }
.hq-tracks { display: flex; flex-direction: column; }
.hq-track { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 8px 0; border-top: 1px solid var(--line); }
.hq-track:first-child { border-top: 0; padding-top: 0; }
.hq-track-n { width: 18px; color: var(--ink-3); font-size: 13px; font-weight: 600; flex: none; }
.hq-track-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.hq-track-t { font-size: 15px; font-weight: 600; color: var(--ink); line-height: 1.3; }
.hq-track-a { font-size: 13px; color: var(--ink-3); }
.hq-svcs { display: flex; gap: 4px; flex-wrap: wrap; }
.hq-svc-a { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 10px; border-radius: var(--r-pill); background: var(--bg-3); text-decoration: none; font-size: 13px; color: var(--ink); }
.hq-svcs.is-compact { flex-wrap: nowrap; gap: 2px; }
.hq-svcs.is-compact .hq-svc-a { width: 36px; height: 44px; padding: 0; justify-content: center; background: transparent; border-radius: var(--r-sm); }
.hq-svcs.is-compact .hq-svc-a:hover { background: var(--bg-3); }
.hq-svc { width: 18px; height: 18px; flex: none; }
.hq-svc-a.is-spotify .hq-svc { color: #1ed760; }
.hq-svc-a.is-youtube .hq-svc { color: #ff3b30; }
.hq-svc-a.is-bandcamp .hq-svc { color: #4fb3d9; }
.hq-svc-a.is-soundcloud .hq-svc { color: #ff7a1a; }
.hq-explore { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.hq-explore .hq-svcs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.hq-explore .hq-svc-a { justify-content: flex-start; padding: 0 12px; min-height: 44px; }

/* crate */
.hq-clist { display: flex; flex-direction: column; background: var(--bg-1); border-radius: var(--r-lg); box-shadow: var(--hilite); overflow: hidden; }
.hq-crow { position: relative; display: flex; align-items: center; padding-right: 4px; }
.hq-crow + .hq-crow::before { content: ""; position: absolute; top: 0; left: 68px; right: 0; height: 1px; background: var(--line); }
.hq-crow-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 10px 4px 10px 12px; background: transparent; border: 0; text-align: left; cursor: pointer; border-radius: var(--r-md); }
.hq-crow-main .hq-row-art { width: 44px; height: 44px; }
.hq-new-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--volt); vertical-align: middle; margin-left: 4px; }
.hq-empty { background: var(--bg-1); border-radius: var(--r-lg); padding: 24px 20px; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; color: var(--ink-2); font-size: 14px; }
.hq-empty .hq-ic { width: 32px; height: 32px; color: var(--spirit); }

/* ---------- small screens ---------- */
@media (max-width: 374px) {
  .hq-display { font-size: 34px; }
  .hq-cart-name { font-size: 15px; }
  .hq-serif { font-size: 22px; }
  .hq-figure { font-size: 24px; }
  .hq-art-name { font-size: 38px; }
  .hq-res-row { grid-template-columns: 104px 1fr; gap: 12px; }
}

/* ---------- (v208) infographic gradients ----------
   Fills run light → saturated in the cartridge hue (--c); the light end is
   --c mixed toward warm ink so it works for any hue. Primary = apricot sheen. */
.hq-btn.is-primary { background: linear-gradient(180deg, color-mix(in oklch, var(--brand) 82%, var(--brand-a, #fad3a4)), var(--brand) 55%, color-mix(in oklch, var(--brand) 78%, var(--brand-b, #f58f67))); }
.hq-xpfill { background: linear-gradient(90deg, color-mix(in oklch, var(--c) 58%, var(--ink)), var(--c)); }
.hq-progress6 span.is-on { background: linear-gradient(90deg, color-mix(in oklch, var(--c) 58%, var(--ink)), var(--c)); }
.hq-lg-col.is-cur .hq-lg-bar { background: linear-gradient(180deg, var(--brand-a, #fad3a4), var(--brand-m, #f8b380) 45%, var(--brand-b, #f58f67)); }
.hq-ring-v, .hq-ring-v.num { font-variant-numeric: proportional-nums; font-feature-settings: "pnum"; }
.hq-lg-bar { background: linear-gradient(180deg, color-mix(in oklab, var(--ink-3) 45%, var(--bg-3)), color-mix(in oklab, var(--ink-3) 28%, var(--bg-3))); }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .hq-root *, .hq-root *::before, .hq-root *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; scroll-behavior: auto !important; }
  .hq-confetti, .hq-pulse { display: none !important; }
  .hq-timer-arc { animation: none !important; }
  .hq-timer-s { opacity: 1; }
  .hq-timer.is-over .hq-timer-s::after { content: ""; }
  .hq-ring-arc { animation: none !important; }
}
