:root {
  color-scheme: dark;
  --canvas: #07111F;
  --panel: #0C1B2D;
  --panel-raised: #10243A;
  --felt: #09283A;
  --accent: #39E6FF;
  --text: #EAF6FF;
  --fold: #C65C6B;
  --warning: #F3BD54;
  --muted: #86A0B7;
  --line: #1D3A50;
  --success: #61E7AA;
  --shadow: 0 20px 60px rgb(0 0 0 / 35%);
  --mono: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --sans: "Microsoft YaHei UI", "PingFang SC", "Noto Sans CJK SC", system-ui, sans-serif;
  --mobile-action-height: 286px;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--canvas);
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 48% -10%, rgb(57 230 255 / 9%), transparent 32rem),
    linear-gradient(180deg, #081725 0%, var(--canvas) 55%);
  color: var(--text);
  font-family: var(--sans);
  font-size: 14px;
}

button,
input,
select {
  color: inherit;
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled,
input:disabled,
select:disabled {
  cursor: not-allowed;
  opacity: .45;
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

.skip-link {
  position: fixed;
  z-index: 100;
  inset: 10px auto auto 10px;
  translate: 0 -160%;
  border-radius: 6px;
  background: var(--accent);
  color: var(--canvas);
  padding: 10px 14px;
  font-weight: 800;
}

.skip-link:focus {
  translate: 0;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
}

.app-shell {
  width: min(100%, 1560px);
  margin-inline: auto;
  padding: 0 24px 28px;
}

.tournament-hud {
  min-height: 82px;
  display: grid;
  grid-template-columns: minmax(210px, 1fr) auto minmax(210px, 1fr);
  align-items: center;
  gap: 24px;
  border-bottom: 1px solid var(--line);
}

.brand-lockup,
.hud-actions,
.hud-metrics,
.broadcast-status,
.turn-callout,
.primary-actions,
.raise-preset-group,
.section-heading,
.drawer-heading,
.drawer-actions {
  display: flex;
  align-items: center;
}

.brand-lockup {
  gap: 12px;
}

.brand-mark {
  width: 38px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 1px solid rgb(57 230 255 / 50%);
  border-radius: 50%;
  background: rgb(57 230 255 / 8%);
  color: var(--accent);
  font: 800 12px/1 var(--mono);
  box-shadow: 0 0 24px rgb(57 230 255 / 12%);
}

.brand-lockup strong,
.brand-lockup span,
.hud-metrics dt,
.hud-metrics dd {
  display: block;
}

.brand-lockup strong {
  letter-spacing: .17em;
  font-size: 13px;
}

.brand-lockup div > span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.hud-metrics {
  justify-content: center;
  gap: clamp(18px, 4vw, 54px);
  margin: 0;
}

.hud-metrics div {
  min-width: 80px;
  text-align: center;
}

.hud-metrics dt {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: .12em;
}

.hud-metrics dd {
  margin: 0;
  font: 700 14px/1.2 var(--mono);
  font-variant-numeric: tabular-nums;
}

.hud-actions {
  justify-content: flex-end;
  gap: 8px;
}

.button,
.icon-button,
.tab,
.live-drawer-toggle,
.action-button,
.raise-preset-button {
  border: 0;
}

.button {
  min-height: 40px;
  border-radius: 8px;
  padding: 9px 15px;
  font-weight: 800;
}

.button--quiet {
  border: 1px solid var(--line);
  background: rgb(16 36 58 / 72%);
}

.button--primary {
  background: var(--accent);
  color: #04121C;
  box-shadow: 0 8px 24px rgb(57 230 255 / 14%);
}

.console-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 18px;
  margin-top: 18px;
}

.table-column,
.live-panel,
.action-bar {
  border: 1px solid var(--line);
  background: rgb(12 27 45 / 92%);
  box-shadow: var(--shadow);
}

.table-column {
  min-width: 0;
  border-radius: 14px;
  padding: 14px;
}

.broadcast-strip {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 4px 12px;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--accent);
  font: 800 10px/1.2 var(--mono);
  letter-spacing: .18em;
}

.broadcast-strip h1,
.panel-section h2,
.turn-callout h2,
.drawer-heading h2,
.settlement-card h2 {
  margin: 0;
}

