/* Dealt: a letterpress print shop. Kraft paper on the bench, a wall of oak type-case drawers behind the press, the
   table locked up in an iron chase with oak furniture and quoins, the playing surface a sheet of cream cotton stock
   printed in red and black ink. Type: Rokkitt (wood-type slab) + Cardo (book face) + Lilex (seeds, hashes). */
@font-face { font-family: 'Rokkitt'; src: url(/fonts/rokkitt.woff2) format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'Cardo'; src: url(/fonts/cardo-400.woff2) format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Cardo'; src: url(/fonts/cardo-700.woff2) format('woff2'); font-weight: 600 800; font-display: swap; }
@font-face { font-family: 'Cardo'; src: url(/fonts/cardo-italic.woff2) format('woff2'); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: 'Lilex'; src: url(/fonts/lilex.woff2) format('woff2'); font-weight: 100 700; font-display: swap; }

:root {
  --kraft: #d2b17f; --kraft-lo: #b8955f; --kraft-hi: #e2c79c; --stock: #f4ecdc; --stock-hi: #fbf6ea;
  --ink: #1d1a17; --ink-2: #4a3f33; --line: rgba(29,26,23,.28);
  --red: #c4261d; --red-lo: #8f1a13; --red-hi: #e0483c;
  --lead: #7d8287; --lead-lo: #3b3f43; --steel: #45484c; --oak: #b3824a; --oak-lo: #7c5328; --oak-hi: #d1a467; --brass: #bf9445;
  --card-face: #fbf6ea; --card-edge: #cbbd9f; --court: #f1e6cf;
  --suit-red: #c4261d; --suit-black: #1d1a17;
  --win: #2d6a3e; --lose: #8f1a13;
  --display: 'Rokkitt', 'Rockwell', 'Clarendon', Georgia, serif;
  --text: 'Cardo', 'Iowan Old Style', Georgia, 'Times New Roman', serif;
  --mono: 'Lilex', 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-color: var(--kraft);
  /* kraft fibres: stretched noise, a second finer speckle */
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='f'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.012 .22' numOctaves='3' seed='4' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .22 0 0 0 0 .08 0 0 0 .22 0'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23f)'/%3E%3C/svg%3E"),
    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 .3 0 0 0 0 .2 0 0 0 0 .1 0 0 0 .12 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(--red); outline-offset: 3px; }

/* ---------- header: a solid black ink band, the wordmark reversed out, an Oxford rule (thick red, thin black) below ---------- */
.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(--stock);
  background-color: var(--ink);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.55' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .9 0 0 0 0 .85 0 0 0 0 .75 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)'/%3E%3C/svg%3E");
  box-shadow: 0 5px 0 var(--kraft), 0 10px 0 var(--red), 0 13px 0 var(--kraft), 0 14.5px 0 var(--ink);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--stock); }
