:root {
  --void: #edf1f7;
  --void-deep: #e4e9f1;
  --panel: #fbfcfe;
  --panel-raised: #fbfcfe;
  --panel-soft: #f3f6fa;
  --ink: #131a27;
  --ink-soft: #354154;
  --muted: #667387;
  --dim: #687487;
  --accent: #2458d6;
  --accent-ink: #f8faff;
  --accent-soft: rgba(36, 88, 214, 0.09);
  --accent-border: rgba(36, 88, 214, 0.32);
  --aggressive: #c94f55;
  --aggressive-strong: #df676c;
  --passive: #23785d;
  --passive-strong: #369578;
  --fold: #d8dee8;
  --fold-strong: #aeb8c8;
  --border: rgba(27, 45, 74, 0.11);
  --border-strong: rgba(27, 45, 74, 0.2);
  --danger: #bd3e47;
  --warning: #aa671d;
  --success: #1f7a5e;
  --card-face: #fbfcfe;
  --card-edge: #c9d1dc;
  --suit-spade: #202a39;
  --suit-heart: #c83246;
  --suit-diamond: #2368bf;
  --suit-club: #20805b;
  --shadow: 0 16px 38px rgba(55, 72, 99, 0.12);
  --radius-sm: 4px;
  --radius-md: 7px;
  --radius-lg: 10px;
  --sidebar: 316px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color-scheme: light;
}

*, *::before, *::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  background: var(--void-deep);
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100dvh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 76% -15%, rgba(36, 88, 214, 0.08), transparent 32%),
    var(--void);
  color: var(--ink);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 20;
  pointer-events: none;
  opacity: 0.022;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.75' numOctaves='4'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

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

button, select {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
[role="gridcell"]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 100;
  transform: translateY(-160%);
  padding: 10px 14px;
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-md);
  background: var(--panel-raised);
  color: var(--ink);
  text-decoration: none;
}

.skip-link:focus {
  transform: translateY(0);
}

.app-shell {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: var(--sidebar) minmax(0, 1fr);
  min-height: 100dvh;
}

.sidebar {
  position: sticky;
  top: 0;
  z-index: 30;
  height: 100dvh;
  overflow: auto;
  border-right: 1px solid var(--border);
  background: rgba(10, 13, 18, 0.96);
  scrollbar-width: thin;
  scrollbar-color: var(--fold-strong) transparent;
}

.brand-row {
  position: sticky;
  top: 0;
  z-index: 4;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  background: rgba(10, 13, 18, 0.94);
  backdrop-filter: blur(12px);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-md);
  background: var(--accent-soft);
  color: var(--accent);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.brand-name {
  color: var(--ink);
  font-size: 15px;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.brand-version,
.panel-kicker,
.stage-label,
.breadcrumb {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.brand-version {
  margin-top: 3px;
  color: var(--dim);
}

.icon-button {
  display: inline-grid;
  place-items: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--muted);
}

.icon-button:hover {
  border-color: var(--border);
  background: var(--panel-raised);
  color: var(--ink);
}

.sidebar-close,
.mobile-menu {
  display: none;
}

.setup-form {
  display: grid;
  gap: 0;
  padding: 8px 16px 24px;
}

.preflop-setup {
  display: grid;
}

fieldset {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 16px 0;
  border: 0;
  border-bottom: 1px solid var(--border);
}

legend {
  width: 100%;
  margin-bottom: 12px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 700;
}

.field-grid {
  display: grid;
  gap: 10px;
}

.field-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
}

.field-label {
  display: block;
}

.field small,
.detail-help,
.fieldset-note,
.local-only {
  margin: 0;
  color: var(--dim);
  font-size: 10px;
  font-weight: 450;
  line-height: 1.5;
  text-wrap: pretty;
}

.range-source-status {
  display: flex;
  align-items: flex-start;
  gap: 5px;
}

.range-source-status::before {
  content: "";
  flex: 0 0 auto;
  width: 6px;
  height: 6px;
  margin-top: 4px;
  border-radius: 50%;
  background: var(--dim);
}

.range-source-status.is-library {
  color: var(--success);
}

.range-source-status.is-library::before {
  background: var(--success);
}

.range-source-status.is-missing {
  color: var(--danger);
  font-weight: 650;
}

.range-source-status.is-missing::before {
  background: var(--danger);
}

.range-source-status.is-manual {
  color: var(--warning);
}

.range-source-status.is-manual::before {
  background: var(--warning);
}

.range-source-status.is-observed {
  color: var(--warning);
  font-weight: 650;
}

.range-source-status.is-observed::before {
  background: var(--warning);
}

input,
select,
textarea {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: #0e1218;
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

input,
select {
  padding: 0 10px;
}

textarea {
  min-height: 76px;
  resize: vertical;
  padding: 9px 10px;
  line-height: 1.45;
}

input:hover,
select:hover,
textarea:hover {
  border-color: rgba(226, 232, 240, 0.26);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent-border);
  background: #10151c;
  box-shadow: 0 0 0 3px rgba(214, 167, 87, 0.09);
  outline: 0;
}

input[aria-invalid="true"],
textarea[aria-invalid="true"] {
  border-color: rgba(223, 123, 114, 0.72);
  box-shadow: 0 0 0 3px rgba(223, 123, 114, 0.08);
}

.board-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.board-field:first-child {
  grid-column: 1 / -1;
}

.card-input-button {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  min-height: 54px;
  padding: 5px 8px;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: #0e1218;
  color: var(--ink);
  text-align: left;
  transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.card-input-button:hover {
  border-color: rgba(226, 232, 240, 0.26);
  background: #10151c;
}

.card-input-cards,
.card-cluster,
.chance-card-face {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.card-input-action {
  margin-left: auto;
  color: var(--accent);
  font-size: 9px;
  font-weight: 750;
}

.playing-card {
  --card-suit: var(--suit-spade);
  display: grid;
  grid-template-rows: auto 1fr;
  flex: 0 0 auto;
  width: 38px;
  height: 50px;
  padding: 4px 5px;
  overflow: hidden;
  border: 1px solid var(--card-edge);
  border-radius: 6px;
  background: var(--card-face);
  color: var(--card-suit);
  box-shadow: 0 5px 13px rgba(3, 5, 8, 0.22);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  line-height: 1;
}

.playing-card.suit-s { --card-suit: var(--suit-spade); }
.playing-card.suit-h { --card-suit: var(--suit-heart); }
.playing-card.suit-d { --card-suit: var(--suit-diamond); }
.playing-card.suit-c { --card-suit: var(--suit-club); }

.playing-card strong {
  color: inherit;
  font-size: 17px;
  font-weight: 850;
  letter-spacing: -0.08em;
}

.playing-card .suit-symbol {
  align-self: end;
  justify-self: end;
  color: inherit;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
  line-height: 0.8;
  transform: translateY(1px);
}

.playing-card.is-placeholder {
  border-color: var(--border-strong);
  border-style: dashed;
  background: var(--panel-soft);
  box-shadow: none;
}

.playing-card.is-input {
  width: 31px;
  height: 42px;
  padding: 3px 4px;
  border-radius: 5px;
}

.playing-card.is-input strong { font-size: 13px; }
.playing-card.is-input .suit-symbol { font-size: 18px; }

.advanced {
  border-bottom: 1px solid var(--border);
}

.preflop-action-panel {
  margin-top: 14px;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  background: rgba(19, 24, 32, 0.72);
  box-shadow: inset 0 1px 0 rgba(237, 240, 245, 0.03);
}

.preflop-action-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 13px 13px 9px;
}

.preflop-action-header h2 {
  margin: 3px 0 0;
  color: var(--ink);
  font-size: 14px;
  line-height: 1;
  letter-spacing: -0.02em;
}

.preflop-action-tools {
  display: flex;
  align-items: center;
  gap: 2px;
}

.preflop-action-tools .text-button {
  min-height: 44px;
  padding: 0 5px;
  font-size: 9px;
}

.preflop-action-description {
  margin: 0;
  padding: 0 13px 11px;
  color: var(--dim);
  font-size: 9px;
  line-height: 1.5;
  text-wrap: pretty;
}

.preflop-decision {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  margin: 0 12px;
  padding: 10px;
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-md);
  background: var(--accent-soft);
}

.preflop-decision-hand {
  display: inline-flex;
  gap: 4px;
}

.preflop-decision-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.preflop-decision-copy > span {
  color: var(--accent);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 8px;
  font-weight: 750;
  letter-spacing: 0.06em;
}

.preflop-decision-copy strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preflop-decision-copy small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 450;
  line-height: 1.4;
  text-wrap: pretty;
}

.preflop-action-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  padding: 10px 12px 0;
}

.preflop-action-options:empty {
  display: none;
}

.preflop-action-button {
  min-height: 44px;
  padding: 0 9px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--panel-raised);
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 750;
  transition: border-color 140ms ease, background 140ms ease, transform 140ms cubic-bezier(.16,1,.3,1);
}

.preflop-action-button:hover {
  transform: translateY(-1px);
}

.preflop-action-button.is-fold:hover {
  border-color: rgba(137, 147, 163, 0.38);
  background: var(--fold);
}

.preflop-action-button.is-passive {
  border-color: rgba(98, 173, 144, 0.24);
  background: rgba(54, 120, 95, 0.12);
}

.preflop-action-button.is-passive:hover {
  border-color: rgba(98, 173, 144, 0.48);
  background: rgba(54, 120, 95, 0.2);
}

.preflop-raise-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px;
  padding: 9px 12px 12px;
}

.preflop-raise-control[hidden] {
  display: none;
}

.preflop-raise-control label {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 9px;
  font-weight: 650;
}

.preflop-raise-control input,
.preflop-raise-control .button {
  min-height: 40px;
}

.preflop-raise-control .button {
  padding-inline: 12px;
  font-size: 10px;
}

.preflop-history {
  border-top: 1px solid var(--border);
  background: rgba(8, 10, 14, 0.24);
}

.preflop-history-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px 8px;
  color: var(--dim);
  font-size: 8px;
}

.preflop-history-head strong {
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 8px;
  font-weight: 700;
}

#preflopActionPath {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0 12px 11px;
  list-style: none;
}

.preflop-history-item {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 5px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--panel-soft);
}

.preflop-history-item > span {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  color: var(--dim);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 8px;
  font-weight: 800;
}

.preflop-history-item > div {
  display: grid;
  gap: 2px;
}

.preflop-history-item strong {
  color: var(--ink-soft);
  font-size: 9px;
}

.preflop-history-item small {
  color: var(--muted);
  font-size: 9px;
}

.preflop-history-item.is-raise {
  border-color: rgba(215, 107, 98, 0.22);
  background: rgba(168, 74, 69, 0.08);
}

.preflop-history-item.is-call,
.preflop-history-item.is-check,
.preflop-history-item.is-limp {
  border-color: rgba(98, 173, 144, 0.2);
  background: rgba(54, 120, 95, 0.07);
}

.preflop-line-note {
  margin: 0;
  padding: 9px 12px 11px;
  border-top: 1px solid var(--border);
  color: var(--dim);
  font-size: 9px;
  line-height: 1.5;
  text-wrap: pretty;
}

.strategy-template {
  margin: 14px 0 4px;
  overflow: hidden;
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-lg);
  background: rgba(214, 167, 87, 0.045);
  box-shadow: inset 0 1px 0 rgba(237, 240, 245, 0.035);
}

.template-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 13px 10px;
}

.template-header h2,
.card-picker-header h2 {
  margin: 3px 0 0;
  color: var(--ink);
  font-size: 14px;
  line-height: 1;
  letter-spacing: -0.02em;
}

.template-status,
.template-mode {
  color: var(--accent);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 8px;
  font-weight: 750;
  letter-spacing: 0.1em;
}

.template-mode {
  padding: 5px 7px;
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  letter-spacing: 0.04em;
}

.template-description {
  margin: 0;
  padding: 0 13px 12px;
  color: var(--dim);
  font-size: 9px;
  line-height: 1.5;
  text-wrap: pretty;
}

.solve-profile-control {
  display: grid;
  grid-template-columns: minmax(118px, .72fr) minmax(0, 1.28fr);
  align-items: end;
  gap: 10px;
  padding: 0 12px 12px;
}

.solve-profile-control p {
  margin: 0 0 2px;
  color: var(--dim);
  font-size: 9px;
  line-height: 1.45;
  text-wrap: pretty;
}

.solve-scale-notice {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  margin: 0 12px 12px;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-left-width: 3px;
  border-radius: var(--radius-md);
  background: rgba(31, 122, 94, 0.045);
}

.solve-scale-notice > span {
  color: var(--success);
  font-size: 9px;
  font-weight: 800;
  white-space: nowrap;
}

.solve-scale-notice p {
  margin: 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.45;
}

.solve-scale-notice[data-level="medium"] {
  border-left-color: var(--warning);
  background: rgba(170, 103, 29, 0.055);
}

.solve-scale-notice[data-level="medium"] > span { color: var(--warning); }

.solve-scale-notice[data-level="high"] {
  border-color: rgba(189, 62, 71, 0.24);
  border-left-color: var(--danger);
  background: rgba(189, 62, 71, 0.06);
}

.solve-scale-notice[data-level="high"] > span { color: var(--danger); }

.template-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: rgba(8, 10, 14, 0.28);
}

.template-summary div {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 9px 8px;
  border-right: 1px solid var(--border);
}

.template-summary div:last-child { border-right: 0; }

.template-summary span {
  color: var(--dim);
  font-size: 8px;
}

