/* Azeret Mono, self-hosted.
 *
 * This used to come from fonts.googleapis.com. That is two SERIAL hops to two
 * external origins: the CSS is fetched, parsed, and only then is the woff2 URL
 * known. Traced at 185 ms latency it cost 194->386 ms for the CSS and
 * 413->611 ms for the font file — ~570 ms before any application code ran, and
 * nothing on our side could overlap it. Serving the same files from /static
 * turns that chain into one local request that the browser can start
 * immediately (see the preload in index.html).
 *
 * Same font, same weights, byte-identical files pulled from Google's CDN;
 * only where they are served from changed. Both subsets are kept so accented
 * characters still render. Regenerate by re-downloading the URLs in the
 * @font-face src of https://fonts.googleapis.com/css2?family=Azeret+Mono:wght@400;500;700
 */
@font-face{
  font-family:'Azeret Mono'; font-style:normal; font-weight:400 700;
  font-display:swap;
  src:url('/static/fonts/azeret-mono-latin.woff2') format('woff2');
  unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,
    U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,
    U+FEFF,U+FFFD;
}
@font-face{
  font-family:'Azeret Mono'; font-style:normal; font-weight:400 700;
  font-display:swap;
  src:url('/static/fonts/azeret-mono-latin-ext.woff2') format('woff2');
  unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,
    U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,
    U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

:root{
  --bg:#0a0d0c; --panel:rgba(18,22,20,.82); --line:#1f2a25;
  --ink:#d7e4dc; --dim:#6f8278; --accent:#76e36b; --accent-dim:#2f5a2c;
  --warn:#e3b86b;
}
*{box-sizing:border-box}
html,body{margin:0;height:100%;background:var(--bg);color:var(--ink);
  font-family:'Azeret Mono',ui-monospace,Menlo,Consolas,monospace;overflow:hidden}
#app{position:fixed;inset:0}
canvas{display:block}
#viser{position:fixed;inset:0;width:100%;height:100%;border:0;z-index:0;
  background:var(--bg)}

.hud{position:fixed;pointer-events:none;z-index:5}
.hud *{pointer-events:auto}

/* top-left title */
#brand{top:18px;left:20px;display:flex;align-items:center;gap:12px}
/* Next to the title, not at the bottom-left: the egoview PiP opens there and covered it. */
#datasetLink{padding:7px 16px;border:1px solid var(--accent);border-radius:999px;
  background:var(--accent);color:var(--bg);font-size:13px;font-weight:700;
  letter-spacing:.18em;text-transform:uppercase;text-decoration:none}
#datasetLink:hover{filter:brightness(1.15)}
#datasetLink[hidden]{display:none}
#brand h1{margin:0;font-size:13px;letter-spacing:.32em;font-weight:700;
  text-transform:uppercase}
#brand h1 b{color:var(--accent)}
#brand p{margin:3px 0 0;font-size:10.5px;color:var(--dim);letter-spacing:.18em}

/* top-center prompt / generation panel */
#gen{top:18px;left:50%;transform:translateX(-50%);
  background:var(--panel);backdrop-filter:blur(14px);
  border:1px solid var(--line);border-radius:14px;padding:10px 12px;
  display:flex;align-items:center;gap:10px;width:min(640px,84vw);
  box-shadow:0 18px 50px -20px #000}
/* Needed because the rule above sets display:flex, which beats the UA
   [hidden]{display:none} — same reason every other hideable HUD here has one. */
#gen[hidden]{display:none}
#prompt{flex:1;font-family:inherit;background:#0f140f;color:var(--ink);
  border:1px solid var(--line);border-radius:9px;padding:9px 11px;
  font-size:12px;letter-spacing:.03em;outline:none}
#prompt:focus{border-color:var(--accent-dim)}
#prompt::placeholder{color:var(--dim)}
#dur{width:58px;font-family:inherit;background:#0f140f;color:var(--ink);
  border:1px solid var(--line);border-radius:9px;padding:9px 8px;font-size:12px;
  text-align:center;outline:none}
