:root {
  --ink: #f7f0df;
  --muted: #b6c1b8;
  --felt: #0b352b;
  --felt-deep: #071a16;
  --felt-mid: #0d4437;
  --gold: #d59a52;
  --gold-light: #f1c983;
  --red: #b7413d;
  --blue: #5fa8a0;
  --panel: rgba(4, 20, 17, .82);
  --line: rgba(244, 234, 210, .15);
  --shadow: 0 18px 50px rgba(0,0,0,.34);
}
* { box-sizing: border-box; }
html { background: var(--felt-deep); }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  color: var(--ink);
  font: 16px/1.45 ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 50% 5%, rgba(52,112,91,.5), transparent 38%),
    linear-gradient(145deg, var(--felt-mid), var(--felt-deep) 72%);
}
button, input { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
.shell { width: min(1180px, 100%); margin: auto; padding: 18px clamp(14px, 3vw, 32px) 32px; }
.brand { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:16px; }
.wordmark { display:flex; align-items:center; gap:11px; font-family: Georgia, serif; letter-spacing:.04em; }
.brand-lockup { display:block; width:clamp(170px, 32vw, 235px); height:auto; border-radius:8px; }
.mark { width:42px; height:42px; display:block; flex:none; border-radius:9px; }
.wordmark strong { font-size:1.18rem; }
.wordmark strong, .crew-brand strong, .recap-brand strong { color:var(--ink); white-space:nowrap; }
.wordmark small, .crew-brand small, .recap-brand small { font-size:.72em; font-weight:400; letter-spacing:.09em; text-transform:lowercase; }
.micro { color:var(--muted); font-size:.82rem; letter-spacing:.1em; text-transform:uppercase; }
.panel { background: var(--panel); border:1px solid var(--line); border-radius:24px; box-shadow:var(--shadow); backdrop-filter: blur(14px); }
.setup { max-width:720px; margin:4vh auto 0; padding:clamp(24px,5vw,50px); }
h1,h2,h3,p { margin-top:0; }
h1 { margin-bottom:10px; font:700 clamp(2.5rem,8vw,5.5rem)/.88 Georgia,serif; letter-spacing:-.04em; }
h2 { font:700 1.55rem/1.15 Georgia,serif; }
.lede { max-width:520px; color:#d4ddd6; font-size:1.05rem; }
.team-grid { display:grid; grid-template-columns:1fr 1fr; gap:14px; margin:28px 0; }
.player-count { display:grid; grid-template-columns:repeat(4,1fr); gap:10px; margin:28px 0; }
.count-card { min-height:105px; border:1px solid var(--line); border-radius:16px; color:var(--ink); background:rgba(255,255,255,.045); cursor:pointer; }
.count-card:hover,.count-card:focus-visible { border-color:var(--gold); background:rgba(213,154,82,.12); outline:none; }
.count-card b { display:block; color:var(--gold-light); font:700 2.2rem Georgia,serif; }
.count-card span { color:var(--muted); }
.team-box { padding:18px; border:1px solid var(--line); border-radius:16px; background:rgba(255,255,255,.035); }
.team-box h3 { color:var(--gold-light); margin-bottom:12px; }
.team-box.team-gold { border:2px solid rgba(241,201,131,.85); background:linear-gradient(155deg,rgba(213,154,82,.14),rgba(255,255,255,.025) 65%); }
.team-box.team-blue { border:2px solid rgba(95,168,160,.9); background:linear-gradient(155deg,rgba(95,168,160,.15),rgba(255,255,255,.025) 65%); }
.team-box.team-blue h3 { color:#8fd4cc; }
label { display:block; color:var(--muted); font-size:.82rem; margin:10px 0 5px; }
input { width:100%; color:var(--ink); background:#061e19; border:1px solid rgba(255,255,255,.18); border-radius:10px; padding:11px 12px; outline:none; }
input:focus { border-color:var(--gold); box-shadow:0 0 0 3px rgba(213,154,82,.15); }
.seat-row + .seat-row { margin-top:14px; }
.bot-name { min-height:47px; padding:9px 11px; border:1px solid rgba(213,154,82,.35); border-radius:10px; color:var(--gold-light); background:rgba(213,154,82,.08); font-weight:750; }
.bot-name small { display:block; color:var(--muted); font-weight:500; }
.back-link { border:0; padding:0; margin-bottom:20px; color:var(--gold-light); background:none; cursor:pointer; }
.btn { border:0; border-radius:999px; min-height:46px; padding:10px 20px; cursor:pointer; font-weight:750; color:#112019; background:var(--gold-light); box-shadow:0 8px 22px rgba(0,0,0,.2); }
.btn:hover { filter:brightness(1.05); transform:translateY(-1px); }
.btn:active { transform:none; }
.btn.secondary { color:var(--ink); background:rgba(255,255,255,.09); border:1px solid var(--line); box-shadow:none; }
.btn.danger { color:#fff; background:#8e322f; }
.btn:disabled { opacity:.38; cursor:not-allowed; transform:none; }
.full { width:100%; }
.topbar { display:grid; grid-template-columns:auto 1fr auto; align-items:center; gap:15px; }
.utility-actions{display:flex;gap:8px;flex-wrap:wrap}.guide-button.active{color:#142219;background:var(--gold-light);border-color:var(--gold-light)}
.scores { display:flex; justify-content:center; gap:10px; }
.score-pill { min-width:95px; padding:8px 12px; border:1px solid var(--line); border-radius:13px; text-align:center; background:rgba(0,0,0,.15); }
.score-pill b { display:block; color:var(--gold-light); font-size:1.2rem; }
.score-pill:first-child { border-color:rgba(241,201,131,.75); box-shadow:inset 0 0 18px rgba(213,154,82,.08); }
.score-pill:last-child { border-color:rgba(95,168,160,.85); box-shadow:inset 0 0 18px rgba(95,168,160,.1); }
.score-pill:last-child b { color:#8fd4cc; }
.turn-chip { text-align:right; }
.turn-chip b { display:block; }
.hand-counter { display:block; color:var(--gold-light); font-size:.9rem; font-weight:800; white-space:nowrap; }
.hand-counts { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin-top:12px; }
.hand-count-team { min-width:0; padding:7px 10px; border:1px solid rgba(241,201,131,.45); border-radius:13px; background:rgba(0,0,0,.17); }
.hand-count-team.blue { border-color:rgba(95,168,160,.65); }
.hand-count-team-name { display:block; color:var(--gold-light); font-size:.72rem; font-weight:700; letter-spacing:.07em; text-transform:uppercase; }
.hand-count-team.blue .hand-count-team-name { color:#8fd4cc; }
.hand-count-player { display:flex; align-items:center; gap:8px; min-width:0; padding:3px 5px; border-radius:6px; }
.hand-count-player.current { background:rgba(255,255,255,.11); }
.hand-count-name { min-width:0; flex:1; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:.86rem; }
.hand-count-player strong { flex:none; min-width:1.7em; text-align:right; font-size:1.12rem; line-height:1.15; color:var(--gold-light); }
.hand-count-team.blue .hand-count-player strong { color:#8fd4cc; }
.phasebar { margin:14px 0; padding:11px 16px; display:flex; align-items:center; justify-content:space-between; gap:14px; border:1px solid var(--line); border-radius:15px; background:rgba(0,0,0,.17); }
.phasebar strong { color:var(--gold-light); }
.table { display:grid; grid-template-columns:minmax(0,1fr) minmax(270px,1.35fr) minmax(0,1fr); gap:12px; min-height:390px; }
.zone { min-width:0; padding:14px; border:1px solid var(--line); border-radius:18px; background:rgba(1,16,13,.35); }
.zone.team-a { border:2px solid rgba(241,201,131,.85); background:linear-gradient(160deg,rgba(213,154,82,.13),rgba(1,16,13,.38) 55%); box-shadow:inset 0 0 28px rgba(213,154,82,.07); }
.zone.team-b { border:2px solid rgba(95,168,160,.9); background:linear-gradient(160deg,rgba(95,168,160,.14),rgba(1,16,13,.38) 55%); box-shadow:inset 0 0 28px rgba(95,168,160,.08); }
.zone.team-a .zone-title:first-child { color:var(--gold-light); }
.zone.team-b .zone-title:first-child { color:#8fd4cc; }
.zone-title { display:flex; align-items:center; justify-content:space-between; color:var(--muted); font-size:.78rem; text-transform:uppercase; letter-spacing:.09em; margin-bottom:10px; }
.zone-title b { color:var(--ink); letter-spacing:0; }
.center { display:flex; flex-direction:column; gap:12px; }
.piles { display:flex; justify-content:center; align-items:center; gap:18px; min-height:126px; }
.pile { text-align:center; color:var(--muted); font-size:.78rem; }
.pile .card { margin:0 auto 5px; }
.combos { display:flex; flex-wrap:wrap; align-content:flex-start; gap:9px; }
.combo { display:flex; align-items:center; gap:4px; padding:7px; border:1px solid rgba(255,255,255,.16); border-radius:12px; background:rgba(0,0,0,.14); cursor:pointer; min-height:86px; }
.combo.selected { border-color:var(--gold-light); box-shadow:0 0 0 2px rgba(241,201,131,.2); }
.combo.swap-eligible { border-color:var(--gold-light); box-shadow:0 0 0 3px rgba(241,201,131,.24); animation:swapGlow 1.5s ease-in-out infinite; }
.combo.swap-selected { border-color:#fff2bd; box-shadow:0 0 0 3px rgba(255,242,189,.35); }
.combo.swap-dim, .card.swap-dim { opacity:.28; filter:saturate(.35); }
.combo:disabled { cursor:default; }
.card.swap-card-selected { opacity:1; outline:3px solid var(--gold-light); transform:translateY(-10px); }
@keyframes swapGlow { 50% { box-shadow:0 0 0 5px rgba(241,201,131,.12); } }
.combo small { writing-mode:vertical-rl; color:var(--muted); font-size:.64rem; }
.empty { color:#8fa198; font-size:.88rem; padding:16px 4px; }
.card { width:calc(56px * var(--card-scale,1)); height:calc(78px * var(--card-scale,1)); flex:0 0 auto; display:flex; flex-direction:column; justify-content:space-between; padding:6px; border-radius:8px; color:#171c19; background:#f7f1e2; border:2px solid rgba(255,255,255,.8); box-shadow:0 4px 10px rgba(0,0,0,.28); font-family:Georgia,serif; font-weight:700; user-select:none; }
.card.drawn-card { position:relative; outline:3px solid var(--gold-light); box-shadow:0 0 0 5px rgba(241,201,131,.18),0 7px 18px rgba(0,0,0,.38); }
.card.drawn-card::after { content:'DRAWN'; position:absolute; left:50%; bottom:-18px; transform:translateX(-50%); padding:2px 5px; border-radius:5px; color:#102018; background:var(--gold-light); font:800 .58rem/1.2 system-ui,sans-serif; letter-spacing:.08em; }
.card.passed-card { position:relative; outline:3px solid #79b9df; box-shadow:0 0 0 5px rgba(121,185,223,.18),0 7px 18px rgba(0,0,0,.38); }
.card.passed-card::after { content:'PASSED'; position:absolute; left:50%; bottom:-18px; transform:translateX(-50%); padding:2px 5px; border-radius:5px; color:#102018; background:#a4d5f1; font:800 .58rem/1.2 system-ui,sans-serif; letter-spacing:.06em; }
.passed-notice { color:#c6e6fa; font-size:.9rem; margin:10px 0 16px; }
.card.draw-from-stock { animation:drawFromStock .6s cubic-bezier(.2,.8,.2,1); }
.card.draw-from-discard { animation:drawFromDiscard .6s cubic-bezier(.2,.8,.2,1); }
@keyframes drawFromStock { from { opacity:.25; transform:translate(85px,-150px) scale(.82) rotate(5deg); } to { opacity:1; transform:translate(0,0) scale(1) rotate(0); } }
@keyframes drawFromDiscard { from { opacity:.25; transform:translate(-85px,-150px) scale(.82) rotate(-5deg); } to { opacity:1; transform:translate(0,0) scale(1) rotate(0); } }
.card.red { color:#a42e2e; }
.card.back { background:repeating-linear-gradient(45deg,#153f34,#153f34 5px,#d09a55 5px,#d09a55 7px); border:3px solid #eee0c4; }
.card.empty-pile { align-items:center; justify-content:center; padding:2px; color:#c4d0ca; background:transparent; border:2px dashed #72877e; box-shadow:none; font:600 .75rem system-ui,sans-serif; }
.card.selectable { cursor:pointer; transition:.12s ease; }
.hand .card.selectable:not(.selected):not(.swap-card-selected) { transform:translateY(0); }
.card.selected { transform:translateY(-10px); outline:3px solid var(--gold-light); }
.card:not(.joker):not(.back):not(.empty-pile) { justify-content:flex-start; align-items:flex-start; gap:2px; }
.card:not(.joker):not(.back):not(.empty-pile) > span:first-child { font-size:calc(1.55rem * var(--card-label-scale,var(--card-scale,1))); line-height:1; }
.card .suit { align-self:flex-start; font-size:calc(1.7rem * var(--card-label-scale,var(--card-scale,1))); line-height:1; }
.card.joker { align-items:center; justify-content:center; gap:3px; padding:4px 2px; color:#7c332f; }
.joker-label { display:block; width:100%; min-width:0; font:700 calc(11px * var(--card-label-scale,var(--card-scale,1)))/1.2 Georgia,serif; letter-spacing:0; text-align:center; white-space:nowrap; }
.joker-art { display:block; flex:0 1 38px; width:100%; min-height:0; background:url('./joker-emblem.png') center/contain no-repeat; }
.joker-rank { display:block; font:800 calc(.8rem * var(--card-label-scale,var(--card-scale,1)))/1 system-ui,sans-serif; color:#7c332f; }
.hand-wrap { margin-top:14px; padding:14px; }
.hand-piles { min-height:0; padding:4px 0 12px; margin-bottom:12px; border-bottom:1px solid var(--line); }
@media(max-width:720px){.piles.hand-piles{min-height:0}}
.guide-toggle-row{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px 14px;border:1px solid rgba(241,201,131,.3);border-radius:14px;background:rgba(213,154,82,.08)}.guide-toggle-row strong,.guide-toggle-row span{display:block}.guide-toggle-row span{margin-top:2px;color:var(--muted);font-size:.86rem}.guide-toggle-full{margin:18px 0}.guide-switch{min-width:62px;padding:8px 14px;border:1px solid var(--line);border-radius:999px;color:var(--muted);background:rgba(255,255,255,.06);font-weight:800;cursor:pointer}.guide-switch.on{color:#112019;background:var(--gold-light);border-color:var(--gold-light)}
.guided-card{display:grid;grid-template-columns:auto 1fr;gap:12px;align-items:start;margin-bottom:14px;padding:13px 14px;border:1px solid rgba(241,201,131,.4);border-radius:15px;background:linear-gradient(125deg,rgba(213,154,82,.14),rgba(255,255,255,.035))}.guide-icon{width:32px;height:32px;display:grid;place-items:center;border-radius:50%;color:#102018;background:var(--gold-light);font-weight:900}.guided-card strong{display:block;margin:2px 0 3px;color:var(--gold-light);font-size:1rem}.guided-card p{margin:0;color:#d6dfd8;font-size:.9rem;line-height:1.42}
.swap-guide { display:grid; gap:10px; padding:14px; margin-bottom:14px; border:1px solid var(--gold); border-radius:14px; background:rgba(213,154,82,.11); }
.swap-guide strong { display:block; margin-top:4px; font-size:1rem; }
.swap-summary { display:grid; gap:6px; padding-top:10px; border-top:1px solid rgba(241,201,131,.28); color:#e8efe9; }
.hand-head { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:12px; }
.hand-head > div { flex:1; min-width:0; }
.hand-head b { display:block; overflow-wrap:anywhere; }
.hand-team-label{display:block;margin:3px 0 1px;font-size:.8rem;font-weight:800;letter-spacing:.08em;text-transform:uppercase}
.hand-team-label.gold,.hand-team-names.gold{color:var(--gold-light)}
.hand-team-label.blue,.hand-team-names.blue{color:#8fd4cc}
.hand-head > span { flex:0 0 auto; max-width:45%; }
.hand { display:flex; gap:7px; overflow-x:auto; padding:10px 4px 14px; min-height:104px; scrollbar-color:var(--gold) transparent; }
.actions { display:flex; flex-wrap:wrap; gap:9px; margin-top:12px; }
.actions .btn { flex:1 1 140px; }
.hint { margin:10px 0 0; color:var(--muted); font-size:.88rem; min-height:1.3em; }
.overlay { position:fixed; inset:0; z-index:20; display:grid; place-items:center; padding:20px; background:rgba(2,13,11,.96); }
.reveal { width:min(460px,100%); text-align:center; padding:36px 25px; }
.reveal .mark { margin:0 auto 18px; width:76px; height:76px; border-radius:16px; }
.reveal h2 { font-size:2rem; margin-bottom:8px; }
.reveal p { color:var(--muted); }
.bot-pulse { width:68px; height:68px; display:grid; place-items:center; margin:0 auto 18px; border:1px solid var(--gold); border-radius:50%; color:var(--gold-light); font-weight:850; letter-spacing:.08em; animation:pulse 1.2s ease-in-out infinite; }
.bot-overlay{padding:12px}.bot-action{width:min(520px,100%);height:calc(100svh - 24px);min-height:0;max-height:none;overflow-y:auto;display:flex;flex-direction:column;align-items:center;padding:clamp(18px,4dvh,36px) 22px}.bot-action .micro,.bot-action h2,.bot-action > p{flex:none}.bot-played-cards{display:flex;flex:none;min-height:78px;justify-content:center;align-items:center;gap:9px;margin:clamp(12px,2dvh,22px) 0;animation:botCardsIn .35s ease-out}.bot-played-cards .card{transform:none}@keyframes botCardsIn{from{transform:translateY(12px) scale(.97)}to{transform:none}}
.bot-action.bot-team-gold{border:3px solid var(--gold-light);box-shadow:0 0 34px rgba(241,201,131,.28)}.bot-action.bot-team-blue{border:3px solid #74c8bf;box-shadow:0 0 34px rgba(95,168,160,.3)}.bot-team-gold .bot-pulse{border-color:var(--gold-light);color:var(--gold-light)}.bot-team-blue .bot-pulse{border-color:#74c8bf;color:#8fd4cc}.bot-team-blue .micro{color:#8fd4cc}
.bot-remaining{display:flex;align-items:baseline;justify-content:center;gap:8px;margin:1px 0 12px;color:var(--gold-light);font-weight:700}.bot-remaining strong{font-size:1.8rem;line-height:1}.bot-remaining span{font-size:.9rem}.bot-team-blue .bot-remaining{color:#8fd4cc}
@keyframes pulse { 50% { transform:scale(1.08); box-shadow:0 0 28px rgba(213,154,82,.28); } }
.bonus-overlay{background:radial-gradient(circle,rgba(93,61,15,.86),rgba(2,13,11,.97) 62%);animation:bonusFade 1.5s ease both}.bonus-burst{position:relative;width:min(390px,92vw);padding:42px 24px;text-align:center;border:2px solid var(--gold-light);border-radius:24px;background:linear-gradient(145deg,rgba(213,154,82,.28),rgba(4,29,24,.96));box-shadow:0 0 55px rgba(241,201,131,.3);overflow:hidden;animation:bonusPop .45s cubic-bezier(.2,1.35,.35,1)}.bonus-burst h2{margin:3px 0 8px;color:#fff2bd;font-size:clamp(2.35rem,11vw,4.3rem);line-height:.92;letter-spacing:.02em;text-shadow:0 3px 18px rgba(213,154,82,.65)}.bonus-burst p{margin:0;color:#e8efe9}.bonus-burst .micro{color:var(--gold-light)}.bonus-rays{position:absolute;inset:50% auto auto 50%;z-index:-1;color:rgba(255,242,189,.28);font-size:19rem;line-height:1;transform:translate(-50%,-50%);animation:bonusSpin 1.5s ease-out}@keyframes bonusPop{from{opacity:0;transform:scale(.55) rotate(-3deg)}to{opacity:1;transform:scale(1) rotate(0)}}@keyframes bonusSpin{from{transform:translate(-50%,-50%) scale(.35) rotate(-40deg)}to{transform:translate(-50%,-50%) scale(1.2) rotate(18deg)}}@keyframes bonusFade{0%,82%{opacity:1}100%{opacity:0}}
.celebration-cards{display:flex;justify-content:center;gap:10px;margin:18px 0}.celebration-cards .card{transform:none;animation:celebrationCard .45s ease-out both}.celebration-cards .card:nth-child(2){animation-delay:.12s}@keyframes celebrationCard{from{opacity:0;transform:translateY(35px) rotate(-8deg) scale(.8)}to{opacity:1;transform:none}}
.celebration-snatch .bonus-burst{border-color:#f4c46f;animation:snatchIn .5s cubic-bezier(.15,1.35,.25,1)}@keyframes snatchIn{from{opacity:0;transform:translateX(80px) rotate(5deg) scale(.78)}to{opacity:1;transform:none}}
.celebration-joker .bonus-burst{border-color:#e6aa59;background:linear-gradient(145deg,rgba(155,45,50,.27),rgba(4,29,24,.96))}.celebration-joker .celebration-cards .card:nth-child(2){animation:celebrationCard .45s .28s ease-out both}
.celebration-pass .bonus-burst{border-color:#8fc0ce;background:linear-gradient(145deg,rgba(68,139,160,.3),rgba(4,29,24,.96))}.celebration-pass .bonus-burst h2{color:#d6f6ff;text-shadow:0 3px 18px rgba(70,153,183,.6)}
.celebration-streak .bonus-burst{box-shadow:0 0 75px rgba(241,201,131,.55)}.celebration-streak .bonus-burst h2{font-size:clamp(2.8rem,13vw,5rem)}
.bot-reward-stamps{display:flex;flex-wrap:wrap;align-content:start;justify-content:center;gap:10px;min-height:96px;flex:none;margin-top:16px;padding-top:8px}.bot-reward-stamp{position:relative;display:inline-flex;align-items:center;justify-content:center;min-height:48px;padding:9px 14px;border:2px solid var(--gold-light);border-radius:16px;overflow:hidden;background:linear-gradient(145deg,rgba(213,154,82,.28),rgba(4,29,24,.96));color:#fff2bd;box-shadow:0 0 22px rgba(241,201,131,.3);text-shadow:0 2px 10px rgba(213,154,82,.65);font:900 clamp(.95rem,3.8vw,1.2rem)/1.05 ui-sans-serif,system-ui,sans-serif;letter-spacing:.02em;animation:rewardStamp .3s cubic-bezier(.2,1.4,.4,1) both}.bot-reward-stamp strong{position:relative;z-index:1}.bot-stamp-rays{position:absolute;inset:50% auto auto 50%;transform:translate(-50%,-50%);font-size:5rem;line-height:1;color:rgba(255,242,189,.15)}.bot-reward-snatch{border-color:#f4c46f}.bot-reward-joker{border-color:#e6aa59;background:linear-gradient(145deg,rgba(155,45,50,.27),rgba(4,29,24,.96))}.bot-reward-pass{border-color:#8fc0ce;background:linear-gradient(145deg,rgba(68,139,160,.3),rgba(4,29,24,.96));color:#d6f6ff;text-shadow:0 2px 10px rgba(70,153,183,.6)}.bot-reward-streak{box-shadow:0 0 35px rgba(241,201,131,.55);font-size:clamp(1.05rem,4.2vw,1.3rem)}@keyframes rewardStamp{from{opacity:0;scale:1.35}to{opacity:1;scale:1}}
.modal { position:fixed; inset:0; z-index:30; display:grid; place-items:center; padding:16px; background:rgba(0,0,0,.7); }
.modal-card { width:min(620px,100%); max-height:88vh; overflow:auto; padding:24px; }
.play-of-hand-button{margin-top:18px;border-color:var(--gold,#e9c98a)}
.play-replay{z-index:45}
.play-replay .modal-card{text-align:center;width:min(520px,100%)}
.play-replay .mark{width:64px;height:64px;margin:0 auto 10px}
.play-replay .play-reason{font-size:1rem;line-height:1.45;margin:6px 0 20px}
.play-replay-step{min-height:240px;display:flex;flex-direction:column;align-items:center;justify-content:center;border-top:1px solid #ffffff35;border-bottom:1px solid #ffffff35;margin-bottom:18px;padding:16px 0}
.play-replay-step .bot-reward-stamps{min-height:66px;margin-top:8px}
.play-replay-finale{min-height:290px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;padding:28px 0}
.play-replay-finale h2{margin:0;font-size:clamp(1.7rem,6vw,2.5rem)}
.play-replay-finale p{margin:0;line-height:1.45}
.play-replay-finale .bot-reward-stamps{min-height:0;margin-top:8px}
.play-replay-step h3{font-size:1.25rem;margin:10px 0}
.play-replay-step .bot-played-cards{min-height:95px;justify-content:center}
/* The replay has more copy than a bot turn. Let it grow and scroll instead of
   shrinking its text, cards, and stamps into the fixed-height bot frame. */
.play-replay .bot-action{display:block;height:auto;max-height:calc(100dvh - 32px);overflow-y:auto;padding:20px clamp(14px,4vw,24px)}
.play-replay .bot-action h2,.play-replay .bot-action h3,.play-replay .bot-action p{overflow-wrap:anywhere}
.play-replay-step{min-height:0;gap:10px;padding:18px 0;margin-bottom:16px}
.play-replay-step h3,.play-replay-step p{margin:0;line-height:1.4}
.play-replay-step .bot-played-cards{min-height:0;max-width:100%;overflow-x:auto;margin:4px 0;padding:4px 0}
.play-replay-step .bot-reward-stamps,.play-replay-finale .bot-reward-stamps{min-height:0;margin:4px 0 0;padding:4px 0 8px}
.play-replay-finale{min-height:0;padding:24px 0}
.play-replay .recap-controls{display:flex;flex-wrap:wrap;margin:12px 0 0}
.play-replay .recap-controls .btn{min-width:130px}
.option-list { display:grid; gap:8px; margin:14px 0; }
.option { width:100%; text-align:left; border:1px solid var(--line); border-radius:12px; padding:12px; color:var(--ink); background:rgba(255,255,255,.06); cursor:pointer; }
.option:hover { border-color:var(--gold); }
.summary-grid { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.summary-team { padding:16px; border:1px solid var(--line); border-radius:15px; }
.summary-team strong { display:block; font:700 2rem Georgia,serif; color:var(--gold-light); }
.summary-team.blue { border-color:rgba(116,200,191,.48); }
.summary-team.blue strong { color:#8fd4cc; }
.summary-team-head { font-size:1rem; display:flex; align-items:baseline; justify-content:space-between; gap:12px; font-weight:700; }
.summary-team-head strong { flex:none; }
.score-breakdown { margin-top:12px; border-top:1px solid var(--line); }
.score-breakdown-row,.score-breakdown-total,.score-match-total { display:flex; align-items:baseline; justify-content:space-between; gap:14px; padding:7px 0; font-size:.9rem; }
.score-breakdown-row span { min-width:0; overflow-wrap:anywhere; }
.score-breakdown-row b,.score-breakdown-total b,.score-match-total b { flex:none; font-variant-numeric:tabular-nums; }
.score-breakdown-total { border-top:1px solid var(--line); margin-top:4px; font-weight:700; }
.score-match-total { border-top:1px solid var(--line); }
.score-breakdown-total,.score-match-total { font-size:1rem; font-weight:700; color:var(--ink); }
.score-breakdown-total b,.score-match-total b { font:700 2rem Georgia,serif; color:var(--gold-light); }
.summary-team.blue .score-breakdown-total b,.summary-team.blue .score-match-total b { color:#8fd4cc; }
.summary-note { color:var(--muted); font-size:.88rem; margin:12px 0 0; }
#toast { position:fixed; left:50%; bottom:22px; z-index:50; transform:translate(-50%,20px); opacity:0; pointer-events:none; max-width:min(90vw,560px); padding:11px 17px; border-radius:999px; color:#101b16; background:var(--gold-light); font-weight:700; text-align:center; transition:.2s ease; }
#toast.show { opacity:1; transform:translate(-50%,0); }
.rules { max-width:780px; margin:auto; }
.rules li { margin:.5em 0; color:#d6dfd8; }
.close-x { float:right; border:0; background:none; color:var(--ink); font-size:1.5rem; cursor:pointer; }
@media (max-width: 780px) {
  .shell { padding:12px 10px 24px; }
  .brand { margin-bottom:10px; }
  .micro.brand-sub { display:none; }
  .topbar { grid-template-columns:1fr auto; }
  .utility-actions{grid-column:1;grid-row:1}.utility-actions .btn{min-height:40px;padding:7px 12px}
  .scores { grid-column:1/-1; grid-row:2; }
  .turn-chip { grid-column:2; grid-row:1; }
  .table { grid-template-columns:minmax(0,1fr); min-height:0; }
  .center { grid-column:1/-1; grid-row:1; }
  .zone.team-a { grid-column:1; grid-row:2; }
  .zone.team-b { grid-column:1; grid-row:3; }
  .piles { min-height:105px; }
  .card { width:calc(50px * var(--card-scale,1)); height:calc(70px * var(--card-scale,1)); }
  .combo { min-height:78px; max-width:100%; overflow-x:auto; }
  .phasebar { align-items:flex-start; }
}
@media (max-width: 520px) {
  .team-grid, .summary-grid { grid-template-columns:1fr; }
  .player-count { grid-template-columns:1fr 1fr; }
  .setup { margin:0 auto; padding:24px 18px; }
  .zone { padding:10px; }
  .table { gap:8px; }
  .card { width:calc(46px * var(--card-scale,1)); height:calc(65px * var(--card-scale,1)); font-size:.85rem; }
  .card:not(.joker):not(.back):not(.empty-pile) > span:first-child { font-size:calc(1.35rem * var(--card-label-scale,var(--card-scale,1))); }
  .card .suit { font-size:calc(1.5rem * var(--card-label-scale,var(--card-scale,1))); }
  .combo .card:not(:first-of-type) { margin-left:-22px; }
  .hand .card { width:calc(52px * var(--card-scale,1)); height:calc(73px * var(--card-scale,1)); }
}
@media (prefers-reduced-motion: reduce) {
  .card.draw-from-stock,.card.draw-from-discard,.bonus-overlay,.bonus-burst,.bonus-rays,.celebration-cards .card,.bot-reward-stamp { animation:none; }
}

#feedback-modal{z-index:2000}#feedback-modal label{display:block;margin:16px 0 8px}#feedback-modal select,#feedback-modal textarea{width:100%;padding:12px;font:inherit;background:#f4ead2;color:#071a16;border:1px solid #52635d;border-radius:8px}a{color:inherit}

.seat-row select{width:100%;min-height:46px;padding:10px;border:1px solid var(--gold);border-radius:10px;background:#061e19;color:var(--ink);font:inherit}.seat-row small{display:block;margin-top:5px;color:var(--muted)}

.tester-thanks{text-align:center}.tester-thanks h2{font-size:clamp(2rem,6vw,3rem);color:var(--gold-light)}.tester-handles{display:flex;flex-wrap:wrap;justify-content:center;gap:10px;margin:24px 0;max-height:40vh;overflow:auto}.tester-handle{padding:8px 15px;border:1px solid rgba(241,201,131,.4);border-radius:999px;background:rgba(213,154,82,.1);overflow-wrap:anywhere;max-width:100%}.tester-thanks .hint{margin-bottom:20px}
.tester-thanks{max-width:520px;background:#071a16}.crew-brand{display:flex;justify-content:center;align-items:center;gap:10px;margin-bottom:18px;font:700 1.1rem Georgia,serif;letter-spacing:.05em}.crew-brand img{width:44px;height:44px;border-radius:9px}.crew-brand small{font-size:.75rem;font-weight:400}.crew-intro{max-width:31ch;margin:0 auto 22px;color:#dce8df}.crew-metrics{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-bottom:12px}.crew-metrics>div{padding:14px 8px;border-radius:12px;background:#12372d}.crew-metrics strong{display:block;color:var(--gold-light);font:700 2rem Georgia,serif}.crew-metrics span{font-size:.85rem;color:#dce8df}.crew-goal{margin:0 0 24px;color:var(--muted);font-size:.85rem}.crew-credit-title{margin:0 0 7px;color:var(--gold-light);font:700 1.05rem Georgia,serif;letter-spacing:.1em;text-transform:uppercase}.tester-thanks .tester-handles{display:block;column-count:2;column-gap:20px;max-height:none;overflow:visible;max-width:350px;margin:0 auto 8px;padding:13px 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}.tester-thanks .tester-handle{display:block;width:100%;max-width:none;padding:7px 2px;border:0;border-radius:0;background:none;color:var(--ink);font:1rem Georgia,serif;text-align:center;break-inside:avoid;overflow-wrap:anywhere}.tester-thanks .tester-handle:hover,.tester-thanks .tester-handle:focus-visible{color:var(--gold-light);text-decoration:underline}.tester-thanks #tester-list-status{min-height:0;margin:5px 0}.crew-tagline{margin:16px 0;color:var(--gold-light);font:italic 1.2rem Georgia,serif}.player-record{text-align:center}.player-record h2{color:var(--gold-light)}@media(max-width:360px){.tester-thanks .tester-handles{column-count:1}}

.contribution-copy p{margin:8px 0;color:var(--gold-light)}.community-milestone{padding:14px;margin:14px 0;border:1px solid var(--line);border-radius:14px;color:#e5f2ec;background:rgba(95,168,160,.12)}.match-recap{margin-top:20px;padding-top:18px;border-top:1px solid var(--line)}.match-recap h3{margin:14px 0 8px}.moment-options{display:flex;flex-wrap:wrap;gap:8px}.moment-options .picked{opacity:1;background:var(--gold-light);color:#102018}
.match-summary{max-height:none;overflow:visible}.recap-brand{display:flex;align-items:center;gap:11px;margin-bottom:16px;font:700 1.1rem Georgia,serif;letter-spacing:.05em}.recap-brand img{width:44px;height:44px;border-radius:9px}.recap-brand small{font-size:.75rem;font-weight:400;text-transform:lowercase}.recap-moment{display:flex;justify-content:space-between;gap:12px;padding:7px 0;border-bottom:1px solid var(--line)}.recap-moment b{color:var(--gold-light)}.recap-team h3{margin:20px 0 7px;color:var(--gold-light)}.recap-team.blue h3{color:#8fd4cc}.recap-player{padding:11px 12px;margin:8px 0;border-left:4px solid var(--gold-light);border-radius:10px;background:#102b24}.recap-player.blue{border-color:#74c8bf}.recap-player>div{display:flex;justify-content:space-between;gap:8px}.recap-player small{color:var(--muted);text-transform:uppercase;letter-spacing:.08em}.recap-player p{margin:7px 0 0;color:#e4eee8;font-size:.88rem}.recap-tagline{text-align:center;color:var(--gold-light);font:italic 1.25rem Georgia,serif;margin:22px 0}.match-recap label{display:block;margin:10px 0 7px}.match-recap textarea{box-sizing:border-box;width:100%;padding:12px;background:#f7f0df;color:#071a16;border:1px solid #52635d;border-radius:9px;font:inherit;resize:vertical}.match-recap form button{margin-top:10px}

.swap-picker { position:fixed; inset:0; z-index:40; height:100dvh; padding:16px max(16px,env(safe-area-inset-right)) max(16px,env(safe-area-inset-bottom)); background:var(--felt-deep); display:flex; flex-direction:column; align-items:center; gap:12px; }
.swap-picker-logo { width:min(420px,85%); max-height:17dvh; object-fit:contain; }
.swap-picker h2 { font-size:clamp(17px,3.8vw,26px); margin:0; text-align:center; }
.swap-picker-grid { flex:1; min-height:0; width:min(700px,100%); display:grid; grid-template-columns:repeat(var(--swap-cols,4),var(--swap-size,56px)); grid-auto-rows:calc(var(--swap-size,56px)*78/56); gap:10px; align-content:center; justify-content:center; }
.swap-picker-grid .card { width:calc(var(--swap-size,56px)*var(--card-scale,1)); height:calc(var(--swap-size,56px)*78/56*var(--card-scale,1)); transform:none; opacity:1; }
.swap-picker-grid .card:not(.joker)>span:first-child { font-size:calc(clamp(14px,calc(var(--swap-size,56px)*.4),32px) * var(--card-label-scale,var(--card-scale,1))); }
.swap-picker-grid .card .suit { font-size:calc(clamp(16px,calc(var(--swap-size,56px)*.46),36px) * var(--card-label-scale,var(--card-scale,1))); }
#swap-card-error { min-height:3em; max-width:620px; margin:0; text-align:center; color:var(--gold-light); font-size:14px; }
.swap-picker-actions { display:flex; gap:12px; flex:none; }

.hand-label-row { display:flex; align-items:center; flex-wrap:wrap; gap:10px; margin-bottom:4px; }
.hand-layout-toggle { padding:6px 12px; min-height:36px; font-size:.8rem; }
.hand.tiled { flex-wrap:wrap; overflow-x:visible; row-gap:30px; }

.shuffle-screen { position:fixed;inset:0;z-index:45;min-height:100dvh;padding:clamp(18px,5dvh,45px) 18px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:15px;text-align:center;background:radial-gradient(circle at center,#154b3d,#03110f 75%); }
.shuffle-screen img { width:min(480px,88vw); max-height:17dvh;object-fit:contain; }
.shuffle-screen h2 { font:700 clamp(2rem,9vw,3.5rem) Georgia,serif;color:var(--gold-light);margin:0; }
.shuffle-screen p { max-width:500px;margin:0; }
.shuffle-screen .micro { color:var(--gold-light);text-transform:uppercase;letter-spacing:.14em; }
.shuffle-screen small { color:var(--muted); }
.shuffle-choices { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;width:min(500px,100%); }
.shuffle-choices .btn { white-space:normal;overflow-wrap:anywhere; }
.shuffle-cards { position:relative;width:180px;height:145px;margin:22px auto; }
.shuffle-cards .card { position:absolute;left:62px;top:25px;box-shadow:0 9px 24px #0009; }
.shuffle-cards .card:first-child { animation:shuffleLeft .6s ease-in-out infinite alternate; }
.shuffle-cards .card:nth-child(2) { animation:shuffleRight .6s ease-in-out infinite alternate; }
.shuffle-cards .card:nth-child(3) { animation:shuffleCenter .6s ease-in-out infinite alternate; }
@keyframes shuffleLeft { from{transform:translate(-50px,-12px) rotate(-28deg)}to{transform:translate(30px,10px) rotate(12deg)} }
@keyframes shuffleRight { from{transform:translate(55px,-12px) rotate(28deg)}to{transform:translate(-25px,8px) rotate(-10deg)} }
@keyframes shuffleCenter { from{transform:translate(0,14px) rotate(0)}to{transform:translate(0,-20px) rotate(5deg)} }
@media (prefers-reduced-motion:reduce){.shuffle-cards .card{animation:none}.shuffle-cards .card:first-child{transform:translateX(-28px) rotate(-12deg)}.shuffle-cards .card:nth-child(2){transform:translateX(28px) rotate(12deg)}}
.reveal #watch-recap{margin:18px 0 10px}.recap-controls{display:flex;gap:10px;width:100%;margin:auto 0 12px}.recap-controls .btn{flex:1}.bot-action #recap-open{flex:none}
/* Waiting room and device-specific status use the same panels and controls. */
.welcome{max-width:720px;margin:4vh auto 0;padding:clamp(24px,5vw,50px)}
.welcome p,.help,.muted{color:var(--muted)}
.field{display:grid;gap:7px;margin:16px 0}.field label{font-weight:700}.field input{font-size:1rem}
.invite{display:flex;gap:8px;align-items:center;flex-wrap:wrap;word-break:break-all;padding:12px;background:rgba(241,201,131,.08);border:1px solid rgba(241,201,131,.3);border-radius:12px}
.invite code{font-size:.85rem;flex:1}.seats{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:17px 0}
.seat-wrap{padding:10px;border:2px solid rgba(241,201,131,.65);border-radius:16px;background:linear-gradient(155deg,rgba(213,154,82,.12),rgba(255,255,255,.025) 65%)}
.seat-wrap.blue{border-color:rgba(95,168,160,.85);background:linear-gradient(155deg,rgba(95,168,160,.14),rgba(255,255,255,.025) 65%)}
.seat{width:100%;min-height:82px;padding:8px;border:0;text-align:left;color:var(--ink);background:transparent;cursor:pointer}.seat b,.seat span,.seat small{display:block}.seat small{color:var(--muted)}.seat:disabled{cursor:default}
.seat-wrap label{display:block;margin:4px 0;color:var(--muted);font-size:.88rem}.seat-wrap select{width:100%;min-height:44px;border:1px solid var(--gold);border-radius:10px;background:#061e19;color:var(--ink);padding:9px;font:inherit}
.help{font-size:.88rem;margin:12px 0}.status{margin:14px 0;color:var(--gold-light);font-weight:750}.recent{margin-top:12px;padding:16px}.recent ul{margin:0;padding-left:20px;color:var(--muted)}.recent li{margin:3px 0}
.eyebrow{color:var(--gold-light);font-size:.77rem;font-weight:800;text-transform:uppercase;letter-spacing:.12em}.waiting{color:var(--muted)}
#online-toast{position:fixed;top:50dvh;left:50%;transform:translate(-50%,-50%);box-sizing:border-box;width:min(350px,calc(100vw - 32px));max-height:calc(100dvh - 48px);overflow:auto;padding:22px;background:rgba(7,30,24,.88);color:var(--ink);border:2px solid var(--gold-light);border-radius:20px;box-shadow:0 12px 32px #0005;z-index:120;visibility:hidden;pointer-events:none}#online-toast.show{visibility:visible;pointer-events:auto}
#online-toast .table-note-heading{display:flex;align-items:center;gap:10px;color:var(--gold-light);font-size:.9375rem;font-weight:700;letter-spacing:1px;text-transform:uppercase}
#online-toast .table-note-mark{width:32px;height:32px;display:grid;place-items:center;flex:none;background:#5da8a3;color:var(--gold-light);border-radius:9px;font:700 21px Georgia,serif;letter-spacing:0}
#online-toast p{font-size:1.125rem;line-height:1.45;margin:18px 0 22px;overflow-wrap:anywhere}
#online-toast .btn{display:block;margin-left:auto;min-width:100px;min-height:44px;padding:11px 25px;border-radius:24px;background:var(--gold-light);color:#071e18;font-weight:700}
.hand-wrap .your-cards{display:flex;gap:7px;overflow-x:auto;padding:18px 4px 16px;min-height:104px}.your-cards.tiled{flex-wrap:wrap;overflow-x:visible}.your-cards .card{width:calc(56px * var(--card-scale,1));height:calc(78px * var(--card-scale,1))}
.hand-label-row{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.hand-layout-toggle{min-height:36px;padding:6px 12px;font-size:.83rem}
.table .combo{max-width:100%;overflow-x:auto}.scorebar{display:none}
@media(max-width:780px){.seats{grid-template-columns:repeat(2,minmax(0,1fr))}.your-cards .card{width:calc(50px * var(--card-scale,1));height:calc(70px * var(--card-scale,1))}}
@media(max-width:520px){.seats{grid-template-columns:1fr}.your-cards .card{width:calc(52px * var(--card-scale,1));height:calc(73px * var(--card-scale,1))}}
#online-app{width:min(1180px,100%);margin:auto;padding:18px clamp(14px,3vw,32px) 32px}
@media(max-width:780px){#online-app{padding:12px 10px 24px}}
.table-comments{margin-top:12px;padding:16px}.table-comments h3{margin:0 0 10px;color:var(--gold-light)}
.comment-feed{display:flex;flex-direction:column;gap:6px;max-height:90px;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin}
.comment-feed .muted{margin:0}.comment-line{flex-shrink:0;margin:0;padding:8px 10px;border-left:3px solid var(--gold-light);border-radius:7px;background:rgba(241,201,131,.08);overflow-wrap:anywhere}
.comment-line.blue{border-color:#74c8bf;background:rgba(95,168,160,.11)}.comment-line b{margin-right:6px;color:var(--gold-light)}.comment-line.blue b{color:#9bddd6}
.comment-picker{display:flex;gap:8px;overflow-x:auto;padding:12px 2px 2px;scrollbar-width:thin}.comment-picker .btn{flex:none;min-height:40px;padding:8px 12px;white-space:nowrap;font-size:.9rem}

.turn-ready-overlay{z-index:25;background:rgba(2,13,11,.48)}
.turn-ready-card{width:min(390px,100%);padding:30px 24px;text-align:center;border:3px solid var(--gold-light);border-radius:22px;box-shadow:0 18px 60px rgba(0,0,0,.5)}
.turn-ready-card.blue{border-color:#88d1d0}
.turn-ready-card h2{font-size:clamp(1.8rem,7vw,2.5rem);line-height:1.15;overflow-wrap:anywhere;margin:12px 0 26px}
.turn-ready-card .btn{min-height:54px;font-size:1.15rem}

/* Compact lobby with team borders and bot style colors. */
.lobby-panel{padding:clamp(18px,4vw,32px);max-width:780px;margin:0 auto;min-width:0;overflow-wrap:anywhere}
.lobby-panel h1{font-size:clamp(1.8rem,7vw,2.6rem);line-height:1.15;margin:10px 0 14px}
.lobby-panel .invite{justify-content:space-between;word-break:normal;gap:12px}
.lobby-panel .invite .help{margin:0;font-size:.875rem}
.lobby-panel .seat-wrap{min-width:0}.lobby-panel .seat{text-align:left;min-width:0;padding:6px 2px;line-height:1.45}
.lobby-panel .seat b{font-size:.875rem;color:var(--gold-light)}.lobby-panel .seat.blue b{color:#9bddd6}
.lobby-panel .seat-name{font-size:1.125rem;font-weight:750;margin:7px 0;overflow-wrap:anywhere}
.lobby-panel .seat small{font-size:.875rem}.lobby-panel .seat-name.gold{color:var(--gold-light)}.lobby-panel .seat-name.blue{color:#9bddd6}
.lobby-panel .bot-color-red{color:#ffd0d0}.lobby-panel .bot-color-green{color:#d3f5dc}
.lobby-panel select{max-width:100%;min-width:0;font-size:.875rem}.lobby-panel .btn.full{white-space:normal;line-height:1.4}
@media(max-width:360px){.lobby-panel .seats{grid-template-columns:1fr}}

/* Keep lobby frames neutral; bot color is a small name cue only. */
.lobby-panel .seat-wrap,.lobby-panel .seat-wrap.blue{border:1px solid var(--line);background:rgba(255,255,255,.025)}
.lobby-panel .seat.open{background:transparent;color:var(--ink)}
.lobby-panel .bot-color-red,.lobby-panel .bot-color-green{color:var(--ink)}
.lobby-panel .bot-dot{display:inline;font-size:.75rem;vertical-align:middle;margin-right:3px}
.lobby-panel .seat.open:hover{background:rgba(255,255,255,.045);border-radius:8px}
.handle-entry-overlay{z-index:35;background:rgba(2,13,11,.55)}
.handle-entry-card{width:min(410px,100%);padding:26px 24px;border:1px solid var(--line);background:#0b241e;overflow-wrap:anywhere}
.handle-entry-card h2{font-size:clamp(1.7rem,7vw,2.2rem);line-height:1.2;margin:8px 0 12px}
.handle-entry-card p{color:var(--muted)}.handle-entry-card input{font-size:1rem;min-height:48px}

.handle-entry-card{max-height:calc(100dvh - 32px);overflow-y:auto}

.invite-controls{margin-top:14px;padding-top:12px;border-top:1px solid var(--line)}.invite-controls .help{margin-bottom:0}

.rejoin-controls{padding:14px 16px;margin-top:16px}.rejoin-controls p{margin:0 0 10px}.rejoin-controls .help:last-child{margin:10px 0 0}.rejoin-controls .utility-actions{flex-wrap:wrap}

.start-options{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:10px}.start-options .btn{min-height:54px;white-space:normal}@media(max-width:420px){.start-options{grid-template-columns:1fr}}

.start-options{grid-template-columns:repeat(3,minmax(0,1fr))}.pass-phone-option{display:flex;align-items:center;justify-content:center;text-align:center;text-decoration:none}@media(max-width:600px){.start-options{grid-template-columns:1fr}}

.live-status{position:sticky;top:0;z-index:15;display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 16px;padding:calc(10px + env(safe-area-inset-top)) 14px 10px;background:#071f19;border:1px solid var(--line);border-radius:0 0 14px 14px;box-shadow:0 6px 18px #0005}
.live-status strong{display:block;font-size:1rem;color:var(--gold-light);overflow-wrap:anywhere}
.live-status p{margin:3px 0 0;color:var(--muted);font-size:.875rem;line-height:1.35;overflow-wrap:anywhere}
.live-status-count{flex:none;color:var(--muted);font-size:.875rem;white-space:nowrap}
.live-status.your-turn{border-color:var(--gold)}

.live-status{flex-wrap:wrap}.replacement-vote{flex:1 0 100%;border-top:1px solid var(--line);padding-top:8px}.replacement-vote p{margin:3px 0 7px}.vote-actions{display:flex;flex-wrap:wrap;gap:8px}.vote-actions .btn[aria-pressed="true"]{outline:2px solid var(--gold-light);outline-offset:2px}

.support-sections{margin-top:14px}.support-section{margin-top:10px;padding:12px 14px}.support-section summary{cursor:pointer;font-size:1rem;font-weight:700;min-height:24px;color:var(--gold-light)}.support-content{padding-top:12px}.support-content .recent,.support-content .table-comments,.support-content .rejoin-controls{border:0;box-shadow:none;background:none;padding:0;margin:0}.support-content .guided-card{margin:0}.support-content .hand-counts{margin:0}.comment-unread{display:inline-block;margin-left:10px;padding:1px 8px;border-radius:12px;background:var(--gold-light);color:var(--felt-deep);font-size:.875rem}.compact-counts{display:flex;flex-wrap:wrap;gap:5px 14px;padding:8px 0 10px;font-size:.875rem}.compact-counts .gold{color:var(--gold-light)}.compact-counts .blue{color:#9bddd6}.compact-counts .current{font-weight:700;text-decoration:underline;text-underline-offset:4px}.turn-help-card{width:min(520px,100%);max-height:85dvh;overflow:auto;padding:22px}.turn-help-card .guided-card{margin:12px 0 18px}.support-section{scroll-margin-top:140px}

.live-status{flex-wrap:nowrap;justify-content:flex-start;gap:10px;margin-bottom:8px;padding:calc(6px + env(safe-area-inset-top)) 10px 6px}.live-logo{display:block;width:100px;height:40px;object-fit:contain;flex:none}.live-copy{min-width:0;flex:1}.live-status strong,.live-status p{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;overflow-wrap:normal;line-height:1.3}.live-status strong{font-size:1rem}.live-status p{font-size:.875rem;margin:2px 0 0}.replacement-votes{padding:10px 14px;margin-bottom:10px}.replacement-votes .replacement-vote:first-child{border-top:0;padding-top:0}.support-section{scroll-margin-top:90px}

.quick-feedback{margin-top:16px;border-top:1px solid var(--line);padding-top:14px}.quick-feedback h3{margin:0 0 12px;color:var(--gold-light)}.feedback-question{margin:12px 0}.feedback-question p{margin:0 0 7px;font-size:1rem}.feedback-answers,.feedback-players{display:flex;gap:8px;flex-wrap:wrap}.feedback-answers .btn{min-width:80px;min-height:44px}.quick-feedback .btn[aria-pressed="true"]{border-color:var(--gold-light);background:rgba(213,154,82,.25);outline:1px solid var(--gold-light)}.feedback-followup{margin-top:8px}.feedback-followup .btn{margin:3px}.quick-feedback label{display:block;font-size:1rem;margin-top:16px}.quick-feedback textarea{display:block;width:100%;background:#f7f0df;color:#071a16;border:1px solid #52635d;border-radius:8px;padding:10px;font:inherit;margin:7px 0}.feedback-save-status{font-size:.875rem;margin:8px 0;color:var(--muted)}#quick-feedback-modal{z-index:60}.quick-feedback-card{width:min(560px,100%);max-height:90dvh;overflow:auto;padding:18px}

.board-header{margin:0 0 10px}.board-summary{display:flex;flex-wrap:wrap;align-items:center;gap:7px 12px}.board-summary .scores{gap:6px;justify-content:flex-start;flex:none}.board-summary .score-pill{min-width:0;display:flex;align-items:baseline;gap:7px;padding:4px 9px;border-radius:8px;background:#050505;font-size:.875rem}.board-summary .score-pill b{display:inline;font-size:1rem}.board-summary .hand-counter{margin-left:auto;font-size:.875rem}.board-summary .compact-counts{padding:0;flex:1 1 380px;gap:4px 12px}.board-help{margin-top:8px}.board-help .btn{min-height:44px;padding:8px 12px;font-size:.875rem}.table .zone.team-a,.table .zone.team-b{background:#050505}.combo{background:#050505}.combo-frame-gold{--combo-frame:var(--gold-light);--combo-glow:rgba(241,201,131,.36)}.combo-frame-blue{--combo-frame:#74c8bf;--combo-glow:rgba(116,200,191,.38)}.team-a .combo,.team-b .combo{border-color:var(--combo-frame)}.combo.selected,.combo.swap-selected{border-color:var(--combo-frame);box-shadow:0 0 0 2px var(--combo-frame),0 0 16px var(--combo-glow)}.selection-help{font-size:1rem;color:var(--muted)}

/* Team border stays inside the panel so the hand layout does not shift. */
.hand-wrap.hand-team-gold{border-color:var(--gold-light);box-shadow:inset 0 0 0 2px var(--gold-light),var(--shadow)}
.hand-wrap.hand-team-blue{border-color:#8fd4cc;box-shadow:inset 0 0 0 2px #8fd4cc,var(--shadow)}

#welcome-back .mark{width:72px;height:72px;object-fit:contain;margin-bottom:12px}#welcome-back .btn{margin-top:12px}

.updates-list{max-height:360px;overflow:auto;overscroll-behavior:contain}.update-entry{padding:12px 0;border-bottom:1px solid var(--line)}.update-entry:last-child{border-bottom:0}.update-meta{display:flex;flex-wrap:wrap;gap:8px 14px;align-items:center;font-size:.875rem}.update-meta strong{color:var(--gold-light)}.update-meta span{color:var(--muted)}.update-entry p{font-size:1rem;line-height:1.5;margin:6px 0 0}

@font-face{font-family:SnatchCardRanks;src:url("./card-ranks.woff") format("woff");font-weight:700;font-style:normal;font-display:block}
.card .card-rank{font-family:SnatchCardRanks,Georgia,serif;font-weight:700;font-style:normal;font-variant-numeric:lining-nums tabular-nums;letter-spacing:0}

.combo.combo-frame-gold,.combo.combo-frame-blue{border-color:var(--combo-frame)}

.updates-version{display:inline-block;margin-left:12px;padding:3px 9px;border:1px solid var(--gold-light);border-radius:999px;color:var(--gold-light);font-size:.875rem;line-height:1.3;white-space:nowrap}

.hand-team-line{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 8px;margin-top:3px;min-width:0}.hand-team-line .hand-team-label{display:inline;margin:0;font-size:.875rem;white-space:nowrap;letter-spacing:.03em}.hand-team-line .hand-team-names{font-size:1rem;overflow-wrap:anywhere}.hand-team-divider{color:var(--muted)}

.recap-exit{position:fixed;z-index:110;top:calc(max(24px,env(safe-area-inset-top)) + 40px);left:max(28px,env(safe-area-inset-left));right:auto;width:auto;max-width:calc(100vw - 56px);padding:6px 10px;font-size:.875rem;line-height:1.25;background:#050505;border-color:var(--gold-light);color:var(--gold-light);box-shadow:0 4px 16px #0008;min-height:36px}.bot-overlay:has(~ .recap-exit) .bot-action{padding-top:calc(max(24px,env(safe-area-inset-top)) + 88px)}

#joker-identity-picker{z-index:55}.joker-identity-panel{max-height:90dvh;overflow:auto;padding:24px}.joker-identity-panel .mark{width:64px;height:64px}.joker-identity-cards{display:flex;flex-wrap:wrap;justify-content:center;gap:16px;margin:24px 0}.identity-choice{padding:6px;background:transparent;border:2px solid transparent;border-radius:10px;cursor:pointer}.identity-choice:hover,.identity-choice:focus-visible{border-color:var(--gold-light);outline:none}.identity-choice .card{pointer-events:none}

.actions .table-action,.table-play-confirm .table-action{box-sizing:border-box;height:64px;min-height:64px;max-height:64px;padding:8px 12px;border:2px solid var(--gold-light);border-radius:32px;font-size:1rem;line-height:1.2}
.actions .table-action-complete,.actions .table-action-extend,.actions .table-action-snatch,.table-play-confirm .table-action{font:800 1.625rem Georgia,serif;letter-spacing:1px}
.table-action.table-action-complete{background:linear-gradient(110deg,#b8873d,#f9db9b 48%,#e8ba68);color:#071e18;font-size:1.25rem}
.table-action.table-action-extend{background:linear-gradient(110deg,#27645e,#8fd4cc 48%,#5aaea5);color:#041a16;border-color:#8fd4cc}
.table-action.table-action-snatch{background:radial-gradient(ellipse at center,#704713 0%,#261b0b 55%,#050505 100%);color:#ffe3a1;border-color:#f1c983;text-shadow:0 0 12px #efbb57aa;box-shadow:inset 0 0 16px #f1c98333,0 4px 12px #0005;letter-spacing:3px;font-style:italic;font-size:1.375rem}
.table-play-confirm{position:fixed;inset:0;z-index:115;display:flex;align-items:center;justify-content:center;padding:16px;pointer-events:auto}
.table-play-confirm section{box-sizing:border-box;width:min(calc(var(--table-action-width) + 36px),100%);max-height:calc(100dvh - 48px);overflow:auto;padding:16px;background:rgba(7,30,24,.88);color:var(--ink);border:2px solid var(--gold-light);border-radius:20px;box-shadow:0 12px 32px #0005}
.table-play-confirm .table-note-heading{color:var(--gold-light);font-weight:700;font-size:.9375rem;letter-spacing:1px;text-transform:uppercase}
.table-play-confirm p{font-size:1.125rem;line-height:1.45;margin:18px 0 22px}
.table-play-confirm .btn{width:100%}.table-play-confirm .secondary{margin-top:12px;min-height:44px}

.actions.table-play-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:stretch}
.actions.table-play-actions .btn{min-width:0;width:100%}
.table-play-confirm .table-note-heading{margin-bottom:12px}
.table-play-confirm .table-action{width:var(--table-action-width);max-width:100%;margin:0}
.table-play-confirm .secondary{width:100%;margin-top:10px;padding:8px 12px}
.recap-count{position:fixed;z-index:110;top:max(24px,env(safe-area-inset-top));left:max(28px,env(safe-area-inset-left));margin:0;padding:0;border:0;background:none;color:var(--gold-light);font:700 2rem Georgia,serif;line-height:1;font-variant-numeric:tabular-nums;pointer-events:none}

.report-category{display:block;color:var(--muted);font-size:.875rem;margin-bottom:8px}.report-link{display:inline-block;color:var(--gold-light);font-size:1rem;font-weight:700;line-height:1.5;text-underline-offset:3px}.report-entry .help{margin-bottom:0}

/* Keep the current swap step visible while choosing, without covering the table. */
.swap-guide { position:sticky; top:76px; z-index:12; background:#112c25; border:2px solid var(--gold); box-shadow:0 6px 20px #0008; padding:16px; }
.swap-guide strong { font-size:1.1rem; line-height:1.4; }
.swap-picker .swap-guide { position:static; }

/* Joker bonus styling, with the normal game card and unchanged swap flow. */
.swap-guide { display:flex; align-items:center; gap:14px; padding:14px; border:2px solid #f1c983; border-radius:18px; background:linear-gradient(115deg,#68222d 0%,#351e23 32%,#112c25 82%); box-shadow:0 0 18px #e6aa5940,0 6px 20px #0008,inset 0 0 0 1px #fff2bd24; }
.swap-guide-card { flex:none; pointer-events:none; }
.swap-guide-card .card { margin:0; transform:none; }
.swap-guide-copy { flex:1; min-width:0; }
.swap-guide .micro { color:#f1c983; font-size:.75rem; }
.swap-guide-heading { display:flex; flex-wrap:wrap; align-items:baseline; justify-content:space-between; gap:3px 10px; }
.swap-guide-heading b { color:#fff2bd; font:700 1.4rem/1.15 Georgia,serif; text-shadow:0 2px 10px #d59a5260; }
.swap-guide-heading span { color:#f1c983; font-size:.85rem; white-space:nowrap; }
.swap-guide strong { color:#fff8eb; font-size:1rem; line-height:1.35; margin-top:7px; }
.swap-summary { margin-top:10px; }
@media(max-width:380px){.swap-guide{gap:10px;padding:12px}.swap-guide-heading b{font-size:1.2rem}.swap-guide-heading span{font-size:.8rem}}

/* Permanent turn order and card counts, using the existing game palette. */
.live-status.table-overview{display:block;padding:calc(6px + env(safe-area-inset-top)) 10px 8px}
.overview-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:6px}
.overview-hand{color:var(--gold-light);font-size:.875rem;font-weight:700}
.overview-players{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
.overview-player{display:flex;align-items:center;justify-content:space-between;gap:6px;min-width:0;padding:7px 9px;border:1px solid var(--gold);border-radius:10px;background:#0003}
.overview-player.blue{border-color:var(--blue)}
.overview-player.active{background:#f1c98312;box-shadow:inset 0 0 0 1px var(--gold-light)}
.overview-player.blue.active{background:#5fa8a01a;box-shadow:inset 0 0 0 1px var(--blue)}
.overview-player-copy{min-width:0;flex:1}
.overview-order{display:block;font-size:.875rem;line-height:1.2;color:var(--gold-light)}
.overview-player.blue .overview-order,.overview-player.blue .overview-count b{color:#8fd4cc}
.table-overview .overview-player strong{font-size:1rem;white-space:normal;overflow-wrap:anywhere;line-height:1.2;margin-top:2px}
.table-overview .overview-player p{font-size:.875rem;white-space:normal;overflow-wrap:anywhere;line-height:1.2}
.overview-count{flex:none;text-align:center}
.overview-count b{display:block;font:700 2rem Georgia,serif;line-height:1;color:var(--gold-light);font-variant-numeric:tabular-nums}
.overview-count span{display:block;font-size:.875rem;line-height:1.2;color:var(--muted)}

/* Keep turn guidance with the hand and rules within reach in the banner. */
.overview-tools{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:4px 10px;min-width:0}
.overview-tools .btn{min-height:44px;padding:8px 12px;font-size:.875rem}
.hand-help-question{color:var(--gold-light);font-weight:800}

/* Compact dashboard: fixed seats and one shared turn explanation. */
.live-status.compact-dashboard{border-radius:20px;border:1px solid var(--gold);padding:calc(8px + env(safe-area-inset-top)) 10px 8px}
.compact-dashboard .overview-heading{gap:8px;margin-bottom:6px}
.compact-dashboard .live-logo{width:100px;height:40px}
.compact-dashboard .overview-hand{margin-left:auto;font-size:.875rem;white-space:nowrap}
.compact-dashboard #rules-button{min-height:36px;padding:6px 10px;font-size:.875rem;line-height:1.2;border-radius:18px;white-space:nowrap}
.dashboard-turn{display:flex;align-items:baseline;flex-wrap:wrap;gap:2px 10px;margin-bottom:7px}
.compact-dashboard .dashboard-turn strong{font-size:1rem;white-space:normal;overflow-wrap:anywhere}
.dashboard-turn>span{font-size:.875rem;color:var(--muted);line-height:1.3}
.dashboard-players{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px}
.dashboard-player{position:relative;min-width:0;display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:2px 4px;border:1px solid var(--gold);border-radius:10px;padding:6px;color:var(--gold-light);background:#0002}
.dashboard-player.blue{border-color:var(--blue);color:#8fd4cc}
.dashboard-player.active{background:#f1c98320;box-shadow:inset 0 0 0 1px var(--gold-light)}
.dashboard-player.blue.active{background:#5fa8a030;box-shadow:inset 0 0 0 1px var(--blue)}
.dashboard-name{font-size:.875rem;line-height:1.2;overflow-wrap:anywhere;min-width:0;flex:1 1 40px}
.dashboard-player b{font:700 1.25rem/1 Georgia,serif;font-variant-numeric:tabular-nums}
.dashboard-player small{flex:0 0 100%;font-size:.75rem;line-height:1.1;color:var(--muted)}
.dashboard-scores{display:flex;justify-content:flex-end;gap:16px;margin-top:6px;font-size:.875rem;line-height:1.2}
.dashboard-scores .gold{color:var(--gold-light)}.dashboard-scores .blue{color:#8fd4cc}
.dashboard-scores b{font:700 1.125rem Georgia,serif;margin-left:4px;font-variant-numeric:tabular-nums}

/* Live reader board: one uninterrupted line, with the established team colors. */
.live-status.compact-dashboard{border-color:var(--gold-light)}
.game-ticker{overflow:hidden;white-space:nowrap;min-width:0;padding:7px 0;cursor:pointer;touch-action:pan-y}
.game-ticker:focus-visible{outline:2px solid var(--gold-light);outline-offset:2px;border-radius:8px}
.ticker-track{display:flex;width:max-content;will-change:transform}
.ticker-cycle{display:flex;align-items:center;flex:none;padding-right:24px;gap:18px}
.ticker-player{display:inline-flex;align-items:baseline;gap:3px;font-size:1rem;line-height:1.5;color:var(--gold-light)}
.ticker-player.blue{color:#8fd4cc}
.ticker-player.active{text-decoration:underline;text-decoration-thickness:2px;text-underline-offset:5px;font-weight:700}
.ticker-divider{color:var(--muted)}
.game-ticker.ticker-static{overflow-x:auto;touch-action:pan-x}
.ticker-static .ticker-track{transform:none!important}
.ticker-static .ticker-cycle[aria-hidden]{display:none}

/* Stationary glanceable status with the full table one tap away. */
.player-status-button{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:3px 10px;width:100%;padding:4px 0;background:none;border:0;border-radius:8px;text-align:left;font:inherit;cursor:pointer;color:var(--gold-light)}
.player-status-button:focus-visible{outline:2px solid var(--gold-light);outline-offset:3px}
.stationary-current{grid-column:1 / -1;font-size:1rem;line-height:1.35;overflow-wrap:anywhere}
.stationary-current b{text-decoration:underline;text-underline-offset:4px}
.stationary-current>span{color:var(--muted);font-size:.875rem}
.stationary-next{font-size:.875rem;line-height:1.3;overflow-wrap:anywhere}
.stationary-current.blue,.stationary-next.blue{color:#8fd4cc}
.players-cue{font-size:.875rem;line-height:1.3;color:var(--muted);text-decoration:underline;text-underline-offset:3px;align-self:end}
.stationary-dashboard .dashboard-scores{margin-top:4px}
.player-overview-card{border:1px solid var(--gold-light);border-radius:22px}
.player-overview-list{display:grid;gap:10px;margin:16px 0 20px}
.player-overview-row{display:flex;align-items:center;justify-content:space-between;gap:14px;border:1px solid var(--gold-light);border-radius:14px;padding:12px;color:var(--gold-light)}
.player-overview-row.blue{border-color:var(--blue);color:#8fd4cc}
.player-overview-row>div{min-width:0;flex:1}.player-overview-row strong{display:block;font-size:1.125rem;overflow-wrap:anywhere}
.player-overview-row.current strong{text-decoration:underline;text-underline-offset:5px}.player-overview-row.current{background:#fff1}
.player-overview-row span{display:block;color:var(--muted);font-size:.875rem;line-height:1.4;margin-top:4px}
.player-overview-row p{margin:0;flex:none;font-size:1rem}.player-overview-row b{font:700 1.5rem Georgia,serif}

.compact-setup{padding:16px;border:1px solid var(--gold-light);border-radius:22px}
.setup-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px}
.setup-heading img{width:150px;max-width:50%;height:auto}
.setup-heading h1{font-size:1.25rem;margin:0;color:var(--gold-light)}
.setup-seats{display:grid;gap:9px;margin:12px 0 16px}
.setup-seat{display:grid;grid-template-columns:minmax(95px,.65fr) minmax(0,1fr);align-items:center;gap:6px 10px;border:1px solid var(--gold-light);border-radius:14px;padding:10px 12px}
.setup-seat.blue{border-color:var(--blue)}
.setup-seat-label{font-size:.875rem;font-weight:700;color:var(--gold-light)}
.setup-seat.blue .setup-seat-label{color:#8fd4cc}
.setup-player-name{font-size:1rem;overflow-wrap:anywhere;color:var(--gold-light)}
.setup-seat.blue .setup-player-name{color:#8fd4cc}
.setup-seat select{width:100%;min-width:0;padding:8px;font-size:1rem;min-height:44px;border-radius:10px;margin:0}
.setup-join{min-height:44px;padding:6px 10px;font-size:.875rem}
.setup-seat:has(.setup-join) select{grid-column:2}
.compact-setup .invite{padding:10px;margin:0;display:flex;flex-wrap:wrap;gap:8px;align-items:center;border-radius:14px}
.compact-setup .invite .help{font-size:.875rem;margin:0}

/* Reuse the actual bonus frame and rays without transient bonus animations. */
.compact-setup.bonus-burst{width:100%;padding:16px;text-align:left;animation:none;border:2px solid var(--gold-light);border-radius:24px;background:linear-gradient(145deg,rgba(213,154,82,.28),rgba(4,29,24,.96));box-shadow:0 0 55px rgba(241,201,131,.3);isolation:isolate}
.compact-setup .setup-rays{z-index:0;pointer-events:none;animation:none;transform:translate(-50%,-50%);color:rgba(255,242,189,.12)}
.compact-setup>*:not(.setup-rays){position:relative;z-index:1}
.compact-setup .setup-heading img{width:170px;max-width:55%}
.compact-setup .setup-heading h1{color:#fff2bd;text-shadow:0 3px 18px rgba(213,154,82,.65);font-size:1.25rem;line-height:1.1}
.compact-setup .setup-seat{background:rgba(4,29,24,.94)}
.compact-setup .setup-start{font-size:1.125rem;font-weight:800;letter-spacing:.02em;background:var(--gold-light);color:#112019;border:1px solid var(--gold-light);box-shadow:0 0 22px rgba(241,201,131,.3);min-height:48px}

.actions .table-action-swap,.table-play-confirm .table-action-swap{font:800 1.25rem Georgia,serif;letter-spacing:.3px;background:linear-gradient(110deg,#b8873d,#f9db9b 48%,#e8ba68);color:#241609;border-color:#fff0bc}

.player-hand-stats-screen{position:fixed;inset:0;z-index:2000;background:#05070bf5;overflow-y:auto;padding:20px 12px;color:#fff}.player-hand-stats-screen .match-summary{margin:0 auto;max-width:900px}.player-stat-badge{font-weight:700;font-size:14px}.player-hand-stats-screen .micro{margin:10px 0}.player-hand-stats-screen .score-breakdown-row{font-size:16px}

/* Compact cards keep readable labels across every game mode. */
.small-cards{--card-scale:.6666667;--card-label-scale:.8}
.card-size-toggle{margin-right:auto;border:1px solid var(--blue);border-radius:12px;background:#0003;color:var(--ink);font:600 .875rem/1.2 system-ui,sans-serif;padding:7px 10px;min-height:32px;cursor:pointer}
.card-size-toggle[aria-pressed=true]{border-color:var(--gold-light);color:var(--gold-light);background:#f1c98315}
.small-cards .card:not(:where(#remote-move *)){padding:1px;border-radius:5px}
.small-cards .card:not(:where(#remote-move *)):not(.joker):not(.back):not(.empty-pile){gap:0}
.small-cards .card:not(:where(#remote-move *)):not(.joker):not(.back):not(.empty-pile)>span:first-child,.small-cards .card:not(:where(#remote-move *)) .suit{line-height:1}
.small-cards .card:not(:where(#remote-move *)).joker{padding:1px 0;gap:0}
.small-cards .joker-label:not(:where(#remote-move *)){--card-label-scale:.72;letter-spacing:0}
.small-cards .joker-art:not(:where(#remote-move *)){flex-basis:15px}
.small-cards .combo{min-height:0;padding:5px;gap:3px}

.small-cards .table{min-height:0;grid-template-columns:minmax(0,1fr) minmax(180px,1.35fr) minmax(0,1fr)}
.small-cards .piles{min-height:84px;gap:12px}
.small-cards .piles.hand-piles{min-height:0}
.small-cards .hand-wrap .your-cards{min-height:78px;gap:5px}
.small-cards .bot-played-cards:not(:where(#remote-move *)){min-height:52px}
@media(max-width:780px){.small-cards .table{grid-template-columns:minmax(0,1fr)}}
@media(max-width:520px){.small-cards .combo .card:not(:first-of-type){margin-left:-14px}}
.small-cards .swap-picker-grid{grid-template-columns:repeat(var(--swap-cols,4),calc(var(--swap-size,56px)*var(--card-scale)));grid-auto-rows:calc(var(--swap-size,56px)*78/56*var(--card-scale))}

.joker-rule-setup{margin:16px 0;padding:12px;border:1px solid var(--blue);border-radius:12px}.joker-rule-setup label{display:block;margin-bottom:6px}.joker-rule-setup select{width:100%;font:inherit;min-height:44px}.joker-rule-setup .help{margin-bottom:0}.pinned-joker-rule{font-size:.875rem;color:var(--muted);margin-top:5px}.pinned-joker-rule strong{color:var(--gold-light)}

.joker-rule-option{display:flex!important;align-items:flex-start;gap:10px;padding:10px 0;cursor:pointer}.joker-rule-option input{width:20px;height:20px;flex:none;margin-top:3px}.joker-rule-option .help{display:block;font-weight:400;margin-top:4px}.joker-rule-option strong{color:var(--gold-light)}

/* Two-row pinned essentials; table controls scroll normally. */
.live-status.compact-live{display:block;padding:calc(5px + env(safe-area-inset-top)) 10px 6px;border-radius:12px;margin-bottom:8px}
.compact-live-turn{display:flex;align-items:center;gap:8px}
.compact-live-turn img{width:32px;height:32px;flex:none}
.compact-live-turn>div{display:flex;flex-wrap:wrap;align-items:baseline;gap:2px 8px;min-width:0}
.compact-live-turn strong{font-size:1rem;white-space:normal;overflow-wrap:anywhere;line-height:1.2}
.compact-live-turn span{font-size:.875rem;line-height:1.2;color:var(--muted)}
.compact-live .gold{color:var(--gold-light)}.compact-live .blue{color:#8fd4cc}
.compact-live-bottom{display:flex;align-items:center;gap:14px;margin-top:4px;font-size:.875rem;line-height:1.2}
.compact-live-bottom b{font:700 1.125rem Georgia,serif}
.compact-live-bottom button{margin-left:auto;border:0;background:none;color:var(--muted);font:inherit;padding:5px 0;text-decoration:underline;text-underline-offset:3px;cursor:pointer}
.table-tools{display:flex;flex-wrap:wrap;align-items:center;gap:2px 12px;padding:5px 10px;margin-bottom:10px;border:1px solid var(--line);border-radius:10px;background:#0003;font-size:.875rem;color:var(--muted)}
.table-tools strong{color:var(--gold-light)}.table-tools .card-size-toggle{margin-right:0}.table-tools #rules-button{font-size:.875rem;min-height:32px;padding:6px 10px}

.compact-live-bottom{gap:8px}.pinned-next{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--muted)}.compact-live-bottom>span:not(.pinned-next),.compact-live-bottom button{flex:none;white-space:nowrap}.compact-live-bottom button{margin-left:0}
.turn-alerts{margin-top:16px;text-align:left}.turn-alerts>strong{color:#f1c983}.turn-alerts .help{margin:10px 0}.turn-alerts .btn{font-size:1rem}

/* Full extension snapshots retain the hand selection designation. */
.bot-played-cards{flex-wrap:wrap;max-width:100%;row-gap:20px;padding-top:10px}
.bot-played-cards .card.selected{transform:translateY(-10px);outline:3px solid var(--gold-light)}

/* First stage: continuously collapse only action rows, preserving card layout. */
.hand-rows-slot{position:relative;margin-top:14px;overflow-anchor:none}
.hand-rows-slot .hand-wrap{margin-top:0}
.hand-wrap.hand-rows-docked{position:fixed;bottom:0;z-index:14;box-sizing:border-box;background:var(--felt-deep,#07171d);box-shadow:0 -8px 24px #0009}
.hand-rows-slot .actions{overflow:hidden;align-content:start;flex-shrink:0}
.hand-rows-slot .actions .btn{flex-shrink:0}
.hand-rows-slot .actions.table-play-actions{grid-auto-rows:max-content}

.hand-rows-slot .hand-team-line,.hand-rows-slot .hand-label-row{overflow:hidden;min-height:0;box-sizing:border-box;flex-shrink:0}
.hand-rows-slot .hand-head{min-height:0}

.hand-card-tray{position:relative;transition:height .18s ease;overflow:hidden}
.hand-card-tray .your-cards.hand-single-row{flex-wrap:nowrap;overflow-x:auto;overscroll-behavior-x:contain;min-height:0;padding-left:20px;padding-right:20px}
.hand-card-tray .hand-single-row .card{flex-shrink:0}
.hand-card-arrow{position:absolute;top:35%;z-index:2;border:1px solid var(--gold-light);border-radius:50%;background:#07171de8;color:var(--gold-light);width:25px;height:32px;font-size:25px;line-height:24px;padding:0;cursor:pointer}
.hand-card-arrow.left{left:0}.hand-card-arrow.right{right:0}.hand-card-arrow[hidden]{display:none}
@media(prefers-reduced-motion:reduce){.hand-card-tray{transition:none}}

.hand-wrap.hand-cards-only{padding-top:4px;padding-bottom:4px}
.hand-cards-only .hand-card-tray .your-cards.hand-single-row{padding-top:12px;padding-bottom:6px}
.hand-cards-only .your-cards .card.selected{transform:translateY(-4px)}

button.draw-pile{display:flex;flex-direction:column;align-items:center;gap:2px;border:2px solid transparent;border-radius:12px;background:transparent;padding:5px;color:var(--muted);font:inherit;font-size:.78rem;cursor:pointer}
button.draw-pile.chosen{border-color:var(--gold-light);background:#e8c46a18}
button.draw-pile:disabled{cursor:default;opacity:1}
.draw-pile .card{pointer-events:none}
.pile-draw-button{flex:0 0 auto;min-width:68px;padding:10px 12px}
.hand-piles{gap:10px}

/* Keep the scrolling viewport strictly between the arrow spaces. */
.hand-card-tray .your-cards.hand-single-row{box-sizing:border-box;width:calc(100% - 64px);margin-left:32px;margin-right:32px;padding-left:4px;padding-right:4px}

/* Compact draw tray: tighter vertical rhythm and team-color selection frames. */
.hand-wrap:has(>.hand-piles){padding-top:8px}
.piles.hand-piles{padding-top:0;padding-bottom:6px;margin-bottom:6px}
.hand-piles button.draw-pile{padding:3px 5px;gap:0;border-color:rgba(143,212,204,.42);background:linear-gradient(145deg,rgba(143,212,204,.07),rgba(7,23,29,.25));box-shadow:inset 0 1px 0 rgba(143,212,204,.12)}
.hand-piles button.draw-pile .card{margin-bottom:3px}
.hand-piles button.draw-pile.chosen{border-color:var(--gold-light);background:linear-gradient(145deg,rgba(232,196,106,.17),rgba(232,196,106,.04));box-shadow:0 0 0 1px rgba(232,196,106,.22)}

.hand-piles button.draw-pile{position:relative}
.hand-piles button.draw-pile .card{margin-bottom:0}
.stock-count-badge{position:absolute;top:1px;right:1px;min-width:20px;padding:1px 4px;border:1px solid var(--gold-light);border-radius:10px;background:#07171d;color:var(--gold-light);font:700 11px/16px system-ui,sans-serif;pointer-events:none}

.hand-piles .pile-draw-button{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:46px;padding:10px 16px;border:2px solid #8fd4cc;border-radius:999px;background:linear-gradient(135deg,#f9db9b,#e8c46a 55%,#c69343);color:#14201c;font-weight:850;box-shadow:inset 0 1px 0 #fff8,0 2px 4px #0005;transition:box-shadow .15s ease,transform .1s ease}
.draw-card-icon{position:relative;display:inline-block;width:13px;height:18px;border:1.5px solid currentColor;border-radius:3px;transform:rotate(8deg)}
.draw-card-icon:before{content:'';position:absolute;inset:1px 3px -3px -4px;border:1.5px solid currentColor;border-radius:3px;background:#edcd77;z-index:-1;transform:rotate(-16deg)}
.hand-piles:has(.draw-pile.chosen) .pile-draw-button{box-shadow:inset 0 1px 0 #fff9,0 0 10px #e8c46a55,0 0 0 2px #e8c46a22}
.hand-piles .pile-draw-button:active{transform:scale(.96);box-shadow:inset 0 2px 4px #0003}
@media(prefers-reduced-motion:reduce){.hand-piles .pile-draw-button{transition:none}}

.actions.finish-actions .btn,.start-two-button,.actions.table-play-actions [data-move="play-table"],.table-play-confirm #table-play-yes.table-action:not(.table-action-swap){box-sizing:border-box;min-height:48px;height:48px;max-height:48px;border-radius:24px;display:flex;align-items:center;justify-content:center;gap:10px;padding:4px 12px;font:800 1.4rem Georgia,serif;letter-spacing:.4px;transition:transform .1s ease,box-shadow .15s ease}
.start-two-button{border:2px solid var(--gold-light);background:linear-gradient(135deg,#163c3c,#092025);color:var(--gold-light);box-shadow:inset 0 1px 0 #8fd4cc33}
.actions.table-play-actions [data-move="play-table"],.table-play-confirm #table-play-yes.table-action:not(.table-action-swap){border:2px solid #8fd4cc;background:linear-gradient(135deg,#f9db9b,#e8c46a 55%,#c69343);color:#14201c;box-shadow:inset 0 1px 0 #fff8,0 2px 4px #0005}
.start-two-button:before{content:'';width:15px;height:20px;border:1.5px solid currentColor;border-radius:3px;box-shadow:4px 3px 0 -1px #15383a,4px 3px 0 0 currentColor;transform:rotate(-8deg)}
.start-two-button:active,.actions.table-play-actions [data-move="play-table"]:active{transform:scale(.97)}
@media(prefers-reduced-motion:reduce){.start-two-button,.actions.table-play-actions [data-move="play-table"]{transition:none}}

.actions.finish-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:stretch}
.actions.finish-actions .btn{min-width:0;width:100%;white-space:nowrap}

.table-tools .table-rule-button{font:inherit;line-height:1.15;color:var(--muted);background:transparent;border:0;border-radius:4px;padding:2px 0;min-height:26px;text-align:left;cursor:pointer}
.table-tools .table-rule-button strong{text-decoration:underline;text-decoration-style:dotted;text-underline-offset:3px}
.table-tools .table-rule-button:focus-visible{outline:2px solid var(--gold-light);outline-offset:3px}


.combo{position:relative}
.combo .starter-exposure-badge{position:static;flex:0 0 22px;align-self:center;display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;min-width:22px;margin-left:4px;padding:0;border-radius:50%;border-color:currentColor;background:#07171d;color:var(--gold-light);font:700 12px/1 system-ui,sans-serif;transform:none}
.combo-frame-blue .starter-exposure-badge{color:#8fd4cc}

.card.joker.joker-black,.card.joker.joker-black .joker-rank{color:#171b17}
.card.joker.joker-black .joker-art{filter:grayscale(1)}
/* Match table-card overlap when the hand condenses into a scrolling row. */
.hand-card-tray .your-cards.hand-single-row.hand-overlap .card:not(:first-of-type){margin-left:-22px}
.small-cards .hand-card-tray .your-cards.hand-single-row.hand-overlap .card:not(:first-of-type){margin-left:-14px}
.hand-card-tray .your-cards.hand-single-row .card.selected{z-index:2}
/* Prevent accidental long-press text selection on game surfaces. */
.card,.btn,button,.table,.hand-wrap,.live-status,.table-tools,.phasebar{
  -webkit-user-select:none;user-select:none;-webkit-touch-callout:none;
}
input,textarea,[contenteditable="true"],.support-content,.rules,.news-article{
  -webkit-user-select:text;user-select:text;-webkit-touch-callout:default;
}
.support-content .btn,.support-content button,.support-content .card{
  -webkit-user-select:none;user-select:none;-webkit-touch-callout:none;
}
.comment-composer{margin-top:10px}.comment-input-label{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
.comment-compose-row{display:flex;gap:8px;align-items:stretch}.comment-compose-row input{flex:1;min-width:0;width:0;margin:0;min-height:44px;font-size:16px}.comment-compose-row .btn{flex:none;min-height:44px;padding:8px 16px;background:var(--gold-light);color:var(--felt-deep)}
.comment-composer small{display:block;text-align:right;color:var(--muted);margin-top:4px}.comment-composer small[hidden]{display:none}.comment-line{overflow-wrap:anywhere}
.new-comment-notice{position:fixed;top:calc(env(safe-area-inset-top) + 8px);left:50%;transform:translateX(-50%);z-index:10000;max-width:calc(100vw - 24px);box-sizing:border-box;padding:8px 14px;border:1px solid currentColor;border-radius:20px;background:rgba(5,15,17,.96);box-shadow:0 4px 16px #0008;font-size:.875rem;line-height:1.3;text-align:center;overflow-wrap:anywhere;pointer-events:none;user-select:none;-webkit-user-select:none;opacity:1;transition:opacity .3s ease}
.new-comment-notice.gold{color:var(--gold-light)}.new-comment-notice.blue{color:#9bddd6}.new-comment-notice.fading{opacity:0}
@media(prefers-reduced-motion:reduce){.new-comment-notice{transition:none}}
.actions .btn[data-move="pass"]:disabled{background:#252a2b;color:#8b9294;border-color:#51595c;box-shadow:none;opacity:1;filter:none}
.new-comment-notice{width:max-content;max-width:min(440px,calc(100vw - 24px));border-radius:14px}
.new-comment-notice strong{display:block;font-size:.78rem;margin-bottom:4px}.new-comment-text{display:block;color:var(--ink);white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.4}
.actions.table-play-actions #start-swap,.actions.table-play-actions [data-move="finish"]{box-sizing:border-box;min-height:48px;height:48px;max-height:48px;border-radius:24px;display:flex;align-items:center;justify-content:center;padding:4px 12px}
.bot-cover-badge{display:inline-block!important;vertical-align:middle;margin-left:5px;padding:1px 5px;border:1px solid #829b9b66;border-radius:8px;color:var(--muted);font:500 .65rem/1.2 system-ui,sans-serif;letter-spacing:0;white-space:nowrap}
.startup-message-section{margin:14px 0;padding:14px;border:1px solid #8fd4cc55;border-radius:12px;background:#06141988}.startup-message-section h3{margin:0 0 8px;color:var(--gold-light)}.startup-message-section label{display:block;font-size:.875rem;color:var(--muted);margin-bottom:6px}.startup-message-section textarea{box-sizing:border-box;width:100%;font:16px/1.4 system-ui,sans-serif;margin-bottom:8px;padding:10px;border:1px solid #8fd4cc66;border-radius:8px;background:#050e10;color:var(--ink);resize:vertical}.startup-progress-row{display:flex;justify-content:space-between;gap:12px;padding:6px 0;border-top:1px solid #8fd4cc22}.startup-progress h4{margin:12px 0 6px}.startup-progress-row strong{font-size:.875rem}.startup-note-text{white-space:pre-wrap;overflow-wrap:anywhere;max-height:50dvh;overflow:auto;user-select:text;-webkit-user-select:text}

.start-two-button[aria-disabled="true"]{border-color:#62686b;background:#252a2d;color:#969c9f;box-shadow:none;opacity:1;cursor:help;transform:none}
.start-two-button[aria-disabled="true"]:before{box-shadow:4px 3px 0 -1px #252a2d,4px 3px 0 0 currentColor}

.table-tools{display:grid;grid-template-columns:auto minmax(0,1fr) 32px;gap:0 12px}.table-tools #joker-rule-review{grid-column:2;grid-row:1}.table-tools #starter-exposure-review{grid-column:1 / 3;grid-row:2}.table-tools #card-size-toggle{grid-column:3;grid-row:1 / 3;justify-self:end;align-self:center;display:grid;place-items:center;width:32px;height:32px;min-height:32px;padding:4px;border-radius:8px}

.compact-live-bottom #player-status-button{display:inline-flex;align-items:center;justify-content:center;width:40px;min-width:40px;min-height:36px;padding:4px;flex:none;text-decoration:none;border-radius:8px;color:var(--gold-light)}
.compact-live-bottom #player-status-button:focus-visible{outline:2px solid var(--gold-light);outline-offset:2px}

.hand-label-row .secret-pass-indicator{display:inline-flex;align-items:center;justify-content:center;min-width:36px;padding:4px 6px;color:var(--gold-light);border-color:var(--gold-light)}
.hand-label-row .secret-pass-indicator.used,.hand-label-row .secret-pass-indicator.unavailable{color:#969c9f;border-color:#62686b;background:#252a2d}

/* The compact hand identifies a passed card by its blue outline only. */
.hand-cards-only .card.passed-card::after,.hand-cards-only .card.drawn-card::after{content:none;display:none}

.hand-label-row #turn-help-button{display:inline-flex;align-items:center;justify-content:center;min-width:36px;padding:4px 6px}
.hand-label-row #turn-help-button .hand-help-question{font-size:1.2rem;line-height:1;color:var(--gold-light)}

/* Let the larger player icon share both banner rows, reducing row height. */
.live-status.compact-live{padding:calc(4px + env(safe-area-inset-top)) 54px 4px 8px}
.compact-live-turn{gap:6px}
.compact-live-turn>div{gap:1px 6px}
.compact-live-bottom{gap:6px;margin-top:2px;min-height:22px}
.compact-live-bottom #player-status-button{position:absolute;right:6px;top:calc(50% + env(safe-area-inset-top)/2);transform:translateY(-50%);width:44px;min-width:44px;height:44px;min-height:44px;padding:4px;box-sizing:border-box}
.compact-live-bottom #player-status-button svg{width:34px;height:32px}

/* Keep filtered Joker art and identity text beneath the next overlapping card. */
.combo .card{position:relative;isolation:isolate;overflow:hidden}

.hand-label-row #hand-sort-toggle{display:inline-flex;align-items:center;justify-content:center;min-width:36px;padding:4px 6px;color:var(--gold-light)}
.hand-sort-icon{position:relative;display:block;width:25px;height:22px;font:700 18px/1 Georgia,serif}
.hand-sort-icon>span{position:absolute;top:0;left:2px}
.hand-sort-icon>span+span{top:6px;left:12px;text-shadow:-1px 0 var(--felt-deep,#07171d)}

/* Reserve one logo column across both rows without increasing banner height. */
.live-status.compact-live{padding-left:58px}
.compact-live-turn{min-height:32px}
.compact-live-turn img{position:absolute;left:8px;top:calc(50% + env(safe-area-inset-top)/2);transform:translateY(-50%);width:44px;height:44px}

.hand-label-row .start-undo-indicator{display:inline-flex;align-items:center;justify-content:center;min-width:36px;padding:4px 6px;color:var(--gold-light)}
.hand-label-row .start-undo-indicator.used{color:#969c9f;border-color:#62686b;background:#252a2d}

.table-tools{grid-template-columns:auto minmax(0,1fr)}
.hand-label-row #card-size-toggle{display:inline-flex;align-items:center;justify-content:center;min-width:36px;padding:4px 6px;color:var(--gold-light);margin-left:0}

/* A light rule strip beneath the main pinned banner. */
.table-tools{grid-template-columns:auto minmax(0,1fr);gap:0 10px;padding:3px 9px;margin-bottom:8px;border:1px solid rgba(241,201,131,.35);border-radius:8px;background:rgba(0,0,0,.16);box-shadow:none;font-size:.8125rem;line-height:1.2}
.table-tools>span{font-weight:600;color:var(--gold-light);white-space:nowrap}
.table-tools #joker-rule-review{justify-self:end;text-align:right}
.table-tools #starter-exposure-review{justify-self:end;text-align:right}
.table-tools .table-rule-button{min-height:26px;padding:2px 0;line-height:1.2}
.table-tools .table-rule-button strong{font-weight:600;text-decoration:underline;text-decoration-style:dotted;text-underline-offset:3px;text-decoration-color:rgba(241,201,131,.65)}

.table .exposed-starters-zone{padding:0;border:2px solid transparent;border-radius:12px;overflow:hidden;background:linear-gradient(#050505,#050505) padding-box,linear-gradient(90deg,var(--gold-light) 0%,var(--gold-light) var(--exposed-gold-end,47%),#5fa8a0 var(--exposed-blue-start,53%),#5fa8a0 100%) border-box;min-height:0;box-shadow:none}
.exposed-starters-heading{position:relative;display:flex;align-items:center;gap:8px;width:100%;min-height:44px;padding:10px 12px;border:0;background:#101d1b;color:var(--ink);font:600 .875rem/1.2 system-ui,sans-serif;text-align:left;text-transform:uppercase;letter-spacing:.06em;cursor:pointer}
.exposed-starters-heading:after{content:none}
.exposed-starters-heading svg{flex:none;color:var(--gold-light)}
.exposed-info-mark{margin-left:auto;color:#8fd4cc;font-size:1rem}
.exposed-starters-zone .combos{padding:10px;gap:9px}
.exposed-empty .exposed-starters-heading{text-transform:none;letter-spacing:0;color:var(--muted)}
.exposed-starters-heading:focus-visible{outline:2px solid var(--gold-light);outline-offset:-4px}

/* Keep Safari text inflation from enlarging compact cards in sparse solo hands. */
.card{-webkit-text-size-adjust:none;text-size-adjust:none}

/* Move replays and reward cards always use the normal responsive card size. */
#remote-move{--card-scale:1;--card-label-scale:1}

/* Keep live move cards and every earned badge within the mobile frame. */
#remote-move.bot-overlay{height:100dvh;min-height:0;grid-template-rows:minmax(0,1fr);padding:12px}
#remote-move .bot-action{height:100%;max-height:100%;min-width:0;padding:clamp(12px,2dvh,24px) 16px;overflow-x:hidden;overflow-y:auto}
#remote-move .bot-action>*{flex-shrink:0;max-width:100%}
#remote-move .bot-pulse{width:48px;height:48px;margin:0 auto 8px}
#remote-move .bot-action .micro{margin:6px 0;font-size:.875rem;overflow-wrap:anywhere}
#remote-move .bot-remaining{margin:4px 0 8px;flex-wrap:wrap}
#remote-move .bot-action h2{margin:6px 0;font-size:clamp(1.4rem,5vw,2rem);line-height:1.12;overflow-wrap:anywhere}
#remote-move .bot-played-cards{width:100%;flex-wrap:wrap;gap:9px;margin:12px 0;min-height:78px;padding:4px}
#remote-move .bot-action>p:not(.micro){margin:6px 0;font-size:1rem;line-height:1.3;overflow-wrap:anywhere}
#remote-move .bot-reward-stamps{width:100%;min-height:0;gap:8px;margin-top:10px;padding:8px 4px 12px}
#remote-move .bot-reward-stamp{min-height:40px;max-width:100%;padding:8px 10px;font-size:clamp(.875rem,3.5vw,1.1rem);overflow-wrap:anywhere}
#remote-move .celebration-cards{flex-wrap:wrap;max-width:100%}
#remote-move.bonus-overlay{overflow-y:auto}

.table-tools #final-turns-review{grid-column:1 / 3;grid-row:3;justify-self:end}

/* Compact host setup: choices stay visible, explanations open on demand. */
.setup-section-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:16px 0 8px}.setup-section-heading h2{margin:0;font:700 1rem/1.25 system-ui;color:var(--gold-light)}.setup-section-heading>span{font-size:.875rem;color:var(--muted)}
.setup-links{margin:8px 0 14px}.setup-link-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.setup-link-card{padding:12px;border:1px solid var(--gold-light);border-radius:14px;background:linear-gradient(135deg,#d59a521c,#061419)}.setup-link-card h3{font:800 1.1rem/1.2 system-ui;margin:4px 0 10px;color:var(--gold-light)}.setup-link-card .micro{font-size:.75rem;letter-spacing:0;text-transform:none}.setup-link-card>div{display:flex;gap:6px}.setup-link-card .btn{flex:1;padding:7px 8px;min-height:40px;font-size:.875rem}.setup-link-card.invite-link{border-color:#74c8bf;background:linear-gradient(135deg,#5fa8a02b,#061419)}.invite-link h3{color:#8fd4cc}.invite-link .btn:not(.secondary){background:#8fd4cc;color:#071a16;border-color:#8fd4cc}.setup-links-help{width:30px;height:30px;border:1px solid var(--gold-light);border-radius:50%;color:var(--gold-light);background:#0003;font:700 1rem system-ui}
.setup-rules{margin:14px 0}.setup-rule-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.3fr) 22px;align-items:center;gap:8px;width:100%;text-align:left;padding:12px;border:1px solid var(--line);background:#061419;border-radius:11px;color:var(--ink);font:400 .95rem/1.3 system-ui;margin:6px 0;min-height:48px}.setup-rule-row strong{text-align:right;color:var(--gold-light);font-size:.95rem}.setup-rule-row.needs-choice{border-color:var(--gold-light)}.setup-rule-info{color:var(--gold-light);font-weight:800;text-align:center}.setup-host-message{border:1px solid var(--line);border-radius:11px;margin:12px 0;padding:10px 12px}.setup-host-message>summary{font-size:1rem;font-weight:700;cursor:pointer}.setup-host-message>summary span{float:right;font-size:.875rem;font-weight:400;color:var(--muted)}.setup-host-message .startup-message-section{border:0;padding:0;margin:10px 0 0}.setup-rule-dialog{max-height:calc(100dvh - 32px);overflow:auto}.setup-rule-dialog fieldset{border:0;margin:0;padding:0}.setup-rule-choice{display:flex;gap:12px;align-items:flex-start;text-align:left;padding:13px;margin:10px 0;border:1px solid var(--line);border-radius:12px;background:#071a16}.setup-rule-choice:has(input:checked){border-color:var(--gold-light);background:#d59a521a}.setup-rule-choice input{flex:none;accent-color:var(--gold-light);width:18px;height:18px;margin:3px 0}.setup-rule-choice strong{display:block;color:var(--gold-light);font-size:1.1rem}.setup-rule-choice span span{display:block;font-size:1rem;line-height:1.45;margin-top:4px;color:var(--muted)}.compact-setup .setup-heading img{width:140px}.compact-setup .setup-heading{margin-bottom:10px}
@media(min-width:600px){.lobby-panel .setup-seats{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.lobby-panel .setup-seat{margin:0}}
@media(max-width:360px){.setup-link-card{padding:8px}.setup-link-card h3{font-size:1rem}.setup-link-card .btn{padding:6px}.setup-rule-row{padding:10px;font-size:.875rem}.setup-rule-row strong{font-size:.875rem}}

.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
#setup-rule-dialog{z-index:35}

/* Premium hosting surface; game-table styling remains scoped to play. */
body.setup-mode{background:#030407;color:#f7f0df;--blue:#5fa8a0;--muted:#b8bcc6;--line:#ffffff24}
.setup-mode #online-app{max-width:760px;margin:0 auto}
.premium-setup.compact-setup{background:linear-gradient(160deg,#15171e 0%,#08090d 35%,#040507 100%);border:1px solid #d59a5280;border-top:3px solid #f1c983;border-radius:22px;padding:18px;box-shadow:0 0 36px #d59a5215,0 18px 45px #0008;isolation:isolate}
.premium-setup .setup-heading{justify-content:flex-start;gap:16px;padding:0 0 16px;margin:0 0 6px;border-bottom:1px solid #f1c98335;text-align:left}.premium-setup.compact-setup .setup-heading img{width:76px;height:76px;max-width:none;flex:none}.setup-brand-name{font:800 .75rem/1.2 system-ui;letter-spacing:.18em;color:#f1c983;margin:0 0 7px}.premium-setup.compact-setup .setup-heading h1{font:700 clamp(1.35rem,5.5vw,1.8rem)/1.15 Georgia,serif;text-shadow:none;color:#fff1cb;margin:0}
.premium-setup .setup-section-heading{margin:15px 0 8px}.premium-setup .setup-section-heading h2{color:#f1c983;font-size:.95rem;letter-spacing:.03em}
.premium-setup.compact-setup .setup-seat{background:#0d0f15;border-color:#d59a5270;box-shadow:inset 3px 0 #f1c983}.premium-setup .setup-seat.blue{background:#0d0f15;border-color:#5fa8a070;box-shadow:inset 3px 0 #5fa8a0}.premium-setup .setup-seat.blue .setup-seat-label,.premium-setup .setup-seat.blue .setup-player-name{color:#8fd4cc}.premium-setup .setup-seat select{background:#07090e;color:#f7f0df;border:1px solid #ffffff35}.premium-setup .setup-seat select.red{color:#ffc6c6;border-color:#cf6b6b}.premium-setup .setup-seat select.green{color:#f7f0df;border-color:#ffffff35}
.premium-setup .setup-rule-row{background:#0c0e14;border-color:#ffffff22;box-shadow:none}.premium-setup .setup-rule-row:hover,.premium-setup .setup-rule-row:focus-visible{border-color:#f1c983}.premium-setup .setup-rule-row.needs-choice{border-color:#d59a52}
.premium-setup .setup-link-card{background:#0c0e14;border-color:#d59a5280}.premium-setup .setup-link-card.invite-link{background:#0c0e14;border-color:#5fa8a080}.premium-setup .invite-link h3{color:#8fd4cc}.premium-setup .invite-link .btn:not(.secondary){background:linear-gradient(120deg,#418980,#8fd4cc);border-color:#8fd4cc;color:#071f1b}.premium-setup .host-link .btn:not(.secondary){background:linear-gradient(120deg,#b88336,#ffe1a0);color:#211508;border-color:#f1c983}
.setup-mode .btn.secondary{background:#11131a;border-color:#ffffff35;color:#f1e0b5}.premium-setup .setup-host-message{background:#0a0c11;border-color:#ffffff25}.premium-setup .startup-message-section textarea{background:#07090e;border-color:#ffffff40}.premium-setup .setup-start{margin:16px 0 0;min-height:52px;border-radius:14px;border:1px solid #fff0bc;background:linear-gradient(110deg,#b8873d,#ffe6ae 45%,#dca94f);color:#201405;font:800 1.25rem/1.2 Georgia,serif;box-shadow:0 4px 24px #d59a5228}.premium-setup .setup-start:disabled{background:#171921;color:#a5a5af;border-color:#ffffff20;box-shadow:none}.setup-ready-note{margin:8px 0 0;font-size:.875rem;color:#b8bcc6}.setup-ready-note:empty{display:none}
.setup-mode .table-comments{background:#080a0f;border:1px solid #ffffff25;border-radius:18px}.setup-mode .table-comments h3{color:#f1c983}.setup-mode .comment-compose-row input{background:#030507;border-color:#ffffff35}.setup-mode .comment-line.blue{color:#8fd4cc}.setup-mode .invite-controls .help{display:none}
.setup-mode .modal-card{background:#0c0e14;border-color:#d59a5270}.setup-mode .setup-rule-choice{background:#07090e;border-color:#ffffff25}.setup-mode .setup-rule-choice:has(input:checked){background:#d59a5215;border-color:#f1c983}
@media(max-width:360px){.premium-setup.compact-setup{padding:14px}.premium-setup.compact-setup .setup-heading img{width:62px;height:62px}.premium-setup .setup-heading{gap:12px}}

/* Completion lights the setup; unchosen rules remain quiet and tappable. */
.setup-rule-row:not(.needs-choice),.premium-setup .setup-rule-row:not(.needs-choice){background:linear-gradient(115deg,#b8873d,#ffe3a3 48%,#d4a14d);border-color:#fff0bc;color:#251a0a;box-shadow:inset 0 1px #fff5,0 0 16px #d59a5228}
.setup-rule-row:not(.needs-choice) strong,.setup-rule-row:not(.needs-choice) .setup-rule-info{color:#251a0a}
.setup-rule-row.needs-choice,.premium-setup .setup-rule-row.needs-choice{background:#0c0e14;border-color:#ffffff25;color:#b8bcc6;box-shadow:none}
.setup-rule-row.needs-choice strong,.setup-rule-row.needs-choice .setup-rule-info{color:#b8bcc6}
.setup-rule-row.needs-choice:hover,.setup-rule-row.needs-choice:focus-visible,.premium-setup .setup-rule-row.needs-choice:hover,.premium-setup .setup-rule-row.needs-choice:focus-visible{border-color:#f1c983;outline-offset:3px}

/* Keep the same two pinned rows; use one scrolling row for match rules. */
.compact-live-bottom .pinned-hand{flex:none;color:var(--muted);font-size:.875rem;white-space:nowrap;font-variant-numeric:tabular-nums}
.compact-live-bottom{flex-wrap:nowrap}
.table-tools.match-rules-row{display:block;padding:0;grid-template-columns:none}
.match-rules-row #match-rules-review{display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;min-height:32px;margin:0;padding:5px 10px;border:0;border-radius:8px;background:transparent;color:var(--gold-light);font:600 .875rem/1.2 system-ui,sans-serif;cursor:pointer;white-space:nowrap}
.match-rules-row #match-rules-review:hover{background:#8fd4cc12}
.match-rules-card{max-height:calc(100dvh - 32px);overflow:auto}
.match-rule-detail{border:1px solid var(--line);border-radius:10px;margin:10px 0;padding:10px 12px}
.match-rule-detail summary{display:flex;align-items:center;justify-content:space-between;gap:12px;cursor:pointer;font-size:1rem;line-height:1.3}
.match-rule-detail summary strong{color:var(--blue);text-align:right}
.match-rule-detail .help{margin-bottom:0;font-size:1rem}

.card.passed-card::after{transition:opacity .35s ease}
.card.passed-card.pass-label-hidden::after{opacity:0;pointer-events:none}

/* A shared celebration, with the actual final-turn rule carried by the event. */
#remote-move.going-out-overlay{overflow:auto;background:radial-gradient(ellipse at center,#1d3e3be6,#000e)}
.going-out-panel{position:relative;isolation:isolate;width:min(560px,100%);margin:auto;overflow:hidden;text-align:center;border:2px solid var(--gold-light);border-radius:24px;background:linear-gradient(150deg,#153731,#080e12);padding:24px 18px;box-shadow:0 0 70px color-mix(in srgb,var(--gold-light) 25%,transparent);animation:finale-arrive .65s cubic-bezier(.2,.9,.3,1) both}
.going-out-panel.bot-team-blue{border-color:#5FA8A0;box-shadow:0 0 70px #5FA8A050}.going-out-panel .mark{width:72px;height:72px}.going-out-panel h2{font-size:clamp(1.8rem,6vw,2.7rem);margin:12px 0;overflow-wrap:anywhere}.finale-rule{font-weight:900;font-size:clamp(1.3rem,5vw,2rem);color:var(--gold-light);letter-spacing:.04em;animation:finale-arrive .6s .45s both}.bot-team-blue .finale-rule{color:#5FA8A0}.finale-detail{position:relative;z-index:2;font-size:1rem;line-height:1.45;margin:18px 0 0}.final-race{margin:22px 0 12px;border:1px solid #ffffff45;border-radius:14px;overflow:hidden}.race-lane{position:relative;height:65px;border-bottom:1px dashed #ffffff50;background:color-mix(in srgb,var(--gold-light) 8%,transparent);color:var(--gold-light)}.race-lane:last-child{border-bottom:0}.race-lane.lane-blue{background:#5FA8A015;color:#5FA8A0}.race-name{position:absolute;top:5px;left:12px;font-size:.875rem;font-weight:700;max-width:75%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.race-runner{position:absolute;left:12%;top:24px;font-size:1.65rem;animation:final-lap-run 3.5s calc(.7s + var(--lane)*.18s) ease-in-out both}.race-finish{position:absolute;right:6%;top:0;bottom:0;width:13px;background:conic-gradient(#fff 25%,#13221e 0 50%,#fff 0 75%,#13221e 0) 0 0/12px 12px;opacity:.8}.partner-finale{margin-top:22px}.partner-spotlight{display:grid;gap:7px;padding:18px;border:1px solid var(--gold-light);border-radius:16px;background:color-mix(in srgb,var(--gold-light) 11%,transparent);animation:finale-arrive .7s .7s both}.bot-team-blue .partner-spotlight{border-color:#5FA8A0;background:#5FA8A01c}.partner-spotlight>span:first-child{font-size:2rem;color:var(--gold-light)}.partner-spotlight strong{font-size:1.5rem;overflow-wrap:anywhere}.partner-spotlight>span:last-child{font-weight:800;font-size:.875rem;letter-spacing:.12em}.opponents-out{position:relative;display:grid;gap:6px;padding:14px;margin-top:12px;border-radius:12px;border:1px solid #ffffff30;color:#c4cecc;animation:opponents-sit 1s 1.3s both}.closed-turn{display:inline-block;color:#f5edda;border:2px solid #f5edda80;border-radius:6px;padding:6px;margin:6px auto 0;font-weight:900;font-size:1rem;transform:rotate(-5deg);animation:finale-arrive .4s 1.65s both}.go-out-confetti{position:absolute;inset:0;pointer-events:none;z-index:4;overflow:hidden}.go-out-confetti i{position:absolute;left:var(--x);top:42%;width:9px;height:16px;background:var(--gold-light);opacity:0;animation:snatch-confetti 3.7s calc(1.65s + var(--delay)) ease-out both}.go-out-confetti i:nth-child(even){background:#5FA8A0}.go-out-confetti i:nth-child(3n){border-radius:50%;height:9px}.snatcharama-shout{position:absolute;z-index:5;left:3%;right:3%;top:42%;padding:16px 6px;border-radius:12px;border:2px solid #5FA8A0;background:#091d19f5;color:var(--gold-light);font-size:clamp(1.4rem,6vw,2.5rem);font-weight:1000;text-shadow:2px 2px #000;pointer-events:none;animation:snatch-shout 3s 1.65s both}
@keyframes finale-arrive{from{opacity:0;transform:translateY(22px) scale(.8)}to{opacity:1;transform:translateY(0) scale(1)}}
@keyframes final-lap-run{0%{left:12%;transform:translateY(0) rotate(-5deg) scaleX(-1)}20%,40%,60%,80%{transform:translateY(-5px) rotate(5deg) scaleX(-1)}30%,50%,70%,90%{transform:translateY(0) rotate(-5deg) scaleX(-1)}100%{left:84%;transform:translateY(0) scaleX(-1)}}
@keyframes opponents-sit{from{opacity:1;transform:scale(1)}to{opacity:.65;transform:scale(.96)}}
@keyframes snatch-confetti{0%{opacity:0;transform:translate(0,0) rotate(0)}8%{opacity:1}35%{transform:translate(calc(var(--drift)*.6),-160px) rotate(180deg)}85%{opacity:1}100%{opacity:0;transform:translate(var(--drift),440px) rotate(var(--spin))}}
@keyframes snatch-shout{0%{opacity:0;transform:scale(.3) rotate(-8deg)}15%,75%{opacity:1;transform:scale(1) rotate(-3deg)}100%{opacity:0;transform:scale(1.06)}}
@media(prefers-reduced-motion:reduce){.going-out-panel,.finale-rule,.race-runner,.partner-spotlight,.opponents-out,.closed-turn{animation:none}.race-runner{left:72%}.go-out-confetti{display:none}.snatcharama-shout{animation:none;position:relative;top:auto;left:auto;right:auto;font-size:1.4rem;margin-top:16px;transform:none}}
@media(max-height:650px){.going-out-panel{padding:14px}.going-out-panel .mark{width:46px;height:46px}.going-out-panel h2{margin:8px 0}.final-race{margin-top:14px}.race-lane{height:55px}.race-runner{top:18px}.partner-spotlight{padding:12px}.finale-detail{margin-top:12px}}

.secret-pass-overlay{background:radial-gradient(ellipse at center,#214640e8,#000e);perspective:900px;overflow:auto}.secret-pass-panel{--coin-color:#D59A52;position:relative;width:min(450px,94vw);margin:auto;text-align:center;padding:26px 18px;border:2px solid var(--coin-color);border-radius:24px;background:linear-gradient(145deg,#15342e,#070c0e);box-shadow:0 0 65px #D59A5235;animation:finale-arrive .45s both}.pass-team-blue .secret-pass-panel{--coin-color:#5FA8A0;box-shadow:0 0 65px #5FA8A040}.secret-pass-panel h2{color:var(--coin-color);font-size:clamp(2rem,9vw,3.2rem);margin:10px 0;font-weight:900}.secret-pass-panel>p{line-height:1.5;overflow-wrap:anywhere}.secret-pass-flight{position:relative;height:190px;perspective:850px;margin:12px auto;width:100%}.secret-pass-coin{position:absolute;width:138px;height:138px;left:calc(50% - 69px);top:14px;transform-style:preserve-3d;animation:pass-coin-flip 2.4s .15s cubic-bezier(.25,.65,.3,1) both}.pass-coin-face{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;border-radius:50%;border:6px solid #111;background:radial-gradient(circle,#0c211d 65%,#030505 66%);box-shadow:inset 0 0 0 2px var(--coin-color),0 2px 0 #333;backface-visibility:hidden;transform:translateZ(1px)}.pass-coin-face img{width:78px;height:78px;object-fit:contain}.pass-coin-face span{font-size:.7rem;font-weight:900;letter-spacing:.07em;color:var(--coin-color)}.pass-coin-back{transform:rotateY(180deg) translateZ(1px)}.pass-coin-shadow{position:absolute;left:calc(50% - 55px);bottom:8px;width:110px;height:14px;border-radius:50%;background:#0009;filter:blur(5px);animation:pass-shadow 2.4s .15s both}.pass-center-note{color:var(--coin-color);font-size:.9rem;font-weight:700;animation:finale-arrive .4s 1.9s both}
@keyframes pass-coin-flip{0%{opacity:0;transform:translateX(-115px) translateY(30px) rotateY(-180deg) rotateZ(-20deg) scale(.65)}15%{opacity:1}40%{transform:translateX(20px) translateY(-22px) rotateY(540deg) rotateZ(10deg) scale(1.12)}75%{transform:translateX(0) translateY(14px) rotateY(1080deg) rotateZ(0) scale(.92)}88%{transform:translateY(7px) rotateY(1080deg) scale(.95)}100%{opacity:1;transform:translateY(14px) rotateY(1080deg) scale(.92)}}
@keyframes pass-shadow{0%{opacity:0;transform:translateX(-110px) scale(.6)}40%{opacity:.4;transform:translateX(20px) scale(.75)}100%{opacity:1;transform:scale(.95)}}
@media(prefers-reduced-motion:reduce){.secret-pass-panel,.secret-pass-coin,.pass-coin-shadow,.pass-center-note{animation:none}}

.saved-host-setup{padding:12px;margin:10px 0 14px;background:#0b1014;border:1px solid #d59a5240;border-radius:12px}.saved-setup-buttons{display:flex;flex-wrap:wrap;gap:8px}.saved-setup-buttons .btn{min-height:40px;padding:8px 12px;font-size:.875rem}.saved-host-setup .help{margin:10px 0 0;font-size:.875rem;line-height:1.45;color:var(--muted)}

/* Passed-card provenance persists through selection until the card leaves the hand. */
.your-cards .card.passed-card.selected{outline:3px solid #79b9df;box-shadow:0 0 0 5px rgba(121,185,223,.18),0 7px 18px rgba(0,0,0,.38)}

.local-hand-actions{position:fixed;z-index:24;bottom:calc(16px + env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);display:flex;gap:10px;max-width:calc(100vw - 24px);padding:10px;background:#071b17f5;border:1px solid #D59A52;border-radius:16px;box-shadow:0 6px 30px #0009}.local-hand-actions .btn:not(.start-two-button){min-height:44px;white-space:nowrap;padding:10px 18px;font-size:1rem}

/* Reserve a footer for availability without covering card identities. */
.combo .starter-available-badge{top:auto;right:auto;bottom:2px;left:50%;transform:translateX(-50%);min-width:0;padding:0 2px;white-space:nowrap;font:400 11px/13px system-ui,sans-serif;color:var(--gold-light);border:0;border-radius:0;background:transparent;text-shadow:none;z-index:2}
.small-cards .combo .starter-available-badge{font-size:10px;line-height:12px}

.race-runner{transform:scaleX(-1)}

/* Ads use 17.5% of available height, 30% shorter than the original quarter. */
#remote-move.with-product-ad,#play-replay.with-product-ad{box-sizing:border-box;--ad-slot-height:160px;height:100dvh;padding:12px 12px max(12px,env(safe-area-inset-bottom));display:grid;grid-template-rows:minmax(0,1fr) var(--ad-slot-height);gap:10px;overflow:hidden;align-items:stretch;justify-items:center}
.with-product-ad .playback-main{width:100%;min-height:0;overflow:auto;display:grid;place-items:center;padding:0 0 2px}
#remote-move.with-product-ad .bot-action{height:auto;min-height:100%;max-height:none;overflow:visible}
#play-replay.with-product-ad .bot-action{max-height:none;margin:0}
#remote-move.with-product-ad .going-out-panel,#remote-move.with-product-ad .secret-pass-panel{margin:auto}
.playback-product-ad{box-sizing:border-box;width:min(720px,100%);min-height:0;display:flex;flex-direction:column;gap:5px;padding:8px;background:#02090d;border:1px solid #D59A5270;border-radius:12px;overflow:hidden}
.product-ad-label{flex:none;color:var(--gold-light);font:700 .875rem/1.2 system-ui;text-align:center}
.product-ad-link{box-sizing:border-box;display:flex;flex:1 1 0;min-width:0;min-height:0;max-height:100%;align-items:center;justify-content:center;overflow:hidden;color:#f7edda;text-decoration:none;border-radius:7px;background:#030b10}
.product-ad-link img{box-sizing:border-box;display:block;width:100%;height:100%;max-height:100%;object-fit:contain;object-position:center;min-height:0;min-width:0}
.product-ad-concept{gap:12px;padding:6px 10px;text-align:left;background:linear-gradient(125deg,#122b32,#03080e)}
.product-ad-concept img{width:35%;flex:none;object-fit:contain}
.product-ad-copy{display:flex;flex:1;flex-direction:column;gap:3px;min-width:0;min-height:0}
.product-ad-copy strong{font:800 clamp(1rem,3.8vw,1.5rem)/1.15 system-ui;color:var(--gold-light)}
.product-ad-copy span{font:600 .875rem/1.2 system-ui}
.product-ad-copy small{font:.75rem/1.2 system-ui;color:#bac8d5}
.product-ad-link:focus-visible{outline:3px solid var(--gold-light);outline-offset:-3px}
@media(max-height:550px){.playback-product-ad{padding:5px;gap:3px}.product-ad-copy{gap:3px}.product-ad-copy small{display:none}.product-ad-concept{padding:2px 8px}}

/* Fit product copy to the shorter ad slot, including small phones and landscape. */
.playback-product-ad{container-type:size;container-name:playback-ad}
.product-ad-copy strong{font-size:clamp(.875rem,12cqh,1.25rem)}
.product-ad-copy span{font-size:.875rem}
@container playback-ad (max-height:130px){.product-ad-copy small{display:none}.product-ad-copy strong{font-size:1rem}.product-ad-concept{gap:8px;padding:3px 6px}}
@container playback-ad (max-height:95px){.product-ad-copy span{display:none}.product-ad-label{font-size:.75rem}.product-ad-copy strong{font-size:.875rem;line-height:1.1}.product-ad-concept{padding:0 4px}}

.table-product-ad{height:17.5vh;height:17.5dvh;min-height:110px;flex-shrink:0;margin:12px auto;width:min(720px,100%)}

/* Disconnection notices retain status and elapsed time when minimized. */
.replacement-notice>summary{display:flex;align-items:center;gap:10px;cursor:pointer;list-style:none;min-height:36px;font-size:1rem;font-weight:700}
.replacement-notice>summary::-webkit-details-marker{display:none}
.replacement-notice>summary::after{content:'+';flex:none;color:var(--gold);font-size:1.25rem;line-height:1}
.replacement-notice[open]>summary::after{content:'−'}
.replacement-notice-name{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.replacement-notice-timer{flex:none;font-variant-numeric:tabular-nums;color:var(--gold)}
.replacement-notice-body p{margin:8px 0 12px}
.replacement-notice>summary:focus-visible{outline:2px solid var(--gold);outline-offset:3px;border-radius:4px}

/* Keep the overview icon in the upper-right row; give Next the full bottom row. */
.live-status.compact-live{padding-right:8px}
.compact-live-turn{padding-right:40px}
.compact-live-bottom #player-status-button{top:calc(4px + env(safe-area-inset-top));right:6px;transform:none;width:36px;min-width:36px;height:28px;min-height:28px;padding:2px}
.compact-live-bottom #player-status-button svg{width:30px;height:24px}

.new-comment-notice{pointer-events:auto;cursor:pointer;font-family:inherit}.comment-dismiss-hint{display:block;margin-top:4px;font-size:.75rem;opacity:.8}.new-comment-notice:focus-visible{outline:2px solid currentColor;outline-offset:3px}

/* Actual product faces, framed as a sprite without changing the source artwork. */
.pass-coin-face{inset:auto;left:0;top:8px;width:138px;height:118px;border:0;border-radius:50%;background-image:url('./secret-pass-product.png');background-repeat:no-repeat;background-size:416.3px 312.2px;background-position:-63.3px -21.3px;box-shadow:0 5px 3px #0009;overflow:hidden}
.pass-coin-back{background-position:-216.5px -21.3px}
.pass-team-blue .pass-coin-face{top:2px;height:128px;background-size:412px 309px;background-position:-59px -152px}
.pass-team-blue .pass-coin-back{background-position:-214px -152px}

/* Decorative border colors stay fixed regardless of action availability. */
.hand-label-row #card-size-toggle,.hand-label-row #start-undo-button,.hand-label-row #turn-help-button{border:1px solid var(--gold-light)}
.hand-label-row #hand-sort-toggle,.hand-label-row #secret-pass-status{border:1px solid #5FA8A0}

.tabletop-headlines{list-style:none;margin:0;padding:0}.tabletop-headlines li+li{border-top:1px solid var(--line);margin-top:10px;padding-top:10px}.tabletop-headlines a{color:var(--gold-light);font-size:1rem;line-height:1.4}.tabletop-headlines small{display:block;color:var(--muted);font-size:.8rem;margin-top:4px}

.game-news-strip{display:flex;align-items:center;gap:8px;min-height:38px;margin:0 0 10px;padding:3px 8px;border:1px solid #5fa8a060;border-radius:9px;background:#061419;overflow:hidden}.ticker-label{flex:none;color:var(--gold-light);font:700 .75rem/1.2 system-ui}.ticker-window{flex:1;min-width:0;overflow:hidden}.ticker-mover{width:max-content;white-space:nowrap;animation:ticker-travel 25s linear both}.ticker-mover a,.ticker-mover button{color:var(--ink);font:400 .875rem/1.3 system-ui;text-decoration:none;border:0;background:none;padding:4px 0;cursor:pointer}.ticker-mover small{color:var(--muted);font-size:.75rem}.ticker-pause{flex:none;min-width:32px;height:30px;background:none;border:1px solid #5fa8a060;border-radius:6px;color:var(--gold-light);cursor:pointer}.ticker-window:hover .ticker-mover,.ticker-window:focus-within .ticker-mover{animation-play-state:paused!important}@keyframes ticker-travel{from{transform:translateX(var(--ticker-start))}to{transform:translateX(var(--ticker-end))}}@media(prefers-reduced-motion:reduce){.ticker-mover{animation:none;transform:none}.ticker-window{overflow-x:auto}}

/* Alternate games retain the Snatch table, team colors and shared controls. */
.table-game-choice{margin:12px 0}.other-table-games summary{cursor:pointer;font-weight:600;color:var(--gold)}.other-table-games fieldset{border:0;padding:12px 0;display:grid;gap:12px}.other-table-games legend{font-size:14px}.other-table-games label{display:flex;align-items:center;gap:10px;min-height:36px}.other-table-games input{width:20px;height:20px;accent-color:var(--gold)}
.ttt-table{max-width:520px;margin:0 auto 16px}.ttt-heading{display:flex;align-items:center;gap:12px}.ttt-heading .mark{width:54px}.ttt-heading h1{margin:0;font-size:28px}.ttt-scoreboard{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:18px 0}.ttt-team{border:1px solid currentColor;border-radius:12px;padding:12px;display:flex;flex-direction:column;gap:5px;min-width:0}.ttt-team small{overflow-wrap:anywhere;color:var(--muted)}.ttt-status{font-size:20px;font-weight:700;margin:14px 0}.ttt-board{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.ttt-square{aspect-ratio:1;min-width:0;min-height:64px;display:flex;align-items:center;justify-content:center;background:var(--panel);border:1px solid var(--line);border-radius:12px;font:700 clamp(36px,12vw,70px)/1 system-ui,sans-serif;cursor:pointer;touch-action:manipulation}.ttt-square:disabled{opacity:1;cursor:default}.ttt-square:focus-visible{outline:3px solid var(--gold-light);outline-offset:2px}.ttt-square.ttt-win{box-shadow:inset 0 0 0 3px currentColor}.ttt-team.gold,.ttt-square.gold,.ttt-status.gold{color:var(--gold)}.ttt-team.blue,.ttt-square.blue,.ttt-status.blue{color:var(--blue)}

/* Official mat movement uses supplied artwork and public move snapshots. */
.mat-move{position:relative;width:min(100%,320px,40vh);aspect-ratio:1;margin:12px auto 30px;isolation:isolate}
.mat-move>img{display:block;width:100%;height:100%;border-radius:3%;object-fit:contain}
.mat-flying-card{position:absolute;left:var(--from-x);top:var(--from-y);width:8%;height:12%;transform:translate(-50%,-50%);animation:mat-card-travel 1400ms ease-in-out var(--delay) both;z-index:2}
.mat-flying-card .card{width:100%;height:100%;min-width:0;min-height:0;padding:2px;border-radius:3px;font-size:12px;box-shadow:0 2px 5px #0008;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:0}
.mat-flying-card .card-rank,.mat-flying-card .suit{font-size:12px;line-height:1}
.mat-flying-card .joker-label{font-size:5px}.mat-flying-card .joker-art{width:90%;height:60%}.mat-flying-card .joker-rank{font-size:7px}
.mat-card-back{display:flex;width:100%;height:100%;align-items:center;justify-content:center;background:#083c3a;border:1px solid var(--gold);border-radius:3px;box-shadow:0 2px 5px #0008}.mat-card-back img{width:90%;height:auto}
.mat-move figcaption{position:absolute;top:100%;width:100%;padding-top:5px;font-size:14px;line-height:1.2;color:var(--gold)}
@keyframes mat-card-travel{0%,15%{left:var(--from-x);top:var(--from-y)}85%,100%{left:var(--to-x);top:var(--to-y)}}
@media(prefers-reduced-motion:reduce){.mat-flying-card{animation:none;left:var(--to-x);top:var(--to-y)}}
.mat-move{flex:none}
.mat-flying-card .card:not(.joker):not(.back):not(.empty-pile)>span:first-child{font-size:12px;line-height:1}
.mat-swap-natural{animation:mat-card-travel 950ms ease-in-out both}
.mat-swap-joker-direct{animation:mat-card-travel 1150ms ease-in-out 850ms both;z-index:4}
.mat-swap-joker-claim{animation:mat-joker-claim 2400ms ease-in-out both;z-index:4}
.mat-swap-target-card{animation:mat-card-travel 950ms ease-in-out 1450ms both;z-index:3}
@keyframes mat-joker-claim{0%,38%{left:var(--from-x);top:var(--from-y)}56%,62%{left:var(--mid-x);top:var(--mid-y)}92%,100%{left:var(--to-x);top:var(--to-y)}}
@media(prefers-reduced-motion:reduce){.mat-swap-natural,.mat-swap-joker-direct,.mat-swap-joker-claim,.mat-swap-target-card{animation:none;left:var(--to-x);top:var(--to-y)}}

.result-share-card{max-height:90dvh;overflow-y:auto}.result-share-card #result-card-preview img{display:block;width:100%;height:auto;border-radius:12px;margin:12px 0}.result-share-card #result-card-preview{white-space:pre-line}.result-share-card textarea{width:100%;min-height:120px;font-size:16px}.match-summary #share-result{margin-bottom:18px}
.nim-board{display:grid;gap:14px;margin:18px 0}.nim-heap{padding:14px;border:1px solid var(--blue);border-radius:12px;display:flex;align-items:center;flex-wrap:wrap;gap:12px}.nim-heap h2{font-size:16px;margin:0;width:100%}.nim-counters{display:flex;gap:10px;color:var(--gold);font-size:26px;flex:1}.nim-heap label{font-size:16px}.nim-heap select{padding:8px;font-size:16px}.nim-heap button{min-height:44px}
.dots-board{display:grid;grid-template-columns:20px minmax(44px,1fr) 20px minmax(44px,1fr) 20px;grid-template-rows:20px 80px 20px 80px 20px;gap:0;width:min(100%,330px);margin:20px auto;align-items:center;justify-items:center}.dots-dot{font-size:30px;color:var(--gold);line-height:20px}.dots-box{display:flex;align-items:center;justify-content:center;width:100%;height:100%;font-size:28px;font-weight:800}.dots-edge{padding:0;border:0;background:transparent;position:relative;cursor:pointer}.dots-horizontal{width:100%;height:44px}.dots-vertical{width:44px;height:100%}.dots-edge:after{content:'';position:absolute;background:#ffffff30;border-radius:3px}.dots-horizontal:after{height:6px;left:0;right:0;top:19px}.dots-vertical:after{width:6px;top:0;bottom:0;left:19px}.dots-edge.dots-gold:after{background:var(--gold)}.dots-edge.dots-blue:after{background:var(--blue)}.dots-edge:not(:disabled):hover:after{background:var(--gold-light)}.dots-edge:focus-visible{outline:2px solid var(--gold);outline-offset:-2px}
.four-board-wrap{width:min(100%,390px);margin:20px auto}.four-controls,.four-board{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:5px}.four-controls{margin-bottom:7px}.four-controls button{min-width:0;min-height:38px;border:1px solid var(--gold);border-radius:8px;background:#102622;color:var(--gold-light);font-size:22px;cursor:pointer}.four-controls button:disabled{opacity:.3;cursor:default}.four-board{padding:9px;border:2px solid var(--blue);border-radius:14px;background:#071a18}.four-cell{display:block;aspect-ratio:1;border-radius:50%;border:2px solid #ffffff28;background:#03100e;box-shadow:inset 0 2px 6px #0008}.four-cell.gold{border-color:var(--gold);background:radial-gradient(circle at 35% 30%,var(--gold-light),var(--gold) 62%,#765021)}.four-cell.blue{border-color:var(--blue);background:radial-gradient(circle at 35% 30%,#9ddce1,var(--blue) 62%,#01535b)}.four-cell.four-win{box-shadow:0 0 0 3px #fff,inset 0 2px 6px #0008}
.morris-board{position:relative;display:grid;grid-template-columns:repeat(3,58px);grid-template-rows:repeat(3,58px);align-items:center;justify-items:center;justify-content:space-between;align-content:space-between;width:min(78vw,300px);aspect-ratio:1;margin:24px auto;padding:0;border:3px solid color-mix(in srgb,var(--gold) 70%,var(--blue));background:linear-gradient(45deg,transparent calc(50% - 1.5px),#ffffff62 calc(50% - 1.5px),#ffffff62 calc(50% + 1.5px),transparent calc(50% + 1.5px)),linear-gradient(-45deg,transparent calc(50% - 1.5px),#ffffff62 calc(50% - 1.5px),#ffffff62 calc(50% + 1.5px),transparent calc(50% + 1.5px)),linear-gradient(90deg,transparent calc(50% - 1.5px),#ffffff62 calc(50% - 1.5px),#ffffff62 calc(50% + 1.5px),transparent calc(50% + 1.5px)),linear-gradient(0deg,transparent calc(50% - 1.5px),#ffffff62 calc(50% - 1.5px),#ffffff62 calc(50% + 1.5px),transparent calc(50% + 1.5px))}.morris-point{z-index:1;width:48px;height:48px;padding:0;border:3px solid #dfe9e6;border-radius:50%;background:#071a18;color:transparent;cursor:pointer;box-shadow:0 2px 8px #0008}.morris-point.gold,.morris-point.blue{color:currentColor;font-size:34px;line-height:1}.morris-point.gold{border-color:var(--gold);background:var(--gold);color:#fff1cd}.morris-point.blue{border-color:var(--blue);background:var(--blue);color:#d9fbff}.morris-point.selected{outline:4px solid #fff;outline-offset:3px}.morris-point.morris-win{box-shadow:0 0 0 4px #fff,0 2px 8px #0008}.morris-point:disabled{cursor:default;opacity:1}.morris-point.empty:not(:disabled):hover{border-color:var(--gold-light)}
.reversi-board,.checkers-board{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));width:min(92vw,420px);aspect-ratio:1;margin:20px auto;border:3px solid color-mix(in srgb,var(--gold) 55%,var(--blue));border-radius:10px;overflow:hidden;background:#06120f;box-shadow:0 8px 22px #0007}.reversi-square,.checkers-square{position:relative;display:grid;place-items:center;min-width:0;min-height:0;padding:0;border:1px solid #ffffff24;border-radius:0;cursor:default}.reversi-square{background:#0c4f43}.reversi-square.legal:not(:disabled){cursor:pointer;background:radial-gradient(circle,#f4df9c 0 10%,#0c4f43 12%)}.reversi-square.legal:not(:disabled):focus-visible,.checkers-square:not(:disabled):focus-visible{z-index:2;outline:3px solid #fff;outline-offset:-3px}.reversi-disc,.checker-piece{display:grid;place-items:center;width:76%;aspect-ratio:1;border-radius:50%;box-shadow:inset 0 3px 7px #fff5,0 3px 6px #0008}.reversi-disc.gold,.checker-piece.gold{border:2px solid #f1c983;background:radial-gradient(circle at 35% 28%,var(--gold-light),var(--gold) 60%,#754d18)}.reversi-disc.blue,.checker-piece.blue{border:2px solid #9ddce1;background:radial-gradient(circle at 35% 28%,#aee8ec,var(--blue) 60%,#014f56)}.reversi-square.flipped .reversi-disc{animation:reversi-flip .75s ease-out}.checkers-square.light{background:#d6c9aa}.checkers-square.dark{background:#183e38}.checkers-square.move-source:not(:disabled){cursor:pointer;box-shadow:inset 0 0 0 3px #fff7}.checkers-square.move-destination:not(:disabled){background:radial-gradient(circle,#fff 0 10%,#183e38 12%)}.checkers-square.selected{box-shadow:inset 0 0 0 4px var(--gold-light)}.checker-piece{width:72%;color:#fff;font-size:clamp(12px,4vw,24px);font-weight:900}.checker-piece.king{box-shadow:inset 0 0 0 3px #101817,inset 0 3px 7px #fff5,0 3px 6px #0008}.checkers-square:not(:disabled){cursor:pointer}.checkers-square:disabled{opacity:1}@keyframes reversi-flip{0%{transform:rotateY(90deg) scale(.8)}100%{transform:none}}

/* Fit the complete move inside its actual slot, independent of the ad height. */
.with-product-ad .playback-main{position:relative;display:block;overflow:hidden;padding:0;min-width:0;container-type:size}
.with-product-ad .playback-fit{position:absolute;top:50%;left:50%;width:100%;display:flow-root;transform:translate(-50%,-50%) scale(var(--playback-scale,1));transform-origin:center}
#remote-move.with-product-ad .bot-action,#play-replay.with-product-ad .bot-action{box-sizing:border-box;height:auto;min-height:0;max-height:none;overflow:visible;margin:0 auto}
.with-product-ad .playback-fit>.panel,.with-product-ad .playback-fit>.bonus-burst{box-sizing:border-box;max-width:100%;margin:0 auto}
.with-product-ad .mat-move{width:min(100%,300px,42cqh);margin-bottom:40px}
.with-product-ad .going-out-panel,.with-product-ad .secret-pass-panel{padding:16px 14px}
.with-product-ad .going-out-panel .mark{width:48px;height:48px}
.with-product-ad .going-out-panel h2{font-size:clamp(1.5rem,5vw,2.2rem);margin:8px 0}
.with-product-ad .final-race{margin-top:14px}
.with-product-ad .partner-finale{margin-top:14px}
.with-product-ad .secret-pass-flight{height:170px;margin:8px auto}

/* Keep hand controls inside their clipped, collapsible row on touch hover. */
.hand-label-row .btn:hover{transform:none}

.setup-auto-replacement{border:1px solid var(--line);border-radius:12px;padding:12px;margin:12px 0;background:#0b1014}.setup-auto-replacement h2{font-size:1rem}.auto-replacement-minutes{display:flex;align-items:center;gap:12px;margin-top:8px;font-size:1rem}.auto-replacement-minutes strong{color:var(--gold-light)}.auto-minute-arrows{display:flex;flex-direction:column;gap:4px;margin-left:auto}.auto-minute-arrows .btn{min-width:44px;min-height:36px;padding:5px 12px}.setup-auto-replacement .help{font-size:.875rem;line-height:1.4;margin-bottom:0}

.auto-replacement-switch{position:relative;flex:none;width:88px;height:44px;border:1px solid #ef9393;border-radius:999px;background:#a32c37;color:#fff;cursor:pointer;padding:0;font:700 .875rem/1 system-ui;transition:background .18s,border-color .18s}.auto-switch-knob{position:absolute;left:4px;top:4px;width:34px;height:34px;border-radius:50%;background:#fff;box-shadow:0 2px 5px #0005;transition:transform .18s}.auto-switch-state{position:absolute;right:12px;top:0;height:42px;display:flex;align-items:center}.auto-replacement-switch[aria-checked="true"]{background:#237642;border-color:#8bddaa}.auto-replacement-switch[aria-checked="true"] .auto-switch-knob{transform:translateX(44px)}.auto-replacement-switch[aria-checked="true"] .auto-switch-state{left:14px;right:auto}.auto-replacement-switch:focus-visible{outline:3px solid var(--gold-light);outline-offset:3px}.auto-replacement-switch:disabled{cursor:default;opacity:.7}@media(prefers-reduced-motion:reduce){.auto-replacement-switch,.auto-switch-knob{transition:none}}

.setup-rule-row .setup-rule-info.setup-rule-selected{display:flex;align-items:center;justify-content:center;width:22px;height:22px;border-radius:50%;background:#147bc1;color:#fff;border:1px solid #86d3ff;font:800 16px/1 system-ui;box-shadow:0 1px 4px #003e7055}

.setup-auto-replacement{padding:10px 12px}.premium-setup .setup-auto-replacement .setup-section-heading,.setup-auto-replacement .setup-section-heading{margin:0;gap:10px;flex-wrap:wrap}.premium-setup .setup-auto-replacement h2,.setup-auto-replacement h2{flex:1;min-width:95px;font-size:.875rem;letter-spacing:0;line-height:1.25}.setup-auto-replacement .auto-replacement-minutes{margin:0;gap:8px;white-space:nowrap;font-size:.875rem}.setup-auto-replacement .auto-minute-arrows{gap:2px}.setup-auto-replacement .auto-minute-arrows .btn{min-width:36px;min-height:26px;padding:2px 8px;margin:0;font-size:.875rem}.setup-auto-replacement .help{margin:7px 0 0;line-height:1.3}.setup-auto-replacement .auto-replacement-switch{width:76px;height:40px;box-sizing:border-box}.setup-auto-replacement .auto-switch-knob{width:30px;height:30px}.setup-auto-replacement .auto-switch-state{height:38px;right:9px}.setup-auto-replacement .auto-replacement-switch[aria-checked="true"] .auto-switch-knob{transform:translateX(36px)}.setup-auto-replacement .auto-replacement-switch[aria-checked="true"] .auto-switch-state{left:10px;right:auto}

.joker-help-float{position:fixed;right:max(6px,env(safe-area-inset-right));top:50%;transform:translateY(-50%);z-index:65;width:48px;height:56px;padding:0;border:2px solid var(--gold-light);border-radius:12px;background:#071719;box-shadow:0 3px 14px #0009;cursor:pointer}.joker-help-art{position:absolute;inset:4px 10px 4px 3px;background:url('./joker-emblem.png') center/contain no-repeat}.joker-help-question{position:absolute;right:2px;bottom:2px;display:flex;align-items:center;justify-content:center;width:23px;height:23px;border-radius:50%;background:#147bc1;color:white;border:1px solid #a6ddff;font:800 18px/1 system-ui}.joker-help-float:focus-visible{outline:3px solid #86d3ff;outline-offset:3px}

.joker-cancel-float{position:fixed;right:max(6px,env(safe-area-inset-right));top:calc(50% + 36px);z-index:65;min-height:40px;padding:7px 9px;border:1px solid var(--gold-light);border-radius:10px;background:#071719;color:var(--gold-light);font:700 .875rem/1.2 system-ui;cursor:pointer}.joker-cancel-float:focus-visible{outline:3px solid #86d3ff;outline-offset:3px}

/* The floating action is the same button, without a second frame. */
.local-hand-actions{padding:0;border:0;border-radius:24px;background:none;box-shadow:none}
.local-hand-actions .start-two-button{max-width:calc(100vw - 24px);white-space:nowrap}

/* Last Lap cuts away as runners approach the first corner. */
.final-race.mat-final-race{border:0;background:none;overflow:visible;margin:12px 0 8px}
.mat-race-track{position:relative;width:min(100%,38vh,330px);aspect-ratio:1;margin:auto;border-radius:10px;overflow:hidden;border:1px solid #ffffff45}
.mat-race-track>img{display:block;width:100%;height:100%;object-fit:contain}
.mat-race-player{position:absolute;left:calc(9% + var(--lane)*5%);top:calc(19% - var(--lane)*5%);display:flex;align-items:center;gap:2px;color:var(--gold-light);animation:mat-last-lap-run 6s calc(.7s + var(--lane)*.18s) linear both;filter:drop-shadow(0 2px 2px #000)}
.mat-race-player.lane-blue,.mat-race-lineup .lane-blue{color:#8fd4cc}
.mat-race-runner{display:block;font-size:clamp(22px,5vh,34px);line-height:1;transform:scaleX(-1);animation:mat-runner-stride .3s linear infinite alternate}
.mat-race-player>b{display:grid;place-items:center;width:18px;height:18px;border-radius:50%;background:#07171df0;border:1px solid currentColor;font:800 12px/1 system-ui}
.mat-race-lineup{display:flex;justify-content:center;flex-wrap:wrap;gap:6px 12px;margin-top:8px;font-size:14px;font-weight:700;color:var(--gold-light)}
.mat-race-lineup>span{max-width:100%;overflow-wrap:anywhere}
@keyframes mat-last-lap-run{0%{left:calc(9% + var(--lane)*5%);top:calc(19% - var(--lane)*5%)}67%{left:calc(73% + var(--lane)*5%);top:calc(19% - var(--lane)*5%)}100%{left:calc(73% + var(--lane)*5%);top:calc(51% - var(--lane)*5%)}}
@keyframes mat-runner-stride{from{transform:translateY(0) scaleX(-1)}to{transform:translateY(-3px) scaleX(-1)}}
@media(max-height:650px){.mat-race-track{width:min(100%,30vh,240px)}.mat-race-lineup{font-size:14px;margin-top:5px}}
@media(prefers-reduced-motion:reduce){.mat-race-player{animation:none;left:calc(73% + var(--lane)*5%);top:calc(51% - var(--lane)*5%)}.mat-race-runner{animation:none}}
/* Shared Snatch table rhythm for the two-player boards. */
.classic-live{margin-bottom:12px}.classic-live .compact-live-bottom{flex-wrap:wrap}.classic-live .pinned-next{overflow-wrap:anywhere;white-space:normal}.ttt-table{border-top:3px solid var(--gold)}.classic-thinking,.classic-move{display:flex;align-items:center;gap:12px;min-height:68px;margin:12px 0;padding:10px 12px;border:1px solid var(--line);border-radius:12px;background:var(--panel)}.classic-thinking .bot-pulse,.classic-move .bot-pulse{width:44px;height:44px;min-width:44px;margin:0;font-size:12px}.classic-move strong,.classic-thinking strong{font-size:16px;overflow-wrap:anywhere}.classic-move p{font-size:14px;margin:4px 0;color:var(--muted)}.classic-move.bot-team-gold{border-color:var(--gold)}.classic-move.bot-team-blue{border-color:var(--blue)}.thinking-dots{display:inline-block;animation:classic-think 1.2s ease-in-out infinite}.classic-piece-play{animation:classic-place 1.3s ease-out}.classic-disc-drop{animation:classic-drop 1.3s cubic-bezier(.2,.8,.3,1)}.classic-counter-take{animation:classic-take 1.3s ease-out}.classic-move .bot-reward-stamp{position:static;flex:none;font-size:14px}
@keyframes classic-think{50%{opacity:.25;transform:translateY(-3px)}}
@keyframes classic-place{0%{transform:scale(.65);filter:brightness(1.8)}35%{transform:scale(1.08)}100%{transform:scale(1);filter:brightness(1)}}
@keyframes classic-drop{0%{transform:translateY(-180px);opacity:0}18%{opacity:1}70%{transform:translateY(0)}82%{transform:translateY(-12px)}100%{transform:translateY(0)}}
@keyframes classic-take{0%{box-shadow:0 0 0 4px var(--gold);filter:brightness(1.6)}100%{box-shadow:0 0 0 0 transparent;filter:brightness(1)}}
@media(prefers-reduced-motion:reduce){.thinking-dots,.classic-piece-play,.classic-disc-drop,.classic-counter-take{animation:none}.classic-thinking .bot-pulse,.classic-move .bot-pulse{animation:none}}

.card.negative-joker{box-sizing:border-box;outline:2px solid #d74865;outline-offset:-2px}.card.negative-joker .joker-label{color:#ad1736;font-weight:900}

/* Local player ad controls remain usable at phone sizes. */
.product-ad-header{display:flex;align-items:center;justify-content:space-between;gap:8px;flex:none;min-height:36px}
.product-ad-header .product-ad-label{text-align:left;min-width:0}
.product-ad-controls{display:flex;gap:6px;flex:none}
.product-ad-controls button{min-height:36px;min-width:36px;padding:5px 9px;border:1px solid var(--gold);border-radius:7px;background:#10252d;color:#f7edda;font:600 .875rem/1.2 system-ui;cursor:pointer}
.product-ad-controls button:focus-visible{outline:3px solid var(--gold-light);outline-offset:2px}
.playback-product-ad[hidden]{display:none!important}
.playback-product-ad[data-ad-display="minimized"]{container-type:normal;height:auto;min-height:0;padding:4px 8px}
.playback-product-ad[data-ad-display="minimized"] .product-ad-link{display:none}

/* Share actions remain in normal flow, including wrapped and enlarged text. */
.result-share-card{display:flex;flex-direction:column;gap:14px}
.result-share-card > *{flex-shrink:0;margin:0;min-width:0}
.result-share-card .actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:0}
.result-share-card .btn{display:flex;align-items:center;justify-content:center;box-sizing:border-box;white-space:normal;line-height:1.3;text-align:center;text-decoration:none;min-height:48px;height:auto;transform:none}
.result-share-card > .btn{width:100%}
.result-share-card #share-result-status:empty{display:none}
@media(max-width:420px){.result-share-card .actions{grid-template-columns:1fr}}

/* Alternate product imagery with compact, bold product-name tiles. */
.product-ad-text-tile{display:block;align-content:center;padding:4px 8px;background:#030b10;text-align:center;color:var(--gold-light);font:800 clamp(16px,3.8vw,24px)/1.08 system-ui,sans-serif}
.product-ad-text-tile.tile-blue{color:var(--blue)}
.product-ad-text-tile span{display:block;max-width:100%;overflow-wrap:anywhere}
@container playback-ad (max-height:130px){.product-ad-text-tile{font-size:clamp(16px,18cqh,24px);padding:3px 8px}}
@container playback-ad (max-height:75px){.product-ad-text-tile{font-size:14px;padding:0 5px}}

.product-ad-text-tile{white-space:normal;overflow-wrap:normal;text-wrap:pretty}


/* Give ownership labels their own compact line below the cards. */
.combo.starter-combo{padding-bottom:21px}
.small-cards .combo.starter-combo{padding-bottom:19px}

.combo-frame-blue .starter-available-badge{color:#8fd4cc}

/* One reserved ad slot keeps the recap frame steady across every ad and toggle. */
#remote-move.with-product-ad,#play-replay.with-product-ad{grid-template-rows:minmax(0,1fr) var(--ad-slot-height)}
.with-product-ad .playback-main{width:min(520px,100%);box-sizing:border-box;border:2px solid var(--gold-light);border-radius:18px;background:#050b0e}
.with-product-ad .playback-main:has(.bot-team-blue){border-color:#74c8bf}
.with-product-ad .playback-fit>.panel{border:0;box-shadow:none;background:transparent}
.playback-product-ad,.playback-product-ad:has(.product-ad-text-tile){box-sizing:border-box;container-type:normal;container-name:none;width:min(720px,100%);height:160px;min-height:160px;max-height:160px;align-self:end;flex:none;padding:8px;gap:5px}
.playback-product-ad[data-ad-display="minimized"]{height:52px;min-height:52px;max-height:52px;padding:7px 8px}
.product-ad-header{height:36px;min-height:36px}
.product-ad-link{flex:1 1 0;max-height:none;overflow:hidden}
.product-ad-text-tile{display:flex;align-items:center;justify-content:center;font-size:clamp(16px,3.8vw,24px);padding:4px 8px}
.product-ad-concept{gap:8px;padding:4px 8px}
.product-ad-copy{gap:4px}
.product-ad-copy strong{font-size:clamp(14px,3.4vw,20px);line-height:1.15}
.product-ad-copy span,.product-ad-copy small{display:none}
@media(max-height:550px){
 #remote-move.with-product-ad,#play-replay.with-product-ad{--ad-slot-height:120px}
 .playback-product-ad,.playback-product-ad:has(.product-ad-text-tile){height:120px;min-height:120px;max-height:120px;padding:5px 8px;gap:3px}
 .playback-product-ad[data-ad-display="minimized"]{height:52px;min-height:52px;max-height:52px;padding:7px 8px}
 .product-ad-copy strong{font-size:14px}
}

/* Player-table ads stay within a compact two-and-a-half-row strip. */
.table-product-ad,.table-product-ad:has(.product-ad-text-tile){height:70px;min-height:70px;max-height:70px;padding:3px 7px;gap:2px;margin:8px auto}
.table-product-ad .product-ad-header{height:28px;min-height:28px}
.table-product-ad .product-ad-controls button{min-height:28px;height:28px;padding:2px 7px;font-size:12px}
.table-product-ad .product-ad-label{font-size:12px;line-height:14px}
.table-product-ad .product-ad-link{padding:0 4px;min-height:0}
.table-product-ad .product-ad-copy strong{font-size:12px;line-height:13px}
.table-product-ad .product-ad-text-tile{font-size:14px;line-height:15px}
.table-product-ad[data-ad-display="minimized"]{height:36px;min-height:36px;max-height:36px;padding:3px 7px}

/* Playback uses the same compact strip, with its space reserved in both states. */
#remote-move.with-product-ad,#play-replay.with-product-ad{--ad-slot-height:70px}
.with-product-ad .playback-product-ad,.with-product-ad .playback-product-ad:has(.product-ad-text-tile){height:70px;min-height:70px;max-height:70px;padding:3px 7px;gap:2px}
.with-product-ad .product-ad-header{height:28px;min-height:28px}
.with-product-ad .product-ad-controls button{min-height:28px;height:28px;padding:2px 7px;font-size:12px}
.with-product-ad .product-ad-label{font-size:12px;line-height:14px}
.with-product-ad .product-ad-link{padding:0 4px;min-height:0}
.with-product-ad .product-ad-copy strong{font-size:12px;line-height:13px}
.with-product-ad .product-ad-text-tile{font-size:14px;line-height:15px}
.with-product-ad .playback-product-ad[data-ad-display="minimized"]{height:36px;min-height:36px;max-height:36px;padding:3px 7px}

/* Graphics built for the short strip: product symbols plus one readable line. */
.product-ad-compact-graphic{display:flex;align-items:center;justify-content:center;gap:10px;padding:0 4px;background:#030b10}
.product-ad-compact-graphic strong{font:700 14px/15px system-ui;color:var(--gold-light);min-width:0;text-align:left}
.compact-ad-art{display:flex;align-items:center;justify-content:center;gap:6px;height:30px;flex:none}
.product-ad-compact-graphic .compact-ad-art img{width:30px;height:30px;object-fit:contain;flex:none;border-radius:3px}
.ad-coin-pair,.ad-card-pair{display:flex;align-items:center;gap:3px;height:30px}
.ad-coin-pair i{display:grid;place-items:center;width:27px;height:27px;border-radius:50%;border:2px solid #f1c983;background:#a97932;color:#fff4d6;font:700 7px/1 system-ui;font-style:normal;box-shadow:inset 0 0 0 2px #6e4819}
.ad-coin-pair i+ i{background:#316963;border-color:#8fd4cc;box-shadow:inset 0 0 0 2px #123e39}
.ad-card-pair i{display:flex;flex-direction:column;align-items:center;justify-content:center;width:19px;height:28px;background:#f7f1e2;border-radius:3px;color:#171c19;font:700 12px/12px Georgia;font-style:normal}
.ad-card-pair i+ i{color:#b42f30}
.ad-card-pair i span{font-size:11px}
.ad-host-symbol{display:flex;align-items:center;gap:2px;color:var(--blue)}
.ad-host-symbol>span{font:700 25px/1 system-ui}
@media(max-width:360px){.product-ad-compact-graphic{gap:6px}.product-ad-compact-graphic strong{font-size:12px;line-height:13px}.compact-ad-art{gap:3px}}

.product-ad-compact-graphic{padding:0!important;background:linear-gradient(105deg,#17362f,#030b10 45%,#362b19);width:100%}
.product-ad-compact-graphic .compact-ad-art{width:100%;height:100%;justify-content:space-evenly;gap:4px;overflow:hidden}
.product-ad-compact-graphic .compact-ad-art>img{width:auto;height:100%;max-height:30px;max-width:32px}
.product-ad-compact-graphic .ad-coin-pair,.product-ad-compact-graphic .ad-card-pair{flex:none}
@media(max-width:360px){.product-ad-compact-graphic .compact-ad-art{gap:2px}.product-ad-compact-graphic .ad-coin-pair{gap:1px}.product-ad-compact-graphic .ad-coin-pair i{width:22px;height:22px}}

.combo .starter-counter-number{display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;width:15px;height:15px;border:1px solid currentColor;border-radius:50%;font:inherit;line-height:1;vertical-align:middle;background:transparent}
.small-cards .combo .starter-counter-number{width:14px;height:14px}

#table-inspection{z-index:75}
#table-inspection .inspection-art{display:flex;justify-content:center;overflow-x:auto;padding:18px 0;--card-scale:1.5;--card-label-scale:1.5}
#table-inspection .inspection-art>*{pointer-events:none;flex-shrink:0;transform:none}
#table-inspection .combo{max-width:none}
#table-inspection .starter-combo{padding-bottom:32px}
#table-inspection .starter-available-badge{font-size:18px;bottom:5px}
#table-inspection .starter-counter-number,.inspection-counter{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;border:1px solid currentColor;border-radius:50%;font:inherit;vertical-align:middle}
#table-inspection p{line-height:1.5}

.move-quip{color:var(--gold-light);font-size:1.1rem;margin:8px 0 14px}
.bot-team-blue .move-quip{color:var(--blue)}
.pickup-overlay{z-index:65}
.pickup-panel{width:min(460px,100%);max-height:88dvh;overflow:auto;text-align:center;padding:24px;border:2px solid var(--gold-light);border-radius:24px;background:var(--felt-deep);--pickup-accent:var(--gold-light)}
.pickup-panel.bot-team-blue{border-color:var(--blue);--pickup-accent:var(--blue)}
.pickup-panel h2{color:var(--pickup-accent);font-size:clamp(1.5rem,6vw,2rem);line-height:1.15;margin:12px 0}
.pickup-card{display:flex;justify-content:center;margin:28px 0;--card-scale:1.6;--card-label-scale:1.6}
.pickup-card .card{transform:none;outline:none;box-shadow:0 0 20px color-mix(in srgb,var(--pickup-accent) 40%,transparent);animation:pickup-arrival .7s ease-out both}
.pickup-card .card::after{display:none}
.pickup-dismiss{border:0;background:transparent;color:var(--muted);font:inherit;font-size:.8rem;padding:8px 16px;cursor:pointer}
@keyframes pickup-arrival{from{opacity:0;transform:translateY(22px) scale(.8)}to{opacity:1;transform:none}}
@media(prefers-reduced-motion:reduce){.pickup-card .card{animation:none}}

.waiting-board-help,.waiting-board-help .zone-title{cursor:pointer}
.waiting-board-help .zone-title:focus-visible{outline:2px solid var(--gold-light);outline-offset:4px;border-radius:6px}
#table-inspection h3{font-size:1rem;color:var(--gold-light);margin:20px 0 8px}
#table-inspection ul{padding-left:20px}
#table-inspection li{margin:8px 0}
#table-inspection .inspection-tip{padding-top:12px;border-top:1px solid var(--line)}
.inspection-score{display:flex;flex-direction:column;text-align:center}.inspection-score strong{font-size:2.5rem}.inspection-score.gold{color:var(--gold-light)}.inspection-score.blue{color:var(--blue)}
#table-inspection .inspection-gallery{display:flex;flex-wrap:wrap;justify-content:center;gap:16px;--card-scale:1;--card-label-scale:1;width:100%}
.inspection-mini{display:flex;flex-wrap:wrap;justify-content:center;gap:4px;max-width:140px}.inspection-mini small{width:100%;text-align:center}

/* Optional learning and feedback use the existing table palette and rhythm. */
.hand-lesson{margin:14px 0;padding:12px 0;border-top:1px solid var(--blue,#83ccc6);border-bottom:1px solid var(--blue,#83ccc6)}
.hand-lesson summary{cursor:pointer;color:var(--gold,#D59A52);font-weight:600}
.hand-lesson h3{margin:12px 0 6px}.hand-lesson p{margin:8px 0}
.welcome-changes{text-align:left;font-size:.9em}.welcome-changes ul{padding-left:20px}.welcome-changes li{margin:8px 0}
.partner-awareness{margin:12px 0;padding:0 12px;border-left:3px solid var(--blue,#83ccc6)}
.experience-tools{margin:12px auto;max-width:900px;justify-content:center;gap:8px;flex-wrap:wrap}
.experience-card{max-height:85dvh;overflow:auto}.experience-card label{display:block;margin:14px 0}.experience-card select,.experience-card textarea{display:block;width:100%;margin:6px 0;padding:12px;border-radius:10px;background:#102822;color:#f8f2df;border:1px solid #83ccc6;font:inherit;box-sizing:border-box}.experience-card details{margin:12px 0}.experience-card button{min-height:44px}
.inspection-art{display:flex;flex-wrap:wrap;gap:6px;justify-content:center}.inspection-art>.card{flex-shrink:0}

#welcome-back .turn-ready-card{max-height:85dvh;overflow:auto}

.favorite-table,.practice-group,.partnership-recap,.rematch-ready{margin-top:14px;padding-top:10px;border-top:1px solid #477c74}.practice-hand{display:flex;flex-wrap:wrap;gap:8px}.practice-card{background:#f5f0df;color:#18201b;border:2px solid transparent;border-radius:8px;padding:14px 8px;min-width:48px;font-size:20px}.practice-card.red{color:#a52f30}.practice-card.chosen{border-color:#edc574;box-shadow:0 0 0 2px #edc574}.practice-card:disabled{opacity:1}.practice-card small{display:block;font-size:12px}.practice-group>div{display:flex;gap:4px;margin:8px 0}.table-extras{flex-wrap:wrap}

.experience-tools{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:100%;max-width:900px;margin:8px auto 12px;gap:8px;box-sizing:border-box}
.experience-option{--option-accent:var(--gold-light,#edc574);display:flex;align-items:center;gap:10px;min-width:0;min-height:66px;padding:10px 12px;border:1px solid color-mix(in srgb,var(--option-accent) 55%,#143b31);border-radius:14px;background:linear-gradient(135deg,#17382f,#091c17);box-shadow:inset 0 1px 0 #ffffff0d,0 3px 10px #0003;color:var(--option-accent);font:inherit;text-align:left;cursor:pointer;transition:border-color .15s,background .15s,transform .15s}
.experience-feedback{--option-accent:var(--blue,#83ccc6);background:linear-gradient(135deg,#163735,#091c1b)}
.experience-option-icon{display:grid;place-items:center;flex:0 0 34px;width:34px;height:34px;border-radius:50%;background:color-mix(in srgb,var(--option-accent) 12%,transparent);box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--option-accent) 25%,transparent)}
.experience-option-icon svg{width:22px;height:22px}.experience-option-copy{display:flex;flex-direction:column;min-width:0;gap:3px}.experience-option-copy strong{font-size:15px;line-height:1.2;font-weight:650}.experience-option-copy small{color:#c1cec7;font-size:11px;line-height:1.25}.experience-option-arrow{margin-left:auto;font-size:25px;font-weight:400;line-height:1}.experience-option:hover{border-color:var(--option-accent);background:#1b4035}.experience-option:active{transform:translateY(1px)}.experience-option:focus-visible{outline:2px solid var(--option-accent);outline-offset:3px}.experience-tools>.table-extras{grid-column:1/-1;margin-top:2px}
@media(max-width:360px){.experience-option{padding:9px 8px;gap:7px}.experience-option-icon{flex-basis:28px;width:28px;height:28px}.experience-option-copy strong{font-size:14px}.experience-option-arrow{display:none}}
@media(prefers-reduced-motion:reduce){.experience-option{transition:none}}

.joining-tutorial-offer{margin:14px 0;padding:12px 0;border-top:1px solid #477c74}.joining-tutorial-offer .micro{display:block;margin-bottom:7px;color:var(--blue)}.joining-tutorial-offer .help{margin:7px 0 0}.joining-tutorial .experience-card{max-width:680px;width:100%;box-sizing:border-box}.tutorial-chapter{line-height:1.55}.tutorial-chapter h3{color:var(--gold-light);font-size:22px}.tutorial-chapter li{margin:10px 0}.tutorial-chapter ol{padding-left:24px}.tutorial-check{padding:12px;border-radius:12px;background:#17382f;border:1px solid #477c74}.tutorial-check summary{cursor:pointer;color:var(--blue);font-weight:600}.tutorial-navigation{display:flex;gap:10px;justify-content:space-between;margin:18px 0}.tutorial-navigation .btn{flex:1;min-width:0}.joining-tutorial [data-experience-close]{width:100%}

.modal.joining-tutorial{z-index:40}

.tutorial-screenshot{margin:18px 0;padding:12px;border:1px solid #477c74;border-radius:14px;background:#071a16}.tutorial-screenshot img{display:block;max-width:100%;width:auto;max-height:540px;margin:0 auto;object-fit:contain;border-radius:10px}.tutorial-screenshot figcaption{margin-top:10px;color:var(--muted);font-size:.9rem;line-height:1.5}.tutorial-screenshot a{display:block;color:var(--blue)}.tutorial-screenshot .screenshot-open{display:block;margin-top:8px;font-size:.85rem}@media(max-width:540px){.tutorial-screenshot{padding:8px}}

.tutorial-phone-board.table{display:flex;flex-direction:column;gap:10px;max-width:390px;margin:0 auto;min-height:0;background:#194f43;padding:10px;border-radius:14px}.tutorial-phone-board .zone{background:#050505}.tutorial-phone-board .combo{cursor:default}.tutorial-phone-board .tutorial-protected-title{margin-top:16px}.tutorial-phone-board .zone-title{font-size:12px}.tutorial-phone-board .combos{padding:0}