.template-summary strong {
  overflow: hidden;
  color: var(--ink-soft);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 9px;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.template-section {
  padding: 0 12px;
  border-bottom: 1px solid var(--border);
}

.template-section summary {
  display: flex;
  align-items: center;
  min-height: 42px;
  list-style: none;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.template-section summary::-webkit-details-marker { display: none; }
.template-section summary::after { content: "+"; margin-left: auto; color: var(--dim); }
.template-section[open] summary::after { content: "−"; }
.template-section > :not(summary) { margin-bottom: 10px; }

.template-budget {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 12px;
}

.advanced summary,
.model-card summary {
  display: flex;
  align-items: center;
  min-height: 46px;
  list-style: none;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.advanced summary::-webkit-details-marker,
.model-card summary::-webkit-details-marker {
  display: none;
}

.advanced summary::after,
.model-card summary::after {
  content: "+";
  margin-left: auto;
  color: var(--dim);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.advanced[open] summary::after,
.model-card[open] summary::after {
  content: "−";
}

.advanced > :not(summary) {
  margin-bottom: 12px;
}

.compact-fields {
  padding-bottom: 4px;
}

.form-error {
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(223, 123, 114, 0.32);
  border-radius: var(--radius-md);
  background: rgba(223, 123, 114, 0.08);
  color: #efb1ab;
  font-size: 11px;
  line-height: 1.45;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
  transition: transform 140ms cubic-bezier(.16,1,.3,1), border-color 140ms ease, background 140ms ease;
}

.button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.button:active:not(:disabled) {
  transform: translateY(0);
}

.button.primary {
  border-color: #e1b667;
  background: var(--accent);
  color: var(--accent-ink);
}

.button.primary:hover:not(:disabled) {
  background: #e0b563;
}

.button.secondary {
  border-color: var(--border-strong);
  background: var(--panel-raised);
  color: var(--ink-soft);
}

.button:disabled {
  opacity: 0.46;
}

.solve-button {
  width: 100%;
  margin-top: 16px;
}

.button-indicator {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.65;
}

.solve-button.is-running .button-indicator {
  animation: pulse 1.2s ease-in-out infinite;
}

.local-only {
  margin-top: 9px;
  text-align: center;
}

.main-column {
  min-width: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 18;
  display: flex;
  align-items: center;
  min-height: 60px;
  padding: 0 24px;
  border-bottom: 1px solid var(--border);
  background: rgba(11, 14, 19, 0.88);
  backdrop-filter: blur(14px);
}

.breadcrumb {
  color: var(--dim);
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.engine-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  padding: 0 9px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.018);
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  transition: border-color 140ms ease, background 140ms ease;
}

.engine-status:hover {
  border-color: var(--accent-border);
  background: var(--accent-soft);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--dim);
  box-shadow: 0 0 0 3px rgba(98, 109, 126, 0.1);
}

.engine-status.is-ready {
  color: var(--success);
}

.engine-status.is-ready .status-dot {
  background: var(--success);
  box-shadow: 0 0 0 3px rgba(101, 183, 151, 0.1);
}

.engine-status.is-error {
  color: var(--danger);
}

.engine-status.is-error .status-dot {
  background: var(--danger);
  box-shadow: 0 0 0 3px rgba(223, 123, 114, 0.1);
}

#workspace {
  width: min(1580px, 100%);
  margin: 0 auto;
  padding: 22px 24px 36px;
}

.view-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  min-height: 108px;
  padding: 14px 0 20px;
}

.stage-label,
.panel-kicker {
  color: var(--accent);
}

.view-heading h1 {
  margin: 7px 0 5px;
  color: var(--ink);
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 0.95;
  text-wrap: balance;
}

.view-heading p {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
  text-wrap: pretty;
}

.hand-journey {
  margin-bottom: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: rgba(17, 21, 28, 0.82);
  box-shadow: var(--shadow);
}

.journey-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 58px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}

.journey-header h2 {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: 780;
  letter-spacing: -0.02em;
}

.journey-header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
  text-wrap: pretty;
}

.journey-header > span {
  flex: 0 0 auto;
  padding: 5px 8px;
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 9px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}

.journey-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.journey-steps li {
  min-width: 0;
  border-right: 1px solid var(--border);
}

.journey-steps li:last-child { border-right: 0; }

.journey-step {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 9px;
  width: 100%;
  min-height: 68px;
  padding: 9px 11px;
  border: 0;
  background: transparent;
  color: var(--muted);
  text-align: left;
}

.journey-step > span {
  display: grid;
  grid-row: 1 / 3;
  place-items: center;
  width: 27px;
  height: 27px;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  background: var(--panel-soft);
  color: var(--dim);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  font-weight: 800;
}

.journey-step strong {
  align-self: end;
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 720;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.journey-step small {
  align-self: start;
  overflow: hidden;
  color: var(--dim);
  font-size: 10px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.journey-step:hover:not(:disabled) {
  background: rgba(237, 240, 245, 0.025);
}

.journey-step:disabled {
  cursor: default;
  opacity: 1;
}

.journey-step.is-complete > span {
  border-color: rgba(101, 183, 151, 0.36);
  background: rgba(101, 183, 151, 0.1);
  color: var(--success);
}

.journey-step.is-locked > span {
  font-size: 0;
}

.journey-step.is-locked > span::after {
  content: "✓";
  font-size: 10px;
}

.journey-step.is-locked small {
  color: var(--success);
}

.journey-step.is-upcoming {
  opacity: 0.62;
}

.journey-step.is-current {
  background: linear-gradient(90deg, rgba(214, 167, 87, 0.18), rgba(214, 167, 87, 0.08));
  box-shadow: inset 0 -2px 0 rgba(214, 167, 87, 0.72);
}

.journey-step.is-current > span {
  border-color: var(--accent-border);
  background: var(--accent);
  color: var(--accent-ink);
}

.journey-step.is-current strong { color: var(--ink); }
.journey-step.is-current small { color: var(--muted); }

.journey-step.is-running > span {
  animation: pulse 1.2s ease-in-out infinite;
}

.journey-rail {
  height: 3px;
  background: var(--panel-soft);
}

.journey-rail span {
  display: block;
  width: 100%;
  height: 100%;
  transform: scaleX(0);
  transform-origin: left center;
  background: var(--accent);
  transition: transform 240ms cubic-bezier(.16,1,.3,1);
}

.board-runout {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  min-height: 50px;
}

.playing-card.is-board {
  width: 42px;
  height: 54px;
}

.playing-card.is-board.street-gap {
  margin-left: 6px;
}

.spot-strip {
  display: flex;
  min-height: 76px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: rgba(17, 21, 28, 0.78);
  box-shadow: var(--shadow);
}

.role-track {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 310px;
  padding: 12px 16px;
  border-right: 1px solid var(--border);
}

.role-seat {
  position: relative;
  display: grid;
  gap: 3px;
  min-width: 92px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--panel-soft);
}

.role-seat strong {
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
}

.role-seat span {
  color: var(--dim);
  font-size: 9px;
  letter-spacing: 0.08em;
}

.role-seat.is-hero {
  border-color: var(--accent-border);
  background: var(--accent-soft);
}

.role-seat.is-actor {
  box-shadow: inset 0 -2px 0 var(--accent);
}

.role-connector {
  flex: 1;
  height: 1px;
  background: var(--border-strong);
}

.spot-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(112px, 1fr));
  flex: 1;
  margin: 0;
}

.spot-metrics div {
  display: grid;
  align-content: center;
  gap: 5px;
  min-width: 0;
  padding: 12px 16px;
  border-right: 1px solid var(--border);
}

.spot-metrics div:last-child {
  border-right: 0;
}

.spot-metrics dt,
.detail-list dt,
.model-card dt {
  color: var(--dim);
  font-size: 10px;
}

.spot-metrics dd,
.detail-list dd,
.model-card dd {
  margin: 0;
  color: var(--ink-soft);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.action-lane {
  margin-top: 14px;
  padding: 14px 16px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: rgba(17, 21, 28, 0.7);
}

.lane-heading,
.panel-header,
.inspector-head,
.section-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.lane-heading h2,
.panel-header h2,
.inspector-head h2 {
  margin: 4px 0 0;
  color: var(--ink);
  font-size: 17px;
  font-weight: 760;
  letter-spacing: -0.025em;
}

.inspector-head h2:has(.playing-card) {
  display: inline-flex;
  gap: 4px;
}

.playing-card.is-heading {
  width: 28px;
  height: 37px;
  padding: 3px 4px;
  box-shadow: none;
}

.playing-card.is-heading strong { font-size: 12px; }
.playing-card.is-heading .suit-symbol { font-size: 16px; }

.text-button {
  min-height: 44px;
  padding: 0 7px;
  border: 0;
  background: transparent;
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
}

.text-button:hover:not(:disabled) {
  color: #e3bc77;
}

.text-button:disabled {
  color: var(--dim);
  opacity: 0.6;
}

.action-path {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  margin-top: 9px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.path-node {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 0 9px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--panel-soft);
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  white-space: nowrap;
}

.path-node::after {
  content: "/";
  margin-left: 5px;
  color: var(--dim);
}

.path-node:last-child::after {
  display: none;
}

.path-node.root {
  color: var(--accent);
}

.playing-card.is-path {
  width: 20px;
  height: 27px;
  padding: 2px;
  border-radius: 3px;
  box-shadow: none;
}

.playing-card.is-path strong { font-size: 8px; }
.playing-card.is-path .suit-symbol { font-size: 11px; }

.available-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.available-actions[hidden] {
  display: none;
}

.chance-card-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 50px;
  padding: 4px 8px 4px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--panel-raised);
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.chance-card-button:hover {
  border-color: var(--accent-border);
  color: var(--ink-soft);
}

.playing-card.is-action {
  width: 30px;
  height: 40px;
  padding: 3px 4px;
  box-shadow: none;
}

.playing-card.is-action strong { font-size: 12px; }
.playing-card.is-action .suit-symbol { font-size: 17px; }

.action-button {
  display: inline-grid;
  grid-template-columns: 8px auto;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 13px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--panel-raised);
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 700;
}

.action-button:hover {
  border-color: rgba(226, 232, 240, 0.28);
  background: #1a2029;
}

.action-swatch,
.legend i {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--action-color, var(--dim));
}

.study-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 318px;
  gap: 0;
  margin-top: 0;
  align-items: start;
}

.study-layout.is-range-only {
  grid-template-columns: minmax(0, 1fr);
}

.strategy-panel,
.inspector {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.table-workspace:has(+ .study-layout:not([hidden])) {
  border-bottom-color: transparent;
  border-bottom-right-radius: 0;
  border-bottom-left-radius: 0;
  box-shadow: none;
}

.table-workspace + .study-layout:not([hidden]) .strategy-panel {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

.table-workspace + .study-layout:not([hidden]) .inspector {
  border-left: 0;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

.panel-header,
.inspector-head {
  min-height: 67px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
}

.strategy-panel .panel-header {
  min-height: 84px;
  padding-block: 15px;
}

#matrixHeading {
  margin-top: 6px;
  font-size: 22px;
  font-weight: 820;
  line-height: 0.98;
  letter-spacing: -0.035em;
}

#matrixHeading.is-hero-turn {
  color: var(--accent);
}

.matrix-meta {
  display: flex;
  gap: 12px;
  color: var(--dim);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.action-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
  min-height: 58px;
  border-bottom: 1px solid var(--border);
}

.action-stat {
  position: relative;
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 10px 12px;
  border-right: 1px solid var(--border);
}

.action-stat:last-child {
  border-right: 0;
}

.action-stat i {
  width: 7px;
  height: 28px;
  border-radius: 2px;
  background: var(--action-color);
}

.action-stat span {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.action-stat strong {
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.range-scroll {
  position: relative;
  min-height: 624px;
  overflow: auto;
  background:
    linear-gradient(rgba(255,255,255,0.012) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.012) 1px, transparent 1px),
    #0e1218;
  background-size: 24px 24px;
  scrollbar-width: thin;
  scrollbar-color: var(--fold-strong) transparent;
}

.range-scroll[hidden],
.action-summary[hidden],
.hand-review[hidden] {
  display: none;
}

.hand-review {
  min-height: 624px;
  padding: 20px;
  background:
    linear-gradient(rgba(255,255,255,0.012) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.012) 1px, transparent 1px),
    #0e1218;
  background-size: 24px 24px;
}

.review-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}

.review-label {
  color: var(--accent);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.08em;
}

.review-header h3 {
  margin: 6px 0 0;
  color: var(--ink);
  font-size: 24px;
  line-height: 0.98;
  letter-spacing: -0.035em;
}

.review-header p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.review-accuracy {
  flex: 0 0 auto;
  padding: 6px 8px;
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--accent);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 9px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.review-overview {
  display: grid;
  grid-template-columns: auto minmax(250px, 1fr) minmax(300px, 1fr);
  gap: 20px;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}

.review-card-group {
  display: grid;
  gap: 8px;
}

.review-card-group > span {
  color: var(--dim);
  font-size: 9px;
}

.playing-card.is-review {
  width: 38px;
  height: 50px;
  padding: 5px;
  border-radius: 5px;
}

.playing-card.is-review strong {
  font-size: 15px;
}

.playing-card.is-review .suit-symbol {
  font-size: 20px;
}

.review-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.review-facts div {
  min-width: 0;
  padding: 10px;
  border-right: 1px solid var(--border);
}

.review-facts div:last-child {
  border-right: 0;
}

.review-facts dt {
  color: var(--dim);
  font-size: 8px;
}

.review-facts dd {
  margin: 5px 0 0;
  overflow: hidden;
  color: var(--ink-soft);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.review-timeline {
  display: grid;
  gap: 14px;
  padding: 18px 0;
}

.review-street {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(18, 23, 31, 0.82);
}

.review-street > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
}

.review-street h4 {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
}

.review-street-board .playing-card.is-path {
  width: 24px;
  height: 32px;
}

.review-step-list {
  display: grid;
}

.review-step {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  padding: 12px;
  border-bottom: 1px solid var(--border);
}

.review-step:last-child {
  border-bottom: 0;
}

.review-step-number {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  color: var(--accent);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 9px;
}

.review-step-heading {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.review-step-heading strong {
  color: var(--ink);
  font-size: 12px;
}

.review-step-heading > span {
  color: var(--accent);
  font-size: 12px;
  font-weight: 750;
}

.review-step-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 7px;
}

.review-step-meta span {
  padding: 3px 6px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--dim);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 9px;
  font-variant-numeric: tabular-nums;
}

.review-step p,
.review-step-empty {
  max-width: 900px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.65;
  text-wrap: pretty;
}

.review-step-empty {
  max-width: none;
  margin: 0;
  padding: 12px;
}

.review-source-note {
  padding: 12px 14px;
  border: 1px solid rgba(54, 120, 95, 0.28);
  border-radius: var(--radius-md);
  background: rgba(54, 120, 95, 0.08);
}

.review-source-note strong {
  color: var(--success);
  font-size: 10px;
}

.review-source-note p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.6;
}

.range-grid {
  display: grid;
  grid-template-columns: repeat(13, minmax(43px, 1fr));
  gap: 3px;
  min-width: 650px;
  padding: 12px;
}

