:root {
  color-scheme: dark;
  --bg: #0b0e14;
  --bg-deep: #080a0f;
  --surface: #12151d;
  --surface-raised: #171b25;
  --surface-soft: #1c212c;
  --border: rgb(255 255 255 / 14%);
  --border-soft: rgb(255 255 255 / 7%);
  --text: #f2f4f8;
  --muted: #98a0b3;
  --green: #2fca7c;
  --green-deep: #1f9d5e;
  --yellow: #f5c542;
  --red: #ff5c57;
  --blue: #4d8dff;
  --purple: #b58cff;
  --table-felt: #123c2d;
  --poker-table-radius: 999px;
  --radius: 10px;
  --sidebar: 232px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --control-height: 48px;
  --shadow-panel: 0 18px 45px rgb(0 0 0 / 24%);
  --shadow-float: 0 24px 70px rgb(0 0 0 / 42%);
  font-family: Inter, "Microsoft YaHei UI", "SF Pro Display", "Noto Sans SC", "PingFang SC", system-ui, sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { max-width: 100%; overflow-x: clip; background: var(--bg); }
body { margin: 0; max-width: 100%; min-height: 100dvh; overflow-x: clip; color: var(--text); background: var(--bg); font-variant-numeric: tabular-nums; }
html.dialog-open,
body.dialog-open,
html.dialog-open body { height: 100%; overflow: hidden; overscroll-behavior: none; }
button, input, select { font: inherit; }
button, select, input, summary { min-height: 44px; }
button { color: inherit; }
button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible, a:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.page-heading h1:focus:not(:focus-visible) { outline: none; }
.page-heading h1:focus-visible { outline: 2px solid color-mix(in srgb, var(--blue) 72%, transparent); outline-offset: 4px; border-radius: 4px; }
button:disabled { cursor: not-allowed; opacity: .45; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: clamp(1.75rem, 2.3vw, 2.2rem); line-height: 1.2; letter-spacing: .02em; }
h2 { font-size: 1.12rem; line-height: 1.35; }
p { line-height: 1.7; }

.skip-link { position: fixed; z-index: 1000; top: 8px; left: 8px; padding: 12px 18px; color: #04120b; background: var(--green); border-radius: 6px; transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }
.app-shell { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); min-height: 100dvh; }
.app-main { display: flex; flex-direction: column; min-width: 0; min-height: 100dvh; }
.desktop-sidebar { position: sticky; z-index: 35; top: 0; display: flex; flex-direction: column; height: 100dvh; padding: 14px 10px; border-right: 1px solid var(--border-soft); background: rgb(13 16 23 / 72%); backdrop-filter: blur(18px); }
.brand { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 0 6px; white-space: nowrap; }
.brand-mark { color: var(--green); font-size: 1.25rem; font-weight: 900; line-height: 1; letter-spacing: -.08em; filter: drop-shadow(0 7px 5px rgb(47 202 124 / 18%)); }
.brand-copy { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 8px; }
.brand-copy strong { font-size: 1rem; letter-spacing: .04em; }
.brand-copy small { color: var(--green); font-weight: 800; }
.side-navigation { display: grid; gap: 4px; margin-top: 18px; }
.side-nav-button { position: relative; display: inline-flex; align-items: center; gap: 12px; min-height: 46px; padding: 0 12px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); cursor: pointer; font-weight: 700; text-align: left; }
.side-nav-button:hover { color: var(--text); background: rgb(255 255 255 / 4%); }
.side-nav-button.active { color: var(--green); background: rgb(47 202 124 / 12%); }
.side-nav-button.active::before { content: ""; position: absolute; left: 0; width: 3px; height: 22px; border-radius: 0 3px 3px 0; background: var(--green); }
.sidebar-utilities { display: grid; gap: 6px; margin-top: auto; padding: 0 6px 4px; }
.sidebar-utilities .icon-button { width: 100%; justify-content: flex-start; gap: 12px; padding: 0 12px; border: 0; background: transparent; color: var(--muted); }
.sidebar-utilities .icon-button:hover { color: var(--text); background: rgb(255 255 255 / 4%); border: 0; }
.sidebar-utilities .header-actions { gap: 6px; }
.mobile-utilities { display: flex; align-items: center; gap: 6px; }
.local-mode-badge { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 10px; color: var(--muted); font-size: .82rem; white-space: nowrap; }
.local-mode-badge i, .offline-badge i { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgb(47 202 124 / 10%); }
.ui-icon { display: inline-block; flex: 0 0 auto; width: 21px; height: 21px; background: currentcolor; mask-position: center; mask-size: contain; mask-repeat: no-repeat; -webkit-mask-position: center; -webkit-mask-size: contain; -webkit-mask-repeat: no-repeat; }
.icon-home { mask-image: url('/icons/home.svg'); -webkit-mask-image: url('/icons/home.svg'); }
.icon-calculator { mask-image: url('/icons/calculator.svg'); -webkit-mask-image: url('/icons/calculator.svg'); }
.icon-bot { mask-image: url('/icons/bot.svg'); -webkit-mask-image: url('/icons/bot.svg'); }
.icon-progress { mask-image: url('/icons/chart-no-axes-combined.svg'); -webkit-mask-image: url('/icons/chart-no-axes-combined.svg'); }
.icon-settings { mask-image: url('/icons/settings.svg'); -webkit-mask-image: url('/icons/settings.svg'); }
.icon-help { mask-image: url('/icons/circle-help.svg'); -webkit-mask-image: url('/icons/circle-help.svg'); }
.icon-maximize { mask-image: url('/icons/maximize.svg'); -webkit-mask-image: url('/icons/maximize.svg'); }
.icon-contrast { mask-image: url('/icons/contrast.svg'); -webkit-mask-image: url('/icons/contrast.svg'); }
.icon-volume { mask-image: url('/icons/volume.svg'); -webkit-mask-image: url('/icons/volume.svg'); }
.icon-volume-off { mask-image: url('/icons/volume-off.svg'); -webkit-mask-image: url('/icons/volume-off.svg'); }
.mobile-header, .bottom-navigation { display: none; }
.page-content { container: workspace / inline-size; min-width: 0; padding: 18px 14px 28px; }
.route-page { width: min(100%, 1440px); margin: 0 auto; }
.page-heading { display: flex; align-items: center; justify-content: space-between; min-height: 64px; padding: 0 4px 18px; }
.page-heading p { margin: 7px 0 0; color: var(--muted); }
.header-actions { display: flex; gap: 14px; }
.deck-toggle-button { font-size: 1.15rem; }
.deck-toggle-badge { display: inline-flex; align-items: center; gap: 2px; font-weight: 900; line-height: 1; }
.deck-pip-spade { color: var(--text); }
.deck-pip-diamond { color: #2563eb; }
.deck-toggle-badge.two-color .deck-pip-diamond { color: #dc2626; }
.icon-button { display: grid; place-items: center; width: 48px; min-width: 44px; height: 48px; border: 1px solid var(--border); border-radius: 8px; background: color-mix(in srgb, var(--surface) 76%, transparent); cursor: pointer; font-size: 1.5rem; }
.icon-button:hover { border-color: var(--green); }
.text-action-button { min-width: 72px; padding: 0 12px; border: 1px solid var(--border); border-radius: 8px; background: color-mix(in srgb, var(--surface) 76%, transparent); cursor: pointer; }
.text-action-button:hover { border-color: var(--green); }
.connectivity-banner i { width: 18px; height: 18px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 5px rgb(47 202 124 / 8%); }
.panel { border: 1px solid var(--border-soft); border-radius: var(--radius); background: var(--surface); }
.primary-button, .secondary-button { min-height: 48px; padding: 0 22px; border-radius: 10px; font-weight: 750; cursor: pointer; }
.primary-button { border: 1px solid var(--green); background: var(--green); color: #04120b; }
.primary-button:hover { filter: brightness(1.1); }
.secondary-button { border: 1px solid var(--border); background: var(--surface-raised); }
.section-label { margin-bottom: 8px; color: var(--green); font-size: .82rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.muted { color: var(--muted); }

/* Calculator */
.calculator-layout { display: grid; grid-template-columns: minmax(0, 1fr) 308px; gap: 10px; }
.calculator-main, .calculator-rail { display: grid; min-width: 0; align-content: start; gap: 10px; }
.card-input-panel { display: grid; grid-template-columns: minmax(230px, .52fr) minmax(450px, 1fr); min-height: 280px; overflow: hidden; }
.card-group { padding: 26px 24px; }
.card-group + .card-group { border-left: 1px solid var(--border-soft); }
.card-group-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.card-group-header h2 { margin-bottom: 0; }
.clear-group-button { min-height: 32px; padding: 0 10px; border: 1px solid var(--border-soft); border-radius: 6px; background: transparent; color: var(--muted); font-size: .8rem; cursor: pointer; transition: all .15s ease; }
.clear-group-button:hover { border-color: var(--red); color: var(--red); }
.board-texture-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.texture-tag { display: inline-flex; align-items: center; padding: 3px 8px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface-raised); color: var(--text); font-size: .78rem; font-weight: 750; letter-spacing: .02em; cursor: help; }
.texture-tag:hover { border-color: var(--green); color: var(--green); }
.quick-pot-bar { display: flex; gap: 4px; margin-top: 6px; }
.quick-pot-btn { flex: 1; min-height: 28px; padding: 0 4px; border: 1px solid var(--border-soft); border-radius: 5px; background: rgb(255 255 255 / 3%); color: var(--muted); font-size: .74rem; font-weight: 700; cursor: pointer; transition: all .15s ease; }
.quick-pot-btn:hover:not(:disabled) { border-color: var(--green); color: var(--text); background: rgb(47 202 124 / 12%); }
.card-row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(82px, 1fr); gap: 14px; }
.card-slot { display: grid; grid-template-rows: minmax(120px, 1fr) auto; gap: 10px; padding: 0; border: 0; background: transparent; cursor: pointer; }
.card-face { display: grid; place-items: center; min-height: 150px; border: 1px solid #4c5c6b; border-radius: 8px; background: rgb(255 255 255 / 3%); color: var(--muted); font-size: 2rem; }
.card-slot:hover .card-face { border-color: var(--green); }
.card-slot.filled .card-face { background: var(--text); color: #111a22; font-weight: 800; font-size: 1.65rem; }
.card-slot.filled .card-face:is(:has(+ *)) { color: #111a22; }
.card-slot small { color: var(--muted); }
.controls-panel { display: grid; grid-template-columns: 1fr 1fr 1fr minmax(220px, 1fr); align-items: center; gap: 34px; padding: 24px; }
.control-group { display: grid; gap: 10px; }
.control-group label { font-weight: 750; }
.control-group small { color: var(--muted); }
.stepper { display: grid; grid-template-columns: 50px 1fr 50px; min-height: 50px; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.stepper button, .stepper output { display: grid; place-items: center; min-height: 48px; border: 0; background: transparent; }
.stepper button { cursor: pointer; font-size: 1.25rem; }
.stepper button:first-child, .stepper output { border-right: 1px solid var(--border); }
select, input { width: 100%; min-height: 50px; padding: 0 14px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg-deep); color: var(--text); }
.calculate-button { min-height: 72px; font-size: 1.25rem; }
.calculate-button span { margin-right: 14px; }
.results-panel { padding: 18px 24px 26px; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.panel-heading h2 { margin-bottom: 0; }
.panel-heading h2 small { color: var(--muted); font-size: .82rem; font-weight: 500; }
.reset-button { min-height: 44px; padding: 0 16px; }
.result-columns { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 22px; }
.equity-primary { display: grid; justify-items: center; gap: 5px; margin-top: 18px; padding: 16px; border: 1px solid rgb(47 202 124 / 38%); border-radius: 10px; background: rgb(47 202 124 / 8%); text-align: center; }
.equity-primary strong { color: var(--green); }
.equity-primary span { font-size: clamp(2rem, 4vw, 2.7rem); font-weight: 800; letter-spacing: .04em; }
.equity-primary small { color: var(--muted); }
.result-column { display: grid; justify-items: center; gap: 14px; padding: 0 32px; text-align: center; }
.result-column + .result-column { border-left: 1px solid var(--border); }
.result-column strong { font-size: 1.25rem; }
.result-column span { font-size: 2.15rem; font-weight: 800; letter-spacing: .04em; }
.result-column small { min-height: 40px; color: var(--muted); }
.result-column i { width: 100%; height: 3px; border-radius: 2px; }
.result-column.win strong { color: var(--green); } .result-column.win i { background: var(--green); }
.result-column.tie strong { color: var(--yellow); } .result-column.tie i { background: var(--yellow); }
.result-column.loss strong { color: var(--red); } .result-column.loss i { background: var(--red); }
.result-status { display: flex; align-items: center; gap: 18px; margin: 26px 0 0; padding: 14px 18px; border: 1px solid var(--border-soft); border-radius: 7px; color: var(--text); }
.result-status span { color: var(--blue); font-size: 1.45rem; }
.calculator-rail section { padding: 26px 24px; }
.odds-panel { min-height: 425px; }
.odds-panel dl { display: grid; gap: 24px; margin-top: 30px; }
.odds-panel dl div { display: flex; justify-content: space-between; }
.odds-panel dt { color: var(--muted); }
.odds-panel dd { margin: 0; font-weight: 700; letter-spacing: .12em; }
.odds-panel .divider { margin-top: 4px; padding-top: 26px; border-top: 1px solid var(--border); }
.advice-panel { display: grid; justify-items: center; min-height: 365px; text-align: center; }
.advice-panel h2 { justify-self: start; }
.advice-icon { display: grid; place-items: center; width: 84px; height: 84px; margin: 8px 0; border: 3px solid var(--border); border-radius: 50%; font-size: 2.4rem; }
.advice-panel strong { font-size: 1.25rem; }
.advice-panel p { color: var(--muted); }
.modal-backdrop { position: fixed; z-index: 50; inset: 0; display: grid; place-items: center; padding: 20px; background: rgb(0 5 10 / 78%); }
.card-picker { width: min(700px, 100%); max-height: min(680px, 90dvh); padding: 24px; overflow: auto; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); box-shadow: 0 30px 80px rgb(0 0 0 / 50%); }
.card-grid { display: grid; grid-template-columns: repeat(13, minmax(36px, 1fr)); gap: 6px; margin-top: 20px; }
.card-grid button { display: grid; place-items: center; min-height: 48px; border: 1px solid var(--border); border-radius: 6px; background: var(--text); color: #141b21; font-weight: 800; cursor: pointer; transition: transform .1s ease, border-color .15s ease; }
.card-grid button:hover:not(:disabled) { border-color: var(--green); transform: translateY(-2px); box-shadow: 0 4px 12px rgb(0 0 0 / 30%); }
.card-grid button.red { color: #dc2626; }
.card-grid button.suit-spades { color: #0f172a; }
.card-grid button.suit-hearts { color: #dc2626; }
.card-grid button.suit-diamonds { color: #2563eb; }
.card-grid button.suit-clubs { color: #16a34a; }
.card-face.suit-spades { color: #0f172a; }
.card-face.suit-hearts { color: #dc2626; }
.card-face.suit-diamonds { color: #2563eb; }
.card-face.suit-clubs { color: #16a34a; }

/* Local training dashboard */
.home-page { width: min(100%, 1180px); }
.home-dashboard-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; min-height: 108px; padding: 8px 4px 20px; }
.home-dashboard-header h1 { max-width: 720px; font-size: clamp(1.8rem, 3vw, 2.55rem); letter-spacing: -.025em; }
.home-dashboard-header p:not(.section-label) { margin: 9px 0 0; color: var(--muted); }
.home-dashboard-header .offline-badge { margin-left: 0; padding: 0 4px; white-space: nowrap; }
.home-dashboard-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 12px; }
.dashboard-action-hub, .dashboard-recent { grid-column: span 8; }
.dashboard-overview, .dashboard-next-action { grid-column: span 4; }
.dashboard-action-hub, .dashboard-overview, .dashboard-recent, .dashboard-next-action { min-width: 0; padding: 22px; background: var(--surface-raised); }
.dashboard-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 20px; }
.dashboard-action { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; align-items: center; gap: 12px; min-width: 0; min-height: 112px; padding: 16px; border: 1px solid var(--border-soft); border-radius: 10px; background: rgb(255 255 255 / 2%); text-align: left; cursor: pointer; }
.dashboard-action:hover { border-color: currentcolor; background: rgb(255 255 255 / 4%); transform: translateY(-2px); }
.dashboard-action > span { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 9px; background: rgb(255 255 255 / 5%); }
.dashboard-action div { display: grid; min-width: 0; gap: 5px; }
.dashboard-action strong { color: var(--text); font-size: 1rem; }
.dashboard-action small { color: var(--muted); line-height: 1.45; }
.dashboard-action b { color: var(--muted); font-size: 1.4rem; }
.action-ai { color: var(--green); } .action-calculator { color: var(--blue); } .action-review { color: var(--yellow); } .action-multiplayer { color: #d898ff; }
.text-link-button { min-height: 44px; padding: 0 4px; border: 0; background: transparent; color: var(--green); cursor: pointer; font-weight: 700; }
.dashboard-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 12px; margin-top: 22px; }
.dashboard-metrics div { display: grid; gap: 5px; }
.dashboard-metrics span { color: var(--muted); font-size: .82rem; }
.dashboard-metrics strong { font-size: 1.75rem; }
.dashboard-breakdown { display: grid; gap: 8px; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--border-soft); }
.dashboard-breakdown p { display: flex; justify-content: space-between; margin: 0; color: var(--muted); font-size: .82rem; }
.dashboard-breakdown p b { color: var(--text); }
.dashboard-breakdown progress { display: block; width: 100%; height: 6px; overflow: hidden; appearance: none; border: 0; border-radius: 6px; background: rgb(255 255 255 / 5%); }
.dashboard-breakdown progress::-webkit-progress-bar { border-radius: inherit; background: rgb(255 255 255 / 5%); }
.dashboard-breakdown progress::-webkit-progress-value { border-radius: inherit; background: var(--green); }
.dashboard-breakdown progress::-moz-progress-bar { border-radius: inherit; background: var(--green); }
.dashboard-breakdown progress.deviated::-webkit-progress-value { background: var(--red); }
.dashboard-breakdown progress.deviated::-moz-progress-bar { background: var(--red); }
.dashboard-data-warning, .dashboard-unavailable { margin: 16px 0 0; color: var(--yellow); font-size: .82rem; }
.dashboard-skeleton { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 22px; }
.dashboard-skeleton span:not(.sr-only) { height: 62px; border-radius: 8px; background: linear-gradient(90deg, rgb(255 255 255 / 3%), rgb(255 255 255 / 7%), rgb(255 255 255 / 3%)); background-size: 200% 100%; animation: skeleton-shift 1.2s ease-in-out infinite; }
.dashboard-recent { min-height: 300px; }
.dashboard-activity-list { display: grid; margin-top: 12px; }
.dashboard-activity-row { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; align-items: center; gap: 12px; min-width: 0; padding: 14px 2px; border-top: 1px solid var(--border-soft); }
.dashboard-activity-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 8px; background: var(--surface-soft); color: var(--green); }
.dashboard-activity-row > div:nth-child(2) { display: grid; min-width: 0; gap: 3px; }
.dashboard-activity-row small, .dashboard-activity-row span, .dashboard-activity-row time { color: var(--muted); font-size: .78rem; }
.dashboard-activity-row strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-activity-meta { display: grid; justify-items: end; gap: 6px; text-align: right; }
.dashboard-activity-meta span { padding: 3px 7px; border-radius: 999px; color: var(--yellow); background: rgb(255 201 52 / 8%); }
.dashboard-activity-meta span.reviewed { color: var(--green); background: rgb(47 202 124 / 8%); }
.dashboard-empty { display: grid; place-items: center; min-height: 210px; text-align: center; }
.dashboard-empty p { max-width: 390px; color: var(--muted); }
.dashboard-next-action { display: flex; flex-direction: column; align-items: flex-start; min-height: 300px; background: linear-gradient(150deg, rgb(20 46 37 / 96%), rgb(15 21 31 / 96%) 62%); }
.dashboard-next-action h2 { max-width: 290px; margin-top: 10px; font-size: 1.55rem; }
.dashboard-next-action p { color: var(--muted); }
.dashboard-next-action .primary-button { margin-top: auto; }
.dashboard-next-action > small { margin-top: 18px; color: var(--muted); line-height: 1.5; }
@keyframes skeleton-shift { to { background-position: -200% 0; } }

/* Authoritative AI practice */
.ai-page-content { min-width: 0; }
.practice-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 10px; }
.offline-badge { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; margin-left: auto; color: var(--green); font-weight: 750; }
.offline-badge svg { width: 22px; height: 22px; fill: none; stroke: currentcolor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2.4; }
.practice-layout { display: grid; grid-template-columns: minmax(0, 1fr); align-items: start; gap: 10px; min-width: 0; }
.practice-context { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 8px 18px; min-width: 0; padding: 12px 16px; }
.practice-context h2, .practice-context h3 { margin: 0; }
.practice-context > h2 { grid-column: 1; font-size: .82rem; color: var(--muted); font-weight: 800; letter-spacing: .06em; }
.practice-context-list { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 0; }
.practice-context-list div { display: flex; gap: 6px; padding-bottom: 0; border-bottom: 0; }
.practice-context-list dt { color: var(--muted); }
.practice-context-list dt::after { content: " "; white-space: pre; }
.practice-context-list dd { margin: 0; text-align: right; font-weight: 750; }
.practice-opponent-summary { display: flex; grid-column: 1 / -1; flex-wrap: wrap; align-items: baseline; gap: 6px 18px; }
.practice-opponent-summary h3 { font-size: .82rem; color: var(--muted); font-weight: 800; letter-spacing: .06em; }
.practice-opponent-summary ul { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 0; padding: 0; list-style: none; }
.practice-opponent-summary li { display: flex; gap: 6px; min-width: 0; }
.practice-opponent-summary li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.practice-opponent-summary li small { color: var(--muted); }
.practice-opponent-summary small, .heuristic-disclaimer { color: var(--muted); }
.practice-stage { min-width: 0; grid-row: 2; }
.authoritative-table { min-width: 0; width: min(100%, 960px); margin: 0 auto; padding: clamp(12px, 2vw, 24px); }
.table-status { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 14px; }
.table-status strong { color: var(--green); font-size: 1.15rem; }
.table-status span { color: var(--muted); }
.poker-table-shell { position: relative; min-height: clamp(430px, 43vw, 610px); isolation: isolate; }
.practice-felt { position: absolute; inset: 0; display: grid; grid-template: minmax(112px, 1fr) minmax(154px, 1.2fr) minmax(112px, 1fr) / repeat(6, minmax(0, 1fr)); gap: 10px; min-width: 0; padding: 18px 34px; overflow: visible; border: 1px solid rgb(255 255 255 / 12%); border-radius: var(--poker-table-radius); background: radial-gradient(ellipse at 50% 48%, #1a4f3c 0%, var(--table-felt) 58%, #0a231a 100%); box-shadow: 0 20px 48px rgb(0 0 0 / 48%), inset 0 0 0 1px rgb(255 255 255 / 6%), inset 0 0 60px rgb(0 0 0 / 45%); }
.practice-felt::before { content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit; opacity: .12; background-image: repeating-linear-gradient(25deg, transparent 0 3px, rgb(255 255 255 / 4%) 3px 4px); }
.table-center { z-index: 1; grid-area: 2 / 2 / 3 / 6; display: grid; align-content: center; justify-items: center; gap: 9px; min-width: 0; }
.street-label { padding: 4px 12px; border: 1px solid rgb(47 202 124 / 35%); border-radius: 999px; background: rgb(4 22 16 / 88%); color: #86efac; font-size: .74rem; font-weight: 800; letter-spacing: .1em; box-shadow: 0 2px 8px rgb(0 0 0 / 30%); }
.board-lane { display: grid; grid-template-columns: repeat(5, minmax(35px, 52px)); gap: 7px; padding: 10px; border: 1px solid rgb(255 255 255 / 12%); border-radius: 11px; background: rgb(0 0 0 / 30%); box-shadow: inset 0 2px 6px rgb(0 0 0 / 35%), 0 4px 12px rgb(0 0 0 / 25%); }
.community-slot { display: grid; place-items: center; width: 100%; aspect-ratio: .7; border-radius: 6px; }
.community-slot.empty { border: 1.5px dashed rgb(255 255 255 / 18%); background: rgb(0 0 0 / 24%); }
.community-slot .practice-card { width: 100%; height: 100%; }
.pot-zone { display: flex; align-items: center; gap: 9px; min-height: 30px; padding: 2px 10px; border-radius: 999px; background: rgb(0 0 0 / 25%); }
.pot-zone strong { font-size: .86rem; color: #f3f4f6; font-weight: 800; text-shadow: 0 1px 2px rgb(0 0 0 / 50%); }
.chip-stack { position: relative; display: block; width: 31px; height: 19px; }
.chip-stack i { position: absolute; left: 0; display: block; width: 31px; height: 9px; border: 2px solid rgb(255 255 255 / 22%); border-radius: 50%; background: #2e3a4d; box-shadow: 0 2px 2px rgb(0 0 0 / 45%); }
.chip-stack i:nth-child(1) { bottom: 0; }.chip-stack i:nth-child(2) { bottom: 5px; background: #37465c; }.chip-stack i:nth-child(3) { bottom: 10px; background: #41526c; }
.practice-seat { z-index: 2; display: grid; align-self: center; align-content: start; gap: 3px; width: min(100%, 160px); min-width: 0; min-height: 105px; padding: 9px 10px; border: 1px solid rgb(255 255 255 / 11%); border-radius: 10px; background: rgb(11 15 22 / 85%); backdrop-filter: blur(6px); box-shadow: 0 8px 24px rgb(0 0 0 / 45%); }
.practice-seat.hero-station { border-color: rgb(34 197 94 / 55%); background: linear-gradient(180deg, rgb(16 48 35 / 90%) 0%, rgb(9 28 20 / 92%) 100%); box-shadow: 0 8px 26px rgb(0 0 0 / 50%), 0 0 16px rgb(34 197 94 / 15%); }
.practice-seat.current-actor { outline: 2.5px solid #f59e0b; outline-offset: 2px; animation: actor-glow 1.5s ease-in-out infinite alternate; }
@keyframes actor-glow {
  from { box-shadow: 0 10px 24px rgb(0 0 0 / 40%), 0 0 0 rgb(245 158 11 / 0%); }
  to { box-shadow: 0 10px 24px rgb(0 0 0 / 40%), 0 0 22px rgb(245 158 11 / 65%); }
}
.practice-seat.folded { filter: grayscale(.72); opacity: .55; }
.practice-seat.all-in { border-style: double; border-color: #f59e0b; }
.seat-heading { display: flex; align-items: center; justify-content: space-between; gap: 6px; min-width: 0; }
.seat-heading strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seat-heading > div { display: flex; align-items: center; gap: 4px; }
.turn-marker { padding: 3px 6px; border-radius: 4px; background: #f59e0b; color: #1e1b4b; font-size: .62rem; font-weight: 900; white-space: nowrap; letter-spacing: .02em; }
.dealer-button { display: grid; flex: 0 0 24px; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: linear-gradient(135deg, #ffffff, #e5e7eb); color: #111827; font-size: .72rem; font-weight: 900; box-shadow: 0 2px 6px rgb(0 0 0 / 35%); }
.practice-seat > small, .seat-flags { color: var(--muted); font-size: .72rem; }
.seat-flags:empty { display: none; }
.seat-cards { display: flex; gap: 4px; min-height: 48px; margin-top: 5px; }
.practice-card, .card-back { display: grid; place-items: center; width: clamp(34px, 4vw, 48px); aspect-ratio: .7; border-radius: 6px; background: linear-gradient(180deg, #ffffff 0%, #f1f5f9 100%); color: #111a22; font-weight: 900; box-shadow: 0 2px 6px rgb(0 0 0 / 35%), 0 1px 2px rgb(0 0 0 / 20%); }
.practice-card.red-card { color: #e11d48; }
.practice-card.suit-spades { color: #0f172a; }
.practice-card.suit-hearts { color: #dc2626; }
.practice-card.suit-diamonds { color: #2563eb; }
.practice-card.suit-clubs { color: #16a34a; }
.coach-made-hand { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; padding: 6px 10px; border: 1px solid var(--border-soft); border-radius: 6px; background: rgb(47 202 124 / 8%); font-size: .85rem; }
.coach-made-hand span { color: var(--muted); }
.coach-made-hand strong { color: var(--green); font-weight: 800; }
.hero-made-hand { margin-top: 4px; display: flex; justify-content: center; }
.hero-made-hand-badge { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 4px; background: rgb(47 202 124 / 16%); border: 1px solid rgb(47 202 124 / 35%); color: var(--green); font-size: .72rem; font-weight: 800; letter-spacing: .02em; }
.multiplayer-card { display: inline-grid; place-items: center; min-width: 38px; min-height: 48px; padding: 3px 6px; border-radius: 6px; background: linear-gradient(180deg, #ffffff 0%, #f1f5f9 100%); font-weight: 900; font-size: 1.05rem; box-shadow: 0 2px 6px rgb(0 0 0 / 30%); }
.practice-shortcuts-tip { display: flex; align-items: center; justify-content: center; margin-top: 14px; padding: 8px 12px; border-radius: 8px; background: var(--surface-soft); border: 1px solid var(--border-soft); color: var(--muted); font-size: .78rem; text-align: center; }
.card-back { border: 1px solid #475569; background: repeating-linear-gradient(45deg, #1e293b 0 5px, #0f172a 5px 10px); box-shadow: 0 2px 6px rgb(0 0 0 / 40%); }
.practice-actions { min-width: 0; margin: 16px 0 0; padding: 16px; border: 1px solid var(--border-soft); border-radius: 12px; background: var(--surface); box-shadow: 0 -8px 26px rgb(0 0 0 / 22%); }
.practice-actions legend { padding: 0 8px; color: var(--muted); font-size: .82rem; font-weight: 800; letter-spacing: .08em; }
.action-buttons { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 10px; }
.action-buttons:has(> *) { margin-bottom: 14px; }
.action-button { min-height: 52px; padding: 0 16px; border-radius: 10px; font-weight: 850; font-size: 1.05rem; cursor: pointer; letter-spacing: .02em; transition: transform .15s ease, filter .15s ease, box-shadow .15s ease; }
.action-button:active { transform: scale(.98); }
.action-fold { border: 1px solid rgb(255 255 255 / 12%); background: linear-gradient(180deg, #272f3d 0%, #1a202c 100%); color: #cbd5e1; box-shadow: 0 2px 6px rgb(0 0 0 / 25%); }
.action-fold:hover { border-color: rgb(255 255 255 / 24%); filter: brightness(1.18); color: #f1f5f9; }
.action-check { border: 1px solid #22c55e; background: linear-gradient(180deg, #15803d 0%, #14532d 100%); color: #f0fdf4; text-shadow: 0 1px 2px rgb(0 0 0 / 35%); box-shadow: 0 2px 10px rgb(34 197 94 / 22%); }
.action-check:hover { filter: brightness(1.18); border-color: #4ade80; box-shadow: 0 0 14px rgb(34 197 94 / 40%); }
.action-call { border: 1px solid #22c55e; background: linear-gradient(180deg, #15803d 0%, #14532d 100%); color: #f0fdf4; text-shadow: 0 1px 2px rgb(0 0 0 / 35%); box-shadow: 0 2px 10px rgb(34 197 94 / 22%); }
.action-call:hover { filter: brightness(1.18); border-color: #4ade80; box-shadow: 0 0 14px rgb(34 197 94 / 40%); }
.action-allin { border: 1px solid #f59e0b; background: linear-gradient(180deg, #991b1b 0%, #7f1d1d 100%); color: #fef08a; text-shadow: 0 1px 2px rgb(0 0 0 / 50%); box-shadow: 0 2px 10px rgb(239 68 68 / 25%), 0 0 0 1px rgb(245 158 11 / 20%); }
.action-allin:hover { filter: brightness(1.18); border-color: #fbbf24; box-shadow: 0 0 16px rgb(245 158 11 / 45%); }
.action-buttons, .size-suggestions { display: flex; flex-wrap: wrap; gap: 8px; }
.size-button { min-height: 48px; padding: 0 18px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-raised); color: var(--text); font-weight: 750; cursor: pointer; transition: all .15s ease; }
.size-button:hover { border-color: #f43f5e; color: #fda4af; background: rgb(225 29 72 / 12%); }
.bet-sizing { display: grid; gap: 12px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border-soft); }
.bet-sizing[hidden] { display: none; }
.bet-sizing-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.bet-sizing-heading .section-label { margin-bottom: 0; }
.bet-sizing-heading small { color: var(--muted); }
.bet-sizing-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(150px, 220px); gap: 12px; align-items: start; }
.size-suggestions { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.size-suggestions > button { min-width: 0; padding-inline: 6px; text-align: center; }
.exact-size { display: grid; grid-template-columns: auto minmax(90px, 1fr); align-items: center; gap: 10px; }
.exact-size-label { color: var(--muted); white-space: nowrap; }
.raise-commit { display: grid; grid-column: 1 / -1; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; }
.raise-commit .amount-slider { padding-inline: 0; }
.raise-commit .action-raise { min-height: 48px; padding: 0 26px; font-size: 1rem; font-weight: 850; border-radius: 10px; border: 1px solid #f43f5e; background: linear-gradient(180deg, #e11d48 0%, #9f1239 100%); color: #fff1f2; text-shadow: 0 1px 2px rgb(0 0 0 / 40%); box-shadow: 0 2px 8px rgb(225 29 72 / 25%); cursor: pointer; }
.raise-commit .action-raise:hover { filter: brightness(1.18); border-color: #fb7185; box-shadow: 0 0 14px rgb(244 63 94 / 40%); }
.amount-slider { padding-inline: 0; }
.settled-dock { display: flex; justify-content: center; margin-top: 14px; }
.action-next-hand { width: 100%; max-width: 480px; min-height: 52px; font-size: 1.12rem; font-weight: 850; border-radius: 12px; border: 1px solid #22c55e; background: linear-gradient(180deg, #16a34a 0%, #15803d 100%); color: #f0fdf4; box-shadow: 0 4px 18px rgb(34 197 94 / 35%), 0 0 0 1px rgb(255 255 255 / 15%); cursor: pointer; letter-spacing: .02em; animation: pulse-next-hand 2s ease-in-out infinite alternate; }
.action-next-hand:hover { filter: brightness(1.15); transform: translateY(-1px); box-shadow: 0 6px 24px rgb(34 197 94 / 50%); }
@keyframes pulse-next-hand { from { box-shadow: 0 4px 16px rgb(34 197 94 / 30%); } to { box-shadow: 0 4px 24px rgb(34 197 94 / 60%), 0 0 12px rgb(74 222 128 / 40%); } }

/* Paced table motion: chip flights, card dealing, settlement highlight */
.chip-flight {
  position: absolute;
  z-index: 6;
  width: 15px;
  height: 7px;
  border: 2px solid rgb(255 255 255 / 26%);
  border-radius: 50%;
  background: #3a4a63;
  box-shadow: 0 2px 3px rgb(0 0 0 / 45%);
  pointer-events: none;
  animation: chip-fly 620ms cubic-bezier(.2, .7, .35, 1) forwards;
}
@keyframes chip-fly {
  0% { translate: 0 0; scale: 1; opacity: 1; }
  62% { translate: var(--dx) calc(var(--dy) - 26px); scale: 1; opacity: 1; }
  100% { translate: var(--dx) var(--dy); scale: .45; opacity: .2; }
}
.practice-card[class*="deal-index-"] {
  animation: card-deal .36s cubic-bezier(.2, .8, .3, 1) both;
}
.practice-card.deal-index-0 { animation-delay: 0ms; }
.practice-card.deal-index-1 { animation-delay: 110ms; }
.practice-card.deal-index-2 { animation-delay: 220ms; }
.practice-card.deal-index-3 { animation-delay: 330ms; }
.practice-card.deal-index-4 { animation-delay: 440ms; }
@keyframes card-deal {
  from { translate: 0 -16px; rotate: -8deg; opacity: 0; scale: .68; }
  to { translate: 0 0; rotate: 0deg; opacity: 1; scale: 1; }
}
.table-center { z-index: 3; }
.result-banner {
  position: absolute;
  z-index: 9;
  top: 50%;
  left: 50%;
  display: grid;
  justify-items: center;
  gap: 4px;
  min-width: min(300px, 78%);
  padding: 14px 22px;
  border: 2px solid #ffd97a;
  border-radius: 14px;
  background: linear-gradient(160deg, rgb(30 24 8 / 96%), rgb(12 9 2 / 97%));
  color: #ffe9b0;
  box-shadow: 0 0 44px rgb(255 201 52 / 42%), 0 18px 40px rgb(0 0 0 / 55%);
  text-align: center;
  transform: translate(-50%, -50%);
  animation: result-banner-in .5s .45s cubic-bezier(.2, .8, .3, 1) both;
}
.result-banner strong { color: #ffd97a; font-size: 1.25rem; letter-spacing: .06em; }
.result-banner span { color: #fff3cf; font-size: .92rem; }
@keyframes result-banner-in {
  from { opacity: 0; translate: 0 14px; scale: .85; }
  to { opacity: 1; translate: 0 0; scale: 1; }
}
.hand-settled .practice-seat:not(.settlement-winner) { filter: grayscale(.55) brightness(.72); }
.practice-seat.settlement-winner {
  border-color: #ffd97a;
  animation: winner-pulse 1.5s ease-in-out .9s infinite alternate;
}
@keyframes winner-pulse {
  from { box-shadow: 0 0 0 2px rgb(255 217 122 / 45%), 0 0 26px rgb(255 201 52 / 40%); }
  to { box-shadow: 0 0 0 3px rgb(255 217 122 / 65%), 0 0 44px rgb(255 201 52 / 72%); }
}
.practice-seat.current-actor:not(.hero-station) {
  outline-color: #7cc7ff;
  animation: ai-glow 1.6s ease-in-out infinite alternate;
}
@keyframes ai-glow {
  from { box-shadow: 0 10px 24px rgb(0 0 0 / 40%), 0 0 0 rgb(124 199 255 / 0%); }
  to { box-shadow: 0 10px 24px rgb(0 0 0 / 40%), 0 0 20px rgb(124 199 255 / 55%); }
}
.practice-seat:not(.hero-station) .turn-marker {
  border: 1px solid rgb(124 199 255 / 40%);
  background: rgb(124 199 255 / 16%);
  color: #7cc7ff;
  animation: thinking-blink 1.1s ease-in-out infinite alternate;
}
@keyframes thinking-blink {
  from { opacity: .55; }
  to { opacity: 1; }
}

/* Opponent mini-HUD, style chips, and committed-chip rows */
.seat-name-line { display: flex; align-items: center; gap: 5px; min-width: 0; }
.seat-style-chip {
  flex: 0 0 auto;
  padding: 1px 6px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: .58rem;
  font-weight: 900;
  line-height: 1.5;
}
.style-tight { border-color: rgb(124 199 255 / 45%); background: rgb(124 199 255 / 10%); color: #7cc7ff; }
.style-balanced { border-color: rgb(47 202 124 / 45%); background: rgb(47 202 124 / 10%); color: #2fca7c; }
.style-loose { border-color: rgb(255 180 94 / 45%); background: rgb(255 180 94 / 10%); color: #ffb45e; }
.style-custom { border-color: rgb(216 152 255 / 45%); background: rgb(216 152 255 / 10%); color: #d898ff; }
.seat-hud {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 7px;
  padding-top: 2px;
  border-top: 1px dashed rgb(255 255 255 / 10%);
  color: var(--muted);
  font-size: .62rem;
  font-weight: 800;
}
.seat-hud .hud-vpip { color: #7cc7ff; }
.seat-hud .hud-pfr { color: #ffd97a; }
.seat-hud .hud-three-bet { color: #ff9b9d; }
.seat-hud .hud-aggression { color: #d898ff; }
.seat-bet { display: none; }
@media (min-width: 768px) {
  .seat-bet { display: flex; align-items: center; margin-top: 1px; }
  .seat-bet i {
    width: 13px;
    height: 6px;
    margin-right: -6px;
    border: 1.5px solid rgb(255 255 255 / 24%);
    border-radius: 50%;
    background: #37465c;
    box-shadow: 0 1px 2px rgb(0 0 0 / 45%);
  }
  .seat-bet i:last-child { margin-right: 0; }
}

/* Floating coach feedback toast */
.coach-toast {
  position: fixed;
  z-index: 60;
  top: 70px;
  left: 50%;
  display: grid;
  gap: 4px;
  width: min(560px, calc(100vw - 28px));
  padding: 12px 16px;
  border: 1px solid;
  border-radius: 12px;
  box-shadow: 0 16px 44px rgb(0 0 0 / 45%);
  transform: translateX(-50%);
  animation: toast-in .3s cubic-bezier(.2, .8, .3, 1) both;
}
.coach-toast.coach-match { border-color: rgb(47 202 124 / 55%); background: linear-gradient(150deg, rgb(14 38 28 / 97%), rgb(9 14 22 / 98%)); }
.coach-toast.coach-deviate { border-color: rgb(255 201 52 / 55%); background: linear-gradient(150deg, rgb(43 34 10 / 97%), rgb(9 14 22 / 98%)); }
.coach-toast strong { color: var(--green); font-size: .98rem; }
.coach-toast.coach-deviate strong { color: var(--yellow); }
.coach-toast .coach-toast-actions { font-size: .86rem; font-weight: 700; }
.coach-toast p { margin: 0; color: var(--muted); font-size: .82rem; line-height: 1.5; }
@keyframes toast-in {
  from { opacity: 0; translate: 0 -12px; }
  to { opacity: 1; translate: 0 0; }
}

/* 13×13 preflop range grid in the setup dialog */
.range-grid-details { margin-top: 10px; padding-top: 8px; border-top: 1px dashed var(--border-soft); }
.range-grid-details summary { cursor: pointer; color: var(--muted); font-weight: 700; font-size: .86rem; }
.range-grid-wrap { display: grid; gap: 8px; margin-top: 8px; }
.range-presets { display: flex; flex-wrap: wrap; gap: 6px; }
.range-preset-button { display: grid; justify-items: center; gap: 0; min-height: 46px; padding: 4px 12px; border: 1px solid var(--border-soft); border-radius: 9px; background: var(--surface-raised); color: var(--text); cursor: pointer; font-weight: 750; }
.range-preset-button:hover { border-color: var(--green); color: var(--green); }
.range-preset-button small { color: var(--muted); font-size: .68rem; }
.range-grid-meta { margin: 0; color: var(--muted); font-size: .78rem; }
.range-grid { display: grid; grid-template-columns: repeat(13, minmax(20px, 1fr)); gap: 2px; max-width: 430px; }
.range-cell {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  min-width: 0;
  min-height: 0;
  padding: 0;
  border: 1px solid var(--border-soft);
  border-radius: 3px;
  background: rgb(255 255 255 / 3%);
  color: var(--muted);
  font-size: .6rem;
  font-weight: 800;
  cursor: pointer;
}
.range-cell:hover { border-color: var(--yellow); color: var(--text); }
.range-cell.kind-pair { font-weight: 900; }
.range-cell.included {
  border-color: rgb(47 202 124 / 45%);
  color: var(--text);
}
.range-cell.included.heat-2 { background: rgb(47 202 124 / 12%); }
.range-cell.included.heat-3 { background: rgb(47 202 124 / 17%); }
.range-cell.included.heat-4 { background: rgb(47 202 124 / 22%); }
.range-cell.included.heat-5 { background: rgb(47 202 124 / 27%); }
.range-cell.included.heat-6 { background: rgb(47 202 124 / 32%); }
.range-cell.included.heat-7 { background: rgb(47 202 124 / 37%); }
.range-cell.included.heat-8 { background: rgb(47 202 124 / 42%); }
.range-cell.included.heat-9 { background: rgb(47 202 124 / 47%); }
.range-cell.included.heat-10 { background: rgb(47 202 124 / 52%); }

.practice-side { display: grid; gap: 10px; min-width: 0; }
.practice-inspector { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; min-width: 0; grid-row: 3; }
.practice-inspector .panel { min-width: 0; }
.practice-side .coach-panel, .action-log { padding: 16px; }
.practice-side .coach-panel h2 { font-size: 1.05rem; }
.coaching-detail { display: grid; gap: 12px; }
.coach-verdict { padding: 8px 12px; border-radius: 9px; font-size: .95rem; }
.coach-verdict.verdict-match { border: 1px solid rgb(47 202 124 / 40%); background: rgb(47 202 124 / 10%); }
.coach-verdict.verdict-match strong { color: var(--green); }
.coach-verdict.verdict-deviate { border: 1px solid rgb(245 197 66 / 40%); background: rgb(245 197 66 / 8%); }
.coach-verdict.verdict-deviate strong { color: var(--yellow); }
.coach-explanation { margin: 0; color: var(--muted); font-size: .86rem; line-height: 1.55; }
.coach-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.coach-action-chip { display: grid; gap: 2px; padding: 9px 12px; border-radius: 9px; border: 1px solid var(--border-soft); background: var(--surface-raised); }
.coach-action-chip span { color: var(--muted); font-size: .68rem; font-weight: 800; letter-spacing: .08em; }
.coach-action-chip strong { font-size: .95rem; }
.coach-action-chip.coach-recommended { border-color: rgb(47 202 124 / 45%); background: rgb(47 202 124 / 9%); }
.coach-action-chip.coach-recommended strong { color: var(--green); }
.strength-meter { display: grid; gap: 5px; }
.strength-meter-head { display: flex; justify-content: space-between; font-size: .78rem; color: var(--muted); }
.strength-meter-head strong { color: var(--text); }
.strength-track { height: 9px; overflow: hidden; border-radius: 999px; background: rgb(255 255 255 / 6%); }
.strength-fill { display: block; width: 100%; height: 100%; min-width: 0; border: 0; border-radius: inherit; background: transparent; appearance: none; }
.strength-fill::-webkit-progress-bar { border-radius: inherit; background: transparent; }
.strength-fill::-webkit-progress-value { border-radius: inherit; background: linear-gradient(90deg, #ff5c57, #f5c542 55%, var(--green)); }
.strength-fill::-moz-progress-bar { border-radius: inherit; background: linear-gradient(90deg, #ff5c57, #f5c542 55%, var(--green)); }
.coach-metrics { display: grid; gap: 6px; margin: 0; }
.coach-metrics div { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 6px; border-bottom: 1px solid var(--border-soft); font-size: .82rem; }
.coach-metrics dt { color: var(--muted); }
.coach-metrics dd { margin: 0; text-align: right; }
.coaching-detail h3 { margin: 4px 0 0; font-size: .86rem; }
.alt-list { display: grid; gap: 7px; padding: 0; margin: 0; list-style: none; }
.alt-row { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 7px 10px; border: 1px solid var(--border-soft); border-radius: 8px; background: var(--surface-raised); overflow: hidden; }
.alt-row.alt-recommended { border-color: rgb(47 202 124 / 45%); }
.alt-bar { position: absolute; z-index: 0; inset: 0; pointer-events: none; }
.alt-fill { display: block; width: 100%; height: 100%; min-width: 0; border: 0; background: transparent; appearance: none; }
.alt-fill::-webkit-progress-bar { background: transparent; }
.alt-fill::-webkit-progress-value { background: rgb(77 141 255 / 14%); }
.alt-fill::-moz-progress-bar { background: rgb(77 141 255 / 14%); }
.alt-row.alt-recommended .alt-fill::-webkit-progress-value { background: rgb(47 202 124 / 16%); }
.alt-row.alt-recommended .alt-fill::-moz-progress-bar { background: rgb(47 202 124 / 16%); }
.alt-label { position: relative; z-index: 1; font-weight: 700; }
.alt-score { position: relative; z-index: 1; color: var(--text); }
.coaching-detail dl, .replay-detail { display: grid; gap: 8px; }
.coaching-detail dl div, .replay-detail div, .result-summary div { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 7px; border-bottom: 1px solid var(--border-soft); }
.coaching-detail dd, .replay-detail dd { margin: 0; text-align: right; }
.action-log > ol { display: grid; gap: 8px; padding: 0; list-style: none; }
.action-log { max-height: 680px; overflow: auto; }
.action-log > ol li { display: grid; grid-template-columns: auto 1fr; gap: 3px 10px; padding: 10px 0; border-bottom: 1px solid var(--border-soft); }
.action-log > ol li small { grid-column: 1 / -1; color: var(--muted); }
.ai-explanations article, .replay-feedback { margin-top: 10px; padding: 12px; border-left: 3px solid var(--green); background: rgb(47 202 124 / 6%); }
.result-summary { margin-top: 16px; }
.empty-practice { min-height: 360px; padding: 36px; }
.practice-modal { z-index: 70; }
.practice-dialog { width: min(960px, 100%); max-height: calc(100dvh - 32px); box-shadow: 0 30px 90px rgb(0 0 0 / 55%); }
.setup-dialog { width: min(1120px, 100%); }
.setup-groups { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 12px; margin: 20px 0 12px; }
.setup-section { min-width: 0; padding: 14px; border: 1px solid var(--border-soft); border-radius: 9px; }
.setup-section > legend { padding: 0 8px; font-weight: 800; }
.setup-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.hero-setup-grid { grid-template-columns: 1fr; }
.setup-grid label, .opponent-fields label { display: grid; align-content: start; gap: 6px; min-width: 0; }
.setup-grid .wide-field { grid-column: span 2; }
.opponent-editor, .opponent-card { min-width: 0; border: 1px solid var(--border-soft); border-radius: 9px; }
.opponent-editor { display: grid; gap: 12px; padding: 14px; }
.opponent-editor > legend, .opponent-card > summary { padding: 0 8px; font-weight: 800; cursor: pointer; list-style: none; }
.opponent-card > summary::-webkit-details-marker { display: none; }
.opponent-card { display: grid; gap: 10px; padding: 12px; }
.opponent-card > summary { min-height: 44px; display: flex; align-items: center; gap: 8px; }
.opponent-seat-list { display: grid; align-content: start; gap: 4px; }
.opponent-seat-list .section-label { margin: 0 0 4px; }
.opponent-seat-link { display: flex; align-items: center; min-height: 40px; padding: 0 10px; border: 1px solid transparent; border-radius: 8px; color: var(--muted); font-size: .8rem; font-weight: 700; text-decoration: none; }
.opponent-seat-link:hover, .opponent-seat-link:focus-visible { border-color: rgb(47 202 124 / 35%); background: rgb(47 202 124 / 10%); color: var(--text); }
@media (min-width: 768px) {
  .opponent-editor { grid-template-columns: minmax(132px, .22fr) minmax(0, 1fr); }
  .opponent-editor > legend, .opponent-editor > .opponent-editor-toolbar { grid-column: 1 / -1; }
  .opponent-editor > .opponent-editor-toolbar { grid-row: 1; }
  .opponent-seat-list { grid-column: 1; grid-row: 2; position: sticky; top: 12px; }
  .opponent-editor > .opponent-card { grid-column: 2; grid-row: 2; }
}
.opponent-fields { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.opponent-fields .range-field { grid-column: span 2; }
.field-error, .form-error { color: #ff9b9d; }
.field-error { font-size: .78rem; line-height: 1.35; }
input.field-invalid, select.field-invalid { border-color: var(--red); box-shadow: 0 0 0 1px var(--red); }
.dialog-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.setup-dialog .dialog-actions { position: sticky; z-index: 8; bottom: -16px; margin-right: -16px; margin-left: -16px; margin-bottom: -16px; padding: 14px 16px; border-top: 1px solid var(--border); border-radius: 0 0 12px 12px; background: var(--surface); }
.history-dialog, .replay-dialog { width: min(900px, 100%); }
.practice-history-list { display: grid; gap: 8px; margin-top: 18px; }
.history-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 14px; border: 1px solid var(--border-soft); border-radius: 8px; }
.history-row div { display: grid; gap: 4px; min-width: 0; }
.history-row span, .history-row small { color: var(--muted); overflow-wrap: anywhere; }
.replay-surface { display: grid; gap: 14px; }
.replay-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }
.replay-board { display: flex; justify-content: center; gap: 7px; min-height: 68px; }
.replay-seats { display: grid; grid-template-columns: repeat(auto-fit, minmax(145px, 1fr)); gap: 8px; }
.replay-seats article { display: grid; gap: 5px; padding: 12px; border: 1px solid var(--border-soft); border-radius: 8px; }
.replay-seats article > div { display: flex; gap: 4px; min-height: 50px; }
.replay-seekbar-wrap { margin: 12px 0 4px; padding: 0 4px; }
.replay-seekbar { width: 100%; height: 6px; border-radius: 3px; accent-color: var(--green); cursor: pointer; }
.replay-controls { position: sticky; bottom: -24px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 14px -24px -24px; padding: 14px 24px; border-top: 1px solid var(--border); background: var(--surface); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.profile-grid { display: grid; gap: 10px; }
.profile-overview { display: grid; grid-template-columns: minmax(260px, .72fr) minmax(0, 1.28fr); gap: 10px; }
.profile-detail-workspace { display: grid; gap: 10px; min-width: 0; }
.profile-summary { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 20px; padding: 30px; }
.profile-summary .secondary-button { grid-column: 1 / -1; }
.profile-summary > div { min-width: 0; }
.profile-summary > .form-error { grid-column: 1 / -1; }
.profile-summary h2 { overflow-wrap: anywhere; }
.profile-actions { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.profile-avatar { display: grid; place-items: center; width: 76px; height: 76px; border-radius: 50%; background: var(--green); color: #062414; font-size: 1.6rem; font-weight: 900; }
.profile-summary h2, .profile-summary p { margin-bottom: 4px; }
.profile-summary p { color: var(--muted); }
.metric-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.metric { display: grid; gap: 9px; padding: 26px; }
.metric span, .metric small { color: var(--muted); }
.metric strong { color: var(--green); font-size: 2rem; }
.progress-panel, .activity-panel, .history-panel { padding: 28px; }
.history-panel { grid-column: 1 / -1; }
.history-list { display: grid; gap: 10px; margin-top: 18px; }
.history-record { padding: 12px 16px; border: 1px solid var(--border-soft); border-radius: 8px; }
.history-record summary { display: flex; justify-content: space-between; align-items: center; cursor: pointer; }
.profile-metrics { min-width: 0; }
.profile-trend-panel { grid-column: 1 / -1; padding: 20px 24px; }
.trend-panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.trend-panel-heading h3 { margin: 0; font-size: 1.05rem; }
.trend-summary-pill { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 999px; border: 1px solid rgb(255 255 255 / 12%); background: var(--surface-raised); font-size: .82rem; font-weight: 750; }
.trend-summary-pill.positive { border-color: rgb(47 202 124 / 45%); color: var(--green); background: rgb(47 202 124 / 10%); }
.trend-chart-wrapper { width: 100%; height: 120px; overflow: hidden; border-radius: 8px; background: rgb(0 0 0 / 25%); border: 1px solid var(--border-soft); }
.profit-trend-svg { width: 100%; height: 100%; display: block; }
.trend-chart-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; color: var(--muted); font-size: .78rem; }
.diagnostics-panel { grid-column: 1 / -1; padding: 28px; }
.diagnostic-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin: 18px 0 24px; }
.diagnostic-grid > div, .position-list > div { display: grid; gap: 5px; min-width: 0; padding: 14px; border: 1px solid var(--border-soft); border-radius: 8px; }
.diagnostic-grid small, .position-list span, .profile-record time { color: var(--muted); }
.position-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin: 12px 0 20px; }
.sample-warning { padding: 7px 10px; border: 1px solid rgb(255 201 52 / 55%); border-radius: 999px; color: var(--yellow); }
.profile-filters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 18px; }
.profile-filters label { display: grid; gap: 7px; min-width: 0; color: var(--muted); }
.profile-record { display: grid; gap: 16px; min-width: 0; padding: 18px; }
.profile-record-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.profile-record-heading h3 { margin: 3px 0; overflow-wrap: anywhere; }
.profile-record-heading > span { flex: none; padding: 5px 9px; border-radius: 999px; color: var(--muted); background: var(--bg-deep); }
.profile-record-heading > span.reviewed { color: var(--green); }
.record-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0; }
.record-detail-grid > div { min-width: 0; padding: 10px 12px; border-left: 2px solid var(--border-soft); }
.record-detail-grid .wide { grid-column: 1 / -1; }
.record-detail-grid dt { color: var(--muted); font-size: .78rem; }
.record-detail-grid dd { margin: 4px 0 0; overflow-wrap: anywhere; }
.profile-record-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.profile-dialog { width: min(780px, 100%); }
.profile-dialog select { width: 100%; margin: 8px 0 18px; }
.decision-comparison { display: grid; gap: 14px; }
.source-label { padding: 10px 12px; border-radius: 7px; color: var(--green); background: rgb(47 202 124 / 8%); }
.profile-empty { margin-top: 18px; padding: 24px; border: 1px dashed var(--border); border-radius: 8px; color: var(--muted); text-align: center; }
.progress-row { display: grid; grid-template-columns: 110px 1fr 50px; align-items: center; gap: 16px; margin-top: 22px; }
.progress-row div { height: 8px; overflow: hidden; border-radius: 8px; background: var(--border-soft); }
.progress-row i { display: block; height: 100%; background: var(--green); }
.activity-panel ul { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.activity-panel li { display: flex; justify-content: space-between; padding: 18px 0; border-bottom: 1px solid var(--border-soft); }
.activity-panel time { color: var(--muted); }
.connectivity-banner { display: grid; grid-template-columns: auto auto 1fr; align-items: center; gap: 14px; margin-bottom: 10px; padding: 16px 20px; border: 1px solid rgb(47 202 124 / 40%); border-radius: 8px; background: rgb(47 202 124 / 6%); }
.connectivity-banner.offline { border-color: rgb(255 201 52 / 45%); background: rgb(255 201 52 / 6%); }
.connectivity-banner.offline i { background: var(--yellow); }
.connectivity-banner span { color: var(--muted); }
.multiplayer-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.join-panel, .room-preview { padding: clamp(26px, 5vw, 56px); }
.join-panel h2, .room-preview h2 { font-size: 1.8rem; }
.join-panel label { display: block; margin: 24px 0 8px; }
.join-panel input { font-size: 1.5rem; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; }
.join-panel .primary-button { width: 100%; margin-top: 18px; }
.generated-room-code { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); align-items: center; gap: 10px; margin-top: 16px; padding: 16px; border: 1px solid var(--border-soft); border-radius: 8px; background: var(--bg-deep); }
.generated-room-code span { grid-column: 1 / -1; color: var(--muted); }
.generated-room-code output { grid-column: 1 / -1; color: var(--green); font-size: 1.65rem; font-weight: 900; letter-spacing: .18em; user-select: all; }
.generated-room-code .secondary-button { min-height: 44px; }
.room-preview dl { display: grid; gap: 18px; }
.room-preview dl div { display: flex; justify-content: space-between; padding-bottom: 14px; border-bottom: 1px solid var(--border-soft); }
.room-preview dd { margin: 0; font-weight: 750; }
.room-preview summary { display: flex; align-items: center; cursor: pointer; color: var(--green); }
.room-preview code { display: block; max-width: 100%; padding: 14px; overflow-wrap: anywhere; color: var(--muted); background: var(--bg-deep); }
.multiplayer-table { margin-top: 10px; padding: clamp(18px, 3vw, 32px); }
.multiplayer-board { display: flex; justify-content: center; gap: clamp(4px, 1.5vw, 8px); margin: 20px 0; max-width: 100%; }
.viewer-hole-cards { display: flex; flex-direction: column; align-items: center; gap: 8px; margin: 16px 0; max-width: 100%; }
.viewer-hole-cards-header { display: flex; align-items: center; justify-content: center; gap: 10px; }
.viewer-hole-cards-header span { color: var(--muted); font-size: .84rem; font-weight: 750; }
.hand-type-badge { padding: 3px 10px; border-radius: 999px; background: rgb(47 202 124 / 16%); color: var(--green); font-size: .78rem; font-weight: 800; border: 1px solid rgb(47 202 124 / 35%); }
.viewer-cards-row { display: flex; justify-content: center; gap: clamp(6px, 1.5vw, 10px); }
.multiplayer-board span, .viewer-hole-cards strong { display: grid; place-items: center; width: clamp(44px, 12.5vw, 58px); aspect-ratio: .72; border-radius: 7px; background: linear-gradient(180deg, #ffffff 0%, #f1f5f9 100%); color: #141b21; font-weight: 900; box-shadow: 0 2px 6px rgb(0 0 0 / 35%); }
.mini-seat-cards { display: flex; gap: 3px; justify-content: center; margin-top: 3px; }
.mini-seat-cards .card-back { width: 20px; height: 26px; min-height: 0; aspect-ratio: .72; border-radius: 3px; background: linear-gradient(180deg, #272f3d 0%, #151b26 100%); border: 1px solid rgb(255 255 255 / 16%); box-shadow: 0 1px 3px rgb(0 0 0 / 40%); }
.player-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.table-player { display: grid; gap: 5px; padding: 14px; border: 1px solid var(--border-soft); border-radius: 8px; }
.table-player.active { border-color: var(--yellow); }
.table-player.mine { background: rgb(47 202 124 / 8%); }
.multiplayer-turn-marker { justify-self: start; margin-top: 2px; }
.player-host-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.player-host-actions .secondary-button { padding: 4px 10px; font-size: .8rem; }
.room-host-management {
  margin-top: 12px;
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  background: rgb(255 255 255 / 2%);
}
.room-host-management > summary {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0 14px;
  color: var(--muted);
  font-weight: 800;
  cursor: pointer;
}
.room-host-management[open] > summary { border-bottom: 1px solid var(--border-soft); color: var(--text); }
.room-host-player-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 8px; padding: 12px; }
.room-host-player { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 8px; border: 1px solid var(--border-soft); border-radius: 8px; background: var(--surface-raised); }
.room-host-player strong { min-width: 0; margin-right: auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.room-host-player .secondary-button { min-height: 44px; padding: 0 10px; }
.multiplayer-actions { display: flex; flex-direction: column; gap: 12px; margin-top: 20px; padding: 16px; border: 1px solid var(--border-soft); border-radius: var(--radius); background: var(--surface-raised); }
.multiplayer-action-status { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
.multiplayer-action-status .action-turn-label { font-weight: 800; font-size: 1.05rem; color: var(--text); margin: 0; }
.multiplayer-action-status .action-deadline { color: var(--yellow); font-weight: 700; font-size: .88rem; margin: 0; }
.multiplayer-actions .action-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.multiplayer-actions .action-buttons .action-button { flex: 1 1 100px; }
.multiplayer-bet-sizing { display: flex; flex-direction: column; gap: 10px; margin-top: 0; padding-top: 12px; border-top: 1px solid var(--border-soft); }
.multiplayer-bet-sizing .size-suggestions { display: flex; flex-wrap: wrap; gap: 6px; }
.multiplayer-bet-sizing .size-button { flex: 1 1 55px; min-height: 40px; font-size: .8rem; }
.multiplayer-raise-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.multiplayer-raise-row .raise-input-wrap { display: flex; align-items: center; gap: 8px; }
.multiplayer-raise-row .raise-input-wrap label { font-weight: 700; font-size: .88rem; white-space: nowrap; }
.multiplayer-raise-row .raise-input-wrap input { width: 96px; min-height: 44px; text-align: center; font-weight: 800; }
.multiplayer-raise-row .amount-slider { flex: 1 1 120px; height: 8px; border-radius: 4px; accent-color: var(--green); cursor: pointer; }
.multiplayer-raise-row .action-raise { min-width: 88px; min-height: 44px; font-weight: 800; }
.calculator-range-grid-section { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border-soft); }
.scoreboard-panel { margin-top: 24px; }
.scoreboard-panel .panel-heading { flex-wrap: wrap; }
.scoreboard-progress { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.scored-badge, .my-rank { padding: 5px 10px; border-radius: 999px; font-size: .8rem; }
.scored-badge { color: var(--green); background: rgb(47 202 124 / 10%); border: 1px solid rgb(47 202 124 / 30%); }
.my-rank { color: var(--yellow); background: rgb(255 201 52 / 10%); border: 1px solid rgb(255 201 52 / 30%); }
.scoreboard-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 320px); gap: 16px; margin-top: 16px; align-items: start; }
.scoreboard-panel ol { display: grid; gap: 8px; padding: 0; margin: 0; list-style: none; counter-reset: none; }
.scoreboard-panel ol li { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto auto auto; gap: 10px; align-items: center; padding: 12px 14px; border: 1px solid transparent; border-bottom: 1px solid var(--border-soft); border-radius: 8px; }
.scoreboard-panel ol li.rank-1 { background: rgb(230 200 124 / 9%); border-color: rgb(230 200 124 / 45%); }
.scoreboard-panel ol li.rank-2 { background: rgb(201 205 214 / 9%); border-color: rgb(201 205 214 / 40%); }
.scoreboard-panel ol li.rank-3 { background: rgb(200 143 94 / 9%); border-color: rgb(200 143 94 / 40%); }
.scoreboard-panel ol li.mine { background: rgb(47 202 124 / 8%); border-color: rgb(47 202 124 / 40%); }
.scoreboard-panel ol li.mine strong { color: var(--green); }
.scoreboard-panel ol li.rank-up { animation: rank-rise 0.5s ease; }
.scoreboard-panel ol li.rank-down { animation: rank-fall 0.5s ease; }
.rank-position { min-width: 22px; text-align: center; font-weight: 800; color: var(--muted); font-variant-numeric: tabular-nums; }
.rank-1 .rank-position { color: #E6C87C; }
.rank-2 .rank-position { color: #C9CDD6; }
.rank-3 .rank-position { color: #C88F5E; }
.rank-medal { font-size: 1.05rem; line-height: 1; }
.scoreboard-panel ol li strong { overflow-wrap: anywhere; }
.round-score { font-variant-numeric: tabular-nums; color: var(--muted); }
.round-score.positive { color: var(--green); }
.round-score.negative { color: var(--red); }
.scoreboard-panel ol li output { color: var(--text); font-weight: 800; font-variant-numeric: tabular-nums; }
.rank-delta { min-width: 36px; text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); }
.rank-delta.up { color: var(--green); }
.rank-delta.down { color: var(--red); }
.scoreboard-controls { display: grid; gap: 12px; }
.score-card, .round-control { display: grid; gap: 10px; align-content: start; padding: 16px; border: 1px solid var(--border-soft); border-radius: 10px; background: var(--bg-deep); }
.score-card h4, .round-control h4 { margin: 0; }
.score-card label { color: var(--muted); font-size: .85rem; }
.score-card input { width: 100%; }
.score-chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(62px, 1fr)); gap: 6px; }
.chip { min-height: 40px; padding: 6px 8px; border: 1px solid var(--border-soft); border-radius: 8px; background: var(--surface); color: var(--text); cursor: pointer; font-weight: 750; font-size: .88rem; text-align: center; transition: all .15s ease; }
.chip:hover { border-color: var(--green); color: var(--green); transform: translateY(-1px); }
.chip:disabled, .score-card input:disabled { opacity: .45; cursor: not-allowed; }
.chip:disabled:hover { border-color: var(--border-soft); color: var(--text); }
.round-status { margin: 0; color: var(--muted); }
.scoreboard-trend { margin-top: 20px; padding: 16px; border: 1px solid var(--border-soft); border-radius: 10px; background: var(--bg-deep); }
.scoreboard-trend h4 { margin: 0 0 10px; }
.trend-empty { display: grid; min-height: 130px; place-items: center; margin: 0; color: var(--muted); text-align: center; }
.trend-scroll { overflow-x: auto; }
.trend-chart { display: block; width: 100%; min-width: 480px; height: auto; }
.trend-line { fill: none; stroke: var(--muted); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; opacity: .75; }
.trend-line.mine { stroke: var(--green); stroke-width: 2.5; opacity: 1; }
.trend-dot { fill: var(--green); }
.trend-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 10px 0 0; margin: 0; list-style: none; }
.trend-legend li { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: .82rem; }
.trend-legend li.mine { color: var(--green); font-weight: 750; }
.trend-legend i { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); }
.trend-legend li.mine i { background: var(--green); }
.scoreboard-history { margin-top: 20px; }
.scoreboard-history h4 { margin: 0 0 8px; }
.history-scroll { overflow-x: auto; }
.history-pagination { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 10px 0; }
.history-pagination span { color: var(--muted); font-size: .85rem; }
.round-history-table { width: 100%; border-collapse: collapse; font-size: .9rem; overflow-wrap: anywhere; }
.round-history-table th, .round-history-table td { padding: 9px 10px; border-bottom: 1px solid var(--border-soft); text-align: right; white-space: nowrap; }
.round-history-table thead th { color: var(--muted); font-weight: 750; }
.round-history-table tbody th { text-align: left; }
.round-history-table th:first-child, .round-history-table td:first-child { position: sticky; left: 0; background: var(--bg-deep); box-shadow: 2px 0 6px rgb(0 0 0 / 30%); }
.round-history-table td { color: var(--muted); }
.round-history-table .scoreboard-total { color: var(--green); font-weight: 800; }
.round-history-table th.current, .round-history-table td.current { background: rgb(47 202 124 / 10%); color: var(--green); font-weight: 750; }
@keyframes rank-rise { from { transform: translateY(10px); opacity: .3; } to { transform: translateY(0); opacity: 1; } }
@keyframes rank-fall { from { transform: translateY(-10px); opacity: .3; } to { transform: translateY(0); opacity: 1; } }
.multiplayer-hub { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 10px; }
.hub-card { display: grid; gap: 10px; justify-items: start; align-content: start; padding: clamp(26px, 4vw, 44px); border-color: var(--border-soft); cursor: pointer; text-align: left; }
.hub-card:hover { border-color: var(--green); }
.hub-card strong { color: var(--green); font-size: 1.5rem; }
.hub-card span { color: var(--muted); }
.room-entry { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 12px; padding: clamp(26px, 5vw, 56px); }
.room-entry-create, .room-entry-join { display: grid; gap: 10px; align-content: start; }
.room-entry h2 { font-size: 1.5rem; margin: 0; }
.room-entry-description { margin: 0; color: var(--muted); }
.room-config-grid { display: grid; grid-template-columns: minmax(92px, auto) minmax(0, 1fr); gap: 8px 12px; align-items: center; padding: 12px; border: 1px solid var(--border-soft); border-radius: 10px; background: var(--bg-deep); }
.room-config-grid label { color: var(--muted); font-size: .85rem; }
.room-config-grid select { min-width: 0; }
.room-entry label { color: var(--muted); }
.room-entry input { width: 100%; font-size: 1.5rem; font-weight: 800; letter-spacing: .18em; }
.room-entry .primary-button, .room-entry .secondary-button { width: 100%; }
.room-shell-tools { position: relative; z-index: 3; display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 10px; margin-top: 16px; }
.rename-control { display: flex; flex-wrap: wrap; align-items: end; gap: 8px; }
.rename-control label { flex-basis: 100%; margin: 0; color: var(--muted); font-size: .85rem; }
.rename-control input { min-width: 180px; }
.room-leave-button { margin-left: auto; }
.action-deadline { color: var(--yellow); }
.scoreboard-history { margin-top: 24px; }
.scoreboard-history h4 { margin: 0 0 8px; }
.round-history-table { width: 100%; border-collapse: collapse; font-size: .9rem; overflow-wrap: anywhere; }
.round-history-table th, .round-history-table td { padding: 9px 10px; border-bottom: 1px solid var(--border-soft); text-align: right; white-space: nowrap; }
.round-history-table thead th { color: var(--muted); font-weight: 750; }
.round-history-table tbody th { text-align: left; }
.round-history-table td { color: var(--muted); }
.round-history-table .scoreboard-total { color: var(--green); font-weight: 800; }
.utility-dialog { width: min(560px, 100%); max-height: 88dvh; overflow: auto; overscroll-behavior: contain; padding: 24px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.utility-dialog dl div { display: flex; justify-content: space-between; }
.local-data-shortcut { margin: 18px 0; padding: 14px; border: 1px solid var(--border-soft); border-radius: 8px; background: var(--surface-raised); }
.local-data-shortcut h3, .local-data-shortcut p { margin-bottom: 8px; }
.help-support-links { display: grid; gap: 8px; margin-top: 16px; }
.help-support-links a, .release-contact a { color: var(--green); font-weight: 700; overflow-wrap: anywhere; }
.centered-state { display: grid; place-items: center; min-height: 70dvh; text-align: center; }

@container workspace (max-width: 980px) {
  .scoreboard-layout { grid-template-columns: 1fr; }
  .calculator-rail { grid-template-columns: repeat(2, 1fr); }
  .card-input-panel { grid-template-columns: 1fr; }
  .card-group + .card-group { border-top: 1px solid var(--border-soft); border-left: 0; }
  .controls-panel { grid-template-columns: repeat(2, 1fr); }
  .profile-grid { grid-template-columns: 1fr; }
  .profile-overview { grid-template-columns: 1fr; }
  .profile-metrics { grid-column: auto; }
  .diagnostic-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-dashboard-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-action-hub, .dashboard-overview, .dashboard-recent, .dashboard-next-action { grid-column: auto; }
  .dashboard-actions { grid-template-columns: 1fr; }
  .dashboard-action { min-height: 78px; }
}

@media (max-width: 1199px) and (min-width: 768px) {
  .app-shell { grid-template-columns: 64px minmax(0, 1fr); }
  .desktop-sidebar { padding-inline: 8px; }
  .brand { padding-inline: 6px; }
  .brand-copy { display: none; }
  .side-nav-button { justify-content: center; padding-inline: 0; }
  .side-nav-button .side-nav-label { display: none; }
  .sidebar-utilities .icon-button { justify-content: center; padding-inline: 0; }
  .calculator-layout { grid-template-columns: 1fr; }
  .calculator-rail { grid-template-columns: repeat(2, 1fr); }
  .card-input-panel { grid-template-columns: 1fr; }
  .card-group + .card-group { border-top: 1px solid var(--border-soft); border-left: 0; }
  .controls-panel { grid-template-columns: repeat(2, 1fr); }
  .poker-table-shell { min-height: 520px; margin-bottom: 20px; }
  .setup-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .opponent-fields { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 1200px) {
  .calculator-layout { grid-template-columns: minmax(0, 1fr) minmax(250px, 308px); }
  .calculator-rail { grid-template-columns: 1fr; }
}

@media (min-width: 1200px) and (max-width: 1399px) {
  .card-input-panel { grid-template-columns: 1fr; }
  .card-group + .card-group { border-top: 1px solid var(--border-soft); border-left: 0; }
  .controls-panel { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 767px) {
  .app-shell { display: block; min-height: 100dvh; padding-bottom: calc(70px + env(safe-area-inset-bottom)); }
  .ai-battle-page.hand-active .ai-page-content { padding-bottom: calc(250px + env(safe-area-inset-bottom)); }
  .practice-action-dock.hero-due { position: fixed; z-index: 35; right: 0; bottom: calc(70px + env(safe-area-inset-bottom)); left: 0; max-height: min(32dvh, 230px); margin: 0; padding: 14px 10px 8px; overflow-y: auto; overscroll-behavior: contain; border: 1px solid var(--border); border-bottom: 0; border-radius: 18px 18px 0 0; background: rgb(13 16 23 / 98%); box-shadow: 0 -12px 34px rgb(0 0 0 / 55%); }
  .practice-action-dock.hero-due::before { content: ""; position: absolute; top: 8px; left: 50%; width: 42px; height: 4px; border-radius: 999px; background: rgb(255 255 255 / 18%); transform: translateX(-50%); }
  .practice-action-dock.hero-due legend { padding: 0 8px; background: var(--bg-deep); color: var(--green); font-weight: 800; }
  .practice-action-dock.hero-due .action-buttons { position: static; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); padding: 0; border: 0; background: transparent; box-shadow: none; }
  .practice-action-dock.hero-due .action-buttons > button { min-height: 48px; padding-inline: 8px; font-size: .95rem; }
  .practice-action-dock.hero-due .bet-sizing { max-height: min(38dvh, 300px); overflow-y: auto; }
  .practice-action-dock.hero-due .bet-sizing-body { grid-template-columns: 1fr; }
  .practice-action-dock.hero-due .size-suggestions { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .practice-action-dock.hero-due .bet-sizing { gap: 6px; margin-top: 6px; padding-top: 6px; }
  .practice-action-dock.hero-due .bet-sizing-body { gap: 6px; }
  .practice-action-dock.hero-due .size-suggestions { gap: 4px; }
  .practice-action-dock.hero-due .size-suggestions > button { min-height: 44px; padding-inline: 4px; }
  .hand-settled .settled-dock { position: fixed; z-index: 35; right: 10px; bottom: calc(70px + env(safe-area-inset-bottom)); left: 10px; margin: 0; }
  .hand-settled .action-next-hand { min-height: 52px; font-size: 1.05rem; }
  .multiplayer-table.hand-active { padding-bottom: calc(250px + env(safe-area-inset-bottom)); }
  .multiplayer-table.hand-active .multiplayer-actions { position: fixed; z-index: 35; right: 8px; bottom: calc(72px + env(safe-area-inset-bottom)); left: 8px; display: flex; flex-direction: column; gap: 8px; max-height: min(52dvh, 420px); margin: 0; padding: 10px; overflow-y: auto; overscroll-behavior: contain; border: 1px solid var(--border); border-radius: 10px; background: rgb(11 14 20 / 98%); box-shadow: 0 -12px 34px rgb(0 0 0 / 48%); }
  .multiplayer-table.hand-active .multiplayer-actions p { margin: 0; }
  .multiplayer-table.hand-active .multiplayer-actions button { min-width: 0; min-height: 44px; padding-inline: 6px; }
  .multiplayer-table.hand-active .multiplayer-actions label { align-self: center; }
  .multiplayer-table.hand-active .multiplayer-actions #raise-to-error { grid-column: 1 / -1; }
  .app-shell { display: block; }
  .desktop-sidebar { display: none; }
  .mobile-header { position: sticky; z-index: 30; top: 0; display: flex; align-items: center; justify-content: space-between; min-height: calc(58px + env(safe-area-inset-top)); padding: env(safe-area-inset-top) 12px 0; border-bottom: 1px solid var(--border); background: rgb(11 14 20 / 94%); backdrop-filter: blur(18px); }
  .mobile-header .brand { padding: 0; gap: 10px; }
  .mobile-header .brand-mark { font-size: 1.5rem; }
  .mobile-header .brand-copy strong { font-size: .96rem; }
  .mobile-header .icon-button { width: 44px; height: 44px; }
  .page-content { padding: 16px 12px 24px; }
  .page-heading { min-height: 54px; padding: 0 2px 16px; }
  .page-heading p { font-size: .9rem; }
  .ai-battle-page.hand-active .page-heading { min-height: 0; padding-bottom: 6px; }
  .ai-battle-page.hand-active .page-heading h1 { font-size: 1.15rem; }
  .ai-battle-page.hand-active .page-heading p { display: none; }
  .ai-battle-page.hand-active .practice-toolbar { flex-wrap: nowrap; gap: 6px; margin-bottom: 6px; padding-bottom: 2px; overflow-x: auto; overscroll-behavior-inline: contain; scrollbar-width: thin; }
  .ai-battle-page.hand-active .practice-toolbar > button { flex: 0 0 auto; min-height: 44px; padding-inline: 10px; font-size: .82rem; }
  .ai-battle-page.hand-active .practice-toolbar .practice-sound-toggle { width: 44px; min-width: 44px; padding: 0; }
  .bottom-navigation { position: fixed; z-index: 40; inset: auto 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); height: calc(64px + env(safe-area-inset-bottom)); padding: 4px 4px env(safe-area-inset-bottom); border-top: 1px solid var(--border); background: rgb(11 14 20 / 97%); backdrop-filter: blur(18px); }
  .bottom-nav-button { display: grid; place-content: center; justify-items: center; gap: 3px; min-width: 0; border: 0; background: transparent; color: var(--text); cursor: pointer; font-size: .78rem; }
  .bottom-nav-button.active { color: var(--green); }
  .bottom-nav-button .ui-icon { width: 20px; height: 20px; }
  .home-dashboard-header { align-items: flex-start; min-height: 0; padding: 4px 2px 16px; }
  .home-dashboard-header h1 { font-size: 1.75rem; }
  .home-dashboard-header p:not(.section-label) { font-size: .88rem; line-height: 1.55; }
  .home-dashboard-header .offline-badge { min-height: 28px; font-size: .75rem; }
  .home-dashboard-grid { grid-template-columns: 1fr; gap: 10px; }
  .dashboard-action-hub, .dashboard-overview, .dashboard-recent, .dashboard-next-action { grid-column: auto; padding: 18px 14px; }
  .dashboard-actions { grid-template-columns: 1fr; margin-top: 14px; }
  .dashboard-action { min-height: 72px; padding: 12px; }
  .dashboard-overview { order: 2; }
  .dashboard-recent { order: 3; min-height: 0; }
  .dashboard-next-action { order: 4; min-height: 245px; }
  .dashboard-activity-row { grid-template-columns: 38px minmax(0, 1fr); padding-block: 12px; }
  .dashboard-activity-meta { grid-column: 2; grid-template-columns: 1fr auto; justify-items: start; text-align: left; }
  .dashboard-activity-row:nth-child(n + 4) { display: none; }
  .calculator-layout { display: block; }
  .calculator-page { padding-bottom: calc(88px + env(safe-area-inset-bottom)); }
  .calculator-main, .calculator-rail { display: grid; width: 100%; min-width: 0; }
  .card-input-panel, .controls-panel, .results-panel { width: 100%; min-width: 0; }
  .card-input-panel { display: block; }
  .card-group { padding: 18px 14px; }
  .card-group + .card-group { border-top: 1px solid var(--border-soft); border-left: 0; }
  .card-group h2 { margin-bottom: 14px; }
  .card-row { min-width: 0; gap: 8px; }
  .board-cards-input .card-row { grid-auto-columns: minmax(62px, 1fr); overflow-x: auto; overscroll-behavior-inline: contain; padding-bottom: 8px; scroll-snap-type: inline proximity; }
  .board-cards-input .card-slot { min-width: 62px; scroll-snap-align: start; }
  .card-slot { grid-template-rows: minmax(96px, 1fr) auto; }
  .card-face { min-height: 112px; font-size: 1.7rem; }
  .card-slot small { font-size: .72rem; white-space: nowrap; }
  .controls-panel { display: grid; grid-template-columns: 1fr; gap: 22px; margin-top: 10px; padding: 20px 14px; }
  .control-group { grid-template-columns: minmax(100px, .62fr) minmax(0, 1.38fr); align-items: center; }
  .control-group > * { min-width: 0; }
  .control-group small { grid-column: 2; overflow-wrap: anywhere; }
  .calculator-page .calculate-button { position: fixed; z-index: 35; right: max(12px, env(safe-area-inset-right)); bottom: calc(72px + env(safe-area-inset-bottom)); left: max(12px, env(safe-area-inset-left)); width: auto; min-height: 56px; box-shadow: 0 -8px 28px rgb(0 0 0 / 48%); }
  .results-panel { margin-top: 10px; padding: 16px 12px 20px; }
  .result-columns { margin-top: 18px; }
  .result-column { gap: 10px; padding: 0 8px; }
  .result-column strong { font-size: 1rem; }
  .result-column span { font-size: clamp(1.35rem, 7vw, 1.9rem); }
  .result-column small { min-height: 58px; font-size: .72rem; line-height: 1.5; }
  .result-status { align-items: flex-start; padding: 12px; font-size: .82rem; line-height: 1.6; }
  .calculator-rail { margin-top: 10px; }
  .calculator-rail section { min-height: auto; padding: 20px 16px; }
  .card-picker { padding: 16px 12px; }
  .clear-group-button, .quick-pot-btn { min-height: 44px; }
  .quick-pot-bar { overflow-x: auto; overscroll-behavior-inline: contain; }
  .quick-pot-btn { flex: 0 0 44px; min-width: 44px; }
  .card-grid { display: grid; grid-template-columns: repeat(13, 44px); gap: 3px; margin-top: 14px; overflow-x: auto; overscroll-behavior-inline: contain; padding-bottom: 6px; }
  .card-grid button { min-width: 44px; min-height: 45px; font-size: .8rem; padding: 0 1px; border-radius: 5px; }
  .profile-grid { grid-template-columns: 1fr; }
  .profile-summary, .diagnostics-panel, .history-panel, .profile-trend-panel { padding: 18px 14px; }
  .profile-metrics { grid-column: auto; }
  .profile-metrics .metric { gap: 6px; padding: 18px 10px; }
  .profile-metrics .metric span { white-space: nowrap; font-size: .78rem; }
  .profile-metrics .metric strong { font-size: 1.65rem; }
  .profile-metrics .metric small { font-size: .75rem; }
  .trend-chart-wrapper { height: 90px; }
  .trend-panel-heading { flex-direction: column; align-items: flex-start; gap: 6px; }
  .trend-chart-footer { flex-direction: column; align-items: flex-start; gap: 4px; }
  .profile-actions { grid-template-columns: 1fr; }
  .diagnostic-grid, .record-detail-grid { grid-template-columns: 1fr; }
  .profile-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
  .profile-filters label { gap: 4px; font-size: .8rem; }
  .profile-filters select { min-height: 44px; padding: 0 8px; font-size: .86rem; }
  .practice-shortcuts-tip { display: none; }
  .record-detail-grid .wide { grid-column: auto; }
  .profile-record-heading { flex-wrap: wrap; }
  .profile-record-actions { display: grid; grid-template-columns: 1fr; }
  .profile-dialog { width: 100%; max-height: calc(100dvh - 16px); padding: 16px; }
  .progress-row { grid-template-columns: 90px 1fr 42px; gap: 9px; font-size: .82rem; }
  .connectivity-banner { grid-template-columns: auto 1fr; }
  .connectivity-banner span { grid-column: 1 / -1; }
  .score-entry { grid-template-columns: 1fr; }
  .score-entry label { grid-column: auto; }
  .practice-toolbar > button { flex: 1 1 130px; padding-inline: 10px; }
  .offline-badge { flex: 0 1 auto; margin-left: auto; font-size: .82rem; }
  .practice-layout { grid-template-columns: 1fr; }
  .practice-stage { grid-row: auto; order: 1; }
  .practice-context { position: static; grid-template-columns: 1fr; order: 2; }
  .practice-context > h2 { grid-column: auto; }
  .practice-opponent-summary { grid-column: auto; }
  .practice-inspector { grid-template-columns: 1fr; grid-row: auto; order: 3; }
  .ai-battle-page.hand-active .practice-layout { gap: 8px; }
  .ai-battle-page.hand-active .practice-context { grid-template-columns: auto minmax(0, 1fr); gap: 6px 10px; padding: 8px 10px; }
  .ai-battle-page.hand-active .practice-context > h2 { grid-column: auto; white-space: nowrap; }
  .ai-battle-page.hand-active .practice-context-list { flex-wrap: nowrap; gap: 12px; overflow-x: auto; overscroll-behavior-inline: contain; }
  .ai-battle-page.hand-active .practice-context-list div { flex: 0 0 auto; }
  .ai-battle-page.hand-active .practice-opponent-summary { grid-column: 1 / -1; flex-wrap: nowrap; overflow-x: auto; overscroll-behavior-inline: contain; }
  .seat-hud, .seat-style-chip { display: none; }
  .coach-toast { top: calc(66px + env(safe-area-inset-top)); }
  .result-banner { min-width: min(240px, 84%); padding: 10px 14px; }
  .result-banner strong { font-size: 1rem; }
  .authoritative-table { padding: 10px; }
  .poker-table-shell { min-height: 250px; margin-bottom: 20px; }
  .ai-battle-page.hand-active .authoritative-table { padding: 8px; }
  .ai-battle-page.hand-active .table-status { margin-bottom: 4px; font-size: .78rem; }
  .ai-battle-page.hand-active .poker-table-shell { min-height: 220px; margin-bottom: 0; }
  .practice-felt { inset: 0; border-radius: 24px; grid-template: 48px minmax(96px, 1fr) 48px / repeat(6, minmax(0, 1fr)); gap: 4px; padding: 5px 16px; }
  .table-center { grid-area: 2 / 2 / 3 / 6; gap: 4px; }
  .table-center .street-label { display: none; }
  .board-lane { grid-template-columns: repeat(5, minmax(22px, 28px)); gap: 3px; padding: 4px; }
  .practice-seat { position: relative; align-content: start; width: min(100%, 96px); min-height: 0; height: 48px; padding: 4px 5px; gap: 1px; font-size: .62rem; line-height: 1.1; }
  .practice-seat.hero-station { width: min(100%, 104px); min-height: 0; height: 52px; padding: 4px 5px; font-size: .66rem; }
  .practice-seat .seat-heading { padding-right: 23px; }
  .practice-seat .seat-heading > div { position: absolute; top: 2px; right: 2px; gap: 2px; }
  .practice-seat > small { min-width: 0; font-size: .58rem; }
  .practice-seat > span { padding-right: 26px; font-size: .6rem; white-space: nowrap; }
  .practice-seat .seat-cards { position: absolute; right: 4px; bottom: 4px; min-height: 0; margin: 0; gap: 3px; }
  .practice-seat .seat-flags { display: none; }
  .practice-seat:not(.hero-station) .practice-card,
  .practice-seat:not(.hero-station) .card-back { width: 18px; }
  .practice-seat.hero-station .practice-card { width: 26px; }
  .practice-card, .card-back { width: 34px; }
  .practice-action-dock .action-buttons { position: sticky; z-index: 18; bottom: calc(80px + env(safe-area-inset-bottom)); display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); padding: 8px; border: 1px solid var(--border); border-radius: 9px; background: rgb(11 14 20 / 96%); box-shadow: 0 -8px 24px rgb(0 0 0 / 32%); }
  .action-buttons > button { flex: 1 1 105px; padding-inline: 8px; }
  .bet-sizing-body { grid-template-columns: 1fr; }
  .size-suggestions { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .size-suggestions > button { min-width: 0; padding-inline: 4px; }
  .practice-side { grid-template-columns: 1fr; }
  .practice-dialog { width: 100%; max-height: 96dvh; padding: 16px; }
  .setup-groups { grid-template-columns: 1fr; }
  .setup-grid, .opponent-fields { grid-template-columns: 1fr; }
  .setup-grid .wide-field, .opponent-fields .range-field { grid-column: auto; }
  .opponent-seat-list { grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); }
  .opponent-seat-list .section-label { grid-column: 1 / -1; }
  .history-row { grid-template-columns: 1fr; }
  .history-row button { width: 100%; }
  .replay-controls { grid-template-columns: repeat(2, 1fr); margin-inline: -16px; margin-bottom: -16px; padding-inline: 16px; }
}

@media (max-width: 767px) {
  .range-grid { max-width: 100%; overflow-x: auto; overscroll-behavior-inline: contain; grid-template-columns: repeat(13, 44px); gap: 3px; padding-bottom: 6px; }
  .range-cell { min-width: 44px; min-height: 44px; font-size: .72rem; }
}

@media (min-width: 768px) and (min-height: 700px) {
  .poker-table-shell { min-height: clamp(390px, calc(100dvh - 430px), 520px); margin-bottom: 12px; }
}

@media (min-width: 1200px) and (min-height: 700px) {
  .ai-battle-page .practice-layout { grid-template-columns: minmax(0, 1fr) minmax(320px, 360px); gap: 12px; }
  .ai-battle-page .practice-context { grid-column: 1 / -1; }
  .ai-battle-page .practice-stage { grid-row: auto; min-width: 0; }
  .ai-battle-page .practice-inspector { grid-column: 2; grid-row: 2; grid-template-columns: 1fr; align-content: start; }
  .ai-battle-page .authoritative-table { width: 100%; padding: 12px; }
  .ai-battle-page .poker-table-shell { width: min(100%, 860px); min-height: clamp(440px, calc(100dvh - 360px), 560px); margin: 0; }
  .ai-battle-page.hand-active .page-heading { min-height: 50px; padding-bottom: 8px; }
  .ai-battle-page.hand-active .practice-toolbar { margin-bottom: 6px; }
  .ai-battle-page.hand-active .practice-context { gap: 6px 16px; padding: 8px 12px; }
  .ai-battle-page.hand-active .poker-table-shell { min-height: clamp(300px, calc(100dvh - 480px), 420px); }
  .ai-battle-page .practice-felt { inset: 0; grid-template: minmax(92px, 1fr) minmax(96px, 1.1fr) minmax(92px, 1fr) / repeat(6, minmax(0, 1fr)); gap: 8px; padding: 10px 32px; }
  .ai-battle-page .table-center { gap: 8px; }
  .ai-battle-page .board-lane { grid-template-columns: repeat(5, minmax(36px, 52px)); gap: 6px; padding: 8px; }
  .ai-battle-page .practice-seat { position: relative; width: min(100%, 168px); min-height: 96px; padding: 8px 10px; gap: 2px; font-size: .74rem; line-height: 1.2; }
  .ai-battle-page .practice-seat.hero-station { min-height: 116px; }
  .ai-battle-page .practice-seat .seat-heading { padding-right: 30px; }
  .ai-battle-page .practice-seat .seat-heading > div { position: absolute; top: 3px; right: 3px; gap: 3px; }
  .ai-battle-page .practice-seat > small { font-size: .7rem; }
  .ai-battle-page .practice-seat > span { padding-right: 30px; font-size: .72rem; white-space: nowrap; }
  .ai-battle-page .practice-seat .seat-cards { position: absolute; right: 6px; bottom: 5px; min-height: 0; margin: 0; gap: 3px; }
  .ai-battle-page .practice-seat .practice-card,
  .ai-battle-page .practice-seat .card-back { width: 28px; }
  .ai-battle-page .practice-seat.hero-station .practice-card { width: 34px; }
  .ai-battle-page .practice-seat .seat-flags { display: block; }
  .ai-battle-page .practice-actions { margin-top: 8px; padding: 12px; }
  .ai-battle-page.hand-active .practice-actions { padding-block: 10px; }
  .ai-battle-page.hand-active .practice-actions .action-buttons:has(> *) { margin-bottom: 8px; }
  .ai-battle-page.hand-active .practice-actions .action-button { min-height: 48px; }
  .ai-battle-page.hand-active .practice-actions .bet-sizing { gap: 6px; margin-top: 6px; padding-top: 6px; }
  .ai-battle-page.hand-active .practice-action-dock.hero-due:has(.bet-sizing) { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 10px; }
  .ai-battle-page.hand-active .practice-action-dock.hero-due:has(.bet-sizing) > legend { flex-basis: 100%; }
  .ai-battle-page.hand-active .practice-action-dock.hero-due:has(.bet-sizing) > .action-buttons { display: grid; flex: 0 0 290px; grid-template-columns: repeat(3, minmax(0, 1fr)); align-self: start; gap: 8px; margin-bottom: 0; }
  .ai-battle-page.hand-active .practice-action-dock.hero-due:has(.bet-sizing) > .bet-sizing { flex: 1 1 350px; min-width: 0; margin-top: 0; padding-top: 0; padding-left: 10px; border-top: 0; border-left: 1px solid var(--border-soft); }
  .ai-battle-page.hand-active .practice-action-dock.hero-due:has(.bet-sizing) .bet-sizing-body { grid-template-columns: minmax(0, 1fr) 156px; gap: 6px; }
  .ai-battle-page.hand-active .practice-action-dock.hero-due:has(.bet-sizing) .size-suggestions { gap: 4px; }
  .ai-battle-page.hand-active .practice-action-dock.hero-due:has(.bet-sizing) .size-button { min-height: 44px; padding-inline: 2px; font-size: .76rem; line-height: 1.15; }
  .ai-battle-page.hand-active .practice-action-dock.hero-due:has(.bet-sizing) .raise-commit { gap: 6px; }
  .ai-battle-page.hand-active .practice-action-dock.hero-due:has(.bet-sizing) .raise-commit .action-raise { min-height: 48px; padding-inline: 18px; }
  .ai-battle-page .danger-button,
  .ai-battle-page .size-button { min-height: 44px; }
  .ai-battle-page .bet-sizing { gap: 8px; margin-top: 8px; padding-top: 8px; }
}

@media (max-width: 479px) {
  .scoreboard-panel ol li { grid-template-columns: auto auto minmax(0, 1fr) auto auto; gap: 8px; padding: 10px 8px; }
  .scoreboard-panel ol li .round-score { display: none; }
  .room-config-grid { grid-template-columns: 1fr; gap: 4px 0; }
}

@media (max-width: 390px) {
  .page-content { padding-inline: 8px; }
  .brand-copy strong { font-size: .86rem; }
  .brand-copy small { display: none; }
  .home-dashboard-header { display: block; }
  .home-dashboard-header .offline-badge { margin-top: 10px; }
  .card-group { padding-inline: 9px; }
  .card-row { gap: 5px; }
  .card-slot small { font-size: .64rem; }
  .result-column { padding-inline: 5px; }
  .generated-room-code output { max-width: 100%; overflow-wrap: anywhere; font-size: 1.25rem; letter-spacing: .1em; }
}

@media (max-width: 359px) {
  .ai-battle-page.hand-active .poker-table-shell { min-height: 146px; }
  .ai-battle-page.hand-active .practice-felt { grid-template-rows: 36px minmax(50px, 1fr) 36px; padding-inline: 10px; }
  .ai-battle-page.hand-active .table-center { gap: 2px; }
  .ai-battle-page.hand-active .board-lane { grid-template-columns: repeat(5, minmax(18px, 21px)); gap: 2px; padding: 2px; }
  .ai-battle-page.hand-active .pot-zone { min-height: 20px; padding-block: 0; transform: translateY(-2px); }
  .ai-battle-page.hand-active .practice-felt .practice-seat { height: 44px; min-height: 44px; padding: 3px 4px; }
  .ai-battle-page.hand-active .practice-felt .practice-seat:not(.hero-station) { height: 36px; min-height: 36px; }
  .ai-battle-page.hand-active .practice-felt .practice-seat.current-actor:not(.hero-station) { height: 40px; min-height: 40px; }
  .ai-battle-page.hand-active .practice-felt .practice-seat:not(.hero-station) > small,
  .ai-battle-page.hand-active .practice-felt .practice-seat:not(.hero-station) > span,
  .ai-battle-page.hand-active .practice-felt .practice-seat:not(.hero-station) .seat-hud,
  .ai-battle-page.hand-active .practice-felt .practice-seat:not(.hero-station) .seat-style-chip,
  .ai-battle-page.hand-active .practice-felt .practice-seat:not(.hero-station) .seat-cards,
  .ai-battle-page.hand-active .practice-felt .practice-seat:not(.hero-station) .seat-flags,
  .ai-battle-page.hand-active .practice-felt .practice-seat:not(.hero-station) .seat-bet { display: none; }
  .ai-battle-page.hand-active .practice-felt:is([data-seats="9"], [data-seats="10"], [data-seats="11"], [data-seats="12"]) .practice-seat:not(.hero-station):not(.current-actor) {
    height: 26px;
    min-height: 26px;
    max-height: 26px;
    padding: 2px 3px;
  }
  .ai-battle-page.hand-active .practice-felt:is([data-seats="9"], [data-seats="10"], [data-seats="11"], [data-seats="12"]) .practice-seat.current-actor:not(.hero-station) {
    height: 28px;
    min-height: 28px;
    max-height: 28px;
    padding: 2px 3px;
  }
  .ai-battle-page.hand-active .practice-felt .practice-seat.hero-station { height: 44px; min-height: 44px; }
  /* Keep the compact hero pocket below the central pot at 320px wide. */
  .ai-battle-page.hand-active .practice-felt .practice-seat.hero-station { top: 95%; }
  .practice-action-dock.hero-due { max-height: 142px; }
  .practice-action-dock .mobile-action-advice {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    column-gap: 8px;
    row-gap: 0;
    padding-block: 2px;
  }
  .practice-action-dock .mobile-action-advice .pre-action-advice-heading {
    grid-column: 1;
    grid-row: 1;
    justify-content: flex-start;
  }
  .practice-action-dock .mobile-action-advice .advice-mode-chip { display: none; }
  .practice-action-dock .mobile-action-advice h2 {
    grid-column: 1;
    grid-row: 2;
  }
  .practice-action-dock .mobile-action-advice details {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: center;
    padding-top: 0;
    border-top: 0;
  }
  .practice-action-dock .mobile-action-advice summary {
    width: 44px;
    overflow: hidden;
    color: transparent;
    white-space: nowrap;
  }
  .practice-action-dock .mobile-action-advice summary::after {
    content: "详情";
    color: var(--text);
  }
  .practice-action-dock .mobile-action-advice details[open] {
    grid-column: 1 / -1;
    grid-row: 3;
    align-self: stretch;
    padding-top: 4px;
    border-top: 1px solid var(--border-soft);
  }
  .practice-action-dock .mobile-action-advice details[open] summary {
    width: auto;
    color: var(--text);
  }
  .practice-action-dock .mobile-action-advice details[open] summary::after { content: ""; }
}

@media (max-width: 1199px) and (min-width: 768px) and (min-height: 521px) {
}

@media (max-height: 520px) and (orientation: landscape) {
  .mobile-header { position: static; min-height: 58px; }
  .bottom-navigation { height: calc(60px + env(safe-area-inset-bottom)); }
  .app-shell { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  .bottom-nav-button { grid-auto-flow: column; align-items: center; gap: 8px; }
  .ai-battle-page .page-heading { min-height: 30px; padding-bottom: 4px; }
  .ai-battle-page .page-heading h1 { font-size: 1.05rem; }
  .ai-battle-page .page-heading p { display: none; }
  .ai-battle-page .practice-toolbar { gap: 6px; margin-bottom: 6px; }
  .ai-battle-page .practice-toolbar > button { min-height: 44px; padding-inline: 12px; }
  .ai-battle-page .offline-badge { min-height: 44px; }
  .authoritative-table { padding: 8px; }
  .table-status { margin-bottom: 6px; }
  .poker-table-shell { min-height: 220px; margin-bottom: 4px; }
  .practice-felt { inset: 0; grid-template: minmax(60px, 1fr) minmax(68px, 1.05fr) minmax(52px, 1fr) / repeat(6, minmax(0, 1fr)); gap: 4px; padding: 4px 38px; border-radius: 22px; }
  .table-center { grid-area: 2 / 2 / 3 / 6; }
  .table-center .street-label { display: none; }
  .board-lane { grid-template-columns: repeat(5, minmax(22px, 29px)); gap: 3px; padding: 3px; }
  .pot-zone { min-height: 20px; }
  .practice-seat { position: relative; width: min(100%, 110px); min-height: 48px; padding: 3px 5px; gap: 1px; font-size: .62rem; line-height: 1.15; }
  .practice-seat.hero-station { min-height: 66px; }
  .practice-seat .seat-heading { padding-right: 28px; }
  .practice-seat .seat-heading > div { position: absolute; top: 2px; right: 2px; gap: 2px; }
  .practice-seat > small { font-size: .6rem; }
  .practice-seat > span { padding-right: 28px; font-size: .62rem; white-space: nowrap; }
  .practice-seat .seat-cards { position: absolute; right: 4px; bottom: 4px; min-height: 0; margin: 0; gap: 3px; }
  .practice-seat .practice-card, .practice-seat .card-back { width: 14px; }
  .practice-seat.hero-station .practice-card { width: 26px; }
  .practice-seat .seat-flags,
  .practice-seat .seat-hud,
  .practice-seat .seat-style-chip,
  .practice-seat .seat-bet { display: none; }
  .practice-felt .practice-seat { transform: none; }
  .practice-actions .action-buttons { position: sticky; z-index: 18; bottom: 8px; padding: 7px; border: 1px solid var(--border); border-radius: 9px; background: rgb(11 14 20 / 96%); box-shadow: 0 -8px 24px rgb(0 0 0 / 32%); }
  .practice-modal { place-items: start center; padding: 8px; }
  .practice-dialog { max-height: calc(100dvh - 16px); }
}

@media (min-width: 768px) and (max-height: 520px) and (orientation: landscape) {
  .ai-battle-page .practice-stage { padding-right: 328px; }
  .practice-action-dock.hero-due { position: fixed; z-index: 45; top: 64px; right: 8px; bottom: auto; left: auto; width: 312px; max-height: calc(100dvh - 72px); margin: 0; padding: 8px; overflow-y: auto; border-color: var(--border); background: rgb(11 14 20 / 98%); box-shadow: -12px 12px 34px rgb(0 0 0 / 48%); }
  .practice-actions .action-buttons { position: static; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; padding: 0; border: 0; background: transparent; box-shadow: none; }
  .practice-actions .action-buttons > button { min-width: 0; min-height: 44px; padding-inline: 8px; }
  .practice-action-dock .bet-sizing-body { grid-template-columns: 1fr; }
  .practice-action-dock .size-suggestions { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  .practice-action-dock .size-suggestions > button { min-width: 0; min-height: 44px; padding-inline: 4px; }
  .practice-action-dock .bet-sizing { gap: 6px; margin-top: 6px; padding-top: 6px; }
}

@media (prefers-reduced-motion: no-preference) {
  button, .dashboard-action, .skip-link { transition: color .18s ease, background-color .18s ease, border-color .18s ease, transform .18s ease, filter .18s ease; }
  .modal-backdrop { animation: fade-in .16s ease-out; }
  @keyframes fade-in { from { opacity: 0; } }
}

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

body.high-contrast { --border: #718293; --border-soft: #536779; --muted: #d2dae1; }

/* In-app legal pages (privacy/terms) and site footer */
.legal-page { max-width: 880px; }
.legal-page .page-heading { min-height: 0; padding-bottom: 12px; }
.legal-page .page-heading p { margin-bottom: 0; }
.legal-page > section { margin-top: 12px; padding: 16px 20px 18px; border: 1px solid var(--border); border-radius: var(--radius); background: linear-gradient(145deg, rgb(18 21 29 / 92%), rgb(13 16 23 / 92%)); }
.legal-page h2 { margin-bottom: 6px; }
.legal-page ul { margin: 8px 0 0; padding-left: 20px; }
.legal-page li { margin-bottom: 8px; line-height: 1.7; }
.legal-page > section p { margin-bottom: 10px; }
.legal-page > section p:last-child { margin-bottom: 0; }
.release-contact dl { display: grid; gap: 8px; margin: 12px 0; }
.release-contact dl div { display: grid; grid-template-columns: minmax(100px, .35fr) minmax(0, 1fr); gap: 12px; }
.release-contact dd { margin: 0; overflow-wrap: anywhere; }
.legal-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 18px; margin-top: 22px; padding-top: 14px; border-top: 1px solid var(--border-soft); color: var(--muted); font-size: .82rem; }
.legal-footer nav { display: flex; gap: 18px; }
.legal-footer a { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding-inline: 8px; color: var(--muted); text-decoration: none; }
.legal-footer a:hover { color: var(--green); }
@media (max-width: 767px) {
  .legal-footer { justify-content: flex-start; gap: 4px 14px; margin-top: 16px; font-size: .78rem; }
  .legal-footer nav { gap: 14px; }
}

/* 2.3 practice table: seats are positioned from normalized coordinates so
   the same presentation works for every 2–12 seat configuration. */
.practice-felt .practice-seat {
  position: absolute;
  left: var(--seat-x);
  top: var(--seat-y);
  transform: translate(-50%, -50%);
  margin: 0;
}
.practice-felt .seat-primary,
.multiplayer-felt .seat-primary { --seat-x: 50%; --seat-y: 86%; }
.practice-felt:is([data-seats="9"], [data-seats="10"], [data-seats="11"], [data-seats="12"]) .seat-primary,
.multiplayer-felt:is([data-seat-cap="9"], [data-seat-cap="10"], [data-seat-cap="11"], [data-seat-cap="12"]) .seat-primary { --seat-y: 90%; }
/* Static position classes keep the shared ellipse CSP-safe: no seat uses an
   inline style attribute, and both offline/online tables consume this map. */
.practice-felt[data-seats="2"] .seat-offset-1, .multiplayer-felt[data-seat-cap="2"] .seat-offset-1 { --seat-x: 50.00%; --seat-y: 10.00%; }
.practice-felt[data-seats="3"] .seat-offset-1, .multiplayer-felt[data-seat-cap="3"] .seat-offset-1 { --seat-x: 12.76%; --seat-y: 24.00%; }
.practice-felt[data-seats="3"] .seat-offset-2, .multiplayer-felt[data-seat-cap="3"] .seat-offset-2 { --seat-x: 87.24%; --seat-y: 24.00%; }
.practice-felt[data-seats="4"] .seat-offset-1, .multiplayer-felt[data-seat-cap="4"] .seat-offset-1 { --seat-x: 7.00%; --seat-y: 38.00%; }
.practice-felt[data-seats="4"] .seat-offset-2, .multiplayer-felt[data-seat-cap="4"] .seat-offset-2 { --seat-x: 50.00%; --seat-y: 10.00%; }
.practice-felt[data-seats="4"] .seat-offset-3, .multiplayer-felt[data-seat-cap="4"] .seat-offset-3 { --seat-x: 93.00%; --seat-y: 38.00%; }
.practice-felt[data-seats="5"] .seat-offset-1, .multiplayer-felt[data-seat-cap="5"] .seat-offset-1 { --seat-x: 9.10%; --seat-y: 46.65%; }
.practice-felt[data-seats="5"] .seat-offset-2, .multiplayer-felt[data-seat-cap="5"] .seat-offset-2 { --seat-x: 24.73%; --seat-y: 15.35%; }
.practice-felt[data-seats="5"] .seat-offset-3, .multiplayer-felt[data-seat-cap="5"] .seat-offset-3 { --seat-x: 75.27%; --seat-y: 15.35%; }
.practice-felt[data-seats="5"] .seat-offset-4, .multiplayer-felt[data-seat-cap="5"] .seat-offset-4 { --seat-x: 90.90%; --seat-y: 46.65%; }
.practice-felt[data-seats="6"] .seat-offset-1, .multiplayer-felt[data-seat-cap="6"] .seat-offset-1 { --seat-x: 12.76%; --seat-y: 52.00%; }
.practice-felt[data-seats="6"] .seat-offset-2, .multiplayer-felt[data-seat-cap="6"] .seat-offset-2 { --seat-x: 12.76%; --seat-y: 24.00%; }
.practice-felt[data-seats="6"] .seat-offset-3, .multiplayer-felt[data-seat-cap="6"] .seat-offset-3 { --seat-x: 50.00%; --seat-y: 10.00%; }
.practice-felt[data-seats="6"] .seat-offset-4, .multiplayer-felt[data-seat-cap="6"] .seat-offset-4 { --seat-x: 87.24%; --seat-y: 24.00%; }
.practice-felt[data-seats="6"] .seat-offset-5, .multiplayer-felt[data-seat-cap="6"] .seat-offset-5 { --seat-x: 87.24%; --seat-y: 52.00%; }
.practice-felt[data-seats="7"] .seat-offset-1, .multiplayer-felt[data-seat-cap="7"] .seat-offset-1 { --seat-x: 15.60%; --seat-y: 62.70%; }
.practice-felt[data-seats="7"] .seat-offset-2, .multiplayer-felt[data-seat-cap="7"] .seat-offset-2 { --seat-x: 7.10%; --seat-y: 37.32%; }
.practice-felt[data-seats="7"] .seat-offset-3, .multiplayer-felt[data-seat-cap="7"] .seat-offset-3 { --seat-x: 30.91%; --seat-y: 16.97%; }
.practice-felt[data-seats="7"] .seat-offset-4, .multiplayer-felt[data-seat-cap="7"] .seat-offset-4 { --seat-x: 69.09%; --seat-y: 16.97%; }
.practice-felt[data-seats="7"] .seat-offset-5, .multiplayer-felt[data-seat-cap="7"] .seat-offset-5 { --seat-x: 92.90%; --seat-y: 37.32%; }
.practice-felt[data-seats="7"] .seat-offset-6, .multiplayer-felt[data-seat-cap="7"] .seat-offset-6 { --seat-x: 84.40%; --seat-y: 62.70%; }
.practice-felt[data-seats="8"] .seat-offset-1, .multiplayer-felt[data-seat-cap="8"] .seat-offset-1 { --seat-x: 18.89%; --seat-y: 65.21%; }
.practice-felt[data-seats="8"] .seat-offset-2, .multiplayer-felt[data-seat-cap="8"] .seat-offset-2 { --seat-x: 6.00%; --seat-y: 44.00%; }
.practice-felt[data-seats="8"] .seat-offset-3, .multiplayer-felt[data-seat-cap="8"] .seat-offset-3 { --seat-x: 18.89%; --seat-y: 22.79%; }
.practice-felt[data-seats="8"] .seat-offset-4, .multiplayer-felt[data-seat-cap="8"] .seat-offset-4 { --seat-x: 50.00%; --seat-y: 14.00%; }
.practice-felt[data-seats="8"] .seat-offset-5, .multiplayer-felt[data-seat-cap="8"] .seat-offset-5 { --seat-x: 81.11%; --seat-y: 22.79%; }
.practice-felt[data-seats="8"] .seat-offset-6, .multiplayer-felt[data-seat-cap="8"] .seat-offset-6 { --seat-x: 94.00%; --seat-y: 44.00%; }
.practice-felt[data-seats="8"] .seat-offset-7, .multiplayer-felt[data-seat-cap="8"] .seat-offset-7 { --seat-x: 81.11%; --seat-y: 65.21%; }
.practice-felt[data-seats="9"] .seat-offset-1, .multiplayer-felt[data-seat-cap="9"] .seat-offset-1 { --seat-x: 21.72%; --seat-y: 77.11%; }
.practice-felt[data-seats="9"] .seat-offset-2, .multiplayer-felt[data-seat-cap="9"] .seat-offset-2 { --seat-x: 6.67%; --seat-y: 54.60%; }
.practice-felt[data-seats="9"] .seat-offset-3, .multiplayer-felt[data-seat-cap="9"] .seat-offset-3 { --seat-x: 11.89%; --seat-y: 29.00%; }
.practice-felt[data-seats="9"] .seat-offset-4, .multiplayer-felt[data-seat-cap="9"] .seat-offset-4 { --seat-x: 34.95%; --seat-y: 12.29%; }
.practice-felt[data-seats="9"] .seat-offset-5, .multiplayer-felt[data-seat-cap="9"] .seat-offset-5 { --seat-x: 65.05%; --seat-y: 12.29%; }
.practice-felt[data-seats="9"] .seat-offset-6, .multiplayer-felt[data-seat-cap="9"] .seat-offset-6 { --seat-x: 88.11%; --seat-y: 29.00%; }
.practice-felt[data-seats="9"] .seat-offset-7, .multiplayer-felt[data-seat-cap="9"] .seat-offset-7 { --seat-x: 93.33%; --seat-y: 54.60%; }
.practice-felt[data-seats="9"] .seat-offset-8, .multiplayer-felt[data-seat-cap="9"] .seat-offset-8 { --seat-x: 78.28%; --seat-y: 77.11%; }
.practice-felt[data-seats="10"] .seat-offset-1, .multiplayer-felt[data-seat-cap="10"] .seat-offset-1 { --seat-x: 24.14%; --seat-y: 78.74%; }
.practice-felt[data-seats="10"] .seat-offset-2, .multiplayer-felt[data-seat-cap="10"] .seat-offset-2 { --seat-x: 8.15%; --seat-y: 59.74%; }
.practice-felt[data-seats="10"] .seat-offset-3, .multiplayer-felt[data-seat-cap="10"] .seat-offset-3 { --seat-x: 8.15%; --seat-y: 36.26%; }
.practice-felt[data-seats="10"] .seat-offset-4, .multiplayer-felt[data-seat-cap="10"] .seat-offset-4 { --seat-x: 24.14%; --seat-y: 17.26%; }
.practice-felt[data-seats="10"] .seat-offset-5, .multiplayer-felt[data-seat-cap="10"] .seat-offset-5 { --seat-x: 50.00%; --seat-y: 10.00%; }
.practice-felt[data-seats="10"] .seat-offset-6, .multiplayer-felt[data-seat-cap="10"] .seat-offset-6 { --seat-x: 75.86%; --seat-y: 17.26%; }
.practice-felt[data-seats="10"] .seat-offset-7, .multiplayer-felt[data-seat-cap="10"] .seat-offset-7 { --seat-x: 91.85%; --seat-y: 36.26%; }
.practice-felt[data-seats="10"] .seat-offset-8, .multiplayer-felt[data-seat-cap="10"] .seat-offset-8 { --seat-x: 91.85%; --seat-y: 59.74%; }
.practice-felt[data-seats="10"] .seat-offset-9, .multiplayer-felt[data-seat-cap="10"] .seat-offset-9 { --seat-x: 75.86%; --seat-y: 78.74%; }
.practice-felt[data-seats="11"] .seat-offset-1, .multiplayer-felt[data-seat-cap="11"] .seat-offset-1 { --seat-x: 26.21%; --seat-y: 79.97%; }
.practice-felt[data-seats="11"] .seat-offset-2, .multiplayer-felt[data-seat-cap="11"] .seat-offset-2 { --seat-x: 9.98%; --seat-y: 63.79%; }
.practice-felt[data-seats="11"] .seat-offset-3, .multiplayer-felt[data-seat-cap="11"] .seat-offset-3 { --seat-x: 6.45%; --seat-y: 42.59%; }
.practice-felt[data-seats="11"] .seat-offset-4, .multiplayer-felt[data-seat-cap="11"] .seat-offset-4 { --seat-x: 16.75%; --seat-y: 23.12%; }
.practice-felt[data-seats="11"] .seat-offset-5, .multiplayer-felt[data-seat-cap="11"] .seat-offset-5 { --seat-x: 37.60%; --seat-y: 11.54%; }
.practice-felt[data-seats="11"] .seat-offset-6, .multiplayer-felt[data-seat-cap="11"] .seat-offset-6 { --seat-x: 62.40%; --seat-y: 11.54%; }
.practice-felt[data-seats="11"] .seat-offset-7, .multiplayer-felt[data-seat-cap="11"] .seat-offset-7 { --seat-x: 83.25%; --seat-y: 23.12%; }
.practice-felt[data-seats="11"] .seat-offset-8, .multiplayer-felt[data-seat-cap="11"] .seat-offset-8 { --seat-x: 93.55%; --seat-y: 42.59%; }
.practice-felt[data-seats="11"] .seat-offset-9, .multiplayer-felt[data-seat-cap="11"] .seat-offset-9 { --seat-x: 90.02%; --seat-y: 63.79%; }
.practice-felt[data-seats="11"] .seat-offset-10, .multiplayer-felt[data-seat-cap="11"] .seat-offset-10 { --seat-x: 73.79%; --seat-y: 79.97%; }
.practice-felt[data-seats="12"] .seat-offset-1, .multiplayer-felt[data-seat-cap="12"] .seat-offset-1 { --seat-x: 28.00%; --seat-y: 80.91%; }
.practice-felt[data-seats="12"] .seat-offset-2, .multiplayer-felt[data-seat-cap="12"] .seat-offset-2 { --seat-x: 11.89%; --seat-y: 67.00%; }
.practice-felt[data-seats="12"] .seat-offset-3, .multiplayer-felt[data-seat-cap="12"] .seat-offset-3 { --seat-x: 6.00%; --seat-y: 48.00%; }
.practice-felt[data-seats="12"] .seat-offset-4, .multiplayer-felt[data-seat-cap="12"] .seat-offset-4 { --seat-x: 11.89%; --seat-y: 29.00%; }
.practice-felt[data-seats="12"] .seat-offset-5, .multiplayer-felt[data-seat-cap="12"] .seat-offset-5 { --seat-x: 28.00%; --seat-y: 15.09%; }
.practice-felt[data-seats="12"] .seat-offset-6, .multiplayer-felt[data-seat-cap="12"] .seat-offset-6 { --seat-x: 50.00%; --seat-y: 10.00%; }
.practice-felt[data-seats="12"] .seat-offset-7, .multiplayer-felt[data-seat-cap="12"] .seat-offset-7 { --seat-x: 72.00%; --seat-y: 15.09%; }
.practice-felt[data-seats="12"] .seat-offset-8, .multiplayer-felt[data-seat-cap="12"] .seat-offset-8 { --seat-x: 88.11%; --seat-y: 29.00%; }
.practice-felt[data-seats="12"] .seat-offset-9, .multiplayer-felt[data-seat-cap="12"] .seat-offset-9 { --seat-x: 94.00%; --seat-y: 48.00%; }
.practice-felt[data-seats="12"] .seat-offset-10, .multiplayer-felt[data-seat-cap="12"] .seat-offset-10 { --seat-x: 88.11%; --seat-y: 67.00%; }
.practice-felt[data-seats="12"] .seat-offset-11, .multiplayer-felt[data-seat-cap="12"] .seat-offset-11 { --seat-x: 72.00%; --seat-y: 80.91%; }
.practice-felt[data-seats="7"] .practice-seat,
.practice-felt[data-seats="8"] .practice-seat {
  width: min(150px, 17%);
}
.practice-felt[data-seats="9"] .practice-seat,
.practice-felt[data-seats="10"] .practice-seat,
.practice-felt[data-seats="11"] .practice-seat,
.practice-felt[data-seats="12"] .practice-seat {
  width: min(132px, 15%);
  min-height: 88px;
  padding: 7px 8px;
  font-size: .7rem;
}
.practice-felt[data-seats="9"] .practice-seat .seat-hud,
.practice-felt[data-seats="10"] .practice-seat .seat-hud,
.practice-felt[data-seats="11"] .practice-seat .seat-hud,
.practice-felt[data-seats="12"] .practice-seat .seat-hud {
  display: none;
}
.pre-action-advice {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding: 14px 16px;
  border: 1px solid rgb(47 202 124 / 45%);
  border-radius: 12px;
  background: linear-gradient(135deg, rgb(47 202 124 / 12%), rgb(18 21 29 / 96%));
  box-shadow: var(--shadow-panel);
}
.mobile-action-advice { display: none; }
.pre-action-advice-heading,
.pre-action-advice-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.pre-action-advice .section-label { margin: 0; }
.advice-mode-chip {
  padding: 3px 8px;
  border: 1px solid rgb(47 202 124 / 35%);
  border-radius: 999px;
  color: var(--green);
  font-size: .72rem;
  font-weight: 800;
}
.pre-action-advice h2 { margin: 0; color: var(--green); font-size: 1.25rem; }
.pre-action-advice p { margin: 0; color: var(--muted); font-size: .88rem; }
.pre-action-advice-meta { color: var(--muted); font-size: .78rem; }
.pre-action-advice details { border-top: 1px solid var(--border-soft); padding-top: 7px; }
.pre-action-advice summary { min-height: 32px; color: var(--text); cursor: pointer; font-size: .8rem; }
.pre-action-advice ul { display: grid; gap: 4px; margin: 6px 0 0; padding: 0; list-style: none; }
.pre-action-advice li { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); }
.coach-live-advice { display: grid; gap: 8px; padding: 12px; border: 1px solid rgb(47 202 124 / 45%); border-radius: 10px; background: linear-gradient(135deg, rgb(47 202 124 / 10%), rgb(255 255 255 / 2%)); }
.coach-live-advice h3 { margin: 0; color: var(--green); font-size: 1.05rem; }
.coach-live-advice p { margin: 0; color: var(--muted); font-size: .84rem; line-height: 1.5; }
.coach-live-advice details { border-top: 1px solid var(--border-soft); padding-top: 7px; }
.coach-live-advice summary { min-height: 32px; color: var(--text); cursor: pointer; font-size: .8rem; }
.coach-live-advice ul { display: grid; gap: 4px; margin: 6px 0 0; padding: 0; list-style: none; }
.coach-live-advice li { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); }
.opponent-editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  margin-bottom: 10px;
}
.opponent-editor-toolbar .secondary-button { min-height: 40px; padding-inline: 12px; font-size: .82rem; }
.multiplayer-felt {
  position: relative;
  display: block;
  min-height: clamp(300px, 35vw, 470px);
  overflow: visible;
  border: 1px solid rgb(255 255 255 / 12%);
  border-radius: var(--poker-table-radius);
  background: radial-gradient(ellipse at 50% 48%, #1a4f3c 0%, var(--table-felt) 58%, #0a231a 100%);
  box-shadow: var(--shadow-panel), inset 0 0 50px rgb(0 0 0 / 38%);
}
.multiplayer-felt::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  opacity: .12;
  background-image: repeating-linear-gradient(25deg, transparent 0 3px, rgb(255 255 255 / 4%) 3px 4px);
}
.multiplayer-table-center { position: absolute; z-index: 1; top: 50%; left: 50%; display: grid; justify-items: center; gap: 7px; min-width: 180px; transform: translate(-50%, -50%); }
.multiplayer-table-center .multiplayer-board { position: relative; z-index: 1; margin: 0; }
.multiplayer-pot { padding: 5px 10px; border: 1px solid rgb(255 255 255 / 16%); border-radius: 999px; color: var(--text); background: rgb(0 0 0 / 26%); font-size: .78rem; }
.multiplayer-felt .table-player {
  position: absolute;
  left: var(--seat-x);
  top: var(--seat-y);
  width: min(160px, 18%);
  transform: translate(-50%, -50%);
  padding: 10px;
  border-radius: 10px;
  background: rgb(11 15 22 / 88%);
  box-shadow: 0 8px 24px rgb(0 0 0 / 45%);
}
.multiplayer-felt .table-player.mine { border-color: rgb(47 202 124 / 65%); }
.multiplayer-felt .table-seat-empty { border-style: dashed; border-color: rgb(255 255 255 / 18%); color: rgb(255 255 255 / 55%); background: rgb(0 0 0 / 12%); box-shadow: none; text-align: center; }
.multiplayer-felt[data-seat-cap="9"] .table-player,
.multiplayer-felt[data-seat-cap="10"] .table-player,
.multiplayer-felt[data-seat-cap="11"] .table-player,
.multiplayer-felt[data-seat-cap="12"] .table-player { width: min(132px, 15%); min-height: 74px; padding: 8px; font-size: .75rem; }
.scoreboard-player-grid { display: grid; }
.multiplayer-table .multiplayer-board,
.multiplayer-table .viewer-hole-cards { position: relative; z-index: 2; }
.room-entry-create h2 { letter-spacing: .01em; }
.profile-tabs {
  display: flex;
  gap: 4px;
  margin: 0 0 12px;
  padding: 4px;
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  background: var(--surface-raised);
}
.profile-tab {
  flex: 1 1 0;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
  cursor: pointer;
}
.profile-tab:hover { color: var(--text); background: rgb(255 255 255 / 4%); }
.profile-tab.active { border-color: rgb(47 202 124 / 38%); background: rgb(47 202 124 / 12%); color: var(--green); }
.profile-tab-panel[hidden] { display: none !important; }
.calculator-advanced {
  grid-column: 1 / -1;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  background: rgb(255 255 255 / 2%);
}
.calculator-advanced > summary { min-height: 36px; color: var(--muted); font-weight: 800; cursor: pointer; }
.calculator-advanced[open] > summary { margin-bottom: 10px; color: var(--text); }
.calculator-advanced-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.calculator-main > .panel,
.calculator-rail > section,
.profile-grid > .panel,
.profile-detail-workspace > .panel { box-shadow: var(--shadow-panel); }
@media (min-width: 768px) {
  .calculator-page .card-input-panel {
    grid-template-columns: minmax(230px, .52fr) minmax(0, 1fr);
    min-height: 0;
  }
  .calculator-page .card-group { padding: 16px; }
  .calculator-page .card-group + .card-group {
    border-top: 0;
    border-left: 1px solid var(--border-soft);
  }
  .calculator-page .card-group-header { margin-bottom: 10px; }
  .calculator-page .card-row {
    grid-auto-columns: minmax(0, 1fr);
    gap: 8px;
  }
  .calculator-page .card-slot {
    grid-template-rows: minmax(88px, 1fr) auto;
    gap: 6px;
  }
  .calculator-page .card-face { min-height: 108px; }
  .calculator-page .controls-panel {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    padding: 16px;
  }
  .calculator-page .calculate-button { grid-column: 1 / -1; }
}
@media (max-width: 767px) {
  .calculator-advanced-fields { grid-template-columns: 1fr; }
  .practice-felt .practice-seat { width: min(104px, 22%); height: 50px; min-height: 50px; padding: 5px 6px; font-size: .62rem; }
  .practice-felt .practice-seat.hero-station { height: 54px; min-height: 54px; }
  .practice-felt[data-seats="9"] .practice-seat,
  .practice-felt[data-seats="10"] .practice-seat,
  .practice-felt[data-seats="11"] .practice-seat,
  .practice-felt[data-seats="12"] .practice-seat { width: min(74px, 18%); min-height: 46px; padding: 4px; font-size: .55rem; }
  .practice-felt[data-seats="9"] .practice-seat .seat-cards,
  .practice-felt[data-seats="10"] .practice-seat .seat-cards,
  .practice-felt[data-seats="11"] .practice-seat .seat-cards,
  .practice-felt[data-seats="12"] .practice-seat .seat-cards { display: none; }
  .mobile-action-advice { display: grid; gap: 5px; margin: 0 0 8px; padding: 8px 10px; box-shadow: none; }
  .mobile-action-advice h2 { font-size: 1rem; }
  .mobile-action-advice details { padding-top: 4px; }
  .mobile-action-advice summary { display: flex; align-items: center; min-height: 44px; }
  .mobile-action-advice details p { margin: 4px 0 8px; }
  .coach-live-advice { display: none; }
  .multiplayer-felt { min-height: 270px; }
  .multiplayer-felt .table-player { width: min(96px, 21%); padding: 6px; font-size: .64rem; }
  .multiplayer-felt .table-player .player-host-actions,
  .multiplayer-felt .table-player button { display: none; }
  .multiplayer-felt[data-seat-cap="9"] .table-player,
  .multiplayer-felt[data-seat-cap="10"] .table-player,
  .multiplayer-felt[data-seat-cap="11"] .table-player,
  .multiplayer-felt[data-seat-cap="12"] .table-player { width: min(72px, 18%); min-height: 42px; padding: 4px; font-size: .58rem; }
  .multiplayer-felt[data-seat-cap="9"] .table-player:not(.mine):not(.active) > span,
  .multiplayer-felt[data-seat-cap="9"] .table-player:not(.mine):not(.active) > small,
  .multiplayer-felt[data-seat-cap="10"] .table-player:not(.mine):not(.active) > span,
  .multiplayer-felt[data-seat-cap="10"] .table-player:not(.mine):not(.active) > small,
  .multiplayer-felt[data-seat-cap="11"] .table-player:not(.mine):not(.active) > span,
  .multiplayer-felt[data-seat-cap="11"] .table-player:not(.mine):not(.active) > small,
  .multiplayer-felt[data-seat-cap="12"] .table-player:not(.mine):not(.active) > span,
  .multiplayer-felt[data-seat-cap="12"] .table-player:not(.mine):not(.active) > small { display: none; }
  .multiplayer-table-center { min-width: 140px; }
  .multiplayer-table-center .multiplayer-board { gap: 3px; }
  .multiplayer-table-center .multiplayer-board span { width: 30px; }
}
@media (max-width: 390px) {
  .practice-felt .practice-seat { width: min(76px, 20%); }
  .multiplayer-felt { min-height: 260px; }
}

/* Tablet seats keep the full player identity but collapse secondary HUD rows
   so the normalized ellipse remains collision-free at 768–1199px. */
@media (min-width: 768px) and (max-width: 1199px) and (min-height: 521px) {
  .practice-felt .practice-seat {
    height: 112px;
    min-height: 112px;
    overflow: hidden;
    padding: 8px;
  }
  .practice-felt .practice-seat .seat-cards {
    position: absolute;
    right: 6px;
    bottom: 5px;
    min-height: 0;
    margin: 0;
  }
  .practice-felt .practice-seat .seat-hud,
  .practice-felt .practice-seat .seat-flags { display: none; }
  .practice-felt .practice-seat > span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

/* Release-candidate corrections verified against the actual 12-seat table. */
.utility-dialog.setup-dialog { width: min(1120px, calc(100vw - 32px)); }
.setup-stepper { display: none; }
.mobile-step-actions { display: none; }
.opponent-seat-link {
  justify-content: space-between;
  width: 100%;
  background: transparent;
  text-align: left;
}
.opponent-seat-link.active { border-color: rgb(47 202 124 / 48%); background: rgb(47 202 124 / 14%); color: var(--text); }
.opponent-seat-link.has-error { border-color: rgb(239 68 68 / 55%); color: #ffb4b6; }
.opponent-seat-link small { color: inherit; font-size: .68rem; }
.controls-panel > .calculate-button { grid-column: 1 / -1; width: 100%; }

.practice-felt:is([data-seats="9"], [data-seats="10"], [data-seats="11"], [data-seats="12"]) .practice-seat {
  width: min(98px, 12.5%);
  height: auto;
  min-height: 64px;
  max-height: 76px;
  overflow: hidden;
  padding: 6px 7px;
  font-size: .64rem;
}
.practice-felt:is([data-seats="9"], [data-seats="10"], [data-seats="11"], [data-seats="12"]) .practice-seat:not(.hero-station) .seat-cards,
.practice-felt:is([data-seats="9"], [data-seats="10"], [data-seats="11"], [data-seats="12"]) .practice-seat .seat-hud,
.practice-felt:is([data-seats="9"], [data-seats="10"], [data-seats="11"], [data-seats="12"]) .practice-seat .seat-style-chip { display: none; }
.practice-felt:is([data-seats="9"], [data-seats="10"], [data-seats="11"], [data-seats="12"]) .practice-seat.hero-station {
  width: min(118px, 15%);
  min-height: 92px;
  max-height: 110px;
}
.practice-felt:is([data-seats="9"], [data-seats="10"], [data-seats="11"], [data-seats="12"]) .practice-seat.current-actor:not(.hero-station) {
  width: min(104px, 13.5%);
  min-height: 72px;
  max-height: 84px;
}
.multiplayer-felt:is([data-seat-cap="9"], [data-seat-cap="10"], [data-seat-cap="11"], [data-seat-cap="12"]) .table-player {
  width: min(98px, 12.5%);
  min-height: 62px;
  max-height: 78px;
  overflow: hidden;
  padding: 7px;
  font-size: .68rem;
}

@media (max-width: 767px) {
  .utility-dialog.setup-dialog { width: calc(100vw - 16px); max-height: calc(100dvh - 16px); padding: 16px; }
  .setup-stepper { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; margin: 12px 0; }
  .setup-step-button { display: grid; place-items: center; gap: 2px; min-height: 52px; padding: 4px; border: 1px solid var(--border-soft); border-radius: 8px; background: transparent; color: var(--muted); font-size: .68rem; font-weight: 800; }
  .setup-step-button span { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--surface-raised); }
  .setup-step-button.active { border-color: rgb(47 202 124 / 45%); background: rgb(47 202 124 / 12%); color: var(--green); }
  .setup-groups { display: block; margin-top: 8px; }
  .setup-step:not(.setup-step-active) { display: none; }
  .desktop-dialog-actions { display: none; }
  .mobile-step-actions { display: flex; }
  .opponent-editor.setup-step-active { display: grid; }
  .opponent-seat-list { grid-template-columns: repeat(2, minmax(0, 1fr)); max-height: 190px; overflow: auto; }
  .opponent-seat-list .section-label { grid-column: 1 / -1; }
  .opponent-seat-link { min-height: 44px; padding: 5px 7px; font-size: .7rem; }

  .practice-felt:is([data-seats="9"], [data-seats="10"], [data-seats="11"], [data-seats="12"]) .practice-seat:not(.hero-station):not(.current-actor) {
    width: 44px;
    height: 32px;
    min-height: 32px;
    padding: 3px 4px;
    font-size: .52rem;
  }
  .practice-felt:is([data-seats="9"], [data-seats="10"], [data-seats="11"], [data-seats="12"]) .practice-seat:not(.hero-station):not(.current-actor) .seat-heading > div,
  .practice-felt:is([data-seats="9"], [data-seats="10"], [data-seats="11"], [data-seats="12"]) .practice-seat:not(.hero-station):not(.current-actor) > small,
  .practice-felt:is([data-seats="9"], [data-seats="10"], [data-seats="11"], [data-seats="12"]) .practice-seat:not(.hero-station):not(.current-actor) > span,
  .practice-felt:is([data-seats="9"], [data-seats="10"], [data-seats="11"], [data-seats="12"]) .practice-seat:not(.hero-station):not(.current-actor) .seat-cards,
  .practice-felt:is([data-seats="9"], [data-seats="10"], [data-seats="11"], [data-seats="12"]) .practice-seat:not(.hero-station):not(.current-actor) .seat-flags,
  .practice-felt:is([data-seats="9"], [data-seats="10"], [data-seats="11"], [data-seats="12"]) .practice-seat:not(.hero-station):not(.current-actor) .seat-bet { display: none; }
  .practice-felt:is([data-seats="9"], [data-seats="10"], [data-seats="11"], [data-seats="12"]) .practice-seat:not(.hero-station):not(.current-actor) .seat-heading,
  .practice-felt:is([data-seats="9"], [data-seats="10"], [data-seats="11"], [data-seats="12"]) .practice-seat:not(.hero-station):not(.current-actor) .seat-name-line { display: block; min-width: 0; }
  .practice-felt:is([data-seats="9"], [data-seats="10"], [data-seats="11"], [data-seats="12"]) .practice-seat:not(.hero-station):not(.current-actor) .seat-name-line strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .practice-felt:is([data-seats="9"], [data-seats="10"], [data-seats="11"], [data-seats="12"]) .practice-seat.hero-station {
    width: 64px;
    height: 50px;
    min-height: 50px;
    padding: 4px;
  }
  .practice-felt:is([data-seats="9"], [data-seats="10"], [data-seats="11"], [data-seats="12"]) .practice-seat.hero-station .seat-cards { display: flex; }
  .practice-felt:is([data-seats="9"], [data-seats="10"], [data-seats="11"], [data-seats="12"]) .practice-seat.current-actor:not(.hero-station) {
    width: 60px;
    min-height: 44px;
    max-height: 52px;
    padding: 4px;
    font-size: .56rem;
  }

  .multiplayer-felt:is([data-seat-cap="9"], [data-seat-cap="10"], [data-seat-cap="11"], [data-seat-cap="12"]) .table-player:not(.mine):not(.active) {
    display: grid;
    place-items: center;
    width: 44px;
    height: 32px;
    min-height: 32px;
    padding: 3px 4px;
    font-size: .54rem;
  }
  .multiplayer-felt:is([data-seat-cap="9"], [data-seat-cap="10"], [data-seat-cap="11"], [data-seat-cap="12"]) .table-player:not(.mine):not(.active) > strong { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .multiplayer-felt:is([data-seat-cap="9"], [data-seat-cap="10"], [data-seat-cap="11"], [data-seat-cap="12"]) .table-player.table-seat-empty > span { display: block !important; }
  .multiplayer-felt:is([data-seat-cap="9"], [data-seat-cap="10"], [data-seat-cap="11"], [data-seat-cap="12"]) .table-player.mine,
  .multiplayer-felt:is([data-seat-cap="9"], [data-seat-cap="10"], [data-seat-cap="11"], [data-seat-cap="12"]) .table-player.active {
    width: 62px;
    min-height: 46px;
    max-height: 56px;
    padding: 4px;
  }
}

@media (min-width: 768px) and (max-width: 1199px) {
  .practice-felt:is([data-seats="9"], [data-seats="10"], [data-seats="11"], [data-seats="12"]) .practice-seat:not(.hero-station) {
    width: min(82px, 13%);
    height: 54px;
    min-height: 54px;
    max-height: 54px;
    overflow: hidden;
    gap: 2px;
    padding: 5px;
    font-size: .62rem;
  }
  .practice-felt:is([data-seats="9"], [data-seats="10"], [data-seats="11"], [data-seats="12"]) .practice-seat:not(.hero-station) > small,
  .practice-felt:is([data-seats="9"], [data-seats="10"], [data-seats="11"], [data-seats="12"]) .practice-seat:not(.hero-station) .seat-flags,
  .practice-felt:is([data-seats="9"], [data-seats="10"], [data-seats="11"], [data-seats="12"]) .practice-seat:not(.hero-station) .seat-bet { display: none; }
  .multiplayer-felt:is([data-seat-cap="9"], [data-seat-cap="10"], [data-seat-cap="11"], [data-seat-cap="12"]) .table-player {
    width: min(82px, 13%);
    height: 54px;
    min-height: 54px;
    max-height: 54px;
    overflow: hidden;
    gap: 2px;
    padding: 5px;
    font-size: .62rem;
  }
  .multiplayer-felt:is([data-seat-cap="9"], [data-seat-cap="10"], [data-seat-cap="11"], [data-seat-cap="12"]) .table-player > small { display: none; }
  .multiplayer-felt:is([data-seat-cap="9"], [data-seat-cap="10"], [data-seat-cap="11"], [data-seat-cap="12"]) .table-player > strong,
  .multiplayer-felt:is([data-seat-cap="9"], [data-seat-cap="10"], [data-seat-cap="11"], [data-seat-cap="12"]) .table-player > span {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

@media (min-width: 768px) and (max-width: 1199px) and (max-height: 520px) and (orientation: landscape) {
  .practice-felt:is([data-seats="9"], [data-seats="10"], [data-seats="11"], [data-seats="12"]) .practice-seat:not(.hero-station) {
    width: min(72px, 12%);
    height: 40px;
    min-height: 40px;
    max-height: 40px;
    padding: 3px 4px;
    font-size: .56rem;
  }
}


/* Table-wide AI presets in setup dialog */
.table-preset-buttons { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.table-preset-buttons .secondary-button { min-height: 40px; font-size: .84rem; padding-inline: 12px; }

/* Seat Inspector Popover / Dialog */
.practice-seat, .table-player { cursor: pointer; transition: border-color .15s ease, transform .15s ease; }
.practice-seat:hover:not(.empty), .table-player:hover:not(.table-seat-empty) { border-color: var(--blue); }
.seat-inspector-dialog { width: min(440px, 94vw); padding: 18px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-raised); box-shadow: 0 20px 50px rgb(0 0 0 / 60%); }
.seat-inspector-body { display: grid; gap: 12px; margin-top: 12px; }
.inspector-hud-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; padding: 10px 8px; border-radius: 8px; background: var(--bg-deep); border: 1px solid var(--border-soft); text-align: center; }
.inspector-hud-stats .hud-stat { display: grid; gap: 2px; font-size: .88rem; font-weight: 800; }
.inspector-hud-stats .hud-stat b { color: var(--muted); font-size: .7rem; }
.inspector-range { display: grid; gap: 4px; padding: 10px; border-radius: 8px; background: var(--bg-deep); border: 1px solid var(--border-soft); }
.inspector-range code { font-size: .78rem; word-break: break-all; color: var(--green); }

/* Multiplayer Pre-Action Controls */
.pre-action-dock { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; border-radius: 8px; background: rgb(0 0 0 / 30%); border: 1px solid var(--border-soft); }
.pre-action-title { font-size: .8rem; color: var(--muted); font-weight: 750; }
.pre-action-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.pre-action-pill { min-height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--muted); font-size: .82rem; font-weight: 750; cursor: pointer; transition: all .15s ease; }
.pre-action-pill:hover { border-color: var(--blue); color: var(--text); }
.pre-action-pill.active { border-color: var(--green); background: rgb(47 202 124 / 15%); color: var(--green); box-shadow: 0 0 10px rgb(47 202 124 / 20%); }

/* Replay Play/Pause Button */
.replay-play-button { min-width: 100px; font-weight: 800; }


/* ==========================================================================
   12 大通用基础与业务前端组件样式规范 (Slate & Emerald Dark Theme)
   ========================================================================== */

/* 1. 按钮 (UiButton) */
.ui-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--control-height, 44px);
  padding: 0 18px;
  border-radius: var(--radius, 10px);
  font-weight: 750;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.16s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
  position: relative;
}
.ui-button:active:not(:disabled) { transform: scale(0.98); }
.ui-button.is-loading { cursor: wait; opacity: 0.82; }
.ui-button .ui-icon { width: 18px; height: 18px; }

/* 2. 加载中与骨架屏 (UiSpinner, UiSkeleton) */
.ui-spinner {
  display: inline-block;
  border-radius: 50%;
  border: 2px solid rgb(255 255 255 / 20%);
  border-top-color: currentColor;
  animation: ui-spin 0.75s linear infinite;
}
.spinner-sm { width: 16px; height: 16px; border-width: 2px; }
.spinner-md { width: 24px; height: 24px; border-width: 2.5px; }
.spinner-lg { width: 36px; height: 36px; border-width: 3px; }
@keyframes ui-spin { to { transform: rotate(360deg); } }

.ui-skeleton {
  display: block;
  width: 100%;
  height: 20px;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--surface) 25%, var(--surface-soft) 50%, var(--surface) 75%);
  background-size: 200% 100%;
  animation: ui-shimmer 1.5s infinite;
}
@keyframes ui-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* 3. 表单项包装 (UiFormField) */
.ui-form-field {
  display: grid;
  gap: 6px;
  width: 100%;
}
.ui-field-label {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text);
}
.ui-field-label .required-mark { color: var(--red); font-weight: 900; }
.ui-form-field.has-error .ui-input-wrap,
.ui-form-field.has-error .ui-select-wrap { border-color: var(--red); }
.ui-form-field .field-error { color: var(--red); font-size: 0.76rem; font-weight: 600; }
.ui-form-field .field-helper { font-size: 0.76rem; color: var(--muted); }

/* 4. 输入框 (UiInput) */
.ui-input-wrap {
  display: flex;
  align-items: center;
  min-height: var(--control-height, 44px);
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius, 10px);
  background: var(--surface);
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}
.ui-input-wrap:focus-within {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 25%, transparent);
}
.ui-input-prefix, .ui-input-suffix {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
  user-select: none;
}
.ui-input-inner {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 0.95rem;
  padding: 0 6px;
  outline: none;
}
.ui-input-inner::placeholder { color: var(--muted); opacity: 0.6; }

/* 5. 下拉选择器 (UiSelect) */
.ui-select-wrap {
  position: relative;
  display: flex;
  align-items: center;
  min-height: var(--control-height, 44px);
  border: 1px solid var(--border);
  border-radius: var(--radius, 10px);
  background: var(--surface);
  transition: border-color 0.16s ease;
}
.ui-select-wrap:focus-within {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 25%, transparent);
}
.ui-select-inner {
  width: 100%;
  min-height: 42px;
  padding: 0 36px 0 12px;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 0.92rem;
  cursor: pointer;
  outline: none;
  appearance: none;
}
.ui-select-chevron {
  position: absolute;
  right: 12px;
  color: var(--muted);
  pointer-events: none;
  font-size: 0.8rem;
}

/* 6. 开关 (UiSwitch) */
.ui-switch-wrap {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}
.ui-switch-wrap.disabled { cursor: not-allowed; opacity: 0.5; }
.ui-switch-toggle {
  position: relative;
  width: 46px;
  min-height: 26px;
  height: 26px;
  padding: 2px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-soft);
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}
.ui-switch-toggle.checked {
  background: var(--green);
  border-color: var(--green-deep);
}
.ui-switch-thumb {
  display: block;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 2px 5px rgb(0 0 0 / 30%);
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.ui-switch-toggle.checked .ui-switch-thumb {
  transform: translateX(20px);
}
.ui-switch-label { font-size: 0.88rem; font-weight: 700; color: var(--text); }

/* 7. 复选框与单选框 (UiCheckbox, UiRadio) */
.ui-checkbox-wrap, .ui-radio-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}
.ui-checkbox-box {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  min-height: 22px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--surface);
  cursor: pointer;
  transition: all 0.16s ease;
}
.ui-checkbox-box.checked {
  background: var(--green);
  border-color: var(--green);
  color: #080a0f;
}
.ui-check-icon { font-size: 0.85rem; font-weight: 900; line-height: 1; }
.ui-checkbox-label, .ui-radio-label { font-size: 0.88rem; font-weight: 650; color: var(--text); }

.ui-radio-circle {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--surface);
  transition: all 0.16s ease;
}
.ui-radio-circle.checked {
  border-color: var(--green);
}
.ui-radio-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green);
  transform: scale(0);
  transition: transform 0.16s ease;
}
.ui-radio-circle.checked .ui-radio-dot {
  transform: scale(1);
}

/* 8. 标签页 (UiTabs) */
.ui-tabs-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-radius: 10px;
  background: var(--surface-soft);
  border: 1px solid var(--border-soft);
  overflow-x: auto;
  scrollbar-width: none;
}
.ui-tab-item {
  flex: 1 1 auto;
  min-height: 38px;
  padding: 0 16px;
  border-radius: 7px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-weight: 750;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.16s ease;
  white-space: nowrap;
}
.ui-tab-item:hover { color: var(--text); background: rgb(255 255 255 / 4%); }
.ui-tab-item.active {
  background: var(--surface-raised);
  color: var(--green);
  box-shadow: 0 2px 8px rgb(0 0 0 / 25%);
}

/* 9. 通知 / 提示条 (UiAlert) */
.ui-alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: var(--surface-raised);
  margin: 10px 0;
}
.ui-alert-icon {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-weight: 900;
  font-size: 0.82rem;
  flex-shrink: 0;
}
.alert-info { border-color: rgb(77 141 255 / 30%); background: rgb(77 141 255 / 8%); }
.alert-info .ui-alert-icon { background: rgb(77 141 255 / 20%); color: var(--blue); }
.alert-success { border-color: rgb(47 202 124 / 35%); background: rgb(47 202 124 / 8%); }
.alert-success .ui-alert-icon { background: rgb(47 202 124 / 20%); color: var(--green); }
.alert-warning { border-color: rgb(245 197 66 / 35%); background: rgb(245 197 66 / 8%); }
.alert-warning .ui-alert-icon { background: rgb(245 197 66 / 20%); color: var(--yellow); }
.alert-error { border-color: rgb(255 92 87 / 35%); background: rgb(255 92 87 / 8%); }
.alert-error .ui-alert-icon { background: rgb(255 92 87 / 20%); color: var(--red); }
.ui-alert-content { flex: 1 1 auto; min-width: 0; font-size: 0.88rem; line-height: 1.4; }
.ui-alert-title { display: block; margin-bottom: 2px; font-weight: 800; }
.ui-alert-message { margin: 0; color: var(--text); }
.ui-alert-close {
  background: transparent;
  border: 0;
  color: var(--muted);
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}
.ui-alert-close:hover { color: var(--text); }

/* 10. 分页器 (UiPagination) */
.ui-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 16px 0;
  margin-top: 12px;
}
.ui-pagination .page-btn { min-height: 38px; padding: 0 16px; font-size: 0.84rem; }
.pagination-indicator { font-size: 0.86rem; font-weight: 750; color: var(--muted); font-variant-numeric: tabular-nums; }

/* 11. 时间范围筛选器 (UiDateFilter) */
.ui-date-filter {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 8px 0;
}
.ui-date-filter .date-filter-label { font-size: 0.82rem; font-weight: 700; }
.date-filter-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.date-filter-pill {
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}
.date-filter-pill:hover { border-color: var(--border); color: var(--text); }
.date-filter-pill.active {
  background: rgb(47 202 124 / 14%);
  border-color: var(--green);
  color: var(--green);
}

/* 12. 表格 (UiTable) */
.ui-table-container {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius, 10px);
  background: var(--surface);
}
.ui-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  text-align: left;
}
.ui-table th {
  padding: 12px 14px;
  font-weight: 800;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  background: var(--surface-raised);
}
.ui-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-soft);
  color: var(--text);
}
.ui-table tr:last-child td { border-bottom: 0; }
.ui-table.table-striped tr:nth-child(even) td {
  background: rgb(255 255 255 / 2%);
}
.ui-table.table-hover tr:hover td {
  background: rgb(255 255 255 / 4%);
}

/* 模态框扩展 (UiModal) */
.ui-modal {
  width: min(560px, 94vw);
  border-radius: 12px;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  box-shadow: 0 24px 60px rgb(0 0 0 / 60%);
}
.ui-modal-body { padding: 18px 24px; }


/* ==========================================================================
   扑克高阶术语释义悬浮提示 (Mobile-friendly Terminology Popover & Tips)
   ========================================================================== */
.poker-term-tip {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: transparent;
  border: 0;
  padding: 0;
  color: inherit;
  font: inherit;
  cursor: pointer;
  border-bottom: 1px dashed color-mix(in srgb, currentColor 55%, transparent);
  transition: all 0.15s ease;
  line-height: inherit;
}
.poker-term-tip:hover, .poker-term-tip:active {
  color: var(--green);
  border-bottom-color: var(--green);
}
.term-tip-indicator {
  display: inline-grid;
  place-items: center;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: rgb(255 255 255 / 10%);
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 800;
  margin-left: 2px;
}
.poker-term-tip:hover .term-tip-indicator {
  background: var(--green);
  color: #080a0f;
}

/* Mobile-friendly Popover Card */
.term-popover-backdrop {
  z-index: 100;
  align-items: flex-end;
  padding-bottom: calc(16px + env(safe-area-inset-bottom));
}
.term-popover-card {
  width: min(480px, 94vw);
  margin: 0 auto;
  padding: 20px;
  border-radius: 16px;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  box-shadow: 0 20px 60px rgb(0 0 0 / 70%), 0 0 0 1px rgb(255 255 255 / 8%);
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: popover-slide-up 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes popover-slide-up {
  from { opacity: 0; transform: translateY(18px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.term-popover-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.term-acronym {
  display: inline-block;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  margin-bottom: 2px;
}
.term-popover-header h3 {
  margin: 0;
  font-size: 1.15rem;
  color: var(--text);
}
.term-close-btn {
  width: 32px;
  min-height: 32px;
  height: 32px;
  padding: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgb(255 255 255 / 6%);
  border: 0;
  color: var(--muted);
  cursor: pointer;
}
.term-explanation {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--text);
}
.term-dismiss-btn {
  width: 100%;
  min-height: 44px;
  margin-top: 4px;
  font-weight: 800;
}

/* ==========================================================================
   摊牌结算高亮 (Showdown Winner Card Highlight & Dimming)
   ========================================================================== */
.practice-card.winning-card,
.multiplayer-card.winning-card {
  box-shadow: 0 0 0 2px #ffd700, 0 0 18px rgb(255 215 0 / 75%), 0 4px 10px rgb(0 0 0 / 45%) !important;
  transform: translateY(-4px) scale(1.08) !important;
  z-index: 10;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.practice-card.dimmed-card,
.multiplayer-card.dimmed-card {
  opacity: 0.36 !important;
  filter: grayscale(0.7);
  transform: scale(0.95);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

/* Winner Seat Pulsing Glow on Mobile/Desktop */
.practice-seat.settlement-winner,
.table-player.settlement-winner {
  border-color: #ffd97a !important;
  animation: winner-seat-glow 1.6s ease-in-out infinite alternate !important;
  z-index: 8;
}
@keyframes winner-seat-glow {
  from {
    box-shadow: 0 0 0 2px rgb(255 217 122 / 50%), 0 0 16px rgb(255 201 52 / 40%);
  }
  to {
    box-shadow: 0 0 0 3px rgb(47 202 124 / 85%), 0 0 32px rgb(47 202 124 / 70%);
  }
}
