/* ============ Theme tokens ============ */
:root {
  --bg-a: #0b0e1a;
  --bg-b: #141a33;
  --bg-c: #1a1040;
  --card: rgba(255, 255, 255, 0.06);
  --card-border: rgba(255, 255, 255, 0.12);
  --text: #eef1ff;
  --text-dim: #9aa3c7;
  --accent: #7c5cff;
  --accent-2: #00d4ff;
  --danger: #ff5c7a;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  --radius: 18px;
}
:root[data-theme="light"] {
  --bg-a: #eef1fb;
  --bg-b: #e2e9ff;
  --bg-c: #f3ecff;
  --card: rgba(255, 255, 255, 0.65);
  --card-border: rgba(20, 30, 80, 0.12);
  --text: #1a2040;
  --text-dim: #5a6390;
  --shadow: 0 12px 32px rgba(60, 70, 140, 0.18);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; padding: 0; }

body {
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif;
  color: var(--text);
  background:
    radial-gradient(1200px 800px at 85% -10%, var(--bg-c), transparent 60%),
    radial-gradient(1000px 700px at -10% 110%, var(--bg-b), transparent 60%),
    var(--bg-a);
  background-attachment: fixed;
  transition: background 0.3s, color 0.3s;
}

.glass {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

/* ============ Top bar ============ */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 22px;
  flex-wrap: wrap;
}
.brand { display: flex; align-items: baseline; gap: 10px; }
.brand-icon { font-size: 1.5rem; }
.brand-name {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.brand-tag { color: var(--text-dim); font-size: 0.8rem; }
.topbar-actions { display: flex; gap: 8px; align-items: center; }

/* ============ Buttons ============ */
.btn {
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 9px 16px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  background: var(--card);
  cursor: pointer;
  transition: transform 0.12s, box-shadow 0.12s, background 0.12s;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(0.98); }
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border: none;
  color: #fff;
  box-shadow: 0 6px 18px rgba(124, 92, 255, 0.35);
}
.btn-ghost { background: transparent; }
.btn-danger-ghost { background: transparent; color: var(--danger); border-color: rgba(255, 92, 122, 0.35); }
.icon-btn {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  font-size: 1rem;
  border: 1px solid var(--card-border);
  border-radius: 12px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: transform 0.12s, background 0.12s;
}
.icon-btn:hover { transform: translateY(-1px); background: var(--card); }
.linklike {
  background: none; border: none; padding: 0;
  color: var(--accent-2); cursor: pointer; font: inherit;
  text-decoration: underline;
}

/* ============ Layout ============ */
.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 18px;
  padding: 8px 22px 22px;
  max-width: 1280px;
  margin: 0 auto;
}

/* ============ Stage / wheel ============ */
.stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px;
  min-height: 560px;
}
.game-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
  flex-wrap: wrap;
  justify-content: center;
}
.game-tab {
  padding: 8px 14px;
  border: 1px solid var(--card-border);
  border-radius: 999px;
  background: transparent;
  color: var(--text-dim);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.12s, color 0.12s, transform 0.12s;
}
.game-tab:hover { color: var(--text); transform: translateY(-1px); }
.game-tab.active {
  background: linear-gradient(135deg, rgba(124, 92, 255, 0.25), rgba(0, 212, 255, 0.25));
  border-color: var(--accent);
  color: var(--text);
}
.wheel-wrap { position: relative; width: min(88vw, 560px); aspect-ratio: 1; }
.wheel-wrap.alt .pointer { display: none; }
.wheel-wrap.alt .spin-btn {
  top: auto;
  bottom: 14px;
  transform: translateX(-50%);
  width: auto;
  height: auto;
  border-radius: 999px;
  padding: 12px 30px;
}
.wheel-wrap.alt .spin-btn:hover { transform: translateX(-50%) scale(1.06); }
.wheel-wrap.alt .spin-btn:active { transform: translateX(-50%) scale(0.97); }
#wheel { border-radius: var(--radius); }
#wheel { width: 100%; height: 100%; display: block; }
.pointer {
  position: absolute;
  top: -6px; left: 50%;
  transform: translateX(-50%);
  width: 0; height: 0;
  border-left: 16px solid transparent;
  border-right: 16px solid transparent;
  border-top: 28px solid var(--accent-2);
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.4));
  z-index: 3;
}
.spin-btn {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 96px; height: 96px;
  border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, 0.85);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  cursor: pointer;
  box-shadow: 0 8px 28px rgba(124, 92, 255, 0.5);
  transition: transform 0.15s;
  z-index: 2;
}
.spin-btn:hover { transform: translate(-50%, -50%) scale(1.06); }
.spin-btn:active { transform: translate(-50%, -50%) scale(0.97); }
.spin-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.stage-foot {
  margin-top: 18px;
  display: flex;
  gap: 22px;
  align-items: center;
  color: var(--text-dim);
  font-size: 0.9rem;
}

