:root{
  --page:#E8DDC8; --ink:#2A1D17; --muted:#6E5C4F; --card:#F6EFE3; --line:#D2C3A8;
  --table:#5A1D23; --table-lit:#6E262D; --table-deep:#43141A; --rail:#B98F4A; --brass-text:#E6C27F;
  --ivory:#F4EDE0; --pip:#231A15; --on-table:#F4EDE0; --on-table-muted:#D9B9A6; --danger:#B0412F;
  --display:'Big Shoulders Display','Arial Narrow',Impact,sans-serif;
  --body:'Archivo','Helvetica Neue',Arial,sans-serif;
  box-sizing:border-box; padding-top:env(safe-area-inset-top,0px); padding-bottom:env(safe-area-inset-bottom,0px);
}
@media (prefers-color-scheme: dark){ :root:not([data-theme="light"]){ --page:#1D1511; --ink:#EFE4D2; --muted:#B19D88; --card:#2A1F19; --line:#46362C; } }
:root[data-theme="dark"]{ --page:#1D1511; --ink:#EFE4D2; --muted:#B19D88; --card:#2A1F19; --line:#46362C; }
*,*::before,*::after{ box-sizing:inherit; }
html{ scroll-padding-top:env(safe-area-inset-top,0px); }
body{ margin:0; background:var(--page); color:var(--ink); font-family:var(--body); font-size:16px; line-height:1.45; -webkit-font-smoothing:antialiased; }
button,input,textarea{ font:inherit; }
[hidden]{ display:none !important; }
.app{ max-width:1080px; margin:0 auto; padding:10px 12px 28px; }
.bar{ display:flex; align-items:center; gap:12px; padding:4px 2px 12px; }
.brand{ font-family:var(--display); font-weight:800; font-size:32px; line-height:1; color:var(--ink); text-decoration:none; letter-spacing:.3px; }
.who{ margin-left:auto; text-align:right; font-size:13px; color:var(--muted); line-height:1.3; }
.who b{ color:var(--ink); font-weight:600; }

.panel{ background:var(--card); border:1px solid var(--line); border-radius:18px; padding:16px; margin-bottom:12px; }
.panel h1{ font-family:var(--display); font-weight:800; font-size:44px; line-height:1; margin:0 0 8px; }
.panel h2{ font-size:18px; margin:0 0 4px; }
.panel p{ margin:0 0 12px; color:var(--muted); font-size:15px; }
.panel .small,.small{ font-size:13px; color:var(--muted); margin:8px 0 0; }
.hero{ background:var(--table); color:var(--on-table); border:3px solid var(--rail); }
.hero p{ color:var(--on-table-muted); }
.grid{ display:grid; gap:12px; }
.grid .panel{ margin:0; }
@media (min-width:860px){ .grid{ grid-template-columns:1fr 1fr; } }
input[type=text],input[type=password],textarea{ width:100%; padding:12px; border-radius:12px; border:1px solid var(--line); background:var(--page); color:var(--ink); font-size:17px; margin-bottom:6px; }
textarea{ resize:vertical; }
.err{ color:var(--danger); font-size:13px; min-height:1.3em; margin-bottom:6px; }
.code{ font-family:var(--display); font-weight:600; font-size:22px; line-height:1.35; background:var(--page); border:1px dashed var(--rail); border-radius:12px; padding:12px; margin-bottom:12px; word-spacing:4px; }
.row2{ display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.link{ background:none; border:none; color:var(--muted); text-decoration:underline; padding:10px 0 0; cursor:pointer; font-size:14px; }

.btn{ font-weight:600; font-size:16px; border-radius:12px; padding:12px 14px; border:1px solid var(--line); background:transparent; color:var(--ink); min-height:50px; cursor:pointer; font-variant-numeric:tabular-nums; }
.btn.primary{ background:var(--table); color:var(--ivory); border-color:var(--table); }
.btn.brass{ background:var(--rail); color:#2A1D17; border-color:var(--rail); }
.btn.small{ min-height:40px; padding:8px 12px; font-size:14px; }
.btn:disabled{ opacity:.4; cursor:default; }
.btn:focus-visible,.link:focus-visible,input:focus-visible,textarea:focus-visible,.tabs button:focus-visible{ outline:3px solid var(--rail); outline-offset:2px; }
.wide{ width:100%; }
.play .btn + .btn{ margin-top:8px; }

.live{ background:var(--table); color:var(--on-table); border:3px solid var(--rail); display:flex; gap:12px; align-items:center; flex-wrap:wrap; }
.live .lt{ flex:1; min-width:180px; } .live h2{ margin:0; } .live p{ color:var(--on-table-muted); margin:2px 0 0; }
.tiers{ display:grid; grid-template-columns:repeat(3,1fr); gap:8px; }
.tiers .btn{ display:flex; flex-direction:column; align-items:center; justify-content:center; line-height:1.2; padding:10px 6px; }
.tiers .btn small{ font-weight:500; font-size:12px; opacity:.85; }
.tinfo{ display:flex; gap:10px; flex-wrap:wrap; justify-content:center; font-size:13px; color:var(--on-table-muted); margin-top:4px; }
.tinfo b{ color:var(--brass-text); font-weight:700; }
.seat.empty{ opacity:.3; border-style:dashed; }
.results{ list-style:none; padding:0; margin:6px 0 0; }
.results li{ display:flex; gap:10px; padding:6px 0; border-bottom:1px solid var(--line); }
.results li b{ width:34px; } .results li span:last-child{ margin-left:auto; font-weight:700; font-variant-numeric:tabular-nums; }
.champ .when{ font-family:var(--display); font-weight:800; font-size:34px; line-height:1.05; }
.champ .meta{ font-size:14px; color:var(--muted); margin:4px 0 12px; }
.champ .actions2{ display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.statgrid{ display:grid; grid-template-columns:repeat(3,1fr); gap:8px; margin-bottom:10px; }
.statgrid div{ border:1px solid var(--line); border-radius:12px; padding:8px 10px; }
.statgrid b{ display:block; font-family:var(--display); font-weight:800; font-size:24px; line-height:1.1; font-variant-numeric:tabular-nums; }
.statgrid span{ font-size:12px; color:var(--muted); }
.tabs{ display:flex; gap:6px; margin:6px 0; flex-wrap:wrap; }
.tabs button{ border:1px solid var(--line); background:transparent; color:var(--ink); border-radius:999px; padding:6px 12px; font-size:14px; font-weight:600; cursor:pointer; }
.tabs button.on{ background:var(--ink); color:var(--page); border-color:var(--ink); }
.lb{ max-width:720px; margin-left:auto; margin-right:auto; border:2px solid var(--rail); }
.lb h2{ font-family:var(--display); font-weight:800; font-size:30px; line-height:1; text-align:center; margin:0 0 8px; }
.lb .tabs{ justify-content:center; }
@media (max-width:640px){
  .lb #lbBoard{ flex-wrap:nowrap; justify-content:flex-start; overflow-x:auto; scrollbar-width:none; }
  .lb #lbBoard::-webkit-scrollbar{ display:none; }
  .lb #lbBoard button{ flex:none; }
}
.lb .sub{ text-align:center; margin:0 0 4px; font-size:14px; }
.lb a.btn{ display:grid; place-items:center; text-decoration:none; margin-top:12px; }
.lb h1{ text-align:center; }
.lb.full .lbList{ max-height:none; overflow:visible; }
.lbList li:nth-child(-n+3) span:first-child{ font-weight:700; }
.lbList{ list-style:none; padding:0; margin:8px 0 0; counter-reset:r; max-height:360px; overflow:auto; }
.lbList li{ display:flex; gap:10px; align-items:baseline; padding:7px 2px; border-bottom:1px solid var(--line); counter-increment:r; }
.lbList li::before{ content:counter(r); width:24px; color:var(--muted); font-variant-numeric:tabular-nums; font-size:14px; }
.lbList li.me{ font-weight:700; }
.lbList .v{ margin-left:auto; font-family:var(--display); font-weight:800; font-size:20px; font-variant-numeric:tabular-nums; }
.lbList .empty{ color:var(--muted); font-size:14px; }
.lbList .empty::before{ content:''; width:0; }

.tablebar{ display:flex; align-items:center; gap:8px; margin-bottom:10px; }
.tablebar span{ flex:1; text-align:center; font-size:13px; color:var(--muted); }
.table{ background:radial-gradient(ellipse at 50% 42%, var(--table-lit) 0%, var(--table) 52%, var(--table-deep) 100%);
  border:3px solid var(--rail); border-radius:28px; padding:12px; color:var(--on-table);
  box-shadow:inset 0 0 0 5px rgba(0,0,0,.2), 0 10px 30px rgba(40,10,10,.25); }
.opps{ display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:7px; }
@media (min-width:860px){ .opps{ grid-template-columns:repeat(8,minmax(0,1fr)); } .opps.nine{ grid-template-columns:repeat(9,minmax(0,1fr)); } .table{ padding:18px; } }
.seat{ background:rgba(0,0,0,.24); border:1px solid rgba(244,237,224,.12); border-radius:12px; padding:7px 8px 8px; min-width:0; position:relative; transition:border-color .2s, opacity .25s, background .25s; }
.seat.acting{ border-color:var(--rail); box-shadow:0 0 0 2px var(--rail); }
.seat.folded,.seat.away{ opacity:.42; }
.seat.winner{ background:rgba(185,143,74,.3); border-color:var(--rail); }
.seat.human{ background:rgba(244,237,224,.1); }
.seat .top{ display:flex; align-items:center; gap:3px; min-width:0; }
.seat .nm{ font-weight:600; font-size:13px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; min-width:0; }
.seat .stk{ font-family:var(--display); font-weight:600; font-size:21px; line-height:1.15; font-variant-numeric:tabular-nums; }
.seat .row{ display:flex; align-items:center; justify-content:space-between; gap:4px; }
.seat .st{ font-size:12px; color:var(--on-table-muted); min-height:1.35em; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.seat .mk{ flex:none; width:24px; height:24px; border-radius:6px; background:rgba(244,237,224,.14); color:var(--on-table-muted); display:grid; place-items:center; font-family:var(--display); font-weight:800; font-size:13px; }
.seat .mk.shown{ background:var(--ivory); color:var(--pip); }
.badge{ flex:none; font-size:10px; font-weight:700; border-radius:999px; padding:1px 5px; background:var(--rail); color:#2A1D17; line-height:1.4; }
.badge.ghost{ background:rgba(244,237,224,.16); color:var(--on-table-muted); }
.thinking::after{ content:'…'; display:inline-block; animation:blink 1s steps(2) infinite; }
@keyframes blink{ 50%{ opacity:.2; } }
.tray{ text-align:center; padding:14px 0 10px; }
.street{ font-size:14px; color:var(--on-table-muted); font-weight:500; }
.dice{ display:grid; grid-template-columns:repeat(5,auto); justify-content:center; gap:8px; margin:12px 0 10px; }
.die{ width:46px; height:46px; border-radius:10px; background:var(--ivory); display:grid; grid-template-columns:repeat(3,1fr); grid-template-rows:repeat(3,1fr); padding:7px; box-shadow:0 3px 0 #C6B79D, 0 7px 14px rgba(0,0,0,.35); }
.die i{ width:8px; height:8px; border-radius:50%; place-self:center; }
.die i.on{ background:var(--pip); }
.die.empty{ background:transparent; border:2px dashed rgba(244,237,224,.22); box-shadow:none; }
.die.spin{ transform:rotate(var(--r,0deg)); }
@media (max-width:400px){ .dice{ gap:6px; } .die{ width:40px; height:40px; padding:6px; } .die i{ width:7px; height:7px; } }
.total{ font-family:var(--display); font-weight:800; font-size:68px; line-height:.95; font-variant-numeric:tabular-nums; }
.total small{ display:block; font-family:var(--body); font-size:13px; font-weight:500; color:var(--on-table-muted); margin-top:2px; }
.potline{ margin-top:8px; font-size:15px; color:var(--on-table-muted); }
.potline b{ font-family:var(--display); font-size:24px; font-weight:800; color:var(--brass-text); margin-left:4px; font-variant-numeric:tabular-nums; }
.banner{ min-height:1.5em; margin-top:6px; font-weight:600; font-size:15px; padding:0 8px; }
.me{ display:flex; align-items:center; gap:14px; border-top:1px solid rgba(244,237,224,.16); padding-top:12px; }
.me:empty{ display:none; }
.me.acting .markcard{ box-shadow:0 0 0 3px var(--rail); }
.me.winner .markcard{ background:#EBD49F; }
.markcard{ flex:none; width:74px; height:86px; border-radius:12px; background:var(--ivory); color:var(--pip); display:flex; flex-direction:column; align-items:center; justify-content:center; }
.markcard b{ font-family:var(--display); font-size:44px; font-weight:800; line-height:1; }
.markcard span{ font-size:11px; font-weight:600; }
.me .info{ min-width:0; flex:1; }
.me .nm{ font-weight:700; font-size:16px; display:flex; gap:4px; align-items:center; flex-wrap:wrap; }
.me .stk{ font-family:var(--display); font-weight:800; font-size:28px; line-height:1.1; font-variant-numeric:tabular-nums; }
.me .odds{ font-size:13px; color:var(--on-table-muted); }
.controls{ background:var(--card); border:1px solid var(--line); border-radius:18px; padding:14px; margin-top:12px; }
.controls h2{ font-size:17px; margin:0 0 4px; display:flex; gap:8px; align-items:baseline; }
.controls h2 .timer{ margin-left:auto; font-family:var(--display); font-weight:800; font-size:22px; color:var(--table); font-variant-numeric:tabular-nums; }
.controls p{ margin:0 0 10px; color:var(--muted); font-size:14px; }
.actions{ display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; }
.actions.two{ grid-template-columns:repeat(2,minmax(0,1fr)); }
.raise{ margin-top:12px; display:grid; gap:8px; }
.raise .row{ display:flex; align-items:center; gap:10px; }
.raise .amt{ font-family:var(--display); font-weight:800; font-size:26px; min-width:84px; text-align:right; font-variant-numeric:tabular-nums; }
input[type=range]{ width:100%; accent-color:var(--table); height:32px; }
.presets{ display:flex; gap:6px; }
.presets .btn{ flex:1; min-height:40px; padding:6px; font-size:14px; }
.picker{ display:grid; gap:10px; }
.picker .row{ display:flex; align-items:center; gap:12px; }
.picker .steps{ display:flex; flex-direction:column; gap:6px; }
.picker .num{ font-family:var(--display); font-weight:800; font-size:76px; line-height:.9; min-width:96px; text-align:center; font-variant-numeric:tabular-nums; }
.picker .step{ width:46px; height:46px; min-height:46px; border-radius:50%; font-size:24px; padding:0; }
.picker .meta{ flex:1; font-size:14px; color:var(--muted); }
.picker .meta b{ color:var(--ink); font-size:18px; display:block; }
details.log{ margin-top:12px; font-size:13px; color:var(--muted); }
details.log summary{ cursor:pointer; font-weight:600; padding:6px 2px; }
details.log ol{ margin:6px 0 0; padding-left:20px; max-height:220px; overflow:auto; }
.toast{ position:fixed; left:50%; bottom:calc(16px + env(safe-area-inset-bottom,0px)); transform:translateX(-50%); background:var(--ink); color:var(--page); padding:10px 16px; border-radius:12px; font-size:14px; font-weight:600; z-index:20; max-width:90vw; }
@media (prefers-reduced-motion: reduce){ *{ animation:none !important; transition:none !important; } }
.seat .stk{ min-width:0; overflow:hidden; text-overflow:clip; }
@media (max-width:520px){ .seat{ padding:6px 6px 7px; } .seat .stk{ font-size:16px; } .seat .mk{ width:21px; height:21px; font-size:12px; border-radius:5px; } }

/* Rules and policy pages, footer links, agreement checkbox */
.doc{ max-width:760px; margin:0 auto; }
.doc h1{ font-size:40px; }
.doc h2{ font-size:20px; margin:22px 0 6px; }
.doc h3{ font-size:16px; margin:14px 0 4px; }
.doc p,.doc li{ color:var(--ink); font-size:16px; line-height:1.55; }
.doc p{ margin:0 0 12px; }
.doc .hero p{ color:var(--on-table-muted); margin:0; }
.doc ul,.doc ol{ margin:0 0 12px; padding-left:22px; }
.doc li{ margin-bottom:5px; }
.doc a{ color:var(--ink); }
.doc .updated{ color:var(--muted); font-size:14px; }
.doc .callout{ background:var(--page); border:1px solid var(--line); border-left:4px solid var(--rail); border-radius:10px; padding:10px 12px; margin:0 0 12px; }
.doc .scroll{ overflow-x:auto; margin:0 0 12px; }
.doc table{ border-collapse:collapse; width:100%; font-size:15px; }
.doc th,.doc td{ text-align:left; padding:7px 10px 7px 0; border-bottom:1px solid var(--line); vertical-align:top; }
.doc th{ font-size:13px; color:var(--muted); font-weight:600; }
.foot{ display:flex; flex-wrap:wrap; gap:6px 16px; justify-content:center; padding:10px 4px 0; font-size:13px; color:var(--muted); }
.foot a{ color:var(--muted); }
.foot span{ flex-basis:100%; text-align:center; }
.agree{ display:flex; gap:10px; align-items:flex-start; font-size:14px; color:var(--muted); margin:4px 0 10px; cursor:pointer; }
.agree input{ flex:none; width:20px; height:20px; margin:1px 0 0; accent-color:var(--table); }
.agree a,.panel p a{ color:var(--ink); }

.daily{ margin-top:4px; }
.streak{ display:flex; gap:6px; margin:4px 0 10px; }
.streak i{ flex:1; height:8px; border-radius:4px; background:var(--line); }
.streak i.on{ background:var(--rail); }
