/*
 * POQUAIR — Canal Noir
 * A single, authoritative visual layer for the standalone tournament clock.
 * Functional selectors and application behavior remain in Poquair.Client/index.html.
 */

:root {
  color-scheme: dark;
  --theme-accent: #77afe7;
  --theme-accent-rgb: 119, 175, 231;
  --theme-accent-bright: #9bc9f5;
  --theme-accent-bright-rgb: 155, 201, 245;
  --theme-accent-dark: #689aca;
  --theme-accent-ink: #07121d;
  --theme-accent-check-ink: #071019;
  --cn-bg: #07090d;
  --cn-bg-deep: #040609;
  --cn-surface: #10141b;
  --cn-surface-raised: #151b24;
  --cn-surface-soft: rgba(255, 255, 255, 0.045);
  --cn-surface-hover: rgba(255, 255, 255, 0.075);
  --cn-control: rgba(255, 255, 255, 0.052);
  --cn-control-hover: rgba(255, 255, 255, 0.075);
  --cn-topbar: rgba(10, 13, 18, 0.86);
  --cn-overlay: rgba(4, 7, 11, 0.78);
  --cn-line: rgba(221, 232, 246, 0.105);
  --cn-line-strong: rgba(221, 232, 246, 0.18);
  --cn-text: #f5f3ed;
  --cn-text-cool: #e9eef6;
  --cn-muted: #8e99aa;
  --cn-muted-strong: #adb7c6;
  --cn-blue: var(--theme-accent);
  --cn-blue-bright: var(--theme-accent-bright);
  --cn-blue-ink: var(--theme-accent-ink);
  --cn-green: #65cdb0;
  --cn-gold: #d2b36f;
  --cn-gold-bright: #f0d596;
  --cn-bronze: var(--theme-accent-dark);
  --cn-bronze-bright: var(--theme-accent-bright);
  --cn-red: #e7757d;
  --cn-radius-xs: 8px;
  --cn-radius-sm: 12px;
  --cn-radius-md: 18px;
  --cn-radius-lg: 24px;
  --cn-shadow-sm: 0 10px 30px rgba(0, 0, 0, 0.22);
  --cn-shadow-md: 0 24px 70px rgba(0, 0, 0, 0.3);
  --cn-shadow-lg: 0 40px 110px rgba(0, 0, 0, 0.42);
  --cn-inner: inset 0 1px 0 rgba(255, 255, 255, 0.045);
  --cn-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --cn-type-caption: 0.72rem;
  --cn-type-small: 0.8rem;
  --cn-type-body: 0.88rem;
  --cn-type-control: 0.9rem;
  --cn-type-card-title: 1.05rem;
  --cn-type-section: clamp(1.75rem, 2.15vw, 2.25rem);
  --cn-type-metric: clamp(1.8rem, 2.3vw, 2.45rem);
  --cn-display-caption: clamp(0.72rem, 0.78vw, 0.9rem);
  --cn-display-body: clamp(0.88rem, 0.96vw, 1.08rem);
  --bg: var(--cn-bg);
  --bg-2: var(--cn-bg-deep);
  --panel: var(--cn-surface);
  --panel-strong: var(--cn-surface-raised);
  --line: var(--cn-line);
  --line-strong: rgba(var(--theme-accent-rgb), 0.42);
  --text: var(--cn-text);
  --muted: var(--cn-muted);
  --gold: var(--cn-gold);
  --gold-2: var(--cn-gold-bright);
  --blue: var(--cn-blue);
  --green: var(--cn-green);
  --red: var(--cn-red);
  --radius: var(--cn-radius-sm);
  --shadow: var(--cn-shadow-md);
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", Inter, "Segoe UI", sans-serif;
}

:root[data-theme-mode="light"] {
  color-scheme: light;
  --cn-bg: #f3f6fa;
  --cn-bg-deep: #e8edf4;
  --cn-surface: #ffffff;
  --cn-surface-raised: #f8fafc;
  --cn-surface-soft: rgba(24, 42, 61, 0.045);
  --cn-surface-hover: rgba(24, 42, 61, 0.075);
  --cn-control: rgba(24, 42, 61, 0.055);
  --cn-control-hover: rgba(24, 42, 61, 0.09);
  --cn-topbar: rgba(255, 255, 255, 0.88);
  --cn-overlay: rgba(255, 255, 255, 0.88);
  --cn-line: rgba(24, 42, 61, 0.12);
  --cn-line-strong: rgba(24, 42, 61, 0.2);
  --cn-text: #111a24;
  --cn-text-cool: #1d2a38;
  --cn-muted: #687789;
  --cn-muted-strong: #4d5e70;
  --cn-blue-ink: var(--theme-accent-ink);
  --cn-shadow-sm: 0 10px 28px rgba(31, 47, 66, 0.09);
  --cn-shadow-md: 0 24px 60px rgba(31, 47, 66, 0.12);
  --cn-shadow-lg: 0 36px 90px rgba(31, 47, 66, 0.16);
  --cn-inner: inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

html {
  background: var(--cn-bg-deep);
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  background:
    radial-gradient(circle at 14% -8%, rgba(var(--theme-accent-rgb), 0.18), transparent 34rem),
    radial-gradient(circle at 92% 18%, rgba(var(--theme-accent-rgb), 0.09), transparent 31rem),
    linear-gradient(180deg, var(--cn-bg) 0%, var(--cn-bg-deep) 100%);
  color: var(--cn-text);
  font-family: var(--sans);
  font-feature-settings: "kern" 1, "tnum" 1;
  letter-spacing: -0.008em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  display: block;
  background:
    linear-gradient(90deg, transparent 0 49.96%, rgba(255, 255, 255, 0.018) 50%, transparent 50.04%),
    radial-gradient(circle at 50% 0, rgba(var(--theme-accent-rgb), 0.055), transparent 45%);
  background-size: 96px 100%, 100% 100%;
  content: "";
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.7), transparent 74%);
  opacity: 0.48;
  pointer-events: none;
}

body::after,
#setupView.active::before {
  display: none;
}

::selection {
  background: rgba(var(--theme-accent-rgb), 0.34);
  color: #fff;
}

* {
  scrollbar-color: rgba(135, 153, 176, 0.35) transparent;
  scrollbar-width: thin;
}

*::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

*::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: rgba(135, 153, 176, 0.35);
  background-clip: padding-box;
}

.app {
  min-height: 100vh;
  padding: 18px clamp(14px, 2.1vw, 32px) 40px;
}

.shell,
body:not(.display-mode) .shell {
  width: min(1560px, 100%);
  max-width: none;
  margin: 0 auto;
}

main,
body:not(.display-mode) main {
  width: 100%;
  padding: 0;
}

/* Top bar and navigation */

.topbar {
  position: sticky;
  top: 12px;
  z-index: 100;
  min-height: 62px;
  margin: 0 0 22px;
  padding: 9px 10px 9px 14px;
  border: 1px solid var(--cn-line);
  border-radius: 16px;
  background: var(--cn-topbar);
  box-shadow: var(--cn-shadow-sm), var(--cn-inner);
  backdrop-filter: blur(24px) saturate(1.15);
  -webkit-backdrop-filter: blur(24px) saturate(1.15);
}

.brand {
  gap: 0;
}

.brand-logo-lockup {
  width: clamp(170px, 13vw, 208px);
  filter: drop-shadow(0 8px 18px rgba(var(--theme-accent-rgb), 0.2));
}

.brand .brand-subtitle {
  margin-left: 16px;
  padding-left: 16px;
  border-left-color: rgba(221, 232, 246, 0.12);
  color: var(--cn-muted);
  font-size: 0.75rem;
  font-weight: 560;
  letter-spacing: 0.015em;
}

.nav-tabs {
  gap: 3px;
  padding: 4px;
  border: 1px solid rgba(221, 232, 246, 0.09);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  box-shadow: var(--cn-inner);
}

.topbar-actions {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}

.topbar-status {
  display: none;
}

body.projector-mode .topbar-status {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  max-width: min(34vw, 440px);
  transform: translate(-50%, -50%);
  white-space: nowrap;
}

body.projector-mode .topbar-status .badge {
  min-height: 26px;
  padding-inline: 10px;
  font-size: var(--cn-display-caption);
}

.theme-picker {
  position: relative;
  flex: 0 0 auto;
}

.theme-picker > summary {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 8px 13px;
  border: 1px solid var(--cn-line);
  border-radius: 999px;
  background: var(--cn-surface-soft);
  color: var(--cn-muted-strong);
  box-shadow: var(--cn-inner);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 760;
  list-style: none;
  transition: border-color 180ms var(--cn-ease), background 180ms var(--cn-ease), color 180ms var(--cn-ease);
}

.theme-picker > summary::-webkit-details-marker {
  display: none;
}

.theme-picker > summary::after {
  content: "⌄";
  font-size: 0.72rem;
  transition: transform 180ms var(--cn-ease);
}

.theme-picker[open] > summary::after {
  transform: rotate(180deg);
}

.theme-picker > summary:hover,
.theme-picker[open] > summary {
  border-color: rgba(var(--theme-accent-rgb), 0.34);
  background: rgba(var(--theme-accent-rgb), 0.1);
  color: var(--cn-text);
}

.theme-current-swatch {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.72);
  border-radius: 50%;
  background: var(--theme-accent);
  box-shadow: 0 0 0 1px rgba(var(--theme-accent-rgb), 0.55), 0 0 12px rgba(var(--theme-accent-rgb), 0.28);
}

.theme-popover {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 140;
  display: grid;
  gap: 16px;
  width: min(300px, calc(100vw - 28px));
  padding: 16px;
  border: 1px solid var(--cn-line-strong);
  border-radius: 16px;
  background: var(--cn-overlay);
  box-shadow: var(--cn-shadow-lg), var(--cn-inner);
  backdrop-filter: blur(24px) saturate(1.1);
  -webkit-backdrop-filter: blur(24px) saturate(1.1);
}

.theme-control-group {
  display: grid;
  gap: 8px;
}

.theme-control-label {
  color: var(--cn-muted);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.theme-mode-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
  padding: 4px;
  border: 1px solid var(--cn-line);
  border-radius: 12px;
  background: var(--cn-surface-soft);
}

.theme-mode-options button {
  min-height: 38px;
  padding: 7px 10px;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  color: var(--cn-muted-strong);
  font-size: 0.78rem;
}

.theme-mode-options button.active {
  border-color: rgba(var(--theme-accent-rgb), 0.28);
  background: rgba(var(--theme-accent-rgb), 0.14);
  color: var(--cn-text);
}

.theme-color-options {
  display: grid;
  grid-template-columns: 46px repeat(4, 34px);
  align-items: center;
  gap: 9px;
}

.theme-color-options input[type="color"] {
  width: 46px;
  height: 38px;
  min-height: 38px;
  padding: 3px;
  border-radius: 10px;
  cursor: pointer;
}

.theme-color-options input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
}

.theme-color-options input[type="color"]::-webkit-color-swatch {
  border: 0;
  border-radius: 7px;
}

.theme-color-swatch {
  width: 34px;
  min-width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 50%;
  background: var(--theme-swatch);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.34), 0 5px 14px rgba(0, 0, 0, 0.16);
}

.theme-color-swatch:hover,
.theme-color-swatch.active {
  border-color: var(--cn-text);
  background: var(--theme-swatch);
  box-shadow: 0 0 0 3px rgba(var(--theme-accent-rgb), 0.14);
  transform: scale(1.06);
}

.theme-popover > p {
  margin: 0;
  color: var(--cn-muted);
  font-size: 0.72rem;
  line-height: 1.45;
}

.tab-button {
  min-height: 38px;
  padding: 7px 17px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--cn-muted-strong);
  box-shadow: none;
  font-size: 0.82rem;
  font-weight: 680;
  letter-spacing: -0.01em;
  transition: background 180ms var(--cn-ease), color 180ms var(--cn-ease), box-shadow 180ms var(--cn-ease);
}

.tab-button:hover {
  background: var(--cn-control-hover);
  color: var(--cn-text);
  box-shadow: none;
  transform: none;
}

.tab-button.active {
  background: var(--cn-text);
  color: #0a0d12;
  box-shadow: 0 5px 16px rgba(0, 0, 0, 0.25);
}

/* Shared controls */

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

button {
  min-height: 42px;
  padding: 9px 15px;
  border: 1px solid var(--cn-line-strong);
  border-radius: 11px;
  background: var(--cn-control);
  color: var(--cn-text-cool);
  box-shadow: var(--cn-inner);
  font-size: var(--cn-type-body);
  font-weight: 700;
  letter-spacing: -0.012em;
  transition:
    background 180ms var(--cn-ease),
    border-color 180ms var(--cn-ease),
    color 180ms var(--cn-ease),
    box-shadow 180ms var(--cn-ease),
    transform 180ms var(--cn-ease);
}

button:hover {
  border-color: rgba(var(--theme-accent-bright-rgb), 0.34);
  background: rgba(var(--theme-accent-rgb), 0.11);
  color: var(--cn-text);
  box-shadow: var(--cn-inner), 0 9px 24px rgba(0, 0, 0, 0.18);
  transform: translateY(-1px);
}

button:active {
  box-shadow: var(--cn-inner);
  transform: scale(0.975);
}

button:disabled {
  opacity: 0.34;
  cursor: not-allowed;
  filter: saturate(0.4);
  transform: none;
}

button.primary,
.primary {
  border-color: rgba(var(--theme-accent-bright-rgb), 0.36);
  background: linear-gradient(180deg, var(--theme-accent-bright), var(--theme-accent-dark));
  color: var(--cn-blue-ink);
  box-shadow: 0 10px 26px rgba(var(--theme-accent-rgb), 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.48);
}

button.primary:hover,
.primary:hover {
  border-color: rgba(var(--theme-accent-bright-rgb), 0.7);
  background: linear-gradient(180deg, var(--theme-accent-bright), var(--theme-accent));
  color: var(--theme-accent-ink);
  box-shadow: 0 14px 32px rgba(var(--theme-accent-rgb), 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

button.danger,
.danger {
  border-color: rgba(231, 117, 125, 0.26);
  background: rgba(231, 117, 125, 0.09);
  color: #f2a5aa;
}

button.danger:hover,
.danger:hover {
  border-color: rgba(231, 117, 125, 0.46);
  background: rgba(231, 117, 125, 0.15);
  color: #ffc2c6;
}

button.success,
.success {
  border-color: rgba(101, 205, 176, 0.28);
  background: rgba(101, 205, 176, 0.1);
  color: #a2e3d1;
}

button.ghost,
.ghost {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--cn-blue-bright);
  outline-offset: 3px;
}

.icon-button:focus-visible,
.tab-button:focus-visible {
  outline-color: var(--theme-accent-bright);
}

input,
select,
textarea {
  min-height: 44px;
  padding: 9px 12px;
  border: 1px solid var(--cn-line-strong);
  border-radius: 10px;
  background: var(--cn-control);
  color: var(--cn-text);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.18);
  font-size: var(--cn-type-control);
  font-weight: 620;
  transition: background 180ms var(--cn-ease), border-color 180ms var(--cn-ease), box-shadow 180ms var(--cn-ease);
}

input:hover,
select:hover,
textarea:hover {
  border-color: rgba(var(--theme-accent-rgb), 0.28);
  background: var(--cn-control-hover);
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(var(--theme-accent-rgb), 0.66);
  background: rgba(var(--theme-accent-rgb), 0.075);
  box-shadow: 0 0 0 4px rgba(var(--theme-accent-rgb), 0.11), inset 0 1px 2px rgba(0, 0, 0, 0.14);
}

input:disabled,
select:disabled {
  opacity: 0.44;
}

select option {
  background: var(--cn-surface-raised);
  color: var(--cn-text);
}

label {
  gap: 8px;
  color: var(--cn-muted);
  font-size: var(--cn-type-caption);
  font-weight: 760;
  letter-spacing: 0.075em;
  text-transform: uppercase;
}

.actions {
  gap: 8px;
}

.badge {
  min-height: 26px;
  padding: 5px 9px;
  border: 1px solid var(--cn-line);
  border-radius: 999px;
  background: var(--cn-surface-soft);
  color: var(--cn-muted-strong);
  box-shadow: none;
  font-size: 0.68rem;
  font-weight: 790;
  letter-spacing: 0.07em;
}

.badge.blue {
  border-color: rgba(var(--theme-accent-rgb), 0.24);
  background: rgba(var(--theme-accent-rgb), 0.09);
  color: var(--cn-blue-bright);
}

.badge.gold {
  border-color: rgba(210, 179, 111, 0.25);
  background: rgba(210, 179, 111, 0.09);
  color: #e6cd96;
}

.badge.red {
  border-color: rgba(231, 117, 125, 0.26);
  background: rgba(231, 117, 125, 0.09);
  color: #efabb0;
}

/* Panels and section hierarchy */

.grid {
  gap: 24px;
}

.panel,
.hero-clock,
.blind-box,
.stat-box,
.level-row {
  border: 1px solid var(--cn-line);
  background: var(--cn-surface);
  color: var(--cn-text);
  box-shadow: var(--cn-shadow-md), var(--cn-inner);
}

.panel,
.hero-clock {
  overflow: hidden;
  border-radius: var(--cn-radius-lg);
}

.stack-panel::before,
.prize-pool-panel::before {
  display: none;
}

.panel-header {
  min-height: 0;
  padding: 26px clamp(20px, 2.5vw, 36px) 10px;
  border: 0;
  background: transparent;
}

#setupView .setup-grid > .panel > .panel-header,
.stack-panel .panel-header,
.prize-pool-panel .panel-header {
  display: flex;
  align-items: baseline;
  flex-direction: row;
  justify-content: space-between;
  gap: 14px;
  padding: 26px clamp(20px, 2.5vw, 36px) 10px;
}

.panel-header h2,
.panel-header h3,
#setupView .setup-grid > .panel > .panel-header h2,
.stack-panel .panel-header h2,
.tournament-setup-panel .panel-header h2 {
  max-width: none;
  margin: 0;
  color: var(--cn-text);
  font-size: var(--cn-type-section);
  font-weight: 720;
  line-height: 1.04;
  letter-spacing: -0.045em;
}

.panel-header .badge {
  margin-top: 0;
}

.panel-body,
.stack-panel .panel-body,
.tournament-setup-panel .panel-body {
  max-width: none;
  padding: 16px clamp(20px, 2.5vw, 36px) 32px;
}

/* Setup action dock */

.setup-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
}

.setup-action-dock {
  grid-column: 1 / -1;
  position: sticky;
  top: 88px;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 68px;
  padding: 11px 12px 11px 16px;
  border: 1px solid var(--cn-line-strong);
  border-radius: 16px;
  background: var(--cn-topbar);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.3), var(--cn-inner);
  backdrop-filter: blur(24px) saturate(1.15);
  -webkit-backdrop-filter: blur(24px) saturate(1.15);
}

.setup-action-state {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.setup-action-state-indicator {
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  border: 0;
  border-radius: 50%;
  background: var(--cn-blue);
  box-shadow: 0 0 0 6px rgba(var(--theme-accent-rgb), 0.1);
}

.setup-action-dock.started .setup-action-state-indicator {
  background: var(--cn-green);
  box-shadow: 0 0 0 6px rgba(101, 205, 176, 0.1);
}

.setup-action-dock.complete .setup-action-state-indicator {
  background: var(--cn-gold);
  box-shadow: 0 0 0 6px rgba(210, 179, 111, 0.1);
}

.setup-action-state > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.setup-action-state strong {
  color: var(--cn-text);
  font-size: var(--cn-type-control);
  font-weight: 740;
}

.setup-action-state span {
  overflow: hidden;
  color: var(--cn-muted);
  font-size: var(--cn-type-small);
  font-weight: 560;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.setup-action-buttons {
  display: flex;
  align-items: center;
  gap: 7px;
}

.setup-action-buttons button {
  min-height: 42px;
  white-space: nowrap;
}

.setup-action-buttons .primary {
  border-color: rgba(var(--theme-accent-bright-rgb), 0.62);
  background: linear-gradient(180deg, var(--theme-accent), var(--theme-accent-dark));
  color: var(--theme-accent-ink);
  box-shadow:
    0 8px 22px rgba(var(--theme-accent-rgb), 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.42);
}

.setup-action-buttons .primary:hover {
  border-color: rgba(var(--theme-accent-bright-rgb), 0.78);
  background: linear-gradient(180deg, var(--theme-accent-bright), var(--theme-accent));
  box-shadow:
    0 11px 28px rgba(var(--theme-accent-rgb), 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.setup-action-buttons .primary:focus-visible {
  outline-color: var(--theme-accent-bright);
  box-shadow:
    0 0 0 4px rgba(var(--theme-accent-rgb), 0.16),
    0 8px 22px rgba(var(--theme-accent-rgb), 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.42);
}

/* Tournament setup */

.tournament-setup-panel {
  grid-column: 1 / -1;
  background:
    radial-gradient(circle at 84% 22%, rgba(var(--theme-accent-rgb), 0.075), transparent 28rem),
    var(--cn-surface);
}

.tournament-setup-panel .panel-body {
  display: grid;
  grid-template-columns: minmax(300px, 0.68fr) minmax(650px, 1.55fr);
  grid-template-rows: auto 1fr;
  gap: 10px 28px;
  align-items: start;
}

.tournament-setup-panel .setup-intro {
  grid-column: 1;
  grid-row: 1;
  max-width: 480px;
  margin: 0;
  color: var(--cn-muted);
  font-size: var(--cn-type-body);
  line-height: 1.5;
}

.tournament-setup-grid {
  grid-column: 1;
  grid-row: 2;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 4px;
}

.setup-concept {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(221, 232, 246, 0.085);
  border-radius: var(--cn-radius-sm);
  background: rgba(255, 255, 255, 0.028);
  box-shadow: none;
}

.setup-concept:hover,
.setup-concept:focus-within {
  border-color: rgba(var(--theme-accent-rgb), 0.18);
  background: rgba(var(--theme-accent-rgb), 0.035);
}

.setup-concept-title {
  grid-column: 1 / -1;
  margin: 0 0 2px;
  color: var(--cn-text-cool);
  font-size: 0.94rem;
  font-weight: 730;
  letter-spacing: -0.01em;
  text-transform: none;
}

.setup-concept label {
  min-width: 0;
}

.setup-concept select {
  width: 100%;
}

#setupView select {
  min-height: 48px;
  padding: 10px 13px;
  font-size: clamp(0.96rem, 0.92vw, 1.06rem);
  font-weight: 680;
}

#setupView label {
  font-size: clamp(0.74rem, 0.7vw, 0.8rem);
}

.setup-table-zone {
  grid-column: 2;
  grid-row: 1 / 3;
  min-width: 0;
  padding: 14px 16px 4px;
  border: 1px solid rgba(221, 232, 246, 0.085);
  border-radius: var(--cn-radius-md);
  background:
    radial-gradient(circle at 50% 50%, rgba(51, 83, 109, 0.095), transparent 23rem),
    rgba(3, 6, 10, 0.28);
}

.setup-table-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 2px 2px 0;
}

.setup-table-heading > div {
  display: grid;
  gap: 3px;
}

.setup-table-heading strong {
  color: var(--cn-text);
  font-size: 0.98rem;
  font-weight: 720;
}

.setup-table-heading span:not(.badge) {
  color: var(--cn-muted);
  font-size: var(--cn-type-small);
}

.tournament-setup-panel .poker-table-wrap.editor-table {
  min-height: clamp(460px, 36vw, 570px);
  margin: 0;
}

/* Poker table and seats */

.poker-table-wrap {
  position: relative;
  isolation: isolate;
}

.poker-table-surface {
  color: var(--cn-muted-strong);
}

.poker-table-art {
  filter:
    saturate(0.76)
    contrast(1.04)
    brightness(0.88)
    drop-shadow(0 22px 26px rgba(0, 0, 0, 0.42));
}

.poker-table-art-dark {
  display: block;
  filter:
    saturate(0.8)
    contrast(1.06)
    brightness(0.92)
    drop-shadow(0 24px 28px rgba(0, 0, 0, 0.48));
}

.poker-table-art-light {
  display: none;
}

.poker-table-content {
  padding: 18px 22px;
  border: 1px solid rgba(221, 232, 246, 0.06);
  border-radius: 22px;
  background: rgba(7, 10, 15, 0.58);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.24), var(--cn-inner);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
}

.poker-table-surface strong {
  color: var(--cn-text);
  font-weight: 760;
}

.table-prize-details {
  color: var(--cn-muted-strong);
}

.table-prize-row {
  border-top-color: rgba(221, 232, 246, 0.1);
}

.table-prize-row strong {
  color: var(--cn-text);
}

.table-money-status {
  border: 1px solid rgba(101, 205, 176, 0.18);
  background: rgba(101, 205, 176, 0.085);
  color: #a8e6d5;
}

.table-money-status.bubble {
  border-color: rgba(210, 179, 111, 0.2);
  background: rgba(210, 179, 111, 0.08);
  color: #e6ce9b;
}

