/* Pokerio. Extreme Overkill brand v1.0: near black, off white, silver, crimson as accent only. */
:root {
  --crimson: #E31837;
  --crimson-hover: #C41230;
  --silver: #C9CED6;
  --ink: #0B0B0F;
  --paper: #F5F6F8;
  --muted: #A3A9B4;
  --surface: #16171D;
  --surface-2: #1F2129;
  --line: #2E313B;
  --felt: #14151B;
  --display: 'Orbitron', 'Eurostile', sans-serif;
  --body: 'Montserrat', Arial, sans-serif;
  --radius: 6px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body { background: var(--ink); color: var(--paper); font: 400 16px/1.6 var(--body); -webkit-text-size-adjust: 100%; }
a { color: var(--silver); }
h1, h2 { font-family: var(--display); font-weight: 700; line-height: 1.15; margin: 0; }
h3 { font: 600 15px/1.3 var(--body); margin: 18px 0 4px; }
em { font-style: normal; color: var(--crimson); }
.muted, .hint { color: var(--muted); }
.hint { font-size: 13px; font-weight: 400; }
.centre { text-align: center; }
.defs { position: absolute; }
.error { color: var(--paper); background: #3A1219; border: 1px solid var(--crimson); border-radius: var(--radius); padding: 8px 12px; font-size: 14px; margin: 12px 0 0; }

/* Controls */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 8px 18px; border: 1px solid transparent; border-radius: var(--radius); font: 600 15px/1.2 var(--body); color: var(--paper); text-decoration: none; cursor: pointer; background: var(--surface-2); touch-action: manipulation; }
.btn.primary { background: var(--crimson); color: #fff; }
.btn.primary:hover { background: var(--crimson-hover); }
.btn.ghost { background: transparent; border-color: var(--line); }
.btn.ghost:hover { border-color: var(--silver); }
.btn.slim { min-height: 36px; padding: 4px 12px; font-size: 14px; }
.btn.wide { width: 100%; margin-top: 10px; }
.btn:disabled { opacity: .55; cursor: default; }
:focus-visible { outline: 2px solid var(--paper); outline-offset: 2px; }
label { display: block; font-size: 14px; font-weight: 600; margin: 14px 0 4px; }
input:not([type=checkbox]):not([type=range]), select { width: 100%; min-height: 44px; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--ink); color: var(--paper); font: 400 16px/1.3 var(--body); }
input::placeholder { color: var(--muted); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.check { display: flex; align-items: center; gap: 10px; font-weight: 500; }
.check input { width: 20px; height: 20px; accent-color: var(--crimson); }
input[type=range] { accent-color: var(--crimson); }

/* Wordmark */
.wordmark { display: inline-flex; align-items: center; gap: 10px; color: var(--paper); text-decoration: none; font: 700 22px/1 var(--display); letter-spacing: .04em; }
.wordmark b { color: var(--crimson); font-weight: 700; }
.wordmark.small { font-size: 16px; gap: 8px; }

/* Landing and text pages */
.page { display: flex; flex-direction: column; min-height: 100dvh; }
.site-head { padding: 20px 24px; max-width: 1120px; width: 100%; margin: 0 auto; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.landing { flex: 1; display: grid; grid-template-columns: 1.2fr minmax(320px, 420px); gap: 64px; align-items: center; max-width: 1120px; width: 100%; margin: 0 auto; padding: 24px; }
.hero h1 { font-size: clamp(34px, 5vw, 56px); }
.lead { font-size: 18px; color: var(--silver); margin: 20px 0 28px; max-width: 34em; }
.facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.facts li { padding-left: 16px; border-left: 2px solid var(--crimson); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 24px; }
.panel h2 { font-size: 24px; }
.panel .btn.wide { margin-top: 20px; }
.feedback-card { display: flex; align-items: center; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; margin-top: 40px; padding: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.feedback-card > div { flex: 1 1 280px; }
.doc .feedback-card h2 { margin: 0 0 6px; font-size: 20px; }
.feedback-card p { margin: 0; color: var(--silver); line-height: 1.5; }
.doc .feedback-card .btn { margin-top: 0; overflow-wrap: anywhere; }
.glossary dt { font-weight: 600; margin-top: 16px; }
.glossary dd { margin: 2px 0 0; color: var(--silver); line-height: 1.5; }
.site-foot { padding: 32px 24px; max-width: 1120px; width: 100%; margin: 0 auto; border-top: 1px solid var(--line); display: grid; grid-template-columns: auto auto 1fr; gap: 6px 24px; align-items: center; font-size: 14px; }
.site-foot .eo img { display: block; height: auto; }
.site-foot .tag { margin: 0; color: var(--silver); }
.site-foot nav { justify-self: end; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.site-foot .small { grid-column: 1 / -1; color: var(--muted); margin: 8px 0 0; font-size: 13px; }
.doc { flex: 1; max-width: 720px; width: 100%; margin: 0 auto; padding: 24px; }
.doc h1 { font-size: clamp(30px, 5vw, 44px); margin-bottom: 16px; }
.doc h2 { font: 600 22px/1.3 var(--body); margin: 32px 0 8px; }
.doc li { margin-bottom: 6px; }
.doc .btn { margin-top: 12px; }

/* Game layout */
.game { height: 100dvh; overflow: hidden; display: flex; flex-direction: column; }
.bar { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-bottom: 1px solid var(--line); padding-top: max(8px, env(safe-area-inset-top)); }
.table-title { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 10px; font-weight: 600; }
.table-title span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.table-title .muted { font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.guide { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; margin-bottom: 12px; }
.guide summary { cursor: pointer; font-weight: 600; }
.guide ol { margin: 10px 0 2px; padding-left: 20px; font-size: 14px; line-height: 1.5; color: var(--silver); }
.guide li + li { margin-top: 6px; }
.guide strong { color: var(--paper); }
.rules { margin: 0; padding-left: 18px; font-size: 14px; line-height: 1.6; color: var(--silver); }
.bar-actions { display: flex; gap: 6px; flex-shrink: 0; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--crimson); }
.layout { flex: 1; min-height: 0; display: grid; grid-template: minmax(0, 1fr) auto / minmax(0, 1fr) 300px; grid-template-areas: 'stage side' 'dock side'; }
.stage { grid-area: stage; position: relative; min-height: 0; overflow: hidden; }
.side { grid-area: side; display: flex; flex-direction: column; min-height: 0; border-left: 1px solid var(--line); background: var(--surface); }
.dock { grid-area: dock; border-top: 1px solid var(--line); padding: 10px 12px; padding-bottom: max(10px, env(safe-area-inset-bottom)); min-height: 76px; }
.only-mobile { display: none; }

/* Table */
.felt { position: absolute; inset: 15% 12%; border-radius: 50% / 50%; background: var(--felt); border: 3px solid #343741; box-shadow: inset 0 0 0 7px #0E0F14, inset 0 0 0 8px rgba(227, 24, 55, .55); display: flex; align-items: center; justify-content: center; }
.centre-stack { display: flex; flex-direction: column; align-items: center; gap: 8px; max-width: 72%; text-align: center; }
.board { display: flex; gap: 6px; min-height: 66px; }
.pot { font: 600 16px/1.2 var(--display); color: var(--paper); min-height: 20px; }
.status { font-size: 14px; font-weight: 500; color: var(--silver); line-height: 1.35; }

/* Cards */
.card { --w: 46px; width: var(--w); height: calc(var(--w) * 1.42); border-radius: 5px; background: var(--paper); position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; flex: none; }
.card .rank { font: 700 calc(var(--w) * .46)/1 var(--body); letter-spacing: -.02em; }
.card .suit { width: calc(var(--w) * .46); height: calc(var(--w) * .46); margin-top: 3px; fill: currentColor; }
.card.black { color: var(--ink); }
.card.red { color: var(--crimson); }
.card.back { background: #24262F; border: 2px solid var(--silver); }
.card.back::after { content: ''; position: absolute; inset: 22% 26%; background: var(--crimson); clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); }
.card.deal { animation: deal .28s ease-out both; }
@keyframes deal { from { opacity: 0; transform: translateY(-14px) scale(.92); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .card.deal { animation: none; } }

/* Seats */
#seats, #bets { position: absolute; inset: 0; pointer-events: none; }
.seat, .sit, .bet { position: absolute; transform: translate(-50%, -50%); pointer-events: auto; }
.sit { width: 58px; height: 58px; border-radius: 50%; border: 1.5px dashed #5A5F6B; background: rgba(22, 23, 29, .9); color: var(--silver); font: 600 13px/1 var(--body); cursor: pointer; }
.sit:hover:not(:disabled) { border-color: var(--paper); color: var(--paper); }
.sit:disabled { opacity: .55; cursor: default; }
.seat { width: 112px; display: flex; flex-direction: column; align-items: center; }
.hole { display: flex; justify-content: center; gap: 3px; margin-bottom: -2px; position: relative; z-index: 1; }
.hole .card { --w: 34px; }
.hole .card .suit { margin-top: 1px; }
.seat.hero .hole .card { --w: 46px; }
.plate { position: relative; z-index: 2; width: 100%; background: var(--surface-2); border: 1.5px solid var(--line); border-radius: var(--radius); padding: 5px 8px 6px; text-align: center; line-height: 1.25; }
.seat-name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.seat-stack { font: 600 13px/1.3 var(--body); color: var(--silver); white-space: nowrap; font-variant-numeric: tabular-nums; }
.seat-hand { font-size: 11px; color: var(--paper); line-height: 1.2; margin-top: 2px; }
.seat.acting .plate { border-color: var(--crimson); }
.seat.winner .plate { border-color: var(--paper); background: #2B2D37; }
.seat.folded .hole { opacity: .35; }
.seat.folded .plate { opacity: .7; }
.seat.offline .seat-name::after { content: ' · away'; font-weight: 400; color: var(--muted); }
.button-chip { position: absolute; top: -9px; right: -9px; width: 22px; height: 22px; border-radius: 50%; background: var(--paper); color: var(--ink); font: 700 12px/22px var(--body); text-align: center; }
.bet { background: var(--ink); border: 1px solid #4A4F5A; border-radius: 12px; padding: 1px 9px; font: 600 13px/1.5 var(--body); white-space: nowrap; font-variant-numeric: tabular-nums; }
.conn { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); background: var(--crimson); color: #fff; font-size: 13px; font-weight: 600; padding: 4px 12px; border-radius: 14px; z-index: 5; }

/* Action dock */
.actions { display: flex; flex-direction: column; gap: 8px; max-width: 720px; margin: 0 auto; }
.idle { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 10px; min-height: 52px; text-align: center; }
.turn-buttons { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; }
.turn-buttons .btn { min-height: 52px; padding: 6px 8px; }
.btn.fold { background: transparent; border-color: #5A5F6B; }
.btn.fold:hover { border-color: var(--paper); }
.btn.call { background: var(--paper); color: var(--ink); }
.btn.call:hover { background: var(--silver); }
.raise-row { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.presets { display: flex; gap: 6px; }
.presets .btn { padding: 4px 10px; white-space: nowrap; }
.slide { flex: 1; min-width: 180px; display: flex; align-items: center; gap: 10px; }
.slide input[type=range] { flex: 1; min-width: 0; height: 32px; }
input.raise-input:not([type=checkbox]):not([type=range]) { width: 92px; flex: none; min-height: 36px; padding: 4px 8px; }
.requests { display: grid; gap: 6px; max-width: 720px; margin: 0 auto 8px; }
.request { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.request span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Chat and log */
.side-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: 14px; min-height: 48px; }
.feed { flex: 1; min-height: 0; overflow-y: auto; padding: 10px 14px; font-size: 13px; line-height: 1.45; overflow-wrap: anywhere; }
.feed p { margin: 0 0 5px; }
.feed .log { color: var(--muted); }
.feed .chat b { font-weight: 600; }
.chat-form { display: flex; gap: 6px; padding: 10px; border-top: 1px solid var(--line); }
.chat-form input { min-height: 36px; padding: 4px 10px; font-size: 16px; }

/* Dialogs */
.dlg { width: min(440px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); overflow-y: auto; background: var(--surface); color: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 24px; }
.dlg::backdrop { background: rgba(5, 5, 8, .72); }
.dlg h2 { font-size: 22px; overflow-wrap: anywhere; }
.dlg h3 { border-top: 1px solid var(--line); padding-top: 14px; }
.eyebrow { font-size: 13px; font-weight: 600; color: var(--silver); margin: 0 0 4px; }
.dlg-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.link-row { display: flex; gap: 8px; margin: 16px 0 10px; }
.link-row input { flex: 1; min-width: 0; font-size: 14px; }
.people { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.people li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 14px; }
.people li span { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.toast { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); background: var(--paper); color: var(--ink); font-size: 14px; font-weight: 600; padding: 8px 16px; border-radius: var(--radius); z-index: 20; max-width: calc(100vw - 32px); }

/* Tablets and phones */
@media (max-width: 960px) {
  .layout { grid-template: minmax(0, 1fr) auto / minmax(0, 1fr); grid-template-areas: 'stage' 'dock'; }
  .side { position: fixed; inset: 0 0 0 auto; width: min(340px, 100vw); z-index: 10; transform: translateX(100%); visibility: hidden; transition: transform .18s; border-left: 1px solid var(--line); }
  .chat-open .side { transform: none; visibility: visible; }
  .only-mobile { display: inline-flex; }
}
@media (max-width: 760px) {
  .landing { grid-template-columns: 1fr; gap: 28px; padding: 8px 16px 24px; }
  .site-head { padding: 16px; }
  .site-foot { grid-template-columns: 1fr; padding: 24px 16px; }
  .site-foot nav { justify-self: start; }
  .doc { padding: 8px 16px 24px; }
}
@media (max-width: 560px) {
  .bar { gap: 8px; padding-left: 8px; padding-right: 8px; }
  .wordmark.small span { display: none; }
  .table-title { flex-direction: column; align-items: stretch; gap: 0; line-height: 1.2; font-size: 14px; }
  .bar-actions .btn { padding: 4px 9px; font-size: 13px; }
  .felt { inset: 13% 15%; border-radius: 46% / 34%; }
  .centre-stack { max-width: 88%; }
  .board { gap: 3px; min-height: 50px; }
  .board .card { --w: 35px; }
  .pot { font-size: 14px; }
  .status { font-size: 12px; }
  .seat { width: 78px; }
  .plate { padding: 3px 5px 4px; }
  .seat-name { font-size: 12px; }
  .seat-stack { font-size: 12px; }
  .hole .card { --w: 25px; border-radius: 3px; }
  .hole .card .rank { font-size: 12px; }
  .hole .card .suit { width: 12px; height: 12px; margin-top: 0; }
  .seat.hero { width: 104px; }
  .seat.hero .hole .card { --w: 38px; border-radius: 5px; }
  .seat.hero .hole .card .rank { font-size: 17px; }
  .seat.hero .hole .card .suit { width: 17px; height: 17px; margin-top: 2px; }
  .sit { width: 46px; height: 46px; font-size: 12px; }
  .bet { font-size: 11px; padding: 0 7px; }
  .dock { padding: 8px; }
  .presets { width: 100%; }
  .presets .btn { flex: 1; padding: 4px 2px; font-size: 13px; }
}
@media (max-height: 520px) and (orientation: landscape) {
  .felt { inset: 16% 18%; }
  .board .card { --w: 34px; }
  .board { min-height: 48px; }
  .centre-stack { flex-direction: row; gap: 10px; max-width: 86%; }
  .seat { width: 88px; }
  .plate { padding: 2px 5px 3px; }
  .seat-name { font-size: 12px; }
  .seat-stack { font-size: 11px; }
  .seat-hand { display: none; }
  .hole .card, .seat.hero .hole .card { --w: 20px; border-radius: 3px; }
  .hole .card .rank, .seat.hero .hole .card .rank { font-size: 11px; }
  .hole .card .suit, .seat.hero .hole .card .suit { width: 10px; height: 10px; margin-top: 0; }
  .dock { min-height: 0; padding: 6px 10px; }
  .idle { min-height: 40px; }
  .raise-row { flex-wrap: nowrap; }
  .turn-buttons .btn { min-height: 40px; }
}
.deck-call { position: relative; z-index: 1; min-height: 30px; padding: 2px 10px; font-size: 13px; white-space: nowrap; }
.deck-call.armed { border-color: var(--crimson); color: var(--paper); }

/* End of game */
.dlg-wide { width: min(760px, calc(100vw - 32px)); }
.dlg h4 { font: 600 14px/1.3 var(--body); margin: 16px 0 6px; }
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 12px 0; }
.tile { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; }
.tile strong { display: block; font: 700 24px/1.2 var(--body); font-variant-numeric: tabular-nums; }
.tile span { font-size: 12px; color: var(--muted); line-height: 1.3; display: block; }
.table-scroll { overflow-x: auto; }
.stats-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.stats-table th, .stats-table td { padding: 6px 8px; text-align: left; white-space: nowrap; border-bottom: 1px solid var(--line); }
.stats-table th { font-size: 12px; font-weight: 600; color: var(--muted); }
.stats-table tbody tr:first-child td { font-weight: 700; }
.stats-table .num, .suit-bar .num { text-align: right; font-variant-numeric: tabular-nums; }
.awards { list-style: none; padding: 0; margin: 8px 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.awards li { padding-left: 12px; border-left: 2px solid var(--crimson); font-size: 14px; line-height: 1.35; }
.awards strong, .awards span { display: block; }
.awards span { color: var(--silver); }
.chart { position: relative; touch-action: pan-y; }
.chart svg { display: block; max-width: 100%; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .cross { stroke: var(--muted); stroke-width: 1; }
.chart .tick { fill: var(--muted); font: 500 11px var(--body); }
.chart-tip { position: absolute; top: 8px; width: 140px; background: var(--ink); border: 1px solid var(--line); border-radius: var(--radius); padding: 6px 8px; font-size: 12px; line-height: 1.5; pointer-events: none; }
.chart-tip div { display: flex; align-items: center; gap: 5px; }
.chart-tip span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chart-tip b { font-weight: 600; font-variant-numeric: tabular-nums; }
.chart-tip i, .legend i { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.legend { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; color: var(--silver); }
.legend li { display: flex; align-items: center; gap: 6px; }
.suit-bars { display: grid; gap: 6px; margin: 8px 0; }
.suit-bar { display: grid; grid-template-columns: 68px 1fr 36px; align-items: center; gap: 8px; font-size: 13px; }
.suit-track { position: relative; height: 12px; }
.suit-track i { display: block; height: 100%; background: var(--crimson); border-radius: 0 4px 4px 0; }
.suit-track b { position: absolute; top: -2px; bottom: -2px; width: 2px; background: var(--paper); }
.luck-grid { border-collapse: separate; border-spacing: 2px; font-size: 12px; width: 100%; min-width: 300px; table-layout: fixed; }
.luck-grid th { font-weight: 600; color: var(--muted); padding: 2px 0; text-align: center; }
.luck-grid td { --heat: 0; text-align: center; padding: 4px 0; border-radius: 3px; font-variant-numeric: tabular-nums; background: color-mix(in srgb, var(--crimson) calc(var(--heat) * 70%), var(--surface-2)); }
#stats-share { margin-top: 14px; }
@media (max-width: 560px) {
  .tiles { grid-template-columns: 1fr 1fr; }
  .awards { grid-template-columns: 1fr; }
}
/* Pages for search */
.site-head nav { margin-left: auto; display: flex; gap: 16px; font-size: 14px; }
.more { flex: none; max-width: 1120px; padding-top: 8px; }
.more h2 { font: 600 26px/1.25 var(--body); margin: 40px 0 10px; }
.more h3 { font: 600 17px/1.35 var(--body); margin: 20px 0 4px; border: 0; padding: 0; }
.more .cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.ranks { padding-left: 24px; }
.ranks li { margin-bottom: 26px; }
.doc .ranks h2 { margin: 0; font-size: 18px; }
.ranks p { margin: 2px 0 8px; color: var(--silver); }
.hand-cards { display: flex; flex-wrap: wrap; gap: 4px; }
.hand-cards .card { --w: 44px; }
.hand-cards .kicker { opacity: .45; }
.defs { position: absolute; }
@media (max-width: 760px) { .more .cols { grid-template-columns: 1fr; gap: 0; } }

/* Hand rankings quick reference */
.btn-ranks { min-width: 36px; padding-left: 0; padding-right: 0; font-weight: 700; }
.btn-ranks[aria-expanded="true"] { border-color: var(--paper); }
.ranks-panel { position: absolute; z-index: 20; top: 4px; right: 4px; width: min(300px, calc(100% - 8px)); max-height: calc(100% - 8px); overflow-y: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 6px 10px 8px; box-shadow: 0 8px 28px rgba(0, 0, 0, .55); }
.ranks-panel[hidden] { display: none; }
.ranks-head { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.ranks-head .muted { flex: 1; font-size: 12px; }
.ranks-head .btn { min-height: 28px; padding: 2px 8px; font-size: 12px; }
.ranks-panel ol { list-style: none; margin: 4px 0 0; padding: 0; counter-reset: rank; }
.ranks-panel li { counter-increment: rank; display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; line-height: 1.2; padding: 2px 0; }
.ranks-panel li > span::before { content: counter(rank) '. '; color: var(--muted); font-variant-numeric: tabular-nums; }
.ranks-cards { display: flex; gap: 2px; flex: none; }
.ranks-panel .card { --w: 19px; border-radius: 2px; }
.ranks-panel .card .rank { font-size: 10px; letter-spacing: -.05em; }
.ranks-panel .card .suit { width: 10px; height: 10px; margin-top: 1px; }
.ranks-panel .kicker { opacity: .45; }
@media (max-height: 520px) and (orientation: landscape) {
  .ranks-panel { width: min(560px, calc(100% - 8px)); }
  .ranks-panel ol { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
  .ranks-panel .card { --w: 17px; }
}

/* Feedback */
.feedback { margin-top: 18px; }
.feedback-ratings { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.feedback-ratings .btn { flex: 1; min-height: 40px; white-space: nowrap; }
.feedback-ratings .btn[aria-pressed="true"] { border-color: var(--crimson); background: var(--surface-2); }
.feedback textarea { width: 100%; resize: vertical; background: var(--ink); color: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 10px; font: inherit; }
.feedback .btn.wide { margin-top: 8px; }
.feedback-thanks { margin-top: 18px; color: var(--silver); text-align: center; }

/* The pack: old deck into the bin, new one torn open. Nothing here blocks a click. */
.pack-fx { --pw: 68px; --delay: 0s; position: absolute; inset: 0; z-index: 15; pointer-events: none; display: flex; align-items: center; justify-content: center; }
.pack-fx.swap { --delay: .95s; }
.pack { position: relative; width: var(--pw); height: calc(var(--pw) * 1.42); perspective: 320px; animation: pack-life 1.4s var(--delay) both; }
.pack-face { position: absolute; inset: 0; z-index: 2; display: flex; align-items: center; justify-content: center; background: linear-gradient(160deg, var(--crimson), #9E0F26); border: 1.5px solid #FF5A73; border-radius: 6px; box-shadow: 0 10px 26px rgba(0, 0, 0, .6); }
.pack-face img { width: 58%; }
.pack-flap { position: absolute; z-index: 3; left: 0; right: 0; top: 0; height: 22%; background: #7E0B1E; border: 1.5px solid #FF5A73; border-radius: 6px 6px 2px 2px; transform-origin: top; animation: pack-flap 1.4s var(--delay) both; }
.pack-cards { position: absolute; z-index: 1; inset: 4% 6%; }
.pack-cards .card, .old-pile .card { --w: calc(var(--pw) * .88); position: absolute; left: 0; top: 0; }
.pack-cards .card { animation: pack-rise 1.4s var(--delay) both; }
.pack-cards .card:nth-child(1) { --turn: -14deg; --side: -34%; }
.pack-cards .card:nth-child(2) { --turn: 0deg; --side: 0%; }
.pack-cards .card:nth-child(3) { --turn: 14deg; --side: 34%; }
.old-pile { position: absolute; left: calc(50% - var(--pw) * .44); top: calc(50% - var(--pw) * .62); width: calc(var(--pw) * .88); height: calc(var(--pw) * 1.25); animation: pile-to-bin .95s ease-in both; }
.old-pile .card:nth-child(2) { transform: translate(2px, -2px); }
.old-pile .card:nth-child(3) { transform: translate(4px, -4px); }
.pack-bin { position: absolute; width: calc(var(--pw) * .8); height: calc(var(--pw) * .8); left: calc(50% + var(--pw) * 1.5); top: calc(50% - var(--pw) * .2); fill: var(--silver); animation: bin-life 1.05s both; }
.pack-caption { position: absolute; left: 0; right: 0; top: calc(50% + var(--pw) * .78); margin: 0; text-align: center; font: 700 15px/1.2 var(--display); color: var(--paper); text-shadow: 0 1px 6px #000; animation: pack-life 1.4s var(--delay) both; }
@keyframes pack-life {
  0% { opacity: 0; transform: translateY(14px) scale(.6); }
  16%, 82% { opacity: 1; transform: none; }
  100% { opacity: 0; transform: scale(1.08); }
}
@keyframes pack-flap {
  0%, 26% { transform: rotateX(0); }
  46%, 100% { transform: rotateX(172deg); }
}
@keyframes pack-rise {
  0%, 40% { transform: none; }
  68%, 100% { transform: translate(var(--side), -62%) rotate(var(--turn)); }
}
@keyframes pile-to-bin {
  0%, 22% { opacity: 1; transform: none; }
  88% { opacity: 1; transform: translate(calc(var(--pw) * 1.62), calc(var(--pw) * .1)) rotate(24deg) scale(.5); }
  100% { opacity: 0; transform: translate(calc(var(--pw) * 1.62), calc(var(--pw) * .24)) rotate(24deg) scale(.3); }
}
@keyframes bin-life {
  0% { opacity: 0; transform: scale(.7); }
  16%, 82% { opacity: 1; transform: none; }
  88% { opacity: 1; transform: rotate(-7deg); }
  94% { opacity: 1; transform: rotate(6deg); }
  100% { opacity: 0; transform: none; }
}
@media (max-height: 520px) and (orientation: landscape) { .pack-fx { --pw: 42px; } .pack-caption { font-size: 12px; } }
@media (prefers-reduced-motion: reduce) { .pack-fx { display: none; } }

/* One page per game, then overall */
.stats-tabs { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 8px; }
.stats-tabs .btn { flex: none; min-height: 34px; padding: 4px 12px; font-size: 13px; }
.stats-tabs .btn[aria-selected="true"] { border-color: var(--crimson); background: var(--surface-2); color: var(--paper); }

.toast { pointer-events: none; }

/* The narrowest phones with a full table: five shared cards must clear the side seats. */
@media (max-width: 384px) {
  .board { gap: 2px; }
  .board .card { --w: 32px; }
}
@media (max-width: 340px) {
  .board .card { --w: 29px; }
}
@media (max-width: 300px) {
  .wordmark.small { display: none; }
  .bar { gap: 6px; }
  .bar-actions { gap: 4px; }
  .bar-actions .btn { padding: 4px 6px; font-size: 12px; }
  .board { gap: 1px; }
  .board .card { --w: 25px; }
  .seat { width: 64px; }
  .seat-name, .seat-stack { font-size: 11px; }
  .hole .card { --w: 22px; }
}
/* Phones on their side with the browser's bars showing: the table is very short. */
@media (max-height: 350px) and (orientation: landscape) {
  .board { min-height: 36px; gap: 2px; }
  .board .card { --w: 25px; }
  .board .card .rank { font-size: 12px; }
  .board .card .suit { width: 12px; height: 12px; margin-top: 1px; }
  .bet { font-size: 10px; padding: 0 5px; line-height: 1.3; }
}

/* Phones upright: the table name and blinds get their own line under the buttons, so long blinds and the clock stay readable. */
@media (max-width: 460px) {
  .bar { flex-wrap: wrap; row-gap: 4px; }
  .bar-actions { margin-left: auto; gap: 4px; }
  .bar-actions .btn { padding: 4px 7px; }
  .bar-actions .btn-ranks { min-width: 30px; padding-left: 0; padding-right: 0; }
  .table-title { order: 3; flex: 1 0 100%; flex-direction: row; align-items: baseline; gap: 8px; }
  .table-title #table-name { flex: 0 1 auto; min-width: 0; }
  .table-title #table-blinds { flex: 0 0 auto; margin-left: auto; overflow: visible; }
}

/* Short upright phones: the two-line header takes height from the table, so seats get shorter to keep a full table apart. */
@media (max-width: 460px) and (max-height: 599px) {
  .plate { padding: 2px 5px 2px; }
  .hole .card { --w: 20px; border-radius: 3px; }
  .hole .card .rank { font-size: 11px; }
  .hole .card .suit { width: 10px; height: 10px; margin-top: 0; }
}
