:root {
  --bg: #050505;
  --bg-radial: #101010;
  --panel: #111111;
  --panel-strong: #0c0c0c;
  --border: rgba(255, 255, 255, 0.12);
  --border-hot: rgba(255, 115, 45, 0.45);
  --label: #ff7a26;
  --label-soft: #ffa566;
  --number: #ffffff;
  --number-muted: #c9c9c9;
  --muted: #7a7a7a;
  --live: #42d392;
  --shadow-soft: 0 2px 24px rgba(0, 0, 0, 0.55);
  color-scheme: dark;
  font-family: "DM Sans", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* App shell — marketing, dashboard, landing, auth (not the TV clock) */
  --ui-font: "Plus Jakarta Sans", "DM Sans", ui-sans-serif, system-ui, sans-serif;
  --ui-bg: #f4f4f5;
  --ui-surface: #ffffff;
  --ui-surface-muted: #fafafa;
  --ui-border: rgba(24, 24, 27, 0.08);
  --ui-border-strong: rgba(24, 24, 27, 0.12);
  --ui-text: #18181b;
  --ui-text-secondary: #3f3f46;
  --ui-text-muted: #71717a;
  --ui-accent: #4f46e5;
  --ui-accent-hover: #4338ca;
  --ui-accent-soft: rgba(79, 70, 229, 0.12);
  --ui-accent-ring: rgba(79, 70, 229, 0.35);
  --ui-radius-sm: 10px;
  --ui-radius-md: 14px;
  --ui-radius-lg: 20px;
  --ui-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --ui-shadow-md: 0 8px 28px rgba(0, 0, 0, 0.06);
  --ui-shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.08);
}

.admin-screen,
.view-marketing,
#view-landing,
.auth-overlay,
.admin-toast {
  font-family: var(--ui-font);
}

html.holdem-lang-ko .admin-screen,
html.holdem-lang-ko .view-marketing,
html.holdem-lang-ko #view-landing,
html.holdem-lang-ko .auth-overlay,
html.holdem-lang-ko .admin-toast {
  font-family: "Noto Sans KR", var(--ui-font);
}

html.holdem-lang-ko body {
  font-family: "Noto Sans KR", "DM Sans", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  background: var(--bg);
  color: var(--number);
}

html.view-tv-page,
html.view-tv-page body {
  height: 100%;
  min-height: 100%;
  overflow: hidden;
}

body {
  overflow-x: hidden;
}

body.view-tv-page {
  overflow: hidden;
}

button,
input,
textarea {
  font: inherit;
}

.auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
  padding: clamp(16px, 3vw, 40px);
  background:
    radial-gradient(ellipse 80% 60% at 20% 0%, rgba(79, 70, 229, 0.22) 0%, transparent 55%),
    radial-gradient(ellipse 70% 50% at 100% 100%, rgba(14, 165, 233, 0.12) 0%, transparent 50%),
    linear-gradient(165deg, #09090b 0%, #18181b 50%, #0c0c0e 100%);
  overflow-y: auto;
}

.auth-overlay[hidden] {
  display: none;
}

.auth-card {
  width: min(100%, 420px);
  border-radius: var(--ui-radius-lg);
  padding: clamp(24px, 3vw, 36px);
  background: var(--ui-surface);
  color: var(--ui-text);
  border: 1px solid var(--ui-border-strong);
  box-shadow: var(--ui-shadow-lg);
  display: grid;
  gap: 1.1rem;
}

.auth-brand {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ui-accent);
}

.auth-title {
  margin: 0;
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  line-height: 1.15;
}

.auth-lede {
  margin: 0;
  color: var(--ui-text-muted);
  font-size: 0.96rem;
  line-height: 1.45;
}

.auth-form {
  display: grid;
  gap: 0.85rem;
}

.auth-field span {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ui-text-secondary);
}

.auth-field input {
  margin-top: 0.35rem;
  width: 100%;
  border: 1px solid var(--ui-border-strong);
  border-radius: var(--ui-radius-sm);
  padding: 0.65rem 0.8rem;
  background: var(--ui-surface-muted);
  color: var(--ui-text);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.auth-field input:focus-visible {
  outline: none;
  border-color: var(--ui-accent);
  box-shadow: 0 0 0 3px var(--ui-accent-ring);
  background: var(--ui-surface);
}

.auth-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.25rem;
}

.auth-message {
  margin: 0;
  min-height: 1.25em;
  font-size: 0.88rem;
  color: #2e6b4e;
}

.auth-message.is-error {
  color: #b42318;
  font-weight: 750;
}

.auth-footnote {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--ui-text-muted);
  line-height: 1.4;
}

.auth-skip {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ui-text-secondary);
  font-size: 0.88rem;
  font-weight: 650;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  justify-self: start;
}

.auth-skip:hover {
  color: var(--ui-accent);
}

body.auth-locked .timer-screen,
body.auth-locked .admin-screen,
body.auth-locked .view-marketing {
  filter: blur(2px);
  pointer-events: none;
  user-select: none;
}

.timer-screen {
  --tv-base-width: 1440;
  --tv-base-height: 820;
  --tv-u: 1px;
  font-family: "DM Sans", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  height: 100vh;
  height: 100svh;
  height: 100dvh;
  min-height: 100vh;
  min-height: 100svh;
  min-height: 100dvh;
  background: radial-gradient(ellipse 120% 80% at 50% 0%, #141414 0%, var(--bg) 48%);
  position: relative;
  overflow: hidden;
}

.timer-screen-stage {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100vh;
  height: 100svh;
  height: 100dvh;
  min-height: 100vh;
  min-height: 100svh;
  min-height: 100dvh;
  display: grid;
  justify-items: center;
  align-items: start;
  padding: clamp(2px, 0.35vw, 6px) clamp(6px, 0.8vw, 12px);
  overflow: hidden;
}

.timer-screen-inner {
  width: calc(var(--tv-base-width) * var(--tv-u));
  min-height: calc(var(--tv-base-height) * var(--tv-u));
  padding: calc(6 * var(--tv-u)) calc(10 * var(--tv-u)) calc(6 * var(--tv-u));
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: calc(6 * var(--tv-u));
}

/* TV Wallpaper layer — sits behind all clock content */
#tv-wallpaper {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transform: scale(1.08);
  pointer-events: none;
  display: none;
}

/* Ensure all clock content renders above the wallpaper */
.timer-screen-inner > .top-bar,
.timer-screen-inner > .public-title-strip,
.timer-screen-inner > .display-grid,
.timer-screen-inner > .display-footer {
  position: relative;
  z-index: 1;
}

.pause-overlay {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 4vw, 48px);
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  pointer-events: none;
}

.pause-overlay[hidden] {
  display: none !important;
}

.pause-overlay-inner {
  text-align: center;
  max-width: min(90vw, 36rem);
}

.pause-overlay-title {
  margin: 0 0 0.35rem;
  font-size: clamp(2.2rem, 8vw, 4.5rem);
  font-weight: 950;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--label-soft, #ffa566);
  text-shadow: 0 0 40px rgba(255, 120, 50, 0.35);
}

.pause-overlay-sub {
  margin: 0;
  font-size: clamp(0.95rem, 2.4vw, 1.25rem);
  font-weight: 700;
  color: rgba(255, 255, 255, 0.55);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.public-title-strip {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.12rem;
  padding: 0 0 0.1rem;
}

.public-title-strip.is-hidden {
  display: none;
}

.public-title-main {
  font-size: calc(22 * var(--tv-u));
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--number);
}

.public-title-sub {
  font-size: calc(17 * var(--tv-u));
  font-weight: 700;
  color: var(--number-muted);
  letter-spacing: 0.03em;
}

.public-title-sub.is-empty {
  display: none;
}

.display-footer {
  text-align: center;
  padding: calc(12 * var(--tv-u)) 0 calc(4 * var(--tv-u));
}

.display-footer.is-hidden {
  display: none;
}

.display-footer-text {
  font-size: calc(13 * var(--tv-u));
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #5c5c5c;
}

.top-bar {
  position: relative;
  z-index: 450;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: calc(58 * var(--tv-u));
}

