/* Fonts, hosted here (no visitor data goes to Google). SIL Open Font License, see assets/fonts/OFL-*.txt.
   Instrument Sans is a variable font: one file serves 400 and 500. */
@font-face {
  font-family: "Instrument Sans";
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url("/assets/fonts/instrument-sans-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Instrument Sans";
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url("/assets/fonts/instrument-sans-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Instrument Serif";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/instrument-serif-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Instrument Serif";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/instrument-serif-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Instrument Serif";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/instrument-serif-italic-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Instrument Serif";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/instrument-serif-italic-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --night: #070F26;
  --midnight: #142654;
  --panel: #0B1636;
  --gold: #E9C46A;
  --gold-light: #F6DE96;
  --gold-deep: #B8892E;
  --parchment: #E8E4D8;
  --muted: rgba(232, 228, 216, 0.72);
  --faint: rgba(232, 228, 216, 0.56);
  --line: rgba(232, 228, 216, 0.12);
  --accent: var(--gold);
  --st-available: #3FB97A;
  --st-busy: #E8963A;
  --st-dnd: #E05A4F;
  --serif: "Instrument Serif", Georgia, serif;
  --mono: ui-monospace, "SFMono-Regular", "Cascadia Mono", Consolas, monospace;
  --sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --header: 56px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --tabs: calc(64px + var(--safe-bottom));
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.76, 0, 0.24, 1);
  --radius-tile: 28px;
  /* The six Chain Reaction symbols */
  --sym-popcorn: #E8E4D8;
  --sym-ticket: #7FCBA4;
  --sym-reel: #8FB8E8;
  --sym-clapper: #B9A6E8;
  --sym-mask: #E58F7E;
  --sym-star: #F6DE96;
  /* Where the beam starts: the centre of Baffo Bot's visor, in % of available.webp.
     Other poses set their own values from MASCOT_POSES in main.js. */
  --lens-x: 50.6%;
  --lens-y: 31.5%;
}

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

img {
  max-width: 100%;
  height: auto;
  display: block;
}

body {
  margin: 0;
  color: var(--parchment);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  background: var(--night);
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
.wordmark,
.mobile-menu-link {
  font-family: var(--serif);
  font-weight: 400;
}

a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

body.is-locked {
  overflow: hidden;
}

html.is-app body {
  padding-bottom: var(--tabs);
}

/* Smooth scrolling (Lenis) */
html.lenis,
html.lenis body {
  height: auto;
}

.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}

.lenis.lenis-stopped {
  overflow: hidden;
}

/* Page transitions: a short cross-document fade. The header and tab bar stay put. */
@view-transition {
  navigation: auto;
}

::view-transition-old(root) {
  animation: vt-out 220ms ease-out both;
}

::view-transition-new(root) {
  animation: vt-in 380ms var(--ease-out) both;
}

@keyframes vt-out {
  to { opacity: 0; }
}

@keyframes vt-in {
  from { opacity: 0; transform: translateY(8px); }
}

.site-header {
  view-transition-name: site-header;
}

.app-tabs {
  view-transition-name: app-tabs;
}

/* Header and desktop navigation */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 50;
  width: 100%;
  height: calc(var(--header) + var(--safe-top));
  padding-top: var(--safe-top);
  border-bottom: 1px solid transparent;
  transition: background-color 300ms ease-out, border-color 300ms ease-out;
}

.site-header.is-scrolled {
  border-color: rgba(233, 196, 106, 0.12);
  background: rgba(7, 15, 38, 0.72);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
  backdrop-filter: saturate(160%) blur(18px);
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  height: var(--header);
  margin: 0 auto;
  padding: 0 24px;
}

.wordmark {
  /* A finger-sized target (44px) without moving anything: the padding is given back by the margin. */
  margin: -9px -6px;
  padding: 9px 6px;
  color: var(--parchment);
  font-size: 1.7rem;
  font-style: italic;
  line-height: 1;
  text-decoration: none;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.desktop-nav a {
  color: var(--muted);
  font-size: 0.875rem;
  text-decoration: none;
  transition: color 250ms ease-out;
}

.desktop-nav a:hover,
.desktop-nav a:focus-visible {
  color: var(--parchment);
}

.desktop-nav a[aria-current] {
  color: var(--accent);
}

.menu-toggle,
.mobile-menu-close {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-right: -10px;
  border: 0;
  background: transparent;
  color: var(--parchment);
  cursor: pointer;
}

/* Full-screen menu (mobile, and "More" in app mode) */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  background: #050A1C;
  padding: var(--safe-top) 24px calc(28px + var(--safe-bottom));
  opacity: 0;
  transition: opacity 300ms var(--ease-out);
}

.mobile-menu[hidden] {
  display: none;
}

.mobile-menu.is-open {
  opacity: 1;
}

.mobile-menu-top {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  height: var(--header);
}

.mobile-menu-close {
  display: flex;
}

.mobile-menu-nav {
  display: flex;
  flex-direction: column;
  margin-top: clamp(16px, 5vh, 48px);
}

.mobile-menu-link {
  display: block;
  color: var(--parchment);
  font-size: clamp(2.75rem, 12vw, 4.25rem);
  line-height: 1.08;
  text-decoration: none;
}

.mobile-menu-link:hover,
.mobile-menu-link:focus-visible {
  color: var(--gold-light);
}

.mobile-menu-link[aria-current] {
  color: var(--accent);
  font-style: italic;
}

.mask {
  display: block;
  overflow: hidden;
  padding: 0 0.1em 0.08em 0;
}

.mask > span {
  display: block;
}

.mobile-menu-small {
  display: flex;
  gap: 24px;
  margin-top: 28px;
}

.mobile-menu-small a {
  color: var(--muted);
  font-size: 0.95rem;
  text-decoration: none;
}

.mobile-menu-small a[aria-current] {
  color: var(--accent);
}

.mobile-menu-status {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: auto;
  padding-top: 32px;
  color: var(--muted);
  font-size: 0.95rem;
}

.mobile-menu-status [data-status] {
  color: var(--parchment);
}

@media (prefers-reduced-motion: no-preference) {
  .mobile-menu .mask > span {
    transform: translateY(110%);
    transition: transform 700ms var(--ease-out);
    transition-delay: calc(60ms + var(--i, 0) * 55ms);
  }

  .mobile-menu.is-open .mask > span {
    transform: translateY(0);
  }

  .mobile-menu-small,
  .mobile-menu-status {
    opacity: 0;
    transition: opacity 500ms ease-out 380ms;
  }

  .mobile-menu.is-open .mobile-menu-small,
  .mobile-menu.is-open .mobile-menu-status {
    opacity: 1;
  }
}

/* App mode: a bottom tab bar replaces the navigation */
.app-tabs {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 55;
  display: none;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border-top: 1px solid rgba(232, 228, 216, 0.1);
  background: rgba(10, 20, 48, 0.85);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  padding: 6px 0 calc(6px + var(--safe-bottom));
}

html.is-app .app-tabs {
  display: grid;
}

html.is-app .desktop-nav,
html.is-app .menu-toggle {
  display: none;
}

.app-tabs a,
.app-tabs button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 48px;
  border: 0;
  background: none;
  color: rgba(232, 228, 216, 0.6);
  font: inherit;
  font-size: 11px;
  text-decoration: none;
  cursor: pointer;
  transition: color 250ms ease-out, transform 120ms ease-out;
}

.app-tabs a[aria-current],
.app-tabs button.is-current {
  color: var(--accent);
}

.app-tabs a:focus-visible,
.app-tabs button:focus-visible {
  outline-offset: -2px;
}

.app-tabs a:active,
.app-tabs button:active {
  transform: scale(0.94);
}

/* Status dot */
@keyframes breathe {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.dot {
  display: inline-block;
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-radius: 9999px;
  background: var(--gold);
  animation: breathe 3s ease-in-out infinite;
}

[data-state-host] {
  --status-color: var(--st-available);
  --status-halo: rgba(63, 185, 122, 0.18);
}

[data-state-host][data-state="busy"] {
  --status-color: var(--st-busy);
  --status-halo: rgba(232, 150, 58, 0.2);
}

[data-state-host][data-state="dnd"] {
  --status-color: var(--st-dnd);
  --status-halo: rgba(224, 90, 79, 0.2);
}

[data-state-host] .dot {
  background: var(--status-color);
  box-shadow: 0 0 12px var(--status-halo);
}

/* Footer with the credits */
.site-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  margin-top: clamp(120px, 18vh, 200px);
  padding: 0 24px 64px;
  text-align: center;
}

.credits-button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  border: 0;
  border-radius: 16px;
  background: none;
  color: inherit;
  cursor: pointer;
  padding: 16px 32px;
  font: inherit;
}

.credits-lines {
  display: flex;
  gap: 48px;
}

.credit {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.credit-role {
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
}

.credit-name {
  color: var(--parchment);
  font-family: var(--serif);
  font-size: 1.35rem;
  line-height: 1.2;
}

.credits-fin {
  color: var(--accent);
  font-family: var(--serif);
  font-size: 2rem;
  font-style: italic;
  line-height: 1;
  transition: transform 500ms var(--ease-out);
}

.credits-button:hover .credits-fin {
  transform: scale(1.08);
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  margin: -11px -6px;
  padding: 11px 6px;
  color: var(--muted);
  font-size: 0.85rem;
  text-decoration: none;
  transition: color 250ms ease-out;
}

.footer-links a:hover,
.footer-links a[aria-current] {
  color: var(--accent);
}

.credits-copy {
  margin: 0;
  color: rgba(232, 228, 216, 0.42);
  font-size: 0.8rem;
}

.credits-roll {
  position: fixed;
  inset: 0;
  z-index: 65;
  overflow: hidden;
  background: #000000;
  cursor: pointer;
}

.credits-roll:focus {
  outline: none;
}

.credits-roll-track {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 24px;
  text-align: center;
  will-change: transform;
}

.roll-role {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.roll-name {
  margin: 8px 0 64px;
  color: var(--parchment);
  font-family: var(--serif);
  font-size: clamp(1.6rem, 3vw, 2.25rem);
  line-height: 1.2;
}

.roll-final {
  margin: 48px 0 0;
  color: var(--accent);
  font-family: var(--serif);
  font-size: clamp(3rem, 8vw, 6rem);
  font-style: italic;
  line-height: 1;
}

.credits-roll.is-static {
  overflow-y: auto;
}

.credits-roll.is-static .credits-roll-track {
  position: static;
  padding: 96px 24px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border: 1px solid rgba(233, 196, 106, 0.6);
  border-radius: 9999px;
  background: transparent;
  color: var(--parchment);
  cursor: pointer;
  padding: 0.75rem 2rem;
  font: inherit;
  font-size: 1rem;
  text-decoration: none;
  transition: background-color 300ms ease-out, border-color 300ms ease-out;
}

.btn:hover {
  border-color: var(--gold);
  background: rgba(233, 196, 106, 0.1);
}

.btn-primary {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--night);
  font-weight: 500;
}

.btn:disabled {
  cursor: default;
  opacity: 0.55;
}

.btn-primary:hover {
  border-color: var(--gold-light);
  background: var(--gold-light);
}

/* ===== Home: the intro ===== */
.intro {
  display: none;
}

html.has-intro .intro {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: block;
  animation: intro-hide 0s linear var(--intro-end, 2.4s) forwards;
  transition: opacity 280ms ease-out;
}

html.intro-full {
  --intro-end: 2.4s;
}

html.intro-short {
  --intro-end: 0.8s;
}

html.intro-skip .intro {
  opacity: 0;
}

@keyframes intro-hide {
  to { visibility: hidden; }
}

.intro-bar {
  position: absolute;
  right: 0;
  left: 0;
  height: 50.5%;
  background: #000000;
  will-change: transform;
}

.intro-bar-top {
  top: 0;
  animation: bar-up 650ms var(--ease-in-out) 1.75s forwards;
}

.intro-bar-bottom {
  bottom: 0;
  animation: bar-down 650ms var(--ease-in-out) 1.75s forwards;
}

@keyframes bar-up {
  to { transform: translateY(-101%); }
}

@keyframes bar-down {
  to { transform: translateY(101%); }
}

.intro-word {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.intro-word-text {
  position: relative;
  display: flex;
  overflow: hidden;
  padding: 0.04em 0.12em 0.14em;
  color: #B3AD9F;
  font-family: var(--serif);
  font-size: clamp(5rem, 16vw, 14rem);
  font-style: italic;
  line-height: 1;
  letter-spacing: -0.02em;
}

/* The fade-out sits on the letters, not on their parent: an animated parent would isolate the sweep's blend from the black bars. */
.intro-letter {
  position: relative;
  display: inline-block;
  animation: word-out 280ms ease-in 1.62s forwards;
}

@keyframes word-out {
  to { opacity: 0; transform: translateY(-4%); }
}

/* Each letter rises as a blurred copy, then the sharp letter fades in over it: only opacity and transform move. */
.intro-letter .soft,
.intro-letter .sharp {
  display: inline-block;
  opacity: 0;
  transform: translateY(40%);
}

.intro-letter .soft {
  position: absolute;
  top: 0;
  left: 0;
  filter: blur(14px);
  animation: letter-soft 700ms var(--ease-out) forwards;
  animation-delay: calc(150ms + var(--i) * 90ms);
}

.intro-letter .sharp {
  animation: letter-sharp 700ms var(--ease-out) forwards;
  animation-delay: calc(150ms + var(--i) * 90ms);
}

@keyframes letter-soft {
  45% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(0); }
}

@keyframes letter-sharp {
  35% { opacity: 0; }
  100% { opacity: 1; transform: translateY(0); }
}

/* The light sweep: a bright band that colour-dodges the letters and leaves the black untouched. */
.intro-sweep {
  position: absolute;
  top: -10%;
  bottom: -10%;
  left: 0;
  width: 40%;
  background: linear-gradient(100deg, transparent 10%, rgba(255, 232, 178, 0.95) 50%, transparent 90%);
  mix-blend-mode: color-dodge;
  transform: translateX(-110%);
  animation: sweep 620ms ease-in-out 1s forwards;
}

@keyframes sweep {
  to { transform: translateX(260%); }
}

/* The projector warming up: a dark layer that flickers over the word (never the word's own ancestors,
   see above). All intro animations are finite: main.js waits for them to end. */
.intro-flicker {
  position: absolute;
  inset: 0;
  background: #000000;
  opacity: 0;
  pointer-events: none;
  animation: projector-flicker 1.1s steps(1, end) 0.1s;
}

@keyframes projector-flicker {
  0% { opacity: 0.35; }
  12% { opacity: 0; }
  20% { opacity: 0.22; }
  28% { opacity: 0; }
  55% { opacity: 0.12; }
  62%, 100% { opacity: 0; }
}

/* Film grain over the whole intro, gone by the time the curtain is open */
.intro-grain {
  position: absolute;
  inset: -50%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.09;
  pointer-events: none;
  animation:
    grain-jitter 0.4s steps(1, end) 6,
    grain-out 400ms ease-out 1.9s forwards;
}

@keyframes grain-jitter {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-7%, 4%); }
  50% { transform: translate(5%, -6%); }
  75% { transform: translate(-3%, -2%); }
}

@keyframes grain-out {
  to { opacity: 0; }
}

html.intro-short .intro-letter .soft,
html.intro-short .intro-sweep,
html.intro-short .intro-flicker,
html.intro-short .intro-grain {
  display: none;
}

html.intro-short .intro-letter .sharp {
  opacity: 1;
  transform: none;
  animation: none;
}

html.intro-short .intro-letter {
  animation-delay: 0.12s;
}

html.intro-short .intro-bar {
  animation-duration: 550ms;
  animation-delay: 0.25s;
}

html.intro-full .stage-copy,
html.intro-full .show {
  animation: stage-enter 1.2s var(--ease-out) 1.8s both;
}

