
/* Layout: one dusk-to-night scroll. The film sits in a lit window; the mix below is a night-sky console where each stem is a string of lights. */
:root {
  --sky-top: #FBE3DA;      /* dawn blush */
  --sky-mid: #F6D0C4;
  --sky-low: #E9D5F2;      /* lavender haze */
  --ink: #2F2245;          /* plum ink, the film's lyric ink family */
  --ink-soft: #6A5878;
  --rule: rgba(67, 40, 74, 0.14);
  --paper: #FFF6E8;        /* the film's cream sign */
  --paper-ink: #43284A;
  --accent: #C2563C;       /* the film's italic emphasis colour */
  --glow: rgba(255, 176, 121, 0.55);
  --chip: rgba(255, 255, 255, 0.55);
  --chip-ink: #43284A;

  /* the console is always night, in both themes */
  --night: #101538;
  --night-2: #1A2050;
  --night-3: #232A66;
  --night-ink: #EDE6FF;
  --night-soft: #A79CCB;
  --night-rule: rgba(185, 168, 232, 0.16);
  --gold: #FFD27A;
  --honey: #F6B34C;

  --display: "Instrument Serif", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --body: "Manrope", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --step--1: clamp(0.78rem, 0.76rem + 0.1vw, 0.84rem);
  --step-0: clamp(0.95rem, 0.92rem + 0.15vw, 1.05rem);
  --step-1: clamp(1.2rem, 1.1rem + 0.5vw, 1.5rem);
  --step-2: clamp(1.7rem, 1.4rem + 1.4vw, 2.6rem);
  --step-3: clamp(2.6rem, 1.8rem + 4vw, 5.6rem);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --sky-top: #0A0B1E; --sky-mid: #141A44; --sky-low: #2B2462;
    --ink: #F4ECFF; --ink-soft: #B5A9D6; --rule: rgba(185, 168, 232, 0.16);
    --paper: #FFF6E8; --paper-ink: #43284A; --accent: #FFB079; --glow: rgba(255, 176, 121, 0.4);
    --chip: rgba(255, 255, 255, 0.08); --chip-ink: #EDE6FF;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --sky-top: #0A0B1E; --sky-mid: #141A44; --sky-low: #2B2462;
  --ink: #F4ECFF; --ink-soft: #B5A9D6; --rule: rgba(185, 168, 232, 0.16);
  --paper: #FFF6E8; --paper-ink: #43284A; --accent: #FFB079; --glow: rgba(255, 176, 121, 0.4);
  --chip: rgba(255, 255, 255, 0.08); --chip-ink: #EDE6FF;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
body {
  margin: 0; font-family: var(--body); font-size: var(--step-0); line-height: 1.6; color: var(--ink);
  background: var(--sky-top);
  background-image: linear-gradient(180deg, var(--sky-top) 0%, var(--sky-mid) 38%, var(--sky-low) 72%, var(--sky-top) 100%);
  padding-inline: 16px;
  -webkit-font-smoothing: antialiased;
}
.wrap { max-width: 1180px; margin-inline: auto; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.02; text-wrap: balance; margin: 0; letter-spacing: -0.01em; }
em { font-style: italic; color: var(--accent); }
p { margin: 0; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
.eyebrow { font-family: var(--mono); font-size: var(--step--1); letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-soft); }

/* ---------- hero ---------- */
.garland { display: block; width: 100%; height: 90px; margin-inline: auto; max-width: 1400px; }
header.hero { display: grid; gap: 18px; padding-block: 8px 34px; text-align: left; }
.hero h1 { font-size: var(--step-3); }
.hero .lede { max-width: 58ch; color: var(--ink-soft); font-size: var(--step-1); line-height: 1.45; font-family: var(--display); }
.meta { display: flex; flex-wrap: wrap; gap: 8px 22px; font-family: var(--mono); font-size: var(--step--1); color: var(--ink-soft); font-variant-numeric: tabular-nums; }

/* ---------- film ---------- */
.film {
  position: relative; container-type: inline-size; border-radius: 22px; padding: 10px; background: var(--paper);
  box-shadow: 0 30px 80px -30px var(--glow), 0 0 0 1px rgba(67, 40, 74, 0.08), 0 2px 0 rgba(255, 255, 255, 0.6) inset;
}
.screen { position: relative; aspect-ratio: 16 / 9; max-width: 100%; border-radius: 14px; overflow: hidden; background: #0A0B1E; }
.screen video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #0A0B1E; }
.screen .poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity 0.6s; }
.screen.started .poster { opacity: 0; pointer-events: none; }
.bigplay {
  position: absolute; z-index: 5; left: 50%; top: 50%; transform: translate(-50%, -50%); display: inline-flex; align-items: center; gap: 14px;
  padding: 16px 28px 16px 20px; border-radius: 999px; border: 0; cursor: pointer;
  background: rgba(255, 246, 232, 0.92); color: #43284A; font-family: var(--display); font-size: clamp(1.2rem, 1rem + 1vw, 1.9rem);
  box-shadow: 0 10px 40px rgba(255, 176, 121, 0.55), 0 0 0 8px rgba(255, 246, 232, 0.25);
  transition: transform 0.25s, box-shadow 0.25s, opacity 0.4s;
}
.bigplay:hover { transform: translate(-50%, -50%) scale(1.04); box-shadow: 0 10px 50px rgba(255, 176, 121, 0.8), 0 0 0 12px rgba(255, 246, 232, 0.3); }
.bigplay svg { width: 30px; height: 30px; }
.screen.started .bigplay { opacity: 0; pointer-events: none; }
.screen .loading { position: absolute; right: 14px; bottom: 12px; font-family: var(--mono); font-size: 12px; color: rgba(255, 246, 232, 0.8); }

.transport {
  display: grid; grid-template-columns: auto auto 1fr auto auto auto; align-items: center; gap: 12px; padding: 10px 6px 2px;
  color: var(--paper-ink); font-family: var(--mono); font-size: 13px; font-variant-numeric: tabular-nums;
}
.tbtn {
  display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; border: 0; cursor: pointer;
  background: #43284A; color: #FFF6E8;
}
.tbtn svg { width: 16px; height: 16px; }
.tbtn.ghost { background: transparent; color: #43284A; }
.scrub { position: relative; height: 26px; cursor: pointer; touch-action: none; }
.scrub canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.scrub { contain: strict; }
/* The stem page is audio only: a transport bar, no screen. */
.film.audio-only { padding: 6px 10px; }
.audio-only .transport { grid-template-columns: auto auto minmax(0, 1fr) auto auto; padding: 2px; }
.audio-only .loading { font-family: var(--mono); font-size: 12px; color: var(--ink-soft); }
.heard { font-family: var(--body); font-size: 12px; font-weight: 600; color: #6A5878; white-space: nowrap; }
@media (max-width: 640px) {
  .transport { grid-template-columns: auto auto minmax(0, 1fr) auto; gap: 8px; }
  .transport .viewtog { grid-column: 1 / -1; grid-row: 2; justify-self: end; }
  .transport #fs { grid-column: 4; grid-row: 1; }
  .viewtog button { padding: 0 10px; font-size: 15px; }
  .transport .heard { display: none; }
}
@container (max-width: 640px) {
  .transport { grid-template-columns: auto auto minmax(0, 1fr) auto; gap: 8px; }
  .transport .viewtog { grid-column: 1 / -1; grid-row: 2; justify-self: end; }
  .transport #fs { grid-column: 4; grid-row: 1; }
  .viewtog button { padding: 0 10px; font-size: 15px; }
  .transport .heard { display: none; }
}

/* ---------- sections ---------- */
section { padding-block: 72px 8px; }
.sec-head { display: grid; gap: 12px; margin-bottom: 26px; max-width: 70ch; }
.sec-head h2 { font-size: var(--step-2); }
.sec-head p { color: var(--ink-soft); }

/* ---------- console ---------- */
.console {
  --lane-h: 54px; --head-w: 214px;
  position: relative; border-radius: 26px; padding: 18px; color: var(--night-ink);
  background: radial-gradient(120% 80% at 80% -10%, rgba(91, 76, 154, 0.55), transparent 60%),
              radial-gradient(90% 60% at 0% 110%, rgba(244, 166, 183, 0.18), transparent 60%),
              linear-gradient(180deg, var(--night-2), var(--night));
  box-shadow: 0 40px 90px -40px rgba(16, 21, 56, 0.9), 0 0 0 1px rgba(185, 168, 232, 0.12) inset;
  overflow: hidden;
}
.console::before { /* faint stars */
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0.55;
  background-image:
    radial-gradient(1px 1px at 12% 18%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 33% 8%, #fff 50%, transparent 51%),
    radial-gradient(1.2px 1.2px at 58% 14%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 76% 6%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 91% 22%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 47% 30%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 22% 40%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 84% 44%, #fff 50%, transparent 51%);
}
.console > * { position: relative; }
.bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-bottom: 14px; }
.tabs { display: inline-flex; padding: 4px; border-radius: 999px; background: rgba(10, 11, 30, 0.55); box-shadow: 0 0 0 1px var(--night-rule) inset; }
.tabs button {
  border: 0; background: transparent; padding: 8px 16px; border-radius: 999px; cursor: pointer; color: var(--night-soft);
  font-weight: 600; font-size: 14px; transition: background 0.2s, color 0.2s;
}
.tabs button[aria-selected="true"] { background: var(--paper); color: #43284A; box-shadow: 0 0 22px rgba(255, 210, 122, 0.35); }
.switch { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; color: var(--night-soft); font-weight: 600; }
.switch .tabs button { padding: 6px 12px; font-size: 13px; }
.switch .tabs button[aria-selected="true"] { background: var(--gold); color: #3A2410; }
.bar .spacer { flex: 1; }
.clock { font-family: var(--mono); font-size: 13px; color: var(--night-soft); font-variant-numeric: tabular-nums; }
.clock b { color: var(--night-ink); font-weight: 600; }
.zoom { display: inline-flex; gap: 4px; }
.zoom button {
  width: 32px; height: 32px; border-radius: 10px; border: 0; cursor: pointer; background: rgba(255, 255, 255, 0.06); color: var(--night-ink);
  box-shadow: 0 0 0 1px var(--night-rule) inset; font-family: var(--mono); font-size: 15px;
}
.zoom button:hover { background: rgba(255, 255, 255, 0.12); }

.now {
  min-height: 2.6em; display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin: 2px 2px 12px;
  font-family: var(--display); font-size: clamp(1.25rem, 1rem + 1vw, 1.9rem); color: var(--night-ink);
}
.now .sec { font-family: var(--mono); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold); }
.now .line { font-style: italic; text-shadow: 0 0 24px rgba(255, 210, 122, 0.35); transition: opacity 0.3s; }

.sky { position: relative; height: 150px; border-radius: 16px; background: rgba(10, 11, 30, 0.45); box-shadow: 0 0 0 1px var(--night-rule) inset; cursor: pointer; touch-action: none; }
.sky canvas, .lane canvas, .ruler canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.sky-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 10px 2px 14px; font-size: 12px; color: var(--night-soft); }
.sky-legend span { display: inline-flex; align-items: center; gap: 6px; }
.sky-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

.ruler-row { display: grid; grid-template-columns: var(--head-w) 1fr; gap: 12px; align-items: end; }
.ruler { position: relative; height: 34px; }
.lanes { display: grid; gap: 6px; margin-top: 6px; }
.lane-row { display: grid; grid-template-columns: var(--head-w) 1fr; gap: 12px; align-items: stretch; }
.lane-head {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; padding: 6px 8px 6px 6px; border-radius: 14px;
  background: rgba(255, 255, 255, 0.035); box-shadow: 0 0 0 1px var(--night-rule) inset; min-width: 0;
}
.lane-name { min-width: 0; display: grid; line-height: 1.2; }
.lane-name b { font-weight: 600; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lane-name small { font-family: var(--mono); font-size: 10.5px; color: var(--night-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.lamp {
  --c: #FFD27A; position: relative; width: 34px; height: 34px; border-radius: 50%; border: 0; cursor: pointer; padding: 0;
  background: radial-gradient(circle at 40% 35%, #fff 0%, var(--c) 45%, color-mix(in srgb, var(--c) 60%, #000) 100%);
  box-shadow: 0 0 8px var(--c), 0 0 0 2px rgba(255, 255, 255, 0.15) inset;
}
/* the glow breathes with the stem's level through opacity alone, which the compositor handles without repainting */
.lamp::before {
  content: ""; position: absolute; inset: -16px; border-radius: 50%; pointer-events: none; opacity: var(--lvl, 0); will-change: opacity;
  background: radial-gradient(closest-side, var(--c), color-mix(in srgb, var(--c) 35%, transparent) 45%, transparent);
}
.lamp[aria-pressed="false"]::before { display: none; }
.lamp::after { /* bulb cap */
  content: ""; position: absolute; left: 50%; top: -5px; width: 10px; height: 6px; transform: translateX(-50%); border-radius: 2px 2px 1px 1px;
  background: #4A4470;
}
.lamp[aria-pressed="false"] { background: radial-gradient(circle at 40% 35%, #6C6690 0%, #34305A 60%, #221F44 100%); box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.08) inset; }
.solo {
  width: 28px; height: 28px; border-radius: 8px; border: 0; cursor: pointer; font-family: var(--mono); font-size: 12px; font-weight: 600;
  background: rgba(255, 255, 255, 0.06); color: var(--night-soft); box-shadow: 0 0 0 1px var(--night-rule) inset;
}
.solo[aria-pressed="true"] { background: var(--gold); color: #3A2410; box-shadow: 0 0 16px rgba(255, 210, 122, 0.5); }
.lane { position: relative; height: var(--lane-h); cursor: pointer; touch-action: none; border-radius: 10px; contain: strict; }
.lane .lit, .scrub .lit { clip-path: inset(0 calc(100% - var(--px, 0px)) 0 0); }
.lane-row.off .lane { opacity: 0.34; }
.lanes { position: relative; }
.playline {
  position: absolute; top: 0; bottom: 0; left: 0; width: 1.5px; margin-left: -0.75px; background: rgba(255, 246, 232, 0.95); pointer-events: none; z-index: 2;
  will-change: transform; box-shadow: 0 0 10px rgba(255, 210, 122, 0.7);
}
.playline::before { content: ""; position: absolute; right: 1px; top: 0; bottom: 0; width: 46px; background: linear-gradient(90deg, transparent, rgba(255, 210, 122, 0.12)); }
.sky .head { position: absolute; top: 0; bottom: 0; left: 0; width: 1.5px; margin-left: -0.75px; background: rgba(255, 246, 232, 0.95); pointer-events: none; will-change: transform; }
.sky .head::after { content: ""; position: absolute; left: 50%; top: 2px; width: 8px; height: 8px; margin-left: -4px; border-radius: 50%; background: #FFD27A; box-shadow: 0 0 8px #FFD27A; }
.scrub .head { position: absolute; top: 0; bottom: 0; left: 0; width: 2px; margin-left: -1px; background: #43284A; pointer-events: none; will-change: transform; }
.lane-row.master .lane-head { background: rgba(255, 210, 122, 0.08); box-shadow: 0 0 0 1px rgba(255, 210, 122, 0.25) inset; }
.lane-row.diff { --lane-h: 92px; }
.lane-row.off .lane-name b { color: var(--night-soft); }
.divider { display: flex; align-items: center; gap: 12px; margin: 12px 0 2px; }
.divider i { flex: 1; }
.divider span { font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--night-soft); padding-left: 6px; }
.divider i { align-self: center; height: 1px; background: linear-gradient(90deg, var(--night-rule), transparent); }
.hint { margin-top: 14px; font-size: 12.5px; color: var(--night-soft); display: flex; flex-wrap: wrap; gap: 6px 18px; }
.hint kbd { font-family: var(--mono); font-size: 11px; padding: 1px 6px; border-radius: 5px; background: rgba(255, 255, 255, 0.08); box-shadow: 0 0 0 1px var(--night-rule) inset; color: var(--night-ink); }
.abswitch { display: inline-flex; align-items: center; gap: 10px; }
.legend-diff { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 12px; color: var(--night-soft); margin: 10px 2px 2px; }
.legend-diff span { display: inline-flex; align-items: center; gap: 6px; }
.legend-diff i { width: 18px; height: 8px; border-radius: 3px; display: inline-block; }

@media (max-width: 760px) {
  .console { --head-w: 128px; --lane-h: 46px; padding: 12px; border-radius: 20px; }
  .lane-head { grid-template-columns: auto 1fr; gap: 8px; padding: 5px; }
  .lane-head .solo { display: none; }
  .lamp { width: 28px; height: 28px; }
  .lane-name b { font-size: 12px; }
  .lane-name small { font-size: 9.5px; }
  .lane-row.diff { --lane-h: 78px; }
  .sky { height: 120px; }
}

/* ---------- stills ---------- */
.stills { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.still { display: grid; gap: 8px; border: 0; padding: 0; background: none; text-align: left; cursor: pointer; color: var(--ink); }
.still img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 12px; display: block; box-shadow: 0 14px 30px -18px var(--glow); transition: transform 0.3s, box-shadow 0.3s; }
.still:hover img { transform: translateY(-3px); box-shadow: 0 20px 40px -16px var(--glow); }
.still span { font-family: var(--display); font-style: italic; font-size: 1.15rem; line-height: 1.2; }
.still small { font-family: var(--mono); font-size: 11px; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
@media (max-width: 860px) { .stills { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- making of ---------- */
.notes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 34px; }
.note { display: grid; gap: 8px; align-content: start; border-top: 1px solid var(--rule); padding-top: 14px; }
.note h3 { font-size: 1.6rem; }
.note p { color: var(--ink-soft); font-size: 0.95rem; }
.note .fig { font-family: var(--mono); font-size: 12px; color: var(--ink); font-variant-numeric: tabular-nums; }
@media (max-width: 860px) { .notes { grid-template-columns: minmax(0, 1fr); } }

footer { padding-block: 70px 50px; display: grid; gap: 10px; justify-items: start; }
footer .sign {
  background: var(--paper); color: var(--paper-ink); font-family: var(--display); font-style: italic; font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.4rem);
  padding: 18px 28px; border-radius: 6px; transform: rotate(-1.5deg); box-shadow: 0 18px 40px -20px var(--glow);
}
footer .sign s { font-family: var(--mono); font-style: normal; font-size: 0.42em; letter-spacing: 0.2em; display: block; color: #A0707A; }
footer small { font-family: var(--mono); font-size: 12px; color: var(--ink-soft); }

/* ---------- Claude and Codex ---------- */
.hero { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: end; column-gap: 24px; }
.hero > :not(.duo) { grid-column: 1; }
.hero .duo { grid-column: 2; grid-row: 1 / span 4; justify-self: center; }
.duo { --h: 190px; position: relative; display: flex; align-items: flex-end; gap: calc(var(--h) * 0.06); padding-bottom: 10px; cursor: pointer; }
.duo::after { /* the ground they stand on */
  content: ""; position: absolute; left: -6%; right: -6%; bottom: 2px; height: 16px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(67, 40, 74, 0.28), transparent); z-index: -1;
}
.char { position: relative; flex: none; transform-origin: 50% 100%; will-change: transform; }
.char img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; user-select: none; }
.char.flip img { transform: scaleX(-1); }
.char.clawd { height: calc(var(--h) * 0.56); }
.char.codex { height: var(--h); }
.eye { position: absolute; width: 7.2%; height: 24%; top: 16%; border-radius: 38% / 11%; background: linear-gradient(180deg, #2A2230, #121016); transition: height 0.06s, top 0.06s; }
.eye::after { content: ""; position: absolute; left: 18%; top: 10%; width: 32%; height: 20%; border-radius: 50%; background: rgba(255, 255, 255, 0.85); }
.eye.shut { height: 3.8%; top: 30.9%; border-radius: 99px; background: #2A1A1A; }
.eye.shut::after { display: none; }
.face { position: absolute; display: grid; place-items: center; container-type: size; }
.face b {
  font-family: var(--mono); font-weight: 600; font-size: 48cqh; line-height: 1; letter-spacing: 0.12em; color: #9FF6FF; white-space: nowrap;
  text-shadow: 0 0 8cqh #7CF3FF, 0 0 22cqh rgba(124, 243, 255, 0.7);
}
.face b.cursor::after { content: "_"; animation: caret 1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }
.perch { position: absolute !important; right: 34px; top: 0; transform: translateY(-100%); --h: 74px; padding-bottom: 0; pointer-events: auto; }
.perch::after { display: none; }
.console { overflow: visible; margin-top: 70px; }
.speech {
  position: absolute; right: 100%; bottom: 62%; margin-right: 6px; white-space: nowrap; padding: 6px 12px; border-radius: 14px 14px 2px 14px;
  background: var(--paper); color: #43284A; font-family: var(--display); font-style: italic; font-size: 15px; box-shadow: 0 8px 20px -10px rgba(0, 0, 0, 0.5);
  opacity: 0; transform: translateY(4px); transition: opacity 0.25s, transform 0.25s; pointer-events: none;
}
.speech.show { opacity: 1; transform: none; }
@media (max-width: 760px) {
  .hero { grid-template-columns: minmax(0, 1fr); }
  .hero .duo { grid-column: 1; grid-row: auto; justify-self: start; --h: 130px; margin-top: 6px; }
  .perch { --h: 56px; right: 18px; }
}

/* ---------- layer lanes and compare rows ---------- */
.console.layers { --lane-h: 44px; }
.divider .acts { display: inline-flex; gap: 6px; margin-left: 10px; }
.divider .acts button {
  border: 0; cursor: pointer; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.06em; padding: 3px 8px; border-radius: 6px;
  background: rgba(255, 255, 255, 0.06); color: var(--night-soft); box-shadow: 0 0 0 1px var(--night-rule) inset;
}
.divider .acts button:hover { color: var(--night-ink); background: rgba(255, 255, 255, 0.12); }
.divider > span { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.lamps2 { display: grid; gap: 8px; justify-items: center; }
.lamps2 .lamp { width: 26px; height: 26px; }
.lamps2 .lamp::after { top: -4px; width: 8px; height: 5px; }
.swap {
  border: 0; cursor: pointer; padding: 6px 8px; border-radius: 8px; font-family: var(--mono); font-size: 11px; font-weight: 600;
  background: rgba(255, 255, 255, 0.06); color: var(--night-ink); box-shadow: 0 0 0 1px var(--night-rule) inset; white-space: nowrap;
}
.swap:hover { background: rgba(255, 210, 122, 0.18); }
.lane-row.diff .lane-head { grid-template-columns: auto 1fr auto; }
.vtag { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.08em; color: var(--night-soft); display: grid; gap: 14px; text-transform: uppercase; }
.presets { max-width: 100%; min-width: 0; }
.presets .tabs { min-width: 0; flex-wrap: wrap; border-radius: 18px; gap: 2px; }
.presets .tabs button { padding: 6px 12px; font-size: 13px; white-space: nowrap; }
.presets .tabs button[aria-selected="true"] { background: var(--gold); color: #3A2410; }
.sidebtn {
  display: inline-flex; align-items: center; gap: 8px; border: 0; cursor: pointer; padding: 7px 12px; border-radius: 10px; font-size: 13px; font-weight: 600;
  background: rgba(255, 255, 255, 0.06); color: var(--night-ink); box-shadow: 0 0 0 1px var(--night-rule) inset;
}
.sidebtn[aria-pressed="true"] { background: var(--paper); color: #43284A; }
.sidebtn svg { width: 16px; height: 16px; }

/* ---------- kinetic lyrics, ported from kálmi.fm: word by word, each line builds a shape ---------- */
.lyrstage {
  --text: #FFF6E8; --accent: #FFD27A; --accent2: #F4A6B7; --card: #101538; --scene-bg: #101538;
  position: relative; height: 270px; margin: 0 0 14px; border-radius: 16px; overflow: hidden;
  background: radial-gradient(80% 90% at 50% 110%, rgba(255, 176, 121, 0.16), transparent 70%), rgba(10, 11, 30, 0.35);
  box-shadow: 0 0 0 1px var(--night-rule) inset;
}
.lyrtools { position: absolute; right: 10px; top: 10px; z-index: 6; display: flex; gap: 6px; align-items: center; }
/* film or lyrics on the one screen */
.lyrscreen {
  --text: #FFF6E8; --accent: #FFD27A; --accent2: #F4A6B7; --card: #101538; --scene-bg: #101538;
  position: absolute; inset: 0; display: none; overflow: hidden;
  background: radial-gradient(90% 80% at 80% 0%, rgba(185,168,232,.22), transparent 70%), radial-gradient(80% 90% at 20% 110%, rgba(255,176,121,.16), transparent 70%), linear-gradient(180deg, #1A2050, #0A0B1E);
}
.screen.lyrics .lyrscreen { display: block; }
.screen.lyrics video { visibility: hidden; }
.fullscreen-tools { display: none; }
body.fullview { overflow: hidden; }
body.fullview .film { container-type: normal; }
.screen.fullscreen { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; aspect-ratio: auto; border-radius: 0; z-index: 50; }
.screen.fullscreen .fullscreen-tools, .screen:fullscreen .fullscreen-tools, .screen:-webkit-full-screen .fullscreen-tools { position: absolute; bottom: 20px; left: 20px; right: 20px; z-index: 8; display: flex; align-items: center; gap: 14px; color: #FFF6E8; }
.fullscreen-tools .back { margin-left: auto; }
/* Fullscreen lyrics float in the film's peach, lavender, and dawn-blue sky.
   Two painted gradients drift and crossfade on the compositor, without canvas redraws or animated blur. */
.screen.fullscreen.lyrics .lyrscreen {
  --text: #43284A; --accent: #93435E; --accent2: #526E86; --card: #FFF0DB; --scene-bg: #FFF6E8;
  isolation: isolate; background: #E7C4CD;
}
.screen.fullscreen.lyrics .lyrscreen::before,
.screen.fullscreen.lyrics .lyrscreen::after {
  content: ""; position: absolute; inset: -18%; z-index: 0; pointer-events: none;
  will-change: transform, opacity;
}
.screen.fullscreen.lyrics .lyrscreen::before {
  background:
    radial-gradient(ellipse at 16% 18%, #FFE2AF 0%, transparent 58%),
    radial-gradient(ellipse at 88% 26%, #C6B4DF 0%, transparent 60%),
    radial-gradient(ellipse at 70% 90%, #B7D0E1 0%, transparent 62%),
    linear-gradient(125deg, #ECA8B9, #F1D7AC 48%, #C4DED1);
  animation: hopeSkyDrift 28s ease-in-out infinite alternate;
}
.screen.fullscreen.lyrics .lyrscreen::after {
  opacity: .38;
  background:
    radial-gradient(ellipse at 22% 78%, #B7D0E1 0%, transparent 62%),
    radial-gradient(ellipse at 78% 20%, #F4BDA6 0%, transparent 58%),
    radial-gradient(ellipse at 56% 55%, #D1B6E2 0%, transparent 68%);
  animation: hopeSkyBlend 22s ease-in-out infinite alternate;
}
.screen.fullscreen.lyrics .kinhost { z-index: 1; }
.screen.fullscreen.lyrics .fullscreen-tools { color: #43284A; }
@keyframes hopeSkyDrift {
  from { transform: translate(-3%, -2%) rotate(-4deg) scale(1.02); }
  to { transform: translate(3%, 2%) rotate(4deg) scale(1.08); }
}
@keyframes hopeSkyBlend {
  0% { transform: translate(4%, -3%) scale(1.08); opacity: .24; }
  50% { opacity: .64; }
  100% { transform: translate(-4%, 3%) scale(1); opacity: .36; }
}
@media (prefers-reduced-motion: reduce) {
  .screen.fullscreen.lyrics .lyrscreen::before,
  .screen.fullscreen.lyrics .lyrscreen::after { animation: none; transform: none; }
}
.lyrscreen .lyrtools { position: absolute; right: 12px; top: 12px; z-index: 6; display: flex; gap: 6px; align-items: center; }
.viewtog { display: inline-flex; padding: 3px; border-radius: 999px; background: rgba(67, 40, 74, 0.08); box-shadow: 0 0 0 1px rgba(67, 40, 74, 0.1) inset; }
.viewtog button {
  border: 0; cursor: pointer; height: 32px; padding: 0 14px; border-radius: 999px; background: transparent; color: #6A5878;
  font-family: var(--display); font-style: italic; font-size: 16px; display: inline-flex; align-items: center; gap: 7px;
}
.viewtog button[aria-pressed="true"] { background: #43284A; color: #FFF6E8; box-shadow: 0 6px 16px -6px rgba(194, 86, 60, 0.6); }
.viewtog button[aria-pressed="true"]::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #FFD27A; box-shadow: 0 0 7px 2px rgba(255, 210, 122, 0.8); }
/* hopecore buttons: cream paper pills with plum ink and a little lit bulb, like the signs in the film */
.hbtn, .hselect {
  --glow: rgba(255, 176, 121, 0.55);
  display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 16px 0 12px; border: 0; border-radius: 999px; cursor: pointer;
  font-family: var(--display); font-style: italic; font-size: 17px; line-height: 1; color: #43284A; white-space: nowrap;
  background: linear-gradient(180deg, #FFFBF3, #FFEFD9);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset, 0 -2px 0 rgba(194, 86, 60, 0.12) inset, 0 6px 18px -6px var(--glow), 0 0 0 1px rgba(67, 40, 74, 0.1);
  transition: transform 0.2s cubic-bezier(.2, .9, .3, 1.3), box-shadow 0.2s;
}
.hbtn:hover, .hselect:hover { transform: translateY(-1px) rotate(-1.5deg); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset, 0 -2px 0 rgba(194, 86, 60, 0.12) inset, 0 10px 26px -6px rgba(255, 176, 121, 0.85), 0 0 0 1px rgba(67, 40, 74, 0.12); }
.hbtn:active { transform: translateY(1px) scale(0.98); }
.hbtn:focus-visible, .hselect:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.hbtn .bulb { width: 9px; height: 9px; border-radius: 50%; flex: none; background: radial-gradient(circle at 35% 35%, #fff, #FFD27A 55%, #F6B34C); box-shadow: 0 0 8px 2px rgba(255, 210, 122, 0.8); }
.hbtn svg { width: 15px; height: 15px; flex: none; }
.hbtn.round { width: 40px; height: 40px; padding: 0; justify-content: center; background: radial-gradient(circle at 40% 30%, #6A3F6E, #43284A); color: #FFF6E8;
  box-shadow: 0 0 0 4px rgba(255, 246, 232, 0.22), 0 8px 24px -6px rgba(255, 176, 121, 0.75); }
.hbtn.round svg { width: 16px; height: 16px; }
.hbtn.round.small { width: 34px; height: 34px; background: linear-gradient(180deg, #FFFBF3, #FFEFD9); color: #43284A; box-shadow: 0 6px 18px -6px var(--glow), 0 0 0 1px rgba(67, 40, 74, 0.1); }
.hbtn.round.small svg { width: 13px; height: 13px; }
.hselect {
  appearance: none; -webkit-appearance: none; padding: 0 34px 0 30px; min-width: 0;
  background:
    radial-gradient(circle at 15px 50%, #FFD27A 0 4px, rgba(255, 210, 122, 0.45) 5px, transparent 9px),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5 6 8l3.5-3.5' fill='none' stroke='%2343284A' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") right 12px center / 12px no-repeat,
    linear-gradient(180deg, #FFFBF3, #FFEFD9);
}
.hselect option { font-family: var(--body); font-style: normal; font-size: 14px; color: #43284A; background: #FFF6E8; }
.hpair { display: inline-flex; align-items: center; gap: 4px; }
.lyrtools .hbtn, .lyrtools .hselect { height: 32px; font-size: 15.5px; }
.lyrtools .hbtn.round.small { width: 32px; }
@media (max-width: 760px) {
  .lyrtools { left: 10px; right: 10px; justify-content: flex-end; flex-wrap: wrap; }
  .lyrtools .hbtn .lbl { display: none; }
  .lyrtools .hbtn:not(.round) { padding: 0 10px; }
}
.kinhost { position: absolute; inset: 0; }
.lyrview {
  --text: #FFF6E8; --accent: #FFD27A; --accent2: #F4A6B7; --card: #101538; --scene-bg: #101538;
  position: fixed; inset: 0; z-index: 50; display: grid; grid-template-rows: auto 1fr;
  padding: calc(env(safe-area-inset-top, 0px) + 14px) 16px calc(env(safe-area-inset-bottom, 0px) + 14px);
  background: radial-gradient(120% 80% at 80% -10%, rgba(91, 76, 154, 0.55), transparent 60%), radial-gradient(90% 60% at 0% 110%, rgba(244, 166, 183, 0.22), transparent 60%), linear-gradient(180deg, #1A2050, #0A0B1E);
  color: var(--night-ink);
}
.lv-top { position: relative; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.lv-top .t { font-family: var(--display); font-size: 1.5rem; margin-right: auto; }
.lv-top .tc { font-family: var(--mono); font-size: 12px; color: var(--night-soft); font-variant-numeric: tabular-nums; }
.lyrview .kinhost { position: relative; }
.lyrview .perch { display: none; }

.kin { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) scale(calc(1 + var(--beat, 0) * .025)); perspective: 1100px; }
.kin-in { position: absolute; transform-style: preserve-3d; }
.kw { position: absolute; transform: translate(-50%, -50%) rotate(var(--rot, 0deg)); white-space: nowrap; color: var(--text); pointer-events: none;
  text-shadow: 0 0 22px var(--card), 0 2px 4px color-mix(in srgb, var(--card) 80%, transparent); }
.kw > span { display: inline-block; opacity: 0; transition: color .25s, text-shadow .25s, transform .25s; }
.kw.in > span { opacity: 1; animation-duration: .55s; animation-timing-function: cubic-bezier(.2,.9,.25,1.2); animation-fill-mode: both; }
.kw.hit > span { color: var(--accent); text-shadow: 0 0 18px color-mix(in srgb, var(--accent) 70%, transparent), 0 0 2px var(--card); transform: scale(1.06); }
.kw.ghost > span { color: transparent; -webkit-text-stroke: max(1.5px, .03em) var(--text); text-shadow: none; }
.kw.ghost.hit > span { -webkit-text-stroke-color: var(--accent); }
.kw.tag > span { background: var(--accent); color: var(--scene-bg, #111); padding: 0 .1em; border-radius: .06em; text-shadow: none; }
.kw.in.a-pop > span { animation-name: kPop; }
.kw.in.a-flipx > span { animation-name: kFlipX; transform-origin: 50% 0; }
.kw.in.a-flipy > span { animation-name: kFlipY; }
.kw.in.a-drop > span { animation-name: kDrop; animation-timing-function: cubic-bezier(.3,1.6,.5,1); }
.kw.in.a-slide > span { animation-name: kSlide; }
.kw.in.a-zoom > span { animation-name: kZoom; animation-timing-function: cubic-bezier(.15,.85,.3,1); }
.kw.in.a-spin > span { animation-name: kSpin; }
.kw.in.a-type > span { animation-name: kType; animation-timing-function: steps(var(--n), end); animation-duration: calc(var(--n) * 45ms + 120ms); }
.kw.in.a-rise > span { animation-name: kRise; }
@keyframes kPop { 0% { transform: scale(0); opacity: 0; } 60% { transform: scale(1.18); opacity: 1; } 100% { transform: none; } }
@keyframes kFlipX { 0% { transform: perspective(500px) rotateX(-100deg); opacity: 0; } 100% { transform: none; opacity: 1; } }
@keyframes kFlipY { 0% { transform: perspective(500px) rotateY(100deg); opacity: 0; } 100% { transform: none; opacity: 1; } }
@keyframes kDrop { 0% { transform: translateY(-130%); opacity: 0; } 100% { transform: none; opacity: 1; } }
@keyframes kSlide { 0% { transform: translateX(-55%) skewX(-24deg); opacity: 0; } 100% { transform: none; opacity: 1; } }
@keyframes kZoom { 0% { transform: scale(2.6); filter: blur(10px); opacity: 0; } 100% { transform: none; filter: none; opacity: 1; } }
@keyframes kSpin { 0% { transform: rotate(-200deg) scale(.2); opacity: 0; } 100% { transform: none; opacity: 1; } }
@keyframes kType { 0% { clip-path: inset(-30% 100% -30% -30%); } 99% { clip-path: inset(-30% -30% -30% -30%); } 100% { clip-path: none; } }
@keyframes kRise { 0% { transform: translateY(70%); clip-path: inset(-30% -30% 100% -30%); opacity: 0; } 99% { clip-path: inset(-30%); } 100% { transform: none; clip-path: none; opacity: 1; } }
.kcube { position: absolute; transform-style: preserve-3d; animation: kCubeTurn 9s ease-in-out infinite; }
@keyframes kCubeTurn { 0%, 100% { transform: rotateX(-22deg) rotateY(-36deg); } 50% { transform: rotateX(-30deg) rotateY(-50deg); } }
.kface { position: absolute; inset: 0; transform-style: preserve-3d; border: 2px solid color-mix(in srgb, var(--accent) 55%, transparent);
  background: color-mix(in srgb, var(--card) 55%, transparent); border-radius: 6px; }
.kface .kw { text-shadow: none; }
.kin.out { pointer-events: none; animation: kOut0 .6s cubic-bezier(.5,0,.75,0) forwards; }
.kin.out.o1 { animation-name: kOut1; }
.kin.out.o2 { animation-name: kOut2; }
.kin.out.o3 { animation-name: kOut3; animation-timing-function: steps(8); }
@keyframes kOut0 { to { opacity: 0; transform: translate(-50%, -50%) scale(.82); filter: blur(10px); } }
@keyframes kOut1 { to { opacity: 0; transform: translate(-50%, -95%) scale(1.06); } }
@keyframes kOut2 { to { opacity: 0; transform: translate(-50%, -50%) perspective(900px) rotateX(75deg); } }
@keyframes kOut3 { 0% { clip-path: inset(0); } 30% { transform: translate(-48%, -50%) skewX(20deg); clip-path: inset(20% 0 40% 0); } 60% { transform: translate(-52%, -50%); clip-path: inset(60% 0 10% 0); } 100% { opacity: 0; transform: translate(-50%, -50%) scaleY(.05); } }
.kgap { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: .4em; font-size: 42px; color: var(--accent); }
.kgap span { display: inline-block; animation: hop 1.2s ease-in-out infinite; text-shadow: 0 0 18px color-mix(in srgb, var(--accent) 60%, transparent); }
.kgap span:nth-child(2) { animation-delay: .15s; } .kgap span:nth-child(3) { animation-delay: .3s; }
@keyframes hop { 50% { transform: translateY(-.25em); } }
.kw.in.a-neon > span { animation-name: kNeon; animation-duration: .9s; animation-timing-function: linear; }
.kw.in.a-glitch > span { animation-name: kGlitch; animation-duration: .5s; animation-timing-function: steps(6); }
.kw.in.a-slam > span { animation-name: kSlam; animation-duration: .42s; animation-timing-function: cubic-bezier(.2,1.4,.4,1); }
@keyframes kNeon { 0%, 18%, 30%, 44% { opacity: 0; } 12%, 24%, 38%, 100% { opacity: 1; } }
@keyframes kGlitch { 0% { transform: translate(-12px, 4px) skewX(30deg); opacity: 0; clip-path: inset(40% 0 30% 0); } 30% { transform: translate(8px, -3px); clip-path: inset(10% 0 60% 0); opacity: 1; } 60% { transform: translate(-4px, 2px) skewX(-12deg); clip-path: inset(60% 0 5% 0); } 99% { clip-path: inset(-30%); } 100% { transform: none; clip-path: none; } }
@keyframes kSlam { 0% { transform: scale(4) rotate(-8deg); opacity: 0; filter: blur(6px); } 70% { transform: scale(.92); opacity: 1; filter: none; } 100% { transform: none; } }
.kt-brutal .kw > span { font-weight: 800; letter-spacing: -.02em; }
.kt-brutal .kw.tag > span { background: var(--text); color: var(--scene-bg, #111); border-radius: 0; padding: 0 .12em; box-shadow: .08em .08em 0 var(--accent); }
.kt-brutal .kw.hit > span { background: var(--accent); color: var(--scene-bg, #111); text-shadow: none; padding: 0 .12em; }
.kt-neon .kw > span { color: #fff; text-shadow: 0 0 4px #fff, 0 0 12px var(--accent), 0 0 28px var(--accent), 0 0 48px var(--accent2); }
.kt-neon .kw.ghost > span { -webkit-text-stroke: 2px var(--accent2); color: transparent; text-shadow: 0 0 14px var(--accent2); }
.kt-neon .kw.hit > span { animation: kBuzz 1.6s steps(1) infinite; }
@keyframes kBuzz { 0%, 92%, 100% { opacity: 1; } 94% { opacity: .35; } 96% { opacity: 1; } 98% { opacity: .55; } }
.kt-glitch .kw > span { text-shadow: 2px 0 #ff2a6d, -2px 0 #05d9e8; }
.kt-glitch .kw.hit > span { animation: kJitter .28s steps(2) infinite; color: #fff; }
@keyframes kJitter { 0% { transform: translate(1px, -1px); text-shadow: 3px 0 #ff2a6d, -3px 0 #05d9e8; } 50% { transform: translate(-2px, 1px); text-shadow: -3px 0 #ff2a6d, 3px 0 #05d9e8; } 100% { transform: none; } }
.kt-3d .kw > span { text-shadow: 1px 1px 0 color-mix(in srgb, var(--accent) 70%, black), 2px 2px 0 color-mix(in srgb, var(--accent) 60%, black), 3px 3px 0 color-mix(in srgb, var(--accent) 50%, black), 4px 4px 0 color-mix(in srgb, var(--accent) 40%, black), 6px 8px 14px rgba(0,0,0,.35); }
.kt-3d .kface { background: color-mix(in srgb, var(--accent) 16%, var(--card)); }
.kt-type .kw > span { text-shadow: none; }
.kt-type .kw.hit > span { color: var(--text); transform: none; }
.kt-type .kw.hit::after { content: ''; position: absolute; right: -.18em; top: 10%; width: .08em; height: 80%; background: var(--accent); animation: kCaret .8s steps(1) infinite; }
@keyframes kCaret { 50% { opacity: 0; } }
.kt-bubble .kw > span { text-shadow: 0 3px 0 color-mix(in srgb, var(--card) 70%, transparent); }
.kt-bubble .kw.tag > span { border-radius: .5em; padding: 0 .14em; background: var(--accent); color: #fff; box-shadow: 0 .08em 0 color-mix(in srgb, var(--accent) 60%, black); }
.kt-bubble .kw.tag:nth-child(3n) > span { background: var(--accent2); }
.kt-bubble .kw.tag:nth-child(3n+1) > span { background: color-mix(in srgb, var(--accent) 50%, var(--accent2)); }
.kin.kt-quake { transform: translate(calc(-50% + var(--beat, 0) * 7px), calc(-50% - var(--beat, 0) * 5px)) rotate(calc(var(--beat, 0) * 1.2deg)) scale(calc(1 + var(--beat, 0) * .05)); }
.kt-quake .kw.hit > span { color: var(--accent); }
.kt-galaxy .kin-in { animation: kGal 40s linear infinite; }
@keyframes kGal { to { transform: rotate(360deg); } }
.kt-galaxy .kw > span { text-shadow: 0 0 16px color-mix(in srgb, var(--accent) 60%, transparent); }
.kt-wave .kw.in { animation: kBob 2.6s ease-in-out infinite; animation-delay: calc(var(--j, 0) * -.22s); }
@keyframes kBob { 50% { translate: 0 -.12em; } }
.kt-collage .kw.tag > span { background: #fff8ec; color: #1b1b1b; padding: .02em .16em; border-radius: 2px; box-shadow: 0 3px 10px rgba(0,0,0,.25); text-shadow: none; }
.kt-collage .kw.tag:nth-child(4n) > span { background: var(--accent); color: #111; }
.kt-collage .kw.tag:nth-child(4n+1) > span { background: #111; color: #fff; }
.kt-collage .kw.tag:nth-child(4n+2) > span { background: var(--accent2); color: #111; }
.screen.fullscreen.lyrics .kt-neon .kw:not(.ghost) > span {
  color: var(--text); text-shadow: 0 0 4px var(--card), 0 0 14px var(--accent), 0 0 30px var(--accent2);
}
.screen.fullscreen.lyrics .kt-glitch .kw.hit:not(.tag) > span { color: var(--text); }
.screen.fullscreen.lyrics .kt-collage .kw.tag:nth-child(4n) > span,
.screen.fullscreen.lyrics .kt-collage .kw.tag:nth-child(4n+2) > span { color: var(--scene-bg); }
.kw { z-index: 2; }
.kw.tag { z-index: 1; }
.kw.hit { z-index: 3; }
.kw > span { padding: 0 .06em; line-height: 1.15; }
.kw.hit > span { transform: none; }
.kw.tag > span { padding-top: .02em; padding-bottom: .02em; line-height: 1.02; }
.kin, .kin-in, .kface { overflow: visible; }
@media (max-width: 760px) { .lyrstage { height: 200px; } }
@media (prefers-reduced-motion: reduce) { .kw.in > span, .kcube, .kin.out, .kt-galaxy .kin-in, .kt-wave .kw.in { animation: none !important; } }

/* ---------- side by side: the film stays put on the left while the stems scroll on the right ---------- */
@media (min-width: 1000px) {
  body.side .wrap { max-width: 1720px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); column-gap: 26px; }
  body.side .wrap > * { grid-column: 1 / -1; }
  body.side .film { grid-column: 1; grid-row: 2; position: sticky; top: calc(env(safe-area-inset-top, 0px) + 14px); align-self: start; }
  body.side #mix { display: contents; }
  body.side #mix .sec-head { display: none; }
  body.side .console { grid-column: 2; grid-row: 2; margin-top: 70px; --head-w: 172px; }
  body.side .film { margin-top: 70px; }
  body.side .hint { display: none; }
}
@media (max-width: 999px) { .sidebtn:not(.discbtn) { display: none; } }
.discbtn[aria-pressed="true"] { background: var(--gold); color: #3A2410; box-shadow: 0 0 22px rgba(255, 210, 122, 0.45); }
.discovery-control { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; max-width: 100%; }
.discovery-modes { flex-wrap: wrap; border-radius: 14px; gap: 2px; }
.discovery-modes button { padding: 6px 10px; font-size: 12px; white-space: nowrap; }
.discovery-modes button[aria-pressed="true"] { background: var(--paper); color: #43284A; }
.discbadge { margin-left: auto; font-family: var(--mono); font-size: 12px; color: #3A2410; background: var(--gold); padding: 4px 10px; border-radius: 999px; font-style: normal; text-shadow: none; }
.lane-row.waiting .lamp { opacity: 0.5; outline: 1.5px dashed var(--gold); outline-offset: 3px; }
.lane-row.joined .lane-head { animation: joined 1.2s ease-out; }
@keyframes joined { 0% { box-shadow: 0 0 0 1px var(--gold) inset, 0 0 28px rgba(255, 210, 122, 0.6); } 100% { box-shadow: 0 0 0 1px var(--night-rule) inset; } }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* Three doors into the same neighbourhood: watch, mix, and follow the story. */
.site-nav { display:flex; align-items:center; justify-content:space-between; gap:20px; padding:24px 0 30px; font-size:13px; }
.site-nav .wordmark { font-family:var(--display); font-size:21px; text-decoration:none; }
.site-nav .nav-links { display:flex; align-items:center; flex-wrap:wrap; gap:8px; }
.site-nav .nav-links a { text-decoration:none; padding:6px 12px; border-radius:999px; color:var(--ink-soft); }
.site-nav .nav-links a[aria-current="page"] { background:var(--chip); color:var(--ink); box-shadow:0 0 0 1px var(--rule); }
.listen-page .wrap { max-width:1080px; }
.listen-page header.hero { gap:10px; padding-bottom:26px; }
.listen-page .hero h1 { font-size:clamp(38px,5vw,70px); }
.listen-page .hero .lede { font-size:22px; }
.master-select { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:10px; padding:14px 6px 6px; color:var(--paper-ink); }
.master-select .eyebrow { color:#6A5878; font-size:10px; }
.master-select .viewtog button { font-size:17px; height:35px; }
.listen-page .fullscreen-tools .hselect { max-width:200px; }
.listen-page .fullscreen-tools { flex-wrap:wrap; }
/* the recording picker and Exit stay on the right, even when they wrap */
.fullright { margin-left: auto; display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 14px; }
.fullright .back { margin-left: 0; }
.page-doors { display:flex; justify-content:space-between; flex-wrap:wrap; gap:14px; margin-top:24px; font-family:var(--display); font-size:22px; }
.page-doors a { text-decoration:none; }
.page-doors a:hover { color:var(--accent); }
.listen-page footer { padding-block:35px; }
.story-page .hero { max-width:860px; }
.story-chapter { display:grid; grid-template-columns:1.2fr 1fr; gap:42px; align-items:center; padding:32px 0; }
.story-chapter:nth-child(even) .chapter-image { order:2; }
.chapter-image { display:block; border-radius:18px; overflow:hidden; box-shadow:0 18px 50px -20px var(--glow); }
.chapter-image img { width:100%; display:block; }
.chapter-copy { display:grid; gap:14px; }
.chapter-copy h2 { font-size:clamp(30px,3vw,43px); }
.chapter-copy p { color:var(--ink-soft); max-width:45ch; }
.chapter-copy a { font-family:var(--mono); font-size:12px; text-decoration:none; width:fit-content; border-bottom:1px solid var(--rule); }
.story-page .note .fig { margin-top:12px; }
@media(max-width:760px) {
 .site-nav { align-items:flex-start; flex-direction:column; gap:9px; padding:20px 0; }
 .site-nav .nav-links { gap:3px; margin-left:-10px; }
 .site-nav .nav-links a { font-size:12px; padding:5px 10px; }
 .listen-page .hero .lede { font-size:20px; }
 .master-select { justify-content:center; }
 .master-select .viewtog button { font-size:16px; padding:0 12px; }
 .story-chapter { grid-template-columns:1fr; gap:22px; padding:24px 0; }
 .story-chapter:nth-child(even) .chapter-image { order:0; }
 .page-doors { font-size:20px; }
}

/* ---------- dance ---------- */
.dance-stage { display: grid; place-items: end center; min-height: clamp(300px, 52vw, 520px); padding-bottom: 28px; border-radius: 14px;
  background: radial-gradient(ellipse at 50% 100%, #3A2E6E 0%, transparent 70%), linear-gradient(180deg, var(--night), var(--night-2)); }
.dance-stage .duo { --h: clamp(170px, 30vw, 340px); }
.dance-stage .duo::after { background: radial-gradient(closest-side, rgba(255, 210, 122, 0.35), transparent); }
.dance-floor .transport { grid-template-columns: auto auto minmax(0, 1fr) auto auto auto; }
.dance-floor.fullscreen { position: fixed; inset: 0; z-index: 50; border-radius: 0; padding: 0; display: grid; grid-template-rows: 1fr; }
.dance-floor.fullscreen .dance-stage { border-radius: 0; min-height: 0; height: 100%; place-items: center; padding: 0; }
.dance-floor.fullscreen .dance-stage .duo { --h: min(52vh, 40vw); }
.dance-floor.fullscreen .transport { position: absolute; left: 16px; right: 16px; bottom: 16px; padding: 8px 12px; border-radius: 16px; background: rgba(255, 246, 232, 0.92); }
.dance-floor.fullscreen .garland { position: absolute; top: 0; left: 0; right: 0; max-width: none; z-index: 2; pointer-events: none; }
.skips { display: inline-flex; align-items: center; gap: 2px; }
@media (max-width: 760px) {
  .dance-floor .transport { grid-template-columns: auto auto minmax(0, 1fr) auto; }
  .dance-floor #fs { grid-column: 4; grid-row: 1; }
  .dance-floor .dance-sec { grid-column: 1 / 3; }
  .dance-floor .viewtog { grid-column: 3 / -1; justify-self: end; }
}
.dance-sec { font-family: var(--mono); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dance-floor .loading { grid-column: 1 / -1; font-family: var(--mono); font-size: 12px; color: var(--ink-soft); }

/* Full screen: the controls step aside after a few still seconds and return on any movement or touch. */
.fullscreen-tools, .lyrscreen .lyrtools, .dance-floor .transport { transition: opacity .35s; }
.fullscreen.idle { cursor: none; }
.fullscreen.idle .fullscreen-tools, .fullscreen.idle .lyrtools, .dance-floor.fullscreen.idle .transport { opacity: 0; pointer-events: none; }

/* the waveform and Film/Lyrics switch, borrowed into the full-screen controls */
.fullscreen-tools .scrub { flex: 1 1 220px; min-width: 160px; height: 34px; border-radius: 999px; background: rgba(255, 246, 232, 0.88); box-shadow: 0 0 0 1px rgba(67, 40, 74, 0.12); overflow: hidden; }
.fullscreen-tools .viewtog { background: rgba(255, 246, 232, 0.88); color: #43284A; }
/* time readouts keep a fixed width so the waveform beside them never shifts */
#tc, #fullTime { display: inline-block; flex: none; min-width: 6.2ch; font-family: var(--mono); font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
