@font-face {
  font-family: "Montserrat";
  src: url("../fonts/Montserrat-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
}

@font-face {
  font-family: "Montserrat";
  src: url("../fonts/Montserrat-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
}

:root {
  --cy-bg: #0b0f1a;
  --cy-panel: rgba(10, 18, 30, 0.8);
  --cy-panel-border: rgba(0, 229, 255, 0.25);
  --cy-accent: #00e5ff;
  --cy-accent-2: #ff5ca1;
  --cy-text: #eef7ff;
  --cy-muted: rgba(238, 247, 255, 0.78);
  --cy-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  margin: 0;
  font-family: "Montserrat", "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", sans-serif;
  color: var(--cy-text);
  font-size: 17px;
  background:
    linear-gradient(rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.88)),
    url("../images/wallpaperv1.jpg") no-repeat center center fixed;
  background-size: cover;
}

.app-wrap {
  min-height: 100%;
  padding: 28px 32px 48px;
}

.app-shell {
  min-height: 100%;
  padding: 20px 28px 40px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.app-body {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 18px;
  align-items: start;
}

.app-content {
  min-height: 60vh;
}

.app-sidebar {
  background: var(--cy-panel);
  border: 1px solid var(--cy-panel-border);
  border-radius: 14px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: var(--cy-shadow);
}

.sidebar-link {
  color: var(--cy-text);
  text-decoration: none;
  font-weight: 600;
  padding: 10px 14px 10px 16px;
  border-radius: 8px;
  border: 1px solid transparent;
  transition: background 0.15s ease, color 0.15s ease;
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
}

.sidebar-link .sidebar-icon {
  flex-shrink: 0;
  opacity: 0.7;
  transition: opacity 0.15s ease;
}

.sidebar-link:hover {
  background: rgba(255, 255, 255, 0.03);
  color: var(--cy-accent);
}
.sidebar-link:hover .sidebar-icon { opacity: 1; }

.sidebar-link.active {
  color: var(--cy-accent);
  background: rgba(0, 229, 255, 0.08);
  border-color: transparent;
}
.sidebar-link.active .sidebar-icon { opacity: 1; }
.sidebar-link.active::before {
  content: "";
  position: absolute;
  left: -1px;
  top: 6px;
  bottom: 6px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--cy-accent);
  box-shadow: 0 0 8px rgba(0, 229, 255, 0.6);
}

/* ── Sidebar "Tools" subsection ── */
.sidebar-tools-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 14px 0 8px;
}
.sidebar-tools-label {
  display: block;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.4);
  font-weight: 700;
  padding: 0 16px 4px;
}
.sidebar-link.sidebar-link-tool {
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.6);
}
.sidebar-link.sidebar-link-tool:hover {
  color: rgba(255, 255, 255, 0.9);
}

/* ── Velvet Purple theme ── */
body[data-theme="velvet-purple"] {
  --cy-bg: #150022;
  --cy-panel: rgba(22, 4, 42, 0.85);
  --cy-panel-border: rgba(180, 80, 255, 0.28);
  --cy-accent: #c77dff;
  --cy-accent-2: #ff2d78;
  --cy-text: #f0e0ff;
  --cy-muted: rgba(230, 200, 255, 0.75);
}

/* ── Midnight Gold theme ── */
body[data-theme="midnight-gold"] {
  --cy-bg: #120f04;
  --cy-panel: rgba(18, 14, 2, 0.88);
  --cy-panel-border: rgba(200, 160, 0, 0.28);
  --cy-accent: #f0c040;
  --cy-accent-2: #ff8c42;
  --cy-text: #fff8e0;
  --cy-muted: rgba(255, 240, 180, 0.75);
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.app-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  margin-bottom: 16px;
  background: rgba(8, 16, 28, 0.85);
  border: 1px solid var(--cy-panel-border);
  border-radius: 14px;
  box-shadow: var(--cy-shadow);
  -webkit-backdrop-filter: blur(8px) saturate(120%);
  backdrop-filter: blur(8px) saturate(120%);
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.nav-left a:not(.nav-brand) {
  color: var(--cy-text);
  text-decoration: none;
  font-weight: 600;
}

.nav-left a:not(.nav-brand):hover {
  color: var(--cy-accent);
}

.nav-brand {
  font-weight: 700;
  color: var(--cy-accent);
  text-decoration: none;
  text-shadow: 0 0 8px rgba(0, 229, 255, 0.25);
}

.nav-subtitle {
  color: var(--cy-muted);
  font-weight: 500;
  margin-left: 10px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--cy-muted);
  font-weight: 600;
}

.crumb-sep {
  color: var(--cy-muted);
  opacity: 0.7;
}

.crumb-current {
  color: var(--cy-text);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--cy-muted);
  font-weight: 600;
}

.nav-logout {
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 92, 161, 0.8);
  color: rgba(255, 92, 161, 0.95);
  background: rgba(0, 0, 0, 0.35);
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(255, 92, 161, 0.18);
}

.nav-logout:hover {
  background: rgba(255, 92, 161, 0.12);
  box-shadow: 0 0 14px rgba(255, 92, 161, 0.35);
}

.app-title {
  font-size: 32px;
  margin: 0;
  color: var(--cy-accent);
  text-shadow: 0 0 8px rgba(0, 229, 255, 0.3);
}

.app-link {
  color: var(--cy-accent);
  text-decoration: none;
  font-weight: 600;
}

.panel {
  background: var(--cy-panel);
  border: 1px solid var(--cy-panel-border);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: var(--cy-shadow);
}

.login-panel.is-logged-in input,
.login-panel.is-logged-in #login-btn {
  opacity: 0.55;
  pointer-events: none;
}

#login-status {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cy-inline-spinner {
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: cy-spin 0.8s linear infinite;
  color: var(--cy-accent);
}

.cy-inline-spinner[hidden] {
  display: none;
}

@keyframes cy-spin {
  to {
    transform: rotate(360deg);
  }
}

.toast-container {
  position: fixed;
  right: 18px;
  bottom: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 9999;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  width: min(420px, calc(100vw - 36px));
  background: rgba(8, 16, 28, 0.92);
  border: 1px solid rgba(0, 229, 255, 0.25);
  border-radius: 14px;
  padding: 12px 14px;
  box-shadow: var(--cy-shadow);
  -webkit-backdrop-filter: blur(10px) saturate(130%);
  backdrop-filter: blur(10px) saturate(130%);
}

.toast-title {
  font-weight: 700;
  margin-bottom: 4px;
}

.toast-body {
  color: var(--cy-muted);
  line-height: 1.25;
}

.toast--success {
  border-color: rgba(0, 230, 118, 0.45);
}

.toast--error {
  border-color: rgba(255, 122, 122, 0.5);
}

.toast--info {
  border-color: rgba(0, 229, 255, 0.25);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(0, 229, 255, 0.25);
  background: rgba(0, 0, 0, 0.28);
  color: var(--cy-text);
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.badge--waiting { border-color: rgba(255, 193, 7, 0.5); color: rgba(255, 220, 125, 0.95); }
.badge--running { border-color: rgba(0, 230, 118, 0.55); color: rgba(170, 255, 212, 0.95); }
.badge--finished { border-color: rgba(255, 122, 122, 0.55); color: rgba(255, 210, 210, 0.95); }
.badge--active { border-color: rgba(0, 229, 255, 0.45); color: rgba(160, 245, 255, 0.95); }
.badge--ended { border-color: rgba(255, 122, 122, 0.55); color: rgba(255, 210, 210, 0.95); }

.code-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 12px;
  border: 1px solid rgba(0, 229, 255, 0.35);
  background: rgba(0, 0, 0, 0.35);
  color: var(--cy-text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-weight: 800;
  letter-spacing: 1px;
}

.icon-btn {
  padding: 6px 10px;
  border-radius: 12px;
  margin-left: 8px;
  border: 1px solid rgba(0, 229, 255, 0.35);
  background: rgba(0, 0, 0, 0.35);
  color: var(--cy-accent);
  cursor: pointer;
  font-weight: 700;
}

.icon-btn:hover {
  background: rgba(0, 229, 255, 0.15);
}

.btn-icon,
.link-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  margin-right: 6px;
  color: var(--cy-accent);
  font-weight: 700;
  flex: 0 0 auto;
}

.link-icon {
  width: 16px;
  height: 16px;
  font-size: 14px;
}

.btn-icon svg,
.link-icon svg,
.feature-icon svg,
.icon {
  width: 16px;
  height: 16px;
  stroke: var(--cy-accent) !important;
  fill: none !important;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 4px rgba(0, 229, 255, 0.55));
}

.btn-icon svg path,
.btn-icon svg rect,
.btn-icon svg circle,
.btn-icon svg line,
.btn-icon svg polyline,
.btn-icon svg polygon,
.link-icon svg path,
.link-icon svg rect,
.link-icon svg circle,
.link-icon svg line,
.link-icon svg polyline,
.link-icon svg polygon,
.feature-icon svg path,
.feature-icon svg rect,
.feature-icon svg circle,
.feature-icon svg line,
.feature-icon svg polyline,
.feature-icon svg polygon {
  stroke: var(--cy-accent) !important;
  fill: none !important;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

.btn-danger {
  border-color: rgba(255, 122, 122, 0.75);
  color: rgba(255, 210, 210, 0.95);
  box-shadow: 0 4px 10px rgba(255, 122, 122, 0.2);
}

.btn-danger:hover {
  background: rgba(255, 122, 122, 0.12);
  box-shadow: 0 0 14px rgba(255, 122, 122, 0.35);
}

.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.filter-tab {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(0, 229, 255, 0.35);
  color: var(--cy-text);
  border-radius: 999px;
  padding: 6px 14px;
  cursor: pointer;
  font-weight: 600;
}

.filter-tab.active {
  color: var(--cy-accent);
  border-color: var(--cy-accent);
  background: rgba(0, 229, 255, 0.12);
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.25);
}

.sessions-create-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.sessions-list {
  display: grid;
  gap: 16px;
}

.session-card {
  overflow: hidden;
  border: 1px solid rgba(0, 229, 255, 0.22);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(0, 229, 255, 0.09), transparent 42%),
    rgba(7, 14, 26, 0.74);
  box-shadow: var(--cy-shadow);
  -webkit-backdrop-filter: blur(8px) saturate(120%);
  backdrop-filter: blur(8px) saturate(120%);
}

.session-card-head {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 20px 22px 20px 28px;
  background:
    linear-gradient(90deg, rgba(0, 229, 255, 0.14), rgba(0, 229, 255, 0.02) 60%, transparent),
    rgba(0, 229, 255, 0.04);
  border-bottom: 2px solid rgba(0, 229, 255, 0.35);
}

/* Vertical accent stripe on the left edge of the session header */
.session-card-head::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--cy-accent), var(--cy-accent-2));
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.55);
}

.session-card-eyebrow {
  color: var(--cy-accent);
  letter-spacing: 0.12em;
}

/* "Games in this session" label above the rows */
.session-games::before {
  content: "Games in this session";
  display: block;
  padding: 12px 22px 4px;
  color: var(--cy-muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.session-no-games {
  padding: 16px 22px 20px;
}

.session-card-title-block {
  min-width: 0;
}

.session-card-eyebrow,
.session-label {
  color: var(--cy-muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.session-card h2 {
  margin: 4px 0 8px;
  color: var(--cy-text);
  font-size: 22px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

/* Inline rename: pencil + editor */
.session-card-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.session-card-name {
  margin: 4px 0 8px;
}
.session-rename-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 6px;
  border: 1px solid rgba(0, 229, 255, 0.25);
  background: transparent;
  color: var(--cy-muted);
  cursor: pointer;
  margin-bottom: 4px;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.session-rename-btn:hover {
  color: var(--cy-accent);
  border-color: var(--cy-accent);
  background: rgba(0, 229, 255, 0.08);
}
.session-rename-editor {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  width: 100%;
  margin: 4px 0 8px;
}
.session-rename-editor input {
  flex: 1 1 240px;
  min-width: 200px;
  padding: 8px 10px;
  font-size: 18px;
  font-family: inherit;
  font-weight: 700;
  color: var(--cy-text);
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--cy-accent);
  border-radius: 8px;
  outline: none;
}
.session-rename-editor input:focus {
  box-shadow: 0 0 0 3px rgba(0, 229, 255, 0.18);
}
.session-rename-error {
  flex-basis: 100%;
  color: #ff7b9b;
  font-size: 12px;
}

/* Empty session: pulse the "Add Your First Game" CTA */
.create-game-btn.is-pulsing {
  position: relative;
  background: linear-gradient(90deg, var(--cy-accent), rgba(0, 229, 255, 0.85));
  color: #001722;
  font-weight: 800;
  border: none;
  box-shadow: 0 0 0 0 rgba(0, 229, 255, 0.55);
  animation: cy-pulse-cta 2.1s ease-in-out infinite;
}
.create-game-btn.is-pulsing:hover {
  background: linear-gradient(90deg, var(--cy-accent), #fff);
  animation-play-state: paused;
}
@keyframes cy-pulse-cta {
  0%   { box-shadow: 0 0 0 0 rgba(0, 229, 255, 0.55); transform: translateY(0); }
  60%  { box-shadow: 0 0 0 12px rgba(0, 229, 255, 0); transform: translateY(-1px); }
  100% { box-shadow: 0 0 0 0 rgba(0, 229, 255, 0); transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .create-game-btn.is-pulsing { animation: none; }
}

/* Date + venue meta items on the session card */
.session-card-date,
.session-card-venue {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(0, 229, 255, 0.06);
  border: 1px solid rgba(0, 229, 255, 0.18);
  color: var(--cy-muted);
  font-size: 12px;
  font-weight: 600;
}

.session-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  color: var(--cy-muted);
  font-size: 14px;
  font-weight: 600;
}

.session-card-actions,
.session-game-actions,
.session-display-actions,
.session-join-code {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.session-card-actions {
  justify-content: flex-end;
}

.session-card-actions button,
.session-game-actions button,
.session-display-actions button {
  margin: 0;
  white-space: nowrap;
}

.session-display-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 22px;
  border-bottom: 1px solid rgba(0, 229, 255, 0.16);
  background: rgba(0, 0, 0, 0.18);
}

.session-display-state {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.session-display-status-dot {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: rgba(174, 185, 200, 0.72);
  box-shadow: 0 0 8px rgba(174, 185, 200, 0.34);
}

.session-display-status-dot.is-ready {
  background: #20e87a;
  box-shadow: 0 0 10px rgba(32, 232, 122, 0.64);
}

.session-display-status-dot.is-offline {
  background: #ff7b9b;
  box-shadow: 0 0 10px rgba(255, 123, 155, 0.5);
}

.session-display-summary {
  display: block;
  color: var(--cy-text);
  font-size: 15px;
  line-height: 1.25;
}

.session-display-actions {
  justify-content: flex-end;
}

.session-display-list {
  display: grid;
  gap: 8px;
  padding: 0 22px;
  background: rgba(0, 0, 0, 0.12);
}

.session-display-list:empty {
  display: none;
}

.session-display-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(0, 229, 255, 0.1);
}

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

.session-display-row-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.session-display-row-main strong,
.session-display-row-main span {
  display: block;
}

.session-display-row-main strong {
  color: var(--cy-text);
  font-size: 14px;
  line-height: 1.2;
}

.session-display-row-main span {
  color: var(--cy-muted);
  font-size: 12px;
  line-height: 1.3;
}

.session-display-row-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.session-display-row-actions button {
  min-width: 104px;
  margin: 0;
  white-space: nowrap;
}

.session-games {
  display: grid;
}

.session-game-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.1fr) minmax(180px, 0.8fr) minmax(120px, 0.55fr) 568px;
  gap: 14px;
  align-items: center;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(0, 229, 255, 0.12);
}

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

.session-game-main,
.session-join,
.session-game-status {
  min-width: 0;
}

.session-game-kind {
  color: var(--cy-text);
  font-weight: 800;
  letter-spacing: 0.04em;
}

.session-game-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 6px;
  color: var(--cy-muted);
  font-size: 13px;
}

.session-join,
.session-game-status {
  display: grid;
  gap: 6px;
}

.session-game-actions {
  justify-content: flex-end;
}

.session-game-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 136px;
}

@media (max-width: 1320px) {
  .session-game-row {
    grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr);
  }

  .session-game-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
}

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

  .session-display-actions {
    justify-content: flex-start;
  }

  .session-display-row {
    align-items: stretch;
    flex-direction: column;
  }

  .session-display-row-actions {
    justify-content: flex-start;
  }
}

.session-no-games,
.sessions-empty {
  text-align: center;
}

.session-no-games {
  padding: 24px 18px;
}

.sessions-empty {
  padding: 40px 24px;
}

.sessions-empty h2 {
  margin: 0 0 8px;
  color: var(--cy-text);
  font-size: 22px;
}

.sessions-empty p {
  margin: 0 0 20px;
}

.sessions-empty-mark {
  width: 48px;
  height: 48px;
  margin: 0 auto 14px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(0, 229, 255, 0.35);
  border-radius: 12px;
  color: var(--cy-accent);
  background: rgba(0, 229, 255, 0.08);
  font-size: 32px;
  font-weight: 700;
  line-height: 1;
}

.session-group-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 6px;
}

.session-group-title {
  font-weight: 700;
  font-size: 20px;
}

.session-group-meta {
  color: var(--cy-muted);
  margin-top: 4px;
}

.session-group-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.session-group {
  background: rgba(8, 16, 28, 0.6);
  border: 1px solid var(--cy-panel-border);
  border-radius: 14px;
  padding: 8px 14px;
  margin-bottom: 14px;
  box-shadow: var(--cy-shadow);
}

.join-panel {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 16px;
  align-items: center;
}

.join-label {
  color: var(--cy-muted);
  font-weight: 700;
  letter-spacing: 0.3px;
}

