@font-face {
  font-family: "Barlow Condensed";
  src: url("../fonts/BarlowCondensed-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: "Orbitron";
  src: url("../assets/Fonts/Orbitron-Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "Orbitron";
  src: url("../assets/Fonts/Orbitron-Black.ttf") format("truetype");
  font-weight: 900;
  font-display: swap;
}

:root {
  --night: #070910;
  --panel: #10131c;
  --slot: #05060a;
  --edge: rgba(255, 255, 255, 0.09);
  --teal: #1ad4c4;
  --magenta: #ff3da6;
  --orange: #ff993d;
  --ink: #ededed;
  --dim: rgba(255, 255, 255, 0.38);
  color-scheme: dark;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: var(--night);
  color: var(--ink);
  font-family: "Barlow Condensed", "Avenir Next Condensed", "Arial Narrow", sans-serif;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

/* The room's picture and clips, behind the booth's canvas. */
#room { position: fixed; left: 0; top: 0; width: 100vw; overflow: hidden; z-index: 0; }
#room img, #room video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

#booth { position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100dvh; z-index: 1; touch-action: none; display: block; }

.pill {
  font: 700 clamp(11px, 1.4vw, 16px) "Orbitron", sans-serif;
  letter-spacing: 0.18em;
  color: var(--ink);
  background: rgba(7, 9, 16, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  padding: 0.7em 1.4em;
  cursor: pointer;
}
.pill.on { background: var(--teal); color: #000; border-color: var(--teal); }
.pill .icon { margin-right: 0.6em; vertical-align: -0.25em; }

#top { position: fixed; top: 2vh; right: 2vw; z-index: 3; display: flex; gap: 0.5em; }
/* The bar's buttons are small (about two thirds of the sheets' buttons): the booth is the thing to look at. */
#top .pill { font-size: clamp(9px, 0.95vw, 11.5px); letter-spacing: 0.13em; padding: 0.55em 1.1em; }
#note { position: fixed; top: 2.5vh; left: 2vw; z-index: 3; color: var(--orange); font-size: 14px; }

.sheet {
  position: fixed; z-index: 4; top: 9vh; right: 2vw; bottom: 3vh; width: min(560px, 92vw);
  background: rgba(16, 19, 28, 0.97); border: 1px solid var(--edge); border-radius: 14px;
  display: flex; flex-direction: column; padding: 14px 16px;
}
.sheet.small { bottom: auto; }
.sheet[hidden] { display: none; }
.sheet .head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.sheet h2 { font: 700 15px "Orbitron", sans-serif; letter-spacing: 0.2em; margin: 0; color: var(--teal); }
.sheet p { color: var(--dim); font-size: 15px; margin: 0 0 12px; }
.modes { display: flex; gap: 0.6em; }
#crate-list { overflow-y: auto; flex: 1; }
.record { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--edge); }
.record .name { flex: 1; min-width: 0; }
.record b { display: block; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.record span { color: var(--dim); font-size: 13px; }
.record button {
  font: 600 13px inherit; letter-spacing: 0.1em; padding: 8px 12px; border-radius: 8px; cursor: pointer;
  background: var(--slot); border: 1.5px solid;
}
.record button.left { color: var(--teal); border-color: var(--teal); }
.record button.right { color: var(--magenta); border-color: var(--magenta); }

/* The title: the dance floor from above, the name, PLAY. */
.screen { position: fixed; inset: 0; z-index: 7; }
.screen[hidden] { display: none; }
#start { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; padding: 16px 16px 6vh;
  text-align: center; background: linear-gradient(rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.88)), url("../assets/Art/title-floor.jpg") center / cover, var(--night); }
#start[hidden] { display: none; }
#start .logo { font: 700 clamp(18px, 3vw, 30px) "Orbitron", sans-serif; letter-spacing: 0.08em; color: var(--teal);
  display: flex; align-items: center; gap: 0.4em; margin-bottom: 6px; -webkit-user-select: none; user-select: none; touch-action: none; }
#start .bars { display: inline-flex; align-items: flex-end; gap: 3px; height: 1em; }
#start .bars i { display: block; width: 0.18em; background: var(--teal); border-radius: 2px; }
#start .bars i:nth-child(1) { height: 45%; }
#start .bars i:nth-child(2) { height: 100%; }
#start .bars i:nth-child(3) { height: 70%; }
#start .bars i:nth-child(4) { height: 35%; }
#start h1 { font: 900 clamp(40px, 8vw, 96px) "Orbitron", sans-serif; letter-spacing: 0.07em; margin: 0;
  text-shadow: 0 0 16px rgba(255, 61, 166, 0.9); }
#start .tagline { margin: 0; color: rgba(255, 255, 255, 0.75); font: 500 clamp(14px, 1.6vw, 18px) system-ui, sans-serif; }
#start .row { display: flex; gap: 12px; margin-top: 10px; }
#start .hint { margin: 10px 0 0; color: var(--dim); font: 500 12px system-ui, sans-serif; letter-spacing: 0.1em; }
#start.busy .hint::after { content: " · starting the decks …"; }
#title-toast { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); padding: 8px 16px; border-radius: 999px;
  background: var(--teal); color: #000; font: 800 12px system-ui, sans-serif; letter-spacing: 0.25em; }
#title-toast[hidden] { display: none; }
button.primary { margin-top: 16px; padding: 13px 54px; border: 0; border-radius: 999px; background: var(--teal); color: #000; cursor: pointer;
  font: 800 17px system-ui, sans-serif; letter-spacing: 0.35em; }
button.quiet { padding: 8px 16px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.4); background: none; cursor: pointer;
  color: rgba(255, 255, 255, 0.85); font: 800 11px system-ui, sans-serif; letter-spacing: 0.15em; }