.range-cell {
  position: relative;
  display: grid;
  align-content: space-between;
  min-height: 43px;
  padding: 5px 6px;
  overflow: hidden;
  border: 1px solid rgba(237, 240, 245, 0.075);
  border-radius: 4px;
  background: var(--fold);
  color: var(--ink);
  isolation: isolate;
  cursor: pointer;
}

.range-cell::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--strategy-fill, var(--fold));
  opacity: 0.92;
}

.range-cell:hover {
  border-color: rgba(237, 240, 245, 0.34);
  transform: translateY(-1px);
}

.range-cell.is-selected {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px rgba(214, 167, 87, 0.42), 0 0 0 2px rgba(214, 167, 87, 0.13);
}

.range-cell.is-empty {
  background: #171c24;
  color: #647080;
}

.range-cell strong {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  line-height: 1;
}

.range-cell span {
  color: rgba(237, 240, 245, 0.76);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 8px;
  font-variant-numeric: tabular-nums;
}

.matrix-state,
.loading-state {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  padding: 32px;
  background: rgba(14, 18, 24, 0.94);
  text-align: center;
}

.matrix-state[hidden],
.loading-state[hidden] {
  display: none;
}

.state-mark {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-bottom: 14px;
  border: 1px solid var(--accent-border);
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 20px;
}

.matrix-state strong,
.loading-state strong {
  color: var(--ink);
  font-size: 15px;
}

.matrix-state p,
.loading-state p {
  max-width: 430px;
  margin: 8px 0 16px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
  text-wrap: pretty;
}

.loading-head {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.loading-head span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 1.2s ease-in-out infinite;
}

.loading-head span:last-child {
  animation-delay: 180ms;
}

.loading-bars {
  display: flex;
  align-items: end;
  gap: 4px;
  height: 34px;
  margin-bottom: 14px;
}

.loading-bars i {
  width: 5px;
  border-radius: 2px;
  background: var(--accent);
  animation: bars 1.1s ease-in-out infinite alternate;
}

.loading-bars i:nth-child(1) { height: 12px; animation-delay: -500ms; }
.loading-bars i:nth-child(2) { height: 24px; animation-delay: -350ms; }
.loading-bars i:nth-child(3) { height: 34px; animation-delay: -200ms; }
.loading-bars i:nth-child(4) { height: 20px; animation-delay: -50ms; }
.loading-bars i:nth-child(5) { height: 14px; animation-delay: 100ms; }

.matrix-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 44px;
  padding: 8px 12px;
  border-top: 1px solid var(--border);
  color: var(--dim);
  font-size: 9px;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
}

.inspector {
  position: sticky;
  top: 74px;
}

.hand-role {
  padding: 4px 7px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 9px;
}

.hero-hand-line {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 14px;
  border-bottom: 1px solid var(--border);
  color: var(--dim);
  font-size: 10px;
}

.hero-hand-line strong {
  color: var(--accent);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
}

.playing-card.is-hero {
  width: 25px;
  height: 34px;
  padding: 3px;
  border-radius: 4px;
  box-shadow: none;
}

.playing-card.is-hero strong { font-size: 11px; }
.playing-card.is-hero .suit-symbol { font-size: 15px; }

.hand-frequency {
  display: grid;
  min-height: 42px;
  border-bottom: 1px solid var(--border);
}

.frequency-row {
  display: grid;
  grid-template-columns: 7px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 35px;
  padding: 0 14px;
  border-bottom: 1px solid var(--border);
}

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

.frequency-row i {
  width: 7px;
  height: 22px;
  border-radius: 2px;
  background: var(--action-color);
}

.frequency-row span {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.frequency-row strong {
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.detail-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 0;
  border-bottom: 1px solid var(--border);
}

.detail-list div {
  display: grid;
  gap: 5px;
  padding: 12px 14px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.detail-list div:nth-child(2n) {
  border-right: 0;
}

.detail-list div:nth-last-child(-n+2) {
  border-bottom: 0;
}

.combo-section {
  padding: 13px 14px;
  border-bottom: 1px solid var(--border);
}

.section-line h3 {
  margin: 0;
  color: var(--ink-soft);
  font-size: 11px;
}

.section-line span {
  color: var(--dim);
  font-size: 9px;
}

.combo-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-height: 124px;
  margin-top: 10px;
  overflow: auto;
}

.combo-chip {
  display: inline-flex;
  gap: 3px;
  min-height: 38px;
  padding: 3px 5px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--panel-soft);
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 9px;
}

.playing-card.is-chip {
  width: 23px;
  height: 31px;
  padding: 2px 3px;
  border-radius: 4px;
  box-shadow: none;
}

.playing-card.is-chip strong { font-size: 9px; }
.playing-card.is-chip .suit-symbol { font-size: 12px; }

.combo-chip:hover,
.combo-chip.is-selected {
  border-color: var(--accent-border);
  color: var(--accent);
}

.model-card {
  margin: 0 14px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--panel-soft);
}

.model-card summary {
  min-height: 42px;
  padding: 0 11px;
}

.model-card dl {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0 11px 10px;
}

.model-card dl div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 28px;
  border-top: 1px solid var(--border);
}

.model-notice {
  display: flex;
  gap: 12px;
  margin-top: 14px;
  padding: 14px 16px;
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-lg);
  background: var(--accent-soft);
}

.notice-mark {
  display: grid;
  place-items: center;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  border: 1px solid var(--accent-border);
  border-radius: 50%;
  color: var(--accent);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-weight: 800;
}

.model-notice strong {
  color: var(--ink-soft);
  font-size: 11px;
}

.model-notice p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
  text-wrap: pretty;
}

.card-picker {
  width: min(900px, calc(100vw - 32px));
  max-height: min(760px, calc(100dvh - 32px));
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  background: var(--panel);
  color: var(--ink);
  box-shadow: 0 28px 90px rgba(3, 5, 8, 0.72);
}

.card-picker::backdrop {
  background: rgba(3, 5, 8, 0.78);
  backdrop-filter: blur(5px);
}

.card-picker-shell {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  max-height: min(760px, calc(100dvh - 32px));
}

.card-picker-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  padding: 10px 14px 10px 18px;
  border-bottom: 1px solid var(--border);
}

.picker-selection {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 68px;
  padding: 8px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--panel-soft);
}

.picker-selection > span {
  color: var(--dim);
  font-size: 10px;
}

.playing-card.is-picker-preview {
  width: 42px;
  height: 56px;
  box-shadow: none;
}

.deck-grid {
  display: grid;
  grid-template-columns: repeat(13, minmax(42px, 1fr));
  gap: 7px;
  min-width: 720px;
  padding: 18px;
  overflow: auto;
  background: #0e1218;
}

.deck-card-button {
  display: grid;
  place-items: center;
  min-width: 44px;
  min-height: 58px;
  padding: 3px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  background: transparent;
}

.deck-card-button:hover:not(:disabled) {
  border-color: var(--border-strong);
  background: var(--panel-raised);
}

.deck-card-button.is-selected {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px rgba(214, 167, 87, 0.2);
}

.deck-card-button:disabled {
  opacity: 0.18;
}

.playing-card.is-deck {
  width: 42px;
  height: 56px;
  box-shadow: none;
}

.card-picker-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 68px;
  padding: 10px 16px;
  border-top: 1px solid var(--border);
}

.card-picker-actions > span {
  color: var(--muted);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.card-picker-actions > div {
  display: flex;
  gap: 8px;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 80;
  max-width: min(420px, calc(100vw - 40px));
  padding: 11px 13px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  background: #1a2029;
  color: var(--ink-soft);
  box-shadow: 0 18px 55px rgba(3, 5, 8, 0.48);
  font-size: 11px;
  line-height: 1.45;
}

.toast.is-error {
  border-color: rgba(223, 123, 114, 0.4);
  color: #efb1ab;
}

@keyframes pulse {
  0%, 100% { opacity: 0.35; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1); }
}

@keyframes bars {
  from { transform: scaleY(0.45); opacity: 0.45; }
  to { transform: scaleY(1); opacity: 1; }
}

/* Table-centric product workspace */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.app-shell {
  display: block;
}

.sidebar {
  position: fixed;
  top: 0;
  right: 0;
  left: auto;
  z-index: 60;
  width: min(380px, calc(100vw - 44px));
  transform: translateX(104%);
  transition: transform 220ms cubic-bezier(.16,1,.3,1);
  box-shadow: -28px 0 70px rgba(3, 5, 8, 0.5);
}

.sidebar.is-open {
  transform: translateX(0);
}

.sidebar .preflop-action-panel {
  display: none;
}

.sidebar-close {
  display: inline-grid;
}

.main-column {
  width: 100%;
}

.topbar {
  padding-inline: max(24px, calc((100vw - 1480px) / 2));
}

#workspace {
  width: min(1480px, 100%);
  margin-inline: auto;
  padding: 20px 24px 44px;
}

.table-workspace {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: rgba(14, 18, 24, 0.78);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(237, 240, 245, 0.035);
}

.table-workspace-header {
  display: grid;
  grid-template-columns: minmax(300px, 0.7fr) minmax(620px, 1.3fr);
  align-items: center;
  gap: 24px;
  min-height: 104px;
  padding: 17px 20px;
  border-bottom: 1px solid var(--border);
  background: rgba(8, 10, 14, 0.28);
}

.table-workspace-header h1 {
  margin: 6px 0 7px;
  color: var(--ink);
  font-size: 28px;
  font-weight: 820;
  line-height: 0.94;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.table-workspace-header p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  text-wrap: pretty;
}

.table-workflow {
  position: relative;
  min-width: 0;
  padding-bottom: 13px;
}

.table-workflow .journey-steps {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(19, 24, 32, 0.76);
  box-shadow: inset 0 1px 0 rgba(241, 243, 246, 0.03);
}

.table-workflow .journey-step {
  grid-template-columns: 26px minmax(0, 1fr);
  min-height: 62px;
  padding: 8px 10px;
  column-gap: 8px;
}

.table-workflow .journey-step > span {
  width: 26px;
  height: 26px;
  font-size: 9px;
}

.table-workflow .journey-step strong {
  font-size: 12px;
}

.table-workflow .journey-step small {
  font-size: 9px;
}

.table-progress {
  position: absolute;
  right: 0;
  bottom: -2px;
  color: var(--dim);
  font-size: 9px;
  font-variant-numeric: tabular-nums;
}

.table-workflow .journey-rail {
  right: 136px;
  bottom: 1px;
  left: 0;
}

.poker-table {
  position: relative;
  min-height: 500px;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(ellipse at center, rgba(214, 167, 87, 0.035), transparent 42%),
    linear-gradient(180deg, rgba(22, 27, 35, 0.56), rgba(11, 14, 19, 0.4));
}

.poker-table.is-awaiting-position {
  background:
    radial-gradient(ellipse at center, rgba(214, 167, 87, 0.07), transparent 43%),
    linear-gradient(180deg, rgba(24, 29, 37, 0.7), rgba(11, 14, 19, 0.5));
}

.table-orbit {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 58%;
  height: 48%;
  transform: translate(-50%, -48%);
  border: 1px solid rgba(226, 232, 240, 0.12);
  border-radius: 48%;
  background: rgba(8, 10, 14, 0.24);
  box-shadow:
    inset 0 0 0 8px rgba(226, 232, 240, 0.015),
    inset 0 0 0 9px rgba(226, 232, 240, 0.055),
    0 28px 70px rgba(4, 7, 11, 0.2);
}

.table-orbit::before,
.table-orbit::after {
  content: "";
  position: absolute;
  background: var(--border);
}

.table-orbit::before {
  top: 50%;
  right: 8%;
  left: 8%;
  height: 1px;
}

.table-orbit::after {
  top: 14%;
  bottom: 14%;
  left: 50%;
  width: 1px;
}

.table-seats {
  position: absolute;
  inset: 0;
  z-index: 3;
}

.table-seat {
  position: absolute;
  width: 174px;
}

.seat-utg { top: 26px; left: 5%; }
.seat-mp { top: 10px; left: 50%; transform: translateX(-50%); }
.seat-co { top: 26px; right: 5%; }
.seat-btn { top: 50%; right: 2.2%; transform: translateY(-42%); }
.seat-sb { right: 21%; bottom: 18px; }
.seat-bb { bottom: 18px; left: 21%; }

.seat-card {
  display: grid;
  gap: 6px;
  width: 100%;
  min-height: 104px;
  padding: 11px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  background: rgba(19, 24, 32, 0.94);
  color: var(--ink-soft);
  text-align: left;
  box-shadow: 0 12px 28px rgba(4, 7, 11, 0.18);
  transition: transform 140ms cubic-bezier(.16,1,.3,1), border-color 140ms ease, background 140ms ease;
}

.seat-card:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: rgba(226, 232, 240, 0.28);
  background: var(--panel-raised);
}

.poker-table.is-awaiting-position .seat-card {
  border-color: rgba(226, 232, 240, 0.25);
  background: rgba(22, 27, 35, 0.97);
  box-shadow: 0 14px 32px rgba(4, 7, 11, 0.28), inset 0 1px 0 rgba(241, 243, 246, 0.035);
}

.poker-table.is-awaiting-position .seat-card:hover,
.poker-table.is-awaiting-position .seat-card:focus-visible {
  transform: translateY(-2px);
  border-color: var(--accent-border);
  background: rgba(214, 167, 87, 0.08);
  box-shadow: 0 0 0 3px rgba(214, 167, 87, 0.07), 0 18px 38px rgba(4, 7, 11, 0.34);
}

.poker-table.is-awaiting-opponent .table-seat:not(.is-hero) .seat-card {
  border-color: rgba(226, 232, 240, 0.25);
  background: rgba(22, 27, 35, 0.97);
}

.poker-table.is-awaiting-opponent .table-seat:not(.is-hero) .seat-card:hover,
.poker-table.is-awaiting-opponent .table-seat:not(.is-hero) .seat-card:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(98, 173, 144, 0.56);
  background: rgba(54, 120, 95, 0.1);
  box-shadow: 0 0 0 3px rgba(98, 173, 144, 0.07), 0 18px 38px rgba(4, 7, 11, 0.34);
}

.seat-card:disabled {
  cursor: default;
}

.table-seat.is-hero .seat-card {
  border-color: var(--accent-border);
  background: rgba(214, 167, 87, 0.09);
  box-shadow: 0 12px 32px rgba(214, 167, 87, 0.08);
}

.table-seat.is-opponent .seat-card {
  border-color: rgba(98, 173, 144, 0.52);
  background: rgba(54, 120, 95, 0.09);
  box-shadow: 0 12px 32px rgba(54, 120, 95, 0.08);
}