.join-code-big {
  font-size: 42px;
  color: var(--cy-accent);
  font-weight: 800;
  letter-spacing: 3px;
  text-shadow: 0 0 10px rgba(0, 229, 255, 0.35);
  margin: 8px 0 6px;
}

.join-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 8px;
}

.qr-box {
  width: 220px;
  max-width: 100%;
  margin-left: auto;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 14px;
  padding: 10px;
  box-shadow: 0 10px 28px rgba(0,0,0,0.4);
}

.qr-box > img,
.qr-box canvas {
  width: 100% !important;
  height: auto !important;
  display: block;
}

.game-dashboard {
  display: grid;
  gap: 16px;
}

.game-dashboard-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 22px;
  align-items: center;
  margin-bottom: 0;
  padding: 22px;
  background:
    linear-gradient(135deg, rgba(0, 229, 255, 0.08), transparent 45%),
    rgba(7, 14, 26, 0.76);
}

.game-dashboard-hero-main {
  min-width: 0;
}

.game-dashboard-kicker,
.game-stat-label {
  color: var(--cy-muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.game-dashboard-title {
  margin: 5px 0 4px;
  color: var(--cy-text);
  font-size: 28px;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.game-dashboard-subtitle {
  font-size: 14px;
  font-weight: 600;
}

.game-dashboard-join {
  margin-top: 20px;
}

.game-dashboard-primary-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 14px;
}

.game-dashboard-run-btn {
  background: rgba(0, 229, 255, 0.14);
  color: var(--cy-accent);
  border-color: var(--cy-accent);
  box-shadow: 0 0 18px rgba(0, 229, 255, 0.28);
}

.game-dashboard-link-details {
  margin-top: 12px;
  color: var(--cy-muted);
}

.game-dashboard-link-details summary {
  cursor: pointer;
  display: inline-flex;
  color: var(--cy-accent);
  font-weight: 700;
}

.game-dashboard-link-details #join-link-text {
  margin-top: 8px;
  word-break: break-all;
}

.game-dashboard-qr {
  display: grid;
  gap: 8px;
  justify-items: center;
}

.game-dashboard-qr .qr-box {
  margin: 0;
}

.game-action-grid,
.game-stats-grid {
  display: grid;
  gap: 12px;
}

.game-action-grid {
  grid-template-columns: repeat(5, minmax(120px, 1fr));
}

.game-action-grid.is-arcade {
  grid-template-columns: repeat(5, minmax(120px, 1fr));
}

.game-action-tile {
  min-height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 14px;
  border: 1px solid rgba(0, 229, 255, 0.36);
  border-radius: 12px;
  background: rgba(7, 14, 26, 0.72);
  color: var(--cy-accent);
  text-decoration: none;
  font-weight: 800;
  box-shadow: 0 6px 16px rgba(0, 229, 255, 0.14);
}

.game-action-tile:hover {
  background: rgba(0, 229, 255, 0.12);
  box-shadow: 0 0 14px rgba(0, 229, 255, 0.38);
}

button.game-action-tile {
  width: 100%;
}

/* Allow tile labels to wrap to two lines (e.g. "Send Game to Bigscreen"). */
.game-action-tile span:not(.link-icon) {
  text-align: center;
  line-height: 1.2;
}

/* Destructive tile (End this Game) — fits the grid but reads as danger. */
.game-action-tile.is-danger {
  color: #ff6b8a;
  border-color: rgba(255, 79, 120, 0.45);
  box-shadow: 0 6px 16px rgba(255, 79, 120, 0.12);
}
.game-action-tile.is-danger:hover {
  background: rgba(255, 79, 120, 0.12);
  box-shadow: 0 0 14px rgba(255, 79, 120, 0.38);
}

.game-stats-grid {
  grid-template-columns: repeat(5, minmax(130px, 1fr));
}

.game-stat-card {
  min-height: 86px;
  display: grid;
  align-content: center;
  gap: 6px;
  padding: 14px;
  border: 1px solid rgba(0, 229, 255, 0.18);
  border-radius: 12px;
  background: rgba(7, 14, 26, 0.72);
  box-shadow: var(--cy-shadow);
}

.game-stat-card strong {
  color: var(--cy-text);
  font-size: 22px;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.game-session-strip {
  display: grid;
  grid-template-columns: 1.5fr 0.7fr 0.8fr;
  gap: 14px;
  align-items: center;
  margin-bottom: 0;
}

.game-session-strip > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.game-session-strip strong {
  overflow-wrap: anywhere;
}

.game-danger-zone {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-bottom: 0;
  border-color: rgba(255, 122, 122, 0.34);
}

.game-danger-zone p {
  margin: 5px 0 0;
  max-width: 720px;
}

.cards {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.cards.vertical {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  max-width: 960px;
}

.card {
  background: rgba(8, 16, 28, 0.75);
  border: 1px solid var(--cy-panel-border);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  padding: 16px;
  width: 240px;
  box-shadow: var(--cy-shadow);
}

.card h3 {
  margin-top: 0;
  color: var(--cy-accent);
}

.links a {
  color: var(--cy-accent);
  text-decoration: none;
}

.links a:hover {
  text-decoration: underline;
}

.links-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.sep {
  color: var(--cy-muted);
}

.row {
  margin: 8px 0;
}

.ads-toolbar {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-end;
}

.ads-toolbar label {
  min-width: 240px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1 1 260px;
}

.ads-form-grid {
  margin-top: 10px;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
}

.ads-form-grid label {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ads-inline-check {
  margin-top: 10px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.muted {
  color: var(--cy-muted);
}

.error {
  color: #ff7a7a;
}

.hidden {
  display: none !important;
}

.bingo-host-shell {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 3fr;
  gap: 16px;
  align-items: start;
}

/* Round Live: the players roster docks inside the live layout, so the
   left shell panel hides and the controls panel takes the full width. */
.bingo-host-shell.is-live-stage {
  grid-template-columns: 1fr;
}

.arcade-host-shell {
  display: grid;
  grid-template-columns: repeat(2, minmax(320px, 1fr));
  gap: 16px;
  align-items: start;
}

.arcade-host-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}

.arcade-stat-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.arcade-inline-card {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(0, 229, 255, 0.28);
  background: rgba(0, 0, 0, 0.22);
}

.arcade-table-wrap {
  overflow-x: auto;
}

.arcade-host-table input,
.arcade-host-table select {
  width: 100%;
  min-width: 90px;
}

.arcade-result-list {
  display: grid;
  gap: 10px;
}

.arcade-result-row {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 10px;
  align-items: end;
  padding: 10px 12px;
  border: 1px solid rgba(0, 229, 255, 0.2);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.22);
}

.arcade-standing-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  margin-bottom: 8px;
  border: 1px solid rgba(0, 229, 255, 0.24);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
}

.arcade-standing-points {
  font-weight: 800;
  color: var(--cy-accent);
}

.arcade-standings-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.bingo-host-headline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.bingo-host-tabs {
  display: flex;
  gap: 8px;
  margin: 8px 0 12px;
  flex-wrap: wrap;
}

.host-tab-btn {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(0, 229, 255, 0.35);
  color: var(--cy-muted);
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.host-tab-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}

.host-tab-btn.is-active {
  color: var(--cy-accent);
  border-color: var(--cy-accent);
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.22);
}

.host-tab-panel {
  display: none;
}

.host-tab-panel.is-active {
  display: block;
}

.host-stage-note {
  margin: -2px 0 10px;
}

/* Stage note + season scoring chip share one row; chip hugs the right edge. */
.host-stage-note-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.host-stage-note-row .host-stage-note { margin: -2px 0 10px; flex: 1 1 auto; min-width: 0; }

/* "Scoring to: <season>" — where tonight's wins land. Green = scoring,
   amber = casual night (not scored). Lock glyph appears after first call. */
.season-chip {
  flex: 0 0 auto;
  margin: -2px 0 10px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.8em;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
  border: 1px solid rgba(0, 255, 127, 0.45);
  color: #7dffc0;
  background: rgba(0, 255, 127, 0.08);
}
.season-chip.is-warn {
  border-color: rgba(255, 196, 0, 0.5);
  color: #ffd86b;
  background: rgba(255, 196, 0, 0.08);
}

@keyframes cy-round-live-pulse {
  0%, 100% { opacity: 1; text-shadow: 0 0 10px #00ff7f, 0 0 22px #00ff7f; }
  50%       { opacity: 0.55; text-shadow: none; }
}

@keyframes cy-tab-live-dot {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.3; }
}

.host-stage-note.is-round-live {
  color: #00ff7f;
  animation: cy-round-live-pulse 2.5s ease-in-out infinite;
}

/* "Live" status light on the Round Live tab — a small green dot, deliberately
   NOT the accent border/glow used for .is-active, so a live round can't be
   mistaken for the selected tab. The two indicators can show at once without
   fighting: the dot says "a round is live", the accent highlight says "you are
   here". */
.host-tab-btn.is-round-live {
  position: relative;
  padding-right: 26px;
}

.host-tab-btn.is-round-live::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 12px;
  width: 8px;
  height: 8px;
  margin-top: -4px;
  border-radius: 50%;
  background: #00ff7f;
  box-shadow: 0 0 6px #00ff7f;
  animation: cy-tab-live-dot 2.5s ease-in-out infinite;
}

.host-tab-link {
  text-decoration: none;
  margin-left: 0;
  font: inherit;
}

.host-tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: #ff3c6f;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  margin-left: 4px;
  line-height: 1;
}

/* ── Photo queue ── */
.photo-queue-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.photo-queue-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border: 1px solid var(--cy-border, rgba(0,240,255,0.15));
  border-radius: 10px;
  background: rgba(0,0,0,0.2);
}
.photo-queue-preview {
  width: 96px;
  height: 96px;
  border-radius: 10px;
  flex-shrink: 0;
  border: 2px solid rgba(0,240,255,0.3);
  background: rgba(0,0,0,0.35);
  overflow: hidden;
  position: relative;
}
.photo-queue-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.photo-queue-row--image-error .photo-queue-preview {
  display: grid;
  place-items: center;
}
.photo-queue-row--image-error .photo-queue-img {
  display: none;
}
.photo-queue-row--image-error .photo-queue-preview::after {
  content: "Image unavailable";
  color: rgba(255,255,255,0.72);
  font-size: 0.68rem;
  text-align: center;
  padding: 6px;
}
.photo-queue-info {
  flex: 1;
  min-width: 0;
  font-size: 0.85rem;
}
.photo-queue-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}
.photo-queue-approve {
  padding: 4px 12px;
  border-radius: 6px;
  border: 1px solid #2ecc71;
  background: rgba(46,204,113,0.15);
  color: #2ecc71;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}
.photo-queue-approve:hover { background: rgba(46,204,113,0.3); }
.photo-queue-reject {
  padding: 4px 12px;
  border-radius: 6px;
  border: 1px solid #ff6b6b;
  background: rgba(255,107,107,0.1);
  color: #ff6b6b;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}
.photo-queue-reject:hover { background: rgba(255,107,107,0.25); }

.bingo-host-title {
  margin: 0 0 10px;
  color: var(--cy-accent);
}

.bingo-host-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}

.bingo-host-list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  max-height: 380px;
  overflow-y: auto;
  /* Allow per-player menu to escape the scroll container */
  overflow-x: visible;
}
/* Only show scroll when actually needed */
.bingo-host-list:not(:hover)::-webkit-scrollbar { width: 0; }

.bingo-host-list li {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(0, 229, 255, 0.18);
  border-radius: 8px;
  padding: 8px 10px;
  margin-bottom: 8px;
}

/* Player row with per-player action menu */
.bingo-host-list li.player-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
}
.player-row-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
}
.player-row-menu-wrap { flex-shrink: 0; }
.player-row-menu-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.6);
  width: 30px;
  height: 30px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
  font-weight: 700;
  display: grid;
  place-items: center;
  padding: 0;
  letter-spacing: 0;
  transition: all 0.12s;
}
.player-row-menu-btn:hover {
  background: rgba(0, 229, 255, 0.1);
  color: #00e5ff;
  border-color: rgba(0, 229, 255, 0.4);
}
.player-row-menu-btn[aria-expanded="true"] {
  background: rgba(0, 229, 255, 0.15);
  color: #00e5ff;
  border-color: #00e5ff;
}
.player-row-menu {
  position: fixed;
  min-width: 180px;
  background: #0a0f1c;
  border: 1px solid rgba(0, 229, 255, 0.35);
  border-radius: 8px;
  padding: 4px;
  z-index: 200;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7), 0 0 20px rgba(0, 229, 255, 0.1);
}
.player-row-menu-item {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.9);
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.88rem;
  font-family: inherit;
}
.player-row-menu-item:hover { background: rgba(255, 255, 255, 0.06); }
.player-row-menu-item.is-danger { color: #ff5a8a; }
.player-row-menu-item.is-danger:hover { background: rgba(255, 60, 100, 0.12); }

/* ── Players page ── */
.players-page .players-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}
.players-page .players-actions { display: flex; gap: 8px; }
.players-filters { padding: 16px; }
.players-filter-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 12px;
  align-items: end;
}
.players-filter-grid label { display: flex; flex-direction: column; gap: 4px; font-size: 0.85rem; }
.players-filter-label { color: rgba(255,255,255,0.6); font-weight: 600; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; }
.players-filter-grid input, .players-filter-grid select {
  padding: 8px 10px;
  background: rgba(0,0,0,0.4);
  border: 1px solid rgba(255,255,255,0.12);
  color: #fff;
  border-radius: 6px;
  font-size: 0.9rem;
}
.players-quick-row { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.players-table-panel { margin-top: 14px; padding: 0; }
.players-table-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 16px; border-bottom: 1px solid rgba(255,255,255,0.06);
}
.players-count { font-weight: 700; }
.players-table-wrap { overflow-x: auto; }
.players-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.players-table th {
  text-align: left;
  padding: 10px 14px;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.5);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  background: rgba(0,0,0,0.25);
  font-weight: 700;
}
.players-table td {
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  vertical-align: top;
}
.players-table tr:hover td { background: rgba(255,255,255,0.02); }
.players-sub { font-size: 0.75rem; margin-top: 2px; }
.players-game-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(0,229,255,0.1);
  color: #00e5ff;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.opt-pill {
  display: inline-grid;
  place-items: center;
  width: 22px; height: 22px;
  border-radius: 50%;
  font-size: 0.75rem;
  margin-right: 4px;
}
.opt-pill.opt-yes { background: rgba(57,255,20,0.15); color: #39ff14; }
.opt-pill.opt-no  { background: rgba(255,255,255,0.05); color: rgba(255,255,255,0.25); }

/* ── Stats page ── */
.stats-page .stats-hero { margin-bottom: 16px; }
.stats-section-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; gap: 10px; flex-wrap: wrap; }
.stats-create-row { display: flex; gap: 8px; }
.stats-create-row input { flex: 1; padding: 8px 10px; background: rgba(0,0,0,0.4); border: 1px solid rgba(255,255,255,0.12); color: #fff; border-radius: 6px; }
.stats-season-list { display: flex; flex-direction: column; gap: 8px; }
.stats-season-group { display: flex; flex-direction: column; gap: 8px; }
.stats-season-group + .stats-season-group { margin-top: 10px; }
.stats-season-group-label { font-size: 0.82em; letter-spacing: 0.04em; text-transform: uppercase; }
.stats-season-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
}
.stats-season-name { font-weight: 700; font-size: 1rem; }
.stats-season-meta { font-size: 0.8rem; margin-top: 2px; }
.stats-season-actions { display: flex; gap: 6px; }
.season-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.season-pill-active { background: rgba(57,255,20,0.12); color: #39ff14; }
.season-pill-closed { background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.5); }
.stats-leaderboard-panel { margin-top: 14px; }
.stats-leaderboard-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.stats-leaderboard-table th { text-align: left; padding: 8px 12px; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: rgba(255,255,255,0.5); border-bottom: 1px solid rgba(255,255,255,0.08); }
.stats-leaderboard-table td { padding: 10px 12px; border-bottom: 1px solid rgba(255,255,255,0.04); }
.stats-leaderboard-table td.rank { font-weight: 800; color: #00e5ff; width: 40px; }
.stats-leaderboard-table td.points { font-weight: 700; color: #ff3cac; }
.stats-coming-soon { margin-top: 14px; }

/* Session history (inside Stats, collapsible) */
.stats-history-panel { margin-top: 14px; padding: 0; }
.stats-history-panel[open] { padding-bottom: 18px; }
.stats-history-summary {
  list-style: none;
  cursor: pointer;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
}
.stats-history-summary::-webkit-details-marker { display: none; }
.stats-history-summary-text { display: flex; flex-direction: column; gap: 2px; }
.stats-history-summary-title { font-size: 1.05rem; font-weight: 700; color: rgba(255,255,255,0.9); }
.stats-history-summary-meta { font-size: 0.82em; }
.stats-history-chevron {
  font-size: 1.1rem;
  transition: transform 0.15s ease;
  color: rgba(255,255,255,0.5);
}
.stats-history-panel[open] .stats-history-chevron { transform: rotate(180deg); }
.stats-history-body { padding: 0 18px; }
.stats-history-tabs { display: flex; gap: 4px; }
.stats-history-tab {
  padding: 5px 12px;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.7);
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.stats-history-tab.is-active { background: rgba(0,229,255,0.1); color: #00e5ff; border-color: rgba(0,229,255,0.4); }
.stats-history-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.stats-history-table th { text-align: left; padding: 8px 12px; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: rgba(255,255,255,0.5); border-bottom: 1px solid rgba(255,255,255,0.08); }
.stats-history-table td { padding: 10px 12px; border-bottom: 1px solid rgba(255,255,255,0.04); }

/* Per-game ad picker (Lobby Tools) */
.game-ads-picker {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 6px;
}
.game-ad-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
}
.game-ad-thumb {
  width: 48px;
  height: 48px;
  border-radius: 6px;
  object-fit: cover;
  background: rgba(0,0,0,0.4);
  flex-shrink: 0;
}
.game-ad-thumb-empty {
  display: grid;
  place-items: center;
  color: rgba(255,255,255,0.4);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.1em;
}
.game-ad-name { flex: 1; font-weight: 600; }
.game-ad-row.is-applied {
  border-color: rgba(0, 255, 127, 0.5);
  background: rgba(0, 255, 127, 0.07);
}
.game-ad-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  color: #00ff7f;
  background: rgba(0, 255, 127, 0.12);
  border: 1px solid rgba(0, 255, 127, 0.4);
  white-space: nowrap;
}
.coming-soon-pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(0,229,255,0.15), rgba(255,60,172,0.15));
  border: 1px solid rgba(0,229,255,0.35);
  color: #00e5ff;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.stats-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}