#dur:focus{border-color:var(--accent-dim)}
#genBtn{min-width:96px}
#genBtn.busy{opacity:.6;cursor:progress}
/* Motion/Voice dispatch switch — a real toggle control (not a plain button)
   so it visually reads as "this can be flipped", not as another action. */
#modeSwitch{display:flex;align-items:center;gap:7px;cursor:pointer;
  font-size:10px;letter-spacing:.08em;text-transform:uppercase;color:var(--dim);
  user-select:none}
#modeSwitch input{position:absolute;opacity:0;width:0;height:0}
#modeSwitch .switch-track{position:relative;width:34px;height:18px;flex:none;
  border-radius:999px;background:#1c2620;border:1px solid var(--line);transition:.15s}
#modeSwitch .switch-knob{position:absolute;top:1px;left:1px;width:14px;height:14px;
  border-radius:50%;background:var(--dim);transition:.15s}
#modeSwitch input:checked + .switch-track{background:var(--accent-dim);border-color:var(--accent)}
#modeSwitch input:checked + .switch-track .switch-knob{transform:translateX(16px);background:var(--accent)}
#modeSwitch.on .switch-label{color:var(--accent)}

/* voice (continuous mic) toggle */
#micBtn{display:flex;align-items:center;gap:7px;min-width:88px;justify-content:center}
#micBtn[hidden]{display:none}
#micBtn .dot{width:8px;height:8px;border-radius:50%;background:var(--dim);
  transition:.15s}
#micBtn.on{border-color:var(--accent);color:var(--accent)}
#micBtn.on .dot{background:#e3705e;animation:pulse 1.1s ease-in-out infinite}
#micBtn.live .dot{background:var(--accent);box-shadow:0 0 8px var(--accent)}
@keyframes pulse{0%,100%{opacity:1}50%{opacity:.25}}
/* webcam toggles: "Camera" (describe) and "Imitate" (pose-following) */
#camBtn,#followBtn{display:flex;align-items:center;gap:7px;min-width:92px;justify-content:center}
#camBtn[hidden],#followBtn[hidden]{display:none}
#camBtn .dot,#followBtn .dot{width:8px;height:8px;border-radius:50%;background:var(--dim);
  transition:.15s}
#camBtn.on,#followBtn.on{border-color:var(--accent);color:var(--accent)}
#camBtn.on .dot,#followBtn.on .dot{background:#e3705e;animation:pulse 1.1s ease-in-out infinite}
#camBtn.live .dot,#followBtn.live .dot{background:var(--accent);box-shadow:0 0 8px var(--accent)}

#genStatus{position:absolute;left:0;top:100%;margin-top:8px;width:100%;
  text-align:center;font-size:10.5px;letter-spacing:.06em;color:var(--dim);
  pointer-events:none}
#genStatus.err{color:var(--warn)}

/* top-right environment (HDRI) picker */
#envPicker{top:18px;right:20px;display:flex;align-items:center;gap:8px;
  background:var(--panel);backdrop-filter:blur(14px);border:1px solid var(--line);
  border-radius:12px;padding:8px 10px;box-shadow:0 18px 50px -20px #000}
#envPicker[hidden]{display:none}
#envPicker label{font-size:10px;letter-spacing:.12em;color:var(--dim);
  text-transform:uppercase}
#envSelect{font-family:inherit;background:#0f140f;color:var(--ink);
  border:1px solid var(--line);border-radius:9px;padding:8px 9px;font-size:11.5px;
  letter-spacing:.03em;outline:none;cursor:pointer;max-width:200px}
#envSelect:focus{border-color:var(--accent-dim)}
#envSelect:disabled{opacity:.5;cursor:progress}

/* bottom-left egoview (first-person head camera) PiP + its toggle */
#egoDock{left:20px;bottom:20px;display:flex;flex-direction:column;gap:10px;
  align-items:flex-start}
/* No background. The picture is the viewer's own canvas showing THROUGH this
   element (see #egoFrame), so anything painted here would cover it; the panel
   is a border, a radius and a shadow around a hole. #egoLoading still paints
   its own opaque backdrop until the first frame is drawn. */
