:root {
  /* ── Surfaces ─────────────────────────────────────────────── */
  --bg: #0b1220;
  --panel: #111a2e;
  --surface-1: #142038;
  --surface-2: #1a2a52;
  --card: #f7f7fb;
  --cardText: #0b1220;

  /* ── Text ──────────────────────────────────────────────────── */
  --text: #e9eefb;
  --muted: #aab4d6;

  /* ── Borders ───────────────────────────────────────────────── */
  --border: rgba(255, 255, 255, 0.1);
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-strong: rgba(255, 255, 255, 0.22);

  /* ── Overlays ──────────────────────────────────────────────── */
  --bg-overlay: rgba(255, 255, 255, 0.03);
  --backdrop: rgba(0, 0, 0, 0.6);

  /* ── Accent (gold) ─────────────────────────────────────────── */
  --accent: #ffd700;
  --accent-subtle: rgba(255, 215, 0, 0.08);
  --accent-dim: rgba(255, 215, 0, 0.15);
  --accent-bright: rgba(255, 215, 0, 0.3);
  --accent-vivid: rgba(255, 215, 0, 0.9);

  /* ── Semantic colors ───────────────────────────────────────── */
  --color-success: #4ade80;
  --color-danger: #ef5350;
  --color-warning: #ffa726;
  --color-info: #42a5f5;

  /* ── Action button backgrounds ─────────────────────────────── */
  --btn-fold: rgba(255, 107, 107, 0.18);
  --btn-fold-hover: rgba(255, 107, 107, 0.28);
  --btn-check: rgba(59, 91, 214, 0.18);
  --btn-check-hover: rgba(59, 91, 214, 0.28);
  --btn-call: rgba(76, 175, 80, 0.18);
  --btn-call-hover: rgba(76, 175, 80, 0.28);
  --btn-raise: rgba(255, 170, 0, 0.18);
  --btn-raise-hover: rgba(255, 170, 0, 0.28);
  --btn-allin: rgba(255, 215, 0, 0.22);
  --btn-allin-hover: rgba(255, 215, 0, 0.34);

  /* ── Typography scale ──────────────────────────────────────── */
  --text-2xs: 7px;
  --text-xs: 9px;
  --text-sm: 11px;
  --text-base: 12px;
  --text-md: 13px;
  --text-lg: 14px;
  --text-xl: 18px;
  --text-2xl: 20px;
  --text-3xl: 28px;
  --text-4xl: 32px;

  /* ── Border radius ─────────────────────────────────────────── */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-pill: 999px;
  --radius-full: 50%;

  /* ── Shadows / elevation ───────────────────────────────────── */
  --shadow: rgba(0, 0, 0, 0.35);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 20px rgba(0, 0, 0, 0.35);
  --shadow-xl: 0 24px 48px rgba(0, 0, 0, 0.4);
  --shadow-focus: 0 0 0 3px rgba(255, 215, 0, 0.08);
  --shadow-glow: 0 0 12px 2px rgba(255, 215, 0, 0.15);

  /* ── Animation ─────────────────────────────────────────────── */
  --anim-scale: 1;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica,
    Arial, "Apple Color Emoji", "Segoe UI Emoji";
  background: radial-gradient(1200px 700px at 50% -10%, var(--surface-2) 0%, var(--bg) 55%);
  color: var(--text);
  overflow: hidden;
}

.app {
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 24px;
  display: grid;
  gap: 12px;
  height: 100dvh;
  overflow: hidden;
  grid-template-columns: 250px 1fr;
  grid-template-rows: 1fr;
  grid-template-areas: "sidebar main";
  min-height: 0;
}

.sidebar {
  grid-area: sidebar;
}

.main {
  grid-area: main;
}

.main {
  display: grid;
  gap: 12px;
  min-height: 0;
  overflow: hidden;
  grid-template-columns: 360px 1fr;
  grid-template-areas:
    "seats seats"
    "actions log";
  grid-template-rows: 1fr minmax(auto, 0.55fr);
  position: relative;
}

.is-hidden {
  display: none !important;
}

.play-view {
  display: contents;
}

.stats-view {
  position: absolute;
  inset: 0;
  overflow: auto;
  z-index: 3;
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr;
  grid-auto-rows: min-content;
}

.session-view {
  position: absolute;
  inset: 0;
  overflow: auto;
  z-index: 3;
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr;
  grid-auto-rows: min-content;
}

.trainer-view {
  position: absolute;
  inset: 0;
  overflow: auto;
  z-index: 3;
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr;
  grid-auto-rows: min-content;
}

.charts-view {
  position: absolute;
  inset: 0;
  overflow: auto;
  z-index: 3;
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr;
  grid-auto-rows: min-content;
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: var(--text-base);
}

.trainer-actions {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}

/* Unified button system (use Charts tab styling as the canonical look) */
.btn {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--border-subtle);
  color: var(--text);
  padding: 8px 10px;
  border-radius: var(--radius-lg);
  cursor: pointer;
  font-size: var(--text-base);
  font-weight: 800;
  line-height: 1;
  user-select: none;
}

.btn:hover:not(:disabled) {
  background: var(--border);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Action button colors — industry-standard poker palette */
.btn--fold {
  background: rgba(100, 100, 100, 0.25);
  border-color: rgba(160, 160, 160, 0.25);
  color: #b0b0b0;
}
.btn--fold:hover:not(:disabled) {
  background: rgba(100, 100, 100, 0.35);
}

.btn--check {
  background: rgba(80, 160, 220, 0.18);
  border-color: rgba(80, 160, 220, 0.28);
  color: #90c8f0;
}
.btn--check:hover:not(:disabled) {
  background: rgba(80, 160, 220, 0.28);
}

.btn--call {
  background: rgba(76, 175, 80, 0.22);
  border-color: rgba(76, 175, 80, 0.32);
  color: #80d884;
}
.btn--call:hover:not(:disabled) {
  background: rgba(76, 175, 80, 0.32);
}

.btn--raise {
  background: rgba(255, 170, 0, 0.2);
  border-color: rgba(255, 170, 0, 0.3);
  color: var(--color-warning);
}
.btn--raise:hover:not(:disabled) {
  background: rgba(255, 170, 0, 0.3);
}

.btn--pill {
  border-radius: var(--radius-pill);
  padding: 6px 10px;
  font-size: var(--text-sm);
  font-weight: 900;
}

.btn--primary {
  background: var(--accent-subtle);
  border-color: var(--btn-allin);
}

.btn--primary:hover:not(:disabled) {
  background: var(--accent-dim);
}

.btn--danger {
  background: rgba(220, 53, 69, 0.15);
  border-color: rgba(220, 53, 69, 0.3);
  color: #ff6b6b;
}

.btn--danger:hover:not(:disabled) {
  background: rgba(220, 53, 69, 0.25);
}

.btn--subtle {
  background: transparent;
  border-color: var(--border);
  color: rgba(255, 255, 255, 0.6);
  font-weight: 600;
}

.btn--subtle:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.8);
}

.btn--small {
  padding: 6px 12px;
  font-size: var(--text-base);
}

/* Mobile rebuy button - hidden by default, shown on mobile landscape */
.mobile-rebuy-btn {
  display: none;
}

/* Mobile toolbar - hidden by default, shown on portrait phones */
.mobile-toolbar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: rgba(11, 18, 32, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  padding: 6px 8px;
  padding-bottom: max(6px, env(safe-area-inset-bottom));
  gap: 4px;
  justify-content: center;
  align-items: center;
}

.mobile-toolbar-btn {
  appearance: none;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: var(--text-sm);
  font-weight: 700;
  padding: 8px 4px;
  border-radius: var(--radius-md);
  cursor: pointer;
  flex: 1;
  max-width: 58px;
  text-align: center;
  line-height: 1;
}

.mobile-toolbar-btn:active {
  background: var(--border-subtle);
}

.mobile-toolbar-btn.is-active {
  border-color: rgba(120, 170, 255, 0.30);
  background: rgba(120, 170, 255, 0.14);
  color: var(--text);
}

/* Queued rebuy state - pulsing highlight */
.btn.is-queued {
  background: var(--accent-bright);
  border-color: rgba(255, 215, 0, 0.5);
  animation: pulse-queued 1.5s ease-in-out infinite;
}

@keyframes pulse-queued {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.btn.is-active {
  border-color: rgba(120, 170, 255, 0.30);
  background: rgba(120, 170, 255, 0.14);
}

.charts-layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 12px;
  align-items: start;
  margin-top: 6px;
}

.charts-left,
.charts-right {
  min-width: 0;
}

@media (max-width: 900px) {
  .charts-layout {
    grid-template-columns: 1fr;
  }
}

.trainer-session-stats {
  color: var(--muted);
}

.trainer-review-hint {
  color: var(--muted);
}

.trainer-meta {
  margin-top: 8px;
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: var(--text-base);
}

.trainer-answer-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

/* Trainer buttons inherit from .btn */

.trainer-result {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--bg-overlay);
  font-size: var(--text-base);
  line-height: 1.35;
}

.trainer-result.ok {
  border-color: rgba(57, 217, 138, 0.22);
  background: rgba(57, 217, 138, 0.06);
}

.trainer-result.bad {
  border-color: rgba(255, 107, 107, 0.22);
  background: rgba(255, 107, 107, 0.06);
}

.trainer-grade {
  font-weight: 900;
  color: var(--text);
}

.trainer-canon {
  margin-top: 6px;
  color: var(--text);
}

.trainer-debug {
  margin-top: 6px;
  color: var(--muted);
}

.trainer-range {
  margin-top: 10px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-overlay);
  border-radius: var(--radius-lg);
  padding: 10px 12px;
}

.trainer-range summary {
  cursor: pointer;
  font-weight: 900;
}

.trainer-range-body {
  margin-top: 8px;
  color: var(--muted);
  font-size: var(--text-base);
}

.trainer-range-legend {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 10px;
}

.range-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--border-subtle);
  color: var(--text);
  font-size: var(--text-sm);
  font-weight: 900;
}

.trainer-spot-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.trainer-pos-pill {
  font-size: var(--text-md);
  padding: 6px 12px;
  border-width: 2px;
}