.stats-preview-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.stats-preview-icon { font-size: 1.6rem; opacity: 0.9; }
.stats-preview-title { font-weight: 700; color: rgba(255,255,255,0.92); font-size: 0.95rem; }
.stats-preview-body { font-size: 0.82rem; line-height: 1.4; }

/* ── Players reports teaser ── */
.players-reports-teaser {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  margin-top: 14px;
  background: linear-gradient(90deg, rgba(0,229,255,0.04), rgba(255,60,172,0.04));
  border: 1px solid rgba(0,229,255,0.2);
  border-radius: 10px;
}
.reports-teaser-icon { font-size: 1.5rem; }
.reports-teaser-body { font-size: 0.9rem; line-height: 1.4; }
.reports-teaser-body a { color: #00e5ff; text-decoration: none; font-weight: 700; }
.reports-teaser-body a:hover { text-decoration: underline; }

/* ── Create Session: game-type cards ── */
.gametype-tag {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 800;
  vertical-align: middle;
}
.gametype-tag-flagship {
  background: linear-gradient(90deg, rgba(0,229,255,0.2), rgba(255,60,172,0.2));
  color: #00e5ff;
  border: 1px solid rgba(0,229,255,0.4);
}
.gametype-tag-soon {
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.5);
  border: 1px solid rgba(255,255,255,0.15);
}
.gametype-best-for {
  font-size: 0.82em;
  margin-top: -4px;
}
.card.card-disabled { opacity: 0.55; }

/* game-type cards: push button to card bottom + full-width */
.cards.vertical .card p {
  flex: 1;
}
.cards.vertical .card .btn {
  margin-top: auto;
  width: 100%;
  text-align: center;
}

/* ── Card builder: platform-set "starter" notice ── */
#entries-lock-notice.is-platform-notice {
  background: linear-gradient(90deg, rgba(0,229,255,0.08), rgba(255,60,172,0.04));
  border: 1px solid rgba(0,229,255,0.35);
  color: rgba(255,255,255,0.85);
  border-radius: 10px;
  padding: 0;
}
.builder-platform-notice-body {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
}
.builder-platform-notice-icon { font-size: 1.4rem; }
.builder-platform-notice-cta { margin-left: auto; white-space: nowrap; }

/* ── Welcome / Quick Start modal ── */
.cy-welcome-overlay {
  position: fixed;
  inset: 0;
  z-index: 9990;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.cy-welcome-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(2px);
  cursor: pointer;
}
.cy-welcome-modal {
  position: relative;
  width: 100%;
  max-width: 560px;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  background: #0a0f1c;
  border: 1px solid rgba(0, 229, 255, 0.4);
  border-radius: 14px;
  padding: 28px 28px 22px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7), 0 0 50px rgba(0, 229, 255, 0.12);
}
.cy-welcome-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: none;
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.2rem;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.cy-welcome-close:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }
.cy-welcome-head { margin-bottom: 20px; }
.cy-welcome-eyebrow {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #00e5ff;
  font-weight: 800;
  margin-bottom: 6px;
}
.cy-welcome-head h2 {
  margin: 0 0 6px;
  font-size: 1.5rem;
  background: linear-gradient(90deg, #00e5ff, #ff3cac);
  -webkit-background-clip: text;
  color: transparent;
}
.cy-welcome-sub {
  margin: 0;
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.92rem;
  line-height: 1.4;
}
.cy-welcome-steps {
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.cy-welcome-step {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 12px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  transition: all 0.15s ease;
}
.cy-welcome-step:hover { border-color: rgba(0, 229, 255, 0.3); }
.cy-welcome-step.is-done {
  background: rgba(57, 255, 20, 0.04);
  border-color: rgba(57, 255, 20, 0.25);
}
.cy-welcome-step-check {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.4);
  font-weight: 800;
  font-size: 0.95rem;
  flex-shrink: 0;
  margin-top: 1px;
}
.cy-welcome-step.is-done .cy-welcome-step-check {
  background: rgba(57, 255, 20, 0.15);
  border-color: #39ff14;
  color: #39ff14;
}
.cy-welcome-step-title {
  font-weight: 700;
  color: rgba(255, 255, 255, 0.95);
  font-size: 0.95rem;
  margin-bottom: 3px;
}
.cy-welcome-step.is-done .cy-welcome-step-title { color: rgba(255, 255, 255, 0.65); }
.cy-welcome-step-desc {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.82rem;
  line-height: 1.4;
  margin-bottom: 6px;
}
.cy-welcome-step-cta {
  color: #00e5ff;
  font-weight: 700;
  font-size: 0.82rem;
  text-decoration: none;
}
.cy-welcome-step-cta:hover { text-decoration: underline; }
.cy-welcome-step.is-done .cy-welcome-step-cta { display: none; }
.cy-welcome-optional {
  font-weight: 400;
  font-size: 0.78em;
  color: rgba(255, 255, 255, 0.45);
  margin-left: 4px;
}
.cy-welcome-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 14px;
}
.cy-welcome-tip {
  font-size: 0.78rem;
  flex: 1;
  min-width: 0;
}
.cy-welcome-actions { display: flex; gap: 8px; flex-shrink: 0; }
.cy-welcome-skip {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.7);
  padding: 7px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: inherit;
}
.cy-welcome-skip:hover { background: rgba(255, 255, 255, 0.04); }
.cy-welcome-start {
  background: linear-gradient(135deg, #00c6ff, #0072ff);
  border: none;
  color: #fff;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 700;
  font-family: inherit;
}
.cy-welcome-start:hover { filter: brightness(1.1); }

/* ── Tooltip + Help toggle (top bar) ── */
.nav-tips-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  user-select: none;
  margin-right: 6px;
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.82rem;
  font-weight: 600;
}
.nav-tips-toggle input { display: none; }
.tips-toggle-slider {
  width: 32px;
  height: 18px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  position: relative;
  transition: background 0.15s;
}
.tips-toggle-slider::after {
  content: "";
  width: 12px;
  height: 12px;
  background: #fff;
  border-radius: 50%;
  position: absolute;
  top: 3px;
  left: 3px;
  transition: left 0.15s, background 0.15s;
}
.nav-tips-toggle input:checked + .tips-toggle-slider {
  background: rgba(0, 229, 255, 0.5);
}
.nav-tips-toggle input:checked + .tips-toggle-slider::after {
  left: 17px;
  background: #00e5ff;
}
.tips-toggle-label { letter-spacing: 0.04em; }

.nav-help-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.8);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 800;
  font-family: inherit;
  display: grid;
  place-items: center;
  margin-right: 8px;
  padding: 0;
  line-height: 1;
  transition: all 0.12s;
}
.nav-help-btn:hover {
  background: rgba(0, 229, 255, 0.1);
  color: #00e5ff;
  border-color: #00e5ff;
}

.nav-join-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid rgba(0, 229, 255, 0.35);
  background: rgba(0, 229, 255, 0.06);
  color: #00e5ff;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  margin-right: 8px;
  transition: all 0.12s;
  font-family: inherit;
}
.nav-join-btn:hover {
  background: rgba(0, 229, 255, 0.12);
  border-color: #00e5ff;
}
.nav-join-btn svg { opacity: 0.85; }

/* ── Tooltip popup ── */
.cy-tooltip {
  position: fixed;
  z-index: 9999;
  background: #0a0f1c;
  color: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(0, 229, 255, 0.4);
  border-radius: 6px;
  padding: 7px 10px;
  font-size: 0.82rem;
  line-height: 1.35;
  max-width: 280px;
  pointer-events: none;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transform: translateY(-2px);
  transition: opacity 0.12s, transform 0.12s;
}
.cy-tooltip.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.cy-tips-disabled .cy-tooltip { display: none !important; }

/* ── Help overlay ── */
.cy-help-overlay { position: fixed; inset: 0; z-index: 9998; }
.cy-help-backdrop {
  position: absolute; inset: 0;
  background: rgba(0, 0, 0, 0.55);
  cursor: pointer;
}
.cy-help-side {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 360px;
  background: #0a0f1c;
  border-left: 1px solid rgba(0, 229, 255, 0.3);
  box-shadow: -20px 0 40px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  pointer-events: auto;
}
.cy-help-side-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.cy-help-side-head h2 {
  margin: 0;
  font-size: 1.15rem;
  background: linear-gradient(90deg, #00e5ff, #ff3cac);
  -webkit-background-clip: text;
  color: transparent;
}
.cy-help-close {
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: #fff;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.1rem;
}
.cy-help-side-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px 20px 20px;
}
.cy-help-side-foot {
  padding: 10px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.5);
}
.cy-help-side-foot kbd {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  padding: 1px 5px;
  font-family: ui-monospace, monospace;
}
.cy-help-item {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.cy-help-item:last-child { border-bottom: none; }
.cy-help-item-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff3cac, #784ba0);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 0.78rem;
}
.cy-help-item-title { font-weight: 700; margin-bottom: 2px; }
.cy-help-item-body { color: rgba(255, 255, 255, 0.7); font-size: 0.86rem; line-height: 1.4; }

.cy-help-callouts {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.cy-help-pin {
  position: absolute;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff3cac, #784ba0);
  color: #fff;
  font-weight: 800;
  font-size: 0.88rem;
  display: grid;
  place-items: center;
  box-shadow: 0 0 0 3px rgba(255, 60, 172, 0.3), 0 4px 12px rgba(0, 0, 0, 0.5);
  z-index: 2;
  animation: cy-pin-pop 0.3s ease-out;
}
@keyframes cy-pin-pop {
  from { transform: scale(0.4); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.cy-help-ring {
  position: absolute;
  border: 2px solid rgba(0, 229, 255, 0.7);
  border-radius: 8px;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.35);
  pointer-events: none;
  animation: cy-ring-pulse 1.6s ease-in-out infinite;
}
@keyframes cy-ring-pulse {
  0%, 100% { box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.4), 0 0 0 0 rgba(0, 229, 255, 0.3); }
  50%      { box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.4), 0 0 0 6px rgba(0, 229, 255, 0); }
}

/* Player count flash when new player joins */
.player-count-flash {
  animation: player-count-pulse 1.2s ease-out;
}
@keyframes player-count-pulse {
  0%   { color: var(--cy-muted, rgba(255,255,255,0.55)); }
  20%  { color: #39ff14; text-shadow: 0 0 10px rgba(57, 255, 20, 0.6); }
  100% { color: var(--cy-muted, rgba(255,255,255,0.55)); text-shadow: none; }
}

.bingo-host-live-top {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 12px;
  align-items: stretch;
  margin-bottom: 4px;
}

/* Left column: players panel grows, Up Next strip pins to the bottom so it
   bottom-aligns with the Call Log across the gutter. */
.live-col-left {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.live-col-right {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.live-players-slot {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(0, 229, 255, 0.2);
  background: rgba(0, 0, 0, 0.25);
  min-height: 0;
}

.live-players-slot .players-panel-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.live-players-slot #lobby-list {
  flex: 1;
  max-height: 280px;
  overflow-y: auto;
}

.players-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.live-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.live-panel-title,
.live-panel-head label {
  font-weight: 700;
  font-size: 0.9em;
}

.live-panel-count {
  font-size: 0.78em;
}

/* Up Next: horizontal strip — art left, meta right. */
.bingo-host-preview {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(0, 229, 255, 0.35);
  background: rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  min-height: 84px;
}
/* Always reserve the thumb slot so spacing stays constant */
.bingo-host-preview #preview-thumb {
  display: block !important;
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
  background: rgba(0, 229, 255, 0.05);
  border: 1px dashed rgba(0, 229, 255, 0.18);
}
.bingo-host-preview #preview-thumb:not([src]),
.bingo-host-preview #preview-thumb[src=""] {
  visibility: hidden;
}

.preview-meta {
  min-width: 0;
}

.preview-kicker {
  font-size: 0.75em;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.preview-hint {
  font-size: 0.75em;
}

.bingo-host-preview #preview-song {
  font-size: 1rem;
  font-weight: 700;
  word-break: break-word;
}

.live-calllog-panel {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(0, 229, 255, 0.2);
  background: rgba(0, 0, 0, 0.25);
}

.call-log-list {
  height: 170px;
  max-height: 170px;
  overflow-y: auto;
}

.call-log-thumb {
  width: 22px;
  height: 22px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
}

.btn-icon-sm {
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(0, 229, 255, 0.4);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 1.1rem;
  cursor: pointer;
  flex-shrink: 0;
  min-height: unset;
  line-height: 1;
}

/* Card builder row action icon buttons */
.row-icon-btn {
  width: 28px;
  height: 28px;
  min-height: unset;
  padding: 0;
  border-radius: 6px;
  border: 1px solid rgba(0, 229, 255, 0.3);
  background: rgba(0, 0, 0, 0.4);
  color: var(--cy-accent);
  cursor: pointer;
  font-size: 1rem;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: background 0.15s;
}
.row-icon-btn:hover { background: rgba(0, 229, 255, 0.12); }
.row-icon-btn.danger { border-color: rgba(255,122,122,0.5); color: rgba(255,150,150,0.9); }
.row-icon-btn.danger:hover { background: rgba(255,122,122,0.12); }

/* ============================================================
   Card Set Builder — modern dark table layout
   ============================================================ */
.card-builder {
  padding: 14px;
}

.card-builder h2,
.card-builder h3,
.card-builder p {
  margin-top: 0;
}

.card-builder-hero {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 8px;
}

.card-builder-hero h2 {
  margin-bottom: 4px;
  font-size: 30px;
  letter-spacing: -0.02em;
  color: var(--cy-text);
}

.card-builder-hero p {
  color: var(--cy-muted);
  font-size: 16px;
  margin: 0;
}

.builder-inline-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: 10px;
  font-size: 14px;
  white-space: nowrap;
}

.eyebrow {
  color: var(--cy-accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.card-builder-status {
  min-width: 220px;
  max-width: 360px;
  padding: 10px 12px;
  border: 1px solid rgba(0, 229, 255, 0.18);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.22);
  font-size: 13px;
}

/* Hero toolbar: thumb + set select + progress + ready pill + actions */
.builder-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  margin-bottom: 10px;
  border: 1px solid rgba(0, 229, 255, 0.18);
  border-radius: 14px;
  background: rgba(7, 14, 26, 0.72);
  flex-wrap: wrap;
}

.builder-toolbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  min-width: 0;
  flex-wrap: wrap;
}

.builder-set-thumb {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.4), rgba(255, 92, 161, 0.4));
  color: #020611;
  font-weight: 900;
  font-size: 14px;
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
}

.builder-set-thumb.has-image { color: transparent; }

.builder-set-select {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.builder-set-select select {
  background: transparent;
  border: none;
  color: var(--cy-text);
  color-scheme: dark;
  font-size: 18px;
  font-weight: 700;
  padding: 4px 22px 4px 4px;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'><path d='M1 3l4 4 4-4' stroke='%2300e5ff' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 4px center;
}

.builder-set-select select option {
  background: #0a1628;
  color: #e8f4ff;
}

.builder-set-select select option:checked {
  background: #18324a;
  color: #ffffff;
}

.builder-progress {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 130px;
}

.builder-progress-count {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: 13px;
}

.builder-progress-count span {
  font-weight: 700;
  color: var(--cy-text);
}

.builder-progress-count small {
  color: var(--cy-muted);
  font-size: 12px;
}

.builder-progress-bar {
  width: 130px;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.builder-progress-bar > span {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--cy-accent), var(--cy-accent-2));
  transition: width 0.25s ease;
}

.builder-ready-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid rgba(0, 230, 118, 0.45);
  background: rgba(0, 230, 118, 0.12);
  color: rgba(170, 255, 212, 0.95);
}

.builder-ready-pill .pill-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(0, 230, 118, 0.95);
  box-shadow: 0 0 6px rgba(0, 230, 118, 0.7);
}

.builder-ready-pill.is-needs-more {
  border-color: rgba(255, 193, 7, 0.5);
  background: rgba(255, 193, 7, 0.12);
  color: rgba(255, 220, 125, 0.95);
}
.builder-ready-pill.is-needs-more .pill-dot { background: rgba(255, 193, 7, 0.95); box-shadow: 0 0 6px rgba(255, 193, 7, 0.6); }

.builder-ready-pill.is-draft {
  border-color: rgba(0, 229, 255, 0.4);
  background: rgba(0, 229, 255, 0.08);
  color: rgba(160, 245, 255, 0.95);
}
.builder-ready-pill.is-draft .pill-dot { background: var(--cy-accent); }

.builder-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.builder-toolbar-meta {
  display: none;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  margin: 0 0 18px 18px;
}

.builder-toolbar-meta .builder-meta-sep { color: var(--cy-muted); opacity: 0.5; }

#slots-remaining { color: var(--cy-accent); }

/* Reusable button styles for new layout */
.btn-primary,
.btn-secondary,
.btn-ghost {
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  min-height: 36px;
  transition: all 0.15s ease;
  white-space: nowrap;
  box-shadow: none;
}