.live-badge,
.bonus-indicator,
.admin-link {
  border: 1px solid var(--border);
  background: rgba(10, 10, 10, 0.92);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.live-badge {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.48rem 1rem 0.48rem 0.85rem;
  border-radius: 999px;
  color: var(--live);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-weight: 900;
  font-size: calc(15 * var(--tv-u));
  text-shadow: 0 0 14px rgba(66, 211, 146, 0.35);
}

.live-badge strong {
  font: inherit;
}

.live-badge span {
  width: 0.7em;
  aspect-ratio: 1;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 14px currentColor;
}

.live-badge.is-paused {
  color: var(--label-soft);
  text-shadow: 0 0 12px rgba(255, 105, 49, 0.45);
}

.live-badge.is-paused span {
  opacity: 0.45;
  box-shadow: none;
}

.bonus-indicator {
  min-width: calc(280 * var(--tv-u));
  min-height: calc(44 * var(--tv-u));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  border-color: rgba(255, 120, 50, 0.35);
  border-radius: calc(10 * var(--tv-u));
  color: var(--label);
  letter-spacing: 0.06em;
  font-size: calc(22 * var(--tv-u));
  font-weight: 900;
}

.bonus-indicator.is-empty {
  opacity: 0;
  pointer-events: none;
}

.tv-pick-table-link {
  border: 1px solid var(--border);
  border-radius: calc(8 * var(--tv-u));
  padding: 0 0.75rem;
  height: calc(52 * var(--tv-u));
  display: inline-flex;
  align-items: center;
  background: rgba(8, 19, 31, 0.86);
  color: var(--muted);
  font-size: calc(12 * var(--tv-u));
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
}

.top-actions {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: calc(9 * var(--tv-u));
}

.icon-button,
.admin-link {
  width: calc(52 * var(--tv-u));
  height: calc(52 * var(--tv-u));
  border-radius: calc(8 * var(--tv-u));
  border: 1px solid var(--border);
  color: var(--number);
  background: rgba(8, 19, 31, 0.86);
  cursor: pointer;
  display: grid;
  place-items: center;
  text-decoration: none;
}

.admin-link {
  width: auto;
  padding: 0 0.9rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.sound-icon,
.fullscreen-icon {
  position: relative;
  width: 1.25rem;
  height: 1.25rem;
  display: block;
}

.sound-icon::before {
  content: "";
  position: absolute;
  left: 0.1rem;
  top: 0.35rem;
  width: 0.45rem;
  height: 0.55rem;
  background: var(--number);
  clip-path: polygon(0 25%, 45% 25%, 100% 0, 100% 100%, 45% 75%, 0 75%);
}

.sound-icon::after {
  content: "";
  position: absolute;
  inset: 0.18rem 0.06rem 0.18rem 0.55rem;
  border: 2px solid rgba(255, 255, 255, 0.55);
  border-left: 0;
  border-radius: 0 999px 999px 0;
}

.fullscreen-icon {
  border: 2px solid rgba(255, 255, 255, 0.55);
  border-radius: 3px;
  box-shadow: inset 0 0 0 0.34rem rgba(5, 5, 5, 0.95);
}

.icon-button.is-muted .sound-icon::before {
  background: var(--muted);
}

.icon-button.is-muted .sound-icon::after {
  inset: 0.55rem 0.1rem 0.55rem 0.58rem;
  border-color: var(--muted);
  transform: rotate(-36deg);
}

.display-grid {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(calc(250 * var(--tv-u)), 1fr) minmax(0, 1.55fr) minmax(calc(250 * var(--tv-u)), 1fr);
  gap: calc(16 * var(--tv-u));
  align-items: stretch;
}

.side-column,
.center-column {
  min-height: 0;
  min-width: 0;
}

.side-column {
  display: grid;
  gap: calc(12 * var(--tv-u));
}

.left-column {
  container-type: inline-size;
  grid-template-rows: minmax(0, 1fr) auto;
}

.right-column {
  container-type: inline-size;
  grid-auto-rows: minmax(0, 1fr);
}

.panel,
.blind-board {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--panel);
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.35);
}

.panel {
  padding: calc(14 * var(--tv-u)) calc(16 * var(--tv-u));
  overflow: hidden;
}

.panel-label,
.section-label {
  color: var(--label);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-weight: 950;
  line-height: 1;
}

.panel-label {
  font-size: calc(18 * var(--tv-u));
}

.section-label {
  font-size: calc(28 * var(--tv-u));
}

.stat-panel {
  display: grid;
  align-content: center;
  justify-items: center;
  text-align: center;
  gap: calc(14 * var(--tv-u));
}

.stat-value {
  color: var(--number);
  font-weight: 950;
  font-size: calc(64 * var(--tv-u));
  line-height: 0.95;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
  text-shadow: var(--shadow-soft);
  overflow-wrap: anywhere;
}

#next-break-panel .stat-value {
  font-size: calc(52 * var(--tv-u));
  letter-spacing: 0.04em;
}

.right-column .panel-label {
  font-size: calc(15 * var(--tv-u));
}

.right-column .stat-value {
  font-size: calc(54 * var(--tv-u));
  font-size: min(calc(54 * var(--tv-u)), 30cqw);
}

#next-break-panel .stat-value {
  font-size: calc(46 * var(--tv-u));
  font-size: min(calc(46 * var(--tv-u)), 25cqw);
}

.total-prize-panel .stat-value {
  font-size: calc(60 * var(--tv-u));
}

.prizes-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: calc(12 * var(--tv-u));
}

.prize-list {
  display: grid;
  align-content: start;
  gap: 0.7rem;
}

.prize-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 0.58rem;
  color: var(--number);
  font-size: calc(28 * var(--tv-u));
  font-weight: 850;
  font-variant-numeric: tabular-nums;
}

.center-column {
  container-type: inline-size;
  display: grid;
  grid-template-rows: auto minmax(calc(260 * var(--tv-u)), 1fr) auto;
  align-items: center;
  justify-items: center;
  text-align: center;
  padding: 0;
  overflow: hidden;
}

.level-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 0.35rem 1rem;
  width: 100%;
}

.level-title-block {
  display: inline-flex;
  align-items: baseline;
  gap: 0.45rem;
}

.level-word {
  font-size: calc(42 * var(--tv-u));
  font-size: min(calc(42 * var(--tv-u)), 10cqw);
  font-weight: 950;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--label);
}

.level-number-inline {
  font-size: calc(92 * var(--tv-u));
  font-size: min(calc(92 * var(--tv-u)), 18cqw);
  font-weight: 950;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--label);
  letter-spacing: 0.06em;
}

.level-fraction {
  color: var(--number);
  font-size: calc(42 * var(--tv-u));
  font-size: min(calc(42 * var(--tv-u)), 10cqw);
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}

.countdown-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(6 * var(--tv-u));
  min-height: calc(260 * var(--tv-u));
  justify-content: center;
  width: 100%;
  overflow: hidden;
}

.countdown-stack.is-paused .countdown {
  color: var(--number-muted);
  opacity: 0.62;
  text-shadow: none;
}

.countdown-stack.is-warning .countdown,
.countdown.is-warning {
  color: #ff4d3d;
  animation: countdown-warning-blink 0.8s steps(2, end) infinite;
  text-shadow: 0 0 34px rgba(255, 77, 61, 0.55), var(--shadow-soft);
}

@keyframes countdown-warning-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.38; }
}

.countdown {
  color: var(--number);
  font-size: calc(250 * var(--tv-u));
  font-size: min(calc(250 * var(--tv-u)), 27cqw);
  font-weight: 1000;
  line-height: 0.82;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
  text-shadow: var(--shadow-soft);
  white-space: nowrap;
}

.blind-board {
  width: 100%;
  max-width: calc(980 * var(--tv-u));
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--border);
  overflow: hidden;
}

.blind-row {
  display: grid;
  grid-template-columns: minmax(0, 0.42fr) minmax(0, 1fr);
  align-items: center;
  gap: calc(18 * var(--tv-u));
  padding: calc(14 * var(--tv-u)) calc(20 * var(--tv-u));
  background: var(--panel-strong);
}

.blind-values {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(calc(110 * var(--tv-u)), auto);
  align-items: baseline;
  justify-content: stretch;
  gap: calc(18 * var(--tv-u));
  color: var(--number);
  font-size: calc(82 * var(--tv-u));
  font-size: min(calc(82 * var(--tv-u)), 12.5cqw);
  font-weight: 950;
  line-height: 0.95;
  font-variant-numeric: tabular-nums;
  text-shadow: var(--shadow-soft);
  min-width: 0;
  white-space: nowrap;
}

.blind-values--inline {
  gap: calc(14 * var(--tv-u));
  font-size: calc(56 * var(--tv-u));
  font-size: min(calc(56 * var(--tv-u)), 10.5cqw);
}

.blind-pair {
  display: grid;
  grid-template-columns: minmax(0, 1fr) calc(52 * var(--tv-u)) minmax(0, 1fr);
  align-items: baseline;
  justify-self: center;
  min-width: calc(420 * var(--tv-u));
}

.blind-values--inline .blind-pair {
  min-width: calc(310 * var(--tv-u));
  grid-template-columns: minmax(0, 1fr) calc(38 * var(--tv-u)) minmax(0, 1fr);
}

.blind-num {
  display: block;
}

.blind-num--left {
  text-align: right;
}

.blind-slash {
  display: block;
  text-align: center;
}

.blind-num--right {
  text-align: left;
}

.blind-row--next .section-label {
  font-size: calc(22 * var(--tv-u));
}

.blind-row--next {
  padding-top: calc(10 * var(--tv-u));
  padding-bottom: calc(10 * var(--tv-u));
}

.ante-label {
  color: var(--label-soft);
  font-size: calc(30 * var(--tv-u));
  font-size: min(calc(30 * var(--tv-u)), 5.2cqw);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.ante-label--compact {
  font-size: calc(24 * var(--tv-u));
  font-size: min(calc(24 * var(--tv-u)), 4.8cqw);
}

.ante-label strong {
  color: var(--number);
  margin-left: 0.2em;
}

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

.admin-toast {
  position: fixed;
  bottom: clamp(16px, 3vw, 28px);
  left: 50%;
  transform: translateX(-50%) translateY(120%);
  z-index: 3000;
  max-width: min(92vw, 420px);
  padding: 0.8rem 1.2rem;
  border-radius: var(--ui-radius-md);
  font-size: 0.9rem;
  font-weight: 650;
  color: var(--ui-text);
  background: var(--ui-surface);
  border: 1px solid var(--ui-border-strong);
  box-shadow: var(--ui-shadow-lg);
  transition: transform 0.28s ease, opacity 0.28s ease;
  opacity: 0;
  pointer-events: none;
}

.admin-toast.is-visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.admin-toast.is-error {
  border-color: #eab6a8;
  background: #fff8f6;
  color: #9a3412;
}

.admin-form-actions-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
}