/* Make legend pills match the bolder grid colors */
.range-pill.range-fold {
  background: rgba(255, 77, 77, 0.28);
  border-color: rgba(255, 77, 77, 0.55);
}

.range-pill.range-raise {
  background: rgba(57, 217, 138, 0.30);
  border-color: rgba(57, 217, 138, 0.60);
}

/* VS OPEN trainer legend pills */
.range-pill.vsopen-pill-fold {
  background: rgba(255, 77, 77, 0.28);
  border-color: rgba(255, 77, 77, 0.55);
}

.range-pill.vsopen-pill-call {
  background: rgba(57, 217, 138, 0.30);
  border-color: rgba(57, 217, 138, 0.60);
}

.range-pill.vsopen-pill-3bet {
  background: rgba(59, 91, 214, 0.24);
  border-color: rgba(59, 91, 214, 0.42);
}

.trainer-vsopen-controls {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: flex-end;
  margin-top: 4px;
}

.trainer-vsopen-layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 12px;
  align-items: start;
}

.trainer-vsopen-left {
  min-width: 0;
}

.trainer-vsopen-right {
  min-width: 0;
}

@media (max-width: 900px) {
  .trainer-vsopen-layout {
    grid-template-columns: 1fr;
  }
}

.trainer-vsopen-field {
  display: grid;
  gap: 4px;
  min-width: 160px;
}

.trainer-vsopen-field .k {
  font-size: var(--text-sm);
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.trainer-vsopen-field select {
  width: 100%;
  padding: 8px 10px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--border-subtle);
  color: var(--text);
  font-weight: 800;
  outline: none;
}

.trainer-vsopen-field select:focus {
  border-color: var(--btn-allin);
  box-shadow: var(--shadow-focus);
}

.trainer-vsopen-question {
  margin-top: 6px;
  color: var(--muted);
  font-size: var(--text-base);
}

.vsopen-cell {
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  padding: 4px 3px;
  min-height: 34px;
  display: grid;
  place-items: center;
  line-height: 1.1;
  user-select: none;
}

/* VS OPEN chart colors: red fold, green call, blue 3bet */
.vsopen-fold {
  background: rgba(255, 77, 77, 0.30);
  border-color: rgba(255, 77, 77, 0.55);
}

.vsopen-call {
  background: rgba(57, 217, 138, 0.32);
  border-color: rgba(57, 217, 138, 0.60);
}

.vsopen-3bet {
  background: rgba(59, 91, 214, 0.26);
  border-color: rgba(59, 91, 214, 0.44);
}

.vsopen-answered-ok {
  outline: 2px solid rgba(57, 217, 138, 0.55);
}

.vsopen-answered-bad {
  outline: 2px solid rgba(255, 77, 77, 0.60);
}

.trainer-range-grid {
  display: grid;
  grid-template-columns: repeat(13, minmax(0, 1fr));
  gap: 2px;
  width: 100%;
  max-width: 760px;
}

.trainer-history {
  width: 100%;
  min-height: 120px;
  max-height: 220px;
  resize: vertical;
  padding: 10px 12px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--bg-overlay);
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: var(--text-base);
  line-height: 1.35;
}

.trainer-spot-marker {
  color: var(--muted);
}

.trainer-next-hint {
  margin-top: 6px;
  color: var(--muted);
}

.trainer-pos-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
  margin: 10px 0;
}

/* Trainer position tabs inherit from .btn/.btn--pill */

.range-cell {
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  padding: 4px 3px;
  min-height: 34px;
  display: grid;
  place-items: center;
  line-height: 1.1;
  user-select: none;
}

button.range-cell {
  width: 100%;
  cursor: pointer;
  background: transparent;
  color: inherit;
}

button.range-cell:hover {
  filter: brightness(1.08);
}

.range-hand {
  font-size: var(--text-sm);
  font-weight: 900;
  color: rgba(255, 255, 255, 0.92);
}

.range-act {
  font-size: var(--text-sm);
  font-weight: 900;
  color: rgba(255, 255, 255, 0.92);
  opacity: 0.9;
}

.range-fold {
  /* Bold red for fold */
  background: rgba(255, 77, 77, 0.30);
  border-color: rgba(255, 77, 77, 0.55);
}

.range-call {
  background: rgba(59, 91, 214, 0.18);
  border-color: rgba(59, 91, 214, 0.26);
}

.range-raise {
  /* Bold green for raise */
  background: rgba(57, 217, 138, 0.32);
  border-color: rgba(57, 217, 138, 0.60);
}

.range-hero {
  border-color: var(--accent-bright);
  background: var(--accent-subtle);
}

.range-hero-cell {
  outline: 2px solid var(--btn-allin-hover);
  z-index: 1;
}

.trainer-range-note {
  margin-top: 10px;
  color: var(--muted);
  font-size: var(--text-base);
}

.trainer-seat-hero {
  outline: 3px solid var(--accent-bright);
  box-shadow: 0 0 0 6px var(--accent-subtle);
}

.trainer-seat-villain {
  outline: 2px solid rgba(59, 91, 214, 0.28);
  box-shadow: 0 0 0 5px rgba(59, 91, 214, 0.08);
}

.showdown-overlay {
  position: absolute;
  inset: 12px;
  z-index: 4;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: rgba(17, 26, 46, 0.92);
  box-shadow: var(--shadow-lg);
  padding: 12px 14px;
  font-size: var(--text-base);
  line-height: 1.45;
  white-space: pre;
  color: var(--text);
  overflow: auto;
}

.community-panel {
  grid-area: community;
}

.actions-panel {
  grid-area: actions;
  overflow: auto;
  border: 1px solid transparent;
  transition: border-color 0.2s;
}

.actions-panel.is-hero-turn {
  border-color: var(--accent-bright);
  animation: turn-pulse calc(1.5s * var(--anim-scale)) ease-in-out infinite;
}

@keyframes turn-pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(255, 215, 0, 0);
    border-color: var(--accent-bright);
  }
  50% {
    box-shadow: 0 0 12px 2px var(--accent-dim);
    border-color: var(--btn-allin-hover);
  }
}

.seats-panel {
  grid-area: seats;
  overflow: visible;
}

.log-panel {
  grid-area: log;
}

/* legacy (stats-inside-log) styles removed */

.session-actions {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}

.session-summary {
  margin-top: 6px;
  font-size: var(--text-base);
  color: var(--muted);
}

.session-table-wrap {
  margin-top: 10px;
  overflow-x: auto;
  max-height: none;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  background: var(--bg-overlay);
}

.session-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-base);
}

.session-table th,
.session-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border-subtle);
  text-align: right;
  white-space: nowrap;
}

.session-table th {
  white-space: normal;
}

.session-table th:first-child,
.session-table td:first-child {
  text-align: left;
}

.session-table thead th {
  position: sticky;
  top: 0;
  background: rgba(17, 26, 46, 0.95);
  color: var(--muted);
  text-transform: uppercase;
  font-size: var(--text-sm);
  letter-spacing: 0.06em;
  z-index: 1;
}

.metrics-dict details {
  border: 1px solid var(--border-subtle);
  background: var(--bg-overlay);
  border-radius: var(--radius-lg);
  padding: 10px 12px;
  margin-bottom: 10px;
}

.metrics-dict summary {
  cursor: pointer;
  font-weight: 900;
}

.metrics-dict .metric-body {
  margin-top: 8px;
  color: var(--muted);
  font-size: var(--text-base);
  line-height: 1.35;
}

.metrics-dict .metric-line {
  margin-top: 6px;
}

.action-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* Removed: .preset-row, .preset-btn — replaced by hotkey-grid */

.raise-row {
  display: grid;
  grid-template-columns: auto auto 1fr auto auto;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
}

.raise-label {
  font-size: var(--text-base);
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.raise-slider {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  height: 6px;
  border-radius: var(--radius-sm);
  background: var(--border);
  outline: none;
  cursor: pointer;
}

.raise-slider:focus-visible {
  box-shadow: 0 0 0 2px rgba(255, 215, 0, 0.5);
}

.raise-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: var(--radius-full);
  background: var(--color-warning);
  border: 2px solid rgba(0, 0, 0, 0.3);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.raise-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: var(--radius-full);
  background: var(--color-warning);
  border: 2px solid rgba(0, 0, 0, 0.3);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.raise-slider::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: var(--radius-sm);
}

.raise-slider::-moz-range-track {
  height: 6px;
  border-radius: var(--radius-sm);
  background: var(--border);
}

.raise-step {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--border-subtle);
  color: var(--text);
  width: 28px;
  height: 28px;
  border-radius: var(--radius-lg);
  cursor: pointer;
  line-height: 1;
  font-weight: 900;
}

.raise-step:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.raise-value {
  font-size: var(--text-sm);
  color: var(--text);
  font-weight: 800;
  min-width: 92px;
  text-align: right;
}

.hotkey-grid {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 4px;
  padding-top: 4px;
  border-top: 1px solid var(--border-subtle);
  font-size: var(--text-xs);
  color: var(--muted);
}

.hotkey-grid-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.hotkey {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  white-space: nowrap;
}

.hotkey kbd {
  display: inline-block;
  padding: 0 4px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--border-subtle);
  color: var(--text);
  font-weight: 900;
  font-size: var(--text-xs);
  line-height: 1.4;
}

/* Prevent double-tap zoom on interactive elements */
.btn, .raise-step, .raise-slider, .hotkey {
  touch-action: manipulation;
}

.kbd {
  display: inline-block;
  padding: 1px 6px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--border-subtle);
  color: var(--text);
  font-weight: 900;
  font-size: var(--text-sm);
}

/* Action row buttons inherit from .btn */

.seats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
}

.seat {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  padding: 10px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  background: var(--bg-overlay);
}

.seat-header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
}

