/* Eye20 — Sibling Obsidian-Neon Visual Arcade & Clinical Vision UI (Matches Neuro20 v8.0 DNA) */
:root {
  --bg: #0A0A0D;
  --surface: #14141A;
  --surface-hover: #1E1E27;
  --line: rgba(255, 255, 255, 0.085);
  --text: #FAFAFA;
  --muted: #9393A0;
  --dim: #62626E;

  --mint: #00E599;
  --cyan: #22D3EE;
  --violet: #A855F7;
  --coral: #F43F5E;
  --amber: #F59E0B;

  --font-sans: "Pretendard Variable", Pretendard, "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: "Space Grotesk", "Pretendard Variable", Pretendard, "Plus Jakarta Sans", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

html, body {
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  touch-action: manipulation;
  overflow-x: hidden;
}

body {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100dvh;
  padding: 18px 20px 26px;
}

.hidden { display: none !important; }
.fx-canvas { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 60; }
.bg-rec-canvas { position: fixed; left: -9999px; top: 0; width: 2px; height: 2px; opacity: 0.01; pointer-events: none; }

/* Header */
.topbar { width: 100%; max-width: 460px; display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.brand { display: inline-flex; align-items: center; gap: 8px; background: none; border: none; color: var(--text); cursor: pointer; padding: 4px 0; }
.brand-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 12px rgba(0, 229, 153, 0.7); }
.brand-name { font-family: var(--font-display); font-size: 15px; font-weight: 700; letter-spacing: 0.06em; }
.brand-name span { color: var(--mint); }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.bare-icon { background: none; border: none; color: var(--muted); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; padding: 4px; transition: color 0.15s ease; }
.bare-icon:hover { color: var(--text); }
.lang-bar { display: inline-flex; gap: 2px; }
.lang-btn { border: none; background: transparent; color: var(--dim); font-family: var(--font-sans); font-size: 11.5px; font-weight: 700; padding: 4px 7px; border-radius: 6px; cursor: pointer; }
.lang-btn:hover { color: var(--muted); }
.lang-btn.active { color: var(--text); background: rgba(255, 255, 255, 0.09); }

/* Stage Progress Bar */
.stage-bar { width: 100%; max-width: 460px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 18px; }
.sb-seg { height: 3.5px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.sb-fill { display: block; height: 100%; width: 0%; background: linear-gradient(90deg, var(--mint), var(--cyan)); transition: width 0.3s ease; }

/* Shell & Stage */
.app-shell { width: 100%; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.stage { width: 100%; max-width: 460px; flex: 1; display: flex; flex-direction: column; justify-content: center; position: relative; }
.screen { display: none; width: 100%; }
.screen.active { display: flex; flex-direction: column; animation: fadeUp 0.24s cubic-bezier(0.22, 1, 0.36, 1); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* Landing Pills */
.vs-pill { align-self: center; display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px 7px 14px; border-radius: 999px; background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(244, 63, 94, 0.16)); border: 1px solid rgba(251, 191, 36, 0.45); color: #FDE68A; font-size: 13px; font-weight: 800; margin-bottom: 14px; }
.vs-dismiss { border: none; background: rgba(255, 255, 255, 0.14); color: #FFFFFF; width: 20px; height: 20px; border-radius: 50%; font-size: 11px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.daily-pill, .room-pill { align-self: center; font-size: 12px; font-weight: 800; padding: 6px 13px; border-radius: 999px; margin-bottom: 12px; }
.daily-pill { color: #A7F3D0; background: rgba(0, 229, 153, 0.12); border: 1px solid rgba(0, 229, 153, 0.34); }
.room-pill { color: #FDE68A; background: linear-gradient(135deg, rgba(245, 158, 11, 0.22), rgba(168, 85, 247, 0.18)); border: 1px solid rgba(251, 191, 36, 0.48); }
.live-count-pill { align-self: center; display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 700; color: var(--muted); background: var(--surface); padding: 6px 14px; border-radius: 999px; margin-bottom: 16px; }
.live-pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--mint); animation: liveBlink 1.8s ease-in-out infinite; }
@keyframes liveBlink { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.4; transform: scale(0.75); } }

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(38px, 10vw, 52px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.08;
  text-align: center;
  color: #FFFFFF;
  word-break: keep-all;
  text-wrap: balance;
  margin-bottom: 34px;
}

/* Eye20 3-Round Landing Glyphs */
.steps-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 36px; }
.step-item { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 9px; }
.step-item strong { font-size: 14px; font-weight: 700; color: #FAFAFA; word-break: keep-all; }
.step-glyph {
  width: 56px; height: 56px; border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface); border: 1px solid rgba(255, 255, 255, 0.09);
  position: relative; overflow: hidden;
}
.glyph-dva { background: linear-gradient(135deg, rgba(0, 229, 153, 0.16), rgba(34, 211, 238, 0.08)); border-color: rgba(0, 229, 153, 0.34); }
.glyph-c-ring {
  width: 28px; height: 28px; border-radius: 50%;
  border: 5.5px solid #FAFAFA; border-right-color: transparent;
  animation: dvaSweep 2.2s ease-in-out infinite;
}
@keyframes dvaSweep { 0%, 100% { transform: translateX(-8px) rotate(0deg); } 50% { transform: translateX(8px) rotate(90deg); } }

.glyph-cct { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; padding: 10px; }
.glyph-cct i { display: block; border-radius: 50%; width: 100%; height: 100%; }
.glyph-cct .gc-r { background: #F43F5E; box-shadow: 0 0 8px rgba(244, 63, 94, 0.5); }
.glyph-cct .gc-g { background: #00E599; box-shadow: 0 0 8px rgba(0, 229, 153, 0.5); }
.glyph-cct .gc-b { background: #38BDF8; box-shadow: 0 0 8px rgba(56, 189, 248, 0.5); }
.glyph-cct .gc-n { background: #64748B; }

.glyph-fog { background: #6E717C; border-color: rgba(255, 255, 255, 0.16); }
.glyph-fog-c {
  width: 28px; height: 28px; border-radius: 50%;
  border: 5.5px solid #1E2028; border-top-color: transparent;
  animation: fogPulse 2.8s ease-in-out infinite;
}
@keyframes fogPulse { 0%, 100% { opacity: 0.9; } 50% { opacity: 0.22; } }

/* Buttons */
.btn-primary {
  width: 100%; border: none; border-radius: 16px; padding: 18px 24px;
  background: var(--mint); color: #05130D; font-family: var(--font-sans);
  font-size: 16.5px; font-weight: 800; letter-spacing: -0.015em; cursor: pointer;
  transition: transform 0.1s ease, filter 0.15s ease;
}
.btn-glow { box-shadow: 0 10px 30px rgba(0, 229, 153, 0.28); }
.btn-primary:hover { filter: brightness(1.07); }
.btn-primary:active { transform: scale(0.975); }
.btn-compact { padding: 14px 16px; font-size: 14.5px; border-radius: 14px; }

.btn-clinical-entry {
  width: 100%; margin-top: 11px; border: 1px solid rgba(34, 211, 238, 0.35);
  border-radius: 14px; padding: 13px 16px;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.11), rgba(168, 85, 247, 0.08));
  color: #E0F2FE; font-family: var(--font-sans); font-size: 13.5px; font-weight: 700;
  cursor: pointer; transition: filter 0.15s ease, transform 0.1s ease;
  word-break: keep-all;
}
.btn-clinical-entry:hover { filter: brightness(1.14); }
.btn-clinical-entry:active { transform: scale(0.98); }

.landing-disclaimer {
  margin-top: 14px; text-align: center; font-size: 11.5px; color: var(--dim);
  line-height: 1.45; word-break: keep-all;
}

/* Per-Round Intro */
.screen-center { align-items: center; text-align: center; }
.intro-kicker { font-family: var(--font-mono); font-size: 12.5px; font-weight: 800; letter-spacing: 0.1em; color: var(--mint); margin-bottom: 18px; }
.intro-visual {
  width: min(100%, 296px); min-height: 152px; padding: 8px;
  border-radius: 22px; background: linear-gradient(180deg, #171722, #111118);
  border: 1px solid rgba(255, 255, 255, 0.11); box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  display: flex; align-items: center; justify-content: center; margin-bottom: 22px; overflow: hidden;
}
.intro-demo-canvas { width: 100%; height: auto; border-radius: 14px; display: block; }
.intro-title { font-family: var(--font-display); font-size: clamp(25px, 7vw, 33px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.18; margin-bottom: 10px; word-break: keep-all; text-wrap: balance; }
.intro-sub { font-size: 14px; font-weight: 600; color: var(--muted); line-height: 1.45; margin-bottom: 26px; word-break: keep-all; text-wrap: balance; }

/* In-Game HUD & Landolt C Arena */
.hud-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; gap: 10px; }
.hud-left { display: inline-flex; align-items: center; gap: 8px; }
.hud-lv { font-family: var(--font-display); font-size: 20px; font-weight: 800; letter-spacing: -0.02em; color: #FFFFFF; }
.hud-mono { font-family: var(--font-mono); font-size: 12.5px; font-weight: 800; color: var(--cyan); white-space: nowrap; }
.tier-tag { font-family: var(--font-mono); font-size: 10.5px; font-weight: 800; letter-spacing: 0.06em; padding: 4px 8px; border-radius: 6px; white-space: nowrap; }
.t-easy    { background: rgba(0, 229, 153, 0.15); color: #6EE7B7; }
.t-normal  { background: rgba(34, 211, 238, 0.15); color: #67E8F9; }
.t-hard    { background: rgba(245, 158, 11, 0.18); color: #FCD34D; }
.t-extreme { background: rgba(244, 63, 94, 0.18); color: #FDA4AF; }
.t-god     { background: rgba(168, 85, 247, 0.24); color: #E9D5FF; }

.timer-track { width: 100%; height: 4px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); overflow: hidden; margin-bottom: 14px; }
.timer-fill { height: 100%; width: 100%; background: linear-gradient(90deg, var(--mint), var(--cyan)); }
.timer-fill.danger { background: var(--coral); box-shadow: 0 0 14px rgba(244, 63, 94, 0.7); }

.eye-arena {
  position: relative; width: 100%; max-width: 340px; aspect-ratio: 1 / 1;
  margin: 0 auto 14px; border-radius: 22px; overflow: hidden;
  border: 1.5px solid rgba(255, 255, 255, 0.11); background: #0D0D14;
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.5);
  touch-action: none;
}
.eye-arena canvas { width: 100%; height: 100%; display: block; }

.arena-pop {
  position: absolute; left: 50%; top: 44%; transform: translate(-50%, -50%);
  z-index: 12; pointer-events: none; font-family: var(--font-display);
  font-size: 28px; font-weight: 900; color: #FFFFFF;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.75), 0 0 24px rgba(0, 229, 153, 0.8);
  white-space: nowrap; animation: popBurst 0.52s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
@keyframes popBurst {
  0%   { opacity: 0; transform: translate(-50%, -30%) scale(0.75); }
  30%  { opacity: 1; transform: translate(-50%, -55%) scale(1.1); }
  100% { opacity: 0; transform: translate(-50%, -92%) scale(1); }
}

/* Ergonomic 4-Way Landolt C D-Pad (Arrow-Key T-Layout) */
.dpad-grid {
  width: 100%; max-width: 300px; margin: 0 auto 10px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px;
}
.dpad-btn {
  height: 56px; border: 1.5px solid rgba(255, 255, 255, 0.14); border-radius: 16px;
  background: linear-gradient(180deg, #1A1A24, #13131B); color: #FFFFFF;
  font-size: 24px; font-weight: 900; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.08s ease, background 0.12s ease, border-color 0.12s ease;
  user-select: none;
}
.dpad-btn:hover { background: #222230; border-color: rgba(0, 229, 153, 0.45); }
.dpad-btn:active { transform: scale(0.92); background: rgba(0, 229, 153, 0.22); }
.dpad-btn.is-ok { background: rgba(0, 229, 153, 0.32); border-color: var(--mint); color: #A7F3D0; }
.dpad-btn.is-err { background: rgba(244, 63, 94, 0.32); border-color: var(--coral); color: #FECDD3; }

.play-status { text-align: center; min-height: 20px; font-size: 13px; font-weight: 700; color: var(--muted); }

/* ================= TRACK 2: CLINICAL PRECISION SELF-CHECK ================= */
.screen-clinical { gap: 12px; }
.clin-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.clin-back-btn { border: 1px solid rgba(255, 255, 255, 0.14); background: var(--surface); color: #E4E4F0; border-radius: 10px; padding: 6px 12px; font-family: var(--font-sans); font-size: 12.5px; font-weight: 700; cursor: pointer; }
.clin-tag { font-family: var(--font-mono); font-size: 11px; font-weight: 800; color: var(--cyan); background: rgba(34, 211, 238, 0.12); padding: 4px 9px; border-radius: 999px; }
.clin-step { display: flex; flex-direction: column; align-items: center; gap: 12px; width: 100%; }
.clin-title { font-family: var(--font-display); font-size: 21px; font-weight: 800; text-align: center; color: #FFFFFF; word-break: keep-all; }
.clin-sub { font-size: 13px; color: var(--muted); text-align: center; line-height: 1.48; word-break: keep-all; }

.clin-card-stage { width: 100%; padding: 18px 8px; border-radius: 18px; background: var(--surface); border: 1px solid rgba(255, 255, 255, 0.08); display: flex; flex-direction: column; align-items: center; gap: 10px; overflow: hidden; }
.clin-card-box {
  max-width: 100%; border-radius: 12px;
  background: linear-gradient(135deg, rgba(0, 229, 153, 0.2), rgba(34, 211, 238, 0.16));
  border: 2px solid var(--mint); position: relative;
  display: flex; align-items: flex-end; justify-content: flex-end; padding: 10px 12px;
  box-shadow: 0 8px 24px rgba(0, 229, 153, 0.16);
}
.clin-card-chip { position: absolute; left: 16px; top: 38%; width: 32px; height: 24px; border-radius: 5px; background: rgba(253, 230, 138, 0.72); border: 1px solid rgba(251, 191, 36, 0.9); }
.clin-card-label { font-family: var(--font-mono); font-size: 11px; font-weight: 800; color: #E2E8F0; }
.clin-card-meta { font-family: var(--font-mono); font-size: 11.5px; color: var(--muted); }
.clin-slider { width: 100%; accent-color: var(--mint); height: 6px; cursor: pointer; }
.btn-ghost-sm { background: none; border: none; color: var(--muted); font-family: var(--font-sans); font-size: 12.5px; font-weight: 700; cursor: pointer; padding: 6px 10px; text-decoration: underline; }

.clin-canvas-box { width: 100%; max-width: 300px; aspect-ratio: 1 / 1; border-radius: 18px; overflow: hidden; border: 1.5px solid rgba(255, 255, 255, 0.14); background: #0D0D14; }
.clin-canvas-box.is-light { background: #FFFFFF; border-color: rgba(255, 255, 255, 0.35); }
.clin-canvas-box canvas { width: 100%; height: 100%; display: block; }

.clin-choice-col { width: 100%; display: flex; flex-direction: column; gap: 9px; }
.btn-warn-outline { border-color: rgba(245, 158, 11, 0.48) !important; color: #FDE68A !important; }
.astig-ang-grid { width: 100%; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.astig-ang-btn { border: 1px solid rgba(255, 255, 255, 0.15); background: var(--surface); color: #FAFAFA; border-radius: 11px; padding: 10px 6px; font-family: var(--font-mono); font-size: 11.5px; font-weight: 700; cursor: pointer; }
.astig-ang-btn:hover { border-color: var(--mint); background: rgba(0, 229, 153, 0.15); }

.clin-report-grid { width: 100%; display: flex; flex-direction: column; gap: 9px; }
.clin-rep-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 13px 14px; border-radius: 14px; background: var(--surface); border: 1px solid rgba(255, 255, 255, 0.09); }
.clin-rep-info { display: flex; flex-direction: column; gap: 3px; }
.clin-rep-info span { font-size: 12px; font-weight: 700; color: var(--muted); }
.clin-rep-info strong { font-size: 14px; font-weight: 800; color: #FFFFFF; }
.clin-badge { font-family: var(--font-mono); font-size: 11px; font-weight: 800; padding: 4px 9px; border-radius: 999px; white-space: nowrap; }
.clin-badge.is-ok { background: rgba(0, 229, 153, 0.18); color: #6EE7B7; }
.clin-badge.is-warn { background: rgba(245, 158, 11, 0.2); color: #FCD34D; }
.clin-disclaimer { font-size: 11.5px; color: var(--dim); text-align: center; line-height: 1.5; word-break: keep-all; }

/* ================= RESULT SCREEN (IDENTICAL TO NEURO20 v8.0) ================= */
.screen-result { position: relative; }
.reel-stage {
  position: relative; width: min(100%, 440px, calc(66dvh * 4 / 5)); aspect-ratio: 4 / 5;
  margin: 0 auto 14px; border-radius: 24px; overflow: hidden; background: #07070B;
  border: 1.5px solid rgba(0, 229, 153, 0.42);
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.65), 0 0 36px rgba(0, 229, 153, 0.14);
}
.reel-stage canvas { width: 100%; height: 100%; display: block; object-fit: contain; }

.vs-win-prompt {
  margin-bottom: 12px; padding: 14px 16px; border-radius: 18px;
  background: linear-gradient(135deg, rgba(0, 229, 153, 0.2), rgba(34, 211, 238, 0.14));
  border: 1.5px solid rgba(0, 229, 153, 0.6); box-shadow: 0 12px 32px rgba(0, 229, 153, 0.18);
  display: flex; flex-direction: column; gap: 10px; animation: fadeUp 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}
.vs-win-prompt-text { font-size: 14px; font-weight: 800; color: #FFFFFF; text-align: center; line-height: 1.38; word-break: keep-all; }
.vs-win-prompt-actions { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.btn-vs-send { border: none; border-radius: 12px; padding: 12px 16px; background: var(--mint); color: #05130D; font-family: var(--font-sans); font-size: 14px; font-weight: 900; cursor: pointer; }
.btn-vs-close { border: 1px solid rgba(255, 255, 255, 0.18); border-radius: 12px; padding: 12px 14px; background: rgba(255, 255, 255, 0.06); color: var(--muted); font-family: var(--font-sans); font-size: 13px; font-weight: 700; cursor: pointer; }
.btn-rematch { background: linear-gradient(135deg, #F43F5E, #F59E0B) !important; color: #FFFFFF !important; box-shadow: 0 10px 26px rgba(244, 63, 94, 0.34); }

/* 3x2 Vibrant SNS Share Dock */
.sns-dock { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.sns-btn {
  border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 14px; background: var(--surface); color: #FAFAFA;
  padding: 11px 6px; display: flex; flex-direction: row; align-items: center; justify-content: center; gap: 7px;
  cursor: pointer; font-family: var(--font-sans); font-size: 12.5px; font-weight: 800;
  transition: filter 0.14s ease, transform 0.1s ease;
}
.sns-btn:hover { filter: brightness(1.14); }
.sns-btn:active { transform: scale(0.95); }
.sns-btn-kakao   { background: linear-gradient(135deg, rgba(254, 229, 0, 0.24), rgba(250, 204, 21, 0.14)); border-color: rgba(254, 229, 0, 0.58); color: #FEE500; }
.sns-btn-accent  { background: linear-gradient(135deg, rgba(0, 229, 153, 0.22), rgba(34, 211, 238, 0.14)); border-color: rgba(0, 229, 153, 0.52); color: #6EE7B7; }
.sns-btn-ig      { background: linear-gradient(135deg, rgba(245, 133, 41, 0.24), rgba(221, 42, 123, 0.24), rgba(129, 52, 175, 0.24)); border-color: rgba(236, 72, 153, 0.58); color: #F9A8D4; }
.sns-btn-x       { background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), rgba(148, 163, 184, 0.08)); border-color: rgba(255, 255, 255, 0.42); color: #FFFFFF; }
.sns-btn-threads { background: linear-gradient(135deg, rgba(168, 85, 247, 0.22), rgba(99, 102, 241, 0.14)); border-color: rgba(192, 132, 252, 0.52); color: #E9D5FF; }
.sns-btn-line    { background: linear-gradient(135deg, rgba(6, 199, 85, 0.22), rgba(16, 185, 129, 0.14)); border-color: rgba(6, 199, 85, 0.55); color: #4ADE80; }
.sns-btn-copy    { background: linear-gradient(135deg, rgba(34, 211, 238, 0.2), rgba(59, 130, 246, 0.12)); border-color: rgba(34, 211, 238, 0.5); color: #67E8F9; }

.toast { margin-top: 10px; text-align: center; font-size: 13px; font-weight: 700; color: #6EE7B7; }

/* Group Room & 16:9 Live Raid */
.live-host-btn { display: none; border: 1px solid rgba(244, 63, 94, 0.52); background: rgba(244, 63, 94, 0.16); color: #FDA4AF; border-radius: 999px; padding: 5px 11px; font-family: var(--font-sans); font-size: 11.5px; font-weight: 800; cursor: pointer; white-space: nowrap; }
.live-host-btn:hover { background: rgba(244, 63, 94, 0.28); color: #FFFFFF; }

@media (min-width: 900px) {
  .live-host-btn { display: inline-flex; align-items: center; gap: 5px; }
  body.live-wide .topbar, body.live-wide .stage-bar { max-width: 960px; }
  body.live-wide .app-shell { max-width: 960px; flex-direction: row; align-items: flex-start; justify-content: center; gap: 28px; margin-top: 8px; }
}

.room-box { margin-top: 14px; padding: 15px; border-radius: 18px; background: linear-gradient(180deg, #161622, #12121A); border: 1px solid rgba(255, 255, 255, 0.11); display: flex; flex-direction: column; gap: 10px; }
.room-box-title { font-size: 13.5px; font-weight: 800; color: #FFFFFF; }
.room-board-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.room-code-tag { font-family: var(--font-mono); font-size: 12px; font-weight: 800; color: #05130D; background: var(--mint); padding: 3px 9px; border-radius: 8px; }
.room-board-meta { font-size: 12px; font-weight: 700; color: var(--muted); }
.room-input-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.room-input { min-width: 0; border: 1px solid rgba(255, 255, 255, 0.16); background: rgba(0, 0, 0, 0.35); color: #FFFFFF; border-radius: 12px; padding: 10px 12px; font-family: var(--font-sans); font-size: 13.5px; font-weight: 700; outline: none; }
.room-input:focus { border-color: var(--mint); }
.btn-room-primary { border: none; border-radius: 12px; padding: 10px 14px; background: linear-gradient(135deg, var(--mint), var(--cyan)); color: #05130D; font-family: var(--font-sans); font-size: 13px; font-weight: 900; cursor: pointer; white-space: nowrap; }
.btn-room-secondary { width: 100%; border: 1px solid rgba(255, 255, 255, 0.18); border-radius: 12px; padding: 10px 12px; background: rgba(255, 255, 255, 0.06); color: #FAFAFA; font-family: var(--font-sans); font-size: 13px; font-weight: 800; cursor: pointer; }
.btn-room-secondary:hover { background: rgba(255, 255, 255, 0.12); }

.room-list { display: flex; flex-direction: column; gap: 6px; max-height: 260px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.16) transparent; }
.room-list::-webkit-scrollbar { width: 5px; }
.room-list::-webkit-scrollbar-track { background: transparent; }
.room-list::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.16); border-radius: 999px; }
.live-raid-panel .room-list { max-height: 340px; }
.room-empty { text-align: center; font-size: 12.5px; color: var(--muted); padding: 12px 0; }
.room-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6.5px 10px; border-radius: 11px; background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.06); }
.room-row.is-first { background: rgba(0, 229, 153, 0.12); border-color: rgba(0, 229, 153, 0.42); }
.room-row.is-last  { background: rgba(244, 63, 94, 0.1); border-color: rgba(244, 63, 94, 0.34); }
.room-row-left { display: inline-flex; align-items: center; gap: 7px; min-width: 0; }
.room-rank { font-family: var(--font-mono); font-size: 12.5px; color: #FDE68A; min-width: 24px; }
.room-nick { font-size: 13px; font-weight: 800; color: #FFFFFF; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.room-row-right { display: flex; flex-direction: column; align-items: flex-end; text-align: right; }
.room-row-right strong { font-size: 12.5px; font-weight: 800; color: #E8E8F4; }
.room-row-right small { font-size: 11px; font-weight: 600; color: var(--muted); }

.live-raid-panel { width: 100%; max-width: 440px; padding: 18px; border-radius: 22px; background: linear-gradient(180deg, #161622, #101018); border: 1.5px solid rgba(244, 63, 94, 0.42); box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55); display: flex; flex-direction: column; gap: 14px; }
.live-raid-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.live-dot-badge { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: #FDA4AF; }
.live-round-tag { font-family: var(--font-mono); font-size: 11.5px; font-weight: 800; color: var(--mint); }
.live-raid-join { display: flex; align-items: center; gap: 14px; }
.live-qr-wrap { padding: 8px; border-radius: 14px; background: #FFFFFF; flex-shrink: 0; }
.live-qr-wrap canvas { display: block; width: 120px; height: 120px; }
.live-code-col { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.live-code-big { font-family: var(--font-mono); font-size: 36px; font-weight: 900; letter-spacing: 0.14em; color: #FFFFFF; line-height: 1; }
.live-scan-hint { font-size: 12px; color: var(--muted); line-height: 1.38; }
.live-raid-stats { display: flex; justify-content: space-between; font-size: 13px; font-weight: 800; color: #A7F3D0; }

/* References Drawer & Footer */
.method-drawer { margin-top: 14px; text-align: center; }
.method-drawer summary { cursor: pointer; font-size: 12px; font-weight: 600; color: var(--dim); list-style: none; }
.method-drawer summary:hover { color: var(--muted); }
.method-body { margin-top: 10px; text-align: left; font-size: 11.5px; line-height: 1.65; color: var(--muted); white-space: pre-line; padding: 13px; border-radius: 12px; background: var(--surface); }
.footer { margin-top: 18px; display: flex; gap: 8px; align-items: center; font-size: 12px; color: var(--dim); }
.footer a { color: var(--dim); text-decoration: none; font-weight: 600; }
.footer a:hover { color: var(--muted); }