button.quiet[hidden] { display: none; }

/* A chapter: what it is and its stars on the left, its steps on the right. */
#chapter { background: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.85)),
  linear-gradient(rgba(7, 9, 16, 0.65), rgba(7, 9, 16, 0.65)), url("../assets/Art/room-bedroom.jpg") center / cover, var(--night); overflow-y: auto; }
#chapter .back { position: absolute; top: 2vh; left: 2vw; width: 36px; height: 36px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(0, 0, 0, 0.45); color: rgba(255, 255, 255, 0.85); font: 700 24px/1 system-ui, sans-serif; padding-bottom: 3px; }
.chapter-body { min-height: 100%; display: flex; align-items: center; justify-content: center; gap: 22px 40px; flex-wrap: wrap; padding: 60px 30px 30px; }
.chapter-left { width: min(320px, 90vw); display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.chapter-left .kicker { color: var(--teal); font: 800 12px system-ui, sans-serif; letter-spacing: 0.4em; }
.chapter-left .dots { display: flex; flex-wrap: wrap; gap: 4px; }
.chapter-left .dots button { width: 22px; height: 22px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.35); background: none; cursor: pointer;
  color: rgba(255, 255, 255, 0.8); font: 800 10px system-ui, sans-serif; padding: 0; display: grid; place-items: center; }
