/* Natty: blackjack at a 1960s kitchen table on game night. Mint Formica top with boomerang print in a ribbed chrome
   edge, a turquoise dome lamp hanging over it, a turquoise plastic card shoe, pastel plastic chips, butter wallpaper.
   House rules on a recipe card. Type: Mochiy Pop One (rounded display) + K2D (text) + Nanum Gothic Coding (hashes). */
@font-face { font-family: 'Mochiy Pop One'; src: url(/fonts/mochiy.woff2) format('woff2'); font-display: swap; }
@font-face { font-family: 'K2D'; src: url(/fonts/k2d-400.woff2) format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'K2D'; src: url(/fonts/k2d-500.woff2) format('woff2'); font-weight: 500 600; font-display: swap; }
@font-face { font-family: 'K2D'; src: url(/fonts/k2d-700.woff2) format('woff2'); font-weight: 700 800; font-display: swap; }
@font-face { font-family: 'Nanum Gothic Coding'; src: url(/fonts/nanum-coding.woff2) format('woff2'); font-display: swap; }

:root {
  --wall: #fbf0d6; --wall-2: #f7e7c3; --paper: #fffaf0; --ink: #3a2a22; --ink-2: #7a6556; --line: #ead9bb;
  --mint: #bfe7d6; --mint-hi: #d9f3e8; --mint-lo: #93cdb6; --coral: #f07a5f; --coral-lo: #c4553d; --turq: #2bb3b1; --turq-lo: #16807f;
  --butter: #f7d774; --pink: #f4a7b9; --chrome: #c3c9cf; --rule: #bcd7ee;
  --card-face: #fffaf0; --card-edge: #dccfb8; --court: #fdf0dc;
  --suit-red: #d2462e; --suit-black: #3a2a22;
  --win: #1f8f6f; --lose: #d2462e;
  --display: 'Mochiy Pop One', 'Arial Rounded MT Bold', 'Helvetica Rounded', sans-serif;
  --text: 'K2D', 'Avenir Next', 'Helvetica Neue', Arial, sans-serif;
  --mono: 'Nanum Gothic Coding', 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.5 var(--text); overflow-x: hidden;
  font-variant-numeric: normal;
  background-color: var(--wall);
  background-image:
    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='.8' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .45 0 0 0 0 .32 0 0 0 0 .15 0 0 0 .06 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E"),
    repeating-linear-gradient(90deg, var(--wall) 0 22px, var(--wall-2) 22px 24px, var(--wall) 24px 30px, var(--wall-2) 30px 31px, var(--wall) 31px 54px);
}
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--turq); outline-offset: 3px; }