.admin-inline-status {
  margin: 0;
  font-size: 0.86rem;
  font-weight: 750;
  color: #1d6b52;
  min-height: 1.2em;
}

.admin-actions-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
}

.admin-actions-status {
  margin: 0.75rem 0 0;
  width: 100%;
  font-size: 0.88rem;
  font-weight: 750;
  color: #1d6b52;
  min-height: 1.2em;
}

.admin-screen {
  display: none;
  min-height: 100vh;
  min-height: 100svh;
  min-height: 100dvh;
  padding: clamp(16px, 2.5vw, 28px) clamp(14px, 2vw, 24px) clamp(28px, 4vw, 48px);
  background:
    radial-gradient(ellipse 90% 55% at 100% -10%, rgba(79, 70, 229, 0.07) 0%, transparent 52%),
    radial-gradient(ellipse 70% 45% at 0% 110%, rgba(14, 165, 233, 0.06) 0%, transparent 48%),
    linear-gradient(180deg, var(--ui-bg) 0%, #ececee 100%);
  color: var(--ui-text);
}

body.admin-mode {
  background: var(--ui-bg);
}

body.admin-mode .timer-screen {
  display: none;
}

body.admin-mode .admin-screen {
  display: block;
}

.admin-shell {
  max-width: 1120px;
  margin: 0 auto;
  padding-bottom: 0.5rem;
}

.admin-header-card {
  margin-bottom: clamp(1rem, 2vw, 1.5rem);
  padding: clamp(1.1rem, 2vw, 1.45rem);
  border-radius: var(--ui-radius-lg);
  border: 1px solid var(--ui-border);
  background: var(--ui-surface);
  box-shadow: var(--ui-shadow-md);
}

.admin-header-card .admin-header {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.admin-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.25rem;
  margin-bottom: clamp(1.25rem, 2.5vw, 2rem);
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--ui-border);
}

.admin-header-main {
  min-width: 0;
}

.admin-kicker {
  margin: 0 0 0.35rem;
  color: var(--ui-accent);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.admin-header h1 {
  margin: 0;
  font-size: clamp(1.65rem, 3.2vw, 2.35rem);
  line-height: 1.12;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.admin-sub {
  margin: 0.5rem 0 0;
  max-width: 40rem;
  color: var(--ui-text-muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

.admin-header-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.65rem;
  flex-shrink: 0;
}

.admin-header-cluster {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.65rem;
}

.admin-header-cluster--share {
  justify-content: flex-end;
}

.btn-back--primary {
  border-color: transparent;
  background: var(--ui-accent);
  color: #fff;
  font-weight: 750;
  box-shadow: 0 2px 8px var(--ui-accent-soft);
}

.btn-back--primary:hover {
  background: var(--ui-accent-hover);
  border-color: transparent;
  color: #fff;
}

.admin-account {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.65rem;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--ui-border-strong);
  background: var(--ui-surface-muted);
  font-size: 0.86rem;
  box-shadow: var(--ui-shadow-sm);
}

.admin-account-label {
  font-weight: 750;
  color: var(--ui-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-size: 0.65rem;
}

.admin-account-name {
  font-weight: 700;
  color: var(--ui-text);
  max-width: 12rem;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-primary,
.btn-secondary,
.btn-ghost,
.btn-compact,
.btn-back,
.btn-muted,
.btn-danger,
.btn-lg {
  border-radius: 10px;
  font-weight: 800;
  cursor: pointer;
  font: inherit;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.btn-primary {
  border: 1px solid transparent;
  background: var(--ui-accent);
  color: #fff;
  padding: 0.7rem 1.05rem;
  box-shadow: 0 2px 10px var(--ui-accent-soft);
}

.btn-primary:hover {
  background: var(--ui-accent-hover);
}

.btn-primary:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--ui-accent-ring), 0 2px 10px var(--ui-accent-soft);
}

.btn-secondary {
  border: 1px solid var(--ui-border-strong);
  background: var(--ui-surface);
  color: var(--ui-text);
  padding: 0.7rem 1.05rem;
}

.btn-secondary:hover {
  border-color: var(--ui-text-muted);
  background: var(--ui-surface-muted);
}

.btn-compact {
  padding: 0.5rem 0.8rem;
  font-size: 0.86rem;
}

.btn-ghost {
  border: 0;
  background: transparent;
  color: var(--ui-accent);
  padding: 0.35rem 0.5rem;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 650;
}

.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.55rem 0.95rem;
  border: 1px solid var(--ui-border-strong);
  background: var(--ui-surface);
  color: var(--ui-text-secondary);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 650;
  box-shadow: var(--ui-shadow-sm);
}

.btn-back:hover {
  border-color: var(--ui-text-muted);
  background: var(--ui-surface-muted);
}

.btn-lg {
  padding: 0.82rem 1.35rem;
  font-size: 1rem;
}

.btn-muted {
  border: 1px solid #c5d0da;
  background: #fff;
  color: #3d5266;
  padding: 0.65rem 1rem;
  font-weight: 750;
}

.btn-muted:hover {
  background: #f6f8fa;
}

.btn-danger {
  border: 1px solid #e8a598;
  background: #fff8f6;
  color: #9a3412;
  padding: 0.65rem 1rem;
  font-weight: 750;
}

.btn-danger:hover {
  background: #ffefeb;
  border-color: #dc7a6a;
}

.admin-panel {
  padding: clamp(1rem, 2vw, 1.35rem);
  border-radius: var(--ui-radius-lg);
  border: 1px solid var(--ui-border);
  background: var(--ui-surface);
  box-shadow: var(--ui-shadow-sm);
}

.tables-panel {
  margin-bottom: clamp(1.5rem, 2.5vw, 2.25rem);
}

.branding-panel {
  margin-bottom: clamp(1.25rem, 2vw, 2rem);
}

.panel-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.panel-title {
  margin: 0 0 0.2rem;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--ui-text);
  letter-spacing: -0.02em;
}

.panel-desc {
  margin: 0;
  font-size: 0.9rem;
  color: var(--ui-text-muted);
  line-height: 1.45;
  max-width: 36rem;
}

.panel-heading-text {
  min-width: 0;
}

.game-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  max-width: 42rem;
  margin-left: auto;
  margin-right: auto;
}

.game-card {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem 1.1rem;
  align-items: start;
  border: 1px solid var(--ui-border);
  border-radius: var(--ui-radius-md);
  background: var(--ui-surface-muted);
  padding: 1.15rem 1.2rem 1.2rem;
  box-shadow: var(--ui-shadow-sm);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.game-card:hover {
  border-color: var(--ui-border-strong);
  box-shadow: var(--ui-shadow-md);
}

.game-card-display-url {
  grid-column: 1 / -1;
  display: grid;
  gap: 0.45rem;
  padding: 0.65rem 0 0.35rem;
  margin-top: 0.35rem;
  border-top: 1px dashed rgba(20, 32, 43, 0.12);
}

.game-card-url-label {
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #475569;
}

.game-card-url-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: stretch;
}

.game-card-url-input {
  flex: 1;
  min-width: 0;
  padding: 0.5rem 0.6rem;
  border-radius: var(--ui-radius-sm);
  border: 1px solid var(--ui-border-strong);
  background: var(--ui-surface-muted);
  font-size: 0.78rem;
  font-weight: 650;
  color: var(--ui-text);
  cursor: text;
}

.game-card-url-copy {
  flex-shrink: 0;
  align-self: stretch;
  padding-left: 0.85rem;
  padding-right: 0.85rem;
  font-size: 0.82rem;
}

.game-card-url-hint {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.45;
  color: #64748b;
}

.game-card-quicks {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 0.65rem;
  padding-top: 0.15rem;
  border-top: 1px solid rgba(20, 32, 43, 0.08);
  margin-top: 0.1rem;
}

.game-card-counter {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  min-width: 5.5rem;
  flex: 1 1 calc(50% - 0.35rem);
}

.game-card-counter-label {
  font-size: 0.65rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #617385;
}

.game-card-counter-row {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  min-height: 2.35rem;
}

.game-card-counter-value {
  flex: 1;
  text-align: center;
  font-size: 1rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  color: #14202b;
  min-width: 1.5rem;
}

.game-card-counter-btn {
  width: 2.35rem;
  height: 2.35rem;
  padding: 0;
  border-radius: 8px;
  border: 1px solid #c5d0da;
  background: #f4f7fa;
  color: #0d2b43;
  font-size: 1.15rem;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  transition: background 0.12s ease, border-color 0.12s ease;
}

.game-card-counter-btn:hover {
  background: #e8eef4;
  border-color: #9eb4c8;
}

.game-card-counter-btn:active {
  background: #dce6ef;
}

.game-card-counter-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.game-card-counter-btn:disabled:hover {
  background: #f4f7fa;
  border-color: #c5d0da;
}

