:root {
  --ink-900: #070a10;
  --ink-850: #0b0f17;
  --ink-800: #10151f;
  --ink-700: #161d2a;
  --ink-600: #1d2535;
  --ink-500: #273043;
  --line: #28324699;
  --line-solid: #2a3447;
  --text: #eef2f8;
  --muted: #8896ac;
  --faint: #586374;

  --gold-300: #ffe08a;
  --gold-400: #ffce5f;
  --gold-500: #f0ab2e;
  --gold-600: #d98e1c;

  --b: #3b82f6;
  --i: #fb5267;
  --n: #21c98a;
  --g: #ffb020;
  --o: #9b6cff;

  --daub: #2563eb;
  --win: #ffd24a;
  --ok: #34d399;
  --err: #fb5267;

  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --shell: 460px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; }
body {
  background:
    radial-gradient(1200px 600px at 50% -10%, #14203a55, transparent 60%),
    radial-gradient(900px 500px at 50% 110%, #2a1c0e55, transparent 60%),
    var(--ink-900);
  color: var(--text);
  font-family: "Inter", -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

/* Phone-width shell, centered on desktop too */
.app {
  max-width: var(--shell);
  margin: 0 auto;
  min-height: 100vh;
  background: linear-gradient(180deg, var(--ink-850), var(--ink-900));
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  padding: 14px 14px 28px;
}
@media (min-width: 480px) {
  .app { box-shadow: 0 0 80px #0008, 0 0 0 1px #ffffff08 inset; margin-top: 0; }
}

.view { animation: viewIn .35s ease both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.muted { color: var(--muted); font-size: 12.5px; }
.gold { color: var(--gold-400); }
.mono { font-variant-numeric: tabular-nums; }
[hidden] { display: none !important; }

/* ---------- Topbar ---------- */
.topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.brand { display: flex; align-items: center; gap: 9px; font-family: "Sora", sans-serif; font-weight: 700; font-size: 17px; letter-spacing: .2px; }
.brand-dot { width: 10px; height: 10px; border-radius: 50%; background: linear-gradient(135deg, var(--gold-300), var(--gold-600)); box-shadow: 0 0 12px #f0ab2eaa; }
.status-pill { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); background: var(--ink-700); border: 1px solid var(--line); border-radius: 999px; padding: 5px 11px; }
.status-pill .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 8px var(--ok); animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }

/* ---------- Hero countdown ring (signature) ---------- */
.hero { display: flex; justify-content: center; padding: 14px 0 6px; }
.ring { position: relative; width: 200px; height: 200px; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-track { fill: none; stroke: #ffffff10; stroke-width: 10; }
.ring-prog {
  fill: none; stroke: url(#gold); stroke-width: 11; stroke-linecap: round;
  stroke-dasharray: 527.79; stroke-dashoffset: 0;
  transition: stroke-dashoffset .25s linear;
  filter: drop-shadow(0 0 6px #f0ab2e55);
}
.ring.idle .ring-prog { stroke: #ffffff14; filter: none; }
.ring.urgent .ring-prog { stroke: url(#ember); filter: drop-shadow(0 0 9px #e0452f88); }
.ring-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; }
.ring-num {
  font-family: "Sora", sans-serif; font-weight: 800; font-size: 46px; line-height: 1;
  font-variant-numeric: tabular-nums; letter-spacing: -1px;
  background: linear-gradient(180deg, #fff, #ffd98c); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.ring.idle .ring-num { font-size: 30px; color: var(--muted); background: none; -webkit-text-fill-color: var(--faint); }
.ring.tick .ring-num { animation: tickPop .5s cubic-bezier(.2,1.4,.4,1); }
@keyframes tickPop { 0% { transform: scale(1.18); } 100% { transform: scale(1); } }
.ring.urgent .ring-num { background: linear-gradient(180deg, #fff, #ffb38a); -webkit-background-clip: text; background-clip: text; }
.ring-label { font-size: 11.5px; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); }
.ring.active { animation: ringGlow 2.4s ease-in-out infinite; }
.ring.urgent.active { animation: ringGlow 1s ease-in-out infinite; }
@keyframes ringGlow { 50% { filter: drop-shadow(0 0 18px #f0ab2e2e); } }

/* ---------- Stat chips ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 14px 0; }
.stat { background: linear-gradient(180deg, var(--ink-700), var(--ink-800)); border: 1px solid var(--line); border-radius: var(--r-md); padding: 10px 6px; text-align: center; }
.stat-val { font-family: "Sora", sans-serif; font-weight: 700; font-size: 18px; font-variant-numeric: tabular-nums; }
.stat-key { font-size: 10px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin-top: 3px; }

/* ---------- Picker ---------- */
.picker { background: var(--ink-800); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px; margin-bottom: 14px; }
.picker-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 12px; }
.picker-title { font-family: "Sora", sans-serif; font-weight: 600; font-size: 15px; }
.num-grid { display: grid; grid-template-columns: repeat(10, 1fr); gap: 5px; }
.num-grid.flip { animation: pageFlip .3s ease both; }
@keyframes pageFlip { from { opacity: 0; transform: translateX(10px); } to { opacity: 1; transform: none; } }
.num {
  aspect-ratio: 1 / 1; display: flex; align-items: center; justify-content: center;
  border-radius: var(--r-sm); background: var(--ink-600); border: 1px solid #ffffff0d;
  font-family: "Sora", sans-serif; font-weight: 600; font-size: clamp(10px, 2.7vw, 13px); font-variant-numeric: tabular-nums;
  color: var(--text); cursor: pointer; user-select: none;
  transition: transform .08s ease, background .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.num:active { transform: scale(.9); }
.num.mine {
  background: linear-gradient(180deg, var(--gold-400), var(--gold-600)); color: #2a1c05; border-color: var(--gold-300);
  box-shadow: 0 4px 14px #f0ab2e44; animation: popIn .28s cubic-bezier(.2,1.5,.4,1);
}
@keyframes popIn { 0% { transform: scale(.7); } 100% { transform: scale(1); } }
.num.taken {
  background: linear-gradient(180deg, #34202b, #271820); color: #9a6477;
  border: 1px solid #5a2f40; cursor: not-allowed; position: relative;
}
.num.taken::after { content: ""; position: absolute; top: 4px; right: 4px; width: 6px; height: 6px; border-radius: 50%; background: var(--i); box-shadow: 0 0 6px var(--i); }
.num.taken span { opacity: .55; }

/* ---------- Pager (numbered) ---------- */
.pager { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.page-btn { min-width: 42px; padding: 9px 0; border-radius: 10px; border: 1px solid var(--line-solid); background: var(--ink-600); color: var(--text); font-family: "Sora", sans-serif; font-weight: 700; font-size: 14px; cursor: pointer; transition: transform .08s, background .12s; }
.page-btn:active { transform: scale(.94); }
.page-btn.active { background: linear-gradient(180deg, var(--gold-300), var(--gold-600)); color: #2a1c05; border-color: var(--gold-300); box-shadow: 0 4px 14px #f0ab2e44; }

/* ---------- Selected preview ---------- */
.selected { background: var(--ink-800); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px; }
.selected-head { display: flex; justify-content: space-between; align-items: baseline; font-family: "Sora", sans-serif; font-weight: 600; font-size: 15px; margin-bottom: 12px; }
.selected-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.selected-list .empty { grid-column: 1 / -1; }
.selected-list .bgrid { gap: 3px; }
.selected-list .bh { font-size: 11px; padding: 4px 0; }
.selected-list .bc { font-size: 12px; padding: 6px 0; }
.selected-list .bcard { padding: 8px; }
.empty { text-align: center; color: var(--faint); font-size: 13px; padding: 18px 8px; border: 1px dashed var(--line-solid); border-radius: var(--r-md); }

/* ---------- Bingo card (shared lobby + game) ---------- */
.bcard { background: linear-gradient(180deg, var(--ink-700), var(--ink-800)); border: 1px solid var(--line); border-radius: var(--r-md); padding: 10px; animation: cardIn .3s ease both; }
@keyframes cardIn { from { opacity: 0; transform: translateY(6px) scale(.98); } to { opacity: 1; transform: none; } }
.bcard-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.bcard-no { font-family: "Sora", sans-serif; font-size: 12px; color: var(--gold-400); font-weight: 600; }
.bcard-x { font-size: 12px; color: var(--muted); cursor: pointer; padding: 2px 6px; border-radius: 6px; }
.bcard-x:active { background: var(--ink-600); }
.bgrid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.bgrid .bh { text-align: center; font-family: "Sora", sans-serif; font-weight: 700; font-size: 13px; padding: 5px 0; border-radius: 6px; color: #0b0f17; }
.bh.B { background: var(--b); } .bh.I { background: var(--i); } .bh.N { background: var(--n); } .bh.G { background: var(--g); } .bh.O { background: var(--o); }
.bgrid .bc { text-align: center; font-size: 14px; font-weight: 500; padding: 9px 0; border-radius: 7px; background: var(--ink-600); font-variant-numeric: tabular-nums; transition: background .2s, transform .2s; }
.bc.daub { background: var(--daub); color: #fff; font-weight: 700; animation: daubPop .3s cubic-bezier(.2,1.5,.4,1); }
@keyframes daubPop { 0% { transform: scale(.6); } 100% { transform: scale(1); } }
.bc.free { background: #ffd84a; color: #4a3600; font-weight: 800; }
.bc.match { background: #1faa5a; color: #fff; font-weight: 800; box-shadow: 0 0 12px #1faa5a66; }

/* ---------- Game nav (colored) ---------- */
.game-nav { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1px; background: var(--line-solid); border: 1px solid #ffffff14; border-radius: var(--r-md); overflow: hidden; margin-bottom: 12px; box-shadow: 0 6px 20px #0006; }
.nav-item { background: linear-gradient(180deg, var(--ink-700), var(--ink-800)); padding: 11px 4px 9px; text-align: center; position: relative; }
.nav-item::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; }
.nav-item:nth-child(1)::before { background: var(--b); }
.nav-item:nth-child(2)::before { background: var(--n); }
.nav-item:nth-child(3)::before { background: var(--o); }
.nav-item:nth-child(4)::before { background: linear-gradient(90deg, var(--gold-400), var(--gold-600)); }
.nav-item:nth-child(5)::before { background: var(--i); }
.nav-item.highlight { background: linear-gradient(180deg, #2a2210, #1a1608); }
.nav-item:nth-child(1) .nav-val { color: #6fb0ff; }
.nav-item:nth-child(2) .nav-val { color: #4fd6a4; }
.nav-item:nth-child(3) .nav-val { color: #b78cff; }
.nav-item:nth-child(5) .nav-val { color: #ff8a97; }
.nav-label { display: block; font-size: 9px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.nav-val { display: block; font-family: "Sora", sans-serif; font-size: 15px; font-weight: 700; margin-top: 3px; }
.nav-val.gold { color: var(--gold-400); }
.nav-val.mono { letter-spacing: .5px; }

/* ---------- Two-column game board (mobile + desktop) ---------- */
.board { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: stretch; }
.col { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.panel.tight { padding: 11px; }
.panel.grow { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.col-left .grow .master { flex: 1; min-height: 0; }
.col .master-col { height: 100%; }
.col .master-cell { flex: 1; display: flex; align-items: center; justify-content: center; }
.col .my-cards { flex: 1 1 auto; min-height: 120px; max-height: 62vh; overflow-y: auto; }

/* ---------- Current draw (big lottery ball) ---------- */
.draw-panel { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.cd-ball {
  width: 92px; height: 92px; border-radius: 50%; position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  border: 3px solid #ffffff22; color: #fff;
  box-shadow: 0 10px 26px #000a, inset 0 4px 12px #ffffff38, inset 0 -8px 14px #00000066;
  font-family: "Sora", sans-serif;
}
.cd-ball::before { content: ""; position: absolute; top: 11%; left: 20%; width: 34%; height: 24%; border-radius: 50%; background: radial-gradient(circle, #ffffff77, transparent 70%); }
.cd-letter { font-size: 13px; font-weight: 700; opacity: .92; line-height: 1; letter-spacing: .04em; }
.cd-number { font-size: 36px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.cd-ball.B { background: radial-gradient(circle at 36% 30%, #5a9bff, #1746c7); }
.cd-ball.I { background: radial-gradient(circle at 36% 30%, #ff7a8a, #c41733); }
.cd-ball.N { background: radial-gradient(circle at 36% 30%, #45e0a8, #0a8a5f); }
.cd-ball.G { background: radial-gradient(circle at 36% 30%, #ffc861, #d97e08); }
.cd-ball.O { background: radial-gradient(circle at 36% 30%, #b78cff, #6d2fe0); }
.cd-ball.empty { background: var(--ink-600); border-color: var(--line-solid); box-shadow: inset 0 2px 8px #0006; }
.cd-ball.empty .cd-number, .cd-ball.empty .cd-letter { color: var(--faint); }
.cd-ball.pop { animation: cdPop .5s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes cdPop { 0% { transform: scale(.4) rotate(-12deg); opacity: 0; } 60% { transform: scale(1.12); } 100% { transform: scale(1); } }
.recent-cap { font-size: 9.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); align-self: flex-start; }

/* ---------- Recent balls (last 5) ---------- */
.recent-balls { display: flex; gap: 6px; justify-content: space-between; }
.rb {
  flex: 1 1 0; min-width: 0; aspect-ratio: 1 / 1; border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0;
  border: 1.5px solid #ffffff20; color: #fff;
  font-family: "Sora", sans-serif; font-variant-numeric: tabular-nums;
}
.rb .rb-l { font-size: 8.5px; font-weight: 600; opacity: .82; line-height: 1; }
.rb .rb-n { font-size: 14px; font-weight: 800; line-height: 1.05; }
.rb.B { background: radial-gradient(circle at 35% 30%, #5a9bff, #1d4ed8); border-color: #7eb0ff; }
.rb.I { background: radial-gradient(circle at 35% 30%, #ff7a8a, #d61f3a); border-color: #ff97a3; }
.rb.N { background: radial-gradient(circle at 35% 30%, #45e0a8, #0c9e6e); border-color: #6cf0c2; }
.rb.G { background: radial-gradient(circle at 35% 30%, #ffc861, #e08a0c); border-color: #ffd98a; }
.rb.O { background: radial-gradient(circle at 35% 30%, #b78cff, #7b3ff0); border-color: #cbb0ff; }
.rb.latest { border-color: var(--gold-300); box-shadow: 0 0 14px #f0ab2e66, inset 0 2px 6px #0004; transform: scale(1.06); z-index: 1; }
.rb.latest .rb-n { font-size: 16px; }
.rb.pop { animation: ballFlip .5s cubic-bezier(.2,1.3,.4,1); }
@keyframes ballFlip { 0% { transform: rotateY(80deg) scale(.5); opacity: 0; } 100% { transform: scale(1.06); opacity: 1; } }
.rb.empty { background: var(--ink-600); border: 1px dashed var(--line-solid); }

/* ---------- Panels ---------- */
.panel { background: var(--ink-800); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px; margin-bottom: 14px; }
.panel-head { display: flex; justify-content: space-between; align-items: baseline; font-family: "Sora", sans-serif; font-weight: 600; font-size: 14px; margin-bottom: 12px; }

/* ---------- Master grid ---------- */
.master { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; }
.master-col { display: flex; flex-direction: column; gap: 4px; }
.master-head { text-align: center; font-family: "Sora", sans-serif; font-weight: 700; padding: 5px 0; border-radius: 6px; color: #0b0f17; }
.master-head.B { background: var(--b); } .master-head.I { background: var(--i); } .master-head.N { background: var(--n); } .master-head.G { background: var(--g); } .master-head.O { background: var(--o); }
.master-cell { text-align: center; font-size: 12px; padding: 5px 0; border-radius: 5px; background: var(--ink-600); color: #4a576e; font-variant-numeric: tabular-nums; transition: background .2s; }
.master-cell.called { background: linear-gradient(180deg, var(--gold-400), var(--gold-600)); color: #2a1c05; font-weight: 700; }
.master-cell.current { background: #fff; color: #1a1205; font-weight: 800; box-shadow: 0 0 14px #ffffffcc; z-index: 1; animation: callBlink .85s ease-in-out infinite; }
@keyframes callBlink { 0%, 100% { background: #fff; box-shadow: 0 0 14px #ffffffcc; } 50% { background: var(--i); color: #fff; box-shadow: 0 0 18px var(--i); } }

/* ---------- My cards (game) ---------- */
.my-cards { max-height: 44vh; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; padding-right: 2px; }
.my-cards::-webkit-scrollbar { width: 5px; } .my-cards::-webkit-scrollbar-thumb { background: var(--ink-500); border-radius: 3px; }

/* ---------- Bingo button ---------- */
.bingo-btn {
  width: 100%; padding: 16px; border: none; border-radius: var(--r-md);
  background: linear-gradient(180deg, var(--gold-300), var(--gold-600));
  color: #2a1c05; font-family: "Sora", sans-serif; font-size: 19px; font-weight: 800; letter-spacing: .14em;
  cursor: pointer; box-shadow: 0 8px 24px #f0ab2e3a; transition: transform .08s, box-shadow .15s;
}
.bingo-btn:active { transform: scale(.98); }
.bingo-btn:disabled { background: var(--ink-600); color: var(--faint); box-shadow: none; cursor: default; }
.claim-msg { text-align: center; font-size: 13px; margin-top: 10px; min-height: 18px; font-weight: 500; }
.claim-msg.ok { color: var(--ok); } .claim-msg.err { color: var(--err); }

/* ---------- Win modal ---------- */
.modal { position: fixed; inset: 0; background: #04070cd9; backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; padding: 18px; z-index: 50; animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal-card { background: linear-gradient(180deg, var(--ink-700), var(--ink-850)); border: 1px solid var(--gold-500); border-radius: var(--r-lg); padding: 24px 20px; max-width: 420px; width: 100%; max-height: 90vh; overflow-y: auto; box-shadow: 0 0 60px #f0ab2e26; animation: modalIn .45s cubic-bezier(.2,1.3,.35,1); }
@keyframes modalIn { from { opacity: 0; transform: translateY(16px) scale(.94); } to { opacity: 1; transform: none; } }
.modal-crest { text-align: center; font-size: 40px; animation: crest .8s ease both; }
@keyframes crest { 0% { transform: scale(0) rotate(-20deg); } 60% { transform: scale(1.25); } 100% { transform: scale(1); } }
.modal-title { font-family: "Sora", sans-serif; font-size: 27px; font-weight: 800; text-align: center; letter-spacing: .06em; background: linear-gradient(180deg, #fff, var(--gold-400)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.modal-sub { text-align: center; color: var(--muted); margin: 4px 0 18px; font-size: 13px; }
.modal-winners { display: flex; flex-direction: column; gap: 12px; }
.modal-verify { margin-top: 16px; font-size: 10.5px; color: var(--faint); word-break: break-all; text-align: center; }

/* ---------- Compact sizing inside two-column board ---------- */
.col .panel { margin-bottom: 0; }
.master { gap: 4px; }
.master-head { padding: 4px 0; font-size: 13px; }
.master-cell { padding: 4px 0; font-size: 10.5px; }
.col .bgrid { gap: 3px; }
.col .bgrid .bh { font-size: 11px; padding: 4px 0; }
.col .bgrid .bc { font-size: 12px; padding: 6px 0; }
.col .bcard { padding: 8px; }
.col .my-cards { max-height: 58vh; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%);
  background: var(--ink-600); border: 1px solid var(--gold-500); color: var(--text);
  padding: 10px 18px; border-radius: 999px; font-size: 13px; font-weight: 500;
  box-shadow: 0 10px 34px #000a; z-index: 60; animation: toastIn .25s ease;
}
@keyframes toastIn { from { opacity: 0; transform: translateX(-50%) translateY(8px); } to { opacity: 1; transform: translateX(-50%); } }

/* ---------- Top actions + sound ---------- */
.top-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn { width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line); background: var(--ink-700); color: var(--text); font-size: 16px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: transform .08s, background .12s; }
.icon-btn:active { transform: scale(.92); }
.icon-btn.off { opacity: .55; }
.game-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }

/* ---------- Wallet ---------- */
.wallet { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: linear-gradient(135deg, #1a2236, #141a28); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px 16px; margin: 4px 0 14px; box-shadow: 0 8px 26px #0005; }
.wallet-main { display: flex; flex-direction: column; gap: 2px; }
.wallet-label { font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.wallet-amt { font-family: "Sora", sans-serif; font-weight: 800; font-size: 26px; color: var(--gold-300); display: flex; align-items: baseline; gap: 6px; font-variant-numeric: tabular-nums; }
.wallet-cur { font-size: 12px; font-weight: 600; color: var(--muted); }
.wallet-actions { display: flex; flex-direction: column; gap: 7px; }
.w-btn { border: none; border-radius: 10px; padding: 9px 14px; font-family: "Sora", sans-serif; font-weight: 700; font-size: 13px; cursor: pointer; display: flex; align-items: center; gap: 5px; justify-content: center; min-width: 110px; transition: transform .08s, filter .12s; }
.w-btn:active { transform: scale(.96); }
.w-btn .w-ic { font-size: 15px; line-height: 1; }
.w-btn.deposit { background: linear-gradient(180deg, #2ecf8f, #129a64); color: #04261a; }
.w-btn.withdraw { background: var(--ink-600); color: var(--text); border: 1px solid var(--line-solid); }

/* ---------- Per-card Bingo (manual mode) ---------- */
.card-bingo { margin-top: 8px; width: 100%; padding: 10px; border: none; border-radius: 10px; background: linear-gradient(180deg, var(--gold-300), var(--gold-600)); color: #2a1c05; font-family: "Sora", sans-serif; font-weight: 800; font-size: 14px; letter-spacing: .1em; cursor: pointer; box-shadow: 0 6px 16px #f0ab2e33; transition: transform .08s; }
.card-bingo:active { transform: scale(.97); }

/* ---------- Wallet modal ---------- */
.modal-card.small { max-width: 360px; padding: 22px 20px; }
.wm-title { font-family: "Sora", sans-serif; font-weight: 700; font-size: 19px; text-align: center; margin-bottom: 14px; }
.wm-chips { display: flex; gap: 8px; margin-bottom: 12px; }
.wm-chip { flex: 1; padding: 9px 0; border-radius: 9px; border: 1px solid var(--line-solid); background: var(--ink-600); color: var(--text); font-weight: 600; font-size: 13px; cursor: pointer; transition: background .12s, transform .08s; }
.wm-chip:active { transform: scale(.95); }
.wm-input { width: 100%; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line-solid); background: var(--ink-850); color: var(--text); font-size: 16px; font-family: "Sora", sans-serif; font-variant-numeric: tabular-nums; margin-bottom: 14px; }
.wm-input:focus { outline: none; border-color: var(--gold-500); }
.wm-actions { display: flex; gap: 10px; }
.wm-cancel, .wm-confirm { flex: 1; padding: 12px; border-radius: 10px; font-weight: 700; font-size: 14px; cursor: pointer; border: none; font-family: "Sora", sans-serif; }
.wm-cancel { background: var(--ink-600); color: var(--muted); border: 1px solid var(--line-solid); }
.wm-confirm { background: linear-gradient(180deg, var(--gold-300), var(--gold-600)); color: #2a1c05; }
.wm-msg { text-align: center; font-size: 12.5px; margin-top: 10px; min-height: 16px; }
.wm-msg.err { color: var(--err); }

/* ---------- Full-height game (100vh, only right cards scroll) ---------- */
body.in-game { overflow: hidden; }
body.in-game .app { height: 100dvh; min-height: 0; overflow: hidden; padding: 10px; display: flex; flex-direction: column; }
#game { flex: 1; display: flex; flex-direction: column; min-height: 0; }
#game .board { flex: 1; min-height: 0; }
#game .col { min-height: 0; }
body.in-game .col .my-cards { flex: 1 1 0; max-height: none; min-height: 0; }

/* ---------- Auth gate ---------- */
.auth-gate { position: fixed; inset: 0; background: linear-gradient(180deg, var(--ink-850), var(--ink-900)); display: flex; align-items: center; justify-content: center; padding: 20px; z-index: 70; }
.auth-card { width: 100%; max-width: 360px; background: linear-gradient(180deg, var(--ink-700), var(--ink-850)); border: 1px solid var(--line); border-radius: 18px; padding: 26px 22px; box-shadow: 0 20px 60px #0009; }
.auth-brand { font-family: "Sora", sans-serif; font-weight: 700; font-size: 18px; display: flex; align-items: center; justify-content: center; gap: 4px; margin-bottom: 18px; }
.auth-tabs { display: flex; background: var(--ink-850); border: 1px solid var(--line-solid); border-radius: 10px; padding: 4px; margin-bottom: 16px; }
.auth-tab { flex: 1; background: none; border: none; color: var(--muted); font-family: "Sora", sans-serif; font-weight: 600; font-size: 14px; padding: 9px; border-radius: 7px; cursor: pointer; }
.auth-tab.active { background: var(--ink-600); color: var(--text); }
.auth-field { width: 100%; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line-solid); background: var(--ink-850); color: var(--text); font-size: 15px; margin-bottom: 12px; }
.auth-field:focus { outline: none; border-color: var(--gold-500); }
.auth-submit { width: 100%; padding: 13px; border: none; border-radius: 10px; background: linear-gradient(180deg, var(--gold-300), var(--gold-600)); color: #2a1c05; font-family: "Sora", sans-serif; font-weight: 800; font-size: 15px; cursor: pointer; }
.auth-submit:active { transform: scale(.98); }
.auth-or { text-align: center; color: var(--faint); font-size: 12px; margin: 14px 0; position: relative; }
.auth-guest { width: 100%; padding: 12px; border: 1px solid var(--line-solid); border-radius: 10px; background: var(--ink-600); color: var(--text); font-weight: 600; font-size: 14px; cursor: pointer; }
.auth-msg { text-align: center; font-size: 13px; margin-top: 12px; min-height: 16px; }
.auth-msg.err { color: var(--err); }

/* ---------- Wait banner (game in progress) ---------- */
.wait-banner { display: flex; align-items: center; gap: 10px; background: linear-gradient(135deg, #2a2210, #1a1608); border: 1px solid var(--gold-500); color: var(--gold-300); border-radius: var(--r-md); padding: 12px 14px; margin-bottom: 14px; font-size: 13px; font-weight: 500; }
.wait-spin { display: inline-block; animation: spin 2.4s linear infinite; font-size: 16px; }
@keyframes spin { to { transform: rotate(360deg); } }
body.lobby-waiting .picker { opacity: .5; pointer-events: none; }
body.lobby-waiting .picker-title::after { content: " — locked"; color: var(--muted); font-weight: 400; }

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
