:root {
  color-scheme: dark;
  --bg: #090b09;
  --bg-soft: #0d110d;
  --panel: #121712;
  --panel-2: #172016;
  --panel-3: #1d281b;
  --line: #263125;
  --line-strong: #364434;
  --text: #f2f6ee;
  --muted: #8f9d8a;
  --muted-2: #667261;
  --accent: #8bd450;
  --accent-hover: #a1e267;
  --accent-ink: #0b1606;
  --accent-soft: rgba(139, 212, 80, .12);
  --danger: #ff8f87;
  --danger-bg: #341b1c;
  --blue: #74a9ff;
  --gold: #f2c14e;
  --coral: #ed6a5a;
  --shadow: 0 24px 80px rgba(0, 0, 0, .35);
  --radius: 18px;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --sans: system-ui, -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background:
    radial-gradient(1000px 480px at 50% -210px, rgba(139, 212, 80, .10), transparent 70%),
    radial-gradient(700px 600px at 100% 20%, rgba(63, 113, 50, .08), transparent 65%),
    var(--bg);
  color: var(--text);
  font: 15px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
}
button, input, textarea, select { font: inherit; }
button { color: inherit; }
a { color: var(--accent); }
::selection { background: rgba(139, 212, 80, .28); }
.grow { flex: 1; }
.hidden { display: none !important; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid rgba(54, 68, 52, .55);
  background: rgba(9, 11, 9, .82);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.topbar-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 11px 22px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  font-weight: 800;
  letter-spacing: .02em;
}
.brand img { width: 31px; height: 31px; border-radius: 10px; }
.brand small {
  display: block;
  margin-top: 1px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.topbar-spacer { flex: 1; }
.topbar .btn { flex: none; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  padding: 8px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: var(--panel-2);
  color: var(--text);
  font-size: 14px;
  font-weight: 550;
  line-height: 1;
  cursor: pointer;
  text-decoration: none;
  transition: border-color .15s, background .15s, transform .15s, opacity .15s;
  white-space: nowrap;
}
.btn:hover { border-color: #4b5e47; background: var(--panel-3); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: default; transform: none; }
.btn.primary { border-color: transparent; background: var(--accent); color: var(--accent-ink); font-weight: 750; }
.btn.primary:hover { background: var(--accent-hover); }
.btn.ghost { border-color: transparent; background: transparent; color: var(--muted); }
.btn.ghost:hover { background: var(--panel-2); color: var(--text); }
.btn.danger { border-color: #5c2d2e; background: var(--danger-bg); color: var(--danger); }
.btn.danger:hover { background: #402022; }
.btn.big { min-height: 50px; padding: 12px 22px; border-radius: 14px; font-size: 16px; }
.btn.mini { min-height: 31px; padding: 5px 10px; border-radius: 9px; font-size: 12.5px; }
.btn svg { width: 16px; height: 16px; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 25px;
  padding: 3px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.2;
  white-space: nowrap;
}
.chip.green { border-color: rgba(139, 212, 80, .25); background: var(--accent-soft); color: var(--accent); }
.chip.gold { border-color: rgba(242, 193, 78, .24); background: rgba(242, 193, 78, .1); color: var(--gold); }
.chip.red { border-color: rgba(255, 143, 135, .24); background: rgba(255, 143, 135, .08); color: var(--danger); }
.dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.dot.live { box-shadow: 0 0 0 4px rgba(139, 212, 80, .12); animation: pulse 2.1s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px rgba(139, 212, 80, 0); } }

.page {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 30px 22px 110px;
}
.page.narrow { max-width: 900px; }
.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .15em;
  text-transform: uppercase;
}
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 8px; font-size: clamp(27px, 3vw, 38px); line-height: 1.16; letter-spacing: -.02em; }
h2 { margin-bottom: 8px; font-size: 21px; line-height: 1.3; }
h3 { margin-bottom: 6px; font-size: 16px; }
.lede { max-width: 660px; margin: 0; color: var(--muted); font-size: 14px; line-height: 1.75; }
.subtle { color: var(--muted); }
.small { font-size: 12.5px; }
.mono { font-family: var(--mono); }

.hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}
.hero-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.notice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 18px 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(139, 212, 80, .06), rgba(255, 255, 255, .015));
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}
.notice strong { color: var(--text); }
.notice .notice-icon { color: var(--accent); flex: none; margin-top: 1px; }

.live-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 20px 0;
  padding: 16px 18px;
  border: 1px solid rgba(139, 212, 80, .32);
  border-radius: 16px;
  background:
    radial-gradient(340px 160px at 0 0, rgba(139, 212, 80, .13), transparent 70%),
    var(--panel);
}
.live-banner .live-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: var(--accent);
  color: var(--accent-ink);
  flex: none;
}
.live-banner h3 { margin-bottom: 2px; }
.live-banner p { margin: 0; color: var(--muted); font-size: 12.5px; }

.set-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.set-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 150px;
  padding: 17px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .018), transparent 55%),
    var(--panel);
  cursor: pointer;
  transition: transform .18s, border-color .18s, background .18s;
}
.set-card:hover { transform: translateY(-2px); border-color: var(--line-strong); background-color: var(--panel-2); }
.set-card::after {
  content: "";
  position: absolute;
  right: -42px;
  bottom: -62px;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  border: 1px solid rgba(139, 212, 80, .08);
}
.set-card h3 {
  margin: 0 0 5px;
  font-size: 17px;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.set-card .set-desc {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.6;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.set-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-top: auto; }
.set-actions { display: flex; gap: 7px; margin-top: 15px; align-items: center; }
.set-actions .start { margin-left: auto; }
.set-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 27px;
  height: 27px;
  margin-bottom: 11px;
  border: 1px solid rgba(139, 212, 80, .23);
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
  font: 700 11px var(--mono);
}