.btn-primary {
  background: linear-gradient(135deg, #00b8e6, #0096c7);
  border: 1px solid rgba(0, 229, 255, 0.55);
  color: #fff;
}
.btn-primary:hover {
  background: linear-gradient(135deg, #00d4ff, #00a8d6);
  box-shadow: 0 0 14px rgba(0, 229, 255, 0.35);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--cy-text);
}
.btn-secondary:hover {
  background: rgba(0, 229, 255, 0.08);
  border-color: rgba(0, 229, 255, 0.4);
}

.btn-ghost {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--cy-muted);
  min-height: 36px;
  padding: 6px 12px;
}
.btn-ghost:hover {
  color: var(--cy-text);
  border-color: rgba(0, 229, 255, 0.35);
  background: rgba(0, 229, 255, 0.05);
}

/* Create New Set panel (toggleable) */
/* Native [hidden] loses to class display rules (e.g. .builder-set-select is
   display:flex), so force it inside the builder for the new-set toolbar morph. */
.card-builder [hidden] { display: none !important; }

/* New-set name field that replaces the set selector while building a new set. */
.builder-newset-input {
  flex: 1;
  min-width: 220px;
  max-width: 420px;
  background: rgba(7, 14, 26, 0.6);
  border: 1px solid rgba(0, 229, 255, 0.45);
  border-radius: 10px;
  color: var(--cy-text);
  font-size: 16px;
  font-weight: 700;
  padding: 8px 12px;
}

.builder-newset-input::placeholder {
  color: var(--cy-muted);
  font-weight: 400;
  font-size: 14px;
}

.builder-newset-input:focus {
  outline: none;
  border-color: var(--cy-accent);
  box-shadow: 0 0 0 2px rgba(0, 229, 255, 0.18);
}

.builder-ai-set {
  /* visual chrome now on .builder-collapsible-panel */
  display: block;
}

.builder-ai-head,
.builder-ai-actions,
.builder-ai-results-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.builder-ai-head h3 {
  font-size: 16px;
  margin: 0 0 4px;
}

.builder-ai-head p {
  color: var(--cy-muted);
  margin: 0;
  font-size: 13px;
}

.builder-ai-grid {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 180px 120px auto;
  gap: 10px;
  align-items: end;
}

.builder-ai-field {
  display: grid;
  gap: 5px;
  color: var(--cy-muted);
  font-size: 12px;
  font-weight: 700;
}

.builder-ai-field input,
.builder-ai-field select {
  width: 100%;
  padding: 9px 12px;
  font-size: 14px;
}

.builder-ai-count input {
  text-align: center;
}

.builder-ai-clean {
  min-height: 40px;
  align-items: center;
}

.builder-ai-mix {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
}

.builder-ai-mix label {
  display: grid;
  gap: 6px;
  color: var(--cy-muted);
  font-size: 13px;
  font-weight: 700;
}

.builder-ai-mix label span {
  display: flex;
  justify-content: space-between;
}

.builder-ai-mix strong {
  color: var(--cy-accent);
}

.builder-ai-mix input[type="range"] {
  width: 100%;
  accent-color: var(--cy-accent);
}

.builder-ai-actions {
  justify-content: flex-start;
}

.builder-ai-results {
  padding: 10px;
  border: 1px solid rgba(0, 229, 255, 0.16);
  border-radius: 12px;
  background: rgba(3, 8, 16, 0.55);
}

.builder-ai-results-head strong {
  font-size: 15px;
}

.builder-ai-results-head span,
.builder-ai-note {
  font-size: 13px;
}

.builder-ai-enrich-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.builder-ai-enrich-actions .btn-secondary {
  min-height: 34px;
  padding: 7px 12px;
  font-size: 13px;
}

.builder-ai-usage {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.builder-ai-usage-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 8px;
  border: 1px solid rgba(0, 229, 255, 0.22);
  border-radius: 999px;
  background: rgba(0, 229, 255, 0.07);
  color: rgba(235, 247, 255, 0.82);
  font-size: 12px;
  font-weight: 800;
}

.builder-ai-usage-pill.is-empty {
  border-color: rgba(255, 90, 110, 0.42);
  background: rgba(255, 90, 110, 0.10);
  color: #ff8b9c;
}

.builder-ai-item-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-top: 8px;
  /* Show far more results before the scrollbar kicks in, scaling with the
     viewport so tall screens get more rows. */
  max-height: min(62vh, 640px);
  overflow: auto;
}

.builder-ai-mix-summary {
  margin-top: 4px;
  font-size: 12px;
  font-weight: 700;
  color: rgba(160, 245, 255, 0.92);
  letter-spacing: 0.01em;
}

.builder-ai-filter {
  margin-top: 8px;
  display: inline-flex;
}

.builder-drawer-provider {
  margin-bottom: 8px;
}

.builder-ai-filter .seg-tab {
  font-size: 13px;
  min-height: 26px;
  padding: 4px 10px;
}

.builder-ai-item {
  position: relative;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 9px 88px 9px 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
  font-size: 13px;
  cursor: pointer;
  transition: border-color 0.12s ease, background 0.12s ease, box-shadow 0.12s ease;
}

.builder-ai-item:hover {
  border-color: rgba(0, 229, 255, 0.32);
  background: rgba(0, 229, 255, 0.055);
}

.builder-ai-item.is-selected {
  border-color: rgba(0, 229, 255, 0.78);
  background: rgba(0, 229, 255, 0.10);
  box-shadow: inset 3px 0 0 rgba(0, 229, 255, 0.95), 0 0 14px rgba(0, 229, 255, 0.12);
}

.builder-ai-item-add,
.builder-ai-item-remove,
.builder-ai-item-swap {
  position: absolute;
  top: 50%;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: 50%;
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  transform: translateY(-50%) scale(0.92);
  transition: opacity 0.12s ease, transform 0.12s ease, background 0.12s ease;
}

.builder-ai-item-add {
  right: 44px;
  border: 1px solid rgba(0, 229, 255, 0.6);
  background: rgba(2, 14, 22, 0.92);
  color: var(--cy-accent);
}

.builder-ai-item-remove {
  right: 8px;
  border: 1px solid rgba(255, 70, 90, 0.55);
  background: rgba(20, 4, 8, 0.92);
  color: #ff5a72;
  font-size: 22px;
}

.builder-ai-item-swap {
  right: 80px;
  border: 1px solid rgba(0, 229, 255, 0.4);
  background: rgba(2, 14, 22, 0.92);
  color: rgba(160, 245, 255, 0.92);
  font-size: 16px;
}

/* Rows with a swap button reserve a little more room for the third control. */
.builder-ai-item.has-swap {
  padding-right: 120px;
}

.builder-ai-item:hover .builder-ai-item-add,
.builder-ai-item:hover .builder-ai-item-remove,
.builder-ai-item:hover .builder-ai-item-swap,
.builder-ai-item-add:focus-visible,
.builder-ai-item-remove:focus-visible,
.builder-ai-item-swap:focus-visible {
  opacity: 1;
  transform: translateY(-50%) scale(1);
}

.builder-ai-item-add:hover {
  background: rgba(0, 229, 255, 0.18);
}

.builder-ai-item-remove:hover {
  background: rgba(255, 70, 90, 0.18);
}

.builder-ai-item-swap:hover {
  background: rgba(0, 229, 255, 0.14);
}

.builder-ai-item-swap.is-busy {
  opacity: 0.6;
  cursor: default;
}

.builder-ai-item:hover .builder-ai-thumb,
.builder-ai-item.is-selected .builder-ai-thumb {
  border-color: rgba(0, 229, 255, 0.45);
}

.builder-ai-item:hover .builder-ai-thumb {
  transform: scale(1.85);
  transform-origin: left center;
  z-index: 8;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(0, 229, 255, 0.45);
}

.builder-ai-item:hover .builder-ai-thumb img {
  transform: scale(1.08);
}

.builder-ai-thumb img {
  transition: transform 0.16s ease;
}

.builder-ai-instruction {
  margin-top: 6px;
  color: rgba(160, 245, 255, 0.9);
}

/* Touch devices: always show the action buttons since there's no hover */
@media (hover: none) {
  .builder-ai-item-add,
  .builder-ai-item-remove,
  .builder-ai-item-swap {
    opacity: 0.9;
    transform: scale(1);
  }
}

/* AI status banner — cyan info / red error */
#ai-status.ai-status-banner {
  display: none;
  margin: 8px 0 2px;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
}

#ai-status.ai-status-banner.is-active {
  display: block;
  border: 1px solid rgba(0, 229, 255, 0.55);
  background: rgba(0, 229, 255, 0.10);
  color: var(--cy-accent);
}

#ai-status.ai-status-banner.is-active.is-working {
  position: relative;
  padding-left: 40px;
}

#ai-status.ai-status-banner.is-active.is-working::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 50%;
  width: 14px;
  height: 14px;
  margin-top: -7px;
  border-radius: 50%;
  border: 2px solid rgba(0, 229, 255, 0.25);
  border-top-color: rgba(0, 229, 255, 0.95);
  animation: ai-status-spin 0.9s linear infinite;
}

#ai-status.ai-status-banner.is-active.is-error {
  border-color: rgba(255, 90, 110, 0.6);
  background: rgba(255, 90, 110, 0.10);
  color: #ff7a8c;
}

@keyframes ai-status-spin {
  to { transform: rotate(360deg); }
}

/* ── Card Builder top-level tabs (Build / Tiles) ── */
.builder-tabs {
  display: flex;
  gap: 6px;
  padding: 6px;
  margin: 12px 0 4px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.32);
}

.builder-tab {
  flex: 1 1 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 14px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: var(--cy-muted);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: color 0.12s ease, background 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
}

.builder-tab:hover {
  color: var(--cy-text);
  background: rgba(255, 255, 255, 0.04);
}

.builder-tab.is-active {
  color: var(--cy-accent);
  background: rgba(0, 229, 255, 0.16);
  border-color: rgba(0, 229, 255, 0.75);
  font-weight: 800;
  box-shadow: 0 0 0 1px rgba(0, 229, 255, 0.3), 0 0 14px rgba(0, 229, 255, 0.22);
}

.builder-tab-icon {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  font-size: 14px;
  font-weight: 900;
  opacity: 0.95;
}

.builder-tab-panel[hidden] { display: none; }

/* Action bar wraps to 2x2 on narrow/tablet widths */
@media (max-width: 820px) {
  .builder-tabs { flex-wrap: wrap; }
  .builder-tabs .builder-tab { flex: 1 1 45%; }
}

/* ── Set Options panel ── */
.builder-options-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 14px;
}

.builder-option-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.22);
}

.builder-option-info { min-width: 0; }

.builder-option-info h4 {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 700;
  color: var(--cy-text);
}

.builder-option-info p {
  margin: 0;
  font-size: 13px;
  color: var(--cy-muted);
}

.builder-option-row > button { flex-shrink: 0; }

.builder-rename-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.builder-rename-controls input {
  min-width: 220px;
  padding: 8px 12px;
  font-size: 13px;
}

.builder-option-danger {
  border-color: rgba(255, 80, 80, 0.28);
  background: rgba(255, 80, 80, 0.05);
}

.builder-option-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cy-accent);
  border: 1px solid rgba(0, 229, 255, 0.4);
  background: rgba(0, 229, 255, 0.1);
}

/* Current default set — button becomes a state, not an action */
#set-default-btn.is-default-set {
  color: #39ff14;
  border-color: rgba(57, 255, 20, 0.45);
  background: rgba(57, 255, 20, 0.08);
  opacity: 1;
  cursor: default;
}

@media (max-width: 700px) {
  .builder-option-row {
    flex-direction: column;
    align-items: stretch;
  }
}

.builder-ai-thumb {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid transparent;
  background: rgba(0, 229, 255, 0.1);
  color: var(--cy-accent);
  font-size: 16px;
  font-weight: 800;
  position: relative;
  z-index: 1;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.builder-ai-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.builder-ai-item-info {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.builder-ai-item-info span:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.builder-ai-type {
  flex: 0 0 auto;
  min-width: 48px;
  padding: 3px 6px;
  border-radius: 999px;
  background: rgba(0, 229, 255, 0.12);
  color: var(--cy-accent);
  text-align: center;
  font-size: 10px;
  font-weight: 800;
}

/* "DJ-played" tag on a cover-only music tile (album art, no preview audio) */
.builder-ai-dj-tag {
  display: inline-block;
  margin-left: 5px;
  padding: 1px 5px;
  border-radius: 999px;
  background: rgba(255, 204, 102, 0.16);
  color: #ffcc66;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.02em;
  vertical-align: middle;
  cursor: help;
}
.builder-ai-item.is-cover-only .builder-ai-thumb {
  box-shadow: inset 0 0 0 2px rgba(255, 204, 102, 0.55);
}

.ai-card-draft-panel {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.ai-card-draft-panel .builder-add-head,
.ai-draft-title-row,
.ai-draft-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ai-card-draft-panel .builder-add-head,
.ai-draft-title-row {
  justify-content: space-between;
}

.ai-card-draft-panel .builder-add-head h3,
.ai-draft-title-row h4 {
  margin: 0;
}

.ai-card-draft-panel .builder-add-head p {
  margin: 4px 0 0;
}

#ai-draft-body {
  display: grid;
  gap: 10px;
}

.ai-draft-mode {
  width: fit-content;
}

.ai-draft-current-set,
.ai-draft-status {
  font-size: 13px;
}

.ai-draft-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  align-items: end;
}

.ai-draft-grid label {
  display: grid;
  gap: 5px;
  color: var(--cy-muted);
  font-size: 13px;
  font-weight: 700;
}

.ai-draft-grid label:first-child {
  flex: 0 1 360px;
}

.ai-draft-grid input[type="text"],
.ai-draft-grid input[type="number"] {
  min-height: 36px;
  padding: 8px 10px;
  font-size: 13px;
}

.ai-draft-grid input[type="number"] {
  width: 100px;
}

.ai-draft-check {
  display: inline-flex !important;
  grid-template-columns: none;
  align-items: center;
  min-height: 36px;
}

.ai-draft-sliders {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
}

.ai-draft-sliders label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--cy-muted);
  font-size: 13px;
  font-weight: 800;
}

.ai-draft-sliders strong {
  color: var(--cy-text);
}

.ai-draft-sliders input[type="range"] {
  width: 150px;
  accent-color: var(--cy-accent);
}

.ai-draft-actions {
  flex-wrap: wrap;
}

.ai-draft-results {
  display: grid;
  gap: 8px;
}

.ai-draft-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 6px;
  max-height: 250px;
  overflow: auto;
}

.ai-draft-item {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 7px 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
}

.ai-draft-thumb {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 8px;
  background: rgba(0, 229, 255, 0.1);
  color: var(--cy-accent);
  font-size: 16px;
  font-weight: 800;
}

.ai-draft-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ai-draft-main {
  min-width: 0;
}

.ai-draft-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 700;
}

.ai-draft-source {
  display: inline-block;
  margin-top: 3px;
  color: var(--cy-accent);
  font-size: 10px;
  font-weight: 800;
}

.builder-lock-notice {
  margin-bottom: 12px;
  padding: 10px 14px;
  border-radius: 10px;
}

/* Workspace: main column + right preview rail */
.builder-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 14px;
  align-items: start;
}

.builder-main {
  min-width: 0;
  display: grid;
  gap: 10px;
}

/* Collapsible builder panels (Add Tile + Create AI Card Set) */
.builder-collapsible-panel {
  padding: 16px;
  border: 1px solid rgba(0, 229, 255, 0.18);
  border-radius: 14px;
  background: rgba(7, 14, 26, 0.6);
}

.builder-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.builder-section-head > div {
  min-width: 0;
}

.builder-section-head h3 {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 4px;
  color: var(--cy-text);
}

.builder-section-head p {
  color: var(--cy-muted);
  font-size: 13px;
  margin: 0;
}

/* Section body spacing */
.builder-collapsible-panel #ai-create-body,
.builder-collapsible-panel #add-tile-body {
  margin-top: 14px;
}

/* Add Tile panel (visual chrome via .builder-collapsible-panel) */
.builder-add-panel {
  display: block;
}

/* ============================================================
   Create Session modal
   ============================================================ */
.cy-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 10000;
}
.cy-modal {
  position: relative;
  width: 100%;
  max-width: 520px;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  background: #0a0f1c;
  border: 1px solid rgba(0, 229, 255, 0.4);
  border-radius: 14px;
  padding: 24px 26px 20px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7), 0 0 50px rgba(0, 229, 255, 0.12);
  color: var(--cy-text);
}
.cy-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}
.cy-modal-head h2 {
  margin: 0;
  font-size: 22px;
  color: var(--cy-accent);
}
.cy-modal-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: transparent;
  color: var(--cy-text);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.cy-modal-close:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.3);
}
.cs-modal-intro {
  margin: 0 0 14px;
  font-size: 14px;
}
.cs-modal-conflict {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 14px;
  margin-bottom: 14px;
  border: 1px solid rgba(255, 196, 0, 0.4);
  background: rgba(255, 196, 0, 0.08);
  border-radius: 10px;
}
.cs-modal-conflict-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.cs-modal-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.cs-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.cs-field-label {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.cs-field-label em {
  color: var(--cy-accent-2);
  font-style: normal;
  margin-left: 2px;
}
.cs-field input {
  padding: 10px 12px;
  font-size: 15px;
  font-family: inherit;
  color: var(--cy-text);
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(0, 229, 255, 0.25);
  border-radius: 8px;
  outline: none;
}
.cs-field input:focus {
  border-color: var(--cy-accent);
  box-shadow: 0 0 0 3px rgba(0, 229, 255, 0.18);
}
.cs-field-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  min-height: 14px;
}
.cs-field-error {
  color: #ff7b9b;
}
.cs-field-counter {
  color: var(--cy-muted);
  margin-left: auto;
}
.cs-field-counter.is-warn { color: #ffd166; }
.cs-field-counter.is-over { color: #ff7b9b; font-weight: 700; }
.cs-modal-error {
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(255, 80, 100, 0.1);
  border: 1px solid rgba(255, 80, 100, 0.35);
  color: #ffb4c1;
  font-size: 13px;
}
.cs-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 4px;
}

/* Create-game page: session context eyebrow */
.app-eyebrow {
  margin-top: 6px;
  font-size: 14px;
}
.app-eyebrow strong {
  color: var(--cy-accent);
  margin-left: 4px;
}

.builder-add-head h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 10px;
}