.chapter-left .dots button.locked { border-color: rgba(255, 255, 255, 0.12); color: rgba(255, 255, 255, 0.3); cursor: default; }
.chapter-left h1 { margin: 0; font: 900 clamp(24px, 3.2vw, 36px)/1.15 "Orbitron", sans-serif; letter-spacing: 0.06em; }
.chapter-left .line { margin: 0; color: rgba(255, 255, 255, 0.75); font: 500 15px/1.35 system-ui, sans-serif; }
.chapter-left .stars { color: #fff; font: 800 15px system-ui, sans-serif; font-variant-numeric: tabular-nums; }
.chapter-left .primary { padding: 12px 44px; margin-top: 8px; font-size: 16px; }
.chapter-steps { width: min(460px, 92vw); display: flex; flex-direction: column; gap: 4px; }
.chapter-steps .step { display: flex; align-items: center; gap: 12px; padding: 9px 14px; border-radius: 12px; cursor: pointer; text-align: left;
  border: 1px solid rgba(255, 255, 255, 0.1); background: rgba(0, 0, 0, 0.5); color: var(--ink); font: inherit; }
.chapter-steps .step.next { border-color: rgba(26, 212, 196, 0.7); }
.chapter-steps .step:hover:not(:disabled) { background: rgba(26, 212, 196, 0.1); }
.chapter-steps .step:disabled { opacity: 0.4; cursor: default; }
.chapter-steps .k { width: 58px; flex: none; font: 800 10px system-ui, sans-serif; letter-spacing: 0.15em; color: var(--dim); }
.chapter-steps .lesson .k { color: var(--teal); }
.chapter-steps .night .k { color: var(--magenta); }
.chapter-steps .t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.chapter-steps .t b { font-size: 17px; letter-spacing: 0.04em; }
.chapter-steps .t .d { color: var(--dim); font-size: 14px; }
.chapter-steps .s { color: var(--orange); font-size: 15px; letter-spacing: 0.1em; white-space: nowrap; }

/* A lesson over the room: the thing to do top left, the coach's words just above the gear. */
#lesson { position: fixed; left: 0; right: 0; top: 0; height: calc(100vh - var(--gear-h, 58vh)); height: calc(100dvh - var(--gear-h, 58dvh)); z-index: 2; pointer-events: none;
  display: flex; flex-direction: column; justify-content: space-between; padding: 2vh 2vw 1.2vh 2vw; }
#lesson[hidden] { display: none; }
#lesson-top { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; max-width: min(460px, 55vw); margin-left: 46px; }
#lesson-chip { display: flex; align-items: center; gap: 10px; padding: 8px 16px; border-radius: 18px;
  background: rgba(0, 0, 0, 0.72); border: 1px solid rgba(255, 153, 61, 0.6); color: var(--orange);
  font: 800 clamp(11px, 1.2vw, 15px) system-ui, sans-serif; letter-spacing: 0.12em; transition: color 0.2s, border-color 0.2s; }
#lesson-chip .mark { width: 12px; height: 12px; border-radius: 50%; border: 2px solid currentColor; flex: none; }
#lesson-chip.done { color: var(--teal); border-color: rgba(26, 212, 196, 0.6); }
#lesson-chip.done .mark { background: currentColor; }
#lesson-progress { padding: 5px 14px; border-radius: 999px; background: rgba(0, 0, 0, 0.72); border: 1px solid rgba(255, 255, 255, 0.25);
  font: 800 clamp(13px, 1.4vw, 18px) system-ui, sans-serif; font-variant-numeric: tabular-nums; letter-spacing: 0.06em; }
#lesson-progress[hidden] { display: none; }
#lesson-words { align-self: center; max-width: min(720px, 92vw); padding: 10px 16px; border-radius: 12px; background: rgba(0, 0, 0, 0.66); }
#lesson-words b { display: block; color: var(--teal); font: 800 11px system-ui, sans-serif; letter-spacing: 0.3em; margin-bottom: 4px; }
#lesson-words p { margin: 0; font: 600 clamp(14px, 1.6vw, 20px)/1.3 system-ui, sans-serif; }

#result { position: fixed; inset: 0; z-index: 5; background: rgba(0, 0, 0, 0.72); display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 10px; text-align: center; padding: 16px; }
#result[hidden] { display: none; }
#result-number { color: var(--teal); font: 800 13px system-ui, sans-serif; letter-spacing: 0.4em; }
#result-title { margin: 0; font: 900 clamp(28px, 4.5vw, 52px) "Orbitron", sans-serif; letter-spacing: 0.1em; }
#result-stars { font-size: 38px; letter-spacing: 0.25em; color: rgba(255, 255, 255, 0.3); }
#result-stars .on { color: var(--orange); }
#result-verdict { margin: 0; color: rgba(255, 255, 255, 0.75); font: 500 15px system-ui, sans-serif; }
#result-missed { margin: 0; color: var(--orange); font: 700 16px system-ui, sans-serif; }
#result-missed[hidden], #result-retry[hidden] { display: none; }
#result .buttons { display: flex; gap: 14px; margin-top: 10px; }
#result .buttons button { padding: 12px 40px; border: 0; border-radius: 999px; background: var(--teal); color: #000;
  font: 800 15px system-ui, sans-serif; letter-spacing: 0.3em; cursor: pointer; }
