/* Dealer Box — card room at night.
   Layout: casino table seen from above (dealer at the top, seat 1 on the dealer's left).
   Decisions appear on the felt; history, settings and rules sit under the table. */
:root {
  color-scheme: dark;
  --bg: #0b1210;
  --bg-2: #101a17;
  --panel: #141f1b;
  --panel-2: #1a2823;
  --panel-3: #22332c;
  --line: #2a3d35;
  --line-2: #36504a;
  --ink: #f1f3ec;
  --muted: #9cb0a5;
  --faint: #6f8479;

  --felt: #1f6a4c;
  --felt-hi: #2a7e5b;
  --felt-dark: #134432;
  --felt-print: rgba(240, 248, 236, .16);
  --wood: #6b3f22;
  --wood-hi: #9a6235;
  --rail: #2a1a12;
  --rail-hi: #4a2e1f;

  --brass: #e0b866;
  --brass-hi: #f0d08f;
  --brass-ink: #1e1505;
  --good: #5fd590;
  --good-bg: #133524;
  --bad: #ff7b6b;
  --bad-bg: #3d1c18;
  --warn: #f2c14e;
  --warn-bg: #3a2e12;
  --info: #7cb7ff;

  --card: #fdfcf7;
  --card-red: #c62f2a;
  --card-black: #16181a;
  --back-1: #8c2a24;
  --back-2: #b5392f;

  --c1: #f2efe6;   --c1e: #2f5fb5;
  --c5: #c8352e;   --c5e: #f6efe1;
  --c25: #23824a;  --c25e: #f6efe1;
  --c100: #1b1b1d; --c100e: #f6efe1;
  --c500: #6b3fa0; --c500e: #f2d67b;
  --c1000: #e3a722; --c1000e: #3b2405;

  --f-display: "Saira Condensed", "Arial Narrow", "Roboto Condensed", sans-serif;
  --f-body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --shadow: 0 10px 30px rgba(0, 0, 0, .45);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  min-height: 100vh;
  background:
    radial-gradient(1200px 600px at 50% -10%, rgba(224, 184, 102, .08), transparent 60%),
    radial-gradient(900px 500px at 100% 100%, rgba(31, 106, 76, .12), transparent 60%),
    var(--bg);
  color: var(--ink);
  font: 15px/1.5 var(--f-body);
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-block: 0 env(safe-area-inset-bottom, 0px);
  -webkit-font-smoothing: antialiased;
}
body::before {
  /* Card-room carpet: faint repeating diamonds. */
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .5;
  background:
    repeating-linear-gradient(45deg, rgba(255,255,255,.012) 0 2px, transparent 2px 28px),
    repeating-linear-gradient(-45deg, rgba(255,255,255,.012) 0 2px, transparent 2px 28px);
}
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; }
h1, h2, h3, h4 { font-family: var(--f-display); letter-spacing: .01em; text-wrap: balance; margin: 0; line-height: 1.05; }
p { margin: 0; }
.num { font-variant-numeric: tabular-nums; }
.label { font-family: var(--f-display); text-transform: uppercase; letter-spacing: .1em; font-size: 12px; color: var(--muted); font-weight: 700; }
.hint { font-size: 13px; color: var(--muted); }
kbd { font: 700 11px var(--f-display); border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 4px; padding: 0 5px; color: var(--muted); background: var(--panel-2); }

/* ------------------------------------------------------------ chips (shared) */
.chip {
  --c: var(--c5); --e: var(--c5e);
  width: 1em; height: 1em; border-radius: 50%; display: inline-block; flex: none;
  background:
    radial-gradient(circle, var(--c) 0 46%, var(--e) 46% 50%, var(--c) 50% 64%, transparent 64%),
    repeating-conic-gradient(var(--e) 0 18deg, var(--c) 18deg 45deg);
  box-shadow: 0 1px 2px rgba(0,0,0,.5), inset 0 0 0 1px rgba(0,0,0,.25);
}
.chip.v1 { --c: var(--c1); --e: var(--c1e); }
.chip.v5 { --c: var(--c5); --e: var(--c5e); }
.chip.v25 { --c: var(--c25); --e: var(--c25e); }
.chip.v100 { --c: var(--c100); --e: var(--c100e); }
.chip.v500 { --c: var(--c500); --e: var(--c500e); }
.chip.v1000 { --c: var(--c1000); --e: var(--c1000e); }

/* SVG chips: side-view stacks for bets and the pot, top-view chips for markers. */
.stacks { display: flex; gap: 1px; align-items: flex-end; }
.cs { width: var(--cw, 26px); height: calc(var(--cw, 26px) * var(--k)); display: block; filter: drop-shadow(0 2px 2px rgba(0,0,0,.55)); }
.tc { width: 1em; height: 1em; display: inline-block; flex: none; filter: drop-shadow(0 1px 1px rgba(0,0,0,.5)); }
.brand .tc { font-size: 34px; }
.eyebrow .tc { font-size: 18px; }
.who-p .stk .tc { font-size: 13px; }
/* Legacy CSS chips (rack). */
.stacks { display: flex; gap: 2px; align-items: flex-end; }
.col { display: flex; flex-direction: column-reverse; }
.sc {
  --c: var(--c5); --e: var(--c5e);
  width: 20px; height: 5px; border-radius: 50% / 50%; margin-top: -1px;
  background: linear-gradient(90deg, var(--c) 0 14%, var(--e) 14% 24%, var(--c) 24% 44%, var(--e) 44% 56%, var(--c) 56% 76%, var(--e) 76% 86%, var(--c) 86%);
  box-shadow: 0 1px 0 rgba(0,0,0,.45);
}
.sc.v1 { --c: var(--c1); --e: var(--c1e); }
.sc.v25 { --c: var(--c25); --e: var(--c25e); }
.sc.v100 { --c: var(--c100); --e: var(--c100e); }
.sc.v500 { --c: var(--c500); --e: var(--c500e); }
.sc.v1000 { --c: var(--c1000); --e: var(--c1000e); }

