/* Split: the card salon of a 1930s ocean liner at dusk. Black lacquer wall panels, polished chrome, portholes with the
   sea rolling behind the glass, a jade felt table in a lacquer rail with a chrome band, ivory cards. Type: Federo (deco
   display) + Raleway (text) + Recursive Mono (seeds, hashes). */
@font-face { font-family: 'Federo'; src: url(/fonts/federo.woff2) format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Raleway'; src: url(/fonts/raleway.woff2) format('woff2'); font-weight: 400 800; font-display: swap; }
@font-face { font-family: 'Raleway'; src: url(/fonts/raleway-italic.woff2) format('woff2'); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: 'Recursive Mono'; src: url(/fonts/recursive-mono.woff2) format('woff2'); font-display: swap; }
@property --roll { syntax: '<angle>'; inherits: false; initial-value: 0deg; }

:root {
  --lacquer: #121110; --lacquer-2: #1d1b19; --lacquer-3: #2c2926; --lacquer-hi: #3a3632;
  --ivory: #f0e8d6; --ivory-hi: #fbf7ee; --ivory-2: #b9b0a0; --line: rgba(240,232,214,.18);
  --chrome: #c4cbd0; --chrome-hi: #f4f6f7; --chrome-lo: #5d656c;
  --jade: #0f6e58; --jade-hi: #1d8a6f; --jade-lo: #0a4a3c; --jade-ink: #8fd6bc;
  --cinnabar: #c8432b; --dusk: #e9a979; --sea: #2d5b73;
  --ink: var(--ivory); --ink-2: var(--ivory-2);
  --card-face: #fbf7ee; --card-edge: #cfc6b2; --court: #eef1ee;
  --suit-red: #c8432b; --suit-black: #121110;
  --win: #4cc49c; --lose: #e2654c;
  --display: 'Federo', 'Futura', 'Avenir Next', sans-serif;
  --text: 'Raleway', 'Avenir Next', 'Helvetica Neue', sans-serif;
  --mono: 'Recursive Mono', ui-monospace, Menlo, monospace;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 72px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; background: var(--lacquer); }
body {
  margin: 0; min-height: 100vh; color: var(--ivory); font: 500 18px/1.5 var(--text); overflow-x: hidden;
  font-variant-numeric: lining-nums tabular-nums;
  background-color: var(--lacquer);
  background-image:
    radial-gradient(120% 60% at 50% -10%, rgba(233,169,121,.10), transparent 60%),
    linear-gradient(90deg, rgba(255,255,255,.035), transparent 18%, transparent 82%, rgba(255,255,255,.03)),
    repeating-linear-gradient(90deg, transparent 0 238px, rgba(196,203,208,.10) 238px 239px, rgba(0,0,0,.5) 239px 240px);
}
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--jade-ink); outline-offset: 3px; }