.seat-left {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.seat-name {
  font-size: var(--text-base);
  color: var(--text);
  font-weight: 700;
}

.badges {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

.badge {
  font-size: var(--text-sm);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--border-subtle);
  color: var(--text);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  user-select: none;
}

.badge.button {
  background: var(--accent-dim);
  border-color: var(--accent-bright);
}

.badge.blind {
  background: rgba(59, 91, 214, 0.18);
  border-color: rgba(59, 91, 214, 0.32);
}

.seat.button-seat {
  outline: 2px solid var(--accent-bright);
}

.history {
  margin: 0;
  height: auto;
  min-height: 180px;
  flex: 1 1 auto;
  overflow-y: scroll;
  overflow-x: hidden;
  scrollbar-gutter: stable;
  padding: 10px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  background: var(--bg-overlay);
  color: var(--text);
  font-size: var(--text-sm);
  line-height: 1.5;
  white-space: pre;
  resize: none;
  width: 100%;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
    "Courier New", monospace;
}

.seat-meta {
  font-size: var(--text-base);
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.seat-meta .bet,
.seat-meta .stack {
  color: var(--text);
  font-weight: 900;
}

.seat-meta .status {
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: var(--text-sm);
}

.seat-meta .stack {
  font-weight: 900;
}

.seat.turn {
  outline: 3px solid rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.075);
  box-shadow:
    0 0 0 6px var(--accent-subtle),
    0 18px 28px rgba(0, 0, 0, 0.25);
}

.seat.status-folded {
  opacity: 0.52;
  filter: grayscale(1);
}

.seat.status-out {
  opacity: 0.35;
  filter: grayscale(1);
}

.seat.status-allin {
  outline: 2px solid rgba(255, 107, 107, 0.22);
}

/* ==========================================================================
   Oval Table (Classic Felt)
   ========================================================================== */

/* Oval Table Container */
.oval-table {
  position: relative;
  width: calc(100% - 180px);
  height: 260px;
  border-radius: var(--radius-full);
  overflow: visible;
  margin: 36px 90px;
}

.oval-felt {
  position: absolute;
  inset: 8%;
  border-radius: var(--radius-full);
  pointer-events: none;
}

.oval-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 5;
}

.oval-community {
  display: flex;
  gap: 6px;
  justify-content: center;
}

.oval-community .card {
  width: 44px;
  height: 60px;
  padding: 5px;
}

.oval-community .card .corner {
  font-size: var(--text-base);
}

.oval-community .card .pip {
  font-size: var(--text-2xl);
}

.oval-community .card .corner.bottom {
  display: none;
}

.oval-pot {
  text-align: center;
}

.oval-pot-value {
  font-size: var(--text-lg);
  font-weight: 700;
  padding: 6px 14px;
  border-radius: var(--radius-lg);
  white-space: nowrap;
}

.pot-chips {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 4px;
  height: 20px;
  margin-bottom: 4px;
}

.pot-chips .chip-pile {
  display: flex;
  flex-direction: column-reverse;
  gap: 1px;
}

.oval-street {
  display: flex;
  gap: 12px;
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.7);
}

.oval-street span:first-child {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.oval-seats {
  position: absolute;
  inset: 0;
}

/* Oval Seat Positioning */
.oval-seat {
  position: absolute;
  width: 170px;
  transform: translate(-50%, -50%);
  z-index: 10;
}

/* 6 positions around ellipse - hero at bottom (position 0), clockwise */
.oval-seat[data-position="0"] { left: 50%; top: 105%; }   /* Hero - 6 o'clock */
.oval-seat[data-position="1"] { left: 5%; top: 78%; }     /* +1 - 8 o'clock (left of hero) */
.oval-seat[data-position="2"] { left: 5%; top: 22%; }     /* +2 - 10 o'clock */
.oval-seat[data-position="3"] { left: 50%; top: -5%; }    /* +3 - 12 o'clock */
.oval-seat[data-position="4"] { left: 95%; top: 22%; }    /* +4 - 2 o'clock */
.oval-seat[data-position="5"] { left: 95%; top: 78%; }    /* +5 - 4 o'clock (right of hero) */

/* Oval Seat Card */
.oval-seat-card {
  padding: 8px 10px;
  border-radius: var(--radius-lg);
  text-align: center;
  transition: all 0.2s ease;
  position: relative;
}

/* Dealer Button */
.dealer-button {
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #ffffff 0%, #f5f5dc 100%);
  color: #222;
  font-size: var(--text-xs);
  font-weight: 700;
  padding: 2px 6px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  z-index: 20;
}

.oval-seat-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-bottom: 6px;
  white-space: nowrap;
}

.oval-seat-name {
  font-size: var(--text-base);
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 70px;
}

.oval-seat-position {
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  opacity: 0.7;
}

.oval-seat-stack {
  font-size: var(--text-sm);
  font-weight: 600;
  opacity: 0.85;
}

.oval-seat-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 4px;
  padding-top: 4px;
  border-top: 1px solid var(--border);
}

.oval-seat-action {
  font-size: var(--text-xs);
  font-weight: 600;
  padding: 2px 5px;
  border-radius: var(--radius-sm);
}

.oval-seat-bet {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-base);
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-md);
  background: rgba(0, 0, 0, 0.4);
}

.oval-seat-chips {
  display: flex;
  gap: 3px;
  flex-shrink: 0;
  align-items: flex-end;
}

.oval-seat-chips.two-piles {
  gap: 2px;
}

