:root {
  --bg: #0a0c14;
  --bg-2: #10131f;
  --surface: #161a29;
  --surface-2: #1d2235;
  --line: #262c44;
  --text: #f2f4fb;
  --muted: #8b93b0;
  --lime: #c6f432;
  --blue: #4d7cfe;
  --coral: #ff5c7a;
  --amber: #ffb020;
  --teal: #2ee6c5;
  --violet: #9b6bff;
  --good: #34d399;
  --bad: #ff5c7a;
  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --display: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  background-image:
    radial-gradient(900px 500px at 100% -10%, rgba(77, 124, 254, 0.14), transparent 60%),
    radial-gradient(700px 400px at -10% 110%, rgba(198, 244, 50, 0.08), transparent 60%);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--lime); }
h1, h2, h3, h4 { font-family: var(--display); margin: 0; letter-spacing: -0.02em; line-height: 1.15; }
.muted { color: var(--muted); }
.hidden { display: none !important; }

/* ---------- layout ---------- */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: 240px; flex-shrink: 0; padding: 28px 18px; border-right: 1px solid var(--line);
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 6px;
  background: rgba(10, 12, 20, 0.6); backdrop-filter: blur(10px);
}
.main { flex: 1; min-width: 0; padding: 32px clamp(16px, 4vw, 48px) 120px; max-width: 1180px; margin: 0 auto; width: 100%; }

.logo { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 700; font-size: 22px; padding: 0 10px 22px; letter-spacing: -0.03em; }
.logo-mark {
  width: 36px; height: 36px; border-radius: 11px; background: var(--lime); color: #0a0c14;
  display: grid; place-items: center; font-size: 22px; font-weight: 800; transform: rotate(-6deg);
}
.logo small { display: block; font-family: var(--font); font-size: 11px; color: var(--muted); font-weight: 500; letter-spacing: 0.04em; text-transform: uppercase; }

.nav-link {
  display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 12px; color: var(--muted);
  text-decoration: none; font-weight: 600; font-size: 15px; transition: background 0.15s, color 0.15s; position: relative;
}
.nav-link:hover { background: var(--surface); color: var(--text); }
.nav-link.active { background: var(--surface-2); color: var(--text); }
.nav-link.active .ico { color: var(--lime); }
.nav-link .ico { width: 22px; height: 22px; display: grid; place-items: center; }
.nav-link .ico svg { width: 20px; height: 20px; }
.badge-dot {
  margin-left: auto; background: var(--coral); color: white; font-size: 11px; font-weight: 700;
  min-width: 20px; height: 20px; border-radius: 10px; display: grid; place-items: center; padding: 0 6px;
}
.sidebar .spacer { flex: 1; }
.side-user { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 14px; background: var(--surface); }
.side-user .who { font-weight: 600; font-size: 14px; line-height: 1.2; }
.side-user .who small { color: var(--muted); font-weight: 500; }

.tabbar { display: none; }

