:root {
  color-scheme: dark;
  --paper: #f2f1e5;
  --muted: #a0a697;
  --lime: #d8ee92;
  --bg: #111410;
  --surface: #191d17;
  --line: #343b2d;
  --serif: 'Fraunces', Georgia, serif;
  --sans: 'DM Sans', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: radial-gradient(ellipse at 41% 0, #202619 0, transparent 45rem), var(--bg); color: var(--paper); font: 1rem/1.5 var(--sans); }
a { color: inherit; }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 2px solid var(--lime); outline-offset: 4px; }
h1, h2, p { margin: 0; }
.shell { width: min(100% - 72px, 1216px); margin-inline: auto; }
.mono, .eyebrow { font-family: var(--mono); }
.topbar { border-bottom: 1px solid #343a2e; background: #121611ba; }
.nav, .nav-end, .brand { display: flex; align-items: center; }
.nav { justify-content: space-between; min-height: 68px; }
.brand { gap: 0; color: var(--paper); text-decoration: none; font-size: 21px; font-weight: 700; letter-spacing: -.06em; }
.brand-light { color: var(--lime); }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; margin-right: 10px; border-radius: 9px; color: #111711; background: var(--lime); font: 26px/1 Georgia, serif; }
.nav-end { gap: 18px; }
.network, .log-badge { display: inline-flex; align-items: center; gap: 8px; font: 500 11px var(--mono); color: var(--lime); white-space: nowrap; }
.network { background: #20291a; border: 1px solid #394631; padding: 9px 12px; border-radius: 999px; }
.led { display: inline-block; flex: none; width: 6px; height: 6px; border-radius: 50%; background: #cde983; box-shadow: 0 0 8px #ceff7a57; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 14px; border: 1px solid transparent; border-radius: 7px; color: var(--paper); font-size: 14px; font-weight: 700; transition: background .18s ease, border-color .18s ease, color .18s ease; }
.button-outline { background: #20251d; border-color: #394233; }
.button-outline:not(:disabled):hover { background: #2a3325; border-color: #71815d; }
.button-primary { background: var(--lime); color: #151b11; border-color: var(--lime); }
.button-primary:not(:disabled):hover { background: #e6f7ae; border-color: #e6f7ae; }
.button:disabled { opacity: .43; }
.nav-rules { min-height: 36px; font-size: 13px; }
.intro { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; padding: 43px 0 29px; }
.eyebrow { display: flex; align-items: center; gap: 8px; color: var(--lime); letter-spacing: .13em; font-size: 11px; font-weight: 600; }
.intro h1 { font: 550 clamp(2.8rem, 6vw, 5.3rem)/.98 var(--serif); letter-spacing: -.065em; margin: 11px 0 15px; }
.intro h1 em { color: var(--lime); font-weight: 500; }
.intro p { color: #bfc3b5; font-size: 15px; }
.intro-index { display: grid; gap: 4px; justify-items: end; flex-shrink: 0; padding-bottom: 4px; color: var(--muted); font: 10px var(--mono); letter-spacing: .13em; }
.intro-index strong { font-size: 14px; color: var(--paper); font-weight: 500; }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; align-items: start; gap: 17px; }
.table-panel, .side-panel { border: 1px solid var(--line); border-radius: 13px; background: var(--surface); }
.table-panel { overflow: hidden; }
.table-header { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 16px 23px; border-bottom: 1px solid #30382c; }
.room-label { font-size: 9px; color: #b4c393; }
.table-header h2 { color: var(--paper); font: 550 25px/1.12 var(--serif); letter-spacing: -.03em; margin-top: 3px; }
.blinds { display: flex; align-items: center; gap: 7px; flex-shrink: 0; border: 1px solid #374330; padding: 6px 9px; border-radius: 5px; color: #e4ead9; font: 500 12px var(--mono); background: #20271d; }
.blinds > span { color: var(--lime); }
.blinds small { color: var(--muted); font-size: 9px; }
.stage { display: grid; position: relative; isolation: isolate; justify-items: center; align-content: space-between; min-height: 374px; padding: 16px 10px 15px; background: radial-gradient(ellipse at center, #2d3f2a 0, #1e271c 64%, #191e17 90%); }
.felt { pointer-events: none; overflow: hidden; position: absolute; z-index: -1; inset: 44px 6.5% 37px; display: grid; place-items: center; border: 8px solid #29402b; border-radius: 42% / 50%; color: #b3d5820e; background: radial-gradient(ellipse at 50% 33%, #335534, #213b27 72%); box-shadow: 0 0 0 1px #5e6b47, 0 0 0 5px #182019, 0 17px 22px #0d140e9e, inset 0 0 0 1px #7a97535c, inset 0 0 35px #0d221c8a; font: 205px/.8 Georgia, serif; }
.felt::before, .felt::after { position: absolute; content: ''; inset: 9px; border: 1px solid #b2d28938; border-radius: 42% / 50%; }
.felt::after { inset: 0; border: 0; border-radius: 0; opacity: .18; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Cpath fill='%23fff' filter='url(%23n)' opacity='.45' d='M0 0h140v140H0z'/%3E%3C/svg%3E"); }
.felt > span { transform: translateY(-10px); }
.seat { display: grid; justify-items: center; gap: 6px; min-width: 119px; }
.seat-label { position: relative; display: flex; align-items: center; gap: 8px; min-width: 115px; padding: 5px 10px 5px 6px; border-radius: 8px; border: 1px solid #576647; background: #1a231b; box-shadow: 0 5px 10px #10161260; }
.seat.active .seat-label { border-color: #b1cb74; box-shadow: 0 0 17px #a8cd5550; }
.seat-label strong { display: flex; align-items: center; gap: 5px; color: #f0f0e4; font-size: 12px; line-height: 1.2; }
.seat-stack { display: block; font: 11px/1.4 var(--mono); color: #bccda4; }
.bot-tag { font: 500 8px var(--mono); color: #bfc9b0; border: 1px solid #465340; border-radius: 3px; padding: 1px 3px; }
.avatar { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 5px; font: 650 20px/1 var(--serif); }
.avatar-bot { color: #e9cc97; background: linear-gradient(150deg, #534636, #363026); }
.avatar-player { color: #263317; background: #bdce83; }
.dealer { display: grid; place-items: center; position: absolute; left: calc(100% + 5px); width: 20px; height: 20px; border-radius: 50%; color: #211f16; background: #dedbc2; border: 2px solid #a9a489; font: 700 10px var(--mono); }
.hole, .board { display: flex; justify-content: center; gap: 5px; }
.hole { min-height: 45px; }
.table-center { display: grid; justify-items: center; gap: 9px; }
.pot { display: inline-flex; align-items: center; gap: 7px; min-height: 28px; padding: 5px 9px; border: 1px solid #78945676; border-radius: 999px; font: 500 10px var(--mono); color: #c2d0ae; background: #1d3526; }
.pot strong { color: #e2f3a8; font-size: 13px; }
.chip { width: 13px; height: 13px; display: inline-block; border: 2px dashed #dbeaa9; border-radius: 50%; background: #718451; box-shadow: 0 0 0 1px #8fa468; }
.card { position: relative; display: grid; width: 54px; aspect-ratio: 5 / 7; border-radius: 5px; border: 1px solid #e0ddc8; background: #f4f0df; color: #1e2a22; box-shadow: 0 4px 7px #13201755; }
.card-rank { position: absolute; top: 5px; left: 6px; font: 650 19px/.9 var(--serif); }
.card-suit { place-self: end center; margin-bottom: 5px; font: 33px/.9 Georgia, serif; }
.card.red { color: #a33239; }
.card.empty { place-items: center; border: 1px dashed #a2bf7869; background: #20352485; color: #b0c58a55; box-shadow: none; font: 22px Georgia, serif; }
.card.back { color: #b8ca84; border: 2px solid #c9d399; background: repeating-linear-gradient(45deg, #53683c 0 2px, #374e30 2px 5px); place-items: center; font: 17px Georgia, serif; }
.card.back > span { display: grid; place-items: center; width: 69%; height: 79%; border: 1px solid #b5c68a; background: #314830; border-radius: 30%; }
.hole .card { width: 33px; }
.player-seat .hole .card { width: 44px; }
.hole .card-rank { top: 3px; left: 4px; font-size: 15px; }
.hole .card-suit { margin-bottom: 3px; font-size: 20px; }
.player-seat .card-rank { top: 4px; left: 5px; font-size: 18px; }
.player-seat .card-suit { font-size: 26px; }
.streets { display: flex; gap: 5px; color: #c0ceaf; }
.streets span { font: 9px/1 var(--mono); text-transform: uppercase; letter-spacing: .035em; padding: 4px; border: 1px solid transparent; }
.streets .current { color: #eff9c9; background: #46603a; border-color: #769553; border-radius: 4px; }
.controls { display: grid; gap: 11px; padding: 14px 23px 17px; border-top: 1px solid #30382c; }
.turn-line { display: flex; justify-content: space-between; align-items: start; gap: 8px; }
.turn { font-size: 13px; color: #e4ead4; }
.hand-number { color: var(--muted); font-size: 10px; padding-top: 2px; white-space: nowrap; }
.actions { display: grid; grid-template-columns: 1fr 1fr 1.23fr; gap: 8px; }
.next { justify-self: stretch; }
.raise-panel { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; }
.raise-panel output { color: var(--paper); font: 500 13px var(--mono); }
.raise-panel input { min-width: 0; width: 100%; accent-color: var(--lime); }
.raise-panel button { min-height: 34px; font-size: 12px; }
.sidebar { display: grid; gap: 14px; min-width: 0; }
.side-panel { padding: 18px; }
.side-icon { display: grid; place-items: center; width: 38px; height: 38px; margin-bottom: 14px; border-radius: 9px; color: var(--lime); border: 1px solid #455337; background: #293522; }
.side-icon svg { width: 20px; height: 20px; }
.side-kicker { color: #a9bd83; font-size: 9px; }
.side-panel h2 { font: 550 24px/1.18 var(--serif); letter-spacing: -.035em; margin: 4px 0 8px; }
.side-panel p { color: #adb5a3; font-size: 13px; }
.wallet-button { display: flex; width: 100%; justify-content: space-between; text-align: left; margin-top: 12px; }
.wallet-button > span + span { color: var(--lime); }
.wallet-footer { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; border-top: 1px solid var(--line); color: #bac7a6; font: 10px var(--mono); margin-top: 15px; padding-top: 13px; }
.wallet-footer a { color: var(--lime); text-underline-offset: 2px; }
.wallet-separator { color: #8a957f; }
.wallet-details { font: 11px var(--mono); margin: 12px 0 0; }
.wallet-details div { display: flex; justify-content: space-between; gap: 6px; padding-block: 4px; }
.wallet-details dt { color: var(--muted); }
.wallet-details dd { margin: 0; overflow-wrap: anywhere; }
.wallet .wallet-message { margin-top: 10px; color: #e1e9c5; }
.activity-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.activity-header h2 { margin: 0; font-size: 21px; }
.log-badge { font-size: 9px; gap: 6px; }
.log { list-style: none; margin: 5px 0 0; padding: 0; display: grid; align-content: start; max-height: 140px; min-height: 55px; overflow: auto; }
.log li { color: #b0bba7; display: flex; align-items: start; gap: 8px; padding: 7px 2px; font-size: 12px; border-bottom: 1px solid #2c3528; }
.log li:first-child { color: var(--paper); }
.log li:last-child { border-bottom: 0; }
.log li::before { content: '◆'; font-size: 7px; color: #a6be6d; margin-top: 3px; }
.notice { display: flex; gap: 9px; padding: 13px 14px; color: #b9c2ae; background: #22291d; border: 1px solid #3b4634; border-radius: 9px; font-size: 12px; }
.notice span { color: var(--lime); }
.notice strong { display: block; font-size: 12px; color: #e0ebcb; }
.footer { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 27px; padding: 15px 0 22px; border-top: 1px solid var(--line); color: var(--muted); font: 9px var(--mono); letter-spacing: .09em; }
.footer button { color: #c1c8b7; background: transparent; border: 0; padding: 8px 4px; text-decoration: underline; text-underline-offset: 3px; }
dialog { color: var(--paper); background: var(--surface); border: 1px solid #697c54; border-radius: 13px; width: min(calc(100% - 24px), 480px); padding: 23px; }
dialog::backdrop { background: #070c08c7; }
.dialog-heading { display: flex; justify-content: space-between; align-items: center; }
dialog h2 { margin-top: 3px; font: 550 31px var(--serif); }
dialog p { margin-top: 13px; color: #bec7b3; font-size: 14px; }
.close { width: 42px; font-size: 22px; }
.noscript { margin-bottom: 12px; color: var(--lime); }

@media (max-width: 875px) {
  .shell { width: calc(100% - 40px); }
  .layout { grid-template-columns: minmax(0, 1fr) 253px; gap: 11px; }
  .side-panel { padding: 14px; }
  .felt { inset-inline: 5%; }
}
@media (max-width: 680px) {
  .shell { width: calc(100% - 28px); }
  .nav { min-height: 58px; }
  .nav-end { gap: 7px; }
  .brand { font-size: 19px; }
  .brand-mark { width: 30px; height: 30px; margin-right: 6px; }
  .network { font-size: 9px; padding: 6px 7px; gap: 5px; }
  .nav-rules { padding-inline: 6px; font-size: 11px; }
  .intro { padding: 30px 0 23px; }
  .intro h1 { margin-bottom: 10px; }
  .intro p { font-size: 14px; }
  .intro-index { display: none; }
  .layout { grid-template-columns: minmax(0, 1fr); }
  .table-header, .controls { padding-inline: 12px; }
  .stage { min-height: 346px; padding-top: 14px; }
  .felt { inset-inline: 4.5%; }
  .card { width: clamp(37px, 11vw, 53px); }
  .card-rank { font-size: 16px; }
  .card-suit { font-size: 26px; }
  .player-seat .hole .card { width: 40px; }
  .sidebar { gap: 10px; }
}
@media (max-width: 345px) {
  .nav-rules { display: none; }
  .raise-panel { grid-template-columns: auto minmax(0, 1fr) auto; gap: 5px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