html.intro-short .stage-copy,
html.intro-short .show {
  animation: stage-enter 900ms var(--ease-out) 0.3s both;
}

@keyframes stage-enter {
  from { opacity: 0.4; transform: scale(1.04); }
}

/* ===== Home: the stage ===== */
.stage {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 100vh;
  min-height: 100svh;
  overflow: clip;
  padding: calc(var(--header) + var(--safe-top) + 24px) 24px 48px;
  background: radial-gradient(ellipse at 70% 45%, #13245A 0%, var(--night) 62%);
}

html.is-app .stage {
  min-height: calc(100svh - var(--tabs));
}

.stage-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 32px;
  align-items: center;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  transform-origin: 50% 35%;
}

.stage-eyebrow {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}

.stage-eyebrow[hidden] {
  display: none;
}

.stage-title {
  margin: 0;
  color: var(--parchment);
  font-size: clamp(5rem, 13vw, 12rem);
  font-style: italic;
  line-height: 0.9;
  letter-spacing: -0.025em;
}

html[data-season] .stage-title {
  color: var(--accent);
}

.show-word {
  touch-action: manipulation;
  border-radius: 8px;
}

.stage-quote {
  min-height: 2.7em;
  max-width: 24ch;
  margin: 1.5rem 0 0;
  color: var(--muted);
  font-family: var(--serif);
  font-size: clamp(1.2rem, 1.9vw, 1.55rem);
  font-style: italic;
  line-height: 1.3;
}

.quote-line {
  display: inline-block;
  transition: opacity 450ms ease-out, transform 450ms var(--ease-out);
}

.quote-line.is-out {
  opacity: 0;
  transform: translateY(6px);
}

#door {
  display: inline-block;
  margin-top: 1.25rem;
  color: var(--accent);
  font-family: var(--serif);
  font-size: 1.35rem;
  font-style: italic;
  text-underline-offset: 4px;
}

#door[hidden] {
  display: none;
}

/* The show: mascot, beam and screen. Everything is positioned in % of this box. */
.show {
  /* The mascot box is square and as tall as the show, so its width is 1 / 1.75 of the show. */
  --mascot-w: 57.1%;
  --screen-y: 34%;
  position: relative;
  width: 100%;
  aspect-ratio: 1.75 / 1;
}

.mascot {
  --bob-duration: 5.6s;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  height: 100%;
  aspect-ratio: 1 / 1;
  perspective: 900px;
  pointer-events: none;
}

.mascot-sink,
.mascot-bob,
.mascot-tilt {
  position: absolute;
  inset: 0;
}

.mascot-bob {
  animation: bob var(--bob-duration) ease-in-out infinite;
}

.mascot-tilt {
  transform-style: preserve-3d;
  will-change: transform;
}

@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-2.2%); }
}

/* A soft golden glow on the floor. It shares the bob's timing: smaller and fainter while Baffo floats up. */
.mascot-glow {
  position: absolute;
  top: 95%;
  left: 50%;
  width: 62%;
  height: 13%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(246, 222, 150, 0.55), rgba(233, 196, 106, 0.22) 55%, transparent 100%);
  filter: blur(8px);
  transform: translate(-50%, -50%);
  animation: floor-glow var(--bob-duration) ease-in-out infinite;
}

@keyframes floor-glow {
  0%, 100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 0.6; transform: translate(-50%, -50%) scale(0.82); }
}

.mascot-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity 700ms ease-out;
}

.mascot-img.is-front {
  opacity: 1;
}

/* The beam: a soft cone from the visor towards the screen. main.js measures its length, angle and spread. */
.beam {
  position: absolute;
  top: var(--lens-y);
  left: var(--lens-x);
  z-index: 1;
  width: var(--beam-length, 70%);
  height: var(--beam-height, 260px);
  mix-blend-mode: screen;
  transform: translateY(-50%) rotate(var(--beam-angle, 0deg));
  transform-origin: 0 50%;
  opacity: 0.85;
  transition: opacity 700ms ease-out;
  pointer-events: none;
}

.beam-light,
.beam-light::after {
  --spread: var(--beam-spread, 20deg);
  position: absolute;
  inset: 0;
  background: conic-gradient(from 0deg at 0 50%,
    transparent 0deg calc(90deg - var(--spread) - 12deg),
    rgba(255, 228, 170, 0.34) calc(90deg - var(--spread)),
    rgba(255, 240, 205, 0.62) 90deg,
    rgba(255, 228, 170, 0.34) calc(90deg + var(--spread)),
    transparent calc(90deg + var(--spread) + 12deg) 360deg);
  -webkit-mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0.6) 0%, #000 12%, rgba(0, 0, 0, 0.75) 70%, rgba(0, 0, 0, 0.45) 100%);
  mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0.6) 0%, #000 12%, rgba(0, 0, 0, 0.75) 70%, rgba(0, 0, 0, 0.45) 100%);
  animation: beam-steady 6s ease-in-out infinite;
}

/* The light source: a soft glow on the visor where the beam starts. */
.beam::before {
  position: absolute;
  top: 50%;
  left: 0;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 236, 190, 0.6), rgba(255, 236, 190, 0.18) 55%, transparent);
  content: "";
  transform: translate(-50%, -50%);
}

.beam-light::after {
  content: "";
  opacity: 0;
  animation: none;
  transition: opacity 600ms ease-out;
}

@keyframes beam-steady {
  0%, 100% { opacity: 1; }
  40% { opacity: 0.92; }
  44% { opacity: 0.86; }
  48% { opacity: 0.95; }
}

@keyframes beam-flicker {
  0%, 100% { opacity: 1; }
  12% { opacity: 0.78; }
  18% { opacity: 1; }
  47% { opacity: 0.86; }
  52% { opacity: 0.7; }
  58% { opacity: 1; }
  83% { opacity: 0.9; }
}

/* A sleeping Baffo (eyes closed, visor dark) projects nothing. */
.mascot[data-state="dnd"] .beam {
  opacity: 0;
}

/* Code-based look, only while a pose has no image of its own (now only christmas.webp):
   busy on top of the fallback image gets a faster float and a brighter, flickering beam. */
.mascot[data-look="busy"] {
  --bob-duration: 3.2s;
}

.mascot[data-look="busy"] .beam {
  opacity: 1;
}

.mascot[data-look="busy"] .beam-light {
  animation: beam-flicker 1.6s steps(1, end) infinite;
}

.mascot[data-look="busy"] .beam-light::after {
  opacity: 0.6;
}

.show.no-mascot .beam,
.show.no-mascot .mascot-glow {
  display: none;
}

/* The faint halo ring behind the mascot (the Konami ring) */
.halo {
  position: absolute;
  top: 50%;
  left: calc(var(--mascot-w, 57.1%) * 0.5);
  z-index: 1;
  width: calc(var(--mascot-w, 57.1%) * 0.9);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
}

.ring {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(233, 196, 106, 0.28);
  border-radius: 9999px;
  pointer-events: none;
  animation: breathe 6s ease-in-out infinite;
  transition: border-color 1s, box-shadow 1s;
}

@keyframes ring-flare {
  0% {
    border-color: rgba(233, 196, 106, 0.4);
    box-shadow: 0 0 0 rgba(233, 196, 106, 0), inset 0 0 0 rgba(233, 196, 106, 0);
    transform: scale(1);
  }
  30% {
    border-color: rgba(246, 222, 150, 1);
    box-shadow: 0 0 120px rgba(233, 196, 106, 0.9), 0 0 40px rgba(246, 222, 150, 0.9), inset 0 0 80px rgba(233, 196, 106, 0.5);
    transform: scale(1.03);
  }
  100% {
    border-color: rgba(233, 196, 106, 0.95);
    box-shadow: 0 0 70px rgba(233, 196, 106, 0.55), inset 0 0 60px rgba(233, 196, 106, 0.25);
    transform: scale(1);
  }
}

@keyframes glow-pulse {
  0%, 100% { box-shadow: 0 0 70px rgba(233, 196, 106, 0.55), inset 0 0 60px rgba(233, 196, 106, 0.25); }
  50% { box-shadow: 0 0 90px rgba(233, 196, 106, 0.7), inset 0 0 60px rgba(233, 196, 106, 0.25); }
}

.ring-awake {
  border-color: rgba(233, 196, 106, 0.95);
  box-shadow: 0 0 70px rgba(233, 196, 106, 0.55), inset 0 0 60px rgba(233, 196, 106, 0.25);
  animation: ring-flare 1.2s ease-out forwards, glow-pulse 4s ease-in-out infinite 1.2s;
}

.shockwave {
  position: absolute;
  inset: 0;
  border: 2px solid rgba(246, 222, 150, 0.9);
  border-radius: 9999px;
  box-shadow: 0 0 30px rgba(233, 196, 106, 0.7);
  pointer-events: none;
}

/* The screen the beam lands on */
.screen {
  position: absolute;
  top: var(--screen-y);
  right: 0;
  z-index: 3;
  width: 36%;
  min-height: 34%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  border: 1px solid rgba(246, 222, 150, 0.2);
  border-radius: 14px;
  background: linear-gradient(160deg, rgba(246, 222, 150, 0.12), rgba(246, 222, 150, 0.03));
  padding: clamp(14px, 2vw, 22px);
  transform: translateY(-50%);
}

.screen p {
  margin: 0;
}

.screen-label {
  color: var(--muted);
  font-size: clamp(0.7rem, 1vw, 0.82rem);
  line-height: 1.3;
}

.screen-status {
  display: flex;
  align-items: baseline;
  gap: 10px;
  color: var(--parchment);
  font-family: var(--serif);
  font-size: clamp(1.05rem, 2vw, 1.6rem);
  line-height: 1.15;
}

.screen .dot {
  position: relative;
  top: -0.1em;
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  cursor: pointer;
  touch-action: manipulation;
  box-shadow: 0 0 0 5px var(--status-halo), 0 0 14px var(--status-halo);
}

/* A larger invisible tap target around the small dot. */
.screen .dot::before {
  position: absolute;
  inset: -16px;
  content: "";
}

.screen-state {
  color: var(--status-color);
  font-size: clamp(0.72rem, 1vw, 0.85rem);
}

.show.no-mascot .screen {
  right: 50%;
  width: min(100%, 320px);
  transform: translate(50%, -50%);
}

/* ===== Home: tiles ===== */
.tiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 24px 0;
  list-style: none;
}

.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 440px;
  overflow: hidden;
  border-radius: var(--radius-tile);
  background: var(--panel);
  color: inherit;
  padding: 40px 40px 0;
  text-decoration: none;
  transition: transform 500ms var(--ease-out);
}

.tile::after {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(233, 196, 106, 0.22);
  border-radius: inherit;
  content: "";
  opacity: 0;
  pointer-events: none;
  transition: opacity 400ms ease-out;
}

.tile:focus-visible {
  outline-offset: 4px;
}

.tile-title {
  margin: 0;
  color: var(--parchment);
  font-size: clamp(2rem, 3.2vw, 2.75rem);
  line-height: 1.05;
}

.tile-copy {
  margin: 0.5rem 0 0;
  color: var(--muted);
  font-size: 1rem;
}

.tile-visual {
  display: grid;
  flex: 1 1 auto;
  place-items: center;
  min-height: 220px;
  padding: 24px 0 40px;
  transition: transform 700ms var(--ease-out);
}

@media (hover: hover) {
  .tile:hover {
    transform: translateY(-4px);
  }

  .tile:hover::after {
    opacity: 1;
  }

  .tile:hover .tile-visual {
    transform: scale(1.03);
  }
}

/* Games tile: as wide as the grid, with both games side by side */
.tile-wide {
  grid-column: 1 / -1;
}

.tile-games {
  grid-auto-flow: column;
  justify-content: center;
  gap: clamp(40px, 9vw, 120px);
}

.tile-games .poster-grid {
  position: static;
  width: 230px;
  translate: none;
}

/* Baffo Brain tile: a small hall whose middle seats light up, the picture of the Lab */
.brain-hall {
  display: grid;
  justify-items: center;
  gap: 18px;
  width: min(100%, 420px);
}

.brain-screen {
  width: 70%;
  height: 4px;
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
  background: linear-gradient(90deg, rgba(246, 222, 150, 0.15), var(--gold-light), rgba(246, 222, 150, 0.15));
  box-shadow: 0 8px 28px rgba(246, 222, 150, 0.35);
}

.brain-seats {
  width: 100%;
  height: auto;
  transform: perspective(500px) rotateX(16deg);
}

.brain-seats circle {
  fill: rgba(232, 228, 216, 0.13);
}

/* The filled seats; on hover more of them fill: the room the right price brings */
.brain-seats .on {
  fill: var(--gold);
}

@media (prefers-reduced-motion: no-preference) {
  .brain-seats circle {
    transition: fill 400ms var(--ease-out);
  }
}

@media (hover: hover) {
  .tile:hover .brain-seats .more {
    fill: var(--gold-light);
  }
}

/* Team tile */
.duo {
  position: relative;
  width: 290px;
  height: 220px;
}

.duo img {
  position: absolute;
  border: 1px solid var(--gold);
  border-radius: 50%;
  background: var(--night);
  padding: 5px;
  object-fit: cover;
}

.duo img:first-child {
  top: 0;
  left: 0;
  width: 208px;
  height: 208px;
}

.duo img:last-child {
  right: 0;
  bottom: 0;
  width: 128px;
  height: 128px;
}

/* Games tile and teaser: SEQUEL with a slowly turning genre reel */
.sequel {
  position: relative;
  display: grid;
  place-items: center;
  width: 240px;
  height: 240px;
}

.genre-reel {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  color: rgba(233, 196, 106, 0.55);
  animation: spin 60s linear infinite;
}

.genre-reel text {
  fill: currentColor;
  font-family: var(--sans);
  font-size: 9.5px;
  letter-spacing: 0.28em;
}

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

.sequel-word {
  color: var(--parchment);
  font-family: var(--sans);
  font-size: 1.6rem;
  font-weight: 500;
  letter-spacing: 0.32em;
  padding-left: 0.32em;
}

/* Films tile: marquee bulbs */
.marquee {
  width: min(100%, 360px);
  border: 1px solid rgba(233, 196, 106, 0.4);
  border-radius: 14px;
  background: #0C0C0F;
  padding: 16px 18px;
  text-align: center;
}

.bulbs {
  display: flex;
  justify-content: space-between;
}

.bulbs span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold-light);
  box-shadow: 0 0 8px rgba(246, 222, 150, 0.8);
  animation: bulb-blink 1.2s steps(1, end) infinite;
}

.bulbs span:nth-child(even) {
  animation-delay: -600ms;
}

@keyframes bulb-blink {
  0% { opacity: 1; }
  50% { opacity: 0.25; }
}

/* Secret ten: a bulb that plays a note, and the mothership's answer */
.bulbs span.is-played,
.bulbs.is-answering span {
  animation: none;
  opacity: 1;
  background: #fff;
  box-shadow: 0 0 10px 3px rgba(246, 222, 150, 0.95);
}

.bulbs span.is-played {
  transform: scale(1.7);
}

@media (prefers-reduced-motion: no-preference) {
  .letterboard .bulbs span {
    transition: transform 160ms var(--ease-out);
  }
}

.marquee-list {
  margin: 16px 0;
  padding: 0;
  list-style: none;
}