.game-card.is-active {
  border-color: var(--ui-accent);
  box-shadow:
    0 0 0 2px var(--ui-accent-soft),
    var(--ui-shadow-md);
}

.game-card-badge {
  grid-column: 1 / -1;
  justify-self: start;
  margin: -0.15rem 0 0.1rem;
  padding: 0.22rem 0.65rem;
  border-radius: 6px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ui-accent-hover);
  background: var(--ui-accent-soft);
  border: 1px solid rgba(79, 70, 229, 0.2);
}

.game-card-meta {
  min-width: 0;
  display: grid;
  gap: 0.35rem;
}

.game-card-meta strong {
  color: var(--ui-text);
  font-size: 1.08rem;
  font-weight: 800;
  overflow-wrap: anywhere;
  line-height: 1.25;
}

.game-card-meta span {
  color: var(--ui-text-muted);
  font-size: 0.88rem;
  font-weight: 500;
  line-height: 1.35;
}

.game-card-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 0.5rem;
  align-content: start;
}

.game-btn {
  min-height: 44px;
  padding: 0.52rem 0.75rem;
  font-size: 0.82rem;
  font-weight: 650;
  border-radius: var(--ui-radius-sm);
  border: 1px solid var(--ui-border-strong);
  background: var(--ui-surface);
  color: var(--ui-text-secondary);
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease;
}

.game-btn:hover {
  background: var(--ui-surface-muted);
}

.game-btn--primary {
  border-color: transparent;
  background: var(--ui-accent);
  color: #fff;
}

.game-btn--primary:hover {
  background: var(--ui-accent-hover);
}

.game-btn--danger {
  border-color: #eab6a8;
  background: #fff8f6;
  color: #9a3412;
}

.game-btn--danger:hover {
  background: #ffefeb;
}

.game-btn:focus-visible {
  outline: 2px solid var(--ui-accent);
  outline-offset: 2px;
}

.settings-header {
  margin-bottom: 1.1rem;
}

.settings-title {
  margin: 0 0 0.35rem;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--ui-text);
}

.settings-context {
  margin: 0;
  font-size: 0.95rem;
  color: var(--ui-text-muted);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.75rem;
}

.settings-context strong {
  color: var(--ui-text);
  font-size: 1.02rem;
}

.settings-context-hint {
  color: var(--ui-text-muted);
  font-size: 0.86rem;
}

.advanced-settings-layout {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
  align-items: start;
  gap: 1rem;
}

.advanced-settings-nav {
  position: sticky;
  top: 1rem;
  display: grid;
  gap: 0.35rem;
  padding: 0.55rem;
  border: 1px solid var(--ui-border);
  border-radius: var(--ui-radius-md);
  background: var(--ui-surface);
  box-shadow: var(--ui-shadow-sm);
}

.advanced-settings-nav button {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 10px;
  padding: 0.62rem 0.7rem;
  background: transparent;
  color: var(--ui-text-secondary);
  font-size: 0.86rem;
  font-weight: 750;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}

.advanced-settings-nav button:hover,
.advanced-settings-nav button:focus-visible {
  background: var(--ui-accent-soft);
  color: var(--ui-text);
  outline: none;
}

.admin-form.admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem 1.1rem;
}

.advanced-settings-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.admin-card {
  margin: 0;
  border: 0;
  border-radius: var(--ui-radius-md);
  background: var(--ui-surface);
  padding: 1.25rem 1.2rem;
  display: grid;
  gap: 0.95rem;
  align-content: start;
  box-shadow: inset 0 0 0 1px var(--ui-border), var(--ui-shadow-sm);
  scroll-margin-top: 1rem;
}

.admin-card--wide {
  grid-column: 1 / -1;
}

.admin-card--fields {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-card--fields > .admin-legend,
.admin-card--fields > .admin-card-lede {
  grid-column: 1 / -1;
}

.admin-legend {
  float: none;
  width: 100%;
  padding: 0;
  margin: 0 0 0.4rem;
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--ui-text);
}

.admin-card-lede {
  margin: -0.25rem 0 0.25rem;
  font-size: 0.86rem;
  color: var(--ui-text-muted);
  line-height: 1.45;
}

.admin-label {
  display: grid;
  gap: 0.28rem;
}

.admin-label-text {
  font-size: 0.86rem;
  font-weight: 650;
  color: var(--ui-text-secondary);
}

.admin-hint {
  font-size: 0.78rem;
  font-weight: 600;
  color: #7a8c9c;
  line-height: 1.35;
}

.admin-hint code {
  font-size: 0.85em;
  padding: 0.08rem 0.28rem;
  border-radius: 4px;
  background: var(--ui-accent-soft);
  color: var(--ui-text-secondary);
}

.admin-card input,
.admin-card textarea,
.admin-card select {
  width: 100%;
  border: 1px solid var(--ui-border-strong);
  border-radius: var(--ui-radius-sm);
  padding: 0.62rem 0.75rem;
  background: var(--ui-surface-muted);
  color: var(--ui-text);
  font-size: 0.95rem;
}

.admin-card input:focus-visible,
.admin-card textarea:focus-visible,
.admin-card select:focus-visible {
  outline: none;
  border-color: var(--ui-accent);
  box-shadow: 0 0 0 3px var(--ui-accent-ring);
  background: var(--ui-surface);
}

.admin-label--narrow {
  max-width: 100%;
}

.admin-inline-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: 0.75rem 0.85rem;
  margin-bottom: 0.15rem;
}

.wide-label {
  grid-column: 1 / -1;
}

.toggles .admin-check {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  font-size: 0.9rem;
  font-weight: 550;
  color: var(--ui-text-secondary);
  cursor: pointer;
}

.admin-card--fields.toggles {
  gap: 0.65rem 0.8rem;
}

.toggles .admin-check input {
  width: 1.15rem;
  height: 1.15rem;
  margin-top: 0.12rem;
  flex-shrink: 0;
}

.toggles .admin-check span {
  line-height: 1.35;
}

.admin-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  grid-column: 1 / -1;
  margin-top: 0.35rem;
  padding: 1.1rem 1.15rem;
  border-radius: var(--ui-radius-md);
  border: 1px solid var(--ui-border);
  background: var(--ui-surface);
  box-shadow: var(--ui-shadow-md);
  position: sticky;
  bottom: 12px;
  z-index: 5;
}

.advanced-settings-form .admin-actions {
  position: static;
}

.admin-actions-primary,
.admin-actions-secondary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
}

@media (max-width: 980px) and (orientation: landscape) {
  body:not(.view-tv-page) .timer-screen {
    padding: 10px;
    gap: 8px;
  }

  body:not(.view-tv-page) .display-grid {
    gap: 10px;
    grid-template-columns: minmax(150px, 0.78fr) minmax(300px, 1.9fr) minmax(150px, 0.78fr);
  }

  body:not(.view-tv-page) .panel {
    padding: 12px;
  }
}

@media (max-width: 760px), (orientation: portrait) {
  body:not(.view-tv-page) {
    overflow-y: auto;
  }

  body:not(.view-tv-page) .timer-screen {
    min-height: 100vh;
    min-height: 100svh;
    padding: 14px;
    gap: 14px;
  }

  body:not(.view-tv-page) .top-bar {
    grid-template-columns: 1fr auto;
    gap: 10px;
  }

  body:not(.view-tv-page) .bonus-indicator {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    min-width: 0;
  }

  body:not(.view-tv-page) .top-actions {
    grid-column: 2;
  }

  body:not(.view-tv-page) .display-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  body:not(.view-tv-page) .center-column {
    order: -1;
    gap: 18px;
  }

  body:not(.view-tv-page) .side-column,
  body:not(.view-tv-page) .right-column,
  body:not(.view-tv-page) .left-column {
    grid-template-rows: none;
    grid-template-columns: 1fr;
  }

  body:not(.view-tv-page) .countdown {
    font-size: clamp(5rem, 28vw, 9rem);
    line-height: 0.9;
  }

  body:not(.view-tv-page) .level-number-inline {
    font-size: clamp(3rem, 16vw, 6rem);
  }

  body:not(.view-tv-page) .level-row {
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
  }

  body:not(.view-tv-page) .blind-row {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  body:not(.view-tv-page) .blind-values {
    width: 100%;
    font-size: clamp(2.2rem, 11vw, 4rem);
  }

  body:not(.view-tv-page) .stat-value {
    font-size: clamp(2.3rem, 10vw, 4rem);
  }

  .advanced-settings-layout {
    grid-template-columns: 1fr;
  }

  .advanced-settings-nav {
    position: static;
    display: flex;
    overflow-x: auto;
    padding: 0.45rem;
    scrollbar-width: thin;
  }

  .advanced-settings-nav button {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .admin-form.admin-grid,
  .admin-card--fields {
    grid-template-columns: 1fr;
  }

  .panel-heading {
    flex-direction: column;
    align-items: stretch;
  }

  .panel-heading .btn-primary {
    align-self: flex-start;
  }

  .game-card-actions {
    justify-content: flex-start;
  }

  .admin-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-header-actions {
    width: 100%;
    justify-content: flex-start;
    flex-direction: column;
    align-items: stretch;
  }

  .admin-header-cluster {
    width: 100%;
    justify-content: flex-start;
  }

  .admin-header-cluster--share {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-header-cluster--share .btn-back {
    width: 100%;
    text-align: center;
    justify-content: center;
  }

  .admin-context-bar-inner {
    flex-direction: column;
    align-items: stretch;
  }

  .btn-context-jump {
    width: 100%;
    text-align: center;
  }

  .admin-actions-inner {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-actions-primary,
  .admin-actions-secondary {
    justify-content: flex-start;
    width: 100%;
  }
}

/* ---- Room landing & routing ---- */
#view-landing {
  --landing-accent: #4ade80;
  --landing-accent-glow: rgba(74, 222, 128, 0.15);
  display: none;
  min-height: 100vh;
  min-height: 100svh;
  min-height: 100dvh;
  background:
    radial-gradient(ellipse 80% 45% at 50% -10%, rgba(74, 222, 128, 0.1) 0%, transparent 58%),
    #04050a;
  color: #f4f4f5;
  padding: clamp(24px, 4vw, 48px) clamp(18px, 3vw, 32px);
}

#view-landing:not([hidden]) {
  display: block;
}

body.view-landing .view-tv,
body.view-landing .admin-screen {
  display: none !important;
}

.landing-shell {
  max-width: 680px;
  margin: 0 auto;
}

.landing-shell--card {
  padding: clamp(1.5rem, 3vw, 2.25rem);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.025);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow:
    0 0 0 1px rgba(74, 222, 128, 0.07),
    0 32px 72px rgba(0, 0, 0, 0.65);
}

.landing-hero {
  text-align: center;
  margin-bottom: 1.75rem;
}

.landing-logo {
  display: block;
  margin: 0 auto 1.1rem;
  border-radius: 14px;
  object-fit: contain;
  max-height: 96px;
  max-width: 96px;
}

.landing-logo[hidden] {
  display: none;
}

.landing-kicker {
  margin: 0 0 0.5rem;
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--landing-accent);
}

