/* Vingt: a card table on a Riviera beach-club terrace in daylight. Navy and white striped awning with a scalloped
   valance over the page, the sea and a headland behind the table, a white linen cloth with a navy hem on a teak rim
   (deck planks with caulking), a wooden sabot with brass bands. Type: Kalnia (engraved display serif, like a printed
   menu card) + Spectral (text) + Oxygen Mono (seeds, hashes). */
@font-face { font-family: 'Kalnia'; src: url(/fonts/kalnia.woff2) format('woff2'); font-weight: 100 700; font-display: swap; }
@font-face { font-family: 'Spectral'; src: url(/fonts/spectral-400.woff2) format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Spectral'; src: url(/fonts/spectral-600.woff2) format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Spectral'; src: url(/fonts/spectral-700.woff2) format('woff2'); font-weight: 700 800; font-display: swap; }
@font-face { font-family: 'Spectral'; src: url(/fonts/spectral-italic.woff2) format('woff2'); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: 'Oxygen Mono'; src: url(/fonts/oxygen-mono.woff2) format('woff2'); font-display: swap; }

:root {
  --terrace: #f6f1e7; --paper: #fffdf8; --ink: #14254a; --ink-2: #4d5a75; --line: #d9d3c4;
  --navy: #14254a; --navy-2: #1f3766; --sea: #2a78b5; --sea-lo: #1b5a8e; --sea-hi: #6fb0dc; --sky: #e3eff5;
  --sun: #f2c12e; --sun-lo: #b98a10; --teak: #9c6237; --teak-lo: #5e3820; --teak-hi: #c58a57; --brass: #c99a3c;
  --linen: #f1ece0; --linen-hi: #faf7f0; --terracotta: #c9573a;
  --card-face: #ffffff; --card-edge: #c9cfd9; --court: #eef3f9;
  --suit-red: #c0392b; --suit-black: #14254a;
  --win: #1d7a5a; --lose: #c0392b;
  --display: 'Kalnia', 'Didot', 'Bodoni 72', Georgia, serif;
  --text: 'Spectral', Georgia, 'Times New Roman', serif;
  --mono: 'Oxygen 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 18px/1.5 var(--text); overflow-x: hidden;
  font-variant-numeric: lining-nums tabular-nums;
  background: var(--terrace);
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.7' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .45 0 0 0 0 .38 0 0 0 0 .25 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
}
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--sea); outline-offset: 3px; }