.empty {
  display: grid;
  place-items: center;
  min-height: 330px;
  padding: 36px;
  border: 1px dashed var(--line-strong);
  border-radius: 20px;
  color: var(--muted);
  text-align: center;
}
.empty .empty-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin: 0 auto 14px;
  border-radius: 18px;
  background: var(--accent-soft);
  color: var(--accent);
}
.empty h2 { color: var(--text); }
.empty p { max-width: 400px; margin: 0 0 18px; font-size: 13px; }

.gate {
  display: grid;
  place-items: center;
  min-height: calc(100vh - 66px);
  padding: 32px 20px;
}
.gate-card {
  width: min(480px, 100%);
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    radial-gradient(420px 240px at 100% 0, rgba(139, 212, 80, .10), transparent 65%),
    var(--panel);
  box-shadow: var(--shadow);
  text-align: center;
}
.gate-logo { width: 62px; height: 62px; margin-bottom: 20px; border-radius: 18px; }
.gate h1 { font-size: 26px; }
.gate p { margin: 10px auto 22px; color: var(--muted); font-size: 13.5px; line-height: 1.75; }
.gate-actions { display: flex; flex-direction: column; gap: 9px; }
.gate .tiny { margin-top: 18px; color: var(--muted-2); font-size: 11px; }

/* ------------------------------------------------------------- editor */
.editor-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 22px;
}
.editor-head .back { flex: none; margin-top: 2px; }
.editor-title { min-width: 0; flex: 1; }
.editor-title h1 { margin-bottom: 4px; font-size: clamp(23px, 2.6vw, 31px); }
.editor-title .editor-sub { color: var(--muted); font-size: 12.5px; }
.editor-shell {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
.question-rail {
  position: sticky;
  top: 84px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--panel);
}
.rail-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 2px 3px 10px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.rail-list { display: flex; flex-direction: column; gap: 5px; max-height: 52vh; overflow: auto; }
.rail-item {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 8px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  text-align: left;
}
.rail-item:hover { background: var(--panel-2); color: var(--text); }
.rail-item.on { border-color: rgba(139, 212, 80, .24); background: var(--accent-soft); color: var(--text); }
.rail-num {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  flex: none;
  border-radius: 7px;
  background: var(--panel-3);
  color: var(--muted);
  font: 700 11px var(--mono);
}
.rail-item.on .rail-num { background: var(--accent); color: var(--accent-ink); }
.rail-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; }
.rail-add { width: 100%; margin-top: 10px; }

.panel {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
}
.panel-pad { padding: 20px; }
.editor-panel { padding: 21px; }
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 16px; }
.field-label { color: var(--muted); font-size: 12px; font-weight: 650; }
.field-hint { color: var(--muted-2); font-size: 11px; line-height: 1.55; }
.input, .textarea, .select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--bg-soft);
  color: var(--text);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.input { height: 42px; padding: 0 13px; }
.textarea { min-height: 92px; padding: 11px 13px; resize: vertical; line-height: 1.55; }
.select { height: 42px; padding: 0 10px; }
.input:focus, .textarea:focus, .select:focus { border-color: rgba(139, 212, 80, .55); box-shadow: 0 0 0 3px rgba(139, 212, 80, .08); }
.input::placeholder, .textarea::placeholder { color: #5b6657; }
.input.title-input { height: 48px; font-size: 18px; font-weight: 700; }
.textarea.prompt-input { min-height: 112px; font-size: 18px; font-weight: 600; }

.question-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 17px;
}
.question-head .q-index { color: var(--accent); font: 750 11px var(--mono); letter-spacing: .08em; }
.question-head .q-tools { display: flex; gap: 4px; margin-left: auto; }
.icon-btn {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  color: var(--muted);
  cursor: pointer;
}
.icon-btn:hover { color: var(--text); border-color: var(--line-strong); }
.icon-btn:disabled { opacity: .35; cursor: default; }
.icon-btn.danger:hover { color: var(--danger); border-color: #5c2d2e; }

.option-editor { display: flex; flex-direction: column; gap: 8px; margin: 8px 0 12px; }
.option-row { display: flex; align-items: center; gap: 9px; }
.option-radio {
  position: relative;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: none;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--bg-soft);
  color: var(--muted);
  cursor: pointer;
  font: 750 11px var(--mono);
}
.option-row.correct .option-radio { border-color: var(--accent); background: var(--accent); color: var(--accent-ink); }
.option-row .input { flex: 1; height: 39px; }
.option-remove {
  width: 30px;
  height: 30px;
  flex: none;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted-2);
  cursor: pointer;
}
.option-remove:hover { color: var(--danger); background: var(--danger-bg); }
.option-remove:disabled { opacity: .2; cursor: default; }

.editor-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; }
.editor-row .field { flex: 1 1 180px; margin-bottom: 0; }
.time-field { flex: 0 0 150px !important; }
.question-card-foot {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 18px;
  padding-top: 15px;
  border-top: 1px solid var(--line);
  color: var(--muted-2);
  font-size: 11.5px;
}