/* ============ Sidebar ============ */
.sidebar { padding: 16px; display: flex; flex-direction: column; min-height: 560px; }
.tabs { display: flex; gap: 6px; margin-bottom: 14px; }
.tab {
  flex: 1;
  padding: 9px 0;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--text-dim);
  font-weight: 600;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}
.tab:hover { color: var(--text); }
.tab.active { background: var(--card); color: var(--text); border: 1px solid var(--card-border); }
.tab-panel { display: none; flex: 1; flex-direction: column; min-height: 0; }
.tab-panel.active { display: flex; }

.entry-form { display: flex; gap: 8px; }
.entry-form input, .field input[type="text"], .copy-row input, .copy-row textarea, #terms-text {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--card-border);
  background: rgba(0, 0, 0, 0.18);
  color: var(--text);
  font-size: 0.92rem;
  outline: none;
  transition: border-color 0.12s;
}
:root[data-theme="light"] .entry-form input,
:root[data-theme="light"] .field input[type="text"],
:root[data-theme="light"] .copy-row input,
:root[data-theme="light"] .copy-row textarea,
:root[data-theme="light"] #terms-text {
  background: rgba(255, 255, 255, 0.75);
}
.entry-form input:focus, .field input[type="text"]:focus { border-color: var(--accent); }

.hint { color: var(--text-dim); font-size: 0.8rem; line-height: 1.45; }
.hint-inline { color: var(--text-dim); font-size: 0.75rem; font-weight: 400; }

.entry-list, .history-list, .saved-list {
  list-style: none;
  margin: 6px 0 12px;
  padding: 0;
  overflow-y: auto;
  flex: 1;
  min-height: 120px;
}
.entry-list li, .history-list li, .saved-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  margin-bottom: 6px;
  border-radius: 12px;
  background: var(--card);
  border: 1px solid var(--card-border);
  animation: slide-in 0.18s ease;
  font-size: 0.92rem;
}
@keyframes slide-in {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: none; }
}
.entry-swatch { width: 12px; height: 12px; border-radius: 4px; flex: none; }
.entry-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.entry-name a { color: var(--accent-2); text-decoration: none; }
.entry-name a:hover { text-decoration: underline; }
.weight-ctl { display: flex; align-items: center; gap: 4px; color: var(--text-dim); }
.weight-ctl button {
  width: 22px; height: 22px;
  border-radius: 7px;
  border: 1px solid var(--card-border);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  line-height: 1;
}
.weight-ctl .w { min-width: 22px; text-align: center; font-variant-numeric: tabular-nums; }
.entry-del, .saved-del {
  border: none; background: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 0.95rem;
}
.entry-del:hover, .saved-del:hover { color: var(--danger); }

.entry-tools { display: flex; gap: 8px; flex-wrap: wrap; }
.file-btn { display: inline-flex; align-items: center; cursor: pointer; }

.history-list li { justify-content: space-between; }
.history-time { color: var(--text-dim); font-size: 0.78rem; flex: none; }

.saved-list .saved-load { flex: 1; text-align: left; background: none; border: none; color: var(--text); font: inherit; cursor: pointer; }
.saved-list .saved-load:hover { color: var(--accent-2); }
.saved-count { color: var(--text-dim); font-size: 0.78rem; }