.builder-add-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 270px;
  gap: 14px;
  align-items: start;
}

.builder-add-left {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.builder-segmented {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.32);
  flex-wrap: wrap;
}

.seg-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 5px 12px;
  border-radius: 8px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--cy-muted);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: none;
}

.seg-tab:hover { color: var(--cy-text); }

.seg-tab.is-active {
  color: var(--cy-accent);
  background: rgba(0, 229, 255, 0.18);
  border-color: rgba(0, 229, 255, 0.85);
  border-width: 1.5px;
  font-weight: 800;
  box-shadow: 0 0 0 1px rgba(0, 229, 255, 0.35), 0 0 12px rgba(0, 229, 255, 0.25);
}

.seg-icon {
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  font-size: 13px;
  opacity: 0.95;
}

.builder-add-search {
  display: flex;
  align-items: center;
  gap: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.4);
  overflow: hidden;
}

.builder-add-search input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 8px 12px;
  font-size: 15px;
  border-radius: 0;
}

.builder-add-search input:focus { outline: none; }

.builder-add-status {
  font-size: 14px;
  min-height: 16px;
}

.builder-clean-toggle {
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 700;
  color: var(--cy-muted);
}

.builder-add-results {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.builder-add-result-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 54px;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.18);
}

.builder-add-result-row > img {
  width: 44px;
  height: 42px;
  object-fit: cover;
  border-radius: 4px;
}

.builder-add-result-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
  font-size: 15px;
}

.builder-add-result-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 700;
  color: var(--cy-text);
}

.builder-add-result-info .muted {
  font-size: 13px;
}

.builder-add-result-actions {
  display: inline-flex;
  gap: 5px;
  align-items: center;
}

.builder-add-result-actions .btn-ghost,
.builder-add-result-actions .btn-secondary {
  min-height: 32px;
  padding: 5px 10px;
  font-size: 13px;
}

.builder-add-paging {
  align-items: center;
  gap: 8px;
  margin-top: 2px;
}

.builder-add-paging span {
  flex: 1;
  text-align: center;
  font-size: 14px;
}

.builder-add-paging .btn-ghost {
  min-height: 28px;
  padding: 4px 10px;
}

.builder-bulk-panel {
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid rgba(0, 229, 255, 0.16);
  background: rgba(0, 0, 0, 0.22);
}

.builder-bulk-panel textarea {
  width: 100%;
  min-height: 92px;
  resize: vertical;
  font-size: 14px;
  padding: 8px;
}

.builder-bulk-panel input[type="file"] {
  font-size: 11px;
  color: var(--cy-muted);
}

.builder-bulk-actions {
  display: flex;
  gap: 8px;
}

.builder-bulk-actions button {
  flex: 1;
  min-height: 30px;
  padding: 5px 10px;
  font-size: 14px;
}

.builder-bulk-status {
  min-height: 14px;
  font-size: 11px;
}

.search-icon-btn {
  background: transparent;
  border: none;
  color: var(--cy-muted);
  padding: 8px 14px;
  font-size: 14px;
  cursor: pointer;
  min-height: 0;
  box-shadow: none;
}
.search-icon-btn:hover { color: var(--cy-accent); background: transparent; box-shadow: none; }

.builder-add-or {
  display: none;
}
.builder-add-or::before,
.builder-add-or::after { display: none; }

.builder-add-right {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: stretch;
  text-align: left;
}

.builder-bulk-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  justify-content: center;
  padding: 9px 14px;
  font-size: 15px;
}

.builder-add-right p {
  color: var(--cy-muted);
  font-size: 13px;
  margin: 0;
}

.builder-add-row-btn {
  margin: 10px auto 0;
  width: auto;
  min-width: 220px;
  padding: 7px 16px;
  font-size: 14px;
  background: transparent;
  border: 1px dashed rgba(0, 229, 255, 0.4);
  color: var(--cy-accent);
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  min-height: 0;
  box-shadow: none;
}
.builder-add-row-btn:hover {
  background: rgba(0, 229, 255, 0.06);
  border-color: var(--cy-accent);
  box-shadow: none;
}

/* List panel + table */
.builder-list-panel {
  padding: 16px;
  border: 1px solid rgba(0, 229, 255, 0.18);
  border-radius: 14px;
  background: rgba(7, 14, 26, 0.6);
}

.builder-list-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.builder-list-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.builder-list-title h3 {
  font-size: 18px;
  font-weight: 700;
  margin: 0;
}

.builder-count-badge {
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--cy-muted);
  font-size: 11px;
  font-weight: 700;
}

.builder-list-tools {
  display: flex;
  gap: 6px;
}

.builder-table-wrap {
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.25);
  overflow: hidden;
}

.builder-table-head,
.builder-entry-row .builder-row-cells {
  display: grid;
  grid-template-columns: 36px 36px 56px minmax(160px, 1.4fr) 80px 90px 110px 120px;
  gap: 8px;
  align-items: center;
  padding: 10px 14px;
}

.builder-table-head {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--cy-muted);
  font-weight: 700;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.25);
}

.builder-table-head input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(0, 0, 0, 0.4);
  cursor: pointer;
  position: relative;
}
.builder-table-head input[type="checkbox"]:checked {
  border-color: var(--cy-accent);
  background: var(--cy-accent);
}
.builder-table-head input[type="checkbox"]:checked::after {
  content: "✓";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #020611;
  font-size: 11px;
  font-weight: 900;
}

.builder-entry-list {
  display: flex;
  flex-direction: column;
}

.builder-entry-row {
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  background: transparent;
  transition: background 0.15s ease;
  border-radius: 0;
  border-left: 0;
  border-right: 0;
  border-top: 0;
}

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

.builder-entry-row:hover {
  background: rgba(0, 229, 255, 0.04);
}

.builder-entry-row.is-selected {
  background: rgba(0, 229, 255, 0.08);
  box-shadow: inset 3px 0 0 var(--cy-accent);
}

.builder-row-cells > .col-check input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(0, 0, 0, 0.4);
  cursor: pointer;
  position: relative;
}
.builder-row-cells > .col-check input[type="checkbox"]:checked {
  border-color: var(--cy-accent);
  background: var(--cy-accent);
}
.builder-row-cells > .col-check input[type="checkbox"]:checked::after {
  content: "✓";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #020611;
  font-size: 11px;
  font-weight: 900;
}

.builder-row-cells .col-num {
  color: var(--cy-muted);
  font-size: 13px;
  font-weight: 600;
}

.builder-row-cells .col-thumb img,
.builder-row-cells .col-thumb .row-thumb-fallback {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  object-fit: cover;
  display: block;
}

.builder-row-cells .col-thumb .row-thumb-fallback {
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.18), rgba(255, 92, 161, 0.18));
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 800;
  color: var(--cy-muted);
}

.builder-row-cells .col-name input {
  width: 100%;
  background: transparent;
  border: 1px solid transparent;
  color: var(--cy-text);
  font-size: 14px;
  font-weight: 500;
  padding: 6px 8px;
  border-radius: 6px;
}
.builder-row-cells .col-name input:hover { border-color: rgba(0, 229, 255, 0.18); }
.builder-row-cells .col-name input:focus {
  outline: none;
  border-color: rgba(0, 229, 255, 0.55);
  background: rgba(0, 0, 0, 0.4);
}

.row-type-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.row-type-pill.type-text   { background: rgba(0, 229, 255, 0.14); color: #66ecff; }
.row-type-pill.type-music  { background: rgba(80, 130, 255, 0.18); color: #8eb4ff; }
.row-type-pill.type-gif    { background: rgba(190, 100, 255, 0.18); color: #d29bff; }
.row-type-pill.type-image  { background: rgba(255, 130, 200, 0.18); color: #ff9ed3; }
.row-type-pill.type-upload { background: rgba(120, 200, 130, 0.18); color: #9bdfa6; }

.row-source {
  font-size: 13px;
  color: var(--cy-muted);
}

.row-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  font-weight: 500;
}
.row-status.is-ready  { color: #6ce5a3; }
.row-status.is-missing { color: #ffb86b; }

.row-status::before {
  content: "";
  width: 14px;
  height: 14px;
  display: inline-block;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}
.row-status.is-ready::before {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><circle cx='8' cy='8' r='7' fill='none' stroke='%236ce5a3' stroke-width='1.5'/><path d='M5 8.5l2 2 4-4.5' stroke='%236ce5a3' stroke-width='1.6' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>");
}
.row-status.is-missing::before {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path d='M8 1.5L15 14H1z' fill='none' stroke='%23ffb86b' stroke-width='1.5' stroke-linejoin='round'/><path d='M8 6.5v3.2M8 11.4v.6' stroke='%23ffb86b' stroke-width='1.6' stroke-linecap='round'/></svg>");
}

.builder-row-cells .col-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
}

/* ── View toggle (List / Grid) ── */
.builder-view-toggle {
  display: inline-flex;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  overflow: hidden;
}
.view-toggle-btn {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  padding: 6px 12px;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 600;
  font-family: inherit;
}
.view-toggle-btn.is-active {
  background: rgba(0, 229, 255, 0.12);
  color: #00e5ff;
}
.view-toggle-btn:not(.is-active):hover {
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.85);
}

/* ── Filter / Sort dropdowns ── */
.builder-dropdown-wrap {
  position: relative;
  display: inline-block;
}
.builder-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 220px;
  background: #0a0f1c;
  border: 1px solid rgba(0, 229, 255, 0.35);
  border-radius: 10px;
  padding: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 20px rgba(0, 229, 255, 0.08);
  z-index: 100;
}
.builder-dropdown[hidden] { display: none; }
.builder-dropdown-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.builder-dropdown-group {
  margin-top: 10px;
}
.builder-dropdown-label {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 4px;
}
.builder-dropdown-check {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 6px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.85);
}
.builder-dropdown-check:hover { background: rgba(255, 255, 255, 0.04); }
.builder-dropdown-check input { accent-color: #00e5ff; }
.builder-sort-option {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.85);
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.88rem;
  font-family: inherit;
}
.builder-sort-option:hover { background: rgba(255, 255, 255, 0.05); }
.builder-sort-option.is-active {
  background: rgba(0, 229, 255, 0.1);
  color: #00e5ff;
  font-weight: 700;
}
.filter-count {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #ff3cac;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  margin-left: 4px;
}
.btn-link {
  background: transparent;
  border: none;
  color: #00e5ff;
  cursor: pointer;
  font-size: 0.82rem;
  font-family: inherit;
}
.btn-link:hover { text-decoration: underline; }

/* ── Hide rows that don't match active filters ── */
.builder-entry-row.is-filtered-out { display: none; }

/* ── Grid view ── */
.builder-entry-list.is-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  padding: 12px;
}
.builder-entry-list.is-grid + .builder-table-head,
.builder-entry-list.is-grid ~ .builder-table-head {
  display: none;
}
.builder-table-wrap.is-grid .builder-table-head { display: none; }

.builder-entry-list.is-grid .builder-entry-row {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: rgba(2, 22, 94, 0.4);
  overflow: hidden;
  position: relative;
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: transform 0.15s, border-color 0.15s;
}
.builder-entry-list.is-grid .builder-entry-row:hover {
  transform: translateY(-2px);
  border-color: rgba(0, 229, 255, 0.5);
}
.builder-entry-list.is-grid .builder-entry-row.is-selected {
  border-color: #00e5ff;
  box-shadow: 0 0 0 1px #00e5ff;
}

.builder-entry-list.is-grid .builder-row-cells {
  display: block;
  padding: 0;
  position: absolute;
  inset: 0;
  height: 100%;
}

/* Hide structural columns in grid view */
.builder-entry-list.is-grid .col-check,
.builder-entry-list.is-grid .col-num,
.builder-entry-list.is-grid .col-source,
.builder-entry-list.is-grid .col-status {
  display: none;
}

/* Thumb fills tile background */
.builder-entry-list.is-grid .col-thumb {
  position: absolute;
  inset: 0;
  display: block;
}
.builder-entry-list.is-grid .col-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.builder-entry-list.is-grid .col-thumb .row-thumb-fallback {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  font-size: 2rem;
  background: linear-gradient(135deg, #1e3a8a, #312e81);
  color: rgba(255, 255, 255, 0.4);
  border-radius: 0;
}

/* Name overlay at bottom */
.builder-entry-list.is-grid .col-name {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 30px 8px 8px;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.92));
  z-index: 2;
}
.builder-entry-list.is-grid .col-name input {
  background: transparent;
  border: none;
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  width: 100%;
  text-shadow: 0 1px 3px #000;
  padding: 0;
}
.builder-entry-list.is-grid .col-name input:focus {
  background: rgba(0, 0, 0, 0.6);
  border-radius: 4px;
  padding: 4px 6px;
  outline: 1px solid #00e5ff;
}

/* Type pill top-left corner */
.builder-entry-list.is-grid .col-type {
  position: absolute;
  top: 6px;
  left: 6px;
  z-index: 2;
}
.builder-entry-list.is-grid .row-type-pill {
  background: rgba(0, 0, 0, 0.7);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #00e5ff;
}

/* Action buttons top-right on hover */
.builder-entry-list.is-grid .col-actions {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 2;
  opacity: 0;
  transition: opacity 0.15s;
}
.builder-entry-list.is-grid .builder-entry-row:hover .col-actions { opacity: 1; }
.builder-entry-list.is-grid .row-action-btn {
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* When editing in grid view, the tile breaks out into a full-width edit row */
.builder-entry-list.is-grid .builder-entry-row.is-editing {
  grid-column: 1 / -1;
  aspect-ratio: auto;
  display: block;
  background: rgba(2, 12, 32, 0.6);
  border-color: rgba(0, 229, 255, 0.5);
  box-shadow: 0 0 0 1px rgba(0, 229, 255, 0.4), 0 6px 24px rgba(0, 0, 0, 0.5);
  cursor: default;
}
.builder-entry-list.is-grid .builder-entry-row.is-editing:hover {
  transform: none;
}
.builder-entry-list.is-grid .builder-entry-row.is-editing .builder-row-cells {
  position: relative;
  inset: auto;
  height: auto;
  display: grid;
  grid-template-columns: 36px 36px 56px minmax(160px, 1.4fr) 80px 90px 110px 120px;
  gap: 8px;
  align-items: center;
  padding: 10px 14px;
}
/* In editing mode, show all the row's columns (un-hide the ones grid view normally hides) */
.builder-entry-list.is-grid .builder-entry-row.is-editing .col-check,
.builder-entry-list.is-grid .builder-entry-row.is-editing .col-num,
.builder-entry-list.is-grid .builder-entry-row.is-editing .col-source,
.builder-entry-list.is-grid .builder-entry-row.is-editing .col-status {
  display: block;
}
/* Restore normal positioning for cells that were absolutely positioned in tile mode */
.builder-entry-list.is-grid .builder-entry-row.is-editing .col-thumb,
.builder-entry-list.is-grid .builder-entry-row.is-editing .col-name,
.builder-entry-list.is-grid .builder-entry-row.is-editing .col-type,
.builder-entry-list.is-grid .builder-entry-row.is-editing .col-actions {
  position: relative;
  inset: auto;
  top: auto;
  left: auto;
  right: auto;
  bottom: auto;
  padding: 0;
  background: none;
  opacity: 1;
  z-index: auto;
}
.builder-entry-list.is-grid .builder-entry-row.is-editing .col-thumb img {
  width: 40px;
  height: 40px;
  border-radius: 6px;
}
.builder-entry-list.is-grid .builder-entry-row.is-editing .col-thumb .row-thumb-fallback {
  width: 40px;
  height: 40px;
  font-size: 1rem;
  border-radius: 6px;
}
.builder-entry-list.is-grid .builder-entry-row.is-editing .col-name input {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 8px 10px;
  border-radius: 6px;
  text-shadow: none;
  font-size: 0.95rem;
}
.builder-entry-list.is-grid .builder-entry-row.is-editing .builder-entry-drawer {
  margin: 0 14px 14px;
}

/* Stack the edit row's cells on narrow viewports so they don't overflow horizontally */
@media (max-width: 720px) {
  .builder-entry-list.is-grid .builder-entry-row.is-editing .builder-row-cells {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .builder-entry-list.is-grid .builder-entry-row.is-editing .col-check,
  .builder-entry-list.is-grid .builder-entry-row.is-editing .col-num,
  .builder-entry-list.is-grid .builder-entry-row.is-editing .col-source,
  .builder-entry-list.is-grid .builder-entry-row.is-editing .col-status,
  .builder-entry-list.is-grid .builder-entry-row.is-editing .col-type {
    display: inline-flex;
    align-items: center;
    gap: 6px;
  }
  .builder-entry-list.is-grid .builder-entry-row.is-editing .col-source::before { content: "Source:"; opacity: 0.55; font-size: 0.75rem; }
  .builder-entry-list.is-grid .builder-entry-row.is-editing .col-status::before { content: "Status:"; opacity: 0.55; font-size: 0.75rem; }
  .builder-entry-list.is-grid .builder-entry-row.is-editing .col-actions {
    justify-content: flex-end;
  }
}

.row-action-btn {
  width: 30px;
  height: 30px;
  min-height: 30px;
  border-radius: 6px;
  display: inline-grid;
  place-items: center;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--cy-muted);
  cursor: pointer;
  padding: 0;
  font-size: 13px;
  box-shadow: none;
  transition: all 0.15s ease;
}
.row-action-btn:hover {
  color: var(--cy-accent);
  border-color: rgba(0, 229, 255, 0.4);
  background: rgba(0, 229, 255, 0.06);
  box-shadow: none;
}
.row-action-btn.danger:hover {
  color: #ff7a7a;
  border-color: rgba(255, 122, 122, 0.5);
  background: rgba(255, 122, 122, 0.08);
}

/* Drawer shown under a row when editing — matches Add Item look */
.builder-entry-drawer {
  margin: 0 14px 12px !important;
  padding: 14px !important;
  border-radius: 10px !important;
  background: rgba(0, 0, 0, 0.3) !important;
  border: 1px solid rgba(0, 229, 255, 0.18) !important;
}

.builder-drawer-tabs {
  margin-bottom: 12px;
  display: inline-flex;
  flex-wrap: wrap;
}

.builder-drawer-panel {
  margin-bottom: 12px;
}

.builder-drawer-search input,
.builder-drawer-search input[type="text"] {
  flex: 1;
  border: none !important;
  background: transparent !important;
  padding: 10px 14px !important;
  font-size: 13px !important;
  border-radius: 0 !important;
  margin: 0 !important;
  width: auto !important;
}

.builder-drawer-search input:focus { outline: none !important; }

.builder-drawer-search .search-icon-btn,
.builder-drawer-search button {
  background: transparent !important;
  border: none !important;
  color: var(--cy-muted) !important;
  padding: 8px 14px !important;
  font-size: 14px !important;
  min-height: 0 !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}
.builder-drawer-search button:hover {
  color: var(--cy-accent) !important;
  background: transparent !important;
  box-shadow: none !important;
}

.builder-drawer-hint {
  margin: 0;
  font-size: 13px;
  padding: 14px;
  border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.25);
}