.marquee-list li {
  overflow: hidden;
  color: var(--parchment);
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 2;
  letter-spacing: 0.16em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

/* Book tile: a minimal calendar */
.calendar-graphic {
  width: 250px;
  color: rgba(232, 228, 216, 0.4);
}

/* Backstage tile: ten secret dots, in two rows of five */
.secret-dots {
  display: grid;
  grid-template-columns: repeat(5, 26px);
  gap: 26px;
}

.secret-dots span {
  width: 26px;
  height: 26px;
  border: 1px solid rgba(233, 196, 106, 0.4);
  border-radius: 50%;
}

.secret-dots span.is-found {
  border-color: var(--gold);
  background: var(--gold);
  box-shadow: 0 0 14px rgba(233, 196, 106, 0.55);
}

/* ===== Subpages ===== */
.page {
  max-width: 1100px;
  margin: 0 auto;
  padding: calc(var(--header) + var(--safe-top) + clamp(80px, 15vh, 160px)) 24px 0;
}

.page-title {
  margin: 0;
  color: var(--parchment);
  font-size: clamp(3.5rem, 10vw, 8rem);
  line-height: 0.95;
  letter-spacing: -0.02em;
}

.line {
  display: block;
  overflow: hidden;
  margin-bottom: -0.1em;
  padding: 0 0.1em 0.1em 0;
}

.line > span {
  display: inline-block;
}

.heading-accent {
  color: var(--accent);
  font-style: italic;
}

.page-lede {
  max-width: 40ch;
  margin: 2rem 0 0;
  color: var(--muted);
  font-size: clamp(1.1rem, 1.6vw, 1.3rem);
  line-height: 1.5;
}

.page-body {
  margin-top: clamp(56px, 9vh, 96px);
}

@media (prefers-reduced-motion: no-preference) {
  .line > span {
    transform: translateY(105%);
    animation: line-up 1.1s var(--ease-out) forwards;
    animation-delay: calc(120ms + var(--i, 0) * 100ms);
  }

  .page-lede,
  .page-body {
    animation: fade-up 900ms var(--ease-out) 380ms both;
  }
}

@keyframes line-up {
  to { transform: translateY(0); }
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(14px); }
}

/* Team */
.team {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 64px;
  max-width: 860px;
  text-align: center;
}

.member:focus-visible {
  outline: none;
}

.portrait {
  position: relative;
  display: block;
  width: calc(180px + 18px);
  height: calc(180px + 18px);
  margin: 0 auto;
  border: 1px solid var(--gold);
  border-radius: 50%;
  background: none;
  color: inherit;
  padding: 8px;
  font: inherit;
}

button.portrait {
  cursor: pointer;
  touch-action: manipulation;
}

.member:focus-visible .portrait {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
}

.portrait-photo {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 50%;
  background: var(--panel);
}

.portrait-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--gold);
  font-family: var(--serif);
  font-size: 3rem;
}

.portrait img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.portrait .is-gray {
  filter: grayscale(1);
}

.portrait .is-color {
  opacity: 0;
  transition: opacity 700ms ease-out;
}

.member:hover .is-color,
.member:focus-within .is-color,
.member:focus .is-color,
.portrait.is-eyes .is-color {
  opacity: 1;
}

.member-name {
  margin: 1.75rem 0 0;
  color: var(--parchment);
  font-size: 2rem;
  line-height: 1.1;
}

.member-role {
  margin: 0.4rem 0 0;
  color: var(--accent);
  font-size: 0.95rem;
}

.member-line {
  max-width: 30ch;
  margin: 0.75rem auto 0;
  color: var(--muted);
}

/* Games teaser */
.teaser {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  aspect-ratio: 2.39 / 1;
  border-radius: var(--radius-tile);
  background: radial-gradient(ellipse at 50% 60%, #13245A 0%, #050A1C 70%);
  text-align: center;
}

.teaser::before,
.teaser::after {
  position: absolute;
  right: 0;
  left: 0;
  height: 9%;
  background: #000000;
  content: "";
}

.teaser::before { top: 0; }
.teaser::after { bottom: 0; }

.teaser .genre-reel {
  inset: auto;
  top: 50%;
  left: 50%;
  width: min(70%, 520px);
  height: auto;
  aspect-ratio: 1;
  color: rgba(233, 196, 106, 0.18);
  translate: -50% -50%;
}

.teaser-content {
  position: relative;
  z-index: 1;
  padding: 0 24px;
}

.teaser-kicker {
  margin: 0;
  color: var(--accent);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
}

.teaser-title {
  margin: 0.75rem 0 0;
  color: var(--parchment);
  font-family: var(--sans);
  font-size: clamp(2.5rem, 8vw, 6.5rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.3em;
  padding-left: 0.3em;
}

.teaser-line {
  max-width: 34ch;
  margin: 1.25rem auto 0;
  color: var(--muted);
  font-family: var(--serif);
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  font-style: italic;
  line-height: 1.35;
}

/* Games: SEQUEL, the game under the teaser */
.game {
  max-width: 640px;
  margin-right: auto;
  margin-left: auto;
  text-align: center;
}

.game-kicker {
  margin: 0;
  color: var(--accent);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
}

.game-film {
  margin: 0.5rem 0 0;
  color: var(--parchment);
  font-size: clamp(2.25rem, 6vw, 4rem);
  line-height: 1.05;
}

.game-odds {
  min-height: 1.65em;
  margin: 0.75rem 0 0;
  color: var(--muted);
}

.game-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px clamp(28px, 8vw, 72px);
  margin: 2.5rem 0 0;
}

.game-stats dt {
  color: var(--faint);
  font-size: 0.85rem;
}

.game-stats dd {
  margin: 0.25rem 0 0;
  font-family: var(--serif);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.game-message {
  min-height: 3.3em;
  max-width: 36ch;
  margin: 2rem auto 0;
  color: var(--muted);
  font-family: var(--serif);
  font-size: 1.25rem;
  font-style: italic;
  line-height: 1.35;
}

.game-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 1.5rem;
}

/* .btn sets display, which would otherwise override the hidden attribute */
.game-actions .btn[hidden] {
  display: none;
}

.game-reel {
  margin: 3rem 0 0;
  padding: 0;
  list-style: none;
  text-align: left;
}

.game-reel li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 0.75rem 0;
  border-top: 1px solid var(--line);
}

