/* Layout and components. Colours and fonts come from the look variables in looks.css. */

@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/Inter-400-800.woff2") format("woff2");
  font-weight: 400 800;
  font-display: swap;
}
@font-face {
  font-family: "Bebas Neue";
  src: url("/assets/fonts/BebasNeue-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Space Grotesk";
  src: url("/assets/fonts/SpaceGrotesk-400-700.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
}

/* The lit page background sits on a fixed layer of its own: as a fixed background on <body>, phones
   repainted the whole of it on every scroll frame. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: var(--page-bg);
  background-color: var(--bg);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: var(--page-deco, none);
  -webkit-mask-image: var(--page-deco-mask, none);
  mask-image: var(--page-deco-mask, none);
}

header, main, footer { position: relative; z-index: 1; }

a { color: inherit; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }

:focus-visible { outline: 2px solid var(--focus, var(--accent)); outline-offset: 3px; border-radius: 6px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  padding: 10px 14px; border-radius: 10px; background: var(--surface); color: var(--text);
}
.skip:focus { top: 12px; }

/* ---------- top bar ---------- */

.topbar {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 20px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark { width: 34px; height: 34px; }
.bm-rim { fill: var(--brand-rim); }
.bm-a { fill: var(--brand-a); }
.bm-b { fill: var(--brand-b); }
.bm-c { fill: var(--brand-c); }
.bm-hub { fill: var(--brand-hub); }
.bm-pin { fill: var(--brand-pin); }
.brand-name {
  font-family: var(--font-display);
  font-size: var(--brand-size, 21px);
  letter-spacing: var(--display-tracking, -0.01em);
  font-weight: 700;
}
.brand-name b { font-weight: inherit; color: var(--accent); margin-left: 0.18em; }

.nav { display: flex; gap: 18px; margin-left: 12px; }
.nav a { text-decoration: none; color: var(--muted); font-size: 15px; white-space: nowrap; }
@media (max-width: 760px) { .nav { display: none; } }
.nav a:hover { color: var(--text); }

.top-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.sound-ctl { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  transition: transform 0.15s ease, background-color 0.2s ease;
}
.icon-btn:hover { transform: translateY(-1px); }
.icon-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn .ic-speaker { fill: currentColor; stroke: none; }
.icon-btn .ic-x { display: none; }
.icon-btn.muted .ic-waves { display: none; }
.icon-btn.muted .ic-x { display: inline; }
#volume { width: 92px; accent-color: var(--accent); }

/* ---------- hero ---------- */

.hero { max-width: 1200px; margin: 0 auto; padding: 6px 20px 14px; }
.hero h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(28px, 3.4vw, var(--h1-max, 42px));
  line-height: 1.08;
  letter-spacing: var(--display-tracking, -0.02em);
  font-weight: var(--display-weight, 800);
}
.hero h1 em { font-style: normal; background: var(--title-accent); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lede { margin: 8px 0 0; color: var(--muted); max-width: 62ch; }

/* ---------- main app ---------- */

.app {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 22px;
  align-items: start;
}

.card, .stage-card, .panel, .features article {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius, 20px);
  box-shadow: var(--card-shadow, 0 20px 50px rgba(0, 0, 0, 0.35));
}

.stage-card {
  padding: 18px 18px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
}
.stage-wrap {
  width: min(100%, 620px);
  aspect-ratio: 1 / 1;
  position: relative;
  container-type: inline-size;
}
.stage {
  position: absolute;
  inset: 0;
  transform-origin: 50% 9%;
  will-change: transform;
}
.stage.cam-release { transition: transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1); }
#wheel { width: 100%; height: 100%; display: block; cursor: pointer; -webkit-tap-highlight-color: transparent; }
body.is-spinning #wheel { cursor: default; }

.hub {
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--hub-size, 22%);
  aspect-ratio: 1 / 1;
  transform: translate(-50%, -50%);
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--hub-text);
  font-family: var(--hub-font);
  font-weight: var(--hub-weight, 800);
  font-size: var(--hub-fs, 5cqw);
  letter-spacing: var(--hub-tracking, 0.02em);
  text-transform: uppercase;
  transition: transform 0.18s cubic-bezier(0.3, 1.6, 0.5, 1), filter 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}