.chip-pile {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.oval-chip {
  width: 18px;
  height: 5px;
  border-radius: var(--radius-sm);
  border: none;
  box-shadow: var(--shadow-sm);
  background: #c41e3a; /* fallback red */
}

.chip-overflow {
  font-size: var(--text-sm);
  font-weight: 700;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1;
  padding-left: 1px;
}

.oval-seat-cards {
  display: flex;
  justify-content: center;
  gap: 3px;
}

.oval-seat-cards .card {
  width: 36px;
  height: 52px;
  padding: 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.oval-seat-cards .card .pip {
  display: none;
}

.oval-seat-cards .card .corner {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: var(--text-xl);
  font-weight: 800;
  line-height: 1;
}

.oval-seat-cards .card .corner .suit {
  font-size: var(--text-2xl);
  margin-top: 2px;
}

.oval-seat-cards .card .corner.bottom {
  display: none;
}

/* Oval Seat States */
.oval-seat.is-folded .oval-seat-card {
  opacity: 0.4;
  filter: grayscale(1);
}

.oval-seat.is-out .oval-seat-card {
  opacity: 0.25;
  filter: grayscale(1);
}

.oval-seat.is-allin .oval-seat-action {
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Winner highlight at hand over */
.oval-seat.is-winner .oval-seat-card {
  border-color: var(--color-success);
  box-shadow:
    0 0 0 3px rgba(74, 222, 128, 0.4),
    0 4px 20px rgba(74, 222, 128, 0.3);
  animation: winner-glow 1.5s ease-in-out infinite;
}

@keyframes winner-glow {
  0%, 100% {
    box-shadow:
      0 0 0 3px rgba(74, 222, 128, 0.4),
      0 4px 20px rgba(74, 222, 128, 0.3);
  }
  50% {
    box-shadow:
      0 0 0 4px rgba(74, 222, 128, 0.6),
      0 4px 30px rgba(74, 222, 128, 0.5);
  }
}

/* Card deal animation — hole cards slide in from above */
@keyframes card-deal-in {
  from { opacity: 0; transform: translateY(-20px) scale(0.85); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.oval-seat-cards .card.dealing {
  animation: card-deal-in calc(200ms * var(--anim-scale)) ease-out both;
}
.oval-seat-cards .card.dealing:nth-child(2) {
  animation-delay: calc(60ms * var(--anim-scale));
}

/* Community card reveal — slide up with staggered delay */
@keyframes community-deal-in {
  from { opacity: 0; transform: translateY(12px) scale(0.9); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.oval-community .card.community-enter {
  animation: community-deal-in calc(200ms * var(--anim-scale)) ease-out both;
}

/* Street transition flash on community area */
@keyframes street-flash {
  0%   { box-shadow: 0 0 0 0 rgba(255, 215, 0, 0); }
  30%  { box-shadow: 0 0 16px 4px var(--accent-dim); }
  100% { box-shadow: 0 0 0 0 rgba(255, 215, 0, 0); }
}

.oval-community.street-transition {
  animation: street-flash calc(400ms * var(--anim-scale)) ease-out;
}

/* Action flash — brief color flash on seat card */
@keyframes flash-fade {
  from { opacity: 0.6; }
  to   { opacity: 0; }
}

.oval-seat-card.action-flash-fold {
  box-shadow: inset 0 0 30px rgba(160, 160, 160, 0.3);
  animation: flash-fade calc(500ms * var(--anim-scale)) ease-out forwards;
}
.oval-seat-card.action-flash-call {
  box-shadow: inset 0 0 30px rgba(76, 175, 80, 0.3);
  animation: flash-fade calc(500ms * var(--anim-scale)) ease-out forwards;
}
.oval-seat-card.action-flash-raise,
.oval-seat-card.action-flash-bet {
  box-shadow: inset 0 0 30px rgba(255, 170, 0, 0.3);
  animation: flash-fade calc(500ms * var(--anim-scale)) ease-out forwards;
}
.oval-seat-card.action-flash-check {
  box-shadow: inset 0 0 30px rgba(80, 160, 220, 0.3);
  animation: flash-fade calc(500ms * var(--anim-scale)) ease-out forwards;
}

/* Fold card animation — cards fade + slide toward muck */
@keyframes fold-muck {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to   { opacity: 0; transform: translateY(-10px) scale(0.8); }
}

.oval-seat.is-folded .oval-seat-cards .card {
  animation: fold-muck calc(200ms * var(--anim-scale)) ease-in forwards;
}

/* Winner pot award — chips pulse toward winner */
@keyframes pot-award {
  0%   { transform: scale(1); opacity: 1; }
  50%  { transform: scale(1.3); opacity: 0.8; }
  100% { transform: scale(0.5); opacity: 0; }
}

.oval-seat.is-winner .oval-seat-bet {
  animation: pot-award calc(400ms * var(--anim-scale)) ease-in forwards;
}

/* Turn timer bar — depleting bar on active seat */
.oval-seat.is-turn .oval-seat-card::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-vivid), rgba(255, 170, 0, 0.6));
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  transform-origin: left;
  animation: timer-deplete var(--turn-duration, 2s) linear forwards;
}

/* Human turn: non-depleting persistent bar */
.oval-seat.is-turn.is-hero .oval-seat-card::after {
  animation: none;
  opacity: 0.8;
}

@keyframes timer-deplete {
  from { transform: scaleX(1); }
  to   { transform: scaleX(0); }
}

/* Dealer button slide — independent floating element */
.oval-dealer-float {
  position: absolute;
  z-index: 25;
  transition: left calc(300ms * var(--anim-scale)) ease-in-out,
              top calc(300ms * var(--anim-scale)) ease-in-out;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.oval-dealer-float .dealer-button {
  position: static;
  transform: none;
}

/* Hand result display (winner/shown hands) */
.oval-seat-result {
  font-size: var(--text-xs);
  font-weight: 700;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.oval-seat-result.result-winner {
  background: rgba(74, 222, 128, 0.25);
  color: var(--color-success);
}

.oval-seat-result.result-shown {
  background: rgba(148, 163, 184, 0.2);
  color: #94a3b8;
}

/* Classic Felt Theme */
.oval-table--classic {
  background: linear-gradient(135deg, #5d4e37 0%, #3d3225 100%);
  border: 12px solid #6b5a3e;
  box-shadow:
    inset 0 0 30px rgba(0, 0, 0, 0.4),
    0 8px 32px rgba(0, 0, 0, 0.5);
}

.oval-table--classic .oval-felt {
  background: linear-gradient(180deg, #2d5a3f 0%, #1e4530 50%, #2d5a3f 100%);
  border: 4px solid #4a3c2a;
  box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.3);
}

.oval-table--classic .oval-pot-value {
  background: var(--backdrop);
  color: var(--accent);
  border: 1px solid var(--accent-bright);
}

.oval-table--classic .oval-street {
  color: rgba(240, 230, 210, 0.8);
}

.oval-table--classic .oval-street span:first-child {
  color: #c4a962;
}

.oval-table--classic .oval-seat-card {
  background: linear-gradient(180deg, rgba(60, 50, 40, 0.95) 0%, rgba(40, 32, 25, 0.95) 100%);
  border: 1px solid var(--accent-dim);
  box-shadow: var(--shadow-md);
  color: #f0e6d3;
}

.oval-table--classic .oval-seat-position {
  color: #c4a962;
}

.oval-table--classic .oval-seat-action {
  background: rgba(0, 0, 0, 0.4);
  color: #e0d5c0;
}

.oval-table--classic .oval-seat-action.action-raise,
.oval-table--classic .oval-seat-action.action-bet {
  background: rgba(220, 80, 60, 0.3);
  color: #ff9980;
}

.oval-table--classic .oval-seat-action.action-call {
  background: rgba(80, 160, 80, 0.3);
  color: #90d090;
}

.oval-table--classic .oval-seat-action.action-fold {
  background: rgba(100, 100, 100, 0.3);
  color: #a0a0a0;
}

.oval-table--classic .oval-seat-action.action-check {
  background: rgba(80, 120, 180, 0.3);
  color: #90b0e0;
}

.oval-table--classic .oval-seat-result.result-winner {
  background: rgba(74, 222, 128, 0.3);
  color: #6ee7a0;
}

.oval-table--classic .oval-seat-result.result-shown {
  background: rgba(180, 160, 120, 0.2);
  color: #c4a962;
}

.oval-table--classic .oval-seat-bet {
  color: var(--accent);
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--accent-bright);
}

/* Chip colors by denomination */
.oval-table--classic .oval-chip.chip-1 {
  background: linear-gradient(180deg, #f8f8f8 0%, #c0c0c0 100%);
}

.oval-table--classic .oval-chip.chip-5 {
  background: linear-gradient(180deg, #ef5350 0%, #b71c1c 100%);
}

.oval-table--classic .oval-chip.chip-10 {
  background: linear-gradient(180deg, #42a5f5 0%, #0d47a1 100%);
}

.oval-table--classic .oval-chip.chip-25 {
  background: linear-gradient(180deg, #66bb6a 0%, #1b5e20 100%);
}

.oval-table--classic .oval-chip.chip-50 {
  background: linear-gradient(180deg, #ffa726 0%, #e65100 100%);
}

.oval-table--classic .oval-chip.chip-100 {
  background: linear-gradient(180deg, #424242 0%, #000 100%);
}

.oval-table--classic .oval-seat.is-turn .oval-seat-card {
  border-color: var(--accent);
  box-shadow:
    0 0 0 3px var(--accent-bright),
    0 4px 20px var(--accent-dim);
}

.oval-table--classic .oval-seat.is-hero .oval-seat-card {
  border-color: rgba(100, 180, 255, 0.4);
}

.oval-table--classic .oval-seat.is-button .oval-seat-position {
  color: var(--accent);
  font-weight: 700;
}

.table,
.player {
  padding: 12px 14px;
  background: color-mix(in oklab, var(--panel), #000 8%);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  min-height: 0;
}

.sidebar {
  display: grid;
  gap: 12px;
  min-height: 0;
  overflow: hidden;
}

.sidebar-card {
  padding: 12px 14px;
  background: color-mix(in oklab, var(--panel), #000 10%);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  min-height: 0;
}

.sidebar .btn {
  width: 100%;
  margin-bottom: 10px;
}

/* Sidebar groups — visual hierarchy via dividers */
.sidebar-group {
  margin-bottom: 4px;
}

.sidebar-group + .sidebar-group {
  border-top: 1px solid var(--border-subtle);
  padding-top: 10px;
}

.sidebar-group .btn:last-child {
  margin-bottom: 6px;
}

/* Primary CTA button — stands out from other sidebar buttons */
.btn--cta {
  font-weight: 700;
  letter-spacing: 0.02em;
  font-size: var(--text-lg);
  padding: 10px 16px;
}

/* Controls group: tighter spacing, muted labels */
.sidebar-group--controls .btn {
  margin-bottom: 6px;
}

.log-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
}

@media (max-width: 720px) {
  body {
    /* On small widths, allow the page to scroll so panels don't get clipped. */
    overflow: auto;
  }
  .app {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr auto;
    grid-template-areas:
      "main"
      "sidebar";
    height: auto;
    min-height: 100dvh;
    overflow: auto;
  }
  .sidebar {
    grid-template-columns: 1fr 1fr;
  }
  .main {
    overflow: visible;
    grid-template-columns: 1fr;
    grid-template-areas:
      "community"
      "seats"
      "actions"
      "log";
    grid-template-rows: auto auto auto auto;
  }
  .seats {
    grid-template-columns: 1fr 1fr;
  }
  .log-panel .history {
    min-height: 180px;
  }
}

/* ==========================================================================
   Mobile Landscape Layout
   For phones/tablets held horizontally - oval table takes full width
   ========================================================================== */
@media (orientation: landscape) and (max-height: 500px) {
  html, body {
    overflow: auto;
    height: auto;
  }

  .app {
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 100dvh;
    padding: 8px;
    padding-left: max(8px, env(safe-area-inset-left));
    padding-right: max(8px, env(safe-area-inset-right));
    padding-bottom: max(8px, env(safe-area-inset-bottom));
    gap: 8px;
    max-width: 100%;
  }

  /* Hide sidebar on mobile landscape */
  .sidebar {
    display: none;
  }

  /* Main area - flex column layout */
  .main {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    overflow: visible;
  }

  /* Hide log panel on mobile */
  .log-panel {
    display: none;
  }

  /* Seats panel contains the oval table */
  .seats-panel {
    flex-shrink: 0;
  }

  /* Oval table - full width, fixed height */
  .oval-table {
    width: 100%;
    height: 150px;
    margin: 55px 0 80px 0;
  }

  .oval-felt {
    inset: 5%;
  }

  /* Smaller seats for mobile */
  .oval-seat {
    width: 100px;
  }

  .oval-seat-card {
    padding: 4px 6px;
    border-radius: var(--radius-md);
  }

  .oval-seat-header {
    gap: 3px;
    margin-bottom: 2px;
  }

  .oval-seat-name {
    font-size: var(--text-xs);
    max-width: 45px;
  }

  .oval-seat-position {
    font-size: var(--text-2xs);
  }

  .oval-seat-stack {
    font-size: var(--text-xs);
  }

  /* Smaller cards on mobile */
  .oval-seat-cards .card {
    width: 24px;
    height: 40px;
    padding: 2px;
    border-radius: var(--radius-sm);
  }

  .oval-seat-cards .card .corner {
    font-size: var(--text-base);
  }

  .oval-seat-cards .card .corner .suit {
    font-size: var(--text-base);
    margin-top: 0;
  }

  /* Adjust seat positions for mobile - spread out to avoid overlap */
  .oval-seat[data-position="0"] { left: 50%; top: 118%; }
  .oval-seat[data-position="1"] { left: 6%; top: 85%; }
  .oval-seat[data-position="2"] { left: 6%; top: 10%; }
  .oval-seat[data-position="3"] { left: 50%; top: -18%; }
  .oval-seat[data-position="4"] { left: 94%; top: 10%; }
  .oval-seat[data-position="5"] { left: 94%; top: 85%; }

  /* Smaller community cards - fill with larger rank/suit */
  .oval-community .card {
    width: 26px;
    height: 36px;
    padding: 1px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
  }

  .oval-community .card .corner {
    font-size: var(--text-md);
    font-weight: 700;
    line-height: 1;
  }

  .oval-community .card .corner .suit {
    font-size: var(--text-lg);
    margin-top: 1px;
  }

  .oval-community .card .corner.bottom {
    display: none;
  }

  .oval-community .card .pip {
    display: none;
  }

  .oval-community {
    gap: 2px;
  }

  .oval-pot-value {
    font-size: var(--text-sm);
    padding: 2px 6px;
  }

  .pot-chips {
    gap: 2px;
    height: 14px;
    margin-bottom: 2px;
  }

  .pot-chips .chip-pile {
    gap: 0;
  }

  .oval-street {
    font-size: var(--text-xs);
    gap: 4px;
  }

  .oval-center {
    gap: 2px;
  }

  /* Dealer button smaller */
  .dealer-button {
    font-size: var(--text-2xs);
    padding: 1px 4px;
    top: -4px;
  }

  /* Hide action text on mobile to save space */
  .oval-seat-footer {
    margin-top: 1px;
    gap: 2px;
  }

  .oval-seat-action {
    font-size: var(--text-2xs);
    padding: 1px 3px;
  }

  .oval-seat-result {
    font-size: var(--text-2xs);
    padding: 1px 4px;
  }

  .oval-seat-bet {
    font-size: var(--text-2xs);
    gap: 2px;
  }

  /* Chips smaller on mobile */
  .oval-chip {
    width: 10px;
    height: 3px;
  }

  .chip-overflow {
    font-size: var(--text-2xs);
  }

  /* Action panel - at bottom, scrolls into view */
  .actions-panel {
    background: var(--panel);
    border-radius: var(--radius-lg);
    padding: 10px;
    margin-top: 8px;
    flex-shrink: 0;
  }

  .action-row {
    gap: 8px;
    justify-content: center;
    flex-wrap: nowrap;
  }

  .action-row .btn {
    min-height: 44px;
    flex: 1;
    max-width: 100px;
    font-size: var(--text-md);
    padding: 10px 8px;
  }

  .raise-row {
    grid-template-columns: auto 1fr auto;
    gap: 8px;
    margin-top: 8px;
  }

  .raise-label {
    display: none;
  }

  .raise-step {
    width: 40px;
    height: 40px;
    font-size: var(--text-xl);
  }

  .raise-value {
    font-size: var(--text-md);
    min-width: 60px;
    text-align: center;
  }

  /* Hide hotkey grid on mobile */
  .hotkey-grid {
    display: none;
  }

  /* Show mobile rebuy button (hidden by default) */
  .mobile-rebuy-btn {
    display: block;
  }
}

/* ==========================================================================
   Mobile Portrait Layout
   For phones held vertically - table scales to full width, toolbar at bottom
   ========================================================================== */
@media (max-width: 500px) and (min-height: 500px) {
  html, body {
    overflow: auto;
    height: auto;
  }

  .app {
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 100dvh;
    padding: 8px;
    padding-bottom: 60px; /* toolbar clearance */
    gap: 8px;
    max-width: 100%;
  }

  /* Hide sidebar on portrait phones */
  .sidebar {
    display: none;
  }

  /* Main area - flex column layout */
  .main {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    overflow: visible;
  }

  /* Hide log panel on portrait phones */
  .log-panel {
    display: none;
  }

  /* Seats panel contains the oval table */
  .seats-panel {
    flex-shrink: 0;
  }

  /* Oval table - full width, shorter height for portrait */
  .oval-table {
    width: 100%;
    height: 160px;
    margin: 30px 0 90px 0;
  }

  .oval-felt {
    inset: 5%;
  }

  /* Smaller seats for portrait phone */
  .oval-seat {
    width: 100px;
  }

  .oval-seat-card {
    padding: 4px 6px;
    border-radius: var(--radius-md);
  }

  .oval-seat-header {
    gap: 3px;
    margin-bottom: 2px;
  }

  .oval-seat-name {
    font-size: var(--text-xs);
    max-width: 45px;
  }

  .oval-seat-position {
    font-size: var(--text-2xs);
  }

  .oval-seat-stack {
    font-size: var(--text-xs);
  }

  /* Smaller cards on portrait phone */
  .oval-seat-cards .card {
    width: 24px;
    height: 40px;
    padding: 2px;
    border-radius: var(--radius-sm);
  }

  .oval-seat-cards .card .corner {
    font-size: var(--text-base);
  }

  .oval-seat-cards .card .corner .suit {
    font-size: var(--text-base);
    margin-top: 0;
  }

  /* Portrait seat positions - wider spread for taller aspect ratio */
  .oval-seat[data-position="0"] { left: 50%; top: 115%; }
  .oval-seat[data-position="1"] { left: 8%;  top: 80%; }
  .oval-seat[data-position="2"] { left: 8%;  top: 15%; }
  .oval-seat[data-position="3"] { left: 50%; top: -20%; }
  .oval-seat[data-position="4"] { left: 92%; top: 15%; }
  .oval-seat[data-position="5"] { left: 92%; top: 80%; }

  /* Hide street label in portrait — turn summary shows this info */
  .oval-street {
    display: none;
  }

  /* Smaller community cards */
  .oval-community .card {
    width: 26px;
    height: 36px;
    padding: 1px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
  }

  .oval-community .card .corner {
    font-size: var(--text-md);
    font-weight: 700;
    line-height: 1;
  }

  .oval-community .card .corner .suit {
    font-size: var(--text-lg);
    margin-top: 1px;
  }

  .oval-community .card .corner.bottom {
    display: none;
  }

  .oval-community .card .pip {
    display: none;
  }

  .oval-community {
    gap: 2px;
  }

  .oval-pot-value {
    font-size: var(--text-sm);
    padding: 2px 6px;
  }

  .pot-chips {
    gap: 2px;
    height: 14px;
    margin-bottom: 2px;
  }

  .pot-chips .chip-pile {
    gap: 0;
  }

  .oval-street {
    font-size: var(--text-xs);
    gap: 4px;
  }

  .oval-center {
    top: 43%;
    gap: 2px;
  }

  /* Dealer button smaller */
  .dealer-button {
    font-size: var(--text-2xs);
    padding: 1px 4px;
    top: -4px;
  }

  /* Hide action text on mobile to save space */
  .oval-seat-footer {
    margin-top: 1px;
    gap: 2px;
  }

  .oval-seat-action {
    font-size: var(--text-xs);
    padding: 2px 4px;
  }

  .oval-seat-result {
    font-size: var(--text-2xs);
    padding: 1px 4px;
  }

  .oval-seat-bet {
    font-size: var(--text-xs);
    gap: 2px;
  }

  /* Chips smaller on mobile */
  .oval-chip {
    width: 10px;
    height: 3px;
  }

  .chip-overflow {
    font-size: var(--text-2xs);
  }

  /* Action panel styling */
  .actions-panel {
    background: var(--panel);
    border-radius: var(--radius-lg);
    padding: 10px;
    flex-shrink: 0;
  }

  .action-row {
    gap: 6px;
    justify-content: center;
    flex-wrap: nowrap;
  }

  .action-row .btn {
    min-height: 44px;
    flex: 1;
    max-width: 90px;
    font-size: var(--text-md);
    padding: 10px 6px;
  }

  .raise-row {
    grid-template-columns: auto 1fr auto;
    gap: 8px;
    margin-top: 8px;
  }

  .raise-label {
    display: none;
  }

  .raise-step {
    width: 40px;
    height: 40px;
    font-size: var(--text-xl);
  }

  .raise-value {
    font-size: var(--text-md);
    min-width: 60px;
    text-align: center;
  }

  /* Show pot-fraction row as tappable pills on portrait phones */
  .hotkey-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-top: 4px;
    padding-top: 4px;
    border-top: none;
  }

  .hotkey-grid .hotkey-grid-row:first-child {
    display: flex;
    gap: 4px;
    justify-content: center;
  }

  /* Hide second row (Fold/Chk/Call/Sit/Rebuy shortcuts) */
  .hotkey-grid .hotkey-grid-row:nth-child(2) {
    display: none;
  }

  .hotkey-grid .hotkey {
    min-width: 60px;
    padding: 8px 6px;
    border-radius: var(--radius-md);
    background: var(--border-subtle);
    border: 1px solid var(--border);
    font-size: var(--text-sm);
    color: var(--text);
    justify-content: center;
    cursor: pointer;
  }

  .hotkey-grid .hotkey:active {
    background: var(--accent-dim);
  }

  /* Hide kbd elements — just show labels */
  .hotkey-grid .hotkey kbd {
    display: none;
  }

  /* Show mobile rebuy button */
  .mobile-rebuy-btn {
    display: block;
  }

  /* Show mobile toolbar */
  .mobile-toolbar {
    display: flex;
  }
}

.label {
  font-size: var(--text-base);
  color: var(--muted);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
}

.right-info {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas:
    "pot live"
    "street street";
  align-items: center;
  gap: 6px 10px;
}

.community-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.community-header .label {
  margin-bottom: 0;
}

.community-left {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.community-right {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-end;
  min-width: 0;
}

/* Keep the community panel the same size as a 5-card row, but only show dealt cards. */
#community.card-row {
  min-width: 272px; /* 5*48 + 4*8 */
}

.pot-big {
  grid-area: pot;
  font-weight: 900;
  font-size: var(--text-xl);
  letter-spacing: 0.02em;
  color: var(--text);
  background: var(--accent-subtle);
  border: 1px solid var(--btn-allin);
  padding: 6px 10px;
  border-radius: var(--radius-pill);
  user-select: none;
}

.street {
  grid-area: street;
  justify-self: end;
  font-size: var(--text-base);
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.strategy-row {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 4px;
  min-height: 24px;
}

/* Tighten the community panel to reduce vertical pressure on the seats grid. */
.community-panel {
  padding: 10px 12px;
}

.community-panel .label {
  margin-bottom: 6px;
}

.strategy-status {
  font-size: var(--text-sm);
  color: var(--muted);
  white-space: pre-line;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  min-height: 1.6em;
}

.actions-panel.is-hero-turn .strategy-status {
  color: var(--accent-bright);
  background: rgba(255, 200, 60, 0.08);
  font-weight: 600;
}

/* Turn summary: larger, wrapping text in portrait (AC-6: >= 16px) */
@media (max-width: 500px) and (min-height: 500px) {
  .strategy-status {
    font-size: 1rem;
    white-space: normal;
    text-overflow: clip;
    min-height: 2.4em;
    line-height: 1.3;
  }
}

.live-action {
  grid-area: live;
  justify-self: end;
  font-size: var(--text-lg);
  color: var(--text);
  font-weight: 900;
  opacity: 0.95;
  text-align: right;
  max-width: 520px;
  min-height: 32px;
  padding: 6px 10px;
  border-radius: var(--radius-lg);
  background: var(--accent-subtle);
  border: 1px solid var(--accent-dim);
  display: none;
}

.live-action .muted {
  color: var(--muted);
  font-weight: 600;
}

.strategy-hint {
  font-size: var(--text-base);
  color: var(--text);
  opacity: 0.92;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-row {
  display: flex;
  gap: 8px;
  min-height: 58px;
  align-items: center;
  flex-wrap: nowrap;
}

.card {
  width: 48px;
  height: 64px;
  border-radius: var(--radius-lg);
  background: var(--card);
  color: var(--cardText);
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: 8px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  box-shadow: var(--shadow-lg);
  user-select: none;
}

.card.red {
  color: #b41f1f;
}

.corner {
  font-weight: 800;
  font-size: var(--text-base);
  line-height: 1;
}

.suit {
  font-size: var(--text-lg);
}

.pip {
  display: grid;
  place-items: center;
  font-size: var(--text-2xl);
  line-height: 1;
  opacity: 0.9;
}

.corner.bottom {
  transform: rotate(180deg);
  justify-self: end;
}

.card.back {
  background: linear-gradient(135deg, #3b5bd6 0%, #22379a 55%, #142464 100%);
  border: 1px solid var(--border-strong);
  color: rgba(255, 255, 255, 0.85);
}

.card.back .pip {
  font-size: var(--text-2xl);
  opacity: 1;
}

/* Help Modal */
.help-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
}

.help-modal-backdrop {
  position: absolute;
  inset: 0;
  background: var(--backdrop);
}

.help-modal-content {
  position: relative;
  max-width: 560px;
  max-height: 85vh;
  margin: 20px;
  background: var(--panel);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xl);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.help-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-subtle);
}

.help-modal-header h2 {
  margin: 0;
  font-size: var(--text-xl);
  font-weight: 600;
}

.help-close-btn {
  background: none;
  border: none;
  color: var(--muted);
  font-size: var(--text-3xl);
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
  transition: color 0.15s;
}

.help-close-btn:hover {
  color: var(--text);
}

.help-modal-body {
  padding: 20px;
  overflow-y: auto;
  font-size: var(--text-md);
  line-height: 1.5;
}

.help-modal-body section {
  margin-bottom: 20px;
}

.help-modal-body section:last-child {
  margin-bottom: 0;
}

.help-modal-body h3 {
  margin: 0 0 10px 0;
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--text);
}

.help-modal-body p {
  margin: 0 0 8px 0;
  color: var(--muted);
}

.help-modal-body ul {
  margin: 0 0 8px 0;
  padding-left: 20px;
  color: var(--muted);
}

.help-modal-body li {
  margin-bottom: 4px;
}

.help-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 8px;
}

.help-table td {
  padding: 6px 10px;
  border-bottom: 1px solid var(--border-subtle);
}

.help-table td:first-child {
  width: 60px;
  text-align: center;
}

.help-table kbd {
  display: inline-block;
  padding: 3px 8px;
  font-family: ui-monospace, monospace;
  font-size: var(--text-base);
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
}

.help-note {
  font-size: var(--text-base);
  font-style: italic;
  color: var(--muted);
  opacity: 0.8;
}

.help-modal-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.help-version {
  font-size: var(--text-sm);
  color: var(--muted);
  opacity: 0.6;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.help-link {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 2px;
  opacity: 0.8;
  transition: opacity 0.15s;
}

.help-link:hover {
  opacity: 1;
}

/* Privacy Modal */
.privacy-modal {
  position: fixed;
  inset: 0;
  z-index: 110;
  display: flex;
  align-items: center;
  justify-content: center;
}

.privacy-modal-backdrop {
  position: absolute;
  inset: 0;
  background: var(--backdrop);
}

.privacy-modal-content {
  position: relative;
  max-width: 600px;
  max-height: 85vh;
  margin: 20px;
  background: var(--panel);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xl);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.privacy-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-subtle);
}

.privacy-modal-header h2 {
  margin: 0;
  font-size: var(--text-xl);
  font-weight: 600;
}

.privacy-close-btn {
  background: none;
  border: none;
  color: var(--muted);
  font-size: var(--text-3xl);
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
  transition: color 0.15s;
}

.privacy-close-btn:hover {
  color: var(--text);
}

.privacy-modal-body {
  padding: 20px;
  overflow-y: auto;
  font-size: var(--text-md);
  line-height: 1.6;
}

.privacy-modal-body section {
  margin-bottom: 20px;
}

.privacy-modal-body section:last-of-type {
  margin-bottom: 0;
}

.privacy-modal-body h3 {
  margin: 0 0 10px 0;
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--text);
}

.privacy-modal-body p {
  margin: 0 0 8px 0;
  color: var(--muted);
}

.privacy-modal-body ul {
  margin: 0 0 8px 0;
  padding-left: 20px;
  color: var(--muted);
}

.privacy-modal-body li {
  margin-bottom: 4px;
}

.privacy-lead {
  color: var(--text);
  font-size: var(--text-lg);
  line-height: 1.6;
}

.privacy-lead strong {
  color: var(--text);
}

.privacy-code {
  display: inline-block;
  padding: 4px 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: var(--text-base);
  background: var(--border-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  word-break: break-all;
}

.privacy-modal-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--border-subtle);
}

.privacy-footer-note {
  margin: 0;
  font-size: var(--text-base);
  font-style: italic;
  color: var(--muted);
  opacity: 0.8;
}

/* Onboarding Modal */
/* Start Assessment Overlay — shown on fresh session before dealing */
.start-assessment-overlay {
  position: absolute;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  border-radius: var(--radius-lg);
}

.start-assessment-overlay.is-hidden {
  display: none;
}

.start-assessment-content {
  text-align: center;
  padding: 32px 40px;
  background: var(--panel);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xl);
  max-width: 360px;
}

.start-assessment-title {
  margin: 0 0 8px;
  font-size: var(--text-2xl);
  font-weight: 600;
}

.start-assessment-desc {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: var(--text-lg);
  line-height: 1.5;
}

.start-assessment-btn {
  font-size: var(--text-lg);
  padding: 10px 32px;
}

.onboarding-modal {
  position: fixed;
  inset: 0;
  z-index: 250;
  display: flex;
  align-items: center;
  justify-content: center;
}

.onboarding-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
}

.onboarding-modal-content {
  position: relative;
  max-width: 440px;
  width: 90%;
  margin: 20px;
  background: var(--panel);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
}

.onboarding-modal-header {
  padding: 20px 24px 0;
}

.onboarding-modal-header h2 {
  margin: 0;
  font-size: var(--text-2xl);
  font-weight: 600;
}

.onboarding-modal-body {
  padding: 16px 24px 20px;
  line-height: 1.6;
}

.onboarding-modal-body p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: var(--text-lg);
}

.onboarding-modal-body p:last-child {
  margin-bottom: 0;
}

.onboarding-modal-actions {
  padding: 0 24px 24px;
}

.onboarding-modal-actions .btn {
  width: 100%;
  padding: 12px 16px;
  font-size: var(--text-lg);
}

/* Resume Modal */
.resume-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
}

.resume-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
}

.resume-modal-content {
  position: relative;
  max-width: 400px;
  width: 90%;
  margin: 20px;
  background: var(--panel);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
}

.resume-modal-header {
  padding: 20px 24px 0;
}

.resume-modal-header h2 {
  margin: 0;
  font-size: var(--text-2xl);
  font-weight: 600;
}

.resume-modal-body {
  padding: 16px 24px 24px;
}

.resume-summary {
  font-size: var(--text-lg);
  color: var(--muted);
  margin: 0 0 20px;
  line-height: 1.5;
}

.resume-modal-actions {
  display: flex;
  gap: 12px;
}

.resume-modal-actions .btn {
  flex: 1;
  padding: 12px 16px;
  font-size: var(--text-lg);
}

/* Assessment Modal */
.assessment-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
}

.assessment-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
}