.player-seat {
  width: min(190px, 25%);
  padding: 12px 14px;
  border: 1px solid rgba(var(--theme-accent-bright-rgb), 0.24);
  border-radius: 14px;
  background: rgba(13, 18, 25, 0.96);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.36), var(--cn-inner);
  transition:
    background 180ms var(--cn-ease),
    border-color 180ms var(--cn-ease),
    box-shadow 180ms var(--cn-ease),
    opacity 180ms var(--cn-ease),
    transform 220ms var(--cn-ease);
}

.player-seat:hover,
.player-seat:focus-within {
  z-index: 20;
  border-color: rgba(var(--theme-accent-bright-rgb), 0.48);
  background: rgba(18, 25, 34, 0.985);
  box-shadow: 0 20px 46px rgba(0, 0, 0, 0.46), 0 0 0 3px rgba(var(--theme-accent-rgb), 0.07);
}

.player-seat input {
  min-height: 38px;
  border-color: transparent;
  background: transparent;
  color: var(--cn-text);
  font-size: 1rem;
  font-weight: 720;
}

.player-seat input:hover,
.player-seat input:focus {
  border-color: rgba(var(--theme-accent-rgb), 0.28);
  background: rgba(var(--theme-accent-rgb), 0.07);
}

.player-seat-name {
  color: var(--cn-text);
  font-size: 1.14rem;
  font-weight: 760;
  letter-spacing: -0.025em;
}

.player-seat-meta {
  color: var(--cn-muted);
  font-size: var(--cn-type-caption);
  font-weight: 620;
}

.player-seat.out {
  border-color: rgba(231, 117, 125, 0.27);
  background: rgba(31, 17, 21, 0.97);
}

.player-seat.out .player-seat-name {
  color: #e7c7c9;
}

.player-seat.itm {
  border-color: rgba(101, 205, 176, 0.47);
  background: rgba(12, 31, 29, 0.98);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4), 0 0 0 3px rgba(101, 205, 176, 0.07);
}

.player-seat.reentered {
  border-color: rgba(210, 179, 111, 0.36);
}

.player-reentry-badge,
.seat-itm-label {
  border-color: rgba(210, 179, 111, 0.2);
  background: rgba(210, 179, 111, 0.075);
  color: #dfc990;
  font-size: 0.68rem;
  letter-spacing: 0.04em;
}

.seat-itm-label {
  color: #9cddca;
}

.player-seat-actions {
  gap: 5px;
  margin-top: 7px;
}

.player-seat-actions button {
  min-height: 30px;
  padding: 5px 9px;
  border-radius: 8px;
  font-size: var(--cn-type-caption);
}

.seat-drag-handle {
  top: -12px;
  width: 36px;
  height: 21px;
  min-width: 36px;
  min-height: 21px;
  opacity: 0;
  border-color: rgba(var(--theme-accent-bright-rgb), 0.2);
  background: #111823;
  color: #9ab3ca;
  box-shadow: var(--cn-shadow-sm);
}

.player-seat:hover .seat-drag-handle,
.player-seat:focus-within .seat-drag-handle {
  opacity: 1;
}

.seat-insert-zone {
  border-color: rgba(101, 205, 176, 0.24);
  background: rgba(11, 31, 28, 0.95);
  color: #9ee0cd;
}

.poker-table-wrap.seat-reorder-active .seat-insert-zone:hover,
.poker-table-wrap.seat-reorder-active .seat-insert-zone.seat-insert-target {
  border-color: var(--cn-green);
  background: #173f37;
  box-shadow: 0 0 0 7px rgba(101, 205, 176, 0.12), var(--cn-shadow-sm);
}

.seat-drag-ghost {
  box-shadow: var(--cn-shadow-lg), 0 0 0 2px rgba(var(--theme-accent-rgb), 0.3);
}

.player-finish-result {
  right: auto;
  left: calc(100% + 10px);
  border-color: var(--cn-line-strong);
  background: rgba(10, 14, 20, 0.97);
  color: var(--cn-muted-strong);
  box-shadow: var(--cn-shadow-sm);
}

.player-finish-result.paid {
  border-color: rgba(210, 179, 111, 0.38);
  background: rgba(35, 29, 18, 0.98);
  color: #e7d29f;
  box-shadow: 0 0 0 3px rgba(210, 179, 111, 0.065), var(--cn-shadow-sm);
}

.player-finish-result.paid strong {
  color: var(--cn-gold-bright);
}

.table-late-player-button {
  border-color: rgba(var(--theme-accent-rgb), 0.24);
  background: rgba(var(--theme-accent-rgb), 0.08);
  color: var(--cn-blue-bright);
}

/* Chip distribution */

.stack-panel {
  grid-column: 1 / -1;
  background:
    radial-gradient(circle at 16% 18%, rgba(56, 93, 126, 0.06), transparent 24rem),
    var(--cn-surface);
}

.stack-summary {
  gap: 12px;
}

.stack-summary > .allocation-grid,
.allocation-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 1.12fr) minmax(260px, 0.76fr);
  gap: 12px;
}

.allocation-card,
.stack-summary .allocation-card {
  min-width: 0;
  padding: 18px;
  border: 1px solid rgba(221, 232, 246, 0.09);
  border-radius: var(--cn-radius-md);
  background: rgba(255, 255, 255, 0.026);
  box-shadow: none;
}

.stack-summary .primary-allocation {
  border-color: rgba(var(--theme-accent-rgb), 0.18);
  background:
    radial-gradient(circle at 100% 0, rgba(var(--theme-accent-rgb), 0.08), transparent 16rem),
    rgba(255, 255, 255, 0.03);
}

.stack-summary .reentry-allocation {
  border-color: rgba(101, 205, 176, 0.15);
  background:
    radial-gradient(circle at 100% 0, rgba(101, 205, 176, 0.06), transparent 16rem),
    rgba(255, 255, 255, 0.03);
}

.allocation-card h3 {
  margin: 0 0 13px;
  color: var(--cn-text);
  font-size: var(--cn-type-card-title);
  font-weight: 720;
  letter-spacing: -0.025em;
}

.allocation-card > p,
.allocation-note {
  margin: 12px 0;
  color: var(--cn-muted);
  font-size: clamp(0.84rem, 0.82vw, 0.92rem);
  line-height: 1.45;
}

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

.allocation-key-metric {
  min-height: 104px;
  padding: 13px;
  border: 1px solid rgba(221, 232, 246, 0.09);
  border-radius: var(--cn-radius-sm);
  background: rgba(0, 0, 0, 0.16);
}

.allocation-key-metric span {
  color: var(--cn-muted);
  font-size: clamp(0.74rem, 0.7vw, 0.8rem);
  font-weight: 780;
  letter-spacing: 0.075em;
}

.allocation-key-metric strong {
  margin-top: 8px;
  color: var(--cn-text);
  font-size: var(--cn-type-metric);
  font-weight: 720;
  letter-spacing: -0.05em;
}

.allocation-key-metric.bb-metric strong {
  color: var(--cn-blue-bright);
}

.reentry-allocation .allocation-key-metric.bb-metric strong {
  color: var(--theme-accent-bright);
}

.allocation-key-metric small {
  margin-top: 4px;
  color: var(--cn-muted-strong);
  font-size: clamp(0.8rem, 0.76vw, 0.86rem);
  font-weight: 650;
}

.remaining-stock {
  margin: 0;
  border-style: dashed;
  border-color: rgba(221, 232, 246, 0.1);
  background: rgba(255, 255, 255, 0.018);
  opacity: 0.9;
}

.remaining-stock:hover {
  opacity: 1;
}

.stack-chip-list {
  gap: 7px;
}

.stack-chip-pill {
  min-height: 50px;
  padding: 6px 11px 6px 6px;
  border: 1px solid rgba(221, 232, 246, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  box-shadow: var(--cn-inner);
}

.stack-chip-detail {
  gap: 1px;
}

.stack-chip-count {
  color: var(--cn-text-cool);
  font-size: clamp(0.96rem, 0.92vw, 1.06rem);
  font-weight: 820;
}

.stack-chip-total {
  color: var(--cn-muted-strong);
  font-size: clamp(0.76rem, 0.74vw, 0.84rem);
  font-weight: 720;
}

.stack-summary .remaining-stock .stack-chip-pill {
  transform: none;
}

.chip-token {
  width: 38px;
  height: 38px;
  border-width: 2px;
  box-shadow:
    inset 0 0 0 4px rgba(0, 0, 0, 0.15),
    inset 0 0 0 14px var(--chip-label-bg, rgba(0, 0, 0, 0.08)),
    0 7px 18px rgba(0, 0, 0, 0.25);
}

details.setup-details {
  margin-top: 14px;
  overflow: hidden;
  border: 1px solid rgba(221, 232, 246, 0.09);
  border-radius: var(--cn-radius-sm);
  background: rgba(255, 255, 255, 0.022);
}

details.setup-details > summary {
  padding: 13px 15px;
  color: var(--cn-muted-strong);
  font-size: var(--cn-type-body);
  font-weight: 680;
}

details.setup-details[open] > summary {
  color: var(--cn-text-cool);
  background: rgba(255, 255, 255, 0.025);
}

details.setup-details > .details-content {
  padding: 3px 15px 15px;
}

.stack-stock-head {
  margin: 9px 0 12px;
}

.stack-stock-head span {
  color: var(--cn-muted);
  font-size: var(--cn-type-caption);
}

.stack-stock-head strong {
  color: var(--cn-text-cool);
  font-size: var(--cn-type-body);
}

.chip-stock-grid {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
}

.chip-card {
  column-gap: 9px;
  row-gap: 11px;
  padding: 11px;
  border-color: rgba(221, 232, 246, 0.09);
  border-radius: var(--cn-radius-sm);
  background: rgba(255, 255, 255, 0.032);
}

.chip-card:hover {
  border-color: rgba(var(--theme-accent-rgb), 0.2);
  background: rgba(var(--theme-accent-rgb), 0.04);
}

.chip-card label {
  gap: 8px;
}

.chip-card input {
  min-height: 36px;
}

.chip-card-total {
  border-color: rgba(221, 232, 246, 0.08);
  background: rgba(0, 0, 0, 0.13);
}

.chip-card-total span {
  font-size: var(--cn-type-caption);
}

.chip-card-total strong {
  font-size: var(--cn-type-control);
}

/* Prize pool */

.prize-pool-panel {
  background:
    radial-gradient(circle at 11% 9%, rgba(210, 179, 111, 0.07), transparent 23rem),
    var(--cn-surface);
}

.prize-editor-top {
  display: grid;
  grid-template-columns: minmax(300px, 0.72fr) minmax(0, 1.35fr);
  gap: 12px;
}

.prize-pool-hero {
  min-height: 160px;
  padding: 22px;
  border: 1px solid rgba(210, 179, 111, 0.18);
  border-radius: var(--cn-radius-md);
  background:
    radial-gradient(circle at 0 0, rgba(210, 179, 111, 0.1), transparent 18rem),
    rgba(255, 255, 255, 0.025);
  box-shadow: none;
}

.prize-pool-hero > span,
.prize-editor-meta > span {
  color: #b7a982;
  font-size: var(--cn-type-caption);
  font-weight: 790;
  letter-spacing: 0.09em;
}

.prize-pool-hero strong {
  margin-top: 9px;
  color: var(--cn-gold-bright);
  font-size: var(--cn-type-metric);
  font-weight: 720;
  letter-spacing: -0.05em;
  text-shadow: none;
}

.prize-pool-hero small {
  margin-top: auto;
  color: var(--cn-muted-strong);
  font-size: clamp(0.84rem, 0.82vw, 0.92rem);
  font-weight: 620;
}

.prize-editor-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(221, 232, 246, 0.09);
  border-radius: var(--cn-radius-md);
  background: rgba(255, 255, 255, 0.024);
}

.prize-editor-meta {
  grid-column: 1 / -1;
  min-height: 54px;
  padding: 11px 13px;
  border: 1px solid rgba(221, 232, 246, 0.08);
  border-radius: var(--cn-radius-sm);
  background: rgba(0, 0, 0, 0.13);
}

.prize-editor-meta strong {
  color: var(--cn-text-cool);
  font-size: var(--cn-type-body);
}

.payout-distribution {
  height: 62px;
  margin-top: 14px;
  overflow: hidden;
  border: 1px solid rgba(221, 232, 246, 0.1);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.18);
}

.payout-segment {
  color: #11151b;
  font-size: var(--cn-type-body);
  font-weight: 790;
  box-shadow: none;
}

.payout-segment + .payout-segment {
  border-left: 1px solid rgba(7, 9, 13, 0.18);
}

.payout-place-1 {
  background: #e5c575;
}

.payout-place-2 {
  background: #b9c6d5;
}

.payout-place-3 {
  background: #bd8765;
}

.payout-place-4 {
  background: #8fb7dd;
}

.payout-place-5 {
  background: #a99ac9;
}

.payout-place-6 {
  background: #87b9aa;
}

.payout-editor-guide {
  margin: 12px 0 8px;
  padding: 0 3px;
  border: 0;
  background: transparent;
  color: var(--cn-muted);
  font-size: var(--cn-type-small);
}

.payout-editor-guide strong {
  color: var(--cn-muted-strong);
}

.payout-editor-head,
.payout-editor-row {
  grid-template-columns: 74px minmax(220px, 1fr) 90px 116px;
}

.payout-editor-head {
  padding: 0 14px 6px;
  color: var(--cn-muted);
  font-size: var(--cn-type-caption);
}

.payout-editor-row {
  min-height: 68px;
  margin-top: 7px;
  padding: 10px 14px;
  border: 1px solid rgba(221, 232, 246, 0.085);
  border-radius: var(--cn-radius-sm);
  background: rgba(255, 255, 255, 0.026);
}

.payout-editor-row:hover,
.payout-editor-row:focus-within {
  border-color: rgba(var(--theme-accent-rgb), 0.2);
  background: rgba(var(--theme-accent-rgb), 0.038);
  box-shadow: none;
}

.payout-rank {
  width: 42px;
  height: 42px;
  background: rgba(255, 255, 255, 0.075);
  color: var(--cn-text-cool);
  box-shadow: none;
}

.payout-editor-row[data-place="1"] .payout-rank {
  background: var(--cn-gold);
  color: #171208;
}

.payout-range {
  height: 28px;
}

.payout-range::-webkit-slider-runnable-track {
  height: 6px;
  background:
    linear-gradient(90deg, var(--cn-blue) 0 var(--range-progress), rgba(255, 255, 255, 0.1) var(--range-progress) 100%);
}

.payout-range::-webkit-slider-thumb {
  width: 21px;
  height: 21px;
  margin-top: -7.5px;
  border: 3px solid #e9f5ff;
  background: var(--theme-accent-dark);
  box-shadow: 0 0 0 4px rgba(var(--theme-accent-rgb), 0.11);
}

.payout-range::-moz-range-track {
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
}

.payout-range::-moz-range-progress {
  height: 6px;
  background: var(--cn-blue);
}

.payout-range::-moz-range-thumb {
  width: 17px;
  height: 17px;
  border: 3px solid #e9f5ff;
  background: var(--theme-accent-dark);
}

.payout-range-scale {
  color: rgba(142, 153, 170, 0.62);
}

.payout-percent {
  color: var(--cn-text-cool);
  font-size: 1.05rem;
  font-weight: 740;
}

.payout-amount {
  color: var(--cn-text);
  font-size: 1.05rem;
  font-weight: 760;
}

.prize-editor-actions {
  margin-top: 12px;
}

.prize-editor-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

/* Tournament structure */

.setup-summary-grid {
  gap: 10px;
  margin-bottom: 14px;
}

.setup-summary-grid .stat-box {
  min-height: 88px;
  padding: 15px;
  border-radius: var(--cn-radius-sm);
  background: rgba(255, 255, 255, 0.028);
  box-shadow: none;
}

.setup-summary-grid .stat-box span {
  color: var(--cn-muted);
  font-size: var(--cn-type-caption);
}

.setup-summary-grid .stat-box strong {
  margin-top: 7px;
  color: var(--cn-text);
  font-size: 1.55rem;
  font-weight: 710;
}

.structure-preview {
  gap: 6px;
}

.structure-preview-row {
  grid-template-columns: 100px minmax(130px, 1fr) 100px 130px;
  min-height: 48px;
  padding: 9px 12px;
  border: 1px solid rgba(221, 232, 246, 0.075);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.023);
  color: var(--cn-muted-strong);
}

.structure-preview-row:not(.head):hover {
  border-color: rgba(var(--theme-accent-rgb), 0.16);
  background: rgba(var(--theme-accent-rgb), 0.028);
}

.structure-preview-row.head {
  min-height: auto;
  padding-top: 2px;
  border: 0;
  background: transparent;
  color: var(--cn-muted);
}

.structure-preview-row strong {
  color: var(--cn-text-cool);
}

.structure-list {
  gap: 7px;
}

.level-row {
  grid-template-columns: 38px 1.1fr repeat(3, minmax(92px, 0.8fr)) auto auto;
  gap: 9px;
  min-height: 76px;
  padding: 10px;
  border-color: rgba(221, 232, 246, 0.085);
  border-radius: var(--cn-radius-sm);
  background: rgba(255, 255, 255, 0.026);
  box-shadow: none;
}

.level-row:hover,
.level-row:focus-within {
  border-color: rgba(var(--theme-accent-rgb), 0.18);
  background: rgba(var(--theme-accent-rgb), 0.03);
}

.level-row.break-row {
  border-color: rgba(210, 179, 111, 0.18);
  background: rgba(210, 179, 111, 0.045);
}

.level-number {
  width: 34px;
  height: 34px;
  border: 1px solid var(--cn-line);
  background: rgba(255, 255, 255, 0.045);
  color: var(--cn-muted-strong);
  box-shadow: none;
}

.row-tools {
  gap: 4px;
}

.row-tools button,
.small-button {
  width: 34px;
  min-width: 34px;
  min-height: 34px;
  padding: 0;
  border-radius: 9px;
}

/* Display mode */

body.projector-mode {
  overflow-x: hidden;
  background:
    radial-gradient(circle at 12% 6%, rgba(var(--theme-accent-rgb), 0.15), transparent 29rem),
    linear-gradient(180deg, var(--cn-bg), var(--cn-bg-deep));
}

body.projector-mode .app {
  padding: 9px 12px 12px;
}

body.projector-mode .shell {
  width: 100%;
  max-width: none;
}

body.projector-mode .topbar {
  position: relative;
  top: 0;
  min-height: 56px;
  margin-bottom: 10px;
  padding: 7px 9px 7px 12px;
  border-radius: 14px;
  background: var(--cn-topbar);
  box-shadow: var(--cn-shadow-sm), var(--cn-inner);
}

body.projector-mode .brand-logo-lockup {
  width: clamp(170px, 11vw, 200px);
}

body.projector-mode .brand-subtitle {
  display: none;
}

#controlView .control-grid {
  display: grid;
  grid-template-columns: minmax(390px, 0.68fr) minmax(650px, 1.32fr);
  grid-template-rows: minmax(460px, 1fr) minmax(255px, 25vh);
  gap: clamp(10px, 1vw, 16px);
  min-height: calc(100vh - 80px);
  align-items: stretch;
}

#controlView .hero-clock {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-height: 0;
  padding: clamp(20px, 2vw, 34px);
  overflow: hidden;
  border-color: rgba(var(--theme-accent-rgb), 0.14);
  border-radius: var(--cn-radius-md);
  background:
    radial-gradient(circle at 50% 20%, rgba(var(--theme-accent-rgb), 0.12), transparent 22rem),
    var(--cn-surface);
  box-shadow: var(--cn-shadow-lg), var(--cn-inner);
  isolation: isolate;
}

#controlView .clock-primary {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: center;
  width: 100%;
  padding-top: clamp(24px, 2.6vh, 38px);
}

#controlView .clock-invitation {
  display: none;
}

#controlView .clock-invitation.empty {
  display: none;
}

#controlView .hero-clock::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  display: block;
  background:
    linear-gradient(115deg, transparent 20%, rgba(255, 255, 255, 0.025) 48%, transparent 72%),
    radial-gradient(circle at 50% 92%, rgba(var(--theme-accent-rgb), 0.055), transparent 17rem);
  content: "";
  opacity: 1;
}

.level-change-notice {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 40;
  display: grid;
  gap: 7px;
  min-width: min(360px, calc(100% - 42px));
  padding: 20px 28px;
  border: 1px solid rgba(var(--theme-accent-bright-rgb), 0.34);
  border-radius: 18px;
  background: rgba(10, 18, 27, 0.94);
  color: var(--cn-text);
  box-shadow:
    0 26px 70px rgba(0, 0, 0, 0.52),
    0 0 0 7px rgba(var(--theme-accent-rgb), 0.065),
    var(--cn-inner);
  pointer-events: none;
  text-align: center;
  transform: translate(-50%, -50%);
  animation: cn-level-change 5.2s var(--cn-ease) forwards;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.level-change-notice span {
  color: var(--cn-blue-bright);
  font-size: var(--cn-display-caption);
  font-weight: 820;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.level-change-notice strong {
  color: var(--cn-text);
  font-size: clamp(2rem, 3.2vw, 3.8rem);
  font-weight: 690;
  line-height: 1;
  letter-spacing: -0.055em;
}

.level-end-countdown {
  position: absolute;
  top: 18px;
  right: 20px;
  z-index: 18;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 240px;
  padding: 8px 10px 8px 8px;
  opacity: 0;
  border: 1px solid rgba(210, 179, 111, 0.26);
  border-radius: 999px;
  background: rgba(25, 21, 14, 0.9);
  color: var(--cn-text);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3), var(--cn-inner);
  pointer-events: none;
  transform: translateY(-7px) scale(0.96);
  transition:
    opacity 220ms var(--cn-ease),
    border-color 220ms var(--cn-ease),
    background 220ms var(--cn-ease),
    transform 220ms var(--cn-ease);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.level-end-countdown.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.level-end-countdown.paused {
  opacity: 0.58;
}

.level-countdown-ring {
  position: relative;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: conic-gradient(var(--cn-gold) 0 var(--countdown-progress), rgba(255, 255, 255, 0.085) var(--countdown-progress) 100%);
}

.level-countdown-ring::before {
  position: absolute;
  inset: 5px;
  border-radius: inherit;
  background: #18170f;
  content: "";
}

.level-countdown-ring strong {
  position: relative;
  z-index: 1;
  color: var(--cn-gold-bright);
  font-size: 1.6rem;
  font-weight: 720;
  line-height: 1;
  letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums;
}

.level-countdown-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
  text-align: left;
}

.level-countdown-copy span {
  color: #e5cb92;
  font-size: var(--cn-display-caption);
  font-weight: 810;
  letter-spacing: 0.075em;
  text-transform: uppercase;
}

.level-countdown-copy small {
  overflow: hidden;
  color: var(--cn-muted-strong);
  font-size: clamp(0.7rem, 0.74vw, 0.84rem);
  font-weight: 640;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.level-end-countdown.critical {
  border-color: rgba(231, 117, 125, 0.38);
  background: rgba(35, 15, 19, 0.94);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.34), 0 0 0 5px rgba(231, 117, 125, 0.065);
  animation: cn-countdown-alert 1s ease-in-out infinite;
}

.level-end-countdown.critical .level-countdown-ring {
  background: conic-gradient(var(--cn-red) 0 var(--countdown-progress), rgba(255, 255, 255, 0.085) var(--countdown-progress) 100%);
}

.level-end-countdown.critical .level-countdown-ring::before {
  background: #211014;
}

.level-end-countdown.critical .level-countdown-ring strong,
.level-end-countdown.critical .level-countdown-copy span {
  color: #f3a8ad;
}

@keyframes cn-level-change {
  0% {
    opacity: 0;
    transform: translate(-50%, -46%) scale(0.92);
  }
  9%,
  68% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -54%) scale(0.98);
  }
}

@keyframes cn-countdown-alert {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(0) scale(1.025);
  }
}

#controlView .mobile-control-status {
  display: none;
  position: absolute;
  top: 18px;
  left: 20px;
  justify-content: flex-start;
  gap: 6px;
}

#controlView .mobile-control-status .badge {
  min-height: 26px;
  padding-inline: 10px;
  font-size: var(--cn-display-caption);
}

@media (max-width: 1400px) {
  body.projector-mode .topbar-status {
    display: none;
  }

  #controlView .mobile-control-status {
    display: flex;
  }
}

#controlView .timer {
  margin: 0;
  color: var(--cn-text);
  font-size: clamp(5.4rem, 7.7vw, 9rem);
  font-weight: 650;
  line-height: 0.88;
  letter-spacing: -0.075em;
  text-shadow: 0 18px 50px rgba(0, 0, 0, 0.3);
  animation: none;
  font-variant-numeric: tabular-nums;
}

#controlView .timer.low {
  color: var(--cn-gold-bright);
  text-shadow: 0 0 34px rgba(210, 179, 111, 0.17);
}

#controlView .timer.critical {
  color: #f08c93;
  text-shadow: 0 0 34px rgba(231, 117, 125, 0.2);
}