.table-seat.is-actor .seat-card {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(214, 167, 87, 0.09), 0 14px 36px rgba(4, 7, 11, 0.28);
}

.table-seat.is-folded .seat-card {
  opacity: 0.46;
}

.table-seat.is-in-hand .seat-card {
  border-color: rgba(98, 173, 144, 0.38);
}

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

.seat-topline strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 760;
}

.seat-topline small {
  padding: 2px 5px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--dim);
  font-size: 9px;
}

.table-seat.is-hero .seat-topline small {
  border-color: var(--accent-border);
  color: var(--accent);
}

.table-seat.is-opponent .seat-topline small {
  border-color: rgba(98, 173, 144, 0.4);
  color: var(--passive-strong);
}

.seat-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 34px;
  gap: 8px;
}

.seat-hand {
  display: inline-flex;
  align-items: center;
  min-width: 54px;
  gap: 3px;
}

.seat-hand.is-clickable {
  margin: -3px;
  padding: 3px;
  border-radius: var(--radius-sm);
  background: rgba(214, 167, 87, 0.08);
  box-shadow: inset 0 0 0 1px rgba(214, 167, 87, 0.16);
}

.table-seat.is-hero .seat-card:hover .seat-hand.is-clickable,
.table-seat.is-hero .seat-card:focus-visible .seat-hand.is-clickable {
  background: rgba(214, 167, 87, 0.14);
  box-shadow: inset 0 0 0 1px var(--accent-border);
}

.card-input-button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.preflop-range-cell.is-locked {
  cursor: default;
}

.restart-hand.is-confirming {
  border-color: rgba(215, 107, 98, 0.52);
  background: rgba(168, 74, 69, 0.16);
  color: #efb0aa;
}

.seat-stack {
  display: grid;
  justify-items: end;
  gap: 3px;
  min-width: 0;
}

.seat-stack strong {
  color: var(--ink-soft);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

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

.seat-status {
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  font-weight: 560;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.playing-card.is-seat {
  width: 28px;
  height: 38px;
  padding: 2px 3px;
  box-shadow: none;
}

.playing-card.is-seat strong { font-size: 11px; }
.playing-card.is-seat .suit-symbol { font-size: 15px; }

.playing-card.is-back {
  position: relative;
  width: 28px;
  height: 38px;
  overflow: hidden;
  border-color: rgba(226, 232, 240, 0.2);
  background:
    repeating-linear-gradient(135deg, rgba(214, 167, 87, 0.16) 0 2px, transparent 2px 5px),
    #202733;
  box-shadow: inset 0 0 0 2px #141a22;
}

.playing-card.is-back::after {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px solid rgba(214, 167, 87, 0.28);
  border-radius: 2px;
}

.seat-action-dock {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  min-height: 34px;
  margin-top: 5px;
}

.seat-action-dock > span {
  grid-column: 1 / -1;
  display: grid;
  place-items: center;
  min-height: 30px;
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: 9px;
}

.seat-action-dock.is-postflop {
  grid-template-columns: repeat(var(--seat-action-count, 2), minmax(0, 1fr));
}

.seat-action-dock.is-postflop .seat-action {
  padding-inline: 5px;
}

.seat-action {
  min-height: 44px;
  overflow: hidden;
  padding: 0 3px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--panel-raised);
  color: var(--ink-soft);
  font-size: 9px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.seat-action.is-fold { color: var(--muted); }
.seat-action.is-check,
.seat-action.is-call { border-color: rgba(98, 173, 144, 0.3); background: rgba(54, 120, 95, 0.14); }
.seat-action.is-raise { border-color: rgba(215, 107, 98, 0.32); background: rgba(168, 74, 69, 0.14); }

.table-center {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 4;
  display: grid;
  justify-items: center;
  width: 43%;
  min-height: 218px;
  transform: translate(-50%, -33%);
}

.table-center-status {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.table-center-status span {
  padding: 5px 8px;
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 9px;
  font-weight: 750;
}

.table-center-status strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: 740;
  letter-spacing: -0.01em;
}

.poker-table.is-awaiting-position .table-center-status,
.poker-table.is-awaiting-opponent .table-center-status {
  padding: 10px 14px;
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-md);
  background: rgba(214, 167, 87, 0.08);
  box-shadow: 0 12px 30px rgba(4, 7, 11, 0.2), inset 0 1px 0 rgba(241, 243, 246, 0.04);
}

.poker-table.is-awaiting-position .table-center-status strong,
.poker-table.is-awaiting-opponent .table-center-status strong {
  font-size: 16px;
}

.poker-table.has-current-action .table-center-status {
  padding: 9px 13px;
  border: 1px solid rgba(214, 167, 87, 0.46);
  border-radius: var(--radius-md);
  background: rgba(214, 167, 87, 0.085);
  box-shadow: 0 12px 30px rgba(4, 7, 11, 0.2), inset 0 1px 0 rgba(241, 243, 246, 0.04);
}

.poker-table.has-current-action .table-center-status strong {
  font-size: 17px;
}

.table-center .board-runout {
  min-height: 58px;
  margin-top: 10px;
}

.board-runout-button {
  gap: 6px;
  padding: 6px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  background: transparent;
  transition: border-color 140ms ease, background 140ms ease, box-shadow 140ms ease;
}

.board-runout-button:disabled {
  cursor: default;
}

.board-runout-button.is-selecting {
  border-color: var(--accent-border);
  background: rgba(214, 167, 87, 0.045);
  box-shadow: 0 0 0 3px rgba(214, 167, 87, 0.055);
}

.board-runout-button.is-selecting:hover,
.board-runout-button.is-selecting:focus-visible {
  border-color: var(--accent);
  background: rgba(214, 167, 87, 0.085);
}

.board-runout-button.is-selecting .playing-card.is-placeholder {
  border-color: rgba(214, 167, 87, 0.42);
}

.table-pot-line {
  display: flex;
  gap: 18px;
  margin: 9px 0 0;
}

.table-pot-line div {
  display: flex;
  gap: 5px;
}

.table-pot-line dt,
.table-pot-line dd {
  margin: 0;
  color: var(--muted);
  font-size: 9px;
}

.table-pot-line dd {
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}

.table-strategy {
  background: rgba(8, 10, 14, 0.28);
}

.table-strategy[hidden],
.action-lane[hidden],
.study-layout[hidden] {
  display: none;
}

.table-strategy > header,
.table-strategy > footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
}

.table-strategy > header {
  border-bottom: 1px solid var(--border);
}

.table-strategy > footer {
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 10px;
}

.strategy-footer-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.table-solve-button {
  min-height: 44px;
  padding: 0 13px;
  font-size: 9px;
}

.table-solve-button[hidden] {
  display: none;
}

.table-strategy h2 {
  margin: 3px 0 0;
  color: var(--ink);
  font-size: 18px;
  line-height: 1;
  letter-spacing: -0.025em;
}

.preflop-range-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  min-width: 0;
}

.preflop-range-map {
  min-width: 0;
  padding: 14px 16px 16px;
  overflow: auto;
  border-right: 1px solid var(--border);
}

.preflop-range-map > header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.preflop-range-map > header > div {
  display: grid;
  gap: 3px;
}

.preflop-range-map > header strong {
  color: var(--ink);
  font-size: 13px;
}

.preflop-range-map > header span,
.preflop-range-map > header > span {
  color: var(--muted);
  font-size: 9px;
}

.preflop-range-map > header > span {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-variant-numeric: tabular-nums;
}

.preflop-range-grid {
  display: grid;
  grid-template-columns: repeat(13, minmax(42px, 1fr));
  gap: 3px;
  min-width: 620px;
}

.preflop-range-cell {
  position: relative;
  display: grid;
  align-content: space-between;
  min-height: 44px;
  padding: 5px 6px;
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.09);
  border-radius: 4px;
  background: linear-gradient(
    90deg,
    rgba(168, 74, 69, 0.76) 0 var(--raise-stop, 0%),
    rgba(54, 120, 95, 0.76) var(--raise-stop, 0%) var(--call-stop, 0%),
    rgba(41, 48, 58, 0.94) var(--call-stop, 0%) 100%
  );
  color: var(--ink-soft);
  font: inherit;
  text-align: left;
  cursor: default;
}

.preflop-range-cell.is-inspectable {
  cursor: pointer;
}

.preflop-range-cell.is-inspectable:hover {
  border-color: rgba(214, 167, 87, 0.48);
  filter: brightness(1.08);
}

.preflop-range-cell strong {
  position: relative;
  z-index: 1;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
}

.preflop-range-cell span {
  position: relative;
  z-index: 1;
  color: rgba(237, 240, 245, 0.72);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 8px;
  font-variant-numeric: tabular-nums;
}

.preflop-range-cell.is-selected {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 2px rgba(214, 167, 87, 0.56), 0 0 0 1px rgba(8, 10, 14, 0.8);
}

.preflop-range-cell.is-empty {
  background: #141922;
  color: var(--dim);
}

.preflop-node-inspector {
  display: grid;
  align-content: start;
  min-width: 0;
  background: rgba(17, 21, 28, 0.7);
}

.strategy-source,
.strategy-node {
  color: var(--accent);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 9px;
  letter-spacing: 0.06em;
}

.strategy-node {
  padding: 5px 7px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--muted);
}

.preflop-strategy-body {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
}

.preflop-strategy-hand {
  display: inline-flex;
  gap: 5px;
}

.playing-card.is-strategy {
  width: 38px;
  height: 50px;
  padding: 4px 5px;
}

.playing-card.is-strategy strong { font-size: 16px; }
.playing-card.is-strategy .suit-symbol { font-size: 21px; }

.preflop-strategy-copy {
  display: grid;
  gap: 5px;
}

.preflop-strategy-copy strong {
  color: var(--ink);
  font-size: 15px;
}

.preflop-strategy-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
  text-wrap: pretty;
}

.preflop-strategy-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  padding: 0 16px 16px;
}

.preflop-library-frequency {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  min-height: 48px;
  padding: 9px 10px 13px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--panel-soft);
}

.preflop-library-frequency span {
  color: var(--muted);
  font-size: 10px;
}

.preflop-library-frequency strong {
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.preflop-library-frequency i {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 4px;
  transform-origin: left center;
  background: var(--fold-strong);
}

.preflop-library-frequency.is-raise i { background: var(--aggressive-strong); }
.preflop-library-frequency.is-call i { background: var(--passive-strong); }

.playing-card.is-strategy-back {
  width: 38px;
  height: 50px;
}

.action-lane.is-integrated {
  margin: 0;
  padding: 8px 12px;
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  background: rgba(8, 10, 14, 0.24);
}

.action-lane.is-integrated .lane-heading {
  min-height: 32px;
}

.action-lane.is-integrated .action-path {
  flex: 1;
}

.spot-strip {
  min-height: 68px;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: rgba(8, 10, 14, 0.34);
  box-shadow: none;
}

.role-track {
  min-width: 318px;
  padding: 10px 14px;
}

.spot-strip .role-seat {
  min-width: 86px;
  padding: 7px 9px;
}

.spot-strip .spot-metrics div {
  padding: 10px 14px;
}

/* Cold precision workstation */
html {
  background: var(--void-deep);
}

.sidebar {
  border-color: var(--border);
  background: rgba(249, 251, 254, 0.98);
  box-shadow: -22px 0 56px rgba(52, 70, 100, 0.16);
}

.brand-row {
  border-color: var(--border);
  background: rgba(249, 251, 254, 0.96);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.82);
}

.sidebar-header,
.sidebar-form,
.model-card,
.advanced,
.template-section,
.preflop-history,
.card-picker-actions {
  border-color: var(--border);
  background: transparent;
}

.strategy-template,
.preflop-action-panel {
  border-color: var(--border-strong);
  background: #fbfcfe;
  box-shadow: 0 8px 24px rgba(55, 72, 99, 0.08);
}

.template-summary,
.preflop-history {
  background: #f4f7fb;
}

input,
select,
textarea,
.card-input-button {
  border-color: var(--border-strong);
  background: #fbfcfe;
  color: var(--ink);
}

input:hover,
select:hover,
textarea:hover,
.card-input-button:hover {
  border-color: rgba(36, 88, 214, 0.38);
  background: #fbfcfe;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  background: #fbfcfe;
  box-shadow: 0 0 0 3px rgba(36, 88, 214, 0.1);
}

.button.primary {
  border-color: #2458d6;
  background: #2458d6;
  color: #f8faff;
  box-shadow: 0 5px 13px rgba(36, 88, 214, 0.18);
}

.button.primary:hover:not(:disabled) {
  border-color: #1948be;
  background: #1948be;
}

.button.secondary,
.icon-button {
  border-color: var(--border-strong);
  background: #fbfcfe;
  color: var(--ink-soft);
  box-shadow: 0 2px 7px rgba(55, 72, 99, 0.06);
}

.text-button:hover:not(:disabled) {
  color: #173f9f;
}

.topbar {
  min-height: 64px;
  border-color: var(--border);
  background: rgba(249, 251, 254, 0.92);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(18px);
}

.engine-status {
  border-color: var(--border);
  background: #fbfcfe;
  color: var(--muted);
}

.status-dot {
  box-shadow: 0 0 0 3px rgba(135, 147, 165, 0.14);
}

.table-workspace,
.strategy-panel,
.inspector {
  border-color: var(--border);
  background: #fbfcfe;
  box-shadow: var(--shadow);
}

.table-workspace-header {
  min-height: 112px;
  padding: 20px 22px;
  border-color: var(--border);
  background: #fbfcfe;
}

.stage-label,
.panel-kicker,
.strategy-source,
.review-label {
  color: var(--accent);
}

.table-workspace-header h1 {
  font-size: 30px;
  font-weight: 850;
  line-height: 0.96;
}

.table-workflow .journey-steps {
  overflow: hidden;
  border-color: var(--border);
  background: #f5f7fb;
  box-shadow: none;
}

.journey-steps li {
  border-color: var(--border);
}

.journey-step {
  background: transparent;
}

.journey-step > span {
  border-color: var(--border-strong);
  background: #fbfcfe;
  color: var(--dim);
}

.journey-step.is-current {
  background: #fbfcfe;
  box-shadow: inset 0 -3px 0 var(--accent);
}

.journey-step.is-current > span,
.journey-step.is-running > span {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
}