/* ============ Payout tracking ============ */
.payout-summary {
  margin: 0 0 10px;
  padding: 9px 12px;
  border-radius: 12px;
  background: rgba(0, 212, 255, 0.08);
  border: 1px solid rgba(0, 212, 255, 0.25);
  font-size: 0.85rem;
  font-weight: 600;
}
.history-item { flex-direction: column; align-items: stretch; gap: 6px; }
.history-row { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.history-code {
  font-family: ui-monospace, Menlo, monospace;
  font-size: 0.78rem;
  padding: 3px 8px;
  border-radius: 8px;
  background: rgba(124, 92, 255, 0.15);
  border: 1px solid rgba(124, 92, 255, 0.3);
  cursor: pointer;
}
.history-code:hover { border-color: var(--accent); }
.history-amt { color: var(--text-dim); font-size: 0.82rem; font-variant-numeric: tabular-nums; }
.status-chip {
  border: none;
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.12s;
}
.status-chip:hover { transform: translateY(-1px); }
.status-chip.unpaid { background: rgba(255, 92, 122, 0.18); color: var(--danger); }
.status-chip.sent { background: rgba(255, 196, 57, 0.18); color: #ffc439; }
.status-chip.paid { background: rgba(0, 214, 50, 0.18); color: #00d632; }

.payout-code-box {
  margin-top: 14px;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(124, 92, 255, 0.1);
  border: 1px dashed rgba(124, 92, 255, 0.4);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}
.payout-code-label { text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.72rem; color: var(--text-dim); }
#winner-code { font-family: ui-monospace, Menlo, monospace; font-size: 1.05rem; font-weight: 700; letter-spacing: 0.06em; }
.payout-code-box .hint { flex-basis: 100%; margin: 2px 0 0; }

/* ============ Pricing ============ */
.pricing-modal { width: min(860px, 100%); }
.tier-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-top: 14px;
}
.tier {
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  background: var(--card);
}
.tier h4 { margin: 0 0 8px; display: flex; align-items: baseline; gap: 6px; }
.tier-price { color: var(--text-dim); font-size: 0.8rem; font-weight: 600; }
.tier ul { margin: 0 0 12px; padding-left: 18px; font-size: 0.82rem; color: var(--text-dim); line-height: 1.5; flex: 1; }
.tier-badge {
  align-self: flex-start;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(154, 163, 199, 0.15);
  color: var(--text-dim);
}
.tier-badge.now { background: rgba(0, 214, 50, 0.15); color: #00d632; }
.verified-check {
  display: inline-grid;
  place-items: center;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  font-size: 0.7rem;
}

/* ============ Toggles ============ */
.toggle { display: flex; align-items: center; gap: 10px; cursor: pointer; margin: 10px 0; font-size: 0.92rem; }
.toggle.small { margin: 0; font-size: inherit; }
.toggle input { accent-color: var(--accent); width: 17px; height: 17px; }

/* ============ Modals ============ */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(5, 8, 20, 0.6);
  backdrop-filter: blur(4px);
  display: grid;
  place-items: center;
  z-index: 50;
  padding: 18px;
}
.modal {
  position: relative;
  width: min(520px, 100%);
  max-height: 88vh;
  overflow-y: auto;
  padding: 26px 28px;
  animation: pop-in 0.22s cubic-bezier(0.34, 1.4, 0.64, 1);
}
@keyframes pop-in {
  from { opacity: 0; transform: scale(0.9) translateY(12px); }
  to { opacity: 1; transform: none; }
}
.modal h2 { margin: 0 0 10px; letter-spacing: -0.01em; }
.modal h3 { margin: 18px 0 6px; font-size: 0.95rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.05em; }
.modal-close {
  position: absolute;
  top: 14px; right: 14px;
  border: none; background: none;
  color: var(--text-dim);
  font-size: 1.05rem;
  cursor: pointer;
}
.modal-close:hover { color: var(--text); }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }

.field { display: flex; flex-direction: column; gap: 6px; margin: 10px 0; font-size: 0.9rem; }
.field > span { color: var(--text-dim); }
.field input[type="range"] { accent-color: var(--accent); }
.copy-row { display: flex; gap: 8px; }
.copy-row textarea { resize: vertical; font-family: ui-monospace, Menlo, monospace; font-size: 0.8rem; }
#terms-text { width: 100%; resize: vertical; margin-top: 8px; }

/* ============ Winner card ============ */
.winner-card { text-align: center; }
.winner-label { font-size: 1rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-dim); margin: 4px 0 2px; }
#winner-name {
  font-size: 2.2rem;
  margin: 4px 0 4px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  word-break: break-word;
}
#winner-x-link { color: var(--accent-2); text-decoration: none; font-size: 0.92rem; }
#winner-x-link:hover { text-decoration: underline; }
.pay-section { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--card-border); }
.pay-title { text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.78rem; color: var(--text-dim); margin: 0 0 10px; }
.pay-buttons { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.pay-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 14px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.9rem;
  color: #fff;
  text-decoration: none;
  transition: transform 0.12s;
}
.pay-btn:hover { transform: translateY(-1px); }
.pay-venmo { background: #008cff; }
.pay-cashapp { background: #00d632; }
.pay-paypal { background: #ffc439; color: #1a2040; }
.pay-copy {
  border: 1px solid var(--card-border);
  background: transparent;
  color: var(--text);
  cursor: pointer;
}
.winner-tickets { color: var(--text-dim); font-size: 0.9rem; margin: 6px 0 0; }
.collect-list { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.collect-row { display: flex; align-items: center; gap: 10px; }
.collect-row .pay-btn { min-width: 92px; justify-content: center; }
.collect-row code {
  flex: 1;
  font-family: ui-monospace, Menlo, monospace;
  font-size: 0.88rem;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(124, 92, 255, 0.12);
  border: 1px solid rgba(124, 92, 255, 0.3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pay-zelle { background: #6d1bfa; }
.zelle-info {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(109, 27, 250, 0.14);
  border: 1px solid rgba(124, 92, 255, 0.3);
  font-size: 0.85rem;
  color: var(--text);
}
.winner-actions { display: flex; justify-content: center; gap: 10px; margin-top: 22px; }

/* ============ Confetti & toast ============ */
#confetti {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 60;
}
.toast {
  position: fixed;
  bottom: 26px; left: 50%;
  transform: translateX(-50%);
  background: var(--text);
  color: var(--bg-a);
  padding: 10px 18px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.9rem;
  z-index: 70;
  animation: pop-in 0.2s ease;
}

/* ============ Footer ============ */
.site-foot {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 22px 26px;
  color: var(--text-dim);
  font-size: 0.78rem;
  line-height: 1.5;
}

/* ============ Presentation mode ============ */
body.presentation .topbar,
body.presentation .sidebar,
body.presentation .site-foot,
body.presentation .stage-foot { display: none; }
body.presentation .layout { grid-template-columns: 1fr; max-width: none; padding: 3vh 0 0; }
body.presentation .stage { background: none; border: none; box-shadow: none; min-height: 92vh; justify-content: center; }
body.presentation .wheel-wrap { width: min(88vw, 82vh); }

/* ============ Responsive ============ */
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .stage, .sidebar { min-height: 0; }
  .entry-list, .history-list, .saved-list { max-height: 300px; }
  .brand-tag { display: none; }
}

/* Cat Coliseum keeps its controls clear of the arena and champion reveal. */
.wheel-wrap.cats-mode { width: min(100%, 560px); }
.wheel-wrap.cats-mode #wheel {
  border: 1px solid rgba(214, 176, 107, 0.28);
  box-shadow: 0 16px 48px rgba(12, 6, 27, 0.32);
}
.wheel-wrap.cats-mode .spin-btn {
  bottom: 12px;
  padding: 10px 28px;
  border-width: 1px;
  border-color: rgba(255, 219, 153, 0.6);
  background: linear-gradient(135deg, #8a65dc, #6046ab);
  box-shadow: 0 4px 20px rgba(33, 14, 57, 0.5);
  font-size: .88rem;
}
.wheel-wrap.cats-mode .spin-btn:disabled { visibility: hidden; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}
@media (prefers-reduced-motion: reduce) {
  .wheel-wrap.cats-mode .spin-btn { transition: none; }
}

/* ============ Donation ledger & receipts (Phase 3) ============ */
.pool-count {
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(0, 212, 255, 0.12);
  border: 1px solid rgba(0, 212, 255, 0.3);
  font-weight: 700;
  font-size: 0.82rem;
}
.pool-count.pool-low {
  background: rgba(255, 92, 122, 0.15);
  border-color: rgba(255, 92, 122, 0.4);
  color: var(--danger);
}
.ledger-modal { width: min(680px, 100%); }
.lg-tiles {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 14px 0;
}
.lg-tile {
  display: flex;
  flex-direction: column;
  gap: 2px;
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 10px;
  text-align: center;
  background: var(--card);
}
.lg-num { font-size: 1.15rem; font-weight: 800; }
.lg-lab { color: var(--text-dim); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; }
.lg-pool { display: flex; gap: 12px; }
.lg-pool .field { flex: 1; }
.lg-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 4px; }
.lg-form input, .lg-form select {
  padding: 9px 10px;
  border-radius: 10px;
  border: 1px solid var(--card-border);
  background: rgba(0, 0, 0, 0.18);
  color: var(--text);
  font-size: 0.9rem;
}
:root[data-theme="light"] .lg-form input,
:root[data-theme="light"] .lg-form select { background: rgba(255, 255, 255, 0.75); }
#don-name { flex: 2; min-width: 140px; }
#don-amount { width: 84px; }
#don-tickets { width: 64px; }
.don-received { margin: 0; }
.ledger-list { max-height: 260px; }
.receipt-card { text-align: center; }
.receipt-card h2 {
  margin: 4px 0;
  font-size: 1.9rem;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  word-break: break-word;
}
.rc-line { margin: 4px 0; color: var(--text-dim); }
.rc-line code {
  font-family: ui-monospace, Menlo, monospace;
  background: rgba(124, 92, 255, 0.15);
  border: 1px solid rgba(124, 92, 255, 0.3);
  border-radius: 8px;
  padding: 2px 8px;
  color: var(--text);
}
@media (max-width: 640px) { .lg-tiles { grid-template-columns: repeat(2, 1fr); } }

/* ============ Auth & strict-draw (Phase 3) ============ */
.auth-msg { color: var(--text-dim); font-size: 0.85rem; margin: 6px 0 0; }
.auth-msg.err { color: var(--danger); }
.entry-list li.unconfirmed { opacity: 0.55; border-style: dashed; }
.entry-list li.unconfirmed .entry-name::after {
  content: " \u2022 unconfirmed";
  color: var(--danger);
  font-size: 0.72rem;
}

/* Wheel Studio: a working surface and reusable creator styling. */
.game-tools { width: min(100%, 560px); display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.segmented { display: inline-flex; gap: 3px; padding: 4px; border: 1px solid var(--card-border); border-radius: 12px; background: rgba(0,0,0,.13); }
.segmented button { border: 0; border-radius: 8px; background: transparent; color: var(--text-dim); padding: 9px 13px; font: 600 14px system-ui; cursor: pointer; }
.segmented button[aria-pressed="true"] { color: var(--text); background: var(--card); box-shadow: 0 2px 8px #0002; }
.wheel-wrap { max-width: 100%; }
.wheel-wrap.studio-mode { width: min(100%, 560px); }
.wheel-wrap.studio-mode .pointer { display: none; }
.wheel-wrap.studio-mode .spin-btn { top: auto; bottom: 10px; width: auto; height: auto; padding: 10px 36px; border-radius: 10px; border: 1px solid #ffffff40; transform: translateX(-50%); background: linear-gradient(115deg, var(--wheel-primary, #7c5cff), var(--wheel-secondary, #218ea8)); font-size: 14px; letter-spacing: .08em; box-shadow: 0 6px 22px #0005; }
.wheel-wrap.studio-mode .spin-btn:hover { transform: translateX(-50%) scale(1.04); }
.wheel-wrap.studio-mode #wheel { border: 1px solid var(--card-border); }
.round-tools { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 12px; margin-bottom: 12px; font-size: 14px; }
.round-tools label { display: flex; align-items: center; gap: 8px; }
select { padding: 9px 11px; border-radius: 9px; border: 1px solid var(--card-border); background: var(--bg-b); color: var(--text); font: inherit; }
.game-note { max-width: 560px; font-size: 13px; color: var(--text-dim); line-height: 1.5; margin: 12px 0 0; }
.round-results { width: min(100%, 560px); padding: 12px 0 0; font-size: 13px; color: var(--text-dim); }
.round-results ol { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; max-height: 96px; overflow: auto; margin: 7px 0 0; }
.round-results li { border: 1px solid var(--card-border); padding: 4px 8px; border-radius: 6px; }
.studio-invite { display: flex; justify-content: space-between; align-items: center; gap: 12px; width: min(100%,560px); border-top: 1px solid var(--card-border); margin-top: 14px; padding-top: 14px; font-size: 13px; line-height: 1.5; color: var(--text-dim); }
.studio-invite b { color: var(--text); font-weight: 600; }
.studio-invite .linklike { white-space: nowrap; font-size: 13px; }
.studio-modal { width: min(1050px, 96vw); max-width: 1050px; }
.studio-heading { margin-bottom: 20px; }
.eyebrow { color: var(--accent-2); font-size: 12px; font-weight: 700; letter-spacing: .1em; margin: 0 0 7px; }
.studio-heading h2 { margin: 0; font-size: 28px; }
.studio-layout { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.studio-preview-wrap { position: sticky; top: 0; text-align: center; }
#studio-preview { display: block; width: 100%; aspect-ratio: 1; border-radius: 16px; border: 1px solid var(--card-border); }
.studio-fields h3 { margin: 0 0 10px; font-size: 16px; }
.studio-fields .field { margin: 0; }
.studio-fields .field span { font-size: 14px; }
.studio-fields .toggle { font-size: 14px; }
.studio-fields { display: flex; flex-direction: column; gap: 14px; }
.studio-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.studio-fields input[type="text"] { width: 100%; min-width: 0; font-size: 14px; }
.studio-fields .hint { margin: 0; }
.theme-options { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.theme-option { border: 1px solid var(--card-border); border-radius: 10px; padding: 10px; background: transparent; color: var(--text); text-align: left; cursor: pointer; font: 600 14px system-ui; }
.theme-option[aria-pressed="true"] { border-color: var(--accent-2); box-shadow: 0 0 0 1px var(--accent-2); }
.theme-option small { display: block; font: 12px system-ui; color: var(--text-dim); margin-top: 3px; }
.theme-swatches { display: flex; gap: 3px; margin-bottom: 8px; }
.theme-swatches i { width: 20px; height: 8px; border-radius: 2px; }
.color-field { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 14px; }
.color-field input { width: 48px; height: 32px; padding: 2px; background: var(--card); border: 1px solid var(--card-border); border-radius: 6px; cursor: pointer; }
.logo-tools { display: flex; gap: 16px; align-items: center; }
.brand-kit { display: flex; flex-direction: column; gap: 10px; padding: 16px; border: 1px solid var(--card-border); border-radius: 12px; }
.brand-kit h3 { margin: 0; }
.brand-kit input { padding: 9px 10px; border-radius: 9px; background: var(--card); color: var(--text); border: 1px solid var(--card-border); }
.creator-tier { border-color: var(--accent-2); }
.creator-tier .btn { width: 100%; margin-top: 7px; }
.stage-foot { flex-wrap: wrap; justify-content: center; }
body.presentation .game-tools, body.presentation .studio-invite, body.presentation .game-note { display: none; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 3px; }
@media (max-width: 700px) {
  .studio-layout { grid-template-columns: 1fr; gap: 18px; }
  .studio-preview-wrap { position: static; }
  #studio-preview { max-width: 300px; margin: auto; }
  .studio-heading h2 { font-size: 24px; }
  .game-tools { gap: 6px; }
  .segmented button { padding: 9px; font-size: 13px; }
  .game-tools .btn { padding: 9px 11px; font-size: 13px; }
  .studio-invite { align-items: flex-start; flex-direction: column; }
  .stage { padding: 14px; }
  .topbar-actions { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) { .wheel-wrap.studio-mode .spin-btn { transition: none; } }

/* Realm Cards uses the same stage with original fantasy-card illustrations. */
.wheel-wrap.cards-mode { width: min(100%, 560px); }
.wheel-wrap.cards-mode #wheel { border: 1px solid #b4a2d544; }
.wheel-wrap.cards-mode .spin-btn { bottom: 10px; padding: 10px 26px; border: 1px solid #dcc8f580; border-radius: 10px; background: linear-gradient(120deg, #7c579d, #415f8b); box-shadow: 0 5px 20px #090f2580; font-size: 14px; }
.wheel-wrap.cards-mode .spin-btn:disabled { visibility: hidden; }
.card-mode-label { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.new-game-label { font-size: 11px; font-weight: 700; letter-spacing: .08em; color: var(--text-dim); }
@media (max-width: 600px) { .new-game-label { display: none; } }

/* Illustrated arcade: main action, full applicant field, and readable name lookup. */
.wheel-wrap.arcade-mode { width: min(100%, 560px); }
.wheel-wrap.arcade-mode #wheel { border: 1px solid #d0dcff30; box-shadow: 0 12px 42px #05091c40; }
.wheel-wrap.arcade-mode .spin-btn { bottom: 9px; padding: 9px 34px; border-radius: 10px; border: 1px solid #d6ddff70; background: linear-gradient(115deg, #7454b8, #326f92); font-size: 14px; box-shadow: 0 4px 16px #090d2550; }
.wheel-wrap.arcade-mode .spin-btn:disabled { visibility: hidden; }
.arcade-info { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: min(100%, 560px); padding: 14px 0 10px; font-size: 14px; }
.arcade-info p { margin: 0; font-weight: 600; }
.arcade-info > span { color: var(--text-dim); flex-shrink: 0; }
.arcade-field { width: min(100%, 560px); border: 1px solid var(--card-border); border-radius: 12px; padding: 0 14px; }
.arcade-field summary { padding: 12px 0; cursor: pointer; font-size: 14px; font-weight: 600; }
.arcade-search-label { display: block; font-size: 14px; color: var(--text-dim); margin: 4px 0 8px; }
#arcade-search { width: 100%; padding: 10px 12px; border: 1px solid var(--card-border); border-radius: 9px; background: var(--card); color: var(--text); font: 16px system-ui; }
#arcade-roster { list-style: none; margin: 12px 0; padding: 0; max-height: 280px; overflow: auto; overscroll-behavior: contain; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; }
#arcade-roster li { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 8px 0; border-bottom: 1px solid var(--card-border); font-size: 14px; }
.applicant-number { min-width: 27px; height: 25px; padding: 3px; border-radius: 7px; background: var(--card); color: var(--text-dim); text-align: center; font-variant-numeric: tabular-nums; }
.applicant-name { min-width: 0; overflow-wrap: anywhere; }
.applicant-tickets { margin-left: auto; padding-left: 4px; color: var(--text-dim); white-space: nowrap; }
#arcade-fairness { font-size: 14px; }
body.presentation .arcade-field, body.presentation #arcade-fairness { display: none; }
body.presentation .wheel-wrap.arcade-mode { width: min(88vw, 76vh); }
@media (max-width: 600px) {
  .arcade-info { align-items: flex-start; flex-direction: column; gap: 5px; }
  #arcade-roster { grid-template-columns: 1fr; }
  .wheel-wrap.arcade-mode .spin-btn { padding: 7px 25px; bottom: 5px; font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) { .wheel-wrap.arcade-mode .spin-btn { transition: none; } }

/* Cat Coliseum V2 keeps the original coliseum as a separate game. */
.wheel-wrap.cats-v2-mode { width: min(100%,560px); }
.wheel-wrap.cats-v2-mode #wheel { border: 1px solid #d5b88d55; box-shadow: 0 14px 40px #15102a50; }
.wheel-wrap.cats-v2-mode .spin-btn { bottom: 8px; padding: 9px 28px; border-radius: 10px; font-size: 13px; background: linear-gradient(120deg,#835ab5,#487a85); border: 1px solid #ffdda680; }
.wheel-wrap.cats-v2-mode .spin-btn:disabled { visibility: hidden; }
.cat-v2-tools { width: min(100%,560px); display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.cat-v2-tools label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; min-width: 0; }
.cat-v2-tools select { width: 100%; min-width: 0; font-size: 14px; }
.cat-v2-live { width: min(100%,560px); margin-top: 16px; }
.cat-v2-score { display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.cat-v2-score span { color: var(--text-dim); }
.cat-v2-live details { border: 1px solid var(--card-border); border-radius: 12px; padding: 12px 14px; margin-top: 12px; font-size: 14px; }
.cat-v2-live summary { cursor: pointer; font-weight: 600; }
#cat-v2-feed { list-style: none; padding: 0; margin: 10px 0 0; max-height: 156px; overflow: auto; }
#cat-v2-feed li { padding: 7px 0; border-top: 1px solid var(--card-border); color: var(--text-dim); overflow-wrap: anywhere; }
#cat-v2-feed b { color: var(--text); font-weight: 600; }
#cat-v2-note { font-size: 14px; }
body.presentation .cat-v2-tools, body.presentation .cat-v2-live, body.presentation #cat-v2-note { display: none; }
body.presentation .wheel-wrap.cats-v2-mode { width: min(88vw,82vh); }
@media (prefers-reduced-motion: reduce) { .wheel-wrap.cats-v2-mode .spin-btn { transition: none; } }