#controlView .timer.pause-timer {
  color: #91dcc7;
  text-shadow: 0 0 34px rgba(101, 205, 176, 0.17);
}

#controlView .level-title {
  margin-top: 12px;
  color: var(--cn-muted-strong);
  font-size: clamp(1.65rem, 2.6vw, 3.2rem);
  font-weight: 650;
  letter-spacing: -0.045em;
  text-shadow: none;
  animation: none;
}

#controlView .blind-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  width: 100%;
  margin: clamp(12px, 1.5vh, 18px) 0 0;
}

#controlView .blind-box {
  min-height: 122px;
  padding: 16px 14px 14px;
  overflow: hidden;
  border-color: rgba(221, 232, 246, 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
  box-shadow: none;
}

#controlView .blind-box::before {
  top: 12px;
  right: 13px;
  color: rgba(221, 232, 246, 0.18);
  font-size: 0.8rem;
}

#controlView .blind-box span {
  color: var(--cn-muted);
  font-size: clamp(0.77rem, 0.9vw, 1.04rem);
  font-weight: 730;
  letter-spacing: 0.09em;
}

#controlView .blind-box strong {
  margin-top: 8px;
  color: var(--cn-text);
  font-size: clamp(3.2rem, 4.7vw, 5.8rem);
  font-weight: 670;
  line-height: 0.9;
  letter-spacing: -0.055em;
}

#controlView .display-join-card {
  display: none;
}

@media (min-width: 1440px) and (min-height: 700px) {
  #controlView .clock-invitation {
    display: grid;
    flex: 1 1 auto;
    place-items: center;
    width: 100%;
    min-height: 0;
    padding: clamp(14px, 2vh, 26px) 0 clamp(76px, 8vh, 94px);
  }

  #controlView .display-join-card {
    display: grid;
    grid-template-areas:
      "kicker qr"
      "code qr";
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    align-items: center;
    justify-items: start;
    gap: 8px clamp(14px, 1.2vw, 20px);
    width: min(100%, 510px);
    min-width: 0;
    min-height: clamp(170px, 20vh, 230px);
    max-height: 100%;
    padding: clamp(14px, 1.25vw, 20px);
    overflow: hidden;
    border: 1px solid rgba(var(--theme-accent-bright-rgb), 0.3);
    border-radius: 18px;
    background:
      radial-gradient(circle at 78% 45%, rgba(var(--theme-accent-rgb), 0.16), transparent 11rem),
      rgba(255, 255, 255, 0.045);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.05),
      0 18px 45px rgba(0, 0, 0, 0.16);
    pointer-events: none;
  }

  #controlView .display-join-kicker {
    grid-area: kicker;
    align-self: end;
    color: var(--cn-blue-bright);
    font-size: clamp(0.75rem, 0.72vw, 0.9rem);
    font-weight: 820;
    line-height: 1.18;
    letter-spacing: 0.08em;
    text-align: left;
    text-transform: uppercase;
  }

  #controlView .display-join-qr {
    grid-area: qr;
    display: grid;
    place-items: center;
    align-self: center;
    width: clamp(128px, 9vw, 174px);
    margin: 0;
    overflow: hidden;
    border: 1px solid rgba(var(--theme-accent-bright-rgb), 0.34);
    border-radius: 12px;
    background: #f4f0e6;
    box-shadow:
      0 0 0 5px rgba(var(--theme-accent-rgb), 0.075),
      0 12px 28px rgba(0, 0, 0, 0.28);
    aspect-ratio: 1;
  }

  #controlView .display-join-qr img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
  }

  #controlView .display-join-qr-fallback {
    color: #102c3a;
    font-size: 1rem;
    font-weight: 850;
    letter-spacing: 0.08em;
  }

  #controlView .display-join-code {
    grid-area: code;
    align-self: start;
    overflow: hidden;
    max-width: 100%;
    color: var(--cn-text);
    font-family: var(--mono);
    font-size: clamp(1.08rem, 1.25vw, 1.48rem);
    font-weight: 820;
    letter-spacing: 0.1em;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

@media (min-width: 1800px) and (min-height: 1150px) {
  #controlView .clock-primary {
    padding-top: 18px;
  }

  #controlView .clock-invitation {
    padding-top: 20px;
    padding-bottom: 98px;
  }

  #controlView .display-join-card {
    gap: 10px 24px;
    width: min(100%, 540px);
    min-height: 292px;
    padding: 24px;
  }

  #controlView .display-join-qr {
    width: 226px;
  }

  #controlView .display-join-kicker {
    font-size: 0.98rem;
  }

  #controlView .display-join-code {
    font-size: 1.65rem;
  }
}

#controlView .reentry-banner {
  width: 100%;
  margin-top: 10px;
  padding: 8px 11px;
  border: 1px solid rgba(101, 205, 176, 0.14);
  border-radius: 10px;
  background: rgba(101, 205, 176, 0.055);
  color: #9cdcca;
  font-size: var(--cn-display-body);
  font-weight: 660;
}

#controlView .reentry-banner.closed {
  display: none;
}

#controlView .reentry-banner span + span {
  display: none;
}

#controlView .next-level {
  margin: 13px 0 0;
  color: var(--cn-muted);
  font-size: clamp(0.96rem, 1.08vw, 1.22rem);
}

#controlView .next-level strong {
  color: var(--cn-muted-strong);
  font-weight: 650;
}

#controlView .progress-wrap {
  gap: 10px;
  width: 100%;
  margin: 13px 0 0;
  opacity: 0.38;
  transition: opacity 180ms var(--cn-ease);
}

#controlView .hero-clock:hover .progress-wrap,
#controlView .hero-clock:focus-within .progress-wrap {
  opacity: 0.9;
}

.progress-label {
  margin-bottom: 5px;
  color: var(--cn-muted);
  font-size: clamp(0.66rem, 0.7vw, 0.78rem);
  font-weight: 720;
  letter-spacing: 0.07em;
}

.progress {
  height: 4px;
  border: 0;
  background: rgba(255, 255, 255, 0.075);
  box-shadow: none;
}

.progress > div {
  border-radius: 999px;
  background: var(--cn-blue);
  box-shadow: none;
  transition: width 380ms var(--cn-ease);
}

#controlView .display-control-bar {
  position: absolute;
  bottom: clamp(16px, 1.7vw, 26px);
  left: 50%;
  z-index: 35;
  justify-content: space-between;
  gap: 8px;
  width: min(calc(100% - 40px), 720px);
  min-height: 66px;
  margin-top: 0;
  padding: 7px 9px;
  overflow: visible;
  opacity: 0.08;
  border: 1px solid rgba(221, 232, 246, 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
  box-shadow: none;
  transform: translateX(-50%);
  transition: opacity 180ms var(--cn-ease), background 180ms var(--cn-ease), border-color 180ms var(--cn-ease);
}

#controlView .hero-clock:hover .display-control-bar,
#controlView .hero-clock:focus-within .display-control-bar {
  opacity: 1;
  border-color: rgba(var(--theme-accent-bright-rgb), 0.2);
  background: rgba(255, 255, 255, 0.05);
}

.icon-button {
  z-index: 1;
  width: 50px;
  height: 50px;
  min-width: 50px;
  min-height: 50px;
  padding: 0;
  border-color: transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--cn-muted-strong);
  box-shadow: none;
  transition:
    transform 180ms var(--cn-ease),
    background 180ms var(--cn-ease),
    border-color 180ms var(--cn-ease),
    box-shadow 180ms var(--cn-ease),
    color 180ms var(--cn-ease);
}

.icon-button:hover:not(:disabled),
.icon-button:focus-visible:not(:disabled) {
  z-index: 4;
  border-color: rgba(var(--theme-accent-rgb), 0.16);
  background: rgba(var(--theme-accent-rgb), 0.09);
  color: #fff;
  box-shadow: 0 13px 28px rgba(0, 0, 0, 0.3), 0 0 0 3px rgba(var(--theme-accent-rgb), 0.08);
  transform: translateY(-3px) scale(1.16);
}

.icon-button:active:not(:disabled) {
  transform: translateY(0) scale(0.96);
}

.icon-button:disabled:hover {
  transform: none;
}

.icon-button.primary {
  border-color: rgba(var(--theme-accent-bright-rgb), 0.26);
  background: var(--cn-blue);
  color: var(--theme-accent-ink);
  box-shadow: 0 7px 17px rgba(var(--theme-accent-rgb), 0.22);
}

.icon-button.danger {
  border-color: transparent;
  background: transparent;
  color: rgba(231, 117, 125, 0.7);
}

.control-icon {
  font-size: 1.15rem;
}

.control-mini {
  color: inherit;
  font-size: 0.58rem;
}

.control-divider {
  height: 26px;
  background: rgba(221, 232, 246, 0.1);
}

.control-side {
  position: relative;
  min-width: 0;
  min-height: 0;
}

.projection-table {
  position: relative;
  display: flex;
  height: 100%;
  min-height: 0;
  overflow: visible;
  border-radius: var(--cn-radius-md);
  background:
    radial-gradient(circle at 50% 49%, rgba(56, 92, 122, 0.085), transparent 28rem),
    #0d121a;
  box-shadow: var(--cn-shadow-lg), var(--cn-inner);
}

.projection-table .panel-body {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  min-height: 0;
  padding: 2px 7px;
  overflow: visible;
}

.poker-table-wrap.live-table {
  flex: 0 0 auto;
  width: 100%;
  height: clamp(430px, calc(100vh - 365px), 650px);
  min-height: 0;
  margin: 0;
}

.live-table .player-seat {
  width: min(250px, 29%);
  padding: 17px 19px;
  border-radius: 15px;
}

.live-table .player-seat-name {
  color: var(--cn-text);
  font-size: clamp(1.6rem, 2vw, 2.3rem);
  font-weight: 760;
  letter-spacing: -0.035em;
}

.live-table .player-seat-meta {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.55em;
  max-height: none;
  margin-top: 8px;
  overflow: visible;
  opacity: 1;
  color: var(--cn-muted-strong);
  font-size: clamp(0.98rem, 1.08vw, 1.22rem);
  font-weight: 720;
  line-height: 1.15;
  letter-spacing: 0.025em;
  white-space: nowrap;
}

.live-table .player-seat-money {
  color: var(--cn-gold-bright);
  font-size: 1.08em;
  font-variant-numeric: tabular-nums;
}

.live-table .player-reentry-badge {
  color: var(--cn-muted);
  font-size: var(--cn-display-caption);
}

.live-table .player-finish-result.paid strong {
  font-size: clamp(1.55rem, 1.9vw, 2.15rem);
}

.live-table .player-finish-result span {
  font-size: var(--cn-display-caption);
}

.live-table .poker-table-content > strong {
  font-size: clamp(1.5rem, 1.9vw, 2.2rem);
  letter-spacing: -0.04em;
}

.live-table .poker-table-content > span {
  color: var(--cn-muted-strong);
  font-size: var(--cn-display-body);
}

.live-table .table-prize-details {
  font-size: var(--cn-display-body);
}

.live-table .table-money-status {
  font-size: var(--cn-display-caption);
}

details.display-secondary {
  right: 12px;
  bottom: 10px;
}

details.display-secondary > summary {
  min-height: 36px;
  padding: 7px 11px;
  border-color: rgba(221, 232, 246, 0.1);
  background: rgba(8, 12, 17, 0.8);
  color: var(--cn-muted);
  box-shadow: var(--cn-shadow-sm);
  font-size: clamp(0.76rem, 0.8vw, 0.9rem);
}

details.display-secondary > summary:hover,
details.display-secondary > summary:focus-visible {
  border-color: rgba(var(--theme-accent-rgb), 0.28);
  background: rgba(16, 23, 31, 0.96);
  color: var(--cn-text-cool);
}

details.display-secondary[open] {
  border-color: rgba(221, 232, 246, 0.12);
  background: rgba(10, 14, 20, 0.97);
  box-shadow: var(--cn-shadow-lg);
}

details.display-secondary[open] > summary {
  border-color: rgba(var(--theme-accent-rgb), 0.18);
  background: rgba(var(--theme-accent-rgb), 0.07);
  color: var(--cn-blue-bright);
}

details.display-secondary .stats-panel {
  background: transparent;
  box-shadow: none;
}

.stats-strip {
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 7px;
}

.stats-strip .stat-box {
  min-height: 70px;
  padding: 10px;
  border-color: rgba(221, 232, 246, 0.08);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.026);
  box-shadow: none;
}

.stats-strip .stat-box::before {
  width: 2px;
  background: rgba(var(--theme-accent-rgb), 0.4);
}

.stats-strip .stat-box span {
  color: var(--cn-muted);
  font-size: clamp(0.64rem, 0.68vw, 0.78rem);
}

.stats-strip .stat-box strong {
  color: var(--cn-text-cool);
  font-size: clamp(1.05rem, 1.3vw, 1.5rem);
  font-weight: 700;
}

/* Tournament timeline */

.tournament-timeline {
  grid-column: 1 / -1;
  min-height: 255px;
  padding: 17px 20px 14px;
  overflow: hidden;
  border: 1px solid var(--cn-line);
  border-radius: var(--cn-radius-md);
  background:
    radial-gradient(circle at var(--timeline-progress, 0%) 54%, rgba(var(--theme-accent-rgb), 0.1), transparent 15%),
    var(--cn-surface);
  box-shadow: var(--cn-shadow-md), var(--cn-inner);
}

.timeline-header {
  gap: 18px;
  margin-bottom: 11px;
}

.timeline-title {
  gap: 10px;
}

.timeline-title strong {
  color: var(--cn-text-cool);
  font-size: clamp(1.12rem, 1.25vw, 1.42rem);
  font-weight: 720;
  letter-spacing: -0.025em;
  text-transform: none;
}

.timeline-title span,
.timeline-summary {
  color: var(--cn-muted);
  font-size: clamp(0.8rem, 0.86vw, 1rem);
  font-weight: 600;
}

.timeline-track {
  min-height: 160px;
  border-color: rgba(221, 232, 246, 0.1);
  border-radius: 12px;
  background: rgba(2, 5, 9, 0.4);
}

.timeline-reentry-window {
  border-color: rgba(112, 224, 193, 0.62);
  border-right-color: rgba(112, 224, 193, 0.9);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.16), transparent 54%),
    linear-gradient(90deg, rgba(63, 180, 148, 0.62), rgba(75, 200, 164, 0.54));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.24),
    inset -2px 0 0 rgba(162, 246, 222, 0.3),
    0 3px 11px rgba(7, 44, 36, 0.18);
}

.timeline-reentry-window > span {
  color: #071a14;
  font-size: clamp(0.68rem, 0.72vw, 0.82rem);
  line-height: 1;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.38);
}

.timeline-reentry-window.closed {
  opacity: 0.64;
  filter: saturate(0.74);
}

.timeline-level {
  container-type: inline-size;
  flex: 0 0 auto;
  justify-content: center;
  min-width: 0;
  padding: 30px 8px 16px;
  border-right-color: rgba(221, 232, 246, 0.07);
  color: #758196;
}

.timeline-level.past {
  background: rgba(var(--theme-accent-rgb), 0.055);
  color: #919eb1;
}

.timeline-level.current {
  background:
    radial-gradient(circle at 50% 58%, rgba(var(--theme-accent-bright-rgb), 0.2), transparent 74%),
    linear-gradient(180deg, rgba(var(--theme-accent-rgb), 0.42), rgba(var(--theme-accent-rgb), 0.24));
  color: #fff4e9;
  box-shadow:
    inset 0 0 0 2px rgba(var(--theme-accent-bright-rgb), 0.72),
    inset 0 -5px 0 var(--cn-bronze),
    0 0 28px rgba(var(--theme-accent-rgb), 0.24);
}

.timeline-level.current::before,
.timeline-level.next::before {
  top: 36px;
  padding: 3px 6px;
  background: rgba(9, 18, 27, 0.86);
  color: var(--cn-blue-bright);
  font-size: clamp(0.62rem, 0.66vw, 0.74rem);
  letter-spacing: 0.06em;
}

.timeline-level.current::before {
  border: 1px solid rgba(var(--theme-accent-bright-rgb), 0.3);
  background: var(--theme-accent-dark);
  color: var(--theme-accent-ink);
}

.timeline-level.next {
  background: rgba(255, 255, 255, 0.025);
  box-shadow: inset 0 0 0 1px rgba(221, 232, 246, 0.1);
}

.timeline-level.next::before {
  background: rgba(20, 25, 33, 0.88);
  color: var(--cn-muted-strong);
}

.timeline-level.break {
  padding-inline: 2px;
  background:
    repeating-linear-gradient(135deg, rgba(210, 179, 111, 0.075) 0 6px, rgba(210, 179, 111, 0.025) 6px 12px);
  color: var(--cn-gold);
}

.timeline-level.continuation::before {
  display: none;
}

.timeline-level strong {
  color: inherit;
  font-size: clamp(1.05rem, 1.2vw, 1.45rem);
  font-weight: 780;
  letter-spacing: 0.02em;
  line-height: 1;
}

.timeline-level span {
  margin-top: 10px;
  color: var(--cn-text-cool);
  font-size: clamp(1rem, 16cqw, 2rem);
  font-weight: 820;
  letter-spacing: -0.045em;
  line-height: 0.95;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.38);
}

.timeline-level.current strong {
  color: var(--cn-bronze-bright);
  font-size: clamp(1.2rem, 1.38vw, 1.65rem);
  text-shadow: 0 0 18px rgba(var(--theme-accent-rgb), 0.42);
}

.timeline-level.current span {
  color: #fff6ed;
  font-size: clamp(1rem, 20cqw, 2.65rem);
  font-weight: 880;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.6), 0 0 24px rgba(var(--theme-accent-rgb), 0.34);
}

.timeline-level small {
  margin-top: 8px;
  color: #8998ae;
  font-size: clamp(0.78rem, 0.86vw, 1.02rem);
  font-weight: 680;
  line-height: 1;
}

.timeline-level-start {
  position: absolute;
  bottom: 11px;
  left: 8px;
  z-index: 3;
  color: #b8c9dc;
  font-size: clamp(0.9rem, 1vw, 1.18rem);
  font-weight: 820;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.025em;
  line-height: 1;
  text-shadow: 0 1px 9px rgba(0, 0, 0, 0.58);
}

.timeline-level.current .timeline-level-start {
  color: var(--cn-blue-bright);
  font-size: clamp(1rem, 1.12vw, 1.32rem);
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.64), 0 0 14px rgba(119, 190, 242, 0.4);
}

.timeline-level.break .timeline-level-start {
  bottom: 8px;
  left: 2px;
  color: #d7c18d;
  font-size: clamp(0.54rem, 26cqw, 0.82rem);
  letter-spacing: -0.01em;
}

.timeline-level.break strong,
.timeline-level.break.current strong {
  color: #ddc283;
  font-size: clamp(0.74rem, 0.78vw, 0.9rem);
  text-shadow: none;
}

.timeline-level.break span {
  color: #c9b27d;
  font-size: clamp(0.62rem, 0.65vw, 0.73rem);
}

.timeline-progress-fill {
  height: 3px;
  background: var(--cn-blue);
  box-shadow: 0 0 12px rgba(var(--theme-accent-rgb), 0.42);
}

.timeline-cursor {
  width: 32px;
}

.timeline-cursor::before {
  top: -5px;
  width: 17px;
  height: 17px;
  border: 3px solid #101b27;
  background: #eef8ff;
  box-shadow: 0 0 12px rgba(var(--theme-accent-rgb), 0.58);
}

.timeline-cursor::after {
  width: 3px;
  background: #e9f6ff;
  box-shadow: 0 0 11px rgba(var(--theme-accent-rgb), 0.55);
}

.timeline-cursor:hover::before,
.timeline-cursor:focus-visible::before,
.timeline-cursor.dragging::before {
  background: var(--cn-blue-bright);
  box-shadow: 0 0 0 6px rgba(var(--theme-accent-rgb), 0.12), 0 0 16px rgba(var(--theme-accent-rgb), 0.65);
}

.timeline-seek-tooltip {
  min-width: 190px;
  padding: 8px 10px;
  border-color: rgba(var(--theme-accent-rgb), 0.34);
  background: rgba(8, 16, 24, 0.97);
  box-shadow: var(--cn-shadow-sm);
}

.timeline-event {
  width: 17px;
  height: 17px;
  border-color: #111923;
  background: var(--cn-red);
  box-shadow: 0 0 0 2px rgba(231, 117, 125, 0.12);
}

.timeline-event.reentry {
  background: var(--cn-green);
  box-shadow: 0 0 0 2px rgba(101, 205, 176, 0.12);
}

.timeline-event.late-entry {
  background: var(--cn-blue);
  box-shadow: 0 0 0 2px rgba(var(--theme-accent-rgb), 0.12);
}

.timeline-event-label {
  min-width: 112px;
  max-width: 430px;
  padding: 5px 8px 6px;
  border-color: rgba(231, 117, 125, 0.28);
  border-radius: 9px;
  background: rgba(24, 13, 17, 0.95);
  box-shadow: var(--cn-shadow-sm);
}

.timeline-event.reentry .timeline-event-label {
  border-color: rgba(101, 205, 176, 0.26);
  background: rgba(9, 25, 23, 0.95);
}

.timeline-event.late-entry .timeline-event-label {
  border-color: rgba(var(--theme-accent-rgb), 0.28);
  background: rgba(9, 18, 27, 0.96);
}

.timeline-event-kind {
  color: #e9a0a5;
  font-size: clamp(0.64rem, 0.68vw, 0.78rem);
}

.timeline-event.reentry .timeline-event-kind {
  color: #8fd8c4;
}

.timeline-event.late-entry .timeline-event-kind {
  color: var(--cn-blue-bright);
}

.timeline-event-label strong {
  font-size: clamp(0.9rem, 0.98vw, 1.14rem);
  font-weight: 710;
}

.timeline-footer {
  margin-top: 9px;
  color: #687386;
  font-size: clamp(0.76rem, 0.8vw, 0.9rem);
}

.timeline-legend {
  gap: 11px;
}

.timeline-legend i {
  width: 6px;
  height: 6px;
  background: var(--cn-red);
}

.timeline-legend .reentry-key i {
  background: var(--cn-green);
}

.timeline-legend .late-entry-key i {
  background: var(--cn-blue);
}

/* Modal and notifications */

.modal {
  background: rgba(2, 4, 7, 0.74);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.modal-card {
  overflow: hidden;
  border: 1px solid var(--cn-line-strong);
  border-radius: var(--cn-radius-lg);
  background: #10151d;
  box-shadow: var(--cn-shadow-lg);
}

.modal-card .panel-header {
  display: flex;
  align-items: center;
  flex-direction: row;
  justify-content: space-between;
}

.reset-confirmation-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px 18px;
  width: min(520px, 100%);
  padding: 26px;
}

.reset-confirmation-icon {
  display: grid;
  grid-row: 1 / span 2;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(231, 117, 125, 0.34);
  border-radius: 14px;
  background: rgba(231, 117, 125, 0.1);
  color: #ffc2c6;
  font-size: 1.25rem;
  font-weight: 900;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.reset-confirmation-copy {
  min-width: 0;
}

.reset-confirmation-eyebrow {
  display: block;
  margin-bottom: 5px;
  color: var(--cn-red);
  font-size: 0.66rem;
  font-weight: 820;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.reset-confirmation-copy h2 {
  margin: 0;
  color: var(--cn-text);
  font-size: clamp(1.25rem, 4vw, 1.55rem);
  letter-spacing: -0.025em;
}

.reset-confirmation-copy p {
  margin: 10px 0 0;
  color: var(--cn-muted-strong);
  font-size: 0.88rem;
  line-height: 1.55;
}

.reset-confirmation-actions {
  display: flex;
  grid-column: 1 / -1;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 20px;
}

.reset-confirmation-actions button {
  min-height: 42px;
  padding: 9px 15px;
}

.reset-confirmation-submit {
  font-weight: 800;
}

.player-entry-card {
  border-color: rgba(var(--theme-accent-rgb), 0.34);
  background:
    radial-gradient(circle at 8% 5%, rgba(var(--theme-accent-rgb), 0.15), transparent 16rem),
    #10151d;
}

.player-entry-icon {
  border-color: rgba(var(--theme-accent-rgb), 0.42);
  background: rgba(var(--theme-accent-rgb), 0.13);
  color: var(--theme-accent-bright);
}

.player-entry-eyebrow {
  color: var(--theme-accent-bright);
}

.player-entry-field {
  display: grid;
  grid-column: 2;
  gap: 7px;
  margin-top: 14px;
  color: var(--cn-muted-strong);
  font-size: 0.76rem;
  font-weight: 780;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.player-entry-field input {
  width: 100%;
  min-height: 46px;
  padding: 10px 13px;
  border-color: var(--cn-line-strong);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.065);
  color: var(--cn-text);
  font-size: 1rem;
  letter-spacing: normal;
  text-transform: none;
}

.player-entry-field input:focus {
  border-color: rgba(var(--theme-accent-rgb), 0.72);
  box-shadow: 0 0 0 3px rgba(var(--theme-accent-rgb), 0.14);
  outline: none;
}

@media (max-width: 520px) {
  .reset-confirmation-card {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 22px;
  }

  .reset-confirmation-icon {
    grid-row: auto;
  }

  .reset-confirmation-actions {
    grid-column: auto;
    flex-direction: column-reverse;
    margin-top: 8px;
  }

  .player-entry-field {
    grid-column: auto;
    margin-top: 0;
  }

  .reset-confirmation-actions button {
    width: 100%;
  }
}

.toast {
  border: 1px solid var(--cn-line-strong);
  border-radius: 12px;
  background: rgba(17, 23, 31, 0.94);
  color: var(--cn-text-cool);
  box-shadow: var(--cn-shadow-md);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

/* Responsive setup */

@media (max-width: 1220px) {
  .tournament-setup-panel .panel-body {
    grid-template-columns: minmax(260px, 0.65fr) minmax(540px, 1.35fr);
    gap: 10px 18px;
  }

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

  .remaining-stock {
    grid-column: 1 / -1;
  }

  #controlView .control-grid {
    grid-template-columns: minmax(360px, 0.7fr) minmax(560px, 1.3fr);
  }
}

@media (max-width: 1020px) {
  .tournament-setup-panel .panel-body {
    grid-template-columns: 1fr;
  }

  .tournament-setup-panel .setup-intro,
  .tournament-setup-grid,
  .setup-table-zone {
    grid-column: 1;
    grid-row: auto;
  }

  .tournament-setup-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .setup-concept {
    grid-template-columns: 1fr;
  }

  .setup-concept-title {
    grid-column: 1;
  }

  #controlView .control-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
  }

  #controlView .hero-clock {
    min-height: 620px;
  }

  .poker-table-wrap.live-table {
    height: 650px;
  }

  .tournament-timeline {
    min-height: 285px;
  }
}

