:root {
  --bg: #0b0a1a;
  --bg2: #141130;
  --panel: #1b1738;
  --panel2: #231e48;
  --line: #322b62;
  --text: #f4f2ff;
  --muted: #a39fc4;
  --gold: #ffcc00;
  --pink: #ff3d7f;
  --cyan: #00e0ff;
  --good: #06d6a0;
  --bad: #ff4d6d;
  --warn: #ffb703;
  --radius: 14px;
  --font: 'Segoe UI', system-ui, -apple-system, Roboto, 'Helvetica Neue', Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: radial-gradient(1200px 800px at 15% -10%, #2a1d63 0%, transparent 60%),
              radial-gradient(1000px 700px at 110% 110%, #3b0f46 0%, transparent 60%),
              var(--bg);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
.muted { color: var(--muted); }
.hidden { display: none !important; }

.logo {
  font-weight: 900; letter-spacing: .12em; font-size: 64px; line-height: 1;
  background: linear-gradient(90deg, var(--gold), var(--pink) 55%, var(--cyan));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.logo.small { font-size: 28px; }

.btn {
  border: 0; border-radius: 12px; padding: 12px 18px; cursor: pointer;
  background: var(--panel2); color: var(--text); font-weight: 700;
  transition: transform .08s ease, filter .15s ease, background .15s ease;
  touch-action: manipulation;
}
.btn:hover { filter: brightness(1.15); }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .45; cursor: default; transform: none; filter: none; }
.btn.primary { background: linear-gradient(135deg, var(--pink), #ff7a45); color: #fff; }
.btn.good { background: var(--good); color: #04261d; }
.btn.bad { background: var(--bad); color: #2b0510; }
.btn.warn { background: var(--warn); color: #2b1d00; }
.btn.ghost { background: transparent; border: 1px solid var(--line); color: var(--muted); }
.btn.small { padding: 6px 10px; font-size: 13px; border-radius: 9px; }

.input {
  width: 100%; padding: 14px 16px; border-radius: 12px; border: 2px solid var(--line);
  background: #0f0c24; color: var(--text); outline: none; font-size: 18px;
}
.input:focus { border-color: var(--cyan); }

.chip {
  display: inline-flex; align-items: center; gap: .45em; padding: .3em .75em .3em .5em;
  border-radius: 999px; background: color-mix(in srgb, var(--c, #888) 22%, transparent);
  border: 2px solid color-mix(in srgb, var(--c, #888) 70%, transparent);
  font-weight: 700; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis;
}
.chip .dot { width: .7em; height: .7em; border-radius: 50%; background: var(--c, #888); flex: none; }
.chip.off { opacity: .28; filter: grayscale(.6); }
.chip.out { opacity: .35; text-decoration: line-through; }
.chip.pop { animation: pop .35s ease; }

.timer-bar {
  --p: 1; height: 10px; border-radius: 999px; background: rgba(255, 255, 255, .08); overflow: hidden; position: relative;
}
.timer-bar::after {
  content: ''; position: absolute; inset: 0; width: calc(var(--p) * 100%);
  background: linear-gradient(90deg, var(--cyan), var(--gold)); border-radius: inherit;
}
.timer-bar.hurry::after { background: linear-gradient(90deg, var(--bad), var(--pink)); }
.cd { font-variant-numeric: tabular-nums; font-weight: 900; }
.cd.hurry { color: var(--bad); animation: pulse .5s ease infinite alternate; }

.key-gate {
  max-width: 380px; margin: 12vh auto; padding: 32px; display: grid; gap: 14px;
  background: var(--panel); border-radius: 20px; border: 1px solid var(--line); text-align: center;
}
.key-gate h2 { margin: 6px 0 0; }

.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 999; }

.banner {
  position: fixed; top: 0; left: 0; right: 0; padding: 8px; text-align: center; font-weight: 700;
  background: var(--bad); color: #fff; z-index: 1000;
}

@keyframes pop { 0% { transform: scale(.6); opacity: 0; } 70% { transform: scale(1.08); } 100% { transform: scale(1); opacity: 1; } }
@keyframes rise { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes pulse { from { transform: scale(1); } to { transform: scale(1.08); } }
@keyframes flash { 0% { opacity: 0; } 15% { opacity: 1; } 100% { opacity: 0; } }
@keyframes grow { from { width: 0; } }
@keyframes eq { 0%, 100% { transform: scaleY(.15); } 50% { transform: scaleY(1); } }
@keyframes slam { 0% { transform: scale(2.4); opacity: 0; } 60% { transform: scale(.95); opacity: 1; } 100% { transform: scale(1); } }
@keyframes glow { from { box-shadow: 0 0 0 0 color-mix(in srgb, var(--c, var(--gold)) 70%, transparent); } to { box-shadow: 0 0 40px 6px color-mix(in srgb, var(--c, var(--gold)) 40%, transparent); } }

.anim-rise { animation: rise .45s ease both; }
.anim-pop { animation: pop .4s ease both; }

/* ================================================================ projector */

.proj { height: 100vh; display: flex; flex-direction: column; overflow: hidden; font-size: clamp(14px, 1.6vw, 34px); }
.p-top { display: flex; align-items: center; gap: 1em; padding: 1em 1.6em .4em; min-height: 3.4em; }
.p-pill {
  padding: .3em .9em; border-radius: 999px; font-weight: 800; font-size: .8em; letter-spacing: .08em;
  text-transform: uppercase; background: rgba(255, 255, 255, .08); border: 1px solid var(--line);
}
.p-pill.final { background: linear-gradient(90deg, #6b4b00, #a77b00); border-color: var(--gold); color: #fff3c4; }
.p-pill.heat { border-color: var(--cyan); color: var(--cyan); }
.p-round { font-weight: 800; font-size: 1.05em; }
.p-qn { color: var(--muted); font-weight: 700; }
.p-spacer { flex: 1; }
.p-timer { font-size: 2.2em; min-width: 2.2em; text-align: right; }
.p-main { flex: 1; display: flex; flex-direction: column; padding: .4em 1.6em 1.2em; gap: .8em; min-height: 0; position: relative; }
.p-bar { margin: 0 1.6em; }
.p-prompt { font-size: 2.1em; font-weight: 800; line-height: 1.15; text-wrap: balance; }
.p-prompt.small { font-size: 1.4em; }
.p-sub { color: var(--muted); font-size: 1.05em; }
.p-center { flex: 1; display: grid; place-items: center; text-align: center; align-content: center; gap: .5em; }

.p-options { display: grid; grid-template-columns: 1fr 1fr; gap: .6em; }
.p-options.col { grid-template-columns: 1fr; }
.p-opt {
  display: flex; align-items: center; gap: .7em; padding: .7em .9em; border-radius: var(--radius);
  background: color-mix(in srgb, var(--oc) 18%, var(--panel)); border: 3px solid color-mix(in srgb, var(--oc) 60%, transparent);
  font-size: 1.35em; font-weight: 700; transition: opacity .3s, transform .3s;
}
.p-opt b {
  width: 1.7em; height: 1.7em; display: grid; place-items: center; border-radius: 10px; background: var(--oc); color: #120c22; flex: none;
}
.p-opt .cnt { margin-left: auto; font-weight: 900; opacity: .85; }
.p-opt.correct { border-color: var(--good); background: color-mix(in srgb, var(--good) 30%, var(--panel)); transform: scale(1.03); box-shadow: 0 0 30px rgba(6, 214, 160, .35); }
.p-opt.dim { opacity: .3; }

.p-locks { display: flex; flex-wrap: wrap; gap: .4em; font-size: .85em; }
.p-locks-label { color: var(--muted); font-weight: 700; margin-right: .3em; align-self: center; }

.p-split { flex: 1; display: grid; grid-template-columns: 1.35fr 1fr; gap: 1.2em; min-height: 0; }
.p-split > div { display: flex; flex-direction: column; gap: .7em; min-height: 0; }

.p-media {
  position: relative; flex: 1; min-height: 0; border-radius: 20px; overflow: hidden; background: #000;
  border: 2px solid var(--line); display: grid; place-items: center;
}
.p-media img, .p-media canvas, .p-media video { width: 100%; height: 100%; object-fit: contain; display: block; }
.p-media .cover { position: absolute; inset: 0; display: grid; place-items: center; font-size: 5em; font-weight: 900; color: var(--muted); background: #0a0818; }

.p-results { display: flex; flex-wrap: wrap; gap: .45em; font-size: .9em; }
.p-results .chip b { margin-left: .3em; color: var(--gold); }

.p-fact { color: var(--muted); font-style: italic; font-size: .95em; }

.p-eq { display: flex; gap: .35em; align-items: flex-end; height: 7em; }
.p-eq i { width: .7em; height: 100%; background: linear-gradient(180deg, var(--pink), var(--cyan)); border-radius: 6px; transform-origin: bottom; transform: scaleY(.12); }
.p-eq.on i { animation: eq .7s ease-in-out infinite; }
.p-eq.on i:nth-child(2n) { animation-duration: .55s; }
.p-eq.on i:nth-child(3n) { animation-duration: .85s; }
.p-eq.on i:nth-child(5n) { animation-duration: .45s; }

.p-ladder { display: flex; gap: .6em; justify-content: center; }
.p-ladder span {
  padding: .35em .9em; border-radius: 999px; border: 2px solid var(--line); font-weight: 900; color: var(--muted);
}
.p-ladder span.now { border-color: var(--gold); color: var(--gold); transform: scale(1.15); box-shadow: 0 0 20px rgba(255, 204, 0, .3); }
.p-ladder span.past { opacity: .35; text-decoration: line-through; }

.p-clues { display: grid; gap: .5em; }
.p-clue { display: flex; gap: .8em; align-items: center; padding: .6em .9em; border-radius: var(--radius); background: var(--panel); border: 2px solid var(--line); font-size: 1.3em; font-weight: 600; }
.p-clue b { color: var(--gold); min-width: 3.2em; }
.p-clue.hidden-clue { color: var(--muted); border-style: dashed; }
.p-clue.latest { border-color: var(--gold); }

.p-buzz {
  position: absolute; inset: 0; z-index: 20; display: grid; place-items: center; text-align: center; align-content: center; gap: .3em;
  background: radial-gradient(circle at center, color-mix(in srgb, var(--c) 85%, #000) 0%, color-mix(in srgb, var(--c) 45%, #000) 75%);
}
.p-buzz .who { font-size: 5em; font-weight: 900; text-shadow: 0 6px 30px rgba(0, 0, 0, .4); animation: slam .4s ease both; }
.p-buzz .sub { font-size: 1.4em; font-weight: 700; opacity: .9; }

.p-flash { position: fixed; inset: 0; pointer-events: none; z-index: 50; animation: flash .7s ease both; }
.p-flash.good { background: radial-gradient(circle, rgba(6, 214, 160, .55), transparent 70%); }
.p-flash.bad { background: radial-gradient(circle, rgba(255, 77, 109, .55), transparent 70%); }

.p-answer { font-size: 3em; font-weight: 900; color: var(--gold); text-align: center; line-height: 1.1; text-wrap: balance; }
.p-answer.anim { animation: slam .45s ease both; }

.p-board { display: grid; gap: .45em; width: 100%; max-width: 46em; margin: 0 auto; }
.p-row { display: grid; grid-template-columns: 2.2em 1fr auto; align-items: center; gap: .8em; padding: .45em .8em; border-radius: 12px; background: var(--panel); position: relative; overflow: hidden; font-size: 1.15em; }
.p-row .bar { position: absolute; inset: 0 auto 0 0; background: color-mix(in srgb, var(--c) 28%, transparent); z-index: 0; }
.p-row.anim .bar { animation: grow 1.1s cubic-bezier(.2, .8, .2, 1) both; }
.p-row > * { position: relative; z-index: 1; }
.p-row .rk { font-weight: 900; color: var(--muted); }
.p-row .nm { font-weight: 800; display: flex; align-items: center; gap: .5em; min-width: 0; }
.p-row .nm .dot { width: .8em; height: .8em; border-radius: 50%; background: var(--c); flex: none; }
.p-row .sc { font-weight: 900; font-variant-numeric: tabular-nums; }
.p-row .tag { font-size: .7em; padding: .15em .6em; border-radius: 999px; font-weight: 900; letter-spacing: .06em; }
.p-row .tag.in { background: var(--gold); color: #2b1d00; }
.p-row .tag.out { background: rgba(255, 255, 255, .1); color: var(--muted); }
.p-row.out { opacity: .45; }
.p-row.q-in { box-shadow: inset 0 0 0 2px var(--gold); }

.p-cols { flex: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 1.5em; min-height: 0; }
.p-col { background: rgba(255, 255, 255, .03); border: 1px solid var(--line); border-radius: 22px; padding: 1em; display: flex; flex-direction: column; gap: .5em; }
.p-col h3 { margin: 0 0 .3em; font-size: 1.5em; letter-spacing: .06em; }
.p-col h3.a { color: var(--cyan); }
.p-col h3.b { color: var(--pink); }
.p-slot { padding: .55em .8em; border-radius: 12px; border: 2px dashed var(--line); color: var(--muted); font-weight: 800; text-align: center; }

.p-lobby { flex: 1; display: grid; grid-template-columns: auto 1fr; gap: 2.5em; align-items: center; padding: 1em 2em 2em; min-height: 0; }
.p-join { display: grid; gap: .8em; justify-items: center; text-align: center; }
.p-join .qr { width: 16em; height: 16em; background: #fff; border-radius: 22px; padding: .8em; }
.p-join .qr img { width: 100%; height: 100%; display: block; }
.p-join .url { font-size: 1.4em; font-weight: 800; color: var(--cyan); }
.p-teams { display: grid; grid-template-columns: repeat(auto-fill, minmax(11em, 1fr)); gap: .7em; align-content: start; }
.p-team { padding: .8em 1em; border-radius: 16px; background: color-mix(in srgb, var(--c) 18%, var(--panel)); border: 2px solid var(--c); }
.p-team .nm { font-weight: 900; font-size: 1.2em; }
.p-team .pc { color: var(--muted); font-size: .85em; margin-top: .2em; }

.p-intro { flex: 1; display: grid; place-items: center; align-content: center; gap: .6em; text-align: center; }
.p-intro .big { font-size: 4.2em; font-weight: 900; line-height: 1; text-wrap: balance; }
.p-intro .rules { max-width: 40em; font-size: 1.3em; color: var(--muted); line-height: 1.35; white-space: pre-line; }
.p-intro .who { display: flex; flex-wrap: wrap; gap: .4em; justify-content: center; max-width: 60em; }

.p-live { display: grid; gap: .5em; width: 100%; max-width: 50em; margin: 0 auto; }

.p-bid { display: grid; place-items: center; gap: .3em; }
.p-bid .num { font-size: 9em; font-weight: 900; line-height: .9; color: var(--c, var(--gold)); text-shadow: 0 0 40px color-mix(in srgb, var(--c, var(--gold)) 50%, transparent); }
.p-bid .num.anim { animation: slam .35s ease both; }
.p-found { display: flex; flex-wrap: wrap; gap: .5em; justify-content: center; max-width: 60em; }
.p-found span { padding: .4em .8em; border-radius: 12px; background: var(--panel2); font-weight: 800; font-size: 1.1em; }
.p-found span.ok { background: color-mix(in srgb, var(--good) 35%, var(--panel)); border: 2px solid var(--good); }
.p-found span.miss { opacity: .45; }
.p-found span.new { animation: pop .4s ease both; }

.p-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(12em, 1fr)); gap: .8em; }
.p-card { padding: 1em; border-radius: 18px; background: var(--panel); border: 3px solid var(--line); display: grid; gap: .3em; text-align: center; }
.p-card.ok { border-color: var(--good); }
.p-card.no { border-color: var(--bad); }
.p-card.hidden-card { opacity: .5; border-style: dashed; }
.p-card .t { font-weight: 900; font-size: 1.1em; }
.p-card .a { font-size: 1.3em; font-weight: 800; }
.p-card .w { color: var(--muted); }
.p-card .d { font-size: 1.6em; font-weight: 900; }
.p-card .d.plus { color: var(--good); }
.p-card .d.minus { color: var(--bad); }

.p-predict { position: absolute; right: 1.6em; bottom: 1.2em; padding: .5em .9em; border-radius: 14px; background: rgba(0, 0, 0, .45); border: 1px solid var(--line); font-size: .8em; color: var(--muted); }

.p-podium { flex: 1; display: grid; grid-template-columns: 1fr 1.15fr 1fr; align-items: end; gap: 1.2em; padding: 0 3em; }
.p-step { display: grid; gap: .4em; justify-items: center; text-align: center; }
.p-step .block { width: 100%; border-radius: 18px 18px 0 0; background: linear-gradient(180deg, color-mix(in srgb, var(--c, #555) 70%, #000), color-mix(in srgb, var(--c, #555) 25%, #000)); display: grid; place-items: center; font-size: 3em; font-weight: 900; }
.p-step .nm { font-size: 1.6em; font-weight: 900; }
.p-step .sc { color: var(--muted); font-weight: 800; }
.p-step.hidden-step .block { background: var(--panel); color: var(--muted); }
.p-step.hidden-step .nm { visibility: hidden; }
.p-crowd { text-align: center; color: var(--muted); font-size: 1.1em; }
.p-crowd b { color: var(--cyan); }

.p-sound { position: fixed; inset: 0; z-index: 2000; background: rgba(5, 4, 15, .92); display: grid; place-items: center; align-content: center; gap: 1em; text-align: center; cursor: pointer; }

/* ================================================================ player */

.pl { min-height: 100dvh; display: flex; flex-direction: column; max-width: 560px; margin: 0 auto; user-select: none; -webkit-user-select: none; touch-action: manipulation; }
.pl-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; background: color-mix(in srgb, var(--c, #444) 30%, var(--bg2)); border-bottom: 3px solid var(--c, var(--line)); position: sticky; top: 0; z-index: 5; }
.pl-head .nm { font-weight: 900; font-size: 18px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-head .sc { font-weight: 900; font-size: 20px; font-variant-numeric: tabular-nums; }
.pl-head .menu { background: transparent; border: 0; font-size: 22px; padding: 2px 6px; cursor: pointer; }
.pl-body { flex: 1; padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.pl-tag { font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.pl-title { font-size: 24px; font-weight: 900; line-height: 1.15; }
.pl-text { font-size: 17px; line-height: 1.4; color: var(--muted); }
.pl-center { flex: 1; display: grid; place-items: center; align-content: center; text-align: center; gap: 12px; }
.pl-big { font-size: 34px; font-weight: 900; line-height: 1.1; }
.pl-emoji { font-size: 64px; }
.pl-opts { display: grid; gap: 10px; }
.pl-opt {
  display: flex; align-items: center; gap: 12px; padding: 16px; border-radius: 16px; border: 3px solid transparent;
  background: color-mix(in srgb, var(--oc) 25%, var(--panel)); font-size: 18px; font-weight: 800; text-align: left; cursor: pointer;
  min-height: 64px; touch-action: manipulation;
}
.pl-opt b { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--oc); color: #120c22; flex: none; }
.pl-opt:disabled { cursor: default; }
.pl-opt.mine { border-color: #fff; }
.pl-opt.dim { opacity: .35; }
.pl-opt.correct { border-color: var(--good); background: color-mix(in srgb, var(--good) 35%, var(--panel)); opacity: 1; }
.pl-row { display: flex; gap: 10px; }
.pl-row > * { flex: 1; }
.pl-result { padding: 16px; border-radius: 16px; text-align: center; font-weight: 900; font-size: 22px; }
.pl-result.good { background: color-mix(in srgb, var(--good) 30%, var(--panel)); }
.pl-result.bad { background: color-mix(in srgb, var(--bad) 25%, var(--panel)); }
.pl-result.neutral { background: var(--panel); }
.pl-result small { display: block; font-size: 14px; font-weight: 700; color: var(--muted); margin-top: 4px; }
.pl-card { padding: 16px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); }
.pl-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 4px; border-radius: 14px; background: var(--panel); }
.pl-tabs button { border: 0; padding: 12px; border-radius: 10px; background: transparent; font-weight: 800; color: var(--muted); cursor: pointer; }
.pl-tabs button.on { background: var(--panel2); color: var(--text); }
.pl-err { color: var(--bad); font-weight: 700; min-height: 1.2em; }
.pl-timer { display: flex; align-items: center; gap: 10px; }
.pl-timer .timer-bar { flex: 1; }
.pl-timer .cd { font-size: 22px; min-width: 1.6em; text-align: right; }

.buzz {
  --c: var(--pink); width: min(78vw, 340px); aspect-ratio: 1; border-radius: 50%; border: 0; cursor: pointer;
  background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--c) 60%, #fff), var(--c) 55%, color-mix(in srgb, var(--c) 60%, #000));
  box-shadow: 0 14px 0 color-mix(in srgb, var(--c) 45%, #000), 0 20px 40px rgba(0, 0, 0, .5);
  color: #fff; font-size: 44px; font-weight: 900; letter-spacing: .08em; text-shadow: 0 3px 10px rgba(0, 0, 0, .35);
  touch-action: manipulation; -webkit-tap-highlight-color: transparent;
}
.buzz:active, .buzz.pressed { transform: translateY(10px); box-shadow: 0 4px 0 color-mix(in srgb, var(--c) 45%, #000), 0 8px 20px rgba(0, 0, 0, .5); }
.buzz:disabled { filter: grayscale(1) brightness(.5); cursor: default; }
.buzz.me { animation: glow .6s ease infinite alternate; }

.pl-hum-item { font-size: 34px; font-weight: 900; padding: 28px 16px; border-radius: 20px; background: var(--panel2); border: 3px solid var(--gold); text-align: center; line-height: 1.15; }
.pl-list { display: flex; flex-wrap: wrap; gap: 6px; }
.pl-list span { padding: 6px 10px; border-radius: 10px; background: var(--panel2); font-weight: 700; font-size: 14px; }
.pl-list span.ok { background: color-mix(in srgb, var(--good) 35%, var(--panel)); }
.pl-list span.no { background: color-mix(in srgb, var(--bad) 25%, var(--panel)); text-decoration: line-through; }
.pl-list span.dup { opacity: .5; }

.pl-sheet { position: fixed; inset: 0; background: rgba(0, 0, 0, .6); display: grid; align-items: end; z-index: 50; }
.pl-sheet > div { background: var(--bg2); border-radius: 22px 22px 0 0; padding: 20px; display: grid; gap: 12px; max-width: 560px; width: 100%; margin: 0 auto; }
.pl-code { font-size: 40px; font-weight: 900; letter-spacing: .2em; text-align: center; color: var(--gold); }

/* ================================================================ anchor */

.an { height: 100vh; display: grid; grid-template-rows: auto 1fr; font-size: 14px; }
.an-top { display: flex; align-items: center; gap: 12px; padding: 8px 14px; border-bottom: 1px solid var(--line); background: rgba(0, 0, 0, .25); flex-wrap: wrap; }
.an-top .logo { font-size: 20px; }
.an-top .seg { font-weight: 800; }
.an-top .dot-on { width: 10px; height: 10px; border-radius: 50%; background: var(--good); }
.an-top .dot-off { width: 10px; height: 10px; border-radius: 50%; background: var(--bad); }
.an-grid { display: grid; grid-template-columns: 250px 1fr 400px; min-height: 0; }
.an-flow { overflow: auto; border-right: 1px solid var(--line); padding: 8px; }
.an-flow button {
  display: block; width: 100%; text-align: left; border: 0; background: transparent; color: var(--muted);
  padding: 7px 10px; border-radius: 9px; cursor: pointer; font-size: 13px;
}
.an-flow button:hover { background: var(--panel); color: var(--text); }
.an-flow button.cur { background: var(--panel2); color: var(--text); font-weight: 800; box-shadow: inset 3px 0 0 var(--gold); }
.an-flow button.past { opacity: .55; }
.an-flow .grp { font-size: 11px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 12px 10px 4px; }
.an-now { overflow: auto; padding: 16px 20px 120px; display: flex; flex-direction: column; gap: 14px; position: relative; }
.an-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.an-head h2 { margin: 0; font-size: 22px; }
.an-step { padding: 3px 10px; border-radius: 999px; background: var(--panel2); font-weight: 800; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.an-card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px; display: grid; gap: 8px; }
.an-card h4 { margin: 0; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.an-prompt { font-size: 20px; font-weight: 800; }
.an-answer { font-size: 22px; font-weight: 900; color: var(--gold); }
.an-say { font-size: 16px; font-style: italic; color: #d9d4ff; border-left: 3px solid var(--cyan); padding-left: 10px; white-space: pre-line; }
.an-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.an-opts div { padding: 8px 10px; border-radius: 9px; background: var(--panel2); }
.an-opts div.ok { background: color-mix(in srgb, var(--good) 35%, var(--panel)); font-weight: 800; }
.an-live { display: grid; gap: 4px; }
.an-live .r { display: flex; align-items: center; gap: 8px; padding: 5px 8px; border-radius: 8px; background: var(--panel2); }
.an-live .r .grow { flex: 1; }
.an-live .r.ok { box-shadow: inset 3px 0 0 var(--good); }
.an-live .r.no { box-shadow: inset 3px 0 0 var(--bad); }
.an-bar { position: sticky; bottom: 0; margin: auto -20px -120px; padding: 12px 20px; background: linear-gradient(180deg, transparent, var(--bg) 25%); display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.an-primary { font-size: 20px; padding: 16px 26px; border-radius: 14px; flex: 1 1 260px; }
.an-primary kbd { font-size: 12px; opacity: .7; margin-left: 8px; }
.an-teams { overflow: auto; border-left: 1px solid var(--line); padding: 8px; display: grid; gap: 6px; align-content: start; }
.an-team { background: var(--panel); border-radius: 12px; padding: 8px 10px; border-left: 4px solid var(--c); display: grid; gap: 4px; }
.an-team .l1 { display: flex; align-items: center; gap: 6px; }
.an-team .nm { font-weight: 800; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: text; }
.an-team .sc { font-variant-numeric: tabular-nums; font-weight: 800; font-size: 13px; }
.an-team .l2 { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.an-team .pls { font-size: 12px; color: var(--muted); }
.an-team .pls span { margin-right: 6px; cursor: pointer; }
.an-team .pls span.on::before { content: '\25CF '; color: var(--good); }
.an-team .pls span.off::before { content: '\25CB '; color: var(--muted); }
.an-team select { background: var(--panel2); border: 1px solid var(--line); border-radius: 6px; font-size: 12px; padding: 1px 4px; }
.an-team .adj { display: flex; gap: 4px; }
.an-team .adj button { border: 1px solid var(--line); background: var(--panel2); border-radius: 6px; padding: 1px 7px; cursor: pointer; font-size: 12px; font-weight: 800; }
.an-log { font-size: 12px; color: var(--muted); display: grid; gap: 2px; }
.an-modal { position: fixed; inset: 0; background: rgba(0, 0, 0, .65); display: grid; place-items: center; z-index: 100; }
.an-modal > div { background: var(--bg2); border: 1px solid var(--line); border-radius: 18px; padding: 22px; width: min(460px, 92vw); display: grid; gap: 12px; }
.an-toast { position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); background: var(--bad); color: #fff; padding: 10px 16px; border-radius: 10px; font-weight: 700; z-index: 200; white-space: pre-line; }

/* ================================================================ host + editor */

.host { max-width: 720px; margin: 8vh auto; padding: 0 16px; display: grid; gap: 16px; }
.host a.tile { display: block; padding: 18px 20px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); color: var(--text); text-decoration: none; }
.host a.tile:hover { border-color: var(--cyan); }
.host a.tile b { font-size: 18px; }

.ed { display: grid; grid-template-columns: 280px 1fr; height: 100vh; font-size: 14px; }
.ed-side { border-right: 1px solid var(--line); overflow: auto; padding: 12px; display: grid; gap: 10px; align-content: start; }
.ed-main { overflow: auto; padding: 16px 22px 80px; display: grid; gap: 14px; align-content: start; }
.ed-stage { font-size: 11px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-top: 8px; display: flex; justify-content: space-between; align-items: center; }
.ed-round { width: 100%; text-align: left; border: 0; border-radius: 9px; background: transparent; padding: 7px 10px; cursor: pointer; color: var(--muted); }
.ed-round:hover { background: var(--panel); color: var(--text); }
.ed-round.cur { background: var(--panel2); color: var(--text); font-weight: 800; }
.ed-card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px; display: grid; gap: 10px; }
.ed-card h3 { margin: 0; font-size: 15px; display: flex; gap: 8px; align-items: center; }
.ed-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.ed-field { display: grid; gap: 4px; }
.ed-field.wide { grid-column: 1 / -1; }
.ed-field label { font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.ed-field .input { font-size: 14px; padding: 8px 10px; border-radius: 9px; }
.ed-field textarea.input { min-height: 70px; resize: vertical; }
.ed-field .help { font-size: 12px; color: var(--muted); }
.ed-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.ed-media-prev { max-height: 120px; max-width: 220px; border-radius: 8px; border: 1px solid var(--line); }

@media (max-width: 1100px) {
  .an-grid { grid-template-columns: 1fr; }
  .an { height: auto; min-height: 100vh; }
  .an-now { overflow: visible; padding-bottom: 16px; }
  .an-bar { margin: 0 -20px; }
  .an-flow { max-height: 160px; border-right: 0; border-bottom: 1px solid var(--line); }
  .an-teams { border-left: 0; border-top: 1px solid var(--line); }
  .ed { grid-template-columns: 1fr; }
}