.landing-title {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 900;
  letter-spacing: -0.025em;
  color: #fff;
}

.landing-tagline {
  margin: 0.55rem 0 0;
  color: rgba(255, 255, 255, 0.45);
  font-size: 1rem;
}

.landing-lede {
  text-align: center;
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.9rem;
  line-height: 1.55;
  margin: 0 0 1.75rem;
}

/* ── Game cards ── */
.landing-game-cards {
  display: grid;
  gap: 0.55rem;
  margin-bottom: 0.25rem;
}

.landing-game-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.3rem 1.4rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  text-decoration: none;
  color: #fff;
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
  -webkit-tap-highlight-color: transparent;
}

.landing-game-card:hover,
.landing-game-card:focus-visible {
  border-color: rgba(74, 222, 128, 0.4);
  background: rgba(74, 222, 128, 0.06);
  box-shadow: 0 0 0 1px rgba(74, 222, 128, 0.12), 0 8px 24px rgba(0, 0, 0, 0.3);
  outline: none;
}

.landing-card-info {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 0.22rem;
}

.landing-card-title {
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.landing-card-meta {
  font-size: 0.86rem;
  color: rgba(255, 255, 255, 0.45);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.landing-card-cta {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--landing-accent);
  margin-top: 0.15rem;
  letter-spacing: 0.01em;
}

.landing-card-chevron {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  opacity: 0.3;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.landing-game-card:hover .landing-card-chevron,
.landing-game-card:focus-visible .landing-card-chevron {
  opacity: 1;
  color: var(--landing-accent);
  transform: translateX(4px);
}

.landing-empty,
.landing-error {
  text-align: center;
  color: rgba(255, 80, 80, 0.9);
  font-size: 0.95rem;
  padding: 1rem 0;
}

/* ── Bottom actions ── */
.landing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: center;
  margin-top: 1.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.btn-landing-primary,
.btn-landing-secondary {
  border-radius: 11px;
  padding: 0.72rem 1.35rem;
  font-weight: 700;
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: background 0.15s ease, border-color 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.btn-landing-primary {
  background: #4ade80;
  border-color: transparent;
  color: #04050a;
  box-shadow: 0 4px 20px rgba(74, 222, 128, 0.3);
}

.btn-landing-primary:hover {
  background: #6ee7a0;
}

.btn-landing-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.24);
}

.preset-picker {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.preset-card {
  display: grid;
  gap: 0.35rem;
  text-align: left;
  padding: 0.9rem 1rem;
  border-radius: var(--ui-radius-md);
  border: 1px solid var(--ui-border);
  background: var(--ui-surface-muted);
  cursor: pointer;
  font: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.preset-card:hover {
  border-color: var(--ui-accent);
  box-shadow: var(--ui-shadow-md);
  background: var(--ui-surface);
}

.preset-card strong {
  font-size: 1rem;
  color: var(--ui-text);
}

.preset-card span {
  font-size: 0.85rem;
  color: var(--ui-text-muted);
  line-height: 1.35;
}

.panel-heading--inline {
  align-items: center !important;
  margin-top: 0.5rem;
}

.panel-micro {
  margin: 0.2rem 0 0;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--ui-text-muted);
  line-height: 1.4;
  max-width: 32rem;
}

.admin-flow-steps {
  list-style: none;
  margin: 0 0 1.35rem;
  padding: clamp(1rem, 2vw, 1.35rem);
  border-radius: var(--ui-radius-md);
  border: 1px solid var(--ui-border);
  background: var(--ui-accent-soft);
  display: grid;
  gap: 0.75rem;
}

@media (min-width: 720px) {
  .admin-flow-steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem 1.25rem;
  }
}

.admin-flow-step {
  margin: 0;
  padding: 0 0 0 2.85rem;
  position: relative;
  font-size: 0.86rem;
  font-weight: 550;
  color: var(--ui-text-secondary);
  line-height: 1.45;
}

.admin-flow-num {
  position: absolute;
  left: 0;
  top: 0;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.95rem;
  font-weight: 800;
  color: #fff;
  background: var(--ui-accent);
  box-shadow: 0 2px 10px var(--ui-accent-soft);
}

.admin-context-bar {
  margin: 0 0 1.15rem;
  padding: 0.85rem 1.1rem;
  border-radius: var(--ui-radius-md);
  border: 1px solid var(--ui-border);
  background: var(--ui-surface);
  box-shadow: var(--ui-shadow-sm);
}

.admin-context-bar-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
}

.admin-context-bar-text {
  min-width: 0;
  flex: 1 1 200px;
}

.admin-context-eyebrow {
  display: block;
  font-size: 0.65rem;
  font-weight: 750;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ui-text-muted);
  margin-bottom: 0.2rem;
}

.admin-context-line {
  margin: 0;
  font-size: 0.92rem;
  color: var(--ui-text-secondary);
  line-height: 1.4;
}

.admin-context-name {
  color: var(--ui-text);
  font-weight: 800;
  font-size: 1.02rem;
}

.admin-context-dash {
  margin: 0 0.35rem;
  color: #9eb4c4;
  font-weight: 700;
}

.admin-context-sub {
  font-weight: 650;
}

.btn-context-jump {
  border: 1px solid var(--ui-border-strong);
  background: var(--ui-surface-muted);
  color: var(--ui-text);
  font: inherit;
  font-weight: 650;
  font-size: 0.82rem;
  padding: 0.55rem 1rem;
  border-radius: var(--ui-radius-sm);
  cursor: pointer;
  white-space: nowrap;
  box-shadow: var(--ui-shadow-sm);
  transition: border-color 0.12s ease, background 0.12s ease;
}

.btn-context-jump:hover {
  border-color: var(--ui-accent);
  background: var(--ui-accent-soft);
}

.btn-context-jump:focus-visible {
  outline: 2px solid var(--ui-accent);
  outline-offset: 2px;
}

.panel-subtitle {
  margin: 0;
  font-size: 1rem;
  font-weight: 750;
  color: var(--ui-text);
}

.room-setup-banner {
  margin-bottom: 1.25rem;
  padding: 1rem 1.2rem;
  border-radius: var(--ui-radius-md);
  border: 1px solid var(--ui-border);
  background: var(--ui-surface);
  box-shadow: var(--ui-shadow-sm);
}

.room-setup-title {
  margin: 0 0 0.35rem;
  font-size: 1.2rem;
  color: var(--ui-text);
}

.room-setup-desc {
  margin: 0 0 1rem;
  color: var(--ui-text-muted);
  font-size: 0.94rem;
}

.room-setup-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
}

.room-setup-prefix {
  font-size: 0.85rem;
  color: #617385;
  word-break: break-all;
}

.room-slug-input {
  flex: 1 1 160px;
  min-width: 0;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--ui-border-strong);
  border-radius: var(--ui-radius-sm);
  font: inherit;
  background: var(--ui-surface-muted);
  color: var(--ui-text);
}

.room-slug-msg {
  margin: 0.75rem 0 0;
  font-size: 0.9rem;
  color: #0d6b88;
}

.admin-tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 0;
  margin-bottom: 1rem;
  padding: 5px;
  border-radius: var(--ui-radius-md);
  background: var(--ui-surface-muted);
  border: 1px solid var(--ui-border);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.admin-tab {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 44px;
  padding: 0.55rem 0.85rem;
  border: none;
  border-radius: var(--ui-radius-sm);
  background: transparent;
  font-weight: 650;
  font-size: 0.86rem;
  cursor: pointer;
  color: var(--ui-text-muted);
  white-space: nowrap;
  transition:
    background 0.12s ease,
    color 0.12s ease,
    box-shadow 0.12s ease;
}