@media (max-height: 820px) and (min-width: 1021px) {
  body.projector-mode .app {
    padding-top: 7px;
  }

  body.projector-mode .topbar {
    min-height: 50px;
    margin-bottom: 8px;
    padding-block: 5px;
  }

  body.projector-mode .brand-logo-lockup {
    width: 166px;
  }

  #controlView .control-grid {
    grid-template-rows: minmax(390px, 1fr) minmax(215px, 27vh);
    min-height: calc(100vh - 72px);
  }

  #controlView .hero-clock {
    padding: 16px 20px;
  }

  #controlView .status-line {
    top: 12px;
    left: 14px;
  }

  .level-end-countdown {
    top: 11px;
    right: 14px;
    padding: 6px 9px 6px 6px;
  }

  .level-countdown-ring {
    width: 44px;
    height: 44px;
  }

  .level-countdown-ring strong {
    font-size: 1.3rem;
  }

  .level-change-notice {
    padding: 16px 22px;
  }

  #controlView .timer {
    font-size: clamp(5.1rem, 7vw, 7.25rem);
  }

  #controlView .level-title {
    margin-top: 8px;
    font-size: clamp(1.45rem, 2.35vw, 2.65rem);
  }

  #controlView .blind-grid {
    margin-top: 14px;
  }

  #controlView .blind-box {
    min-height: 96px;
    padding-block: 12px 10px;
  }

  #controlView .blind-box strong {
    font-size: clamp(2.8rem, 4.2vw, 4.7rem);
  }

  #controlView .reentry-banner {
    margin-top: 7px;
    padding-block: 6px;
  }

  #controlView .next-level,
  #controlView .progress-wrap,
  #controlView .display-control-bar {
    margin-top: 8px;
  }

  .poker-table-wrap.live-table {
    height: 100%;
    max-height: 560px;
  }

  .tournament-timeline {
    min-height: 215px;
    padding: 13px 18px 11px;
  }

  .timeline-header {
    margin-bottom: 8px;
  }

  .timeline-track {
    min-height: 132px;
  }

  .timeline-footer {
    margin-top: 6px;
  }
}

@media (max-width: 760px) {
  .app {
    padding: 9px 9px 28px;
  }

  .topbar {
    flex-wrap: wrap;
    top: 7px;
    margin-bottom: 14px;
    border-radius: 13px;
  }

  .topbar-actions {
    margin-left: auto;
  }

  .brand-logo-lockup,
  body.projector-mode .brand-logo-lockup {
    width: min(174px, 48vw);
  }

  .brand .brand-subtitle {
    display: none;
  }

  .tab-button {
    padding-inline: 13px;
  }

  .grid,
  .setup-grid {
    gap: 14px;
  }

  .panel,
  .hero-clock {
    border-radius: var(--cn-radius-md);
  }

  #setupView .setup-grid > .panel > .panel-header,
  .stack-panel .panel-header,
  .prize-pool-panel .panel-header,
  .panel-header {
    align-items: flex-start;
    padding: 20px 16px 8px;
  }

  .panel-header h2,
  .panel-header h3,
  #setupView .setup-grid > .panel > .panel-header h2,
  .stack-panel .panel-header h2,
  .tournament-setup-panel .panel-header h2 {
    font-size: 1.65rem;
  }

  .panel-body,
  .stack-panel .panel-body,
  .tournament-setup-panel .panel-body {
    padding: 12px 16px 22px;
  }

  .setup-action-dock {
    top: 78px;
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
  }

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

  .setup-action-buttons button {
    width: 100%;
  }

  .tournament-setup-grid {
    grid-template-columns: 1fr;
  }

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

  .setup-concept-title {
    grid-column: 1 / -1;
  }

  .setup-table-zone {
    padding-inline: 7px;
  }

  .tournament-setup-panel .poker-table-wrap.editor-table {
    min-height: 500px;
  }

  .stack-summary > .allocation-grid,
  .allocation-grid,
  .prize-editor-top,
  .prize-editor-controls,
  .setup-summary-grid {
    grid-template-columns: 1fr;
  }

  .remaining-stock,
  .prize-editor-meta {
    grid-column: 1;
  }

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

  .payout-editor-head {
    display: none;
  }

  .payout-editor-row {
    grid-template-columns: 48px minmax(0, 1fr) 66px;
  }

  .payout-editor-row .payout-amount {
    grid-column: 2 / -1;
    text-align: right;
  }

  .structure-preview-row {
    grid-template-columns: 82px minmax(100px, 1fr) 74px;
  }

  .structure-preview-row > :last-child {
    display: none;
  }

  .level-row {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .level-row > * {
    grid-column: 2;
  }

  .level-row .level-number {
    grid-column: 1;
    grid-row: 1;
  }

  .level-row .row-tools {
    grid-column: 1 / -1;
  }

  body.projector-mode {
    overflow: auto;
  }

  body.projector-mode .app {
    padding: 7px;
  }

  #controlView .control-grid {
    min-height: 0;
  }

  #controlView .hero-clock {
    min-height: 600px;
    padding: 28px 14px;
  }

  #controlView .display-control-bar {
    justify-content: flex-start;
    gap: 6px;
    width: 100%;
    min-height: 60px;
    padding: 6px;
    overflow-x: auto;
    overflow-y: hidden;
  }

  .icon-button {
    width: 46px;
    height: 46px;
    min-width: 46px;
    min-height: 46px;
  }

  .icon-button:hover:not(:disabled),
  .icon-button:focus-visible:not(:disabled) {
    transform: translateY(-2px) scale(1.08);
  }

  .level-end-countdown {
    top: 58px;
    right: 50%;
    transform: translate(50%, -7px) scale(0.96);
  }

  .level-end-countdown.visible {
    transform: translate(50%, 0) scale(1);
  }

  .level-end-countdown.critical {
    animation: none;
  }

  #controlView .timer {
    font-size: clamp(4.6rem, 20vw, 7rem);
  }

  #controlView .blind-box strong {
    font-size: clamp(2.8rem, 13vw, 4.6rem);
  }

  .poker-table-wrap.live-table {
    height: 620px;
  }

  .tournament-timeline {
    min-height: 300px;
    padding: 15px 12px 12px;
  }

  .timeline-summary,
  .timeline-legend {
    display: none;
  }

  .timeline-level {
    padding-inline: 3px;
  }
}

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

/* Side pot assistant */

body.side-pot-mode .shell {
  width: min(1660px, 100%);
}

.side-pot-screen {
  display: grid;
  gap: 18px;
}

.side-pot-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 26px;
  overflow: hidden;
  min-height: 150px;
  padding: 26px 28px;
  border: 1px solid rgba(var(--theme-accent-bright-rgb), 0.2);
  border-radius: var(--cn-radius-lg);
  background:
    radial-gradient(circle at 12% 15%, rgba(var(--theme-accent-rgb), 0.14), transparent 34%),
    linear-gradient(135deg, rgba(26, 24, 25, 0.98), rgba(12, 16, 22, 0.98));
  box-shadow: var(--cn-shadow-md), var(--cn-inner);
}

.side-pot-hero::after {
  position: absolute;
  right: 21%;
  bottom: -84px;
  width: 270px;
  height: 170px;
  border: 1px solid rgba(var(--theme-accent-bright-rgb), 0.12);
  border-radius: 50%;
  content: "";
  transform: rotate(-12deg);
  pointer-events: none;
}

.side-pot-hero-copy,
.side-pot-live-clock,
.side-pot-hero > button {
  position: relative;
  z-index: 1;
}

.side-pot-eyebrow,
.side-pot-section-head > div > span,
.side-pot-resolution-head > div > span {
  color: var(--cn-bronze-bright);
  font-size: 0.72rem;
  font-weight: 820;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.side-pot-hero h2 {
  margin: 3px 0 7px;
  color: var(--cn-text);
  font-size: clamp(2rem, 3vw, 3.4rem);
  font-weight: 720;
  letter-spacing: -0.055em;
}

.side-pot-hero p {
  max-width: 730px;
  margin: 0;
  color: var(--cn-muted-strong);
  font-size: clamp(0.9rem, 0.9vw, 1rem);
  line-height: 1.55;
}

.side-pot-live-clock {
  display: grid;
  min-width: 155px;
  padding: 13px 18px;
  border: 1px solid rgba(221, 232, 246, 0.1);
  border-radius: 14px;
  background: rgba(4, 7, 11, 0.48);
  text-align: right;
}

.side-pot-live-clock span,
.side-pot-live-clock small {
  color: var(--cn-muted);
  font-size: 0.7rem;
  font-weight: 760;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.side-pot-live-clock strong {
  color: var(--cn-text);
  font-size: 1.75rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
}

.side-pot-guide {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--cn-line);
  border-radius: var(--cn-radius-md);
  background: var(--cn-line);
  box-shadow: var(--cn-shadow-sm);
}

.side-pot-guide > div {
  display: grid;
  grid-template-columns: 38px 1fr;
  align-items: center;
  gap: 12px;
  min-height: 88px;
  padding: 16px 20px;
  background: rgba(14, 18, 25, 0.98);
}

.side-pot-guide > div > span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(var(--theme-accent-bright-rgb), 0.28);
  border-radius: 50%;
  background: rgba(var(--theme-accent-rgb), 0.1);
  color: var(--cn-bronze-bright);
  font-weight: 850;
}

.side-pot-guide p {
  margin: 0;
  color: var(--cn-muted);
  font-size: 0.79rem;
  line-height: 1.45;
}

.side-pot-guide strong {
  display: block;
  color: var(--cn-text-cool);
  font-size: 0.86rem;
}

.side-pot-workspace {
  display: grid;
  grid-template-columns: minmax(680px, 1.35fr) minmax(410px, 0.8fr);
  align-items: start;
  gap: 18px;
}

.side-pot-entry-panel,
.side-pot-preview-panel,
.side-pot-settlement-panel {
  overflow: hidden;
}

.side-pot-results {
  display: grid;
  gap: 18px;
}

.side-pot-section-head {
  align-items: center;
}

.side-pot-section-head > div {
  display: grid;
  gap: 2px;
}

.side-pot-section-head h2,
.side-pot-resolution-head h3 {
  margin: 0;
}

.side-pot-total {
  color: var(--cn-gold-bright);
  font-size: 1.75rem;
  font-variant-numeric: tabular-nums;
}

.side-pot-settings {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(150px, 0.7fr) auto;
  align-items: end;
  gap: 12px;
  margin-bottom: 22px;
  padding: 16px;
  border: 1px solid rgba(221, 232, 246, 0.09);
  border-radius: var(--cn-radius-sm);
  background: rgba(255, 255, 255, 0.025);
}

.side-pot-streets {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 5px;
  padding: 5px;
  border-radius: 12px;
  background: rgba(2, 5, 9, 0.48);
}

.side-pot-streets button {
  min-height: 38px;
  padding: 7px;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  color: var(--cn-muted);
  font-size: 0.75rem;
}

.side-pot-streets button.active {
  border-color: rgba(var(--theme-accent-bright-rgb), 0.25);
  background: rgba(var(--theme-accent-rgb), 0.14);
  color: var(--cn-bronze-bright);
}

.side-pot-player-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.side-pot-player-tools > div:first-child {
  display: grid;
}

.side-pot-player-tools span {
  color: var(--cn-muted);
  font-size: 0.76rem;
}

.side-pot-player-tools > div:last-child {
  display: flex;
  gap: 7px;
}

.side-pot-player-tools button {
  min-height: 36px;
  padding: 7px 11px;
  font-size: 0.76rem;
}

.side-pot-players {
  display: grid;
  gap: 8px;
}

.side-pot-player {
  display: grid;
  grid-template-columns: minmax(170px, 1.15fr) minmax(112px, 0.72fr) minmax(112px, 0.72fr) minmax(112px, 0.72fr) minmax(104px, 0.62fr);
  align-items: end;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(var(--theme-accent-rgb), 0.17);
  border-radius: 13px;
  background: linear-gradient(135deg, rgba(var(--theme-accent-rgb), 0.055), rgba(255, 255, 255, 0.02));
  transition: opacity 180ms var(--cn-ease), border-color 180ms var(--cn-ease), background 180ms var(--cn-ease);
}

.side-pot-player.folded {
  border-color: rgba(231, 117, 125, 0.18);
  background: rgba(231, 117, 125, 0.04);
}

.side-pot-player.all-in {
  border-color: rgba(210, 179, 111, 0.3);
  background: rgba(210, 179, 111, 0.055);
}

.side-pot-player-off {
  border-color: rgba(221, 232, 246, 0.06);
  background: rgba(255, 255, 255, 0.012);
  opacity: 0.5;
}

.side-pot-player-off:hover,
.side-pot-player-off:focus-within {
  opacity: 0.9;
}

.side-pot-player-select {
  display: grid;
  grid-template-columns: 22px 32px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  min-height: 48px;
  margin: 0;
  cursor: pointer;
}

.side-pot-player-select input {
  width: 18px;
  height: 18px;
  accent-color: var(--cn-blue);
}

.side-pot-player-select > span:last-child {
  display: grid;
  min-width: 0;
}

.side-pot-player-select strong {
  overflow: hidden;
  color: var(--cn-text);
  font-size: 0.9rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.side-pot-player-select small,
.side-pot-field small,
.side-pot-player-total span {
  color: var(--cn-muted);
  font-size: 0.66rem;
  font-weight: 650;
  line-height: 1.3;
}

.side-pot-seat {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(221, 232, 246, 0.1);
  border-radius: 50%;
  color: var(--cn-muted-strong);
  font-size: 0.72rem;
  font-weight: 850;
}

.side-pot-field {
  display: grid;
  gap: 4px;
  margin: 0;
  font-size: 0.67rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.side-pot-field input,
.side-pot-field select {
  min-height: 42px;
  padding: 8px 10px;
  font-size: 0.86rem;
  font-weight: 760;
  font-variant-numeric: tabular-nums;
}

.side-pot-field small {
  min-height: 17px;
  letter-spacing: 0;
  text-transform: none;
}

.side-pot-player-total {
  display: grid;
  align-content: center;
  min-height: 58px;
  padding: 8px 10px;
  border-left: 1px solid rgba(221, 232, 246, 0.08);
  text-align: right;
}

.side-pot-player-total strong {
  color: var(--cn-text-cool);
  font-size: 1.08rem;
  font-variant-numeric: tabular-nums;
}

.side-pot-message,
.side-pot-refund {
  display: grid;
  gap: 2px;
  margin-bottom: 8px;
  padding: 11px 13px;
  border: 1px solid rgba(210, 179, 111, 0.17);
  border-radius: 10px;
  background: rgba(210, 179, 111, 0.055);
  color: var(--cn-muted-strong);
  font-size: 0.76rem;
  line-height: 1.4;
}

.side-pot-message.error {
  border-color: rgba(231, 117, 125, 0.2);
  background: rgba(231, 117, 125, 0.055);
  color: #efb4b8;
}

.side-pot-refund {
  border-color: rgba(101, 205, 176, 0.2);
  background: rgba(101, 205, 176, 0.055);
}

.side-pot-refund strong {
  color: #a8ead8;
  font-size: 0.9rem;
}

.side-pot-awards {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.side-pot-award-card {
  padding: 14px;
  border: 1px solid rgba(221, 232, 246, 0.09);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.025);
}

.side-pot-award-card.resolved {
  border-color: rgba(var(--theme-accent-rgb), 0.22);
  background: rgba(var(--theme-accent-rgb), 0.045);
}

.side-pot-award-head,
.side-pot-resolution-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.side-pot-award-head > div {
  display: grid;
}

.side-pot-award-head > div > span {
  color: var(--cn-muted-strong);
  font-size: 0.74rem;
  font-weight: 760;
  text-transform: uppercase;
}

.side-pot-award-head > div > strong {
  color: var(--cn-gold-bright);
  font-size: 1.72rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
}

.side-pot-eligibility {
  display: grid;
  gap: 2px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(221, 232, 246, 0.07);
}

.side-pot-eligibility span {
  color: var(--cn-muted);
  font-size: 0.65rem;
  font-weight: 780;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.side-pot-eligibility strong {
  color: var(--cn-text-cool);
  font-size: 0.83rem;
}

.side-pot-winner-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 11px;
}

.side-pot-winner-picker button {
  min-height: 34px;
  padding: 6px 10px;
  font-size: 0.74rem;
}

.side-pot-winner-picker button.active {
  border-color: rgba(101, 205, 176, 0.35);
  background: rgba(101, 205, 176, 0.14);
  color: #b8f1e1;
}

.side-pot-winner-picker small {
  flex: 1 0 100%;
  color: var(--cn-muted);
  font-size: 0.68rem;
}

.side-pot-auto-winner {
  margin-top: 11px;
  padding: 9px 11px;
  border-radius: 9px;
  background: rgba(101, 205, 176, 0.08);
  color: var(--cn-muted-strong);
  font-size: 0.76rem;
}

.side-pot-auto-winner strong {
  color: #b8f1e1;
}

.side-pot-math {
  margin-top: 10px;
  color: var(--cn-muted);
  font-size: 0.68rem;
}

.side-pot-math summary {
  cursor: pointer;
}

.side-pot-math span {
  display: block;
  margin-top: 5px;
}

.side-pot-empty {
  display: grid;
  place-items: center;
  min-height: 190px;
  padding: 22px;
  color: var(--cn-muted);
  text-align: center;
}

.side-pot-empty-icon {
  color: var(--cn-bronze-bright);
  font-size: 2.2rem;
}

.side-pot-empty strong {
  color: var(--cn-text-cool);
}

.side-pot-empty p {
  max-width: 310px;
  margin: 6px 0 0;
  font-size: 0.78rem;
  line-height: 1.45;
}

.side-pot-resolution {
  display: grid;
  gap: 14px;
}

.side-pot-resolution.completed {
  padding: 4px;
}

.side-pot-resolution.completed .side-pot-resolution-head h3 {
  color: #b8f1e1;
}

.side-pot-resolution-help {
  margin: 0;
  color: var(--cn-muted);
  font-size: 0.8rem;
  line-height: 1.5;
}

.side-pot-instructions {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  counter-reset: side-pot-steps;
  list-style: none;
}

.side-pot-instructions li {
  position: relative;
  min-height: 42px;
  padding: 11px 12px 11px 42px;
  border: 1px solid rgba(101, 205, 176, 0.12);
  border-radius: 10px;
  background: rgba(101, 205, 176, 0.04);
  color: var(--cn-text-cool);
  font-size: 0.78rem;
  line-height: 1.4;
  counter-increment: side-pot-steps;
}

.side-pot-instructions li::before {
  position: absolute;
  top: 9px;
  left: 10px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(101, 205, 176, 0.12);
  color: #b8f1e1;
  content: counter(side-pot-steps);
  font-size: 0.68rem;
  font-weight: 850;
}

.side-pot-final-stacks {
  display: grid;
  overflow: hidden;
  border: 1px solid rgba(221, 232, 246, 0.08);
  border-radius: 11px;
}

.side-pot-final-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(221, 232, 246, 0.06);
}

.side-pot-final-row:last-child {
  border-bottom: 0;
}

.side-pot-final-row > span {
  display: grid;
}

.side-pot-final-row > span:last-child {
  text-align: right;
}

.side-pot-final-row strong {
  color: var(--cn-text-cool);
  font-size: 0.84rem;
}

.side-pot-final-row > span:last-child strong {
  color: var(--cn-gold-bright);
  font-variant-numeric: tabular-nums;
}

.side-pot-final-row small {
  color: var(--cn-muted);
  font-size: 0.67rem;
}

.side-pot-resolution-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* Light appearance — same component hierarchy, alternate surface palette. */

:root[data-theme-mode="light"] body::before {
  background:
    linear-gradient(90deg, transparent 0 49.96%, rgba(24, 42, 61, 0.025) 50%, transparent 50.04%),
    radial-gradient(circle at 50% 0, rgba(var(--theme-accent-rgb), 0.09), transparent 45%);
  opacity: 0.7;
}

:root[data-theme-mode="light"] .brand-logo-lockup {
  filter: brightness(0.24) saturate(0.9) drop-shadow(0 7px 16px rgba(var(--theme-accent-rgb), 0.12));
}

:root[data-theme-mode="light"] .nav-tabs {
  border-color: var(--cn-line);
  background: var(--cn-surface-soft);
}

:root[data-theme-mode="light"] .tab-button.active {
  background: var(--cn-text);
  color: #ffffff;
  box-shadow: 0 5px 16px rgba(31, 47, 66, 0.16);
}

:root[data-theme-mode="light"] .theme-current-swatch {
  border-color: rgba(255, 255, 255, 0.9);
}

:root[data-theme-mode="light"] #setupView .setup-grid > .panel,
:root[data-theme-mode="light"] #setupView .setup-grid > .panel:first-child,
:root[data-theme-mode="light"] #setupView .setup-grid > .panel:nth-child(2) {
  border-color: var(--cn-line);
  background: var(--cn-surface);
  color: var(--cn-text);
  box-shadow: var(--cn-shadow-md), var(--cn-inner);
}

:root[data-theme-mode="light"] #setupView :is(input, select, textarea) {
  border-color: var(--cn-line-strong);
  background: var(--cn-control);
  color: var(--cn-text);
  box-shadow: inset 0 1px 2px rgba(31, 47, 66, 0.08);
}

:root[data-theme-mode="light"] #setupView :is(input, select, textarea):hover {
  border-color: rgba(var(--theme-accent-rgb), 0.28);
  background: var(--cn-control-hover);
}

:root[data-theme-mode="light"] #setupView :is(input, select, textarea):focus {
  border-color: rgba(var(--theme-accent-rgb), 0.58);
  background: rgba(var(--theme-accent-rgb), 0.08);
}

:root[data-theme-mode="light"] #setupView :is(.player-seat, .level-row, .stat-box) {
  color: var(--cn-text);
}

:root[data-theme-mode="light"] .setup-table-zone {
  border-color: var(--cn-line);
  background:
    radial-gradient(circle at 50% 50%, rgba(var(--theme-accent-rgb), 0.08), transparent 23rem),
    rgba(24, 42, 61, 0.045);
}

:root[data-theme-mode="light"] :is(
  .setup-concept,
  .stack-summary .allocation-card,
  .remaining-stock,
  details.setup-details,
  .chip-card,
  .prize-editor-controls,
  .payout-editor-row,
  .setup-summary-grid .stat-box,
  .structure-preview-row,
  .level-row,
  .stats-strip .stat-box,
  .side-pot-settings,
  .side-pot-award-card
) {
  border-color: var(--cn-line);
  background: var(--cn-surface-raised);
}

:root[data-theme-mode="light"] :is(
  .allocation-key-metric,
  .chip-card-total,
  .prize-editor-meta,
  .payout-distribution,
  .side-pot-streets
) {
  border-color: var(--cn-line);
  background: var(--cn-surface-soft);
}

:root[data-theme-mode="light"] .poker-table-content {
  border-color: var(--cn-line-strong);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 12px 28px rgba(31, 47, 66, 0.14), var(--cn-inner);
}

:root[data-theme-mode="light"] .player-seat {
  border-color: var(--cn-line-strong);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 24px rgba(31, 47, 66, 0.12), var(--cn-inner);
}

:root[data-theme-mode="light"] .player-seat:focus-within {
  border-color: rgba(var(--theme-accent-rgb), 0.48);
  background: #ffffff;
}