.assessment-modal-content {
  position: relative;
  max-width: 400px;
  width: 90%;
  margin: 20px;
  background: var(--panel);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
}

.assessment-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-subtle);
}

.assessment-modal-header h2 {
  margin: 0;
  font-size: var(--text-xl);
  font-weight: 600;
}

.assessment-close-btn {
  background: none;
  border: none;
  color: var(--muted);
  font-size: var(--text-3xl);
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
  transition: color 0.15s;
}

.assessment-close-btn:hover {
  color: var(--text);
}

.assessment-modal-body {
  padding: 16px 20px 20px;
}

.assessment-description {
  margin: 0 0 16px;
  font-size: var(--text-lg);
  color: var(--muted);
  line-height: 1.5;
}
.assessment-disclaimer {
  margin: -8px 0 16px;
  font-size: var(--text-sm);
  font-style: italic;
  color: var(--muted);
  opacity: 0.7;
}

.assessment-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.assessment-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--bg-overlay);
  cursor: pointer;
  transition: all 0.15s;
}

.assessment-option:hover {
  background: var(--border-subtle);
  border-color: var(--border);
}

.assessment-option:has(input:checked) {
  background: var(--accent-subtle);
  border-color: var(--accent-bright);
}

.assessment-option input[type="radio"] {
  appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-full);
  background: transparent;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
}