.hub span { display: inline-block; text-shadow: var(--hub-shadow, none); }
.hub:hover { transform: translate(-50%, -50%) scale(1.05); filter: brightness(1.08); }
.hub:active { transform: translate(-50%, -50%) scale(0.95); }
.hub[aria-busy="true"] { cursor: default; filter: saturate(0.8); }
.hub[aria-busy="true"]:hover { transform: translate(-50%, -50%); }

.stage-bar {
  width: 100%;
  margin-top: 12px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.seg {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
}
.drama-ctl { display: grid; gap: 5px; justify-items: start; }
.drama-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding-inline-start: 12px;
  color: var(--accent);
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1;
}
.drama-label svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.seg button {
  border: 0;
  padding: 7px 14px;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.seg button[aria-pressed="true"] { background: var(--btn-bg); color: var(--accent-text); }
.hint { margin: 0; color: var(--muted); font-size: 14px; }
kbd {
  font-family: inherit;
  font-size: 12px;
  padding: 2px 7px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface-2);
}

/* ---------- names panel ---------- */

.panel { padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; }
.panel h2 { margin: 0; font-family: var(--font-display); font-size: var(--h2-size, 20px); letter-spacing: var(--display-tracking, -0.01em); font-weight: var(--display-weight, 800); }
.count {
  min-width: 34px;
  padding: 2px 10px;
  border-radius: 999px;
  text-align: center;
  font-weight: 700;
  font-size: 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
}
textarea#entries {
  width: 100%;
  min-height: 250px;
  resize: vertical;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  line-height: 1.6;
  font-size: 15px;
}
body.is-spinning textarea#entries { opacity: 0.65; }
.tools { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 7px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  font-size: 14px;
  font-weight: 600;
  transition: transform 0.15s ease, border-color 0.2s ease;
}
.chip:hover { transform: translateY(-1px); border-color: var(--accent); }

.switch { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .track {
  flex: none;
  width: 40px; height: 22px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  position: relative;
  transition: background-color 0.2s ease;
}
.switch .track::after {
  content: "";
  position: absolute;
  top: 2px; left: 2px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--muted);
  transition: transform 0.2s ease, background-color 0.2s ease;
}
.switch input:checked + .track { background: var(--accent); }
.switch input:checked + .track::after { transform: translateX(18px); background: var(--accent-text); }
.switch input:focus-visible + .track { outline: 2px solid var(--accent); outline-offset: 2px; }

.recent h3 { margin: 4px 0 6px; font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.recent ol { margin: 0; padding-left: 22px; display: grid; gap: 2px; font-size: 15px; }
.recent li::marker { color: var(--muted); }
.recent li.empty { list-style: none; margin-left: -22px; color: var(--muted); }

/* ---------- below the app ---------- */

.ad-slot {
  max-width: 1160px;
  min-height: 110px;
  margin: 26px auto;
  border: 1px dashed var(--border);
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 13px;
  opacity: 0.7;
}

.features {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.features article { padding: 20px 22px; }
.features h2 { margin: 0 0 6px; font-family: var(--font-display); font-size: var(--h3-size, 19px); letter-spacing: var(--display-tracking, -0.01em); font-weight: var(--display-weight, 800); }
.features p { margin: 0; color: var(--muted); font-size: 15px; }

.foot {
  max-width: 1200px;
  margin: 34px auto 0;
  padding: 22px 20px 34px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  justify-content: space-between;
  color: var(--muted);
  font-size: 14px;
}
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--text); }
.foot p { margin: 0; }

/* ---------- result card ---------- */