.admin-tab:hover {
  color: var(--ui-text);
}

.admin-tab:focus-visible {
  outline: 2px solid var(--ui-accent);
  outline-offset: 2px;
}

.admin-tab.is-active {
  background: var(--ui-surface);
  color: var(--ui-text);
  box-shadow: var(--ui-shadow-sm);
}

.admin-tab-panel {
  margin-bottom: 1rem;
}

.admin-advanced-intro {
  padding: 1rem 0 0;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--ui-border);
}

.branding-form {
  display: grid;
  gap: 0.85rem;
  max-width: 520px;
}

.branding-form input[type="text"],
.branding-form input[type="url"] {
  width: 100%;
  border: 1px solid var(--ui-border-strong);
  border-radius: var(--ui-radius-sm);
  padding: 0.62rem 0.75rem;
  background: var(--ui-surface-muted);
  color: var(--ui-text);
  font-size: 0.95rem;
}

.branding-form input[type="text"]:focus-visible,
.branding-form input[type="url"]:focus-visible {
  outline: none;
  border-color: var(--ui-accent);
  box-shadow: 0 0 0 3px var(--ui-accent-ring);
  background: var(--ui-surface);
}

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

/* ---- Marketing: Broadcast Scorecard ---- */
.view-marketing {
  display: none;
  min-height: 100vh;
  min-height: 100svh;
  min-height: 100dvh;
  background: #04050a;
  color: #fff;
  overflow-x: hidden;
  font-family: "DM Sans", ui-sans-serif, sans-serif;
}

body.marketing-active .view-marketing {
  display: block;
}

body.marketing-active .timer-screen,
body.marketing-active .admin-screen,
body.marketing-active #view-landing {
  display: none !important;
}

/* ── Floating pill nav ── */
.mkt-nav-wrap {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  padding: 1rem 1.25rem;
  pointer-events: none;
}

.mkt-nav-pill {
  max-width: 72rem;
  margin: 0 auto;
  height: 3.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-radius: 1rem;
  border: 1px solid rgba(255,255,255,0.07);
  background: rgba(255,255,255,0.03);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 0 1.25rem;
  pointer-events: all;
}

.mkt-wordmark {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 700;
  font-size: 0.88rem;
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  letter-spacing: -0.01em;
  flex-shrink: 0;
}

.mkt-wordmark-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 6px;
  background: #4ade80;
  color: #04050a;
  font-size: 0.75rem;
  font-weight: 900;
  flex-shrink: 0;
}

.mkt-nav-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.mkt-nav-link {
  font-size: 0.78rem;
  font-weight: 500;
  color: rgba(255,255,255,0.35);
  text-decoration: none;
  transition: color 0.15s ease;
}

.mkt-nav-btn {
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
  cursor: pointer;
}

.mkt-nav-link:hover {
  color: rgba(255,255,255,0.7);
}

.mkt-nav-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

/* Ghost btn (Sign up) */
.btn-mkt-ghost {
  font-size: 0.78rem;
  font-weight: 600;
  color: rgba(255,255,255,0.4);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.35rem 0.6rem;
  border-radius: 8px;
  font-family: inherit;
  transition: color 0.15s ease;
}

.btn-mkt-ghost:hover {
  color: rgba(255,255,255,0.7);
}

/* Green CTA */
.btn-mkt-green {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-weight: 900;
  background: #4ade80;
  color: #04050a;
  border-radius: 0.75rem;
  text-decoration: none;
  transition: background 0.15s ease;
}

.btn-mkt-green:hover {
  background: #86efac;
}

.btn-mkt-nav-cta {
  font-size: 0.78rem;
  padding: 0.45rem 0.85rem;
  border-radius: 8px;
}

.btn-mkt-lg {
  font-size: 0.9rem;
  padding: 0.9rem 1.75rem;
  border-radius: 0.9rem;
}

/* Outline btn (See how it works) */
.btn-mkt-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.9rem 1.75rem;
  border-radius: 0.9rem;
  border: 1px solid rgba(255,255,255,0.07);
  color: rgba(255,255,255,0.3);
  text-decoration: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.btn-mkt-outline:hover {
  color: rgba(255,255,255,0.6);
  border-color: rgba(255,255,255,0.2);
}

/* ── Lang switch ── */
.lang-switch {
  display: inline-flex;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  overflow: hidden;
  background: rgba(0, 0, 0, 0.25);
}

.lang-switch--light {
  border-color: rgba(20, 32, 43, 0.15);
  background: #f2f5f8;
}

.lang-switch--toolbar {
  border-color: rgba(20, 32, 43, 0.12);
  background: #fff;
}

.lang-switch-btn {
  border: 0;
  margin: 0;
  padding: 0.35rem 0.65rem;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  cursor: pointer;
  background: transparent;
  color: rgba(255, 255, 255, 0.75);
}

.lang-switch--light .lang-switch-btn,
.lang-switch--toolbar .lang-switch-btn {
  color: #3d5266;
}

.lang-switch-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

.lang-switch--light .lang-switch-btn:hover,
.lang-switch--toolbar .lang-switch-btn:hover {
  background: var(--ui-accent-soft);
}

.lang-switch-btn.is-active {
  background: rgba(99, 102, 241, 0.42);
  color: #fff;
}

.lang-switch--light .lang-switch-btn.is-active,
.lang-switch--toolbar .lang-switch-btn.is-active {
  background: var(--ui-accent);
  color: #fff;
}

/* ── Main wrapper ── */
.mkt-main {
  position: relative;
}

/* ── Hero ── */
.mkt-hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-top: 5rem;
  padding-bottom: 4rem;
  overflow: hidden;
}

/* Glow blobs */
.mkt-glow-outer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.mkt-glow-outer::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: rgba(74,222,128,0.03);
  filter: blur(120px);
}

.mkt-glow-inner {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.mkt-glow-inner::after {
  content: '';
  position: absolute;
  top: calc(50% - 80px);
  left: 50%;
  transform: translate(-50%, -50%);
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: rgba(74,222,128,0.04);
  filter: blur(60px);
}

.mkt-hero > * {
  position: relative;
  z-index: 1;
}

/* Live indicator */
.mkt-live-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.62rem;
  font-family: ui-monospace, "DM Mono", monospace;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.22);
  margin-bottom: 2rem;
}

.mkt-live-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4ade80;
  animation: mkt-dot-pulse 2s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes mkt-dot-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

/* Giant clock */
.mkt-clock {
  font-size: clamp(72px, 16vw, 144px);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
  line-height: 1;
  color: rgba(255,255,255,0.92);
  text-shadow:
    0 0 80px rgba(74,222,128,0.15),
    0 0 160px rgba(74,222,128,0.08);
  margin-bottom: 1.25rem;
  user-select: none;
}

/* Blinds bar */
.mkt-blinds-bar {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  font-family: ui-monospace, "DM Mono", monospace;
  margin-bottom: 3rem;
}

.mkt-blinds-label {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.2);
}

.mkt-blinds-val {
  font-size: 1.1rem;
  font-weight: 700;
  color: #4ade80;
}

.mkt-blinds-div {
  display: inline-block;
  width: 1px;
  height: 1rem;
  background: rgba(255,255,255,0.1);
}

.mkt-blinds-ante {
  font-size: 1.1rem;
  font-weight: 700;
  color: rgba(255,255,255,0.45);
}

/* Hero headline */
.mkt-hero-text {
  text-align: center;
  max-width: 34rem;
  margin-bottom: 2.25rem;
  padding: 0 1rem;
}

.mkt-hero-title {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: rgba(255,255,255,0.9);
  margin: 0 0 0.75rem;
}

.mkt-hero-sub {
  font-size: 0.9rem;
  line-height: 1.6;
  color: rgba(255,255,255,0.3);
  margin: 0;
}

/* Hero CTAs */
.mkt-hero-ctas {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 2.25rem;
}

/* Screen badges */
.mkt-screen-badges {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 4rem;
  padding: 0 1rem;
}

.mkt-screen-badge {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.65rem;
  color: rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  white-space: nowrap;
}

/* Scroll hint */
.mkt-scroll-hint {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
}

.mkt-scroll-text {
  font-size: 0.58rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.15);
}

.mkt-scroll-line {
  display: block;
  width: 1px;
  height: 2.5rem;
  background: linear-gradient(to bottom, rgba(255,255,255,0.15), transparent);
}

/* ── Features ── */
.mkt-features {
  border-top: 1px solid rgba(255,255,255,0.05);
  padding: 3rem 1.5rem;
}

.mkt-features-eyebrow {
  text-align: center;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.2);
  margin: 0 0 2.5rem;
}

.mkt-feature-strips {
  max-width: 62rem;
  margin: 0 auto;
  display: grid;
  gap: 2.5rem;
}

@media (min-width: 720px) {
  .mkt-feature-strips {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }
}

.mkt-feature-strip {
  position: relative;
  padding-left: 2rem;
}

.mkt-strip-num {
  position: absolute;
  left: 0;
  top: 0;
  font-size: 0.62rem;
  font-family: ui-monospace, monospace;
  font-weight: 700;
  color: rgba(74,222,128,0.4);
}