.assessment-option input[type="radio"]:checked {
  border-color: var(--accent-vivid);
}

.assessment-option input[type="radio"]:checked::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--accent-vivid);
}

.assessment-option-label {
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--text);
  flex: 1;
}

.assessment-option-time {
  font-size: var(--text-base);
  color: var(--muted);
}

.assessment-modal-actions {
  display: flex;
  gap: 12px;
}

.assessment-modal-actions .btn {
  flex: 1;
  padding: 12px 16px;
  font-size: var(--text-lg);
}

/* Assessment Complete Modal */
.assessment-complete-content {
  text-align: center;
}

.assessment-complete-content .assessment-modal-header {
  justify-content: center;
  border-bottom: none;
  padding-bottom: 8px;
}

.assessment-complete-content .assessment-modal-header h2 {
  color: var(--accent-vivid);
}

.assessment-complete-summary {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin-bottom: 16px;
}

.assessment-complete-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.assessment-complete-value {
  font-size: var(--text-4xl);
  font-weight: 800;
  color: var(--text);
  line-height: 1.1;
}

.assessment-complete-label {
  font-size: var(--text-sm);
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 4px;
}

.assessment-complete-message {
  font-size: var(--text-lg);
  color: var(--muted);
  margin: 0 0 20px;
}

/* Assessment Progress HUD */
.assessment-progress {
  padding: 10px 12px;
  border-radius: var(--radius-lg);
  background: var(--accent-subtle);
  border: 1px solid var(--accent-dim);
  margin-bottom: 10px;
}