.broadcast-strip h1 {
  font-size: 18px;
}

.broadcast-status {
  justify-content: flex-end;
  gap: 9px;
  color: var(--muted);
  font-size: 11px;
}

.broadcast-status strong {
  color: var(--text);
}

.live-dot,
.turn-pulse {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px rgb(57 230 255 / 70%);
}

.poker-table {
  position: relative;
  min-height: 540px;
  overflow: visible;
  isolation: isolate;
  border: 12px solid #10283B;
  border-radius: 48% / 50%;
  background:
    radial-gradient(ellipse at center, rgb(57 230 255 / 7%), transparent 52%),
    linear-gradient(150deg, #0B3144, var(--felt));
  box-shadow:
    inset 0 0 0 2px rgb(57 230 255 / 18%),
    inset 0 0 70px rgb(0 0 0 / 35%),
    0 18px 34px rgb(0 0 0 / 30%);
}

.felt-rim {
  position: absolute;
  z-index: -1;
  inset: 18px;
  border: 1px solid rgb(57 230 255 / 25%);
  border-radius: inherit;
}

.felt-rim::before,
.felt-rim::after {
  content: "";
  position: absolute;
  inset: 50% auto auto 50%;
  width: 34%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgb(57 230 255 / 14%), transparent);
  transform: translate(-50%, -50%);
}

.felt-rim::after {
  width: 1px;
  height: 36%;
  background: linear-gradient(180deg, transparent, rgb(57 230 255 / 11%), transparent);
}

.seat-layer {
  position: absolute;
  inset: 0;
  z-index: 6;
  margin: 0;
  padding: 0;
  list-style: none;
}

.seat {
  position: absolute;
  left: calc(var(--seat-x) * 1%);
  top: calc(var(--seat-y) * 1%);
  width: clamp(114px, 14vw, 164px);
  transform: translate(-50%, -50%);
  text-align: center;
}

.seat-hole-cards {
  height: 42px;
  display: flex;
  justify-content: center;
  gap: 3px;
  margin-bottom: -5px;
}

.seat-hole-cards .card {
  width: 30px;
  height: 42px;
  font-size: 9px;
}

.seat-card {
  position: relative;
  z-index: 1;
  min-height: 58px;
  border: 1px solid #31516A;
  border-radius: 9px;
  background: rgb(7 17 31 / 94%);
  box-shadow: 0 8px 20px rgb(0 0 0 / 24%);
  padding: 7px 9px;
  transition: border-color 160ms ease, box-shadow 160ms ease, opacity 160ms ease, scale 160ms ease;
}

