:root {
  --bg: #0b0f1e;
  --bg2: #121833;
  --ink: #eef1ff;
  --muted: #9aa3c7;
  --line: rgba(255,255,255,.09);
  --glass: rgba(22, 28, 56, .62);
  --glass-2: rgba(255,255,255,.05);
  --accent: #8b5cf6;
  --accent-2: #ec4899;
  --accent-3: #f59e0b;
  --ok: #22c55e;
  --danger: #ef4444;
  --grad: linear-gradient(135deg, #8b5cf6 0%, #ec4899 55%, #f59e0b 100%);
  --radius: 18px;
  --font: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --cw-me: 90px;
  --cw-opp: 46px;
  --cw-pile: 76px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  overflow: hidden;
  overscroll-behavior: none;
  -webkit-font-smoothing: antialiased;
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
}
input { -webkit-user-select: text; user-select: text; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; touch-action: manipulation; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.center { text-align: center; }

/* ---------- animated background ---------- */
.bg { position: fixed; inset: 0; overflow: hidden; z-index: 0; pointer-events: none;
  background: radial-gradient(120% 80% at 50% 120%, #1a1f4a 0%, transparent 60%), var(--bg); }
.blob { position: absolute; width: 60vmax; height: 60vmax; border-radius: 50%; filter: blur(60px); opacity: .32; will-change: transform; }
.b1 { background: #6d28d9; left: -20vmax; top: -25vmax; animation: drift 26s ease-in-out infinite alternate; }
.b2 { background: #0891b2; right: -25vmax; top: 10vh; animation: drift 32s ease-in-out infinite alternate-reverse; opacity: .22; }
.b3 { background: #db2777; left: 10vw; bottom: -35vmax; animation: drift 38s ease-in-out infinite alternate; opacity: .18; }
@keyframes drift { to { transform: translate(8vmax, 6vmax) scale(1.15); } }
@media (prefers-reduced-motion: reduce) { .blob { animation: none; } }

.screen { position: relative; z-index: 1; height: 100dvh; width: 100%; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 18px; border-radius: 14px;
  background: var(--glass-2); border: 1px solid var(--line);
  font-weight: 700; letter-spacing: .01em;
  transition: transform .12s ease, background .2s, box-shadow .2s, opacity .2s;
}
.btn:hover { background: rgba(255,255,255,.09); }
.btn:active { transform: scale(.96); }
.btn:disabled { opacity: .4; pointer-events: none; }
.btn.primary {
  background: var(--grad); border: 0; color: #fff;
  box-shadow: 0 8px 24px -8px rgba(236,72,153,.6), inset 0 1px 0 rgba(255,255,255,.25);
}
.btn.primary:hover { filter: brightness(1.08); }
.btn.big { min-height: 56px; font-size: 1.08rem; width: 100%; border-radius: 16px; }
.btn.danger { color: #fecaca; border-color: rgba(239,68,68,.35); background: rgba(239,68,68,.12); }
.btn.cabo {
  background: linear-gradient(135deg, #f59e0b, #ef4444); color: #fff; border: 0;
  box-shadow: 0 8px 24px -8px rgba(239,68,68,.7), inset 0 1px 0 rgba(255,255,255,.3);
  font-weight: 900; letter-spacing: .12em;
}
.btn.ghost { background: transparent; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  background: var(--glass-2); border: 1px solid var(--line); font-weight: 800; font-size: 1.05rem;
}
.icon-btn:active { transform: scale(.94); }
.link-btn { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; padding: 10px; }

.panel {
  background: var(--glass); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 20px 50px -20px rgba(0,0,0,.6);
}
.panel-title { font-weight: 800; margin-bottom: 12px; display: flex; gap: 8px; align-items: baseline; }

/* ---------- home ---------- */
#home { display: grid; place-items: center; overflow-y: auto; padding: calc(20px + var(--safe-t)) 16px calc(20px + var(--safe-b)); }
.home-wrap { width: 100%; max-width: 420px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.fan { position: relative; height: 130px; width: 260px; margin-top: 10px; }
.fan .card { position: absolute; left: 50%; bottom: 0; --cw: 74px; margin-left: -37px; transform-origin: 50% 120%; animation: fanIn .9s cubic-bezier(.2,.9,.3,1.2) both; }
@keyframes fanIn { from { opacity: 0; transform: translateY(40px) rotate(0deg) scale(.6); } }
.fan .card:hover { filter: brightness(1.1); }
.logo {
  margin: 4px 0 0; font-size: clamp(3.4rem, 15vw, 5rem); font-weight: 900; letter-spacing: .12em;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 6px 24px rgba(236,72,153,.35)); line-height: 1;
}
.tagline { margin: 0 0 6px; color: var(--muted); text-align: center; }
.home-panel { width: 100%; display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field span { font-size: .85rem; color: var(--muted); font-weight: 700; }
input {
  width: 100%; height: 50px; border-radius: 14px; padding: 0 16px; font: inherit; font-size: 1.05rem; font-weight: 700;
  color: var(--ink); background: rgba(0,0,0,.25); border: 1px solid var(--line); outline: none;
  transition: border-color .2s, box-shadow .2s;
}
input:focus { border-color: rgba(139,92,246,.7); box-shadow: 0 0 0 4px rgba(139,92,246,.18); }
input::placeholder { color: rgba(154,163,199,.55); }
.divider { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .82rem; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.code-row { display: flex; gap: 10px; }
#codeInput { text-transform: uppercase; letter-spacing: .3em; text-align: center; font-size: 1.2rem; }
.error { color: #fca5a5; min-height: 1.2em; font-size: .9rem; text-align: center; }
.join-box { display: flex; flex-direction: column; gap: 10px; padding: 12px; border-radius: 14px; background: rgba(139,92,246,.12); border: 1px solid rgba(139,92,246,.3); }
.join-hint { text-align: center; }
.join-hint b { letter-spacing: .15em; }

/* ---------- lobby ---------- */
#lobby { overflow-y: auto; padding: calc(12px + var(--safe-t)) 16px calc(20px + var(--safe-b)); }
.lobby-wrap { max-width: 460px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.lobby-head { display: flex; align-items: center; justify-content: space-between; }
.lobby-head h2 { margin: 0; font-size: 1.15rem; }
.lobby-tools, .voice-slot { display: flex; gap: 6px; align-items: center; }
.code-panel { text-align: center; }
.code-label { color: var(--muted); font-size: .8rem; font-weight: 800; text-transform: uppercase; letter-spacing: .14em; }
.code-tiles { display: flex; justify-content: center; gap: 8px; margin: 12px 0 16px; }
.code-tiles span {
  width: 50px; height: 62px; display: grid; place-items: center; font-size: 2rem; font-weight: 900;
  border-radius: 12px; background: linear-gradient(160deg, rgba(139,92,246,.35), rgba(236,72,153,.2));
  border: 1px solid rgba(255,255,255,.14); box-shadow: inset 0 1px 0 rgba(255,255,255,.15);
  animation: tileIn .5s cubic-bezier(.2,.9,.3,1.3) both;
}
@keyframes tileIn { from { opacity: 0; transform: translateY(14px) scale(.8); } }
.share-row { display: flex; gap: 10px; }
.share-row .btn { flex: 1; }
.seats { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.seat { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: rgba(255,255,255,.04); border: 1px solid var(--line); animation: seatIn .35s ease both; }
.seat.empty { border-style: dashed; color: var(--muted); background: transparent; }
@keyframes seatIn { from { opacity: 0; transform: translateX(-10px); } }
.avatar {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; flex: none;
  font-weight: 900; color: #fff; background: var(--pc, #8b5cf6);
  box-shadow: 0 0 0 2px rgba(255,255,255,.12), 0 6px 16px -6px var(--pc, #8b5cf6);
}
.seat .avatar.ghost { background: transparent; border: 2px dashed var(--line); box-shadow: none; }
.seat .name { flex: 1; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.badge { font-size: .7rem; font-weight: 900; padding: 4px 8px; border-radius: 999px; background: rgba(255,255,255,.08); color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.badge.host { background: rgba(245,158,11,.18); color: #fcd34d; }
.badge.you { background: rgba(139,92,246,.22); color: #c4b5fd; }
.badge.off { background: rgba(239,68,68,.18); color: #fca5a5; }

.toggle { display: flex; align-items: center; gap: 14px; cursor: pointer; }
.toggle input { display: none; }
.toggle .track { width: 50px; height: 30px; border-radius: 999px; background: rgba(255,255,255,.12); position: relative; flex: none; transition: background .2s; }
.toggle .thumb { position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform .25s cubic-bezier(.3,1.4,.5,1); box-shadow: 0 2px 6px rgba(0,0,0,.4); }
.toggle input:checked + .track { background: var(--accent); }
.toggle input:checked + .track .thumb { transform: translateX(20px); }
.toggle-text { display: flex; flex-direction: column; }
.toggle-text small { color: var(--muted); }
.toggle.readonly { pointer-events: none; opacity: .75; }
.options { display: flex; flex-direction: column; gap: 14px; }
.options .panel-title { margin-bottom: 0; }
.options.readonly .toggle, .options.readonly .seg { pointer-events: none; opacity: .75; }
.opt-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.seg { display: inline-flex; padding: 3px; border-radius: 12px; background: rgba(0,0,0,.25); border: 1px solid var(--line); flex: none; }
.seg button { width: 42px; height: 36px; border-radius: 9px; font-weight: 900; color: var(--muted); transition: background .2s, color .2s; }
.seg button.on { background: var(--grad); color: #fff; box-shadow: 0 4px 12px -4px rgba(236,72,153,.6); }

/* ---------- game ---------- */
#game {
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  padding: var(--safe-t) 0 var(--safe-b);
  max-width: 1200px; margin: 0 auto;
}
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px 4px; }
.chip { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: 999px; background: var(--glass-2); border: 1px solid var(--line); font-weight: 900; letter-spacing: .16em; }
.chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 10px var(--ok); }
.round-info { color: var(--muted); font-weight: 800; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-actions { display: flex; gap: 6px; }

.opponents { display: flex; justify-content: center; align-items: flex-start; gap: 10px; padding: 6px 10px 0; flex-wrap: nowrap; }
.seat-opp {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 8px 8px 10px; border-radius: 16px; background: rgba(255,255,255,.035); border: 1px solid var(--line);
  transition: background .3s, border-color .3s, box-shadow .3s, opacity .3s; min-width: 0;
}
.seat-opp.turn { border-color: rgba(139,92,246,.75); background: rgba(139,92,246,.12); box-shadow: 0 0 0 1px rgba(139,92,246,.4), 0 0 30px -6px rgba(139,92,246,.7); }
.seat-opp.offline { opacity: .55; }
.seat-opp.target { border-color: rgba(236,72,153,.7); box-shadow: 0 0 24px -6px rgba(236,72,153,.8); }
.opp-head { display: flex; align-items: center; gap: 6px; max-width: 100%; }
.opp-head .avatar { width: 24px; height: 24px; font-size: .75rem; }
.opp-name { font-weight: 800; font-size: .85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 12ch; }
.opp-score { font-size: .75rem; color: var(--muted); font-weight: 800; }
.tag-cabo { position: absolute; top: -9px; right: -6px; font-size: .62rem; font-weight: 900; letter-spacing: .1em; padding: 3px 7px; border-radius: 999px; background: linear-gradient(135deg, #f59e0b, #ef4444); color: #fff; box-shadow: 0 4px 12px -2px rgba(239,68,68,.6); animation: pop .4s cubic-bezier(.2,.9,.3,1.5) both; }
.tag-turn { position: absolute; top: -9px; left: 50%; transform: translateX(-50%); font-size: .6rem; font-weight: 900; padding: 3px 7px; border-radius: 999px; background: var(--accent); color: #fff; white-space: nowrap; }
@keyframes pop { from { transform: scale(0); } }

.hand { display: grid; grid-auto-flow: column; grid-template-rows: auto auto; justify-content: center; }
.opp-hand { gap: 5px; --cw: var(--cw-opp); }
.me-hand { gap: 10px; --cw: var(--cw-me); }
.slot { width: var(--cw); height: calc(var(--cw) * 1.4); position: relative; }
.slot > .card { position: absolute; inset: 0; }
.slot.empty::before { content: ""; position: absolute; inset: 0; border-radius: calc(var(--cw) * .1); border: 1.5px dashed rgba(255,255,255,.08); }

/* table */
.table { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 0; padding: 4px 0; }
.table-glow { position: absolute; inset: 6% 8%; border-radius: 50%; background: radial-gradient(closest-side, rgba(139,92,246,.18), rgba(14,165,233,.06) 60%, transparent); pointer-events: none; }
.piles { position: relative; display: flex; align-items: flex-start; justify-content: center; gap: clamp(14px, 4vw, 34px); --cw: var(--cw-pile); }
.pile { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.pile-label { font-size: .72rem; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; white-space: nowrap; }
.deck, .discard, .drawn-slot { position: relative; width: var(--cw); height: calc(var(--cw) * 1.4); }
.deck-stack { position: absolute; inset: 0; }
.deck-stack .card { position: absolute; inset: 0; }
.deck-top { position: absolute; inset: 0; }
.deck.empty .deck-stack, .deck.empty .deck-top { opacity: .15; }
.deck.selectable { cursor: pointer; }
.deck.selectable .deck-top .card::after, .discard.selectable .card:last-child::after {
  content: ""; position: absolute; inset: -4px; border-radius: calc(var(--cw) * .14);
  box-shadow: 0 0 0 2px rgba(255,255,255,.9), 0 0 24px 4px rgba(139,92,246,.8);
  animation: pulse 1.4s ease-in-out infinite; pointer-events: none;
}
@keyframes pulse { 50% { opacity: .35; } }
.discard .card { position: absolute; inset: 0; }
.discard::before, .drawn-slot::before { content: ""; position: absolute; inset: 0; border-radius: calc(var(--cw) * .1); border: 1.5px dashed rgba(255,255,255,.1); }
.drawn-pile .pile-label { color: var(--ink); max-width: 11ch; overflow: hidden; text-overflow: ellipsis; }
.drawn-slot .card { position: absolute; inset: 0; }
.drawn-slot .card.mine { filter: drop-shadow(0 10px 22px rgba(139,92,246,.55)); }

.caller-banner {
  position: relative; z-index: 2; margin-bottom: 10px; padding: 6px 14px; border-radius: 999px; font-weight: 900; font-size: .82rem;
  background: linear-gradient(135deg, rgba(245,158,11,.25), rgba(239,68,68,.25)); border: 1px solid rgba(245,158,11,.5); color: #fde68a;
  animation: pop .4s cubic-bezier(.2,.9,.3,1.5) both;
}

/* me area */
.me { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 6px 12px 12px; }
.status {
  min-height: 40px; display: flex; align-items: center; justify-content: center; text-align: center;
  font-weight: 800; font-size: clamp(.88rem, 2.6vw, 1rem); padding: 8px 16px; border-radius: 14px; max-width: 560px;
  background: rgba(255,255,255,.04); border: 1px solid var(--line); transition: background .3s, border-color .3s;
}
.status.active { background: linear-gradient(135deg, rgba(139,92,246,.28), rgba(236,72,153,.2)); border-color: rgba(236,72,153,.45); box-shadow: 0 10px 30px -14px rgba(236,72,153,.8); }
.status .who { color: var(--pc); }
.me-hand { padding: 4px; border-radius: 18px; transition: box-shadow .3s; }
.me.turn .me-hand { box-shadow: 0 0 0 1px rgba(139,92,246,.35), 0 0 40px -10px rgba(139,92,246,.6); }
.me-info { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: .88rem; color: var(--muted); }
.me-info .avatar { width: 22px; height: 22px; font-size: .7rem; }
.actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; min-height: 50px; }
.actions .btn { min-width: 130px; }
.actions .btn.enter { animation: btnIn .3s cubic-bezier(.2,.9,.3,1.3) both; }
@keyframes btnIn { from { opacity: 0; transform: translateY(8px) scale(.9); } }

/* card states used by app (complement cards.css) */
.card { cursor: default; }
.card.clickable { cursor: pointer; }
.card.moving { z-index: 50; }
.card.lift { z-index: 40; }

/* ---------- modals ---------- */
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: end center; background: rgba(5,7,16,.6); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: fade .2s ease both; }
@media (min-width: 640px) { .modal { place-items: center; } }
@keyframes fade { from { opacity: 0; } }
.sheet {
  position: relative; width: min(560px, 100%); max-height: 88dvh; overflow-y: auto; padding: 22px 20px calc(22px + var(--safe-b));
  background: linear-gradient(180deg, #1a2045, #121733); border: 1px solid var(--line); border-radius: 24px 24px 0 0;
  box-shadow: 0 -20px 60px -10px rgba(0,0,0,.7); animation: sheetIn .35s cubic-bezier(.2,.9,.3,1.1) both;
}
@media (min-width: 640px) { .sheet { border-radius: 24px; } }
.sheet.small { width: min(380px, 100%); }
@keyframes sheetIn { from { transform: translateY(40px); opacity: 0; } }
.sheet h2 { margin: 0 0 14px; font-size: 1.3rem; }
.close { position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; border-radius: 50%; font-size: 1.5rem; line-height: 1; background: rgba(255,255,255,.07); }
.rules p, .rules li { color: #d3d8f2; line-height: 1.5; }
.rules ul { padding-left: 18px; }
.rule-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 8px 0; }
.rule-card { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 14px; background: rgba(255,255,255,.04); border: 1px solid var(--line); font-size: .82rem; }
.rule-card .card { --cw: 34px; flex: none; }
@media (max-width: 520px) { .rule-cards { grid-template-columns: 1fr; } }
.menu-list { display: flex; flex-direction: column; gap: 10px; }

.score-table-wrap { overflow-x: auto; }
table.scores { width: 100%; border-collapse: collapse; font-weight: 700; }
table.scores th, table.scores td { padding: 8px 6px; text-align: center; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.scores th:first-child, table.scores td:first-child { text-align: left; color: var(--muted); }
table.scores tfoot td { font-weight: 900; font-size: 1.05rem; border-bottom: 0; }
table.scores .zero { color: #86efac; }
table.scores .lead { color: #fcd34d; }

.result-sheet { text-align: center; }
.result-title { font-size: 1.5rem; font-weight: 900; margin: 4px 0 16px; }
.result-title .big { display: block; font-size: 2.2rem; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.result-rows { display: flex; flex-direction: column; gap: 10px; text-align: left; }
.rrow { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 12px; border-radius: 16px; background: rgba(255,255,255,.04); border: 1px solid var(--line); animation: seatIn .4s ease both; }
.rrow.best { border-color: rgba(34,197,94,.5); background: rgba(34,197,94,.08); }
.rrow .rname { font-weight: 900; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.rrow .rcards { display: flex; gap: 4px; margin-top: 6px; flex-wrap: wrap; }
.rrow .rcards .card { --cw: 26px; }
.rrow .rsum { font-size: .78rem; color: var(--muted); font-weight: 800; margin-top: 4px; }
.rrow .rpts { text-align: right; }
.rrow .rpts .p { font-size: 1.4rem; font-weight: 900; }
.rrow .rpts .t { font-size: .78rem; color: var(--muted); font-weight: 800; }
.rbadge { font-size: .62rem; font-weight: 900; padding: 3px 7px; border-radius: 999px; letter-spacing: .05em; text-transform: uppercase; }
.rbadge.cabo { background: rgba(245,158,11,.2); color: #fcd34d; }
.rbadge.pen { background: rgba(239,68,68,.2); color: #fca5a5; }
.rbadge.kami { background: rgba(236,72,153,.25); color: #f9a8d4; }
.rbadge.reset { background: rgba(14,165,233,.2); color: #7dd3fc; }
.rbadge.win { background: rgba(34,197,94,.2); color: #86efac; }
.result-actions { margin-top: 18px; display: flex; flex-direction: column; gap: 10px; }
.fab { position: fixed; z-index: 90; right: 14px; bottom: calc(14px + var(--safe-b)); padding: 12px 18px; border-radius: 999px; background: var(--grad); font-weight: 900; color: #fff; box-shadow: 0 10px 30px -8px rgba(236,72,153,.7); animation: pop .4s both; }

/* shout */
.shout { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; pointer-events: none; }
.shout span {
  font-size: clamp(4rem, 22vw, 10rem); font-weight: 900; letter-spacing: .1em;
  background: linear-gradient(135deg, #fde68a, #f59e0b 40%, #ef4444); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 10px 40px rgba(239,68,68,.6)); animation: shout 1.8s cubic-bezier(.2,.9,.3,1.2) both;
}
.shout small { display: block; text-align: center; font-size: 1.2rem; font-weight: 900; color: #fff; letter-spacing: .05em; margin-top: -10px; animation: fade .4s .2s both; }
@keyframes shout { 0% { transform: scale(.2) rotate(-12deg); opacity: 0; } 25% { transform: scale(1.08) rotate(3deg); opacity: 1; } 40% { transform: scale(1) rotate(0); } 80% { opacity: 1; } 100% { opacity: 0; transform: scale(1.15); } }

/* toasts */
.toasts { position: fixed; z-index: 110; left: 50%; top: calc(8px + var(--safe-t)); transform: translateX(-50%); display: flex; flex-direction: column; gap: 6px; align-items: center; pointer-events: none; width: min(92vw, 420px); }
.toast { padding: 8px 14px; border-radius: 12px; background: rgba(16,20,42,.92); border: 1px solid var(--line); font-weight: 700; font-size: .86rem; box-shadow: 0 10px 30px -10px rgba(0,0,0,.8); animation: toastIn .3s cubic-bezier(.2,.9,.3,1.2) both; text-align: center; }
.toast.out { animation: toastOut .3s ease both; }
.toast.err { border-color: rgba(239,68,68,.5); color: #fecaca; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-10px) scale(.95); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-8px); } }

.conn { position: fixed; z-index: 130; bottom: calc(12px + var(--safe-b)); left: 50%; transform: translateX(-50%); padding: 8px 16px; border-radius: 999px; background: rgba(239,68,68,.9); font-weight: 800; font-size: .85rem; }
.confetti { position: fixed; inset: 0; z-index: 105; pointer-events: none; width: 100%; height: 100%; }

@media (min-width: 900px) {
  .opponents { gap: 16px; padding-top: 12px; }
  .opp-name { font-size: .95rem; }
  .me { padding-bottom: 18px; }
}