@media (max-width: 860px) {
  .sidebar { display: none; }
  .main { padding-top: 20px; }
  .tabbar {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 50;
    background: rgba(16, 19, 31, 0.92); backdrop-filter: blur(14px); border-top: 1px solid var(--line);
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
  }
  .tabbar .nav-link { flex: 1; flex-direction: column; gap: 2px; font-size: 11px; padding: 8px 4px; }
  .tabbar .badge-dot { position: absolute; top: 2px; right: calc(50% - 22px); min-width: 16px; height: 16px; font-size: 10px; }
  .mobile-head { display: flex !important; }
}
.mobile-head { display: none; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.mobile-head .logo { padding: 0; }

/* ---------- components ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.card h3 { font-size: 18px; margin-bottom: 14px; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 26px; }
.page-head h1 { font-size: clamp(28px, 4vw, 40px); }
.page-head p { margin: 6px 0 0; color: var(--muted); }
.section-title { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin: 34px 0 14px; font-family: var(--font); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 14px;
  padding: 12px 20px; font-weight: 700; font-size: 15px; background: var(--surface-2); color: var(--text);
  transition: transform 0.08s, filter 0.15s, background 0.15s; white-space: nowrap; text-decoration: none;
}
.btn:hover { filter: brightness(1.12); }
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.5; cursor: default; }
.btn-primary { background: var(--lime); color: #0a0c14; }
.btn-blue { background: var(--blue); color: white; }
.btn-danger { background: rgba(255, 92, 122, 0.15); color: var(--coral); }
.btn-ghost { background: transparent; border: 1px solid var(--line); }
.btn-sm { padding: 8px 14px; font-size: 13px; border-radius: 10px; }
.btn-lg { padding: 16px 28px; font-size: 17px; border-radius: 16px; }
.btn-block { width: 100%; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; font-weight: 600; color: var(--muted); }
.input, select.input {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; outline: none;
  transition: border-color 0.15s, box-shadow 0.15s; width: 100%;
}
.input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(77, 124, 254, 0.25); }

.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 12px;
  font-weight: 700; background: var(--surface-2); color: var(--muted);
}
.chip-lime { background: rgba(198, 244, 50, 0.14); color: var(--lime); }
.chip-coral { background: rgba(255, 92, 122, 0.14); color: var(--coral); }
.chip-blue { background: rgba(77, 124, 254, 0.16); color: #8fb0ff; }
.chip-amber { background: rgba(255, 176, 32, 0.15); color: var(--amber); }

.avatar {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-weight: 800;
  font-family: var(--display); color: #0a0c14; flex-shrink: 0; font-size: 16px;
}
.avatar.lg { width: 64px; height: 64px; border-radius: 18px; font-size: 26px; }

.error-msg { color: var(--coral); font-size: 14px; font-weight: 600; min-height: 1em; }

.toast-wrap { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast {
  background: var(--surface-2); border: 1px solid var(--line); padding: 12px 18px; border-radius: 14px; font-weight: 600;
  box-shadow: var(--shadow); animation: toastIn 0.25s ease-out; font-size: 14px;
}
.toast.good { border-color: rgba(52, 211, 153, 0.5); }
.toast.bad { border-color: rgba(255, 92, 122, 0.5); }
@keyframes toastIn { from { opacity: 0; transform: translateY(-10px); } }

.modal-back { position: fixed; inset: 0; background: rgba(5, 6, 12, 0.7); backdrop-filter: blur(6px); z-index: 100; display: grid; place-items: center; padding: 16px; animation: fade 0.15s; }
.modal { background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 26px; width: min(480px, 100%); box-shadow: var(--shadow); animation: pop 0.2s ease-out; max-height: 90vh; overflow: auto; }
.modal h2 { font-size: 22px; margin-bottom: 6px; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: scale(0.95) translateY(8px); } }

.empty { text-align: center; padding: 30px 16px; color: var(--muted); }
.empty .big { font-size: 34px; margin-bottom: 6px; }

/* ---------- auth ---------- */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth-hero { padding: 56px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; border-right: 1px solid var(--line); }
.auth-hero h1 { font-size: clamp(40px, 6vw, 76px); line-height: 0.98; letter-spacing: -0.04em; margin-top: 40px; }
.auth-hero h1 em { font-style: normal; color: var(--lime); }
.auth-hero p { color: var(--muted); font-size: 18px; max-width: 440px; }
.floaty { position: absolute; font-family: var(--display); font-weight: 700; color: var(--surface-2); user-select: none; pointer-events: none; animation: drift 9s ease-in-out infinite; }
@keyframes drift { 50% { transform: translateY(-16px) rotate(4deg); } }
.auth-form-side { display: grid; place-items: center; padding: 32px 18px; }
.auth-card { width: min(420px, 100%); }
.seg { display: flex; background: var(--bg-2); border: 1px solid var(--line); border-radius: 14px; padding: 4px; gap: 4px; }
.seg button { flex: 1; border: 0; background: transparent; padding: 10px; border-radius: 10px; font-weight: 700; color: var(--muted); }
.seg button.on { background: var(--surface-2); color: var(--text); }
@media (max-width: 860px) {
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-hero { padding: 28px 20px 10px; border-right: 0; }
  .auth-hero h1 { margin-top: 20px; font-size: 42px; }
  .auth-hero .feat { display: none; }
}

/* ---------- home ---------- */
.hero-stats { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 16px; }
@media (max-width: 760px) { .hero-stats { grid-template-columns: 1fr 1fr; } .hero-stats .lvl-card { grid-column: span 2; } }
.lvl-card { background: linear-gradient(135deg, #1b2140, #161a29); position: relative; overflow: hidden; }
.lvl-card .lvl-num { font-family: var(--display); font-size: 54px; font-weight: 700; line-height: 1; color: var(--lime); }
.xpbar { height: 10px; border-radius: 6px; background: var(--bg-2); overflow: hidden; margin-top: 14px; }
.xpbar > div { height: 100%; background: linear-gradient(90deg, var(--lime), var(--teal)); border-radius: 6px; transition: width 0.8s cubic-bezier(.2,.8,.2,1); }
.stat-card .num { font-family: var(--display); font-size: 36px; font-weight: 700; line-height: 1.1; }
.stat-card .lbl { color: var(--muted); font-size: 13px; font-weight: 600; }

.modes { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.mode-card {
  position: relative; border-radius: var(--radius); padding: 22px; min-height: 190px; display: flex; flex-direction: column;
  justify-content: space-between; text-decoration: none; color: #0a0c14; overflow: hidden; transition: transform 0.15s, box-shadow 0.15s; border: 0; text-align: left;
}
.mode-card:hover { transform: translateY(-4px); box-shadow: 0 16px 30px rgba(0,0,0,0.35); }
.mode-card h3 { font-size: 22px; margin-bottom: 4px; }
.mode-card p { margin: 0; font-size: 14px; font-weight: 500; opacity: 0.75; }
.mode-card .glyph { position: absolute; right: -6px; bottom: -28px; font-family: var(--display); font-weight: 700; font-size: 130px; line-height: 1; opacity: 0.16; }
.mode-card .tag { align-self: flex-start; background: rgba(10, 12, 20, 0.15); padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.mode-card.featured { grid-column: span 2; }
@media (max-width: 560px) { .mode-card.featured { grid-column: auto; } }
.m-kort { background: var(--lime); }
.m-sprint-div { background: var(--blue); color: white; }
.m-sprint-mult { background: var(--coral); color: white; }
.m-sprint-mix { background: var(--amber); }
.m-delbar { background: var(--teal); }

.list { display: flex; flex-direction: column; }
.list-item { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.list-item:last-child { border-bottom: 0; }
.list-item .grow { flex: 1; min-width: 0; }
.list-item .title { font-weight: 700; }
.list-item .sub { color: var(--muted); font-size: 13px; }

/* ---------- game ---------- */
.game-shell { max-width: 760px; margin: 0 auto; }
.game-top { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.game-top .grow { flex: 1; }
.progress { height: 8px; background: var(--surface); border-radius: 6px; overflow: hidden; }
.progress > div { height: 100%; background: var(--lime); transition: width 0.3s; border-radius: 6px; }
.progress.timer > div { transition: width 1s linear; }
.progress.timer.low > div { background: var(--coral); }
.pill { font-family: var(--display); font-weight: 700; background: var(--surface); border: 1px solid var(--line); padding: 8px 14px; border-radius: 12px; min-width: 64px; text-align: center; }
.icon-btn { width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); display: grid; place-items: center; }
.icon-btn svg { width: 20px; height: 20px; }

.stage { background: var(--surface); border: 1px solid var(--line); border-radius: 28px; padding: clamp(20px, 4vw, 40px); text-align: center; position: relative; overflow: hidden; }
.stage.flash-good { animation: flashGood 0.45s; }
.stage.flash-bad { animation: shake 0.4s; }
@keyframes flashGood { 30% { box-shadow: 0 0 0 4px var(--good) inset, 0 0 40px rgba(52, 211, 153, 0.3); } }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }

.question { font-family: var(--display); font-weight: 700; font-size: clamp(48px, 11vw, 88px); letter-spacing: -0.03em; line-height: 1.1; margin: 10px 0 18px; }
.question .op { color: var(--muted); padding: 0 0.12em; }
.answer-box {
  font-family: var(--display); font-size: clamp(36px, 8vw, 56px); font-weight: 700; min-height: 1.4em; min-width: 3ch; display: inline-block;
  border-bottom: 4px solid var(--lime); padding: 0 16px; margin-bottom: 8px;
}
.answer-box.empty-ans { color: var(--surface-2); }
.combo { position: absolute; top: 16px; right: 18px; font-family: var(--display); font-weight: 700; color: var(--amber); font-size: 20px; }
.combo.pop { animation: comboPop 0.3s; }
@keyframes comboPop { 50% { transform: scale(1.4); } }
.hint { color: var(--muted); font-size: 15px; min-height: 1.5em; margin-top: 10px; }
.hint b { color: var(--text); }
.hint.tip { color: var(--amber); }

.numpad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; max-width: 360px; margin: 22px auto 0; }
.numpad button {
  border: 1px solid var(--line); background: var(--surface-2); border-radius: 16px; padding: 16px 0; font-family: var(--display);
  font-size: 26px; font-weight: 700; transition: transform 0.06s, background 0.15s;
}
.numpad button:active { transform: scale(0.94); background: var(--line); }
.numpad .np-ok { background: var(--lime); color: #0a0c14; border: 0; }
.numpad .np-del { color: var(--muted); }

/* short division board */
.ld-board { display: inline-flex; align-items: flex-start; gap: 6px; font-family: var(--display); font-weight: 700; font-size: clamp(40px, 9vw, 72px); line-height: 1; margin: 18px 0 8px; }
.ld-divisor { padding-top: 1.05em; padding-right: 6px; color: var(--blue); }
.ld-right { display: flex; flex-direction: column; }
.ld-row { display: flex; }
.ld-cell { width: 1.05em; text-align: center; position: relative; }
.ld-q { height: 1.05em; }
.ld-q .ld-cell { color: var(--lime); }
.ld-q .ld-cell.zero { color: var(--muted); opacity: 0.4; }
.ld-q .ld-cell.cursor::after { content: ''; position: absolute; left: 15%; right: 15%; bottom: 0.05em; height: 5px; border-radius: 3px; background: var(--lime); animation: blink 1s infinite; }
.ld-q .ld-rest { font-size: 0.55em; color: var(--amber); padding-left: 0.3em; align-self: flex-end; white-space: nowrap; }
.ld-d { border-top: 5px solid var(--text); border-left: 5px solid var(--text); border-top-left-radius: 14px; padding: 0.12em 0.15em 0 0.2em; }
.ld-d .ld-cell { transition: color 0.2s; }
.ld-d .ld-cell.active { color: var(--lime); }
.ld-d .ld-cell.done { color: var(--muted); }
.ld-carry { position: absolute; top: 0.02em; left: -0.18em; font-size: 0.42em; color: var(--coral); }
.ld-carry.ask { color: var(--coral); }
.ld-carry.ask::after { content: '?'; display: block; animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: 0.25; } }

/* yes/no */
.yn { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; max-width: 420px; margin: 26px auto 0; }
.yn button { border: 0; border-radius: 20px; padding: 22px 0; font-family: var(--display); font-size: 26px; font-weight: 700; }
.yn .yes { background: var(--good); color: #052e1f; }
.yn .no { background: var(--coral); color: white; }

/* start + results */
.start-card { text-align: center; padding: clamp(26px, 5vw, 48px); }
.start-card .big-glyph { font-family: var(--display); font-size: 80px; font-weight: 700; line-height: 1; }
.start-card h1 { font-size: clamp(30px, 5vw, 44px); margin: 12px 0 8px; }
.start-card p { color: var(--muted); max-width: 460px; margin: 0 auto 24px; }
.levels { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-bottom: 26px; }
.level-btn { border: 2px solid var(--line); background: var(--bg-2); border-radius: 16px; padding: 12px 18px; text-align: left; min-width: 150px; }
.level-btn b { display: block; font-family: var(--display); font-size: 18px; }
.level-btn span { font-size: 13px; color: var(--muted); }
.level-btn.on { border-color: var(--lime); background: rgba(198, 244, 50, 0.08); }
.kbd { display: inline-block; padding: 1px 7px; border: 1px solid var(--line); border-bottom-width: 3px; border-radius: 6px; font-size: 12px; font-weight: 700; color: var(--muted); }

.result-num { font-family: var(--display); font-size: clamp(72px, 16vw, 120px); font-weight: 700; line-height: 1; color: var(--lime); letter-spacing: -0.04em; }
.result-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 26px 0; }
.result-grid > div { background: var(--bg-2); border-radius: 16px; padding: 14px; }
.result-grid b { display: block; font-family: var(--display); font-size: 24px; }
.result-grid span { font-size: 12px; color: var(--muted); font-weight: 600; }
.xp-gain { display: inline-block; background: rgba(198, 244, 50, 0.14); color: var(--lime); padding: 6px 14px; border-radius: 999px; font-weight: 800; animation: pop 0.4s; }
.mistakes { text-align: left; margin-top: 10px; }
.mistakes li { margin: 4px 0; color: var(--muted); }
.mistakes li b { color: var(--text); }

/* duels */
.duel { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 16px; background: var(--bg-2); border: 1px solid var(--line); }
.duel .vs { font-family: var(--display); font-weight: 700; color: var(--muted); font-size: 13px; }
.duel .grow { flex: 1; min-width: 0; }
.duel .score { font-family: var(--display); font-weight: 700; font-size: 20px; }
.duel.win { border-color: rgba(198, 244, 50, 0.4); }
.duel.loss { border-color: rgba(255, 92, 122, 0.35); }
.mode-pick { display: grid; gap: 10px; margin: 18px 0; }
.mode-pick button { display: flex; align-items: center; gap: 14px; text-align: left; border: 2px solid var(--line); background: var(--bg-2); border-radius: 16px; padding: 12px 14px; }
.mode-pick button:hover { border-color: var(--lime); }
.mode-pick .sw { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-family: var(--display); font-weight: 700; font-size: 20px; color: #0a0c14; flex-shrink: 0; }

/* badges */
.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.badge { background: var(--bg-2); border: 1px solid var(--line); border-radius: 16px; padding: 16px 12px; text-align: center; }
.badge .b-ico { font-size: 30px; filter: grayscale(1); opacity: 0.35; }
.badge b { display: block; font-size: 14px; margin-top: 6px; }
.badge span { font-size: 12px; color: var(--muted); }
.badge.got { border-color: rgba(198, 244, 50, 0.35); }
.badge.got .b-ico { filter: none; opacity: 1; }

/* tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 13px 16px; text-align: left; white-space: nowrap; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); font-weight: 700; border-bottom: 1px solid var(--line); cursor: pointer; user-select: none; }
th:hover { color: var(--text); }
tbody tr { border-bottom: 1px solid var(--line); cursor: pointer; transition: background 0.12s; }
tbody tr:last-child { border-bottom: 0; }
tbody tr:hover { background: var(--surface-2); }
td.num { font-variant-numeric: tabular-nums; }
.acc-bar { display: inline-block; width: 60px; height: 6px; background: var(--bg-2); border-radius: 3px; overflow: hidden; vertical-align: middle; margin-right: 8px; }
.acc-bar > div { height: 100%; }

.bars { display: flex; align-items: flex-end; gap: 6px; height: 120px; padding-top: 10px; }
.bars .bar { flex: 1; background: var(--blue); border-radius: 6px 6px 2px 2px; min-height: 3px; position: relative; }
.bars .bar.zero { background: var(--surface-2); }
.bar-labels { display: flex; gap: 6px; margin-top: 6px; }
.bar-labels span { flex: 1; text-align: center; font-size: 10px; color: var(--muted); }

#confetti { position: fixed; inset: 0; pointer-events: none; z-index: 150; }

.answer-box.answer-sm { font-size: clamp(26px, 6vw, 38px); min-width: 2.5ch; margin: 4px 0 0; }

/* live duel lobby */
.lobby-vs { display: flex; align-items: center; justify-content: center; gap: clamp(12px, 4vw, 36px); margin: 18px 0 22px; }
.lobby-player { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 18px; border-radius: 20px; background: var(--bg-2); border: 2px solid var(--line); min-width: 130px; transition: border-color 0.2s, opacity 0.2s; opacity: 0.55; }
.lobby-player.here { opacity: 1; }
.lobby-player.ready { border-color: var(--lime); box-shadow: 0 0 0 4px rgba(198, 244, 50, 0.12); }
.lobby-status { font-size: 13px; font-weight: 700; color: var(--muted); }
.lobby-player.here .lobby-status { color: var(--text); }
.lobby-player.ready .lobby-status { color: var(--lime); }
.lobby-player:not(.here) .lobby-status { animation: blink 1.4s infinite; }
.vs-mark { font-family: var(--display); font-weight: 700; font-size: 26px; color: var(--muted); }
.countdown-num { font-family: var(--display); font-weight: 700; font-size: clamp(110px, 26vw, 180px); line-height: 1; color: var(--lime); margin: 20px 0; animation: pop 0.35s ease-out; }
.lobby-wait { display: flex; flex-direction: column; align-items: center; }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 4px solid var(--line); border-top-color: var(--lime); animation: spin 0.8s linear infinite; margin-bottom: 10px; }
@keyframes spin { to { transform: rotate(360deg); } }
.toast a { color: var(--lime); font-weight: 800; margin-left: 8px; }
.toast.clickable { pointer-events: auto; }
