:root {
  --bg: #0e1014;
  --surface: #161920;
  --surface-2: #1d2129;
  --surface-3: #252a34;
  --border: #2a2f3a;
  --border-strong: #3a404d;
  --text: #eceef3;
  --text-2: #b4bac7;
  --muted: #7d8494;
  --accent: #f0b443;
  --accent-hover: #f5c262;
  --accent-ink: #1a1405;
  --ok: #3ecf8e;
  --ok-soft: rgba(62, 207, 142, 0.12);
  --bad: #f26d6d;
  --bad-soft: rgba(242, 109, 109, 0.12);
  --info: #8fa8ff;
  --info-soft: rgba(143, 168, 255, 0.12);
  --gold-soft: rgba(240, 180, 67, 0.12);
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset, 0 8px 24px rgba(0, 0, 0, 0.25);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; }

body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.45;
  color: var(--text);
  background: var(--bg);
  background-image: radial-gradient(1200px 500px at 50% -200px, rgba(240, 180, 67, 0.07), transparent 70%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 { margin: 0; letter-spacing: -0.02em; }
b { font-weight: 600; color: var(--text); }
button { font-family: inherit; }
svg { display: block; }

#app { max-width: 540px; margin: 0 auto; padding: 20px 16px 132px; }

.screen { display: none; animation: fadeIn 0.2s ease; }
.screen.active { display: block; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.muted { color: var(--muted); }
.small { font-size: 0.82rem; }
.center { text-align: center; }
.eyebrow { margin: 0; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }

/* ---------- Home ---------- */
.brand { text-align: center; margin: 36px 0 28px; }
.brand-mark {
  display: inline-flex; align-items: center; gap: 2px; padding: 8px 14px; border: 1px solid var(--border-strong); border-radius: 10px;
  font-weight: 800; letter-spacing: 0.18em; font-size: 0.95rem; color: var(--text-2); margin-bottom: 18px;
}
.brand-mark span { color: var(--accent); }
.brand h1 { font-size: 2.1rem; font-weight: 800; margin-bottom: 8px; }
.brand p { margin: 0 auto; max-width: 320px; }

/* ---------- Card ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; margin-bottom: 12px;
  box-shadow: var(--shadow);
}
.card-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 14px; }
.card-title h2 { font-size: 1rem; font-weight: 700; }
.pill { font-size: 0.78rem; font-weight: 600; color: var(--text-2); background: var(--surface-3); padding: 3px 10px; border-radius: 999px; }
.field-label { display: block; font-size: 0.82rem; font-weight: 600; color: var(--text-2); margin-bottom: 8px; }

/* ---------- Input e bottoni ---------- */
.input {
  width: 100%; height: 46px; padding: 0 14px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--bg); color: var(--text); font: 500 1rem var(--font); outline: none; transition: border-color 0.15s, box-shadow 0.15s;
}
.input::placeholder { color: #5b6170; }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(240, 180, 67, 0.15); }
.input:disabled { opacity: 0.6; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; padding: 0 18px; border-radius: var(--radius-sm);
  border: 1px solid transparent; font-size: 0.95rem; font-weight: 600; cursor: pointer; transition: background 0.15s, border-color 0.15s, opacity 0.15s, transform 0.05s;
  user-select: none; color: var(--text);
}
.btn:active { transform: scale(0.985); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:not(:disabled):hover { background: var(--accent-hover); }
.btn-secondary, .btn-ghost { background: var(--surface-2); border-color: var(--border-strong); }
.btn-secondary:not(:disabled):hover, .btn-ghost:not(:disabled):hover { background: var(--surface-3); }
.btn-danger { background: var(--bad); color: #fff; }
.btn-ok { background: var(--ok); color: #06210f; }
.btn-block, .btn-big { width: 100%; height: 50px; font-size: 1rem; }
.card .btn-block { margin-top: 14px; }

.btn-icon {
  width: 42px; height: 42px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface);
  color: var(--text-2); cursor: pointer; display: grid; place-items: center; flex: none;
}
.btn-icon:hover { color: var(--text); border-color: var(--border-strong); }
.btn-icon svg { width: 18px; height: 18px; }

.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); margin: 18px 0 14px; font-size: 0.8rem; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.join-row { display: flex; gap: 8px; }
.code-input { text-transform: uppercase; letter-spacing: 0.35em; text-align: center; font-weight: 700; }

.rules summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.rules summary::-webkit-details-marker { display: none; }
.rules summary::after { content: '+'; color: var(--muted); font-size: 1.2rem; font-weight: 400; }
.rules[open] summary::after { content: '–'; }
.rules ol { margin: 14px 0 0; padding-left: 20px; color: var(--text-2); }
.rules li { margin-bottom: 8px; }
.rules li::marker { color: var(--muted); }

/* ---------- Avatar ---------- */
.avatar {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: color-mix(in srgb, var(--c, #888) 22%, transparent); color: var(--c, #ccc);
  border: 1px solid color-mix(in srgb, var(--c, #888) 45%, transparent);
  font-size: 0.8rem; font-weight: 700; letter-spacing: 0.02em; text-transform: uppercase;
}

/* ---------- Lobby ---------- */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 16px; }
.room-code-box { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.room-code {
  background: transparent; color: var(--text); border: 0; padding: 0; font-size: 2rem; font-weight: 800; letter-spacing: 0.22em;
  cursor: pointer; font-variant-numeric: tabular-nums; margin-right: -0.22em;
}
.room-code:hover { color: var(--accent); }

.player-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.player-row {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--radius-sm); background: var(--surface-2);
  border: 1px solid var(--border); min-height: 52px; min-width: 0;
}
.player-row.empty { background: transparent; border-style: dashed; color: #4a5060; font-size: 0.82rem; justify-content: center; }
.player-row.offline { opacity: 0.45; }
.player-row .meta { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.player-name { font-weight: 600; font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-sub { font-size: 0.72rem; color: var(--muted); display: flex; gap: 6px; align-items: center; }
.player-sub .host { color: var(--accent); font-weight: 600; }
.kick { border: 0; background: transparent; color: var(--muted); cursor: pointer; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 6px; flex: none; }
.kick:hover { color: var(--bad); background: var(--bad-soft); }
.kick svg { width: 14px; height: 14px; }

.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--border); }
.setting-row:first-child { border-top: 0; padding-top: 0; }
.setting-row.stack { flex-direction: column; align-items: stretch; gap: 10px; }
.setting-row label { font-weight: 500; font-size: 0.92rem; }
.setting-row label .muted { display: block; font-weight: 400; font-size: 0.78rem; margin-top: 2px; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg button {
  min-width: 44px; height: 34px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface-2);
  color: var(--text-2); font-size: 0.85rem; font-weight: 600; cursor: pointer; font-variant-numeric: tabular-nums;
}
.seg button:not(:disabled):hover { border-color: var(--border-strong); color: var(--text); }
.seg button.on, .seg button.on:hover { background: var(--text) !important; border-color: var(--text) !important; color: var(--bg) !important; }
.seg button:disabled { cursor: default; }

.switch { position: relative; width: 42px; height: 24px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch span { position: absolute; inset: 0; background: var(--surface-3); border: 1px solid var(--border-strong); border-radius: 24px; transition: 0.2s; cursor: pointer; }
.switch span::before { content: ''; position: absolute; width: 18px; height: 18px; left: 2px; top: 2px; background: var(--text-2); border-radius: 50%; transition: 0.2s; }
.switch input:checked + span { background: var(--accent); border-color: var(--accent); }
.switch input:checked + span::before { transform: translateX(18px); background: var(--accent-ink); }
.switch input:disabled + span { cursor: default; opacity: 0.7; }
.switch input:focus-visible + span { box-shadow: 0 0 0 3px rgba(240, 180, 67, 0.25); }

.cat-info { margin-top: 4px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--surface-2); color: var(--text-2); font-size: 0.85rem; }

.sticky-bottom {
  position: fixed; left: 0; right: 0; bottom: 0; padding: 14px 16px calc(14px + env(safe-area-inset-bottom)); z-index: 5;
  background: linear-gradient(to top, var(--bg) 70%, rgba(14, 16, 20, 0));
}
.sticky-bottom > * { max-width: 508px; margin-left: auto; margin-right: auto; }
.sticky-bottom p { margin-top: 8px; margin-bottom: 0; }

/* ---------- Gioco ---------- */
.game-header { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; margin-bottom: 14px; }
.round-info { font-size: 0.8rem; font-weight: 600; color: var(--muted); letter-spacing: 0.04em; }
.round-info b { color: var(--text); }
.letter-badge {
  width: 64px; height: 64px; border-radius: 16px; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink);
  font-size: 2.3rem; font-weight: 800; line-height: 1;
}
.timer {
  justify-self: end; font-size: 1.25rem; font-weight: 700; font-variant-numeric: tabular-nums; padding: 6px 12px; border-radius: var(--radius-sm);
  background: var(--surface); border: 1px solid var(--border); min-width: 74px; text-align: center;
}
.timer.low { color: var(--bad); border-color: rgba(242, 109, 109, 0.5); }
.timer-bar { height: 3px; border-radius: 3px; background: var(--surface-3); overflow: hidden; margin-bottom: 14px; }
.timer-bar div { height: 100%; background: var(--accent); width: 100%; transition: width 0.25s linear; }

.mini-players { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 14px; scrollbar-width: none; }
.mini-players::-webkit-scrollbar { display: none; }
.mini-player {
  flex: none; display: flex; align-items: center; gap: 8px; padding: 5px 10px 5px 5px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border);
}
.mini-player .avatar { width: 26px; height: 26px; font-size: 0.65rem; }
.mini-player .player-name { font-size: 0.8rem; max-width: 80px; }
.mini-player.offline { opacity: 0.4; }
.badge { font-size: 0.72rem; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.badge.done { color: var(--ok); }

.answers { padding: 6px 18px; }
.answer-row { display: grid; grid-template-columns: 38% 1fr; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--border); }
.answer-row:first-child { border-top: 0; }
.answer-row label { font-weight: 500; font-size: 0.9rem; color: var(--text-2); }
.answer-row .input { height: 42px; }
.answer-row .input.ok { border-color: rgba(62, 207, 142, 0.6); }
.answer-row .input.bad { border-color: rgba(242, 109, 109, 0.6); }

.btn-stop { width: 100%; height: 52px; background: var(--bad); color: #fff; font-size: 1rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }

.waiting { text-align: center; padding: 56px 0; }
.waiting .title { font-size: 1.1rem; font-weight: 700; }
.waiting .sub { color: var(--muted); font-size: 0.85rem; margin-top: 4px; }
.spinner { width: 28px; height: 28px; border: 2px solid var(--surface-3); border-top-color: var(--accent); border-radius: 50%; margin: 0 auto 18px; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.banner { padding: 12px 14px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--border); margin-bottom: 12px; font-size: 0.85rem; color: var(--text-2); }
.banner strong { color: var(--text); display: block; font-weight: 600; margin-bottom: 2px; }

/* Revisione */
.review-cat { padding: 14px 16px; }
.review-cat h3 { font-size: 0.9rem; font-weight: 700; display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.letter-mini { width: 22px; height: 22px; border-radius: 6px; background: var(--surface-3); color: var(--accent); display: grid; place-items: center; font-size: 0.75rem; font-weight: 800; }
.review-item { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--border); }
.review-cat h3 + .review-item { border-top: 0; }
.review-answer { flex: 1; min-width: 0; }
.review-answer .word { font-weight: 600; word-break: break-word; display: flex; align-items: center; gap: 6px; }
.review-answer .word.none { color: var(--muted); font-weight: 400; font-style: italic; }
.review-answer .who { font-size: 0.75rem; color: var(--muted); display: flex; align-items: center; gap: 6px; margin-top: 2px; flex-wrap: wrap; }
.corrected { font-size: 0.75rem; color: var(--ok); margin-top: 1px; }
.check { display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; flex: none; }
.check svg { width: 10px; height: 10px; }
.check.ok { background: var(--ok-soft); color: var(--ok); }
.check.ko { background: var(--bad-soft); color: var(--bad); }

.status-tag { font-size: 0.68rem; font-weight: 600; padding: 1px 7px; border-radius: 999px; white-space: nowrap; }
.st-solo { background: var(--gold-soft); color: var(--accent); }
.st-unique { background: var(--ok-soft); color: var(--ok); }
.st-duplicate { background: var(--info-soft); color: var(--info); }
.st-rejected, .st-wrong-letter, .st-invalid, .st-not-found { background: var(--bad-soft); color: var(--bad); }
.st-empty { background: var(--surface-3); color: var(--muted); }

.points { font-weight: 700; min-width: 34px; text-align: right; font-variant-numeric: tabular-nums; }
.points.zero { color: var(--muted); font-weight: 500; }
.vote-btn {
  height: 30px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--border-strong); background: transparent; color: var(--text-2);
  font-size: 0.75rem; font-weight: 600; cursor: pointer; flex: none; display: inline-flex; align-items: center; gap: 5px;
}
.vote-btn .n { font-variant-numeric: tabular-nums; opacity: 0.8; }
.vote-btn:hover { color: var(--text); border-color: var(--muted); }
.vote-btn.on { background: var(--bad-soft); border-color: var(--bad); color: var(--bad); }
.vote-btn.save.on { background: var(--ok-soft); border-color: var(--ok); color: var(--ok); }
.vote-count { font-size: 0.72rem; font-weight: 600; color: var(--bad); flex: none; font-variant-numeric: tabular-nums; }
.vote-count.save { color: var(--ok); }

/* Revisione una categoria alla volta */
.showcase-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.steps { display: flex; gap: 4px; }
.steps span { width: 18px; height: 4px; border-radius: 4px; background: var(--surface-3); }
.steps span.done { background: var(--text-2); }
.steps span.current { background: var(--accent); }
.review-cat.showcase { padding: 18px; }
.showcase-title { font-size: 1.2rem !important; margin-bottom: 8px !important; }
.showcase-title .letter-mini { width: 28px; height: 28px; font-size: 0.9rem; }
.showcase-hint { margin: 4px 8px 0; }
.slide-in { animation: slideIn 0.35s ease both; }
.pop-in { animation: popIn 0.4s ease both; }
@keyframes slideIn { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
@keyframes popIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .slide-in, .pop-in { animation: none; } }

/* Classifica */
.ranking-list { padding: 6px 16px; }
.ranking-list .card-title { margin: 10px 0 4px; }
.rank-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--border); }
.ranking-list > .rank-row:first-child, .ranking-list .card-title + .rank-row { border-top: 0; }
.rank-num { width: 22px; text-align: center; color: var(--muted); font-weight: 700; font-variant-numeric: tabular-nums; }
.rank-name { flex: 1; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-name .you { color: var(--muted); font-weight: 400; }
.rank-score { font-weight: 700; font-variant-numeric: tabular-nums; }
.rank-delta { font-size: 0.75rem; color: var(--ok); font-weight: 600; margin-left: 6px; }
.rank-row.me .rank-name { color: var(--accent); }

details.card summary { cursor: pointer; font-weight: 600; }
.answers-recap { margin-top: 12px; font-size: 0.85rem; color: var(--text-2); }
.answers-recap div { padding: 8px 0; border-top: 1px solid var(--border); }
.answers-recap b { display: block; font-size: 0.78rem; color: var(--muted); font-weight: 600; margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.06em; }

.final-title { text-align: center; font-size: 1.8rem; font-weight: 800; margin: 6px 0 26px; }
.podium { display: grid; grid-template-columns: repeat(3, 1fr); align-items: end; gap: 8px; margin-bottom: 14px; }
.podium-col { display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 0; animation: rise 0.5s ease both; }
.podium-col .avatar { width: 48px; height: 48px; font-size: 1rem; }
.podium-col.p1 .avatar { width: 60px; height: 60px; font-size: 1.15rem; box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--accent); }
.podium-col .player-name { font-size: 0.85rem; max-width: 100%; }
.podium-block {
  width: 100%; border-radius: 10px 10px 4px 4px; background: var(--surface); border: 1px solid var(--border); display: flex; flex-direction: column;
  align-items: center; padding-top: 10px; font-size: 1.3rem; font-weight: 800;
}
.podium-block small { font-size: 0.78rem; color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums; }
.p1 .podium-block { height: 120px; border-color: rgba(240, 180, 67, 0.5); background: linear-gradient(var(--gold-soft), var(--surface)); color: var(--accent); }
.p2 .podium-block { height: 92px; }
.p3 .podium-block { height: 72px; }
.p1 { animation-delay: 0.3s; }
.p2 { animation-delay: 0.15s; }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

.actions-row { display: flex; gap: 8px; }
.actions-row .btn { flex: 1; height: 50px; }

/* Overlay estrazione */
.overlay { position: fixed; inset: 0; background: rgba(8, 9, 12, 0.9); display: grid; place-items: center; z-index: 20; backdrop-filter: blur(6px); padding: 16px; }
.overlay.hidden { display: none; }
.reveal-box { text-align: center; }
.reveal-letter {
  width: 148px; height: 148px; border-radius: 28px; margin: 16px auto 24px; display: grid; place-items: center; line-height: 1;
  background: var(--surface-2); border: 1px solid var(--border-strong); color: var(--text-2); font-size: 5.5rem; font-weight: 800;
}
.reveal-letter.final { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); animation: settle 0.35s ease; }
@keyframes settle { from { transform: scale(0.85); opacity: 0.6; } to { transform: none; opacity: 1; } }
.reveal-cats { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; max-width: 360px; margin: 0 auto; }
.reveal-cats span { padding: 5px 11px; border-radius: 999px; border: 1px solid var(--border-strong); color: var(--text-2); font-size: 0.82rem; font-weight: 500; }

/* Fine round */
.flash { position: fixed; inset: 0; z-index: 25; display: grid; place-items: center; pointer-events: none; padding: 16px; animation: flashBg 1.7s ease forwards; }
.flash.hidden { display: none; }
.flash-card {
  min-width: 220px; padding: 22px 28px 20px; border-radius: 18px; text-align: center; background: var(--surface-2);
  border: 1px solid var(--border-strong); box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5); animation: flashCard 1.7s cubic-bezier(.2, .9, .3, 1.2) forwards;
}
.flash-icon { width: 46px; height: 46px; margin: 0 auto 10px; border-radius: 50%; display: grid; place-items: center; }
.flash-icon svg { width: 24px; height: 24px; }
.flash-title { font-size: 1.45rem; font-weight: 800; letter-spacing: -0.02em; }
.flash-sub { margin-top: 2px; color: var(--muted); font-size: 0.88rem; }
.flash.is-stop .flash-icon { background: var(--bad-soft); color: var(--bad); }
.flash.is-time .flash-icon { background: var(--gold-soft); color: var(--accent); animation: tick 0.5s ease 0.15s 2; }
.flash.is-stop .flash-title { color: var(--bad); }
@keyframes flashBg { 0% { background: rgba(8, 9, 12, 0); } 12%, 75% { background: rgba(8, 9, 12, 0.6); } 100% { background: rgba(8, 9, 12, 0); } }
@keyframes flashCard {
  0% { opacity: 0; transform: scale(0.8); }
  14% { opacity: 1; transform: scale(1.04); }
  22%, 78% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(0.96) translateY(-6px); }
}
@keyframes tick { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-14deg); } 75% { transform: rotate(14deg); } }
.letter-badge.shake { animation: shake 0.45s ease; }
@keyframes shake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-6px) rotate(-3deg); } 40% { transform: translateX(5px) rotate(2deg); } 60% { transform: translateX(-3px); } 80% { transform: translateX(2px); } }
.timer-bar.ended div { background: var(--bad); width: 100% !important; animation: barFlash 0.3s ease 3; }
@keyframes barFlash { 50% { opacity: 0.25; } }
@media (prefers-reduced-motion: reduce) {
  .flash, .flash-card, .flash-icon, .letter-badge.shake, .timer-bar.ended div { animation-duration: 0.01s !important; }
  .flash-card { animation: none; }
}

.toast {
  position: fixed; left: 50%; bottom: 112px; transform: translateX(-50%); background: var(--surface-3); color: var(--text); border: 1px solid var(--border-strong);
  padding: 11px 16px; border-radius: var(--radius-sm); font-size: 0.88rem; font-weight: 500; z-index: 30; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  max-width: calc(100% - 32px); text-align: center;
}
.toast.hidden { display: none; }
.conn { position: fixed; top: 0; left: 0; right: 0; background: #3b2f12; color: var(--accent); text-align: center; padding: 8px; font-size: 0.85rem; font-weight: 600; z-index: 40; }
.conn.hidden { display: none; }

@media (max-width: 380px) {
  .player-list { grid-template-columns: 1fr; }
  .answer-row { grid-template-columns: 1fr; gap: 6px; }
  .brand h1 { font-size: 1.8rem; }
}