:root[data-theme-mode="light"] .player-seat.out {
  background: #fff5f5;
}

:root[data-theme-mode="light"] .player-seat.itm,
:root[data-theme-mode="light"] .seat-insert-zone {
  background: #f0fbf7;
}

:root[data-theme-mode="light"] .player-finish-result {
  background: #ffffff;
}

:root[data-theme-mode="light"] .player-finish-result.paid {
  background: #fff9eb;
}

:root[data-theme-mode="light"] .payout-rank,
:root[data-theme-mode="light"] .level-number {
  background: var(--cn-control-hover);
}

:root[data-theme-mode="light"] body.projector-mode .topbar {
  border-color: var(--cn-line);
}

:root[data-theme-mode="light"] #controlView :is(.blind-box, .display-control-bar, .stats-strip .stat-box) {
  border-color: var(--cn-line);
  background: rgba(255, 255, 255, 0.72);
}

:root[data-theme-mode="light"] #controlView .hero-clock:focus-within .display-control-bar,
:root[data-theme-mode="light"] #controlView .hero-clock:hover .display-control-bar {
  background: rgba(255, 255, 255, 0.94);
}

:root[data-theme-mode="light"] .progress {
  background: rgba(24, 42, 61, 0.12);
}

:root[data-theme-mode="light"] :is(details.display-secondary > summary, details.display-secondary[open]) {
  border-color: var(--cn-line);
  background: rgba(255, 255, 255, 0.86);
}

:root[data-theme-mode="light"] .timeline-track {
  border-color: var(--cn-line);
  background: rgba(24, 42, 61, 0.065);
}

:root[data-theme-mode="light"] .tournament-timeline {
  border-color: var(--cn-line);
  background:
    radial-gradient(circle at var(--timeline-progress, 0%) 54%, rgba(var(--theme-accent-rgb), 0.1), transparent 15%),
    var(--cn-surface);
}

:root[data-theme-mode="light"] .timeline-level {
  border-right-color: var(--cn-line);
  color: var(--cn-muted-strong);
}

:root[data-theme-mode="light"] .timeline-level :is(span, small, .timeline-level-start),
:root[data-theme-mode="light"] .timeline-level.past {
  color: var(--cn-text-cool);
  text-shadow: none;
}

:root[data-theme-mode="light"] .timeline-level.current :is(strong, span, small, .timeline-level-start) {
  color: var(--theme-accent-ink);
  text-shadow: none;
}

:root[data-theme-mode="light"] .timeline-level.next,
:root[data-theme-mode="light"] .timeline-level.next::before {
  background: rgba(var(--theme-accent-rgb), 0.09);
  color: var(--cn-text-cool);
}

:root[data-theme-mode="light"] .timeline-level.current::before {
  background: rgba(var(--theme-accent-rgb), 0.15);
}

:root[data-theme-mode="light"] .level-change-notice,
:root[data-theme-mode="light"] .timeline-seek-tooltip,
:root[data-theme-mode="light"] .toast {
  border-color: var(--cn-line-strong);
  background: rgba(255, 255, 255, 0.96);
  color: var(--cn-text);
}

:root[data-theme-mode="light"] .modal {
  background: rgba(28, 42, 58, 0.42);
}