.result {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.42);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity 0.25s ease;
}
.result[hidden] { display: none; }
.result.open { opacity: 1; }
.result-card {
  min-width: min(420px, 100%);
  max-width: 640px;
  padding: 26px 30px 24px;
  border-radius: 24px;
  text-align: center;
  background: var(--result-bg, var(--surface));
  border: 1px solid var(--result-border, var(--border));
  box-shadow: var(--result-shadow, 0 30px 80px rgba(0, 0, 0, 0.55));
  transform: scale(0.75);
  transition: transform 0.45s cubic-bezier(0.2, 1.6, 0.4, 1);
}
.result.open .result-card { transform: scale(1); }
.result-label { margin: 0; color: var(--muted); font-size: 14px; letter-spacing: 0.1em; text-transform: uppercase; }
.result-label.is-title {
  font-family: var(--font-display);
  font-weight: var(--display-weight, 800);
  font-size: clamp(20px, 3.2vw, 30px);
  letter-spacing: var(--display-tracking, -0.01em);
  text-transform: none;
  overflow-wrap: anywhere;
}
.result-label.is-title::after {
  content: "";
  display: block;
  width: 56px;
  height: 2px;
  margin: 10px auto 0;
  border-radius: 2px;
  background: var(--accent);
  opacity: 0.8;
}
.result-name {
  margin: 6px 0 18px;
  font-family: var(--font-display);
  font-weight: var(--display-weight, 800);
  font-size: clamp(34px, 7vw, 68px);
  line-height: 1.05;
  letter-spacing: var(--display-tracking, -0.02em);
  background: var(--result-name);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  overflow-wrap: anywhere;
}
.result-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.btn {
  padding: 10px 18px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: var(--btn-bg);
  color: var(--accent-text);
  font-weight: 700;
  transition: transform 0.15s ease, filter 0.2s ease;
}
.btn:hover { transform: translateY(-1px); filter: brightness(1.06); }
.btn.ghost { background: var(--surface-2); color: var(--text); border-color: var(--border); }

/* ---------- screen effects ---------- */

.vignette {
  position: fixed;
  inset: 0;
  z-index: 40;
  pointer-events: none;
  opacity: 0;
  /* its opacity changes every frame of the tension: on a layer of its own, that never repaints the screen */
  will-change: opacity;
  background: radial-gradient(ellipse at 50% 42%, transparent 42%, rgba(0, 0, 0, 0.8) 100%);
}
.flash {
  position: fixed;
  inset: 0;
  z-index: 41;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(circle at 50% 38%, var(--flash, rgba(255, 255, 255, 0.5)), transparent 62%);
}
.flash.go { animation: flash 0.55s ease-out; }
@keyframes flash { 0% { opacity: 1; } 100% { opacity: 0; } }
.confetti { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 60; pointer-events: none; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 70;
  transform: translate(-50%, 20px);
  padding: 10px 16px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.25s ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- full screen (projector / classroom) ---------- */

.stage-card:fullscreen {
  border-radius: 0;
  border: 0;
  justify-content: center;
  background: var(--page-bg);
  background-color: var(--bg);
}
.stage-card:fullscreen .stage-wrap { width: min(88vmin, 1000px); }

/* ---------- small screens ---------- */

@media (max-width: 900px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .features { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .topbar { padding: 12px 16px; gap: 10px; }
  .nav { display: none; }
  #volume { display: none; }
  .hero { padding: 2px 16px 10px; }
  .app, .features { padding: 0 16px; }
  .stage-card { padding: 10px 8px 12px; }
  .ad-slot { margin: 20px 16px; }
  .result-card { padding: 22px 18px; }
  .lede { font-size: 15px; }
}
@media (hover: none) {
  .hint { display: none; }
}

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

/* ---------- round 2 (23 Oct): title, Spin pulse, settings, ad placeholders ---------- */

.wheel-title {
  margin: 0 0 6px;
  max-width: 100%;
  text-align: center;
  font-family: var(--font-display);
  font-weight: var(--display-weight, 800);
  font-size: clamp(22px, 2.6vw, 34px);
  letter-spacing: var(--display-tracking, -0.01em);
  overflow-wrap: anywhere;
}

/* The Spin button "waits for you": a soft breathing word and a ring that ripples out. */
.hub::before {
  content: "";
  position: absolute;
  inset: -4%;
  border-radius: 50%;
  border: 2px solid var(--hub-ring, rgba(236, 213, 154, 0.75));
  opacity: 0;
  transform: scale(0.92);
  animation: hub-ring 2.6s cubic-bezier(0.2, 0.7, 0.3, 1) infinite;
  pointer-events: none;
}
.hub span { animation: hub-breathe 2.6s ease-in-out infinite; }
@keyframes hub-ring {
  0% { opacity: 0; transform: scale(0.92); }
  14% { opacity: 0.8; }
  100% { opacity: 0; transform: scale(1.5); }
}
@keyframes hub-breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}
body.is-spinning .hub::before { animation: none; opacity: 0; }
body.is-spinning .hub span { animation: none; }

.settings-btn { display: inline-flex; align-items: center; gap: 6px; }
.settings-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; }