/* ---------- header: a lacquer band over three chrome speed lines; a light runs along the chrome ---------- */
.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: var(--ivory);
  background: linear-gradient(#24211e, #121110 75%, #0b0a09);
}
.rail-top::before, .rail-top::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 11px; pointer-events: none;
  -webkit-mask: repeating-linear-gradient(180deg, #000 0 2px, transparent 2px 4.5px); mask: repeating-linear-gradient(180deg, #000 0 2px, transparent 2px 4.5px); }
.rail-top::after { background: linear-gradient(90deg, #7d868d, #f4f6f7 18%, #9aa3aa 42%, #e8ecef 68%, #6f787f); }
.rail-top::before { z-index: 1; background: linear-gradient(90deg, transparent, rgba(255,255,255,.95), transparent) -260px 0 / 260px 100% no-repeat; animation: glint 9s ease-in-out infinite; }
@keyframes glint { 0%, 55% { background-position: -260px 0; } 100% { background-position: calc(100% + 260px) 0; } }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ivory); }
.brand svg { width: 46px; height: 46px; filter: drop-shadow(0 3px 4px rgba(0,0,0,.6)); }
.brand span { font: 400 34px/1 var(--display); letter-spacing: .06em; }
.rail-top nav { display: flex; gap: var(--s5); margin-left: var(--s4); }
.rail-top nav a { text-decoration: none; font-weight: 600; font-size: 16px; letter-spacing: .04em; color: #b9b0a0; padding: 6px 0 3px; border-bottom: 2px solid transparent; }
.rail-top nav a:hover, .rail-top nav a[aria-current] { color: var(--ivory-hi); border-color: var(--chrome); }
.btn-wallet { margin-left: auto; }

/* ---------- buttons: polished chrome, ivory enamel, jade enamel, lacquer; a hard lower edge ---------- */
.btn {
  --edge: #4a5157; --frame: rgba(18,17,16,.28); position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 0 24px;
  border: 0; border-radius: 6px; font: 700 17px/1 var(--text); letter-spacing: .06em; cursor: pointer; text-decoration: none;
  box-shadow: 0 4px 0 var(--edge), 0 10px 18px -10px rgba(0,0,0,.8);
  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: 3px; pointer-events: none; }
.btn:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 var(--edge), 0 3px 6px -4px rgba(0,0,0,.7); }
.btn:disabled { cursor: not-allowed; filter: saturate(.2) opacity(.45); }
.btn-brass { background: linear-gradient(#ffffff, #dfe4e7 38%, #a9b1b8 52%, #d3d8dc 70%, #eef1f3); color: var(--lacquer); --edge: #5d656c; }
.btn-ivory { background: linear-gradient(#fbf7ee, #ece3cf); color: var(--lacquer); --edge: #9d937e; }
.btn-claret { background: linear-gradient(#23a07f, #1d8a6f 55%, #157a61); color: var(--ivory-hi); --edge: #07392e; --frame: rgba(240,232,214,.35); }
.btn-ink { background: linear-gradient(#3a3632, #1d1b19); color: var(--ivory); --edge: #000; --frame: rgba(196,203,208,.45); }
.btn-small { min-height: 40px; padding: 0 16px; font-size: 15px; }
.btn kbd { font: 400 12px/1 var(--mono); opacity: .6; border: 1px solid currentColor; border-radius: 4px; padding: 3px 4px 2px; }

/* ---------- the salon wall behind the table: portholes, the sea rolling behind the glass ---------- */
.table-wrap {
  --ph-d: 52px; --ph-y: 10px; --ph-x1: calc(50vw - 26px - 92px); --ph-x2: calc(50vw - 26px); --ph-x3: calc(50vw - 26px + 92px);
  position: relative; isolation: isolate; padding: 76px 24px 0; max-width: 1220px; margin: 0 auto;
}
.table-wrap::before, .table-wrap::after { content: ""; position: absolute; z-index: -1; top: var(--ph-y); left: 50%; width: 100vw; margin-left: -50vw; height: var(--ph-d); pointer-events: none; }
.table-wrap::before {
  --sea: linear-gradient(calc(180deg + var(--roll)), #f3c493 0, #e9a979 42%, #d98e6c 49.6%, #3f6f87 50.4%, #2d5b73 60%, #0d2638 100%);
  background: var(--sea) var(--ph-x1) 0 / var(--ph-d) var(--ph-d) no-repeat, var(--sea) var(--ph-x2) 0 / var(--ph-d) var(--ph-d) no-repeat, var(--sea) var(--ph-x3) 0 / var(--ph-d) var(--ph-d) no-repeat;
  -webkit-mask: radial-gradient(closest-side, #000 74%, transparent 75%) var(--ph-x1) 0 / var(--ph-d) var(--ph-d) no-repeat, radial-gradient(closest-side, #000 74%, transparent 75%) var(--ph-x2) 0 / var(--ph-d) var(--ph-d) no-repeat, radial-gradient(closest-side, #000 74%, transparent 75%) var(--ph-x3) 0 / var(--ph-d) var(--ph-d) no-repeat;
  mask: radial-gradient(closest-side, #000 74%, transparent 75%) var(--ph-x1) 0 / var(--ph-d) var(--ph-d) no-repeat, radial-gradient(closest-side, #000 74%, transparent 75%) var(--ph-x2) 0 / var(--ph-d) var(--ph-d) no-repeat, radial-gradient(closest-side, #000 74%, transparent 75%) var(--ph-x3) 0 / var(--ph-d) var(--ph-d) no-repeat;
  animation: roll 7s ease-in-out infinite;
}
@keyframes roll { 0%, 100% { --roll: -3deg; } 50% { --roll: 3deg; } }
.table-wrap::after {
  --rim: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cdefs%3E%3ClinearGradient id='a' x1='0' y1='0' x2='1' y2='1'%3E%3Cstop offset='0' stop-color='%23fff'/%3E%3Cstop offset='.32' stop-color='%23cfd5da'/%3E%3Cstop offset='.5' stop-color='%236f787f'/%3E%3Cstop offset='.62' stop-color='%23e8ecef'/%3E%3Cstop offset='1' stop-color='%238b949b'/%3E%3C/linearGradient%3E%3ClinearGradient id='b' x1='1' y1='1' x2='0' y2='0'%3E%3Cstop offset='0' stop-color='%23f4f6f7'/%3E%3Cstop offset='.45' stop-color='%23a7afb5'/%3E%3Cstop offset='.55' stop-color='%234a5157'/%3E%3Cstop offset='1' stop-color='%23d7dce0'/%3E%3C/linearGradient%3E%3C/defs%3E%3Ccircle cx='50' cy='50' r='43' fill='none' stroke='url(%23a)' stroke-width='10'/%3E%3Ccircle cx='50' cy='50' r='36.6' fill='none' stroke='url(%23b)' stroke-width='3.4'/%3E%3Ccircle cx='50' cy='50' r='48' fill='none' stroke='%23000' stroke-opacity='.5' stroke-width='1'/%3E%3Cg fill='%234a5157'%3E%3Ccircle cx='50' cy='7' r='2'/%3E%3Ccircle cx='80.4' cy='19.6' r='2'/%3E%3Ccircle cx='93' cy='50' r='2'/%3E%3Ccircle cx='80.4' cy='80.4' r='2'/%3E%3Ccircle cx='50' cy='93' r='2'/%3E%3Ccircle cx='19.6' cy='80.4' r='2'/%3E%3Ccircle cx='7' cy='50' r='2'/%3E%3Ccircle cx='19.6' cy='19.6' r='2'/%3E%3C/g%3E%3Cpath d='M24 36A29 29 0 0 1 44 22' fill='none' stroke='%23fff' stroke-opacity='.35' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E");
  background: var(--rim) var(--ph-x1) 0 / var(--ph-d) var(--ph-d) no-repeat, var(--rim) var(--ph-x2) 0 / var(--ph-d) var(--ph-d) no-repeat, var(--rim) var(--ph-x3) 0 / var(--ph-d) var(--ph-d) no-repeat;
  filter: drop-shadow(0 6px 8px rgba(0,0,0,.6));
}
@media (min-width: 1320px) {
  .table-wrap { max-width: 1080px; padding-top: 44px;
    --ph-d: min(180px, calc(50vw - 540px - 40px)); --ph-y: 96px;
    --ph-x1: calc((50vw - 540px - var(--ph-d)) / 2 + 6px); --ph-x2: calc(100vw - (50vw - 540px + var(--ph-d)) / 2 - 6px); --ph-x3: -999px; }
}
.table-rail {
  position: relative; padding: 14px; border: 5px solid transparent;
  border-radius: 34px 34px 190px 190px / 34px 34px 120px 120px;
  background:
    linear-gradient(180deg, #3a3632, #1d1b19 22%, #0b0a09) padding-box,
    linear-gradient(135deg, #8b949b, #ffffff 22%, #6f787f 48%, #e8ecef 70%, #7d868d) border-box;
  box-shadow: 0 0 0 1px #000, inset 0 2px 0 rgba(255,255,255,.12), 0 40px 60px -30px rgba(0,0,0,.9);
}
#felt {
  height: clamp(420px, calc(100vh - 380px), 620px); height: clamp(420px, calc(100svh - 380px), 620px);
  border-radius: 22px 22px 172px 172px / 22px 22px 104px 104px; container-type: inline-size;
  background:
    radial-gradient(80% 70% at 50% 30%, #1e8a6e, var(--jade) 62%, #0a4f40);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.6), inset 0 14px 26px -14px rgba(0,0,0,.7), inset 0 -18px 30px -20px rgba(0,0,0,.6);
}
#felt::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: .55; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='150' height='150'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.95' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .5 0 0 0 0 .5 0 0 0 .5 0'/%3E%3C/filter%3E%3Crect width='150' height='150' filter='url(%23n)'/%3E%3C/svg%3E"); }
/* a printed jade line along the edge of the felt */
#felt::after { content: ""; position: absolute; inset: 11px; border-radius: 14px 14px 162px 162px / 14px 14px 96px 96px; pointer-events: none; border: 1.5px solid rgba(143,214,188,.42); }
.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: 400 32px var(--display); letter-spacing: 4px; fill: var(--jade-ink); opacity: .78; }
.print-small { font: 700 12.5px var(--text); letter-spacing: 3.4px; fill: var(--jade-ink); opacity: .55; }
.print-rule { stroke: var(--jade-ink); stroke-width: 1.2; fill: var(--jade-ink); opacity: .5; }
.print-fan path { stroke: var(--jade-ink); stroke-width: 1.2; fill: none; opacity: .22; }
.print-narrow .print-big { font-size: 22px; letter-spacing: 2px; }
.print-narrow .print-small { font-size: 11px; letter-spacing: 2.4px; }
.felt .spot { border: 1.6px solid rgba(240,232,214,.55); box-shadow: 0 0 0 5px rgba(0,0,0,.08); }
.felt .spot::after { content: ""; position: absolute; inset: 6px; border-radius: 50%; border: 1px solid rgba(143,214,188,.45); }
.felt .card .face, .felt .card .back { box-shadow: 0 1px 0 rgba(0,0,0,.3), 0 10px 14px -6px rgba(0,0,0,.6); }
.felt .card.won .face { box-shadow: 0 0 0 2.5px var(--dusk), 0 10px 16px -8px rgba(0,0,0,.6); }
.felt .card.dead .card-inner { filter: saturate(.35) brightness(.7); }
.cardface > rect:first-child { stroke-width: 1.2; }
.cx-rank { font: 800 21px var(--text); letter-spacing: -.5px; }
.cx-court { font: 400 44px var(--display); }
.chip-label { font: 800 14px var(--text); }
.felt .total {
  font: 400 calc(var(--card-w) * .27) / 1 var(--display); color: var(--lacquer); padding: 7px 12px 6px; border-radius: 4px; letter-spacing: .04em;
  background: linear-gradient(#fbf7ee, #ece3cf); box-shadow: inset 0 0 0 1px rgba(18,17,16,.5), inset 0 0 0 3px #fbf7ee, inset 0 0 0 3.6px rgba(18,17,16,.35), 0 5px 9px -4px rgba(0,0,0,.6);
}
.felt .total.bust { color: #fff; background: var(--cinnabar); box-shadow: 0 3px 0 #7a2414; }
.felt .total.bj { color: var(--lacquer); background: linear-gradient(#f6cfa8, var(--dusk)); box-shadow: inset 0 0 0 1px rgba(18,17,16,.45), 0 3px 0 #a86a3e; }
.felt .total.active { box-shadow: inset 0 0 0 2px var(--jade-hi), 0 0 0 3px rgba(143,214,188,.45); }
.felt .discard.has::before { content: ""; position: absolute; inset: 0; border-radius: 7px; background: #121110; border: 3px solid #f0e8d6;
  box-shadow: 1px 1px 0 #cfc6b2, 2px 2px 0 #f0e8d6, 3px 3px 0 #b9b0a0, calc(var(--n,1) * 1px + 3px) calc(var(--n,1) * 1px + 3px) 0 #a59c8a, 0 10px 14px -8px rgba(0,0,0,.7); transform: rotate(-6deg); }
.felt .rack svg .rack-body { fill: #1d1b19; }
.felt .rack svg .rack-lip { fill: #c4cbd0; }
.felt .rack { filter: drop-shadow(0 6px 6px rgba(0,0,0,.5)); }
.felt .shoe { filter: drop-shadow(0 10px 10px rgba(0,0,0,.55)); }

/* the dealer's line 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: italic 400 23px/1.3 var(--text); color: var(--ivory-hi); 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 5px 4px rgba(0,0,0,.5)); }
.chipbtn:hover:not(:disabled) { transform: translateY(-5px); }
.chipbtn:active:not(:disabled) { transform: translateY(1px) scale(.96); }
.chipbtn:disabled { opacity: .3; 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(--ivory-hi); letter-spacing: .03em; }
.betamt small { font: 600 15px var(--text); color: var(--ivory-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: 19px; }
.under { max-width: 1100px; margin: 0 auto; padding: var(--s4) 24px 0; display: flex; flex-wrap: wrap; gap: var(--s2) var(--s5); color: var(--ivory-2); font-size: 16px; }
.under b { color: var(--ivory-hi); 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(--ivory-hi); font-weight: 700; }
.testnote { color: var(--jade-ink); font-weight: 600; font-style: italic; }

/* ---------- under the table ---------- */
.sect { max-width: 1100px; margin: 0 auto; padding: var(--s8) 24px 0; }
.sect h2 { font: 400 clamp(30px, 3.6vw, 42px)/1.05 var(--display); margin: 0 0 var(--s5); color: var(--ivory-hi); letter-spacing: .04em; }
.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: 700; color: var(--ivory-2); font-size: 12.5px; letter-spacing: .16em; text-transform: uppercase; padding: 0 8px 9px; border-bottom: 1px solid var(--chrome); box-shadow: 0 3px 0 -2px var(--chrome); }
.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(29,138,111,.35); } }
.empty { color: var(--ivory-2); padding: var(--s4) 0; font-style: italic; }
/* the house rules as the salon's printed card: ivory stock, a deco double frame, dotted leaders */
.placard { background: var(--ivory-hi); color: var(--lacquer); border-radius: 2px; padding: var(--s6) var(--s5) var(--s5); text-align: left;
  box-shadow: inset 0 0 0 10px var(--ivory-hi), inset 0 0 0 11.5px var(--lacquer), inset 0 0 0 14px var(--ivory-hi), inset 0 0 0 15px #8b949b, 0 26px 40px -24px rgba(0,0,0,.9); }
.placard h3 { font: 400 30px/1.1 var(--display); margin: 0 0 var(--s3); text-align: center; letter-spacing: .05em; }
.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(18,17,16,.4); transform: translateY(-4px); }
.placard li b { order: 2; font-weight: 700; text-align: right; max-width: 62%; }
.placard .muted { color: #5a5248; padding: 0 8px 8px; }
.placard a { color: var(--lacquer); }
.edge { font: 400 66px/1 var(--display); color: var(--jade); margin: var(--s4) 0 var(--s2); text-align: center; }

/* ---------- inner pages ---------- */
.page { max-width: 980px; margin: 0 auto; padding: calc(var(--s7) + 14px) 24px 0; }
.page h1 { font: 400 clamp(40px, 6vw, 64px)/1 var(--display); margin: 0 0 var(--s5); color: var(--ivory-hi); letter-spacing: .04em; }
.page h2 { font: 400 30px/1.1 var(--display); margin: var(--s7) 0 var(--s3); letter-spacing: .03em; }
.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(--ivory-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(--ivory-2); font-weight: 600; }
.strategy td.H { background: var(--lacquer-3); } .strategy td.S { background: var(--dusk); color: var(--lacquer); } .strategy td.D { background: var(--jade-hi); color: #fff; } .strategy td.P { background: var(--chrome); color: var(--lacquer); }
.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(--chrome); border-radius: 4px; background: var(--ivory-hi); color: var(--lacquer); min-width: 0; }
.check { margin-top: var(--s4); padding: var(--s4) var(--s5); border-radius: 3px; background: var(--lacquer-2); box-shadow: inset 0 0 0 1.5px var(--chrome), inset 0 0 0 4px var(--lacquer-2), inset 0 0 0 5px rgba(196,203,208,.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(0,0,0,.5)); }

.foot { max-width: 1100px; margin: var(--s8) auto 0; padding: var(--s5) 24px var(--s7); border-top: 1px solid var(--chrome); box-shadow: inset 0 3px 0 -2px var(--chrome); color: var(--ivory-2); font-size: 16px; }
.foot-links { display: flex; gap: var(--s5); flex-wrap: wrap; font-weight: 600; }
.castrip { background: linear-gradient(#f4f6f7, #c4cbd0); color: var(--lacquer); text-align: center; padding: 20px 16px 8px; font-weight: 700; }
.castrip span { overflow-wrap: anywhere; font-family: var(--mono); }

dialog { border: 0; border-radius: 3px; padding: 0; width: min(460px, calc(100vw - 32px)); background: var(--ivory-hi); color: var(--lacquer);
  box-shadow: inset 0 0 0 1.5px var(--lacquer), inset 0 0 0 5px var(--ivory-hi), inset 0 0 0 6px #8b949b, 0 30px 60px -20px rgba(0,0,0,.9); }
dialog::backdrop { background: rgba(0,0,0,.6); }
dialog .muted { color: #5a5248; }
.dlg-head { display: flex; align-items: center; justify-content: space-between; padding: var(--s4) var(--s5); border-bottom: 1px solid rgba(18,17,16,.3); margin: 0 8px; }
.dlg-head h2 { margin: 0; font: 400 26px/1 var(--display); color: var(--lacquer); letter-spacing: .04em; }
.dlg-x { border: 0; background: none; font-size: 28px; line-height: 1; cursor: pointer; padding: 4px 8px; color: var(--lacquer); }
.dlg-body { padding: var(--s5); display: grid; gap: var(--s3); }
.dlg-body a { color: var(--lacquer); }
.wallets { display: grid; gap: var(--s2); }
.wallets button { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1.5px solid var(--lacquer); border-radius: 4px; background: #fff; color: var(--lacquer); font-weight: 700; cursor: pointer; text-align: left; box-shadow: 0 3px 0 var(--lacquer); }
.wallets button:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--lacquer); }
.wallets img { width: 28px; height: 28px; border-radius: 6px; }
.muted { color: var(--ivory-2); font-size: 16px; margin: 0; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 140%); visibility: hidden; background: var(--ivory-hi); color: var(--lacquer); padding: 13px 18px 11px; border-radius: 4px; font-weight: 700; transition: transform .25s; z-index: 50; max-width: calc(100vw - 32px); box-shadow: 0 10px 30px -10px rgba(0,0,0,.8); }
.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); }
  .brand span { font-size: 29px; }
  .brand svg { width: 40px; height: 40px; }
  .btn-wallet { min-height: 42px; padding: 0 14px; font-size: 14.5px; }
  .table-wrap { padding: 72px 8px 0; --ph-d: 44px; --ph-y: 18px; --ph-x1: calc(50vw - 22px - 74px); --ph-x2: calc(50vw - 22px); --ph-x3: calc(50vw - 22px + 74px); }
  .table-rail { padding: 9px; border-width: 4px; border-radius: 24px 24px 80px 80px / 24px 24px 64px 64px; }
  #felt { height: clamp(400px, calc(100vh - 300px), 540px); height: clamp(400px, calc(100svh - 300px), 540px); border-radius: 16px 16px 72px 72px / 16px 16px 56px 56px; }
  #felt::after { inset: 7px; border-radius: 10px 10px 66px 66px / 10px 10px 50px 50px; }
  .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, .table-wrap::before { animation: none !important; }
}