:root[data-theme-mode="light"] .side-pot-hero {
  border-color: rgba(var(--theme-accent-rgb), 0.2);
  background:
    radial-gradient(circle at 12% 15%, rgba(var(--theme-accent-rgb), 0.12), transparent 34%),
    linear-gradient(135deg, #ffffff, #f1f5f9);
}

:root[data-theme-mode="light"] .side-pot-hero::after {
  border-color: rgba(var(--theme-accent-rgb), 0.16);
}

:root[data-theme-mode="light"] .side-pot-eyebrow,
:root[data-theme-mode="light"] .side-pot-section-head > div > span,
:root[data-theme-mode="light"] .side-pot-resolution-head > div > span,
:root[data-theme-mode="light"] .side-pot-empty-icon {
  color: var(--theme-accent-dark);
}

:root[data-theme-mode="light"] .side-pot-live-clock,
:root[data-theme-mode="light"] .side-pot-guide > div {
  border-color: var(--cn-line);
  background: rgba(255, 255, 255, 0.86);
}

:root[data-theme-mode="light"] .side-pot-guide > div > span {
  border-color: rgba(var(--theme-accent-rgb), 0.3);
  background: rgba(var(--theme-accent-rgb), 0.1);
  color: var(--theme-accent-dark);
}

:root[data-theme-mode="light"] .side-pot-streets button.active {
  border-color: rgba(var(--theme-accent-rgb), 0.28);
  background: rgba(var(--theme-accent-rgb), 0.12);
  color: var(--theme-accent-dark);
}

:root[data-theme-mode="light"] .side-pot-player {
  border-color: rgba(var(--theme-accent-rgb), 0.22);
  background: linear-gradient(135deg, rgba(var(--theme-accent-rgb), 0.08), rgba(255, 255, 255, 0.86));
}

:root[data-theme-mode="light"] .side-pot-player-off {
  border-color: var(--cn-line);
  background: var(--cn-surface-soft);
}

:root[data-theme-mode="light"] .side-pot-final-stacks,
:root[data-theme-mode="light"] .side-pot-final-row,
:root[data-theme-mode="light"] .side-pot-player-total {
  border-color: var(--cn-line);
}

@media (max-width: 1220px) {
  .side-pot-workspace {
    grid-template-columns: 1fr;
  }

  .side-pot-results {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .side-pot-hero {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .side-pot-hero > button {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .side-pot-player {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .side-pot-player-select {
    grid-column: 1 / -1;
  }

  .side-pot-player-total {
    border-top: 1px solid rgba(221, 232, 246, 0.08);
    border-left: 0;
    text-align: left;
  }

  .side-pot-results {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .topbar {
    flex-wrap: wrap;
  }

  .brand-logo-lockup,
  body.projector-mode .brand-logo-lockup {
    width: min(148px, 40vw);
  }

  .nav-tabs {
    margin-left: auto;
  }

  .tab-button {
    padding-inline: 9px;
    font-size: 0.72rem;
  }

  .side-pot-hero {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 22px 18px;
  }

  .side-pot-live-clock {
    justify-self: stretch;
    text-align: left;
  }

  .side-pot-hero > button {
    grid-column: 1;
  }

  .side-pot-guide {
    grid-template-columns: 1fr;
  }

  .side-pot-guide > div {
    min-height: 74px;
  }

  .side-pot-settings {
    grid-template-columns: 1fr;
  }

  .side-pot-streets {
    grid-column: 1;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .side-pot-player-tools {
    align-items: stretch;
    flex-direction: column;
  }

  .side-pot-player-tools > div:last-child,
  .side-pot-resolution-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .side-pot-player {
    grid-template-columns: 1fr;
  }

  .side-pot-player-select {
    grid-column: 1;
  }

  .side-pot-player-total {
    grid-template-columns: 1fr auto;
    align-items: center;
  }
}

@media (max-width: 520px) {
  .topbar .brand {
    width: 100%;
    justify-content: center;
  }

  .topbar-actions {
    width: 100%;
    margin: 0;
  }

  .topbar .nav-tabs {
    flex: 1 1 auto;
    width: 100%;
    margin: 0;
  }

  .theme-picker > summary {
    min-width: 46px;
    justify-content: center;
    padding-inline: 11px;
  }

  .theme-picker > summary > span:last-of-type {
    display: none;
  }

  .topbar .tab-button {
    flex: 1;
  }

  .side-pot-streets {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Simplified side-pot flow */

body.side-pot-mode .shell {
  width: min(1180px, 100%);
}

.side-pot-screen {
  gap: 22px;
}

.side-pot-simple-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: 18px 4px 4px;
}

.side-pot-simple-hero > div:first-child > span,
.side-pot-simple-heading > span {
  color: var(--cn-bronze-bright);
  font-size: 0.7rem;
  font-weight: 850;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.side-pot-simple-hero h1 {
  margin: 3px 0 5px;
  color: var(--cn-text);
  font-size: clamp(2rem, 4vw, 3.15rem);
  letter-spacing: -0.055em;
}

.side-pot-simple-hero p,
.side-pot-simple-heading p {
  margin: 0;
  color: var(--cn-muted-strong);
  line-height: 1.55;
}

.side-pot-simple-clock {
  display: grid;
  min-width: 155px;
  padding: 11px 16px;
  border: 1px solid var(--cn-line);
  border-radius: var(--cn-radius-sm);
  background: var(--cn-surface-soft);
  text-align: right;
}

.side-pot-simple-clock span,
.side-pot-simple-clock small {
  color: var(--cn-muted);
  font-size: 0.66rem;
  font-weight: 780;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.side-pot-simple-clock strong {
  color: var(--cn-text);
  font-size: 1.55rem;
  font-variant-numeric: tabular-nums;
}

.side-pot-simple-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
}

.side-pot-wizard-nav {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(360px, 680px) minmax(150px, 1fr);
  align-items: center;
  gap: 18px;
  width: min(1120px, 100%);
  margin: 0 auto;
}

.side-pot-wizard-direction {
  display: flex;
  align-items: center;
  gap: 10px;
  width: max-content;
  min-width: 150px;
  min-height: 50px;
  padding: 8px 13px;
  text-align: left;
}

.side-pot-wizard-direction.next {
  justify-self: end;
  justify-content: flex-end;
  text-align: right;
}

.side-pot-wizard-direction > span[aria-hidden="true"] {
  font-size: 1.05rem;
  font-weight: 820;
}

.side-pot-wizard-direction > span:has(small) {
  display: grid;
  gap: 2px;
}

.side-pot-wizard-direction small {
  color: var(--cn-muted);
  font-size: 0.58rem;
  font-weight: 780;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

.side-pot-wizard-direction strong {
  font-size: 0.76rem;
  line-height: 1.1;
}

.side-pot-wizard-direction:disabled {
  opacity: 0.32;
}

.side-pot-simple-step {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 10px 18px;
  color: var(--cn-muted);
}

.side-pot-simple-step:not(:last-child)::after {
  position: absolute;
  top: 50%;
  right: -12%;
  width: 24%;
  height: 1px;
  background: var(--cn-line-strong);
  content: "";
}

.side-pot-simple-step > span {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid var(--cn-line-strong);
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 850;
}

.side-pot-simple-step strong {
  font-size: 0.78rem;
}

.side-pot-simple-step.active,
.side-pot-simple-step.done {
  color: var(--cn-text);
}

.side-pot-simple-step.active > span {
  border-color: var(--cn-blue-bright);
  background: var(--cn-blue-bright);
  color: var(--cn-blue-ink);
  box-shadow: 0 0 0 5px rgba(var(--theme-accent-rgb), 0.12);
}

.side-pot-simple-step.done > span {
  border-color: rgba(101, 205, 176, 0.5);
  background: rgba(101, 205, 176, 0.14);
  color: var(--cn-green);
}

.side-pot-simple-workspace {
  width: min(900px, 100%);
  margin: 0 auto;
}

.side-pot-simple-card {
  position: relative;
  padding: clamp(24px, 4vw, 44px);
  border: 1px solid var(--cn-line);
  border-radius: var(--cn-radius-lg);
  background: linear-gradient(155deg, var(--cn-surface-raised), var(--cn-surface));
  box-shadow: var(--cn-shadow-md), var(--cn-inner);
}

.side-pot-simple-heading {
  margin-bottom: 26px;
}

.side-pot-simple-heading h2 {
  margin: 5px 0 7px;
  color: var(--cn-text);
  font-size: clamp(1.6rem, 3.5vw, 2.45rem);
  letter-spacing: -0.045em;
}

.side-pot-simple-heading.centered {
  text-align: center;
}

.side-pot-player-picker,
.side-pot-hand-picker {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.side-pot-player-picker button,
.side-pot-hand-picker button {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  padding: 10px 13px;
  border-color: var(--cn-line);
  background: var(--cn-control);
  color: var(--cn-muted-strong);
  text-align: left;
}

.side-pot-player-picker button > span,
.side-pot-hand-picker button > span {
  display: grid;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid var(--cn-line-strong);
  border-radius: 50%;
  color: var(--cn-muted);
  font-size: 0.72rem;
}

.side-pot-player-picker button.active,
.side-pot-hand-picker button.active {
  border-color: rgba(var(--theme-accent-bright-rgb), 0.55);
  background: rgba(var(--theme-accent-rgb), 0.14);
  color: var(--cn-text);
  box-shadow: inset 0 0 0 1px rgba(var(--theme-accent-rgb), 0.08);
}

.side-pot-player-picker button.active > span,
.side-pot-hand-picker button.active > span:first-child {
  border-color: var(--cn-blue-bright);
  background: var(--cn-blue-bright);
  color: var(--cn-blue-ink);
}

.side-pot-player-picker button.active > span {
  border-color: var(--theme-accent);
  background: var(--theme-accent);
  color: var(--theme-accent-check-ink);
}

.side-pot-simple-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 120px;
  margin-top: 20px;
  border: 1px dashed var(--cn-line-strong);
  border-radius: var(--cn-radius-md);
  color: var(--cn-muted);
}

.side-pot-simple-empty > span {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  background: var(--cn-surface-soft);
  font-weight: 850;
}

.side-pot-selected-list {
  display: grid;
  gap: 10px;
  margin-top: 26px;
}

.side-pot-selected-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 0 2px 3px;
}

.side-pot-selected-head > span {
  color: var(--cn-muted);
  font-size: 0.73rem;
}

.side-pot-simple-player {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto minmax(190px, 0.72fr) 36px;
  align-items: center;
  gap: 14px;
  min-height: 78px;
  padding: 12px 13px;
  border: 1px solid var(--cn-line);
  border-radius: var(--cn-radius-md);
  background: var(--cn-surface-soft);
}

.side-pot-simple-player.folded {
  border-color: rgba(231, 117, 125, 0.24);
}

.side-pot-simple-player-name {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.side-pot-simple-player-name > span:last-child {
  display: grid;
  min-width: 0;
}

.side-pot-simple-player-name strong {
  overflow: hidden;
  color: var(--cn-text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.side-pot-simple-player-name small {
  color: var(--cn-muted);
  font-size: 0.69rem;
}

.side-pot-status-toggle {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  padding: 3px;
  border: 1px solid var(--cn-line);
  border-radius: 11px;
  background: var(--cn-bg-deep);
}

.side-pot-status-toggle button {
  min-height: 34px;
  padding: 6px 10px;
  border: 0;
  background: transparent;
  color: var(--cn-muted);
  font-size: 0.72rem;
}

.side-pot-status-toggle button.active {
  background: var(--cn-surface-hover);
  color: var(--cn-text);
  box-shadow: var(--cn-shadow-sm);
}

.side-pot-simple-player.folded .side-pot-status-toggle button.active {
  color: var(--cn-red);
}

.side-pot-simple-amount {
  display: grid;
  gap: 5px;
  color: var(--cn-muted);
  font-size: 0.67rem;
  font-weight: 760;
}

.side-pot-simple-amount input {
  min-width: 0;
  height: 42px;
  color: var(--cn-text);
  font-size: 1.05rem;
  font-weight: 800;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.side-pot-remove-player {
  width: 34px;
  height: 34px;
  padding: 0;
  border-color: transparent;
  background: transparent;
  color: var(--cn-muted);
  font-size: 1.2rem;
}

.side-pot-remove-player:hover {
  color: var(--cn-red);
}

.side-pot-live-summary {
  display: flex;
  align-items: stretch;
  margin-top: 18px;
  border: 1px solid var(--cn-line);
  border-radius: var(--cn-radius-md);
  background: rgba(var(--theme-accent-rgb), 0.06);
}

.side-pot-live-summary > span {
  display: grid;
  flex: 1;
  gap: 2px;
  padding: 14px 18px;
}

.side-pot-live-summary > span[hidden],
.side-pot-inline-note[hidden] {
  display: none !important;
}

.side-pot-live-summary > span + span {
  border-left: 1px solid var(--cn-line);
}

.side-pot-live-summary small {
  color: var(--cn-muted);
  font-size: 0.68rem;
  font-weight: 730;
}

.side-pot-live-summary strong {
  color: var(--cn-text);
  font-size: 1.2rem;
}

.side-pot-inline-note,
.side-pot-tie-hint {
  margin-top: 14px;
  padding: 11px 14px;
  border: 1px solid rgba(210, 179, 111, 0.25);
  border-radius: var(--cn-radius-sm);
  background: rgba(210, 179, 111, 0.07);
  color: var(--cn-muted-strong);
  font-size: 0.77rem;
}

.side-pot-inline-note.error {
  border-color: rgba(231, 117, 125, 0.3);
  background: rgba(231, 117, 125, 0.08);
  color: var(--cn-red);
}

.side-pot-advanced,
.side-pot-pot-details {
  margin-top: 16px;
  color: var(--cn-muted);
  font-size: 0.76rem;
}

.side-pot-advanced summary,
.side-pot-pot-details summary {
  cursor: pointer;
  font-weight: 760;
}

.side-pot-advanced label {
  display: grid;
  gap: 6px;
  max-width: 260px;
  margin-top: 12px;
}

.side-pot-primary-actions,
.side-pot-result-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 28px;
}

.side-pot-primary-actions.split {
  justify-content: space-between;
}

.side-pot-primary-actions button,
.side-pot-result-actions button {
  min-height: 48px;
  padding-inline: 20px;
}

.side-pot-primary-actions button.primary,
.side-pot-result-actions button.primary {
  min-width: 220px;
}

.side-pot-back {
  margin: -12px 0 22px;
  padding: 7px 0;
  border: 0;
  background: transparent;
  color: var(--cn-muted-strong);
}

.side-pot-hand-picker {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.side-pot-hand-picker button {
  position: relative;
  min-width: 0;
  min-height: 70px;
  overflow: hidden;
  font-size: 1rem;
  user-select: none;
  -webkit-user-select: none;
  transition:
    transform 160ms var(--cn-ease),
    border-color 160ms var(--cn-ease),
    background 160ms var(--cn-ease),
    box-shadow 160ms var(--cn-ease);
}

.side-pot-hand-picker button.active {
  transform: translateY(-1px);
  border-color: rgba(var(--theme-accent-bright-rgb), 0.74);
  background:
    radial-gradient(circle at 100% 0, rgba(var(--theme-accent-bright-rgb), 0.16), transparent 70%),
    linear-gradient(135deg, rgba(var(--theme-accent-rgb), 0.26), rgba(var(--theme-accent-rgb), 0.11));
  box-shadow:
    inset 4px 0 0 var(--theme-accent-bright),
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 8px 18px rgba(0, 0, 0, 0.18),
    0 0 0 1px rgba(var(--theme-accent-rgb), 0.1);
}

.side-pot-hand-picker button.active > span:first-child {
  border-color: var(--theme-accent-bright);
  background: var(--theme-accent-bright);
  color: var(--cn-blue-ink);
  box-shadow: 0 0 0 4px rgba(var(--theme-accent-bright-rgb), 0.13);
}

.side-pot-hand-picker button.active > span:last-child {
  border: 0;
  background: transparent;
  color: var(--cn-text);
  box-shadow: none;
}

.side-pot-hand-picker button.active > span:last-child > small {
  color: var(--cn-text-cool);
}

.side-pot-hand-picker button:focus-visible {
  outline: 3px solid rgba(var(--theme-accent-bright-rgb), 0.32);
  outline-offset: 2px;
}

.side-pot-ranking-list {
  display: grid;
  gap: 8px;
  margin: 0 0 24px;
}

.side-pot-ranking-list > div {
  display: grid;
  grid-template-columns: 34px minmax(105px, auto) 1fr;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border: 1px solid var(--cn-line);
  border-radius: var(--cn-radius-sm);
  background: var(--cn-surface-soft);
}

.side-pot-ranking-list > div > span {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: rgba(var(--theme-accent-rgb), 0.13);
  color: var(--cn-blue-bright);
  font-weight: 850;
}

.side-pot-ranking-list small {
  color: var(--cn-muted);
}

.side-pot-ranking-list strong {
  color: var(--cn-text);
}

.side-pot-ranking-complete {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 15px 17px;
  border: 1px solid rgba(101, 205, 176, 0.28);
  border-radius: var(--cn-radius-md);
  background: rgba(101, 205, 176, 0.08);
}

.side-pot-ranking-complete > span,
.side-pot-result-check {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  background: var(--cn-green);
  color: #062118;
  font-weight: 900;
}

.side-pot-ranking-complete > div {
  display: grid;
}

.side-pot-ranking-complete small {
  color: var(--cn-muted);
}

.side-pot-compact-pots {
  display: grid;
  gap: 7px;
  margin-top: 12px;
}

.side-pot-compact-pots > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 11px 13px;
  border: 1px solid var(--cn-line);
  border-radius: var(--cn-radius-sm);
}

.side-pot-compact-pots > div > span {
  display: grid;
}

.side-pot-compact-pots small {
  color: var(--cn-muted);
}

.side-pot-compact-pots .refund {
  border-color: rgba(210, 179, 111, 0.24);
}

.side-pot-result-check {
  width: 52px;
  height: 52px;
  margin: -8px auto 15px;
  font-size: 1.35rem;
  box-shadow: 0 0 0 8px rgba(101, 205, 176, 0.09);
}

.side-pot-result-ranking {
  margin-bottom: 20px;
}

.side-pot-result-ranking > small {
  display: block;
  margin-bottom: 8px;
  color: var(--cn-muted);
  font-size: 0.69rem;
  font-weight: 760;
  text-transform: uppercase;
}

.side-pot-result-ranking .side-pot-ranking-list {
  margin-bottom: 0;
}

.side-pot-result-pots {
  display: grid;
  gap: 9px;
  margin: 20px 0;
}

.side-pot-result-pots > div {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 18px;
  min-height: 74px;
  padding: 13px 18px;
  border: 1px solid rgba(var(--theme-accent-rgb), 0.26);
  border-radius: var(--cn-radius-md);
  background: rgba(var(--theme-accent-rgb), 0.07);
}

.side-pot-result-pots > div > span:first-child {
  display: grid;
}

.side-pot-result-pots small {
  color: var(--cn-muted);
}

.side-pot-result-pots > div > strong:last-child {
  color: var(--cn-text);
  text-align: right;
}

.side-pot-result-pots .arrow {
  color: var(--cn-blue-bright);
  font-size: 1.35rem;
}

.side-pot-simple-instructions {
  display: grid;
  gap: 10px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: side-pot-instruction;
}

.side-pot-simple-instructions li {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 10px 14px;
  border: 1px solid var(--cn-line);
  border-radius: var(--cn-radius-sm);
  color: var(--cn-text);
  counter-increment: side-pot-instruction;
}

.side-pot-simple-instructions li::before {
  display: grid;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: var(--cn-surface-hover);
  color: var(--cn-blue-bright);
  content: counter(side-pot-instruction);
  font-size: 0.72rem;
  font-weight: 850;
}

.side-pot-receipts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 18px;
}

.side-pot-receipts > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 13px;
  border-radius: var(--cn-radius-sm);
  background: var(--cn-surface-soft);
}

.side-pot-receipts > div > span {
  display: grid;
  color: var(--cn-muted);
  text-align: right;
}

.side-pot-receipts > div > span > strong {
  color: var(--cn-text);
  font-size: 1.05rem;
}

.side-pot-receipts small {
  font-size: 0.65rem;
}

.side-pot-odd-chip {
  margin: 18px 0;
  padding: 16px;
  border: 1px solid rgba(210, 179, 111, 0.32);
  border-radius: var(--cn-radius-md);
  background: rgba(210, 179, 111, 0.08);
}

.side-pot-odd-chip p {
  margin: 4px 0 13px;
  color: var(--cn-muted-strong);
  font-size: 0.78rem;
}

.side-pot-odd-chip > div {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.side-pot-odd-chip label {
  display: grid;
  gap: 5px;
  color: var(--cn-muted);
  font-size: 0.68rem;
}

.side-pot-new-hand {
  justify-self: center;
  padding: 7px 4px;
  border: 0;
  background: transparent;
  color: var(--cn-muted);
  font-size: 0.76rem;
}

.side-pot-simple-workspace {
  width: min(1040px, 100%);
}

.side-pot-entry-breakdown {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid rgba(var(--theme-accent-rgb), 0.2);
  border-radius: var(--cn-radius-md);
  background: rgba(var(--theme-accent-rgb), 0.045);
}

.side-pot-entry-breakdown[hidden] {
  display: none !important;
}

.side-pot-entry-breakdown > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 10px;
}

.side-pot-entry-breakdown > header > div {
  display: grid;
  gap: 2px;
}

.side-pot-entry-breakdown > header > div > span {
  color: var(--cn-muted);
  font-size: 0.72rem;
}

.side-pot-entry-breakdown > header > span {
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(101, 205, 176, 0.1);
  color: var(--cn-green);
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
}

.side-pot-ranking-how {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  margin: -4px 0 24px;
  padding: 12px;
  border: 1px solid var(--cn-line);
  border-radius: var(--cn-radius-md);
  background: var(--cn-surface-soft);
}

.side-pot-ranking-how > div {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: var(--cn-muted-strong);
}

.side-pot-ranking-how > div > span {
  display: grid;
  flex: 0 0 auto;
  width: 25px;
  height: 25px;
  place-items: center;
  border: 1px solid var(--cn-line-strong);
  border-radius: 50%;
  font-size: 0.66rem;
}

.side-pot-ranking-how > div.active > span {
  border-color: var(--cn-blue-bright);
  background: var(--cn-blue-bright);
  color: var(--cn-blue-ink);
}

.side-pot-ranking-how strong {
  overflow: hidden;
  font-size: 0.72rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.side-pot-ranking-how > b {
  color: var(--cn-muted);
  font-weight: 500;
}

.side-pot-showdown-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
  align-items: start;
  gap: 16px;
}

.side-pot-ranking-workbench,
.side-pot-decision-board {
  padding: 17px;
  border: 1px solid var(--cn-line);
  border-radius: var(--cn-radius-md);
  background: rgba(5, 8, 12, 0.22);
}

.side-pot-ranking-workbench > header,
.side-pot-decision-board > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.side-pot-ranking-workbench > header > div,
.side-pot-decision-board > header > div {
  display: grid;
  gap: 2px;
}

.side-pot-ranking-workbench > header span,
.side-pot-decision-board > header > div > span,
.side-pot-active-rank > div:last-child > small {
  color: var(--cn-blue-bright);
  font-size: 0.62rem;
  font-weight: 850;
  letter-spacing: 0.1em;
}

.side-pot-ranking-workbench > header h3,
.side-pot-decision-board > header h3 {
  margin: 0;
  color: var(--cn-text);
  font-size: 1rem;
}

.side-pot-ranking-workbench > header > small {
  padding: 4px 7px;
  border-radius: 999px;
  background: var(--cn-surface-soft);
  color: var(--cn-muted);
  font-size: 0.63rem;
}

.side-pot-active-rank {
  display: flex;
  align-items: center;
  gap: 13px;
  margin: 4px 0 12px;
  padding: 13px;
  border: 1px solid rgba(var(--theme-accent-bright-rgb), 0.36);
  border-radius: var(--cn-radius-sm);
  background: rgba(var(--theme-accent-rgb), 0.09);
  box-shadow: inset 3px 0 0 var(--cn-blue-bright);
}

.side-pot-active-rank-number {
  display: grid;
  flex: 0 0 auto;
  justify-items: center;
}

.side-pot-active-rank-number > span {
  color: var(--cn-text);
  font-size: 1.6rem;
  font-weight: 850;
  line-height: 1;
}

.side-pot-active-rank-number > small {
  color: var(--cn-muted);
  font-size: 0.52rem;
  font-weight: 800;
}

.side-pot-active-rank > div:last-child {
  display: grid;
  gap: 2px;
}

.side-pot-active-rank h3 {
  margin: 0;
  color: var(--cn-text);
  font-size: 0.95rem;
}

.side-pot-hand-picker button > span:last-child {
  display: grid;
  flex: 1 1 0;
  width: auto;
  height: auto;
  min-width: 0;
  overflow: hidden;
  align-content: center;
  place-items: initial;
  border: 0;
  border-radius: 0;
  color: inherit;
}

.side-pot-hand-picker button > span:last-child > strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.side-pot-hand-picker button > span:last-child > small {
  display: -webkit-box;
  overflow: hidden;
  color: var(--cn-muted);
  font-size: 0.62rem;
  font-weight: 600;
  line-height: 1.3;
  overflow-wrap: anywhere;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.side-pot-decision-board > header > span {
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 850;
  text-transform: uppercase;
}

.side-pot-decision-board > header > span.waiting {
  background: rgba(210, 179, 111, 0.11);
  color: var(--cn-gold-bright);
}

.side-pot-decision-board > header > span.ready {
  background: rgba(101, 205, 176, 0.11);
  color: var(--cn-green);
}

.side-pot-decision-board > p {
  margin: -4px 0 13px;
  color: var(--cn-muted);
  font-size: 0.7rem;
  line-height: 1.45;
}

.side-pot-decision-list {
  display: grid;
  gap: 8px;
}

.side-pot-decision-list article {
  overflow: hidden;
  padding: 11px;
  border: 1px solid var(--cn-line);
  border-radius: var(--cn-radius-sm);
  background: var(--cn-surface-soft);
}

.side-pot-decision-list article.waiting {
  border-color: rgba(210, 179, 111, 0.3);
  box-shadow: inset 3px 0 0 var(--cn-gold);
}

.side-pot-decision-list article.resolved {
  border-color: rgba(101, 205, 176, 0.25);
  box-shadow: inset 3px 0 0 var(--cn-green);
}

.side-pot-decision-title,
.side-pot-decision-eligible,
.side-pot-decision-outcome {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
}

.side-pot-decision-title > span:first-child {
  display: grid;
}

.side-pot-decision-title small,
.side-pot-decision-eligible small,
.side-pot-decision-outcome small {
  color: var(--cn-muted);
  font-size: 0.6rem;
}

.side-pot-decision-title > span:last-child {
  color: var(--cn-muted-strong);
  font-size: 0.61rem;
  font-weight: 800;
}

.side-pot-decision-list article.waiting .side-pot-decision-title > span:last-child {
  color: var(--cn-gold-bright);
}

.side-pot-decision-list article.resolved .side-pot-decision-title > span:last-child {
  color: var(--cn-green);
}

.side-pot-decision-eligible {
  margin-top: 7px;
  padding-top: 7px;
  border-top: 1px solid var(--cn-line);
}

.side-pot-decision-eligible > span {
  overflow: hidden;
  color: var(--cn-muted-strong);
  font-size: 0.63rem;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.side-pot-decision-outcome {
  align-items: flex-end;
  margin-top: 7px;
}

.side-pot-decision-outcome > small {
  max-width: 60%;
  line-height: 1.3;
}

.side-pot-decision-outcome > strong {
  color: var(--cn-text);
  font-size: 0.72rem;
  text-align: right;
}

.side-pot-ranking-stopped {
  margin: -4px 0 18px;
  padding: 12px 14px;
  border: 1px solid rgba(var(--theme-accent-rgb), 0.2);
  border-radius: var(--cn-radius-sm);
  background: rgba(var(--theme-accent-rgb), 0.055);
}

.side-pot-ranking-stopped strong {
  color: var(--cn-text);
  font-size: 0.78rem;
}

.side-pot-ranking-stopped p {
  margin: 3px 0 0;
  color: var(--cn-muted);
  font-size: 0.72rem;
  line-height: 1.45;
}

.side-pot-result-step > .side-pot-ranking-complete {
  margin-bottom: 12px;
}

.side-pot-result-step > .side-pot-ranking-complete + .side-pot-ranking-stopped {
  margin-top: 0;
}

:root[data-theme-mode="light"] .side-pot-simple-card {
  background: linear-gradient(155deg, #ffffff, #f8fafc);
}

:root[data-theme-mode="light"] .side-pot-status-toggle {
  background: var(--cn-bg);
}

@media (max-width: 760px) {
  .side-pot-simple-hero {
    align-items: flex-start;
  }

  .side-pot-simple-clock {
    min-width: 130px;
  }

  .side-pot-wizard-nav {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .side-pot-simple-steps {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  .side-pot-wizard-direction {
    grid-row: 2;
    width: 100%;
    min-width: 0;
  }

  .side-pot-wizard-direction.previous {
    grid-column: 1;
  }

  .side-pot-wizard-direction.next {
    grid-column: 2;
  }

  .side-pot-simple-step {
    padding-inline: 4px;
  }

  .side-pot-simple-step:not(:last-child)::after {
    display: none;
  }

  .side-pot-simple-step strong {
    display: none;
  }

  .side-pot-simple-card {
    padding: 24px 18px;
  }

  .side-pot-player-picker {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .side-pot-simple-player {
    grid-template-columns: 1fr 36px;
    gap: 10px;
  }

  .side-pot-simple-player-name {
    grid-column: 1;
  }

  .side-pot-remove-player {
    grid-column: 2;
    grid-row: 1;
  }

  .side-pot-status-toggle,
  .side-pot-simple-amount {
    grid-column: 1 / -1;
  }

  .side-pot-simple-amount input {
    text-align: left;
  }

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

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

@media (max-width: 520px) {
  .side-pot-simple-hero p {
    display: none;
  }

  .side-pot-simple-clock {
    min-width: 108px;
    padding: 8px 10px;
  }

  .side-pot-simple-clock strong {
    font-size: 1.25rem;
  }

  .side-pot-player-picker,
  .side-pot-hand-picker {
    grid-template-columns: 1fr;
  }

  .side-pot-selected-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .side-pot-live-summary {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }

  .side-pot-live-summary > span + span {
    border-left: 1px solid var(--cn-line);
  }

  .side-pot-live-summary > span:nth-child(3) {
    grid-column: 1 / -1;
    border-top: 1px solid var(--cn-line);
    border-left: 0;
  }

  .side-pot-primary-actions.split,
  .side-pot-result-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .side-pot-primary-actions button,
  .side-pot-primary-actions button.primary,
  .side-pot-result-actions button,
  .side-pot-result-actions button.primary {
    width: 100%;
    min-width: 0;
    grid-column: 1;
  }

  .side-pot-ranking-list > div {
    grid-template-columns: 32px 1fr;
  }

  .side-pot-ranking-list small {
    display: none;
  }

  .side-pot-result-pots > div {
    grid-template-columns: 1fr auto;
  }

  .side-pot-result-pots .arrow {
    display: none;
  }

  .side-pot-result-pots > div > strong:last-child {
    grid-column: 2;
    grid-row: 1;
  }

  .side-pot-receipts,
  .side-pot-odd-chip > div {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .side-pot-showdown-grid {
    grid-template-columns: 1fr;
  }

  .side-pot-decision-board {
    order: -1;
  }
}

@media (max-width: 620px) {
  .side-pot-ranking-how {
    grid-template-columns: 1fr;
  }

  .side-pot-ranking-how > b {
    display: none;
  }

  .side-pot-ranking-how > div:not(.active) {
    padding-left: 3px;
  }

  .side-pot-entry-breakdown > header {
    flex-direction: column;
    gap: 8px;
  }
}

/* --------------------------------------------------------------------------
   Light theme — purpose-built visual system
   -------------------------------------------------------------------------- */

:root[data-theme-mode="light"] {
  --cn-bg: #e6edf3;
  --cn-bg-deep: #d9e3eb;
  --cn-surface: #f5f9fc;
  --cn-surface-raised: #fafdff;
  --cn-surface-soft: rgba(30, 47, 65, 0.065);
  --cn-surface-hover: rgba(30, 47, 65, 0.1);
  --cn-control: #eaf0f4;
  --cn-control-hover: #e1e9ef;
  --cn-topbar: rgba(246, 250, 253, 0.985);
  --cn-overlay: #f7fafc;
  --cn-line: rgba(20, 37, 55, 0.16);
  --cn-line-strong: rgba(20, 37, 55, 0.25);
  --cn-text: #101b29;
  --cn-text-cool: #1d2c3d;
  --cn-muted: #5f6f82;
  --cn-muted-strong: #405267;
  --cn-shadow-sm: 0 2px 5px rgba(25, 42, 60, 0.08), 0 8px 22px rgba(25, 42, 60, 0.055);
  --cn-shadow-md: 0 2px 5px rgba(25, 42, 60, 0.08), 0 14px 34px rgba(25, 42, 60, 0.075);
  --cn-shadow-lg: 0 3px 8px rgba(25, 42, 60, 0.09), 0 24px 58px rgba(25, 42, 60, 0.1);
  --cn-inner: inset 0 1px 0 rgba(255, 255, 255, 0.9);
  --cn-surface-gradient:
    radial-gradient(circle at 90% 0, rgba(var(--theme-accent-rgb), 0.05), transparent 19rem),
    linear-gradient(145deg, #fbfdff 0%, #f3f7fa 46%, #e9f0f5 100%);
  --cn-raised-gradient:
    radial-gradient(circle at 92% 0, rgba(255, 255, 255, 0.72), transparent 9rem),
    linear-gradient(145deg, #fbfdff 0%, #f3f7fa 52%, #e7eef3 100%);
  --cn-inset-gradient: linear-gradient(145deg, #eef4f7 0%, #e4ecf2 100%);
  --cn-track-gradient: linear-gradient(180deg, #dce4eb 0%, #e8eef3 10%, #eef3f6 58%, #dfe7ed 100%);
  --theme-action-fill: color-mix(in srgb, var(--theme-accent) 58%, #132338);
  --theme-action-fill-hover: color-mix(in srgb, var(--theme-accent) 66%, #132338);
  --theme-action-border: color-mix(in srgb, var(--theme-accent) 72%, #132338);
}

:root[data-theme-mode="light"] html,
:root[data-theme-mode="light"] body,
:root[data-theme-mode="light"] body.projector-mode {
  background:
    radial-gradient(ellipse at 10% -8%, rgba(111, 151, 184, 0.16), transparent 34rem),
    radial-gradient(circle at 92% -12%, rgba(var(--theme-accent-rgb), 0.07), transparent 36rem),
    radial-gradient(ellipse at 78% 108%, rgba(162, 190, 212, 0.2), transparent 42rem),
    linear-gradient(145deg, #eff5f8 0%, var(--cn-bg) 48%, var(--cn-bg-deep) 100%);
}

:root[data-theme-mode="light"] body::before {
  background:
    linear-gradient(115deg, transparent 0 36%, rgba(255, 255, 255, 0.2) 50%, transparent 64%),
    linear-gradient(90deg, transparent 0 49.97%, rgba(24, 42, 61, 0.018) 50%, transparent 50.03%);
  opacity: 0.52;
}

:root[data-theme-mode="light"] .topbar,
:root[data-theme-mode="light"] body.projector-mode .topbar {
  border-color: rgba(20, 37, 55, 0.16);
  background: linear-gradient(145deg, rgba(251, 253, 255, 0.99), rgba(237, 244, 248, 0.98));
  box-shadow: 0 1px 2px rgba(25, 42, 60, 0.07), 0 8px 24px rgba(25, 42, 60, 0.055);
}

:root[data-theme-mode="light"] .nav-tabs {
  border-color: rgba(20, 37, 55, 0.14);
  background: #e9eef3;
  box-shadow: inset 0 1px 2px rgba(25, 42, 60, 0.06);
}

:root[data-theme-mode="light"] .tab-button:hover {
  background: #e8edf2;
}

:root[data-theme-mode="light"] .tab-button.active {
  background: #172331;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(23, 35, 49, 0.18);
}

:root[data-theme-mode="light"] .theme-picker > summary {
  border-color: rgba(var(--theme-accent-rgb), 0.34);
  background: rgba(var(--theme-accent-rgb), 0.1);
  color: var(--cn-text-cool);
  box-shadow: none;
}

:root[data-theme-mode="light"] .theme-picker > summary:hover,
:root[data-theme-mode="light"] .theme-picker[open] > summary {
  border-color: rgba(var(--theme-accent-rgb), 0.38);
  background: rgba(var(--theme-accent-rgb), 0.11);
}

:root[data-theme-mode="light"] .theme-popover {
  border-color: rgba(20, 37, 55, 0.18);
  background: var(--cn-surface-gradient);
  box-shadow: 0 4px 12px rgba(25, 42, 60, 0.1), 0 24px 54px rgba(25, 42, 60, 0.14);
}

:root[data-theme-mode="light"] .theme-mode-options {
  border-color: rgba(24, 42, 61, 0.08);
  background: #eef2f5;
}

:root[data-theme-mode="light"] .theme-mode-options button.active {
  border-color: rgba(var(--theme-accent-rgb), 0.24);
  background: var(--cn-raised-gradient);
  color: var(--cn-text);
  box-shadow: 0 3px 10px rgba(31, 48, 66, 0.08);
}

:root[data-theme-mode="light"] button:not(.primary):not(.danger):not(.theme-color-swatch):not(.tab-button):not(.timeline-cursor):not([data-theme-mode-option]):not([data-status]):not([data-action="toggle-side-pot-rank"]):not(:disabled) {
  border-color: rgba(20, 37, 55, 0.18);
  background: #f3f6f8;
  color: var(--cn-text-cool);
  box-shadow: none;
}

:root[data-theme-mode="light"] button:not(.primary):not(.danger):not(.theme-color-swatch):not(.tab-button):not(.timeline-cursor):not([data-theme-mode-option]):not([data-status]):not([data-action="toggle-side-pot-rank"]):not(:disabled):hover {
  border-color: rgba(var(--theme-accent-rgb), 0.32);
  background: rgba(var(--theme-accent-rgb), 0.07);
}

:root[data-theme-mode="light"] button.primary,
:root[data-theme-mode="light"] .primary {
  border-color: var(--theme-action-border);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.16), transparent 52%),
    var(--theme-action-fill);
  color: #ffffff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    0 2px 4px rgba(25, 42, 60, 0.14),
    0 8px 18px rgba(var(--theme-accent-rgb), 0.16);
}

:root[data-theme-mode="light"] button.primary:hover,
:root[data-theme-mode="light"] .primary:hover {
  border-color: var(--theme-action-border);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.2), transparent 52%),
    var(--theme-action-fill-hover);
  color: #ffffff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.34),
    0 3px 6px rgba(25, 42, 60, 0.15),
    0 10px 22px rgba(var(--theme-accent-rgb), 0.2);
}

:root[data-theme-mode="light"] button.danger,
:root[data-theme-mode="light"] .danger {
  border-color: #d9a2a7;
  background: linear-gradient(180deg, #fffafa, #f8ebec);
  color: #96343d;
  box-shadow: inset 0 1px 0 #ffffff, 0 2px 5px rgba(107, 34, 42, 0.07);
}

:root[data-theme-mode="light"] button.danger:hover,
:root[data-theme-mode="light"] .danger:hover {
  border-color: #c98289;
  background: linear-gradient(180deg, #fff7f7, #f4dfe1);
  color: #7f2630;
  box-shadow: inset 0 1px 0 #ffffff, 0 5px 12px rgba(107, 34, 42, 0.1);
}

:root[data-theme-mode="light"] button:disabled,
:root[data-theme-mode="light"] button.primary:disabled,
:root[data-theme-mode="light"] button.danger:disabled {
  opacity: 1;
  border-color: #d5dce3;
  background: linear-gradient(180deg, #f7f8f9, #edf0f3);
  color: #98a3ae;
  box-shadow: inset 0 1px 0 #ffffff;
  filter: none;
}

:root[data-theme-mode="light"] :is(input, select, textarea) {
  border-color: rgba(20, 37, 55, 0.2);
  background: #f0f3f6;
  color: var(--cn-text);
  box-shadow: inset 0 1px 2px rgba(31, 48, 66, 0.035);
}

:root[data-theme-mode="light"] :is(input, select, textarea):hover {
  border-color: rgba(24, 42, 61, 0.22);
  background: #ffffff;
}

:root[data-theme-mode="light"] :is(input, select, textarea):focus {
  border-color: rgba(var(--theme-accent-rgb), 0.56);
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(var(--theme-accent-rgb), 0.1);
}

:root[data-theme-mode="light"] .badge {
  border-color: rgba(20, 37, 55, 0.2);
  background: #eef2f5;
  color: #405267;
}

:root[data-theme-mode="light"] .badge.blue {
  border-color: rgba(var(--theme-accent-rgb), 0.42);
  background: rgba(var(--theme-accent-rgb), 0.14);
  color: var(--theme-accent-dark);
}

:root[data-theme-mode="light"] .badge.gold {
  border-color: rgba(154, 111, 22, 0.34);
  background: rgba(205, 158, 52, 0.13);
  color: #6f4f0d;
}

/* Light dialogs */

:root[data-theme-mode="light"] .modal {
  background: rgba(35, 52, 69, 0.34);
  backdrop-filter: blur(20px) saturate(0.82);
  -webkit-backdrop-filter: blur(20px) saturate(0.82);
}

:root[data-theme-mode="light"] .modal-card {
  border-color: rgba(20, 37, 55, 0.22);
  background:
    radial-gradient(circle at 92% 0, rgba(var(--theme-accent-rgb), 0.07), transparent 18rem),
    linear-gradient(145deg, #fbfdff 0%, #f2f7fa 52%, #e8f0f5 100%);
  color: var(--cn-text);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    0 4px 12px rgba(25, 42, 60, 0.15),
    0 30px 80px rgba(25, 42, 60, 0.24);
}

:root[data-theme-mode="light"] .modal-card .panel-header {
  border-bottom-color: rgba(20, 37, 55, 0.13);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.58), rgba(225, 235, 242, 0.52));
}

:root[data-theme-mode="light"] .reset-confirmation-card {
  border-color: rgba(122, 50, 58, 0.24);
  background:
    radial-gradient(circle at 8% 5%, rgba(184, 67, 78, 0.11), transparent 16rem),
    radial-gradient(circle at 94% 0, rgba(var(--theme-accent-rgb), 0.055), transparent 18rem),
    linear-gradient(145deg, #fbfdff 0%, #f3f7fa 50%, #e9f0f5 100%);
}

:root[data-theme-mode="light"] .reset-confirmation-icon {
  border-color: rgba(159, 51, 62, 0.38);
  background: linear-gradient(145deg, #fff4f4 0%, #f4dfe2 100%);
  color: #982f3a;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.94),
    0 5px 14px rgba(122, 50, 58, 0.11);
}

:root[data-theme-mode="light"] .reset-confirmation-eyebrow {
  color: #92313b;
}

:root[data-theme-mode="light"] .reset-confirmation-copy h2 {
  color: #132131;
}

:root[data-theme-mode="light"] .reset-confirmation-copy p {
  color: #4f6175;
}

:root[data-theme-mode="light"] .reset-confirmation-actions {
  padding-top: 17px;
  border-top: 1px solid rgba(20, 37, 55, 0.11);
}

:root[data-theme-mode="light"] .reset-confirmation-actions button:not(.danger) {
  border-color: rgba(20, 37, 55, 0.2);
  background: var(--cn-raised-gradient);
  color: #27394c;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82), 0 2px 5px rgba(25, 42, 60, 0.06);
}

:root[data-theme-mode="light"] .player-entry-card {
  border-color: rgba(var(--theme-accent-rgb), 0.28);
  background:
    radial-gradient(circle at 8% 5%, rgba(var(--theme-accent-rgb), 0.12), transparent 16rem),
    radial-gradient(circle at 94% 0, rgba(var(--theme-accent-rgb), 0.055), transparent 18rem),
    linear-gradient(145deg, #fbfdff 0%, #f3f7fa 50%, #e9f0f5 100%);
}

:root[data-theme-mode="light"] .player-entry-icon {
  border-color: rgba(var(--theme-accent-rgb), 0.42);
  background: rgba(var(--theme-accent-rgb), 0.12);
  color: var(--theme-accent-dark);
}

:root[data-theme-mode="light"] .player-entry-eyebrow,
:root[data-theme-mode="light"] .player-entry-field {
  color: var(--theme-accent-dark);
}

:root[data-theme-mode="light"] .player-entry-field input {
  border-color: rgba(20, 37, 55, 0.18);
  background: rgba(255, 255, 255, 0.78);
  color: #132131;
}

:root button:focus-visible,
:root .icon-button:focus-visible,
:root .tab-button:focus-visible {
  outline-color: rgba(var(--theme-accent-rgb), 0.72) !important;
}

/* Setup */

:root[data-theme-mode="light"] #setupView .setup-grid > .panel,
:root[data-theme-mode="light"] #setupView .setup-grid > .panel:first-child,
:root[data-theme-mode="light"] #setupView .setup-grid > .panel:nth-child(2),
:root[data-theme-mode="light"] .stack-panel,
:root[data-theme-mode="light"] .prize-pool-panel {
  border-color: rgba(20, 37, 55, 0.15);
  background: var(--cn-surface-gradient);
  box-shadow: var(--cn-shadow-md);
}

:root[data-theme-mode="light"] :is(
  .setup-concept,
  .allocation-card,
  .remaining-stock,
  .chip-card,
  .prize-editor-controls,
  .payout-editor-row,
  .structure-preview-row,
  details.setup-details
) {
  border-color: rgba(20, 37, 55, 0.15);
  background: var(--cn-inset-gradient);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.62);
}

:root[data-theme-mode="light"] .setup-action-dock {
  border-color: rgba(20, 37, 55, 0.16);
  background: var(--cn-surface-gradient);
  box-shadow: var(--cn-shadow-sm);
}

:root[data-theme-mode="light"] .setup-action-buttons button {
  font-weight: 760;
}

:root[data-theme-mode="light"] .stack-summary .primary-allocation,
:root[data-theme-mode="light"] .stack-summary .reentry-allocation {
  border-color: rgba(20, 37, 55, 0.16);
  background:
    radial-gradient(circle at 96% 0, rgba(var(--theme-accent-rgb), 0.075), transparent 15rem),
    var(--cn-surface-gradient);
}

:root[data-theme-mode="light"] .allocation-key-metric {
  border-color: rgba(20, 37, 55, 0.17);
  background: var(--cn-raised-gradient);
  box-shadow:
    inset 0 1px 0 #ffffff,
    0 2px 5px rgba(25, 42, 60, 0.055);
}

:root[data-theme-mode="light"] .allocation-key-metric.bb-metric {
  border-color: rgba(var(--theme-accent-rgb), 0.24);
  background:
    radial-gradient(circle at 100% 0, rgba(var(--theme-accent-rgb), 0.1), transparent 9rem),
    var(--cn-raised-gradient);
  box-shadow:
    inset 3px 0 0 rgba(var(--theme-accent-rgb), 0.5),
    inset 0 1px 0 #ffffff,
    0 2px 5px rgba(25, 42, 60, 0.06);
}

:root[data-theme-mode="light"] .allocation-key-metric span {
  color: #52657a;
}

:root[data-theme-mode="light"] .allocation-key-metric strong,
:root[data-theme-mode="light"] .allocation-key-metric.bb-metric strong {
  color: #17283a;
  font-weight: 820;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.9);
}

:root[data-theme-mode="light"] .reentry-allocation .allocation-key-metric.bb-metric strong {
  color: var(--theme-accent-dark);
  font-weight: 820;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.9);
}

:root[data-theme-mode="light"] .allocation-key-metric small {
  color: #52657a;
  font-weight: 680;
}

:root[data-theme-mode="light"] .remaining-stock {
  opacity: 1;
}

:root[data-theme-mode="light"] .setup-table-zone {
  border-color: rgba(20, 37, 55, 0.15);
  background:
    radial-gradient(circle at 50% 50%, rgba(var(--theme-accent-rgb), 0.075), transparent 26rem),
    radial-gradient(circle at 8% 0, rgba(255, 255, 255, 0.64), transparent 24rem),
    linear-gradient(145deg, #edf4f8 0%, #e3ebf1 100%);
}

:root[data-theme-mode="light"] .player-seat {
  border-color: rgba(20, 37, 55, 0.2);
  background: var(--cn-raised-gradient);
  box-shadow: 0 2px 5px rgba(25, 42, 60, 0.11), 0 10px 24px rgba(25, 42, 60, 0.09);
}

:root[data-theme-mode="light"] .poker-table-content {
  border-color: rgba(24, 42, 61, 0.12);
  background: var(--cn-surface-gradient);
  box-shadow: 0 10px 24px rgba(31, 48, 66, 0.13);
}

:root[data-theme-mode="light"] .poker-table-art-dark {
  display: none;
}

:root[data-theme-mode="light"] .poker-table-art-light {
  display: block;
  filter:
    saturate(0.82)
    contrast(1.03)
    brightness(1.03)
    drop-shadow(0 20px 24px rgba(31, 48, 66, 0.22));
}

:root[data-theme-mode="light"] .prize-pool-hero {
  border-color: rgba(var(--theme-accent-rgb), 0.15);
  background:
    radial-gradient(circle at 18% 10%, rgba(var(--theme-accent-rgb), 0.08), transparent 18rem),
    linear-gradient(145deg, #f9fcfe 0%, #edf3f7 100%);
}

:root[data-theme-mode="light"] .prize-pool-hero strong {
  color: #825b12;
  font-weight: 820;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.9);
}

/* Display */

:root[data-theme-mode="light"] #controlView .control-grid {
  gap: clamp(12px, 1vw, 18px);
}

:root[data-theme-mode="light"] #controlView .hero-clock,
:root[data-theme-mode="light"] #controlView .projection-table,
:root[data-theme-mode="light"] #controlView .tournament-timeline {
  border: 1px solid rgba(20, 37, 55, 0.18);
  background: var(--cn-surface-gradient);
  box-shadow: var(--cn-shadow-md);
}

:root[data-theme-mode="light"] #controlView .hero-clock {
  background:
    radial-gradient(circle at 50% 10%, rgba(var(--theme-accent-rgb), 0.11), transparent 22rem),
    linear-gradient(145deg, #f9fcfe 0%, #edf3f7 100%);
}

:root[data-theme-mode="light"] #controlView .hero-clock::before {
  background:
    linear-gradient(115deg, transparent 24%, rgba(var(--theme-accent-rgb), 0.025) 50%, transparent 76%);
}

:root[data-theme-mode="light"] #controlView .timer {
  color: #111d2a;
  text-shadow: 0 10px 28px rgba(31, 48, 66, 0.11);
}

:root[data-theme-mode="light"] #controlView .level-title {
  color: #526377;
}

:root[data-theme-mode="light"] #controlView .blind-box {
  border-color: rgba(20, 37, 55, 0.18);
  background: var(--cn-raised-gradient);
  box-shadow: inset 0 1px 0 #ffffff, 0 2px 6px rgba(25, 42, 60, 0.06);
}

:root[data-theme-mode="light"] #controlView .blind-box::before {
  color: rgba(24, 42, 61, 0.13);
}

:root[data-theme-mode="light"] #controlView .display-join-card {
  border-color: rgba(var(--theme-accent-rgb), 0.25);
  background:
    radial-gradient(circle at 50% 12%, rgba(var(--theme-accent-rgb), 0.11), transparent 7rem),
    var(--cn-raised-gradient);
  box-shadow: inset 0 1px 0 #ffffff, 0 2px 6px rgba(25, 42, 60, 0.07);
}

:root[data-theme-mode="light"] #controlView .display-join-kicker {
  color: var(--theme-accent-dark);
}

:root[data-theme-mode="light"] #controlView .display-join-code {
  color: #1b2c3c;
}

:root[data-theme-mode="light"] #controlView .reentry-banner {
  border-color: rgba(35, 132, 98, 0.3);
  background: rgba(35, 151, 109, 0.1);
  color: #17684f;
}

:root[data-theme-mode="light"] #controlView .progress-wrap {
  opacity: 1;
}

:root[data-theme-mode="light"] #controlView .progress-label {
  color: #4d5f73;
  font-weight: 790;
}

:root[data-theme-mode="light"] #controlView .progress {
  background: rgba(20, 37, 55, 0.16);
}

:root[data-theme-mode="light"] #controlView .display-control-bar {
  opacity: 0.72;
  border-color: rgba(20, 37, 55, 0.15);
  background: var(--cn-inset-gradient);
}

:root[data-theme-mode="light"] #controlView .hero-clock:hover .display-control-bar,
:root[data-theme-mode="light"] #controlView .hero-clock:focus-within .display-control-bar {
  opacity: 1;
  background: var(--cn-raised-gradient);
  box-shadow: 0 6px 18px rgba(31, 48, 66, 0.08);
}

:root[data-theme-mode="light"] #controlView .icon-button:hover:not(:disabled),
:root[data-theme-mode="light"] #controlView .icon-button:focus-visible:not(:disabled) {
  color: var(--cn-text);
  box-shadow: 0 8px 20px rgba(31, 48, 66, 0.1), 0 0 0 3px rgba(var(--theme-accent-rgb), 0.08);
}

:root[data-theme-mode="light"] #controlView .projection-table {
  background:
    radial-gradient(circle at 50% 48%, rgba(var(--theme-accent-rgb), 0.075), transparent 30rem),
    radial-gradient(circle at 8% 0, rgba(255, 255, 255, 0.6), transparent 26rem),
    linear-gradient(145deg, #f1f6f9 0%, #e4ebf1 100%);
}

:root[data-theme-mode="light"] #controlView .projection-table::before {
  display: none;
}

:root[data-theme-mode="light"] #controlView .live-table .player-seat {
  border-color: rgba(20, 37, 55, 0.22);
  background: var(--cn-raised-gradient);
  box-shadow: 0 2px 6px rgba(25, 42, 60, 0.13), 0 12px 26px rgba(25, 42, 60, 0.1);
}

:root[data-theme-mode="light"] #controlView .live-table .player-seat-name {
  color: #172331;
}

:root[data-theme-mode="light"] #controlView .live-table .player-seat-money {
  color: #825b12;
}

:root[data-theme-mode="light"] #controlView .live-table .poker-table-content {
  background: var(--cn-surface-gradient);
}

:root[data-theme-mode="light"] #controlView details.display-secondary > summary,
:root[data-theme-mode="light"] #controlView details.display-secondary[open] {
  border-color: rgba(20, 37, 55, 0.2);
  background: var(--cn-surface-gradient);
  color: var(--cn-muted-strong);
  box-shadow: 0 6px 18px rgba(31, 48, 66, 0.1);
}

:root[data-theme-mode="light"] #controlView .tournament-timeline {
  background:
    radial-gradient(ellipse 22% 82% at var(--timeline-progress, 0%) 58%, rgba(var(--theme-accent-rgb), 0.1), transparent 72%),
    radial-gradient(circle at 92% 0, rgba(255, 255, 255, 0.56), transparent 22rem),
    linear-gradient(145deg, #f9fcfe 0%, #f1f6f9 50%, #e7eef4 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.96),
    0 2px 5px rgba(25, 42, 60, 0.1),
    0 18px 38px rgba(25, 42, 60, 0.09);
}

:root[data-theme-mode="light"] #controlView .timeline-title strong {
  color: #1c2a3a;
}

:root[data-theme-mode="light"] #controlView :is(.timeline-title span, .timeline-summary) {
  color: #586a7f;
}

