@font-face{font-family:Golos;src:url(/fonts/golos-cyr.woff2) format("woff2");font-weight:400 700;font-display:swap;unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
@font-face{font-family:Golos;src:url(/fonts/golos-lat.woff2) format("woff2");font-weight:400 700;font-display:swap}
@font-face{font-family:Playfair;src:url(/fonts/playfair-cyr.woff2) format("woff2");font-weight:400 600;font-display:swap;unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
@font-face{font-family:Playfair;src:url(/fonts/playfair-lat.woff2) format("woff2");font-weight:400 600;font-display:swap}

:root {
  color-scheme: dark;
  --background: #101e19;
  --panel: #182b21;
  --ink: #fbf2df;
  --muted: #bec8b9;
  --gold: #efc88c;
  --line: #33463b;
  --accent-line: #756547;
  --error: #ffc0ad;
  --display: Playfair, Georgia, serif;
  --text: Golos, system-ui, sans-serif;
  --gutter: 24px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 280px; min-height: 100svh; display: flex; flex-direction: column; font: 400 1rem/1.5 var(--text); color: var(--ink); background: var(--background); }
main { flex: 1; }
a { color: inherit; }
figure, h1, h2, h3, p { margin: 0; }
input, button { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid #ffdc9b; outline-offset: 4px; }
.wrap { width: min(100% - 32px, 1296px); margin-inline: auto; }
.icon { width: 20px; height: 20px; display: inline-flex; flex: none; }
.icon svg { width: 100%; height: 100%; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: absolute; z-index: 20; top: 10px; left: 0; padding: 10px 18px; border-radius: 6px; background: var(--gold); color: var(--background); transform: translateY(-160%); }
.skip-link:focus { transform: none; }

.masthead { border-bottom: 1px solid var(--line); }
body:has(#game[hidden]) .masthead { position: absolute; z-index: 3; inset: 0 0 auto; }
.masthead-inner { position: relative; display: flex; min-height: 66px; align-items: center; justify-content: space-between; gap: 8px; }
.brand { display: inline-flex; min-height: 44px; align-items: center; gap: 8px; text-decoration: none; white-space: nowrap; font: 600 1.27rem/1 var(--display); }
.brand:hover { color: var(--gold); }
.brand img { display: block; width: 32px; height: 32px; }
.masthead-actions { display: flex; align-items: center; gap: 3px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 44px; border: 1px solid transparent; border-radius: 7px; padding: 10px 15px; color: var(--ink); background: #243a2d; font-weight: 600; font-size: .9rem; line-height: 1.2; text-decoration: none; }
.btn:hover { background: #314a39; }
.btn:disabled { opacity: .6; cursor: default; }
.btn.quiet { color: var(--muted); background: transparent; }
.btn.quiet:hover { color: var(--ink); background: #243629; }
.btn.icon-button { padding: 0; width: 44px; }
.masthead-actions .btn { padding-inline: 7px; }
#help-open, #invite-top { width: 44px; }
#help-open span:last-child, #invite-top span:last-child { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.btn.primary { color: #242319; background: var(--gold); border-color: var(--gold); }
.btn.primary:hover { color: #242319; background: #ffda9d; border-color: #ffda9d; }

.lobby { min-height: 100svh; display: grid; align-items: start; padding: 94px 0 25px; }
.lobby-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 23px; align-items: center; }
.entry { padding: 4px 0 0; }
.eyebrow { display: flex; align-items: center; gap: 11px; color: var(--gold); font-weight: 600; letter-spacing: .12em; font-size: .75rem; text-transform: uppercase; }
#lobby-label::after { content: ""; flex: 0 0 21px; height: 1px; background: currentColor; }
.rule { display: inline-block; flex: 0 0 21px; height: 1px; background: currentColor; }
.entry h1 { margin: 10px 0 12px; font: 500 clamp(2.85rem, 12vw, 4.3rem)/.99 var(--display); letter-spacing: -.071em; }
.entry h1 em { font-style: normal; color: var(--gold); }
.hero__lead { color: var(--muted); max-width: 365px; font-size: 1rem; line-height: 1.6; }
.entry form { display: grid; gap: 9px; margin-top: 19px; }
label { font-size: .88rem; font-weight: 600; }
.input-shell { display: flex; align-items: center; gap: 11px; border: 1px solid #586c5d; background: #172820; border-radius: 7px; padding: 0 13px; color: var(--muted); }
.input-shell:focus-within { outline: 2px solid var(--gold); outline-offset: 2px; }
input:not([type="checkbox"], [type="range"]) { width: 100%; min-width: 0; min-height: 50px; border-radius: 7px; border: 1px solid #586c5d; padding: 8px 12px; background: #172820; color: var(--ink); }
.input-shell input { background: none !important; border: none !important; padding-inline: 0 !important; }
.input-shell input:focus-visible { outline: 1px solid #edc88d77; outline-offset: -3px; }
input::placeholder { color: #a4b0a1; }
.entry .primary { min-height: 53px; width: 100%; justify-content: space-between; margin-top: 5px; font-size: 1rem; }
.button-suit { font-size: 1.3rem; }
.error { font-size: .85rem; color: var(--error); margin: 2px 0; }
.resume { display: inline-flex; align-items: center; min-height: 44px; margin-top: 10px; text-decoration-color: var(--accent-line); text-underline-offset: 4px; color: var(--gold); font-size: .9rem; }
.resume:hover { text-decoration-color: currentColor; }
.hero-art { position: relative; width: 100%; aspect-ratio: 1.55; isolation: isolate; background: #1a3326; border-radius: 5px; overflow: hidden; box-shadow: 0 22px 65px #050d09a0; border: 1px solid #465643; }
.hero-art img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 61%; }
.hero-art::after { content: ""; position: absolute; inset: 12px; border: 1px solid #dfc18961; border-radius: 2px; pointer-events: none; }
.frame-corner { position: absolute; width: 26px; height: 26px; border-color: #debf8d; border-style: solid; }
.top-left { top: 12px; left: 12px; border-width: 1px 0 0 1px; }
.bottom-right { bottom: 12px; right: 12px; border-width: 0 1px 1px 0; }
.starting-stack { display: flex; align-items: center; gap: 8px; margin-top: 14px; color: var(--muted); font-size: .84rem; }
.starting-stack strong { color: var(--ink); }
.chip { box-sizing: border-box; width: 17px; height: 17px; flex: none; display: inline-block; border: 2px dashed #e2c191; border-radius: 50%; box-shadow: inset 0 0 0 2px #142c20, inset 0 0 0 3px #ab986b; }

.game { padding-block: 25px 48px; }
.game-heading { display: flex; flex-direction: column; align-items: start; gap: 9px; margin-bottom: 15px; }
.game-heading .eyebrow { font-size: .68rem; }
.game-heading h1 { margin-top: 5px; font: 500 2.35rem/1.07 var(--display); letter-spacing: -.047em; }
.room-meta { display: flex; align-items: center; gap: 16px; color: var(--muted); font-size: .77rem; }
.room-meta b { color: var(--ink); white-space: nowrap; }
.connected { display: flex; align-items: center; gap: 7px; white-space: nowrap; }
.connected::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #8bd1a2; }
.connected.offline::before { background: #edac77; }
.game-grid { display: grid; align-items: start; gap: 14px; grid-template-columns: minmax(0, 1fr); }
.game-side { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.side-section { padding: 16px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel); min-width: 0; }
.side-title { display: flex; align-items: center; gap: 10px; }
.side-title .icon { color: var(--gold); }
.side-title h2 { font-size: .95rem; font-weight: 600; }
.hand-log { list-style: none; margin: 15px 0 0; padding: 0; display: grid; gap: 9px; font-size: .83rem; color: var(--muted); }
.hand-log li { border-top: 1px solid var(--line); padding-top: 8px; overflow-wrap: anywhere; }
.combo { margin-top: 9px; font: 500 1.47rem/1.2 var(--display); color: var(--gold); }
.table { min-height: 357px; display: grid; grid-template-rows: 1fr auto 1fr; place-items: center; gap: 8px; position: relative; isolation: isolate; border: 1px solid #425142; border-radius: 12px; background: radial-gradient(ellipse at center,#1d3828,#13251d 74%); padding: 11px 5px; overflow: hidden; }
.table-surface { position: absolute; z-index: -1; inset: 13% 5%; border-radius: 36% / 44%; border: 2px solid #988460; background: radial-gradient(ellipse at 50% 40%, #315c43, #21432f 67%, #153322); box-shadow: inset 0 0 0 6px #172d22, inset 0 0 0 7px #627851, 0 0 0 5px #111f18, 0 15px 35px #0f1911; }
.table-center { display: grid; justify-items: center; gap: 9px; padding-block: 2px; }
.table-label { font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 600; color: #ede3cb; }
.cards { display: flex; justify-content: center; gap: 6px; }
.board { gap: 5px; }
.board .card-face { --width: clamp(39px, 12vw, 60px); }
.card-face { --width: clamp(44px, 5vw, 65px); width: var(--width); aspect-ratio: 5 / 7; display: grid; place-items: center; position: relative; background: #faf2df; border: 1px solid #e1d3b3; color: #203728; border-radius: 5px; box-shadow: 0 3px 6px #0b1c1370; overflow: hidden; font-family: var(--display); font-weight: 600; }
.card-face[data-suit="h"], .card-face[data-suit="d"] { color: #a33830; }
.card-face.marked { outline: 2px solid #ffd490; outline-offset: 1px; }
.card-face.empty { box-shadow: none; border: 1px dashed #90ac86; background: #132d2090; color: #94ac9280; }
.card-face.back { color: #eabe79; background: repeating-linear-gradient(45deg, #203e2d 0 3px, #2c4936 3px 4px); border: 1px solid #d5bc8a; }
.card-face.back::before { content: ""; position: absolute; inset: 4px; border: 1px solid #bca173; border-radius: 2px; }
.card-corner { position: absolute; z-index: 1; top: 3px; left: 4px; display: grid; justify-items: center; font: 700 clamp(.62rem, 1.4vw, .94rem)/.95 var(--text); }
.card-corner.mirror { top: auto; left: auto; bottom: 3px; right: 4px; transform: rotate(180deg); }
.corner-suit { font-size: .89em; }
.card-center { font: 500 clamp(1.42rem, 3.2vw, 2.6rem)/1 Georgia, serif; }
.card-center.court { position: absolute; inset: 12% 14%; background: url(/art/court.webp) 0 center / 300% auto no-repeat; mix-blend-mode: multiply; }
.card-center.queen { inset: 9% 13%; background: url(/art/queen.webp) center / contain no-repeat; }
.card-center.king { background-position: 100% center; }
.pips { position: absolute; inset: 16% 22%; display: grid; grid-template: repeat(5, minmax(0, 1fr)) / repeat(3, minmax(0, 1fr)); place-items: center; font: 700 clamp(.48rem, 1vw, .75rem)/.7 Georgia, serif; }
.pip.reversed { transform: rotate(180deg); }
.pot { display: flex; min-height: 31px; align-items: center; gap: 6px; padding: 3px 12px; border-radius: 18px; border: 1px solid #8a9b71; background: #163424; color: #eee3cb; font-size: .83rem; }
.pot b { color: #ffdf9d; }
.table-info { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 7px; }
.mobile-combo { color: #ffdf9d; background: #193625; border: 1px solid #ab9468; border-radius: 18px; font-size: .78rem; padding: 4px 9px; }
.seat { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; max-width: 100%; }
.seat-other { flex-direction: column-reverse; }
.seat .card-face { --width: clamp(40px, 4.65vw, 57px); }
.seat .card-center { font-size: clamp(1.35rem, 2.95vw, 2.2rem); }
.player-card { display: flex; align-items: center; gap: 9px; border: 1px solid #4d6550; border-radius: 8px; background: #15291e; padding: 4px 10px 4px 5px; text-align: left; min-width: 120px; max-width: min(260px, 100%); }
.seat.current .player-card { border-color: var(--gold); box-shadow: 0 0 0 1px #e7c28833; }
.avatar { flex: none; display: grid; place-items: center; width: 31px; height: 31px; border-radius: 5px; color: var(--gold); background: #314c36; font-size: .93rem; font-weight: 600; }
.player-info { min-width: 0; }
.player-name { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .82rem; font-weight: 600; }
.player-stack { display: block; color: var(--gold); font-size: .77rem; }
.dealer { display: grid; place-items: center; flex: none; width: 20px; height: 20px; border-radius: 50%; color: #29261e; background: #f0dfb9; font-size: .74rem; font-weight: 700; }
.action-tray { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 12px; margin-top: 12px; border-radius: 9px; border: 1px solid var(--line); background: var(--panel); }
.action-summary { display: grid; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.action-summary > span { color: var(--muted); font-size: .82rem; }
.actions { display: flex; flex-wrap: wrap; width: 100%; gap: 7px; }
.actions .btn { flex: 1 1 max-content; }
.actions .fold { background: #44312b; }
.actions .fold:hover { background: #584038; }
.raise-form { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) 70px auto; align-items: center; gap: 6px; border-top: 1px solid var(--line); padding-top: 12px; }
.raise-form label { grid-column: 1 / -1; }
.raise-form input[type="range"] { width: 100%; accent-color: var(--gold); }
.raise-form input[type="number"] { min-height: 44px; padding-inline: 7px; }
.raise-form .btn { padding-inline: 8px; }
.deal-in { animation: deal-in .32s ease-out both; }
@keyframes deal-in { from { opacity: .48; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }

dialog { width: min(100% - 32px, 460px); max-height: calc(100% - 32px); padding: 23px; border-radius: 12px; background: #1a2f24; color: var(--ink); border: 1px solid #5b725c; box-shadow: 0 20px 70px #0009; }
dialog::backdrop { background: #08130fde; }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.dialog-heading h2 { font: 500 clamp(1.55rem, 6vw, 2.2rem)/1.15 var(--display); }
.dialog-heading p { color: var(--muted); }
dialog > p { margin: 11px 0; color: var(--muted); }
dialog > h3 { margin-top: 17px; font-size: .96rem; }
.rank-list { columns: 2; column-gap: 30px; margin: 10px 0 0; padding-left: 21px; color: var(--muted); font-size: .9rem; }
.rank-list li { padding-bottom: 4px; break-inside: avoid; }
.setting { min-height: 60px; display: flex; align-items: center; justify-content: space-between; gap: 13px; cursor: pointer; margin-top: 12px; }
.setting small { display: block; margin-top: 3px; color: var(--muted); font-size: .82rem; font-weight: 400; }
.setting input { appearance: none; margin: 0; width: 49px; height: 30px; flex: none; padding: 3px; border-radius: 18px; border: 1px solid #9aab97; background: #263d2e; cursor: pointer; }
.setting input::before { display: block; content: ""; width: 22px; height: 22px; border-radius: 50%; background: #d3ddce; transition: transform .18s; }
.setting input:checked { background: var(--gold); border-color: var(--gold); }
.setting input:checked::before { transform: translateX(19px); background: #233323; }
#invite-link { margin: 6px 0 12px; font-size: .85rem; }
#invite-copy { width: 100%; }
.copy-status { font-size: .85rem; margin-bottom: 0; }
.copy-status:empty { display: none; }

@media (min-width: 581px) {
  .wrap { width: calc(100% - 40px); }
  .brand { gap: 12px; font-size: 1.53rem; }
  .brand img { width: 38px; height: 38px; }
  .masthead-actions { gap: 8px; }
  #help-open, #invite-top { width: auto; padding-inline: 15px; }
  #help-open span:last-child, #invite-top span:last-child { position: static; width: auto; height: auto; clip-path: none; }
  .lobby { align-items: center; padding: 92px 0 40px; }
  .lobby-grid { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gutter); align-items: stretch; }
  .entry { grid-column: span 5; display: flex; flex-direction: column; align-items: start; padding: 0; }
  .entry h1 { margin: 15px 0 23px; font-size: clamp(2.9rem, 7vw, 4.1rem); }
  .entry h1 em { display: block; }
  .entry form { width: min(100%, 364px); margin-top: 30px; }
  .hero-art { grid-column: span 7; aspect-ratio: 1.13; }
  .hero-art img { object-position: 54% 60%; }
  .game-heading { flex-direction: row; align-items: end; justify-content: space-between; margin-bottom: 24px; gap: 16px; }
  .game-heading .eyebrow { font-size: .75rem; }
  .game-heading h1 { font-size: clamp(2.4rem, 4vw, 4rem); }
  .room-meta { font-size: .85rem; }
  .table { min-height: 475px; padding: 19px 16px; }
  .table-surface { inset: 12% 6%; border-radius: 42% / 50%; }
  .board { gap: 6px; }
  .board .card-face { --width: clamp(46px, 5vw, 65px); }
  .action-tray { padding: 16px; }
  .actions { width: auto; }
  .raise-form { grid-template-columns: minmax(0, 1fr) 94px auto; gap: 8px; }
  .raise-form .btn { padding-inline: 15px; }
}
@media (min-width: 761px) {
  .wrap { width: min(100% - 64px, 1296px); }
  .masthead-inner { min-height: 77px; }
  .lobby { padding-top: 110px; }
  .entry h1 { font-size: clamp(3.55rem, 6.35vw, 6.1rem); }
  .hero__lead { font-size: 1.11rem; }
  .game { padding-top: 35px; }
  .game-grid { grid-template-columns: minmax(0, 1fr) 226px; }
  .game-side { grid-template-columns: minmax(0, 1fr); }
  .mobile-combo { display: none; }
}
@media (min-width: 1001px) {
  .wrap { width: min(100% - 112px, 1296px); }
  .entry form { margin-top: 37px; }
  .game-grid { grid-template-columns: minmax(0, 1fr) minmax(226px, .34fr); gap: 22px; }
  .side-section { padding: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
