@font-face {
  font-family: 'Inter'; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url('fonts/inter.woff2') format('woff2');
}
:root {
  --bg: #070912;
  --bg2: #0b0f1d;
  --surface: rgba(22, 28, 48, .72);
  --surface-solid: #141a2e;
  --line: rgba(255, 255, 255, .09);
  --line-strong: rgba(255, 255, 255, .16);
  --ink: #eef2ff;
  --muted: #8b98bd;
  --brand: #5b9dff;
  --brand2: #b06bff;
  --gold: #ffcf5c;
  --good: #34e08a;
  --bad: #ff5a72;
  --felt-a: #1c7f60;
  --felt-b: #0c4434;
  --felt-c: #06231b;
  --rail-a: #20283a;
  --rail-b: #11151f;
  --shadow: 0 18px 50px rgba(0, 0, 0, .55);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  background:
    radial-gradient(900px 600px at 18% -10%, rgba(120, 90, 255, .16), transparent 60%),
    radial-gradient(900px 600px at 100% 0%, rgba(40, 130, 255, .14), transparent 55%),
    var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  letter-spacing: -.01em;
}
.screen { display: none; min-height: 100vh; }
.screen.active { display: block; }
button { font: inherit; cursor: pointer; }

/* connection status banner (reconnecting / offline) */
.offline-banner { position: fixed; top: 0; left: 0; right: 0; z-index: 300;
  display: flex; align-items: center; justify-content: center; gap: 12px;
  padding: 9px 16px; font-size: 13px; font-weight: 700; color: #18120a;
  background: linear-gradient(180deg, #ffd66b, #f5b73c); box-shadow: 0 3px 14px rgba(0,0,0,.45); }
.offline-banner.hidden { display: none; }
.offline-banner .mini { background: rgba(0,0,0,.14); border: 1px solid rgba(0,0,0,.2); color: #18120a; border-radius: 8px; padding: 3px 9px; }
input, select {
  font: inherit; color: var(--ink); background: rgba(8, 12, 26, .8);
  border: 1px solid var(--line); border-radius: 11px; padding: 11px 13px; width: 100%;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(91, 157, 255, .22); }
select {
  appearance: none; -webkit-appearance: none; padding-right: 38px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238b98bd' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 13px center; background-size: 13px;
}
label { display: block; font-size: 12.5px; font-weight: 600; color: var(--muted); margin: 12px 0; letter-spacing: 0; }
label input, label select { margin-top: 6px; }
hr { border: none; border-top: 1px solid var(--line); margin: 18px 0; }
.muted { color: var(--muted); font-size: 13px; }
.err { color: var(--bad); font-size: 13px; min-height: 18px; margin-top: 6px; }

.primary {
  background: linear-gradient(180deg, #6fa6ff, #3f7fff); color: #fff; border: none; border-radius: 13px;
  padding: 13px 16px; font-weight: 700; width: 100%; margin-top: 8px;
  box-shadow: 0 8px 22px rgba(63, 127, 255, .35), inset 0 1px 0 rgba(255, 255, 255, .35);
  transition: transform .12s, filter .12s;
}
.primary:hover { filter: brightness(1.08); transform: translateY(-1px); }
.primary:active { transform: translateY(0); }
.ghost { background: rgba(255, 255, 255, .04); color: var(--brand); border: 1px solid var(--line-strong); border-radius: 11px; padding: 11px 14px; width: 100%; font-weight: 600; }
.ghost:hover { background: rgba(255, 255, 255, .08); }
.mini { background: rgba(255, 255, 255, .06); color: var(--ink); border: 1px solid var(--line); border-radius: 9px; padding: 6px 11px; font-size: 12px; font-weight: 600; }
.mini:hover { background: rgba(255, 255, 255, .12); }

/* ---------- HOME ---------- */
.home-wrap { max-width: 960px; margin: 0 auto; padding: 48px 20px 70px; }
.hero { position: relative; padding: 14px 0 6px; margin-bottom: 12px; }
.hero > * { position: relative; z-index: 1; }
.hero-fx { position: absolute; left: 50%; top: 40%; transform: translate(-50%, -50%);
  width: min(640px, 94%); height: 300px; pointer-events: none; z-index: 0; opacity: .9;
  -webkit-mask-image: radial-gradient(70% 66% at 50% 50%, #000 40%, transparent 82%);
  mask-image: radial-gradient(70% 66% at 50% 50%, #000 40%, transparent 82%); }
.hero-fx .beam { fill: none; stroke: rgba(176,107,255,.4); stroke-width: 1.4; vector-effect: non-scaling-stroke; }
.hero-fx .bunch { fill: var(--gold); filter: drop-shadow(0 0 5px rgba(255,207,92,.7)); }
@media (prefers-reduced-motion: reduce) { .hero-fx .bunch { display: none; } }
.hero-chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 18px 0 4px; }
.chip { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; color: #c7d0ea;
  background: rgba(255,255,255,.045); border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.chip::before { content: ''; width: 6px; height: 6px; border-radius: 50%; flex: none;
  background: linear-gradient(120deg, var(--brand2), var(--brand)); box-shadow: 0 0 7px rgba(176,107,255,.6); }
.logo { font-size: clamp(44px, 7vw, 66px); font-weight: 900; letter-spacing: -.03em; text-align: center; margin: 0;
  background: linear-gradient(180deg, #fff, #b9c6ee); -webkit-background-clip: text; background-clip: text; color: transparent; }
.logo span { background: linear-gradient(120deg, var(--brand2), var(--brand)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tagline { text-align: center; font-weight: 800; font-size: clamp(17px, 2.4vw, 21px); letter-spacing: .01em; color: #dfe6fb; margin: 10px 0 0; }
.tagline span { background: linear-gradient(120deg, var(--brand2), var(--brand)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tag { text-align: center; color: var(--muted); max-width: 620px; margin: 12px auto 30px; line-height: 1.6; font-size: 15px; }
.tag b { color: #cdd6f5; font-weight: 600; }
.home-cols { display: grid; grid-template-columns: 1.12fr 1fr; gap: 20px; }
.panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 22px;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: var(--shadow);
}
.panel h2 { margin: 0 0 14px; font-size: 19px; font-weight: 800; letter-spacing: -.02em; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mode-toggle { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-bottom: 14px; }
.mode-opt { background: rgba(8, 12, 26, .6); border: 1px solid var(--line); border-radius: 13px; padding: 14px 8px;
  text-align: center; color: var(--muted); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; transition: border-color .15s, background .15s; }
.mode-opt b { color: #c7d0ea; font-size: 15px; }
.mode-opt small { font-size: 10.5px; line-height: 1.2; }
.mode-opt.active { border-color: var(--brand); background: linear-gradient(180deg, rgba(91,157,255,.2), rgba(91,157,255,.07)); box-shadow: 0 0 0 2px rgba(91,157,255,.28); }
.mode-opt.active b { color: #fff; }
.code-input { text-transform: uppercase; letter-spacing: 8px; font-weight: 800; font-size: 22px; text-align: center; }
.field-label { font-size: 12.5px; font-weight: 600; color: var(--muted); margin: 12px 0 6px; }
.seat-config { display: flex; flex-direction: column; gap: 7px; margin: 0 0 8px; }
.seat-row { display: flex; align-items: center; gap: 10px; background: rgba(8, 12, 26, .6); border: 1px solid var(--line); border-radius: 11px; padding: 7px 10px; font-size: 13px; }
.seat-row .sidx { width: 22px; height: 22px; flex: none; display: grid; place-items: center; border-radius: 7px; background: rgba(255,255,255,.07); color: var(--muted); font-weight: 700; font-size: 12px; }
.seat-row select { width: auto; flex: 1; padding: 7px 34px 7px 11px; background-position: right 11px center; }
.seat-del { flex: none; width: 26px; height: 26px; border-radius: 8px; border: 1px solid var(--line); background: rgba(255,255,255,.04); color: var(--muted); font-size: 17px; line-height: 1; display: grid; place-items: center; transition: color .15s, border-color .15s, background .15s; }
.seat-del:hover { color: var(--bad); border-color: var(--bad); background: rgba(255,90,114,.12); }
.seat-del-pad { flex: none; width: 26px; }
.seat-add { display: flex; align-items: center; justify-content: center; gap: 7px; width: 100%; padding: 9px; border: 1px dashed var(--line-strong); border-radius: 11px; background: rgba(255,255,255,.025); color: var(--brand); font-weight: 600; font-size: 13px; transition: border-color .15s, background .15s, color .15s; }
.seat-add:hover { border-color: var(--brand); background: rgba(91,157,255,.1); }
.seat-add span { font-size: 17px; line-height: 0; font-weight: 700; }
.credit { text-align: center; color: var(--muted); font-size: 12px; margin-top: 34px; opacity: .8; }

/* ---------- TABLE ---------- */
#table { display: none; flex-direction: column; height: 100vh; height: 100dvh; }
#table.active { display: flex; }
.topbar { display: flex; align-items: center; gap: 14px; padding: 11px 18px; background: rgba(11, 15, 29, .85);
  border-bottom: 1px solid var(--line); backdrop-filter: blur(12px); }
.brand { font-weight: 800; letter-spacing: -.02em; }
.room-pill { color: var(--muted); font-size: 13px; }
.room-pill b { color: var(--gold); letter-spacing: 3px; font-weight: 800; }
.phase-pill { margin-left: auto; background: linear-gradient(180deg, rgba(91,157,255,.25), rgba(91,157,255,.12));
  border: 1px solid rgba(91,157,255,.4); padding: 6px 14px; border-radius: 20px; font-size: 12.5px; font-weight: 700; }

.felt { flex: 1; display: flex; align-items: center; justify-content: center; padding: 18px; overflow: hidden; }
.table-oval {
  position: relative; width: min(1000px, 95vw); height: min(540px, 58vh);
  background:
    radial-gradient(58% 54% at 50% 40%, rgba(255,255,255,.07), transparent 62%),
    radial-gradient(120% 120% at 50% 38%, var(--felt-a), var(--felt-b) 42%, var(--felt-c));
  border-radius: 49% / 46%;
  box-shadow:
    inset 0 0 0 2px rgba(255,255,255,.05),
    inset 0 2px 1px rgba(255,255,255,.06),
    inset 0 0 120px rgba(0,0,0,.55),
    0 0 0 13px var(--rail-a),
    0 0 0 14px rgba(255,255,255,.05),
    0 0 0 26px var(--rail-b),
    0 0 60px 4px rgba(28,127,96,.18),
    0 36px 80px rgba(0,0,0,.62);
}
.table-oval::after {
  content: ''; position: absolute; inset: 24px; border-radius: 48% / 45%;
  border: none; pointer-events: none;
}
/* single accelerator ring tracing the rail, with one proton bunch circulating */
.ring-fx { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; z-index: 1; }
.ring-fx .beam { fill: none; stroke: rgba(255,255,255,.10); stroke-width: 1.4; vector-effect: non-scaling-stroke; }
.ring-fx .bunch { fill: var(--gold); filter: drop-shadow(0 0 5px rgba(255,207,92,.65)); }
@media (prefers-reduced-motion: reduce) { .ring-fx .bunch { display: none; } }
.table-oval::before {
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .06;
  background: center/clamp(150px,20vw,230px) no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cg fill='none' stroke='%23ffffff' stroke-width='2'%3E%3Cellipse cx='50' cy='50' rx='46' ry='17'/%3E%3Cellipse cx='50' cy='50' rx='46' ry='17' transform='rotate(60 50 50)'/%3E%3Cellipse cx='50' cy='50' rx='46' ry='17' transform='rotate(120 50 50)'/%3E%3C/g%3E%3Ccircle cx='50' cy='50' r='6' fill='%23ffffff'/%3E%3C/svg%3E"); }
.board-center { position: absolute; top: 51%; left: 50%; transform: translate(-50%, -50%); text-align: center; width: 76%; }
.pot { display: inline-block; color: var(--gold); font-weight: 800; margin-top: 14px; font-size: 15px;
  background: rgba(0,0,0,.32); padding: 5px 16px; border-radius: 20px; border: 1px solid rgba(255,207,92,.3); }
.card-tip { position: fixed; z-index: 250; pointer-events: none; left: 0; top: 0;
  background: rgba(12, 16, 28, .97); border: 1px solid var(--line-strong); border-radius: 11px; padding: 9px 13px;
  box-shadow: 0 12px 34px rgba(0, 0, 0, .55); max-width: 250px; opacity: 0; transform: translateY(5px);
  transition: opacity .12s ease, transform .12s ease; backdrop-filter: blur(8px); }
.card-tip.show { opacity: 1; transform: none; }
.card-tip .t-name { font-weight: 800; font-size: 14px; color: #fff; letter-spacing: -.01em; }
.card-tip .t-info { font-size: 12px; color: var(--muted); margin-top: 3px; line-height: 1.4; }
.community { display: flex; gap: 8px; justify-content: center; min-height: 104px; }
.card-slot { width: 72px; aspect-ratio: 170 / 240; border-radius: 12px; flex: none;
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.015));
  border: 1px solid rgba(255,255,255,.09); box-shadow: inset 0 1px 0 rgba(255,255,255,.05), inset 0 0 18px rgba(0,0,0,.25);
  position: relative; }
.card-slot::after { content: ''; position: absolute; inset: 0; opacity: .14; background: center/46% no-repeat
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cg fill='none' stroke='%23ffffff' stroke-width='3'%3E%3Cellipse cx='50' cy='50' rx='46' ry='17'/%3E%3Cellipse cx='50' cy='50' rx='46' ry='17' transform='rotate(60 50 50)'/%3E%3Cellipse cx='50' cy='50' rx='46' ry='17' transform='rotate(120 50 50)'/%3E%3C/g%3E%3Ccircle cx='50' cy='50' r='7' fill='%23ffffff'/%3E%3C/svg%3E"); }
.winner-banner { margin-top: 12px; font-weight: 800; color: var(--gold); min-height: 22px; text-shadow: 0 2px 6px #000; font-size: 15px; }

.card-svg { width: 70px; height: auto; border-radius: 12px; filter: drop-shadow(0 5px 9px rgba(0,0,0,.5)); display: block; }
.community .card-svg { width: 80px; }
.deal-in { animation: dealIn .42s cubic-bezier(.2,.9,.3,1.25) both; }
@keyframes dealIn { from { transform: translateY(-28px) rotate(-7deg) scale(.65); opacity: 0; } to { transform: none; opacity: 1; } }

/* card typography */
.card-svg .badge { font: 800 27px 'Inter', system-ui, sans-serif; }
.card-svg .bsub { font-size: .5em; baseline-shift: -3px; font-weight: 700; }
.card-svg .cap { font: 800 12.5px 'Inter', system-ui; fill: #fff; text-transform: uppercase; letter-spacing: .5px; }
.card-svg .cap2 { font: 800 9.5px 'Inter', system-ui; fill: #fff; text-transform: uppercase; letter-spacing: .3px; }
.card-svg .big { font: 800 36px 'Inter', system-ui; }
.card-svg .bigsub { font-size: .48em; baseline-shift: -6px; }
.card-svg .supc { font-size: .5em; }
.card-svg .sub2 { font: 700 10px 'Inter', system-ui; fill: #5d6680; letter-spacing: .2px; }
.card-svg .ccp { font: 800 14px 'Inter', system-ui; }
.card-svg .stdr { font: 800 30px Georgia, "Times New Roman", serif; }
.card-svg .stds { font: 700 20px 'Inter', system-ui; }
.card-svg .stdbig { font: 700 78px 'Inter', system-ui; opacity: .92; }
.card-svg.wild .hue { animation: huerot 7s linear infinite; }
@keyframes huerot { from { filter: hue-rotate(0); } to { filter: hue-rotate(360deg); } }
.card-svg.win-glow, .seat.winner .hole .card-svg { animation: winGlow 1s ease-in-out infinite alternate; }
@keyframes winGlow { from { filter: drop-shadow(0 0 2px rgba(255,207,92,.5)); } to { filter: drop-shadow(0 0 16px rgba(255,207,92,1)); } }

/* seats */
.seat { position: absolute; width: 156px; transform: translate(-50%, -50%); text-align: center; }
.seat .nameplate {
  background: linear-gradient(180deg, rgba(20,26,46,.95), rgba(12,16,30,.95)); border: 1px solid var(--line-strong);
  border-radius: 13px; padding: 8px 10px; display: inline-flex; align-items: center; gap: 9px; min-width: 132px;
  box-shadow: 0 6px 18px rgba(0,0,0,.45); justify-content: center;
}
.seat .avatar { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font-weight: 800; font-size: 14px;
  background: linear-gradient(140deg, #2a3556, #1b2440); color: #cdd6f5; border: 1px solid var(--line-strong); flex: none; }
.seat .meta { text-align: left; line-height: 1.15; }
.seat.active .nameplate { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(255,207,92,.4), 0 0 22px rgba(255,207,92,.4); animation: seatPulse 1.6s ease-in-out infinite; }
@keyframes seatPulse { 0%,100% { box-shadow: 0 0 0 2px rgba(255,207,92,.32), 0 0 16px rgba(255,207,92,.25); } 50% { box-shadow: 0 0 0 3px rgba(255,207,92,.6), 0 0 28px rgba(255,207,92,.5); } }
.seat.winner .nameplate { border-color: var(--good); box-shadow: 0 0 0 2px rgba(52,224,138,.5), 0 0 26px rgba(52,224,138,.5); }
.seat.folded { opacity: .4; filter: grayscale(.7); }
.seat.disc .nameplate { border-color: var(--line-strong); opacity: .72; }
.seat .disc-tag { font-size: 10px; color: var(--muted); font-weight: 700; letter-spacing: .02em; }
.seat .pname { font-weight: 700; font-size: 13px; white-space: nowrap; }
.seat .meta { min-width: 0; }
.seat .pname .bot { color: var(--brand2); font-size: 10px; font-weight: 800; margin-left: 3px; }
.seat .pchips { color: var(--gold); font-size: 12px; font-weight: 700; }
.seat .hole { display: flex; gap: 4px; justify-content: center; margin-top: 6px; min-height: 62px; }
.seat .hole .card-svg { width: 46px; }
.seat.me .hole { margin-bottom: 9px; }
.seat.me .hole .card-svg { width: 54px; }
.card-svg.inhand { outline: 2.5px solid var(--gold); outline-offset: -1px; border-radius: 12px; filter: drop-shadow(0 0 9px rgba(255,207,92,.55)); }
.card-svg[data-info] { cursor: pointer; transition: transform .12s; }
.seat.me .hole .card-svg[data-info]:hover, .community .card-svg[data-info]:hover { transform: translateY(-4px); }
.seat .commit { font-size: 11px; color: var(--good); margin-top: 3px; min-height: 14px; font-weight: 700; }
.seat .bet-chip { position: absolute; left: 50%; top: 100%; transform: translateX(-50%); margin-top: 2px; }
.seat .btn-dealer { position: absolute; right: 2px; top: -4px; background: #fff; color: #111; font-weight: 800;
  width: 24px; height: 24px; border-radius: 50%; font-size: 12px; display: grid; place-items: center; border: 2px solid var(--gold); box-shadow: 0 3px 8px rgba(0,0,0,.5); z-index: 2; }
.seat .open-seat { color: var(--muted); font-style: italic; font-size: 12px; }
.seat .result-tag { font-size: 11px; color: var(--gold); margin-top: 4px; min-height: 0; font-weight: 700; }
.seat .result-tag:not(:empty) { margin-top: 4px; }
.take-seat { margin-top: 6px; }

/* control bar */
.control-bar { background: rgba(11, 15, 29, .92); border-top: 1px solid var(--line); padding: 12px 16px 14px; min-height: 96px; backdrop-filter: blur(12px); }
.hand-hint { text-align: center; font-size: 14px; color: var(--ink); min-height: 22px; margin-bottom: 10px; font-weight: 600; }
.hand-hint b { color: var(--gold); font-weight: 800; }
.actions { display: flex; gap: 11px; justify-content: center; align-items: center; flex-wrap: wrap; }
.actions button { border: 1px solid rgba(255,255,255,.1); border-radius: 14px; padding: 13px 26px; font-weight: 700; color: #fff; min-width: 108px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.14), 0 8px 20px -6px var(--btn-shadow, rgba(0,0,0,.5)); transition: transform .12s, filter .12s, box-shadow .12s; letter-spacing: .01em; }
.actions button:hover { filter: brightness(1.08); transform: translateY(-2px); box-shadow: inset 0 1px 0 rgba(255,255,255,.16), 0 12px 26px -6px var(--btn-shadow, rgba(0,0,0,.5)); }
.actions button:active { transform: translateY(0); }
.act-fold { background: linear-gradient(180deg, #2a2f3e, #1c2030); color: #ff8b9c; --btn-shadow: rgba(0,0,0,.55); }
.act-check { background: linear-gradient(180deg, #3a4768, #2a3450); --btn-shadow: rgba(40,60,110,.45); }
.act-call { background: linear-gradient(180deg, #2bb56b, #149255); --btn-shadow: rgba(20,146,85,.5); }
.act-raise { background: linear-gradient(180deg, #6f9bff, #7c5cff); --btn-shadow: rgba(110,120,255,.55); }
.actions input[type=range] { width: 190px; accent-color: var(--brand); height: 6px; }
.raise-amt { font-weight: 800; color: var(--gold); min-width: 96px; display: inline-block; text-align: center; font-size: 15px; white-space: nowrap; }
.lobby-controls { display: flex; gap: 11px; justify-content: center; align-items: center; flex-wrap: wrap; }
.lobby-controls button { border-radius: 13px; padding: 12px 20px; font-weight: 700; border: 1px solid var(--line-strong); background: rgba(255,255,255,.05); color: var(--ink); }
.lobby-controls .go { background: linear-gradient(180deg, #6fa6ff, #3f7fff); border: none; box-shadow: 0 8px 22px rgba(63,127,255,.35); }
.lobby-controls .go:hover { filter: brightness(1.08); }

.log-panel { max-height: 92px; overflow-y: auto; padding: 9px 18px; font-size: 11.5px; color: var(--muted);
  background: rgba(7, 11, 22, .9); border-top: 1px solid var(--line); font-feature-settings: "tnum"; }
.log-panel div { padding: 1px 0; }

/* pass-and-play */
.pass-gate { position: fixed; inset: 0; background: rgba(5, 8, 18, .97); display: grid; place-items: center; z-index: 40; backdrop-filter: blur(6px); }
.pass-gate.hidden { display: none; }
.pass-card { text-align: center; }
.pass-card h2 { font-size: 36px; margin: 8px 0 24px; font-weight: 900; letter-spacing: -.02em; }

/* modal */
.modal { position: fixed; inset: 0; background: rgba(4, 7, 16, .82); display: grid; place-items: center; z-index: 50; padding: 20px; backdrop-filter: blur(6px); }
.modal.hidden { display: none; }
.modal-box { background: var(--surface-solid); border: 1px solid var(--line-strong); border-radius: 18px; max-width: 660px; max-height: 86vh; overflow-y: auto; padding: 28px; position: relative; box-shadow: var(--shadow); }
.modal-box h2 { margin-top: 0; font-weight: 800; letter-spacing: -.02em; }
.modal-box h3 { color: var(--brand); margin: 20px 0 8px; font-size: 16px; }
.modal-box ul, .modal-box ol { line-height: 1.65; padding-left: 20px; }
.modal-close { position: absolute; right: 16px; top: 12px; background: none; border: none; color: var(--muted); font-size: 28px; line-height: 1; }
.cc { font-weight: 700; }
.cc.r { color: #e11d1d; } .cc.g { color: #16a34a; } .cc.b { color: #2563eb; }
.sci-note { margin-top: 22px; padding: 4px 18px 14px; border-radius: 14px;
  background: linear-gradient(180deg, rgba(91,157,255,.08), rgba(176,107,255,.05));
  border: 1px solid rgba(120,150,255,.18); }
.sci-note h3 { background: linear-gradient(120deg, var(--brand2), var(--brand)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sci-note h3 em { font-style: italic; }
.sci-note ul { margin: 8px 0; }
.sci-note li { padding: 3px 0; }
.sci-note p:last-child { margin-bottom: 4px; font-size: 12.5px; }
/* mode toggle icon */
.mode-ic { font-size: 26px; line-height: 1; }
.mode-opt.active .mode-ic { filter: drop-shadow(0 0 8px rgba(91,157,255,.5)); }
/* Standard-Model particle chart */
.sm-chart { margin: 12px 0 18px; padding: 16px; border-radius: 14px; background: rgba(255,255,255,.025); border: 1px solid var(--line); }
.sm-title { text-align: center; font-weight: 800; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 0 0 12px; }
.sm-fam { margin-bottom: 14px; }
.sm-fam-h { text-align: center; }
.sm-fam-h b { font-size: 14px; color: #fff; } .sm-fam-h span { color: var(--muted); font-size: 12px; margin-left: 6px; }
.sm-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin: 9px auto 0; max-width: 440px; }
.sm-p { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 13px 6px 10px; border-radius: 11px; font-weight: 800; font-size: 21px; line-height: 1; position: relative; }
.sm-p sub { font-size: .5em; font-weight: 700; vertical-align: -.12em; margin-left: .5px; }
.sm-p small { font-weight: 600; font-size: 9px; margin-top: 5px; opacity: .6; text-transform: uppercase; letter-spacing: .4px; }
.sm-p.q { background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.02)); border: 1px solid rgba(255,255,255,.14); color: #fff; overflow: hidden; }
.sm-p.q::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, #e8554f, #2fb36a, #4f86f0); opacity: .9; }
.sm-p.l { background: rgba(120,134,162,.12); border: 1px solid rgba(255,255,255,.08); color: #c7d0e8; }
.sm-foot { font-size: 11.5px; color: var(--muted); margin-top: 6px; line-height: 1.5; }
.sm-foot b { color: #c8d1ec; }
/* recipe dots */
.qdot, .ldot { display: inline-block; width: 13px; height: 13px; border-radius: 50%; vertical-align: -1px; margin: 0 1px; }
/* matter = hollow ring, antimatter = solid fill (mirrors the card badges) */
.qdot.r { background: transparent; box-shadow: inset 0 0 0 3px #e11d1d; }
.qdot.g { background: transparent; box-shadow: inset 0 0 0 3px #16a34a; }
.qdot.b { background: transparent; box-shadow: inset 0 0 0 3px #2563eb; }
.qdot.r.anti { background: #e11d1d; box-shadow: none; }
.qdot.g.anti { background: #16a34a; box-shadow: none; }
.qdot.b.anti { background: #2563eb; box-shadow: none; }
.ldot { background: transparent; box-shadow: inset 0 0 0 3px #8390aa; }
.ldot.anti { background: #8390aa; box-shadow: none; }
/* hand guide (quark → atom ladder) */
.hand-guide { display: flex; flex-direction: column; gap: 6px; margin: 12px 0; }
.hg-row { display: flex; align-items: center; gap: 12px; padding: 9px 13px; border-radius: 11px; background: rgba(255,255,255,.03); border: 1px solid var(--line); }
.hg-row.nuts { border-color: rgba(255,207,92,.45); background: linear-gradient(90deg, rgba(255,207,92,.12), rgba(255,255,255,.02)); }
.hg-rank { width: 22px; height: 22px; flex: none; border-radius: 7px; background: rgba(255,255,255,.07); display: grid; place-items: center; font-weight: 800; font-size: 12px; color: var(--muted); }
.hg-row.nuts .hg-rank { background: var(--gold); color: #2a1e00; }
.hg-recipe { flex: none; width: 84px; white-space: nowrap; }
.hg-recipe .op { color: var(--muted); font-size: 11px; margin: 0 2px; font-weight: 700; }
.hg-body { flex: 1; min-width: 0; }
.hg-name { font-weight: 800; font-size: 14px; color: #fff; }
.hg-ex { font-size: 11.5px; color: var(--muted); line-height: 1.35; }
.hg-rare { flex: none; font-size: 12px; font-weight: 800; color: var(--gold); min-width: 38px; text-align: right; }
/* the same ladder shown inside the onboarding tour — tighter, scrolls if the panel is short */
.ob-guide { margin: 10px 0 0; gap: 5px; max-height: 46vh; overflow-y: auto; }
.ob-guide .hg-row { padding: 7px 11px; gap: 10px; }
.rules-div { border: none; border-top: 1px solid var(--line); margin: 26px 0 6px; }
.wild-note { font-size: 13px; color: var(--muted); line-height: 1.55; margin: 10px 0 0; padding-left: 12px; border-left: 2px solid var(--line-strong); }
.wild-note b { color: #cdd6f5; }
.rank-list li { padding: 2px 0; }
.rank-list li b { color: var(--gold); }

/* ---------- ONBOARDING TOUR ---------- */
.tour-cta { background: linear-gradient(120deg, var(--brand2), var(--brand)); margin-bottom: 10px; }
.onboard { position: fixed; inset: 0; z-index: 70; background: rgba(4, 7, 16, .9); backdrop-filter: blur(10px);
  display: grid; place-items: center; padding: 18px; }
.onboard.hidden { display: none; }
.onboard-box { position: relative; width: min(680px, 100%); max-height: 92vh; overflow-y: auto;
  background: linear-gradient(180deg, #131a30, #0d1322); border: 1px solid var(--line-strong); border-radius: 22px;
  padding: 30px 28px 18px; box-shadow: 0 30px 80px rgba(0, 0, 0, .6); }
.ob-skip { position: absolute; right: 16px; top: 14px; background: none; border: none; color: var(--muted); font-size: 13px; font-weight: 600; }
.ob-skip:hover { color: var(--ink); }
.ob-step { min-height: 320px; animation: obIn .3s ease; }
@keyframes obIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.ob-h { font-size: 27px; font-weight: 900; letter-spacing: -.022em; margin: 2px 0 16px; line-height: 1.12; }
.ob-h span { background: linear-gradient(120deg, var(--brand2), var(--brand)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ob-h small { font-size: 16px; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.ob-lead { color: #cdd6f0; line-height: 1.62; font-size: 15.5px; margin: 0 0 16px; }
.ob-lead b { color: #fff; font-weight: 700; }
.ob-lead em { color: var(--gold); font-style: normal; }
.ob-note { color: var(--muted); font-size: 13px; line-height: 1.5; margin: 12px 0 0; }
.ob-note b { color: #c8d1ec; }
.ob-fan { display: flex; justify-content: center; gap: 10px; margin: 18px 0; }
.ob-fan .ob-card:nth-child(odd) { transform: rotate(-4deg); }
.ob-fan .ob-card:nth-child(even) { transform: rotate(4deg) translateY(-6px); }
.ob-card { display: inline-block; }
.ob-card .card-svg { width: 100%; }
.ob-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.ob-tile { display: flex; gap: 12px; align-items: center; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); border-radius: 14px; padding: 12px; }
.ob-tile .ob-card { width: 76px; flex: none; }
.ob-tile b { display: block; font-size: 14px; margin-bottom: 3px; }
.ob-tile span { color: var(--muted); font-size: 12px; line-height: 1.4; }
.ob-tile em { color: var(--gold); font-style: normal; }
/* per-type concept page */
.ob-type { display: flex; gap: 26px; align-items: center; margin: 6px 0 2px; }
.ob-type-cards { display: flex; gap: 10px; flex: none; }
.ob-type-cards .ob-card:nth-child(odd) { transform: rotate(-3deg); }
.ob-type-cards .ob-card:nth-child(even) { transform: rotate(3deg) translateY(-5px); }
.ob-type-body { flex: 1; min-width: 0; }
.ob-type-body .ob-lead { margin-bottom: 12px; }
.ob-points { margin: 0; padding-left: 20px; color: #c8d1ec; font-size: 14px; line-height: 1.6; }
.ob-points li { padding: 3px 0; }
.ob-points li::marker { color: var(--brand); }
.ob-points b { color: #fff; font-weight: 700; }
.ob-points em { color: var(--gold); font-style: normal; font-weight: 600; }
/* builder */
.ob-goals { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.ob-goal { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--muted); }
.ob-goal.done { color: var(--good); }
.ob-check { width: 20px; height: 20px; flex: none; border-radius: 6px; border: 1px solid var(--line-strong); display: grid; place-items: center; font-weight: 800; font-size: 12px; }
.ob-goal.done .ob-check { background: var(--good); border-color: var(--good); color: #06281a; }
.ob-result { text-align: center; font-size: 15px; font-weight: 600; color: var(--muted); background: rgba(0, 0, 0, .25); border: 1px solid var(--line); border-radius: 12px; padding: 10px; margin-bottom: 10px; }
.ob-result.has { color: var(--ink); }
.ob-result b { color: var(--gold); }
.ob-hint { text-align: center; font-size: 12.5px; line-height: 1.5; color: var(--muted); min-height: 18px; margin: -2px 4px 10px; transition: color .15s; }
.ob-hint b { color: #cdd6f0; font-weight: 700; }
.ob-tip { text-align: center; font-size: 11.5px; color: var(--muted); margin: 6px 0 8px; letter-spacing: .01em; }
.ob-tip b { color: #c8d1ec; font-weight: 700; white-space: nowrap; }
.ob-bench { display: flex; justify-content: center; gap: 6px; min-height: 84px; align-items: center; margin-bottom: 10px; }
.ob-empty { color: var(--muted); font-size: 13px; font-style: italic; }
.ob-palette { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.ob-pick { background: none; border: 2px solid transparent; border-radius: 14px; padding: 2px; transition: transform .1s; }
.ob-pick .card-svg { width: 60px; }
.ob-pick:hover { transform: translateY(-3px); }
.ob-pick.on { border-color: var(--gold); box-shadow: 0 0 14px rgba(255, 207, 92, .5); }
.ob-rank { margin: 0; padding-left: 22px; line-height: 1.4; }
.ob-rank li { padding: 3px 0; color: #c8d1ec; }
.ob-rank li b { font-weight: 700; }
.ob-rank li.top { color: var(--gold); font-weight: 800; }
.ob-rank li.top span { color: var(--muted); font-weight: 600; margin-left: 8px; font-size: 12px; }
.ob-flow { margin: 0; padding-left: 22px; line-height: 1.7; color: #c8d1ec; }
.ob-flow li { padding: 2px 0; }
.ob-flow b { color: #fff; }
.ob-nav { display: flex; align-items: center; justify-content: space-between; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.ob-dots { display: flex; gap: 7px; }
.ob-dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255, 255, 255, .16); }
.ob-dot.on { background: var(--brand); width: 22px; border-radius: 4px; }
.ob-btns { display: flex; gap: 10px; }
.ob-back { background: rgba(255, 255, 255, .06); color: var(--ink); border: 1px solid var(--line); border-radius: 11px; padding: 10px 16px; font-weight: 700; }
.ob-next { background: linear-gradient(180deg, #6fa6ff, #3f7fff); color: #fff; border: none; border-radius: 11px; padding: 10px 20px; font-weight: 800; box-shadow: 0 6px 16px rgba(63, 127, 255, .35); }
.ob-next.locked { opacity: .45; cursor: not-allowed; box-shadow: none; }
@media (max-width: 620px) {
  .onboard-box { padding: 24px 16px 14px; border-radius: 18px; }
  .ob-h { font-size: 22px; }
  .ob-h small { font-size: 14px; display: block; margin-top: 2px; }
  .ob-grid { grid-template-columns: 1fr; }
  .ob-step { min-height: 0; }
  .ob-fan .ob-card { width: 64px !important; }
  .ob-type { flex-direction: column; gap: 14px; }
  .ob-type-cards { justify-content: center; }
  .ob-type-cards .ob-card { width: 82px !important; }
  .ob-tip b { white-space: normal; }
}

/* ---------- FX ---------- */
#fxCanvas { position: fixed; inset: 0; pointer-events: none; z-index: 60; }
.atomic-flash { position: fixed; inset: 0; z-index: 58; pointer-events: none; opacity: 0;
  background: radial-gradient(circle at 50% 60%, #fff, #ffd36e 25%, #ff8a2a 45%, rgba(180,40,0,.6) 65%, transparent 80%); }
.atomic-flash.go { animation: atomic 2.6s ease-out forwards; }
@keyframes atomic { 0% { opacity: 0; transform: scale(.2); } 8% { opacity: 1; transform: scale(.5); } 20% { opacity: .95; transform: scale(1.05); } 60% { opacity: .55; transform: scale(1.25); } 100% { opacity: 0; transform: scale(1.6); } }
.shockwave { position: fixed; left: 50%; top: 60%; width: 10px; height: 10px; border-radius: 50%; border: 4px solid rgba(255,220,150,.9); transform: translate(-50%,-50%); z-index: 59; pointer-events: none; opacity: 0; }
.shockwave.go { animation: shock 1.4s ease-out forwards; }
@keyframes shock { 0% { opacity: .9; width: 10px; height: 10px; } 100% { opacity: 0; width: 150vw; height: 150vw; border-width: 1px; } }
.fx-banner { position: fixed; left: 50%; top: 30%; transform: translate(-50%,-50%) scale(.6); z-index: 61; font-size: clamp(30px, 6vw, 50px); font-weight: 900; color: #fff; text-shadow: 0 0 28px rgba(255,180,60,.9), 0 4px 12px #000; pointer-events: none; opacity: 0; text-align: center; letter-spacing: -.02em; }
.fx-banner.go { animation: fxb 2.4s ease-out forwards; }
@keyframes fxb { 0% { opacity: 0; transform: translate(-50%,-50%) scale(.4); } 15% { opacity: 1; transform: translate(-50%,-50%) scale(1.1); } 30% { transform: translate(-50%,-50%) scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%,-50%) scale(1.05); } }

@media (max-width: 760px) {
  .home-cols { grid-template-columns: 1fr; }
  .home-wrap { padding: 28px 14px 50px; }
  .logo { font-size: 40px; }
  .topbar { gap: 8px; padding: 9px 12px; flex-wrap: wrap; }
  .topbar .room-pill { font-size: 12px; }
  .felt { padding: 8px; }
  .table-oval {
    width: 96vw; height: 56vh;
    box-shadow: inset 0 0 0 2px rgba(255,255,255,.05), inset 0 0 60px rgba(0,0,0,.55),
      0 0 0 8px var(--rail-a), 0 0 0 9px rgba(255,255,255,.05), 0 0 0 16px var(--rail-b), 0 16px 40px rgba(0,0,0,.6);
  }
  .table-oval::before { background-size: 130px; }
  .board-center { width: 92%; top: 57%; }
  .community { gap: 4px; min-height: 76px; }
  .community .card-svg { width: 52px; }
  .pot { font-size: 13px; padding: 4px 12px; }
  .winner-banner { font-size: 13px; }
  .seat { width: 96px; }
  .seat .nameplate { min-width: 0; padding: 5px 7px; gap: 6px; border-radius: 10px; }
  .seat .avatar { width: 24px; height: 24px; font-size: 12px; border-radius: 7px; }
  .seat .pname { font-size: 11px; }
  .seat .pchips { font-size: 10.5px; }
  .seat .hole { gap: 2px; min-height: 44px; margin-top: 3px; }
  .seat .hole .card-svg { width: 30px; }
  .seat.me .hole .card-svg { width: 42px; }
  .seat .commit { font-size: 10px; }
  .seat .btn-dealer { width: 19px; height: 19px; font-size: 10px; }
  .control-bar { padding: 9px 10px 12px; min-height: 0; }
  .hand-hint { font-size: 12.5px; margin-bottom: 8px; }
  .actions { gap: 7px; }
  .actions button { padding: 13px 14px; min-width: 0; flex: 1 1 auto; font-size: 14px; border-radius: 12px; }
  .actions input[type=range] { width: 100%; flex: 1 1 100%; order: 5; margin-top: 4px; }
  .raise-amt { font-size: 14px; min-width: 56px; }
  .log-panel { max-height: 58px; font-size: 10.5px; padding: 6px 12px; }
  .modal-box { padding: 20px 18px; }
  .pass-card h2 { font-size: 28px; }
}
@media (max-width: 760px) and (orientation: landscape) {
  .table-oval { height: 84vh; width: 80vw; }
  .log-panel { display: none; }
}