.mkt-strip-line {
  position: absolute;
  left: 3px;
  top: 1.2rem;
  bottom: 0;
  width: 1px;
  background: rgba(255,255,255,0.04);
}

.mkt-feature-strip h3 {
  font-size: 0.9rem;
  font-weight: 900;
  color: rgba(255,255,255,0.8);
  margin: 0 0 0.5rem;
  letter-spacing: -0.01em;
}

.mkt-feature-strip p {
  font-size: 0.78rem;
  line-height: 1.65;
  color: rgba(255,255,255,0.3);
  margin: 0;
}

/* ── Bottom CTA bar ── */
.mkt-cta-bar {
  border-top: 1px solid rgba(255,255,255,0.05);
  padding: 3.5rem 1.5rem;
  text-align: center;
}

.mkt-cta-bar h2 {
  font-size: clamp(1.25rem, 3vw, 1.6rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  color: rgba(255,255,255,0.9);
  margin: 0 0 0.65rem;
}

.mkt-cta-bar p {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.3);
  margin: 0 0 1.75rem;
}

/* ── Footer ── */
.mkt-footer {
  border-top: 1px solid rgba(255,255,255,0.04);
  padding: 1.25rem 1.5rem;
  text-align: center;
}

.mkt-footer p {
  font-size: 0.65rem;
  color: rgba(255,255,255,0.15);
  margin: 0;
}


.auth-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.admin-privacy-strip {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  border-radius: var(--ui-radius-md);
  border: 1px solid var(--ui-border);
  background: var(--ui-accent-soft);
}

.admin-privacy-icon {
  flex-shrink: 0;
  font-size: 1.1rem;
  line-height: 1.2;
}

.admin-privacy-text {
  margin: 0;
  font-size: 0.84rem;
  font-weight: 550;
  color: var(--ui-text-secondary);
  line-height: 1.45;
}



/* ═══════════════════════════════════════════════════════════════
   DASHBOARD NAV
═══════════════════════════════════════════════════════════════ */
.dash-nav {
  position: sticky;
  top: 0;
  z-index: 200;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--ui-border);
  box-shadow: 0 1px 0 rgba(0,0,0,0.04), 0 4px 16px rgba(0,0,0,0.05);
}

.dash-nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(1rem, 2vw, 1.5rem);
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.dash-nav-brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
}

.dash-nav-logo {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: #4ade80;
  color: #04050a;
  font-weight: 900;
  font-size: 0.95rem;
  display: grid;
  place-items: center;
}

.dash-nav-appname {
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--ui-text);
  white-space: nowrap;
}

.dash-nav-sep {
  color: var(--ui-border-strong);
  font-weight: 400;
  font-size: 1rem;
}

.dash-nav-venue {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--ui-text-muted);
  min-width: 0;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dash-nav-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.dash-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.42rem 0.85rem;
  border-radius: 8px;
  border: 1px solid var(--ui-border-strong);
  background: var(--ui-surface);
  color: var(--ui-text-secondary);
  font: inherit;
  font-weight: 650;
  font-size: 0.82rem;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.12s ease, border-color 0.12s ease;
  white-space: nowrap;
}

.dash-nav-btn:hover {
  background: var(--ui-surface-muted);
  border-color: var(--ui-text-muted);
}

.dash-nav-btn--outline {
  background: transparent;
  border-color: var(--ui-border);
  color: var(--ui-text-muted);
}

.dash-nav-btn--outline:hover {
  background: var(--ui-surface-muted);
  color: var(--ui-text);
}

/* ═══════════════════════════════════════════════════════════════
   DASHBOARD LIST LAYOUT
═══════════════════════════════════════════════════════════════ */
.admin-tabs--hidden {
  display: none !important;
}

.admin-context-bar--hidden {
  display: none !important;
}

.dash-list-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.dash-list-title {
  margin: 0 0 0.25rem;
  font-size: clamp(1.35rem, 2.5vw, 1.65rem);
  font-weight: 900;
  letter-spacing: -0.025em;
  color: var(--ui-text);
}

.dash-list-desc {
  margin: 0;
  font-size: 0.9rem;
  color: var(--ui-text-muted);
  line-height: 1.45;
}

.dash-list-desc strong {
  color: var(--ui-text-secondary);
  font-weight: 700;
}

.dash-list-header-right {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.preset-picker--compact {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  grid-template-columns: none !important;
  margin-bottom: 0 !important;
}

.preset-picker--compact .preset-card {
  padding: 0.38rem 0.72rem;
  font-size: 0.78rem;
  gap: 0;
  display: inline-flex;
  align-items: center;
  border-radius: 8px;
}

.preset-picker--compact .preset-card span {
  display: none;
}

.preset-picker--compact .preset-card strong {
  font-size: 0.78rem;
  font-weight: 700;
}

.dash-panel-back {
  margin-bottom: 1rem;
}

.dash-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.85rem;
  border: 1px solid var(--ui-border-strong);
  border-radius: 8px;
  background: var(--ui-surface);
  color: var(--ui-text-secondary);
  font: inherit;
  font-weight: 650;
  font-size: 0.86rem;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease;
}

.dash-back-btn:hover {
  background: var(--ui-surface-muted);
  border-color: var(--ui-text-muted);
}

/* ═══════════════════════════════════════════════════════════════
   GAME ROW — new list layout
═══════════════════════════════════════════════════════════════ */
.game-list--rows {
  max-width: none !important;
  margin: 0 !important;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--ui-border);
  border-radius: var(--ui-radius-md);
  overflow: hidden;
  gap: 0 !important;
}

.game-row {
  display: flex;
  flex-direction: column;
  background: var(--ui-surface);
  border-bottom: 1px solid var(--ui-border);
  transition: background 0.12s ease;
}

.game-row:last-child {
  border-bottom: none;
}

.game-row.is-active {
  background: rgba(79, 70, 229, 0.025);
}

.game-row-main {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.9rem 1.15rem;
}

.game-row-info {
  flex: 1;
  min-width: 0;
}

.game-row-name-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.5rem;
  margin-bottom: 0.15rem;
}

.game-row-name {
  font-weight: 800;
  font-size: 0.98rem;
  color: var(--ui-text);
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.game-row-subtitle {
  margin: 0;
  font-size: 0.82rem;
  color: var(--ui-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 28ch;
}

/* Badges */
.game-row-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  padding: 0.14rem 0.55rem;
  border-radius: 999px;
  font-size: 0.63rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.game-row-badge--running {
  background: rgba(34, 197, 94, 0.1);
  color: #16a34a;
  border: 1px solid rgba(34, 197, 94, 0.2);
}

.game-row-badge--paused {
  background: rgba(251, 191, 36, 0.1);
  color: #92400e;
  border: 1px solid rgba(251, 191, 36, 0.22);
}

.game-row-badge-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  animation: row-badge-pulse 1.8s ease-in-out infinite;
}

@keyframes row-badge-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

/* Stats strip */
.game-row-stats {
  display: none;
  align-items: center;
  gap: 0.15rem;
  flex-shrink: 0;
}

@media (min-width: 860px) {
  .game-row-stats { display: flex; }
}

.game-row-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 3.8rem;
  padding: 0.25rem 0.6rem;
  border-radius: 8px;
}

.game-row-stat-label {
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ui-text-muted);
  margin-bottom: 0.1rem;
}

.game-row-stat-value {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--ui-text);
  line-height: 1.1;
}

.game-row-stat-value.is-mono {
  font-variant-numeric: tabular-nums;
}

.game-row-stat-value.is-live {
  color: #16a34a;
}

/* Actions cluster */
.game-row-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
}

/* Pause / Resume — the hero button */
.game-row-playpause {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.52rem 1rem;
  border-radius: 8px;
  border: none;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 750;
  cursor: pointer;
  transition: background 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
  /* Default: Resume (green) */
  background: rgba(34, 197, 94, 0.1);
  color: #15803d;
  box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.22);
}

.game-row-playpause:hover {
  background: rgba(34, 197, 94, 0.18);
  box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.32);
}

/* Running → pause button (amber) */
.game-row-playpause.is-running {
  background: rgba(251, 191, 36, 0.1);
  color: #92400e;
  box-shadow: inset 0 0 0 1px rgba(251, 191, 36, 0.24);
}

.game-row-playpause.is-running:hover {
  background: rgba(251, 191, 36, 0.18);
}

/* Edit button */
.game-row-edit-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.48rem 0.85rem;
  border-radius: 8px;
  border: 1px solid var(--ui-border-strong);
  background: var(--ui-surface);
  color: var(--ui-text-secondary);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 650;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
  white-space: nowrap;
}

.game-row-edit-btn:hover {
  background: var(--ui-surface-muted);
  border-color: var(--ui-text-muted);
}

.game-row-edit-btn.is-editing {
  background: var(--ui-accent-soft);
  border-color: rgba(79, 70, 229, 0.25);
  color: var(--ui-accent-hover);
}

/* Restart button */
.game-row-restart-btn {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--ui-border-strong);
  background: var(--ui-surface);
  color: var(--ui-text-muted);
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
  flex-shrink: 0;
}

