/* ---------- Buttons ---------- */
.btn {
  min-height: var(--tap); padding: 12px 22px; border-radius: var(--radius); border: 2px solid transparent;
  font-family: var(--font-display); font-size: 1.45rem; letter-spacing: .08em; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  transition: transform .12s var(--ease-out), background .2s, border-color .2s, opacity .2s, box-shadow .2s;
  user-select: none; -webkit-user-select: none; touch-action: manipulation;
}
.btn:active:not(:disabled) { transform: scale(.97); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary { background: linear-gradient(180deg, #f0c968, var(--gold)); color: var(--ink); box-shadow: 0 6px 0 var(--gold-deep), var(--shadow); }
.btn-primary:active:not(:disabled) { box-shadow: 0 2px 0 var(--gold-deep), var(--shadow); transform: translateY(4px); }
.btn-secondary { background: var(--bg-elev); border-color: var(--line); color: var(--text); }
.btn-secondary:hover:not(:disabled) { border-color: var(--gold); }
.btn-ghost { background: transparent; color: var(--text-muted); font-family: var(--font-body); font-size: .95rem; letter-spacing: 0; font-weight: 600; }
.btn-ghost:hover { color: var(--text); }
.btn-danger { background: transparent; border-color: var(--red-stamp); color: #ff8a82; }
.btn-teal { background: var(--teal); color: var(--ink); box-shadow: 0 6px 0 #2a7f79, var(--shadow); }
.btn-block { width: 100%; }
.btn-lg { min-height: 64px; font-size: 1.8rem; }
.icon-btn {
  width: var(--tap); height: var(--tap); border-radius: 50%; border: 1px solid var(--line); background: var(--bg-elev);
  display: inline-grid; place-items: center; font-size: 1.25rem;
}

/* ---------- Top bar ---------- */
.topbar { display: flex; align-items: center; gap: 12px; padding: 12px 16px; position: sticky; top: 0; z-index: 20;
  background: linear-gradient(180deg, var(--bg) 60%, transparent); }
.topbar .brand { font-family: var(--font-display); font-size: 1.5rem; letter-spacing: .12em; color: var(--gold); }
.topbar .code-pill { font-family: var(--font-display); font-size: 1.25rem; letter-spacing: .3em; padding: 6px 12px 4px; border-radius: 999px; background: var(--bg-elev); border: 1px solid var(--line); }

/* ---------- Logo ---------- */
.logo { text-align: center; padding: 32px 0 8px; }
.logo .mark { font-size: 3.2rem; line-height: 1; filter: drop-shadow(0 6px 12px rgba(0,0,0,.5)); }
.logo h1 { font-size: clamp(3.6rem, 18vw, 6rem); letter-spacing: .1em; color: var(--gold);
  text-shadow: 0 3px 0 var(--gold-deep), 0 10px 30px rgba(224,180,76,.25); margin-top: 6px; }
.logo .tagline { font-family: var(--font-type); color: var(--text-muted); margin-top: 10px; }

/* ---------- Panels & fields ---------- */
.panel { background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 20px; box-shadow: var(--shadow); }
.panel h2 { font-size: 1.8rem; margin-bottom: 4px; }
.label { font-size: .8rem; text-transform: uppercase; letter-spacing: .14em; color: var(--text-muted); font-weight: 600; }
.input {
  width: 100%; min-height: 56px; padding: 12px 16px; border-radius: var(--radius); border: 2px solid var(--line);
  background: var(--bg); font-size: 1.15rem; transition: border-color .2s;
}
.input:focus { outline: none; border-color: var(--gold); }
.input.on-paper { background: #fffaf0; color: var(--ink); border-color: var(--paper-dark); font-family: var(--font-type); }
.input.on-paper:focus { border-color: var(--gold-deep); }
.field { display: flex; flex-direction: column; gap: 8px; }
.hint { font-size: .9rem; color: var(--text-muted); }
.notice { padding: 12px 14px; border-radius: var(--radius); background: rgba(224,180,76,.12); border: 1px solid rgba(224,180,76,.35); color: var(--paper); font-size: .95rem; }
.notice.danger { background: rgba(214,69,61,.12); border-color: rgba(214,69,61,.45); }

/* ---------- Code boxes ---------- */
.code-boxes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.code-boxes input {
  width: 100%; aspect-ratio: 1 / 1.15; max-height: 92px; text-align: center; border-radius: var(--radius);
  border: 2px solid var(--line); background: var(--bg); font-family: var(--font-display); font-size: 2.6rem;
  text-transform: uppercase; caret-color: var(--gold); padding: 0;
}
.code-boxes input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 4px rgba(224,180,76,.15); }
.big-code { font-family: var(--font-display); font-size: clamp(3.5rem, 20vw, 5.5rem); letter-spacing: .35em; text-indent: .35em; color: var(--gold); text-align: center; line-height: 1; }

/* ---------- Avatars ---------- */
.avatar-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.avatar-opt {
  aspect-ratio: 1; min-height: var(--tap); border-radius: var(--radius); border: 2px solid var(--line); background: var(--bg);
  font-size: 1.7rem; display: grid; place-items: center; transition: transform .15s var(--ease-spring), border-color .2s;
}
.avatar-opt[aria-pressed="true"] { border-color: var(--gold); background: rgba(224,180,76,.12); transform: scale(1.06); }
.avatar-opt:disabled { opacity: .25; }
@media (max-width: 360px) { .avatar-grid { grid-template-columns: repeat(4, 1fr); } }

/* ---------- Players ---------- */
.seats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.seat {
  border-radius: var(--radius-lg); padding: 16px 12px; text-align: center; background: var(--bg-elev);
  border: 2px dashed var(--line); min-height: 132px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
}
.seat.filled { border-style: solid; }
.seat.p0.filled { border-color: var(--p0); box-shadow: inset 0 0 30px rgba(243,156,74,.12); }
.seat.p1.filled { border-color: var(--p1); box-shadow: inset 0 0 30px rgba(138,108,240,.14); }
.seat .ava { font-size: 2.6rem; line-height: 1; }
.seat .name { font-weight: 800; font-size: 1.05rem; word-break: break-word; }
.seat .tag { font-size: .75rem; text-transform: uppercase; letter-spacing: .12em; color: var(--text-muted); }
.seat.offline { opacity: .55; }
.seat .empty { color: var(--text-muted); font-family: var(--font-type); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--teal); margin-right: 6px; vertical-align: middle; }
.dot.off { background: var(--red-stamp); }

.chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 8px; border-radius: 999px; background: var(--bg-elev); border: 2px solid var(--line); font-weight: 700; max-width: 100%; }
.chip .ava { font-size: 1.25rem; }
.chip .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip.p0 { border-color: var(--p0); }
.chip.p1 { border-color: var(--p1); }
.c-p0 { color: var(--p0); }
.c-p1 { color: var(--p1); }

/* ---------- Settings ---------- */
.setting { display: flex; flex-direction: column; gap: 8px; }
.segmented { display: flex; gap: 6px; flex-wrap: wrap; }
.segmented button {
  flex: 1 1 0; min-width: 64px; min-height: var(--tap); border-radius: 12px; border: 2px solid var(--line); background: var(--bg);
  font-weight: 700; padding: 6px 10px; font-size: .95rem;
}
.segmented button[aria-pressed="true"] { border-color: var(--gold); background: rgba(224,180,76,.14); color: var(--paper); }
.segmented button:disabled { cursor: default; }
.packs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pack {
  text-align: left; padding: 12px; border-radius: 12px; border: 2px solid var(--line); background: var(--bg); min-height: var(--tap);
  display: flex; flex-direction: column; gap: 2px;
}
.pack[aria-pressed="true"] { border-color: var(--teal); background: rgba(63,184,175,.1); }
.pack .t { font-weight: 800; }
.pack .d { font-size: .8rem; color: var(--text-muted); }
.pack:disabled { opacity: .4; }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: var(--tap); }
.switch button { width: 64px; height: 36px; border-radius: 999px; border: 2px solid var(--line); background: var(--bg); position: relative; flex: none; }
.switch button::after { content: ''; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: var(--text-muted); transition: transform .2s var(--ease-out), background .2s; }
.switch button[aria-checked="true"] { border-color: var(--teal); }
.switch button[aria-checked="true"]::after { transform: translateX(28px); background: var(--teal); }

/* ---------- QR ---------- */
.qr { background: #fff; padding: 12px; border-radius: var(--radius); width: 176px; margin: 0 auto; }
.qr svg { display: block; width: 100%; height: auto; }
.share-row { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }

/* ---------- Timer ---------- */
.timer { position: relative; height: 10px; border-radius: 999px; background: var(--bg-elev-2); overflow: hidden; }
.timer > i { position: absolute; inset: 0; transform-origin: left center; background: linear-gradient(90deg, var(--teal), var(--gold)); border-radius: 999px; }
.timer.low > i { background: var(--red-stamp); animation: pulse .5s infinite alternate; }
.timer-num { font-family: var(--font-display); font-size: 1.6rem; min-width: 2.2ch; text-align: right; font-variant-numeric: tabular-nums; }
.timer-num.low { color: var(--red-stamp); }
@keyframes pulse { to { opacity: .55; } }

/* ---------- Case file card ---------- */
.file-card {
  position: relative; background: var(--paper); color: var(--ink); border-radius: 6px 6px 16px 16px;
  padding: 34px 20px 22px; box-shadow: var(--shadow-lift);
  background-image:
    repeating-linear-gradient(0deg, transparent 0 29px, rgba(26,26,26,.06) 29px 30px),
    linear-gradient(180deg, #f6edd9, var(--paper));
}
.file-card::before { /* folder tab */
  content: ''; position: absolute; top: -12px; left: 18px; width: 110px; height: 16px; border-radius: 8px 8px 0 0; background: var(--paper-dark);
}
.file-card .clip {
  position: absolute; top: -18px; right: 46px; width: 18px; height: 52px; border: 3px solid #9aa0a8; border-radius: 10px;
  border-bottom-color: transparent; transform: rotate(8deg);
}
.file-card .secret {
  position: absolute; top: 10px; right: 12px; font-family: var(--font-type); color: var(--red-stamp); border: 2px solid currentColor;
  padding: 2px 8px; font-size: .72rem; letter-spacing: .12em; transform: rotate(6deg); opacity: .85; border-radius: 3px;
}
.file-card .meta { font-family: var(--font-type); font-size: .8rem; color: var(--ink-soft); letter-spacing: .08em; text-transform: uppercase; }
.file-card .q { font-family: var(--font-body); font-weight: 800; font-size: clamp(1.25rem, 5.5vw, 1.6rem); line-height: 1.25; margin-top: 8px; }
.file-card .fact { font-family: var(--font-type); font-size: .9rem; margin-top: 10px; color: var(--ink-soft); }

/* ---------- Stamps ---------- */
.stamp {
  display: inline-block; font-family: var(--font-display); font-size: 2rem; letter-spacing: .12em; padding: 4px 14px 0;
  border: 4px solid currentColor; border-radius: 8px; transform: rotate(-8deg); line-height: 1.1;
  mix-blend-mode: multiply; text-shadow: 0 0 1px currentColor;
  -webkit-mask-image: radial-gradient(circle at 30% 40%, #000 60%, rgba(0,0,0,.75) 100%);
          mask-image: radial-gradient(circle at 30% 40%, #000 60%, rgba(0,0,0,.75) 100%);
}
.on-dark .stamp, .stamp.on-dark { mix-blend-mode: normal; }
.stamp.match { color: var(--teal); }
.stamp.miss { color: var(--grey-stamp); }
.stamp.seen { color: var(--gold); }
.stamp.traitor { color: var(--red-stamp); }
.stamp.slam { animation: slam .45s var(--ease-spring) both; }
@keyframes slam { 0% { transform: scale(2.6) rotate(-14deg); opacity: 0; } 60% { opacity: 1; } 100% { transform: scale(1) rotate(-8deg); opacity: 1; } }

/* ---------- Answer form ---------- */
.answer-form { display: flex; flex-direction: column; gap: 14px; }
.opt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.opt {
  min-height: 64px; padding: 10px 12px; border-radius: var(--radius); border: 2px solid var(--line); background: var(--bg-elev);
  font-weight: 800; font-size: 1.05rem; transition: transform .15s var(--ease-spring), border-color .2s, background .2s; word-break: break-word;
}
.opt[aria-pressed="true"] { border-color: var(--gold); background: rgba(224,180,76,.16); transform: scale(1.03); }
.opt.guess[aria-pressed="true"] { border-color: var(--teal); background: rgba(63,184,175,.16); }
.num-row { display: flex; gap: 10px; align-items: center; }
.num-row .unit { color: var(--text-muted); font-weight: 600; min-width: 4ch; }

/* ---------- Betrayal card ---------- */
.betray {
  position: relative; display: flex; align-items: center; gap: 14px; padding: 12px 16px; min-height: 64px; width: 100%;
  border-radius: var(--radius); border: 2px dashed rgba(214,69,61,.6); background: rgba(214,69,61,.06); text-align: left;
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; touch-action: none;
}
.betray .ring { width: 44px; height: 44px; flex: none; position: relative; display: grid; place-items: center; font-size: 1.4rem; }
.betray .ring svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.betray .ring circle { fill: none; stroke: var(--red-stamp); stroke-width: 4; stroke-dasharray: 126; stroke-dashoffset: 126; }
.betray.charging .ring circle { transition: stroke-dashoffset 1s linear; stroke-dashoffset: 0; }
.betray .t { font-weight: 800; }
.betray .d { font-size: .85rem; color: var(--text-muted); }
.betray.armed { border-style: solid; border-color: var(--red-stamp); background: rgba(214,69,61,.2); box-shadow: 0 0 24px rgba(214,69,61,.3); }
.betray.armed .ring circle { stroke-dashoffset: 0; }
.betray.used { opacity: .4; border-color: var(--line); }

/* ---------- Flip cards ---------- */
.duel { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; perspective: 1000px; }
.flip { position: relative; display: grid; min-height: 168px; transform-style: preserve-3d; transition: transform .8s var(--ease-out); }
.flip.flipped { transform: rotateY(180deg); }
.flip .face { grid-area: 1 / 1; min-height: 168px; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: var(--radius); padding: 12px; display: flex; flex-direction: column; gap: 6px; }
.flip .back { background: repeating-linear-gradient(45deg, #2a2f45 0 10px, #232739 10px 20px); border: 2px solid var(--line); align-items: center; justify-content: center; font-size: 2.2rem; }
.flip .front { transform: rotateY(180deg); background: var(--paper); color: var(--ink); align-items: center; justify-content: center; text-align: center; overflow: hidden; }
.flip.p0 .front { box-shadow: inset 0 6px 0 var(--p0); }
.flip.p1 .front { box-shadow: inset 0 6px 0 var(--p1); }
.flip .who { font-size: .75rem; text-transform: uppercase; letter-spacing: .12em; color: var(--ink-soft); font-weight: 700; }
.flip .ans { font-family: var(--font-type); font-size: 1.3rem; line-height: 1.15; word-break: break-word; }
.flip .ans.empty { color: var(--grey-stamp); font-size: 1rem; }
.flip .guess-line { font-size: .8rem; color: var(--ink-soft); }
.flip .guess-line b { color: var(--ink); }
.flip img.drawing { width: 100%; max-width: 128px; aspect-ratio: 1; border-radius: 8px; background: #fff; border: 1px solid var(--paper-dark); }
.result-stamps { display: flex; flex-wrap: wrap; gap: 14px 18px; justify-content: center; align-items: center; min-height: 64px; padding: 6px 0; }

/* ---------- Vault ---------- */
.vault { position: relative; width: 180px; aspect-ratio: 1; margin: 0 auto; }
.vault svg { width: 100%; height: 100%; display: block; overflow: visible; }
.vault .body { fill: #2b2f44; stroke: #545a78; stroke-width: 3; }
.vault .track { fill: none; stroke: #1a1d2b; stroke-width: 10; }
.vault .fill { fill: none; stroke: var(--gold); stroke-width: 10; stroke-linecap: round; transition: stroke-dashoffset 1.2s var(--ease-out); filter: drop-shadow(0 0 6px rgba(224,180,76,.6)); }
.vault .target-tick { stroke: var(--red-stamp); stroke-width: 4; stroke-linecap: round; }
.vault .dial { transition: transform 1.2s var(--ease-out); transform-origin: 100px 100px; }
.vault .dial circle { fill: #3a3f5c; stroke: #6a7196; stroke-width: 2; }
.vault .dial line { stroke: #8d94b8; stroke-width: 3; stroke-linecap: round; }
.vault .val { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; pointer-events: none; }
.vault .val b { font-family: var(--font-display); font-size: 2.8rem; line-height: 1; color: var(--text); text-shadow: 0 2px 6px rgba(0,0,0,.6); }
.vault .val small { display: block; font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--text-muted); margin-top: 2px; }
.vault.approx .val b { animation: glitch 2.2s infinite steps(1); }
@keyframes glitch {
  0%, 86%, 100% { transform: none; text-shadow: 0 2px 6px rgba(0,0,0,.6); opacity: 1; }
  88% { transform: translate(-2px, 1px) skewX(-8deg); text-shadow: 2px 0 var(--red-stamp), -2px 0 var(--teal); }
  91% { transform: translate(2px, -1px); opacity: .6; text-shadow: -2px 0 var(--red-stamp), 2px 0 var(--teal); }
  94% { transform: none; opacity: 1; }
}
.vault.bump { animation: bump .5s var(--ease-spring); }
@keyframes bump { 40% { transform: scale(1.06); } }
.vault-sm { width: 108px; }
.vault-sm .val b { font-size: 1.7rem; }
.vault-sm .val small { display: none; }

/* ---------- Game layout ---------- */
.hud { display: flex; align-items: center; gap: 10px; }
.hud .score { display: flex; flex-direction: column; align-items: center; min-width: 64px; }
.hud .score b { font-family: var(--font-display); font-size: 1.9rem; line-height: 1; }
.hud .score span { font-size: 1.3rem; }
.round-meta { display: flex; justify-content: space-between; align-items: center; font-family: var(--font-display); letter-spacing: .1em; font-size: 1.2rem; color: var(--text-muted); }
.pips { display: flex; gap: 4px; flex-wrap: wrap; }
.pips i { width: 10px; height: 10px; border-radius: 3px; background: var(--bg-elev-2); }
.pips i.done { background: var(--gold-deep); }
.pips i.now { background: var(--gold); box-shadow: 0 0 8px var(--gold); }
.pips i.blitz { outline: 1px solid var(--red-stamp); }

.intro { flex: 1; display: grid; place-items: center; text-align: center; padding: 24px; }
.intro .n { font-family: var(--font-display); font-size: clamp(4rem, 22vw, 8rem); line-height: .9; color: var(--gold); animation: zoomIn .6s var(--ease-spring) both; }
.intro .of { font-family: var(--font-display); font-size: 1.6rem; color: var(--text-muted); letter-spacing: .2em; }
.intro .type { margin-top: 18px; font-size: 1.15rem; font-weight: 700; display: inline-flex; gap: 10px; align-items: center; padding: 10px 18px; border-radius: 999px; background: var(--bg-elev); border: 1px solid var(--line); animation: screenIn .5s .2s both; }
.intro .type.blitz { border-color: var(--red-stamp); color: #ff9d96; animation: shake .5s .3s both; }
@keyframes zoomIn { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes shake { 0%, 100% { transform: none; } 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

.countdown { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; background: rgba(10,11,18,.78); backdrop-filter: blur(3px); }
.countdown b { font-family: var(--font-display); font-size: 12rem; color: var(--gold); text-shadow: 0 10px 40px rgba(224,180,76,.4); animation: tick 1s var(--ease-out) both; }
@keyframes tick { from { transform: scale(1.8); opacity: 0; } 30% { opacity: 1; } to { transform: scale(.9); opacity: .9; } }

.waiting { text-align: center; padding: 18px; border-radius: var(--radius-lg); background: var(--bg-elev); border: 1px solid var(--line); }
.waiting .spin { display: inline-block; animation: spin 1.4s linear infinite; font-size: 1.6rem; }
@keyframes spin { to { transform: rotate(360deg); } }
.status-row { display: flex; justify-content: space-between; gap: 8px; }
.status-row .st { flex: 1; text-align: center; padding: 8px; border-radius: 12px; background: var(--bg-elev); border: 1px solid var(--line); font-size: .9rem; font-weight: 700; }
.status-row .st.ok { border-color: var(--teal); color: var(--teal); }

.points-fly { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.points-fly .pt { font-family: var(--font-display); font-size: 1.7rem; padding: 4px 14px 0; border-radius: 12px; background: var(--bg-elev); border: 1px solid var(--line); animation: fly .7s var(--ease-spring) both; }
.points-fly .pt.vault { color: var(--gold); border-color: var(--gold-deep); }
.points-fly .pt.p0 { color: var(--p0); }
.points-fly .pt.p1 { color: var(--p1); }
.points-fly .pt.sus { font-family: var(--font-type); font-size: 1.05rem; padding: 8px 14px; color: var(--paper); }
@keyframes fly { from { transform: translateY(16px) scale(.8); opacity: 0; } to { transform: none; opacity: 1; } }

.objection { border: 2px solid var(--gold); border-radius: var(--radius-lg); padding: 16px; background: rgba(224,180,76,.08); text-align: center; display: flex; flex-direction: column; gap: 12px; }
.objection h3 { font-size: 2rem; }
.confess { text-align: center; padding: 18px; border-radius: var(--radius-lg); background: rgba(214,69,61,.1); border: 2px solid var(--red-stamp); }
.confess h3 { font-size: 2.6rem; color: #ff8a82; }

/* ---------- Draw ---------- */
.draw-wrap { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.draw-canvas { width: min(300px, 100%); aspect-ratio: 1; background: #fff; border-radius: 12px; touch-action: none; box-shadow: var(--shadow); cursor: crosshair; }
.draw-tools { display: flex; gap: 8px; }
.draw-tools button { min-width: var(--tap); min-height: var(--tap); border-radius: 12px; border: 2px solid var(--line); background: var(--bg-elev); font-size: 1.1rem; }
.draw-tools button[aria-pressed="true"] { border-color: var(--gold); }

/* ---------- Overlays & toasts ---------- */
.overlay { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; background: rgba(10,11,18,.86); backdrop-filter: blur(4px); }
.overlay .panel { max-width: 420px; width: 100%; text-align: center; display: flex; flex-direction: column; gap: 14px; }
.toasts { position: fixed; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 60; display: flex; flex-direction: column; gap: 8px; width: min(440px, calc(100% - 32px)); pointer-events: none; }
.toast { padding: 12px 16px; border-radius: var(--radius); background: var(--bg-elev-2); border: 1px solid var(--line); box-shadow: var(--shadow); animation: fly .3s var(--ease-out); font-weight: 600; }
.toast.error { border-color: var(--red-stamp); }

/* ---------- Finale ---------- */
.finale { display: flex; flex-direction: column; gap: 18px; align-items: stretch; }
.finale h2 { font-size: clamp(2.4rem, 11vw, 3.6rem); text-align: center; }
.betrayal-list { display: flex; flex-direction: column; gap: 10px; }
.betrayal-item { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: var(--radius); background: var(--paper); color: var(--ink); font-family: var(--font-type); animation: fly .5s var(--ease-spring) both; box-shadow: var(--shadow); }
.betrayal-item .ic { font-size: 1.6rem; }
.verdict { text-align: center; padding: 22px 16px; border-radius: var(--radius-lg); }
.verdict.cracked { background: radial-gradient(circle at 50% 0%, rgba(224,180,76,.35), rgba(224,180,76,.06)); border: 2px solid var(--gold); }
.verdict.busted { background: repeating-linear-gradient(-45deg, rgba(214,69,61,.16) 0 18px, rgba(63,90,214,.14) 18px 36px); border: 2px solid var(--red-stamp); animation: siren 1s 3; }
@keyframes siren { 50% { border-color: #3f5ad6; } }
.verdict .big { font-family: var(--font-display); font-size: clamp(2.6rem, 13vw, 4.4rem); line-height: 1; }
.verdict .sub { margin-top: 8px; font-weight: 600; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat { padding: 14px; border-radius: var(--radius); background: var(--bg-elev); border: 1px solid var(--line); }
.stat b { display: block; font-family: var(--font-display); font-size: 2.2rem; line-height: 1; }
.stat span { font-size: .8rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .1em; }
.stat.wide { grid-column: 1 / -1; }
.stat .q { font-size: .95rem; margin-top: 4px; }
.final-scores { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.final-score { text-align: center; padding: 14px; border-radius: var(--radius-lg); background: var(--bg-elev); border: 2px solid var(--line); }
.final-score.p0 { border-color: var(--p0); }
.final-score.p1 { border-color: var(--p1); }
.final-score.win { box-shadow: 0 0 30px rgba(224,180,76,.35); }
.final-score b { display: block; font-family: var(--font-display); font-size: 2.6rem; line-height: 1; }
.crown { font-size: 1.6rem; }