#egoview{width:240px;border:1px solid var(--line);border-radius:12px;
  overflow:hidden;background:transparent;box-shadow:0 18px 50px -20px #000}
#egoview[hidden]{display:none}
/* The PiP is painted by the viewer's canvas UNDERNEATH this element, so it
   must stay transparent -- a background here would cover the picture.
   Only its box matters; egoview.js reads it with getBoundingClientRect. */
#egoFrame{display:block;width:100%;aspect-ratio:4/3;background:transparent}
#egoLabel{position:absolute;left:8px;top:8px;display:flex;align-items:center;
  gap:6px;font-size:10px;letter-spacing:.14em;color:var(--ink);
  text-transform:uppercase;text-shadow:0 1px 3px #000;pointer-events:none}
#egoLabel .dot{width:7px;height:7px;border-radius:50%;background:var(--accent);
  box-shadow:0 0 8px var(--accent)}
#egoview{position:relative}
/* loading overlay shown until the first real egoview frame is drawn */
#egoLoading{position:absolute;inset:0;display:flex;align-items:center;
  justify-content:center;gap:8px;background:#0b0f0d;color:var(--dim);
  font-size:10px;letter-spacing:.14em;text-transform:uppercase}
#egoview.ready #egoLoading{display:none}
.ego-spin{width:12px;height:12px;border-radius:50%;border:2px solid var(--line);
  border-top-color:var(--accent);animation:ego-spin .8s linear infinite}
@keyframes ego-spin{to{transform:rotate(360deg)}}
#egoBtn{min-width:96px}
#egoBtn[hidden]{display:none}
#egoBtn.on{border-color:var(--accent);color:var(--accent)}

/* corner webcam preview overlay */
#cam{position:fixed;right:20px;bottom:20px;z-index:15;width:240px;
  border:1px solid var(--line);border-radius:12px;overflow:hidden;
  background:#000;box-shadow:0 18px 50px -20px #000}
#cam[hidden]{display:none}
#cam video{display:block;width:100%;height:auto;transform:scaleX(-1);
  background:#000}
#camLabel{position:absolute;left:8px;top:8px;display:flex;align-items:center;
  gap:6px;padding:4px 8px;border-radius:7px;background:rgba(8,12,10,.66);
  backdrop-filter:blur(6px);font-size:9.5px;letter-spacing:.12em;
  text-transform:uppercase;color:var(--ink)}
#camLabel .dot{width:7px;height:7px;border-radius:50%;background:var(--dim)}
#cam.live #camLabel .dot{background:var(--accent);
  box-shadow:0 0 8px var(--accent);animation:pulse 1.1s ease-in-out infinite}

/* holistic (MediaPipe) overlay preview, left of the webcam preview */
#camHolistic{position:fixed;right:280px;bottom:20px;z-index:15;width:240px;
  border:1px solid var(--line);border-radius:12px;overflow:hidden;
  background:#000;box-shadow:0 18px 50px -20px #000}
#camHolistic[hidden]{display:none}
#camHolistic canvas{display:block;width:100%;height:auto;transform:scaleX(-1);
  background:#000}
#holisticLabel{position:absolute;left:8px;top:8px;display:flex;align-items:center;
  gap:6px;padding:4px 8px;border-radius:7px;background:rgba(8,12,10,.66);
  backdrop-filter:blur(6px);font-size:9.5px;letter-spacing:.12em;
  text-transform:uppercase;color:var(--ink)}
#holisticLabel .dot{width:7px;height:7px;border-radius:50%;background:var(--dim)}
#camHolistic.live #holisticLabel .dot{background:var(--accent);
  box-shadow:0 0 8px var(--accent);animation:pulse 1.1s ease-in-out infinite}

button{font-family:inherit;color:var(--ink);background:#141a17;
  border:1px solid var(--line);border-radius:9px;padding:8px 12px;
  font-size:11px;letter-spacing:.08em;cursor:pointer;transition:.15s}
button:hover{border-color:var(--accent-dim);color:var(--accent)}
button.play{background:var(--accent);color:#06160a;border-color:var(--accent);
  font-weight:700;min-width:74px}