.brand svg { width: 46px; height: 46px; filter: drop-shadow(0 3px 2px rgba(0,0,0,.45)); }
.brand span { font: 900 36px/1 var(--display); letter-spacing: .01em; text-shadow: 2px 1px 0 var(--red); }
.rail-top nav { display: flex; gap: var(--s5); margin-left: var(--s4); }
.rail-top nav a { text-decoration: none; font-weight: 700; font-size: 17px; color: #cfc3ad; padding: 6px 0 3px; border-bottom: 3px solid transparent; }
.rail-top nav a:hover, .rail-top nav a[aria-current] { color: #fff; border-color: var(--red); }
.btn-wallet { margin-left: auto; }
.rail-top .btn-wallet { text-transform: none; letter-spacing: .01em; }

/* ---------- buttons: inked blocks with a hard lower edge, like a slug of type standing on the bed ---------- */
.btn {
  --edge: #5c120c; position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 0 24px;
  border: 0; border-radius: 4px; font: 800 19px/1 var(--display); letter-spacing: .04em; text-transform: uppercase; cursor: pointer; text-decoration: none;
  box-shadow: 0 4px 0 var(--edge), 0 10px 14px -10px rgba(29,26,23,.7);
  transform: translateY(0); transition: transform .08s, box-shadow .08s, filter .15s; -webkit-tap-highlight-color: transparent; user-select: none;
}
.btn:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 var(--edge), 0 3px 6px -4px rgba(29,26,23,.5); }
.btn:disabled { cursor: not-allowed; filter: saturate(.15) opacity(.5); }
.btn-brass { background: linear-gradient(var(--red-hi), var(--red) 55%, #b21f17); color: var(--stock); --edge: #6d140e; }
.btn-ivory { background: linear-gradient(var(--stock-hi), var(--stock)); color: var(--ink); --edge: #8d7b5c; box-shadow: inset 0 0 0 1.5px var(--ink), 0 4px 0 var(--edge), 0 10px 14px -10px rgba(29,26,23,.6); }
.btn-ivory:active:not(:disabled) { box-shadow: inset 0 0 0 1.5px var(--ink), 0 1px 0 var(--edge); }
.btn-claret { background: linear-gradient(#3a342e, var(--ink)); color: var(--stock); --edge: #000; }
.btn-ink { background: linear-gradient(#3a342e, var(--ink)); color: var(--stock); --edge: #000; }
.btn-small { min-height: 40px; padding: 0 16px; font-size: 16px; }
.btn kbd { font: 400 12px/1 var(--mono); opacity: .6; border: 1px solid currentColor; border-radius: 3px; padding: 3px 4px 2px; text-transform: none; letter-spacing: 0; }

/* ---------- behind the table: a wall of oak type-case drawers with sorts in their compartments ---------- */
.table-wrap { position: relative; isolation: isolate; padding: 48px 24px 0; max-width: 1220px; margin: 0 auto; }
.table-wrap::before {
  content: ""; position: absolute; z-index: -1; top: 14px; left: 50%; width: 100vw; margin-left: -50vw; height: min(58%, 380px);
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='150' height='46'%3E%3Crect width='150' height='46' fill='%234a2f12'/%3E%3Crect x='2' y='2' width='146' height='42' rx='2' fill='%23b3824a'/%3E%3Crect x='2' y='2' width='146' height='2' fill='%23d9ad70'/%3E%3Crect x='2' y='41' width='146' height='3' fill='%237c5328'/%3E%3Cpath d='M8 14Q50 11 90 15T144 13M8 30Q60 27 100 31T144 29' stroke='%237c5328' stroke-width='1' fill='none' opacity='.45'/%3E%3Crect x='59' y='7' width='32' height='14' rx='1.5' fill='%23bf9445'/%3E%3Crect x='61.5' y='9.5' width='27' height='9' fill='%23efe4cc'/%3E%3Crect x='66' y='12.6' width='18' height='2.4' fill='%231d1a17' opacity='.6'/%3E%3Cpath d='M63 26H87Q87 36 75 36Q63 36 63 26Z' fill='%238a6420'/%3E%3Cpath d='M64.5 26H85.5Q85 33 75 33.5Q65 33 64.5 26Z' fill='%23e7c985'/%3E%3Crect x='62' y='25' width='26' height='2.4' rx='1' fill='%23bf9445'/%3E%3C/svg%3E") 0 0 / 150px 46px repeat,
    #4a2f12;
  box-shadow: inset 0 -30px 40px -20px rgba(29,26,23,.5);
  -webkit-mask: linear-gradient(#000 70%, transparent); mask: linear-gradient(#000 70%, transparent);
}
.table-rail {
  position: relative; padding: 22px; border-radius: 6px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.16), rgba(255,255,255,0) 30%, rgba(0,0,0,.25)),
    linear-gradient(90deg, #3b3e42, #55595e 18%, #45484c 50%, #5a5e63 82%, #3b3e42);
  box-shadow: 0 0 0 1.5px #1d1f21, inset 0 2px 0 rgba(255,255,255,.25), inset 0 -3px 0 rgba(0,0,0,.4), 0 30px 44px -26px rgba(29,26,23,.85);
}
/* the quoins: brass wedges with a key slot, locking the form on the right and on the bottom */
.table-rail::before, .table-rail::after { content: ""; position: absolute; z-index: 3; pointer-events: none; border-radius: 2px;
  background: radial-gradient(circle at 50% 50%, #2a1c0a 0 2.5px, transparent 3px), linear-gradient(var(--brass), #f1d79a 40%, #8a6420); box-shadow: 0 1px 0 rgba(0,0,0,.5); }
.table-rail::before { right: 5px; top: 30%; width: 12px; height: 46px; }
.table-rail::after { left: 64%; bottom: 5px; width: 46px; height: 12px; }
#felt {
  height: clamp(420px, calc(100vh - 370px), 620px); height: clamp(420px, calc(100svh - 370px), 620px);
  border-radius: 2px; container-type: inline-size;
  background:
    radial-gradient(80% 70% at 50% 35%, var(--stock-hi), var(--stock) 70%, #e9dec6);
  /* oak furniture round the sheet, with joints */
  box-shadow: 0 0 0 9px var(--oak), 0 0 0 10px #5a3a17, inset 0 0 0 1px rgba(29,26,23,.25), inset 0 6px 14px -8px rgba(29,26,23,.4);
}
/* a printed border: thick red rule, thin red rule inside */
#felt::after { content: ""; position: absolute; inset: 12px; pointer-events: none;
  border: 3px solid rgba(196,38,29,.72); outline: 1px solid rgba(196,38,29,.6); outline-offset: -8px; }
#felt::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .55; 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 .45 0 0 0 0 .3 0 0 0 .18 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; } }
/* letterpress: the ink sits in a bitten impression (a light edge below, a dark edge above) */
.print-big { font: 900 40px var(--display); letter-spacing: 3px; fill: var(--red); opacity: .86; filter: drop-shadow(0 1px 0 rgba(255,255,255,.9)) drop-shadow(0 -.6px 0 rgba(90,30,20,.5)); }
.print-small { font: italic 400 17px var(--text); letter-spacing: .5px; fill: var(--ink); opacity: .7; }
.print-narrow .print-big { font-size: 30px; letter-spacing: 2px; }
.print-narrow .print-small { font-size: 14px; }
.felt .spot { border: 2px solid rgba(29,26,23,.55); box-shadow: 0 0 0 5px rgba(196,38,29,.06); }
.felt .spot::after { content: ""; position: absolute; inset: 6px; border-radius: 50%; border: 1px dashed rgba(196,38,29,.55); }
.felt .card .face, .felt .card .back { box-shadow: 0 1px 0 rgba(29,26,23,.2), 0 8px 12px -6px rgba(29,26,23,.5); }
.felt .card.won .face { box-shadow: 0 0 0 2.5px var(--red), 0 8px 16px -8px rgba(29,26,23,.5); }
.felt .card.dead .card-inner { filter: saturate(.35) brightness(.86); }
.cardface > rect:first-child { stroke-width: 1.2; }
.cx-rank { font: 800 22px var(--display); letter-spacing: -.5px; }
.cx-court { font: 600 42px var(--display); }
.chip-label { font: 800 15px var(--display); }
.felt .total {
  font: 800 calc(var(--card-w) * .27) / 1 var(--display); color: var(--ink); padding: 6px 11px 5px; border-radius: 2px;
  background: var(--stock-hi); box-shadow: inset 0 0 0 2px var(--ink), 3px 3px 0 rgba(29,26,23,.85);
}
.felt .total.bust { color: var(--stock); background: var(--ink); box-shadow: 3px 3px 0 var(--red); }
.felt .total.bj { color: var(--stock); background: var(--red); box-shadow: inset 0 0 0 2px var(--red-lo), 3px 3px 0 var(--ink); }
.felt .total.active { box-shadow: inset 0 0 0 2px var(--red), 3px 3px 0 var(--red); }
.felt .discard.has::before { content: ""; position: absolute; inset: 0; border-radius: 7px; background: var(--red); border: 3px solid #f7f0e1;
  box-shadow: 1px 1px 0 #d8ccb2, 2px 2px 0 #f7f0e1, 3px 3px 0 #cfc2a6, calc(var(--n,1) * 1px + 3px) calc(var(--n,1) * 1px + 3px) 0 #c3b597, 0 10px 14px -8px rgba(29,26,23,.5); transform: rotate(-6deg); }
.felt .rack svg .rack-body { fill: #7c5328; }
.felt .rack svg .rack-lip { fill: #45484c; }
.felt .rack { filter: drop-shadow(0 6px 6px rgba(29,26,23,.35)); }
.felt .shoe { filter: drop-shadow(0 10px 10px rgba(29,26,23,.45)); }

/* the dealer's line under the table: a set line of italic book type */
.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 24px/1.3 var(--text); color: var(--ink); max-width: 46ch; text-align: center; }
.talk .dealer-line.in { animation: line-in .45s ease-out; }
@keyframes line-in { from { opacity: 0; filter: blur(1px); } }

/* ---------- 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(29,26,23,.3)); }
.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: 800 34px/1 var(--display); min-width: 4ch; text-align: right; color: var(--ink); }
.betamt small { font: 700 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: 21px; }
.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: .84em; word-break: break-all; }
.under button.link, .link { background: none; border: 0; padding: 0; text-decoration: underline; text-decoration-color: var(--red); text-decoration-thickness: 2px; text-underline-offset: 3px; cursor: pointer; color: var(--ink); font-weight: 700; }
.testnote { color: var(--red-lo); font-weight: 700; font-style: italic; }

/* ---------- under the table: sheets of stock pinned on the kraft ---------- */
.sect { max-width: 1100px; margin: 0 auto; padding: var(--s8) 24px 0; }
.sect h2 { font: 900 clamp(32px, 3.8vw, 46px)/1 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; background: var(--stock); box-shadow: 0 18px 28px -22px rgba(29,26,23,.7); }
.floor th { text-align: left; font: 800 13px var(--display); color: var(--ink); letter-spacing: .16em; text-transform: uppercase; padding: 12px 10px 9px; border-bottom: 3px solid var(--red); }
.floor td { padding: 11px 10px 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(196,38,29,.18); } }
.empty { color: var(--ink-2); padding: var(--s4) 10px; font-style: italic; }
/* the house rules as a printed handbill: red bar on top, slab heading, dotted leaders */
.placard { background: var(--stock); color: var(--ink); border-radius: 1px; padding: var(--s6) var(--s5) var(--s5); text-align: left;
  border-top: 10px solid var(--red); box-shadow: inset 0 0 0 1px rgba(29,26,23,.15), 0 22px 30px -22px rgba(29,26,23,.75); }
.placard h3 { font: 900 32px/1 var(--display); margin: 0 0 var(--s3); text-align: center; text-transform: uppercase; letter-spacing: .04em; }
.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(29,26,23,.45); 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: 900 70px/1 var(--display); color: var(--red); 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: 900 clamp(44px, 6.4vw, 72px)/.95 var(--display); margin: 0 0 var(--s5); color: var(--ink); text-shadow: 3px 2px 0 rgba(196,38,29,.85); }
.page h2 { font: 800 32px/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: 800 13px var(--display); margin: var(--s3) 0; }
.strategy th, .strategy td { width: 34px; height: 28px; text-align: center; border-radius: 2px; }
.strategy th { color: var(--ink-2); }
.strategy td.H { background: var(--stock); } .strategy td.S { background: var(--kraft-hi); box-shadow: inset 0 0 0 1px var(--ink); } .strategy td.D { background: var(--red); color: #fff; } .strategy td.P { background: var(--ink); 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: 2px; background: var(--stock-hi); color: var(--ink); min-width: 0; }
.check { margin-top: var(--s4); padding: var(--s4) var(--s5); border-radius: 1px; background: var(--stock); border-left: 8px solid var(--ink); box-shadow: 0 16px 24px -20px rgba(29,26,23,.7); }
.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(29,26,23,.3)); }

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

dialog { border: 0; border-radius: 2px; padding: 0; width: min(460px, calc(100vw - 32px)); background: var(--stock); color: var(--ink);
  border-top: 10px solid var(--red); box-shadow: inset 0 0 0 1.5px var(--ink), 0 30px 60px -20px rgba(29,26,23,.65); }
dialog::backdrop { background: rgba(29,26,23,.55); }
.dlg-head { display: flex; align-items: center; justify-content: space-between; padding: var(--s4) var(--s5); border-bottom: 1px solid rgba(29,26,23,.35); margin: 0 8px; }
.dlg-head h2 { margin: 0; font: 900 28px/1 var(--display); color: var(--ink); }
.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: 2px; background: var(--stock-hi); font-weight: 700; cursor: pointer; text-align: left; box-shadow: 3px 3px 0 var(--ink); }
.wallets button:active { transform: translate(2px, 2px); box-shadow: 1px 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(--ink); color: var(--stock); padding: 13px 18px 11px; border-radius: 2px; box-shadow: 4px 4px 0 var(--red); font-weight: 700; 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); }
  .brand span { font-size: 30px; }
  .brand svg { width: 40px; height: 40px; }
  .btn-wallet { min-height: 42px; padding: 0 14px; font-size: 15px; }
  .table-wrap { padding: 38px 8px 0; }
  .table-wrap::before { height: min(50%, 300px); background-size: 112px 34px, auto; }
  .table-rail { padding: 15px; }
  .table-rail::before { right: 2px; width: 9px; height: 36px; }
  .table-rail::after { bottom: 2px; height: 9px; width: 36px; }
  #felt { height: clamp(400px, calc(100vh - 300px), 540px); height: clamp(400px, calc(100svh - 300px), 540px); box-shadow: 0 0 0 6px var(--oak), 0 0 0 7px #5a3a17, inset 0 0 0 1px rgba(29,26,23,.25); }
  #felt::after { inset: 8px; border-width: 2px; outline-offset: -6px; }
  .talk { min-height: 58px; }
  .talk .dealer-line { font-size: 20px; }
  .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; }
}