#result-retry + #result-continue:not([hidden]) { background: none; color: rgba(255, 255, 255, 0.85); border: 1px solid rgba(255, 255, 255, 0.45); }

/* A night over the room: the clock and the crowd's energy top left, what a friend says above the gear. */
#night { position: fixed; left: 0; right: 0; top: 0; height: calc(100vh - var(--gear-h, 58vh)); height: calc(100dvh - var(--gear-h, 58dvh)); z-index: 2; pointer-events: none;
  display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start; padding: 2vh 2vw 1.2vh 2vw; }
#night[hidden] { display: none; }
#night-meter { margin-left: 46px; display: flex; align-items: center; gap: 10px; padding: 7px 14px; border-radius: 999px; background: rgba(0, 0, 0, 0.72); }
#night-clock { font: 800 14px system-ui, sans-serif; font-variant-numeric: tabular-nums; }
#night-meter .bar { width: 150px; height: 7px; border-radius: 4px; background: rgba(255, 255, 255, 0.15); overflow: hidden; }
#night-meter .bar i { display: block; height: 100%; border-radius: 4px; transition: width 0.25s linear; }
#night-label { font: 800 11px system-ui, sans-serif; letter-spacing: 0.2em; white-space: nowrap; }
#night-words { align-self: center; display: flex; gap: 10px; align-items: baseline; padding: 8px 16px; border-radius: 999px; background: rgba(0, 0, 0, 0.66); }
#night-words[hidden] { display: none; }
#night-words b { color: var(--teal); font: 800 11px system-ui, sans-serif; letter-spacing: 0.3em; }
#night-words span { font: 600 clamp(14px, 1.6vw, 20px) system-ui, sans-serif; }

.pill[hidden] { display: none; }
.pill.pointed { border: 2.5px solid var(--orange); animation: pulse 1.2s ease-in-out infinite alternate; }
@keyframes pulse { from { box-shadow: 0 0 2px rgba(255, 153, 61, 0.2); } to { box-shadow: 0 0 14px rgba(255, 153, 61, 0.9); } }

/* The studio's step grid, over the room just above the gear. */
#studio { position: fixed; z-index: 2; left: 50%; transform: translateX(-50%); bottom: calc(var(--gear-h, 58vh) + 6px); bottom: calc(var(--gear-h, 58dvh) + 6px);
  display: flex; gap: 8px; align-items: center; padding: 8px 12px; border-radius: 14px;
  background: rgba(0, 0, 0, 0.72); border: 1px solid rgba(255, 255, 255, 0.12); }
#studio[hidden] { display: none; }
#studio .tabs { display: flex; flex-direction: column; gap: 4px; }
#studio .tabs button { width: 62px; height: 30px; border: 0; border-radius: 8px; cursor: pointer; background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.85); font: 800 11px system-ui, sans-serif; letter-spacing: 0.12em; }
#studio .tabs button.on { background: var(--teal); color: #000; }
#studio .tabs button.cut { background: var(--orange); color: #000; }
#studio .rows { display: flex; flex-direction: column; gap: 4px; }
#studio .row { display: flex; align-items: center; gap: 3px; }
#studio .row span { width: 54px; font: 800 11px system-ui, sans-serif; letter-spacing: 0.12em; }
#studio .cell { width: clamp(18px, 2.2vw, 30px); height: clamp(18px, 2.6vh, 28px); border-radius: 5px; cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.15); background: rgba(255, 255, 255, 0.08); padding: 0; }
#studio .cell.beat { background: rgba(255, 255, 255, 0.16); }
#studio .cell.gap { margin-left: 5px; }
#studio .cell.now { border: 2px solid #fff; }