button.play:hover{filter:brightness(1.08);color:#06160a}
button.accent{background:var(--accent);color:#06160a;border-color:var(--accent);
  font-weight:700}
button.accent:hover{filter:brightness(1.08);color:#06160a}

/* bottom control bar */
#bar{left:50%;transform:translateX(-50%);bottom:20px;
  background:var(--panel);backdrop-filter:blur(14px);
  border:1px solid var(--line);border-radius:14px;padding:12px 16px;
  display:flex;align-items:center;gap:14px;min-width:min(720px,92vw);
  box-shadow:0 18px 50px -20px #000}
#scrub{flex:1;accent-color:var(--accent);height:4px;cursor:pointer}
.read{font-size:11px;color:var(--dim);white-space:nowrap;letter-spacing:.06em}
.read b{color:var(--ink);font-weight:500}

/* right settings rail */
#rail{top:18px;right:20px;background:var(--panel);backdrop-filter:blur(14px);
  border:1px solid var(--line);border-radius:14px;padding:10px;width:212px;
  display:flex;flex-direction:column;gap:11px;box-shadow:0 18px 50px -20px #000}
.row{display:flex;align-items:center;justify-content:space-between;gap:10px}
.lab{font-size:10.5px;color:var(--dim);letter-spacing:.1em;text-transform:uppercase}
.seg{display:flex;border:1px solid var(--line);border-radius:8px;overflow:hidden}
.seg button{border:0;border-radius:0;padding:6px 10px;font-size:10px}
.seg button.on{background:var(--accent-dim);color:var(--accent)}
.chk{display:flex;align-items:center;gap:8px;font-size:11px;color:var(--ink);
  cursor:pointer;letter-spacing:.04em}
.chk input{accent-color:var(--accent);width:14px;height:14px}
select{font-family:inherit;background:#141a17;color:var(--ink);
  border:1px solid var(--line);border-radius:8px;padding:6px 8px;font-size:11px}
.hr{height:1px;background:var(--line);margin:2px 0}
#loadBtn{width:100%;text-align:center;border-style:dashed;
  border-color:var(--accent-dim);color:var(--accent)}
#fileName{font-size:10px;color:var(--dim);word-break:break-all;line-height:1.4}

/* drop overlay */
#drop{position:fixed;inset:0;z-index:30;display:none;align-items:center;
  justify-content:center;background:rgba(8,12,10,.86);
  border:2px dashed var(--accent);}
#drop.show{display:flex}
#drop div{font-size:14px;letter-spacing:.2em;color:var(--accent);text-transform:uppercase}

/* bottom-left camera description (full text, wraps) */
#camDesc{position:fixed;left:20px;bottom:20px;z-index:12;max-width:min(720px,calc(100vw - 300px));
  background:var(--panel);backdrop-filter:blur(14px);
  border:1px solid var(--line);border-radius:12px;padding:10px 14px;
  font-size:11px;line-height:1.55;letter-spacing:.03em;color:var(--ink);
  box-shadow:0 18px 50px -20px #000;pointer-events:auto;
  max-height:min(30vh,220px);overflow-y:auto;word-break:break-word}
#camDesc[hidden]{display:none}
#camDesc .tag{color:var(--accent);font-weight:500;white-space:nowrap}

#voiceStatus{position:fixed;bottom:20px;right:20px;z-index:15;
  display:flex;align-items:center;gap:7px;
  background:var(--panel);backdrop-filter:blur(14px);
  border:1px solid var(--line);border-radius:10px;padding:7px 12px;
  font-size:11px;letter-spacing:.1em;color:var(--accent);pointer-events:none}
#voiceStatus[hidden]{display:none}
#voiceStatus .dot{width:7px;height:7px;border-radius:50%;background:var(--accent);
  box-shadow:0 0 6px var(--accent);animation:pulse 1.8s ease-in-out infinite}

#toast{position:fixed;bottom:88px;left:50%;transform:translateX(-50%);z-index:20;
  background:#1a120a;border:1px solid var(--warn);color:var(--warn);
  padding:9px 14px;border-radius:10px;font-size:11px;letter-spacing:.05em;
  display:none}