:root[data-theme-mode="light"] #controlView .timeline-track {
  border-color: rgba(20, 37, 55, 0.22);
  background: var(--cn-track-gradient);
  box-shadow:
    inset 0 2px 5px rgba(25, 42, 60, 0.15),
    inset 0 -1px 0 rgba(255, 255, 255, 0.92),
    0 1px 0 #ffffff;
}

:root[data-theme-mode="light"] #controlView .timeline-level {
  border-right-color: rgba(20, 37, 55, 0.16);
  background:
    linear-gradient(180deg, rgba(250, 252, 254, 0.9) 0%, rgba(241, 246, 249, 0.82) 48%, rgba(229, 237, 243, 0.78) 100%);
  color: #42556a;
  box-shadow:
    inset 1px 0 0 rgba(255, 255, 255, 0.58),
    inset 0 1px 0 rgba(255, 255, 255, 0.84),
    inset 0 -1px 0 rgba(20, 37, 55, 0.08);
}

:root[data-theme-mode="light"] #controlView .timeline-level.past {
  background:
    radial-gradient(circle at 50% 14%, rgba(255, 255, 255, 0.34), transparent 60%),
    linear-gradient(180deg, rgba(var(--theme-accent-rgb), 0.14), rgba(var(--theme-accent-rgb), 0.065));
  color: #33475d;
  box-shadow:
    inset 1px 0 0 rgba(255, 255, 255, 0.46),
    inset 0 1px 0 rgba(255, 255, 255, 0.62),
    inset 0 -3px 0 rgba(var(--theme-accent-rgb), 0.2);
}

:root[data-theme-mode="light"] #controlView .timeline-level.current {
  background:
    radial-gradient(ellipse 88% 62% at 50% 12%, rgba(255, 255, 255, 0.64), transparent 68%),
    radial-gradient(circle at 50% 66%, rgba(var(--theme-accent-rgb), 0.2), transparent 74%),
    linear-gradient(180deg, rgba(var(--theme-accent-rgb), 0.34), rgba(var(--theme-accent-rgb), 0.16));
  color: #101b29;
  box-shadow:
    inset 0 0 0 2px rgba(var(--theme-accent-rgb), 0.72),
    inset 0 2px 0 rgba(255, 255, 255, 0.72),
    inset 0 -5px 0 var(--theme-accent),
    0 7px 18px rgba(var(--theme-accent-rgb), 0.2);
}

:root[data-theme-mode="light"] #controlView .timeline-level.next {
  background:
    radial-gradient(ellipse 78% 56% at 50% 8%, rgba(var(--theme-accent-rgb), 0.035), transparent 72%),
    var(--cn-raised-gradient);
  color: #1f3348;
  box-shadow:
    inset 0 0 0 2px rgba(var(--theme-accent-rgb), 0.24),
    inset 0 2px 0 rgba(255, 255, 255, 0.9),
    0 7px 18px rgba(25, 42, 60, 0.1);
}

:root[data-theme-mode="light"] #controlView .timeline-level.current::before,
:root[data-theme-mode="light"] #controlView .timeline-level.next::before {
  border: 1px solid rgba(var(--theme-accent-rgb), 0.16);
  background: rgba(255, 255, 255, 0.94);
  color: var(--theme-accent-dark);
  box-shadow: inset 0 1px 0 #ffffff, 0 3px 9px rgba(25, 42, 60, 0.13);
}

:root[data-theme-mode="light"] #controlView .timeline-level :is(strong, span, small, .timeline-level-start),
:root[data-theme-mode="light"] #controlView .timeline-level.current :is(strong, span, small, .timeline-level-start),
:root[data-theme-mode="light"] #controlView .timeline-level.next :is(strong, span, small, .timeline-level-start) {
  color: inherit;
  text-shadow: none;
}

:root[data-theme-mode="light"] #controlView .timeline-level.break {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.62), rgba(178, 132, 37, 0.08)),
    repeating-linear-gradient(135deg, rgba(160, 117, 28, 0.2) 0 6px, rgba(160, 117, 28, 0.055) 6px 12px);
  color: #735316;
  box-shadow:
    inset 1px 0 0 rgba(255, 255, 255, 0.62),
    inset -1px 0 0 rgba(114, 80, 12, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

:root[data-theme-mode="light"] #controlView .timeline-reentry-window {
  border-color: rgba(37, 139, 104, 0.42);
  border-right-color: rgba(24, 116, 84, 0.76);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.42), transparent 52%),
    linear-gradient(90deg, rgba(120, 211, 179, 0.56), rgba(91, 194, 157, 0.5));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    inset -2px 0 0 rgba(20, 111, 79, 0.24),
    0 4px 11px rgba(34, 91, 73, 0.14);
}

:root[data-theme-mode="light"] #controlView .timeline-reentry-window > span {
  color: #071a14;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.62);
}

:root[data-theme-mode="light"] #controlView .timeline-progress-fill {
  height: 4px;
  background: linear-gradient(90deg, var(--theme-accent-dark), var(--theme-accent));
  box-shadow: 0 -1px 0 rgba(255, 255, 255, 0.58), 0 0 8px rgba(var(--theme-accent-rgb), 0.22);
}

:root[data-theme-mode="light"] #controlView button.timeline-cursor,
:root[data-theme-mode="light"] #controlView button.timeline-cursor:hover,
:root[data-theme-mode="light"] #controlView button.timeline-cursor:focus-visible,
:root[data-theme-mode="light"] #controlView button.timeline-cursor:active,
:root[data-theme-mode="light"] #controlView button.timeline-cursor.dragging {
  border: 0;
  background: transparent;
  box-shadow: none;
}

:root[data-theme-mode="light"] #controlView .timeline-cursor::after {
  width: 2px;
  background: var(--theme-accent-dark);
  box-shadow: none;
}

:root[data-theme-mode="light"] #controlView .timeline-cursor::before {
  width: 17px;
  height: 17px;
  border: 3px solid #ffffff;
  background: var(--theme-accent-dark);
  box-shadow: 0 0 0 1px rgba(20, 37, 55, 0.72), 0 3px 8px rgba(25, 42, 60, 0.2);
}

:root[data-theme-mode="light"] #controlView .timeline-cursor:hover::before,
:root[data-theme-mode="light"] #controlView .timeline-cursor:focus-visible::before,
:root[data-theme-mode="light"] #controlView .timeline-cursor.dragging::before {
  background: var(--theme-accent);
  box-shadow: 0 0 0 1px rgba(20, 37, 55, 0.78), 0 0 0 5px rgba(var(--theme-accent-rgb), 0.18), 0 4px 10px rgba(25, 42, 60, 0.22);
}

/* Side Pots */

:root[data-theme-mode="light"] body.side-pot-mode .shell {
  color: var(--cn-text);
}

:root[data-theme-mode="light"] .side-pot-simple-card {
  border-color: rgba(20, 37, 55, 0.16);
  background: var(--cn-surface-gradient);
  box-shadow: var(--cn-shadow-md);
}

:root[data-theme-mode="light"] .side-pot-simple-clock {
  border-color: rgba(20, 37, 55, 0.17);
  background: var(--cn-raised-gradient);
}

:root[data-theme-mode="light"] .side-pot-player-picker button,
:root[data-theme-mode="light"] .side-pot-hand-picker button,
:root[data-theme-mode="light"] .side-pot-simple-player,
:root[data-theme-mode="light"] .side-pot-ranking-list > div,
:root[data-theme-mode="light"] .side-pot-receipts > div {
  border-color: rgba(20, 37, 55, 0.16);
  background: var(--cn-raised-gradient);
}

:root[data-theme-mode="light"] .side-pot-player-picker button.active,
:root[data-theme-mode="light"] .side-pot-hand-picker button.active {
  border-color: rgba(var(--theme-accent-rgb), 0.34);
  background: rgba(var(--theme-accent-rgb), 0.085);
}

:root[data-theme-mode="light"] .side-pot-status-toggle {
  border-color: rgba(24, 42, 61, 0.09);
  background: #eaf0f4;
}

:root[data-theme-mode="light"] .side-pot-status-toggle button.active {
  background: var(--cn-raised-gradient);
  box-shadow: 0 3px 9px rgba(31, 48, 66, 0.08);
}

/* Light Side Pot — dedicated high-contrast visual system */

:root[data-theme-mode="light"] body.side-pot-mode {
  --sp-surface: #f8fbfd;
  --sp-surface-raised: #ffffff;
  --sp-surface-soft: #edf3f7;
  --sp-line: #b7c5d1;
  --sp-line-soft: #ccd7df;
  --sp-text: #122131;
  --sp-muted: #526579;
  --sp-muted-strong: #344a60;
}

:root[data-theme-mode="light"] .side-pot-status-toggle {
  gap: 3px;
  padding: 4px;
  border-color: #b7c3cc;
  background: #e7edf1;
  box-shadow: inset 0 1px 2px rgba(28, 47, 66, 0.09);
}

:root[data-theme-mode="light"] .side-pot-status-toggle button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 74px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #526579;
  font-weight: 800;
  letter-spacing: 0.01em;
  text-shadow: none;
  transition:
    color 150ms var(--cn-ease),
    border-color 150ms var(--cn-ease),
    background 150ms var(--cn-ease),
    box-shadow 150ms var(--cn-ease),
    transform 150ms var(--cn-ease);
}

:root[data-theme-mode="light"] .side-pot-status-toggle button::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #8c9ba8;
  box-shadow: 0 0 0 2px rgba(140, 155, 168, 0.16);
  content: "";
}

:root[data-theme-mode="light"] .side-pot-status-toggle button:not(.active):hover {
  border-color: rgba(72, 94, 115, 0.2);
  background: rgba(255, 255, 255, 0.55);
  color: #263b50;
}

:root[data-theme-mode="light"] .side-pot-status-toggle button.active {
  transform: none;
}

:root[data-theme-mode="light"] .side-pot-status-toggle button[data-status="live"].active {
  border-color: rgba(var(--theme-accent-rgb), 0.58);
  background: rgba(var(--theme-accent-rgb), 0.17);
  color: var(--theme-accent-dark);
  box-shadow: inset 0 0 0 1px rgba(var(--theme-accent-rgb), 0.07);
}

:root[data-theme-mode="light"] .side-pot-status-toggle button[data-status="live"].active::before {
  background: var(--theme-accent-dark);
  box-shadow: 0 0 0 2px rgba(var(--theme-accent-rgb), 0.13);
}

:root[data-theme-mode="light"] .side-pot-status-toggle button[data-status="folded"].active {
  border-color: #98a5b0;
  background: #d2dae0;
  color: #2d4153;
  box-shadow: inset 0 0 0 1px rgba(58, 76, 93, 0.05);
}

:root[data-theme-mode="light"] .side-pot-status-toggle button[data-status="folded"].active::before {
  background: #5f7180;
  box-shadow: 0 0 0 2px rgba(95, 113, 128, 0.12);
}