.game-reel li span:last-child {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.game-reel li.is-flop span:last-child {
  color: var(--st-dnd);
}

.game-modes {
  display: inline-flex;
  gap: 4px;
  margin-bottom: 2.5rem;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 9999px;
}

.game-mode {
  min-height: 40px;
  padding: 0.5rem 1.25rem;
  border: 0;
  border-radius: 9999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 0.95rem;
  transition: background-color 300ms ease-out, color 300ms ease-out;
}

.game-mode.is-active {
  background: rgba(233, 196, 106, 0.14);
  color: var(--parchment);
}

/* The genre reel: one line tall, the column of genres slides behind it */
.game-genre-window {
  height: 1.6rem;
  overflow: hidden;
  margin-bottom: 0.75rem;
  -webkit-mask-image: linear-gradient(transparent, #000 30%, #000 70%, transparent);
  mask-image: linear-gradient(transparent, #000 30%, #000 70%, transparent);
}

.game-genres span {
  display: block;
  height: 1.6rem;
  color: var(--accent);
  font-size: 0.85rem;
  line-height: 1.6rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

/* The 8-second scene */
.game-scene {
  margin: 2rem auto 0;
  max-width: 420px;
}

.game-scene[hidden] {
  display: none;
}

.game-beat {
  min-height: 1.4em;
  margin: 0 0 1.25rem;
  font-family: var(--serif);
  font-size: 1.5rem;
  font-style: italic;
  line-height: 1.3;
}

.game-bar {
  height: 6px;
  overflow: hidden;
  border-radius: 9999px;
  background: var(--line);
}

.game-bar span {
  display: block;
  height: 100%;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
}

.game-bar-thin {
  height: 2px;
  margin-top: 10px;
}

.game-bar-thin span {
  background: var(--faint);
}

@media (prefers-reduced-motion: no-preference) {
  #game-meter {
    transition: transform 1200ms var(--ease-out);
  }
}

.game-skip {
  margin-top: 1rem;
  padding: 0.5rem;
  border: 0;
  background: transparent;
  color: var(--faint);
  cursor: pointer;
  font: inherit;
  font-size: 0.85rem;
}

/* Posting a Premiere score and the board */
.game-post {
  margin: 2rem auto 0;
  max-width: 360px;
  text-align: left;
}

.game-post label {
  color: var(--muted);
  font-size: 0.9rem;
}

.game-post-row {
  display: flex;
  gap: 8px;
  margin-top: 0.5rem;
}

.game-post input {
  flex: 1;
  min-width: 0;
  min-height: 48px;
  padding: 0 1.25rem;
  border: 1px solid var(--line);
  border-radius: 9999px;
  background: transparent;
  color: var(--parchment);
  font: inherit;
}

.game-post input:focus-visible {
  border-color: var(--gold);
  outline: none;
}

.game-post-status {
  min-height: 1.65em;
  margin: 0.5rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.game-board {
  margin-top: 4rem;
  text-align: left;
}

.game-board h3 {
  margin: 0;
  font-size: 1.75rem;
}

.game-board .game-reel {
  margin-top: 1rem;
  counter-reset: board;
}

.game-board .game-reel li span:first-child::before {
  margin-right: 0.75rem;
  color: var(--accent);
  content: counter(board);
  counter-increment: board;
  font-variant-numeric: tabular-nums;
}

.game-board-empty,
.game-note {
  color: var(--faint);
  font-size: 0.9rem;
}

.game-note {
  margin-top: 3rem;
}

/* Games hub: every game is a cinematic poster that links to its own page */
.games-list {
  display: grid;
  gap: 16px;
  margin-bottom: 0;
  padding: 0;
  list-style: none;
}

.teaser-link {
  color: inherit;
  text-decoration: none;
  transition: transform 500ms var(--ease-out);
}

@media (hover: hover) {
  .teaser-link:hover {
    transform: translateY(-4px);
  }

  .teaser-link:hover .teaser-kicker {
    color: var(--gold-light);
  }
}

.teaser-link:focus-visible {
  outline-offset: 4px;
}

.teaser-chain .teaser-title {
  font-size: clamp(1.9rem, 5.4vw, 4.5rem);
  letter-spacing: 0.22em;
  padding-left: 0.22em;
}

/* The Chain Reaction poster: a quiet screen of symbols with one lit cluster */
.poster-grid {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 4%;
  width: min(44%, 340px);
  aspect-ratio: 1;
  translate: -50% -50%;
}

.poster-grid span {
  display: grid;
  place-items: center;
}

.poster-grid:not(.is-color) span {
  color: rgba(232, 228, 216, 0.13);
}

.poster-grid.is-color span:not(.is-lit) {
  opacity: 0.45;
}

.poster-grid svg {
  width: 100%;
  height: 100%;
}

.poster-grid .is-lit {
  color: rgba(246, 222, 150, 0.5);
  filter: drop-shadow(0 0 8px rgba(246, 222, 150, 0.45));
}

.poster-grid.is-color .is-lit {
  color: var(--sym-star);
}

.games-jar {
  margin: 2.5rem 0 0;
  color: var(--faint);
  text-align: center;
}

.games-jar span {
  color: var(--parchment);
  font-variant-numeric: tabular-nums;
}

/* Game pages: a compact title, so the game itself is on the first screen */
.page.game-page {
  padding-top: calc(var(--header) + var(--safe-top) + clamp(40px, 7vh, 72px));
}

.game-head {
  margin-bottom: clamp(2rem, 5vh, 3rem);
  text-align: center;
}

.game-crumb {
  display: inline-block;
  margin: -13px -8px;
  padding: 13px 8px;
  color: var(--faint);
  font-size: 0.9rem;
  text-decoration: none;
}

.game-crumb:hover {
  color: var(--parchment);
}

.game-name {
  margin: 0.75rem 0 0;
  color: var(--parchment);
  font-family: var(--sans);
  font-size: clamp(1.9rem, 6vw, 3.25rem);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: 0.26em;
  padding-left: 0.26em;
}

.game-tagline {
  margin: 0.75rem 0 0;
  color: var(--muted);
  font-family: var(--serif);
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  font-style: italic;
}

/* Chain Reaction: the board */
.cr {
  max-width: 520px;
}

/* Phones: the board first, then the message and the button right under it, the counters after */
.cr-side {
  display: flex;
  flex-direction: column;
}

.cr-side .game-message { order: 1; }
.cr-side .game-actions { order: 2; margin-top: 1rem; }
.cr-side .cr-stats { order: 3; margin-top: 2rem; }
.cr-side .cr-encore { order: 4; }
.cr-side .game-note { order: 5; }

.cr-board {
  position: relative;
  padding: clamp(8px, 2vw, 14px);
  border: 1px solid var(--line);
  border-radius: 24px;
  background: radial-gradient(ellipse at 50% 35%, #13245A 0%, var(--panel) 75%);
}

.cr-grid {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1;
}

.cr-cell {
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  place-items: center;
  width: calc(100% / 6);
  height: calc(100% / 6);
}

.cr-cell svg {
  position: relative;
  width: 58%;
  height: 58%;
  transition: transform 300ms var(--ease-out);
}

/* The glow behind a winning symbol fades in with opacity only */
.cr-cell::before {
  position: absolute;
  inset: 8%;
  border-radius: 30%;
  background: radial-gradient(closest-side, currentColor, transparent);
  content: "";
  opacity: 0;
  transition: opacity 200ms ease-out;
}

.cr-cell.is-win::before {
  opacity: 0.5;
}

.cr-cell.is-win svg {
  transform: scale(1.2);
}

/* While a hit glows, everything else steps back */
.cr-cell {
  transition: opacity 200ms ease-out;
}

.cr-grid.is-glowing .cr-cell:not(.is-win) {
  opacity: 0.3;
}

.cr-popcorn { color: var(--sym-popcorn); }
.cr-ticket { color: var(--sym-ticket); }
.cr-reel { color: var(--sym-reel); }
.cr-clapper { color: var(--sym-clapper); }
.cr-mask { color: var(--sym-mask); }
.cr-star { color: var(--sym-star); }

.cr-star svg {
  filter: drop-shadow(0 0 6px rgba(246, 222, 150, 0.35));
}

.cr-points {
  position: absolute;
  z-index: 2;
  color: var(--gold-light);
  font-size: clamp(0.95rem, 2.4vw, 1.2rem);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
  text-shadow: 0 2px 10px rgba(7, 15, 38, 0.9);
  transform: translate(-50%, -50%);
}

.cr-callout {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 3;
  margin: 0;
  color: var(--gold-light);
  font-family: var(--serif);
  font-size: clamp(2.5rem, 9vw, 4rem);
  font-style: italic;
  line-height: 1;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  text-shadow: 0 4px 30px rgba(7, 15, 38, 0.95);
  transform: translate(-50%, -50%);
}

.cr-encore {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 1.25rem;
  color: var(--faint);
  font-size: 0.85rem;
}

.cr-encore .game-bar {
  flex: 1;
}

@media (prefers-reduced-motion: no-preference) {
  #cr-meter {
    transition: transform 600ms var(--ease-out);
  }
}

.cr .game-message {
  min-height: 2.7em;
  margin-top: 1.25rem;
}

/* Larger screens: the board on the left, everything you need on the right, all on one screen */
@media (min-width: 861px) {
  .cr {
    display: grid;
    grid-template-columns: auto 280px;
    gap: 56px;
    align-items: center;
    justify-content: center;
    max-width: none;
    text-align: left;
  }

  .cr-board {
    width: min(560px, calc(100vh - 330px));
    min-width: 400px;
  }

  .cr .cr-side > * {
    order: 0;
  }

  .cr-side .cr-stats {
    justify-content: flex-start;
    margin-top: 0;
  }

  .cr-side .game-message {
    max-width: none;
    margin: 1.5rem 0 0;
  }

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

  .cr-side .game-note {
    margin-top: 2rem;
  }
}

/* Films: a cinema letterboard */
.letterboard {
  max-width: 760px;
  border: 1px solid rgba(233, 196, 106, 0.5);
  border-radius: 18px;
  background: #0C0C0F;
  box-shadow: inset 0 0 0 6px #121216;
  padding: 28px;
}

.letterboard .bulbs {
  /* The row is also a keyboard (secret ten): a taller, invisible tap zone, and no double-tap zoom. */
  margin-top: -14px;
  padding-top: 14px;
  padding-bottom: 20px;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
  border-bottom: 1px dashed rgba(233, 196, 106, 0.3);
}

.board-list {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.board-list li {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 12px 0;
  color: var(--parchment);
  font-size: clamp(0.9rem, 2.2vw, 1.15rem);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.board-year {
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.text-link {
  display: inline-block;
  margin-top: calc(1.75rem - 8px);
  margin-bottom: -8px;
  padding: 8px 0;
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

/* Book: the Cal.com embed */
.cal-embed {
  min-height: 640px;
  overflow: hidden;
  border-radius: var(--radius-tile);
  background: var(--panel);
}

.cal-fallback {
  margin-top: 24px;
}

/* Contact */
.contact-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.contact-buttons .btn {
  min-width: 180px;
}

.email-confirmation,
.fund-confirmation {
  min-height: 1.3em;
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  font-style: italic;
  opacity: 0;
}

/* Fund the Boss: a bank transfer. The EPC QR code on desktop, the IBAN with a copy button on mobile. */
.fund-qr-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.fund-qr-frame {
  width: 196px;
  height: 196px;
  border-radius: 18px;
  background: #FFFFFF;
  padding: 14px;
}

.fund-qr-frame svg {
  display: block;
  width: 100%;
  height: 100%;
}

.fund-caption {
  margin: 0.75rem 0 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.fund-iban-block {
  display: none;
  flex-direction: column;
  align-items: flex-start;
}

.fund-iban-block p {
  margin: 0;
}

.fund-iban-label {
  color: var(--muted);
  font-size: 0.85rem;
}

.fund-iban {
  margin-top: 0.25rem;
  color: var(--parchment);
  font-size: clamp(1.2rem, 5.2vw, 1.6rem);
  font-weight: 500;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
  user-select: all;
}

.fund-name {
  margin-top: 0.25rem;
  color: var(--muted);
}

.fund-copy {
  margin-top: 1.5rem;
}

/* Without a QR code (library missing) the IBAN shows on desktop too. */
.qr-unavailable .fund-qr-block {
  display: none;
}

.qr-unavailable .fund-iban-block {
  display: flex;
}

/* Both blocks stay hidden until PAY in main.js holds a name and an IBAN. */
.fund-qr-block[hidden],
.fund-iban-block[hidden] {
  display: none;
}

/* Backstage */
.secrets-progress {
  margin: 1.5rem 0 0;
  color: var(--muted);
  font-size: 1.15rem;
}

.secrets-count {
  color: var(--accent);
}

.secrets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.secret-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  min-height: 140px;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 20px;
}

.secret-card.is-found {
  border-color: rgba(233, 196, 106, 0.45);
  background: rgba(233, 196, 106, 0.06);
}

.secret-card p {
  margin: 0;
}

.secret-quote {
  font-family: var(--serif);
  font-size: 1.3rem;
  line-height: 1.2;
}

.secret-film,
.secret-label {
  color: var(--accent);
  font-size: 0.8rem;
}

.secret-lock {
  font-family: var(--serif);
  font-size: 2rem;
  line-height: 1;
  opacity: 0.35;
}

.secret-hint {
  color: var(--faint);
  font-size: 0.85rem;
  line-height: 1.5;
}

/* The Studio (hidden page) */
.studio-page {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 24px;
}

.studio-lede {
  max-width: 48ch;
  margin: 2rem 0 0;
  color: rgba(232, 228, 216, 0.8);
  font-size: 1.15rem;
  line-height: 1.6;
}

.studio-section {
  margin-top: 8rem;
}

.studio-section h2 {
  margin: 0;
  color: var(--parchment);
  font-size: clamp(2.5rem, 5vw, 4rem);
  line-height: 1.02;
}

.studio-label {
  color: var(--accent);
  font-size: 0.9rem;
}

.studio-section > p {
  max-width: 68ch;
  margin: 1.5rem 0 0;
  color: rgba(232, 228, 216, 0.8);
}

.principles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 3rem;
  margin-top: 4rem;
}

.principle h3,
.timeline-step h3 {
  margin: 0.75rem 0 0;
  color: var(--parchment);
  font-size: 1.75rem;
  line-height: 1.1;
}

.principle h3 {
  margin-top: 0;
}

.principle p,
.timeline-step p {
  margin: 0.5rem 0 0;
  color: rgba(232, 228, 216, 0.8);
  line-height: 1.55;
}

.timeline {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 3rem 2rem;
  margin-top: 4rem;
}

.timeline-step {
  position: relative;
  padding-top: 2rem;
}

.timeline-step::before {
  position: absolute;
  top: 0;
  left: 0;
  width: 12px;
  height: 12px;
  border: 1px solid var(--gold);
  border-radius: 50%;
  content: "";
}

.timeline-step.done::before {
  background: var(--gold);
}

.timeline-date {
  color: var(--gold);
  font-size: 0.85rem;
}

.js .reveal {
  opacity: 0;
  transform: translateY(16px);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 800ms var(--ease-out), transform 800ms var(--ease-out);
}

/* The Lab (/studio/lab/): the Baffo Engine behind one question.
   Left: the question as a sentence, and Fine-tune. Right, staying in view: the answer and the hall. */
.lab {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  grid-template-areas:
    "ask answer"
    "tune answer";
  grid-template-rows: auto 1fr;
  gap: clamp(28px, 4vw, 56px) clamp(32px, 5vw, 72px);
  align-items: start;
}

.lab-ask {
  grid-area: ask;
}

.lab-answer {
  grid-area: answer;
}

.lab-tune {
  grid-area: tune;
}

.lab-sectors {
  margin-bottom: clamp(1.5rem, 4vh, 2.5rem);
}

/* The question: a sentence in the serif, every field an underlined word in gold */
.lab-sentence {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.lab-sentence[hidden] {
  display: none;
}

.lab-line {
  margin: 0;
  color: var(--muted);
  font-family: var(--serif);
  font-size: clamp(1.75rem, 3.4vw, 2.75rem);
  line-height: 1.35;
}

.lab-line-small {
  margin-top: 1.1rem;
  font-size: clamp(1.25rem, 2.1vw, 1.6rem);
  line-height: 1.5;
}

.lab-pick {
  color: var(--accent);
  white-space: nowrap;
}

.lab-pick select,
.lab-pick input {
  max-width: 100%;
  margin: 0;
  padding: 0 0.1em 0.04em;
  border: 0;
  border-bottom: 1px dashed rgba(233, 196, 106, 0.55);
  border-radius: 0;
  background: transparent;
  color: var(--accent);
  font: inherit;
  line-height: inherit;
  cursor: pointer;
  transition: border-color 200ms ease-out, background-color 200ms ease-out;
  -webkit-appearance: none;
  appearance: none;
}

.lab-pick select {
  padding-right: 0.9em;
  background-image: linear-gradient(45deg, transparent 50%, var(--gold) 50%), linear-gradient(135deg, var(--gold) 50%, transparent 50%);
  background-position: calc(100% - 0.4em) 58%, calc(100% - 0.18em) 58%;
  background-size: 0.22em 0.22em, 0.22em 0.22em;
  background-repeat: no-repeat;
}

.lab-pick select option {
  background: var(--panel);
  color: var(--parchment);
  font-family: var(--sans);
  font-size: 1rem;
}

.lab-pick input {
  cursor: text;
  -moz-appearance: textfield;
}

.lab-pick input::-webkit-inner-spin-button,
.lab-pick input::-webkit-outer-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

.lab-pick input::placeholder {
  color: rgba(233, 196, 106, 0.55);
}

.lab-pick input[type="search"]::-webkit-search-cancel-button {
  -webkit-appearance: none;
}

.lab-pick-film input {
  min-width: 3ch;
}

/* The date reads as words; the real date field lies invisibly on top and opens the picker */
.lab-pick-date {
  position: relative;
  display: inline-block;
}

.lab-date-text {
  padding: 0 0.1em 0.04em;
  border-bottom: 1px dashed rgba(233, 196, 106, 0.55);
}

.lab-pick-date input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  opacity: 0;
  cursor: pointer;
  color-scheme: dark;
}

.lab-pick-date input::-webkit-calendar-picker-indicator {
  position: absolute;
  inset: 0;
  width: auto;
  height: auto;
  cursor: pointer;
}

.lab-pick-date:hover .lab-date-text {
  border-bottom-color: var(--gold);
}

.lab-pick-date:focus-within .lab-date-text {
  border-bottom-style: solid;
  border-bottom-color: var(--gold);
  outline: 2px solid var(--gold);
  outline-offset: 4px;
  border-radius: 4px;
}

.lab-pick select:hover,
.lab-pick input:hover {
  border-bottom-color: var(--gold);
}

.lab-pick select:focus-visible,
.lab-pick input:focus-visible {
  border-bottom-color: var(--gold);
  border-bottom-style: solid;
  outline: 2px solid var(--gold);
  outline-offset: 4px;
  border-radius: 4px;
}

/* What the Lab found on its own: hype, weather, holidays */
.lab-facts {
  display: grid;
  gap: 0.4rem;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
}

.lab-facts li {
  position: relative;
  padding-left: 1.1rem;
  color: var(--faint);
  font-size: 0.85rem;
  line-height: 1.45;
}

.lab-facts li::before {
  position: absolute;
  top: 0.55em;
  left: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 8px rgba(233, 196, 106, 0.6);
  content: "";
}

.lab-facts li:empty {
  display: none;
}

/* The answer: on larger screens it stays in view while you change the question (below the Brain navigation) */
.lab-answer {
  position: sticky;
  top: calc(var(--header) + var(--safe-top) + 72px);
  padding: clamp(22px, 3vw, 34px);
  border: 1px solid var(--line);
  border-radius: 28px;
  background: radial-gradient(ellipse at 50% 0%, #13245A 0%, var(--panel) 72%);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.3);
}

.lab-kicker {
  margin: 0;
  color: var(--accent);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lab-price {
  margin: 0.2rem 0 0;
  font-family: var(--serif);
  font-size: clamp(3.75rem, 7.5vw, 5.75rem);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.lab-change {
  min-height: 1.5em;
  margin: 0.4rem 0 0;
  color: var(--parchment);
  font-size: 1.05rem;
}

.lab-tariffs {
  min-height: 1.4em;
  margin: 0.2rem 0 0;
  color: var(--faint);
  font-size: 0.88rem;
  font-variant-numeric: tabular-nums;
}

/* The hall: a screen that glows, and a place for every dot */
.lab-hall {
  margin: 1.5rem 0 0;
}

.lab-stage {
  padding: 0 4px;
  perspective: 700px;
}

.lab-screen {
  height: 5px;
  margin: 0 12% 22px;
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
  background: linear-gradient(90deg, rgba(246, 222, 150, 0.15), var(--gold-light), rgba(246, 222, 150, 0.15));
  box-shadow: 0 10px 34px rgba(246, 222, 150, 0.35);
}

.lab-seats {
  display: grid;
  grid-template-columns: repeat(var(--cols, 20), minmax(0, 1fr));
  gap: clamp(3px, 0.45vw, 5px);
  transform: rotateX(16deg);
  transform-origin: 50% 0;
}

.lab-seat {
  aspect-ratio: 1;
  border-radius: 45% 45% 30% 30%;
  background: rgba(232, 228, 216, 0.1);
}

.lab-seat.is-on {
  background: var(--gold);
}

.lab-seat.is-gain {
  background: var(--gold-light);
  box-shadow: 0 0 8px rgba(246, 222, 150, 0.85);
}

.lab-seat.is-loss {
  background: transparent;
  box-shadow: inset 0 0 0 1px rgba(233, 196, 106, 0.55);
}

/* Padel: courts instead of seats */
.lab-courts {
  gap: 10px;
  transform: none;
}

.lab-court {
  position: relative;
  aspect-ratio: 1 / 2;
  border-radius: 6px;
}

.lab-court::after {
  position: absolute;
  top: 50%;
  right: 8%;
  left: 8%;
  height: 1px;
  background: rgba(11, 22, 54, 0.6);
  content: "";
}

/* People who want in but find no place: they wait outside the hall */
.lab-queue {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: center;
  margin-top: 12px;
}

.lab-queue:empty {
  display: none;
}

.lab-seat.is-waiting {
  width: 8px;
  background: rgba(224, 90, 79, 0.75);
}

@media (prefers-reduced-motion: no-preference) {
  .lab-seat {
    transition: background-color 380ms var(--ease-out) var(--d, 0ms), box-shadow 380ms var(--ease-out) var(--d, 0ms);
  }

  .lab-seat.is-waiting {
    animation: lab-wait 1.6s ease-in-out infinite alternate;
  }
}

@keyframes lab-wait {
  to {
    opacity: 0.45;
  }
}

.lab-hall-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  font-variant-numeric: tabular-nums;
}

.lab-gain {
  color: var(--gold-light);
}

.lab-loss,
.lab-wait {
  color: var(--st-busy);
}

/* The same day at every time */
.lab-day {
  display: grid;
  grid-template-columns: repeat(var(--slots, 4), minmax(0, 1fr));
  gap: 6px;
  margin-top: 1.5rem;
}

.lab-slot {
  display: grid;
  gap: 2px;
  min-height: 64px;
  padding: 0.55rem 0.4rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: transparent;
  color: var(--faint);
  cursor: pointer;
  font: inherit;
  text-align: center;
  transition: border-color 250ms ease-out, background-color 250ms ease-out, color 250ms ease-out;
}

.lab-slot:hover {
  border-color: rgba(233, 196, 106, 0.45);
}

.lab-slot.is-active {
  border-color: var(--gold);
  background: rgba(233, 196, 106, 0.1);
  color: var(--parchment);
}

.lab-slot:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.lab-slot-time {
  font-size: 0.75rem;
}

.lab-slot-price {
  font-family: var(--serif);
  font-size: 1.2rem;
  font-variant-numeric: tabular-nums;
}

.lab-slot-bar {
  height: 3px;
  margin: 4px 10% 0;
  border-radius: 9999px;
  background: linear-gradient(90deg, var(--gold) var(--fill, 0%), rgba(232, 228, 216, 0.12) var(--fill, 0%));
}

/* What moves this price */
.lab-why {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 1.4rem 0 0;
  padding: 0;
  list-style: none;
}

.lab-chip {
  padding: 0.22rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 9999px;
  color: var(--muted);
  font-size: 0.82rem;
}

.lab-chip::before {
  margin-right: 0.35em;
  color: var(--accent);
}

.lab-chip-up::before {
  content: "↑";
}

.lab-chip-down::before {
  content: "↓";
}

.lab-note {
  margin: 1rem 0 0;
  color: var(--muted);
  font-family: var(--serif);
  font-size: 1.1rem;
  font-style: italic;
  line-height: 1.4;
}

/* Fine-tune: every factor, folded away until you want it */
.lab-tune {
  border-top: 1px solid var(--line);
}

.lab-tune > summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.75rem;
  align-items: baseline;
  padding: 1.1rem 0;
  color: var(--parchment);
  cursor: pointer;
  font-size: 1.05rem;
  list-style: none;
}

.lab-tune > summary::-webkit-details-marker {
  display: none;
}

.lab-tune > summary span {
  color: var(--faint);
  font-size: 0.85rem;
}

.lab-tune > summary::after {
  margin-left: auto;
  color: var(--accent);
  content: "+";
}

.lab-tune[open] > summary::after {
  content: "−";
}

.lab-tune > summary:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
  border-radius: 6px;
}

.lab-group {
  margin: 0 0 1.25rem;
  padding: 1.25rem 0 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.lab-group[hidden] {
  display: none;
}

.lab-group legend {
  padding: 0;
  color: var(--accent);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lab-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 16px;
  align-items: center;
  margin-top: 0.75rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.lab-field[hidden] {
  display: none;
}

.lab-field output {
  color: var(--parchment);
  font-variant-numeric: tabular-nums;
}

.lab-field select,
.lab-field input[type="number"] {
  width: 100%;
  min-height: 42px;
  padding: 0 0.9rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  color: var(--parchment);
  font: inherit;
}

.lab-field select:focus-visible,
.lab-field input:focus-visible,
.lab-check input:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.lab-field input[type="range"] {
  width: 100%;
  height: 32px;
  accent-color: var(--gold);
}

.lab-check {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 0.75rem;
  color: var(--muted);
  font-size: 0.95rem;
  cursor: pointer;
}

.lab-check input {
  width: 18px;
  height: 18px;
  accent-color: var(--gold);
}

.lab-source {
  min-height: 1.2em;
  margin: 0.5rem 0 0;
  color: var(--faint);
  font-size: 0.82rem;
  line-height: 1.45;
}

/* Seat zones: outlined, so a filled seat still reads as filled */
.lab-seats[data-zones="on"] .lab-seat[data-zone="front"] {
  box-shadow: inset 0 0 0 2px rgba(232, 228, 216, 0.6);
}

/* Cosy Seats: a light ring around the seat, visible on an empty and on a filled seat alike */
.lab-seats[data-zones="on"] .lab-seat[data-zone="premium"] {
  box-shadow: 0 0 0 2px var(--gold-light);
}

.lab-zone-note {
  flex-basis: 100%;
  color: var(--faint);
  font-size: 0.8rem;
}

/* What each price brings: two small charts on one price axis */
.lab-curve-section {
  max-width: 900px;
  margin-top: clamp(64px, 10vh, 112px);
}

.lab-curve {
  position: relative;
  margin: 1.25rem 0 0;
  padding: 1.25rem 1.25rem 1rem;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(11, 22, 54, 0.6);
  cursor: crosshair;
}

.lab-curve:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.lab-chart-title {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.lab-chart + .lab-chart-title {
  margin-top: 0.75rem;
}

.lab-chart {
  width: 100%;
}

.lab-chart-svg {
  display: block;
  overflow: visible;
}

.lab-band {
  fill: rgba(233, 196, 106, 0.06);
}

.lab-grid {
  stroke: var(--line);
  stroke-width: 1;
}

.lab-normal {
  stroke: var(--faint);
  stroke-width: 1;
}

.lab-tick {
  fill: var(--faint);
  font-family: var(--sans);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.lab-tick-strong {
  fill: var(--parchment);
}

.lab-line-out,
.lab-line-in {
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.lab-line-out {
  stroke: rgba(232, 228, 216, 0.25);
}

.lab-line-in {
  stroke: var(--gold);
}

.lab-dot {
  fill: var(--gold);
  stroke: var(--panel);
  stroke-width: 2;
}

.lab-cross {
  stroke: rgba(232, 228, 216, 0.5);
  stroke-width: 1;
}

.lab-hover-dot {
  fill: var(--parchment);
  stroke: var(--panel);
  stroke-width: 2;
}

.lab-tip {
  position: absolute;
  top: 2.4rem;
  z-index: 2;
  min-width: 170px;
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--night);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  color: var(--muted);
  font-size: 0.82rem;
  pointer-events: none;
}

.lab-tip[hidden] {
  display: none;
}

.lab-tip p {
  margin: 0.1rem 0;
}

.lab-tip strong {
  color: var(--parchment);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.lab-chart-help {
  margin: 0.75rem 0 0;
  color: var(--faint);
  font-size: 0.78rem;
}

.lab-curve-table td:first-child {
  white-space: nowrap;
}

/* Fair by design: four cards under the question */
.lab-trust {
  margin-top: clamp(64px, 10vh, 112px);
}

.lab-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 1.25rem;
}

.lab-card {
  padding: 1.25rem 1.35rem 1.4rem;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(11, 22, 54, 0.6);
}

.lab-card[hidden] {
  display: none;
}

.lab-card h3 {
  margin: 0;
  color: var(--accent);
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Floor to ceiling, with the normal price as a thin tick and the fair price as a gold dot */
/* The moving spans are as wide as the track and slide with transform, so they reach past its end.
   This frame clips that overflow, with room for the dot at both ends. */
.lab-range {
  overflow: hidden;
  margin: 1.1rem -10px 0;
  padding: 6px 10px 0;
}

.lab-track {
  position: relative;
  height: 4px;
  border-radius: 9999px;
  background: var(--line);
}

.lab-ref,
.lab-marker {
  position: absolute;
  inset: 0;
  transform: translateX(50%);
}

.lab-ref::before,
.lab-marker::before {
  position: absolute;
  top: 50%;
  left: 0;
  content: "";
  translate: -50% -50%;
}

.lab-ref::before {
  width: 2px;
  height: 14px;
  background: var(--faint);
}

.lab-marker::before {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 12px rgba(233, 196, 106, 0.6);
}

@media (prefers-reduced-motion: no-preference) {
  .lab-ref,
  .lab-marker {
    transition: transform 400ms var(--ease-out);
  }
}

.lab-ends {
  display: flex;
  justify-content: space-between;
  margin-top: 0.6rem;
  color: var(--faint);
  font-size: 0.8rem;
}

.lab-figures {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 1.25rem 0 0;
}

.lab-figures dt {
  color: var(--faint);
  font-size: 0.8rem;
}

.lab-figures dd {
  margin: 0.2rem 0 0;
  font-family: var(--serif);
  font-size: 1.4rem;
  font-variant-numeric: tabular-nums;
}

.lab-frame {
  margin: 0.75rem 0 0;
  color: var(--parchment);
  font-size: 0.95rem;
}

.lab-groups ul {
  margin: 0.75rem 0 0;
  padding-left: 1.1rem;
  color: var(--parchment);
  font-size: 0.95rem;
}

.lab-group-proof {
  margin: 0.75rem 0 0;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.5;
}

/* The black-market check: the card's top edge shows the risk */
.lab-market {
  --risk: var(--st-available);
  box-shadow: inset 0 2px 0 var(--risk);
}

.lab-market[data-risk="low"] { --risk: var(--gold); }
.lab-market[data-risk="medium"] { --risk: var(--st-busy); }
.lab-market[data-risk="high"] { --risk: var(--st-dnd); }

.lab-market-title {
  margin: 0.75rem 0 0;
  color: var(--parchment);
  font-size: 0.95rem;
}

.lab-measures {
  margin: 0.5rem 0 0;
  padding-left: 1.1rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.lab-pledge {
  margin: 1rem 0 0;
  color: var(--faint);
  font-size: 0.85rem;
}

.lab-subhead {
  margin: 2rem 0 0;
  font-size: 1.6rem;
}

/* Folded sections: every factor, the assumptions, the questions */
.lab-more {
  margin-top: 1.25rem;
  border-top: 1px solid var(--line);
}

.lab-more > summary {
  padding: 1rem 0;
  color: var(--parchment);
  cursor: pointer;
  list-style: none;
}

.lab-more > summary::-webkit-details-marker {
  display: none;
}

.lab-more > summary::after {
  float: right;
  color: var(--accent);
  content: "+";
}

.lab-more[open] > summary::after {
  content: "−";
}

.lab-more > summary:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
  border-radius: 6px;
}

.lab-reasons {
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
}

.lab-reasons li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: baseline;
  padding: 0.6rem 0;
  border-top: 1px solid var(--line);
  font-size: 0.92rem;
}

.lab-reasons li span:nth-child(2) {
  color: var(--parchment);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.lab-tag {
  padding: 0.1rem 0.5rem;
  border: 1px solid var(--line);
  border-radius: 9999px;
  color: var(--faint);
  font-size: 0.72rem;
}

.lab-tag-simulation,
.lab-tag-literature {
  border-color: rgba(233, 196, 106, 0.4);
  color: var(--accent);
}

.lab-bar {
  display: none;
}

.lab-section {
  max-width: 760px;
  margin-top: clamp(64px, 10vh, 112px);
}

.lab-section-lede {
  color: var(--muted);
}

.lab-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.lab-table th {
  padding: 0 0 0.6rem;
  color: var(--faint);
  font-weight: 400;
  text-align: left;
}

.lab-table td {
  padding: 0.75rem 1rem 0.75rem 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  vertical-align: top;
}

.lab-table td:first-child {
  color: var(--parchment);
}

.lab-questions {
  margin: 0 0 1rem;
  padding-left: 1.2rem;
  color: var(--muted);
}

.lab-questions li {
  margin-top: 0.75rem;
}

/* Phones and tablets: one column. The question, then the answer, then Fine-tune.
   A small bar keeps the price in view while the answer is scrolled away. */
@media (max-width: 960px) {
  .lab {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "ask"
      "answer"
      "tune";
    grid-template-rows: auto;
  }

  .lab-answer {
    position: static;
  }

  .lab-bar {
    position: fixed;
    bottom: calc(12px + var(--safe-bottom));
    left: 50%;
    z-index: 5;
    display: block;
    margin: 0;
    padding: 0.6rem 1.25rem;
    translate: -50% 0;
    white-space: nowrap;
    border: 1px solid rgba(233, 196, 106, 0.4);
    border-radius: 9999px;
    background: rgba(11, 22, 54, 0.92);
    color: var(--parchment);
    font-variant-numeric: tabular-nums;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
    opacity: 0;
    pointer-events: none;
    transition: opacity 250ms ease-out;
  }

  .lab-bar.is-shown {
    opacity: 1;
  }

  html.is-app .lab-bar {
    bottom: calc(var(--tabs) + 12px);
  }
}

@media (max-width: 600px) {
  .page.lab-page {
    padding-top: calc(var(--header) + var(--safe-top) + 28px);
  }

  .lab-page .game-head {
    margin-bottom: 1.5rem;
  }

  .lab-sectors {
    margin-bottom: 1.25rem;
  }

  .lab-line {
    font-size: 1.65rem;
  }

  .lab-line-small {
    margin-top: 0.75rem;
    font-size: 1.2rem;
  }

  .lab-facts {
    margin-top: 1rem;
  }

  .lab-facts li {
    font-size: 0.8rem;
  }
}

@media (max-width: 480px) {
  .lab-day {
    gap: 4px;
  }

  .lab-slot {
    padding-inline: 0.2rem;
  }

  .lab-slot-price {
    font-size: 1.05rem;
  }

  .lab-field {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }
}

/* Hidden on screen, still read by screen readers */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* The fairness survey (/survey/): one question per screen */
.survey {
  max-width: 620px;
  margin: 0 auto;
}

.survey-card {
  padding: clamp(24px, 4vw, 44px);
  border: 1px solid var(--line);
  border-radius: 24px;
  background: radial-gradient(ellipse at 50% 0%, #13245A 0%, var(--panel) 70%);
}

.survey-card .game-modes {
  margin-bottom: 1.5rem;
}

.survey-step {
  margin: 0 0 1rem;
  color: var(--accent);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.survey-title {
  margin: 0;
  font-size: clamp(2.25rem, 6vw, 3.5rem);
  line-height: 1.05;
}

.survey-lede {
  margin: 1rem 0 0;
  color: var(--parchment);
  font-size: 1.1rem;
}

.survey-small {
  margin: 0.75rem 0 0;
  color: var(--faint);
  font-size: 0.88rem;
}

.survey-question {
  margin: 0;
  color: var(--parchment);
  font-family: var(--serif);
  font-size: clamp(1.4rem, 3.2vw, 1.85rem);
  font-weight: 400;
  line-height: 1.3;
}

.survey-question:focus {
  outline: none;
}

.survey-question-small {
  margin-top: 1.75rem;
  font-size: 1.2rem;
}

.survey-consent {
  align-items: flex-start;
  margin-top: 1.5rem;
  color: var(--parchment);
}

.survey-consent input {
  flex: none;
  margin-top: 0.25rem;
}

.survey-choices {
  display: grid;
  gap: 8px;
  margin: 1.25rem 0 0;
  padding: 0;
  border: 0;
}

.survey-choice {
  display: flex;
  gap: 12px;
  align-items: center;
  min-height: 48px;
  padding: 0 1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--parchment);
  cursor: pointer;
  transition: border-color 200ms ease-out, background-color 200ms ease-out;
}

.survey-choice:hover {
  border-color: rgba(233, 196, 106, 0.5);
}

.survey-choice:has(input:checked) {
  border-color: var(--gold);
  background: rgba(233, 196, 106, 0.1);
}

.survey-choice input {
  accent-color: var(--gold);
}

.survey-choice:has(input:focus-visible) {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* Choice experiment: two screenings side by side, "I wouldn't go" below them */
.survey-pair {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.survey-pair .survey-choice:not(.survey-option) {
  grid-column: 1 / -1;
}

.survey-option {
  align-items: flex-start;
  padding: 1rem;
}

.survey-option input {
  margin-top: 0.3rem;
}

.survey-option-body {
  display: grid;
  gap: 0.3rem;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.35;
}

.survey-option-title {
  color: var(--accent);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.survey-option-price {
  margin-top: 0.3rem;
  color: var(--parchment);
  font-family: var(--serif);
  font-size: 1.6rem;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 420px) {
  .survey-pair {
    grid-template-columns: minmax(0, 1fr);
  }
}

.survey-select {
  display: grid;
  gap: 0.4rem;
  margin-top: 1.25rem;
  color: var(--muted);
}

.survey-select select,
.survey textarea {
  width: 100%;
  min-height: 46px;
  padding: 0.6rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--night);
  color: var(--parchment);
  font: inherit;
}

.survey textarea {
  margin-top: 1rem;
  resize: vertical;
}

.survey-select select:focus-visible,
.survey textarea:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.survey-slider {
  margin-top: 1.5rem;
  color: var(--muted);
}

.survey-slider p {
  margin: 0;
}

.survey-slider-row {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-top: 0.75rem;
}

.survey-slider input {
  flex: 1;
  accent-color: var(--gold);
}

.survey-slider output {
  min-width: 4.5em;
  color: var(--parchment);
  font-family: var(--serif);
  font-size: 1.5rem;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.survey-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 2rem;
}

.survey-foot {
  text-align: center;
}

.survey-foot a {
  color: var(--faint);
}

/* 404 */
.lost-page {
  display: grid;
  min-height: 100svh;
  place-items: center;
  padding: calc(var(--header) + 3rem) 24px 3rem;
  text-align: center;
}

.lost-content {
  max-width: 36rem;
}

.lost-compass {
  width: 140px;
  height: 140px;
  margin: 0 auto 2rem;
  color: var(--accent);
  animation: compass-wobble 7s ease-in-out infinite;
}

@keyframes compass-wobble {
  0%, 100% { transform: rotate(-4deg); }
  50% { transform: rotate(4deg); }
}

.lost-title {
  margin: 0;
  font-size: clamp(3rem, 8vw, 5.5rem);
  line-height: 0.95;
}

.lost-copy {
  margin: 1.5rem auto 2rem;
  color: var(--muted);
}

.lost-page + .site-footer {
  margin-top: 0;
}

/* Secret hunt: the toast */
.secret-toast {
  position: fixed;
  bottom: calc(24px + var(--safe-bottom));
  left: 50%;
  z-index: 70;
  width: max-content;
  max-width: calc(100vw - 32px);
  border: 1px solid rgba(233, 196, 106, 0.45);
  border-radius: 14px;
  background: rgba(5, 10, 28, 0.94);
  padding: 14px 22px;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: opacity 280ms ease-out, transform 280ms var(--ease-out);
}

.secret-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

html.is-app .secret-toast {
  bottom: calc(var(--tabs) + 16px);
}

.secret-toast-quote {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.15rem;
  font-style: italic;
  line-height: 1.3;
}

.secret-toast-count {
  margin: 4px 0 0;
  color: var(--accent);
  font-size: 0.78rem;
}

/* ===== Seasonal themes: html[data-season] is set by season-boot.js ===== */
.season-canvas {
  position: fixed;
  inset: 0;
  z-index: 45;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.season-special {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 46;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  filter: drop-shadow(0 0 8px rgba(246, 222, 150, 0.85));
}

.season-special svg {
  width: 26px;
  height: 26px;
}

.season-special.is-static {
  top: 22%;
  right: 6%;
  left: auto;
}

.season-egg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 36px;
  margin-left: 0.2em;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  vertical-align: middle;
  filter: drop-shadow(0 0 6px rgba(233, 196, 106, 0.45));
}

.season-egg svg {
  width: 20px;
  height: 26px;
  transform-origin: 50% 90%;
  animation: egg-wiggle 3.2s ease-in-out infinite;
}

@keyframes egg-wiggle {
  0%, 70%, 100% { transform: rotate(0deg); }
  76% { transform: rotate(-9deg); }
  82% { transform: rotate(8deg); }
  88% { transform: rotate(-5deg); }
  94% { transform: rotate(3deg); }
}

/* At Halloween and New Year the ring can be clicked. */
html[data-season="halloween"] .ring,
html[data-season="newyear"] .ring {
  pointer-events: auto;
}

/* Halloween: the halo becomes a full moon behind the mascot */
html[data-season="halloween"] {
  --accent: #F2A65A;
}

html[data-season="halloween"] .stage {
  background: radial-gradient(ellipse at 70% 40%, #2A1A3A 0%, #0C0A1E 55%, #05060F 100%);
}

html[data-season="halloween"] .ring {
  border: 0;
  background: radial-gradient(circle at 38% 36%, #FFF6D8 0%, #F6DE96 38%, #D9A75C 70%, #9C6B2E 100%);
  box-shadow: 0 0 120px rgba(246, 222, 150, 0.4), 0 0 260px rgba(242, 166, 90, 0.16);
  opacity: 0.55;
  animation: none;
}

html[data-season="halloween"] .ring::before,
html[data-season="halloween"] .ring::after {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(156, 107, 46, 0.32) 0%, rgba(156, 107, 46, 0.12) 55%, transparent 72%);
  content: "";
}

html[data-season="halloween"] .ring::before {
  top: 52%;
  left: 26%;
  width: 22%;
  height: 22%;
}

html[data-season="halloween"] .ring::after {
  top: 28%;
  left: 58%;
  width: 14%;
  height: 14%;
}

.season-fog {
  position: absolute;
  right: -20%;
  bottom: -10%;
  left: -20%;
  z-index: 1;
  height: 45%;
  background:
    radial-gradient(ellipse at 30% 70%, rgba(196, 182, 236, 0.16), transparent 60%),
    radial-gradient(ellipse at 75% 80%, rgba(170, 156, 220, 0.12), transparent 55%);
  filter: blur(28px);
  pointer-events: none;
  animation: fog-drift-a 22s ease-in-out infinite alternate;
}

.season-fog-b {
  height: 35%;
  background:
    radial-gradient(ellipse at 60% 75%, rgba(196, 182, 236, 0.13), transparent 58%),
    radial-gradient(ellipse at 15% 85%, rgba(170, 156, 220, 0.1), transparent 50%);
  animation: fog-drift-b 31s ease-in-out infinite alternate;
}

@keyframes fog-drift-a {
  from { transform: translateX(-6%); }
  to { transform: translateX(6%); }
}

@keyframes fog-drift-b {
  from { transform: translateX(5%); }
  to { transform: translateX(-7%); }
}

.season-cobweb {
  position: absolute;
  top: calc(var(--header) + var(--safe-top));
  left: 0;
  z-index: 1;
  width: clamp(110px, 15vw, 210px);
  color: var(--parchment);
  opacity: 0.22;
  pointer-events: none;
}

.season-cobweb svg {
  display: block;
  width: 100%;
  height: auto;
}

.season-cobweb-right {
  right: 0;
  left: auto;
  transform: scaleX(-1);
}

.season-bat {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 3;
  width: 46px;
  color: #06050C;
  pointer-events: none;
}

.season-bat svg {
  display: block;
  width: 100%;
  transform-origin: 50% 40%;
  animation: bat-flap 0.2s ease-in-out infinite alternate;
}

@keyframes bat-flap {
  to { transform: scaleY(0.4); }
}

/* Christmas and Sinterklaas: a red glow in the ring */
html[data-season="christmas"] .ring {
  box-shadow: inset 0 0 0 10px rgba(179, 38, 46, 0.25), inset 0 0 60px rgba(179, 38, 46, 0.3);
}

html[data-season="sinterklaas"] .ring {
  border-color: rgba(200, 48, 56, 0.85);
  box-shadow: 0 0 70px rgba(179, 38, 46, 0.45), inset 0 0 50px rgba(179, 38, 46, 0.25);
}

/* Valentine: a rose accent */
html[data-season="valentine"] {
  --accent: #F2A1B0;
}

/* Summer: a sunset glow and a shark fin */
html[data-season="summer"] .stage {
  background: radial-gradient(ellipse at 70% 70%, #5A2E3A 0%, #1E2152 40%, var(--night) 75%);
}

.season-fin {
  position: absolute;
  bottom: 20px;
  left: 0;
  z-index: 3;
  width: 56px;
  height: 40px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

.season-fin svg {
  display: block;
  width: 100%;
  height: 100%;
}

.season-fin::after {
  position: absolute;
  right: -30%;
  bottom: 0;
  left: -30%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(246, 222, 150, 0.4), transparent);
  content: "";
}

.season-fin.is-static {
  right: 12%;
  left: auto;
}

/* ===== Reduced motion: no intro, no transitions, everything in its final place ===== */
@media (prefers-reduced-motion: reduce) {
  @view-transition {
    navigation: none;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ===== Responsive ===== */
@media (max-width: 860px) {
  .desktop-nav {
    display: none;
  }

  .menu-toggle {
    display: flex;
  }

  /* On phones the stage is only as tall as the show, so the first tile already peeks in below it. */
  .stage,
  html.is-app .stage {
    align-items: flex-start;
    min-height: 0;
    padding-top: calc(var(--header) + var(--safe-top) + 6vh);
    padding-bottom: 40px;
  }

  .stage-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  .stage-quote {
    min-height: 2.7em;
    margin-top: 1rem;
  }

  /* Mascot and screen side by side without touching: 62.5% + 37.5% of the width. */
  .show {
    --mascot-w: 62.5%;
    aspect-ratio: 1.6 / 1;
    margin-top: 8px;
  }

  .screen {
    width: 37.5%;
    border-radius: 12px;
    padding: 10px 11px;
  }

  .teaser .poster-grid {
    width: min(78%, 300px);
  }

  .tile-games {
    gap: 20px;
  }

  .tile-games .sequel,
  .tile-games .poster-grid {
    width: 140px;
    height: 140px;
  }

  .tile-games .sequel-word {
    font-size: 1rem;
  }

  .duo {
    width: 250px;
    height: 190px;
  }

  .duo img:first-child {
    width: 178px;
    height: 178px;
  }

  .duo img:last-child {
    width: 110px;
    height: 110px;
  }

  .tiles {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    padding: 12px 16px 0;
  }

  .tile {
    min-height: 380px;
    padding: 32px 28px 0;
  }

  .team {
    grid-template-columns: minmax(0, 1fr);
    gap: 72px;
  }

  .portrait {
    width: calc(140px + 18px);
    height: calc(140px + 18px);
  }

  .teaser {
    aspect-ratio: 4 / 5;
  }

  .teaser::before,
  .teaser::after {
    height: 6%;
  }

  .principles,
  .timeline,
  .brain-also ul {
    grid-template-columns: minmax(0, 1fr);
    gap: 2.5rem;
  }

  .brain-also ul {
    gap: 12px;
  }

  .fund-qr-block {
    display: none;
  }

  .fund-iban-block {
    display: flex;
  }

  .credits-lines {
    gap: 32px;
  }
}

@media (min-width: 861px) {
  html:not(.is-app) .mobile-menu {
    display: none;
  }
}

/* Films (/films/): the double feature, the Wall of Fame and the film facts, under the letterboard */
.films-more {
  max-width: 1100px;
  margin: 0 auto;
}

.films-more[hidden] {
  display: none;
}

.films-section {
  margin-top: clamp(72px, 12vh, 128px);
}

.film-kicker {
  margin: 0;
  color: var(--accent);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.films-heading {
  margin: 0.4rem 0 0;
  font-family: var(--serif);
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 400;
  line-height: 1.05;
}

.films-lede,
.films-why {
  margin: 0.75rem 0 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.films-why {
  font-family: var(--serif);
  font-size: clamp(1.3rem, 2.4vw, 1.6rem);
  font-style: italic;
}

/* A poster: TMDB's image, or our own typographic poster in one of six deep tones */
.film-poster {
  position: relative;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  border-radius: 12px;
  background: var(--panel);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

.film-poster img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.film-poster.is-typographic {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 4px;
  padding: 14% 10% 12%;
  border: 1px solid rgba(233, 196, 106, 0.25);
  background: radial-gradient(ellipse at 30% 0%, var(--tone-a), var(--tone-b) 70%);
}

.film-poster[data-tone="0"] { --tone-a: #1f3a7a; --tone-b: #0a1430; }
.film-poster[data-tone="1"] { --tone-a: #5a1f2e; --tone-b: #1a0a12; }
.film-poster[data-tone="2"] { --tone-a: #1d4a3f; --tone-b: #08181a; }
.film-poster[data-tone="3"] { --tone-a: #4a2a6a; --tone-b: #130b22; }
.film-poster[data-tone="4"] { --tone-a: #6a4a1a; --tone-b: #1a1208; }
.film-poster[data-tone="5"] { --tone-a: #1a4a6a; --tone-b: #08141e; }

.film-poster-rank {
  position: absolute;
  top: 8%;
  left: 10%;
  color: var(--accent);
  font-family: var(--serif);
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-style: italic;
}

.film-poster-title {
  color: var(--parchment);
  font-family: var(--serif);
  font-size: clamp(1.05rem, 2.2vw, 1.45rem);
  line-height: 1.05;
}

.film-poster-year {
  color: var(--faint);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
}

.film-title {
  margin: 0.3rem 0 0;
  font-family: var(--serif);
  font-size: 1.6rem;
  font-weight: 400;
  line-height: 1.1;
}

.film-meta {
  margin: 0.3rem 0 0;
  color: var(--faint);
  font-size: 0.85rem;
}

.film-rating {
  margin: 0.6rem 0 0;
  color: var(--parchment);
  font-size: 0.9rem;
}

.film-stars {
  color: var(--accent);
  letter-spacing: 0.05em;
}

.film-line {
  margin: 0.6rem 0 0;
  color: var(--muted);
  font-family: var(--serif);
  font-size: 1.05rem;
  font-style: italic;
  line-height: 1.35;
}

.film-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 0.9rem;
}

.film-link {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 0.8rem;
  border: 1px solid rgba(233, 196, 106, 0.4);
  border-radius: 9999px;
  color: var(--parchment);
  font-size: 0.8rem;
  text-decoration: none;
}

.film-link:hover {
  background: rgba(233, 196, 106, 0.1);
}

/* Tonight's double feature: two posters side by side, each with a way into the Lab */
.double-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(16px, 3vw, 32px);
  margin-top: 1.75rem;
}

.double-card {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr);
  gap: 20px;
  align-items: end;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(11, 22, 54, 0.6);
}

.double-body .btn.film-price {
  min-height: 42px;
  margin-top: 1rem;
  padding: 0.5rem 1.1rem;
  font-size: 0.9rem;
}

/* The Wall of Fame: posters that turn over */
.wall {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 18px;
  margin: 1.75rem 0 0;
  padding: 0;
  list-style: none;
}

.wall-item {
  position: relative;
  perspective: 1000px;
}

.wall-front,
.wall-back {
  width: 100%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.wall-front {
  position: relative;
  display: block;
  padding: 0;
  text-align: left;
  border: 0;
  border-radius: 12px;
  background: none;
  cursor: pointer;
}

.wall-rank {
  position: absolute;
  bottom: -10px;
  left: 10px;
  padding: 0.1rem 0.55rem;
  border-radius: 9999px;
  background: var(--night);
  color: var(--accent);
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
}

.wall-back {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 12px;
  scrollbar-width: thin;
  scrollbar-color: rgba(233, 196, 106, 0.4) transparent;
  border: 1px solid rgba(233, 196, 106, 0.35);
  border-radius: 12px;
  background: var(--panel);
  transform: rotateY(180deg);
}

.wall-back .film-title {
  font-size: 1.3rem;
}

.wall-back .film-links {
  gap: 4px;
  margin-top: 0.7rem;
}

.wall-back .film-link {
  min-height: 30px;
  padding: 0 0.55rem;
  font-size: 0.72rem;
}

.wall-close {
  align-self: flex-start;
  min-height: 36px;
  margin-top: auto;
  padding: 0.6rem 0 0;
  border: 0;
  background: none;
  color: var(--faint);
  cursor: pointer;
  font: inherit;
  font-size: 0.8rem;
}

.wall-item.is-turned .wall-front {
  transform: rotateY(-180deg);
}

.wall-item.is-turned .wall-back {
  transform: rotateY(0);
}

@media (prefers-reduced-motion: no-preference) {
  .wall-front,
  .wall-back {
    transition: transform 650ms var(--ease-out);
  }

  .wall-front:hover .film-poster {
    transform: translateY(-4px);
  }

  .wall-front .film-poster {
    transition: transform 300ms var(--ease-out);
  }
}

/* Without motion the card simply shows its other side */
@media (prefers-reduced-motion: reduce) {
  .wall-item.is-turned .wall-front {
    visibility: hidden;
  }
}

.wall-front:focus-visible,
.wall-close:focus-visible,
.film-link:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.films-show-all {
  margin-top: 1.75rem;
}

.films-show-all[hidden] {
  display: none;
}

/* Film facts: big numbers from everything logged */
.facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 36px) clamp(16px, 3vw, 32px);
  margin: 1.75rem 0 0;
  padding: 0;
  list-style: none;
}

.fact {
  display: grid;
  gap: 6px;
  align-content: start;
  padding-top: 14px;
  border-top: 1px solid rgba(240, 233, 214, 0.14);
}

.fact-value {
  color: var(--gold);
  font-family: var(--serif);
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.fact-text {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.4;
}

.films-credit {
  margin: clamp(48px, 8vh, 80px) 0 0;
  color: var(--faint);
  font-size: 0.78rem;
}

.films-credit[hidden] {
  display: none;
}

@media (max-width: 700px) {
  .double-cards {
    grid-template-columns: minmax(0, 1fr);
  }

  .wall {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

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

/* ==========================================================================
   Baffo Brain (/brain/): a site within the site. Its own sticky navigation with a progress line, a lab grid behind
   the hero, a live instrument (brain.js runs example screenings through engine.js), numbered chapters, three demos,
   a fairness ticker and the road as a horizontal scroll scene on wide screens. Monospace labels use the system
   monospace font (no extra download).
   ========================================================================== */
.page.brain {
  max-width: none;
  padding: calc(var(--header) + var(--safe-top)) 0 0;
  --mono: ui-monospace, "SFMono-Regular", "Cascadia Mono", Consolas, monospace;
  --brain-width: 1160px;
  --card: linear-gradient(180deg, rgba(20, 38, 84, 0.5), rgba(11, 22, 54, 0.72));
}

.brain-mono {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Navigation */
.brain-nav {
  --brain-width: 1160px;
  position: sticky;
  top: calc(var(--header) + var(--safe-top));
  z-index: 40;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 15, 38, 0.78);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.brain-nav-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  max-width: var(--brain-width);
  height: 52px;
  margin: 0 auto;
  padding: 0 24px;
}

.brain-nav-mark {
  flex: none;
  color: var(--parchment);
  font-family: var(--serif);
  font-size: 1.25rem;
  text-decoration: none;
}

.brain-nav-mark em {
  color: var(--gold);
}

.brain-nav-links {
  display: flex;
  gap: 4px;
  min-width: 0;
  margin-right: auto;
  overflow-x: auto;
  scrollbar-width: none;
}

.brain-nav-links::-webkit-scrollbar {
  display: none;
}

.brain-nav-links a {
  flex: none;
  padding: 6px 12px;
  border-radius: 9999px;
  color: var(--muted);
  font-size: 0.88rem;
  text-decoration: none;
  transition: color 250ms ease-out, background-color 250ms ease-out;
}

.brain-nav-links a:hover,
.brain-nav-links a[aria-current] {
  background: rgba(233, 196, 106, 0.1);
  color: var(--parchment);
}

.brain-nav a:focus-visible,
.brain-scene:focus-visible,
.brain-round:focus-visible,
.brain-project:focus-visible,
.brain-zones li:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.brain-progress {
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
}

/* Hero: the copy on the left, the live instrument on the right, a lab grid behind both */
.brain-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
  max-width: var(--brain-width);
  margin: 0 auto;
  padding: clamp(56px, 10vh, 120px) 24px clamp(48px, 8vh, 96px);
}

.brain-hero::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(232, 228, 216, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(232, 228, 216, 0.05) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 60% 45%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 70% at 60% 45%, #000 20%, transparent 75%);
  content: "";
  pointer-events: none;
}

.brain-kicker {
  margin: 0 0 1.5rem;
  color: var(--gold);
}

.brain-hero .page-lede {
  margin-top: 1.5rem;
}

/* The instrument */
.brain-instrument {
  margin: 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--card);
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(232, 228, 216, 0.06);
}

.brain-instrument-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--faint);
}

.brain-live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--parchment);
}

.brain-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--st-available);
  box-shadow: 0 0 0 0 rgba(63, 185, 122, 0.6);
}

@media (prefers-reduced-motion: no-preference) {
  .brain-live-dot {
    animation: brain-pulse 2s ease-out infinite;
  }
}

@keyframes brain-pulse {
  to { box-shadow: 0 0 0 8px rgba(63, 185, 122, 0); }
}

.brain-stage {
  display: grid;
  justify-items: center;
  gap: 18px;
  margin: 26px 0 22px;
}

.brain-stage-screen {
  width: 72%;
  height: 4px;
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
  background: linear-gradient(90deg, rgba(246, 222, 150, 0.12), var(--gold-light), rgba(246, 222, 150, 0.12));
  box-shadow: 0 10px 34px rgba(246, 222, 150, 0.4);
}

.brain-stage-seats {
  width: 100%;
  height: auto;
  transform: perspective(600px) rotateX(18deg);
}

.brain-stage-seats circle {
  fill: rgba(232, 228, 216, 0.12);
}

.brain-stage-seats circle.on {
  fill: var(--gold);
}

@media (prefers-reduced-motion: no-preference) {
  .brain-stage-seats circle {
    transition: fill 450ms var(--ease-out);
  }
}

.brain-readouts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  border-top: 1px solid var(--line);
}

.brain-readouts div {
  padding: 14px 4px 0;
}

.brain-readouts div + div {
  padding-left: 14px;
  border-left: 1px solid var(--line);
}

.brain-readouts dt {
  color: var(--faint);
}

.brain-readouts dd {
  margin: 6px 0 0;
  color: var(--parchment);
  font-family: var(--serif);
  font-size: clamp(1.3rem, 2.4vw, 1.9rem);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

#instrument-price {
  color: var(--gold-light);
}

.brain-instrument-why {
  min-height: 2.8em;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.brain-scenes {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.brain-scene {
  padding: 6px 11px;
  border: 1px solid var(--line);
  border-radius: 9999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  transition: color 250ms ease-out, border-color 250ms ease-out, background-color 250ms ease-out;
}

.brain-scene:hover {
  border-color: rgba(233, 196, 106, 0.45);
  color: var(--parchment);
}

.brain-scene.is-active {
  border-color: var(--gold);
  background: rgba(233, 196, 106, 0.12);
  color: var(--gold-light);
}

.brain-caption {
  margin-top: 14px;
  color: var(--faint);
  font-size: 0.66rem;
  letter-spacing: 0.04em;
  text-transform: none;
}

/* Chapters */
.brain-chapter {
  max-width: var(--brain-width);
  margin: clamp(80px, 14vh, 160px) auto 0;
  padding: 0 24px;
  scroll-margin-top: calc(var(--header) + var(--safe-top) + 72px);
}

.brain-chapter-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 1.75rem;
  color: var(--faint);
}

.brain-num {
  color: var(--gold);
}

.brain-rule {
  flex: 1;
  height: 1px;
  background: var(--line);
  transform-origin: left;
}

@media (prefers-reduced-motion: no-preference) {
  .js .brain-chapter-head .brain-rule {
    transform: scaleX(0);
    transition: transform 1.4s var(--ease-out) 200ms;
  }

  .js .brain-chapter-head.is-visible .brain-rule {
    transform: scaleX(1);
  }
}

.brain-h2 {
  margin: 0;
  color: var(--parchment);
  font-size: clamp(2.75rem, 7vw, 5.5rem);
  font-weight: 400;
  line-height: 0.98;
  letter-spacing: -0.02em;
}

.brain-chapter .studio-label {
  margin: 1rem 0 0;
}

.brain-text {
  max-width: 60ch;
  margin: 1.5rem 0 0;
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.6;
}

.brain-chapter > p.reveal:has(.btn) {
  margin: 2rem 0 0;
}

/* Cards with a soft light that follows the cursor */
.brain-demo,
.brain-project {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--card);
  transition: border-color 300ms ease-out, transform 500ms var(--ease-out);
}

.brain-demo::before,
.brain-project::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, -40%), rgba(233, 196, 106, 0.1), transparent 60%);
  content: "";
  opacity: 0;
  transition: opacity 300ms ease-out;
}

.brain-demo:hover::before,
.brain-project:hover::before,
.brain-project:focus-visible::before {
  opacity: 1;
}

.brain-demo:hover,
.brain-project:hover {
  border-color: rgba(233, 196, 106, 0.32);
}

/* The three demos */
.brain-demos {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: clamp(40px, 6vh, 64px);
}

.brain-demo {
  display: flex;
  flex-direction: column;
  padding: 22px;
}

.brain-demo-num {
  margin: 0;
  color: var(--gold);
}

.brain-demo h3,
.brain-principles h3 {
  margin: 0.6rem 0 0;
  color: var(--parchment);
  font-size: 1.75rem;
  font-weight: 400;
  line-height: 1.1;
}

.brain-demo > p:not(.brain-mono) {
  margin: 0.5rem 0 1.5rem;
  color: var(--muted);
  line-height: 1.5;
}

.brain-demo-foot {
  margin: auto 0 0;
  padding-top: 14px;
  color: var(--faint);
  font-size: 0.64rem;
  letter-spacing: 0.04em;
  text-transform: none;
}

/* A: the crew */
.brain-crew {
  display: grid;
  flex: 1;
  align-content: center;
  gap: 10px;
  justify-items: center;
  padding: 18px 12px;
  border-radius: 18px;
  background: rgba(7, 15, 38, 0.5);
}

.brain-crew-faces {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  min-height: 34px;
}

.brain-face {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(233, 196, 106, 0.45);
  border-radius: 50%;
  color: var(--parchment);
  font-size: 0.72rem;
}

.brain-face.is-you {
  border-color: var(--gold);
  background: var(--gold);
  color: var(--night);
}

@media (prefers-reduced-motion: no-preference) {
  .brain-face:last-child {
    animation: brain-pop 450ms var(--ease-out);
  }
}

@keyframes brain-pop {
  from { transform: scale(0.4); opacity: 0; }
}

.brain-crew-price {
  margin: 4px 0 0;
  color: var(--gold-light);
  font-family: var(--serif);
  font-size: 2.6rem;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.brain-crew-price small {
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.9rem;
}

.brain-crew-note {
  min-height: 1.2em;
  margin: 0;
  color: var(--muted);
  text-align: center;
  text-transform: none;
  letter-spacing: 0.02em;
}

.brain-crew-controls {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--muted);
}

.brain-round {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(233, 196, 106, 0.5);
  border-radius: 50%;
  background: transparent;
  color: var(--parchment);
  cursor: pointer;
  font-size: 1.2rem;
  transition: background-color 250ms ease-out;
}

.brain-round:hover:not(:disabled) {
  background: rgba(233, 196, 106, 0.14);
}

.brain-round:disabled {
  cursor: default;
  opacity: 0.35;
}

/* B: the week */
.brain-week {
  display: grid;
  gap: 4px;
}

.brain-week-row {
  display: grid;
  grid-template-columns: 34px repeat(4, minmax(0, 1fr));
  gap: 4px;
  align-items: center;
}

.brain-week-head {
  color: var(--faint);
  font-size: 0.62rem;
  letter-spacing: 0.04em;
  text-align: center;
}

.brain-week-row > .brain-week-head:first-child {
  text-align: left;
}

.brain-cell {
  padding: 6px 0;
  border-radius: 7px;
  color: var(--parchment);
  font-size: 0.74rem;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.brain-cell.is-up {
  background: rgba(233, 196, 106, calc(0.35 + var(--k) * 0.6));
  color: var(--night);
}

.brain-cell.is-normal {
  background: rgba(232, 228, 216, 0.08);
  box-shadow: inset 0 0 0 1px rgba(232, 228, 216, 0.18);
}

.brain-cell.is-down {
  background: rgba(143, 184, 232, calc(0.06 + var(--k) * 0.22));
  color: var(--muted);
}

@media (prefers-reduced-motion: no-preference) {
  .js .brain-demo .brain-cell {
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 500ms var(--ease-out) var(--d), transform 500ms var(--ease-out) var(--d);
  }

  .js .brain-demo.is-visible .brain-cell {
    opacity: 1;
    transform: scale(1);
  }
}

/* C: the seat zones */
.brain-seatmap {
  display: grid;
  gap: 14px;
}

#seatmap {
  width: 100%;
  height: auto;
}

.brain-seatmap-screen {
  fill: none;
  stroke: var(--gold-light);
  stroke-linecap: round;
  stroke-width: 2.5;
}

#seatmap rect {
  transition: opacity 250ms ease-out;
}

.brain-zone-front { fill: rgba(143, 184, 232, 0.75); background: rgba(143, 184, 232, 0.75); }
.brain-zone-standard { fill: rgba(232, 228, 216, 0.28); background: rgba(232, 228, 216, 0.28); }
.brain-zone-best { fill: var(--gold); background: var(--gold); }

#seatmap.focus-front rect:not(.brain-zone-front),
#seatmap.focus-standard rect:not(.brain-zone-standard),
#seatmap.focus-best rect:not(.brain-zone-best) {
  opacity: 0.18;
}

.brain-zones {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.brain-zones li {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto;
  gap: 2px 10px;
  align-items: center;
  padding: 6px 8px;
  border-radius: 10px;
  color: var(--muted);
  font-size: 0.9rem;
  cursor: default;
  transition: background-color 200ms ease-out;
}

.brain-zones li:hover,
.brain-zones li:focus-visible {
  background: rgba(232, 228, 216, 0.06);
}

.brain-zones strong {
  color: var(--parchment);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.brain-zones small {
  grid-column: 2 / -1;
  color: var(--faint);
  font-size: 0.62rem;
  letter-spacing: 0.03em;
  text-transform: none;
}

.brain-swatch {
  width: 12px;
  height: 10px;
  border-radius: 3px;
}

/* The engine's principles */
.brain-principles {
  margin-top: clamp(48px, 7vh, 72px);
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

/* The fairness ticker */
.brain-ticker {
  margin-top: clamp(80px, 14vh, 160px);
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}

.brain-ticker-track {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 48px;
  margin: 0;
  padding: 22px 24px;
  list-style: none;
}

.brain-ticker-track li {
  flex: none;
  color: var(--parchment);
  font-family: var(--serif);
  font-size: clamp(1.2rem, 2.2vw, 1.6rem);
  white-space: nowrap;
}

.brain-ticker-track .brain-mono {
  margin-right: 10px;
  color: var(--gold);
  vertical-align: 0.2em;
}

.brain-ticker-track.is-looping {
  flex-wrap: nowrap;
  justify-content: flex-start;
  gap: 0;
  width: max-content;
  padding: 22px 0;
  animation: brain-ticker 50s linear infinite;
}

.brain-ticker-track.is-looping li {
  padding-right: 48px;
}

.brain-ticker:hover .brain-ticker-track {
  animation-play-state: paused;
}

@keyframes brain-ticker {
  to { transform: translateX(-50%); }
}

/* Built on the engine */
.brain-projects {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: clamp(40px, 6vh, 64px) 0 0;
  padding: 0;
  list-style: none;
}

.brain-project {
  display: grid;
  align-content: start;
  gap: 10px;
  height: 100%;
  min-height: 240px;
  padding: 24px;
  color: var(--parchment);
  text-decoration: none;
}

.brain-project .brain-mono {
  color: var(--gold);
}

.brain-project strong {
  margin-top: auto;
  padding-top: 40px;
  font-family: var(--serif);
  font-size: clamp(2.2rem, 4vw, 3rem);
  font-weight: 400;
  line-height: 1;
}

.brain-project > span:not(.brain-mono):not(.brain-project-go) {
  color: var(--muted);
  line-height: 1.5;
}

.brain-project-go {
  position: absolute;
  top: 20px;
  right: 22px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--gold);
  transition: transform 450ms var(--ease-out), background-color 300ms ease-out, color 300ms ease-out;
}

.brain-project:hover .brain-project-go,
.brain-project:focus-visible .brain-project-go {
  background: var(--gold);
  color: var(--night);
  transform: rotate(-45deg);
}

@media (prefers-reduced-motion: no-preference) {
  .brain-project:hover {
    transform: translateY(-4px);
  }
}

/* The road: a grid of steps, or a horizontal scene on wide screens (brain.js adds .is-horizontal) */
.brain-timeline {
  margin-top: clamp(40px, 6vh, 64px);
}

.brain-public.is-horizontal .brain-road {
  position: relative;
  overflow: hidden;
  margin-top: clamp(40px, 6vh, 64px);
}

.brain-public.is-horizontal .brain-road::before {
  position: absolute;
  top: 6px;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, var(--gold), rgba(233, 196, 106, 0.15));
  content: "";
}

.brain-public.is-horizontal .brain-timeline {
  display: flex;
  gap: 0;
  width: max-content;
  margin-top: 0;
}

.brain-public.is-horizontal .timeline-step {
  width: clamp(280px, 30vw, 360px);
  padding-right: 48px;
}

.brain-public.is-horizontal .timeline-step h3 {
  font-size: 2.1rem;
}

.brain-public.is-horizontal .timeline-step:last-child {
  padding-right: 0;
}

@media (max-width: 1000px) {
  .brain-hero {
    grid-template-columns: minmax(0, 1fr);
  }

  .brain-demos,
  .brain-projects {
    grid-template-columns: minmax(0, 1fr);
  }

  .brain-project {
    min-height: 0;
  }

  .brain-project strong {
    padding-top: 20px;
  }
}

@media (max-width: 700px) {
  .brain-nav-inner {
    gap: 12px;
    padding: 0 16px;
  }

  .brain-nav-links {
    margin-right: 0;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 14px, #000 calc(100% - 14px), transparent);
    mask-image: linear-gradient(90deg, transparent, #000 14px, #000 calc(100% - 14px), transparent);
  }

  .brain-hero,
  .brain-chapter {
    padding-left: 16px;
    padding-right: 16px;
  }

  .brain-instrument {
    padding: 16px;
    border-radius: 22px;
  }

  .brain-readouts div + div {
    padding-left: 10px;
  }

  .brain-readouts dt {
    font-size: 0.6rem;
    letter-spacing: 0.03em;
  }

  .brain-ticker-track li {
    font-size: 1.15rem;
  }
}

/* ==========================================================================
   Baffo deals (/deals/<venue>/ and /deals/<venue>/staff/): opened from a group chat, so phone first.
   One price, one button, the Baffo pass. Monospace labels, quiet cards, gold only where it matters.
   ========================================================================== */
.deals-page {
  max-width: 640px;
  padding-top: calc(var(--header) + var(--safe-top) + clamp(32px, 7vh, 72px));
  padding-bottom: 48px;
}

.deals-mono {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.deals-demo {
  margin: 0 0 28px;
  padding: 12px 14px;
  border: 1px dashed rgba(233, 196, 106, 0.45);
  border-radius: 14px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.deals-demo a,
.deals-how a {
  color: var(--gold-light);
}

.deals-kicker {
  margin: 0;
  color: var(--gold);
}

/* The city line with the language switch next to it */
.deals-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.deals-langs {
  display: flex;
  flex: none;
  gap: 2px;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 9999px;
}

.deals-lang {
  min-width: 34px;
  min-height: 30px;
  padding: 0 8px;
  border: 0;
  border-radius: 9999px;
  background: transparent;
  color: var(--faint);
  cursor: pointer;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
}

.deals-lang:hover {
  color: var(--parchment);
}

.deals-lang.is-active {
  background: rgba(233, 196, 106, 0.16);
  color: var(--gold-light);
}

.deals-lang:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.deals-title {
  margin: 10px 0 0;
  color: var(--parchment);
  font-family: var(--serif);
  font-size: clamp(2.6rem, 9vw, 4rem);
  font-weight: 400;
  line-height: 1;
}

.deals-lede {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.5;
}

.deals-lede.is-hook {
  color: var(--parchment);
  font-size: 1.15rem;
}

.deals-browse,
.deals-mine,
.deals-moment,
.deals-pass,
.deals-how,
.deals-login,
.deals-staff-app {
  margin-top: 32px;
}

/* On a moment and on the pass the venue's intro steps back */
.deals-page.is-focus .deals-lede,
.deals-page.is-focus .deals-demo {
  display: none;
}

.deals-page.is-focus .deals-title {
  font-size: 1.5rem;
}

.deals-page.is-focus .deals-moment,
.deals-page.is-focus .deals-pass {
  margin-top: 20px;
}

/* Your Baffo passes at this venue */
.deals-mine h2,
.deals-how h2 {
  margin: 0 0 10px;
  color: var(--faint);
  font-weight: 400;
}

.deals-mine ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.deals-mine-item {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(233, 196, 106, 0.45);
  border-radius: 14px;
  background: rgba(233, 196, 106, 0.08);
  color: var(--parchment);
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.deals-mine-item strong {
  font-weight: 500;
}

/* Days and views */
.deals-days {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.deals-days::-webkit-scrollbar {
  display: none;
}

.deals-day {
  flex: none;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 9999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 0.9rem;
}

.deals-day.is-active {
  border-color: var(--gold);
  background: rgba(233, 196, 106, 0.12);
  color: var(--gold-light);
}

.deals-lock {
  margin-left: auto;
}

/* The list of quiet moments: one price each */
.deals-list {
  display: grid;
  gap: 8px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.deals-item {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(20, 38, 84, 0.45), rgba(11, 22, 54, 0.7));
  color: var(--parchment);
  cursor: pointer;
  font: inherit;
  text-align: left;
  transition: border-color 250ms ease-out, transform 400ms var(--ease-out);
}

.deals-item:hover {
  border-color: rgba(233, 196, 106, 0.45);
}

.deals-item.has-poster {
  grid-template-columns: 46px minmax(0, 1fr) auto;
}

.deals-thumb {
  width: 46px;
  aspect-ratio: 2 / 3;
  border-radius: 8px;
  object-fit: cover;
  background: var(--midnight);
}

.deals-time {
  color: var(--gold-light);
  font-family: var(--serif);
  font-size: 1.5rem;
  font-variant-numeric: tabular-nums;
}

.deals-time-inline {
  font-size: 1.15rem;
  line-height: 1;
}

.deals-item-body {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.deals-item-body strong {
  overflow: hidden;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.deals-item-body .deals-mono {
  color: var(--faint);
  font-size: 0.64rem;
  letter-spacing: 0.03em;
  text-transform: none;
}

.deals-item-body .deals-few {
  color: var(--gold);
}

.deals-item-price {
  display: grid;
  justify-items: end;
  gap: 2px;
}

.deals-item-price strong {
  color: var(--gold-light);
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 400;
}

.deals-item-price small {
  color: var(--faint);
  font-size: 0.7rem;
}

/* The normal price as an honest anchor */
.deals-was {
  color: var(--faint);
  font-size: 0.8rem;
}

.deals-empty {
  margin: 16px 0 0;
  color: var(--muted);
}

/* One moment, and the pass: the film first */
.deals-back {
  margin: 0 0 18px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--gold-light);
  cursor: pointer;
  font: inherit;
}

.deals-film-head {
  display: flex;
  gap: 16px;
  align-items: center;
}

.deals-film-head .deals-mono {
  margin: 0;
  color: var(--faint);
}

.deals-film-head .deals-kicker {
  color: var(--gold);
}

.deals-poster {
  flex: none;
  width: 84px;
  aspect-ratio: 2 / 3;
  border-radius: 12px;
  object-fit: cover;
  background: var(--midnight);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}

.deals-film {
  margin: 8px 0 0;
  color: var(--parchment);
  font-family: var(--serif);
  font-size: clamp(2rem, 7vw, 2.8rem);
  font-weight: 400;
  line-height: 1.05;
}

/* The offer and the pass card: one big price, the rest small */
.deals-offer,
.deals-pass-card {
  display: grid;
  gap: 10px;
  justify-items: center;
  margin-top: 22px;
  padding: 26px 16px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: radial-gradient(ellipse at 50% 0%, #13245A 0%, var(--panel) 72%);
  text-align: center;
}

.deals-each {
  margin: 0;
  color: var(--gold-light);
  font-family: var(--serif);
  font-size: clamp(3.2rem, 15vw, 4.4rem);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.deals-each small {
  color: var(--muted);
  font-family: var(--sans);
  font-size: 1rem;
}

/* The total for the whole group: always in sight (no drip pricing) */
.deals-total {
  margin: 0;
  color: var(--parchment);
  letter-spacing: 0.04em;
  text-transform: none;
}

.deals-offer-why {
  max-width: 34ch;
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

/* Who is going: a face per friend, and empty places up to three */
.deals-faces-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.deals-face {
  display: grid;
  justify-items: center;
  gap: 6px;
  width: 58px;
}

.deals-face-initial {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(233, 196, 106, 0.5);
  border-radius: 50%;
  background: rgba(233, 196, 106, 0.12);
  color: var(--parchment);
  font-family: var(--serif);
  font-size: 1.3rem;
}

.deals-face.is-first .deals-face-initial {
  border-color: var(--gold);
  background: var(--gold);
  color: var(--night);
}

.deals-face.is-empty .deals-face-initial {
  border-style: dashed;
  background: transparent;
  color: var(--faint);
}

.deals-face-name {
  overflow: hidden;
  max-width: 100%;
  color: var(--muted);
  font-size: 0.78rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.deals-face.is-empty .deals-face-name {
  color: var(--faint);
}

@media (prefers-reduced-motion: no-preference) {
  .deals-face:not(.is-empty) {
    animation: brain-pop 500ms var(--ease-out);
  }
}

.deals-pass-who {
  margin: 0;
  color: var(--parchment);
  font-family: var(--serif);
  font-size: 1.4rem;
}

.deals-pass-ask {
  margin: 0;
  color: var(--parchment);
  font-family: var(--serif);
  font-size: 1.6rem;
  text-align: center;
}

/* Forms and buttons: one big button */
.deals-form {
  display: grid;
  gap: 16px;
  margin-top: 20px;
}

.deals-field {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.92rem;
}

.deals-field input {
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(7, 15, 38, 0.6);
  color: var(--parchment);
  font: inherit;
  font-size: 1.05rem;
}

.deals-field input:focus-visible,
.deals-item:focus-visible,
.deals-day:focus-visible,
.deals-round:focus-visible,
.deals-back:focus-visible,
.deals-mine-item:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.deals-go {
  width: 100%;
  min-height: 56px;
  font-size: 1.1rem;
}

.deals-whatsapp {
  text-align: center;
}

.deals-pass-mine {
  display: grid;
  gap: 12px;
  margin-top: 20px;
}

.deals-leave {
  justify-self: center;
  margin: 0;
  color: var(--faint);
}

.deals-center {
  text-align: center;
}

.deals-small {
  margin: 0;
  color: var(--faint);
  font-size: 0.85rem;
  line-height: 1.5;
}

.deals-small:empty {
  display: none;
}

.deals-alert {
  margin: 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(224, 90, 79, 0.14);
  color: var(--parchment);
  font-size: 0.92rem;
}

.deals-pass > .deals-alert {
  margin-top: 16px;
}

/* Hidden means hidden on the deal pages, whatever display a button or card style sets */
.deals-page [hidden] {
  display: none !important;
}

/* How many: a stepper with targets big enough for a thumb */
.deals-stepper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  max-width: 320px;
  color: var(--parchment);
}

.deals-round {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border: 1px solid rgba(233, 196, 106, 0.5);
  border-radius: 50%;
  background: transparent;
  color: var(--parchment);
  cursor: pointer;
  font-size: 1.6rem;
}

.deals-round:disabled {
  cursor: default;
  opacity: 0.35;
}

/* At the till: how many, the price for that number, and a swipe in front of the staff */
.deals-till {
  display: grid;
  gap: 14px;
  justify-items: center;
  margin-top: 20px;
  padding: 22px 16px;
  border: 1px solid rgba(233, 196, 106, 0.55);
  border-radius: 24px;
  background: rgba(233, 196, 106, 0.06);
  text-align: center;
}

.deals-till > p {
  margin: 0;
  color: var(--parchment);
}

.deals-till-line {
  color: var(--gold-light) !important;
  font-size: 1.2rem;
}

.deals-swipe {
  position: relative;
  display: block;
  width: 100%;
  height: 64px;
  border: 1px solid rgba(233, 196, 106, 0.55);
  border-radius: 9999px;
  background: linear-gradient(90deg, rgba(233, 196, 106, 0.35) var(--swipe, 0%), rgba(7, 15, 38, 0.6) var(--swipe, 0%));
}

.deals-swipe input {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  margin: 0;
  background: transparent;
  cursor: grab;
  -webkit-appearance: none;
  appearance: none;
}

.deals-swipe input::-webkit-slider-thumb {
  width: 56px;
  height: 56px;
  border: 0;
  border-radius: 50%;
  background: var(--gold) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M5 12h13M13 6l6 6-6 6' stroke='%23070F26' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 26px no-repeat;
  -webkit-appearance: none;
  appearance: none;
}

.deals-swipe input::-moz-range-thumb {
  width: 56px;
  height: 56px;
  border: 0;
  border-radius: 50%;
  background: var(--gold) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M5 12h13M13 6l6 6-6 6' stroke='%23070F26' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 26px no-repeat;
}

.deals-swipe input:focus-visible {
  outline: 2px solid var(--gold-light);
  outline-offset: 4px;
  border-radius: 9999px;
}

.deals-swipe-label {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding-left: 48px;
  color: var(--parchment);
  font-size: 0.95rem;
  pointer-events: none;
}

/* Confirmed: a big tick that keeps moving and a running clock, so a screenshot does not pass */
.deals-confirmed {
  display: grid;
  gap: 8px;
  justify-items: center;
  margin-top: 20px;
  padding: 28px 16px;
  border: 1px solid rgba(63, 185, 122, 0.6);
  border-radius: 24px;
  background: rgba(63, 185, 122, 0.1);
  text-align: center;
}

.deals-tick-mark {
  position: relative;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: var(--st-available);
}

.deals-tick-mark::after {
  position: absolute;
  top: 22px;
  left: 31px;
  width: 22px;
  height: 38px;
  border: solid var(--night);
  border-width: 0 6px 6px 0;
  content: "";
  transform: rotate(45deg);
}

@media (prefers-reduced-motion: no-preference) {
  .deals-tick-mark {
    animation: deals-alive 1.6s ease-in-out infinite;
  }
}

@keyframes deals-alive {
  0%, 100% { box-shadow: 0 0 0 0 rgba(63, 185, 122, 0.55); }
  50% { box-shadow: 0 0 0 18px rgba(63, 185, 122, 0); }
}

.deals-confirmed-title {
  margin: 6px 0 0;
  color: var(--parchment);
  font-family: var(--serif);
  font-size: 2.2rem;
}

.deals-confirmed-total {
  margin: 0;
  color: var(--gold-light);
  font-family: var(--serif);
  font-size: 2.6rem;
}

.deals-confirmed .deals-mono {
  margin: 0;
  color: var(--muted);
}

.deals-clock {
  color: var(--parchment) !important;
  font-size: 1.1rem;
  font-variant-numeric: tabular-nums;
}

/* How it works */
.deals-how {
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.deals-how ol {
  display: grid;
  gap: 10px;
  margin: 0 0 14px;
  padding-left: 1.2rem;
  color: var(--muted);
  line-height: 1.5;
}

.deals-how strong {
  color: var(--parchment);
  font-weight: 500;
}

.deals-how .deals-small + .deals-small {
  margin-top: 8px;
}

/* Staff (optional): today's groups, the screenings, the month */
.deals-staff .deals-login {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
}

.deals-staff .deals-login .deals-alert {
  grid-column: 1 / -1;
}

.deals-staff [data-panel] {
  display: grid;
  gap: 14px;
  margin-top: 20px;
}

.deals-today {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.deals-card {
  display: grid;
  gap: 8px;
  justify-items: start;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(7, 15, 38, 0.6);
  box-shadow: inset 4px 0 0 var(--tone);
}

.deals-card.is-ok { --tone: var(--st-available); }
.deals-card.is-warn { --tone: var(--st-busy); }

.deals-card p {
  margin: 0;
  color: var(--muted);
}

.deals-card .deals-card-title {
  color: var(--parchment);
  font-family: var(--serif);
  font-size: 1.6rem;
}

.deals-card .deals-card-pay {
  color: var(--gold-light);
  font-size: 1.2rem;
}

.deals-card .btn {
  width: 100%;
  min-height: 56px;
  margin-top: 6px;
  font-size: 1.1rem;
}

.deals-screenings {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.deals-screenings li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.deals-screenings li.is-stopped {
  border-style: dashed;
  opacity: 0.7;
}

.deals-screening-info {
  display: grid;
  gap: 2px;
  min-width: 0;
  color: var(--muted);
}

.deals-screening-info strong {
  color: var(--gold-light);
  font-weight: 500;
}

.deals-screening-info .deals-mono {
  color: var(--faint);
  font-size: 0.64rem;
  letter-spacing: 0.03em;
  text-transform: none;
}

.deals-screenings .btn {
  flex: none;
  min-height: 40px;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
}

.deals-stop {
  border-color: rgba(224, 90, 79, 0.7);
}

.deals-month {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px 16px;
  margin: 0;
}

.deals-month dt {
  color: var(--muted);
}

.deals-month dd {
  margin: 0;
  color: var(--parchment);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.deals-month dt.deals-month-free {
  grid-column: 1 / -1;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--gold-light);
}