.settings {
  position: fixed;
  inset: 0;
  z-index: 55;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.45);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity 0.2s ease;
}
.settings[hidden] { display: none; }
.settings.open { opacity: 1; }
.settings-card {
  width: min(460px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  padding: 18px 20px 16px;
  border-radius: 20px;
  background: var(--result-bg, var(--surface));
  border: 1px solid var(--border);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
  transform: translateY(12px);
  transition: transform 0.3s cubic-bezier(0.2, 0.9, 0.3, 1);
}
.settings.open .settings-card { transform: none; }
.settings-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.settings-head h2 { margin: 0; font-family: var(--font-display); font-weight: var(--display-weight, 800); font-size: var(--h2-size, 22px); letter-spacing: var(--display-tracking, -0.01em); }
.set-row { display: grid; gap: 8px; padding: 12px 0; border-top: 1px solid var(--border); }
.set-row:first-of-type { border-top: 0; }
.set-row label[for], .set-label { font-size: 14px; color: var(--muted); }
.set-row input[type="text"] {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface-2);
}
.set-row .seg { justify-self: start; }
.palettes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.palette {
  display: grid;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  text-align: left;
  font-size: 13.5px;
  font-weight: 600;
}
.palette[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.palette .swatch { display: flex; gap: 3px; }
.palette .swatch i { flex: 1; height: 12px; border-radius: 4px; }
.toggles { gap: 12px; }
.set-note { margin: 4px 0 0; font-size: 12.5px; color: var(--muted); }

/* Ad placeholders: show where ads will go before AdSense is live. */
.ad-slot.ad-wide { margin: 96px auto 26px; max-width: 980px; min-height: 100px; }
.ad-slot span, .ad-rail span, .ad-anchor span { font-size: 12px; letter-spacing: 0.04em; color: var(--muted); }
.ad-rail {
  position: fixed;
  top: 120px;
  width: 160px;
  height: 600px;
  z-index: 2;
  display: none;
  place-items: center;
  text-align: center;
  border: 1px dashed var(--border);
  border-radius: 10px;
  opacity: 0.75;
}
.ad-rail-left { left: 14px; }
.ad-rail-right { right: 14px; }
@media (min-width: 1700px) { .ad-rail { display: grid; } }
.ad-anchor {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 45;
  height: 58px;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(10, 10, 14, 0.92);
  border-top: 1px dashed var(--border);
}
.ad-anchor button {
  position: absolute;
  right: 10px;
  top: -14px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 15px;
  line-height: 1;
}
@media (max-width: 900px) {
  .ad-anchor { display: flex; }
  body { padding-bottom: 58px; }
  body.anchor-closed .ad-anchor { display: none; }
  body.anchor-closed { padding-bottom: 0; }
  .ad-slot.ad-wide { margin-top: 40px; }
}

/* ---------- round 3 (23 Oct): editable title, Yes/No, Creator, countdown, promos ---------- */

button.wheel-title {
  border: 1px dashed transparent;
  background: transparent;
  border-radius: 12px;
  padding: 4px 12px;
  cursor: text;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
button.wheel-title:hover { border-color: var(--border); background: var(--surface-2); }
button.wheel-title.empty { color: var(--muted); font-size: clamp(16px, 1.8vw, 22px); opacity: 0.75; }
.wheel-title-input {
  margin: 0 0 6px;
  width: min(560px, 100%);
  padding: 6px 12px;
  border-radius: 12px;
  border: 1px solid var(--accent);
  background: var(--surface-2);
  text-align: center;
  font-family: var(--font-display);
  font-weight: var(--display-weight, 800);
  font-size: clamp(20px, 2.4vw, 30px);
  letter-spacing: var(--display-tracking, -0.01em);
}

.mode-tabs { display: inline-flex; gap: 3px; padding: 3px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); }
.mode-tabs button {
  border: 0;
  padding: 6px 14px;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-display);
  font-size: var(--tab-size, 15px);
  font-weight: var(--display-weight, 700);
  letter-spacing: var(--display-tracking, 0);
}
.mode-tabs button[aria-selected="true"] { background: var(--btn-bg); color: var(--accent-text); }
#namesBox { display: flex; flex-direction: column; gap: 12px; }
#namesBox[hidden], #yesnoBox[hidden] { display: none; }
.yesno-box { display: grid; gap: 12px; padding: 14px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border); }
.yesno-box p { margin: 0; color: var(--muted); font-size: 14.5px; }
.yn-chips { display: flex; gap: 8px; }
.yn { padding: 4px 12px; border-radius: 999px; font-weight: 800; font-size: 14px; color: #fff; }
.yn.yes { background: #1f9d55; }
.yn.no { background: #c62839; }
.yn.maybe { background: #d9a21b; color: #2a1a00; }

.result-card.yes .result-name { background: linear-gradient(180deg, #b8f5cf, #2fbf6b); -webkit-background-clip: text; background-clip: text; }
.result-card.no .result-name { background: linear-gradient(180deg, #ffc4cb, #e0384b); -webkit-background-clip: text; background-clip: text; }
.result-card.maybe .result-name { background: linear-gradient(180deg, #ffeeb8, #e0a82e); -webkit-background-clip: text; background-clip: text; }
.result-card.out .result-name { opacity: 0.85; text-decoration: line-through; text-decoration-thickness: 3px; }
.result-list {
  margin: 10px auto 18px;
  padding: 0;
  list-style: none;
  counter-reset: w;
  display: grid;
  gap: 6px;
  max-width: 420px;
  text-align: left;
}
.result-list li {
  counter-increment: w;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: var(--display-weight, 800);
  overflow-wrap: anywhere;
}
.result-list li::before {
  content: counter(w);
  display: grid;
  place-items: center;
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--btn-bg);
  color: var(--accent-text);
  font-size: 15px;
}
.result-note { margin: -8px 0 16px; color: var(--muted); font-size: 14px; }

.looks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.look-choice {
  display: grid;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  font-size: 13px;
  font-weight: 600;
  text-align: left;
}
.look-choice[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.look-choice .swatch { display: flex; gap: 3px; }
.look-choice .swatch i { flex: 1; height: 12px; border-radius: 4px; }

.creator-block {
  margin-top: 8px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid var(--accent);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent), var(--surface-2);
}
.creator-head { display: flex; align-items: center; justify-content: space-between; }
.creator-head h3 { margin: 0; font-family: var(--font-display); font-size: var(--h2-size, 20px); font-weight: var(--display-weight, 800); letter-spacing: var(--display-tracking, -0.01em); }
.crown { color: var(--accent); }
.creator-state { font-size: 12px; padding: 2px 10px; border-radius: 999px; border: 1px solid var(--border); color: var(--muted); }
.creator-sub { margin: 4px 0 8px; font-size: 13.5px; color: var(--muted); }
.creator-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; padding: 9px 0; border-top: 1px solid var(--border); }
.creator-row.soon { opacity: 0.62; }
.creator-name { margin: 0; font-weight: 700; font-size: 14.5px; }
.creator-desc { margin: 0; font-size: 12.5px; color: var(--muted); }
.creator-ctl { display: flex; align-items: center; gap: 8px; }
.creator-ctl select { padding: 6px 8px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); }
.lock { font-size: 13px; }
.soon-tag, .trial-tag { font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.soon-tag { border: 1px dashed var(--border); color: var(--muted); }
.trial-tag { background: var(--accent); color: var(--accent-text); }
.try-btn { padding: 5px 10px; font-size: 13px; }
.creator-cta { display: inline-block; margin-top: 10px; text-decoration: none; }

.countdown {
  position: fixed;
  inset: 0;
  z-index: 52;
  display: grid;
  place-items: center;
  pointer-events: none;
  background: radial-gradient(circle at 50% 45%, rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.55));
}
.countdown[hidden] { display: none; }
.countdown span {
  font-family: var(--font-display);
  font-weight: var(--display-weight, 800);
  font-size: min(38vw, 300px);
  line-height: 1;
  background: var(--result-name);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.6));
}
.countdown.beat span { animation: count-beat 0.8s cubic-bezier(0.2, 1.4, 0.4, 1); }
@keyframes count-beat {
  0% { transform: scale(1.6); opacity: 0; }
  30% { opacity: 1; }
  100% { transform: scale(1); opacity: 0.95; }
}

.promo-banner {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 8px 46px 8px 16px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.03)), var(--surface-2);
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  text-align: center;
}
.promo-banner[hidden] { display: none; }
.promo-banner p { margin: 0; }
.promo-banner a { color: var(--accent); font-weight: 700; margin-left: 6px; }
.promo-x {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  line-height: 1;
}
.promo-card {
  position: fixed;
  left: 18px;
  bottom: 18px;
  z-index: 46;
  width: min(320px, calc(100vw - 36px));
  padding: 16px 18px;
  border-radius: 18px;
  background: var(--result-bg, var(--surface));
  border: 1px solid var(--accent);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  transform: translateY(20px);
  opacity: 0;
  transition: transform 0.35s cubic-bezier(0.2, 0.9, 0.3, 1), opacity 0.3s ease;
}
.promo-card[hidden] { display: none; }
.promo-card.open { transform: none; opacity: 1; }
.promo-card .promo-x { top: 16px; transform: none; }
.promo-card p { margin: 0 0 10px; font-size: 14px; color: var(--muted); }
.promo-card .promo-title { margin: 0 0 4px; font-family: var(--font-display); font-size: 22px; font-weight: var(--display-weight, 800); color: var(--text); }
.promo-card .btn { display: inline-block; text-decoration: none; }
@media (max-width: 900px) { .promo-card { bottom: 74px; } }

/* Creator link in the top menu */
.nav a.nav-creator { color: var(--accent); font-weight: 700; }
.nav a[aria-current="page"] { color: var(--text); }

/* Footer in three columns (written by tools/make_pages.py on every page) */
.foot-cols { display: grid; grid-template-columns: repeat(3, auto); gap: 16px 56px; }
.foot-cols nav { display: flex; flex-direction: column; gap: 7px; }
.foot-cols b { color: var(--text); font-size: 12.5px; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 2px; }
.foot > p { align-self: end; }
@media (max-width: 640px) {
  .foot-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 24px; }
}

/* ---------- taps on phones (his phone test, 23 Oct) ---------- */
/* Buttons and the wheel aren't text: a tap or a long press on them never selects words or opens the
   browser's "search this" panel, and a tap doesn't wait to see if it's a double-tap zoom. The page's text
   can still be selected and copied as usual. */
button, .btn, .chip, .hub, .icon-btn, .seg, .mode-tabs, .switch, .look-choice, .palette, .ask, .drama-ctl,
#wheel, .stage, .nav a, .promo-banner a, .tools {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

/* Every button sinks in a little when pressed, so a tap feels answered at once. */
.btn, .chip, .icon-btn, .seg button, .mode-tabs button, .look-choice, .palette, .ask, .promo-x {
  transition: transform 0.15s ease, filter 0.15s ease, background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.btn:active, .chip:active, .icon-btn:active, .seg button:active, .mode-tabs button:active,
.look-choice:active, .palette:active, .ask:active, .promo-x:active {
  transform: scale(0.93);
  filter: brightness(1.18);
  transition-duration: 0.05s;
}
.switch:active .track { transform: scale(0.92); }
.set-hint { display: block; font-size: 12px; font-weight: 400; color: var(--muted); opacity: 0.85; }

/* ---------- spin video (24 Oct): "Save this spin as a video" on the result card, and the sheet it's made in ---------- */
.video-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 14px auto 0;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px dashed var(--border);
  background: transparent;
  color: var(--accent);
  font-weight: 700;
  font-size: 14px;
  transition: transform 0.15s ease, background-color 0.2s ease, border-color 0.2s ease;
}
.video-btn[hidden] { display: none; }
.video-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.video-btn:hover { background: var(--surface-2); border-style: solid; }
.video-btn:active { transform: scale(0.94); }
/* A plain dark veil (no blur): the page behind stands still while the video is made. */
.video-sheet {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.68);
  opacity: 0;
  transition: opacity 0.2s ease;
}
.video-sheet[hidden] { display: none; }
.video-sheet.open { opacity: 1; }
.video-card {
  width: min(400px, 100%);
  max-height: calc(100vh - 32px);
  overflow: auto;
  padding: 14px 16px 12px;
  border-radius: 20px;
  background: var(--result-bg, var(--surface));
  border: 1px solid var(--result-border, var(--border));
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
  text-align: center;
}
.video-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.video-head h2 { margin: 0; font-family: var(--font-display); font-weight: var(--display-weight, 800); font-size: var(--h2-size, 22px); letter-spacing: var(--display-tracking, -0.01em); }
.video-screen {
  width: min(100%, calc((100vh - 250px) * 9 / 16));
  margin: 0 auto;
  aspect-ratio: 9 / 16;
  border-radius: 14px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 0 0 1px var(--border);
}
.video-screen .video-live, .video-screen .video-player { display: block; width: 100%; height: 100%; object-fit: contain; background: #000; }
.video-bar { height: 6px; margin: 12px auto 0; width: min(100%, 320px); border-radius: 6px; background: var(--surface-2); overflow: hidden; }
.video-bar[hidden] { display: none; }
.video-bar i { display: block; height: 100%; background: var(--btn-bg); transform-origin: 0 50%; transform: scaleX(0); }
.video-note { margin: 10px 0 0; font-size: 14px; color: var(--muted); }
.video-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 12px; }
.video-actions[hidden] { display: none; }
.video-actions .btn { text-decoration: none; display: inline-block; }
.video-actions .btn[hidden] { display: none; }
.video-fine { margin: 10px 0 0; font-size: 12px; color: var(--muted); opacity: 0.8; }
/* Under a free video: "Want it without drumrollwheel.com on it?" (a Creator feature, one free try). */
.video-upsell { margin-top: 12px; padding: 10px 12px; border-radius: 14px; border: 1px dashed var(--border); background: var(--surface-2); }
.video-upsell[hidden] { display: none; }
.video-upsell p { margin: 0 0 8px; font-size: 14px; font-weight: 600; }
.video-upsell-actions { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.video-upsell-actions .chip[hidden] { display: none; }
.video-upsell .creator-chip { color: var(--accent); text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }

/* The page's wheel in layers (wheel.js mountLayers, 24 Oct): the face (with the winner's highlight) and the pointer
   are turned by the compositor from keyframes, so a busy moment on the page can't make the spin stutter. */
.stage .wheel-turn, .stage .wheel-front { position: absolute; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; }
.stage .wheel-turn { will-change: transform; }
.stage .wheel-turn canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.stage .wheel-win { will-change: opacity; }
.stage .wheel-pointer { position: absolute; display: block; pointer-events: none; will-change: transform; }