:root[data-theme-mode="light"] .side-pot-simple-player.folded {
  border-color: #b5c0c8;
  background: linear-gradient(135deg, #f8fafb 0%, #edf1f4 100%);
  box-shadow: inset 3px 0 0 #8d9aa5;
}

:root[data-theme-mode="light"] .side-pot-simple-player.folded .side-pot-simple-player-name small {
  color: #566a7b;
  font-weight: 720;
}

:root[data-theme-mode="light"] .side-pot-simple-hero > div:first-child > span,
:root[data-theme-mode="light"] .side-pot-simple-heading > span,
:root[data-theme-mode="light"] .side-pot-ranking-workbench > header span,
:root[data-theme-mode="light"] .side-pot-decision-board > header > div > span,
:root[data-theme-mode="light"] .side-pot-active-rank > div:last-child > small {
  color: var(--theme-accent-dark);
}

:root[data-theme-mode="light"] .side-pot-simple-hero h1,
:root[data-theme-mode="light"] .side-pot-simple-heading h2,
:root[data-theme-mode="light"] .side-pot-ranking-workbench > header h3,
:root[data-theme-mode="light"] .side-pot-decision-board > header h3,
:root[data-theme-mode="light"] .side-pot-active-rank h3 {
  color: var(--sp-text);
}

:root[data-theme-mode="light"] .side-pot-simple-hero p,
:root[data-theme-mode="light"] .side-pot-simple-heading p {
  color: var(--sp-muted-strong);
}

:root[data-theme-mode="light"] .side-pot-wizard-direction {
  border-color: var(--sp-line);
  background: linear-gradient(145deg, #ffffff 0%, #edf3f7 100%);
  color: var(--sp-text);
  box-shadow: inset 0 1px 0 #ffffff, 0 3px 10px rgba(31, 48, 66, 0.07);
}

:root[data-theme-mode="light"] .side-pot-wizard-direction small {
  color: var(--sp-muted);
}

:root[data-theme-mode="light"] .side-pot-wizard-direction:disabled {
  opacity: 0.48;
  border-color: var(--sp-line-soft);
  background: #edf2f6;
  color: #78899a;
  box-shadow: none;
}

:root[data-theme-mode="light"] .side-pot-simple-step {
  color: #6a7b8d;
}

:root[data-theme-mode="light"] .side-pot-simple-step.active,
:root[data-theme-mode="light"] .side-pot-simple-step.done {
  color: var(--sp-text);
}

:root[data-theme-mode="light"] .side-pot-simple-step > span {
  border-color: #aebdca;
  background: rgba(255, 255, 255, 0.68);
}

:root[data-theme-mode="light"] .side-pot-simple-card {
  border: 1px solid var(--sp-line);
  background:
    radial-gradient(circle at 94% 0, rgba(var(--theme-accent-rgb), 0.055), transparent 22rem),
    linear-gradient(145deg, #fbfdff 0%, #f3f7fa 52%, #eaf1f6 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.94),
    0 3px 8px rgba(31, 48, 66, 0.08),
    0 22px 50px rgba(31, 48, 66, 0.1);
}

:root[data-theme-mode="light"] .side-pot-back {
  color: var(--sp-muted-strong);
}

:root[data-theme-mode="light"] .side-pot-back:hover {
  color: var(--sp-text);
}

:root[data-theme-mode="light"] .side-pot-ranking-how {
  border-color: var(--sp-line);
  background: linear-gradient(145deg, #f8fbfd 0%, #e8f0f5 100%);
  box-shadow: inset 0 1px 0 #ffffff;
}

:root[data-theme-mode="light"] .side-pot-ranking-how > div {
  color: var(--sp-muted-strong);
}

:root[data-theme-mode="light"] .side-pot-ranking-how > div > span {
  border-color: #aabac7;
  background: rgba(255, 255, 255, 0.72);
  color: var(--sp-muted-strong);
}

:root[data-theme-mode="light"] .side-pot-ranking-how > b {
  color: #718397;
}

:root[data-theme-mode="light"] .side-pot-ranking-workbench,
:root[data-theme-mode="light"] .side-pot-decision-board {
  border-color: #aebeca;
  background:
    radial-gradient(circle at 96% 0, rgba(var(--theme-accent-rgb), 0.045), transparent 16rem),
    linear-gradient(145deg, #f7fafc 0%, #eaf1f5 100%);
  box-shadow: inset 0 1px 0 #ffffff, 0 6px 18px rgba(31, 48, 66, 0.08);
}

:root[data-theme-mode="light"] .side-pot-ranking-workbench > header > small {
  background: #dfe8ee;
  color: #536779;
}

:root[data-theme-mode="light"] .side-pot-ranking-list > div {
  border-color: var(--sp-line-soft);
  background: linear-gradient(145deg, #ffffff 0%, #f3f7fa 100%);
  color: var(--sp-text);
  box-shadow: 0 2px 5px rgba(31, 48, 66, 0.045);
}

:root[data-theme-mode="light"] .side-pot-ranking-list > div > span {
  background: rgba(var(--theme-accent-rgb), 0.13);
  color: var(--theme-accent-dark);
}

:root[data-theme-mode="light"] .side-pot-ranking-list small {
  color: var(--sp-muted);
}

:root[data-theme-mode="light"] .side-pot-ranking-list strong {
  color: var(--sp-text);
}

:root[data-theme-mode="light"] .side-pot-active-rank {
  border-color: rgba(var(--theme-accent-rgb), 0.5);
  background:
    radial-gradient(circle at 96% 0, rgba(var(--theme-accent-rgb), 0.12), transparent 12rem),
    linear-gradient(145deg, #f7fbff 0%, rgba(var(--theme-accent-rgb), 0.1) 100%);
  box-shadow: inset 4px 0 0 var(--theme-accent), inset 0 1px 0 #ffffff;
}

:root[data-theme-mode="light"] .side-pot-active-rank-number > span {
  color: var(--sp-text);
}

:root[data-theme-mode="light"] .side-pot-active-rank-number > small {
  color: var(--sp-muted);
}

:root[data-theme-mode="light"] .side-pot-hand-picker button,
:root[data-theme-mode="light"] .side-pot-player-picker button {
  border-color: #b8c6d1;
  background: linear-gradient(145deg, #ffffff 0%, #eef4f7 100%);
  color: var(--sp-text);
  box-shadow: inset 0 1px 0 #ffffff, 0 2px 5px rgba(31, 48, 66, 0.05);
}

:root[data-theme-mode="light"] .side-pot-hand-picker button:hover,
:root[data-theme-mode="light"] .side-pot-player-picker button:hover {
  border-color: rgba(var(--theme-accent-rgb), 0.46);
  background: linear-gradient(145deg, #ffffff 0%, rgba(var(--theme-accent-rgb), 0.09) 100%);
}

:root[data-theme-mode="light"] .side-pot-hand-picker button.active,
:root[data-theme-mode="light"] .side-pot-hand-picker button.active:hover {
  border-color: var(--theme-accent-dark);
  background:
    radial-gradient(circle at 100% 0, rgba(var(--theme-accent-rgb), 0.18), transparent 72%),
    linear-gradient(135deg, #ffffff 0%, rgba(var(--theme-accent-rgb), 0.18) 100%);
  color: var(--sp-text);
  box-shadow:
    inset 4px 0 0 var(--theme-accent-dark),
    inset 0 1px 0 #ffffff,
    0 7px 16px rgba(31, 48, 66, 0.12),
    0 0 0 1px rgba(var(--theme-accent-rgb), 0.11);
}

:root[data-theme-mode="light"] .side-pot-hand-picker button.active > span:first-child {
  border-color: var(--theme-accent-dark);
  background: var(--theme-accent-dark);
  color: #ffffff;
  box-shadow: 0 0 0 4px rgba(var(--theme-accent-rgb), 0.14);
}

:root[data-theme-mode="light"] .side-pot-hand-picker button.active > span:last-child {
  background: transparent;
  color: var(--sp-text);
}

:root[data-theme-mode="light"] .side-pot-hand-picker button.active > span:last-child > small {
  color: #334b61;
}

:root[data-theme-mode="light"] .side-pot-hand-picker button > span:last-child > small {
  color: #4c6074;
}

:root[data-theme-mode="light"] .side-pot-tie-hint {
  border-color: #d2b35f;
  background: linear-gradient(145deg, #fffdf7 0%, #f6eed8 100%);
  color: #59481f;
}

:root[data-theme-mode="light"] .side-pot-decision-board > p {
  color: var(--sp-muted);
}

:root[data-theme-mode="light"] .side-pot-decision-board > header > span.waiting {
  background: #f4e7bd;
  color: #6b5111;
}

:root[data-theme-mode="light"] .side-pot-decision-board > header > span.ready {
  background: #d8efe7;
  color: #17644d;
}

:root[data-theme-mode="light"] .side-pot-decision-list article {
  border-color: var(--sp-line-soft);
  background: linear-gradient(145deg, #ffffff 0%, #f1f5f8 100%);
  box-shadow: 0 2px 6px rgba(31, 48, 66, 0.05);
}

:root[data-theme-mode="light"] .side-pot-decision-list article.waiting {
  border-color: #d6bd73;
  background: linear-gradient(145deg, #fffdf8 0%, #f7f0dc 100%);
  box-shadow: inset 4px 0 0 #c49527, 0 2px 6px rgba(80, 62, 20, 0.07);
}

:root[data-theme-mode="light"] .side-pot-decision-list article.resolved {
  border-color: #88c5b2;
  background: linear-gradient(145deg, #fbfffd 0%, #e2f2ec 100%);
  box-shadow: inset 4px 0 0 #2f9c78, 0 2px 6px rgba(25, 91, 70, 0.07);
}

:root[data-theme-mode="light"] .side-pot-decision-title small,
:root[data-theme-mode="light"] .side-pot-decision-eligible small,
:root[data-theme-mode="light"] .side-pot-decision-outcome small {
  color: #607386;
}

:root[data-theme-mode="light"] .side-pot-decision-title > span:last-child,
:root[data-theme-mode="light"] .side-pot-decision-eligible > span {
  color: var(--sp-muted-strong);
}

:root[data-theme-mode="light"] .side-pot-decision-outcome > strong {
  color: var(--sp-text);
}

:root[data-theme-mode="light"] .side-pot-decision-list article.waiting .side-pot-decision-title > span:last-child {
  color: #735612;
}

:root[data-theme-mode="light"] .side-pot-decision-list article.resolved .side-pot-decision-title > span:last-child {
  color: #17644d;
}

:root[data-theme-mode="light"] .side-pot-ranking-complete {
  border-color: #82c5b0;
  background: linear-gradient(145deg, #f9fffc 0%, #ddf2ea 100%);
  color: var(--sp-text);
}

:root[data-theme-mode="light"] .side-pot-ranking-stopped {
  border-color: rgba(var(--theme-accent-rgb), 0.3);
  background: linear-gradient(145deg, #f9fcff 0%, rgba(var(--theme-accent-rgb), 0.08) 100%);
}

:root[data-theme-mode="light"] .side-pot-ranking-stopped strong {
  color: var(--sp-text);
}

:root[data-theme-mode="light"] .side-pot-ranking-stopped p {
  color: var(--sp-muted);
}

:root[data-theme-mode="light"] .side-pot-result-pots > div {
  border-color: rgba(var(--theme-accent-rgb), 0.34);
  background:
    radial-gradient(circle at 92% 0, rgba(var(--theme-accent-rgb), 0.08), transparent 14rem),
    linear-gradient(145deg, #fbfdff 0%, #e8f2f9 100%);
  box-shadow: inset 0 1px 0 #ffffff, 0 3px 8px rgba(31, 48, 66, 0.06);
}

:root[data-theme-mode="light"] .side-pot-result-pots small {
  color: var(--sp-muted);
}

:root[data-theme-mode="light"] .side-pot-result-pots > div > strong:last-child,
:root[data-theme-mode="light"] .side-pot-result-pots > div > span:first-child > strong {
  color: var(--sp-text);
}

:root[data-theme-mode="light"] .side-pot-result-pots .arrow {
  color: var(--theme-accent-dark);
}

:root[data-theme-mode="light"] .side-pot-simple-instructions li {
  border-color: var(--sp-line-soft);
  background: linear-gradient(145deg, #ffffff 0%, #f0f5f8 100%);
  color: var(--sp-text);
  box-shadow: 0 2px 5px rgba(31, 48, 66, 0.045);
}

:root[data-theme-mode="light"] .side-pot-simple-instructions li::before {
  background: #dfeaf2;
  color: var(--theme-accent-dark);
}

:root[data-theme-mode="light"] .side-pot-receipts > div {
  border: 1px solid #a7cfc2;
  background: linear-gradient(145deg, #ffffff 0%, #e4f2ed 100%);
  color: var(--sp-text);
}

:root[data-theme-mode="light"] .side-pot-receipts > div > span {
  color: #4e675f;
}

:root[data-theme-mode="light"] .side-pot-receipts > div > span > strong {
  color: #133d31;
}

:root[data-theme-mode="light"] .side-pot-entry-breakdown {
  border-color: rgba(var(--theme-accent-rgb), 0.32);
  background: linear-gradient(145deg, #f9fcff 0%, rgba(var(--theme-accent-rgb), 0.075) 100%);
}

:root[data-theme-mode="light"] .side-pot-compact-pots > div {
  border-color: var(--sp-line-soft);
  background: rgba(255, 255, 255, 0.72);
}

:root[data-theme-mode="light"] .side-pot-new-hand {
  padding: 9px 14px;
  border: 1px solid var(--sp-line);
  background: linear-gradient(145deg, #ffffff 0%, #edf3f7 100%);
  color: var(--sp-muted-strong);
  box-shadow: 0 3px 9px rgba(31, 48, 66, 0.06);
}

@media (max-width: 760px) {
  :root[data-theme-mode="light"] #controlView .projection-table {
    background:
      radial-gradient(circle at 50% 18%, rgba(var(--theme-accent-rgb), 0.06), transparent 22rem),
      linear-gradient(145deg, #f1f6f9 0%, #e5edf3 100%);
  }

  :root[data-theme-mode="light"] #controlView .tournament-timeline {
    padding: 14px 12px 12px;
  }
}

/* Mobile tournament companion */

.timeline-track-shell {
  display: flex;
  flex: 1;
  min-width: 0;
  min-height: 0;
}

@media (max-width: 760px), (max-height: 500px) and (pointer: coarse) {
  html {
    scroll-padding-bottom: env(safe-area-inset-bottom, 0px);
  }

  body {
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }

  .app,
  body.projector-mode .app {
    padding: 7px 7px max(18px, env(safe-area-inset-bottom, 0px));
  }

  .topbar,
  body.projector-mode .topbar {
    position: sticky;
    top: 6px;
    z-index: 110;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 8px;
    min-height: 50px;
    margin-bottom: 9px;
    padding: 6px 8px;
    border-radius: 13px;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .brand-logo-lockup,
  body.projector-mode .brand-logo-lockup {
    width: min(132px, 38vw);
  }

  .topbar .brand {
    flex: 1;
    justify-content: flex-end;
    min-width: 0;
    width: auto;
    margin-left: auto;
  }

  .topbar-actions {
    display: none;
  }

  .theme-picker {
    display: none;
  }

  .nav-tabs {
    display: none;
  }

  .tab-button {
    width: 100%;
    min-height: 48px;
    padding: 8px 6px;
    border-radius: 13px;
    font-size: 0.78rem;
    font-weight: 760;
  }

  body.projector-mode {
    overflow-x: hidden;
    overflow-y: auto;
  }

  #controlView .control-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 0;
  }

  #controlView .hero-clock {
    order: 1;
    min-height: 0;
    padding: 17px 13px 13px;
    border-radius: 17px;
  }

  #controlView .status-line {
    position: static;
    justify-content: center;
    order: -1;
    min-height: 26px;
    margin: 0 0 9px;
  }

  #controlView .status-line .badge {
    min-height: 24px;
    padding-inline: 8px;
    font-size: 0.62rem;
  }

  #controlView .timer {
    margin-top: 0;
    font-size: clamp(4.4rem, 21vw, 6.2rem);
    line-height: 0.9;
  }

  #controlView .level-title {
    margin-top: 7px;
    font-size: clamp(1.35rem, 7vw, 2.15rem);
  }

  #controlView .blind-grid {
    gap: 7px;
    margin-top: 13px;
  }

  #controlView .blind-box {
    min-height: 88px;
    padding: 11px 9px 9px;
    border-radius: 12px;
  }

  #controlView .blind-box span {
    font-size: 0.68rem;
  }

  #controlView .blind-box strong {
    margin-top: 6px;
    font-size: clamp(2.55rem, 13vw, 3.75rem);
  }

  #controlView .reentry-banner {
    margin-top: 8px;
    padding: 6px 9px;
    font-size: 0.76rem;
  }

  #controlView .next-level {
    width: 100%;
    margin: 8px 0 0;
    padding: 9px 11px;
    border: 1px solid rgba(var(--theme-accent-rgb), 0.15);
    border-radius: 10px;
    background: rgba(var(--theme-accent-rgb), 0.06);
    font-size: 0.82rem;
    text-align: center;
  }

  #controlView .progress-wrap {
    margin-top: 9px;
    opacity: 0.72;
  }

  #controlView .progress-wrap > div:last-child {
    display: none;
  }

  #controlView .display-control-bar,
  #controlView .hero-clock:hover .display-control-bar,
  #controlView .hero-clock:focus-within .display-control-bar {
    position: static;
    left: auto;
    bottom: auto;
    justify-content: flex-start;
    width: 100%;
    min-height: 56px;
    margin-top: 9px;
    padding: 5px;
    overflow-x: auto;
    overflow-y: hidden;
    opacity: 1;
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.045);
    transform: none;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  #controlView .display-control-bar::-webkit-scrollbar {
    display: none;
  }

  #controlView .icon-button {
    width: 46px;
    height: 46px;
    min-width: 46px;
    min-height: 46px;
  }

  .level-end-countdown {
    top: 47px;
  }

  #controlView .tournament-timeline {
    order: 2;
    min-height: 0;
    padding: 13px 11px 10px;
    border-radius: 17px;
  }

  #controlView .timeline-header {
    align-items: flex-start;
    margin-bottom: 8px;
  }

  #controlView .timeline-title {
    display: grid;
    gap: 2px;
  }

  #controlView .timeline-title strong {
    font-size: 1rem;
  }

  #controlView .timeline-title > span {
    font-size: 0.72rem;
  }

  :is(#controlView, #setupView) .timeline-track-shell {
    display: block;
    width: 100%;
    padding: 14px 24px 6px;
    overflow-x: auto;
    overflow-y: hidden;
    border-radius: 12px;
    overscroll-behavior-inline: contain;
    scroll-padding-inline: 24px;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    touch-action: pan-x;
    -webkit-overflow-scrolling: touch;
  }

  :is(#controlView, #setupView) .timeline-track-shell::-webkit-scrollbar {
    display: none;
  }

  :is(#controlView, #setupView) .mobile-scroll-timeline .timeline-track {
    flex: none;
    width: var(--timeline-mobile-width);
    min-width: 100%;
    min-height: 178px;
  }

  :is(#controlView, #setupView) .mobile-scroll-timeline .timeline-level {
    min-width: 38px;
    padding-top: 31px;
    padding-bottom: 17px;
    scroll-snap-align: center;
  }

  :is(#controlView, #setupView) .mobile-scroll-timeline .timeline-level span {
    font-size: clamp(0.88rem, 17cqw, 1.5rem);
  }

  #controlView .mobile-scroll-timeline .timeline-level.current span {
    font-size: clamp(1rem, 20cqw, 1.85rem);
  }

  #controlView .mobile-scroll-timeline .timeline-cursor {
    width: 48px;
    pointer-events: auto;
    touch-action: none;
  }

  #setupView .setup-structure-timeline {
    min-height: 0;
    padding: 13px 11px 10px;
    border-radius: 17px;
  }

  #controlView .timeline-footer {
    margin-top: 7px;
  }

  #controlView .control-side {
    order: 3;
  }

  #controlView .projection-table {
    display: block;
    height: auto;
    min-height: 0;
    overflow: hidden;
    border-radius: 17px;
  }

  #controlView .projection-table .panel-body {
    display: block;
    padding: 11px;
  }

  #controlView details.display-secondary {
    position: static;
    margin-top: 8px;
  }

  #controlView details.display-secondary[open] {
    width: 100%;
    max-width: none;
  }

  #controlView details.display-secondary > summary {
    width: 100%;
  }

  #controlView details.display-secondary .stats-panel .panel-header {
    align-items: center;
    padding: 13px 12px 5px;
  }

  #controlView details.display-secondary .stats-panel .panel-body {
    padding: 9px 10px 11px;
  }

  #controlView .stats-strip {
    grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
    grid-auto-rows: minmax(86px, auto);
    gap: 8px;
  }

  #controlView .stats-strip .stat-box {
    align-content: space-between;
    min-width: 0;
    min-height: 86px;
    padding: 12px 11px;
  }

  #controlView .stats-strip .stat-box span {
    font-size: 0.66rem;
    line-height: 1.25;
    white-space: normal;
  }

  #controlView .stats-strip .stat-box strong {
    margin-top: 8px;
    font-size: clamp(1.08rem, 5.8vw, 1.4rem);
    line-height: 1.08;
    overflow-wrap: anywhere;
  }

  .mobile-poker-table {
    display: grid;
    gap: 10px;
    width: 100%;
  }

  .mobile-poker-felt {
    position: relative;
    width: 100%;
    height: auto;
    margin: 7px 0;
    aspect-ratio: 1200 / 620;
  }

  .mobile-poker-art {
    position: absolute;
    inset: 0;
    z-index: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: fill;
    pointer-events: none;
    user-select: none;
  }

  .mobile-poker-art-light {
    display: none;
  }

  .mobile-table-centre {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 1;
    display: grid;
    justify-items: center;
    width: 44%;
    padding: 9px 6px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 14px;
    background: rgba(4, 10, 10, 0.44);
    text-align: center;
    transform: translate(-50%, -50%);
  }

  .mobile-table-centre span {
    color: #8eb3a8;
    font-size: 0.58rem;
    font-weight: 820;
    letter-spacing: 0.1em;
  }

  .mobile-table-centre strong {
    margin-top: 3px;
    color: #fff;
    font-size: 1.18rem;
    letter-spacing: -0.035em;
  }

  .mobile-table-centre small,
  .mobile-table-centre em {
    margin-top: 2px;
    color: #a7b8b2;
    font-size: 0.65rem;
    font-style: normal;
  }

  .mobile-seat-token {
    position: absolute;
    z-index: 2;
    display: grid;
    grid-template-columns: 7px minmax(0, 1fr);
    align-items: center;
    gap: 4px;
    width: 76px;
    min-height: 32px;
    padding: 5px 7px;
    border: 1px solid rgba(var(--theme-accent-bright-rgb), 0.23);
    border-radius: 9px;
    background: rgba(12, 18, 23, 0.96);
    box-shadow: 0 7px 16px rgba(0, 0, 0, 0.32);
    transform: translate(-50%, -50%);
  }

  .mobile-seat-token i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--cn-green);
    box-shadow: 0 0 8px rgba(101, 205, 176, 0.58);
  }

  .mobile-seat-token strong {
    overflow: hidden;
    color: var(--cn-text);
    font-size: 0.65rem;
    font-weight: 720;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-seat-token.out {
    opacity: 0.62;
    border-color: rgba(231, 117, 125, 0.28);
  }

  .mobile-seat-token.out i {
    background: var(--cn-red);
    box-shadow: 0 0 8px rgba(231, 117, 125, 0.5);
  }

  .mobile-table-state {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
  }

  .mobile-table-state span {
    padding: 5px 8px;
    border: 1px solid var(--cn-line);
    border-radius: 999px;
    background: var(--cn-surface-soft);
    color: var(--cn-muted);
    font-size: 0.68rem;
  }

  .mobile-table-state span strong {
    color: var(--cn-text);
  }

  .mobile-table-state .money {
    border-color: rgba(101, 205, 176, 0.23);
    color: #98ddca;
  }

  .mobile-table-state .bubble {
    border-color: rgba(210, 179, 111, 0.25);
    color: var(--cn-gold-bright);
  }

  .mobile-table-payouts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .mobile-table-payouts > span {
    display: grid;
    justify-items: center;
    padding: 8px 5px;
    border: 1px solid var(--cn-line);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.028);
  }

  .mobile-table-payouts small {
    color: var(--cn-muted);
    font-size: 0.62rem;
  }

  .mobile-table-payouts strong {
    margin-top: 2px;
    color: var(--cn-gold-bright);
    font-size: 0.82rem;
  }

  .mobile-player-roster {
    overflow: hidden;
    border: 1px solid var(--cn-line);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.025);
  }

  .mobile-player-roster > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 48px;
    padding: 10px 12px;
    color: var(--cn-muted-strong);
    cursor: pointer;
    font-size: 0.78rem;
    font-weight: 720;
    list-style: none;
  }

  .mobile-player-roster > summary::-webkit-details-marker {
    display: none;
  }

  .mobile-player-roster > summary::after {
    margin-left: 8px;
    color: var(--cn-muted);
    content: "⌄";
  }

  .mobile-player-roster[open] > summary::after {
    transform: rotate(180deg);
  }

  .mobile-player-roster > summary strong {
    margin-left: auto;
    color: var(--cn-text);
  }

  .mobile-player-list {
    display: grid;
    gap: 6px;
    padding: 0 7px 7px;
  }

  .mobile-player-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    min-height: 68px;
    padding: 9px 10px;
    border: 1px solid var(--cn-line);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.035);
  }

  .mobile-player-row.out {
    border-color: rgba(231, 117, 125, 0.2);
    background: rgba(231, 117, 125, 0.045);
  }

  .mobile-player-row.itm {
    border-color: rgba(101, 205, 176, 0.24);
    background: rgba(101, 205, 176, 0.05);
  }

  .mobile-player-copy {
    display: grid;
    gap: 3px;
    min-width: 0;
  }

  .mobile-player-copy .player-seat-name {
    overflow: hidden;
    font-size: 0.9rem;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-player-copy .player-seat-meta {
    display: flex;
    gap: 7px;
    font-size: 0.64rem;
  }

  .mobile-player-copy > small {
    color: var(--cn-gold-bright);
    font-size: 0.65rem;
  }

  .mobile-player-row .player-seat-actions {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: none;
    margin: 0;
    opacity: 1;
    pointer-events: auto;
    transform: none;
  }

  .mobile-player-row .player-seat-actions button {
    min-height: 34px;
    padding: 6px 9px;
    font-size: 0.66rem;
  }

  .mobile-add-player {
    width: 100%;
    min-height: 44px;
    border-color: rgba(var(--theme-accent-rgb), 0.22);
    background: rgba(var(--theme-accent-rgb), 0.075);
    color: var(--cn-blue-bright);
  }

  .mobile-player-editor {
    display: grid;
    gap: 10px;
    width: 100%;
    padding: 5px 0;
  }

  .mobile-player-editor-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    padding: 0 3px;
  }

  .mobile-player-editor-heading > div {
    display: grid;
    gap: 2px;
  }

  .mobile-player-editor-heading span {
    color: var(--cn-blue-bright);
    font-size: 0.62rem;
    font-weight: 820;
    letter-spacing: 0.11em;
  }

  .mobile-player-editor-heading strong {
    color: var(--cn-text);
    font-size: 1.15rem;
  }

  .mobile-player-editor-heading small {
    color: var(--cn-muted);
    font-size: 0.72rem;
  }

  .mobile-player-editor-list {
    display: grid;
    gap: 6px;
  }

  .mobile-player-editor-row {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr) auto;
    align-items: center;
    gap: 7px;
    padding: 7px;
    border: 1px solid var(--cn-line);
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.028);
  }

  .mobile-player-number {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 9px;
    background: rgba(var(--theme-accent-rgb), 0.1);
    color: var(--cn-blue-bright);
    font-size: 0.72rem;
    font-weight: 820;
  }

  .mobile-player-editor-row input {
    min-height: 42px;
    padding: 8px 10px;
  }

  .mobile-player-order-actions {
    display: flex;
    gap: 4px;
  }

  .mobile-player-order-actions button {
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    padding: 0;
    border-radius: 9px;
  }

  #setupView .setup-concept {
    grid-template-columns: 1fr;
  }

  #setupView .setup-concept-title {
    grid-column: 1;
  }

  #setupView .setup-table-zone {
    min-height: 0;
    padding: 10px 7px 4px;
  }

  #setupView .setup-action-dock {
    top: 62px;
  }

  :root[data-theme-mode="light"] .nav-tabs {
    border-color: rgba(54, 79, 101, 0.2);
    background: rgba(248, 251, 253, 0.95);
    box-shadow: 0 18px 44px rgba(31, 48, 66, 0.2), var(--cn-inner);
  }

  :root[data-theme-mode="light"] .mobile-poker-art-dark {
    display: none;
  }

  :root[data-theme-mode="light"] .mobile-poker-art-light {
    display: block;
  }

  :root[data-theme-mode="light"] .mobile-table-centre {
    border-color: rgba(54, 79, 101, 0.12);
    background: rgba(255, 255, 255, 0.54);
  }

  :root[data-theme-mode="light"] .mobile-table-centre span,
  :root[data-theme-mode="light"] .mobile-table-centre small,
  :root[data-theme-mode="light"] .mobile-table-centre em {
    color: #49685f;
  }

  :root[data-theme-mode="light"] .mobile-table-centre strong {
    color: #17342c;
  }

  :root[data-theme-mode="light"] .mobile-seat-token {
    border-color: rgba(54, 79, 101, 0.2);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 6px 14px rgba(31, 48, 66, 0.16);
  }
}

@media (min-width: 761px) and (max-height: 500px) and (pointer: coarse) {
  #controlView .hero-clock {
    padding-inline: max(18px, env(safe-area-inset-left, 0px));
  }

  #controlView .timer {
    font-size: clamp(4rem, 12vh, 5.6rem);
  }

  #controlView .blind-grid {
    width: min(620px, 100%);
  }

  .mobile-poker-felt {
    width: min(560px, calc(100% - 24px));
    margin-inline: auto;
  }
}