.editor-foot {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 45;
  border-top: 1px solid rgba(54, 68, 52, .62);
  background: rgba(9, 11, 9, .88);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.editor-foot-inner {
  display: flex;
  align-items: center;
  gap: 9px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 11px 22px;
}
.save-state { color: var(--muted); font-size: 12px; }
.save-state.dirty { color: var(--gold); }
.editor-foot .grow { flex: 1; }

/* ------------------------------------------------------------- host */
.host-body {
  min-height: 100vh;
  background:
    radial-gradient(1100px 650px at 50% -280px, rgba(139, 212, 80, .13), transparent 72%),
    radial-gradient(800px 700px at 100% 100%, rgba(50, 95, 40, .10), transparent 65%),
    var(--bg);
}
.host-top {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 1500px;
  margin: 0 auto;
  padding: 16px 26px;
}
.host-top .brand img { width: 34px; height: 34px; }
.host-status { display: flex; align-items: center; gap: 9px; margin-left: 8px; }
.host-top .grow { flex: 1; }
.host-main {
  width: min(1500px, 100%);
  min-height: calc(100vh - 73px);
  margin: 0 auto;
  padding: 18px 26px 40px;
}
.stage-center {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: calc(100vh - 150px);
}
.stage-card {
  max-width: 920px;
  margin: 0 auto;
  padding: 48px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background:
    radial-gradient(760px 360px at 50% -220px, rgba(139, 212, 80, .10), transparent 70%),
    var(--panel);
  box-shadow: var(--shadow);
  text-align: center;
}
.stage-card .host-mark {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--accent);
  font: 750 11px var(--mono);
  letter-spacing: .14em;
  text-transform: uppercase;
}
.stage-card h1 { margin-bottom: 10px; font-size: clamp(34px, 4.8vw, 62px); letter-spacing: -.035em; }
.stage-card .stage-sub { margin: 0 auto 25px; color: var(--muted); font-size: clamp(14px, 1.5vw, 17px); line-height: 1.7; }
.lobby-meta { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-bottom: 30px; }
.lobby-meta .chip { min-height: 31px; padding: 6px 12px; font-size: 13px; }

.player-wall {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  max-height: 260px;
  overflow: auto;
  margin: 0 auto 27px;
}
.player-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 7px 10px 7px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--panel-2);
  font-size: 14px;
  animation: pillIn .22s ease-out;
}
.player-pill.offline { opacity: .48; }
.player-pill .kick {
  display: grid;
  place-items: center;
  width: 19px;
  height: 19px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted-2);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
}
.player-pill .kick:hover { color: var(--danger); background: var(--danger-bg); }
@keyframes pillIn { from { transform: scale(.9); opacity: 0; } }
.lobby-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 9px; }