.assessment-progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.assessment-progress-label {
  font-size: var(--text-sm);
  color: var(--accent-vivid);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.assessment-elapsed {
  font-size: var(--text-base);
  color: var(--muted);
  font-weight: 600;
}

.assessment-progress-bar {
  height: 6px;
  background: var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 8px;
}

.assessment-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, rgba(255, 215, 0, 0.7) 0%, var(--accent-vivid) 100%);
  border-radius: var(--radius-sm);
  transition: width 0.3s ease;
}

.assessment-progress-stats {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.assessment-hands-count {
  font-size: var(--text-base);
  color: var(--text);
  font-weight: 700;
}

.assessment-hands-remaining {
  font-size: var(--text-sm);
  color: var(--muted);
}

/* Progress bar green state when target reached */
.assessment-progress--complete .assessment-progress-fill {
  background: linear-gradient(90deg, var(--color-success) 0%, #22c55e 100%);
}

.assessment-progress--complete .assessment-hands-count {
  color: var(--color-success);
}

/* Assessment milestone toast */
.assessment-toast {
  padding: 8px 12px;
  border-radius: var(--radius-lg);
  background: var(--bg-overlay);
  border: 1px solid var(--accent-dim);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--text-sm);
  animation: toast-slide-in 0.3s ease;
}

.assessment-toast.is-hidden {
  display: none;
}

.assessment-toast.toast-fading {
  opacity: 0;
  transition: opacity 0.5s ease;
}

.assessment-toast-msg {
  flex: 1;
  color: var(--text);
}

.assessment-toast-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.assessment-toast-link {
  color: var(--accent-vivid);
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}

.assessment-toast-link:hover {
  text-decoration: underline;
}

.assessment-toast-dismiss {
  background: none;
  border: none;
  color: var(--muted);
  font-size: var(--text-lg);
  cursor: pointer;
  padding: 0 2px;
  line-height: 1;
}

@keyframes toast-slide-in {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Speed Control */
.speed-control {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-lg);
  background: var(--bg-overlay);
  border: 1px solid var(--border-subtle);
  margin-bottom: 8px;
}

.speed-label {
  font-size: var(--text-sm);
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  flex-shrink: 0;
}

.speed-buttons {
  display: flex;
  gap: 4px;
  flex: 1;
}

.speed-btn {
  flex: 1;
  padding: 6px 8px;
  font-size: var(--text-sm);
  font-weight: 600;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s;
}

.speed-btn:hover {
  background: var(--border-subtle);
  color: var(--text);
}

.speed-btn.is-active {
  background: var(--accent-dim);
  border-color: var(--accent-bright);
  color: var(--accent-vivid);
}

/* Auto-Rebuy Toggle */
.rebuy-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.rebuy-row .btn {
  flex: 1;
  margin-bottom: 0;
}

.auto-rebuy-toggle {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  border-radius: var(--radius-md);
  background: var(--bg-overlay);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.15s;
}

.auto-rebuy-toggle:hover {
  background: var(--border-subtle);
}

.auto-rebuy-toggle:has(input:checked) {
  background: var(--accent-dim);
  border-color: var(--accent-bright);
}

.auto-rebuy-toggle input[type="checkbox"] {
  appearance: none;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-sm);
  background: transparent;
  cursor: pointer;
  position: relative;
}

.auto-rebuy-toggle input[type="checkbox"]:checked {
  border-color: var(--accent-vivid);
  background: var(--accent-vivid);
}

.auto-rebuy-toggle input[type="checkbox"]:checked::after {
  content: "✓";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: var(--text-sm);
  color: #000;
  font-weight: 700;
}

.auto-rebuy-label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.auto-rebuy-toggle:has(input:checked) .auto-rebuy-label {
  color: var(--accent-vivid);
}

/* ==========================================================================
   Report View
   ========================================================================== */
.report-view {
  position: absolute;
  inset: 0;
  overflow: auto;
  z-index: 3;
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr;
  grid-auto-rows: min-content;
}

.report-panel {
  padding: 14px 16px;
}

.report-header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.report-overall {
  font-size: var(--text-base);
  color: var(--muted);
  font-weight: 600;
}

.report-copy-btn {
  white-space: nowrap;
  min-width: 90px;
  text-align: center;
}

.report-copy-fallback {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
}

.report-copy-fallback-backdrop {
  position: absolute;
  inset: 0;
  background: var(--backdrop);
}

.report-copy-fallback-box {
  position: relative;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px;
  width: min(90vw, 460px);
  max-height: 70vh;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.report-copy-fallback-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--text-md);
  font-weight: 700;
}

.report-copy-fallback-text {
  width: 100%;
  height: 260px;
  resize: none;
  background: var(--bg-overlay);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  font-family: monospace;
  font-size: var(--text-sm);
  padding: 10px;
}

/* ── Waitlist CTA ──────────────────────────────────────────────────── */

.report-waitlist-cta {
  margin-top: 14px;
  padding: 14px 16px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-overlay);
}

.report-waitlist-title {
  font-size: var(--text-md);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.report-waitlist-desc {
  font-size: var(--text-base);
  color: var(--text-muted);
  line-height: 1.4;
  margin: 0 0 10px;
}

.report-waitlist-form {
  display: flex;
  gap: 8px;
  align-items: center;
}

.report-waitlist-input {
  flex: 1;
  min-width: 0;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-overlay);
  color: var(--text);
  font-size: var(--text-base);
  font-family: inherit;
}

.report-waitlist-input::placeholder {
  color: var(--text-muted);
  opacity: 0.6;
}

.report-waitlist-input:focus {
  outline: none;
  border-color: var(--accent, #5b8def);
}

.report-waitlist-btn {
  flex-shrink: 0;
}

.report-waitlist-note {
  font-size: var(--text-sm);
  color: var(--text-muted);
  opacity: 0.6;
  margin: 6px 0 0;
}

.report-waitlist-confirmed {
  font-size: var(--text-base);
  color: var(--text-muted);
  padding: 10px 16px;
}

.report-waitlist-check {
  color: #4caf50;
  margin-right: 4px;
}

/* Mobile portrait: stack form vertically */
@media (max-width: 500px) {
  .report-waitlist-form {
    flex-direction: column;
    align-items: stretch;
  }
}

/* ── Report sections ──────────────────────────────────────────────── */

.report-section {
  margin-top: 14px;
}

.report-section-title {
  font-size: var(--text-base);
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}

.report-confidence-banner {
  padding: 10px 14px;
  border-radius: var(--radius-lg);
  font-size: var(--text-md);
  margin-bottom: 10px;
}

.report-confidence-low {
  background: rgba(255, 107, 107, 0.1);
  border: 1px solid rgba(255, 107, 107, 0.25);
  color: #ff9b9b;
}

.report-confidence-medium {
  background: var(--accent-subtle);
  border: 1px solid var(--accent-dim);
  color: var(--accent-vivid);
}

.report-coverage-note {
  padding: 8px 12px;
  border-radius: var(--radius-md);
  background: var(--bg-overlay);
  border: 1px solid var(--border-subtle);
  font-size: var(--text-base);
  color: var(--muted);
  margin-bottom: 10px;
}

.report-leak-card {
  padding: 12px 14px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  background: var(--bg-overlay);
  margin-bottom: 8px;
  cursor: pointer;
  transition: background 0.15s;
}

.report-leak-card:hover {
  background: var(--border-subtle);
}

.report-leak-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.report-leak-name {
  font-size: var(--text-md);
  font-weight: 700;
  color: var(--text);
  flex: 1;
}

.report-leak-stat {
  font-size: var(--text-base);
  color: var(--muted);
  white-space: nowrap;
}

.report-leak-expand {
  font-size: var(--text-sm);
  color: var(--muted);
  flex-shrink: 0;
}

.report-severity-high {
  border-left: 3px solid rgba(255, 107, 107, 0.6);
}

.report-severity-medium {
  border-left: 3px solid rgba(255, 215, 0, 0.5);
}

.report-severity-low {
  border-left: 3px solid rgba(57, 217, 138, 0.4);
}

.report-leak-tip {
  margin-top: 8px;
  font-size: var(--text-base);
  color: var(--muted);
  line-height: 1.4;
  padding-left: 2px;
}

.report-drilldown {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border-subtle);
}

.report-low-sample {
  font-size: var(--text-sm);
  color: var(--accent-vivid);
  margin-bottom: 8px;
  font-style: italic;
}

.report-freq-compare {
  display: grid;
  gap: 6px;
}

.report-freq-row {
  display: flex;
  gap: 16px;
  font-size: var(--text-base);
  color: var(--text);
  align-items: center;
}

.report-freq-label {
  font-size: var(--text-sm);
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  min-width: 60px;
}

.report-hands-table-wrap {
  margin-top: 10px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.report-hands-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-base);
}

.report-hands-table th,
.report-hands-table td {
  padding: 6px 10px;
  border-bottom: 1px solid var(--bg-overlay);
  text-align: left;
}

.report-hands-table thead th {
  background: var(--bg-overlay);
  color: var(--muted);
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.report-stats-table-wrap {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.report-stats-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-base);
}

.report-stats-table th,
.report-stats-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border-subtle);
  text-align: right;
  white-space: nowrap;
}

.report-stats-table th:first-child,
.report-stats-table td:first-child {
  text-align: left;
}

.report-stats-table thead th {
  background: rgba(17, 26, 46, 0.95);
  color: var(--muted);
  text-transform: uppercase;
  font-size: var(--text-sm);
  letter-spacing: 0.06em;
}

.report-pos-row {
  cursor: pointer;
  transition: background 0.15s;
}

