/* Pop: a cobalt card table in a sunny room, red tuck-and-roll vinyl rail with chrome trim, cream vinyl header.
   Your hand is a red latex balloon tied to the bet (pop.js): it grows with your total and pops at 22. */
@font-face { font-family: 'Agbalumo'; src: url(/fonts/agbalumo.woff2) format('woff2'); font-display: swap; }
@font-face { font-family: 'League Spartan'; src: url(/fonts/spartan.woff2) format('woff2'); font-weight: 300 900; font-display: swap; }
@font-face { font-family: 'PT Mono'; src: url(/fonts/ptmono.woff2) format('woff2'); font-display: swap; }

:root {
  --room: #e3ebf3; --room-hi: #f4f8fb; --paper: #ffffff; --ink: #141a33; --ink-2: #545c78; --line: #cfd8e4;
  --felt: #2445a6; --felt-hi: #3c63cc; --felt-lo: #152b72;
  --red: #d9262e; --red-hi: #f0524f; --red-lo: #8f0f18;
  --cream: #f6efe2; --cream-lo: #dfd2bc; --chrome: #b9c0ca;
  --sun: #f4b11f; --teal: #10897b;
  --card-face: #fffdf8; --card-edge: #cdd3df; --court: #eaf0fb;
  --suit-red: #d4202a; --suit-black: #141a33;
  --win: #10897b; --lose: #d4202a;
  --display: 'Agbalumo', 'Cooper Black', Georgia, serif;
  --text: 'League Spartan', 'Futura', 'Helvetica Neue', Arial, sans-serif;
  --mono: 'PT Mono', ui-monospace, Menlo, monospace;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 72px;
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; color: var(--ink); font: 400 17px/1.45 var(--text); overflow-x: hidden;
  font-variant-numeric: tabular-nums lining-nums;
  background: var(--room);
  background-image:
    linear-gradient(115deg, rgba(255,255,255,.55) 0%, rgba(255,255,255,0) 38%),
    radial-gradient(900px 420px at 18% 120px, rgba(255,246,214,.7), transparent 70%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .1 0 0 0 0 .15 0 0 0 0 .3 0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--felt); outline-offset: 3px; }