.builder-drawer-upload {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.4);
}

.builder-drawer-file {
  flex: 1;
  min-width: 0;
  background: transparent !important;
  border: none !important;
  color: var(--cy-text);
  font-size: 13px;
  padding: 6px 0 !important;
}

.builder-drawer-file::file-selector-button {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--cy-text);
  border-radius: 6px;
  padding: 6px 12px;
  margin-right: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.builder-drawer-file::file-selector-button:hover {
  background: rgba(0, 229, 255, 0.08);
  border-color: rgba(0, 229, 255, 0.4);
}

.builder-drawer-upload-btn {
  padding: 8px 16px !important;
  font-size: 13px !important;
  min-height: 36px !important;
  border-radius: 8px !important;
  background: rgba(0, 229, 255, 0.12) !important;
  border: 1px solid rgba(0, 229, 255, 0.5) !important;
  color: var(--cy-accent) !important;
  box-shadow: none !important;
}
.builder-drawer-upload-btn:hover {
  background: rgba(0, 229, 255, 0.2) !important;
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.3) !important;
}

.builder-drawer-upload-status {
  margin-top: 8px;
  font-size: 12px;
  color: var(--cy-muted);
  min-height: 16px;
}

/* List footer / pagination */
.builder-list-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  font-size: 12px;
  flex-wrap: wrap;
}

.builder-pagination {
  display: flex;
  gap: 4px;
}

.page-btn {
  min-width: 30px;
  min-height: 30px;
  padding: 0 8px;
  border-radius: 6px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--cy-muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  box-shadow: none;
}
.page-btn:hover:not(:disabled) {
  color: var(--cy-text);
  border-color: rgba(0, 229, 255, 0.4);
}
.page-btn.is-active {
  background: rgba(0, 229, 255, 0.18);
  border-color: rgba(0, 229, 255, 0.6);
  color: var(--cy-accent);
}
.page-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.builder-page-size select {
  padding: 5px 10px;
  font-size: 12px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  color: var(--cy-muted);
}

/* Right preview panel */
.builder-preview-panel {
  padding: 14px;
  border: 1px solid rgba(0, 229, 255, 0.18);
  border-radius: 14px;
  background: rgba(7, 14, 26, 0.7);
  position: sticky;
  top: 92px;
  max-height: calc(100vh - 108px);
  overflow-y: auto;
}

.builder-preview-sticky {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.builder-preview-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.builder-preview-top h3 {
  font-size: 16px;
  font-weight: 700;
  margin: 0;
  line-height: 1.25;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.builder-preview-close {
  width: 28px;
  height: 28px;
  min-height: 28px;
  border-radius: 6px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--cy-muted);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  padding: 0;
  display: grid;
  place-items: center;
  box-shadow: none;
}
.builder-preview-close:hover {
  color: var(--cy-text);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: none;
}

.builder-preview-image {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 12px;
  background-color: rgba(0, 0, 0, 0.4);
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.builder-preview-audio {
  width: 100%;
  height: 42px;
  margin-top: -2px;
}

.builder-preview-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.builder-preview-actions .btn-primary,
.builder-preview-actions .btn-secondary {
  min-height: 34px;
  justify-content: center;
}

.builder-preview-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 28px;
  font-weight: 900;
  color: var(--cy-muted);
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.1), rgba(255, 92, 161, 0.08));
}

.builder-preview-image.has-image .builder-preview-placeholder { display: none; }

.builder-preview-tag {
  position: absolute;
  bottom: 8px;
  left: 8px;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: rgba(0, 0, 0, 0.7);
  color: var(--cy-text);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.builder-preview-card-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.builder-preview-eyebrow {
  font-size: 11px;
  font-weight: 700;
  color: var(--cy-muted);
  letter-spacing: 0.06em;
}

.builder-preview-card {
  position: relative;
  height: 92px;
  border-radius: 10px;
  border: 1px solid rgba(0, 229, 255, 0.55);
  background:
    linear-gradient(135deg, rgba(0, 229, 255, 0.08), rgba(255, 92, 161, 0.05)),
    repeating-linear-gradient(
      0deg,
      rgba(0, 229, 255, 0.08) 0,
      rgba(0, 229, 255, 0.08) 1px,
      transparent 1px,
      transparent 22px
    ),
    repeating-linear-gradient(
      90deg,
      rgba(0, 229, 255, 0.08) 0,
      rgba(0, 229, 255, 0.08) 1px,
      transparent 1px,
      transparent 22px
    ),
    rgba(0, 0, 0, 0.5);
  display: grid;
  place-items: center;
  text-align: center;
}

.builder-preview-card span {
  font-size: 16px;
  font-weight: 800;
  color: var(--cy-text);
}

.builder-preview-card small {
  position: absolute;
  bottom: 6px;
  left: 0;
  right: 0;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.18em;
  color: var(--cy-accent);
  text-transform: uppercase;
}

.builder-preview-fields {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.builder-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.builder-field label {
  font-size: 12px;
  font-weight: 600;
  color: var(--cy-muted);
}

.builder-field-value {
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--cy-text);
  font-size: 13px;
  min-height: 34px;
  display: flex;
  align-items: center;
}

.builder-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}
.builder-status-pill.is-ready   { background: rgba(0, 230, 118, 0.14); color: #6ce5a3; }
.builder-status-pill.is-missing { background: rgba(255, 184, 107, 0.14); color: #ffb86b; }
.builder-status-pill.is-draft   { background: rgba(0, 229, 255, 0.12); color: var(--cy-accent); }

.builder-saved {
  padding-top: 4px;
  max-height: 220px;
  overflow: auto;
}

.builder-saved h4 {
  font-size: 13px;
  font-weight: 700;
  margin: 0 0 8px;
}

.builder-saved ol {
  padding-left: 18px;
  margin: 0;
}

.builder-saved li {
  margin-bottom: 4px;
  color: var(--cy-muted);
  font-size: 12px;
}

#audio-volume-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 5px;
  border-radius: 4px;
  background: rgba(0, 229, 255, 0.25);
  border: none;
  padding: 0;
  cursor: pointer;
  box-shadow: none;
}

#audio-volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--cy-accent);
  cursor: pointer;
}

@media (max-width: 700px) {
  .bingo-host-live-top {
    grid-template-columns: 1fr;
  }
}

.bingo-host-alert {
  margin-top: 10px;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 193, 7, 0.55);
  background: rgba(255, 193, 7, 0.15);
  color: #ffe599;
  font-weight: 700;
  display: none;
}

.bingo-host-announcement {
  margin-top: 12px;
}

.bingo-host-announcement input {
  flex: 1;
}

.bingo-upgrade-list {
  margin-top: 10px;
  display: grid;
  gap: 8px;
}

.bingo-upgrade-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid rgba(0, 229, 255, 0.25);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.25);
}

.bingo-upgrade-meta {
  font-size: 0.82rem;
  opacity: 0.82;
}

.bingo-claim-row {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  margin: 8px 0;
  border: 1px solid rgba(0, 229, 255, 0.35);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.45);
}

.bingo-claim-main {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.bingo-claim-meta {
  opacity: 0.85;
  font-size: 0.9rem;
}

.bingo-claim-actions {
  display: flex;
  gap: 8px;
}

label input,
input[type="text"],
input[type="email"],
input[type="password"],
select {
  background: rgba(6, 12, 22, 0.7);
  color: var(--cy-text);
  border: 1px solid rgba(0, 229, 255, 0.3);
  border-radius: 10px;
  padding: 8px 10px;
}

textarea {
  background: rgba(6, 12, 22, 0.7);
  color: var(--cy-text);
  border: 1px solid rgba(0, 229, 255, 0.3);
  border-radius: 10px;
  padding: 8px 10px;
}

button,
.btn {
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid var(--cy-accent);
  color: var(--cy-accent);
  border-radius: 12px;
  padding: 11px 20px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 10px rgba(0, 229, 255, 0.25);
  min-height: 44px;
}

button:hover,
.btn:hover {
  background: rgba(0, 229, 255, 0.18);
  box-shadow: 0 0 14px rgba(0, 229, 255, 0.5);
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid rgba(0, 229, 255, 0.15);
}

.actions button {
  margin-right: 8px;
  margin-bottom: 6px;
}

@media (max-width: 900px) {
  .app-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .app-nav {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .app-body {
    grid-template-columns: 1fr;
  }
  .app-sidebar {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .sidebar-link {
    flex: 1 1 140px;
  }
  .session-card-head,
  .session-game-row {
    grid-template-columns: 1fr;
  }
  .session-card-actions,
  .session-game-actions {
    justify-content: flex-start;
  }
  .join-panel {
    grid-template-columns: 1fr;
  }
  .game-dashboard-hero {
    grid-template-columns: 1fr;
  }
  .game-dashboard-qr {
    justify-items: start;
  }
  .game-action-grid,
  .game-action-grid.is-arcade,
  .game-stats-grid,
  .game-session-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .game-danger-zone {
    flex-direction: column;
    align-items: flex-start;
  }
  .bingo-host-shell {
    grid-template-columns: 1fr;
  }
  .arcade-host-shell {
    grid-template-columns: 1fr;
  }
  .bingo-host-grid {
    grid-template-columns: 1fr;
  }
  .arcade-host-grid,
  .arcade-result-row {
    grid-template-columns: 1fr;
  }
  .bingo-upgrade-row {
    grid-template-columns: 1fr;
  }
  .card-builder-hero,
  .builder-toolbar,
  .builder-list-head {
    flex-direction: column;
    align-items: stretch;
  }
  .builder-create-set,
  .builder-ai-grid,
  .builder-ai-mix,
  .builder-add-body,
  .builder-workspace {
    grid-template-columns: 1fr;
  }
  .builder-add-or { display: none; }
  .builder-add-or::before, .builder-add-or::after { display: none; }
  .builder-table-head {
    display: none;
  }
  .builder-row-cells {
    grid-template-columns: 28px 1fr auto !important;
    grid-template-areas:
      "check name actions"
      "thumb thumb thumb"
      "type source status";
    gap: 6px 8px;
  }
  .builder-row-cells > .col-check { grid-area: check; }
  .builder-row-cells > .col-num { display: none; }
  .builder-row-cells > .col-thumb { grid-area: thumb; }
  .builder-row-cells > .col-name { grid-area: name; }
  .builder-row-cells > .col-type { grid-area: type; }
  .builder-row-cells > .col-source { grid-area: source; }
  .builder-row-cells > .col-status { grid-area: status; }
  .builder-row-cells > .col-actions { grid-area: actions; justify-content: flex-end; }
  .builder-preview-sticky {
    position: static;
  }
  .ads-form-grid {
    grid-template-columns: 1fr;
  }
  .qr-box {
    margin: 0;
  }
  .join-code-big {
    font-size: 34px;
  }
  body {
    font-size: 16px;
  }
  .app-title {
    font-size: 26px;
  }
}

@media (max-width: 600px) {
  body {
    font-size: 15.5px;
  }
  .app-title {
    font-size: 24px;
  }
  .panel {
    padding: 14px;
  }
  .session-card-head,
  .session-game-row {
    padding: 14px;
  }
  .session-card-actions button,
  .session-game-actions button,
  .session-join-code .icon-btn {
    width: 100%;
    justify-content: center;
  }
  .game-dashboard-primary-actions,
  .game-danger-zone .btn-row {
    align-items: stretch;
    flex-direction: column;
  }
  .game-dashboard-primary-actions button,
  .game-danger-zone .btn-row button {
    width: 100%;
    justify-content: center;
  }
  .game-action-grid,
  .game-action-grid.is-arcade,
  .game-stats-grid,
  .game-session-strip {
    grid-template-columns: 1fr;
  }
  .game-dashboard-title {
    font-size: 24px;
  }
  th, td {
    padding: 9px;
  }
}

/* ── Player contacts list ── */
.bingo-contacts-list {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 320px;
  overflow-y: auto;
}

.contact-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
  padding: 7px 10px;
  border-radius: 8px;
  background: rgba(0,229,255,0.05);
  border: 1px solid rgba(0,229,255,0.12);
  font-size: 0.83rem;
}

.contact-name  { font-weight: 700; min-width: 100px; }
.contact-email { color: #a0d8ef; flex: 1; min-width: 140px; }
.contact-phone { color: #b0ffb0; font-size: 0.78rem; }
.contact-badge {
  font-size: 0.72rem;
  padding: 2px 7px;
  border-radius: 20px;
  background: rgba(0,229,255,0.15);
  color: #00e5ff;
  white-space: nowrap;
}

/* ── Season list (Lobby Tools tab) ── */
.bingo-season-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 280px;
  overflow-y: auto;
}

.bingo-season-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 8px;
  background: rgba(0,229,255,0.05);
  border: 1px solid rgba(0,229,255,0.12);
  font-size: 0.85rem;
}

.season-name { font-weight: 600; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.season-actions { display: flex; gap: 6px; flex-shrink: 0; }

.btn-sm {
  padding: 3px 10px;
  font-size: 0.78rem;
  border-radius: 6px;
  border: 1px solid rgba(0,229,255,0.35);
  background: rgba(0,229,255,0.08);
  color: #00e5ff;
  cursor: pointer;
  white-space: nowrap;
}
.btn-sm:hover { background: rgba(0,229,255,0.18); }
.btn-sm.btn-warning { border-color: rgba(255,180,0,0.4); background: rgba(255,180,0,0.08); color: #ffd070; }
.btn-sm.btn-warning:hover { background: rgba(255,180,0,0.18); }
.btn-sm.btn-danger  { border-color: rgba(255,80,80,0.4); background: rgba(255,80,80,0.07); color: #ff7070; }
.btn-sm.btn-danger:hover  { background: rgba(255,80,80,0.18); }

/* ── DJ Confirm Tab ───────────────────────────────────────── */
/* ── Call Queue (searchable thumbnail list in the Live tab) ── */
.bingo-host-callqueue {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(0, 229, 255, 0.2);
  background: rgba(0, 0, 0, 0.25);
}
/* When no bingo claims are pending, collapse the claim-queue slot entirely so
   the Call Queue panel rises to the top of the right column and its search
   field top-aligns with the Players panel across the gutter. */
#claim-queue:empty {
  display: none;
}
.cq-search {
  width: 100%;
  margin: 4px 0 8px;
}
.cq-item-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 230px;
  overflow-y: auto;
  padding-right: 4px;
}
/* Compact queue: ~4 visible rows, sits above the Call Log. */
.cq-item-list.cq-compact {
  max-height: 150px;
  min-height: 150px;
}
.cq-item-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 8px;
  cursor: pointer;
  transition: opacity .2s, border-color .15s, background .15s;
}
.cq-item-row:hover { border-color: rgba(0,229,255,.4); }
.cq-item-row.is-selected {
  border-color: rgba(0,229,255,.85);
  background: rgba(0,229,255,.12);
}
.cq-item-row.cq-item-called { opacity: .38; cursor: default; }
.cq-item-row.cq-item-called:hover { border-color: rgba(255,255,255,.08); }
.cq-item-thumb {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
}
.cq-item-thumb-empty {
  background: rgba(255,255,255,.1);
  border-radius: 6px;
}
.cq-item-label {
  flex: 1;
  font-size: .92rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cq-item-tag {
  flex-shrink: 0;
  font-size: .72rem;
  font-weight: 700;
  color: #00c864;
  background: rgba(0,200,100,.12);
  border: 1px solid rgba(0,200,100,.3);
  border-radius: 6px;
  padding: 3px 8px;
}

/* ── Ad Slots ─────────────────────────────────────────────── */
.ad-slots-list { display: flex; flex-direction: column; gap: 6px; }
.ad-slot-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.ad-slot-row input[type="url"] { min-width: 0; }

/* ── Advanced Settings Collapsible ────────────────────────── */
.host-advanced-section {
  margin: 14px 0 4px;
  border: 1px solid rgba(0, 229, 255, 0.15);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
}
.host-advanced-toggle {
  list-style: none;
  cursor: pointer;
  padding: 10px 14px;
  font-size: .88rem;
  font-weight: 700;
  color: var(--cy-muted);
  letter-spacing: .04em;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 6px;
}
.host-advanced-toggle::-webkit-details-marker { display: none; }
.host-advanced-toggle::after {
  content: "▾";
  font-size: .85em;
  transition: transform .2s;
  margin-left: 2px;
}
.host-advanced-section[open] .host-advanced-toggle::after {
  transform: rotate(-180deg);
}
.host-advanced-toggle:hover { color: var(--cy-accent); }
.host-advanced-body {
  padding: 4px 14px 14px;
  border-top: 1px solid rgba(0, 229, 255, 0.1);
}
.host-advanced-group {
  margin-top: 12px;
  border: 1px solid rgba(0, 229, 255, 0.16);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.18);
  overflow: hidden;
}
.host-advanced-group:first-child {
  margin-top: 4px;
}
.host-advanced-group-head {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 12px;
  background: rgba(0, 229, 255, 0.06);
  border-bottom: 1px solid rgba(0, 229, 255, 0.13);
}
.host-advanced-group-icon {
  font-size: 1.05rem;
  line-height: 1;
}
.host-advanced-group-titles {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.host-advanced-group-label {
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--cy-accent);
}
.host-advanced-group-desc {
  font-size: 0.74rem;
  font-weight: 400;
  color: var(--cy-muted);
}
.host-advanced-group-body {
  padding: 12px;
}
.host-advanced-subhead {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--cy-muted);
  margin: 16px 0 8px;
}
.host-advanced-subhead:first-child {
  margin-top: 0;
}
.host-advanced-note {
  font-size: 0.76rem;
  line-height: 1.45;
  margin: 10px 0 0;
}
.cz-cycle-hint {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 10px;
}
.cz-cycle-step {
  font-size: 0.74rem;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid rgba(0, 229, 255, 0.25);
  background: rgba(0, 229, 255, 0.07);
  color: var(--cy-text, #e8f6ff);
  white-space: nowrap;
}
.cz-cycle-arrow {
  font-size: 0.78rem;
  color: var(--cy-muted);
}
.host-advanced-toggles {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.host-field-hint {
  font-size: 0.8em;
  font-weight: 400;
}

/* ── Live Panel Button Tiers ──────────────────────────────── */
.btn-row-primary {
  gap: 10px;
}
.btn-primary-action {
  flex: 1;
  padding: 13px 18px;
  font-size: 1rem;
  font-weight: 700;
}
.btn-row-secondary {
  gap: 6px;
  flex-wrap: wrap;
}
.btn-sm {
  padding: 7px 12px;
  font-size: .8rem;
  opacity: .85;
}
.btn-sm:hover { opacity: 1; }
.btn-sm-icon {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn-sm-icon-svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}
.btn-sm-danger {
  color: #ff7b9b !important;
  border-color: rgba(255, 90, 138, 0.4) !important;
}
.btn-sm-danger:hover {
  background: rgba(255, 90, 138, 0.08) !important;
  border-color: rgba(255, 90, 138, 0.7) !important;
}
.live-btn-sep {
  width: 1px;
  height: 28px;
  background: rgba(0, 229, 255, 0.2);
  align-self: center;
  flex-shrink: 0;
}

/* "Next call in m:ss" countdown shown beside the auto controls during auto play. */
.auto-countdown-host {
  align-self: center;
  margin-left: 6px;
  font-size: 0.85rem;
  color: rgba(0, 229, 255, 0.75);
  white-space: nowrap;
}
.auto-countdown-host strong {
  color: #00e5ff;
  font-variant-numeric: tabular-nums;
}

/* ── Big primary action buttons (Random Call / Confirm Call / Confirm Winner) ── */
.btn-row-big {
  gap: 12px;
}
.btn-big {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 22px 14px;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 12px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.2s ease, background 0.15s ease;
}
.btn-big:hover:not(:disabled) {
  transform: translateY(-1px);
}
.btn-big:active:not(:disabled) {
  transform: translateY(0);
}
.btn-big:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}
.btn-big-icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}
.btn-big-label {
  white-space: nowrap;
}

/* Cyan — Random Call */
.btn-big-cyan {
  background: rgba(0, 229, 255, 0.12);
  border-color: rgba(0, 229, 255, 0.55);
  color: #b8f6ff;
}
.btn-big-cyan:hover:not(:disabled) {
  background: rgba(0, 229, 255, 0.22);
  border-color: var(--cy-accent);
  box-shadow: 0 0 24px rgba(0, 229, 255, 0.3);
}

/* Green — Confirm Call */
.btn-big-green {
  background: rgba(46, 204, 113, 0.14);
  border-color: rgba(46, 204, 113, 0.6);
  color: #b6f0c8;
}
.btn-big-green:hover:not(:disabled) {
  background: rgba(46, 204, 113, 0.25);
  border-color: #2ecc71;
  box-shadow: 0 0 24px rgba(46, 204, 113, 0.3);
}

/* Gold — Confirm Winner (dim by default, pulses when active) */
.btn-big-gold {
  background: rgba(255, 196, 0, 0.06);
  border-color: rgba(255, 196, 0, 0.3);
  color: rgba(255, 220, 130, 0.6);
}
.btn-big-gold.is-active {
  background: linear-gradient(180deg, rgba(255, 196, 0, 0.28), rgba(255, 140, 0, 0.18));
  border-color: #ffc400;
  color: #fff4c2;
  animation: cy-pulse-gold 1.6s ease-in-out infinite;
}
.btn-big-gold.is-active:hover {
  animation-play-state: paused;
  background: linear-gradient(180deg, rgba(255, 196, 0, 0.4), rgba(255, 140, 0, 0.28));
}
@keyframes cy-pulse-gold {
  0%   { box-shadow: 0 0 0 0 rgba(255, 196, 0, 0.55); }
  60%  { box-shadow: 0 0 0 14px rgba(255, 196, 0, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 196, 0, 0); }
}
.btn-big-count {
  position: absolute;
  top: 8px;
  right: 10px;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 11px;
  background: #ffc400;
  color: #1a1100;
  font-size: 12px;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
@media (prefers-reduced-motion: reduce) {
  .btn-big-gold.is-active { animation: none; }
}

/* Winner Claims panel flash when host clicks Confirm Winner */
#claim-queue.is-flashing,
.bingo-host-title + #claim-queue.is-flashing {
  animation: cy-flash-bg 1.4s ease-out 1;
}
@keyframes cy-flash-bg {
  0%   { background: rgba(255, 196, 0, 0.18); border-radius: 10px; }
  100% { background: transparent; border-radius: 10px; }
}

/* ── Numbered call log ──────────────────────────────────────── */
.call-log-item {
  display: flex;
  align-items: center;
  gap: 10px;
}
.call-log-num {
  flex-shrink: 0;
  min-width: 24px;
  font-weight: 800;
  color: var(--cy-accent);
  font-variant-numeric: tabular-nums;
}
.call-log-label {
  min-width: 0;
  overflow-wrap: anywhere;
}

/* ── Round Live v3: roster leaderboard bits ── */
.player-row-rank {
  flex-shrink: 0;
  min-width: 26px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  font-size: 0.82em;
  color: var(--cy-muted, rgba(255, 255, 255, 0.55));
}

.player-row-blocks {
  display: inline-flex;
  gap: 2px;
  flex-shrink: 0;
  margin-left: auto;
}

.player-row-block {
  width: 8px;
  height: 12px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.08);
}