.journey-step.is-complete > span {
  border-color: rgba(31, 122, 94, 0.32);
  background: rgba(31, 122, 94, 0.1);
  color: var(--success);
}

.journey-rail {
  background: #d9e0ea;
}

.journey-rail span {
  background: var(--accent);
}

.poker-table,
.poker-table.is-awaiting-position {
  min-height: 520px;
  border-color: var(--border);
  background:
    linear-gradient(rgba(39, 65, 106, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(39, 65, 106, 0.035) 1px, transparent 1px),
    #f1f4f8;
  background-size: 32px 32px;
}

.table-orbit {
  width: 60%;
  height: 50%;
  border: 1px solid #cbd4e1;
  background: rgba(255, 255, 255, 0.66);
  box-shadow:
    inset 0 0 0 8px rgba(52, 76, 112, 0.025),
    inset 0 0 0 9px rgba(52, 76, 112, 0.07),
    0 22px 50px rgba(55, 72, 99, 0.09);
}

.table-orbit::before,
.table-orbit::after {
  background: rgba(27, 45, 74, 0.1);
}

.seat-card,
.poker-table.is-awaiting-position .seat-card,
.poker-table.is-awaiting-opponent .table-seat:not(.is-hero) .seat-card {
  border-color: var(--border-strong);
  background: rgba(255, 255, 255, 0.96);
  color: var(--ink-soft);
  box-shadow: 0 9px 22px rgba(55, 72, 99, 0.1);
}

.seat-card:hover:not(:disabled),
.poker-table.is-awaiting-position .seat-card:hover,
.poker-table.is-awaiting-position .seat-card:focus-visible,
.poker-table.is-awaiting-opponent .table-seat:not(.is-hero) .seat-card:hover,
.poker-table.is-awaiting-opponent .table-seat:not(.is-hero) .seat-card:focus-visible {
  border-color: var(--accent-border);
  background: #fbfcfe;
  box-shadow: 0 0 0 3px rgba(36, 88, 214, 0.08), 0 13px 30px rgba(55, 72, 99, 0.14);
}

.table-seat.is-hero .seat-card {
  border-color: var(--accent);
  background: #f4f7ff;
  box-shadow: 0 0 0 3px rgba(36, 88, 214, 0.08), 0 12px 28px rgba(55, 72, 99, 0.12);
}

.table-seat.is-opponent .seat-card,
.table-seat.is-in-hand .seat-card {
  border-color: rgba(31, 122, 94, 0.42);
  background: #f2faf7;
  box-shadow: 0 10px 24px rgba(31, 122, 94, 0.08);
}

.table-seat.is-actor .seat-card {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(36, 88, 214, 0.1), 0 13px 30px rgba(55, 72, 99, 0.14);
}

.seat-topline small,
.strategy-node {
  border-color: var(--border);
  background: #f5f7fa;
}

.seat-hand.is-clickable,
.table-seat.is-hero .seat-card:hover .seat-hand.is-clickable,
.table-seat.is-hero .seat-card:focus-visible .seat-hand.is-clickable {
  background: rgba(36, 88, 214, 0.08);
  box-shadow: inset 0 0 0 1px rgba(36, 88, 214, 0.18);
}

.playing-card {
  box-shadow: 0 4px 11px rgba(55, 72, 99, 0.15);
}

.playing-card.is-back {
  border-color: #aeb9c9;
  background:
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.18) 0 2px, transparent 2px 5px),
    #375caa;
  box-shadow: inset 0 0 0 2px #274a94;
}

.playing-card.is-back::after {
  border-color: rgba(255, 255, 255, 0.38);
}

.seat-action-dock > span {
  border-color: var(--border-strong);
  background: rgba(255, 255, 255, 0.55);
}

.seat-action {
  border-color: var(--border-strong);
  background: #fbfcfe;
  color: var(--ink-soft);
}

.seat-action.is-check,
.seat-action.is-call {
  border-color: rgba(31, 122, 94, 0.3);
  background: rgba(31, 122, 94, 0.08);
}

.seat-action.is-raise {
  border-color: rgba(201, 79, 85, 0.32);
  background: rgba(201, 79, 85, 0.08);
}

.poker-table.is-awaiting-position .table-center-status,
.poker-table.is-awaiting-opponent .table-center-status,
.poker-table.has-current-action .table-center-status {
  border-color: rgba(36, 88, 214, 0.26);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 26px rgba(55, 72, 99, 0.12);
}

.table-center-status span {
  border-color: var(--accent-border);
  background: var(--accent-soft);
  color: var(--accent);
}

.board-runout-button.is-selecting {
  border-color: var(--accent-border);
  background: rgba(36, 88, 214, 0.05);
  box-shadow: 0 0 0 3px rgba(36, 88, 214, 0.06);
}

.table-strategy {
  background: #fbfcfe;
}

.table-strategy > header,
.table-strategy > footer,
.preflop-range-map,
.panel-header,
.inspector-head,
.action-lane.is-integrated,
.action-summary,
.matrix-footer {
  border-color: var(--border);
}

.preflop-range-map {
  background: #fbfcfe;
}

.preflop-range-grid {
  gap: 4px;
}

.preflop-range-cell {
  min-height: 46px;
  border-color: rgba(27, 45, 74, 0.12);
  background: linear-gradient(
    90deg,
    #e98b8f 0 var(--raise-stop, 0%),
    #69b89b var(--raise-stop, 0%) var(--call-stop, 0%),
    #dfe4ec var(--call-stop, 0%) 100%
  );
  color: #182234;
}

.preflop-range-cell span {
  color: rgba(24, 34, 52, 0.72);
}

.preflop-range-cell.is-inspectable:hover {
  border-color: var(--accent);
  filter: saturate(1.04) brightness(1.02);
}

.preflop-range-cell.is-selected {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 2px rgba(36, 88, 214, 0.5), 0 0 0 1px #fbfcfe;
}

.preflop-range-cell.is-empty {
  background: #eef2f7;
  color: #7e899a;
}