/* ---------- header: white enamel cabinet front, turquoise trim, chrome strip ---------- */
.rail-top {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: var(--s5);
  padding: 10px max(24px, env(safe-area-inset-left)) 12px; color: var(--ink);
  background: linear-gradient(#fffdf7, #fbf4e6);
  box-shadow: inset 0 -8px 0 var(--turq), inset 0 -10px 0 #fff, inset 0 -11px 0 #9aa3ab, 0 10px 18px -14px rgba(58,42,34,.6);
}
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--coral); }
.brand svg { width: 48px; height: 48px; }
.brand span { font: 400 31px/1 var(--display); letter-spacing: .01em; color: var(--coral); text-shadow: 0 2px 0 #fbe0cf; }
.rail-top nav { display: flex; gap: var(--s5); margin-left: var(--s4); }
.rail-top nav a { text-decoration: none; font-weight: 500; 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(--coral); }
.btn-wallet { margin-left: auto; }

/* ---------- buttons: glossy plastic with a chrome-bright rim and a hard lower edge ---------- */
.btn {
  --edge: #b4462f; position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 0 24px;
  border: 0; border-radius: 22px; font: 600 18px/1 var(--text); letter-spacing: .01em; cursor: pointer; text-decoration: none;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.55), 0 5px 0 var(--edge), 0 9px 16px -9px rgba(58,42,34,.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: 10%; right: 10%; top: 3px; height: 40%; border-radius: 20px 20px 50% 50%; background: linear-gradient(rgba(255,255,255,.5), rgba(255,255,255,0)); pointer-events: none; }
.btn:active:not(:disabled) { transform: translateY(4px); box-shadow: inset 0 0 0 2px rgba(255,255,255,.55), 0 1px 0 var(--edge), 0 2px 6px -4px rgba(58,42,34,.45); }
.btn:disabled { cursor: not-allowed; filter: saturate(.25) opacity(.5); }
.btn-brass { background: linear-gradient(#f79a83, #f07a5f 60%, #e5674c); color: #fffaf0; --edge: #b4462f; }
.btn-ivory { background: linear-gradient(#ffffff, #fbf1de); color: var(--ink); --edge: #cdb894; }
.btn-claret { background: linear-gradient(#53c9c5, #2bb3b1 60%, #1f9e9c); color: #ffffff; --edge: #126b6a; }
.btn-ink { background: linear-gradient(#5a4436, #3a2a22); color: #fffaf0; --edge: #1d140f; }
.btn-small { min-height: 40px; padding: 0 16px; font-size: 16px; border-radius: 18px; }
.btn kbd { font: 400 12px/1 var(--mono); opacity: .65; border: 1px solid currentColor; border-radius: 6px; padding: 3px 4px 2px; }

/* ---------- the table: mint Formica with boomerangs in a ribbed chrome edge, lit by the lamp above ---------- */
.table-wrap { position: relative; padding: 96px 24px 0; max-width: 1280px; margin: 0 auto; }
.table-wrap::after {
  /* the dome lamp hanging from the ceiling over the left side of the table */
  content: ""; position: absolute; z-index: 4; top: -12px; left: 21%; width: 190px; height: 150px; pointer-events: none; transform-origin: 50% 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 190 150'%3E%3Cdefs%3E%3ClinearGradient id='s' x1='0' y1='0' x2='1' y2='0'%3E%3Cstop offset='0' stop-color='%2353c9c5'/%3E%3Cstop offset='.35' stop-color='%232bb3b1'/%3E%3Cstop offset='1' stop-color='%23157a79'/%3E%3C/linearGradient%3E%3ClinearGradient id='c' x1='0' y1='0' x2='1' y2='0'%3E%3Cstop offset='0' stop-color='%23eef1f3'/%3E%3Cstop offset='.5' stop-color='%23a3acb4'/%3E%3Cstop offset='1' stop-color='%23dfe3e7'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M95 0V60' stroke='%233a2a22' stroke-width='2.2'/%3E%3Crect x='85' y='56' width='20' height='14' rx='4' fill='url(%23c)'/%3E%3Cpath d='M30 128C30 88 58 66 95 66C132 66 160 88 160 128Z' fill='url(%23s)'/%3E%3Cpath d='M44 112C48 92 64 80 82 76' stroke='%23fff' stroke-width='5' stroke-linecap='round' fill='none' opacity='.35'/%3E%3Cellipse cx='95' cy='128' rx='65' ry='8' fill='%23fff6e8'/%3E%3Cellipse cx='95' cy='130' rx='26' ry='7' fill='%23ffe7a0'/%3E%3Cellipse cx='95' cy='128.5' rx='58' ry='4.2' fill='none' stroke='%23157a79' stroke-width='1.2' opacity='.5'/%3E%3C/svg%3E") center top / contain no-repeat;
  filter: drop-shadow(0 12px 10px rgba(58,42,34,.25)); animation: lamp 9s ease-in-out infinite;
}
@keyframes lamp { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(.8deg); } }
.table-rail {
  position: relative; padding: 15px; border-radius: 46px;
  background: linear-gradient(#f6f8f9, #c3c9cf 46%, #8e979f 54%, #e4e8eb);
  box-shadow: inset 0 0 0 1px #8b949c, inset 0 0 0 3px #f4f6f7, inset 0 0 0 4px #a6aeb5, inset 0 0 0 6px #eef1f3, inset 0 0 0 7px #98a1a9,
    inset 0 0 0 9px #f2f4f5, inset 0 0 0 10px #a9b1b8, 0 0 0 1px rgba(58,42,34,.2), 0 30px 40px -24px rgba(58,42,34,.6);
}
#felt {
  height: clamp(420px, calc(100vh - 400px), 600px); height: clamp(420px, calc(100svh - 400px), 600px);
  border-radius: 32px; container-type: inline-size;
  background:
    radial-gradient(38% 60% at 24% 0%, rgba(255,240,190,.55), rgba(255,240,190,0) 72%),
    url("data:image/svg+xml,%3Csvg xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg' width%3D'220' height%3D'220'%3E%3Cpath d%3D'M0 14Q10 -2 34 6' stroke%3D'%23a7d8c3' stroke-width%3D'7' stroke-linecap%3D'round' fill%3D'none' transform%3D'translate(20 30) rotate(10 17 7)'%2F%3E%3Cpath d%3D'M0 14Q12 -2 34 6' stroke%3D'%23e2f5ec' stroke-width%3D'7' stroke-linecap%3D'round' fill%3D'none' transform%3D'translate(120 18) rotate(-35 17 7)'%2F%3E%3Cpath d%3D'M0 14Q14 -2 34 6' stroke%3D'%23a7d8c3' stroke-width%3D'7' stroke-linecap%3D'round' fill%3D'none' transform%3D'translate(170 110) rotate(60 17 7)'%2F%3E%3Cpath d%3D'M0 14Q10 -2 34 6' stroke%3D'%23e2f5ec' stroke-width%3D'7' stroke-linecap%3D'round' fill%3D'none' transform%3D'translate(60 120) rotate(150 17 7)'%2F%3E%3Cpath d%3D'M0 14Q12 -2 34 6' stroke%3D'%23afdcc8' stroke-width%3D'7' stroke-linecap%3D'round' fill%3D'none' transform%3D'translate(150 190) rotate(-80 17 7)'%2F%3E%3Cpath d%3D'M0 14Q14 -2 34 6' stroke%3D'%23e2f5ec' stroke-width%3D'7' stroke-linecap%3D'round' fill%3D'none' transform%3D'translate(30 195) rotate(25 17 7)'%2F%3E%3Cpath d%3D'M0 14Q10 -2 34 6' stroke%3D'%23afdcc8' stroke-width%3D'7' stroke-linecap%3D'round' fill%3D'none' transform%3D'translate(95 70) rotate(200 17 7)'%2F%3E%3Ccircle cx%3D'70' cy%3D'40' r%3D'1.1' fill%3D'%233a2a22' opacity%3D'.4'%2F%3E%3Ccircle cx%3D'190' cy%3D'60' r%3D'1.1' fill%3D'%23c9a23a' opacity%3D'.4'%2F%3E%3Ccircle cx%3D'110' cy%3D'150' r%3D'1.1' fill%3D'%233a2a22' opacity%3D'.4'%2F%3E%3Ccircle cx%3D'12' cy%3D'90' r%3D'1.1' fill%3D'%23c9a23a' opacity%3D'.4'%2F%3E%3Ccircle cx%3D'200' cy%3D'210' r%3D'1.1' fill%3D'%233a2a22' opacity%3D'.4'%2F%3E%3Ccircle cx%3D'140' cy%3D'95' r%3D'1.1' fill%3D'%23c9a23a' opacity%3D'.4'%2F%3E%3Ccircle cx%3D'45' cy%3D'165' r%3D'1.1' fill%3D'%233a2a22' opacity%3D'.4'%2F%3E%3C%2Fsvg%3E") 0 0 / 220px 220px,
    radial-gradient(120% 110% at 40% 20%, var(--mint-hi), var(--mint) 55%, var(--mint-lo));
  box-shadow: inset 0 0 0 1px rgba(58,42,34,.25), inset 0 12px 20px -14px rgba(58,42,34,.35);
}
.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 33px var(--display); fill: #2f8a74; opacity: .8; }
.print-small { font: 500 15px var(--text); letter-spacing: 1.2px; fill: #2f7a68; opacity: .78; }
.print-narrow .print-big { font-size: 22px; }
.print-narrow .print-small { font-size: 13px; letter-spacing: .6px; }
.felt .spot { border: 3px solid rgba(255,250,240,.9); background: rgba(255,250,240,.16); box-shadow: 0 2px 0 rgba(47,138,116,.35); }
.felt .card .face, .felt .card .back { box-shadow: 0 1px 0 rgba(58,42,34,.2), 0 8px 12px -6px rgba(58,42,34,.45); }
.felt .card.won .face { box-shadow: 0 0 0 3px var(--butter), 0 8px 16px -8px rgba(58,42,34,.5); }
.felt .card.dead .card-inner { filter: saturate(.45) brightness(.82); }
.cardface > rect:first-child { stroke-width: 1.3; }
.cx-rank { font: 600 22px var(--text); letter-spacing: -.5px; }
.cx-court { font: 400 40px var(--display); }
.chip-label { font: 400 13px var(--display); }
.felt .total {
  font: 400 calc(var(--card-w) * .28) / 1 var(--display); color: var(--ink); padding: 7px 13px 6px; border-radius: 16px;
  background: var(--paper); box-shadow: 0 3px 0 rgba(58,42,34,.22), inset 0 0 0 2px #fff;
}
.felt .total.bust { color: #fffaf0; background: var(--coral); box-shadow: 0 3px 0 var(--coral-lo); }
.felt .total.bj { color: var(--ink); background: var(--butter); box-shadow: 0 3px 0 #c79f2b; }
.felt .total.active { box-shadow: 0 0 0 3px var(--turq), 0 3px 0 rgba(58,42,34,.22); }
.felt .discard.has::before { content: ""; position: absolute; inset: 0; border-radius: 9px; background: #f07a5f; border: 3px solid #fffaf0;
  box-shadow: 1px 1px 0 #eadcc4, 2px 2px 0 #fffaf0, 3px 3px 0 #e1d3ba, calc(var(--n,1) * 1px + 3px) calc(var(--n,1) * 1px + 3px) 0 #d8c9ae, 0 10px 14px -8px rgba(58,42,34,.45); transform: rotate(5deg); }
.felt .rack svg .rack-body { fill: #2bb3b1; }
.felt .rack svg .rack-lip { fill: #c3c9cf; }
.felt .rack { filter: drop-shadow(0 6px 6px rgba(58,42,34,.28)); }
.felt .shoe { filter: drop-shadow(0 10px 10px rgba(58,42,34,.35)); }

.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: 500 22px/1.3 var(--text); color: var(--ink); max-width: 46ch; text-align: center; }
.talk .dealer-line.in { animation: line-in .42s cubic-bezier(.3,1.4,.5,1); }
@keyframes line-in { from { opacity: 0; transform: translateY(6px) scale(.97); } }

/* ---------- 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.6,.5,1); -webkit-tap-highlight-color: transparent; filter: drop-shadow(0 4px 3px rgba(58,42,34,.22)); }
.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 30px/1 var(--display); min-width: 4ch; text-align: right; color: var(--ink); }
.betamt small { font: 500 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: 15.5px; }
.under b { color: var(--ink); font: 400 1em var(--display); }
.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: 600; }
.testnote { color: var(--turq-lo); font-weight: 600; }

/* ---------- under the table: the score pad and the recipe card ---------- */
.sect { max-width: 1100px; margin: 0 auto; padding: var(--s8) 24px 0; }
.sect h2 { font: 400 clamp(28px, 3.4vw, 38px)/1.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: 16px; background: var(--paper); border-radius: 14px; overflow: hidden; box-shadow: 0 2px 0 var(--line), 0 16px 26px -22px rgba(58,42,34,.5); }
.floor th { text-align: left; font-weight: 600; color: var(--ink-2); font-size: 14px; padding: 12px 10px 9px; border-bottom: 3px solid var(--coral); }
.floor td { padding: 10px 10px 8px; border-bottom: 1px solid var(--rule); }
.floor td.n, .floor th.n { text-align: right; }
.floor td.n { font-family: var(--display); font-size: 15px; }
.floor .up { color: var(--win); font-weight: 600; }
.floor .down { color: var(--lose); font-weight: 600; }
.floor tr.new td { animation: rowin 1.3s ease-out; }
@keyframes rowin { from { background: rgba(247,215,116,.5); } }
.empty { color: var(--ink-2); padding: var(--s4) 10px; }
/* recipe card: cream index card, coral top rule, blue ruled lines */
.placard { position: relative; background: var(--paper); color: var(--ink); border-radius: 6px; padding: 22px 24px 22px; transform: rotate(-.6deg);
  box-shadow: 0 1px 0 #e6d6b8, 0 20px 30px -22px rgba(58,42,34,.55); }
.placard::before { content: ""; position: absolute; left: 0; right: 0; top: 58px; height: 2px; background: var(--coral); }
.placard h3 { font: 400 26px/1.2 var(--display); margin: 0 0 var(--s4); color: var(--coral-lo); height: 34px; }
.placard ul { margin: 0; padding: 0; list-style: none; background: repeating-linear-gradient(180deg, transparent 0 33px, var(--rule) 33px 34px); }
.placard li { min-height: 34px; padding: 6px 0 2px; display: flex; justify-content: space-between; gap: var(--s4); line-height: 26px; }
.placard li b { font-weight: 600; text-align: right; }
.placard .muted { color: var(--ink-2); }
.placard a { color: var(--ink); }
.edge { font: 400 58px/1 var(--display); color: var(--turq-lo); margin: var(--s4) 0 var(--s2); }

/* ---------- inner pages ---------- */
.page { max-width: 980px; margin: 0 auto; padding: var(--s7) 24px 0; }
.page h1 { font: 400 clamp(38px, 5.6vw, 58px)/1.05 var(--display); margin: 0 0 var(--s5); color: var(--coral); }
.page h2 { font: 400 28px/1.15 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: 600; min-width: 0; overflow-wrap: anywhere; }
.strategy { border-collapse: separate; border-spacing: 2px; font: 600 13px var(--text); margin: var(--s3) 0; }
.strategy th, .strategy td { width: 34px; height: 28px; text-align: center; border-radius: 7px; }
.strategy th { color: var(--ink-2); font-weight: 500; }
.strategy td.H { background: #f3e6cb; } .strategy td.S { background: var(--butter); } .strategy td.D { background: var(--turq); color: #fff; } .strategy td.P { background: var(--coral); color: #fff; }
.scroll-x { overflow-x: auto; max-width: 100%; }
.form { display: grid; gap: var(--s3); max-width: 640px; }
.form label { font-weight: 600; display: grid; gap: 6px; }
.form input { font: 400 16px var(--mono); padding: 12px 14px; border: 2px solid var(--ink); border-radius: 14px; background: #fff; color: var(--ink); min-width: 0; }
.check { margin-top: var(--s4); padding: var(--s4) var(--s5); border-radius: 16px; background: var(--paper); border: 2px solid var(--ink); }
.check .ok { color: var(--win); font-weight: 700; }
.check .no { color: var(--lose); font-weight: 700; }
.minicards { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0; }
.minicards svg { width: 46px; height: auto; filter: drop-shadow(0 2px 2px rgba(58,42,34,.25)); }

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

dialog { border: 0; border-radius: 22px; padding: 0; width: min(460px, calc(100vw - 32px)); background: var(--paper); color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink), 0 30px 60px -20px rgba(58,42,34,.55); }
dialog::backdrop { background: rgba(58,42,34,.45); }
.dlg-head { display: flex; align-items: center; justify-content: space-between; padding: var(--s4) var(--s5); border-bottom: 3px solid var(--coral); }
.dlg-head h2 { margin: 0; font: 400 24px/1 var(--display); color: var(--coral); }
.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: 16px; background: #fff; font-weight: 600; 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: 15.5px; margin: 0; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 140%); visibility: hidden; background: var(--ink); color: #fffaf0; padding: 13px 18px 11px; border-radius: 16px; font-weight: 500; 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: 8px 14px 12px; gap: var(--s3); }
  .brand span { font-size: 26px; }
  .brand svg { width: 42px; height: 42px; }
  .btn-wallet { min-height: 42px; padding: 0 14px; font-size: 15px; }
  .table-wrap { padding: 66px 8px 0; }
  .table-wrap::after { width: 124px; height: 98px; left: 10%; top: -8px; }
  .table-rail { padding: 10px; border-radius: 30px; }
  #felt { height: clamp(400px, calc(100vh - 330px), 540px); height: clamp(400px, calc(100svh - 330px), 540px); border-radius: 22px;
    background-position: 0 0, 0 0, 0 0; }
  .talk { min-height: 58px; }
  .talk .dealer-line { font-size: 18.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: 14.5px; }
  .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; }
  .placard { transform: none; }
}
@media (prefers-reduced-motion: reduce) { .table-wrap::after { animation: none; } }