.seat-topline,
.seat-bottomline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.seat-name {
  max-width: 95px;
  overflow: hidden;
  font-size: 11px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.seat-role {
  min-height: 15px;
  border-radius: 999px;
  background: var(--panel-raised);
  color: var(--accent);
  padding: 2px 5px;
  font: 800 8px/1.3 var(--mono);
}

.seat-stack,
.seat-commit,
.pot-split output,
.effective-stack output,
.table-pot-structure output,
.stats-grid strong {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}

.seat-stack {
  margin-top: 5px;
  font-size: 13px;
  font-weight: 800;
}

.seat-commit {
  color: var(--warning);
  font-size: 9px;
}

.seat-state {
  color: var(--muted);
  font-size: 9px;
}

.seat[data-state="acting"] .seat-card {
  border-color: var(--warning);
  box-shadow: 0 0 0 2px rgb(243 189 84 / 18%), 0 0 26px rgb(243 189 84 / 24%);
  animation: active-seat 1.8s ease-in-out infinite;
}

.seat[data-state="folded"] {
  filter: none;
}

.seat[data-state="folded"] .seat-card {
  border-style: dashed;
  border-color: rgb(134 160 183 / 45%);
  opacity: .22;
  filter: grayscale(1);
  scale: .96;
}

.seat[data-state="folded"] .seat-hole-cards {
  visibility: hidden;
}

.seat-fold-ribbon {
  position: absolute;
  z-index: 5;
  inset: auto 50% 16px auto;
  min-width: 58px;
  border: 1px solid rgb(198 92 107 / 75%);
  border-radius: 4px;
  background: rgb(71 19 31 / 94%);
  color: #FFD7DD;
  padding: 4px 7px;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .08em;
  transform: translateX(50%) rotate(-4deg);
  box-shadow: 0 6px 14px rgb(0 0 0 / 35%);
}

.seat[data-state="all-in"] .seat-card {
  border-color: var(--warning);
}

.seat[data-state="all-in"] .seat-state,
.seat[data-state="winner"] .seat-state {
  color: var(--warning);
}

.seat[data-state="eliminated"] {
  opacity: .28;
  filter: saturate(.25);
}

.seat[data-state="winner"] .seat-card {
  border-color: var(--success);
  box-shadow: 0 0 26px rgb(97 231 170 / 25%);
}

.seat-action-badge {
  position: absolute;
  z-index: 7;
  left: 50%;
  top: calc(100% + 8px);
  bottom: auto;
  min-width: max-content;
  max-width: 180px;
  border: 1px solid #E2B65B;
  border-radius: 7px;
  background: linear-gradient(135deg, #4B3415, #2A2115);
  color: #FFF1C4;
  padding: 7px 10px;
  font: 900 11px/1.2 var(--mono);
  box-shadow: 0 7px 20px rgb(0 0 0 / 42%), 0 0 18px rgb(243 189 84 / 18%);
  transform: translateX(-50%);
  animation: action-badge-in 180ms ease-out both;
}

.seat[data-position="0"] .seat-action-badge {
  top: auto;
  bottom: calc(100% + 42px);
}

.seat-action-badge[data-kind="fold"] {
  border-color: var(--fold);
  background: #3D1C28;
  color: #FFD7DD;
}

.table-center {
  position: absolute;
  z-index: 2;
  inset: 50% auto auto 50%;
  width: min(60%, 520px);
  transform: translate(-50%, -50%);
  text-align: center;
}

.pot-split {
  display: inline-grid;
  grid-template-columns: repeat(3, auto);
  align-items: stretch;
  border: 1px solid rgb(57 230 255 / 18%);
  border-radius: 10px;
  background: rgb(7 17 31 / 72%);
  overflow: hidden;
  animation: chip-arrive 260ms ease-out;
}

.pot-split > div {
  min-width: 76px;
  display: grid;
  gap: 3px;
  padding: 7px 12px;
}

.pot-split > div + div {
  border-left: 1px solid rgb(57 230 255 / 14%);
}

.pot-split span {
  color: var(--muted);
  font-size: 9px;
  letter-spacing: .12em;
}

.pot-split output {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  color: var(--warning);
  font-size: 16px;
  font-weight: 900;
}

.pot-split .pot-total output {
  color: var(--text);
}

.table-pot-structure {
  min-height: 22px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
  margin: 7px 0 0;
  padding: 0;
  list-style: none;
}

.table-pot-structure li {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  border: 1px solid rgb(226 182 91 / 22%);
  border-radius: 999px;
  background: rgb(42 33 21 / 55%);
  color: #C7B98F;
  padding: 3px 7px;
  font-size: 8px;
}

.table-pot-structure output {
  color: #FFF1C4;
  font: 800 9px/1 var(--mono);
}

.table-pot-structure .empty-pot {
  border-color: transparent;
  background: transparent;
  color: var(--muted);
}

.community-cards {
  min-height: 72px;
  display: flex;
  justify-content: center;
  gap: clamp(3px, .7vw, 8px);
  margin-top: 8px;
}

.card {
  position: relative;
  width: clamp(34px, 4.4vw, 48px);
  height: clamp(48px, 6.2vw, 68px);
  display: block;
  overflow: hidden;
  border: 1px solid #D5B66F;
  border-radius: 7px;
  background:
    radial-gradient(circle at 25% 15%, rgb(255 255 255 / 68%), transparent 28%),
    linear-gradient(145deg, #FFF9E9, #E8DCBF);
  color: #201A13;
  font: 900 13px/1 var(--mono);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 40%), 0 8px 16px rgb(0 0 0 / 30%);
  animation: deal-card 240ms cubic-bezier(.2, .8, .2, 1) both;
}

.card-corner {
  position: absolute;
  left: 4px;
  top: 4px;
  display: grid;
  justify-items: center;
  line-height: .86;
}

.card-corner small {
  margin-top: 3px;
  font-size: .72em;
}

.card-corner--bottom {
  inset: auto 4px 4px auto;
  transform: rotate(180deg);
}

.card-center-suit {
  position: absolute;
  inset: 50% auto auto 50%;
  font-size: 1.65em;
  transform: translate(-50%, -50%);
}

.card--red {
  color: #B43F50;
}

.card--back {
  border: 2px solid #D5B66F;
  background:
    linear-gradient(45deg, rgb(226 182 91 / 24%) 25%, transparent 25% 75%, rgb(226 182 91 / 24%) 75%),
    linear-gradient(-45deg, rgb(226 182 91 / 18%) 25%, transparent 25% 75%, rgb(226 182 91 / 18%) 75%),
    #3A1723;
  background-size: 8px 8px;
  color: transparent;
}

.card--empty {
  border: 1px dashed rgb(134 160 183 / 25%);
  background: rgb(7 17 31 / 16%);
  box-shadow: none;
  animation: none;
}

.street-badge {
  display: inline-block;
  margin: 9px 0 0;
  border-radius: 4px;
  background: rgb(57 230 255 / 10%);
  color: var(--accent);
  padding: 4px 8px;
  font: 800 9px/1.2 var(--mono);
  letter-spacing: .1em;
}

.live-panel {
  min-width: 0;
  overflow: hidden;
  border-radius: 14px;
}

.live-drawer-toggle {
  width: 100%;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: transparent;
  padding: 0 16px;
  font-weight: 800;
}

.live-drawer-toggle:disabled {
  cursor: default;
  opacity: 1;
}

.live-drawer-toggle span:last-child {
  display: none;
}

.tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-block: 1px solid var(--line);
}

.tab {
  min-height: 45px;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.tab[aria-selected="true"] {
  border-bottom-color: var(--accent);
  color: var(--accent);
  background: rgb(57 230 255 / 5%);
}

.tab-panel {
  min-height: 475px;
}

.panel-section {
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.panel-section h2 {
  font-size: 12px;
}

.section-heading {
  justify-content: space-between;
  gap: 10px;
}

.section-heading span {
  color: var(--muted);
  font-size: 10px;
}

.panel-section--overview {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 16px;
}

.action-feed,
.history-list {
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.panel-section--overview > div:first-child span,
.panel-section--overview > div:first-child strong {
  display: block;
}

.panel-section--overview > div:first-child span {
  color: var(--muted);
  font-size: 9px;
}

.panel-section--overview > div:first-child strong {
  margin-top: 7px;
  font-size: 12px;
}

.effective-stack {
  min-width: 90px;
  border-left: 1px solid var(--line);
  padding-left: 14px;
  text-align: right;
}

.effective-stack span {
  display: block;
  color: var(--muted);
  font-size: 9px;
}

.effective-stack output {
  display: block;
  margin-top: 7px;
  color: var(--accent);
  font-size: 18px;
  font-weight: 900;
}

.action-feed li,
.history-list li {
  border-top: 1px solid rgb(29 58 80 / 72%);
  color: #C7D9E8;
  padding: 8px 0;
  font-size: 10px;
  line-height: 1.4;
}

.empty-state {
  border: 1px dashed var(--line) !important;
  border-radius: 8px;
  color: var(--muted) !important;
  padding: 20px 10px !important;
  text-align: center;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  margin: 16px;
  background: var(--line);
  border: 1px solid var(--line);
}

.stats-grid div {
  min-width: 0;
  background: var(--panel);
  padding: 14px;
}

.stats-grid span,
.stats-grid strong {
  display: block;
}

.stats-grid span {
  color: var(--muted);
  font-size: 9px;
}

.stats-grid strong {
  margin-top: 5px;
  font-size: 18px;
}

.panel-note {
  color: var(--muted);
  padding: 0 16px;
  font-size: 10px;
  line-height: 1.6;
}

.history-list {
  margin: 16px;
}

.history-list strong,
.history-list span {
  display: block;
}

.history-list span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.action-bar {
  min-height: 132px;
  display: grid;
  grid-template-columns: minmax(130px, .7fr) minmax(360px, 2fr) minmax(110px, auto) auto;
  align-items: center;
  gap: 14px;
  margin-top: 16px;
  border-radius: 14px;
  padding: 12px 14px;
}

.turn-callout {
  min-width: 0;
  gap: 10px;
}

.turn-callout h2 {
  font-size: 12px;
}

.turn-callout p {
  margin: 4px 0 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.raise-preset-group,
.primary-actions {
  gap: 6px;
}

.raise-selector {
  min-width: 0;
}

.raise-selector__heading {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 9px;
}

.raise-selector__heading output {
  overflow: hidden;
  color: var(--warning);
  font-family: var(--mono);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.raise-slider {
  width: 100%;
  height: 18px;
  margin: 0;
  accent-color: var(--warning);
}

.raise-preset-group {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(40px, 1fr));
  margin-top: 4px;
}

.raise-preset-button {
  min-width: 0;
  min-height: 27px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--panel-raised);
  color: #C8DDEC;
  padding: 3px;
  font-size: 8px;
  font-weight: 800;
}

.raise-preset-button[data-selected="true"] {
  border-color: var(--warning);
  background: rgb(243 189 84 / 15%);
  color: #FFF1C4;
}

.raise-control {
  display: grid;
  grid-template-columns: auto 74px;
  align-items: center;
  gap: 4px 8px;
}

.raise-control label {
  color: var(--muted);
  font-size: 9px;
}

.raise-control input,
.form-grid input,
.form-grid select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #081725;
  padding: 9px;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}

.field-error {
  grid-column: 1 / -1;
  min-height: 12px;
  color: var(--warning);
  font-size: 9px;
  text-align: right;
}

.action-button {
  min-width: 82px;
  min-height: 43px;
  border-radius: 8px;
  font-weight: 900;
}

.action-button--fold {
  background: rgb(198 92 107 / 18%);
  color: #FFB4BF;
}

.action-button--passive {
  background: #1D3B50;
}

.action-button--raise {
  background: var(--accent);
  color: #04121C;
}

.action-reason {
  grid-column: 1 / -1;
  min-height: 12px;
  margin: -8px 0 0;
  color: var(--muted);
  font-size: 9px;
  text-align: right;
}

dialog {
  color: var(--text);
}

dialog::backdrop {
  background: rgb(2 8 14 / 78%);
  backdrop-filter: blur(5px);
}

.settings-drawer {
  width: min(460px, 100%);
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0 0 0 auto;
  border: 0;
  border-left: 1px solid var(--line);
  background: var(--panel);
  padding: 0;
  box-shadow: -28px 0 70px rgb(0 0 0 / 34%);
}

.settings-drawer[open] {
  animation: drawer-enter 180ms ease-out;
}

.settings-form {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  padding: 22px;
}

.drawer-heading,
.drawer-actions {
  justify-content: space-between;
  gap: 12px;
}

.drawer-heading h2 {
  font-size: 22px;
}

.icon-button {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--panel-raised);
  color: var(--muted);
  font-size: 24px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 12px;
  margin-top: 28px;
}

.form-grid label > span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 10px;
}

.variant-toggles {
  margin: 26px 0 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 14px;
}

.variant-toggles legend {
  color: var(--muted);
  padding-inline: 5px;
  font-size: 10px;
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
}

.toggle-row:last-child {
  border-bottom: 0;
}

.toggle-row strong,
.toggle-row small {
  display: block;
}

.toggle-row strong {
  font-size: 12px;
}

.toggle-row small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.toggle-row input {
  appearance: none;
  flex: 0 0 auto;
  width: 42px;
  height: 23px;
  border: 1px solid #31516A;
  border-radius: 999px;
  background: #081725;
  transition: background 150ms ease, border-color 150ms ease;
}

.toggle-row input::before {
  content: "";
  display: block;
  width: 15px;
  height: 15px;
  margin: 3px;
  border-radius: 50%;
  background: var(--muted);
  transition: translate 150ms ease, background 150ms ease;
}

.toggle-row input:checked {
  border-color: var(--accent);
  background: rgb(57 230 255 / 18%);
}

.toggle-row input:checked::before {
  translate: 19px 0;
  background: var(--accent);
}

.form-warning {
  min-height: 20px;
  margin: 14px 0;
  color: var(--warning);
  font-size: 11px;
}

.drawer-actions {
  margin-top: auto;
  padding-top: 16px;
}

.settlement-dialog {
  width: min(430px, calc(100% - 28px));
  border: 1px solid #31516A;
  border-radius: 14px;
  background: var(--panel-raised);
  padding: 0;
  box-shadow: var(--shadow);
}

.settlement-card {
  padding: 28px;
  text-align: center;
}

.settlement-card h2 {
  font-size: 25px;
}

.settlement-card > p:not(.eyebrow) {
  margin: 10px 0 22px;
  color: var(--muted);
  line-height: 1.6;
}

.settlement-card .button {
  width: 100%;
}

.notice-toast {
  position: fixed;
  z-index: 80;
  inset: 92px 18px auto auto;
  width: min(360px, calc(100% - 36px));
  border: 1px solid rgb(243 189 84 / 45%);
  border-radius: 9px;
  background: #312819;
  color: #FFE5A7;
  padding: 12px 15px;
  box-shadow: var(--shadow);
}

@keyframes deal-card {
  from { opacity: 0; transform: translateY(-8px) scale(.94); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes chip-arrive {
  from { opacity: .2; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes active-seat {
  0%, 100% { scale: 1; }
  50% { scale: 1.015; }
}

@keyframes drawer-enter {
  from { transform: translateX(24px); opacity: .7; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes action-badge-in {
  from { opacity: 0; transform: translate(-50%, 7px) scale(.96); }
  to { opacity: 1; transform: translate(-50%, 0) scale(1); }
}

@media (max-width: 1100px) {
  .tournament-hud {
    grid-template-columns: 1fr auto;
  }

  .hud-metrics {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    justify-content: space-around;
    border-top: 1px solid var(--line);
    padding: 10px 0;
  }

  .console-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .live-panel {
    display: block;
  }

  .live-panel-body {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
  }

  .tabs {
    grid-template-columns: 1fr;
    align-content: start;
    border-block: 1px solid var(--line);
    border-right: 1px solid var(--line);
  }

  .tab {
    border-right: 2px solid transparent;
    border-bottom: 0;
  }

  .tab[aria-selected="true"] {
    border-right-color: var(--accent);
    border-bottom-color: transparent;
  }

  .tab-panel {
    min-height: 0;
  }

  .action-bar {
    grid-template-columns: minmax(130px, 1fr) minmax(116px, auto) auto;
  }

  .raise-selector {
    grid-row: 2;
    grid-column: 1 / -1;
  }

  .action-reason {
    grid-row: 3;
    grid-column: 1 / -1;
  }
}

@media (max-width: 700px) {
  body {
    padding-bottom: calc(var(--mobile-action-height) + 72px);
  }

  .app-shell {
    padding: 0 10px 18px;
  }

  .tournament-hud {
    min-height: 68px;
    gap: 8px;
  }

  .brand-lockup div > span,
  .hud-actions .button--quiet {
    display: none;
  }

  .brand-mark {
    width: 32px;
  }

  .hud-actions .button {
    min-height: 36px;
    padding: 7px 11px;
    font-size: 11px;
  }

  .hud-metrics {
    gap: 4px;
    padding: 8px 0;
  }

  .hud-metrics div {
    min-width: 0;
  }

  .hud-metrics dd {
    font-size: 11px;
  }

  .console-layout {
    margin-top: 10px;
  }

  .table-column {
    border-radius: 10px;
    padding: 7px;
  }

  .broadcast-strip {
    min-height: 44px;
    padding: 0 3px 7px;
  }

  .broadcast-strip h1 {
    font-size: 14px;
  }

  .broadcast-status {
    max-width: 55%;
    gap: 5px;
    text-align: right;
  }

  .broadcast-status #handLabel {
    display: none;
  }

  .poker-table {
    min-height: 430px;
    border-width: 7px;
    border-radius: 44% / 48%;
  }

  .felt-rim {
    inset: 10px;
  }

  .seat {
    width: clamp(84px, 27vw, 104px);
  }

  .seat-card {
    min-height: 50px;
    border-radius: 7px;
    padding: 5px 6px;
  }

  .seat-hole-cards {
    height: 31px;
    margin-bottom: -3px;
  }

  .seat-hole-cards .card {
    width: 22px;
    height: 31px;
    border-radius: 4px;
    font-size: 8px;
  }

  .seat-hole-cards .card-center-suit {
    font-size: 12px;
  }

  .seat-name {
    max-width: 60px;
    font-size: 9px;
  }

  .seat-stack {
    margin-top: 3px;
    font-size: 10px;
  }

  .seat-role,
  .seat-state,
  .seat-commit {
    font-size: 7px;
  }

  .table-center {
    width: 56%;
  }

  .community-cards {
    min-height: 44px;
    margin-top: 8px;
  }

  .community-cards .card {
    width: clamp(27px, 8.4vw, 34px);
    height: clamp(39px, 11.8vw, 48px);
    border-radius: 4px;
    font-size: 9px;
  }

  .community-cards .card-center-suit {
    font-size: 14px;
  }

  .pot-split > div {
    min-width: 48px;
    padding: 5px 6px;
  }

  .pot-split span {
    font-size: 7px;
  }

  .pot-split output {
    font-size: 12px;
  }

  .table-pot-structure {
    max-height: 40px;
    overflow: hidden;
  }

  .seat-action-badge {
    max-width: 128px;
    padding: 5px 7px;
    font-size: 9px;
  }

  .live-panel {
    position: fixed;
    z-index: 30;
    inset: auto 8px var(--mobile-action-height);
    max-height: min(62vh, 500px);
    border-radius: 12px 12px 0 0;
    background: var(--panel);
    transform: translateY(calc(100% - 48px));
    transition: transform 180ms ease;
  }

  .live-panel[data-mobile-open="true"] {
    transform: translateY(0);
  }

  .live-drawer-toggle span:last-child {
    display: inline;
    transition: rotate 180ms ease;
  }

  .live-panel[data-mobile-open="true"] .live-drawer-toggle span:last-child {
    rotate: 180deg;
  }

  .live-panel-body {
    display: block;
    max-height: calc(min(62vh, 500px) - 48px);
    overflow: auto;
  }

  .tabs {
    grid-template-columns: repeat(3, 1fr);
    border-right: 0;
  }

  .tab {
    border-right: 0;
    border-bottom: 2px solid transparent;
  }

  .tab[aria-selected="true"] {
    border-right-color: transparent;
    border-bottom-color: var(--accent);
  }

  .action-bar {
    position: fixed;
    z-index: 40;
    inset: auto 0 0;
    min-height: var(--mobile-action-height);
    display: grid;
    grid-template-columns: minmax(0, 1fr) 74px;
    gap: 7px 9px;
    margin: 0;
    border-width: 1px 0 0;
    border-radius: 14px 14px 0 0;
    padding: 9px 10px max(9px, env(safe-area-inset-bottom));
  }

  .turn-callout {
    grid-column: 1 / -1;
  }

  .raise-selector {
    grid-row: auto;
    grid-column: 1 / -1;
  }

  .raise-preset-group {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 3px;
  }

  .raise-preset-button {
    min-height: 25px;
    font-size: 7px;
  }

  .raise-control {
    grid-column: 2;
    grid-template-columns: 62px;
  }

  .raise-control label {
    display: none;
  }

  .raise-control input {
    padding: 7px;
  }

  .field-error {
    position: absolute;
    inset: 51px 10px auto auto;
    max-width: 170px;
  }

  .primary-actions {
    grid-column: 1 / -1;
  }

  .action-button {
    min-width: 0;
    flex: 1;
    min-height: 40px;
    padding-inline: 5px;
    font-size: 12px;
  }

  .action-reason {
    grid-row: auto;
    grid-column: 1 / -1;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .settings-drawer {
    width: 100%;
  }

  .settings-form {
    padding: 18px 14px;
  }

  .form-grid {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 20px;
  }

  .notice-toast {
    inset: 10px 10px auto;
    width: auto;
  }
}

@media (max-width: 350px) {
  :root {
    --mobile-action-height: 292px;
  }

  .brand-lockup strong {
    letter-spacing: .08em;
    font-size: 11px;
  }

  .poker-table {
    min-height: 420px;
  }

  .seat {
    width: 84px;
  }

  .raise-preset-button {
    font-size: 6.5px;
  }
}

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