/* ---------- header: cream tuck-and-roll vinyl with a chrome strip ---------- */
.rail-top {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: var(--s5);
  padding: 12px max(22px, env(safe-area-inset-left)) 16px; color: var(--ink);
  background:
    linear-gradient(rgba(255,255,255,.5), rgba(255,255,255,0) 40%, rgba(120,95,60,.12)),
    repeating-linear-gradient(90deg, #d8cab2 0 1.5px, #efe5d3 3px, #fffaf1 11px, #f3ead9 17px, #dccfb8 22px, #d8cab2 23.5px);
  box-shadow: 0 2px 0 rgba(20,26,51,.05), 0 12px 22px -16px rgba(20,26,51,.55);
}
.rail-top::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 6px; pointer-events: none;
  background: linear-gradient(#f6f8fb, #b4bbc6 45%, #868d98 55%, #dde1e7); box-shadow: 0 1px 0 rgba(0,0,0,.18); }
.brand { display: flex; align-items: center; gap: 6px; text-decoration: none; color: var(--ink); }
.brand svg { width: 46px; height: 46px; filter: drop-shadow(0 5px 4px rgba(120,10,20,.25)); transform-origin: 50% 85%; animation: logo-bob 5s ease-in-out infinite; }
@keyframes logo-bob { 50% { transform: translateY(-2px) rotate(3deg); } }
.brand span { font: 400 34px/1 var(--display); color: var(--red); letter-spacing: .005em; text-shadow: 0 1px 0 #fff; }
.rail-top nav { display: flex; gap: var(--s5); margin-left: var(--s4); }
.rail-top nav a { text-decoration: none; font-weight: 650; font-size: 17px; color: var(--ink-2); padding: 6px 0 3px; border-bottom: 3px solid transparent; }
.rail-top nav a:hover, .rail-top nav a[aria-current] { color: var(--ink); border-color: var(--red); }
.btn-wallet { margin-left: auto; }

/* ---------- buttons: glossy vinyl with a hard bottom edge ---------- */
.btn {
  --edge: #6a0a11; position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 0 24px;
  border: 0; border-radius: 16px; font: 750 18px/1 var(--text); letter-spacing: .01em; cursor: pointer; text-decoration: none; padding-top: 3px;
  box-shadow: 0 5px 0 var(--edge), 0 8px 16px -8px rgba(20,26,51,.5); transform: translateY(0); transition: transform .08s, box-shadow .08s, filter .15s;
  -webkit-tap-highlight-color: transparent; user-select: none; overflow: hidden;
}
.btn::before { content: ""; position: absolute; left: 8%; right: 8%; top: 3px; height: 38%; border-radius: 12px 12px 40% 40%; background: linear-gradient(rgba(255,255,255,.42), rgba(255,255,255,0)); pointer-events: none; }
.btn:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 1px 0 var(--edge), 0 2px 6px -4px rgba(20,26,51,.45); }
.btn:disabled { cursor: not-allowed; filter: saturate(.25) opacity(.5); }
.btn-brass { background: linear-gradient(#f04a4b, #d9262e 60%, #c11c25); color: #fff8ef; --edge: #7c0b13; }
.btn-ivory { background: linear-gradient(#ffffff, #f4ecdd 60%, #e9dcc5); color: var(--ink); --edge: #b3a283; }
.btn-claret { background: linear-gradient(#4a6fd6, #2c4fb3 60%, #22409b); color: #f6f8ff; --edge: #0f2160; }
.btn-ink { background: linear-gradient(#2c3557, #141a33); color: #f6efe2; --edge: #05070f; }
.btn-small { min-height: 40px; padding: 2px 16px 0; font-size: 15.5px; border-radius: 12px; }
.btn kbd { font: 400 12px/1 var(--mono); opacity: .6; border: 1px solid currentColor; border-radius: 5px; padding: 3px 4px 2px; }

/* ---------- the table: red tuck-and-roll rail, chrome edge, cobalt felt ---------- */
.table-wrap { padding: var(--s5) 22px 0; max-width: 1360px; margin: 0 auto; }
.table-rail {
  position: relative; padding: 20px 20px 24px; border-radius: 44px 44px 150px 150px / 44px 44px 120px 120px;
  background:
    radial-gradient(120% 90% at 30% 0%, rgba(255,255,255,.28), transparent 55%),
    repeating-conic-gradient(from -90deg at 50% 30%, #c81f28 0deg 1.4deg, #e5383b 2.2deg 3.6deg, #c81f28 4.2deg 5deg),
    #c81f28;
  box-shadow: 0 0 0 3px #d9dde3, 0 0 0 5px #8b929c, 0 0 0 6px #eef0f3, inset 0 3px 2px rgba(255,255,255,.35), inset 0 -12px 18px rgba(80,0,8,.45), 0 34px 50px -30px rgba(20,26,51,.7);
}
.table-rail::before { content: ""; position: absolute; inset: 15px 15px 19px; border-radius: 30px 30px 134px 134px / 30px 30px 106px 106px; pointer-events: none;
  box-shadow: 0 0 0 4px #f6efe2, 0 0 0 5px rgba(80,0,8,.35), 0 3px 0 4px rgba(80,0,8,.25); }
#felt {
  height: clamp(420px, calc(100vh - 360px), 620px); height: clamp(420px, calc(100svh - 360px), 620px);
  border-radius: 26px 26px 128px 128px / 26px 26px 100px 100px; container-type: inline-size;
  background:
    radial-gradient(55% 70% at 26% 18%, rgba(255,250,225,.20), transparent 70%),
    radial-gradient(130% 115% at 45% 22%, var(--felt-hi) 0%, var(--felt) 48%, var(--felt-lo) 100%);
  box-shadow: inset 0 0 0 2px rgba(6,14,48,.4), inset 0 16px 30px -18px rgba(6,14,48,.8), inset 0 -26px 50px -30px rgba(6,14,48,.7);
}
#felt::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: .55; mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.25' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='.6'/%3E%3C/svg%3E"); }
.felt .print { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.felt .print-narrow { display: none; }
@container (max-width: 640px) { .felt .print-wide { display: none; } .felt .print-narrow { display: block; } }
.print-big { font: 800 30px var(--text); letter-spacing: 6px; fill: #fff3e4; opacity: .86; }
.print-small { font: 600 13px var(--text); letter-spacing: 2.6px; fill: #fff3e4; opacity: .62; }
.print-narrow .print-big { font-size: 21px; letter-spacing: 3px; }
.print-narrow .print-small { font-size: 12px; letter-spacing: 2px; }
.felt .spot { border: 2.5px solid rgba(255,243,228,.78); box-shadow: 0 0 0 6px rgba(255,243,228,.07); }
.felt .spot::after { content: ""; position: absolute; inset: 9px; border-radius: 50%; border: 1px dashed rgba(255,243,228,.32); }
.felt .card .face, .felt .card .back { box-shadow: 0 1px 0 rgba(6,14,48,.25), 0 7px 12px -6px rgba(6,14,48,.6); }
.felt .card.won .face { box-shadow: 0 0 0 2.5px var(--sun), 0 8px 16px -8px rgba(6,14,48,.6); }
.felt .card.dead .card-inner { filter: saturate(.35) brightness(.7); }
.cardface > rect:first-child { stroke-width: 1.4; }
.cx-rank { font: 800 21px var(--text); letter-spacing: -1px; }
.cx-court { font: 400 46px var(--display); }
.chip-label { font: 800 13px var(--text); }
.felt .total {
  font: 400 calc(var(--card-w) * .3) / 1 var(--display); color: #fff3e4; padding: 7px 12px 5px; border-radius: 14px;
  background: rgba(10,20,60,.55); box-shadow: inset 0 0 0 1.5px rgba(255,243,228,.28);
}
.felt .total.bust { color: #fff; background: var(--red); box-shadow: 0 3px 0 var(--red-lo); animation: total-bust .5s cubic-bezier(.3,1.6,.5,1); }
@keyframes total-bust { 0% { transform: translate(-100%, 0) scale(1.35); } }
.felt .total.bj { color: var(--ink); background: linear-gradient(#ffd769, var(--sun)); box-shadow: 0 3px 0 #a16f05; }
.felt .total.active { box-shadow: 0 0 0 2.5px var(--sun); }
.felt.bl-on:not(.bl-two) .total-p { visibility: hidden; }
.felt .discard.has::before { content: ""; position: absolute; inset: 0; border-radius: 7px; background: #d9262e; border: 3px solid #fffdf8;
  box-shadow: 1px 1px 0 #e1e5ec, 2px 2px 0 #fffdf8, 3px 3px 0 #cfd5df, calc(var(--n,1) * 1px + 3px) calc(var(--n,1) * 1px + 3px) 0 #c3cad6, 0 10px 14px -8px rgba(6,14,48,.6); transform: rotate(7deg); }
.felt .rack svg .rack-body { fill: #f4ede1; }
.felt .rack svg .rack-lip { fill: #b9c0ca; }
.felt .rack { filter: drop-shadow(0 6px 6px rgba(6,14,48,.35)); }
.felt .shoe { filter: drop-shadow(0 10px 10px rgba(6,14,48,.45)); }
.felt .shoe.kick { animation: shoe-nudge .26s ease-out; }
@keyframes shoe-nudge { 35% { transform: translate(-2px, 1px) rotate(-.8deg) scale(1.01); } }

/* ---------- the balloon (pop.js) ---------- */
.felt .bl-string { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; transition: opacity .25s; }
.felt .bl-string.gone { opacity: 0; transition: opacity .05s; }
.bl-cord { fill: none; stroke: #fff6ea; stroke-width: 1.7; stroke-linecap: round; }
.bl-cord-s { fill: none; stroke: rgba(6,14,48,.35); stroke-width: 2.2; transform: translate(2px, 4px); }
.felt .bl { position: absolute; pointer-events: none; transform-origin: 50% 84%; transform: scale(var(--s, .4));
  transition: transform .62s cubic-bezier(.34,1.56,.64,1), opacity .3s; filter: drop-shadow(0 14px 12px rgba(6,14,48,.38)); }
.felt .bl .bl-fly, .felt .bl .bl-sway { width: 100%; height: 100%; transform-origin: 50% 84%; }
.felt .bl svg { display: block; width: 100%; height: 100%; overflow: visible; }
.felt .bl .bl-sway { animation: bl-bob 3.8s ease-in-out infinite; }
.felt .bl.idle .bl-sway { animation-duration: 5.2s; }
.felt .bl.tight .bl-sway { animation: bl-strain .11s linear infinite; }
.felt .bl.max .bl-sway { animation: bl-strain .07s linear infinite; }
.felt .bl.max .bl-body { filter: saturate(1.15) brightness(1.06); }
.felt .bl.popped { opacity: 0; transition: opacity .04s; }
.felt .bl .bl-tail { opacity: 0; }
.felt .bl.free .bl-tail { opacity: 1; }
.felt .bl.sad { transition: transform 1.4s cubic-bezier(.5,0,.4,1); }
.felt .bl.sad .bl-sway { animation: none; }
.felt .bl.sad .bl-body { filter: saturate(.7) brightness(.82); transition: filter 1.2s; }
.bl-num { font: 400 44px var(--display); fill: #fff3e4; opacity: .93; }
@keyframes bl-bob { 0%, 100% { transform: rotate(-2.2deg) translateY(0); } 50% { transform: rotate(2.4deg) translateY(-1.5%); } }
@keyframes bl-strain { 0% { transform: translate(0, 0) scale(1); } 25% { transform: translate(-.7%, .3%) scale(1.006, .996); } 50% { transform: translate(.6%, -.3%) scale(.997, 1.005); } 75% { transform: translate(-.3%, -.2%) scale(1.004, 1); } }
.felt .bl-shred { position: absolute; pointer-events: none; margin: -6px 0 0 -6px; }
.felt .bl-shred svg { display: block; width: 100%; height: 100%; fill: #d9262e; filter: drop-shadow(0 2px 1px rgba(6,14,48,.35)); }
.felt .bl-ring { position: absolute; border-radius: 50%; border: 3px solid #fff6ea; pointer-events: none; }
@media (prefers-reduced-motion: reduce) {
  .brand svg, .felt .bl .bl-sway, .felt .total.bust { animation: none !important; }
  .felt .bl { transition: none; }
}

/* the voice under the table */
.talk { min-height: 66px; display: flex; align-items: center; justify-content: center; padding: var(--s3) var(--s4) 0; }
.talk .dealer-line { position: static; transform: none; font: 700 23px/1.25 var(--text); color: var(--ink); max-width: 44ch; text-align: center; letter-spacing: -.005em; }
.talk .dealer-line.in { animation: line-pop .42s cubic-bezier(.3,1.5,.5,1); }
@keyframes line-pop { from { opacity: 0; transform: scale(.94); } }

/* ---------- the player's side: chips, bet, buttons ---------- */
.controls { max-width: 1100px; margin: 0 auto; padding: var(--s3) 22px 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s4) var(--s6); align-items: center; }
.chips { display: flex; gap: 10px; flex-wrap: wrap; }
.chipbtn { width: 66px; padding: 0; border: 0; background: none; cursor: pointer; transition: transform .14s cubic-bezier(.3,1.6,.5,1); -webkit-tap-highlight-color: transparent; filter: drop-shadow(0 4px 3px rgba(20,26,51,.25)); }
.chipbtn:hover:not(:disabled) { transform: translateY(-5px) rotate(-3deg); }
.chipbtn:active:not(:disabled) { transform: translateY(1px) scale(.96); }
.chipbtn:disabled { opacity: .32; cursor: not-allowed; }
.betbox { display: flex; align-items: center; gap: var(--s3); justify-content: flex-end; flex-wrap: wrap; }
.betamt { font: 400 32px/1 var(--display); min-width: 4ch; text-align: right; color: var(--ink); }
.betamt small { font: 700 14px var(--text); color: var(--ink-2); margin-left: 5px; }
.acts { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s3); }
.acts .btn { min-height: 60px; font-size: 20px; }
.acts .btn small { font-weight: 600; opacity: .7; font-size: 13px; }
.under { max-width: 1100px; margin: 0 auto; padding: var(--s4) 22px 0; display: flex; flex-wrap: wrap; gap: var(--s2) var(--s5); color: var(--ink-2); font-size: 15px; }
.under b { color: var(--ink); font-weight: 750; }
.under .mono, .mono { font-family: var(--mono); font-size: .9em; word-break: break-all; }
.under button.link, .link { background: none; border: 0; padding: 0; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; cursor: pointer; color: var(--ink); font-weight: 700; }
.testnote { color: var(--felt); font-weight: 700; }

/* ---------- under the table ---------- */
.sect { max-width: 1100px; margin: 0 auto; padding: var(--s8) 22px 0; }
.sect h2 { font: 400 clamp(32px, 4vw, 44px)/1.05 var(--display); margin: 0 0 var(--s5); color: var(--ink); }
.two { display: grid; grid-template-columns: 1.15fr .85fr; gap: var(--s7); align-items: start; }
.floor { width: 100%; border-collapse: collapse; font-size: 16px; }
.floor th { text-align: left; font-weight: 700; color: var(--ink-2); font-size: 14px; padding: 0 8px 8px; border-bottom: 2.5px solid var(--ink); }
.floor td { padding: 11px 8px 9px; border-bottom: 1px solid var(--line); }
.floor td.n, .floor th.n { text-align: right; }
.floor .up { color: var(--win); font-weight: 750; }
.floor .down { color: var(--lose); font-weight: 750; }
.floor tr.new td { animation: rowin 1.3s ease-out; }
@keyframes rowin { from { background: rgba(244,177,31,.4); } }
.empty { color: var(--ink-2); padding: var(--s4) 0; }
/* the house rules as a little table of their own: cobalt felt in a cream-and-red rim */
.placard { background: radial-gradient(120% 100% at 30% 10%, var(--felt-hi), var(--felt) 55%, var(--felt-lo)); color: #f3f1ea; border-radius: 26px; padding: var(--s6) var(--s5) var(--s5);
  box-shadow: inset 0 0 0 6px var(--cream), inset 0 0 0 9px var(--red), inset 0 0 0 10px rgba(80,0,8,.5), 0 22px 32px -22px rgba(20,26,51,.7); }
.placard h3 { font: 400 28px/1.1 var(--display); margin: 0 0 var(--s3); color: #fff3e4; }
.placard ul { margin: 0; padding: 0; list-style: none; }
.placard li { padding: 8px 0 6px; border-bottom: 1px solid rgba(255,243,228,.18); display: flex; justify-content: space-between; gap: var(--s4); }
.placard li:last-child { border: 0; }
.placard li b { font-weight: 750; text-align: right; color: #fff; }
.placard .muted { color: rgba(243,241,234,.78); }
.placard a { color: #fff; }
.edge { font: 400 66px/1 var(--display); color: var(--sun); margin: var(--s4) 0 var(--s2); }

/* ---------- inner pages ---------- */
.page { max-width: 980px; margin: 0 auto; padding: var(--s7) 22px 0; }
.page h1 { font: 400 clamp(42px, 6vw, 66px)/1 var(--display); margin: 0 0 var(--s5); color: var(--red); }
.page h2 { font: 400 31px/1.1 var(--display); margin: var(--s7) 0 var(--s3); }
.page p, .page li { max-width: 68ch; }
.page .lead { font-size: 20px; }
.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 24px; margin: 0; }
.kv dt { color: var(--ink-2); }
.kv dd { margin: 0; font-weight: 700; min-width: 0; overflow-wrap: anywhere; }
.strategy { border-collapse: separate; border-spacing: 2px; font: 700 13px var(--text); margin: var(--s3) 0; }
.strategy th, .strategy td { width: 34px; height: 28px; text-align: center; border-radius: 5px; }
.strategy th { color: var(--ink-2); font-weight: 650; }
.strategy td.H { background: #f1e9da; } .strategy td.S { background: var(--sun); } .strategy td.D { background: var(--felt); color: #fff; } .strategy td.P { background: var(--red); color: #fff; }
.scroll-x { overflow-x: auto; max-width: 100%; }
.form { display: grid; gap: var(--s3); max-width: 640px; }
.form label { font-weight: 700; display: grid; gap: 6px; }
.form input { font: 400 16px var(--mono); padding: 12px 14px; border: 2px solid var(--ink); border-radius: 12px; background: #fff; color: var(--ink); min-width: 0; }
.check { margin-top: var(--s4); padding: var(--s4) var(--s5); border-radius: 18px; background: var(--paper); border: 2px solid var(--ink); }
.check .ok { color: var(--win); font-weight: 800; }
.check .no { color: var(--lose); font-weight: 800; }
.minicards { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0; }
.minicards svg { width: 46px; height: auto; filter: drop-shadow(0 2px 2px rgba(20,26,51,.25)); }

.foot { max-width: 1100px; margin: var(--s8) auto 0; padding: var(--s5) 22px var(--s7); border-top: 2.5px solid var(--ink); color: var(--ink-2); font-size: 15px; }
.foot-links { display: flex; gap: var(--s5); flex-wrap: wrap; font-weight: 650; }
.castrip { background: var(--sun); color: var(--ink); text-align: center; padding: 8px 16px; font-weight: 750; }
.castrip span { overflow-wrap: anywhere; font-family: var(--mono); }

dialog { border: 2px solid var(--ink); border-radius: 22px; padding: 0; width: min(460px, calc(100vw - 32px)); background: var(--paper); color: var(--ink); box-shadow: 0 30px 60px -20px rgba(20,26,51,.55); }
dialog::backdrop { background: rgba(20,26,51,.5); }
.dlg-head { display: flex; align-items: center; justify-content: space-between; padding: var(--s4) var(--s5); border-bottom: 2px solid var(--ink); }
.dlg-head h2 { margin: 0; font: 400 26px/1 var(--display); color: var(--red); }
.dlg-x { border: 0; background: none; font-size: 28px; line-height: 1; cursor: pointer; padding: 4px 8px; }
.dlg-body { padding: var(--s5); display: grid; gap: var(--s3); }
.wallets { display: grid; gap: var(--s2); }
.wallets button { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 2px solid var(--ink); border-radius: 14px; background: #fff; font-weight: 750; cursor: pointer; text-align: left; box-shadow: 0 3px 0 var(--ink); }
.wallets button:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
.wallets img { width: 28px; height: 28px; border-radius: 6px; }
.muted { color: var(--ink-2); font-size: 15px; margin: 0; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 140%); visibility: hidden; background: var(--ink); color: #fff3e4; padding: 13px 18px 11px; border-radius: 14px; font-weight: 650; transition: transform .25s; z-index: 50; max-width: calc(100vw - 32px); }
.toast.on { transform: translate(-50%, 0); visibility: visible; }

@media (max-width: 900px) {
  .rail-top nav { display: none; }
  .two { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .rail-top { padding: 9px 14px 14px; gap: var(--s3); }
  .brand span { font-size: 29px; }
  .brand svg { width: 40px; height: 40px; }
  .btn-wallet { min-height: 42px; padding: 2px 14px 0; font-size: 15px; }
  .table-wrap { padding: var(--s3) 8px 0; }
  .table-rail { padding: 11px 11px 14px; border-radius: 28px 28px 70px 70px / 28px 28px 50px 50px; }
  .table-rail::before { inset: 7px 7px 10px; border-radius: 22px 22px 62px 62px / 22px 22px 44px 44px; box-shadow: 0 0 0 3px #f6efe2, 0 0 0 4px rgba(80,0,8,.35); }
  #felt { height: clamp(400px, calc(100vh - 300px), 540px); height: clamp(400px, calc(100svh - 300px), 540px); border-radius: 18px 18px 58px 58px / 18px 18px 40px 40px; }
  .talk { min-height: 58px; }
  .talk .dealer-line { font-size: 19px; }
  .controls { grid-template-columns: minmax(0, 1fr); padding: var(--s2) 14px 0; }
  .chips { justify-content: center; gap: 6px; }
  .chipbtn { width: 52px; }
  .betbox { justify-content: center; }
  .acts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .acts .btn { min-height: 56px; }
  .under { padding: var(--s4) 14px 0; font-size: 14px; }
  .sect { padding: var(--s7) 14px 0; }
  .floor .hide-s { display: none; }
  .page { padding: var(--s6) 14px 0; }
  .strategy th, .strategy td { width: 26px; height: 24px; font-size: 11.5px; }
}
