:root {
  color-scheme: dark;
  --bg: #171412;
  --panel: #211b19;
  --panel-soft: #2a2220;
  --felt: #512b2c;
  --felt-deep: #321d20;
  --line: #493b38;
  --line-soft: #604942;
  --text: #f1eee7;
  --muted: #aaa098;
  --gold: #d8b36e;
  --red: #b7443c;
  --green-muted: #91a18e;
  --shadow: 0 16px 44px #0008;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  color: var(--text);
  background: radial-gradient(ellipse at 50% -18%, #382321 0, #211918 34%, var(--bg) 73%);
  font-family: -apple-system, BlinkMacSystemFont, "Avenir Next", "Segoe UI", sans-serif;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .1;
  background-image: radial-gradient(#d9b77e .5px, transparent .5px);
  background-size: 29px 29px;
}
button, input, select { font: inherit; }
button {
  border: 1px solid transparent;
  border-radius: 10px;
  min-height: 42px;
  padding: 10px 14px;
  font-weight: 750;
  color: var(--text);
  background: var(--panel-soft);
  cursor: pointer;
  transition: transform .14s ease, background-color .14s ease, border-color .14s ease, opacity .14s ease;
  -webkit-tap-highlight-color: transparent;
}
button:hover:not(:disabled) { transform: translateY(-1px); border-color: #89644c; }
button:active:not(:disabled) { transform: translateY(1px) scale(.99); }
button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
button:disabled { opacity: .4; cursor: not-allowed; }
.hidden { display: none !important; }
.app-shell { position: relative; width: min(1540px, 100%); margin: 0 auto; padding: 10px 22px 24px; }
.topbar { min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 10px; }
.table-identity { display: grid; gap: 3px; min-width: 0; }
.table-identity strong { color: #f2e6cf; font-size: 16px; letter-spacing: .015em; }
.table-identity span { color: var(--muted); font-size: 11px; }
.topbar-right { display: flex; align-items: center; gap: 9px; }
.connection { display: flex; align-items: center; gap: 7px; border: 1px solid #51443d; border-radius: 999px; padding: 6px 10px; color: #c6b9a9; font-size: 11px; white-space: nowrap; }
.connection i { width: 7px; height: 7px; border-radius: 50%; background: #82776f; }
.connection.connected i { background: var(--green-muted); box-shadow: 0 0 8px #91a18e80; }
.connection.reconnecting i { background: var(--gold); }
.connection.disconnected i { background: var(--red); }
.room-code { display: flex; align-items: center; gap: 4px; border: 1px solid #51443d; border-radius: 999px; padding: 3px 4px 3px 10px; color: #e5cf9e; font-size: 10px; font-weight: 800; letter-spacing: .08em; }
.room-code button { min-height: 27px; width: 28px; padding: 0; border-radius: 50%; background: transparent; color: #e5cf9e; font-size: 17px; }
.icon-button { display: grid; place-items: center; width: 36px; min-height: 36px; padding: 0; border: 1px solid #5c473e; border-radius: 50%; background: #211918; color: #e2c17d; font-size: 20px; }
.icon-button:hover:not(:disabled) { background: #362522; border-color: var(--gold); }
.eyebrow { margin: 0 0 8px; color: var(--gold); font-size: 11px; font-weight: 800; letter-spacing: .16em; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(28px, 4vw, 48px); line-height: 1.06; letter-spacing: -.025em; }
h2 { margin-bottom: 12px; font-size: 16px; }
.muted, .hint { color: var(--muted); font-size: 12px; line-height: 1.5; }
.hint { margin: 5px 0 0; }
.error { min-height: 18px; margin: 9px 0 0; color: #f09084; font-size: 12px; }
.home { display: grid; gap: 22px; }
.home-intro { max-width: 720px; }
.home-intro h1 { margin-bottom: 14px; }
.home-grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(300px, .92fr); gap: 18px; align-items: start; }
.panel { padding: 22px; border: 1px solid var(--line); border-radius: 17px; background: linear-gradient(155deg, #251d1bfa, #191513fa); box-shadow: var(--shadow); }
label { display: block; margin: 12px 0 6px; color: var(--muted); font-size: 10px; font-weight: 750; letter-spacing: .07em; text-transform: uppercase; }
input, select { width: 100%; min-height: 42px; padding: 9px 11px; border: 1px solid #55433e; border-radius: 9px; background: #151210; color: var(--text); }
input:focus, select:focus { border-color: var(--gold); outline: 2px solid #d8b36e33; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px 12px; }
button.primary, button.raise { background: var(--gold); color: #211713; }
button.primary { width: 100%; margin-top: 14px; }
button.secondary { border-color: #57433d; background: #302623; color: #eee7db; }
button.fold { background: #a84039; color: #fff8f0; }
button.call { border-color: #5d6658; background: #343b34; color: #f1eee7; }
.rule-note { margin-top: 14px; padding: 11px 12px; border: 1px solid #57403a; border-radius: 10px; background: #211918; color: #d4c9bb; font-size: 11px; line-height: 1.5; }
.lobby-panel { max-width: 1080px; margin: 0 auto; }
.lobby-head { display: flex; justify-content: space-between; gap: 18px; align-items: flex-start; border-bottom: 1px solid var(--line); padding-bottom: 16px; margin-bottom: 18px; }
#lobbyCode { color: var(--gold); font-size: clamp(42px, 9vw, 76px); letter-spacing: .1em; margin-bottom: 4px; }
.share-box { min-width: min(340px, 100%); padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: #171412; }
.share-box span { display: block; margin-bottom: 6px; color: var(--muted); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.share-box code { display: block; margin-bottom: 8px; overflow-wrap: anywhere; color: #e1c68c; font-size: 11px; }
.lobby-columns { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(280px, .9fr); gap: 22px; }
.pill { display: inline-block; padding: 3px 8px; border: 1px solid #665044; border-radius: 999px; color: #dfc79d; font-size: 10px; font-weight: 800; }
.player-list { display: grid; gap: 6px; }
.player-row { display: flex; align-items: center; gap: 8px; padding: 9px 10px; border: 1px solid #4b3935; border-radius: 9px; background: #1b1715; font-size: 12px; }
.player-row.you { border-color: #9b7546; background: #2b201b; }
.player-row .dot { width: 7px; height: 7px; border-radius: 50%; background: #62534a; }
.player-row .dot.online { background: var(--green-muted); }
.player-row .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player-row .tag { color: var(--muted); font-size: 9px; }
.player-row .tag.ready { color: #b7c5ac; }
.button-row { display: flex; gap: 8px; margin-top: 14px; }
.button-row button { flex: 1; }
.settings-list { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; margin: 0; font-size: 12px; }
.settings-list dt { color: var(--muted); }
.settings-list dd { margin: 0; text-align: right; font-weight: 700; }

/* Table layout */
#gamePanel { min-width: 0; }
.status-banner, .spectator-banner, .winner-banner { margin: 0 auto 8px; max-width: 860px; text-align: center; }
.status-banner { padding: 7px 12px; border: 1px solid #805348; border-radius: 9px; background: #30201e; color: #eee6dc; font-size: 12px; font-weight: 700; }
.spectator-banner { padding: 7px 10px; border: 1px solid #7d5842; border-radius: 9px; background: #2c211c; color: #e7c58c; font-size: 11px; }
.winner-banner { display: none; padding: 7px 10px; border: 1px solid #a37d49; border-radius: 9px; background: #30231c; color: #eed08e; font-size: 12px; font-weight: 800; }
.winner-banner.show { display: block; }
.rabbit { display: block; min-height: 34px; margin: 0 auto 8px; border-color: #9d5a4a; background: #71332f; color: #f4e8d6; font-size: 11px; }
.table-scene { position: relative; isolation: isolate; width: 100%; height: clamp(340px, 52vh, 580px); margin: 2px auto 0; }
.table-rail { position: absolute; inset: 56px 7.5%; border: 2px solid #87623f; border-radius: 50%; background: linear-gradient(150deg, #392723, #171413 52%, #3d2823); box-shadow: 0 20px 38px #0009, inset 0 1px 0 #f4cf7b33, inset 0 -9px 14px #0008; }
.table-felt { position: absolute; inset: 12px; overflow: visible; border: 1px solid #895e51; border-radius: 50%; background: radial-gradient(ellipse at 50% 46%, #603536 0, #48292b 54%, #321d20 100%); box-shadow: inset 0 0 45px #17090b88, inset 0 1px 0 #efd9b21e; }
.table-felt::after { content: ""; position: absolute; inset: 16px; border: 1px solid #d5b47e38; border-radius: 50%; pointer-events: none; }
.table-center { position: absolute; z-index: 1; left: 50%; top: 50%; display: flex; flex-direction: column; align-items: center; gap: 8px; transform: translate(-50%, -50%); padding: 0; border: 0; background: transparent; box-shadow: none; }
.hand-pill { color: #d2c2ae; font-size: 9px; font-weight: 800; letter-spacing: .13em; }
.pot { order: 2; padding: 4px 12px; border: 1px solid #a98038; border-radius: 999px; background: #201a19d9; color: var(--gold); font-size: 12px; font-weight: 850; letter-spacing: .09em; white-space: nowrap; }
.board { order: 1; display: flex; justify-content: center; align-items: center; gap: clamp(4px, .7vw, 9px); min-height: 70px; }
.card, .card-slot { display: inline-flex; flex: 0 0 auto; flex-direction: column; align-items: center; justify-content: center; width: clamp(39px, 4vw, 52px); height: clamp(56px, 5.6vw, 72px); border-radius: 6px; }
.card { background: linear-gradient(160deg, #fffdf6, #e9e2d5); color: #201c19; font-weight: 850; box-shadow: 0 3px 0 #948879, 0 7px 14px #0003; line-height: 1; }
.card.red { color: #b83236; }
.card b { font-size: 17px; }
.card i { margin-top: 2px; font-size: 22px; font-style: normal; }
.card-slot { border: 1px solid #d7c19a4a; background: #251c1d38; box-shadow: inset 0 1px 3px #0004; }
.seats { position: absolute; z-index: 3; inset: 0; pointer-events: none; }
.seat { position: absolute; left: var(--seat-x); top: var(--seat-y); display: flex; align-items: center; gap: 7px; width: clamp(126px, 12vw, 158px); min-height: 62px; padding: 7px 8px; transform: translate(-50%, -50%); overflow: visible; border: 1px solid #74584d; border-radius: 12px; background: linear-gradient(155deg, #211a18f5, #171312f5); color: var(--text); text-align: left; box-shadow: 0 7px 16px #0007; pointer-events: auto; }
.seat:hover { z-index: 5; transform: translate(-50%, -53%); border-color: #bd9656; box-shadow: 0 10px 20px #0008; }
.seat:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.seat.actor { border-color: #d0a75d; box-shadow: 0 0 0 1px #d0a75d8a, 0 0 0 4px #d0a75d21, 0 7px 18px #0007; }
.seat.folded { opacity: .48; }
.seat.winner { border-color: #cfaa68; }
.seat.you-seat { background: linear-gradient(155deg, #34241e, #211715); }
.seat-avatar { position: relative; display: grid; flex: 0 0 auto; place-items: center; width: 33px; height: 33px; border: 1px solid #c19857; border-radius: 50%; background: radial-gradient(circle at 35% 25%, #d8b36e, #76512e 75%); color: #221916; font-size: 13px; font-weight: 900; box-shadow: inset 0 1px 0 #fff2c5; }
.seat.actor .seat-avatar { box-shadow: inset 0 1px 0 #fff2c5, 0 0 0 3px #d8b36e55; animation: seat-pulse 1.8s ease-in-out infinite; }
@keyframes seat-pulse { 0%,100% { box-shadow: inset 0 1px 0 #fff2c5, 0 0 0 2px #d8b36e3e; } 50% { box-shadow: inset 0 1px 0 #fff2c5, 0 0 0 4px #d8b36e28; } }
.seat-info { display: grid; min-width: 0; flex: 1; gap: 2px; }
.seat-name-row { display: flex; align-items: center; gap: 5px; min-width: 0; }
.seat .name { min-width: 0; overflow: hidden; color: #f1e8dc; font-size: 10px; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.seat .position { flex: 0 0 auto; padding: 2px 4px; border: 1px solid #705747; border-radius: 4px; color: #d7c4a6; font-size: 7px; font-weight: 850; line-height: 1; }
.seat .position.dealer { border-color: #ad874b; background: #d4ae68; color: #211714; }
.seat-stack { color: #d3c7ba; font-size: 10px; font-weight: 700; white-space: nowrap; }
.seat-stack small { color: #978a7d; font-size: 8px; font-weight: 500; }
.seat-status { color: #d6b774; font-size: 8px; font-weight: 750; }
.seat-status.all-in-status { color: #f0d08c; }
.seat-bet { position: absolute; z-index: 3; right: 50%; bottom: -19px; transform: translateX(50%); padding: 3px 7px; border: 1px solid #74523c; border-radius: 999px; background: #241a17; color: #ebcb82; font-size: 8px; font-weight: 800; white-space: nowrap; }
.seat-bet.won { color: #f0d08c; }
.seat-hole { display: flex; gap: 3px; margin-top: 3px; }
.seat-hole .card { width: 22px; height: 30px; border-radius: 4px; }
.seat-hole .card b { font-size: 9px; }
.seat-hole .card i { font-size: 12px; }
.game-layout { width: min(980px, 100%); margin: 4px auto 0; }
.action-area { padding: 10px 12px; border: 1px solid #6b4e42; border-radius: 14px; background: linear-gradient(150deg, #261d1a, #1a1514); box-shadow: 0 10px 28px #0006; }
.hero-summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 2px 9px; border-bottom: 1px solid #4c3934; }
.hero-identity { display: flex; align-items: center; gap: 8px; min-width: 130px; }
.hero-avatar { display: grid; place-items: center; flex: 0 0 auto; width: 30px; height: 30px; border: 1px solid #b79356; border-radius: 50%; background: #5a3730; color: #f1dec0; font-size: 12px; font-weight: 900; }
.hero-identity div { display: grid; gap: 2px; }
.hero-identity strong { font-size: 11px; }
.hero-identity span:not(.hero-avatar) { color: var(--muted); font-size: 9px; }
.hero-cards { display: flex; gap: 5px; margin-right: auto; }
.hero-cards .card { width: 31px; height: 43px; }
.hero-cards .card b { font-size: 12px; }
.hero-cards .card i { font-size: 15px; }
.turn-clock { width: min(210px, 28%); margin-left: auto; }
#turnClockText { color: #e0bf78; font-size: 10px; font-weight: 800; }
.turn-clock.active #turnClockText { color: #f0cc7c; }
.turn-track { height: 4px; margin-top: 4px; overflow: hidden; border-radius: 99px; background: #4b3530; }
.turn-fill { width: 0; height: 100%; border-radius: inherit; background: #bf5147; transition: width .15s linear; }
.bet-controls { display: grid; grid-template-columns: minmax(250px, .85fr) minmax(320px, 1.15fr); align-items: center; gap: 14px; padding-top: 9px; }
.action-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.action-row button { min-height: 43px; padding: 8px 9px; font-size: 12px; }
.bet-sizing { min-width: 0; }
.bet-amount-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.bet-amount-row label { margin: 0; white-space: nowrap; }
.amount-field { display: flex; align-items: center; gap: 6px; width: min(200px, 100%); padding-right: 8px; border: 1px solid #55433e; border-radius: 8px; background: #151210; }
.amount-field:focus-within { border-color: var(--gold); }
.amount-field input { min-width: 0; min-height: 34px; padding: 6px 8px; border: 0; background: transparent; outline: none; font-weight: 750; }
.amount-field span { color: #9b8d80; font-size: 9px; }
#amountSlider { display: block; width: 100%; height: 15px; min-height: 0; margin: 5px 0 0; padding: 0; accent-color: var(--gold); border: 0; background: transparent; cursor: pointer; }
.amount-hint, #amountHint { margin: 0; color: #a99d91; font-size: 9px; }
.quick-sizes { display: flex; gap: 5px; margin-top: 5px; }
.size-button { flex: 1; min-height: 28px; padding: 4px 6px; border: 1px solid #55433e; border-radius: 7px; background: #221a18; color: #d6c9b8; font-size: 9px; }
.size-button:hover:not(:disabled) { border-color: #a07e51; color: #f0d49b; }
.size-button.all-in-size { color: #e0bf78; }
.spectating .bet-controls { display: none; }
.spectating .hero-summary { border-bottom: 0; padding-bottom: 0; }
.notice { min-height: 0; margin: 5px 0 0; color: #e6c17d; font-size: 10px; }
.notice:empty { display: none; }
.table-info { display: flex; justify-content: center; gap: 8px; margin: 7px auto 0; }
.side-box { width: min(350px, 50%); border: 1px solid #4e3c36; border-radius: 9px; background: #1e1816; }
.side-box summary { display: flex; justify-content: space-between; gap: 18px; padding: 8px 10px; color: #d9ccbb; font-size: 10px; font-weight: 750; cursor: pointer; list-style: none; }
.side-box summary::-webkit-details-marker { display: none; }
.side-box summary span { color: #a28c6a; transition: transform .15s ease; }
.side-box[open] summary span { transform: rotate(180deg); }
.standings, .history { display: grid; gap: 4px; max-height: 180px; padding: 0 10px 9px; overflow: auto; }
.standing, .history-row { display: flex; justify-content: space-between; gap: 7px; color: #c8bdb1; font-size: 9px; }
.standing .who { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.standing.out { opacity: .5; }
.history-row { display: block; padding: 5px 0; border-bottom: 1px solid #3b2d29; line-height: 1.5; }
.toast { position: fixed; z-index: 30; left: 50%; bottom: calc(14px + var(--safe-bottom)); transform: translateX(-50%); max-width: min(500px, 90vw); padding: 9px 13px; border: 1px solid #84554a; border-radius: 9px; background: #2b201d; color: #f0d29a; font-size: 11px; opacity: 0; pointer-events: none; transition: opacity .18s; }
.toast.show { opacity: 1; }

/* Dialogs and small menus */
.profile-dialog, .table-menu-dialog { width: min(440px, calc(100vw - 28px)); max-height: calc(100dvh - 28px); padding: 0; overflow: auto; border: 1px solid #806a50; border-radius: 16px; background: transparent; color: var(--text); box-shadow: 0 24px 80px #000c; }
.profile-dialog::backdrop, .table-menu-dialog::backdrop { background: #100b0bd1; backdrop-filter: blur(4px); }
.profile-card, .table-menu-card { position: relative; padding: 22px; border-radius: inherit; background: radial-gradient(circle at 90% 0, #60322c 0, transparent 43%), linear-gradient(160deg, #29201e, #171412); }
.profile-close { position: absolute; top: 10px; right: 10px; width: 32px; min-height: 32px; padding: 0; border: 1px solid #684a40; border-radius: 50%; background: #1d1715; color: #f1e7d5; font-size: 21px; line-height: 1; }
.profile-heading { display: flex; align-items: center; gap: 12px; margin: 5px 0 16px; }
.profile-heading h2 { margin: 0 0 4px; color: #f4e5c1; font-size: 21px; }
.profile-avatar { display: grid; place-items: center; width: 48px; height: 48px; border: 1px solid #c9a850; border-radius: 50%; background: radial-gradient(circle at 35% 25%, #d8b36e, #755126 72%); color: #171412; font-size: 19px; font-weight: 900; }
.profile-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.profile-stat { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 4px; padding: 9px 10px; border: 1px solid #55403a; border-radius: 9px; background: #181413d9; }
.profile-stat-label { color: #d1c3b2; font-size: 10px; font-weight: 750; }
.profile-stat strong { color: #e0b96f; font-size: 15px; }
.profile-stat small { grid-column: 1 / -1; color: var(--muted); font-size: 9px; }
.profile-footnote { margin: 12px 0 0; color: #b7a99b; font-size: 10px; line-height: 1.5; }
.table-menu-dialog { width: min(350px, calc(100vw - 28px)); }
.table-menu-card { padding: 18px; }
.table-menu-heading { display: flex; align-items: center; justify-content: space-between; margin: 0 34px 12px 0; }
.table-menu-heading h2 { margin: 0; color: #efdfbd; font-size: 16px; }
.table-menu-heading .profile-close { top: 12px; right: 12px; }
.menu-group { display: grid; gap: 4px; }
.menu-action { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 39px; padding: 8px 10px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: #e5d9ca; text-align: left; font-size: 11px; }
.menu-action:hover:not(:disabled) { transform: none; border-color: #55403a; background: #302321; }
.menu-action span { color: #c7a766; }
.menu-action.leave-action { margin-top: 4px; border-top: 1px solid #493632; border-radius: 0 0 8px 8px; color: #d98b7f; }
.menu-note { margin: 8px 2px 0; color: #94877c; font-size: 9px; line-height: 1.4; }
.game-settings-panel { margin-top: 12px; padding-top: 12px; border-top: 1px solid #493632; }
.game-settings-panel h3 { margin-bottom: 4px; color: #e6d6bd; font-size: 12px; }
.game-settings-panel .hint { margin: 0 0 9px; font-size: 9px; }

@media (max-width: 900px) {
  .home-grid, .lobby-columns { grid-template-columns: 1fr; }
  .lobby-head { flex-direction: column; }
  .share-box { width: 100%; }
  .table-scene { height: clamp(330px, 48vh, 480px); }
  .seat { width: clamp(112px, 16vw, 145px); }
  .game-layout { width: min(760px, 100%); }
}

@media (max-width: 600px) {
  html, body { min-height: 100%; }
  body { overflow-x: hidden; }
  .app-shell { padding: 7px 10px calc(18px + var(--safe-bottom)); }
  #gamePanel:not(.hidden) { display: flex; flex-direction: column; min-height: calc(100dvh - 64px); }
  .topbar { min-height: 41px; gap: 6px; margin-bottom: 7px; }
  .table-identity strong { font-size: 13px; }
  .table-identity span { max-width: 44vw; overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
  .topbar-right { gap: 5px; }
  .connection { gap: 5px; padding: 5px 7px; font-size: 9px; }
  .connection i { width: 6px; height: 6px; }
  .room-code { gap: 2px; padding: 2px 2px 2px 7px; font-size: 8px; }
  .room-code button { width: 24px; min-height: 25px; font-size: 15px; }
  .icon-button { width: 32px; min-height: 32px; font-size: 17px; }
  .status-banner, .spectator-banner, .winner-banner { margin-bottom: 6px; font-size: 10px; }
  .table-scene { height: clamp(270px, 78vw, 370px); margin-top: 0; }
  .table-rail { inset: 43px 2%; border-width: 1px; }
  .table-felt { inset: 8px; }
  .table-felt::after { inset: 10px; }
  .table-center { gap: 6px; }
  .hand-pill { font-size: 8px; }
  .board { min-height: 54px; gap: 3px; }
  .card, .card-slot { width: clamp(30px, 8vw, 38px); height: clamp(44px, 11.5vw, 54px); }
  .card b { font-size: 13px; }
  .card i { font-size: 16px; }
  .pot { padding: 3px 8px; font-size: 10px; }
  .seat { width: clamp(84px, 23vw, 106px); min-height: 48px; gap: 4px; padding: 5px; border-radius: 9px; }
  .seat-avatar { width: 23px; height: 23px; font-size: 10px; }
  .seat-info { gap: 2px; }
  .seat-name-row { gap: 3px; }
  .seat .name { font-size: 8px; }
  .seat .position { padding: 1px 3px; font-size: 6px; }
  .seat-stack { font-size: 8px; }
  .seat-stack small { font-size: 7px; }
  .seat-status { font-size: 7px; }
  .seat-bet { bottom: -15px; padding: 2px 5px; font-size: 7px; }
  .seat-hole { gap: 2px; margin-top: 2px; }
  .seat-hole .card { width: 16px; height: 22px; }
  .seat-hole .card b { font-size: 7px; }
  .seat-hole .card i { font-size: 9px; }
  .game-layout { width: 100%; margin-top: auto; }
  .action-area { position: sticky; z-index: 10; bottom: var(--safe-bottom); padding: 8px; border-radius: 12px; box-shadow: 0 -5px 24px #0007; }
  .hero-summary { gap: 7px; padding-bottom: 7px; }
  .hero-identity { min-width: 98px; gap: 6px; }
  .hero-avatar { width: 26px; height: 26px; font-size: 10px; }
  .hero-identity strong { font-size: 10px; }
  .hero-identity span:not(.hero-avatar) { font-size: 8px; }
  .hero-cards { gap: 4px; }
  .hero-cards .card { width: 27px; height: 37px; }
  .hero-cards .card b { font-size: 10px; }
  .hero-cards .card i { font-size: 13px; }
  .turn-clock { width: min(120px, 29%); }
  #turnClockText { font-size: 9px; }
  .bet-controls { grid-template-columns: 1fr; gap: 6px; padding-top: 7px; }
  .action-row { gap: 5px; }
  .action-row button { min-height: 46px; padding: 8px 4px; border-radius: 8px; font-size: 11px; }
  .bet-amount-row label { font-size: 9px; }
  .amount-field { width: min(175px, 58%); }
  .amount-field input { min-height: 32px; font-size: 12px; }
  #amountSlider { margin: 2px 0 0; }
  #amountHint { font-size: 8px; }
  .quick-sizes { margin-top: 3px; }
  .size-button { min-height: 30px; font-size: 9px; }
  .table-info { margin-top: 6px; }
  .side-box { width: 50%; }
  .side-box summary { padding: 7px 8px; font-size: 9px; }
  .standing, .history-row { font-size: 8px; }
  .home { gap: 14px; }
  .panel { padding: 16px; border-radius: 14px; }
  .field-grid { grid-template-columns: 1fr 1fr; gap: 7px; }
  .profile-card, .table-menu-card { padding: 18px 15px; }
  .toast { bottom: calc(12px + var(--safe-bottom)); }
}

@media (max-width: 370px) {
  .app-shell { padding-left: 7px; padding-right: 7px; }
  .table-identity strong { font-size: 12px; }
  .table-identity span { max-width: 38vw; }
  .connection { padding: 4px 5px; }
  .room-code { font-size: 7px; }
  .seat { width: 82px; gap: 3px; padding: 4px; }
  .seat-avatar { width: 20px; height: 20px; }
  .seat .name { max-width: 48px; }
  .board .card, .board .card-slot { width: 24px; height: 36px; }
  .board .card b { font-size: 11px; }
  .board .card i { font-size: 13px; }
  .board { min-height: 44px; }
}