.report-pos-row:hover {
  background: var(--bg-overlay);
}

.report-pos-expand {
  font-size: var(--text-sm);
  color: var(--muted);
}

.report-pos-detail {
  padding: 10px 14px;
}

.report-no-leaks {
  padding: 16px 14px;
  border-radius: var(--radius-lg);
  background: rgba(57, 217, 138, 0.08);
  border: 1px solid rgba(57, 217, 138, 0.2);
  color: rgba(57, 217, 138, 0.9);
  font-size: var(--text-md);
  font-weight: 600;
}

.report-early-exit {
  padding: 16px 14px;
  border-radius: var(--radius-lg);
  background: rgba(255, 215, 0, 0.06);
  border: 1px solid rgba(255, 215, 0, 0.15);
}

.report-early-exit-title {
  font-size: var(--text-md);
  font-weight: 700;
  color: var(--text);
  margin: 0 0 6px;
}

.report-early-exit-hint {
  font-size: var(--text-sm);
  color: var(--muted);
  margin: 0;
}

.report-sparse-note {
  font-size: var(--text-sm);
  color: var(--muted);
  padding: 6px 0 4px;
  font-style: italic;
}

.report-empty {
  padding: 24px 16px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 300px;
}

.report-empty-title {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--text);
  margin: 0 0 8px;
}

.report-empty-hint {
  font-size: var(--text-md);
  color: var(--muted);
  margin: 0;
}

.report-empty-cta {
  margin-top: 20px;
  width: auto;
  padding: 10px 32px;
}

/* ── Session story ─────────────────────────────────────────────────────────── */

.report-story-headline {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 14px 16px;
  margin-bottom: 4px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.04);
}

.story-headline-text {
  font-size: var(--text-lg);
  font-weight: 800;
  color: var(--text);
}

.story-headline-result {
  font-size: var(--text-md);
  font-weight: 700;
}

.story-result-positive {
  color: #39d98a;
}

.story-result-negative {
  color: #ff6b6b;
}

.report-story-momentum {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.story-momentum-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 12px;
  min-width: 80px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
}

.story-stat-label {
  font-size: var(--text-xs);
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.story-stat-value {
  font-size: var(--text-md);
  font-weight: 700;
  color: var(--text);
}

.story-stat-detail {
  font-size: var(--text-xs);
  color: var(--muted);
}

.story-momentum-rebuys {
  font-size: var(--text-sm);
  color: var(--muted);
  margin-top: 6px;
  padding: 4px 0;
}

.story-keyhand-card .report-leak-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.story-keyhand-num {
  font-size: var(--text-sm);
  color: var(--muted);
  min-width: 60px;
}

.story-keyhand-hole {
  font-size: var(--text-md);
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.5px;
}

.suit-red {
  color: #e74c3c;
}

.suit-dark {
  color: var(--text);
}

.story-keyhand-result {
  font-size: var(--text-sm);
  color: var(--muted);
}

.story-keyhand-net {
  font-weight: 700;
  font-size: var(--text-md);
  margin-left: auto;
}

.story-keyhand-detail {
  padding: 8px 14px;
  font-size: var(--text-sm);
  color: var(--muted);
  border-top: 1px solid var(--border-subtle);
}

.story-keyhand-deviation {
  color: #ff6b6b;
  font-weight: 600;
}

/* Key Hand Review (O-427) */
.khr-count {
  font-size: var(--text-sm);
  color: var(--muted);
  font-weight: 400;
  margin-left: 4px;
}

.khr-empty {
  padding: 12px 14px;
  color: var(--muted);
  font-size: var(--text-sm);
  font-style: italic;
}

.khr-note {
  padding: 8px 14px;
  color: var(--muted);
  font-size: var(--text-xs);
  font-style: italic;
}

.khr-reason {
  padding: 2px 14px 6px;
  font-size: var(--text-xs);
  color: var(--muted);
}

.khr-timeline {
  padding: 4px 14px 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.khr-street-row {
  border-left: 3px solid var(--border-subtle);
  padding-left: 10px;
}

.khr-street-header {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.khr-street-label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text);
  min-width: 55px;
}

.khr-board {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.5px;
}

.khr-action {
  font-size: var(--text-sm);
  color: var(--accent-dim);
  font-weight: 600;
}

.khr-analysis {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  padding: 2px 0 4px;
  font-size: var(--text-xs);
}

.khr-strength {
  color: var(--text);
  font-weight: 500;
}

.khr-outs {
  color: var(--muted);
}

.khr-pot-odds {
  color: var(--muted);
}

.khr-equity {
  color: var(--accent-dim);
  font-weight: 600;
}

.khr-reasoning {
  color: var(--muted);
  font-style: italic;
  flex-basis: 100%;
}

.khr-badge {
  display: inline-block;
  padding: 1px 6px;
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.khr-badge-correct {
  background: rgba(46, 204, 113, 0.15);
  color: #2ecc71;
}

.khr-badge-marginal {
  background: rgba(241, 196, 15, 0.15);
  color: #f1c40f;
}

.khr-badge-mistake {
  background: rgba(231, 76, 60, 0.15);
  color: #e74c3c;
}

.report-story-diagnosis {
  padding: 12px 14px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
}

.report-story-diagnosis p {
  margin: 0 0 8px;
  font-size: var(--text-md);
  color: var(--text-secondary);
  line-height: 1.5;
}

.report-story-diagnosis p:last-child {
  margin-bottom: 0;
}

.story-diagnosis-text {
  color: var(--text-secondary);
}

.story-whatif-text {
  color: var(--accent-vivid);
  font-weight: 600;
}

.story-whatif-clean {
  color: #39d98a;
}

/* ── Tilt & Trends (O-425) ────────────────────────────────────────────────── */

.report-story-tilt {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tilt-assessment {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.tilt-label {
  font-weight: 700;
  font-size: 0.95em;
}

.tilt-description {
  color: var(--text-secondary);
  font-size: 0.85em;
}

.tilt-label-steady .tilt-label { color: #39d98a; }
.tilt-label-drift .tilt-label { color: var(--accent-vivid); }
.tilt-label-likely .tilt-label { color: #e8a838; }
.tilt-label-strong .tilt-label { color: #e85858; }

.tilt-label-steady { background: rgba(57, 217, 138, 0.06); border-color: rgba(57, 217, 138, 0.15); }
.tilt-label-drift { background: rgba(232, 168, 56, 0.04); border-color: rgba(232, 168, 56, 0.1); }
.tilt-label-likely { background: rgba(232, 168, 56, 0.08); border-color: rgba(232, 168, 56, 0.2); }
.tilt-label-strong { background: rgba(232, 88, 88, 0.08); border-color: rgba(232, 88, 88, 0.2); }

.tilt-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tilt-metric {
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.85em;
}

.tilt-metric-label {
  color: var(--text-secondary);
}

.tilt-metric-value {
  font-weight: 600;
  color: var(--text-primary);
}

.tilt-metric-detail {
  color: var(--text-muted);
  font-size: 0.9em;
}

.tilt-before-after {
  margin-top: 4px;
}

.tilt-ba-header {
  font-size: 0.85em;
  color: var(--text-secondary);
  margin-bottom: 6px;
  font-weight: 600;
}

.tilt-ba-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85em;
}

.tilt-ba-table th,
.tilt-ba-table td {
  padding: 4px 8px;
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
}

.tilt-ba-table th {
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.9em;
}

.tilt-ba-table td:first-child {
  color: var(--text-secondary);
}

/* ── Behavioral analysis ──────────────────────────────────────────────────── */

.behavioral-subsection {
  padding: 10px 14px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  margin-bottom: 8px;
}

.behavioral-subtitle {
  font-size: var(--text-xs);
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
  font-weight: 600;
}

.behavioral-pos-row,
.behavioral-bracket-row,
.behavioral-street-row,
.behavioral-showdown-row,
.behavioral-aggr-stat,
.behavioral-blind-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px 0;
  font-size: var(--text-sm);
}

.behavioral-pos-label,
.behavioral-bracket-label,
.behavioral-street-label,
.behavioral-showdown-cat,
.behavioral-aggr-label,
.behavioral-blind-label {
  min-width: 60px;
  color: var(--muted);
  font-weight: 600;
}

.behavioral-pos-value,
.behavioral-bracket-net,
.behavioral-street-net,
.behavioral-aggr-value,
.behavioral-blind-value {
  font-weight: 700;
  min-width: 72px;
}

.behavioral-pos-detail,
.behavioral-bracket-detail,
.behavioral-street-detail {
  color: var(--muted);
  font-size: var(--text-xs);
  margin-left: auto;
}

.behavioral-bracket-winrate,
.behavioral-showdown-wins {
  color: var(--text-secondary);
}

.behavioral-showdown-total {
  font-size: var(--text-sm);
  color: var(--muted);
  margin-bottom: 4px;
}

.behavioral-insight {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  padding-top: 6px;
  line-height: 1.4;
}

.behavioral-flag {
  color: var(--accent-vivid);
  font-weight: 600;
}

/* ── Fold-streak nudge ─────────────────────────────────────────────────────── */

.fold-nudge {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--accent-dim) 15%, transparent);
  border: 1px solid var(--border-subtle);
  color: var(--muted);
  font-size: var(--text-sm);
  line-height: 1.4;
}

.fold-nudge strong {
  color: var(--text-primary);
}

.fold-nudge-dismiss {
  flex-shrink: 0;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 18px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}

.fold-nudge-dismiss:hover {
  color: var(--text-primary);
}

/* ── Debug copy fallback ───────────────────────────────────────────────────── */

.debug-copy-fallback {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.debug-copy-fallback-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
}

.debug-copy-fallback-box {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  width: min(90vw, 500px);
}

.debug-copy-fallback-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.debug-copy-fallback-text {
  width: 100%;
  height: 280px;
  background: var(--bg);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: var(--text-sm);
  resize: none;
}

/* ── Reduced motion preference ─────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  :root {
    --anim-scale: 0;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0s !important;
    animation-delay: 0s !important;
    transition-duration: 0s !important;
    transition-delay: 0s !important;
  }
}