/* Scene connection state (scene-watch.js). Sits under the brand, out of the
   way of the controls, and never covers the canvas — a frozen scene is still
   worth looking at while the connection comes back. */
#sceneStatus{top:56px;left:20px;display:flex;align-items:center;gap:8px;
  background:var(--panel);backdrop-filter:blur(14px);border:1px solid var(--warn);
  color:var(--warn);padding:7px 12px;border-radius:10px;font-size:11px;
  letter-spacing:.05em}
#sceneStatus[hidden]{display:none}
#sceneStatus .scene-dot{width:7px;height:7px;border-radius:50%;
  background:var(--warn);animation:scenePulse 1.1s ease-in-out infinite}
#sceneStatus button{background:transparent;border:1px solid var(--warn);
  color:var(--warn);border-radius:7px;padding:3px 9px;font:inherit;cursor:pointer}
@keyframes scenePulse{0%,100%{opacity:.35}50%{opacity:1}}

/* small, non-blocking generation indicator (does not cover the canvas) */
#busy{position:fixed;left:50%;bottom:20px;transform:translateX(-50%);z-index:40;
  display:none;align-items:center;gap:10px;pointer-events:none;
  background:var(--panel);backdrop-filter:blur(14px);
  border:1px solid var(--line);border-radius:10px;padding:8px 14px;
  box-shadow:0 18px 50px -20px #000}
#busy.show{display:inline-flex}
#busy .spin{width:16px;height:16px;border:2px solid var(--line);
  border-top-color:var(--accent);border-radius:50%;animation:spin 0.9s linear infinite}
#busy .msg{font-size:11px;letter-spacing:.14em;color:var(--accent);
  text-transform:uppercase}
@keyframes spin{to{transform:rotate(360deg)}}
#subtitle {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 16;
  width: fit-content;
  max-width: min(900px, 92vw);
  background: #000;
  border-radius: 10px;
  padding: 10px 18px;
  text-align: center;
  font-size: 16px;
  line-height: 1.5;
  color: #fff;
  pointer-events: none;
  max-height: 4.2em;
  overflow: hidden;
}

/* ── Boot / loading screen ────────────────────────────────────────────────
   Covers the iframe (and everything else) from first paint — pure HTML/CSS,
   so it shows instantly with no white flash even before main.js runs. Hidden
   by loader.js once the Viser canvas has actually painted a frame (or after
   a hard timeout, so it can never get stuck). Old-console boot-screen vibe:
   scanlines, a tiny pixel-art bot, a chunky segmented progress bar, rotating
   flavor tips. */
#loader{position:fixed;inset:0;z-index:100;display:flex;align-items:center;
  justify-content:center;background:radial-gradient(120% 120% at 50% 38%,#101915 0%,#070a08 62%,#050605 100%);
  transition:opacity .45s ease;opacity:1}
#loader.hide{opacity:0;pointer-events:none}
#loader[hidden]{display:none}

.loader-scan{position:absolute;inset:0;pointer-events:none;
  background:repeating-linear-gradient(to bottom,rgba(255,255,255,.05) 0px,rgba(255,255,255,.05) 1px,
    transparent 1px,transparent 3px);
  mix-blend-mode:overlay;animation:scan-drift 9s linear infinite}