.game-row-restart-btn:hover {
  background: rgba(239, 68, 68, 0.06);
  border-color: rgba(239, 68, 68, 0.35);
  color: #ef4444;
}

/* TV link button */
.game-row-tv-btn {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--ui-border-strong);
  background: var(--ui-surface);
  color: var(--ui-text-muted);
  text-decoration: none;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
  flex-shrink: 0;
}

.game-row-tv-btn:hover {
  background: var(--ui-surface-muted);
  border-color: var(--ui-text-muted);
  color: var(--ui-text);
}

/* ═══════════════════════════════════════════════════════════════
   INLINE EDITOR
═══════════════════════════════════════════════════════════════ */
/* ── Inline game editor panel ───────────────────────────────────────── */
.game-row-editor {
  border-top: 1px solid var(--ui-border);
  border-radius: 0 0 14px 14px;
  overflow: hidden;
}

.ged-body {
  padding: 0 1.25rem;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
}

.ged-section {
  padding: 1rem 0;
  border-bottom: 1px solid var(--ui-border);
}

.ged-section:last-child {
  border-bottom: none;
}

.ged-section-head {
  margin: 0 0 0.75rem;
  font-size: 0.67rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--ui-text-muted);
}

.ged-row {
  display: grid;
  gap: 0.6rem;
}

.ged-cols-2 { grid-template-columns: repeat(2, 1fr); }
.ged-cols-4 { grid-template-columns: repeat(4, 1fr); }
.ged-cols-5 { grid-template-columns: repeat(5, 1fr); }

.ged-field {
  display: grid;
  gap: 0.2rem;
}

.ged-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.025em;
  color: var(--ui-text-muted);
  text-transform: uppercase;
}

.ged-input {
  padding: 0.52rem 0.65rem;
  border: 1px solid var(--ui-border-strong);
  border-radius: 8px;
  background: #fff;
  color: var(--ui-text);
  font: inherit;
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
  width: 100%;
  box-sizing: border-box;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}

.ged-input:focus {
  outline: none;
  border-color: var(--ui-accent);
  box-shadow: 0 0 0 3px var(--ui-accent-ring);
}

.ged-hint {
  margin: 0.55rem 0 0;
  font-size: 0.74rem;
  color: var(--ui-text-muted);
}

.ged-footer {
  padding: 0.85rem 1.25rem;
  background: #eef2f7;
  border-top: 1px solid var(--ui-border);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
}

.ged-url-row {
  display: flex;
  flex: 1 1 260px;
  min-width: 0;
  gap: 0.45rem;
  align-items: center;
}

.ged-url-input {
  flex: 1;
  min-width: 0;
  padding: 0.45rem 0.65rem;
  border: 1px solid var(--ui-border-strong);
  border-radius: 8px;
  background: #fff;
  font: inherit;
  font-size: 0.78rem;
  color: var(--ui-text-muted);
}

.game-row-adv-link {
  border: none;
  background: none;
  padding: 0;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 650;
  color: var(--ui-accent);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  white-space: nowrap;
  flex-shrink: 0;
}

.game-row-adv-link:hover {
  color: var(--ui-accent-hover);
}

.ged-btn-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
  margin-left: auto;
}

/* Ensure admin-screen has room below sticky nav */
.admin-screen .admin-shell {
  padding-top: clamp(1rem, 2vw, 1.5rem);
}

/* ── Mobile adjustments ── */
@media (max-width: 640px) {
  /* Marketing nav */
  .mkt-nav-links {
    display: none;
  }

  /* Marketing CTAs stack vertically (scoped — do not affect dashboard) */
  .mkt-hero-ctas {
    flex-direction: column;
    align-items: stretch;
  }

  .mkt-hero-ctas .btn-mkt-lg {
    width: 100%;
    justify-content: center;
  }

  /* Dashboard nav — slim down on mobile */
  .dash-nav-sep,
  .dash-nav-venue,
  .dash-nav-appname,
  .admin-account-label,
  .admin-account-name,
  #admin-open-room-link,
  #admin-open-display-link {
    display: none !important;
  }

  .dash-nav-inner {
    padding: 0 0.75rem;
    height: 48px;
  }

  .dash-nav-btn {
    padding: 0.35rem 0.65rem;
    font-size: 0.78rem;
  }

  /* Dashboard list header: let content flow naturally */
  .dash-list-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  /* Preset pills: scroll horizontally, never wrap */
  .preset-picker--compact {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    max-width: 100%;
    padding-bottom: 2px;
  }

  .preset-picker--compact::-webkit-scrollbar {
    display: none;
  }

  /* Add-game button: auto width, left-aligned */
  #add-game {
    width: auto;
    align-self: flex-start;
  }

  /* Game row — wrap actions below info on narrow screens */
  .game-row-main {
    padding: 0.75rem 0.85rem;
    gap: 0.5rem 0.6rem;
    flex-wrap: wrap;
    align-items: flex-start;
  }

  /* Info takes all space after the radio button, stays on first row */
  .game-row-info {
    flex: 1 1 0;
    min-width: 0;
  }

  /* Actions drop to a new row, indented to match info column */
  .game-row-actions {
    flex: 0 0 100%;
    padding-left: calc(20px + 0.6rem); /* radio width + gap */
    gap: 0.4rem;
  }

  .game-row-playpause {
    padding: 0.42rem 0.65rem;
    font-size: 0.82rem;
    gap: 0.3rem;
  }

  .game-row-edit-btn {
    padding: 0.38rem 0.65rem;
    font-size: 0.82rem;
    gap: 0.3rem;
  }

  .game-row-tv-btn {
    width: 32px;
    height: 32px;
  }
}

/* Room setup inner wrapper */
.room-setup-inner {
  padding: 0;
}

/* ═══════════════════════════════════════════════════════════════
   ONBOARDING WIZARD
═══════════════════════════════════════════════════════════════ */

#onboarding-modal {
  position: fixed;
  inset: 0;
  z-index: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(4, 5, 10, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

#onboarding-modal[hidden] {
  display: none;
}

.ob-card {
  width: 100%;
  max-width: 460px;
  background: #0e1117;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 22px;
  padding: clamp(1.5rem, 4vw, 2.1rem);
  box-shadow:
    0 0 0 1px rgba(74, 222, 128, 0.09),
    0 40px 80px rgba(0, 0, 0, 0.65);
  animation: ob-in 0.25s ease;
}

@keyframes ob-in {
  from { opacity: 0; transform: translateY(12px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0)    scale(1);    }
}

.ob-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.75rem;
}

.ob-logo {
  width: 34px;
  height: 34px;
  background: #4ade80;
  color: #04050a;
  font-weight: 900;
  font-size: 1rem;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ob-dots {
  display: flex;
  gap: 0.45rem;
}

.ob-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  transition: background 0.2s ease, transform 0.2s ease;
}

.ob-dot.active {
  background: #4ade80;
  transform: scale(1.25);
}

/* Steps */
.ob-step {
  display: none;
}

.ob-step.active {
  display: block;
  animation: ob-step-in 0.2s ease;
}

@keyframes ob-step-in {
  from { opacity: 0; transform: translateX(8px); }
  to   { opacity: 1; transform: translateX(0); }
}

.ob-step-title {
  margin: 0 0 0.4rem;
  font-size: clamp(1.25rem, 3vw, 1.55rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
}

.ob-step-desc {
  margin: 0 0 1.4rem;
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.45);
  line-height: 1.55;
}

.ob-label {
  display: block;
  margin-bottom: 1rem;
}

.ob-label-text {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.55);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 0.45rem;
}

.ob-input {
  width: 100%;
  padding: 0.7rem 0.9rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  color: #fff;
  font: inherit;
  font-size: 0.95rem;
  box-sizing: border-box;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.ob-input:focus {
  outline: none;
  border-color: rgba(74, 222, 128, 0.5);
  background: rgba(74, 222, 128, 0.05);
}

/* Color swatches */
.ob-swatches {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
  margin-bottom: 1.1rem;
}

.ob-swatch {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  cursor: pointer;
  border: 3px solid transparent;
  transition: transform 0.15s ease, border-color 0.15s ease;
  outline: none;
}

.ob-swatch:hover {
  transform: scale(1.18);
}

.ob-swatch.selected {
  border-color: rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.2);
}

.ob-color-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.ob-color-row input[type="color"] {
  width: 38px;
  height: 38px;
  border: 2px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  cursor: pointer;
  background: none;
  padding: 2px;
  flex-shrink: 0;
}

.ob-accent-hex {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
  font-family: ui-monospace, monospace;
}

/* Onboarding footer */
.ob-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.ob-skip {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.3);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.15s ease;
}

.ob-skip:hover {
  color: rgba(255, 255, 255, 0.6);
}

.ob-nav {
  display: flex;
  gap: 0.45rem;
}

.ob-btn-back {
  padding: 0.58rem 1.05rem;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease;
}

.ob-btn-back:hover {
  background: rgba(255, 255, 255, 0.12);
}

.ob-btn-next,
.ob-btn-finish {
  padding: 0.58rem 1.25rem;
  border-radius: 9px;
  border: none;
  background: #4ade80;
  color: #04050a;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
}

.ob-btn-next:hover,
.ob-btn-finish:hover {
  background: #6ee7a0;
}

.ob-btn-next:active,
.ob-btn-finish:active {
  transform: scale(0.97);
}