/* ------------------------------------------------------------ cards */
.card {
  --w: 44px;
  width: var(--w); height: calc(var(--w) * 1.4); border-radius: calc(var(--w) * .1);
  background: linear-gradient(160deg, #fff, var(--card) 60%, #efece2);
  color: var(--card-black); position: relative; flex: none;
  box-shadow: 0 2px 5px rgba(0,0,0,.45), inset 0 0 0 1px rgba(0,0,0,.08);
  font-family: var(--f-display); line-height: 1;
}
.card.red { color: var(--card-red); }
.card .ix { position: absolute; left: 7%; top: 5%; display: grid; justify-items: center; }
.card .ix b { font-size: calc(var(--w) * .38); font-weight: 800; letter-spacing: -.04em; }
.card .ix i { font-style: normal; font-size: calc(var(--w) * .3); margin-top: -1px; }
.card .pip { position: absolute; right: 8%; bottom: 6%; font-size: calc(var(--w) * .58); }
.card.flip { animation: flip .45s cubic-bezier(.2,.8,.3,1.2) both; }
@keyframes flip { from { transform: rotateY(90deg) translateY(-6px); opacity: .2; } }
.back {
  --w: 18px;
  width: var(--w); height: calc(var(--w) * 1.4); border-radius: 3px; flex: none;
  background:
    radial-gradient(circle at 50% 50%, transparent 0 30%, rgba(255,255,255,.12) 31% 34%, transparent 35%),
    repeating-linear-gradient(45deg, var(--back-1) 0 2px, var(--back-2) 2px 4px);
  border: 2px solid #f6efe1; box-shadow: 0 1px 3px rgba(0,0,0,.5);
}

/* ------------------------------------------------------------ top bar */
.top {
  display: flex; align-items: center; gap: 12px 16px; flex-wrap: wrap;
  padding-block: calc(12px + env(safe-area-inset-top, 0px)) 12px;
  border-bottom: 1px solid var(--line);
  max-width: 1320px; margin: 0 auto;
}
.brand { display: flex; align-items: center; gap: 10px; background: none; border: 0; padding: 0; }
.brand .chip { font-size: 32px; }
.brand h1 { font-size: 24px; font-weight: 900; letter-spacing: .02em; }
.brand h1 span { color: var(--brass); }
.sign {
  display: grid; border-radius: 6px; overflow: hidden; border: 1px solid #000;
  box-shadow: 0 2px 8px rgba(0,0,0,.4); background: #f4efe2; color: #18120a; min-width: 150px;
}
.sign .sh { background: #a8261f; color: #fff; font: 800 11px var(--f-display); letter-spacing: .16em; text-transform: uppercase; padding: 2px 10px; text-align: center; }
.sign .sb { font: 800 16px/1.1 var(--f-display); padding: 3px 10px 4px; text-align: center; }
.sign .sb small { display: block; font-weight: 600; font-size: 11px; color: #5b4c34; letter-spacing: .04em; }
.lvl { font: 800 12px var(--f-display); letter-spacing: .12em; text-transform: uppercase; padding: 4px 10px; border-radius: 99px; border: 1px solid; }
.lvl.l1 { color: #8fe0ad; border-color: #2c6b46; background: #12301f; }
.lvl.l2 { color: #ffd479; border-color: #6b5426; background: #2f2612; }
.lvl.l3 { color: #ff9c8c; border-color: #74362d; background: #331815; }
.spacer { flex: 1; }
.net { font-size: 13px; padding: 4px 12px; border-radius: 99px; background: var(--panel-2); border: 1px solid var(--line); display: inline-flex; align-items: center; gap: 8px; }
.net::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }
.net.ok { color: var(--good); }
.net.wait { color: var(--warn); }
.net.err { color: var(--bad); }
.scorebox { display: flex; align-items: center; gap: 10px; }
.ring {
  --p: 0; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--good) calc(var(--p) * 1%), var(--panel-3) 0);
}
.ring b { width: 34px; height: 34px; border-radius: 50%; background: var(--bg); display: grid; place-items: center; font: 800 13px var(--f-display); }
.scorebox .st { display: grid; line-height: 1.15; }
.scorebox .st b { font: 800 18px var(--f-display); }
.scorebox .st span { font-size: 12px; color: var(--muted); }
.streak { font: 800 13px var(--f-display); color: var(--warn); }

/* ------------------------------------------------------------ buttons & fields */
.btn {
  border: 1px solid var(--line-2); background: var(--panel-2); border-radius: 10px; padding: 9px 14px;
  font-weight: 700; transition: background .15s, border-color .15s, transform .08s; display: inline-flex; align-items: center; gap: 8px; justify-content: center;
}
.btn:hover { border-color: var(--muted); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn.primary { background: linear-gradient(180deg, var(--brass-hi), var(--brass)); color: var(--brass-ink); border-color: #a9853e; box-shadow: 0 2px 0 #8a6a2c, 0 6px 16px rgba(224,184,102,.18); }
.btn.good { background: linear-gradient(180deg, #1d4a32, var(--good-bg)); border-color: var(--good); color: #c9f5d9; }
.btn.bad { background: linear-gradient(180deg, #552620, var(--bad-bg)); border-color: var(--bad); color: #ffd5cf; }
.btn.big { padding: 14px 20px; font-size: 17px; border-radius: 12px; }
.btn.sm { padding: 5px 10px; font-size: 13px; border-radius: 8px; }
.btn kbd { margin-left: 4px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.field { display: grid; gap: 6px; min-width: 0; }
.input, .field select, textarea {
  background: var(--bg); border: 1px solid var(--line-2); border-radius: 10px; padding: 10px 12px; width: 100%;
}
textarea { min-height: 64px; resize: vertical; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg button { border: 1px solid var(--line-2); background: var(--panel-2); border-radius: 9px; padding: 7px 12px; font-weight: 700; font-size: 14px; }
.seg button.on { border-color: var(--brass); color: var(--brass-hi); background: #2b2414; }
.seg button.next { box-shadow: inset 0 -3px 0 var(--brass); }
.seg button:disabled { opacity: .3; }

/* ------------------------------------------------------------ panels */
.panel { background: linear-gradient(180deg, var(--panel), var(--bg-2)); border: 1px solid var(--line); border-radius: 14px; padding: 16px; display: grid; gap: 12px; min-width: 0; }
.panel > h3, details.panel > summary { font-size: 18px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.panel h3 .label { margin-left: auto; }
details.panel > summary { cursor: pointer; list-style: none; font-family: var(--f-display); }
details.panel > summary::-webkit-details-marker { display: none; }
details.panel > summary::after { content: "+"; margin-left: auto; color: var(--muted); font-size: 20px; }
details.panel[open] > summary::after { content: "–"; }

/* ------------------------------------------------------------ home */
.home { max-width: 1120px; margin: 0 auto; padding-block: 28px 56px; display: grid; gap: 32px; }
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 32px; align-items: center; }
.eyebrow { font: 800 13px var(--f-display); letter-spacing: .2em; text-transform: uppercase; color: var(--brass); display: flex; align-items: center; gap: 10px; }
.eyebrow .chip { font-size: 16px; }
.hero h2 { font-size: clamp(42px, 6.4vw, 76px); font-weight: 900; line-height: .92; margin-top: 12px; text-transform: uppercase; }
.hero h2 em { font-style: normal; color: var(--brass); }
.hero p.lead { color: var(--muted); max-width: 48ch; font-size: 17px; margin-top: 16px; }
.hero .facts-row { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 20px; }
.hero .facts-row div { display: grid; }
.hero .facts-row b { font: 900 28px var(--f-display); }
.hero .facts-row span { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }
.resume { background: var(--warn-bg); border: 1px solid #6b5426; border-radius: 12px; padding: 12px 16px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }

.builder { display: grid; gap: 22px; background: linear-gradient(180deg, var(--panel), var(--bg-2)); border: 1px solid var(--line); border-radius: 18px; padding: 22px; }
.builder > h3 { font-size: 28px; font-weight: 900; text-transform: uppercase; }
.step { display: grid; gap: 10px; }
.step-h { display: flex; align-items: baseline; gap: 10px; }
.step-h .n { font: 900 14px var(--f-display); color: var(--brass-ink); background: var(--brass); border-radius: 50%; width: 22px; height: 22px; display: inline-grid; place-items: center; }
.step-h h4 { font-size: 19px; font-weight: 800; }
.step-h .hint { margin-left: auto; }
.games { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.family { display: grid; gap: 6px; align-content: start; }
.family .label { padding-left: 2px; }
.gbtn { text-align: left; border: 1px solid var(--line-2); background: var(--panel-2); border-radius: 10px; padding: 9px 12px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.gbtn b { font: 800 17px var(--f-display); }
.gbtn small { color: var(--muted); font-size: 12px; }
.gbtn.on { border-color: var(--brass); background: #2b2414; box-shadow: inset 0 0 0 1px var(--brass); }
.gbtn.on small { color: var(--brass-hi); }
.players { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.stepper { display: flex; align-items: center; border: 1px solid var(--line-2); border-radius: 12px; overflow: hidden; }
.stepper button { width: 44px; height: 48px; border: 0; background: var(--panel-2); font-size: 22px; font-weight: 700; }
.stepper button:disabled { opacity: .3; }
.stepper output { min-width: 70px; text-align: center; font: 900 30px var(--f-display); }
.mini-table { position: relative; width: 170px; height: 86px; flex: none; }
.mini-table .mt { position: absolute; inset: 14px 18px; border-radius: 50%; background: radial-gradient(ellipse, var(--felt-hi), var(--felt-dark)); box-shadow: 0 0 0 4px var(--wood), 0 0 0 7px var(--rail); }
.mini-table .dot { position: absolute; width: 14px; height: 14px; border-radius: 50%; transform: translate(-50%, -50%); background: var(--brass); border: 2px solid var(--bg); }
.mini-table .dot.dl { background: #f4efe2; width: 22px; height: 9px; border-radius: 3px; }
.levels, .stack-opts, .modes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.opt { text-align: left; border: 1px solid var(--line-2); background: var(--panel-2); border-radius: 12px; padding: 12px 14px; display: grid; gap: 4px; align-content: start; }
.opt b { font: 800 18px var(--f-display); }
.opt span { font-size: 13px; color: var(--muted); }
.opt.on { border-color: var(--brass); background: #2b2414; box-shadow: inset 0 0 0 1px var(--brass); }
.mode { text-align: left; border: 1px solid var(--line-2); background: linear-gradient(180deg, var(--panel-3), var(--panel-2)); border-radius: 14px; padding: 16px; display: grid; gap: 8px; align-content: start; transition: border-color .15s, transform .15s; }
.mode:hover { border-color: var(--brass); transform: translateY(-2px); }
.mode .ic { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--bg); border: 1px solid var(--line-2); }
.mode .ic svg { width: 22px; height: 22px; stroke: var(--brass); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.mode h4 { font-size: 21px; font-weight: 800; }
.mode p { color: var(--muted); font-size: 14px; }
.join { display: flex; gap: 8px; }
.join input { text-transform: uppercase; letter-spacing: .3em; font: 800 20px var(--f-display); width: 8ch; text-align: center; background: var(--bg); border: 1px solid var(--line-2); border-radius: 10px; padding: 6px; }
.how { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.how div { border-top: 2px solid var(--line-2); padding-top: 12px; display: grid; gap: 4px; }
.how b { font: 800 18px var(--f-display); }
.how p { color: var(--muted); font-size: 14px; }

/* ------------------------------------------------------------ game layout */
.game { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 22px; padding-block: 18px 48px; max-width: 1320px; margin: 0 auto; }
.main { min-width: 0; display: grid; gap: 16px; align-content: start; }
.side { min-width: 0; display: grid; gap: 14px; align-content: start; }

/* ------------------------------------------------------------ the table */
.table-wrap { container-type: inline-size; padding: 46px 58px 54px; position: relative; }
.rail {
  --ar: 2.05;
  position: relative; aspect-ratio: var(--ar); width: min(100%, calc(60vh * var(--ar))); margin-inline: auto;
  border-radius: 50%; padding: 4%;
  background:
    radial-gradient(ellipse at 50% 30%, rgba(255,255,255,.08), transparent 60%),
    radial-gradient(ellipse at 50% 50%, var(--rail-hi), var(--rail) 75%);
  box-shadow: 0 30px 60px rgba(0,0,0,.6), 0 0 0 1px #000, inset 0 2px 0 rgba(255,255,255,.08), inset 0 -6px 14px rgba(0,0,0,.5);
}
.rail::before { /* stitching on the leather */
  content: ""; position: absolute; inset: 1.4%; border-radius: 50%; border: 1.5px dashed rgba(255, 230, 200, .16); pointer-events: none;
}
.wood {
  position: absolute; inset: 4%; border-radius: 50%; padding: 1.5%;
  background: linear-gradient(135deg, var(--wood-hi), var(--wood) 40%, #4a2a15 70%, var(--wood-hi));
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.4);
}
.felt {
  position: absolute; inset: 1.5%; border-radius: 50%; overflow: hidden;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)'/%3E%3C/svg%3E"),
    radial-gradient(ellipse at 50% 42%, var(--felt-hi) 0%, var(--felt) 48%, var(--felt-dark) 100%);
  box-shadow: inset 0 0 40px rgba(0,0,0,.45);
}
.felt .line { position: absolute; inset: 17% 14%; border-radius: 50%; border: 2px solid var(--felt-print); }
.felt .print { position: absolute; left: 50%; transform: translateX(-50%); text-align: center; color: var(--felt-print); font-family: var(--f-display); pointer-events: none; white-space: nowrap; }
.felt .print.logo { bottom: 9%; font-weight: 900; font-size: clamp(14px, 3.2cqi, 30px); letter-spacing: .3em; }
.felt .print.limits { top: 9.5%; font-weight: 700; font-size: clamp(9px, 1.4cqi, 13px); letter-spacing: .22em; text-transform: uppercase; }
.table { position: absolute; inset: 0; }
.tray {
  position: absolute; left: 50%; top: 0; transform: translate(-50%, -62%); z-index: 3;
  display: flex; align-items: flex-end; gap: 10px;
}
.rack { display: flex; gap: 2px; padding: 4px 6px 5px; background: linear-gradient(180deg, #2b2f33, #15181b); border: 1px solid #000; border-radius: 6px; box-shadow: 0 4px 10px rgba(0,0,0,.5); }
.rack .slot { width: 13px; height: 24px; border-radius: 3px; background: repeating-linear-gradient(180deg, var(--c) 0 3px, rgba(0,0,0,.35) 3px 4px); }
.deck { position: relative; width: 22px; height: 30px; }
.deck .back { position: absolute; inset: 0; --w: 22px; }
.deck .back:nth-child(2) { transform: translate(2px, -2px); }
.deck .back:nth-child(3) { transform: translate(4px, -4px); }
.dealer-tag { position: absolute; left: 50%; top: calc(100% + 4px); transform: translateX(-50%); font: 800 10px var(--f-display); letter-spacing: .24em; color: rgba(255,255,255,.55); }

.center { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: grid; justify-items: center; gap: 8px; width: 62%; z-index: 1; }
.street { font: 800 12px var(--f-display); letter-spacing: .22em; text-transform: uppercase; color: rgba(255,255,255,.78); background: rgba(0,0,0,.28); padding: 2px 12px; border-radius: 99px; }
.board { display: flex; gap: 6px; min-height: 62px; align-items: center; }
.board .slot-empty { width: 44px; height: 62px; border-radius: 5px; border: 1.5px dashed rgba(255,255,255,.14); }
.pot { display: flex; align-items: center; gap: 10px; }
.pot .stacks { --cw: 34px; }
.pot .amt { font: 800 16px var(--f-display); background: rgba(0,0,0,.42); border-radius: 99px; padding: 2px 12px; border: 1px solid rgba(255,255,255,.1); }
.pot .amt.hidden { color: rgba(255,255,255,.65); font-weight: 600; font-size: 13px; }

.seat {
  position: absolute; transform: translate(-50%, -50%); width: 128px; z-index: 2;
  display: grid; justify-items: center; transition: opacity .25s;
}
.seat .hand { display: flex; justify-content: center; height: 24px; margin-bottom: -6px; position: relative; z-index: 1; }
.seat .hand .back { --w: 17px; margin-left: -5px; transform-origin: 50% 120%; }
.seat .hand .back:first-child { margin-left: 0; }
.seat .hand.deal .back { animation: deal .5s cubic-bezier(.2,.7,.3,1) both; }
.seat .hand.deal .back:nth-child(2) { animation-delay: .06s; }
.seat .hand.deal .back:nth-child(3) { animation-delay: .12s; }
.seat .hand.deal .back:nth-child(4) { animation-delay: .18s; }
@keyframes deal { from { transform: translateY(-40px) scale(.6) rotate(-20deg); opacity: 0; } }
.plate {
  width: 100%; display: flex; align-items: center; gap: 7px; padding: 6px 8px 6px 6px;
  background: linear-gradient(180deg, #1d2a25, #111a17); border: 1.5px solid var(--line-2); border-radius: 12px;
  box-shadow: 0 6px 14px rgba(0,0,0,.5); position: relative;
}
.avatar {
  --h: 140; width: 38px; height: 38px; border-radius: 50%; flex: none; display: grid; place-items: center; position: relative;
  background: radial-gradient(circle at 50% 35%, hsl(var(--h) 45% 52%), hsl(var(--h) 50% 26%));
  font: 800 13px var(--f-display); color: #fff; border: 2px solid rgba(255,255,255,.3);
}
.avatar svg { width: 100%; height: 100%; border-radius: 50%; }
.avatar .sn {
  position: absolute; right: -5px; bottom: -4px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 99px;
  background: #0d0d0d; border: 1.5px solid var(--brass); color: var(--brass-hi); font: 800 10px/14px var(--f-display); text-align: center;
}
.who-p { display: grid; min-width: 0; line-height: 1.1; text-align: left; }
.who-p .nm { font-size: 12px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who-p .nm em { font-style: normal; color: var(--faint); font-weight: 600; }
.who-p .stk { font: 800 17px var(--f-display); font-variant-numeric: tabular-nums; display: flex; align-items: center; gap: 4px; }
.who-p .stk .chip { font-size: 11px; }
.marks { position: absolute; top: -9px; right: -8px; display: flex; gap: 3px; }
.mk { font: 900 10px var(--f-display); border-radius: 99px; min-width: 21px; height: 21px; display: inline-grid; place-items: center; padding: 0 4px; box-shadow: 0 2px 4px rgba(0,0,0,.5); }
.mk.d { background: radial-gradient(circle, #fff 0 60%, #ddd 61%); color: #111; border: 1px solid #999; }
.mk.sb { background: #3a62c9; color: #fff; }
.mk.bb { background: #f0b92b; color: #2a1d02; }
.ribbon { position: absolute; left: 50%; bottom: -9px; transform: translateX(-50%); font: 900 10px var(--f-display); letter-spacing: .14em; padding: 1px 8px; border-radius: 4px; text-transform: uppercase; white-space: nowrap; line-height: 1.5; }
.seat.folded { opacity: .42; }
.seat.folded .ribbon { background: #3a3f3d; color: #cfd6d2; }
.seat.allin .plate { border-color: var(--warn); }
.seat.allin .ribbon { background: var(--warn); color: #2a1d02; }
.seat.turn .plate { border-color: var(--brass); box-shadow: 0 0 0 3px rgba(224,184,102,.28), 0 0 22px rgba(224,184,102,.35); }
.seat.acting .plate { border-color: #fff; }
.bubble {
  position: absolute; left: 50%; bottom: calc(100% + 6px); transform: translateX(-50%); z-index: 5;
  background: #fffdf6; color: #141414; font: 900 15px var(--f-display); white-space: nowrap;
  padding: 5px 12px; border-radius: 10px; text-transform: uppercase; letter-spacing: .02em;
  box-shadow: 0 6px 16px rgba(0,0,0,.5); animation: pop .2s ease-out;
}
.bubble small { display: block; font: 700 10px var(--f-body); text-transform: none; color: #6a6253; letter-spacing: 0; }
.bubble::after { content: ""; position: absolute; left: 50%; top: 100%; transform: translateX(-50%); border: 7px solid transparent; border-top-color: #fffdf6; }
.bubble.below { bottom: auto; top: calc(100% + 8px); }
.bubble.below::after { top: auto; bottom: 100%; border-top-color: transparent; border-bottom-color: #fffdf6; }
/* Seats near the left/right edge open their bubble inward so it stays on screen. */
.bubble.bl { left: 0; transform: none; }
.bubble.bl::after { left: 24px; }
.bubble.br { left: auto; right: 0; transform: none; }
.bubble.br::after { left: auto; right: 12px; transform: none; }
.bubble.bl, .bubble.br { animation-name: pop2; }
@keyframes pop { from { transform: translateX(-50%) scale(.7); opacity: 0; } }
@keyframes pop2 { from { transform: scale(.7); opacity: 0; } }

.bet { position: absolute; transform: translate(-50%, -50%); display: flex; align-items: flex-end; gap: 5px; z-index: 1; --cw: 30px; }
.bet b { font: 800 14px var(--f-display); background: rgba(0,0,0,.55); border-radius: 99px; padding: 0 8px; font-variant-numeric: tabular-nums; border: 1px solid rgba(255,255,255,.12); }

@container (max-width: 560px) {
  .table-wrap { padding: 40px 36px 46px; }
  .rail { --ar: .78; width: min(100%, calc(64vh * var(--ar)), 430px); padding: 4.2%; }
  .felt .line { inset: 13% 15%; }
  .seat { width: 86px; }
  .plate { padding: 4px 5px; gap: 4px; border-radius: 10px; }
  .avatar { width: 26px; height: 26px; font-size: 10px; }
  .avatar .sn { min-width: 14px; height: 14px; font-size: 9px; line-height: 11px; right: -4px; bottom: -3px; }
  .who-p .nm { font-size: 10px; }
  .who-p .nm em { display: none; }
  .who-p .stk { font-size: 14px; }
  .who-p .stk .tc { display: none; }
  .table-wrap { padding-top: 64px; }
  .tray { transform: translate(-50%, -128%); }
  .ribbon { font-size: 9px; padding: 0 5px; letter-spacing: .08em; bottom: -8px; }
  .seat .hand { height: 19px; }
  .seat .hand .back { --w: 13px; margin-left: -4px; }
  .card { --w: 31px; }
  .board { min-height: 44px; gap: 3px; }
  .board .slot-empty { width: 31px; height: 44px; }
  .center { width: 86%; }
  .bubble { font-size: 12px; padding: 3px 8px; }
  .bet b { font-size: 12px; }
  .bet { --cw: 21px; }
  .pot .stacks { --cw: 23px; }
  .mk { min-width: 17px; height: 17px; font-size: 9px; }
  .rack .slot { width: 10px; height: 18px; }
}

/* ------------------------------------------------------------ dealer console */
.console { background: linear-gradient(180deg, var(--panel-2), var(--panel)); border: 1px solid var(--line-2); border-radius: 16px; padding: 18px 20px; display: grid; gap: 14px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.console::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: linear-gradient(90deg, transparent, var(--brass), transparent); opacity: .7; }
.console .who { font-size: 13px; color: var(--muted); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.tagp { font: 800 11px var(--f-display); letter-spacing: .12em; text-transform: uppercase; padding: 2px 8px; border-radius: 99px; background: var(--panel-3); color: var(--muted); }
.console .say { font: 900 clamp(28px, 4.4vw, 40px)/1 var(--f-display); text-transform: uppercase; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.console .say .avatar { width: 52px; height: 52px; font-size: 15px; }
.console .prompt { font: 800 24px/1.2 var(--f-display); }
.decide { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.answer { display: flex; gap: 10px; flex-wrap: wrap; align-items: stretch; }
.answer input { font: 900 30px var(--f-display); width: 7ch; text-align: center; background: var(--bg); border: 1px solid var(--line-2); border-radius: 12px; padding: 6px 10px; font-variant-numeric: tabular-nums; }
.keypad { display: grid; grid-template-columns: repeat(5, 46px); gap: 6px; }
.keypad button { height: 42px; border-radius: 9px; border: 1px solid var(--line-2); background: var(--panel-3); font: 800 18px var(--f-display); }
.reasons { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.reason { text-align: left; border: 1px solid var(--line-2); background: var(--panel-3); border-radius: 10px; padding: 9px 12px; font-size: 14px; font-weight: 600; }
.reason.on { border-color: var(--bad); background: var(--bad-bg); color: #ffd5cf; }
.rulings { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.ruling { text-align: left; border: 1px solid var(--line-2); background: var(--panel-3); border-radius: 12px; padding: 12px 14px; display: grid; gap: 2px; }
.ruling b { font: 800 19px var(--f-display); }
.ruling span { font-size: 12px; color: var(--muted); }
.ruling:hover { border-color: var(--brass); }
.result { border-radius: 14px; padding: 12px 16px; display: grid; gap: 4px; border: 1px solid; animation: slidein .25s ease-out; }
@keyframes slidein { from { transform: translateY(-6px); opacity: 0; } }
.result.good { background: var(--good-bg); border-color: #2f7a4f; }
.result.bad { background: var(--bad-bg); border-color: #8a3a31; }
.result.warn { background: var(--warn-bg); border-color: #7a6025; }
.result b { font: 800 19px var(--f-display); display: flex; gap: 8px; align-items: center; }
.result.good b::before { content: "✓"; color: var(--good); }
.result.bad b::before { content: "✗"; color: var(--bad); }
.result.warn b::before { content: "!"; color: var(--warn); }
.result p { font-size: 14px; opacity: .92; }
.wait { color: var(--muted); display: flex; align-items: center; gap: 10px; }
.dots::after { content: "…"; animation: blink 1.2s infinite; }
@keyframes blink { 50% { opacity: .2; } }
.thinking { display: inline-flex; gap: 4px; }
.thinking i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: bounce 1s infinite; }
.thinking i:nth-child(2) { animation-delay: .15s; }
.thinking i:nth-child(3) { animation-delay: .3s; }
@keyframes bounce { 50% { transform: translateY(-5px); opacity: .5; } }
.summary { display: grid; gap: 6px; }
.summary .pt { display: flex; justify-content: space-between; gap: 12px; padding: 8px 12px; border-radius: 10px; background: var(--panel-3); }
.summary .pt b { font: 800 18px var(--f-display); }

/* ------------------------------------------------------------ side column */
.stats { display: grid; gap: 10px; }
.bar { display: grid; gap: 4px; }
.bar .bl { display: flex; justify-content: space-between; font-size: 13px; }
.bar .bl b { font: 800 15px var(--f-display); }
.bar .bt { height: 7px; border-radius: 99px; background: var(--panel-3); overflow: hidden; }
.bar .bt i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--good), #9be7b8); }
.log { display: grid; gap: 8px; max-height: 460px; overflow: auto; padding-right: 4px; }
.entry { border-left: 3px solid var(--line-2); padding: 3px 0 3px 10px; font-size: 14px; }
.entry.good { border-color: var(--good); }
.entry.bad { border-color: var(--bad); }
.entry.warn { border-color: var(--warn); }
.entry.info { border-color: var(--info); }
.entry .meta { font-size: 11px; color: var(--faint); text-transform: uppercase; letter-spacing: .08em; }
.entry p { margin-top: 2px; color: var(--muted); font-size: 13px; }
.entry .said { color: var(--ink); font-style: italic; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 14px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font: 800 17px var(--f-display); font-variant-numeric: tabular-nums; text-align: right; }
.facts dd.small { font: 600 13px var(--f-body); }
.amount { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.amount input { width: 8ch; font: 900 22px var(--f-display); text-align: center; background: var(--bg); border: 1px solid var(--line-2); border-radius: 10px; padding: 6px; }
.trick { border-color: #74362d !important; color: #ffc2b8; }
.rules { display: grid; gap: 12px; font-size: 14px; color: var(--muted); }
.rules b { color: var(--ink); }
.rules h4 { font-size: 15px; color: var(--brass); text-transform: uppercase; letter-spacing: .1em; }
.toggle { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.toggle input { width: 18px; height: 18px; accent-color: var(--brass); }
.share { display: flex; gap: 8px; align-items: center; background: var(--bg); border: 1px dashed var(--line-2); border-radius: 10px; padding: 8px 10px; }
.share code { flex: 1; min-width: 0; overflow-wrap: anywhere; font-size: 13px; color: var(--muted); }
.bigcode { font: 900 44px var(--f-display); letter-spacing: .25em; color: var(--brass); text-align: center; }

@media (max-width: 1020px) {
  .game { grid-template-columns: minmax(0, 1fr); }
  .hero { grid-template-columns: minmax(0, 1fr); }
  .how { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .games, .levels, .stack-opts, .modes { grid-template-columns: minmax(0, 1fr); }
  .how { grid-template-columns: minmax(0, 1fr); }
  .builder { padding: 16px; }
  .scorebox .st span { display: none; }
  .sign { min-width: 0; }
  .keypad { grid-template-columns: repeat(5, 1fr); width: 100%; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ------------------------------------------------------------ play screen: one column, decisions on the felt */
.play { max-width: 1180px; margin: 0 auto; padding-block: 8px 48px; display: grid; gap: 14px; }
.play .table-wrap { padding-top: 54px; }
.under { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; align-items: start; }
.under .console { grid-column: 1 / -1; }
.center.has-hud { z-index: 4; gap: 6px; }
.hud {
  width: min(100%, 440px); display: grid; gap: 8px; justify-items: center; text-align: center;
  background: rgba(8, 14, 12, .86); border: 1px solid rgba(255,255,255,.14); border-radius: 16px; padding: 12px 14px;
  box-shadow: 0 12px 30px rgba(0,0,0,.55); backdrop-filter: blur(3px); animation: slidein .2s ease-out;
}
.hud .btn { width: 100%; }
.hq { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.hq .avatar { width: 30px; height: 30px; }
.hs { font: 900 26px/1 var(--f-display); text-transform: uppercase; }
.hs.small { font-size: 18px; line-height: 1.1; }
.hl { font: 800 12px var(--f-display); letter-spacing: .12em; text-transform: uppercase; color: var(--brass-hi); display: flex; align-items: center; gap: 8px; }
.hl.wait { color: var(--muted); }
.hp { font: 700 17px/1.2 var(--f-display); }
.hp.good { color: var(--good); }
.hp.bad { color: var(--bad); font: 600 13px/1.35 var(--f-body); }
.hb { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: 100%; }
.hb .btn { padding: 12px 10px; font-size: 16px; }
.hopts { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; width: 100%; }
.hopt { font-size: 14px; padding: 9px 8px; background: var(--panel-3); }
.hopt:hover { border-color: var(--brass); }
.hans { display: flex; gap: 8px; width: 100%; }
.hans input { flex: 1; min-width: 0; font: 900 24px var(--f-display); text-align: center; background: var(--bg); border: 1px solid var(--line-2); border-radius: 10px; padding: 4px 8px; }
.hans .btn { width: auto; padding-inline: 18px; }
.hud .summary { width: 100%; }
.hud .summary .pt { padding: 6px 10px; font-size: 14px; }
.sheet { position: absolute; inset: 0; z-index: 20; display: grid; place-items: center; padding: 12px; background: rgba(5, 9, 8, .62); backdrop-filter: blur(2px); }
.sheet-in { width: min(100%, 620px); max-height: 100%; overflow: auto; display: grid; gap: 10px; background: var(--panel); border: 1px solid var(--line-2); border-radius: 16px; padding: 16px; box-shadow: var(--shadow); }
.sheet .reasons { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
@container (max-width: 560px) {
  .center.has-hud { width: 68%; gap: 4px; }
  .center.has-hud .pot .amt.hidden { display: none; }
  .center.has-hud .board { min-height: 34px; }
  .center.has-hud .card { --w: 24px; }
  .center.has-hud .board .slot-empty { width: 24px; height: 34px; }
  .hud { padding: 8px; gap: 6px; border-radius: 12px; }
  .hs { font-size: 19px; }
  .hs.small { font-size: 14px; }
  .hp { font-size: 14px; }
  .hq { font-size: 11px; }
  .hq .avatar { width: 22px; height: 22px; }
  .hq .avatar .sn { display: none; }
  .hb { gap: 5px; }
  .hb .btn { padding: 9px 4px; font-size: 13px; white-space: nowrap; }
  .hopts { grid-template-columns: 1fr; }
  .hopt { font-size: 12px; padding: 6px; }
  .hud kbd { display: none; }
  .hans input { font-size: 19px; }
  .center.has-hud .pot .stacks { --cw: 16px; }
  .center.has-hud .street { font-size: 10px; padding: 1px 8px; }
}

/* Main pot and side pots, side by side in the middle */
.pots { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; justify-content: center; }
.pile { display: grid; justify-items: center; gap: 3px; }
.pile .stacks { --cw: 26px; }
.pile .amt { font: 700 12px var(--f-display); background: rgba(0,0,0,.45); border-radius: 99px; padding: 1px 9px; border: 1px solid rgba(255,255,255,.12); white-space: nowrap; }
.pile .amt b { color: var(--brass-hi); font-weight: 800; }
@container (max-width: 560px) {
  .pots { gap: 6px; }
  .pile .stacks { --cw: 16px; }
  .pile .amt { font-size: 10px; padding: 0 6px; }
}

/* Showdown: hands turned face up on the seats */
.seat .hand.up { height: auto; gap: 2px; margin-bottom: -4px; }
.seat .hand.up .card { --w: 27px; }
.seat .hand.up .card .pip { display: none; }
@container (max-width: 560px) {
  .seat .hand.up .card { --w: 18px; }
  .seat .hand.up { gap: 1px; }
}

/* Over the page (body, outside #app so re-renders never touch it): streak toasts, chip rain, the floor easter egg */
.toast {
  position: fixed; left: 50%; top: 30%; z-index: 60; transform: translateX(-50%); max-width: calc(100vw - 32px);
  display: grid; justify-items: center; gap: 8px; padding: 12px 20px; border-radius: 14px; text-align: center; pointer-events: none;
  background: rgba(10, 16, 14, .93); border: 1px solid var(--brass); box-shadow: 0 14px 40px rgba(0,0,0,.6); color: var(--ink);
  animation: toast-in .4s cubic-bezier(.2,1.5,.4,1) both, toast-out .3s ease-in var(--out, 1.9s) forwards;
}
.toast b { font: 800 20px/1.15 var(--f-display); color: var(--brass-hi); letter-spacing: .02em; text-wrap: balance; }
.toast .tc-row { display: flex; }
.toast .tc-row .tc { width: 26px; height: 26px; margin: 0 -3px; filter: drop-shadow(0 2px 3px rgba(0,0,0,.5)); }
.toast .tc-row .tc:nth-child(2) { transform: translateY(-4px); }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 14px) scale(.88); } }
@keyframes toast-out { to { opacity: 0; transform: translate(-50%, -10px); } }
.chip-rain { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 59; pointer-events: none; }
.floor-t .floor-shout { font-size: 36px; letter-spacing: .08em; color: var(--warn); }
.floor-badge {
  display: flex; align-items: center; gap: 8px; padding: 3px 14px 3px 3px; border-radius: 99px;
  background: #fffdf6; color: #141414; font: 800 14px var(--f-display); text-transform: uppercase; letter-spacing: .04em; text-align: left;
}
.floor-badge svg { width: 34px; height: 34px; flex: none; border-radius: 50%; background: radial-gradient(circle at 50% 35%, #4a6a5c, #1c2b25); }

/* New hand: a short glow on the seat that has the button */
.seat.dpulse .plate { animation: dpulse .3s ease-out; }
@keyframes dpulse { 50% { transform: scale(1.04); box-shadow: 0 0 0 4px rgba(224,184,102,.45), 0 0 24px rgba(224,184,102,.5); } }

/* Entry: the three ways to play */
.trio { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.big-mode { position: relative; display: grid; gap: 8px; align-content: start; text-decoration: none; color: var(--ink); padding: 20px; border-radius: 18px; border: 1px solid var(--line-2); background: linear-gradient(160deg, var(--panel-3), var(--panel)); transition: transform .18s, border-color .18s, box-shadow .18s; }
.big-mode:hover { transform: translateY(-3px); border-color: var(--brass); box-shadow: 0 12px 30px rgba(0,0,0,.35); }
.big-mode h4 { font-size: 24px; font-weight: 900; }
.big-mode p { color: var(--muted); font-size: 14px; }
.big-mode .ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--bg); border: 1px solid var(--line-2); }
.big-mode .ic svg { width: 24px; height: 24px; stroke: var(--brass); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.big-mode.m1 { background: linear-gradient(160deg, #1f3a5c, var(--panel)); }
.big-mode.m2 { background: linear-gradient(160deg, #4a2a1a, var(--panel)); }
.tag-new { position: absolute; top: 14px; right: 14px; font: 800 11px var(--f-display); letter-spacing: .12em; text-transform: uppercase; color: var(--brass-ink); background: var(--brass); padding: 2px 8px; border-radius: 99px; }
@media (max-width: 760px) { .trio { grid-template-columns: minmax(0, 1fr); } }

/* The player's character from El Playground */
.me-chip { display: inline-flex; align-items: center; gap: 8px; padding: 3px 12px 3px 3px; border-radius: 99px; background: var(--panel-2); border: 1px solid var(--line-2); color: var(--ink); text-decoration: none; font: 700 14px var(--f-body); }
.me-chip:hover { border-color: var(--brass); }
.me-chip .me-av { width: 32px; height: 32px; border-radius: 50%; overflow: hidden; display: block; }
.me-chip .me-av svg { width: 100%; height: 100%; display: block; }
.me-chip small { display: block; font: 700 10px var(--f-display); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); line-height: 1; }

/* Mode picker: the first screen of Dealer Box */
.pick { display: grid; gap: 10px; padding-top: 12px; }
.pick h2 { font-size: clamp(40px, 7vw, 72px); font-weight: 900; text-transform: uppercase; line-height: .95; }
.pick .lead { color: var(--muted); font-size: 17px; }
button.big-mode { font: inherit; text-align: left; cursor: pointer; }
.trio .big-mode { min-height: 190px; }

/* Animated scenes behind the mode cards */
.big-mode { overflow: hidden; isolation: isolate; }
.big-mode > :not(.scene):not(.tag-new) { position: relative; z-index: 1; }
.big-mode > .tag-new { z-index: 2; }
.big-mode.m4 { background: linear-gradient(160deg, #1d3b2c, var(--panel)); }
.scene { position: absolute; right: -6px; bottom: -6px; width: 62%; height: 100%; z-index: 0; pointer-events: none; opacity: .7; transition: opacity .3s; -webkit-mask-image: linear-gradient(90deg, transparent, #000 35%); mask-image: linear-gradient(90deg, transparent, #000 35%); }
.big-mode:hover .scene { opacity: .85; }
.scene > * { position: absolute; }
.scene .card { --w: 30px; }
.scene .card .pip { display: none; }
.sc-av { width: 38px; height: 38px; border-radius: 50%; overflow: hidden; box-shadow: 0 3px 8px rgba(0,0,0,.5); }
.sc-av svg { width: 100%; height: 100%; display: block; }
.sc-chip .tc { font-size: 22px; }
/* Amigos: a tiny chaotic table */
.s-amigos .sc-felt { left: 22%; top: 34%; width: 70%; height: 46%; border-radius: 50%; background: radial-gradient(ellipse, #2a7e5b, #134432); box-shadow: 0 0 0 5px #5a3a26; }
.s-amigos .a0 { left: 14%; top: 22%; } .s-amigos .a1 { left: 74%; top: 16%; } .s-amigos .a2 { left: 48%; top: 74%; }
.s-amigos .a1 { animation: hit 6s infinite; }
.sc-tomato { width: 14px; height: 14px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #ff8a7a, #d3261c); left: 22%; top: 30%; animation: toss 6s infinite; }
.sc-tomato::before { content: ""; position: absolute; left: 4px; top: -3px; width: 6px; height: 4px; background: #3c9a3c; border-radius: 50% 50% 0 0; }
.sc-splat { left: 76%; top: 18%; width: 34px; height: 34px; border-radius: 40% 60% 55% 45%; background: #d3261c; opacity: 0; animation: splat 6s infinite; }
@keyframes toss { 0%, 8% { left: 22%; top: 30%; opacity: 0; transform: rotate(0); } 10% { opacity: 1; } 20% { top: 4%; } 30% { left: 78%; top: 22%; opacity: 1; transform: rotate(540deg); } 31%, 100% { left: 78%; top: 22%; opacity: 0; } }
@keyframes splat { 0%, 29% { opacity: 0; transform: scale(.2); } 31% { opacity: .9; transform: scale(1.1); } 55% { opacity: .9; transform: scale(1); } 70%, 100% { opacity: 0; } }
@keyframes hit { 30%, 34% { transform: translateX(0); } 31% { transform: translateX(-4px) rotate(-8deg); } 33% { transform: translateX(3px) rotate(6deg); } }
.sc-bub { background: #fffdf6; color: #141414; font: 900 11px var(--f-display); padding: 3px 7px; border-radius: 8px; text-transform: uppercase; white-space: nowrap; opacity: 0; }
.sc-bub.b1 { left: 2%; top: 4%; animation: bub 6s infinite 1.2s; } .sc-bub.b2 { left: 54%; top: 58%; animation: bub 6s infinite 3.6s; }
@keyframes bub { 0% { opacity: 0; transform: scale(.6); } 5%, 25% { opacity: 1; transform: scale(1); } 32%, 100% { opacity: 0; } }
.s-amigos .sc-chip { left: 52%; top: 46%; animation: chipjump 6s infinite; }
.s-amigos .c2 { left: 60%; animation-delay: .15s; } .s-amigos .c3 { left: 44%; animation-delay: .3s; }
@keyframes chipjump { 0%, 60% { transform: translateY(0); } 66% { transform: translateY(-16px) rotate(180deg); } 72%, 100% { transform: translateY(0) rotate(360deg); } }
.sc-power { left: 84%; top: 62%; width: 22px; height: 30px; border-radius: 4px; background: linear-gradient(160deg, #6b3fa0, #2a1745); border: 1.5px solid var(--brass); color: var(--brass-hi); font: 900 16px var(--f-display); display: grid; place-items: center; animation: power 6s infinite; }
@keyframes power { 0%, 70% { transform: rotateY(0); } 78% { transform: rotateY(180deg) scale(1.15); box-shadow: 0 0 18px var(--brass); } 90%, 100% { transform: rotateY(360deg); } }
/* Dealer: cards fly out of the shoe, someone cheats */
.sc-deck { left: 6%; top: 10%; width: 30px; height: 42px; }
.sc-deck .back { position: absolute; --w: 30px; } .sc-deck .back + .back { transform: translate(2px, -2px); }
.s-dealer .sc-card { left: 6%; top: 10%; animation: scdeal 5s infinite; }
.s-dealer .k0 { --dx: 70px; --dy: 70px; } .s-dealer .k1 { --dx: 110px; --dy: 74px; animation-delay: .25s; } .s-dealer .k2 { --dx: 150px; --dy: 70px; animation-delay: .5s; }
@keyframes scdeal { 0% { transform: translate(0, 0) rotate(0); opacity: 0; } 6% { opacity: 1; } 18%, 80% { transform: translate(var(--dx), var(--dy)) rotate(-4deg); opacity: 1; } 92%, 100% { transform: translate(var(--dx), var(--dy)); opacity: 0; } }
.s-dealer .sc-chip { left: 58%; top: 28%; animation: slidechip 5s infinite 1s; } .s-dealer .c2 { left: 64%; top: 24%; animation-delay: 1.15s; }
@keyframes slidechip { 0%, 10% { transform: translate(40px, -20px); opacity: 0; } 25%, 70% { transform: translate(0, 0); opacity: 1; } 80%, 100% { opacity: 0; } }
.s-dealer .a0 { left: 78%; top: 4%; }
.sc-stamp { left: 28%; top: 30%; font: 900 22px var(--f-display); color: var(--bad); border: 3px solid var(--bad); border-radius: 8px; padding: 0 8px; transform: rotate(-12deg) scale(2); opacity: 0; animation: stamp 5s infinite 2.6s; }
@keyframes stamp { 0% { opacity: 0; transform: rotate(-12deg) scale(2.2); } 6%, 30% { opacity: 1; transform: rotate(-12deg) scale(1); } 40%, 100% { opacity: 0; transform: rotate(-12deg) scale(1); } }
/* Entrenamiento: questions float up and get graded */
.sc-q { background: rgba(255,255,255,.08); border: 1px solid var(--line-2); color: var(--ink); font: 800 13px var(--f-display); padding: 4px 9px; border-radius: 9px; white-space: nowrap; animation: rise 7s infinite linear; opacity: 0; }
.sc-q.q1 { left: 20%; } .sc-q.q2 { left: 58%; animation-delay: 1.7s; } .sc-q.q3 { left: 30%; animation-delay: 3.4s; } .sc-q.q4 { left: 66%; animation-delay: 5.1s; }
@keyframes rise { 0% { top: 100%; opacity: 0; } 10% { opacity: 1; } 80% { opacity: 1; } 100% { top: -10%; opacity: 0; } }
.sc-ok { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font: 900 14px var(--f-body); color: #0d2a19; background: var(--good); opacity: 0; animation: grade 7s infinite; }
.sc-ok.no { background: var(--bad); color: #3a0c07; }
.sc-ok.o1 { left: 46%; top: 50%; animation-delay: 1s; } .sc-ok.o2 { left: 80%; top: 34%; animation-delay: 3s; } .sc-ok.o3 { left: 56%; top: 18%; animation-delay: 5s; }
@keyframes grade { 0% { opacity: 0; transform: scale(.3); } 4%, 16% { opacity: 1; transform: scale(1); } 24%, 100% { opacity: 0; transform: scale(1); } }
/* Blackjack: ace + king flip into 21 */
.s-bj .sc-card { top: 30%; animation: bjflip 5s infinite; } .s-bj .k0 { left: 38%; } .s-bj .k1 { left: 52%; animation-delay: .3s; }
@keyframes bjflip { 0% { transform: rotateY(90deg) translateY(-20px); opacity: 0; } 10%, 75% { transform: rotateY(0) rotate(-6deg); opacity: 1; } 90%, 100% { opacity: 0; } }
.sc-21 { left: 70%; top: 18%; font: 900 34px var(--f-display); color: var(--brass-hi); text-shadow: 0 3px 0 #6b4a05; opacity: 0; animation: bj21 5s infinite 1s; }
@keyframes bj21 { 0% { opacity: 0; transform: scale(.4) rotate(-20deg); } 8%, 50% { opacity: 1; transform: scale(1) rotate(-8deg); } 65%, 100% { opacity: 0; } }
.s-bj .sc-chip { left: 30%; top: 70%; animation: chipjump 5s infinite 1.2s; } .s-bj .c2 { left: 40%; animation-delay: 1.3s; } .s-bj .c3 { left: 50%; animation-delay: 1.4s; }
@media (max-width: 760px) { .trio { grid-template-columns: minmax(0, 1fr); } .scene { width: 70%; } }
@media (prefers-reduced-motion: reduce) { .scene { display: none; } }

/* ------------------------------------------------------------ training: what to practice + focused drills */
.practice { display: grid; gap: 14px; }
.practice h2 { font-size: clamp(30px, 5vw, 48px); font-weight: 900; text-transform: uppercase; line-height: .95; }
.pgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.pgrid .big-mode { padding: 16px; gap: 6px; }
.pgrid .big-mode h4 { font-size: 21px; line-height: 1; }
.pgrid .big-mode p { font-size: 13px; }
.pgrid .big-mode.on { border-color: var(--brass); box-shadow: inset 0 0 0 1px var(--brass), 0 10px 26px rgba(0,0,0,.3); }
.pcard.p-full { background: linear-gradient(160deg, #1d3b2c, var(--panel)); }
.pcard.p-lectura { background: linear-gradient(160deg, #3b2140, var(--panel)); }
.pcard.p-mate { background: linear-gradient(160deg, #1f3a5c, var(--panel)); }
.pcard.p-rulings { background: linear-gradient(160deg, #4a2a1a, var(--panel)); }
.pcard .best { font: 800 12px var(--f-display); letter-spacing: .08em; text-transform: uppercase; color: var(--warn); }
.drill-setup { gap: 16px; }
.drill-setup .btn.big { justify-self: start; min-width: 200px; }
@media (max-width: 900px) { .pgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 420px) {
  .pgrid { gap: 8px; }
  .pgrid .big-mode { padding: 12px; }
  .pgrid .big-mode .ic { width: 34px; height: 34px; border-radius: 10px; }
  .pgrid .big-mode h4 { font-size: 18px; }
  .pgrid .big-mode p { font-size: 12px; }
  .drill-setup .btn.big { justify-self: stretch; }
}

.drill-bar { position: relative; overflow: hidden; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 10px 14px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.drill-bar > b { font: 800 17px var(--f-display); color: var(--ink); text-transform: uppercase; }
.drill-bar .num { color: var(--ink); font: 800 15px var(--f-display); }
.drill-bar .btn { margin-left: auto; }
.dtimer { position: absolute; left: 0; bottom: 0; width: 100%; height: 4px; background: var(--brass); transform-origin: left; animation: dtimer 10s linear forwards; }
@keyframes dtimer { 70% { background: var(--warn); } to { transform: scaleX(0); background: var(--bad); } }
.drill-sum { max-width: 620px; width: 100%; justify-self: center; }
.dfacts { display: flex; gap: 22px; flex-wrap: wrap; }
.dfacts div { display: grid; }
.dfacts b { font: 900 30px var(--f-display); }
.dfacts span { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }
@media (max-width: 420px) { .drill-bar { gap: 4px 10px; padding: 8px 10px; font-size: 13px; } .drill-bar > b { font-size: 15px; width: 100%; } }
.drill-hud { justify-self: center; margin-top: -6px; }
@media (pointer: coarse) { .drill-hud kbd, .drill-bar kbd { display: none; } }

/* ------------------------------------------------------------ players seated as their El Playground character, seen from above */
.table { --chw: 88px; }
.seat.has-ch { width: var(--chw); height: var(--chw); display: block; }
.ch { position: absolute; inset: 0; transform: rotate(var(--rw, 0deg)) translateY(-22%); }
.ch .body { position: absolute; inset: 0; animation: ch-breathe 3.4s ease-in-out var(--bd, 0s) infinite; transition: translate .25s; }
.ch .body svg { width: 100%; height: 100%; display: block; overflow: visible; }
.ch .glow { position: absolute; inset: -20%; border-radius: 50%; background: radial-gradient(closest-side, rgba(242,203,120,.62), rgba(242,203,120,.2) 62%, transparent); opacity: 0; transition: opacity .25s; }
.seat.turn .ch .glow { opacity: 1; }
.seat.turn .ch .body { translate: 0 -7%; }
.seat.acting .ch .glow { opacity: .8; background: radial-gradient(closest-side, rgba(255,255,255,.45), transparent); }
/* Hole cards on the felt in front of the hands, kept upright */
.ch .hs { position: absolute; left: 50%; top: 8%; width: 0; height: 0; transform: rotate(calc(-1 * var(--rw, 0deg))); }
.seat.has-ch .hand { position: absolute; left: 0; top: 0; height: auto; margin: 0; transform: translate(-50%, -50%); }
.seat.has-ch .hand .back { --w: 22px; margin-left: -6px; }
.seat.has-ch .hand .back:first-child { margin-left: 0; }
/* Seats at the ends of the table show a face-up Omaha hand 2 by 2, so it does not run over the player */
.seat.has-ch.bl .hand.up, .seat.has-ch.br .hand.up { display: grid; grid-template-columns: repeat(2, auto); gap: 2px; }
/* Name + stack: a small plate outside the character */
.seat.has-ch .plate { position: absolute; left: 50%; top: calc(100% - 16px); translate: -50% 0; width: max-content; max-width: 124px; padding: 2px 9px 2px 3px; gap: 5px; border-radius: 99px; z-index: 3; }
.seat.has-ch.top .plate { top: auto; bottom: calc(100% - 16px); }
.seat.has-ch.bl .plate { left: -10px; translate: none; }
.seat.has-ch.br .plate { left: auto; right: -10px; translate: none; }
.plate .sn { flex: none; min-width: 18px; height: 18px; padding: 0 3px; border-radius: 99px; background: #0d0d0d; border: 1.5px solid var(--brass); color: var(--brass-hi); font: 800 10px/15px var(--f-display); text-align: center; }
.seat.has-ch .who-p .nm { font-size: 12px; }
.seat.has-ch .who-p .stk { font-size: 16px; }
.seat.has-ch .marks { top: -10px; right: -10px; }
/* The dealer sits behind the chip rack */
.tray { align-items: center; transform: translate(-50%, -50%); }
.dealer-seat { position: relative; flex: none; width: var(--chw); height: var(--chw); }
.tray .dealer-tag { top: auto; bottom: calc(100% - 4px); }

/* One-shot moves (the class lives ~0.75 s; --fxd keeps it going across re-renders) */
@keyframes ch-breathe { 50% { scale: 1.015; } }
.ch .arm-l { transform-origin: 10px 30px; }
.ch .arm-r { transform-origin: 38px 30px; }
.fx-bet .arm-l, .fx-bet .arm-r { animation: ch-push .55s ease-out var(--fxd, 0s) both; }
@keyframes ch-push { 40% { translate: 0 -5px; } }
.fx-allin .arm-l, .fx-allin .arm-r { animation: ch-push-hard .6s cubic-bezier(.3,.7,.3,1) var(--fxd, 0s) both; }
@keyframes ch-push-hard { 35%, 55% { translate: 0 -9px; } }
.fx-allin .ch .body { animation: ch-shake .45s linear var(--fxd, 0s), ch-breathe 3.4s ease-in-out var(--bd, 0s) infinite; }
@keyframes ch-shake { 15% { rotate: -4deg; } 35% { rotate: 4deg; } 55% { rotate: -3deg; } 75% { rotate: 2deg; } }
.fx-fold .arm-r { animation: ch-flick .45s ease-out var(--fxd, 0s) both; }
@keyframes ch-flick { 40% { translate: 0 -6px; rotate: -16deg; } }
.fx-fold .ch .hs.muck { animation: ch-muck .5s ease-in var(--fxd, 0s) forwards; }
@keyframes ch-muck { to { translate: 0 -34px; opacity: 0; } }
.fx-win .arm-l, .dealer-seat.fx-sweep .arm-l { animation: ch-sweep-l .7s ease-in-out var(--fxd, 0s) both; }
.fx-win .arm-r, .dealer-seat.fx-sweep .arm-r { animation: ch-sweep-r .7s ease-in-out var(--fxd, 0s) both; }
@keyframes ch-sweep-l { 35% { translate: 0 -8px; rotate: -12deg; } 70% { translate: 0 -3px; rotate: 14deg; } }
@keyframes ch-sweep-r { 35% { translate: 0 -8px; rotate: 12deg; } 70% { translate: 0 -3px; rotate: -14deg; } }
.dealer-seat.fx-deal .arm-r { animation: ch-deal .18s ease-out var(--fxd, 0s) 4 alternate both; }
.dealer-seat.fx-deal .arm-l { animation: ch-deal .18s ease-out calc(var(--fxd, 0s) + .09s) 4 alternate both; }
@keyframes ch-deal { to { translate: 0 -7px; rotate: 8deg; } }
.bet.fx-in { animation: ch-bet-in .5s cubic-bezier(.2,.7,.3,1) var(--fxd, 0s) both; }
@keyframes ch-bet-in { from { left: var(--x0); top: var(--y0); opacity: .3; scale: .7; } }
.fly { position: absolute; transform: translate(-50%, -50%); z-index: 1; --cw: 22px; pointer-events: none; animation: ch-fly .65s ease-in-out var(--fxd, 0s) both; }
.fly.win { animation-duration: .75s; }
@keyframes ch-fly { from { left: var(--x0); top: var(--y0); } 75% { opacity: 1; } to { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .fly { display: none; } }

@container (max-width: 560px) {
  .table { --chw: 52px; }
  .ch { transform: rotate(var(--rn, 0deg)) translateY(-22%); }
  .seat.has-ch .hand .back { --w: 15px; margin-left: -4px; }
  .seat.has-ch .plate { top: calc(100% - 8px); }
  .seat.has-ch.top .plate { top: auto; bottom: calc(100% - 8px); }
  .ch .hs { transform: rotate(calc(-1 * var(--rn, 0deg))); }
  .seat.has-ch .plate { max-width: 90px; padding: 1px 7px 1px 2px; gap: 3px; }
  .seat.has-ch .who-p .nm { font-size: 10px; }
  .seat.has-ch .who-p .stk { font-size: 12px; }
  .plate .sn { min-width: 14px; height: 14px; font-size: 9px; line-height: 11px; padding: 0 2px; }
  .seat.has-ch .marks { top: -9px; right: -9px; }
  .tray { transform: translate(-50%, -55%); }
  .tray .rack { display: none; }
  .fly { --cw: 16px; }
  /* Face-up hands stay close to the player and go 2 by 2 so Omaha does not cover the board */
  .seat.has-ch .hs:has(.hand.up) { top: 26%; }
  .seat.has-ch.top .hs:has(.hand.up) { top: 50%; }
  .seat.has-ch .hand.up { display: grid; grid-template-columns: repeat(2, auto); gap: 1px; }
}

/* ------------------------------------------------------------ cards that look like real cards: edge, shadow, sheen, a little tilt */
.card {
  rotate: var(--tilt, 0deg); transform-style: preserve-3d;
  background: linear-gradient(160deg, #fff 0%, var(--card) 55%, #ebe7da 100%);
  box-shadow: 0 1px 0 #ddd7c7, 0 2px 0 #c2bba9, 0 4px 9px rgba(0,0,0,.42), inset 0 0 0 1px rgba(0,0,0,.07);
}
.card::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; backface-visibility: hidden; background: linear-gradient(125deg, rgba(255,255,255,.6) 0%, rgba(255,255,255,0) 36%, rgba(255,255,255,0) 72%, rgba(255,255,255,.2) 100%); }
.card .ix, .card .pip { backface-visibility: hidden; }
.card .ix b { font-size: calc(var(--w) * .44); }
.card .ix i { font-size: calc(var(--w) * .34); }
.card .pip { font-size: calc(var(--w) * .66); }
.back, .card .cb {
  background:
    linear-gradient(125deg, rgba(255,255,255,.28), rgba(255,255,255,0) 40%),
    radial-gradient(circle at 50% 50%, rgba(255,255,255,.4) 0 8%, transparent 9% 17%, rgba(255,255,255,.22) 18% 21%, transparent 22%),
    repeating-linear-gradient(45deg, transparent 0 3px, rgba(255,255,255,.14) 3px 4px),
    repeating-linear-gradient(-45deg, transparent 0 3px, rgba(255,255,255,.14) 3px 4px),
    linear-gradient(160deg, var(--back-1), var(--back-2));
}
.back { border-radius: calc(var(--w) * .12); box-shadow: 0 1px 0 #d6cfbd, 0 2px 0 #b9b1a0, 0 3px 6px rgba(0,0,0,.5), inset 0 0 0 1.5px rgba(0,0,0,.28); }
.card .cb { position: absolute; inset: 0; border-radius: inherit; border: 2px solid #f6efe1; transform: rotateY(180deg); backface-visibility: hidden; }
.hand .back:nth-child(odd) { rotate: -2.5deg; }
.hand .back:nth-child(even) { rotate: 2deg; }
.card.flip { animation: card-flip .6s cubic-bezier(.3,.7,.3,1.1) var(--fxd, 0s) both; }
@keyframes card-flip {
  from { transform: perspective(500px) translateY(-8px) rotateY(180deg); }
  50% { transform: perspective(500px) translateY(-12px) rotateY(90deg) scale(1.06); }
}

/* ------------------------------------------------------------ the pot: a messy heap, no neat stacks */
.mess { position: relative; flex: none; width: 130px; height: 46px; --mc: 23px; }
.center.has-hud .mess { height: 36px; }
.pile .mess { width: 88px; height: 48px; --mc: 19px; }
.mess .mc { position: absolute; width: var(--mc); height: var(--mc); margin: calc(var(--mc) / -2) 0 0 calc(var(--mc) / -2); filter: drop-shadow(0 1.5px 0 rgba(0,0,0,.55)) drop-shadow(0 2px 2px rgba(0,0,0,.3)); }
.mess .mc .tc { display: block; width: 100%; height: 100%; }
@container (max-width: 560px) {
  .mess { width: 86px; height: 44px; --mc: 16px; }
  .pile .mess { width: 62px; height: 34px; --mc: 13px; }
  .center.has-hud .mess { width: 70px; height: 32px; --mc: 13px; }
}

/* The @container rule above cannot pad .table-wrap itself (it is the container), so phones kept 58px a side. */
@media (max-width: 600px) { .table-wrap { padding-inline: 30px; } }

/* ------------------------------------------------------------ the table itself: a gentle look-down tilt, padded leather rail,
   polished wood racetrack, cloth felt under a warm lamp, printed betting line, muck spot, cup holders, dealer rack */
.table-wrap { perspective: 1300px; perspective-origin: 50% 20%; }
.rail {
  transform: rotateX(14deg); transform-origin: 50% 55%;
  background:
    radial-gradient(ellipse 55% 30% at 50% 4%, rgba(255, 232, 200, .2), transparent 70%),
    radial-gradient(closest-side, transparent 0 86%, rgba(255, 225, 190, .13) 92%, rgba(0, 0, 0, .3) 99%),
    radial-gradient(ellipse at 50% 45%, var(--rail-hi), var(--rail) 70%, #140c08 100%);
  box-shadow: 0 40px 70px rgba(0,0,0,.7), 0 12px 22px rgba(0,0,0,.45), 0 0 0 1px #000,
    inset 0 3px 2px rgba(255, 230, 200, .16), inset 0 -12px 20px rgba(0, 0, 0, .6);
}
.rail::before { inset: 1.4%; border: 1.5px dashed rgba(255, 228, 196, .24); outline: 1.5px dashed rgba(255, 228, 196, .12); outline-offset: -9px; }
.wood {
  background:
    radial-gradient(closest-side, transparent 0 93%, rgba(255, 220, 170, .32) 96.5%, transparent 99.5%),
    repeating-linear-gradient(97deg, rgba(0, 0, 0, .09) 0 2px, transparent 2px 6px, rgba(255, 220, 180, .05) 6px 7px, transparent 7px 11px),
    linear-gradient(135deg, var(--wood-hi), var(--wood) 40%, #4a2a15 70%, var(--wood-hi));
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.5), inset 0 2px 3px rgba(255, 220, 180, .28), 0 0 0 2px rgba(0,0,0,.35);
}
.felt { box-shadow: inset 0 0 0 2px rgba(0,0,0,.35), inset 0 6px 14px rgba(0,0,0,.45); }
.felt::before { /* cloth weave, lamp light pool, vignette */
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background:
    radial-gradient(ellipse 50% 58% at 50% 44%, rgba(255, 214, 150, .17), rgba(255, 214, 150, .05) 55%, transparent 75%),
    repeating-linear-gradient(45deg, rgba(255,255,255,.018) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(-45deg, rgba(0,0,0,.035) 0 1px, transparent 1px 3px);
  box-shadow: inset 0 0 70px 14px rgba(0, 0, 0, .5);
}
.felt .line { border: 3px double rgba(240, 220, 160, .2); }
.felt .print.logo { color: rgba(240, 220, 160, .17); letter-spacing: .42em; font-weight: 800; display: flex; align-items: center; }
.felt .print.logo::before, .felt .print.logo::after { content: ""; width: 2.4em; height: 2px; margin: 0 .7em; background: linear-gradient(90deg, transparent, currentColor); }
.felt .print.logo::after { transform: scaleX(-1); margin-left: .3em; }
.felt .print.muck {
  top: 15%; left: 64%; transform: none; width: 6.5%; aspect-ratio: .72; display: grid; place-items: center;
  border: 1.5px dashed rgba(240, 220, 160, .2); border-radius: 6px; font: 800 clamp(7px, .9cqi, 10px) var(--f-display); letter-spacing: .18em; color: rgba(240, 220, 160, .22);
}
.ch .cup {
  position: absolute; right: -14%; top: 50%; width: 22%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 50% 42%, #0b0806 0 50%, #3d2c21 56%, #1a120c 72%);
  box-shadow: inset 0 2px 3px rgba(0,0,0,.75), 0 1px 0 rgba(255, 230, 200, .16);
}
.dealer-seat .cup { display: none; }
/* Dealer rack: columns of chips seen in perspective */
.rack { padding: 6px 8px 5px; gap: 3px; border: 1px solid #000; border-radius: 8px; background: linear-gradient(180deg, #3b4045, #1a1d20 55%, #0d0f11); box-shadow: 0 8px 14px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.14), inset 0 -3px 5px rgba(0,0,0,.6); transform: perspective(260px) rotateX(22deg); }
.rack .slot {
  position: relative; width: 14px; height: 26px; border-radius: 5px / 3px;
  background:
    linear-gradient(90deg, rgba(0,0,0,.5), rgba(255,255,255,.22) 35%, rgba(255,255,255,0) 55%, rgba(0,0,0,.55)),
    repeating-linear-gradient(180deg, var(--c) 0 2.6px, rgba(0,0,0,.45) 2.6px 3.2px);
}
.rack .slot::before { content: ""; position: absolute; left: 0; right: 0; top: -2px; height: 5px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(0,0,0,.35), inset 0 0 0 2.4px rgba(255,255,255,.35); }
@container (max-width: 560px) {
  .felt::before { box-shadow: inset 0 0 40px 8px rgba(0, 0, 0, .5); }
  .felt .print.muck { display: none; } /* the street label sits there on phones */
}
@media (max-width: 600px) { .table-wrap { perspective: 900px; } .rail { transform: rotateX(10deg); } .rail::before { outline: 0; } }
/* Speech bubbles clear the hole cards in front of the character */
.seat.has-ch:not(.bl):not(.br) .bubble:not(.below) { bottom: calc(100% + 16px); }
.seat.has-ch:not(.bl):not(.br) .bubble.below { top: calc(100% + 18px); }
/* Room under the bottom seats for their plates (the tilt also makes the near side a bit bigger) */
.play .table-wrap { padding-bottom: 94px; }
@media (max-width: 600px) { .play .table-wrap { padding-bottom: 70px; } }

/* ============================================================ r3: one system for every screen
   Scale: space 4/8/12/16/24/32 · radius 8/12/16/20 · two shadows · brass focus ring. Later rules here win over the older ones above. */
:root {
  --r-sm: 8px; --r: 12px; --r-lg: 16px; --r-xl: 20px;
  --sh-1: inset 0 1px 0 rgba(255,255,255,.05), 0 2px 8px rgba(0,0,0,.3);
  --sh-2: inset 0 1px 0 rgba(255,255,255,.05), 0 14px 34px rgba(0,0,0,.5);
  --ease: cubic-bezier(.2, .8, .3, 1);
}
html { overflow-x: clip; }
@property --p { syntax: '<number>'; inherits: true; initial-value: 0; }

/* A quiet card room behind everything: drifting suits and two warm lamps (compositor-only transforms). */
body::before {
  inset: -160px; opacity: 1; will-change: transform;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cg fill='%23f0dca0' fill-opacity='.028' font-family='Arial' font-size='22'%3E%3Ctext x='18' y='38'%3E%E2%99%A0%3C/text%3E%3Ctext x='98' y='58'%3E%E2%99%A5%3C/text%3E%3Ctext x='58' y='118'%3E%E2%99%A3%3C/text%3E%3Ctext x='132' y='142'%3E%E2%99%A6%3C/text%3E%3C/g%3E%3C/svg%3E") 0 0 / 160px 160px;
  animation: bg-drift 140s linear infinite;
}
@keyframes bg-drift { to { transform: translate3d(160px, 160px, 0); } }
body::after {
  content: ""; position: fixed; inset: -12%; z-index: -1; pointer-events: none; will-change: transform;
  background: radial-gradient(36% 30% at 22% 12%, rgba(224,184,102,.08), transparent 70%), radial-gradient(34% 30% at 82% 80%, rgba(42,126,91,.13), transparent 70%);
  animation: lamp 28s ease-in-out infinite alternate;
}
@keyframes lamp { to { transform: translate3d(5%, 4%, 0) scale(1.06); } }

/* Focus: one brass ring everywhere */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible { outline: 2px solid var(--brass-hi); outline-offset: 2px; }

/* Buttons */
.btn { border-radius: var(--r); min-height: 42px; transition: background .15s, border-color .15s, color .15s, transform .12s var(--ease), box-shadow .15s, filter .15s; }
.btn:hover:not(:disabled) { border-color: #5a7a6e; }
.btn.primary:hover:not(:disabled) { filter: brightness(1.07); border-color: #c7a050; }
.btn.primary:active:not(:disabled) { box-shadow: 0 0 0 #8a6a2c, 0 3px 10px rgba(224,184,102,.15); transform: translateY(2px); }
.btn.sm { min-height: 34px; border-radius: var(--r-sm); }
.btn.big { min-height: 52px; border-radius: var(--r); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover:not(:disabled) { background: var(--panel-2); border-color: var(--line); color: var(--ink); }
.btn svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: translate .15s var(--ease); }
.btn:hover:not(:disabled) svg { translate: 3px 0; }
.seg button { border-radius: var(--r-sm); min-height: 38px; transition: border-color .15s, background .15s, color .15s; }
.seg button:hover:not(:disabled):not(.on) { border-color: #5a7a6e; }
.input, .field select, textarea { border-radius: var(--r); transition: border-color .15s; }
.input:focus, textarea:focus { border-color: var(--brass); outline: none; box-shadow: 0 0 0 3px rgba(224,184,102,.18); }

/* Panels */
.panel { border-radius: var(--r-lg); box-shadow: var(--sh-1); }
.panel > h3, details.panel > summary { font-size: 19px; }
details.panel > summary { min-height: 28px; }
details.panel > summary::after {
  content: "+"; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line-2); display: grid; place-items: center;
  font: 400 20px/1 var(--f-body); color: var(--muted); transition: transform .2s var(--ease), border-color .15s;
}
details.panel[open] > summary::after { content: "+"; transform: rotate(45deg); border-color: var(--brass); color: var(--brass-hi); }
details.panel > summary:hover::after { border-color: var(--muted); }

/* ------------------------------------------------------------ top bar: two tidy rows on phones */
.top { min-height: 64px; }
.ring { width: 42px; height: 42px; background: conic-gradient(var(--good) calc(var(--p) * 1%), rgba(255,255,255,.08) 0); box-shadow: 0 0 0 1px var(--line); }
.ring b { background: var(--bg-2); }
.streak {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px 3px 7px; border-radius: 99px;
  background: linear-gradient(180deg, #4a2a0e, #2a1806); border: 1px solid #a8641c; color: #ffc46b;
  font: 800 13px var(--f-display); letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; animation: streak-in .45s var(--ease) both;
}
.streak::before { content: ""; width: 11px; height: 14px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 11 14'%3E%3Cpath d='M5.5 0C6 3 9.5 4.5 9.5 8.5a4 4 0 0 1-8 0C1.5 6.5 2.6 5.3 3.2 4.4c.3 1.5.9 2.1 1.5 2.3C4.4 4 5 2 5.5 0z' fill='%23ffb347'/%3E%3C/svg%3E") center/contain no-repeat; }
@keyframes streak-in { from { opacity: 0; transform: scale(.6); } }
@media (max-width: 600px) {
  .top { gap: 8px 10px; padding-block: calc(10px + env(safe-area-inset-top, 0px)) 10px; min-height: 0; }
  .brand { gap: 8px; }
  .brand h1 { font-size: 21px; }
  .brand .tc, .top a.brand .tc { font-size: 28px; width: 28px; height: 28px; }
  .top:has(.sign)::after { content: ""; order: 5; flex-basis: 100%; height: 0; }
  .top > .sign { order: 6; display: flex; min-width: 0; flex: 0 1 auto; }
  .top > .lvl, .top > .net { order: 7; }
  .top > .dscore { order: 8; }
  .sign .sh { display: flex; align-items: center; padding: 2px 8px; font-size: 9px; letter-spacing: .12em; max-width: 92px; line-height: 1.15; white-space: normal; }
  .sign .sb { display: flex; align-items: baseline; gap: 6px; font-size: 14px; padding: 4px 10px; text-align: left; min-width: 0; white-space: nowrap; }
  .sign .sb small { display: inline; font-size: 10px; }
  .lvl { font-size: 10px; padding: 3px 8px; }
  .net { font-size: 12px; padding: 3px 10px; }
  .me-chip { padding: 2px; }
  .me-chip > span:not(.me-av) { display: none; }
  .top > a.btn.sm { padding-inline: 10px; }
  .ring { width: 38px; height: 38px; }
  .ring b { width: 31px; height: 31px; font-size: 11px; }
  .scorebox { gap: 8px; }
  .scorebox .st b { font-size: 16px; }
}
@media (max-width: 380px) { .sign .sb small { display: none; } }

/* ------------------------------------------------------------ mode picker and practice cards: one card system */
.home { gap: 28px; }
.pick { gap: 12px; }
.pick .lead, .practice .lead { max-width: 52ch; }
.trio, .pgrid { gap: 14px; }
.big-mode {
  grid-template-rows: auto auto 1fr auto; gap: 8px; padding: 20px; border-radius: var(--r-xl); min-height: 224px;
  border-color: rgba(255,255,255,.09); box-shadow: var(--sh-1);
  transition: transform .25s var(--ease), border-color .2s, box-shadow .25s;
}
.big-mode::after { /* a soft sheen that crosses the card on hover */
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; border-radius: inherit;
  background: linear-gradient(115deg, transparent 30%, rgba(255,240,210,.07) 45%, transparent 60%) -200% 0 / 200% 100% no-repeat;
  transition: background-position .8s var(--ease);
}
.big-mode:hover { transform: translateY(-4px); border-color: rgba(224,184,102,.6); box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 18px 40px rgba(0,0,0,.45), 0 0 0 1px rgba(224,184,102,.2); }
.big-mode:hover::after { background-position: 200% 0; }
.big-mode:active { transform: translateY(-1px) scale(.99); }
.big-mode .ic { width: 46px; height: 46px; border-radius: 14px; background: rgba(0,0,0,.34); border: 1px solid rgba(255,255,255,.1); box-shadow: inset 0 1px 0 rgba(255,255,255,.06); }
.big-mode .ic svg { width: 24px; height: 24px; stroke: var(--brass-hi); stroke-width: 1.8; }
.big-mode h4 { font-size: 27px; font-weight: 900; line-height: 1; letter-spacing: .01em; }
.big-mode p { font-size: 14px; color: #b8c7bf; max-width: 38ch; text-shadow: 0 1px 2px rgba(0,0,0,.55); }
.bm-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 4px; }
.bm-meta { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.bm-meta > span { font: 700 11px/1 var(--f-display); letter-spacing: .1em; text-transform: uppercase; color: #c9d5ce; padding: 5px 9px; border-radius: 99px; background: rgba(0,0,0,.32); border: 1px solid rgba(255,255,255,.09); white-space: nowrap; }
.bm-meta > span.best { color: #ffd479; border-color: rgba(242,193,78,.45); background: rgba(58,46,18,.6); }
.big-mode .go { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.16); background: rgba(0,0,0,.3); color: var(--brass-hi); transition: background .2s, color .2s, transform .25s var(--ease), border-color .2s; }
.big-mode .go svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.big-mode:hover .go, .pgrid .big-mode.on .go { background: var(--brass); color: var(--brass-ink); border-color: var(--brass); transform: translateX(3px); }
.tag-new { top: 16px; right: 16px; box-shadow: 0 2px 8px rgba(0,0,0,.35); }
.big-mode.m1 { background: radial-gradient(120% 90% at 100% 0%, rgba(124,183,255,.16), transparent 60%), linear-gradient(160deg, #1f3a5c, var(--panel) 75%); }
.big-mode.m2 { background: radial-gradient(120% 90% at 100% 0%, rgba(255,150,90,.14), transparent 60%), linear-gradient(160deg, #4a2a1a, var(--panel) 75%); }
.big-mode.m3 { background: radial-gradient(120% 90% at 100% 0%, rgba(224,184,102,.14), transparent 60%), linear-gradient(160deg, #3a3320, var(--panel) 75%); }
.big-mode.m4 { background: radial-gradient(120% 90% at 100% 0%, rgba(95,213,144,.14), transparent 60%), linear-gradient(160deg, #1d3b2c, var(--panel) 75%); }
.scene { opacity: .62; }
/* Practice cards share the same anatomy, a bit smaller */
.practice { gap: 14px; }
.practice h2 { font-size: clamp(34px, 5.6vw, 56px); }
.pgrid .big-mode { padding: 16px; gap: 7px; min-height: 212px; }
.pgrid .big-mode h4 { font-size: 22px; }
.pgrid .big-mode .ic { width: 42px; height: 42px; border-radius: 12px; }
.pgrid .big-mode .go { width: 32px; height: 32px; }
.pgrid .big-mode.on { border-color: var(--brass); box-shadow: inset 0 0 0 1px var(--brass), 0 0 0 4px rgba(224,184,102,.14), 0 14px 30px rgba(0,0,0,.4); transform: translateY(-2px); }
@media (max-width: 760px) { .trio .big-mode { min-height: 200px; } }
@media (max-width: 420px) {
  .big-mode { padding: 16px; border-radius: var(--r-lg); }
  .big-mode h4 { font-size: 24px; }
  .pgrid .big-mode { padding: 12px; min-height: 196px; gap: 6px; }
  .pgrid .big-mode h4 { font-size: 19px; }
  .pgrid .bm-meta > span { font-size: 10px; padding: 4px 7px; }
  .pgrid .big-mode .go { display: none; }
}

/* «Continuar»: a saved game as its own card */
.resume {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px 14px; padding: 12px 14px 12px 12px;
  border-radius: var(--r-lg); border: 1px solid rgba(224,184,102,.42); box-shadow: var(--sh-2); position: relative; overflow: hidden;
  background: linear-gradient(100deg, rgba(224,184,102,.17), rgba(224,184,102,.04) 55%, transparent), var(--panel);
  animation: slidein .35s var(--ease) both;
}
.resume::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: linear-gradient(180deg, var(--brass-hi), var(--brass)); }
.rs-ic { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: rgba(0,0,0,.32); box-shadow: inset 0 0 0 1px rgba(224,184,102,.3); }
.rs-ic .tc { width: 32px; height: 32px; animation: rs-spin 7s var(--ease) infinite; }
@keyframes rs-spin { 0%, 82% { transform: rotate(0); } 100% { transform: rotate(360deg); } }
.rs-t { display: grid; gap: 2px; min-width: 0; }
.rs-t b { font: 800 19px/1.1 var(--f-display); }
.rs-t small { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.rs-b { display: flex; align-items: center; gap: 6px; }
@media (max-width: 520px) {
  .resume { grid-template-columns: auto minmax(0, 1fr); }
  .rs-b { grid-column: 1 / -1; }
  .rs-b .btn.primary { flex: 1; }
}

/* ------------------------------------------------------------ builders (training table, mesa setup) */
.builder { border-radius: var(--r-xl); gap: 20px; box-shadow: var(--sh-1); }
.builder > .step + .step { border-top: 1px dashed var(--line); padding-top: 20px; }
.step-h { align-items: center; }
.step-h .n { width: 26px; height: 26px; font-size: 15px; flex: none; box-shadow: 0 0 0 4px rgba(224,184,102,.14); }
.step-h h4 { font-size: 20px; }
/* Game presets as little tables: felt by family, the blinds printed on it, the hole cards it deals */
.gbtn {
  justify-content: flex-start; gap: 12px; padding: 8px 12px 8px 10px; min-height: 58px; border-radius: var(--r);
  transition: border-color .15s, background .15s, transform .15s var(--ease);
}
.gbtn:hover:not(.on) { border-color: #5a7a6e; transform: translateY(-1px); }
.gfelt {
  --gf: #1f6a4c; --gf-hi: #2f8a62; --gf-dk: #134432;
  position: relative; flex: none; width: 54px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(ellipse at 50% 38%, var(--gf-hi), var(--gf) 55%, var(--gf-dk));
  box-shadow: 0 0 0 3px #6b4226, 0 0 0 4.5px #1c120c, 0 4px 8px rgba(0,0,0,.5), inset 0 0 8px rgba(0,0,0,.4);
}
.g-FL .gfelt { --gf: #1f4f7a; --gf-hi: #2f6fa6; --gf-dk: #132f4c; }
.g-PL .gfelt { --gf: #6a1f3a; --gf-hi: #8c3152; --gf-dk: #3f1224; }
.gfelt i { font: 900 12px/1 var(--f-display); font-style: normal; color: rgba(255, 240, 205, .9); margin-top: -7px; text-shadow: 0 1px 1px rgba(0,0,0,.4); }
.gcards { position: absolute; left: 50%; bottom: 5px; translate: -50% 0; display: flex; gap: 1px; }
.gcards b { width: 5px; height: 7px; border-radius: 1px; background: #f6efe1; box-shadow: 0 1px 1px rgba(0,0,0,.45); }
.gt { display: grid; min-width: 0; gap: 1px; }
.gt b { font: 800 17px/1.1 var(--f-display); }
.gt small { color: var(--muted); font-size: 12px; line-height: 1.25; }
.gbtn.on { background: linear-gradient(135deg, #2f2715, #221c0f); }
.gbtn.on .gfelt { box-shadow: 0 0 0 3px var(--brass), 0 0 0 4.5px #1c120c, 0 0 14px rgba(224,184,102,.35), inset 0 0 8px rgba(0,0,0,.4); }
.stepper { width: fit-content; background: var(--bg); border-radius: var(--r); }
.stepper button { transition: background .15s, color .15s; }
.stepper button:hover:not(:disabled) { background: var(--panel-3); color: var(--brass-hi); }
.opt { position: relative; border-radius: var(--r); transition: border-color .15s, background .15s, transform .15s var(--ease); }
.opt:hover:not(.on) { border-color: #5a7a6e; transform: translateY(-1px); }
.opt.on::after { content: ""; position: absolute; top: 10px; right: 10px; width: 18px; height: 18px; border-radius: 50%; background: var(--brass) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.7 2.7L12 5.5' fill='none' stroke='%231e1505' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/12px no-repeat; }
.opt.on b { color: var(--brass-hi); padding-right: 22px; }
.mode { border-radius: var(--r-lg); transition: border-color .2s, transform .2s var(--ease), box-shadow .2s; }
.mode:hover { box-shadow: 0 12px 26px rgba(0,0,0,.35); }
.join input { width: auto; flex: 1 1 0; min-width: 0; max-width: 210px; min-height: 46px; letter-spacing: .28em; border-radius: var(--r); }
.join input::placeholder { letter-spacing: .14em; font-size: 15px; color: var(--faint); }
.join input:focus { border-color: var(--brass); outline: none; box-shadow: 0 0 0 3px rgba(224,184,102,.18); }
@media (max-width: 720px) {
  .family { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .family .label { grid-column: 1 / -1; }
}
@media (max-width: 420px) {
  .gbtn { gap: 9px; padding: 7px 8px; }
  .gfelt { width: 44px; height: 30px; }
  .gfelt i { font-size: 11px; margin-top: -6px; }
  .gt b { font-size: 15px; }
  .gt small { font-size: 11px; }
}

/* ------------------------------------------------------------ the decision HUD: on the felt, or docked under the table */
.hud {
  border-radius: var(--r-lg); border-color: rgba(224,184,102,.28);
  background: linear-gradient(90deg, transparent, rgba(224,184,102,.55), transparent) top / 100% 1.5px no-repeat, rgba(8, 14, 12, .9);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05), 0 16px 40px rgba(0,0,0,.6);
}
.hud.docked, .drill-hud {
  position: relative; width: min(100%, 540px); justify-self: center; margin: -6px auto 0; padding: 14px 16px; gap: 10px;
  background: linear-gradient(90deg, transparent, rgba(224,184,102,.6), transparent) top / 100% 1.5px no-repeat, linear-gradient(180deg, #15211d, #0e1714);
  border: 1px solid rgba(224,184,102,.3); backdrop-filter: none;
}
.hud.docked::before, .drill-hud::before { /* a notch pointing up at the table */
  content: ""; position: absolute; left: 50%; top: -7px; width: 12px; height: 12px; translate: -50% 0; rotate: 45deg;
  background: #15211d; border-left: 1px solid rgba(224,184,102,.3); border-top: 1px solid rgba(224,184,102,.3);
}
.hud.docked .hs { font-size: 26px; }
.hud.docked .hb .btn { min-height: 50px; font-size: 17px; }
.hud.docked .hopts { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.hud.docked .hopt { min-height: 44px; }
.hans { flex-wrap: nowrap; }
.hans input { min-height: 48px; min-width: 0; border-radius: var(--r); }
.hans input:focus { border-color: var(--brass); outline: none; box-shadow: 0 0 0 3px rgba(224,184,102,.18); }
.hans .btn { flex: none; min-height: 48px; }
@media (max-width: 420px) {
  .hud.docked, .drill-hud { padding: 12px; }
  .hud.docked .hs { font-size: 22px; }
  .hud.docked .hq { font-size: 12px; }
  .hud.docked kbd, .drill-hud kbd { display: none; }
}

/* Result line under the table: same shape as the toasts, icon in a disc */
.result {
  grid-template-columns: auto minmax(0, 1fr); column-gap: 12px; row-gap: 2px; align-items: center; width: min(100%, 760px); justify-self: center;
  border-radius: var(--r-lg); padding: 12px 16px 12px 12px; box-shadow: var(--sh-1);
}
.result::before { content: "✓"; grid-row: 1 / span 2; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font: 900 17px var(--f-body); background: var(--good); color: #0d2a19; }
.result.bad::before { content: "✗"; background: var(--bad); color: #3a0c07; }
.result.warn::before { content: "!"; background: var(--warn); color: #2a1d02; }
.result.good b::before, .result.bad b::before, .result.warn b::before { content: none; }
.result b { font-size: 18px; line-height: 1.2; }
.result p { grid-column: 2; }
.toast { border-radius: var(--r-lg); background: linear-gradient(90deg, transparent, rgba(224,184,102,.6), transparent) top / 100% 1.5px no-repeat, rgba(10, 16, 14, .95); }

/* History: readable rows with a tinted edge */
.log { gap: 6px; max-height: 440px; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.entry { border-left-width: 3px; border-radius: 0 var(--r-sm) var(--r-sm) 0; padding: 8px 10px 8px 12px; line-height: 1.4; background: rgba(255,255,255,.02); }
.entry.good { background: linear-gradient(90deg, rgba(95,213,144,.08), transparent 70%); }
.entry.bad { background: linear-gradient(90deg, rgba(255,123,107,.09), transparent 70%); }
.entry.warn { background: linear-gradient(90deg, rgba(242,193,78,.08), transparent 70%); }
.entry.info { background: linear-gradient(90deg, rgba(124,183,255,.06), transparent 70%); }
.entry .meta { font: 700 11px var(--f-display); letter-spacing: .14em; margin-bottom: 2px; }
.entry p { line-height: 1.45; }

/* Rules: section rules with a hairline, each rule hung on a thin left line, key terms in brass */
.rules { gap: 10px; font-size: 14.5px; line-height: 1.6; color: #bccbc3; }
.rules h4 { display: flex; align-items: center; gap: 10px; font-size: 13px; letter-spacing: .18em; margin-top: 10px; color: var(--brass); }
.rules h4:first-child { margin-top: 2px; }
.rules h4::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--line-2), transparent); }
.rules p { max-width: 70ch; padding-left: 12px; border-left: 2px solid var(--line); }
.rules b { color: var(--brass-hi); font-weight: 700; }

/* Drill strip and end-of-drill card */
.drill-bar { border-radius: var(--r-lg); padding: 10px 12px 10px 16px; box-shadow: var(--sh-1); }
.drill-sum { gap: 18px; }
.ds-head { display: flex; align-items: center; gap: 18px; }
.ds-head h3 { font-size: clamp(28px, 6vw, 38px); text-transform: uppercase; }
.ring.big { width: 104px; height: 104px; flex: none; animation: ring-fill 1.1s var(--ease) both; box-shadow: 0 0 0 1px var(--line), 0 0 30px rgba(95,213,144,.15); }
.ring.big b { width: 86px; height: 86px; font-size: 28px; background: var(--panel); }
@keyframes ring-fill { from { --p: 0; } }
.dfacts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.dfacts div { padding: 10px 12px; border-radius: var(--r); background: rgba(0,0,0,.22); border: 1px solid var(--line); }
.dfacts b { font-size: 28px; line-height: 1.1; }
.dfacts .rec { border-color: var(--brass); background: rgba(224,184,102,.09); }
.dfacts .rec b { color: var(--brass-hi); }
.bar .bl span { color: var(--muted); }
.bar.low .bt i { background: linear-gradient(90deg, var(--warn), #f7d98a); }
.bar .bt i { animation: bar-in .9s var(--ease) both; transform-origin: left; }
@keyframes bar-in { from { transform: scaleX(0); } }
@media (max-width: 420px) {
  .ds-head { gap: 14px; }
  .ring.big { width: 84px; height: 84px; }
  .ring.big b { width: 70px; height: 70px; font-size: 22px; }
  .dfacts b { font-size: 22px; }
  .dfacts span { font-size: 10px; }
}

/* Share code: big letter tiles you tap to copy */
.bigcode { display: flex; justify-content: center; gap: 8px; background: none; border: 0; padding: 4px; margin-bottom: 14px; position: relative; border-radius: var(--r); letter-spacing: 0; cursor: pointer; }
.bigcode span {
  width: 1.2em; height: 1.45em; display: grid; place-items: center; font: 900 40px/1 var(--f-display); color: var(--brass-hi);
  background: linear-gradient(180deg, #2f2715, #19140a); border: 1px solid rgba(224,184,102,.45); border-radius: 10px;
  box-shadow: inset 0 -3px 0 rgba(0,0,0,.35), inset 0 1px 0 rgba(255,240,200,.12), 0 4px 10px rgba(0,0,0,.35); transition: transform .15s var(--ease), border-color .15s;
}
.bigcode:hover span { border-color: var(--brass); }
.bigcode:hover span:nth-child(odd) { transform: translateY(-2px); }
.bigcode::after { content: "Toca para copiar"; position: absolute; left: 50%; top: 100%; translate: -50% 4px; font: 700 11px var(--f-display); letter-spacing: .14em; text-transform: uppercase; color: var(--faint); white-space: nowrap; }
.bigcode.copied::after { content: "¡Copiado!"; color: var(--good); }
.bigcode.copied span { border-color: var(--good); }
@media (max-width: 380px) { .bigcode span { font-size: 34px; } }
/* On laptops the table leaves room for a docked HUD, so the decision never sits below the fold. */
@media (min-width: 801px) {
  .play .rail { width: min(100%, calc(60vh * var(--ar)), calc((100vh - 400px) * var(--ar))); }
  .play.big-table .rail { width: min(100%, calc(70vh * var(--ar)), calc((100vh - 380px) * var(--ar))); }
}
@media (max-width: 760px) { .trio .scene { opacity: .45; } }

/* ============================================================ r4: a table that feels lit and alive, the shift, the daily challenge, the career */

/* Light: one warm lamp over the felt, its spill on the floor, a sheen running along the rail */
.play .table-wrap::before {
  content: ""; position: absolute; left: 50%; top: 48%; width: 112%; aspect-ratio: 2.2; translate: -50% -50%; z-index: -1; pointer-events: none;
  background: radial-gradient(closest-side, rgba(255, 210, 140, .13), rgba(255, 210, 140, .05) 55%, transparent);
}
.rail::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
  background: conic-gradient(from 200deg at 50% 50%, transparent 0deg, rgba(255, 236, 205, .1) 40deg, transparent 90deg, transparent 220deg, rgba(255, 236, 205, .06) 260deg, transparent 300deg);
  -webkit-mask: radial-gradient(closest-side, transparent 88%, #000 90%); mask: radial-gradient(closest-side, transparent 88%, #000 90%);
}
.felt::after { /* the lamp breathes a little, like a real bulb over a busy table */
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(ellipse 34% 40% at 50% 46%, rgba(255, 226, 170, .1), transparent 70%);
  animation: lamp-breathe 6s ease-in-out infinite;
}
@keyframes lamp-breathe { 50% { opacity: .55; } }

/* Each player's stack, in front of them on the felt */
.pstack { position: absolute; transform: translate(-50%, -50%); z-index: 1; --cw: 15px; pointer-events: none; filter: drop-shadow(0 3px 2px rgba(0,0,0,.35)); }
.pstack .stacks { gap: 1px; }
@container (max-width: 560px) { .pstack { display: none; } }

/* The dealer button: a real puck that slides to the next seat */
.puck {
  position: absolute; z-index: 2; width: 30px; height: 30px; transform: translate(-50%, -50%); border-radius: 50%;
  display: grid; place-items: center; font: 900 6.4px/1 var(--f-display); letter-spacing: .06em; color: #1b1b1b;
  background: radial-gradient(circle at 38% 32%, #fff, #f1eee6 45%, #cfc9bb 100%);
  box-shadow: 0 0 0 1.5px #a8a090, 0 2px 0 #8d8676, 0 3px 0 #6f695d, 0 6px 9px rgba(0,0,0,.55), inset 0 0 0 4px rgba(0,0,0,.05);
}
.puck::before { content: ""; position: absolute; inset: 3px; border-radius: 50%; border: 1px solid rgba(0,0,0,.18); }
.puck.fx-in { animation: puck-slide .7s cubic-bezier(.3,.7,.2,1) var(--fxd, 0s) both; }
@keyframes puck-slide { from { left: var(--x0); top: var(--y0); } 60% { scale: 1.18; } }
@container (max-width: 560px) { .puck { width: 20px; height: 20px; font-size: 0; } .puck::after { content: "D"; font: 900 10px/1 var(--f-display); } }

/* Pitching the cards: each one spins off the dealer's hand to its seat; the seat's card shows when it lands */
.pitch { position: absolute; z-index: 5; transform: translate(-50%, -50%); pointer-events: none; animation: pitch .3s cubic-bezier(.25,.6,.35,1) var(--fxd, 0s) both; }
.pitch .back { --w: 20px; display: block; }
@keyframes pitch {
  from { left: var(--x0); top: var(--y0); rotate: 0deg; opacity: 0; scale: .8; }
  12% { opacity: 1; }
  92% { opacity: 1; }
  to { rotate: var(--spin, 360deg); opacity: 0; scale: 1; }
}
.back.land { animation: land .18s ease-out var(--fxd, 0s) both; }
@keyframes land { from { opacity: 0; scale: 1.15; } }
@container (max-width: 560px) { .pitch .back { --w: 14px; } }
@media (prefers-reduced-motion: reduce) { .pitch { display: none; } .back.land { animation: none; } }

/* Player reactions: a quick bubble over the character */
.react {
  position: absolute; left: 50%; bottom: calc(100% + 4px); z-index: 7; translate: -50% 0; white-space: nowrap; pointer-events: none;
  font: 800 13px/1 var(--f-display); letter-spacing: .02em; padding: 4px 9px; border-radius: 99px;
  background: #fffdf6; color: #1b1b1b; box-shadow: 0 6px 14px rgba(0,0,0,.45);
  animation: react 1.7s cubic-bezier(.2,1.4,.4,1) var(--fxd, 0s) both;
}
.seat.top .react { bottom: auto; top: calc(100% + 4px); }
.react.caught { background: #ffe1db; color: #7a1d14; }
.react.sly { background: #2b1d3a; color: #e7d3ff; box-shadow: 0 0 0 1px #8a63c9, 0 6px 14px rgba(0,0,0,.45); }
.react.mad { background: #ff7b6b; color: #3a0c07; }
.react.hot { background: linear-gradient(180deg, #ffcf6b, #f08a2a); color: #3a1702; }
.react.win { background: linear-gradient(180deg, #fff3c4, #f0c95c); color: #3b2405; }
@keyframes react {
  0% { opacity: 0; transform: translateY(8px) scale(.6); }
  12% { opacity: 1; transform: none; }
  80% { opacity: 1; transform: translateY(-4px); }
  100% { opacity: 0; transform: translateY(-14px); }
}
@container (max-width: 560px) { .react { font-size: 11px; padding: 3px 7px; } }

/* ------------------------------------------------------------ training home: career pin + the two big cards */
.pr-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.career {
  display: flex; align-items: center; gap: 10px; padding: 6px 14px 6px 6px; border-radius: 99px; min-width: 0;
  background: linear-gradient(100deg, rgba(224,184,102,.14), rgba(224,184,102,.03)), var(--panel); border: 1px solid rgba(224,184,102,.32); box-shadow: var(--sh-1);
}
.career .pin { width: 40px; height: 40px; flex: none; filter: drop-shadow(0 3px 4px rgba(0,0,0,.5)); }
.cr-t { display: grid; gap: 3px; min-width: 0; }
.cr-t small { font: 700 10px/1 var(--f-display); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.cr-t > b { font: 900 18px/1 var(--f-display); text-transform: uppercase; letter-spacing: .02em; color: var(--brass-hi); }
.cr-bar { display: block; width: 170px; max-width: 100%; height: 5px; border-radius: 99px; background: rgba(255,255,255,.08); overflow: hidden; }
.cr-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--brass), var(--brass-hi)); animation: bar-in 1s var(--ease) both; transform-origin: left; }
.cr-t em { font: 600 11px/1.2 var(--f-body); font-style: normal; color: var(--muted); }
.cr-t em b { color: var(--ink); }

.feat { display: grid; grid-template-columns: 1.35fr 1fr; gap: 14px; }
.feat-card { min-height: 236px; overflow: hidden; }
.big-mode.feat-card > .ft-scene, .big-mode.feat-card > .ft-date { position: absolute; z-index: 0; }
.big-mode.feat-card { grid-template-rows: none; align-content: end; }
.ft-kicker { font: 800 11px/1 var(--f-display); letter-spacing: .16em; text-transform: uppercase; color: var(--brass-hi); }
.feat-card h4 { font-size: 30px; }
.feat-card p { max-width: 42ch; }
.f-turno {
  background: radial-gradient(90% 120% at 100% 0%, rgba(255,123,107,.18), transparent 60%), radial-gradient(70% 90% at 85% 100%, rgba(224,184,102,.12), transparent 70%), linear-gradient(160deg, #3d1f1a, var(--panel) 72%);
}
.f-diario { background: radial-gradient(90% 120% at 100% 0%, rgba(124,183,255,.2), transparent 60%), linear-gradient(160deg, #1d2f52, var(--panel) 75%); }
.f-turno p, .f-diario p { max-width: 34ch; }
/* Shift card scene: a wall clock and the floor peeking in */
.ft-scene { right: 22px; top: 22px; width: 230px; height: 180px; pointer-events: none; }
.ft-clock { position: absolute; right: 0; top: 0; width: 76px; height: 76px; border-radius: 50%; background: radial-gradient(circle, #fffdf6 0 58%, #e8e0cc 60% 66%, #2a1a12 68%); box-shadow: 0 6px 14px rgba(0,0,0,.5), inset 0 0 0 2px rgba(0,0,0,.25); }
.ft-clock i { position: absolute; left: 50%; bottom: 50%; width: 3px; margin-left: -1.5px; border-radius: 2px; background: #1b1b1b; transform-origin: 50% 100%; }
.ft-clock i:first-child { height: 18px; animation: clock-h 12s linear infinite; }
.ft-clock i:last-child { height: 26px; width: 2px; background: #c8352e; animation: clock-h 2s linear infinite; }
@keyframes clock-h { to { transform: rotate(360deg); } }
.ft-floor { position: absolute; right: 58px; top: 50px; width: 112px; height: 112px; border-radius: 50%; overflow: hidden; background: radial-gradient(circle at 50% 35%, #4a6a5c, #1c2b25); box-shadow: 0 0 0 3px rgba(0,0,0,.35), 0 8px 18px rgba(0,0,0,.5); animation: floor-peek 5s var(--ease) infinite; }
.ft-floor svg { width: 100%; height: 100%; display: block; }
@keyframes floor-peek { 0%, 100% { transform: translateY(0) rotate(0); } 40% { transform: translateY(-4px) rotate(-4deg); } 60% { transform: translateY(-2px) rotate(3deg); } }
.ft-bub { position: absolute; right: 168px; top: 40px; font: 900 13px/1 var(--f-display); text-transform: uppercase; letter-spacing: .04em; padding: 5px 9px; border-radius: 10px; background: #fffdf6; color: #7a1d14; box-shadow: 0 6px 14px rgba(0,0,0,.4); animation: ft-bub 5s var(--ease) infinite; }
.ft-bub::after { content: ""; position: absolute; right: -6px; top: 50%; translate: 0 -50%; border: 6px solid transparent; border-left-color: #fffdf6; border-right: 0; }
@keyframes ft-bub { 0%, 30% { opacity: 0; transform: scale(.6); } 38%, 70% { opacity: 1; transform: none; } 78%, 100% { opacity: 0; } }
/* Daily card: a desk calendar and the last 7 days */
.ft-date { right: 18px; top: 18px; width: 62px; border-radius: 10px; overflow: hidden; text-align: center; background: #fffdf6; color: #1b1b1b; box-shadow: 0 8px 18px rgba(0,0,0,.45); rotate: 4deg; }
.ft-date small { display: block; background: #c8352e; color: #fff; font: 800 11px/1.7 var(--f-display); letter-spacing: .16em; text-transform: uppercase; }
.ft-date b { display: block; font: 900 30px/1.25 var(--f-display); }
.week { display: flex; gap: 5px; }
.week i { width: 18px; height: 18px; border-radius: 50%; background: rgba(255,255,255,.07); box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); }
.week i.ok { background: var(--warn); box-shadow: none; }
.week i.hi { background: var(--good); box-shadow: none; }
.week i.today { box-shadow: 0 0 0 2px var(--bg-2), 0 0 0 3.5px var(--brass); }
.f-diario.done .ft-date { rotate: -3deg; }
@media (max-width: 760px) {
  .feat { grid-template-columns: 1fr; }
  .feat-card { min-height: 0; }
  .feat-card h4 { font-size: 25px; padding-right: 76px; }
  .ft-scene { transform: scale(.4); transform-origin: top right; right: 8px; top: 8px; }
  .ft-bub { display: none; }
  .f-turno .ft-kicker, .f-diario .ft-kicker { padding-right: 70px; }
  .ft-date { width: 52px; } .ft-date b { font-size: 24px; }
  .pr-head .career { width: 100%; }
  .cr-t { flex: 1; } .cr-bar { width: 100%; }
}

/* ------------------------------------------------------------ the shift strip: clock, stage, tokes, floor calls */
.shift-bar { gap: 8px 16px; padding-bottom: 14px; }
.sh-clock { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 7px; border-radius: 10px; background: #0b0f0d; border: 1px solid #2a3d35; box-shadow: inset 0 0 10px rgba(255,90,60,.12); }
.sh-clock svg { width: 17px; height: 17px; fill: none; stroke: var(--bad); stroke-width: 2.2; stroke-linecap: round; }
.sh-clock b.num { font: 800 22px/1 var(--f-display); color: #ff9d8c; letter-spacing: .06em; text-shadow: 0 0 10px rgba(255,90,60,.5); }
.sh-stage { font: 800 12px/1 var(--f-display); letter-spacing: .14em; text-transform: uppercase; padding: 6px 10px; border-radius: 99px; background: var(--good-bg); color: var(--good); }
.shift-bar.s1 .sh-stage { background: var(--warn-bg); color: var(--warn); }
.shift-bar.s2 .sh-stage { background: var(--bad-bg); color: var(--bad); animation: peak 1.6s ease-in-out infinite; }
@keyframes peak { 50% { box-shadow: 0 0 0 3px rgba(255,123,107,.25), 0 0 16px rgba(255,123,107,.45); } }
.sh-tokes { position: relative; display: inline-flex; align-items: center; gap: 6px; }
.sh-tokes .tc { width: 22px; height: 22px; }
.sh-tokes b.num { font: 900 20px/1 var(--f-display); color: var(--brass-hi); }
.sh-tokes .tip { position: absolute; left: 100%; top: -6px; margin-left: 4px; font: 900 14px/1 var(--f-display); font-style: normal; color: var(--good); animation: tip-up 1.4s var(--ease) both; white-space: nowrap; }
@keyframes tip-up { 0% { opacity: 0; transform: translateY(8px) scale(.6); } 20% { opacity: 1; transform: none; } 100% { opacity: 1; } }
.sh-strikes { display: inline-flex; gap: 5px; }
.sh-strikes i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line-2); }
.sh-strikes i.on { background: var(--bad); border-color: var(--bad); box-shadow: 0 0 10px rgba(255,123,107,.6); animation: strike .5s var(--ease) both; }
@keyframes strike { from { transform: scale(1.8); } }
.sh-prog { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(255,255,255,.05); }
.sh-prog i { display: block; height: 100%; background: linear-gradient(90deg, var(--good), var(--warn) 50%, var(--bad)); background-size: 300px 100%; transition: width 1s linear; }
.shift-bar .dtimer { bottom: 4px; height: 3px; }
@media (max-width: 520px) { /* two tidy rows: clock, stage, quit / tokes, floor calls */
  .shift-bar { display: grid; grid-template-columns: auto auto 1fr auto; align-items: center; gap: 8px 10px; }
  .shift-bar .sh-clock { grid-area: 1 / 1; }
  .shift-bar .sh-stage { grid-area: 1 / 2; }
  .shift-bar .btn { grid-area: 1 / 4; }
  .shift-bar .sh-tokes { grid-area: 2 / 1 / 3 / 3; }
  .shift-bar .sh-strikes { grid-area: 2 / 4; }
  .sh-clock b.num { font-size: 19px; }
  .sh-stage { font-size: 10px; padding: 5px 8px; }
}

/* The floor walks up: her face, what she says, which call this is */
.floor-call {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; width: min(100%, 760px); justify-self: center;
  padding: 10px 14px 10px 10px; border-radius: var(--r-lg); border: 1px solid rgba(255,123,107,.5); position: relative; overflow: hidden;
  background: linear-gradient(100deg, rgba(255,123,107,.18), rgba(255,123,107,.04) 60%), var(--panel); box-shadow: var(--sh-2);
  animation: floor-in .5s cubic-bezier(.2,1.3,.4,1) both;
}
.floor-call.good { border-color: rgba(95,213,144,.5); background: linear-gradient(100deg, rgba(95,213,144,.16), rgba(95,213,144,.03) 60%), var(--panel); }
.floor-call.warn { border-color: rgba(242,193,78,.5); background: linear-gradient(100deg, rgba(242,193,78,.16), rgba(242,193,78,.03) 60%), var(--panel); }
.fc-face { width: 52px; height: 52px; border-radius: 50%; overflow: hidden; background: radial-gradient(circle at 50% 35%, #4a6a5c, #1c2b25); box-shadow: 0 0 0 2px rgba(255,255,255,.12); }
.fc-face svg { width: 100%; height: 100%; display: block; }
.floor-call.bad .fc-face { animation: floor-shake .5s .3s; }
@keyframes floor-shake { 25% { rotate: -6deg; } 50% { rotate: 5deg; } 75% { rotate: -3deg; } }
.fc-t { display: grid; gap: 2px; min-width: 0; }
.fc-t small { font: 800 11px/1 var(--f-display); letter-spacing: .16em; text-transform: uppercase; color: var(--bad); }
.floor-call.good .fc-t small { color: var(--good); }
.floor-call.warn .fc-t small { color: var(--warn); }
.fc-t b { font: 700 17px/1.25 var(--f-display); text-wrap: balance; }
.fc-n { display: grid; justify-items: center; font: 900 30px/1 var(--f-display); color: var(--bad); }
.fc-n small { font: 700 10px/1 var(--f-display); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
@keyframes floor-in { from { opacity: 0; transform: translateX(-24px); } }
@media (max-width: 420px) { .fc-face { width: 42px; height: 42px; } .fc-t b { font-size: 15px; } .fc-n { font-size: 24px; } }

/* Stage change and rank-up toasts */
.stage-toast b.stage-t { font-size: 26px; text-transform: uppercase; letter-spacing: .06em; color: var(--warn); }
.stage-toast span { font-size: 14px; color: var(--muted); max-width: 32ch; }
.rank-up { display: flex; align-items: center; gap: 12px; text-align: left; }
.rank-up .pin { width: 64px; height: 64px; flex: none; animation: pin-in .8s cubic-bezier(.2,1.6,.4,1) both; filter: drop-shadow(0 6px 10px rgba(0,0,0,.5)); }
@keyframes pin-in { from { transform: scale(.2) rotate(-40deg); opacity: 0; } }
.rank-up > span { display: grid; gap: 2px; }
.rank-up small { font: 800 12px/1 var(--f-display); letter-spacing: .18em; text-transform: uppercase; color: var(--good); }
.rank-up b { font-size: 26px; text-transform: uppercase; }
.rank-up em { font-style: normal; font-size: 13px; color: var(--muted); }

/* Daily strip: one dot per play, filled as you go */
.dmarks { display: inline-flex; gap: 3px; }
.dmarks i { width: 9px; height: 9px; border-radius: 50%; background: rgba(255,255,255,.1); }
.dmarks i.g { background: var(--good); }
.dmarks i.b { background: var(--bad); }
@media (max-width: 420px) { .dmarks { order: 5; width: 100%; } .dmarks i { flex: 1; height: 6px; border-radius: 3px; } }

/* End of shift */
.shift-sum.fired { border-color: rgba(255,123,107,.4); }
.ss-head { display: flex; align-items: center; gap: 16px; }
.ss-face { width: 84px; height: 84px; flex: none; border-radius: 50%; overflow: hidden; background: radial-gradient(circle at 50% 35%, #4a6a5c, #1c2b25); box-shadow: 0 0 0 3px var(--brass), 0 10px 24px rgba(0,0,0,.5); animation: pin-in .7s cubic-bezier(.2,1.4,.4,1) both; }
.shift-sum.fired .ss-face { box-shadow: 0 0 0 3px var(--bad), 0 10px 24px rgba(0,0,0,.5); }
.ss-face svg { width: 100%; height: 100%; display: block; }
.ss-head h3 { font-size: clamp(26px, 5.4vw, 36px); text-transform: uppercase; line-height: 1; }
.ss-tokes { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: var(--r-lg); background: linear-gradient(100deg, rgba(224,184,102,.18), rgba(224,184,102,.03)); border: 1px solid rgba(224,184,102,.35); }
.ss-tokes .tc-row { display: flex; }
.ss-tokes .tc { width: 34px; height: 34px; margin-right: -10px; filter: drop-shadow(0 3px 3px rgba(0,0,0,.5)); animation: pin-in .6s cubic-bezier(.2,1.5,.4,1) both; }
.ss-tokes .tc:nth-child(2) { animation-delay: .1s; translate: 0 -5px; }
.ss-tokes .tc:nth-child(3) { animation-delay: .2s; }
.ss-tokes > b { font: 900 44px/1 var(--f-display); color: var(--brass-hi); margin-left: 10px; }
.ss-tokes > span { color: var(--muted); font-size: 14px; }
.dfacts b small { font-size: .5em; color: var(--muted); }
.dfacts .bad { border-color: var(--bad); background: rgba(255,123,107,.08); }
.dfacts .bad b { color: var(--bad); }
.drill-sum .career { border-radius: var(--r-lg); padding: 10px 14px 10px 10px; }
.drill-sum .career .cr-t { flex: 1; } .drill-sum .cr-bar { width: 100%; height: 7px; }

/* End of the daily: the plays as a row of chips, and the text to share */
.ring.big b.num { font-size: 24px; }
.dchips { display: flex; flex-wrap: wrap; gap: 6px; }
.dchip { width: 34px; height: 34px; border-radius: 50%; animation: pin-in .5s cubic-bezier(.2,1.5,.4,1) calc(var(--i) * 70ms) both; position: relative; }
.dchip .tc { width: 100%; height: 100%; display: block; filter: drop-shadow(0 3px 3px rgba(0,0,0,.45)); }
.dchip.b { opacity: .8; filter: saturate(.6) brightness(.8); }
.dchip.b::after { content: "✗"; position: absolute; inset: 0; display: grid; place-items: center; font: 900 18px/1 var(--f-body); color: #fff; text-shadow: 0 1px 3px #000; }
.share-txt { margin: 0; padding: 12px 14px; border-radius: var(--r); background: #0b0f0d; border: 1px dashed var(--line-2); color: #cfd8d2; font: 500 13px/1.5 ui-monospace, Menlo, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