#back[hidden] { display: none; } /* the Booth (grooveline.org/booth) has no back arrow */
#back { position: fixed; z-index: 6; top: 2vh; left: 2vw; width: 36px; height: 36px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(0, 0, 0, 0.45); color: rgba(255, 255, 255, 0.85); font: 700 24px/1 system-ui, sans-serif; padding-bottom: 3px; }

/* A story scene: the picture, the clip of the line being spoken on top, the words at the bottom. */
#story { position: fixed; inset: 0; z-index: 5; background: #000; cursor: pointer; overflow: hidden; }
#story[hidden] { display: none; }
#story .still, #story .clip { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
#story .still[hidden] { display: none; }
#story .caption { position: absolute; left: 50%; bottom: 3vh; transform: translateX(-50%); width: min(640px, 92vw);
  padding: 12px 18px; border-radius: 14px; background: rgba(0, 0, 0, 0.66); border: 1px solid rgba(26, 212, 196, 0.35); }
#story .caption[hidden], #story .card[hidden] { display: none; }
#story .caption b { display: block; color: var(--teal); font: 800 12px system-ui, sans-serif; letter-spacing: 0.3em; margin-bottom: 5px; }
#story .caption p { margin: 0; font: 600 clamp(16px, 2vw, 22px)/1.3 system-ui, sans-serif; }
#story .card { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center; padding: 6vw;
  font: 900 clamp(22px, 3.6vw, 44px)/1.3 system-ui, sans-serif; letter-spacing: 0.2em; }

/* THE BAG: six parts on the left, your records on the right. */
#bag { background: var(--night); }
#bag .back, #credits .back { position: absolute; top: 2vh; left: 2vw; width: 36px; height: 36px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(0, 0, 0, 0.45); color: rgba(255, 255, 255, 0.85); font: 700 24px/1 system-ui, sans-serif; padding-bottom: 3px; z-index: 1; }
.bag-body { position: absolute; inset: 0; display: flex; gap: 18px; padding: 2vh 20px 2vh 80px; }
.bag-left { width: min(340px, 40vw); display: flex; flex-direction: column; gap: 5px; overflow-y: auto; }
.bag-left h2 { margin: 0; color: var(--teal); font: 700 17px "Orbitron", sans-serif; letter-spacing: 0.2em; }
.bag-left .sub { color: rgba(255, 255, 255, 0.5); font: 800 10px system-ui, sans-serif; letter-spacing: 0.12em; margin-bottom: 3px; }
.bag-left .slot { display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 4px 8px; border-radius: 10px; cursor: pointer; text-align: left;
  background: rgba(0, 0, 0, 0.4); border: 1px solid rgba(255, 255, 255, 0.1); color: #fff; font: inherit; }
.bag-left .slot.chosen { background: rgba(0, 0, 0, 0.7); border-color: rgba(26, 212, 196, 0.8); }
.bag-left .n { width: 24px; height: 24px; flex: none; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, 0.08);
  color: var(--teal); font: 800 12px system-ui, sans-serif; }