.loader-vignette{position:absolute;inset:0;pointer-events:none;
  box-shadow:inset 0 0 160px 40px #000;animation:flicker 4.2s ease-in-out infinite}
@keyframes scan-drift{from{background-position:0 0}to{background-position:0 120px}}
@keyframes flicker{0%,100%{opacity:1}45%{opacity:1}47%{opacity:.85}49%{opacity:1}82%{opacity:1}84%{opacity:.92}86%{opacity:1}}

.loader-box{position:relative;z-index:1;display:flex;flex-direction:column;align-items:center;
  gap:16px;padding:34px 42px;width:min(360px,84vw)}

/* Synthium logo shown while the viewer boots; a gentle bob keeps it alive. */
.loader-logo{width:min(240px,60vw);height:auto;margin-bottom:2px;
  filter:drop-shadow(0 0 14px var(--accent-dim));
  animation:bot-bob 1.6s ease-in-out infinite}
@keyframes bot-bob{0%,100%{transform:translateY(0)}50%{transform:translateY(-4px)}}

.loader-title{font-size:14px;letter-spacing:.34em;font-weight:700;text-transform:uppercase;
  color:var(--ink)}
.loader-title b{color:var(--accent)}

.loader-bar{width:100%;height:14px;padding:2px;border:1px solid var(--line);border-radius:3px;
  background:#0c1210;box-shadow:inset 0 0 0 1px rgba(0,0,0,.4)}
.loader-bar-fill{height:100%;width:0%;border-radius:1px;
  background:repeating-linear-gradient(90deg,var(--accent) 0px,var(--accent) 8px,#4fae47 8px,#4fae47 10px);
  box-shadow:0 0 10px var(--accent);transition:width .25s linear}

.loader-row{width:100%;display:flex;align-items:baseline;justify-content:space-between;
  font-size:10.5px;letter-spacing:.16em;text-transform:uppercase;color:var(--dim)}
.loader-label{color:var(--accent)}
.loader-dots span{animation:dot-blink 1.4s infinite;opacity:0}
.loader-dots span:nth-child(1){animation-delay:0s}
.loader-dots span:nth-child(2){animation-delay:.25s}
.loader-dots span:nth-child(3){animation-delay:.5s}
@keyframes dot-blink{0%,80%,100%{opacity:0}30%{opacity:1}}
.loader-pct{color:var(--ink);font-variant-numeric:tabular-nums}

.loader-tip{min-height:2.6em;font-size:11px;line-height:1.5;letter-spacing:.03em;
  color:var(--dim);text-align:center}

/* ── Mobile / tablet adjustments (≤768 px) ───────────────────────────────────
   Laptop styles are untouched — this block only overrides on small screens.   */
@media (max-width: 768px) {
  /* Camera preview: 160px on mobile */
  #cam { width: 160px; }
  /* Holistic canvas mirrors the camera size and stays left of it */
  #camHolistic { width: 160px; right: 190px; }

  /* Dataset under the title: beside it, the centred Charades buttons cover it */
  #brand { flex-direction: column; align-items: flex-start; gap: 6px; }
  #datasetLink { padding: 6px 12px; font-size: 12px; letter-spacing: .12em; }

  /* Gen box: left-aligned on mobile instead of centered */
  #gen { left: 20px; transform: none; }

  /* Subtitle: left-aligned, bigger text, wider box but same height, clears cam */
  #subtitle {
    left: 20px;
    transform: none;
    font-size: 16px;
    max-height: 7.5em;
    padding: 10px 16px;
    max-width: calc(100vw - 200px);
  }
}



#charades { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); z-index: 30;
  color: #fff; font: 14px/1.35 system-ui, sans-serif; text-align: center; }
/* Flush to the top; below the prompt bar only when that bar is on (KIMODO_FEAT_PROMPT_BAR). */
body:has(#gen:not([hidden])) #charades { top: 72px; }
#charades .ch-card { display: none; width: min(300px, calc(100vw - 32px)); padding: 10px 12px 12px;
  border-radius: 14px; background: rgba(10, 12, 16, 0.78); backdrop-filter: blur(6px); }
#charades[data-on="1"] .ch-card { display: block; }
#charades[data-on="1"] #chStart { display: none; }
#chStart { padding: 8px 14px; border: 0; border-radius: 999px; background: #3b82f6; color: #fff;
  font: 600 14px system-ui, sans-serif; cursor: pointer; box-shadow: 0 2px 10px rgba(0,0,0,.3); }
.ch-top { display: flex; align-items: center; gap: 8px; font-size: 12px; opacity: .85; }
#chRole { padding: 1px 8px; border-radius: 999px; background: rgba(255,255,255,.14); font-weight: 600; }
#charades[data-role="human"] #chRole { background: #a855f7; }
#charades[data-role="robot"] #chRole { background: #0ea5e9; }
#chQuit { margin-left: auto; width: 26px; height: 26px; border: 0; border-radius: 50%; background: rgba(255,255,255,.12);
  color: #fff; font-size: 18px; line-height: 26px; cursor: pointer; }
#chQuit:hover { background: #ef4444; }
#chPhase { margin: 8px 0 6px; font-size: 18px; font-weight: 700; }
.ch-bar { height: 6px; border-radius: 3px; background: rgba(255,255,255,.14); overflow: hidden; visibility: hidden; }
.ch-bar.on { visibility: visible; }
.ch-bar i { display: block; height: 100%; width: 100%; background: #22c55e; transition: width .25s linear; }
.ch-bar.low i { background: #f97316; }
#chHeard { min-height: 1.35em; margin-top: 6px; font-size: 13px; opacity: .9; }
#chHeard[data-verdict="right"] { color: #4ade80; }
#chHeard[data-verdict="close"] { color: #fbbf24; }
#chHeard[data-verdict="wrong"] { color: #f87171; }
#chScore { margin-top: 4px; font-weight: 600; font-variant-numeric: tabular-nums; }
.ch-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 8px; }
.ch-actions button { display: none; padding: 5px 12px; border: 0; border-radius: 999px; background: rgba(255,255,255,.16);
  color: #fff; font: 600 13px system-ui, sans-serif; cursor: pointer; }
.ch-actions button:hover { background: rgba(255,255,255,.28); }
.ch-actions button.show { display: inline-block; }
#chAgain { background: #3b82f6; }
#chGuessText { width: 100%; margin-top: 8px; padding: 6px; border-radius: 6px; border: 0; }
#dbStart { margin-left: 6px; padding: 8px 14px; border: 0; border-radius: 999px; background: #ec4899; color: #fff;
  font: 600 14px system-ui, sans-serif; cursor: pointer; box-shadow: 0 2px 10px rgba(0,0,0,.3); }
#charades .db-card { display: none; width: min(300px, calc(100vw - 32px)); padding: 10px 12px 12px;
  border-radius: 14px; background: rgba(10, 12, 16, 0.78); backdrop-filter: blur(6px); }
#charades[data-dance="1"] .db-card { display: block; }
#charades[data-on="1"] #dbStart, #charades[data-dance="1"] #chStart, #charades[data-dance="1"] #dbStart { display: none; }
#dbRole { padding: 1px 8px; border-radius: 999px; background: rgba(255,255,255,.14); font-weight: 600; }
#charades[data-dbrole="human"] #dbRole { background: #a855f7; }
#charades[data-dbrole="robot"] #dbRole { background: #ec4899; }
#dbQuit { margin-left: auto; width: 26px; height: 26px; border: 0; border-radius: 50%; background: rgba(255,255,255,.12);
  color: #fff; font-size: 18px; line-height: 26px; cursor: pointer; }
#dbQuit:hover { background: #ef4444; }
#dbPhase { margin: 8px 0 6px; font-size: 18px; font-weight: 700; }
#dbLast { min-height: 1.35em; margin-top: 6px; font-size: 13px; opacity: .9; }
#dbScore { margin-top: 4px; font-weight: 600; font-variant-numeric: tabular-nums; }
#dbRate button { min-width: 30px; padding: 5px 0; }
#dbAgain { background: #ec4899; }

/* Recording notice (static/js/consent.js) */
#consent { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 40;
  width: min(520px, calc(100vw - 32px)); padding: 14px 16px; border-radius: 14px;
  background: rgba(10, 12, 16, 0.88); backdrop-filter: blur(8px); color: #fff;
  font: 14px/1.45 system-ui, sans-serif; box-shadow: 0 6px 24px rgba(0,0,0,.35); }
#consent p { margin: 0 0 10px; }
#consent .consent-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
#consent button { padding: 7px 14px; border: 0; border-radius: 999px; font: 600 13px system-ui, sans-serif;
  cursor: pointer; background: rgba(255,255,255,.16); color: #fff; }
#consent #consentYes { background: #3b82f6; }