.preflop-range-grid.is-loading .preflop-range-cell {
  background: linear-gradient(100deg, #edf1f6 20%, #f9fbfd 42%, #edf1f6 64%);
  background-size: 240% 100%;
  color: #9ba6b5;
  animation: range-loading 1.4s ease-in-out infinite;
}

.preflop-range-grid.is-error .preflop-range-cell {
  border-color: rgba(189, 62, 71, 0.12);
  background: #f9edef;
  color: #a46a70;
}

.preflop-node-inspector {
  border-left: 0;
  background: #f5f7fb;
}

.preflop-library-frequency,
.preflop-history-item,
.path-node,
.action-button {
  border-color: var(--border);
  background: #fbfcfe;
}

.preflop-retry {
  width: 100%;
}

.study-layout {
  margin-top: 12px;
  gap: 12px;
}

.table-workspace:has(+ .study-layout:not([hidden])) {
  border-bottom-color: var(--border);
  border-bottom-right-radius: var(--radius-lg);
  border-bottom-left-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.table-workspace + .study-layout:not([hidden]) .strategy-panel,
.table-workspace + .study-layout:not([hidden]) .inspector {
  border-radius: var(--radius-lg);
}

.table-workspace + .study-layout:not([hidden]) .inspector {
  border-left: 1px solid var(--border);
}

.action-lane.is-integrated,
.spot-strip {
  background: #f5f7fb;
}

.action-stat {
  border-color: var(--border);
}

.range-scroll,
.hand-review {
  background:
    linear-gradient(rgba(39, 65, 106, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(39, 65, 106, 0.035) 1px, transparent 1px),
    #f4f7fb;
  background-size: 24px 24px;
}

.range-cell {
  border-color: rgba(27, 45, 74, 0.12);
  background: var(--fold);
  color: #172134;
}

.range-cell::before {
  opacity: 0.94;
}

.range-cell:hover {
  border-color: rgba(36, 88, 214, 0.52);
}

.range-cell.is-selected {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px rgba(36, 88, 214, 0.42), 0 0 0 2px rgba(36, 88, 214, 0.12);
}

.range-cell.is-empty {
  background: #edf1f6;
  color: #7f8b9c;
}

.range-cell span {
  color: rgba(20, 30, 47, 0.72);
}

.matrix-state,
.loading-state {
  background: rgba(244, 247, 251, 0.96);
}

.state-mark {
  border-color: var(--accent-border);
  background: #fbfcfe;
  color: var(--accent);
  box-shadow: 0 8px 20px rgba(36, 88, 214, 0.1);
}

.loading-state {
  align-content: center;
}

.loading-state > p {
  margin-bottom: 18px;
}

.solve-progress-panel {
  width: min(560px, calc(100vw - 64px));
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: #fbfcfe;
  box-shadow: 0 14px 34px rgba(55, 72, 99, 0.1);
  text-align: left;
}

.solve-progress-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.solve-progress-heading span {
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 700;
}

.solve-progress-heading strong {
  color: var(--accent);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.solve-progress-track {
  position: relative;
  height: 8px;
  margin-top: 11px;
  overflow: hidden;
  border-radius: 2px;
  background: #dfe5ee;
}

.solve-progress-track i {
  display: block;
  width: 0;
  height: 100%;
  background: var(--accent);
  transition: width 240ms cubic-bezier(.16,1,.3,1);
}

.solve-progress-track.is-indeterminate i {
  width: 34% !important;
  animation: solve-progress-scan 1.1s ease-in-out infinite;
}

.solve-progress-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 14px 0 0;
  border-top: 1px solid var(--border);
}

.solve-progress-facts div {
  padding: 11px 10px 0;
  border-right: 1px solid var(--border);
}

.solve-progress-facts div:first-child {
  padding-left: 0;
}

.solve-progress-facts div:last-child {
  padding-right: 0;
  border-right: 0;
}

.solve-progress-facts dt {
  color: var(--dim);
  font-size: 9px;
}

.solve-progress-facts dd {
  margin: 5px 0 0;
  color: var(--ink-soft);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.review-street,
.review-facts,
.review-source-note {
  border-color: var(--border);
  background: #fbfcfe;
}

.review-source-note {
  border-color: rgba(31, 122, 94, 0.22);
  background: #eff8f4;
}

.review-step,
.review-street > header,
.review-header,
.review-overview,
.review-facts div {
  border-color: var(--border);
}

.toast {
  border-color: var(--border-strong);
  background: #fbfcfe;
  color: var(--ink-soft);
  box-shadow: 0 16px 44px rgba(55, 72, 99, 0.18);
}

.toast.is-error,
.form-error {
  border-color: rgba(189, 62, 71, 0.28);
  background: #faecee;
  color: #9d3039;
}

@keyframes range-loading {
  from { background-position: 100% 0; }
  to { background-position: -100% 0; }
}

@keyframes solve-progress-scan {
  0% { transform: translateX(-110%); }
  100% { transform: translateX(310%); }
}

@media (max-width: 1240px) {
  :root { --sidebar: 292px; }

  .table-workspace-header {
    grid-template-columns: minmax(260px, 0.55fr) minmax(560px, 1.45fr);
  }

  .table-seat {
    width: 158px;
  }

  .seat-utg { left: 3%; }
  .seat-co { right: 3%; }

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

  .spot-metrics {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
  }

  .spot-metrics div:nth-child(2) {
    border-right: 0;
  }

  .spot-metrics div:nth-child(-n+2) {
    border-bottom: 1px solid var(--border);
  }
}

@media (max-width: 1020px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    left: 0;
    transform: translateX(-104%);
    width: min(342px, calc(100vw - 44px));
    transition: transform 220ms cubic-bezier(.16,1,.3,1);
    box-shadow: 28px 0 70px rgba(3, 5, 8, 0.5);
  }

  .table-workspace-header {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .preflop-range-layout {
    grid-template-columns: minmax(0, 1fr) 292px;
  }

  .sidebar.is-open {
    transform: translateX(0);
  }

  .sidebar-close,
  .mobile-menu {
    display: inline-grid;
  }

  .topbar {
    padding-left: 14px;
  }

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

  .inspector {
    position: static;
  }

  .table-workspace + .study-layout:not([hidden]) .inspector {
    border-left: 1px solid var(--border);
  }

  .review-overview {
    grid-template-columns: auto minmax(220px, 1fr);
  }

  .review-facts {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  #workspace {
    padding: 14px 12px 28px;
  }

  .table-workspace-header {
    padding: 14px;
  }

  .table-workflow .journey-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .table-workflow .journey-steps li:nth-child(2n) {
    border-right: 0;
  }

  .table-workflow .journey-steps li:nth-last-child(-n+2) {
    border-bottom: 0;
  }

  .poker-table {
    display: grid;
    gap: 14px;
    min-height: 0;
    padding: 14px;
  }

  .table-orbit {
    display: none;
  }

  .table-center {
    position: relative;
    top: auto;
    left: auto;
    grid-row: 1;
    width: 100%;
    min-height: 200px;
    padding: 16px 10px;
    transform: none;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: rgba(8, 10, 14, 0.26);
  }

  .table-seats {
    position: static;
    display: grid;
    grid-row: 2;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .table-seat,
  .seat-utg,
  .seat-mp,
  .seat-co,
  .seat-btn,
  .seat-sb,
  .seat-bb {
    position: static;
    width: auto;
    transform: none;
  }

  .preflop-strategy-body {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .preflop-range-layout {
    grid-template-columns: 1fr;
  }

  .preflop-range-map {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .preflop-node-inspector {
    grid-template-columns: minmax(240px, 0.8fr) minmax(280px, 1.2fr);
    align-items: center;
  }

  .preflop-strategy-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding-top: 14px;
  }

  .table-strategy > footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar {
    min-height: 56px;
    padding-right: 12px;
  }

  .breadcrumb {
    display: none;
  }

  .engine-status {
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .view-heading {
    align-items: flex-start;
    min-height: 0;
    padding: 15px 0 16px;
  }

  .view-heading h1 {
    font-size: 23px;
  }

  .view-heading p {
    display: none;
  }

  .journey-header {
    align-items: flex-start;
  }

  .journey-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .journey-steps li {
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
  }

  .journey-steps li:nth-child(2n) { border-right: 0; }
  .journey-steps li:nth-last-child(-n+2) { border-bottom: 0; }
  .journey-rail { display: none; }

  .playing-card.is-board {
    width: 34px;
    height: 44px;
    padding: 3px 4px;
  }

  .playing-card.is-board strong { font-size: 13px; }
  .playing-card.is-board .suit-symbol { font-size: 18px; }

  .spot-strip {
    display: grid;
  }

  .role-track {
    min-width: 0;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .spot-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .spot-metrics div {
    padding: 10px 12px;
  }

  .action-lane {
    padding: 12px;
  }

  .study-layout {
    display: block;
  }

  .inspector {
    margin-top: 14px;
  }

  .table-workspace + .study-layout:not([hidden]) .inspector {
    border-radius: var(--radius-lg);
  }

  .range-scroll {
    min-height: 596px;
  }

  .range-grid {
    grid-template-columns: repeat(13, 43px);
    width: max-content;
  }

  .matrix-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .hand-review {
    min-height: 596px;
    padding: 14px 12px;
  }

  .review-header {
    display: grid;
    gap: 12px;
  }

  .review-accuracy {
    justify-self: start;
  }

  .review-overview {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .review-facts {
    grid-column: auto;
  }

  .review-step {
    grid-template-columns: 24px minmax(0, 1fr);
    gap: 8px;
    padding: 10px;
  }

  .review-step-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }
}

/* Account and authentication surfaces */
.solver-status-dialog {
  width: min(760px, calc(100vw - 32px));
  max-height: min(840px, calc(100dvh - 32px));
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  background: var(--panel);
  color: var(--ink);
  box-shadow: 0 28px 72px rgba(35, 51, 78, 0.28);
}

.solver-status-dialog::backdrop {
  background: rgba(30, 39, 55, 0.42);
  backdrop-filter: blur(4px);
}

.solver-status-shell {
  display: grid;
  max-height: min(840px, calc(100dvh - 32px));
  grid-template-rows: auto minmax(0, 1fr);
}

.solver-status-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 22px;
  border-bottom: 1px solid var(--border);
  background: var(--panel-raised);
}

.solver-status-header h2,
.solver-status-section h3,
.solver-runtime-heading h3 {
  margin: 4px 0 0;
  color: var(--ink);
  letter-spacing: -0.025em;
}

.solver-status-header h2 { font-size: 21px; }
.solver-status-section h3,
.solver-runtime-heading h3 { font-size: 15px; }

.solver-status-header p,
.solver-runtime-heading p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.solver-status-header-actions {
  display: flex;
  gap: 8px;
}

.solver-status-body {
  display: grid;
  gap: 12px;
  overflow: auto;
  padding: 18px 22px 22px;
}

.solver-runtime-card,
.solver-status-section {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--panel-raised);
}

.solver-runtime-heading,
.solver-section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 15px;
  border-bottom: 1px solid var(--border);
}

.solver-runtime-heading > p {
  max-width: 330px;
  text-align: right;
}

.solver-runtime-badge,
.solver-task-state {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 7px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  white-space: nowrap;
}

.solver-runtime-badge[data-tone="success"],
.solver-task-state[data-tone="success"] { border-color: rgba(31, 122, 94, .24); background: rgba(31, 122, 94, .06); color: var(--success); }
.solver-runtime-badge[data-tone="active"],
.solver-task-state[data-tone="active"] { border-color: var(--accent-border); background: var(--accent-soft); color: var(--accent); }
.solver-runtime-badge[data-tone="warning"],
.solver-task-state[data-tone="warning"] { border-color: rgba(170, 103, 29, .24); background: rgba(170, 103, 29, .06); color: var(--warning); }
.solver-runtime-badge[data-tone="danger"],
.solver-task-state[data-tone="danger"] { border-color: rgba(189, 62, 71, .24); background: rgba(189, 62, 71, .06); color: var(--danger); }

.solver-status-metrics,
.solver-detail-list {
  display: grid;
  margin: 0;
}

.solver-status-metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.solver-detail-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.solver-status-metrics > div,
.solver-detail-list > div {
  min-width: 0;
  padding: 12px 14px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.solver-status-metrics > div:last-child { border-right: 0; }
.solver-detail-list > div:nth-child(2n) { border-right: 0; }
.solver-detail-list > div:nth-last-child(-n + 2) { border-bottom: 0; }

.solver-status-metrics dt,
.solver-detail-list dt {
  color: var(--muted);
  font-size: 10px;
}

.solver-status-metrics dd,
.solver-detail-list dd {
  margin: 5px 0 0;
  overflow-wrap: anywhere;
  color: var(--ink-soft);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}

.solver-status-note {
  margin: 0;
  padding: 10px 14px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

@media (max-width: 620px) {
  .solver-status-dialog { width: calc(100vw - 16px); max-height: calc(100dvh - 16px); }
  .solver-status-header { padding: 16px; }
  .solver-status-body { padding: 12px; }
  .solver-runtime-heading { display: grid; }
  .solver-runtime-heading > p { max-width: none; text-align: left; }
  .solver-status-metrics,
  .solver-detail-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .solver-status-metrics > div:nth-child(2n) { border-right: 0; }
  .solver-status-metrics > div:nth-last-child(-n + 2) { border-bottom: 0; }
  .solver-status-header-actions .button { display: none; }
}

.account-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 10px 0 6px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--panel-raised);
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 750;
  box-shadow: 0 2px 7px rgba(55, 72, 99, 0.06);
  transition: border-color 140ms ease, background 140ms ease, transform 140ms cubic-bezier(.16,1,.3,1);
}

.account-button:hover {
  transform: translateY(-1px);
  border-color: var(--accent-border);
  background: var(--panel);
}

.account-avatar {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 11px;
  font-weight: 800;
}

.account-dialog {
  width: min(920px, calc(100vw - 32px));
  max-height: min(820px, calc(100dvh - 32px));
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  background: var(--panel);
  color: var(--ink);
  box-shadow: 0 28px 72px rgba(35, 51, 78, 0.28);
}

.account-dialog::backdrop {
  background: rgba(30, 39, 55, 0.42);
  backdrop-filter: blur(4px);
}

.account-dialog-shell {
  display: grid;
  max-height: min(820px, calc(100dvh - 32px));
  grid-template-rows: auto minmax(0, 1fr);
}

.account-dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 22px;
  border-bottom: 1px solid var(--border);
  background: var(--panel-raised);
}

.account-dialog-header h2,
.account-section-heading h3 {
  margin: 0;
  color: var(--ink);
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.account-dialog-header h2 {
  font-size: 20px;
}

.account-dialog-header p,
.account-section-heading p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
  text-wrap: pretty;
}

.account-dialog-body {
  overflow: auto;
  padding: 20px 22px 24px;
}

.account-current {
  display: grid;
  gap: 18px;
  padding: 16px;
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-md);
  background: var(--accent-soft);
}

.account-current > strong {
  color: var(--ink);
  font-size: 24px;
  letter-spacing: -0.04em;
}

.account-section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.account-section-heading h3 {
  font-size: 15px;
}

.account-form {
  margin-top: 18px;
  border-top: 1px solid var(--border);
}

.account-form fieldset {
  padding: 18px 0 0;
  border-bottom: 0;
}

.account-form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.account-form-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.account-form-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.account-form-actions,
.account-inline-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.account-form-message {
  flex: 1;
  min-height: 18px;
  margin: 0;
  color: var(--danger);
  font-size: 11px;
  line-height: 1.5;
}

.account-form-message.is-success {
  color: var(--success);
}

.account-admin {
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid var(--border-strong);
}

.account-count {
  flex: 0 0 auto;
  min-height: 28px;
  padding: 5px 9px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--panel-soft);
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
}

.account-user-list {
  display: grid;
  margin-top: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.account-user-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(150px, .7fr) auto;
  align-items: center;
  gap: 16px;
  min-height: 62px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  background: var(--panel-raised);
}

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

.account-user-row.is-disabled {
  background: var(--panel-soft);
}

.account-user-identity,
.account-user-status {
  display: grid;
  gap: 3px;
}

.account-user-identity strong {
  color: var(--ink);
  font-size: 13px;
}

.account-user-identity span,
.account-user-status small {
  color: var(--muted);
  font-size: 10px;
}

.account-user-status > span {
  width: max-content;
  color: var(--success);
  font-size: 11px;
  font-weight: 750;
}

.account-user-status > span.is-disabled {
  color: var(--danger);
}

.account-user-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.account-user-action {
  min-height: 36px;
  padding: 0 9px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--panel);
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 750;
}

.account-user-action.is-danger {
  border-color: rgba(189, 62, 71, 0.24);
  color: var(--danger);
}

.account-user-action.is-positive {
  border-color: rgba(31, 122, 94, 0.24);
  color: var(--success);
}

.account-user-action:disabled {
  opacity: .5;
}

.account-user-empty {
  margin: 0;
  padding: 18px;
  color: var(--muted);
  text-align: center;
}

.account-reset-form {
  padding: 0 14px 14px;
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-md);
  background: var(--accent-soft);
}

.auth-page {
  display: grid;
  min-height: 100dvh;
  place-items: center;
  padding: 32px;
  background:
    linear-gradient(rgba(36, 88, 214, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(36, 88, 214, 0.035) 1px, transparent 1px),
    var(--void);
  background-size: 44px 44px;
}

.auth-workspace {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(380px, .7fr);
  width: min(980px, 100%);
  min-height: 590px;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: 0 28px 80px rgba(55, 72, 99, 0.2);
}

.auth-context {
  display: flex;
  flex-direction: column;
  padding: 34px;
  background: #172134;
  color: #f3f6fb;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.auth-brand .brand-mark {
  border-color: rgba(120, 157, 247, 0.36);
  background: rgba(64, 107, 218, 0.18);
  color: #d8e3ff;
}

.auth-brand > div:last-child {
  display: grid;
  gap: 2px;
}

.auth-brand strong {
  font-size: 15px;
}

.auth-brand span {
  color: #aebbd0;
  font-size: 10px;
}

.auth-context-copy {
  margin: auto 0;
}

.auth-context-copy h1 {
  max-width: 520px;
  margin: 0;
  color: #f3f6fb;
  font-size: clamp(34px, 4vw, 50px);
  font-weight: 820;
  line-height: .96;
  letter-spacing: -.045em;
  text-wrap: balance;
}

.auth-context-copy p {
  max-width: 500px;
  margin: 22px 0 0;
  color: #b9c4d5;
  font-size: 13px;
  line-height: 1.7;
  text-wrap: pretty;
}

.auth-facts {
  display: grid;
  gap: 0;
  margin: 0;
  border-top: 1px solid rgba(223, 232, 248, 0.14);
}

.auth-facts div {
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(223, 232, 248, 0.1);
}

.auth-facts dt {
  color: #8796ad;
  font-size: 10px;
}

.auth-facts dd {
  margin: 0;
  color: #dce5f3;
  font-size: 11px;
}

.auth-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 42px;
}

.auth-panel h2 {
  margin: 0;
  color: var(--ink);
  font-size: 24px;
  letter-spacing: -.035em;
}

.auth-panel header p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.auth-form {
  display: grid;
  gap: 16px;
  margin-top: 28px;
}

.auth-form input {
  min-height: 46px;
}

.auth-password-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  width: max-content;
  color: var(--muted);
  font-size: 11px;
  cursor: pointer;
}

.auth-password-toggle input {
  width: 18px;
  min-height: 18px;
  margin: 0;
  accent-color: var(--accent);
}

.auth-error,
.auth-setup-note {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid rgba(189, 62, 71, 0.28);
  border-radius: var(--radius-sm);
  background: #faecee;
  color: #9d3039;
  font-size: 11px;
  line-height: 1.5;
}

.auth-submit {
  width: 100%;
  min-height: 46px;
}

.auth-setup-note {
  margin-top: 22px;
  border-color: rgba(170, 103, 29, 0.25);
  background: #fbf2e7;
  color: #80501b;
}

@media (max-width: 900px) {
  .auth-page {
    padding: 16px;
  }

  .auth-workspace {
    grid-template-columns: 1fr;
  }

  .auth-context {
    min-height: 280px;
    padding: 26px;
  }

  .auth-context-copy {
    margin: 42px 0;
  }

  .auth-context-copy h1 {
    font-size: 36px;
  }

  .auth-panel {
    padding: 28px 26px 32px;
  }

  .account-form-grid,
  .account-form-grid.three {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .account-user-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .account-user-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
}

@media (max-width: 620px) {
  .account-button > span:last-child {
    display: none;
  }

  .account-button {
    min-width: 40px;
    padding-right: 6px;
  }

  .account-dialog {
    width: calc(100vw - 16px);
    max-height: calc(100dvh - 16px);
  }

  .account-dialog-header,
  .account-dialog-body {
    padding-left: 16px;
    padding-right: 16px;
  }

  .account-section-heading,
  .account-form-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .account-form-grid,
  .account-form-grid.two,
  .account-form-grid.three {
    grid-template-columns: 1fr;
  }

  .account-user-row {
    grid-template-columns: 1fr;
  }

  .account-user-actions {
    grid-column: auto;
  }

  .auth-page {
    place-items: start center;
  }

  .auth-context {
    min-height: 250px;
  }

  .auth-context-copy h1 {
    font-size: 31px;
  }

  .auth-facts {
    display: none;
  }
}

/* Phase-one post-session review */
.session-workspace {
  margin-bottom: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: 0 10px 28px rgba(55, 72, 99, 0.08);
}

.session-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 20px 22px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(115deg, var(--accent-soft), transparent 42%);
}

.session-header h1 {
  margin: 5px 0 6px;
  font-size: 23px;
  line-height: 1.15;
  letter-spacing: -0.025em;
}

.session-header p,
.session-empty p,
.session-hand-row p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.session-hand-actions {
  margin-top: 8px;
  color: var(--ink-soft);
  font-size: 12px;
}

.session-hand-actions summary {
  width: max-content;
  color: var(--accent);
  cursor: pointer;
}

.session-hand-actions ol {
  display: grid;
  gap: 4px;
  margin: 8px 0 0;
  padding-left: 21px;
  color: var(--muted);
}

.session-import-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
}

.session-import-actions .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.session-empty {
  padding: 22px;
}

.session-empty strong {
  display: block;
  margin-bottom: 5px;
}

.session-report {
  padding: 16px 20px 20px;
}

.session-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(110px, 1fr));
  gap: 8px;
  margin: 0;
}

.session-metrics > div {
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--panel-soft);
}

.session-metrics dt {
  color: var(--muted);
  font-size: 11px;
}

.session-metrics dd {
  margin: 5px 0 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 17px;
  font-weight: 750;
}

.session-pot-types,
.session-hand-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.session-pot-types {
  margin: 12px 0;
}