.host-question-wrap { display: flex; flex-direction: column; min-height: calc(100vh - 150px); }
.question-top {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 20px;
}
.question-progress { min-width: 0; flex: 1; }
.question-progress .qcount { color: var(--accent); font: 750 12px var(--mono); letter-spacing: .12em; }
.question-progress h2 {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: clamp(15px, 1.6vw, 19px);
  font-weight: 550;
}
.timer-wrap { position: relative; width: 88px; height: 88px; flex: none; }
.timer-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(var(--accent) calc(var(--p, 1) * 1turn), rgba(255, 255, 255, .07) 0);
  -webkit-mask: radial-gradient(transparent 61%, #000 62%);
  mask: radial-gradient(transparent 61%, #000 62%);
  transition: background .15s linear;
}
.timer-value {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font: 800 25px var(--mono);
  letter-spacing: -.04em;
}
.timer-value.low { color: var(--danger); }

.question-prompt {
  max-width: 1180px;
  margin: 0 auto 24px;
  text-align: center;
  font-size: clamp(29px, 4.25vw, 64px);
  line-height: 1.22;
  font-weight: 780;
  letter-spacing: -.035em;
  overflow-wrap: anywhere;
}
.answer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
}
.answer-block {
  position: relative;
  display: flex;
  align-items: center;
  gap: 17px;
  min-height: clamp(92px, 12vh, 138px);
  padding: 18px 22px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .10);
  border-radius: 20px;
  background: var(--panel-2);
  text-align: left;
}
.answer-block::after {
  content: "";
  position: absolute;
  right: -38px;
  bottom: -72px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .045);
}
.answer-block.a { background: linear-gradient(135deg, #5b2726, #3b1c1c); border-color: #86423b; }
.answer-block.b { background: linear-gradient(135deg, #1d335d, #15233e); border-color: #345587; }
.answer-block.c { background: linear-gradient(135deg, #5a4217, #392b12); border-color: #85621e; }
.answer-block.d { background: linear-gradient(135deg, #2a4a22, #1c3118); border-color: #47763a; }
.answer-shape { display: grid; place-items: center; width: 48px; height: 48px; flex: none; color: rgba(255, 255, 255, .96); }
.answer-shape svg { width: 40px; height: 40px; }
.answer-letter {
  flex: none;
  color: rgba(255, 255, 255, .5);
  font: 800 13px var(--mono);
}
.answer-text {
  position: relative;
  z-index: 1;
  font-size: clamp(18px, 2.4vw, 32px);
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.answer-count {
  position: relative;
  z-index: 1;
  margin-left: auto;
  font: 800 clamp(22px, 2.7vw, 38px) var(--mono);
  white-space: nowrap;
}
.answer-block.correct { border-color: var(--accent); box-shadow: inset 0 0 0 2px var(--accent), 0 0 50px rgba(139, 212, 80, .10); }
.answer-block.dim { opacity: .52; }
.answer-bar {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 5px;
  background: rgba(255, 255, 255, .58);
  transition: width .45s ease;
}
.answer-block.correct .answer-bar { background: var(--accent); }

.question-foot {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  max-width: 1180px;
  margin: 23px auto 0;
}
.answered-block { min-width: 0; flex: 1; }
.answered-label { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; color: var(--muted); font-size: 12.5px; }
.answered-label strong { color: var(--text); font-size: 16px; }
.answered-track { height: 7px; overflow: hidden; border-radius: 999px; background: rgba(255, 255, 255, .07); }
.answered-fill { height: 100%; border-radius: inherit; background: var(--accent); transition: width .3s ease; }
.host-controls { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }

.reveal-layout { width: 100%; max-width: 1280px; margin: 0 auto; }
.reveal-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 17px; }
.reveal-head h2 { margin: 0; font-size: clamp(20px, 2.4vw, 31px); line-height: 1.3; }
.reveal-head p { margin: 5px 0 0; color: var(--muted); font-size: 13px; }
.reveal-grid { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 14px; align-items: start; }
.reveal-options { display: flex; flex-direction: column; gap: 8px; }
.reveal-option {
  display: flex;
  align-items: center;
  gap: 13px;
  min-height: 70px;
  padding: 12px 15px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
}
.reveal-option.correct { border-color: rgba(139, 212, 80, .56); background: rgba(139, 212, 80, .07); }
.reveal-option .shape { width: 28px; height: 28px; flex: none; color: var(--muted); }
.reveal-option.correct .shape { color: var(--accent); }
.reveal-option .text { min-width: 0; flex: 1; font-size: 15px; font-weight: 600; }
.reveal-option .count { color: var(--muted); font: 700 15px var(--mono); }
.reveal-option.correct .count { color: var(--accent); }
.reveal-option .mini-track { width: 110px; height: 5px; overflow: hidden; border-radius: 999px; background: rgba(255, 255, 255, .07); }
.reveal-option .mini-fill { height: 100%; background: var(--muted); }
.reveal-option.correct .mini-fill { background: var(--accent); }
.top-five { padding: 15px; }
.top-five h3 { display: flex; align-items: center; gap: 7px; margin: 0 0 10px; font-size: 13px; color: var(--muted); }
.rank-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 4px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.rank-row:last-child { border-bottom: 0; }
.rank-no { width: 22px; color: var(--muted-2); font: 700 11px var(--mono); text-align: center; }
.rank-row:nth-child(2) .rank-no { color: var(--gold); }
.rank-name { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-score { font: 700 12px var(--mono); color: var(--accent); }
.reveal-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 14px 0 0;
}
.reveal-summary .chip { min-height: 28px; }

/* ------------------------------------------------------------- report */
.report-wrap { width: 100%; max-width: 1020px; margin: 0 auto; }
.report-title { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.report-title h1 { margin-bottom: 4px; font-size: clamp(28px, 3.5vw, 42px); }
.report-title p { margin: 0; color: var(--muted); font-size: 13px; }
.report-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.report-sheet {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--panel);
  box-shadow: var(--shadow);
}
.report-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
.report-hero h2 { margin: 0 0 4px; font-size: 26px; }
.report-hero p { margin: 0; color: var(--muted); font-size: 12.5px; }
.report-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
  margin: 18px 0;
}
.report-stat { padding: 13px 14px; border: 1px solid var(--line); border-radius: 13px; background: var(--bg-soft); }
.report-stat span { display: block; color: var(--muted); font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; }
.report-stat strong { display: block; margin-top: 4px; font: 750 24px var(--mono); }
.podium {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  align-items: end;
  margin: 20px 0 24px;
}
.podium-place {
  padding: 16px 13px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--bg-soft);
  text-align: center;
}
.podium-place.p2 { order: 1; }
.podium-place.p1 { order: 2; padding-top: 23px; padding-bottom: 24px; border-color: rgba(242, 193, 78, .4); background: linear-gradient(160deg, rgba(242, 193, 78, .10), var(--bg-soft)); }
.podium-place.p3 { order: 3; }
.podium-medal { font: 800 25px var(--mono); color: var(--muted); }
.podium-place.p1 .podium-medal { color: var(--gold); font-size: 34px; }
.podium-name { margin-top: 5px; font-size: 15px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.podium-score { color: var(--accent); font: 700 12px var(--mono); }
.report-section { margin-top: 25px; }
.report-section-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 9px; }
.report-section h3 { margin: 0; font-size: 15px; }
.report-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.report-table th {
  padding: 8px 9px;
  border-bottom: 1px solid var(--line-strong);
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 650;
  letter-spacing: .05em;
  text-align: left;
  text-transform: uppercase;
}
.report-table td { padding: 9px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.report-table tr:last-child td { border-bottom: 0; }
.report-table .num { font-family: var(--mono); }
.report-table .rank { color: var(--muted); width: 45px; }
.report-table .name { font-weight: 650; }
.report-table .score { color: var(--accent); font-weight: 750; }
.question-report { padding: 13px 0; border-bottom: 1px solid var(--line); }
.question-report:last-child { border-bottom: 0; }
.qr-head { display: flex; align-items: flex-start; gap: 10px; }
.qr-no { display: grid; place-items: center; width: 25px; height: 25px; flex: none; border-radius: 7px; background: var(--panel-3); color: var(--muted); font: 700 11px var(--mono); }
.qr-prompt { min-width: 0; flex: 1; font-size: 13.5px; font-weight: 650; }
.qr-meta { display: flex; gap: 12px; flex-wrap: wrap; margin: 8px 0 7px 35px; color: var(--muted); font-size: 11px; }
.qr-options { display: flex; flex-direction: column; gap: 4px; margin-left: 35px; }
.qr-option { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11.5px; }
.qr-option.correct { color: var(--accent); }
.qr-option .bar { width: 100px; height: 4px; overflow: hidden; border-radius: 999px; background: rgba(255, 255, 255, .06); }
.qr-option .bar i { display: block; height: 100%; background: currentColor; }
.report-footnote { margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--muted-2); font-size: 10.5px; line-height: 1.7; }

/* ------------------------------------------------------------- toast/banner */
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 100;
  max-width: min(510px, calc(100vw - 28px));
  padding: 11px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: #1c241a;
  color: var(--text);
  box-shadow: var(--shadow);
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 10px);
  transition: opacity .18s, transform .18s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { border-color: #5c2d2e; background: #2e1b1c; color: #ffc2bd; }

.conn-banner {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 auto 10px;
  padding: 9px 13px;
  border: 1px solid rgba(242, 193, 78, .25);
  border-radius: 11px;
  background: rgba(242, 193, 78, .07);
  color: var(--gold);
  font-size: 12px;
}
.spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, .18);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(1turn); } }

.closed-screen { text-align: center; padding: 80px 20px; }
.closed-screen .closed-mark { width: 62px; height: 62px; margin: 0 auto 20px; border-radius: 20px; background: var(--panel-2); color: var(--muted); display: grid; place-items: center; }
.closed-screen h1 { font-size: clamp(27px, 4vw, 42px); }
.closed-screen p { color: var(--muted); }

@media (max-width: 900px) {
  .editor-shell { grid-template-columns: 1fr; }
  .question-rail { position: static; order: 2; }
  .rail-list { flex-direction: row; flex-wrap: wrap; max-height: none; }
  .rail-item { width: auto; max-width: 210px; }
  .rail-add { width: auto; }
  .reveal-grid { grid-template-columns: 1fr; }
  .top-five { order: 2; }
}
@media (max-width: 720px) {
  .topbar-inner { padding: 10px 14px; }
  .brand small { display: none; }
  .topbar .btn span { display: none; }
  .page { padding: 22px 14px 100px; }
  .hero { align-items: flex-start; flex-direction: column; }
  .hero h1 { font-size: 28px; }
  .set-grid { grid-template-columns: 1fr; }
  .stage-card { padding: 30px 18px; border-radius: 22px; }
  .host-top { padding: 12px 14px; }
  .host-top .host-status { display: none; }
  .host-main { padding: 10px 14px 28px; }
  .answer-grid { grid-template-columns: 1fr; }
  .answer-block { min-height: 80px; padding: 12px 14px; }
  .answer-shape { width: 34px; height: 34px; }
  .answer-shape svg { width: 29px; height: 29px; }
  .question-foot { flex-direction: column; align-items: stretch; }
  .host-controls { justify-content: stretch; }
  .host-controls .btn { flex: 1; }
  .timer-wrap { width: 68px; height: 68px; }
  .timer-value { font-size: 20px; }
  .report-sheet { padding: 17px; }
  .report-stats { grid-template-columns: repeat(2, 1fr); }
  .report-hero { align-items: flex-start; flex-direction: column; }
  .report-title { align-items: flex-start; flex-direction: column; }
  .report-actions { justify-content: flex-start; }
  .report-table th:nth-child(4), .report-table td:nth-child(4),
  .report-table th:nth-child(5), .report-table td:nth-child(5) { display: none; }
  .reveal-option .mini-track { display: none; }
  .editor-foot-inner { padding: 9px 14px; flex-wrap: wrap; }
  .editor-foot .save-state { order: 3; width: 100%; }
}

/* ============================================================ playful skin
   2026-12 视觉优化：把现场游戏从“工具”做得更像一场小活动。
   下面只覆盖外观，不改动任何布局逻辑或业务状态。 */
:root {
  --radius: 22px;
  --display: "Avenir Next", "Trebuchet MS", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --mint: #9be56b;
  --lemon: #f4d06f;
  --sky: #86b8ff;
  --peach: #ff9d82;
  --pink: #ef9fc5;
  --lilac: #b9a5ff;
}

body {
  background:
    radial-gradient(circle at 8% 4%, rgba(139, 212, 80, .13), transparent 26%),
    radial-gradient(circle at 94% 10%, rgba(134, 184, 255, .11), transparent 25%),
    radial-gradient(circle at 80% 92%, rgba(239, 159, 197, .07), transparent 24%),
    radial-gradient(rgba(255, 255, 255, .028) 1px, transparent 1px),
    var(--bg);
  background-size: auto, auto, auto, 24px 24px, auto;
}

h1, h2, h3, .brand, .qcount, .eyebrow {
  font-family: var(--display);
}

.topbar {
  border-bottom-color: rgba(54, 68, 52, .45);
  background: rgba(9, 11, 9, .74);
}

.brand img {
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 12px;
  box-shadow: 0 5px 16px rgba(0, 0, 0, .25), 0 0 0 4px rgba(139, 212, 80, .07);
  transform: rotate(-4deg);
  transition: transform .2s;
}

.brand:hover img { transform: rotate(3deg) scale(1.06); }
.brand small { color: var(--mint); opacity: .75; }

.btn {
  border-radius: 13px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .12);
  transition: border-color .15s, background .15s, transform .15s, box-shadow .15s, opacity .15s;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 7px 18px rgba(0, 0, 0, .16); }
.btn:active { transform: translateY(1px); box-shadow: none; }
.btn.primary {
  background: linear-gradient(145deg, #a8eb72, #7dca43);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 8px 22px rgba(139, 212, 80, .16);
}
.btn.primary:hover { background: linear-gradient(145deg, #b7f286, #8bd450); }
.btn.big { border-radius: 16px; }

.chip { border-radius: 999px; background: rgba(255, 255, 255, .032); }
.chip.green { background: rgba(139, 212, 80, .13); }
.dot.live { animation: pulse 2.1s infinite, bob 2.8s ease-in-out infinite; }

.page { padding-top: 38px; }

/* ---------------------------------------------------------------- list hero */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 24px;
  margin-bottom: 28px;
}
.hero-copy { min-width: 0; }
.hero-copy h1 { font-size: clamp(34px, 4vw, 48px); font-weight: 850; letter-spacing: -.045em; }
.hero-copy .lede { max-width: 620px; }
.hero-copy .eyebrow { display: inline-flex; align-items: center; gap: 7px; margin-bottom: 12px; padding: 5px 10px; border: 1px solid rgba(139, 212, 80, .22); border-radius: 999px; background: rgba(139, 212, 80, .07); }
.hero-copy .eyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(139, 212, 80, .1); }
.hero-actions { align-self: center; }
.hero-sticker {
  position: relative;
  display: grid;
  place-items: center;
  width: 116px;
  height: 116px;
  flex: none;
  border: 1px solid rgba(139, 212, 80, .24);
  border-radius: 32px;
  background:
    radial-gradient(circle at 28% 20%, rgba(255, 255, 255, .16), transparent 35%),
    linear-gradient(145deg, #1d3320, #101a10);
  box-shadow: 0 15px 34px rgba(0, 0, 0, .28), inset 0 1px 0 rgba(255, 255, 255, .08);
  transform: rotate(4deg);
}
.hero-sticker::after {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px dashed rgba(255, 255, 255, .15);
  border-radius: 24px;
  pointer-events: none;
}
.hero-sticker img { width: 68px; height: 68px; border-radius: 20px; transform: rotate(-4deg); box-shadow: 0 5px 12px rgba(0, 0, 0, .25); }
.hero-sticker-tag {
  position: absolute;
  right: -12px;
  bottom: 10px;
  padding: 4px 8px;
  border: 1px solid rgba(9, 11, 9, .25);
  border-radius: 999px;
  background: var(--lemon);
  color: #2a2108;
  font: 800 8px/1 var(--mono);
  letter-spacing: .08em;
  transform: rotate(-6deg);
  box-shadow: 0 4px 10px rgba(0, 0, 0, .22);
}
.hero-spark { position: absolute; z-index: 2; color: var(--mint); font-size: 22px; line-height: 1; animation: floaty 3.6s ease-in-out infinite; }
.hero-spark.s1 { top: -8px; left: -12px; }
.hero-spark.s2 { top: 12px; right: -15px; color: var(--lemon); font-size: 16px; animation-delay: -.9s; }

/* ----------------------------------------------------------------- set cards */
.set-grid { gap: 16px; }
.set-card {
  --tone: var(--accent);
  min-height: 166px;
  padding: 19px;
  border-color: color-mix(in srgb, var(--tone) 26%, var(--line));
  border-radius: 24px;
  background:
    radial-gradient(260px 120px at 100% 0, color-mix(in srgb, var(--tone) 10%, transparent), transparent 70%),
    linear-gradient(145deg, rgba(255, 255, 255, .022), transparent 58%),
    var(--panel);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .025), 0 10px 28px rgba(0, 0, 0, .12);
}
.set-card:nth-child(5n+1) { --tone: var(--mint); }
.set-card:nth-child(5n+2) { --tone: var(--lemon); }
.set-card:nth-child(5n+3) { --tone: var(--sky); }
.set-card:nth-child(5n+4) { --tone: var(--pink); }
.set-card:nth-child(5n) { --tone: var(--lilac); }
.set-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  border-radius: 24px 24px 0 0;
  background: linear-gradient(90deg, var(--tone), transparent 82%);
  opacity: .85;
}
.set-card::after { border-color: color-mix(in srgb, var(--tone) 18%, transparent); }
.set-card:hover {
  transform: translateY(-4px) rotate(-.35deg);
  border-color: color-mix(in srgb, var(--tone) 55%, var(--line));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04), 0 18px 38px rgba(0, 0, 0, .2);
}
.set-card:focus-visible { outline: 2px solid var(--tone); outline-offset: 3px; }
.set-card h3 { font-size: 18px; font-weight: 780; }
.set-index {
  border-color: color-mix(in srgb, var(--tone) 32%, transparent);
  background: color-mix(in srgb, var(--tone) 13%, transparent);
  color: var(--tone);
  border-radius: 10px;
  transition: transform .2s;
}
.set-card:hover .set-index { transform: rotate(-6deg) scale(1.06); }
.set-spark {
  position: absolute;
  top: 15px;
  right: 16px;
  color: var(--tone);
  font-size: 22px;
  opacity: .7;
  transform: rotate(12deg);
  transition: transform .2s, opacity .2s;
}
.set-card:hover .set-spark { opacity: 1; transform: rotate(-8deg) scale(1.15); }
.set-card .btn.primary {
  background: var(--tone);
  color: #10200c;
  box-shadow: 0 5px 14px color-mix(in srgb, var(--tone) 18%, transparent);
}
.set-card .btn.primary:hover { filter: brightness(1.08); }
.set-meta .chip { background: rgba(255, 255, 255, .025); }

/* --------------------------------------------------------------- live / empty */
.live-banner {
  position: relative;
  overflow: hidden;
  border-color: rgba(139, 212, 80, .34);
  border-radius: 24px;
  background:
    radial-gradient(380px 180px at 3% 0, rgba(139, 212, 80, .17), transparent 68%),
    radial-gradient(320px 160px at 100% 100%, rgba(244, 208, 111, .06), transparent 70%),
    var(--panel);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
}
.live-banner::after {
  content: "✦";
  position: absolute;
  right: 18px;
  bottom: 6px;
  color: rgba(244, 208, 111, .35);
  font-size: 38px;
  transform: rotate(12deg);
  pointer-events: none;
}
.live-mark {
  border-radius: 15px;
  background: linear-gradient(145deg, #a8eb72, #78c33f);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 7px 18px rgba(139, 212, 80, .16);
  animation: bob 2.8s ease-in-out infinite;
}
.notice {
  border-radius: 18px;
  background:
    radial-gradient(220px 100px at 0 0, rgba(139, 212, 80, .07), transparent 70%),
    linear-gradient(135deg, rgba(139, 212, 80, .035), rgba(255, 255, 255, .012));
}
.empty {
  border-radius: 26px;
  background:
    radial-gradient(340px 180px at 50% 0, rgba(139, 212, 80, .06), transparent 70%),
    linear-gradient(rgba(255, 255, 255, .012), transparent);
}
.empty-icon { overflow: hidden; border-radius: 20px; background: linear-gradient(145deg, #20351c, #111b10); border: 1px solid rgba(139, 212, 80, .22); transform: rotate(-4deg); }
.empty-icon img { width: 44px; height: 44px; border-radius: 14px; }

/* --------------------------------------------------------------------- gate */
.gate-card { border-radius: 28px; }
.gate-logo { border-radius: 20px; box-shadow: 0 10px 26px rgba(0, 0, 0, .24), 0 0 0 5px rgba(139, 212, 80, .06); animation: floaty 4s ease-in-out infinite; }
.gate h1 { font-weight: 830; letter-spacing: -.035em; }

/* --------------------------------------------------------------------- host */
.host-top { padding-top: 18px; }
.host-main { padding-top: 14px; }
.stage-card {
  position: relative;
  overflow: hidden;
  border-color: rgba(70, 92, 61, .8);
  border-radius: 32px;
  background:
    radial-gradient(760px 360px at 50% -220px, rgba(139, 212, 80, .15), transparent 70%),
    radial-gradient(300px 220px at 100% 100%, rgba(134, 184, 255, .055), transparent 70%),
    radial-gradient(rgba(255, 255, 255, .03) 1px, transparent 1px),
    var(--panel);
  background-size: auto, auto, 26px 26px, auto;
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, .04);
}
.stage-card::before {
  content: "";
  position: absolute;
  top: -110px;
  right: -80px;
  width: 260px;
  height: 260px;
  border: 1px solid rgba(139, 212, 80, .1);
  border-radius: 50%;
  pointer-events: none;
}
.stage-card::after {
  content: "✦";
  position: absolute;
  top: 28px;
  left: 34px;
  color: rgba(244, 208, 111, .5);
  font-size: 26px;
  transform: rotate(-14deg);
  pointer-events: none;
}
.stage-mascot {
  position: relative;
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  margin: 0 auto 18px;
  border: 1px solid rgba(139, 212, 80, .28);
  border-radius: 28px;
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, .17), transparent 38%),
    linear-gradient(145deg, #223a20, #0f190e);
  box-shadow: 0 12px 26px rgba(0, 0, 0, .3), 0 0 0 6px rgba(139, 212, 80, .05);
  transform: rotate(-4deg);
  animation: floaty 4s ease-in-out infinite;
}
.stage-mascot img { width: 58px; height: 58px; border-radius: 17px; transform: rotate(4deg); }
.stage-mascot .mascot-tag {
  position: absolute;
  right: -18px;
  bottom: 7px;
  padding: 4px 7px;
  border-radius: 999px;
  background: var(--lemon);
  color: #2c2208;
  font: 800 8px/1 var(--mono);
  letter-spacing: .08em;
  transform: rotate(-7deg);
  box-shadow: 0 4px 9px rgba(0, 0, 0, .24);
}
.host-mark {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border: 1px solid rgba(139, 212, 80, .2);
  border-radius: 999px;
  background: rgba(139, 212, 80, .075);
}
.stage-card h1 { font-weight: 860; letter-spacing: -.045em; }
.stage-card .stage-sub { max-width: 640px; }
.lobby-meta .chip { border-radius: 999px; background: rgba(255, 255, 255, .04); }
.lobby-meta .chip.green { background: rgba(139, 212, 80, .12); }
.player-wall { gap: 9px; }
.player-pill {
  border-color: rgba(255, 255, 255, .12);
  background: rgba(255, 255, 255, .055);
  border-radius: 999px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06);
  transition: transform .16s, background .16s;
}
.player-pill::before {
  content: "";
  width: 7px;
  height: 7px;
  flex: none;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 3px rgba(139, 212, 80, .1);
}
.player-pill:nth-child(4n+2)::before { background: var(--lemon); box-shadow: 0 0 0 3px rgba(244, 208, 111, .1); }
.player-pill:nth-child(4n+3)::before { background: var(--sky); box-shadow: 0 0 0 3px rgba(134, 184, 255, .1); }
.player-pill:nth-child(4n)::before { background: var(--pink); box-shadow: 0 0 0 3px rgba(239, 159, 197, .1); }
.player-pill:hover { transform: translateY(-1px); background: rgba(255, 255, 255, .075); }
.lobby-actions .btn.primary.big { animation: softGlow 3.4s ease-in-out infinite; }
.lobby-hint { margin: 15px 0 0; color: var(--muted-2); font-size: 11.5px; letter-spacing: .01em; }

.question-top { align-items: flex-start; }
.qcount {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border: 1px solid rgba(139, 212, 80, .2);
  border-radius: 999px;
  background: rgba(139, 212, 80, .075);
  font-weight: 750;
  letter-spacing: .03em;
}
.question-progress h2 { margin-top: 9px; }
.question-prompt {
  max-width: 1120px;
  font-family: var(--display);
  font-weight: 850;
  letter-spacing: -.045em;
  text-wrap: balance;
}
.timer-wrap { filter: drop-shadow(0 8px 18px rgba(0, 0, 0, .18)); }
.timer-ring { background: conic-gradient(var(--accent) calc(var(--p, 1) * 1turn), rgba(255, 255, 255, .075) 0); }
.timer-value { font-family: var(--display); font-weight: 850; }
.answer-block {
  border-radius: 24px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 10px 26px rgba(0, 0, 0, .14);
  transition: transform .18s, filter .18s, box-shadow .18s;
  animation: popIn .3s ease-out both;
}
.answer-block:nth-child(2) { animation-delay: .04s; }
.answer-block:nth-child(3) { animation-delay: .08s; }
.answer-block:nth-child(4) { animation-delay: .12s; }
.answer-block.a { background: linear-gradient(135deg, #76332d, #481f1e); border-color: #a5564a; }
.answer-block.b { background: linear-gradient(135deg, #264676, #172b4b); border-color: #4671b0; }
.answer-block.c { background: linear-gradient(135deg, #76581f, #483313); border-color: #aa7c24; }
.answer-block.d { background: linear-gradient(135deg, #37602a, #1f3a19); border-color: #5d9448; }
.answer-block::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, .07), transparent 40%);
  pointer-events: none;
}
.answer-block .answer-letter {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: rgba(255, 255, 255, .12);
  color: rgba(255, 255, 255, .8);
}
.answer-block .answer-shape { filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .2)); }
.answer-block.correct { animation: none; }
.answer-block.dim { filter: saturate(.75); }
.answered-track { height: 9px; }
.answered-fill { background: linear-gradient(90deg, #6fbb3c, var(--mint)); }
.host-controls .btn { border-radius: 13px; }
.reveal-option { border-radius: 19px; background: rgba(255, 255, 255, .025); transition: transform .16s, border-color .16s; }
.reveal-option:hover { transform: translateY(-1px); }
.reveal-option.correct { border-color: rgba(139, 212, 80, .62); background: linear-gradient(90deg, rgba(139, 212, 80, .11), rgba(139, 212, 80, .035)); box-shadow: inset 0 0 0 1px rgba(139, 212, 80, .1); }
.top-five {
  border-radius: 20px;
  background:
    radial-gradient(200px 100px at 100% 0, rgba(244, 208, 111, .06), transparent 70%),
    var(--panel);
}
.top-five h3::before { content: "★"; color: var(--lemon); margin-right: 3px; }
.rank-row:nth-child(2) .rank-name { color: var(--gold); font-weight: 750; }
.rank-row:nth-child(3) .rank-name { color: #d7d2c5; }

/* ------------------------------------------------------------------- report */
.report-sheet { border-radius: 28px; border-color: rgba(70, 92, 61, .8); box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, .035); }
.report-hero h2 { font-family: var(--display); font-weight: 840; letter-spacing: -.04em; }
.report-stat { border-radius: 16px; background: linear-gradient(145deg, rgba(255, 255, 255, .025), transparent), var(--bg-soft); }
.report-stat strong { font-family: var(--display); font-weight: 800; }
.podium-place { border-radius: 19px; }
.podium-place.p1 { background: linear-gradient(160deg, rgba(242, 193, 78, .16), rgba(242, 193, 78, .035) 70%, var(--bg-soft)); }
.podium-medal { font-family: var(--display); }
.podium-name { font-weight: 780; }
.report-table .score { color: var(--mint); }
.report-footnote { border-top-style: dashed; }
.closed-screen .closed-mark { border-radius: 24px; transform: rotate(-4deg); }

/* ---------------------------------------------------------------- music pill */
.music-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--muted);
  font: 650 12px/1 var(--sans);
  cursor: pointer;
  transition: border-color .15s, background .15s, color .15s, transform .15s;
  white-space: nowrap;
}
.music-btn:hover { border-color: var(--line-strong); color: var(--text); transform: translateY(-1px); }
.music-btn.on { border-color: rgba(139, 212, 80, .25); background: rgba(139, 212, 80, .08); color: var(--mint); }
.music-btn.playing { box-shadow: 0 0 0 4px rgba(139, 212, 80, .055); }
.music-icon { font-size: 16px; line-height: 1; }
.music-eq { display: inline-flex; align-items: flex-end; gap: 2px; width: 14px; height: 12px; }
.music-eq i { display: block; width: 2px; height: 4px; border-radius: 2px; background: currentColor; opacity: .55; }
.music-btn.playing .music-eq i { animation: eqBounce .7s ease-in-out infinite; opacity: 1; }
.music-btn.playing .music-eq i:nth-child(2) { animation-delay: -.25s; }
.music-btn.playing .music-eq i:nth-child(3) { animation-delay: -.45s; }

/* ---------------------------------------------------------------- motion */
@keyframes floaty { 50% { transform: translateY(-5px) rotate(1deg); } }
@keyframes bob { 50% { transform: translateY(-2px); } }
@keyframes softGlow { 50% { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 8px 22px rgba(139, 212, 80, .16), 0 0 0 6px rgba(139, 212, 80, .04); } }
@keyframes popIn { from { opacity: 0; transform: translateY(7px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes eqBounce { 50% { height: 11px; } }

@media (max-width: 900px) {
  .hero { grid-template-columns: minmax(0, 1fr) auto; }
  .hero-actions { grid-column: 1 / -1; }
  .hero-sticker { width: 100px; height: 100px; border-radius: 28px; }
  .hero-sticker img { width: 58px; height: 58px; }
}

@media (max-width: 720px) {
  .hero { display: flex; flex-direction: row; align-items: flex-start; gap: 14px; }
  .hero-copy { flex: 1; }
  .hero-sticker { width: 76px; height: 76px; margin-top: 4px; border-radius: 22px; }
  .hero-sticker::after { inset: 7px; border-radius: 17px; }
  .hero-sticker img { width: 44px; height: 44px; border-radius: 14px; }
  .hero-sticker-tag { right: -10px; bottom: 4px; font-size: 7px; padding: 3px 5px; }
  .hero-spark { font-size: 16px; }
  .hero-spark.s1 { left: -6px; top: -7px; }
  .hero-spark.s2 { right: -8px; }
  .hero-actions { width: 100%; }
  .hero-actions .btn { width: 100%; }
  .set-card { min-height: 156px; }
  .stage-card { border-radius: 26px; }
  .stage-card::after { top: 16px; left: 18px; font-size: 20px; }
  .stage-mascot { width: 76px; height: 76px; margin-bottom: 14px; border-radius: 23px; }
  .stage-mascot img { width: 47px; height: 47px; border-radius: 14px; }
  .music-btn { padding: 7px 9px; }
  .music-label { display: none; }
  .music-eq { display: none; }
  .answer-block { border-radius: 19px; }
  .answer-block .answer-letter { width: 24px; height: 24px; border-radius: 7px; }
}

@media (prefers-reduced-motion: reduce) {
  .dot.live, .live-mark, .gate-logo, .stage-mascot, .hero-spark,
  .lobby-actions .btn.primary.big, .music-btn.playing .music-eq i,
  .answer-block { animation: none !important; }
  .btn, .set-card, .player-pill, .reveal-option, .set-index, .set-spark { transition: none !important; }
}

@media (max-width: 720px) {
  .hero { flex-wrap: wrap; }
  .hero-actions { flex: 1 1 100%; }
}

.waiting-wall { border-style: dashed; border-color: rgba(139, 212, 80, .18); border-radius: 22px; }
.waiting-dots { display: inline-flex; align-items: center; justify-content: center; gap: 5px; margin-bottom: 8px; }
.waiting-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--mint); opacity: .45; animation: waitDot 1.4s ease-in-out infinite; }
.waiting-dots i:nth-child(2) { animation-delay: .16s; }
.waiting-dots i:nth-child(3) { animation-delay: .32s; }
@keyframes waitDot { 50% { transform: translateY(-4px); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .waiting-dots i { animation: none; } }