.bag-left .chosen .n { background: var(--teal); color: #000; }
.bag-left .t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.bag-left .part { color: rgba(255, 255, 255, 0.5); font: 800 10px system-ui, sans-serif; letter-spacing: 0.12em; }
.bag-left .pick { font: 700 14px system-ui, sans-serif; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bag-left .hint { color: rgba(255, 255, 255, 0.4); font: 500 13px system-ui, sans-serif; }
.bag-left .fit { color: var(--teal); font: 800 10px system-ui, sans-serif; white-space: nowrap; }
.bag-left .fit.fight { color: var(--orange); }
.bag-left .pack { margin-top: 4px; padding: 10px; border: 0; border-radius: 999px; background: var(--teal); color: #000; cursor: pointer;
  font: 800 14px system-ui, sans-serif; letter-spacing: 0.3em; }
.bag-left .pack:disabled { opacity: 0.3; cursor: default; }
.bag-records { flex: 1; overflow-y: auto; border-radius: 14px; background: var(--panel); border: 1px solid rgba(255, 255, 255, 0.12); }
.bag-records .rec { display: flex; align-items: center; gap: 10px; width: 100%; padding: 6px 12px; border: 0; border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: none; color: #fff; text-align: left; cursor: pointer; font: inherit; }
.bag-records .rec:hover { background: rgba(26, 212, 196, 0.08); }
.bag-records .sleeve { width: 30px; height: 30px; flex: none; border-radius: 4px; }
.bag-records .t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.bag-records .t b { font: 700 15px system-ui, sans-serif; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bag-records .t span { color: rgba(255, 255, 255, 0.5); font: 500 12px system-ui, sans-serif; }
.bag-records .num { width: 38px; text-align: center; font: 700 14px system-ui, sans-serif; font-variant-numeric: tabular-nums; }
.bag-records .at { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; color: #000; font: 800 11px system-ui, sans-serif; }
.bag-records .at.on { background: var(--teal); }

/* The credits: the text climbs over MERIDIAN; then zdB's card. */
#credits { background: #000; overflow: hidden; cursor: pointer; }
#credits::before { content: ""; position: absolute; inset: 0; background: url("../assets/Art/room-meridian.jpg") center / cover; opacity: 0.28; }
#credits .roll { position: absolute; left: 0; right: 0; top: 0; width: min(560px, 90vw); margin: 0 auto; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 34px; padding: 0 24px; }
#credits .logo { font: 700 clamp(18px, 2.4vw, 26px) "Orbitron", sans-serif; letter-spacing: 0.08em; color: var(--teal); display: flex; align-items: center; gap: 0.4em; }
#credits .logo .bars { display: inline-flex; align-items: flex-end; gap: 3px; height: 1em; }
#credits .logo .bars i { display: block; width: 0.18em; background: var(--teal); border-radius: 2px; }
#credits .logo .bars i:nth-child(1) { height: 45%; } #credits .logo .bars i:nth-child(2) { height: 100%; }
#credits .logo .bars i:nth-child(3) { height: 70%; } #credits .logo .bars i:nth-child(4) { height: 35%; }
#credits .name { margin-top: -24px; font: 700 30px "Orbitron", sans-serif; letter-spacing: 0.25em; }
#credits section { display: flex; flex-direction: column; gap: 12px; }
#credits h3 { margin: 0; color: var(--teal); font: 700 17px "Orbitron", sans-serif; letter-spacing: 0.2em; }
#credits section p { margin: 0; color: rgba(255, 255, 255, 0.92); font: 500 16px/1.5 system-ui, sans-serif; }
#credits .zdb { position: absolute; inset: 0; background: #000 url("../assets/Story/scene-zdb.jpg") center / cover; opacity: 0; transition: opacity 0.8s;
  display: flex; align-items: flex-end; justify-content: center; padding-bottom: 3vh; cursor: default; }
#credits .zdb.shown { opacity: 1; }
#credits .zdb .words { width: min(600px, 92vw); padding: 14px 18px; border-radius: 14px; background: rgba(0, 0, 0, 0.66); border: 1px solid rgba(26, 212, 196, 0.35); }
#credits .zdb b { color: var(--teal); font: 800 12px system-ui, sans-serif; letter-spacing: 0.3em; }
#credits .zdb p { margin: 8px 0 0; font: 600 clamp(16px, 2vw, 20px) system-ui, sans-serif; }
#credits .zdb .buttons { display: flex; gap: 10px; margin-top: 12px; }
#credits .zdb .live { padding: 10px 16px; border-radius: 999px; background: var(--teal); color: #000; text-decoration: none; font: 800 13px system-ui, sans-serif; letter-spacing: 0.15em; }
#credits .zdb .end { padding: 10px 16px; border-radius: 999px; background: none; border: 1px solid rgba(255, 255, 255, 0.5); color: #fff; cursor: pointer;
  font: 800 13px system-ui, sans-serif; letter-spacing: 0.15em; }

/* PHONES: the modes and the devices. */
#phones-body .mode { display: flex; gap: 12px; align-items: flex-start; padding: 8px 0; border-bottom: 1px solid var(--edge); }
#phones-body .mode .pill { flex: none; min-width: 130px; }
#phones-body .mode .pill:disabled { opacity: 0.35; cursor: default; }
#phones-body .mode p { margin: 0; font-size: 14px; }
#phones-body .device { display: flex; flex-direction: column; gap: 4px; margin-top: 10px; color: var(--dim); font: 800 11px system-ui, sans-serif; letter-spacing: 0.15em; }
#phones-body select { padding: 8px; border-radius: 8px; background: var(--slot); color: var(--ink); border: 1px solid var(--edge); font: 500 14px system-ui, sans-serif; }
#phones-body .quiet,
#controls-body .pill { margin-top: 10px; }
.sheet p.small,
#controls-body p.small { color: var(--dim); font-size: 13px; margin: 6px 0; }
.sheet.small { max-height: 90vh; overflow-y: auto; }

/* KEYS & MIDI */
#controls-body { overflow-y: auto; display: flex; gap: 22px; flex-wrap: wrap; }
#controls-body h3 { margin: 4px 0; color: var(--teal); font: 700 13px "Orbitron", sans-serif; letter-spacing: 0.2em; }
#controls-body h4 { margin: 12px 0 4px; font: 700 14px system-ui, sans-serif; }
#controls-body .keys,
#controls-body .midi { flex: 1 1 240px; }
.keytable { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; align-items: center; }
.keytable kbd { min-width: 26px; text-align: center; padding: 3px 6px; border-radius: 6px; background: var(--slot); border: 1px solid rgba(255, 255, 255, 0.25);
  font: 700 13px system-ui, sans-serif; }
.keytable span { font-size: 14px; }
.binding { display: flex; gap: 8px; align-items: center; padding: 5px 0; border-bottom: 1px solid var(--edge); font-size: 14px; }
.binding .src { color: var(--dim); min-width: 120px; }
.binding .dst { flex: 1; font-weight: 700; }
.binding .mini { padding: 3px 8px; border-radius: 6px; border: 1px solid rgba(255, 255, 255, 0.3); background: none; color: var(--ink); cursor: pointer;
  font: 800 10px system-ui, sans-serif; letter-spacing: 0.1em; }
#learn { position: fixed; z-index: 4; left: 50%; transform: translateX(-50%); top: 9vh; display: flex; gap: 12px; align-items: center; max-width: 92vw;
  padding: 10px 16px; border-radius: 14px; background: rgba(0, 0, 0, 0.85); border: 1.5px solid var(--orange); color: var(--ink); font: 600 15px system-ui, sans-serif; }
#learn[hidden] { display: none; }

/* The Grooveline mark (src/logo.ts): eleven bars that breathe, as on grooveline.org. */
.gl-logo { display: inline-flex; align-items: center; gap: calc(8px * var(--k, 1)); }
.gl-bars { display: inline-flex; align-items: flex-end; gap: calc(2px * var(--k, 1)); height: calc(28px * var(--k, 1));
  filter: drop-shadow(0 0 calc(3.5px * var(--k, 1)) rgba(0, 212, 200, 0.55)); }
.gl-bars i { display: block; width: calc(3px * var(--k, 1)); border-radius: calc(2px * var(--k, 1)) calc(2px * var(--k, 1)) 0 0;
  background: linear-gradient(#4dffe0, #00a98f); transform-origin: bottom;
  animation-name: gl-swing; animation-timing-function: ease-in-out; animation-iteration-count: infinite; animation-direction: alternate; }
@keyframes gl-swing { from { transform: scaleY(0.3); opacity: 0.45; } to { transform: scaleY(1); opacity: 1; } }
.gl-name { font: 700 calc(17.6px * var(--k, 1)) "Orbitron", sans-serif; letter-spacing: calc(4px * var(--k, 1)); color: #00d4c8; }
@media (prefers-reduced-motion: reduce) { .gl-bars i { animation: none; } }
#learn-choice { display: flex; gap: 8px; flex-wrap: wrap; }
#learn-choice:empty { display: none; }
#learn-choice .pill { font-size: 11px; padding: 0.6em 1em; }

#phones-body .timing { margin-top: 10px; padding: 10px 0; border-bottom: 1px solid var(--edge); }
#phones-body .timing .head { color: var(--teal); font: 800 11px system-ui, sans-serif; letter-spacing: 0.15em; }
#phones-body .trim { display: flex; align-items: center; gap: 8px; }
#phones-body .trim input { flex: 1; accent-color: var(--teal); }
#phones-body .trim .end { color: var(--dim); font: 800 9px system-ui, sans-serif; letter-spacing: 0.08em; white-space: nowrap; }
#phones-body .trim .ms { min-width: 58px; text-align: right; font: 700 13px system-ui, sans-serif; font-variant-numeric: tabular-nums; }

/* MY MUSIC: your own files in the crate (free play). */
.tabs { display: flex; gap: 8px; margin-bottom: 10px; }
.tabs .pill.on { background: var(--teal); color: #000; border-color: var(--teal); }
#crate-list[hidden] { display: none; }
/* The sleeves: covers in a grid, like the front of a crate; a tap opens LEFT / RIGHT on the cover. */
button.mini { padding: 4px 9px; border-radius: 7px; background: var(--slot); color: var(--ink); border: 1px solid var(--edge); font: 700 11px system-ui, sans-serif; letter-spacing: 0.08em; cursor: pointer; }
button.mini.on { border-color: var(--orange); color: var(--orange); }

/* KEYS & MIDI: the MIDI config file buttons and the learned controls. */
.midi-file .pill { font-size: 11px; padding: 0.55em 1.1em; }
.midi-file { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.midi-status { margin: 8px 0 0; font-size: 13px; color: var(--teal); }
.midi-status.bad { color: var(--orange); }
.binding-device { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; }
/* SETTINGS and FULLSCREEN carry a small picture that shows only when the bar is tight: then the words go. */
#top .pill .ico { display: none; }


/* The paywall (web only): the offer at chapter 3, the ACCOUNT sheet, the title's SIGN IN. */
#title-account { position: absolute; top: 14px; right: 16px; font-size: 11px; letter-spacing: 0.15em; padding: 0.6em 1.2em; max-width: 60vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#title-account[hidden] { display: none; }
/* A plain way back to the radio site from the title screen (top left, opposite SIGN IN). */
#title-home { position: absolute; top: 14px; left: 16px; font-size: 11px; letter-spacing: 0.15em; padding: 0.6em 1.2em; max-width: 46vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-decoration: none; }
#title-home:hover, #title-home:focus-visible { border-color: var(--teal); color: var(--teal); }
#account { z-index: 9; top: 8vh; width: min(460px, 92vw); }
#account-body p { color: var(--ink); font-size: 15px; line-height: 1.4; }
#account-body .ok { color: var(--teal); font-weight: 700; }
#account-body .who { color: var(--dim); font-size: 14px; overflow-wrap: anywhere; }
#account-body .status { color: var(--orange); font-size: 14px; min-height: 1.4em; }
#account-body form.signin { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
#account-body input[type=email] { width: 100%; box-sizing: border-box; padding: 11px 12px; border-radius: 10px; background: var(--slot); color: var(--ink); border: 1px solid var(--edge); font: 500 16px system-ui, sans-serif; }
#account-body .primary { margin-top: 4px; padding: 12px 34px; font-size: 14px; letter-spacing: 0.25em; }
#account-body .primary:disabled { opacity: 0.5; cursor: default; }
#account-body .quiet { margin-top: 10px; }
.unlock-card { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin-top: 8px; }
.unlock-card p { margin: 0; color: rgba(255, 255, 255, 0.82); font: 500 14px/1.4 system-ui, sans-serif; }
.unlock-card .who { color: var(--dim); font-size: 12px; overflow-wrap: anywhere; }
.unlock-card .primary { margin-top: 4px; padding: 12px 24px; font-size: 14px; letter-spacing: 0.15em; }
.chapter-left .dots button.locked:not(:disabled) { cursor: pointer; border-color: rgba(255, 255, 255, 0.3); color: rgba(255, 255, 255, 0.55); }
.unlock-card .price, #account-body .price { color: var(--dim); font-size: 13px; margin: 0; }