.session-pot-types span,
.session-hand-badges span {
  padding: 4px 7px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--panel-soft);
  color: var(--ink-soft);
  font-size: 11px;
}

.session-hand-badges .is-loss {
  border-color: rgba(189, 62, 71, 0.25);
  color: var(--danger);
}

.session-hand-list {
  display: grid;
  gap: 7px;
  max-height: 430px;
  overflow: auto;
}

.session-hand-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.session-hand-row.is-current {
  border-color: var(--accent-border);
  background: var(--accent-soft);
}

.session-hand-row p {
  margin: 3px 0 7px;
  font-size: 12px;
}

.session-error {
  margin: 0;
  padding: 12px 20px;
  border-top: 1px solid rgba(189, 62, 71, 0.18);
  background: rgba(189, 62, 71, 0.07);
  color: var(--danger);
}

.tree-street-grid {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) minmax(0, 1fr);
  gap: 7px;
  align-items: end;
  padding: 10px 0;
  border-top: 1px solid var(--border);
}

.tree-street-grid > strong {
  grid-row: span 3;
  align-self: start;
  padding-top: 23px;
  color: var(--ink);
}

.tree-street-grid > span {
  color: var(--muted);
  font-size: 10px;
}

.tree-street-grid .field {
  min-width: 0;
}

.tree-street-grid input {
  width: 100%;
}

.tree-donk-field {
  grid-column: 2 / -1;
}

