:root {
  --bg: #07090a;
  --bg-2: #0d1211;
  --ink: #f4efe2;
  --muted: #9ea69c;
  --gold: #d6b25e;
  --gold-2: #f2d78c;
  --gold-3: #a8873c;
  --red: #d8433b;
  --panel: #111715;
  --panel-2: #161e1b;
  --line: #24302b;
  --orb: #ffd76a;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; color: var(--ink); font: 16px/1.5 var(--sans); }
body {
  background:
    radial-gradient(1200px 600px at 50% -10%, rgba(214,178,94,.10), transparent 60%),
    radial-gradient(900px 500px at 50% 110%, rgba(20,90,55,.18), transparent 60%),
    var(--bg);
  min-height: 100vh;
}
a { color: var(--gold-2); }
.hidden { display: none !important; }
.muted { color: var(--muted); margin: 0; }

/* header */
.top { display: flex; align-items: center; gap: 12px; padding: 14px 20px; border-bottom: 1px solid rgba(214,178,94,.18);
  background: linear-gradient(180deg, rgba(0,0,0,.55), rgba(0,0,0,.15)); position: sticky; top: 0; z-index: 5; backdrop-filter: blur(6px); }
.brand { color: var(--gold); font: 600 15px/1 var(--serif); letter-spacing: .06em; text-decoration: none; text-transform: uppercase; flex: 1; }
.brand .suits { color: var(--gold-2); letter-spacing: 0; margin-right: 4px; }
.howto { font-size: 14px; color: var(--ink); text-decoration: none; border: 1px solid rgba(214,178,94,.45); padding: 7px 14px; border-radius: 99px; }
.howto:hover { border-color: var(--gold-2); color: var(--gold-2); }

main { max-width: 1040px; margin: 0 auto; padding: 18px 16px 48px; }

/* hero */
.hero { text-align: center; margin: 6px 0 18px; }
.hero h1 { font: 600 clamp(30px, 5vw, 46px)/1.05 var(--serif); margin: 0; letter-spacing: .01em;
  background: linear-gradient(180deg, #fff3cf 0%, var(--gold-2) 45%, var(--gold) 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.beta { display: inline-block; vertical-align: middle; font: 700 11px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase;
  color: var(--gold-2); -webkit-text-fill-color: var(--gold-2); border: 1px solid var(--gold); border-radius: 99px; padding: 5px 9px; margin-left: 6px; transform: translateY(-4px); }
.lede { color: var(--muted); margin: 8px auto 14px; max-width: 560px; }
.stats { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.stat { background: linear-gradient(180deg, var(--panel-2), var(--panel)); border: 1px solid var(--line); border-radius: 12px; padding: 7px 14px; min-width: 104px; }
.stat span { display: block; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.stat b { font-weight: 700; color: var(--gold-2); font-variant-numeric: tabular-nums; }
.info { color: var(--ink); opacity: .85; font-size: 14px; min-height: 1.5em; margin-top: 12px; }

/* table */
.felt-wrap { width: 100%; margin-bottom: 64px; }
.rail { padding: 14px; border-radius: 50% / 44%;
  background: radial-gradient(ellipse at 50% 30%, #6b4426 0%, #3b2313 55%, #22140a 100%);
  box-shadow: 0 30px 60px rgba(0,0,0,.65), inset 0 2px 0 rgba(255,255,255,.08), inset 0 -3px 8px rgba(0,0,0,.6); }
.felt { position: relative; width: 100%; aspect-ratio: 16 / 9.4; border-radius: 50% / 46%;
  background:
    radial-gradient(ellipse at 50% 42%, rgba(255,255,255,.08), transparent 55%),
    radial-gradient(ellipse at 50% 45%, #1a7d4b 0%, #0f5c37 55%, #093a23 100%);
  box-shadow: inset 0 0 0 2px rgba(214,178,94,.55), inset 0 0 0 9px rgba(0,0,0,.12), inset 0 0 0 10px rgba(214,178,94,.25), inset 0 0 60px rgba(0,0,0,.55); }
.mark { position: absolute; left: 50%; top: 66%; transform: translate(-50%, -50%); text-align: center; pointer-events: none; opacity: .16; white-space: nowrap; }
.mark span { display: block; font-size: 22px; letter-spacing: .4em; color: #eaffef; }
.mark b { font: 600 14px/1 var(--serif); letter-spacing: .5em; color: #eaffef; }
.dealer { position: absolute; left: 50%; top: 4%; transform: translateX(-50%); }
.dealer span { display: inline-block; font: 700 11px/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--gold-2);
  border: 1px solid rgba(214,178,94,.8); padding: 6px 12px; border-radius: 99px; background: rgba(0,0,0,.28); }
.center { position: absolute; left: 50%; top: 39%; transform: translate(-50%, -50%); text-align: center; width: 60%; }
.pot { min-height: 30px; display: inline-flex; align-items: center; gap: 8px; color: var(--ink); font-size: 15px; }
.pot:not(:empty) { background: rgba(0,0,0,.32); border: 1px solid rgba(214,178,94,.35); padding: 4px 14px 4px 6px; border-radius: 99px; }
.pot b { color: var(--gold-2); font-variant-numeric: tabular-nums; }
.chip { width: 20px; height: 20px; border-radius: 50%; display: inline-block;
  background: radial-gradient(circle, var(--gold-2) 0 35%, #8c6b26 36% 44%, var(--gold) 45% 100%);
  box-shadow: 0 0 0 2px rgba(0,0,0,.35), inset 0 0 0 3px rgba(255,255,255,.25); }
.board { display: flex; gap: 7px; justify-content: center; min-height: 70px; margin: 10px 0; }
.bubble { display: inline-block; background: #fffdf6; color: #1b1b1b; font-weight: 650; font-size: 14px; position: relative;
  padding: 7px 14px; border-radius: 16px; max-width: 100%; box-shadow: 0 6px 18px rgba(0,0,0,.35); }
.bubble:empty { display: none; }
.clock { font-size: 13px; color: #eafff1; opacity: .9; margin-top: 7px; min-height: 1.2em; font-variant-numeric: tabular-nums; }

/* seats */
.seat { position: absolute; transform: translate(-50%, -50%); width: 16%; max-width: 128px; text-align: center; }
.seat .av { position: relative; width: 66%; margin: 0 auto; aspect-ratio: 5 / 7; border-radius: 9px; }
.seat .av img { width: 100%; height: 100%; object-fit: cover; border-radius: 9px; display: block; background: #0006;
  border: 1px solid rgba(242,215,140,.55); box-shadow: 0 10px 22px rgba(0,0,0,.55); transition: filter .4s ease; }
.seat .empty { width: 100%; height: 100%; border-radius: 9px; border: 1.5px dashed rgba(255,255,255,.35);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: #e8f5ec; background: rgba(0,0,0,.16); }
.seat .empty.open { cursor: pointer; transition: border-color .2s, background .2s, transform .2s; }
.seat .empty.open:hover, .seat .empty.open:focus-visible { border-color: var(--gold-2); background: rgba(214,178,94,.12); transform: translateY(-2px); outline: none; }
.seat .plus { width: 30px; height: 30px; border-radius: 50%; border: 1.5px solid currentColor; display: flex; align-items: center; justify-content: center; font-size: 20px; line-height: 1; }
.seat .sit { font-size: 12px; font-weight: 600; letter-spacing: .04em; }
.plate { margin: 8px auto 0; display: inline-block; min-width: 92%; background: rgba(6,10,8,.78); border: 1px solid rgba(214,178,94,.28);
  border-radius: 10px; padding: 5px 8px 6px; box-shadow: 0 6px 14px rgba(0,0,0,.4); }
.plate .nm { font-size: 12px; font-weight: 600; color: #fff; line-height: 1.25; }
.plate .sn { display: inline-block; font-size: 10px; color: var(--gold-2); border: 1px solid rgba(214,178,94,.6); border-radius: 99px; padding: 0 5px; margin-right: 5px; transform: translateY(-1px); }
.plate .chips { font-weight: 800; color: var(--gold-2); font-size: 14px; font-variant-numeric: tabular-nums; }
.plate .chips small { font-weight: 600; font-size: 10px; letter-spacing: .08em; color: var(--gold); }
.plate .state { font-size: 11px; color: #cfd8d2; }
.plate .miss { color: #ffb4a8; }
.seat .bet { position: absolute; left: 50%; top: -16px; transform: translateX(-50%); font-size: 11px; font-weight: 700; background: rgba(0,0,0,.7);
  color: var(--gold-2); padding: 2px 8px; border-radius: 99px; white-space: nowrap; border: 1px solid rgba(214,178,94,.4); }
.seat .tag { position: absolute; right: -10px; top: -10px; width: 24px; height: 24px; border-radius: 50%; font-size: 10.5px; font-weight: 800;
  display: flex; align-items: center; justify-content: center; color: #111; border: 1px solid rgba(0,0,0,.4); box-shadow: 0 2px 6px rgba(0,0,0,.5); }
.seat .tag.d { background: radial-gradient(circle, #fff 0 55%, #e8e2d0 56% 100%); }
.seat .tag.sb { background: #a9d4ff; } .seat .tag.bb { background: var(--gold); }
.seat.out .av img, .seat.folded .av img { filter: grayscale(1) brightness(.42); }
.seat.out .plate { opacity: .6; }
.seat.turn .av::before { content: ""; position: absolute; inset: -10px; border-radius: 16px;
  box-shadow: 0 0 0 3px var(--orb), 0 0 26px 10px rgba(255,215,106,.7); animation: orb 1.6s ease-in-out infinite; pointer-events: none; }
.seat.winner .av::before { content: ""; position: absolute; inset: -9px; border-radius: 16px; box-shadow: 0 0 0 3px #7CFFB2, 0 0 28px 12px rgba(124,255,178,.55); }
.seat .signbtn { margin-top: 6px; font-size: 12.5px; padding: 7px 12px; box-shadow: 0 6px 16px rgba(214,178,94,.35); }
@keyframes orb { 0%,100% { opacity: .55; transform: scale(.98); } 50% { opacity: 1; transform: scale(1.03); } }
@media (prefers-reduced-motion: reduce) { .seat.turn .av::before { animation: none; } }

/* playing cards */
.pc { width: 46px; height: 64px; border-radius: 7px; background: linear-gradient(180deg, #fffdf7, #f1ece0); color: #141414;
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center; font: 800 19px/1 var(--serif);
  box-shadow: 0 4px 10px rgba(0,0,0,.45), inset 0 0 0 1px rgba(0,0,0,.08); }
.pc.red { color: var(--red); }
.pc small { font-size: 19px; margin-top: 2px; }
.pc.slot { background: rgba(255,255,255,.05); box-shadow: inset 0 0 0 1px rgba(255,255,255,.14); }
.pc.back { background: repeating-linear-gradient(45deg, #7a1d1d 0 6px, #5c1414 6px 12px); border: 2px solid #f5f0e0; }
.pc.big { width: 76px; height: 106px; font-size: 30px; border-radius: 9px; } .pc.big small { font-size: 30px; }

/* buttons */
button, .primary { font: inherit; cursor: pointer; border-radius: 11px; border: 1px solid var(--line); padding: 11px 16px; transition: background .15s, border-color .15s, transform .1s; }
button:active { transform: translateY(1px); }
.primary { background: linear-gradient(180deg, var(--gold-2), var(--gold)); color: #19140a; border-color: var(--gold-3); font-weight: 700; text-decoration: none; display: inline-block; text-align: center; }
.primary:hover { background: linear-gradient(180deg, #fbe5a6, var(--gold-2)); }
.ghost { background: rgba(255,255,255,.02); color: var(--ink); }
.ghost:hover { border-color: var(--gold); }
.danger { background: #3a1513; color: #ffd8d3; border-color: #6a2622; }
.danger:hover { background: #4a1a17; }
button:disabled { opacity: .5; cursor: not-allowed; }
:focus-visible { outline: 2px solid var(--gold-2); outline-offset: 2px; }

/* private panel */
.panel { margin: 20px auto 0; max-width: 580px; background: linear-gradient(180deg, var(--panel-2), var(--panel)); border: 1px solid var(--gold);
  border-radius: 18px; padding: 16px 18px; box-shadow: 0 20px 50px rgba(0,0,0,.55), 0 0 0 4px rgba(214,178,94,.08); }
.panel-head { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.panel-head strong { font: 600 18px/1.2 var(--serif); color: var(--gold-2); }
.panel-clock { margin-left: auto; color: var(--gold-2); font-size: 14px; font-variant-numeric: tabular-nums; }
.mycards { display: flex; gap: 12px; justify-content: center; margin: 14px 0 6px; }
.remember { text-align: center; color: var(--muted); font-size: 13px; margin: 4px 0 12px; }
.facing { text-align: center; font-size: 14px; margin-bottom: 12px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.actions button { min-width: 112px; }
.raise { margin-top: 14px; }
.raise label { font-size: 13px; color: var(--muted); }
.raise-row { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0 8px; }
.raise input { flex: 1 1 120px; min-width: 0; padding: 11px; border-radius: 11px; border: 1px solid var(--line); background: #0a0f0d; color: var(--ink); font: inherit; }
.raise #raise-go { width: 100%; }
.msg { min-height: 1.3em; text-align: center; margin-top: 8px; color: #ffb4a8; font-size: 14px; }

/* info cards */
.cards2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 22px; }
.card { background: linear-gradient(180deg, var(--panel-2), var(--panel)); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; font-size: 14px; }
.card h3 { font: 600 16px/1.2 var(--serif); color: var(--gold-2); margin: 0 0 10px; letter-spacing: .02em; }
.plate .state .mv { font-weight: 700; color: #f6e7b8; }
.plate .state .mv.fold { color: #c9b9a8; font-weight: 600; }
.moveslog { grid-column: 1 / -1; }
.moves { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.moves li { display: flex; gap: 10px; align-items: baseline; padding: 4px 0; border-bottom: 1px solid rgba(255,255,255,.04); }
.moves li span { min-width: 112px; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.moves li.f { color: #b8b0a4; }
.moves li.now { color: var(--gold-2); font-weight: 700; }
.potline { display: flex; gap: 8px; align-items: baseline; padding: 3px 0; }
.potline span { color: var(--muted); min-width: 70px; } .potline b { color: var(--gold-2); } .potline em { font-style: normal; margin-left: auto; }
.last .shown { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 10px; }
.last .shown .who { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.last .shown .pc { width: 34px; height: 48px; font-size: 14px; margin-right: 4px; } .last .shown .pc small { font-size: 14px; }
.ladder table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
.ladder td, .ladder th { padding: 4px 8px 4px 0; text-align: left; font-weight: 400; border-bottom: 1px solid rgba(255,255,255,.04); }
.ladder th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.ladder tr.now td { color: var(--gold-2); font-weight: 700; }
.fine { margin-top: 28px; font-size: 12.5px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 14px; line-height: 1.6; }

.turnbar { position: fixed; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 8; cursor: pointer;
  background: linear-gradient(180deg, var(--gold-2), var(--gold)); color: #19140a; font-weight: 800; font-size: 14px;
  padding: 11px 18px; border-radius: 99px; box-shadow: 0 10px 30px rgba(0,0,0,.6), 0 0 0 3px rgba(242,215,140,.25); white-space: nowrap; }

/* modal */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.75); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 10; backdrop-filter: blur(3px); }
.sheet { background: linear-gradient(180deg, var(--panel-2), var(--panel)); border: 1px solid var(--gold); border-radius: 18px; max-width: 420px; width: 100%; padding: 20px; text-align: center; box-shadow: 0 30px 70px rgba(0,0,0,.6); }
.sheet h2 { margin: 0 0 8px; font: 600 22px/1.2 var(--serif); color: var(--gold-2); }
.notice { font-size: 13.5px; color: var(--muted); text-align: left; }
.big { display: block; width: 100%; padding: 14px; font-size: 17px; margin: 12px 0; }
.qr img { width: 220px; height: 220px; background: #fff; border-radius: 12px; padding: 8px; }
.status { font-size: 14px; min-height: 1.3em; }
.tip { font-size: 13.5px; color: var(--gold-2); background: rgba(214,178,94,.08); border: 1px solid rgba(214,178,94,.3); border-radius: 10px; padding: 8px 10px; margin: 10px 0 4px; text-align: left; }
.linkish { font-size: 13px; padding: 6px 10px; margin-bottom: 8px; }

/* phones */
@media (max-width: 680px) {
  .top { padding: 12px 16px; }
  .brand { font-size: 13px; }
  .stats { gap: 6px; }
  .stat { min-width: 0; flex: 1 1 30%; padding: 5px 6px; border-radius: 10px; }
  .stat span { font-size: 9.5px; letter-spacing: .06em; } .stat b { font-size: 13px; }
  .lede { font-size: 14px; }
  .rail { padding: 9px; border-radius: 44% / 30%; }
  .felt { aspect-ratio: 10 / 14; border-radius: 42% / 28%; }
  .mark { display: none; }
  .seat { width: 31%; }
  .seat .av { width: 56%; }
  .plate { padding: 3px 5px 4px; min-width: 0; width: 100%; } .plate .nm { font-size: 10.5px; } .plate .sn { display: none; }
  .plate .chips { font-size: 12.5px; white-space: nowrap; } .plate .state { font-size: 10px; }
  .seat .signbtn { font-size: 11.5px; padding: 6px 8px; width: 100%; }
  .seat .tag { width: 20px; height: 20px; font-size: 9.5px; right: -8px; top: -8px; }
  .felt-wrap { margin-bottom: 76px; }
  .center { width: 58%; top: 29.5%; }
  .dealer { top: 2%; } .dealer span { font-size: 9.5px; padding: 4px 9px; }
  .board { margin: 6px 0; }
  .pc { width: 34px; height: 48px; font-size: 15px; border-radius: 6px; } .pc small { font-size: 15px; }
  .board { min-height: 50px; gap: 4px; }
  .bubble { font-size: 12.5px; padding: 5px 10px; }
  .cards2 { grid-template-columns: 1fr; }
}