/* ---------- header: the awning. Navy fascia, then a striped valance with a scalloped hem that moves in the breeze ---------- */
.rail-top {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: var(--s5);
  padding: 12px max(24px, env(safe-area-inset-left)) 12px; color: #fbfaf5;
  background: linear-gradient(#1f3766, #14254a 70%, #0f1d3c);
  box-shadow: inset 0 -2px 0 #fbfaf5, inset 0 -3px 0 rgba(0,0,0,.25);
}
.rail-top::before, .rail-top::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 26px; pointer-events: none; transform-origin: 50% 0; }
.rail-top::after {
  background: repeating-linear-gradient(90deg, #14254a 0 28px, #fbfaf5 28px 56px);
  -webkit-mask: radial-gradient(circle at 14px 12px, #000 13.5px, transparent 14px) 0 0 / 28px 26px repeat-x, linear-gradient(#000, #000) 0 0 / 100% 12px no-repeat;
  mask: radial-gradient(circle at 14px 12px, #000 13.5px, transparent 14px) 0 0 / 28px 26px repeat-x, linear-gradient(#000, #000) 0 0 / 100% 12px no-repeat;
  animation: valance 7s ease-in-out infinite;
}
.rail-top::before {
  top: calc(100% + 5px); background: rgba(20,37,74,.22); filter: blur(3px);
  -webkit-mask: radial-gradient(circle at 14px 12px, #000 13.5px, transparent 14px) 0 0 / 28px 26px repeat-x, linear-gradient(#000, #000) 0 0 / 100% 12px no-repeat;
  mask: radial-gradient(circle at 14px 12px, #000 13.5px, transparent 14px) 0 0 / 28px 26px repeat-x, linear-gradient(#000, #000) 0 0 / 100% 12px no-repeat;
  animation: valance 7s ease-in-out infinite;
}
@keyframes valance { 0%, 100% { transform: skewX(0) scaleY(1); } 30% { transform: skewX(-3deg) scaleY(1.04); } 62% { transform: skewX(2deg) scaleY(.98); } }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #fbfaf5; }
.brand svg { width: 44px; height: 44px; filter: drop-shadow(0 3px 3px rgba(0,0,0,.3)); }
.brand span { font: 500 33px/1 var(--display); letter-spacing: .01em; }
.rail-top nav { display: flex; gap: var(--s5); margin-left: var(--s4); }
.rail-top nav a { text-decoration: none; font-weight: 600; font-size: 17px; color: #c9d4e8; padding: 6px 0 3px; border-bottom: 2px solid transparent; }
.rail-top nav a:hover, .rail-top nav a[aria-current] { color: #fff; border-color: var(--sun); }
.btn-wallet { margin-left: auto; }

/* ---------- buttons: lacquered, with an engraved inner frame and a hard lower edge ---------- */
.btn {
  --edge: #8a6420; --frame: rgba(255,255,255,.55); position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 0 24px;
  border: 0; border-radius: 9px; font: 700 18px/1 var(--text); letter-spacing: .015em; cursor: pointer; text-decoration: none;
  box-shadow: 0 4px 0 var(--edge), 0 9px 16px -10px rgba(20,37,74,.55);
  transform: translateY(0); transition: transform .08s, box-shadow .08s, filter .15s; -webkit-tap-highlight-color: transparent; user-select: none;
}
.btn::after { content: ""; position: absolute; inset: 4px; border: 1px solid var(--frame); border-radius: 6px; pointer-events: none; }
.btn:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 var(--edge), 0 3px 6px -4px rgba(20,37,74,.45); }
.btn:disabled { cursor: not-allowed; filter: saturate(.2) opacity(.5); }
.btn-brass { background: linear-gradient(#f8d55c, #f2c12e 55%, #e3ad18); color: var(--navy); --edge: #a77a0c; --frame: rgba(20,37,74,.35); }
.btn-ivory { background: linear-gradient(#ffffff, #f7f3ea); color: var(--navy); --edge: #b8b1a1; --frame: rgba(20,37,74,.28); }
.btn-claret { background: linear-gradient(#3d8bc6, #2a78b5 60%, #236aa2); color: #fff; --edge: #154a77; }
.btn-ink { background: linear-gradient(#253f73, #14254a); color: #fbfaf5; --edge: #070f22; }
.btn-small { min-height: 40px; padding: 0 16px; font-size: 16px; border-radius: 8px; }
.btn kbd { font: 400 12px/1 var(--mono); opacity: .6; border: 1px solid currentColor; border-radius: 4px; padding: 3px 4px 2px; }

/* ---------- the scene behind the table: sky, a headland, the sea; the table stands on the terrace ---------- */
.table-wrap { position: relative; isolation: isolate; padding: 44px 24px 0; max-width: 1220px; margin: 0 auto; }
.table-wrap::before {
  content: ""; position: absolute; z-index: -1; top: 0; left: 50%; width: 100vw; margin-left: -50vw; height: min(64%, 420px);
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='46'%3E%3Crect y='0' width='36' height='7' fill='%23fbfaf5'/%3E%3Crect y='7' width='36' height='1.5' fill='%23c9c0ae'/%3E%3Cpath d='M12 8.5h12c0 4-3 5-3 9 0 5 5 7 5 13 0 4-2 6-2 8h-12c0-2-2-4-2-8 0-6 5-8 5-13 0-4-3-5-3-9z' fill='%23fbfaf5'/%3E%3Cpath d='M21 8.5c0 4 3 5 3 9 0 5-5 7-5 13 0 4 2 6 2 8h3c0-2 2-4 2-8 0-6-5-8-5-13 0-4 3-5 3-9z' fill='%23d9d1c1'/%3E%3Crect y='38.5' width='36' height='7.5' fill='%23efe8da'/%3E%3C/svg%3E") left bottom / 36px 46px repeat-x,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1600 60' preserveAspectRatio='none'%3E%3Cpath d='M0 60V44C60 40 110 26 170 24S280 36 330 40 420 50 470 52L470 60Z' fill='%238fa7bd'/%3E%3Cpath d='M1180 60V54C1260 50 1330 38 1400 36S1520 46 1600 44V60Z' fill='%23a5b9cb'/%3E%3C/svg%3E") left 0 bottom calc(100% - 62%) / 100% 34px no-repeat,
    repeating-linear-gradient(180deg, rgba(255,255,255,0) 0 9px, rgba(255,255,255,.22) 9px 10px, rgba(255,255,255,0) 10px 23px) 0 100% / 100% 38% no-repeat,
    linear-gradient(180deg, #eef5f8 0%, var(--sky) 40%, #d1e5ef 61.9%, var(--sea-hi) 62%, var(--sea) 72%, var(--sea-lo) 100%);
}
.table-wrap::after { content: ""; position: absolute; z-index: -1; left: 50%; width: 100vw; margin-left: -50vw; top: min(64%, 420px); height: 12px;
  background: linear-gradient(rgba(20,37,74,.18), transparent); }
.table-rail {
  position: relative; padding: 18px; border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.22), rgba(255,255,255,0) 30%, rgba(40,20,5,.18)),
    repeating-linear-gradient(90deg, #8f5833 0 2px, #a96d40 3px, #b67a4b 30px, #9c6237 58px, #8a532f 86px, #2b1a0f 86px 88px),
    #9c6237;
  box-shadow: 0 0 0 2px #6a3d20, inset 0 2px 0 rgba(255,236,205,.45), inset 0 -3px 0 rgba(40,20,5,.35), 0 30px 46px -26px rgba(20,37,74,.75);
}
#felt {
  height: clamp(420px, calc(100vh - 370px), 620px); height: clamp(420px, calc(100svh - 370px), 620px);
  border-radius: 10px; container-type: inline-size;
  background:
    linear-gradient(90deg, rgba(20,37,74,.05) 0 1px, transparent 1px) 0 0 / 3px 3px,
    linear-gradient(0deg, rgba(20,37,74,.045) 0 1px, transparent 1px) 0 0 / 3px 3px,
    radial-gradient(70% 60% at 50% 30%, var(--linen-hi), var(--linen) 75%, #e8e1d1);
  box-shadow: inset 0 0 0 1px rgba(20,37,74,.25), inset 0 10px 18px -12px rgba(20,37,74,.35);
}
/* the navy hem stitched into the cloth: a line and a finer second line inside it */
#felt::after { content: ""; position: absolute; inset: 11px; border-radius: 4px; pointer-events: none;
  border: 1.5px solid rgba(20,37,74,.5); outline: 1px solid rgba(20,37,74,.28); outline-offset: -6px; }
#felt::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: .5; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .55 0 0 0 0 .5 0 0 0 0 .4 0 0 0 .16 0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%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: 500 34px var(--display); letter-spacing: 1px; fill: var(--navy); opacity: .82; }
.print-small { font: 600 13px var(--text); letter-spacing: 3px; fill: var(--navy); opacity: .58; }
.print-narrow .print-big { font-size: 24px; letter-spacing: .5px; }
.print-narrow .print-small { font-size: 11.5px; letter-spacing: 2px; }
.felt .spot { border: 1.6px solid rgba(20,37,74,.6); box-shadow: 0 0 0 5px rgba(20,37,74,.04); }
.felt .spot::after { content: ""; position: absolute; inset: 6px; border-radius: 50%; border: 1px solid rgba(20,37,74,.35); }
.felt .card .face, .felt .card .back { box-shadow: 0 1px 0 rgba(20,37,74,.18), 0 8px 12px -6px rgba(20,37,74,.45); }
.felt .card.won .face { box-shadow: 0 0 0 2.5px var(--sun), 0 8px 16px -8px rgba(20,37,74,.5); }
.felt .card.dead .card-inner { filter: saturate(.4) brightness(.86); }
.cardface > rect:first-child { stroke-width: 1.2; }
.cx-rank { font: 700 22px var(--text); letter-spacing: -.5px; }
.cx-court { font: 500 44px var(--display); }
.chip-label { font: 700 14px var(--text); }
.felt .total {
  font: 500 calc(var(--card-w) * .27) / 1 var(--display); color: var(--navy); padding: 7px 12px 6px; border-radius: 4px;
  background: #fffdf8; box-shadow: inset 0 0 0 1px rgba(20,37,74,.5), inset 0 0 0 3px #fffdf8, inset 0 0 0 3.6px rgba(20,37,74,.35), 0 4px 8px -4px rgba(20,37,74,.4);
}
.felt .total.bust { color: #fff; background: var(--terracotta); box-shadow: 0 3px 0 #8e3520; }
.felt .total.bj { color: var(--navy); background: linear-gradient(#ffe07a, var(--sun)); box-shadow: inset 0 0 0 1px rgba(20,37,74,.45), 0 3px 0 var(--sun-lo); }
.felt .total.active { box-shadow: inset 0 0 0 2px var(--sea), 0 0 0 3px rgba(42,120,181,.25); }
.felt .discard.has::before { content: ""; position: absolute; inset: 0; border-radius: 7px; background: #14254a; border: 3px solid #ffffff;
  box-shadow: 1px 1px 0 #d9dde5, 2px 2px 0 #fff, 3px 3px 0 #cfd5df, calc(var(--n,1) * 1px + 3px) calc(var(--n,1) * 1px + 3px) 0 #c3cad6, 0 10px 14px -8px rgba(20,37,74,.5); transform: rotate(-6deg); }
.felt .rack svg .rack-body { fill: #8a5530; }
.felt .rack svg .rack-lip { fill: #c99a3c; }
.felt .rack { filter: drop-shadow(0 6px 6px rgba(20,37,74,.3)); }
.felt .shoe { filter: drop-shadow(0 10px 10px rgba(20,37,74,.4)); }

/* the dealer's line under the table, set like the line on a menu card */
.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: italic 400 23px/1.3 var(--text); color: var(--ink); max-width: 46ch; text-align: center; }
.talk .dealer-line.in { animation: line-in .5s ease-out; }
@keyframes line-in { from { opacity: 0; transform: translateY(4px); } }

/* ---------- the player's side ---------- */
.controls { max-width: 1100px; margin: 0 auto; padding: var(--s3) 24px 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 .15s cubic-bezier(.3,1.5,.5,1); -webkit-tap-highlight-color: transparent; filter: drop-shadow(0 4px 3px rgba(20,37,74,.22)); }
.chipbtn:hover:not(:disabled) { transform: translateY(-5px); }
.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: 500 32px/1 var(--display); min-width: 4ch; text-align: right; color: var(--ink); }
.betamt small { font: 600 15px var(--text); color: var(--ink-2); margin-left: 6px; }
.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; }
.under { max-width: 1100px; margin: 0 auto; padding: var(--s4) 24px 0; display: flex; flex-wrap: wrap; gap: var(--s2) var(--s5); color: var(--ink-2); font-size: 16px; }
.under b { color: var(--ink); font-weight: 700; }
.under .mono, .mono { font-family: var(--mono); font-size: .86em; word-break: break-all; }
.under button.link, .link { background: none; border: 0; padding: 0; text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; cursor: pointer; color: var(--ink); font-weight: 700; }
.testnote { color: var(--sea-lo); font-weight: 600; font-style: italic; }

/* ---------- under the table ---------- */
.sect { max-width: 1100px; margin: 0 auto; padding: var(--s8) 24px 0; }
.sect h2 { font: 500 clamp(30px, 3.6vw, 42px)/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: 17px; }
.floor th { text-align: left; font-weight: 600; color: var(--ink-2); font-size: 13px; letter-spacing: .14em; text-transform: uppercase; padding: 0 8px 9px; border-bottom: 1px solid var(--ink); box-shadow: 0 3px 0 -2px 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: 700; }
.floor .down { color: var(--lose); font-weight: 700; }
.floor tr.new td { animation: rowin 1.3s ease-out; }
@keyframes rowin { from { background: rgba(242,193,46,.35); } }
.empty { color: var(--ink-2); padding: var(--s4) 0; font-style: italic; }
/* the house rules as a printed menu card: double navy frame, dotted leaders between item and value */
.placard { background: var(--paper); color: var(--ink); border-radius: 3px; padding: var(--s6) var(--s5) var(--s5); text-align: left;
  box-shadow: inset 0 0 0 10px var(--paper), inset 0 0 0 11px var(--navy), inset 0 0 0 14px var(--paper), inset 0 0 0 15px rgba(20,37,74,.45), 0 22px 34px -24px rgba(20,37,74,.6); }
.placard h3 { font: 500 30px/1.1 var(--display); margin: 0 0 var(--s3); text-align: center; }
.placard ul { margin: 0; padding: 0 6px; list-style: none; }
.placard li { padding: 7px 0 5px; display: flex; align-items: baseline; gap: 0; }
.placard li::after { content: ""; order: 1; flex: 1 1 18px; min-width: 18px; margin: 0 8px; border-bottom: 2px dotted rgba(20,37,74,.4); transform: translateY(-4px); }
.placard li b { order: 2; font-weight: 700; text-align: right; max-width: 62%; }
.placard .muted { color: var(--ink-2); padding: 0 8px 8px; }
.placard a { color: var(--ink); }
.edge { font: 500 66px/1 var(--display); color: var(--sea); margin: var(--s4) 0 var(--s2); text-align: center; }

/* ---------- inner pages ---------- */
.page { max-width: 980px; margin: 0 auto; padding: calc(var(--s7) + 10px) 24px 0; }
.page h1 { font: 500 clamp(40px, 6vw, 64px)/1 var(--display); margin: 0 0 var(--s5); color: var(--navy); }
.page h2 { font: 500 30px/1.1 var(--display); margin: var(--s7) 0 var(--s3); }
.page p, .page li { max-width: 68ch; }
.page .lead { font-size: 21px; }
.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: 3px; }
.strategy th { color: var(--ink-2); font-weight: 600; }
.strategy td.H { background: #ece6d8; } .strategy td.S { background: var(--sun); } .strategy td.D { background: var(--sea); color: #fff; } .strategy td.P { background: var(--navy); 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: 1.5px solid var(--ink); border-radius: 6px; background: #fff; color: var(--ink); min-width: 0; }
.check { margin-top: var(--s4); padding: var(--s4) var(--s5); border-radius: 4px; background: var(--paper); box-shadow: inset 0 0 0 1.5px var(--ink), inset 0 0 0 4px var(--paper), inset 0 0 0 5px rgba(20,37,74,.35); }
.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,37,74,.25)); }

.foot { max-width: 1100px; margin: var(--s8) auto 0; padding: var(--s5) 24px var(--s7); border-top: 1px solid var(--ink); box-shadow: inset 0 3px 0 -2px var(--ink); color: var(--ink-2); font-size: 16px; }
.foot-links { display: flex; gap: var(--s5); flex-wrap: wrap; font-weight: 600; }
.castrip { background: var(--sun); color: var(--navy); text-align: center; padding: 34px 16px 8px; font-weight: 700; }
.castrip span { overflow-wrap: anywhere; font-family: var(--mono); }

dialog { border: 0; border-radius: 4px; padding: 0; width: min(460px, calc(100vw - 32px)); background: var(--paper); color: var(--ink);
  box-shadow: inset 0 0 0 1.5px var(--navy), inset 0 0 0 5px var(--paper), inset 0 0 0 6px rgba(20,37,74,.35), 0 30px 60px -20px rgba(20,37,74,.55); }
dialog::backdrop { background: rgba(20,37,74,.45); }
.dlg-head { display: flex; align-items: center; justify-content: space-between; padding: var(--s4) var(--s5); border-bottom: 1px solid rgba(20,37,74,.35); margin: 0 8px; }
.dlg-head h2 { margin: 0; font: 500 26px/1 var(--display); color: var(--navy); }
.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: 1.5px solid var(--ink); border-radius: 6px; background: #fff; font-weight: 700; 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: 16px; margin: 0; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 140%); visibility: hidden; background: var(--navy); color: #fbfaf5; padding: 13px 18px 11px; border-radius: 6px; font-weight: 600; 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: 17px; }
  .rail-top { padding: 9px 14px 10px; gap: var(--s3); }
  .rail-top::before, .rail-top::after { height: 20px; }
  .brand span { font-size: 28px; }
  .brand svg { width: 38px; height: 38px; }
  .btn-wallet { min-height: 42px; padding: 0 14px; font-size: 15.5px; }
  .table-wrap { padding: 34px 8px 0; }
  .table-wrap::before { height: min(52%, 330px); background-size: 24px 31px, 100% 34px, 100% 38%, auto; }
  .table-wrap::after { top: min(52%, 330px); }
  .table-rail { padding: 10px; border-radius: 16px; }
  #felt { height: clamp(400px, calc(100vh - 300px), 540px); height: clamp(400px, calc(100svh - 300px), 540px); border-radius: 8px; }
  #felt::after { inset: 7px; outline-offset: -5px; }
  .talk { min-height: 58px; }
  .talk .dealer-line { font-size: 19.5px; }
  .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: 15px; }
  .sect { padding: var(--s7) 14px 0; }
  .floor .hide-s { display: none; }
  .page { padding: var(--s7) 14px 0; }
  .strategy th, .strategy td { width: 26px; height: 24px; font-size: 11.5px; }
  .placard { padding: var(--s6) 20px 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .rail-top::before, .rail-top::after { animation: none !important; }
}