@media (max-width: 760px) {
  .session-header {
    align-items: stretch;
    flex-direction: column;
  }

  .session-import-actions {
    flex-wrap: wrap;
  }

  .session-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .session-hand-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .top-actions .button.secondary {
    display: none;
  }

  .table-workflow .journey-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .table-workflow .journey-steps li:nth-child(3n) {
    border-right: 1px solid var(--border);
  }

  .table-workflow .journey-steps li:nth-child(2n) {
    border-right: 0;
  }

  .table-workflow .journey-steps li:nth-last-child(-n+3) {
    border-bottom: 1px solid var(--border);
  }

  .table-workflow .journey-steps li:nth-last-child(-n+2) {
    border-bottom: 0;
  }

  .table-seats {
    grid-template-columns: 1fr;
  }

  .preflop-strategy-body {
    grid-template-columns: 1fr;
  }

  .review-facts {
    grid-template-columns: 1fr;
  }

  .review-facts div {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .review-facts div:last-child {
    border-bottom: 0;
  }

  .preflop-node-inspector {
    grid-template-columns: 1fr;
  }

  .preflop-strategy-actions {
    grid-template-columns: 1fr;
    padding-top: 0;
  }

  .preflop-strategy-hand {
    justify-content: flex-start;
  }

  .view-heading {
    display: grid;
    gap: 14px;
  }

  .board-runout {
    justify-content: flex-start;
  }

  .action-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .action-stat:nth-child(2n) {
    border-right: 0;
  }

  .matrix-meta {
    display: grid;
    gap: 3px;
    text-align: right;
  }

  .available-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .action-button {
    width: 100%;
  }

  .card-picker-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .card-picker-actions > div {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

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

@media (prefers-reduced-transparency: reduce) {
  .sidebar,
  .topbar,
  .brand-row {
    background: #f9fbfe;
    backdrop-filter: none;
  }
}

@media (max-width: 1020px) {
  .sidebar {
    background: #f9fbfe;
    box-shadow: 22px 0 56px rgba(52, 70, 100, 0.16);
  }
}

@media (max-width: 760px) {
  .table-center {
    border-color: var(--border);
    background: rgba(255, 255, 255, 0.72);
  }

  .preflop-node-inspector {
    background: #f5f7fb;
  }

  .solve-progress-panel {
    width: min(100%, calc(100vw - 48px));
    padding: 13px;
  }
}

@media (max-width: 520px) {
  .solve-progress-facts {
    grid-template-columns: 1fr;
  }

  .solve-progress-facts div,
  .solve-progress-facts div:first-child,
  .solve-progress-facts div:last-child {
    padding: 9px 0;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .solve-progress-facts div:last-child {
    border-bottom: 0;
  }
}

/* Precision decision table
   Decision Slate (#182235) — contained table surface and primary visual focus.
   Instrument Cobalt (#2458d6) — selected, current, and keyboard-focus state.
   Laboratory Frost (#f3f6fa) — surrounding workstation surface. */
.poker-table {
  --decision-slate: #182235;
  --decision-slate-deep: #111a2a;
  --decision-line: rgba(206, 219, 240, 0.13);
  --decision-ink: #edf3fc;
  --decision-muted: #9faec3;
  min-height: 650px;
  isolation: isolate;
  overflow: hidden;
  border-bottom: 1px solid rgba(32, 54, 88, 0.12);
  background:
    linear-gradient(rgba(39, 65, 106, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(39, 65, 106, 0.035) 1px, transparent 1px),
    #f3f6fa;
  background-size: 32px 32px;
}

.poker-table::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(circle at 50% 48%, rgba(36, 88, 214, 0.08), transparent 47%);
}

.table-orbit {
  top: 50%;
  width: min(70%, 1040px);
  height: 58%;
  transform: translate(-50%, -48%);
  border: 1px solid rgba(124, 148, 185, 0.42);
  border-radius: 46% / 50%;
  background:
    linear-gradient(var(--decision-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--decision-line) 1px, transparent 1px),
    radial-gradient(circle at 50% 42%, rgba(54, 85, 130, 0.72), transparent 58%),
    var(--decision-slate-deep);
  background-size: 40px 40px, 40px 40px, auto, auto;
  box-shadow:
    inset 0 0 0 9px rgba(210, 221, 238, 0.035),
    inset 0 0 0 10px rgba(210, 221, 238, 0.11),
    inset 0 -90px 130px rgba(4, 10, 20, 0.3),
    0 30px 70px rgba(42, 62, 94, 0.19);
}

.table-orbit::before,
.table-orbit::after {
  background: rgba(210, 221, 238, 0.11);
}

.table-orbit::before {
  right: 10%;
  left: 10%;
}

.table-orbit::after {
  top: 18%;
  bottom: 18%;
}

.table-seat {
  width: 184px;
  transition: opacity 160ms ease, transform 180ms cubic-bezier(.16,1,.3,1);
}

.seat-utg { top: 34px; left: 3.4%; }
.seat-mp { top: 18px; }
.seat-co { top: 34px; right: 3.4%; }
.seat-btn { top: 47%; right: 1.8%; }
.seat-sb { right: 20%; bottom: 34px; }
.seat-bb { bottom: 34px; left: 20%; }

.seat-card,
.poker-table.is-awaiting-position .seat-card,
.poker-table.is-awaiting-opponent .table-seat:not(.is-hero) .seat-card {
  min-height: 112px;
  padding: 12px 13px;
  border: 1px solid rgba(39, 65, 106, 0.17);
  border-radius: 12px;
  background: rgba(249, 251, 254, 0.98);
  box-shadow:
    0 1px 0 rgba(249, 251, 254, 0.92) inset,
    0 12px 30px rgba(40, 60, 91, 0.13);
}

.seat-card:hover:not(:disabled),
.poker-table.is-awaiting-position .seat-card:hover,
.poker-table.is-awaiting-position .seat-card:focus-visible,
.poker-table.is-awaiting-opponent .table-seat:not(.is-hero) .seat-card:hover,
.poker-table.is-awaiting-opponent .table-seat:not(.is-hero) .seat-card:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(36, 88, 214, 0.52);
  background: #f8faff;
  box-shadow: 0 0 0 3px rgba(36, 88, 214, 0.1), 0 18px 38px rgba(40, 60, 91, 0.18);
}

.table-seat.is-hero .seat-card {
  border-color: rgba(36, 88, 214, 0.56);
  background: #f1f5ff;
  box-shadow: 0 0 0 3px rgba(36, 88, 214, 0.08), 0 14px 34px rgba(40, 60, 91, 0.16);
}

.table-seat.is-opponent .seat-card,
.table-seat.is-in-hand .seat-card {
  border-color: rgba(84, 104, 135, 0.4);
  background: #f7f9fc;
  box-shadow: 0 12px 28px rgba(40, 60, 91, 0.12);
}

.table-seat.is-actor {
  z-index: 8;
  width: 204px;
}

.table-seat.is-actor .seat-card {
  border-color: #2458d6;
  background: #f8faff;
  box-shadow: 0 0 0 4px rgba(36, 88, 214, 0.12), 0 20px 45px rgba(25, 55, 112, 0.24);
}

.table-seat.is-actor .seat-card::before {
  content: "";
  position: absolute;
  top: -1px;
  right: 15px;
  left: 15px;
  height: 3px;
  border-radius: 0 0 4px 4px;
  background: #2458d6;
}

.seat-card {
  position: relative;
}

.table-seat.is-auto-skipped .seat-card,
.table-seat.is-folded .seat-card {
  min-height: 84px;
  border-style: dashed;
  border-color: rgba(74, 94, 126, 0.18);
  background: rgba(241, 244, 249, 0.86);
  box-shadow: none;
  opacity: 0.64;
}

.table-seat.is-auto-skipped .seat-body,
.table-seat.is-folded .seat-body {
  display: none;
}

.table-seat.is-auto-skipped .seat-status,
.table-seat.is-folded .seat-status {
  margin-top: 7px;
  color: #738096;
}

.seat-topline strong {
  color: #172236;
  font-size: 14px;
  font-weight: 780;
  letter-spacing: -0.02em;
}

.seat-topline small {
  min-width: 30px;
  padding: 3px 7px;
  border-color: rgba(39, 65, 106, 0.12);
  border-radius: 999px;
  background: #edf1f7;
  color: #647188;
  text-align: center;
  font-size: 9px;
  font-weight: 700;
}

.table-seat.is-hero .seat-topline small {
  border-color: rgba(36, 88, 214, 0.28);
  background: rgba(36, 88, 214, 0.08);
  color: #1948be;
}

.table-seat.is-opponent .seat-topline small {
  border-color: rgba(69, 88, 118, 0.2);
  background: #e8edf4;
  color: #526078;
}

.seat-body {
  min-height: 44px;
}

.seat-stack strong {
  color: #23304a;
  font-size: 11px;
  font-weight: 760;
}

.seat-stack small,
.seat-status {
  color: #6b788c;
  font-size: 9px;
}

.table-seat.is-actor .seat-status {
  color: #1948be;
  font-weight: 760;
}

.table-seat.is-actor .seat-status::before {
  content: "";
  flex: 0 0 auto;
  width: 6px;
  height: 6px;
  margin-right: 6px;
  border-radius: 50%;
  background: #2458d6;
  box-shadow: 0 0 0 3px rgba(36, 88, 214, 0.1);
}

.playing-card.is-seat {
  width: 34px;
  height: 46px;
  padding: 3px 4px;
  border-radius: 7px;
}

.playing-card.is-seat strong { font-size: 13px; }
.playing-card.is-seat .suit-symbol { font-size: 18px; }

.playing-card.is-back {
  width: 34px;
  height: 46px;
  border-color: rgba(151, 172, 205, 0.72);
  border-radius: 7px;
  background:
    repeating-linear-gradient(135deg, rgba(225, 234, 248, 0.2) 0 2px, transparent 2px 6px),
    #315aa9;
  box-shadow: inset 0 0 0 2px #234887, 0 4px 10px rgba(30, 53, 96, 0.18);
}

.seat-action-dock.is-quiet {
  display: none;
}

.seat-action-dock.is-live {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 10;
  display: grid;
  width: max(100%, min(520px, 52vw));
  grid-template-columns: repeat(var(--seat-action-count, 2), minmax(72px, 1fr));
  gap: 6px;
  min-height: 0;
  margin: 0;
  padding: 7px;
  border: 1px solid rgba(39, 65, 106, 0.14);
  border-radius: 12px;
  background: rgba(249, 251, 254, 0.97);
  box-shadow: 0 18px 42px rgba(32, 52, 84, 0.2);
}

.seat-co .seat-action-dock.is-live,
.seat-btn .seat-action-dock.is-live,
.seat-sb .seat-action-dock.is-live {
  right: 0;
  left: auto;
}

.seat-btn .seat-action-dock.is-live {
  top: auto;
  bottom: calc(100% + 8px);
}

.table-seat.is-actor.seat-utg .seat-action-dock.is-live,
.table-seat.is-actor.seat-co .seat-action-dock.is-live {
  top: calc(100% + 4px);
  padding: 5px;
}

.table-seat.is-actor.seat-utg .seat-action,
.table-seat.is-actor.seat-co .seat-action {
  min-height: 54px;
}

.seat-action {
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 4px;
  min-height: 58px;
  padding: 9px 10px;
  border-color: rgba(39, 65, 106, 0.13);
  border-radius: 8px;
  background: #f2f5f9;
  color: #3d4b62;
  text-align: left;
  transition: transform 150ms cubic-bezier(.16,1,.3,1), border-color 150ms ease, background 150ms ease, box-shadow 150ms ease;
}

.seat-action-dock.is-live:not(.is-postflop) .seat-action {
  font-size: 14px;
  font-weight: 750;
  letter-spacing: -0.01em;
}

.seat-action strong {
  color: inherit;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
}

.seat-action small {
  color: currentColor;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.2;
  opacity: 0.72;
}

.seat-action:hover,
.seat-action:focus-visible {
  z-index: 1;
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(40, 60, 91, 0.14);
}

.seat-action.is-fold {
  border-color: rgba(79, 93, 116, 0.18);
  background: #edf1f5;
  color: #536076;
}

.seat-action.is-check,
.seat-action.is-call {
  border-color: rgba(31, 122, 94, 0.28);
  background: #eaf6f1;
  color: #176b50;
}

.seat-action.is-raise {
  border-color: rgba(189, 62, 71, 0.26);
  background: #faecee;
  color: #a8323c;
}

.table-center {
  top: 50%;
  z-index: 5;
  width: min(46%, 680px);
  min-height: 230px;
  transform: translate(-50%, -39%);
}

.table-center-status,
.poker-table.is-awaiting-position .table-center-status,
.poker-table.is-awaiting-opponent .table-center-status,
.poker-table.has-current-action .table-center-status {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
  margin-bottom: 14px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.table-center-status > span {
  display: inline;
  min-width: 0;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #9bb4eb;
  font-size: 10px;
  font-weight: 800;
}

.table-center-status > span::after {
  content: "·";
  margin-left: 10px;
  color: rgba(194, 209, 232, 0.5);
}

.table-decision-copy {
  display: block;
  min-width: 0;
}

.table-decision-copy small {
  display: none;
}

.table-center-status .table-decision-copy strong,
.poker-table.has-current-action .table-center-status .table-decision-copy strong {
  overflow: hidden;
  color: var(--decision-ink);
  font-size: 20px;
  font-weight: 790;
  letter-spacing: -0.03em;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.table-center .board-runout {
  min-height: 82px;
  margin-top: 0;
}

.table-decision-actions {
  display: grid;
  width: min(420px, 92%);
  grid-template-columns: repeat(var(--decision-action-count, 3), minmax(0, 1fr));
  gap: 5px;
  margin: 0 auto 12px;
  padding: 5px;
  border: 1px solid rgba(189, 207, 234, 0.18);
  border-radius: 10px;
  background: rgba(12, 23, 40, 0.78);
  box-shadow: 0 10px 26px rgba(3, 9, 19, 0.2), inset 0 1px 0 rgba(232, 239, 250, 0.05);
}

.table-decision-actions[hidden] {
  display: none;
}

.table-decision-actions .seat-action {
  place-items: center;
  min-height: 46px;
  padding: 0 10px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 780;
  letter-spacing: -0.01em;
  line-height: 1;
  text-align: center;
}

.poker-table.has-preflop-action .table-center {
  width: min(50%, 720px);
}

.poker-table.has-preflop-action .board-runout {
  display: none;
}

.table-center .playing-card {
  width: 54px;
  height: 74px;
  padding: 6px 7px;
  border-radius: 9px;
  box-shadow: 0 10px 24px rgba(4, 10, 20, 0.3);
}

.table-center .playing-card strong { font-size: 20px; }
.table-center .playing-card .suit-symbol { font-size: 27px; }

.table-center .playing-card.is-placeholder {
  border-color: rgba(194, 209, 232, 0.32);
  background: rgba(233, 239, 248, 0.055);
  box-shadow: none;
}

.board-runout-button.is-selecting {
  border-color: rgba(92, 135, 230, 0.42);
  background: rgba(36, 88, 214, 0.13);
  box-shadow: 0 0 0 3px rgba(36, 88, 214, 0.12);
}

.table-pot-line {
  gap: 7px;
  margin-top: 12px;
}

.table-pot-line div {
  gap: 7px;
  min-height: 30px;
  align-items: center;
  padding: 0 10px;
  border: 1px solid rgba(198, 214, 238, 0.15);
  border-radius: 8px;
  background: rgba(229, 237, 248, 0.06);
}

.table-pot-line dt,
.table-pot-line dd {
  color: var(--decision-muted);
  font-size: 9px;
}

.table-pot-line dd {
  color: var(--decision-ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-weight: 700;
}

@media (min-width: 761px) {
  .table-seat.is-actor.seat-sb,
  .table-seat.is-actor.seat-bb {
    bottom: 112px;
  }

  .table-seat.is-actor.seat-btn {
    top: 39%;
  }
}

@media (max-width: 1240px) and (min-width: 761px) {
  .poker-table { min-height: 620px; }
  .table-seat { width: 164px; }
  .table-seat.is-actor { width: 190px; }
  .table-seat.is-actor.seat-utg,
  .table-seat.is-actor.seat-co {
    transform: translateY(-20px);
  }
  .seat-utg { left: 2%; }
  .seat-co { right: 2%; }
  .seat-sb { right: 17%; }
  .seat-bb { left: 17%; }
  .seat-action-dock.is-live { width: min(460px, 48vw); }
}

@media (max-width: 760px) {
  .poker-table {
    min-height: 0;
    padding: 12px;
    background: #eef2f7;
  }

  .table-center {
    position: relative;
    top: auto;
    left: auto;
    grid-row: 1;
    width: 100%;
    min-height: 238px;
    padding: 18px 12px;
    transform: none;
    border-color: rgba(126, 149, 184, 0.34);
    background:
      linear-gradient(rgba(206, 219, 240, 0.08) 1px, transparent 1px),
      linear-gradient(90deg, rgba(206, 219, 240, 0.08) 1px, transparent 1px),
      var(--decision-slate-deep);
    background-size: 32px 32px;
  }

  .table-center-status,
  .poker-table.is-awaiting-position .table-center-status,
  .poker-table.is-awaiting-opponent .table-center-status,
  .poker-table.has-current-action .table-center-status {
    min-width: 0;
    width: 100%;
  }

  .table-center .playing-card {
    width: 48px;
    height: 66px;
  }

  .table-seats {
    gap: 8px;
  }

  .table-seat,
  .table-seat.is-actor {
    width: auto;
  }

  .table-seat.is-auto-skipped,
  .table-seat.is-folded {
    display: none;
  }

  .seat-action-dock.is-live {
    position: static;
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 7px;
  }

  .seat-action-dock.is-live > .seat-action:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }
}

/* Preflop route: a compact research trace, not a decorative progress widget. */
.preflop-route-panel {
  padding: 14px 16px 15px;
  border-bottom: 1px solid var(--border);
  background: #f5f7fb;
}

.preflop-route-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.preflop-route-heading > div {
  display: grid;
  gap: 3px;
}

.preflop-route-eyebrow {
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.preflop-route-heading strong {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.35;
}

.strategy-provenance {
  flex: 0 0 auto;
  min-height: 28px;
  padding: 6px 9px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: #fbfcfe;
  color: var(--ink-soft);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 9px;
  font-weight: 700;
  line-height: 1.4;
}

.strategy-provenance.is-public {
  border-color: rgba(31, 122, 94, 0.25);
  background: rgba(31, 122, 94, 0.07);
  color: var(--success);
}

.strategy-provenance.is-authored {
  border-color: rgba(170, 103, 29, 0.28);
  background: rgba(170, 103, 29, 0.08);
  color: var(--warning);
}

.strategy-provenance.is-error,
.strategy-provenance.is-unsupported {
  border-color: rgba(189, 62, 71, 0.25);
  background: rgba(189, 62, 71, 0.07);
  color: var(--danger);
}

.preflop-route {
  display: flex;
  min-width: 0;
  margin: 0;
  padding: 0;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: #fbfcfe;
  list-style: none;
  scrollbar-width: thin;
}

.preflop-route > li {
  display: flex;
  flex: 1 0 142px;
  align-items: center;
  gap: 9px;
  min-height: 58px;
  padding: 9px 11px;
  border-right: 1px solid var(--border);
}

.preflop-route > li:last-child {
  border-right: 0;
}

.preflop-route > li.is-current {
  background: var(--accent-soft);
  box-shadow: inset 0 -2px 0 var(--accent);
}

.preflop-route > li.is-upcoming {
  background: #f7f9fc;
}

.preflop-route-marker {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  background: #fbfcfe;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 9px;
  font-weight: 800;
}

.preflop-route .is-complete .preflop-route-marker {
  border-color: var(--success);
  background: var(--success);
  color: #fff;
}

.preflop-route .is-current .preflop-route-marker {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
}

.preflop-route li > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.preflop-route li strong {
  color: var(--ink-soft);
  font-size: 10px;
  line-height: 1.2;
  white-space: nowrap;
}

.preflop-route li small {
  color: var(--muted);
  font-size: 8px;
  line-height: 1.2;
  white-space: nowrap;
}

.preflop-route li.is-current strong {
  color: var(--accent);
}

.preflop-route li.is-upcoming strong,
.preflop-route li.is-upcoming small {
  color: var(--dim);
}

.preflop-line-compact {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  margin-top: 9px;
}

.preflop-line-compact > span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  white-space: nowrap;
}

.preflop-line-compact ol {
  display: flex;
  gap: 5px;
  min-width: 0;
  margin: 0;
  padding: 0 0 1px;
  overflow-x: auto;
  list-style: none;
  scrollbar-width: thin;
}

.preflop-line-compact li {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  min-height: 28px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fbfcfe;
}

.preflop-line-compact li strong,
.preflop-line-compact li span {
  padding: 5px 7px;
  font-size: 9px;
  line-height: 1.2;
  white-space: nowrap;
}

.preflop-line-compact li strong {
  border-right: 1px solid var(--border);
  color: var(--ink-soft);
}

.preflop-line-compact li span {
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.preflop-line-compact li.is-raise {
  border-color: rgba(201, 79, 85, 0.3);
  background: rgba(201, 79, 85, 0.06);
}

.preflop-line-compact li.is-call,
.preflop-line-compact li.is-check {
  border-color: rgba(31, 122, 94, 0.26);
  background: rgba(31, 122, 94, 0.06);
}

.preflop-line-compact li.is-empty {
  min-height: 0;
  border: 0;
  background: transparent;
  color: var(--dim);
  font-size: 9px;
}

.preflop-library-facts {
  display: grid;
  flex: 1 1 auto;
  grid-template-columns: repeat(5, minmax(88px, 1fr));
  min-width: 0;
  margin: 0;
}

.preflop-library-facts > div {
  min-width: 0;
  padding: 0 12px;
  border-right: 1px solid var(--border);
}

.preflop-library-facts > div:first-child {
  padding-left: 0;
}

.preflop-library-facts > div:last-child {
  border-right: 0;
}

.preflop-library-facts dt {
  color: var(--dim);
  font-size: 8px;
}

.preflop-library-facts dd {
  margin: 3px 0 0;
  overflow: hidden;
  color: var(--ink-soft);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 9px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 1020px) {
  .preflop-route > li {
    flex-basis: 136px;
  }

  .preflop-library-facts {
    grid-template-columns: repeat(3, minmax(92px, 1fr));
    row-gap: 9px;
  }

  .preflop-library-facts > div:nth-child(3) {
    border-right: 0;
  }
}

@media (max-width: 760px) {
  .preflop-route-panel {
    padding: 13px 14px 14px;
  }

  .preflop-route-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .preflop-route > li {
    flex-basis: 132px;
  }

  .preflop-line-compact {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .preflop-library-facts {
    grid-template-columns: repeat(2, minmax(110px, 1fr));
    width: 100%;
  }

  .preflop-library-facts > div,
  .preflop-library-facts > div:first-child {
    padding: 0 9px;
  }

  .preflop-library-facts > div:nth-child(2n) {
    border-right: 0;
  }

  .strategy-footer-actions {
    width: 100%;
  }
}

/* Workstation refinement
   Keep the postflop decision controls inside the table, preserve the dense
   research layout on laptop screens, and reduce setup chrome when no session
   has been imported. */
.session-workspace:has(#sessionReport[hidden]) {
  display: block;
  min-height: 72px;
  margin-bottom: 12px;
}

.session-workspace:has(#sessionReport[hidden]) .session-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  min-width: 0;
  padding: 13px 16px;
  border-bottom: 0;
  background: transparent;
}

.session-workspace:has(#sessionReport[hidden]) .session-header > div:first-child {
  min-width: 0;
}

.session-workspace:has(#sessionReport[hidden]) .session-header .stage-label {
  display: none;
}

.session-workspace:has(#sessionReport[hidden]) .session-header h1 {
  margin: 0 0 3px;
  font-size: 14px;
  line-height: 1.2;
  letter-spacing: -0.015em;
}

.session-workspace:has(#sessionReport[hidden]) .session-header p {
  overflow: hidden;
  font-size: 11px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.session-workspace:has(#sessionReport[hidden]) .session-import-actions {
  position: static;
  align-items: center;
}

.session-workspace:has(#sessionReport[hidden]) .session-empty {
  display: none;
}

.seat-action-dock.is-live {
  width: max(100%, min(460px, 48vw));
  padding: 6px;
  border-color: rgba(39, 65, 106, 0.16);
  border-radius: 10px;
  box-shadow: 0 14px 34px rgba(32, 52, 84, 0.17);
}

.seat-mp .seat-action-dock.is-live {
  right: auto;
  left: 50%;
  transform: translateX(-50%);
}

.seat-action {
  min-width: 0;
}

.seat-action strong,
.seat-action small {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.seat-action strong {
  letter-spacing: -0.015em;
  white-space: nowrap;
}

.seat-action small {
  display: -webkit-box;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.seat-action:active {
  transform: translateY(0);
  box-shadow: inset 0 1px 3px rgba(40, 60, 91, 0.14);
}

@media (min-width: 900px) and (max-width: 1020px) {
  .table-workspace-header {
    grid-template-columns: minmax(230px, 0.55fr) minmax(0, 1.45fr);
    gap: 16px;
    min-height: 100px;
    padding: 16px 18px;
  }

  .table-workspace-header h1 {
    margin-block: 4px 5px;
    font-size: 24px;
  }

  .table-workspace-header p {
    font-size: 11px;
  }

  .table-workflow .journey-step {
    min-height: 56px;
    padding: 7px 8px;
  }

  .table-workflow .journey-step > span {
    width: 24px;
    height: 24px;
  }

  .table-workflow .journey-step strong {
    font-size: 11px;
  }

  .table-workflow .journey-step small {
    font-size: 8px;
  }

  .seat-action-dock.is-live {
    width: max(100%, min(440px, 47vw));
  }

  .table-seat.is-actor.seat-utg .seat-action,
  .table-seat.is-actor.seat-co .seat-action {
    min-height: 60px;
  }
}

@media (max-width: 899px) and (min-width: 761px) {
  .session-workspace:has(#sessionReport[hidden]) .session-header p {
    max-width: 46vw;
  }

  .seat-action-dock.is-live {
    width: max(100%, min(390px, 44vw));
  }
}

@media (max-width: 760px) {
  .session-workspace:has(#sessionReport[hidden]) {
    display: block;
    min-height: 0;
  }

  .session-workspace:has(#sessionReport[hidden]) .session-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 12px;
  }

  .session-workspace:has(#sessionReport[hidden]) .session-header p {
    display: none;
  }

  .session-workspace:has(#sessionReport[hidden]) .session-import-actions {
    position: static;
    flex-wrap: nowrap;
  }

  .session-workspace:has(#sessionReport[hidden]) .session-import-actions .button {
    min-height: 44px;
    padding-inline: 10px;
    white-space: nowrap;
  }

  .seat-mp .seat-action-dock.is-live {
    transform: none;
  }

  .seat-action-dock.is-live {
    width: 100%;
    padding: 6px;
  }

  .seat-action strong { white-space: nowrap; }

  .table-decision-actions {
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 12px;
  }

  .table-decision-actions > .seat-action:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }

  .table-decision-actions .seat-action {
    min-height: 44px;
  }
}