.player-row-block.is-filled {
  background: var(--cy-accent);
}

.player-row-togo {
  flex-shrink: 0;
  min-width: 48px;
  text-align: right;
  font-size: 0.75em;
  color: var(--cy-muted, rgba(255, 255, 255, 0.55));
  font-variant-numeric: tabular-nums;
}

/* One tile from bingo — gold alert row so the host sees the claim coming. */
.player-row.is-one-to-go {
  border: 1px solid rgba(255, 199, 117, 0.65);
  background: rgba(255, 199, 117, 0.08);
  border-radius: 8px;
}
.player-row.is-one-to-go .player-row-togo {
  color: #fac775;
  font-weight: 700;
}

/* ── Next Call countdown chip (sits beside the big call buttons) ── */
.next-call-chip {
  flex: 0 0 110px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border-radius: 12px;
  border: 1px solid rgba(0, 229, 255, 0.4);
  background: rgba(0, 0, 0, 0.3);
  padding: 8px 6px;
}

.next-call-chip[hidden] {
  display: none;
}

.next-call-chip-kicker {
  font-size: 0.68em;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--cy-muted, rgba(255, 255, 255, 0.55));
}

.next-call-chip strong {
  font-size: 1.7em;
  font-weight: 800;
  color: var(--cy-accent);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

/* ── Secondary row: segmented Auto controls + End Round pushed right ── */
.auto-seg {
  display: inline-flex;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(0, 229, 255, 0.25);
}

.auto-seg .auto-seg-btn {
  border: none;
  border-radius: 0;
  margin: 0;
}

.auto-seg .auto-seg-btn + .auto-seg-btn {
  border-left: 1px solid rgba(0, 229, 255, 0.25);
}

.live-btn-end {
  margin-left: auto;
}

/* ── Claim review overlay ── */
.claim-review-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: rgba(2, 6, 10, 0.78);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

/* display:flex above would defeat the hidden attribute without this. */
.claim-review-overlay[hidden] {
  display: none;
}

.claim-review-modal {
  width: min(380px, 94vw);
  max-height: 92vh;
  overflow-y: auto;
  background: #0d1722;
  border: 1px solid rgba(255, 199, 117, 0.7);
  border-radius: 14px;
  padding: 16px 18px;
}

.claim-review-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.claim-review-head .bingo-host-title {
  margin: 0;
  color: #fac775;
}

.claim-review-meta {
  margin: 4px 0 12px;
  font-size: 0.85em;
}

.claim-review-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 5px;
  margin-bottom: 10px;
}

.claim-tile {
  aspect-ratio: 1;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  font-size: 0.62em;
  line-height: 1.15;
  text-align: center;
  padding: 2px;
  color: rgba(255, 255, 255, 0.85);
  word-break: break-word;
}

.claim-tile.is-marked {
  background: rgba(0, 229, 255, 0.1);
  border-color: rgba(0, 229, 255, 0.3);
  color: #4cffc2;
  font-size: 0.85em;
}

.claim-tile.is-free {
  background: rgba(0, 229, 255, 0.16);
  border-color: rgba(0, 229, 255, 0.45);
  color: var(--cy-accent);
  font-size: 0.85em;
}

.claim-tile.is-winning {
  background: rgba(255, 199, 117, 0.14);
  border: 1.5px solid #fac775;
  color: #ffe2ae;
}

.claim-tile-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.claim-review-verify {
  font-size: 0.78em;
  color: #4cffc2;
  text-align: center;
  margin-bottom: 10px;
  min-height: 1em;
}

.claim-review-actions {
  display: flex;
  gap: 10px;
}

.claim-review-actions .claim-approve-btn {
  flex: 1;
  background: rgba(57, 255, 20, 0.16);
  border: 1px solid rgba(57, 255, 20, 0.6);
  color: #6dff7c;
  font-weight: 800;
}

.claim-review-actions .claim-deny-btn {
  flex: 1;
}

.claim-review-pager {
  text-align: center;
  font-size: 0.78em;
  margin-top: 8px;
}

.claim-review-btn {
  background: rgba(255, 199, 117, 0.16);
  border: 1px solid rgba(255, 199, 117, 0.6);
  color: #fac775;
  font-weight: 700;
}

/* ── Player status dots ─────────────────────────────────────── */
.player-row-dot {
  display: inline-block;
  flex-shrink: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.player-row-dot.is-connected {
  background: #2ecc71;
  box-shadow: 0 0 6px rgba(46, 204, 113, 0.6);
}
.player-row-dot.is-disconnected {
  background: #ff5a8a;
  box-shadow: 0 0 4px rgba(255, 90, 138, 0.4);
}
.player-row.is-disconnected .player-row-name {
  color: rgba(238, 247, 255, 0.55);
}

/* ============================================================
   Sponsor Ads — modern host editor + portrait preview
   ============================================================ */
.sponsor-ads { padding: 18px; }

.sponsor-ads-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.sponsor-ads-title {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}

.sponsor-ads-title h2 {
  font-size: 28px;
  margin: 0;
  letter-spacing: -0.02em;
  color: var(--cy-text);
  flex-shrink: 0;
}

.sponsor-ads-title p {
  color: var(--cy-muted);
  font-size: 15px;
  margin: 0;
}

.sponsor-ads-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Game selector pill */
.sponsor-game-select {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.4);
  min-width: 200px;
}

.sponsor-game-icon {
  color: var(--cy-accent);
  font-size: 14px;
}

.sponsor-game-select select {
  background: transparent;
  border: none;
  color: var(--cy-text);
  font-size: 15px;
  font-weight: 600;
  padding: 6px 22px 6px 0;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  flex: 1;
  min-width: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'><path d='M1 3l4 4 4-4' stroke='%2300e5ff' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 4px center;
}

.sponsor-game-select select:focus { outline: none; }
.sponsor-game-select select option {
  background: #0a1628;
  color: #e8f4ff;
}

.sponsor-status-dot {
  flex-shrink: 0;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  box-shadow: none;
  transition: background 0.2s, box-shadow 0.2s;
}
.sponsor-status-dot[data-status="live"] {
  background: #00e676;
  box-shadow: 0 0 6px rgba(0, 230, 118, 0.7);
}
.sponsor-status-dot[data-status="waiting"] {
  background: #ffd740;
  box-shadow: 0 0 6px rgba(255, 215, 64, 0.6);
}
.sponsor-status-dot[data-status="ended"] {
  background: rgba(255, 255, 255, 0.25);
  box-shadow: none;
}

.sponsor-placements-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid rgba(0, 230, 118, 0.45);
  background: rgba(0, 230, 118, 0.12);
  color: rgba(170, 255, 212, 0.95);
}

.sponsor-placements-pill .pill-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(0, 230, 118, 0.95);
  box-shadow: 0 0 6px rgba(0, 230, 118, 0.7);
}

.sponsor-placements-pill.is-zero {
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.04);
  color: var(--cy-muted);
}
.sponsor-placements-pill.is-zero .pill-dot { background: rgba(255, 255, 255, 0.4); box-shadow: none; }

.sponsor-ads-status {
  margin-bottom: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(255, 122, 122, 0.08);
  border: 1px solid rgba(255, 122, 122, 0.3);
}

/* Workspace */
.sponsor-ads-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.4fr);
  gap: 8px;
  align-items: start;
}

/* Editor panel */
.sponsor-editor {
  padding: 18px;
  border: 1px solid rgba(0, 229, 255, 0.18);
  background: rgba(7, 14, 26, 0.6);
}

.sponsor-editor-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.sponsor-editor-head h3 {
  font-size: 20px;
  font-weight: 700;
  margin: 0;
}

.sponsor-editor-head-tools {
  display: flex;
  gap: 14px;
}

.link-btn {
  background: transparent;
  border: none;
  color: var(--cy-accent);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 0;
  min-height: 0;
  box-shadow: none;
  border-radius: 0;
}
.link-btn:hover {
  color: var(--cy-text);
  background: transparent;
  box-shadow: none;
  text-decoration: underline;
}

.sponsor-editor-body {
  padding: 4px 18px 0;
}

.sponsor-editor-image { display: flex; flex-direction: column; gap: 8px; min-width: 0; }

.sponsor-field-label {
  font-size: 15px;
  font-weight: 600;
  color: var(--cy-muted);
}

/* Dropzone */
.sponsor-dropzone {
  position: relative;
  aspect-ratio: 4 / 5;
  max-height: 340px;
  border: 2px dashed rgba(0, 229, 255, 0.32);
  border-radius: 12px;
  background: rgba(0, 229, 255, 0.02);
  aspect-ratio: 4/5;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
  overflow: hidden;
}
.sponsor-dropzone:hover,
.sponsor-dropzone:focus,
.sponsor-dropzone.is-dragging {
  border-color: var(--cy-accent);
  background: rgba(0, 229, 255, 0.06);
  outline: none;
}

.sponsor-dropzone-empty {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 18px 14px;
  gap: 10px;
}

.sponsor-dropzone-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(0, 229, 255, 0.12);
  color: var(--cy-accent);
  display: grid;
  place-items: center;
}

.sponsor-dropzone-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 16px;
}
.sponsor-dropzone-text strong { color: var(--cy-text); font-weight: 700; }
.sponsor-dropzone-text span { color: var(--cy-muted); }

.sponsor-dropzone-hint {
  font-size: 13px;
  color: var(--cy-muted);
  line-height: 1.4;
}

.sponsor-dropzone-filled {
  position: absolute;
  inset: 0;
}
.sponsor-dropzone-filled img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.sponsor-dropzone-overlay {
  position: absolute;
  inset: auto 0 0 0;
  display: flex;
  gap: 6px;
  justify-content: center;
  padding: 8px;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.85), transparent);
}
.sponsor-dropzone-actions {
  display: flex;
  gap: 6px;
  margin-top: 6px;
}

