:root {
  color-scheme: dark;
  --ink: #15121f;
  --ink-soft: #211b30;
  --felt: #153d3a;
  --felt-light: #1c504a;
  --cyan: #54e5d0;
  --pink: #f05aa6;
  --gold: #ffd166;
  --red: #f16d70;
  --paper: #f2e6cc;
  --muted: #a99eb4;
  --line: rgba(242, 230, 204, 0.16);
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  font-family: Inter, "Noto Sans SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; color: var(--paper); background: radial-gradient(circle at 20% 10%, #372040 0, transparent 32%), radial-gradient(circle at 85% 85%, #123d42 0, transparent 38%), var(--ink); }
button, input, select { font: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button:disabled { cursor: not-allowed; opacity: .42; transform: none !important; filter: none !important; }
.hidden { display: none !important; }
.noise { position: fixed; inset: 0; pointer-events: none; z-index: 20; opacity: .18; background: repeating-linear-gradient(0deg, transparent 0 3px, rgba(255,255,255,.055) 4px); mix-blend-mode: overlay; }
body.clean .noise { display: none; }
.topbar { height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 0 clamp(18px, 4vw, 54px); border-bottom: 1px solid var(--line); background: rgba(21,18,31,.82); backdrop-filter: blur(16px); position: relative; z-index: 10; }
.brand { color: var(--paper); text-decoration: none; display: flex; align-items: center; gap: 10px; font-weight: 900; letter-spacing: .13em; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 42px; color: var(--ink); background: var(--cyan); border-radius: 5px; transform: rotate(-5deg); box-shadow: 4px 4px 0 var(--pink); }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.status-dot { color: var(--muted); font-size: 13px; }
.status-dot::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 10px var(--gold); }
.status-dot.online::before { background: var(--cyan); box-shadow: 0 0 10px var(--cyan); }
.status-dot.reconnecting::before { background: var(--gold); box-shadow: 0 0 10px var(--gold); animation: connection-pulse .8s ease-in-out infinite alternate; }
.status-dot.offline { color: var(--red); }
.status-dot.offline::before { background: var(--red); box-shadow: 0 0 10px var(--red); }
@keyframes connection-pulse { to { opacity: .35; transform: scale(.72); } }
@media (max-width: 780px) {
  .status-dot.reconnecting, .status-dot.offline { display: inline-flex; max-width: 118px; align-items: center; overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
}
.app-shell { width: min(1280px, calc(100% - 32px)); margin: 0 auto; min-height: calc(100vh - 68px); padding: clamp(28px, 5vw, 72px) 0; }
.auth-layout { min-height: 70vh; display: grid; grid-template-columns: 1.25fr .75fr; align-items: center; gap: clamp(40px, 8vw, 120px); }
.hero-copy h1 { margin: 12px 0 24px; max-width: 760px; font-size: clamp(44px, 7vw, 94px); line-height: .98; letter-spacing: -.055em; text-shadow: 3px 0 var(--pink), -3px 0 rgba(84,229,208,.6); }
.hero-copy p:not(.eyebrow) { color: var(--muted); max-width: 580px; font-size: clamp(16px, 2vw, 21px); line-height: 1.7; }
.eyebrow, .panel-kicker { color: var(--cyan); letter-spacing: .18em; font-weight: 800; font-size: 12px; }
.suit-row { display: flex; gap: 18px; margin-top: 38px; color: var(--pink); font-size: 28px; }
.suit-row span:nth-child(odd) { color: var(--cyan); }
.panel { border: 1px solid var(--line); border-radius: 14px; padding: clamp(24px, 4vw, 40px); background: linear-gradient(145deg, rgba(42,34,57,.94), rgba(22,19,32,.96)); box-shadow: var(--shadow); }
.panel h2 { margin: 8px 0 30px; font-size: 30px; }
label { display: grid; gap: 8px; margin-bottom: 18px; color: var(--muted); font-size: 14px; }
input, select { width: 100%; padding: 13px 14px; color: var(--paper); border: 1px solid var(--line); border-radius: 7px; outline: none; background: rgba(8,7,13,.55); }
input:focus, select:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(84,229,208,.12); }
.primary-button, .action-button { border: 0; border-radius: 7px; padding: 13px 18px; color: #0f1c1d; background: var(--cyan); font-weight: 900; box-shadow: 4px 4px 0 #227a76; }
.primary-button:hover, .action-button:hover { transform: translateY(-1px); filter: brightness(1.08); }
.primary-button { width: 100%; }
.ghost-button { padding: 8px 12px; color: var(--paper); border: 1px solid var(--line); border-radius: 6px; background: transparent; }
.danger-button { color: var(--red); border-color: rgba(241,109,112,.45); }
.form-note, .muted { color: var(--muted); font-size: 13px; }
.dashboard-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 30px; }
.dashboard-head h1 { margin: 0; font-size: clamp(36px, 5vw, 64px); }
.home-account-meta { display: grid; justify-items: end; gap: 5px; text-align: right; }
.home-account-meta p { margin: 0; }
.account-balance { color: var(--muted); font-size: 13px; }
.account-balance strong { margin-left: 7px; color: var(--gold); font: 900 18px/1 monospace; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.stack { display: grid; gap: 14px; }
.inline-form { display: flex; gap: 10px; align-items: end; }
.inline-form label { flex: 1; margin: 0; }
.room-code { color: var(--gold); font: 800 clamp(34px, 6vw, 70px)/1 monospace; letter-spacing: .14em; text-shadow: 0 0 20px rgba(255,209,102,.35); }
.game-head-actions { display: flex; align-items: center; gap: 14px; }
.game-head-stats { display: flex; gap: 12px; margin-top: 8px; color: var(--muted); font-size: 12px; }
.game-head-stats strong { margin-left: 4px; color: var(--gold); font: 900 14px/1 monospace; }
.player-list { display: grid; gap: 10px; }
.player-row { display: flex; justify-content: space-between; align-items: center; padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: rgba(255,255,255,.025); }
.quick-start-panel { width: min(920px, 100%); margin: -10px auto 22px; padding: 13px 14px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(150px, auto); align-items: center; gap: 12px; border: 1px solid rgba(84,229,208,.36); border-radius: 10px; background: linear-gradient(90deg, rgba(84,229,208,.14), rgba(255,209,102,.07)); }
.quick-start-panel div { display: grid; gap: 3px; min-width: 0; }
.quick-start-panel strong { font-size: 17px; }
.quick-start-panel span { overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.quick-start-panel .primary-button { width: 100%; min-height: 44px; }
.waiting-room-panel { width: min(920px, 100%); margin: 0 auto; padding: 22px; }
.waiting-room-heading { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 16px; }
.waiting-room-heading h2 { margin: 3px 0 0; font-size: 22px; }
.waiting-room-heading > span { color: var(--muted); font-size: 12px; }
.waiting-seat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.waiting-seat { min-width: 0; min-height: 74px; display: grid; align-content: center; justify-items: start; gap: 4px; padding: 10px 12px; color: var(--paper); text-align: left; border: 1px solid var(--line); border-radius: 7px; background: rgba(8,7,13,.28); }
.waiting-seat span { color: var(--cyan); font: 800 10px/1 monospace; }
.waiting-seat strong, .waiting-seat small { width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.waiting-seat strong { font-size: 14px; }
.waiting-seat small { min-height: 13px; color: var(--muted); font-size: 10px; }
.waiting-seat.available { border-style: dashed; }
.waiting-seat.available:hover { border-color: var(--cyan); background: rgba(84,229,208,.08); }
.waiting-seat.self { border-color: var(--gold); background: rgba(255,209,102,.08); box-shadow: inset 3px 0 0 var(--gold); }
.waiting-seat:disabled { cursor: default; opacity: 1; }
.waiting-room-footer { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.waiting-room-footer p { margin: 0; color: var(--muted); font-size: 12px; }
.waiting-room-footer .ghost-button { flex: none; }
.badge { padding: 4px 8px; border-radius: 99px; color: var(--muted); background: rgba(255,255,255,.06); font-size: 11px; }
.badge.online { color: var(--cyan); }
.badge.ready { color: var(--cyan); background: rgba(84,229,208,.12); }
.badge.warning { color: var(--gold); background: rgba(255,209,102,.1); }
.badge.self { color: var(--pink); background: rgba(240,90,166,.1); }
.admin-console { grid-column: 1 / -1; margin-top: 4px; }
.admin-heading, .admin-list-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.admin-heading { margin-bottom: 28px; }
.admin-heading h2, .admin-list-head h3, .admin-create-form h3 { margin: 6px 0; }
.coin-summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: -4px 0 28px; }
.coin-summary-grid > article { display: grid; gap: 8px; min-width: 0; padding: 15px; border: 1px solid var(--line); border-radius: 9px; background: rgba(255,255,255,.025); }
.coin-summary-grid span, .coin-summary-grid small { color: var(--muted); font-size: 11px; }
.coin-summary-grid strong { overflow: hidden; color: var(--gold); font: 900 clamp(18px, 2.2vw, 27px)/1 monospace; text-overflow: ellipsis; }
.coin-summary-grid .reconciled { border-color: rgba(84,229,208,.3); }
.coin-summary-grid .reconciled strong { color: var(--cyan); }
.coin-summary-grid .unreconciled { border-color: rgba(241,109,112,.65); background: rgba(241,109,112,.08); }
.coin-summary-grid .unreconciled strong { color: var(--red); }
.admin-layout { display: grid; grid-template-columns: minmax(240px, .65fr) minmax(0, 1.7fr); gap: clamp(24px, 4vw, 50px); }
.admin-create-form { align-content: start; padding-right: clamp(0px, 2vw, 28px); border-right: 1px solid var(--line); }
.admin-account-area { min-width: 0; }
.admin-list-head { align-items: end; margin-bottom: 16px; }
.admin-list-head p { margin: 5px 0 0; }
.search-field { width: min(280px, 48%); margin: 0; }
.account-list { display: grid; gap: 9px; }
.account-row { display: grid; grid-template-columns: minmax(130px, 1fr) minmax(90px, auto) minmax(150px, auto) auto; align-items: center; gap: 14px; padding: 13px 14px; border: 1px solid var(--line); border-radius: 9px; background: rgba(255,255,255,.025); }
.account-row.disabled { background: rgba(0,0,0,.14); }
.account-identity { min-width: 0; display: grid; gap: 4px; }
.account-identity strong, .account-identity span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-identity span { color: var(--muted); font: 12px/1.3 monospace; }
.account-coins { display: grid; justify-items: end; gap: 4px; }
.account-coins span { color: var(--muted); font-size: 10px; }
.account-coins strong { color: var(--gold); font: 900 15px/1 monospace; }
.account-flags, .account-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.account-actions { justify-content: flex-end; }
.account-actions .ghost-button { min-height: 35px; padding: 6px 9px; font-size: 12px; }
.empty-state { padding: 24px; text-align: center; border: 1px dashed var(--line); border-radius: 9px; }
.audit-panel { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); }
.audit-panel summary { display: flex; align-items: center; gap: 9px; color: var(--paper); cursor: pointer; font-weight: 800; }
.audit-list { display: grid; gap: 0; max-height: 320px; margin-top: 14px; overflow-y: auto; }
.audit-row { display: grid; grid-template-columns: 170px 1fr; gap: 16px; padding: 10px 4px; border-bottom: 1px solid var(--line); font-size: 13px; }
.audit-row time { color: var(--muted); font: 11px/1.6 monospace; }
.audit-row b { color: var(--gold); }
.room-operations-toolbar { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin: 16px 0 6px; }
.room-operations-toolbar .search-field { width: min(420px, 70%); }
.room-operations-toolbar p { margin: 0 0 12px; text-align: right; }
.room-operations-list { display: grid; max-height: 460px; overflow-y: auto; }
.room-operation-row { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(150px, .75fr) minmax(120px, auto) minmax(120px, auto) auto; align-items: center; gap: 14px; padding: 13px 4px; border-bottom: 1px solid var(--line); }
.room-operation-identity, .room-operation-state, .room-operation-coins { display: grid; gap: 4px; min-width: 0; }
.room-operation-identity span, .room-operation-state span, .room-operation-coins span { overflow: hidden; color: var(--muted); font: 11px/1.4 monospace; text-overflow: ellipsis; white-space: nowrap; }
.room-operation-coins strong { font: 800 12px/1.4 monospace; }
.room-anomalies, .room-anomaly-summary { display: flex; flex-wrap: wrap; gap: 5px; }
.room-operation-actions { display: flex; gap: 6px; }
.room-operation-actions .ghost-button { min-height: 36px; padding: 7px 10px; white-space: nowrap; }
.room-operations-dialog { width: min(900px, calc(100% - 28px)); }
.room-anomaly-summary { margin: 0 0 14px; }
.room-operations-detail { margin-bottom: 20px; }
.room-operations-detail h3 { margin: 22px 0 8px; }
.room-player-operation { display: grid; grid-template-columns: minmax(150px, 1fr) repeat(3, minmax(90px, auto)); align-items: center; gap: 12px; padding: 10px 4px; border-bottom: 1px solid var(--line); font: 12px/1.4 monospace; }
.room-player-operation > div { display: grid; gap: 3px; min-width: 0; }
.room-player-operation > div strong, .room-player-operation > div span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.room-player-operation > div span, .room-player-operation > span { color: var(--muted); }
.pending-credit-list { display: grid; gap: 5px; margin: 0; padding: 12px 12px 12px 30px; color: var(--muted); border: 1px solid var(--line); border-radius: 8px; background: rgba(255,255,255,.025); font: 12px/1.5 monospace; }
.coin-ledger-panel { margin-top: 34px; }
.coin-ledger-toolbar { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin: 16px 0 8px; }
.coin-ledger-toolbar label { width: min(320px, 48%); margin: 0; }
.coin-ledger-toolbar p { margin: 0 0 12px; text-align: right; }
.coin-ledger-list { display: grid; max-height: 420px; overflow-y: auto; }
.coin-ledger-row { display: grid; grid-template-columns: minmax(150px, 1fr) 100px 150px minmax(240px, 1.5fr); align-items: center; gap: 12px; padding: 12px 4px; border-bottom: 1px solid var(--line); font-size: 12px; }
.coin-ledger-row > div { display: grid; gap: 4px; min-width: 0; }
.coin-ledger-row > div span, .coin-ledger-row small { overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.coin-ledger-row b { text-align: right; font: 900 14px/1 monospace; }
.coin-positive { color: var(--cyan); }
.coin-negative { color: var(--pink); }
.coin-balance-flow { color: var(--paper); text-align: right; font: 12px/1 monospace; }
.coin-current { margin: 0; color: var(--muted); }
.coin-current strong { margin-left: 8px; color: var(--gold); font: 900 18px/1 monospace; }
.match-records-panel { grid-column: 1 / -1; }
.match-record-list { display: grid; max-height: 430px; overflow-y: auto; }
.match-record-row { display: grid; grid-template-columns: minmax(170px, .8fr) minmax(260px, 1.4fr) auto auto; align-items: center; gap: 14px; padding: 13px 4px; border-bottom: 1px solid var(--line); }
.match-record-identity, .match-record-players { display: grid; gap: 4px; min-width: 0; }
.match-record-identity span, .match-record-players span, .match-record-players small { overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.match-record-identity span, .match-record-players small { font: 11px/1.4 monospace; }
.match-record-row .ghost-button { min-height: 36px; padding: 7px 10px; white-space: nowrap; }
.match-admin-toolbar { display: flex; align-items: end; justify-content: space-between; gap: 14px; margin: 16px 0 6px; }
.match-admin-toolbar .search-field { width: min(420px, 70%); }
.match-record-overview { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 24px; }
.match-record-overview > div { display: grid; gap: 5px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: rgba(255,255,255,.025); }
.match-record-overview span { color: var(--muted); font-size: 11px; }
.match-record-overview strong { font: 800 13px/1.35 monospace; }
.match-record-players-detail { margin-bottom: 22px; }
.match-player-result { display: grid; grid-template-columns: minmax(0, 1fr) auto 76px; align-items: center; gap: 12px; padding: 10px 4px; border-bottom: 1px solid var(--line); }
.match-player-result span { color: var(--muted); font: 12px/1 monospace; }
.match-player-result b { text-align: right; font: 900 13px/1 monospace; }
.admin-dialog { max-width: 460px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; }
.table-stage { min-height: 660px; display: grid; place-items: center; position: relative; }
.table-quick-actions { position: absolute; right: clamp(12px, 5vw, 76px); bottom: clamp(12px, 4vw, 52px); z-index: 6; display: grid; grid-template-columns: repeat(2, minmax(72px, auto)); align-items: center; gap: 7px; padding: 8px; border: 1px solid rgba(242,230,204,.14); border-radius: 10px; background: rgba(21,18,31,.72); box-shadow: 0 10px 30px rgba(0,0,0,.36); backdrop-filter: blur(10px); }
.table-quick-actions span { grid-column: 1 / -1; color: var(--muted); font: 800 10px/1 monospace; text-align: center; }
.table-action-button { min-height: 34px; padding: 8px 12px; font-size: 12px; box-shadow: 2px 2px 0 #227a76; }
.table-action-button.ghost-button { box-shadow: none; }
.poker-table { width: min(920px, 92vw); aspect-ratio: 1.7; position: relative; isolation: isolate; border: clamp(14px,2vw,26px) solid #271b2e; border-radius: 48%; background: radial-gradient(circle, var(--felt-light), var(--felt)); box-shadow: inset 0 0 80px rgba(0,0,0,.45), 0 24px 80px rgba(0,0,0,.55), 0 0 0 2px var(--pink); }
.motion-layer { position: absolute; inset: 0; z-index: 8; overflow: visible; pointer-events: none; }
.board { position: absolute; z-index: 2; inset: 42% 10% auto; display: flex; justify-content: center; gap: 9px; }
.card { width: clamp(48px, 7vw, 78px); aspect-ratio: 5/7; display: grid; place-items: center; border-radius: 8px; color: #17121d; background: var(--paper); font: 900 clamp(20px,3vw,32px)/1 monospace; box-shadow: 0 6px 0 #aa9c81; }
.card.red { color: #ce3e59; }
.card.back { color: var(--pink); background: repeating-linear-gradient(45deg,#291d38 0 6px,#f05aa6 7px 9px); }
.card.deal-card { transform-origin: 50% 120%; animation: card-deal-in .44s cubic-bezier(.18,.84,.28,1.15) both; animation-delay: var(--motion-delay, 0ms); }
.pot-label { position: absolute; width: 100%; top: 31%; text-align: center; color: var(--gold); font-weight: 800; }
.pot-label strong { font: 900 1.12em/1 monospace; }
.seat { position: absolute; min-width: 130px; padding: 14px 12px 10px; text-align: center; border: 1px solid var(--line); border-radius: 10px; background: rgba(21,18,31,.92); box-shadow: 0 8px 20px rgba(0,0,0,.35); }
.seat.active { border-color: var(--cyan); box-shadow: 0 0 22px rgba(84,229,208,.35); }
.seat.just-acted { animation: seat-action .5s ease-out both; }
.seat.just-won { animation: seat-winner 1.05s ease-out both; }
.seat.folded { opacity: .56; filter: saturate(.55); }
.seat-name { display: flex; align-items: center; justify-content: center; gap: 6px; }
.seat-roles { display: inline-flex; gap: 3px; }
.seat-roles b { padding: 2px 4px; color: var(--ink); border-radius: 3px; background: var(--gold); font: 900 9px/1 monospace; }
.seat-stack { margin-top: 4px; color: var(--paper); font: 900 17px/1 monospace; }
.seat-status { min-height: 16px; margin-top: 4px; color: var(--muted); font-size: 10px; }
.seat-wager { position: absolute; left: 50%; bottom: -28px; transform: translateX(-50%); padding: 4px 8px; color: var(--gold); border: 1px solid rgba(255,209,102,.45); border-radius: 99px; background: rgba(21,18,31,.9); font: 800 10px/1 monospace; white-space: nowrap; }
.seat-index { position: absolute; top: -8px; left: 8px; padding: 2px 6px; color: var(--cyan); border: 1px solid rgba(84,229,208,.45); border-radius: 999px; background: rgba(21,18,31,.96); font: 800 9px/1 monospace; }
.seat[data-seat="0"] { left: 50%; bottom: -8%; transform: translateX(-50%); }
.seat[data-seat="1"] { left: -7%; bottom: 18%; }
.seat[data-seat="2"] { left: -4%; top: 12%; }
.seat[data-seat="3"] { left: 50%; top: -8%; transform: translateX(-50%); }
.seat[data-seat="4"] { right: -4%; top: 12%; }
.seat[data-seat="5"] { right: -7%; bottom: 18%; }
.hole-cards { position: absolute; z-index: 2; left: 50%; bottom: 9%; transform: translateX(-50%); display: flex; gap: 8px; }
.flying-chips { position: absolute; z-index: 1; display: grid; min-width: 34px; min-height: 24px; place-items: center; padding: 4px 7px; color: #24180a; border: 2px solid #ffe08a; border-radius: 999px; background: radial-gradient(circle at 35% 30%, #fff2b7, #d68c20 72%); box-shadow: 0 3px 0 #75440f, 0 0 16px rgba(255,209,102,.72); font: 900 10px/1 monospace; white-space: nowrap; will-change: transform, opacity; }
.flying-chips.winning { color: #092a27; border-color: #b6fff5; background: radial-gradient(circle at 35% 30%, #d4fff9, #39bcae 72%); box-shadow: 0 3px 0 #17645d, 0 0 20px rgba(84,229,208,.78); }
@keyframes card-deal-in {
  0% { opacity: 0; transform: translate(80px, -90px) rotate(16deg) scale(.55); filter: brightness(1.7); }
  72% { opacity: 1; transform: translate(-3px, 3px) rotate(-2deg) scale(1.04); }
  100% { opacity: 1; transform: none; filter: none; }
}
@keyframes seat-action {
  0%, 100% { background: rgba(21,18,31,.92); }
  45% { border-color: var(--gold); background: rgba(255,209,102,.16); box-shadow: 0 0 25px rgba(255,209,102,.52); }
}
@keyframes seat-winner {
  0%, 100% { background: rgba(21,18,31,.92); }
  28%, 64% { border-color: var(--gold); background: rgba(255,209,102,.2); box-shadow: 0 0 34px rgba(255,209,102,.72); }
}
.action-button.secondary { color: var(--paper); background: var(--ink-soft); box-shadow: 3px 3px 0 #0e0c13; }
.action-button.danger { color: #271014; background: var(--red); box-shadow: 3px 3px 0 #762b35; }
.action-dock { position: sticky; bottom: 14px; z-index: 12; width: min(920px, 100%); margin: 22px auto 0; padding: 16px; display: grid; grid-template-columns: auto minmax(260px, 1fr); gap: 14px; border: 1px solid var(--line); border-radius: 14px; background: rgba(21,18,31,.96); box-shadow: 0 16px 60px rgba(0,0,0,.58); backdrop-filter: blur(18px); }
.action-dock.waiting { display: flex; min-height: 64px; align-items: center; justify-content: center; color: var(--muted); }
.action-dock.your-turn { border-color: rgba(84,229,208,.72); box-shadow: 0 0 0 2px rgba(84,229,208,.12), 0 16px 60px rgba(0,0,0,.58), 0 0 28px rgba(84,229,208,.18); }
.my-turn .poker-table { border-color: var(--cyan); animation: my-turn-table-pulse 1.2s ease-in-out infinite alternate; }
.waiting-pulse { width: 9px; height: 9px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 14px var(--gold); }
.turn-clock { --turn-progress: 1; display: inline-grid; min-width: 38px; min-height: 24px; place-items: center; padding: 3px 7px; color: var(--cyan); border: 1px solid var(--cyan); border-radius: 99px; background: rgba(84,229,208,.08); font: 900 11px/1 monospace; }
.turn-clock.urgent { color: var(--red); background: rgba(241,109,112,.12); animation: timer-pulse .8s ease-in-out infinite alternate; }
@keyframes timer-pulse { to { box-shadow: 0 0 14px rgba(241,109,112,.55); } }
@keyframes my-turn-table-pulse { to { box-shadow: inset 0 0 80px rgba(0,0,0,.45), 0 24px 80px rgba(0,0,0,.55), 0 0 28px rgba(84,229,208,.62); } }
.action-summary { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 13px; }
.action-summary strong { color: var(--gold); }
.your-turn-summary { min-height: 42px; padding: 8px 12px; border-radius: 9px; color: var(--paper); background: linear-gradient(90deg, rgba(84,229,208,.18), rgba(84,229,208,.04)); }
.your-turn-label { display: flex; min-width: 0; align-items: baseline; gap: 12px; }
.your-turn-label b { color: var(--cyan); font-size: 18px; letter-spacing: .04em; }
.your-turn-label small { overflow: hidden; color: var(--gold); text-overflow: ellipsis; white-space: nowrap; }
.your-turn-label small.urgent { color: var(--red); font-weight: 900; }
.action-main { display: grid; grid-template-columns: repeat(3, minmax(86px, 1fr)); gap: 9px; align-content: end; }
.action-main .action-button { min-height: 50px; }
.primary-action { font-size: 16px; }
.raise-controls { display: grid; grid-template-columns: minmax(180px, 1fr) auto; gap: 9px 14px; padding-left: 14px; border-left: 1px solid var(--line); }
.raise-head { display: flex; align-items: baseline; justify-content: space-between; color: var(--muted); font-size: 12px; }
.raise-head output { color: var(--paper); font: 900 24px/1 monospace; }
.raise-controls input[type="range"] { grid-column: 1; width: 100%; padding: 0; accent-color: var(--cyan); background: transparent; }
.raise-shortcuts { grid-column: 1; display: flex; flex-wrap: wrap; gap: 6px; }
.chip-button { padding: 7px 10px; color: var(--paper); border: 1px solid var(--line); border-radius: 99px; background: rgba(255,255,255,.05); font-size: 12px; }
.chip-button:hover { color: var(--cyan); border-color: rgba(84,229,208,.5); }
.raise-submit { grid-column: 2; grid-row: 1 / 4; min-width: 132px; }
.hand-result { width: min(920px, 100%); max-height: min(440px, 46vh); margin: 22px auto 0; padding: 16px; overflow-y: auto; }
.compact-hand-result { padding: 10px 14px; }
.result-title { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 14px; }
.result-title h2 { margin: 4px 0 0; font-size: clamp(21px, 3vw, 30px); }
.result-pot { flex: 0 0 auto; color: var(--gold); font: 900 16px/1 monospace; }
.result-players { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin-bottom: 14px; }
.result-player { padding: 11px; border: 1px solid var(--line); border-radius: 9px; background: rgba(255,255,255,.025); }
.result-player.winner { border-color: rgba(255,209,102,.55); background: rgba(255,209,102,.055); }
.result-player-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 9px; }
.result-player-head span { color: var(--gold); font: 800 12px/1 monospace; }
.result-hand { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 12px; }
.result-hole, .best-five { display: flex; gap: 4px; }
.best-five { margin-top: 6px; }
.card.mini-card { width: 38px; border-radius: 4px; font-size: 16px; box-shadow: 0 3px 0 #aa9c81; }
.card.micro-card { width: 25px; border-radius: 3px; font-size: 11px; box-shadow: 0 2px 0 #aa9c81; }
.result-waiting { margin: 8px 0 0; text-align: center; }
.between-hand { display: grid; gap: 12px; }
.next-hand-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.next-hand-head h2 { margin: 2px 0 0; font-size: clamp(20px, 3vw, 28px); }
.next-hand-head strong { color: var(--muted); font: 800 13px/1.2 monospace; text-align: right; }
.between-hand-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.between-hand-actions button, .between-hand-actions .result-waiting { min-height: 44px; }
.between-hand-actions .primary-button:first-child, .between-hand-actions button:only-child, .between-hand-actions .result-waiting:first-child { grid-column: 1 / -1; min-height: 58px; font-size: 16px; }
.compact-result { margin: 0; }
.compact-result > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--muted); cursor: pointer; font-size: 12px; }
.compact-result > summary span { min-width: 0; overflow: hidden; color: var(--paper); text-overflow: ellipsis; white-space: nowrap; }
.compact-result > summary strong { flex: 0 0 auto; color: var(--gold); font: 900 12px/1 monospace; }
.compact-result .result-players { margin: 10px 0 0; }
.table-menu { width: min(420px, calc(100% - 28px)); padding: 28px; color: var(--paper); border: 1px solid var(--line); border-radius: 14px; background: linear-gradient(145deg, #2a2239, #161320); box-shadow: var(--shadow); }
.table-menu::backdrop { background: rgba(8,7,13,.78); backdrop-filter: blur(5px); }
.table-menu h2 { margin: 8px 0; }
.table-menu .stack { margin-top: 24px; }
.history-dialog { width: min(780px, calc(100% - 28px)); max-height: min(780px, calc(100dvh - 40px)); overflow-y: auto; }
.dialog-head { display: flex; align-items: start; justify-content: space-between; gap: 20px; }
.dialog-head h2 { margin: 6px 0 18px; }
.match-stack-summary h3, .match-hand-history > h3 { display: flex; align-items: center; gap: 9px; margin: 18px 0 12px; }
.stack-summary-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.stack-summary-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 10px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 8px; background: rgba(255,255,255,.025); }
.stack-summary-row > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stack-route { color: var(--muted); font: 12px/1.3 monospace; }
.stack-route strong { color: var(--paper); }
.stack-delta { min-width: 46px; text-align: right; font: 900 13px/1 monospace; }
.stack-delta.positive { color: var(--cyan); }
.stack-delta.negative { color: var(--red); }
.stack-delta.neutral { color: var(--muted); }
.match-hand-history { margin-top: 24px; }
.history-hand { margin-bottom: 9px; border: 1px solid var(--line); border-radius: 9px; background: rgba(255,255,255,.02); overflow: hidden; }
.history-hand.live { border-color: rgba(84,229,208,.45); }
.history-hand > summary { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 13px 14px; cursor: pointer; list-style-position: inside; }
.history-hand > summary > span:first-child { display: inline-grid; gap: 4px; }
.history-hand > summary small { color: var(--muted); font-size: 11px; }
.history-board { display: flex; align-items: center; justify-content: flex-end; gap: 3px; }
.hand-history-body { padding: 0 14px 14px; border-top: 1px solid var(--line); }
.hand-history-body h4 { margin: 16px 0 4px; }
.hand-stack-changes { display: grid; gap: 6px; margin-top: 12px; }
.hand-stack-row { display: grid; grid-template-columns: minmax(90px, 1fr) auto minmax(128px, auto) 48px; align-items: center; gap: 10px; padding: 8px 9px; border-radius: 6px; background: rgba(0,0,0,.14); font-size: 12px; }
.hand-stack-row > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hand-stack-row small { color: var(--muted); text-align: right; }
.history-list { max-height: 55vh; margin: 0; padding: 0; overflow-y: auto; list-style: none; }
.history-list li { display: grid; grid-template-columns: 34px 1fr; gap: 10px; padding: 10px 4px; border-bottom: 1px solid var(--line); }
.history-list li:last-child { border-bottom: 0; }
.history-list small { display: inline-block; min-width: 58px; margin-right: 8px; color: var(--muted); }
.history-sequence { color: var(--pink); font: 800 11px/1.6 monospace; }
.history-pagination { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 14px; }
.history-pagination span { min-width: 92px; color: var(--muted); font: 12px/1 monospace; text-align: center; }
.history-pagination strong { color: var(--paper); }
.history-pagination .ghost-button { min-width: 76px; }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 30; max-width: 360px; padding: 14px 18px; border: 1px solid var(--pink); border-radius: 8px; background: #251a30; box-shadow: var(--shadow); }

@media (max-width: 780px) {
  .auth-layout, .grid { grid-template-columns: 1fr; }
  .auth-layout { align-content: center; }
  .hero-copy h1 { font-size: clamp(40px, 13vw, 54px); }
  .topbar { height: 58px; padding: 0 max(12px, env(safe-area-inset-left)); }
  .topbar-actions { gap: 6px; }
  .status-dot { display: none; }
  .ghost-button { min-height: 42px; }
  .sound-toggle { width: 44px; padding-inline: 6px; font-size: 0; }
  .sound-toggle::after { content: "🔊"; font-size: 16px; }
  .sound-toggle[aria-pressed="false"]::after { content: "🔇"; }
  .app-shell { width: min(100% - 20px, 680px); min-height: calc(100dvh - 58px); padding: 24px 0 max(24px, env(safe-area-inset-bottom)); }
  .inline-form { align-items: stretch; flex-direction: column; }
  .panel { padding: 22px 18px; }
  .dashboard-head { align-items: center; }
  .quick-start-panel { position: sticky; top: 8px; z-index: 7; margin: -8px 0 14px; grid-template-columns: minmax(0, 1fr) 132px; padding: 10px; box-shadow: 0 12px 34px rgba(0,0,0,.28); }
  .quick-start-panel strong { font-size: 15px; }
  .quick-start-panel .primary-button { min-height: 42px; padding: 10px 8px; font-size: 13px; }
  .waiting-room-panel { padding: 14px 12px; }
  .waiting-room-heading { margin-bottom: 11px; }
  .waiting-room-heading h2 { font-size: 18px; }
  .waiting-room-heading > span { font-size: 10px; }
  .waiting-seat-grid { gap: 6px; }
  .waiting-seat { min-height: 64px; padding: 8px; }
  .waiting-seat strong { font-size: 12px; }
  .waiting-room-footer { align-items: stretch; flex-direction: column; gap: 10px; margin-top: 12px; padding-top: 11px; }
  .waiting-room-footer .ghost-button { width: 100%; }
  .room-code { font-size: clamp(28px, 10vw, 44px); }
  .home-account-meta { max-width: 42%; }
  .admin-heading { align-items: start; margin-bottom: 22px; }
  .coin-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-layout { grid-template-columns: 1fr; gap: 28px; }
  .admin-create-form { padding: 0 0 28px; border-right: 0; border-bottom: 1px solid var(--line); }
  .admin-list-head { align-items: stretch; flex-direction: column; gap: 12px; }
  .search-field { width: 100%; }
  .account-row { grid-template-columns: minmax(0, 1fr) auto; gap: 10px; padding: 14px 12px; }
  .account-coins { grid-column: 2; grid-row: 1; }
  .account-flags { grid-column: 1 / -1; justify-content: flex-start; }
  .account-actions { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, 1fr); }
  .account-actions .ghost-button { min-height: 42px; }
  .room-operations-toolbar { align-items: stretch; flex-direction: column; gap: 8px; }
  .room-operations-toolbar .search-field { width: 100%; }
  .room-operations-toolbar p { margin: 0; text-align: left; }
  .room-operation-row { grid-template-columns: minmax(0, 1fr) auto; gap: 9px 10px; padding: 14px 3px; }
  .room-operation-state, .room-operation-coins, .room-anomalies { grid-column: 1 / -1; }
  .room-operation-coins { grid-template-columns: minmax(0, 1fr) auto; }
  .room-operation-actions { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, 1fr); }
  .room-operation-actions .ghost-button { min-height: 42px; }
  .room-player-operation { grid-template-columns: minmax(0, 1fr) auto; gap: 5px 12px; }
  .room-player-operation > div { grid-row: 1 / 4; }
  .coin-ledger-toolbar { align-items: stretch; flex-direction: column; gap: 8px; }
  .coin-ledger-toolbar label { width: 100%; }
  .coin-ledger-toolbar p { margin: 0; text-align: left; }
  .coin-ledger-row { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; padding: 13px 3px; }
  .coin-ledger-row .coin-balance-flow { grid-column: 1 / -1; text-align: left; }
  .coin-ledger-row small { grid-column: 1 / -1; white-space: normal; }
  .match-admin-toolbar { align-items: stretch; flex-direction: column; }
  .match-admin-toolbar .search-field { width: 100%; }
  .match-record-row { grid-template-columns: minmax(0, 1fr) auto; gap: 8px 10px; padding: 14px 3px; }
  .match-record-players { grid-column: 1 / -1; }
  .match-record-row .ghost-button { min-height: 42px; }
  .match-record-overview { grid-template-columns: 1fr; }
  .match-player-result { grid-template-columns: minmax(0, 1fr) auto; }
  .match-player-result span { grid-column: 1; grid-row: 2; }
  .match-player-result b { grid-column: 2; grid-row: 1 / 3; }
  .audit-row { grid-template-columns: 1fr; gap: 3px; }
  .history-dialog { padding: 20px 14px; }
  .stack-summary-grid { grid-template-columns: 1fr; }
  .history-hand > summary { align-items: flex-start; flex-direction: column; }
  .history-board { justify-content: flex-start; }
  .hand-stack-row { grid-template-columns: minmax(0, 1fr) auto 44px; }
  .hand-stack-row small { grid-column: 1 / -1; grid-row: 2; text-align: left; }

  body.in-game { height: 100dvh; overflow: hidden; }
  body.in-game .noise { opacity: .1; }
  body.in-game .topbar { height: 50px; padding-top: env(safe-area-inset-top); }
  body.in-game .brand-mark { width: 27px; height: 33px; }
  body.in-game .brand { font-size: 13px; }
  body.in-game .topbar-actions { gap: 5px; }
  body.in-game .sound-toggle, body.in-game .game-header-button { width: 44px; min-width: 44px; min-height: 44px; padding: 6px; }
  body.in-game .game-header-button { font-size: 11px; }
  body.in-game #effects-toggle { display: none; }
  body.in-game #logout-button { display: none; }
  body.in-game .app-shell { width: 100%; height: calc(100dvh - 50px); min-height: 0; padding: 6px 8px max(6px, env(safe-area-inset-bottom)); display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: 4px; overflow: hidden; }
  body.in-game .dashboard-head { min-width: 0; margin: 0; padding: 0 4px; align-items: center; }
  body.in-game .dashboard-head h1 { display: none; }
  body.in-game .dashboard-head .eyebrow { margin: 0 0 2px; font-size: 9px; }
  body.in-game .game-head-stats { gap: 8px; margin-top: 4px; font-size: 10px; }
  body.in-game .game-head-stats strong { font-size: 11px; }
  body.in-game .dashboard-head .room-code { font-size: 21px; }
  body.in-game .game-head-actions { gap: 6px; }
  body.in-game .table-stage { width: 100%; min-height: 0; height: 100%; overflow: hidden; }
  body.in-game .table-quick-actions { right: 9px; bottom: 8px; grid-template-columns: repeat(2, minmax(54px, auto)); gap: 5px; padding: 6px; border-radius: 8px; }
  body.in-game .table-quick-actions span { font-size: 8px; }
  body.in-game .table-action-button { min-height: 32px; padding: 6px 10px; font-size: 11px; }
  body.in-game .poker-table { width: min(94vw, 540px); max-height: calc(100% - 18px); aspect-ratio: 1.32; margin: 6px 0 0; border-width: 10px; }
  body.in-game .board { inset: 39% 2% auto; gap: 4px; }
  body.in-game .card { width: clamp(38px, 11vw, 49px); border-radius: 5px; font-size: clamp(17px, 5.5vw, 23px); box-shadow: 0 3px 0 #aa9c81; }
  body.in-game .pot-label { top: 28%; font-size: 12px; }
  body.in-game .seat { min-width: 84px; max-width: 108px; padding: 9px 6px 5px; font-size: 10px; line-height: 1.2; }
  body.in-game .seat-name strong { max-width: 62px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  body.in-game .seat-stack { margin-top: 3px; font-size: 13px; }
  body.in-game .seat-status { min-height: 13px; margin-top: 2px; overflow: hidden; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
  body.in-game .seat-roles b { padding: 1px 3px; font-size: 7px; }
  body.in-game .seat-wager { bottom: -20px; padding: 3px 6px; font-size: 8px; }
  body.in-game .seat .turn-clock { min-width: 28px; min-height: 16px; padding: 1px 4px; font-size: 8px; }
  body.in-game .seat-index { top: -7px; left: 6px; padding: 1px 5px; font-size: 7px; }
  body.in-game .seat[data-seat="0"] { --self-card-height: clamp(53px, 15.4vw, 69px); left: 50%; bottom: calc(10% + var(--self-card-height) + 8px); min-width: 0; max-width: none; padding: 0; border: 0; background: transparent; box-shadow: none; transform: translateX(-50%); opacity: 1; filter: none; }
  body.in-game .seat[data-seat="0"] .seat-index { display: none; }
  body.in-game .seat[data-seat="0"] .seat-name, body.in-game .seat[data-seat="0"] .seat-stack { display: none; }
  body.in-game .seat[data-seat="0"] .seat-status { display: none; }
  body.in-game .seat[data-seat="0"] .seat-wager { position: static; transform: none; padding: 3px 8px; color: var(--gold); border-color: rgba(255,209,102,.62); background: rgba(21,18,31,.88); font-size: 8px; }
  body.in-game .seat[data-seat="1"] { left: -1%; bottom: 14%; }
  body.in-game .seat[data-seat="2"] { left: 0; top: 9%; }
  body.in-game .seat[data-seat="3"] { top: -5%; }
  body.in-game .seat[data-seat="4"] { right: 0; top: 9%; }
  body.in-game .seat[data-seat="5"] { right: -1%; bottom: 14%; }
  body.in-game .hole-cards { bottom: 10%; gap: 5px; }
  body.in-game .action-dock { position: static; width: 100%; margin: 0; padding: 9px; grid-template-columns: 1fr; gap: 8px; border-radius: 11px; backdrop-filter: none; }
  body.in-game .action-dock.waiting { min-height: 52px; }
  body.in-game .action-summary { font-size: 11px; }
  body.in-game .your-turn-summary { min-height: 38px; padding: 6px 8px; }
  body.in-game .your-turn-label { gap: 7px; }
  body.in-game .your-turn-label b { font-size: 15px; }
  body.in-game .action-main { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  body.in-game .action-main .action-button { min-height: 40px; padding: 8px 6px; font-size: 13px; }
  body.in-game .raise-controls { grid-template-columns: minmax(0, 1fr) 106px; gap: 6px 8px; padding: 8px 0 0; border-top: 1px solid var(--line); border-left: 0; }
  body.in-game .raise-head output { font-size: 19px; }
  body.in-game .raise-shortcuts { flex-wrap: nowrap; gap: 4px; overflow-x: auto; scrollbar-width: none; }
  body.in-game .raise-shortcuts::-webkit-scrollbar { display: none; }
  body.in-game .chip-button { flex: 0 0 auto; min-height: 34px; padding: 6px 9px; }
  body.in-game .raise-submit { min-width: 0; min-height: 66px; padding: 8px; }
  body.in-game .hand-result { max-height: 16dvh; margin: 0; padding: 8px 10px; }
  body.in-game .compact-hand-result { min-height: 44px; }
  body.in-game .result-title { margin-bottom: 8px; }
  body.in-game .result-title h2 { font-size: 18px; }
  body.in-game .result-pot { font-size: 12px; }
  body.in-game .result-players { grid-template-columns: 1fr; gap: 6px; margin-bottom: 8px; }
  body.in-game .result-player { padding: 8px; }
  body.in-game .result-player-head { margin-bottom: 5px; }
  body.in-game .result-hand { gap: 8px; font-size: 11px; }
  body.in-game .card.mini-card { width: 29px; font-size: 12px; }
  body.in-game .card.micro-card { width: 20px; font-size: 9px; }
  body.in-game .next-hand-head h2 { font-size: 17px; }
  body.in-game .next-hand-head strong { font-size: 11px; }
  body.in-game .between-hand-actions { gap: 6px; margin-top: 7px; }
  body.in-game .between-hand-actions button { min-height: 40px; padding: 8px 6px; font-size: 12px; }
  body.in-game .between-hand-actions .primary-button:first-child, body.in-game .between-hand-actions button:only-child, body.in-game .between-hand-actions .result-waiting:first-child { min-height: 52px; font-size: 15px; }
  body.in-game .compact-result > summary { font-size: 11px; }
}

@media (max-width: 780px) and (orientation: landscape) and (max-height: 600px) {
  body.in-game .app-shell { grid-template-columns: minmax(0, 1fr) minmax(290px, 38vw); grid-template-rows: auto minmax(0, 1fr); gap: 6px; }
  body.in-game .dashboard-head { grid-column: 1 / -1; }
  body.in-game .table-stage { grid-column: 1; grid-row: 2; }
  body.in-game .poker-table { width: min(57vw, 520px); aspect-ratio: 1.7; }
  body.in-game .action-dock, body.in-game .hand-result { grid-column: 2; grid-row: 2; align-self: center; max-height: 100%; overflow-y: auto; }
  body.in-game .raise-controls { grid-template-columns: 1fr; }
  body.in-game .raise-submit { grid-column: 1; grid-row: auto; min-height: 42px; }
}

@media (hover: none) and (pointer: coarse) {
  button, input, select { font-size: 16px; }
  .ghost-button, .chip-button { min-height: 44px; }
  .action-button:active, .primary-button:active, .ghost-button:active, .chip-button:active { transform: scale(.97); filter: brightness(1.12); }
  body.in-game { overscroll-behavior: none; }
  body.in-game .action-dock { user-select: none; -webkit-user-select: none; }
  body.in-game .action-main .action-button { min-height: 48px; }
  body.in-game .raise-shortcuts .chip-button { min-height: 42px; padding-inline: 12px; }
  body.in-game .between-hand-actions button { min-height: 48px; touch-action: manipulation; }
  body.in-game #raise-slider { height: 34px; touch-action: none; }
  body.in-game #raise-slider::-webkit-slider-thumb { width: 30px; height: 30px; }
  body.in-game #raise-slider::-moz-range-thumb { width: 30px; height: 30px; }
  .toast { right: max(12px, env(safe-area-inset-right)); bottom: max(12px, env(safe-area-inset-bottom)); left: max(12px, env(safe-area-inset-left)); max-width: none; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
  .motion-layer { display: none; }
}