.sponsor-dropzone-meta {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(0, 0, 0, 0.7);
  color: var(--cy-text);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.sponsor-upload-status {
  font-size: 11.5px;
  min-height: 14px;
}
.sponsor-upload-status.error { color: #ff7a7a; }

/* Editor fields */
.sponsor-editor-fields {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.sponsor-editor .field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sponsor-editor .field-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 6px;
}

.sponsor-editor .field label {
  font-size: 12px;
  font-weight: 600;
  color: var(--cy-muted);
  margin: 0;
}

.char-counter {
  font-size: 11px;
  color: var(--cy-muted);
  font-weight: 500;
  letter-spacing: 0.01em;
}
.char-counter.is-warn { color: #ffb86b; }

.sponsor-editor .field input {
  background: rgba(0, 0, 0, 0.4) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 8px !important;
  padding: 10px 12px !important;
  color: var(--cy-text) !important;
  font-size: 14px !important;
  width: 100%;
}
.sponsor-editor .field input:focus {
  outline: none;
  border-color: rgba(0, 229, 255, 0.5) !important;
}

.field-with-icon {
  position: relative;
}
.field-with-icon input { padding-right: 36px !important; }
.field-icon {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  color: var(--cy-muted);
  display: inline-grid;
  place-items: center;
  pointer-events: none;
}

/* Show on toggles */
.sponsor-show-on {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
  padding: 8px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.sponsor-show-on-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--cy-muted);
}

.sponsor-show-pills {
  display: flex;
  flex-direction: row;
  gap: 8px;
  flex-wrap: nowrap;
}

.check-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--cy-text);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  transition: border-color 0.15s, background 0.15s;
}
.check-pill input { display: none; }
.check-pill .check-box {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  background: transparent;
  display: grid;
  place-items: center;
}
.check-pill input:checked ~ .check-box {
  background: var(--cy-accent);
  border-color: var(--cy-accent);
}
.check-pill input:checked ~ .check-box::after {
  content: "";
  width: 8px;
  height: 5px;
  border-left: 2px solid #020611;
  border-bottom: 2px solid #020611;
  transform: rotate(-45deg) translate(1px, -1px);
}
.check-pill:has(input:checked) {
  border-color: rgba(0, 229, 255, 0.5);
  background: rgba(0, 229, 255, 0.08);
}

/* Saved ads */
.sponsor-saved {
  padding: 0;
  border: 1px solid rgba(0, 229, 255, 0.18);
  background: rgba(7, 14, 26, 0.6);
}

.sponsor-saved details summary {
  cursor: pointer;
  list-style: none;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 19px;
  font-weight: 700;
}
.sponsor-saved details summary::-webkit-details-marker { display: none; }
.sponsor-saved-count {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--cy-muted);
  font-size: 11px;
  font-weight: 700;
}
.sponsor-saved-caret {
  margin-left: auto;
  color: var(--cy-muted);
  font-size: 13px;
  transition: transform 0.2s;
}
.sponsor-saved details[open] .sponsor-saved-caret { transform: rotate(180deg); }

.sponsor-saved-list {
  display: flex;
  flex-direction: column;
  padding: 0 12px 8px;
  gap: 6px;
}

.sponsor-saved-empty {
  padding: 14px;
  font-size: 13px;
  text-align: center;
  border: 1px dashed rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.2);
}

.sponsor-saved-row {
  display: grid;
  grid-template-columns: 56px 1fr auto auto;
  align-items: center;
  gap: 14px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.25);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.sponsor-saved-row:hover {
  border-color: rgba(0, 229, 255, 0.4);
  background: rgba(0, 229, 255, 0.04);
}
.sponsor-saved-row.is-active {
  border-color: rgba(0, 229, 255, 0.6);
  background: rgba(0, 229, 255, 0.07);
  box-shadow: inset 3px 0 0 var(--cy-accent);
}

.sponsor-saved-thumb {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.18), rgba(255, 92, 161, 0.18));
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  color: var(--cy-muted);
  font-size: 10px;
  font-weight: 800;
}

.sponsor-saved-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sponsor-saved-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--cy-text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sponsor-saved-tagline {
  font-size: 14px;
  color: var(--cy-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.sponsor-saved-date {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: right;
  font-size: 13px;
  color: var(--cy-muted);
}
.sponsor-saved-date small { font-size: 12px; opacity: 0.7; text-transform: uppercase; letter-spacing: 0.06em; }

.sponsor-saved-menu-btn {
  width: 32px;
  height: 32px;
  min-height: 32px;
  border-radius: 6px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--cy-muted);
  cursor: pointer;
  font-size: 18px;
  padding: 0;
  display: grid;
  place-items: center;
  box-shadow: none;
}
.sponsor-saved-menu-btn:hover {
  color: var(--cy-text);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: none;
}

/* Popover menu for a saved ad's "⋯" button */
.sponsor-saved-menu {
  z-index: 1000;
  min-width: 168px;
  padding: 6px;
  border-radius: 10px;
  background: #0c1626;
  border: 1px solid rgba(0, 229, 255, 0.3);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sponsor-saved-menu-item {
  text-align: left;
  padding: 8px 10px;
  border-radius: 6px;
  background: transparent;
  border: none;
  color: var(--cy-text);
  font-size: 0.86rem;
  cursor: pointer;
  box-shadow: none;
}
.sponsor-saved-menu-item:hover {
  background: rgba(0, 229, 255, 0.12);
}
.sponsor-saved-menu-item.is-danger { color: #ff6b6b; }
.sponsor-saved-menu-item.is-danger:hover { background: rgba(255, 107, 107, 0.14); }

/* Loading spinner in the saved-ads list */
.sponsor-saved-spinner {
  display: inline-block;
  width: 13px;
  height: 13px;
  vertical-align: -2px;
  margin-right: 6px;
  border: 2px solid rgba(0, 229, 255, 0.25);
  border-top-color: var(--cy-accent);
  border-radius: 50%;
  animation: cy-spin 0.7s linear infinite;
}
@keyframes cy-spin { to { transform: rotate(360deg); } }

/* Non-portrait image warning under the dropzone preview */
.sponsor-dz-warn {
  display: block;
  margin-top: 4px;
  font-size: 0.74rem;
  font-weight: 600;
  color: #ffcc66;
}

.sponsor-saved-hint {
  font-size: 14px;
  font-weight: 400;
  color: var(--cy-muted);
}

.sponsor-editor-foot {
  display: flex;
  gap: 8px;
  padding: 8px 18px 14px;
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  margin-top: 4px;
}
.sponsor-editor-foot input {
  flex: 1;
  min-width: 0;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 15px;
  color: var(--cy-text);
  min-width: 0;
}

/* Preview panel */
.sponsor-preview {
  padding: 16px;
  border: 1px solid rgba(0, 229, 255, 0.18);
  background: rgba(7, 14, 26, 0.7);
  position: sticky;
  top: 24px;
}

.sponsor-preview-head h3 { font-size: 20px; font-weight: 700; margin: 0 0 12px; }

.sponsor-preview-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 14px;
}

.sponsor-tab {
  background: transparent;
  border: none;
  color: var(--cy-muted);
  padding: 10px 14px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  position: relative;
  border-radius: 0;
  min-height: 0;
  box-shadow: none;
}
.sponsor-tab:hover { color: var(--cy-text); background: transparent; box-shadow: none; }
.sponsor-tab.is-active { color: var(--cy-accent); }
.sponsor-tab.is-active::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: -1px;
  height: 2px;
  background: var(--cy-accent);
  border-radius: 2px;
}

.sponsor-preview-area {
  display: block;
  margin-bottom: 12px;
}

.sponsor-preview-pane { display: none; }
.sponsor-preview-pane.is-active { display: block; }

.preview-caption {
  font-size: 14px;
  margin-top: 10px;
  text-align: center;
}

/* Big screen mock */
.bigscreen-mock {
  border: 1px solid rgba(0, 229, 255, 0.22);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(0, 12, 24, 0.95), rgba(0, 8, 18, 0.95));
  padding: 6px;
  aspect-ratio: 16/9;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow: hidden;
}

/* Status pill row */
.bigscreen-mock-topbar {
  display: flex;
  gap: 4px;
  align-items: center;
  flex-shrink: 0;
}
.bm-pill {
  font-size: 6px;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: var(--cy-text);
  white-space: nowrap;
}
.bm-pill--live { border-color: rgba(34, 211, 100, 0.7); color: #22d364; }
.bm-pill--join { border-color: rgba(0, 229, 255, 0.5); color: var(--cy-accent); }

/* Welcome header */
.bigscreen-mock-header {
  text-align: center;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--cy-text);
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 5px;
  font-size: 10px;
  flex-shrink: 0;
}

/* Previously Played chips row */
.bigscreen-mock-chips {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
  overflow: hidden;
}
.bm-chip {
  font-size: 6.5px;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--cy-muted);
  white-space: nowrap;
}
.bm-chip--now {
  background: rgba(0, 229, 255, 0.12);
  border-color: rgba(0, 229, 255, 0.4);
  color: var(--cy-accent);
  font-weight: 700;
}

/* Main two-panel body */
.bigscreen-mock-body {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 6px;
  min-height: 0;
  overflow: hidden;
}

/* Leaderboard panel */
.bigscreen-mock-leaderboard {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-height: 0;
  overflow: hidden;
}
.bm-lb-head {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px 4px 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 1px;
  flex-shrink: 0;
}
.bm-lb-icon { font-size: 8px; }
.bm-lb-title {
  font-size: 8px;
  font-weight: 800;
  color: var(--cy-text);
  flex: 1;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.bm-lb-badge {
  font-size: 7px;
  font-weight: 800;
  background: var(--cy-accent);
  color: #001218;
  border-radius: 20px;
  padding: 1px 5px;
}

/* Leaderboard rows: rank | avatar | name | segments */
.bm-row {
  display: grid;
  grid-template-columns: 18px 16px 1fr auto;
  align-items: center;
  gap: 3px;
  padding: 3px 4px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 3px;
  font-size: 7.5px;
  color: var(--cy-text);
}
.bm-rank { color: var(--cy-muted); font-weight: 700; font-size: 7px; }
.bm-av {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  font-size: 5px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.bm-av1 { background: #f0c040; color: #1a0d00; }
.bm-av2 { background: var(--cy-accent); color: #001218; }
.bm-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bm-segs { font-size: 6px; color: var(--cy-accent); letter-spacing: 1px; flex-shrink: 0; }
.bm-row--1 { background: rgba(240, 192, 64, 0.1); border: 1px solid rgba(240, 192, 64, 0.25); }
.bm-row--2 { background: rgba(0, 229, 255, 0.07); }

.bigscreen-mock-ad {
  position: relative;
  border: 1.5px solid rgba(255, 92, 161, 0.55);
  box-shadow: 0 0 8px rgba(255, 92, 161, 0.25);
  border-radius: 8px;
  background:
    radial-gradient(circle at 72% 30%, rgba(255, 92, 161, 0.14), transparent 40%),
    radial-gradient(circle at 28% 72%, rgba(0, 240, 255, 0.12), transparent 42%),
    rgba(4, 10, 18, 0.96);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 4px;
  min-height: 0;
}

/* Media area — fills remaining height, shows image or fallback */
.bm-ad-media {
  flex: 1;
  position: relative;
  border-radius: 5px;
  overflow: hidden;
  background: rgba(2, 8, 18, 0.72);
  border: 1px solid rgba(0, 229, 255, 0.28);
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.14);
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.bm-ad-media img:not([hidden]) {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.bm-ad-fallback {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 3px;
  padding: 10px 6px;
  text-align: center;
}
/* The class selector above wins over the user-agent [hidden] { display: none }
   rule, so the fallback would stay visible alongside the image when an ad is
   uploaded. Explicitly hide when JS sets the `hidden` attribute. */
.bm-ad-fallback[hidden] { display: none; }
.pm-ad-fallback[hidden] { display: none; }
.bm-ad-fallback-headline {
  font-size: 9px;
  font-weight: 800;
  color: var(--cy-text);
  letter-spacing: 0.04em;
  line-height: 1.15;
}
.bm-ad-fallback-body {
  font-size: 7px;
  color: var(--cy-muted);
  line-height: 1.3;
}

/* Phone mock */
.phone-mock-wrap {
  display: flex;
  justify-content: center;
}

.phone-mock {
  width: 260px;
  aspect-ratio: 9/19;
  background: #050a14;
  border: 5px solid rgba(255, 255, 255, 0.18);
  border-radius: 28px;
  position: relative;
  padding: 12px 8px 8px;
  overflow: hidden;
}

.phone-mock-notch {
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 4px;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 4px;
}

.phone-mock-screen {
  height: 100%;
  background: linear-gradient(180deg, rgba(0, 24, 38, 0.6), rgba(20, 0, 30, 0.5));
  border-radius: 18px;
  padding: 14px 10px 10px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  text-align: center;
}

.pm-header { font-size: 14px; font-weight: 800; color: var(--cy-text); }
.pm-joincode {
  display: inline-block;
  margin: 0 auto;
  padding: 2px 8px;
  border: 1px solid var(--cy-accent);
  border-radius: 4px;
  font-size: 9px;
  color: var(--cy-accent);
  font-family: ui-monospace, "Courier New", monospace;
  letter-spacing: 0.08em;
}
.pm-player { font-size: 9px; color: var(--cy-muted); }

.pm-ad {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  margin: 4px -2px;
  border: 1.5px solid rgba(0, 229, 255, 0.4);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.4);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.pm-ad-label {
  font-size: 8px;
  color: var(--cy-muted);
  padding: 4px;
  background: rgba(0, 0, 0, 0.5);
  font-weight: 700;
  letter-spacing: 0.04em;
}
.pm-ad img {
  width: 100%;
  height: 100%;
  flex: 1 1 auto;
  object-fit: contain;
  display: block;
  min-height: 0;
}
.pm-ad-fallback {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  padding: 12px;
  text-align: center;
}
.pm-ad-fallback-title {
  font-size: 10px;
  font-weight: 700;
  color: var(--cy-text);
}
.pm-ad-fallback-body {
  font-size: 8px;
  color: var(--cy-muted);
  line-height: 1.3;
}
.pm-ad-cta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 10px;
  background: var(--cy-accent);
  color: #001218;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.pm-status {
  font-size: 8px;
  color: var(--cy-muted);
}
.pm-actions {
  display: flex;
  gap: 4px;
  justify-content: center;
}
.pm-btn {
  background: rgba(255, 255, 255, 0.9);
  color: #001218;
  border: none;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 9px;
  font-weight: 700;
  min-height: 0;
  box-shadow: none;
}

/* Responsive */
@media (max-width: 1300px) {
  .sponsor-ads-workspace { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .sponsor-ads-workspace { grid-template-columns: 1fr; }
  .sponsor-preview { position: static; }
}

@media (max-width: 900px) {
  .sponsor-ads-hero { flex-direction: column; align-items: stretch; }
  .sponsor-ads-actions { justify-content: stretch; }
  .sponsor-game-select { flex: 1; min-width: 140px; }
  .sponsor-saved-row { grid-template-columns: 48px 1fr auto; }
  .sponsor-saved-date { display: none; }
}

/* ============================================================
   Account — Socials panel
   ============================================================ */
.account-socials-head { margin-bottom: 14px; }
.account-socials-head strong { font-size: 15px; }
.account-socials-head p { margin: 4px 0 0; font-size: 13px; }

.account-socials-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.account-social-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.account-social-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--cy-muted);
}

.account-social-icon {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: rgba(0, 229, 255, 0.1);
  color: var(--cy-accent);
}

.account-social-field input {
  background: rgba(0, 0, 0, 0.4) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 8px !important;
  padding: 10px 12px !important;
  color: var(--cy-text) !important;
  font-size: 13px !important;
  width: 100%;
}
.account-social-field input:focus {
  outline: none;
  border-color: rgba(0, 229, 255, 0.5) !important;
}

.account-socials-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* ============================================================
   CyphaConfirm modal (replaces native window.confirm)
   ============================================================ */
.cy-confirm-backdrop {
  /* Slightly heavier scrim than create-session modal since this is
     blocking a destructive action */
  background: rgba(0, 0, 0, 0.8);
  animation: cy-confirm-bd-fade-in 0.16s ease-out;
}
.cy-confirm-modal {
  max-width: 460px;
  animation: cy-confirm-pop-in 0.22s cubic-bezier(0.2, 0.8, 0.2, 1.15);
}
.cy-modal-backdrop.is-closing {
  animation: cy-confirm-bd-fade-out 0.16s ease-in forwards;
}
.cy-modal-backdrop.is-closing .cy-confirm-modal {
  animation: cy-confirm-pop-out 0.16s ease-in forwards;
}
@keyframes cy-confirm-bd-fade-in {
  from { opacity: 0; } to { opacity: 1; }
}
@keyframes cy-confirm-bd-fade-out {
  from { opacity: 1; } to { opacity: 0; }
}
@keyframes cy-confirm-pop-in {
  from { opacity: 0; transform: scale(0.92) translateY(8px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes cy-confirm-pop-out {
  from { opacity: 1; transform: scale(1); }
  to   { opacity: 0; transform: scale(0.96); }
}

.cy-confirm-modal.is-danger {
  border-color: rgba(255, 90, 138, 0.55);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7), 0 0 50px rgba(255, 90, 138, 0.18);
}
.cy-confirm-modal.is-danger .cy-modal-head h2 {
  color: #ff7b9b;
}

.cy-confirm-body {
  /* pre-line preserves \n in message text as visible line breaks so
     existing window.confirm() messages with \n\n work unchanged */
  white-space: pre-line;
  color: var(--cy-text);
  font-size: 15px;
  line-height: 1.5;
  margin: 4px 0 18px;
  max-height: 60vh;
  overflow-y: auto;
}

.cy-confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}
.cy-confirm-actions button {
  /* Mobile-friendly tap targets */
  min-height: 44px;
  min-width: 96px;
  font-size: 15px;
  padding: 10px 18px;
}

/* On small screens, stack the buttons full-width with the primary
   action on top for thumb-friendliness */
@media (max-width: 480px) {
  .cy-confirm-modal {
    max-width: calc(100vw - 32px);
  }
  .cy-confirm-actions {
    flex-direction: column-reverse;
  }
  .cy-confirm-actions button {
    width: 100%;
  }
}
