/* ===========================================================================
   MOON MISSION: THE GIANT IMPACT — interface styling
   Deep-space glass panels, cyan / orange scientific accents, large readable
   type for a classroom projector, and a clutter-free presentation mode.
   =========================================================================== */

:root {
  --bg: #03060d;
  --ink: #e9f3ff;
  --muted: #8fa6bd;
  --dim: #5f7d99;
  --cyan: #5fe4ff;
  --orange: #ffab63;
  --violet: #b79cff;
  --line: rgba(120, 200, 255, 0.16);
  --glass: rgba(7, 14, 26, 0.74);
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

button { font-family: inherit; }

#ui { position: fixed; inset: 0; }

#scene {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
}

/* subtle vignette so HUD text stays readable over bright scenes */
#ui::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  background: radial-gradient(120% 90% at 50% 45%, transparent 45%, rgba(2, 5, 11, 0.55) 100%);
}

/* ---------------------------------------------------------------- top bar */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 26px 30px;
  background: linear-gradient(to bottom, rgba(3, 6, 13, 0.92), rgba(3, 6, 13, 0));
  pointer-events: none;
}
.topbar > * { pointer-events: auto; }

.brand { display: flex; align-items: center; gap: 12px; }

.brand-mark {
  width: 26px; height: 26px;
  border-radius: 50%;
  flex: none;
  background: radial-gradient(circle at 32% 30%, #9fe9ff 0%, #2f86c9 42%, #0b2540 70%, #050d18 100%);
  box-shadow: 0 0 18px rgba(95, 228, 255, 0.35), inset -3px -4px 8px rgba(0, 0, 0, 0.7);
}

.brand h1 {
  margin: 0;
  font-size: 12.5px;
  letter-spacing: 0.22em;
  font-weight: 800;
  white-space: nowrap;
}
.brand h1 .thin { color: var(--muted); font-weight: 500; }

.brand-sub {
  margin: 4px 0 0;
  font-size: 9.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dim);
  white-space: nowrap;
}

.top-actions { display: flex; align-items: center; gap: 8px; }

.era-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(95, 228, 255, 0.22);
  background: rgba(8, 26, 44, 0.6);
  color: var(--cyan);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  white-space: nowrap;
}
.pulse {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 10px var(--cyan);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }

/* --------------------------------------------------------------- buttons */
.ghost {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 8px 13px;
  border-radius: 10px;
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s, color 0.18s;
}
.ghost:hover { background: rgba(95, 228, 255, 0.1); border-color: rgba(95, 228, 255, 0.45); }
.ghost.on { background: rgba(95, 228, 255, 0.16); border-color: rgba(95, 228, 255, 0.6); color: #fff; }
.ghost.accent { color: var(--cyan); border-color: rgba(95, 228, 255, 0.38); }
.ghost.icon { width: 34px; height: 34px; padding: 0; display: grid; place-items: center; font-size: 13px; }

/* ------------------------------------------------------------ stage rail */
.stagerail {
  position: fixed;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.rail-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: none;
  border: 0;
  color: var(--dim);
  padding: 7px 8px;
  border-radius: 9px;
  cursor: pointer;
  text-align: left;
  transition: color 0.2s;
}
.rail-item:hover { color: var(--muted); }

.rail-n {
  width: 24px; height: 24px;
  flex: none;
  border-radius: 50%;
  border: 1px solid rgba(120, 200, 255, 0.22);
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.04em;
  transition: 0.25s;
}

.rail-label {
  font-size: 9.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  max-width: 0;
  overflow: hidden;
  white-space: nowrap;
  opacity: 0;
  transition: max-width 0.35s, opacity 0.3s;
}
.rail-item:hover .rail-label { max-width: 130px; opacity: 1; }

.rail-item.on { color: var(--cyan); }
.rail-item.on .rail-n {
  border-color: var(--cyan);
  background: rgba(95, 228, 255, 0.14);
  box-shadow: 0 0 18px rgba(95, 228, 255, 0.28);
  color: #fff;
}
.rail-item.done .rail-n { border-color: rgba(95, 228, 255, 0.45); color: rgba(95, 228, 255, 0.8); }

/* ------------------------------------------------------- explanation panel */
.panel {
  position: fixed;
  right: 24px;
  top: 96px;
  width: 344px;
  max-height: calc(100vh - 208px);
  overflow-y: auto;
  padding: 20px 20px 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: linear-gradient(160deg, rgba(10, 20, 36, 0.9), rgba(5, 11, 21, 0.74));
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  z-index: 20;
}
.panel::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 16px;
  pointer-events: none;
  background: linear-gradient(120deg, rgba(95, 228, 255, 0.09), transparent 45%);
}
.panel::-webkit-scrollbar { width: 6px; }
.panel::-webkit-scrollbar-thumb { background: rgba(95, 228, 255, 0.2); border-radius: 3px; }

.panel-top { display: flex; gap: 12px; align-items: flex-start; }
.panel-n {
  font-family: var(--mono);
  font-size: 26px;
  line-height: 1;
  color: var(--cyan);
  opacity: 0.5;
  letter-spacing: -0.03em;
}
.panel-heading h2 {
  margin: 0 0 3px;
  font-size: 16.5px;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.2;
}
.panel-heading p {
  margin: 0;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1.4;
}

.panel-body {
  margin: 14px 0 12px;
  font-size: 12.3px;
  line-height: 1.62;
  color: #c3d5e6;
}

.facts {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
  border-top: 1px solid rgba(120, 200, 255, 0.11);
}
.facts li {
  position: relative;
  padding: 7px 0 7px 15px;
  font-size: 10.8px;
  line-height: 1.4;
  color: var(--muted);
  border-bottom: 1px solid rgba(120, 200, 255, 0.07);
}
.facts li::before {
  content: "▸";
  position: absolute;
  left: 0;
  top: 7px;
  color: var(--cyan);
  opacity: 0.75;
}

.final {
  display: none;
  margin: 0 0 12px;
  padding: 11px 13px;
  border-left: 2px solid var(--orange);
  border-radius: 0 8px 8px 0;
  background: rgba(255, 171, 99, 0.08);
  color: #ffd9b3;
  font-size: 11.8px;
  line-height: 1.5;
  font-style: italic;
}
.final.on { display: block; }

.panel-foot {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding-top: 9px;
  border-top: 1px solid rgba(120, 200, 255, 0.11);
  font-size: 8.6px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dim);
}

/* -------------------------------------------------------- size comparison */
.sizecard {
  position: fixed;
  left: 24px;
  bottom: 132px;
  width: 224px;
  padding: 13px 15px 11px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(7, 14, 26, 0.9);
  z-index: 20;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.6s, transform 0.6s;
  pointer-events: none;
}
.sizecard.is-visible { opacity: 1; transform: none; }

.sizecard-head {
  font-size: 8.6px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 10px;
}

.size-row { display: flex; align-items: flex-end; gap: 12px; }
.size-item { display: flex; flex-direction: column; align-items: center; gap: 6px; }

.size-body { border-radius: 50%; }
.size-body.earth {
  width: 66px; height: 66px;
  background: radial-gradient(circle at 32% 28%, #ffcf9a, #c4592b 48%, #4a1a10 92%);
  box-shadow: inset -7px -9px 14px rgba(0, 0, 0, 0.55), 0 0 18px rgba(255, 120, 60, 0.25);
}
.size-body.theia {
  width: 35px; height: 35px;
  background: radial-gradient(circle at 32% 28%, #e0a074, #96502f 55%, #3a1c13 95%);
  box-shadow: inset -4px -5px 9px rgba(0, 0, 0, 0.6), 0 0 14px rgba(200, 100, 60, 0.2);
}
.size-body.mars {
  width: 35px; height: 35px;
  background: radial-gradient(circle at 32% 28%, #d98b62, #8d452c 58%, #33170f 95%);
  box-shadow: inset -4px -5px 9px rgba(0, 0, 0, 0.65);
}
.size-item span {
  font-size: 8px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.size-note {
  margin: 10px 0 0;
  font-size: 9.5px;
  line-height: 1.45;
  color: var(--dim);
}

.scale-note {
  position: fixed;
  left: 50%;
  bottom: 86px;
  transform: translateX(-50%);
  margin: 0;
  font-size: 8.6px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(120, 150, 180, 0.6);
  z-index: 19;
  pointer-events: none;
  white-space: nowrap;
}

/* ------------------------------------------------------------- controls */
.controls {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  width: min(1180px, calc(100% - 44px));
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
}

.ctl {
  height: 38px;
  min-width: 38px;
  padding: 0 11px;
  border-radius: 10px;
  border: 1px solid rgba(120, 200, 255, 0.18);
  background: rgba(255, 255, 255, 0.03);
  color: var(--ink);
  font-size: 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  transition: background 0.18s, border-color 0.18s;
}
.ctl:hover { background: rgba(95, 228, 255, 0.12); border-color: rgba(95, 228, 255, 0.45); }

.ctl.play {
  border: 0;
  padding: 0 16px;
  background: linear-gradient(135deg, #6fe9ff, #3f9dff);
  color: #04121c;
  font-weight: 800;
  font-size: 10.5px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  box-shadow: 0 6px 22px rgba(95, 228, 255, 0.3);
  min-width: 96px;
}
.ctl.play:hover { filter: brightness(1.08); }

.speeds {
  display: flex;
  height: 38px;
  border: 1px solid rgba(120, 200, 255, 0.18);
  border-radius: 10px;
  overflow: hidden;
  flex: none;
}
.speeds button {
  background: none;
  border: 0;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 10px;
  padding: 0 9px;
  cursor: pointer;
  transition: 0.18s;
}
.speeds button:hover { color: var(--ink); }
.speeds button.on { background: rgba(95, 228, 255, 0.16); color: var(--cyan); }

.timeline {
  flex: 1;
  min-width: 110px;
  height: 38px;
  display: flex;
  align-items: center;
  cursor: pointer;
}
.tl-track {
  position: relative;
  width: 100%;
  height: 5px;
  border-radius: 3px;
  background: rgba(120, 200, 255, 0.13);
}
.tl-fill {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 0;
  border-radius: 3px;
  background: linear-gradient(90deg, #2b8fd0, #5fe4ff);
  box-shadow: 0 0 12px rgba(95, 228, 255, 0.55);
}
.tl-segs { position: absolute; inset: 0; display: flex; }
.tl-segs span { flex: 1; border-right: 1px solid rgba(3, 6, 13, 0.55); }
.tl-segs span:last-child { border-right: 0; }
.tl-head {
  position: absolute;
  top: 50%;
  left: 0;
  width: 11px; height: 11px;
  border-radius: 50%;
  background: #fff;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 12px rgba(95, 228, 255, 0.9), 0 0 0 3px rgba(95, 228, 255, 0.22);
  pointer-events: none;
}

.tc {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
  display: flex;
  gap: 3px;
  flex: none;
  letter-spacing: 0.03em;
}
.tc-sep { opacity: 0.4; }

.toggles { display: flex; gap: 6px; flex: none; }
.toggles .ghost { height: 38px; padding: 0 11px; font-size: 9px; }

/* ---------------------------------------------------------------- labels */
.labels {
  position: fixed;
  inset: 0;
  z-index: 6;
  pointer-events: none;
  overflow: hidden;
}

.tag {
  position: absolute;
  left: 0; top: 0;
  display: flex;
  gap: 8px;
  align-items: flex-start;
  padding: 8px 11px 8px 9px;
  border-radius: 10px;
  border: 1px solid rgba(95, 228, 255, 0.35);
  background: rgba(5, 14, 26, 0.88);
  /* No backdrop-filter here: these elements move every frame, and re-blurring
     the animating canvas underneath them is very expensive to composite. */
  color: var(--ink);
  cursor: pointer;
  pointer-events: auto;
  text-align: left;
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.45);
  transition: opacity 0.4s, background 0.2s, box-shadow 0.2s;
  will-change: transform;
}
.tag:hover {
  background: rgba(10, 26, 44, 0.94);
  box-shadow: 0 0 0 1px rgba(95, 228, 255, 0.4), 0 12px 34px rgba(0, 0, 0, 0.55);
}
.tag.is-hidden { opacity: 0; pointer-events: none; }

.tag-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  margin-top: 5px;
  flex: none;
  background: var(--cyan);
  box-shadow: 0 0 9px var(--cyan);
}
.tag--orange { border-color: rgba(255, 171, 99, 0.45); }
.tag--orange .tag-dot { background: var(--orange); box-shadow: 0 0 9px var(--orange); }
.tag--violet { border-color: rgba(183, 156, 255, 0.45); }
.tag--violet .tag-dot { background: var(--violet); box-shadow: 0 0 9px var(--violet); }

.tag-text { display: flex; flex-direction: column; gap: 2px; }
.tag-title {
  font-size: 9.8px;
  font-weight: 800;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  line-height: 1.3;
  white-space: nowrap;
}
.tag-sub {
  font-size: 8.8px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
.tag--wide .tag-title {
  white-space: normal;
  max-width: 250px;
  font-size: 11.5px;
  letter-spacing: 0.02em;
  text-transform: none;
  font-weight: 600;
  line-height: 1.35;
}
.tag--wide .tag-sub { text-transform: none; letter-spacing: 0.03em; }

/* ------------------------------------------------------------ presentation */
.present-ui { display: none; position: fixed; inset: 0; z-index: 25; pointer-events: none; }
body.present .present-ui { display: block; }
body.present .topbar,
body.present .panel,
body.present .stagerail,
body.present .controls,
body.present .sizecard,
body.present .scale-note { display: none; }

body.present .tag { padding: 10px 14px; background: rgba(4, 12, 22, 0.86); }
body.present .tag-title { font-size: 12px; }
body.present .tag-sub { font-size: 10px; }
body.present .tag--wide .tag-title { font-size: 14px; max-width: 360px; }

.present-top {
  position: fixed;
  top: 24px; left: 30px; right: 30px;
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.2em;
  color: rgba(200, 225, 245, 0.7);
  text-transform: uppercase;
}

.present-caption {
  position: fixed;
  left: 50%;
  bottom: 98px;
  transform: translateX(-50%);
  width: min(1000px, calc(100% - 80px));
  padding: 24px 32px 22px;
  border-radius: 18px;
  border: 1px solid rgba(120, 200, 255, 0.2);
  background: linear-gradient(160deg, rgba(6, 14, 26, 0.9), rgba(4, 9, 18, 0.82));
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.6);
  text-align: center;
}
.pc-kicker {
  margin: 0 0 8px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--cyan);
}
.present-caption h2 {
  margin: 0 0 8px;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.15;
}
.present-caption p {
  margin: 0;
  font-size: 15.5px;
  line-height: 1.5;
  color: #c8dcee;
}
.pc-final {
  margin-top: 10px !important;
  font-style: italic;
  color: var(--orange) !important;
  font-size: 14px !important;
}
.pc-bar {
  margin-top: 16px;
  height: 2px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}
.pc-bar span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #2b8fd0, var(--cyan));
  box-shadow: 0 0 10px var(--cyan);
}

.present-controls {
  position: fixed;
  right: 30px;
  bottom: 30px;
  display: flex;
  gap: 8px;
  pointer-events: auto;
}
.present-controls button {
  height: 40px;
  min-width: 40px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid rgba(120, 200, 255, 0.22);
  background: rgba(6, 14, 26, 0.8);
  backdrop-filter: blur(10px);
  color: var(--ink);
  font-size: 12px;
  cursor: pointer;
}
.present-controls button:hover { background: rgba(95, 228, 255, 0.14); }

/* ------------------------------------------------------------------ sheet */
.sheet { position: fixed; inset: 0; z-index: 60; display: none; }
.sheet.open { display: block; }
.sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 5, 11, 0.74);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
}
.sheet-card {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: min(820px, calc(100% - 40px));
  max-height: 86vh;
  display: flex;
  flex-direction: column;
  border-radius: 18px;
  border: 1px solid rgba(120, 200, 255, 0.2);
  background: linear-gradient(160deg, #081222, #050b15);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.72);
  overflow: hidden;
}
.sheet-close {
  position: absolute;
  right: 14px; top: 12px;
  z-index: 3;
  width: 30px; height: 30px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(8, 18, 32, 0.9);
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
}
.sheet-close:hover { color: #fff; border-color: rgba(95, 228, 255, 0.4); }

.sheet-tabs {
  display: flex;
  gap: 4px;
  padding: 14px 18px 0;
  border-bottom: 1px solid rgba(120, 200, 255, 0.12);
  flex: none;
}
.sheet-tabs button {
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--dim);
  font-size: 10.5px;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  padding: 8px 10px 11px;
  cursor: pointer;
}
.sheet-tabs button:hover { color: var(--muted); }
.sheet-tabs button.on { color: var(--cyan); border-bottom-color: var(--cyan); }

.sheet-scroll { padding: 24px 34px 34px; overflow-y: auto; }
.sheet-scroll::-webkit-scrollbar { width: 8px; }
.sheet-scroll::-webkit-scrollbar-thumb { background: rgba(95, 228, 255, 0.22); border-radius: 4px; }

.kicker {
  margin: 0 0 6px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--cyan);
}
.sheet-scroll h2 {
  margin: 0 0 18px;
  font-size: 26px;
  letter-spacing: -0.01em;
  line-height: 1.15;
}
.sheet-body p {
  margin: 0 0 13px;
  font-size: 13.5px;
  line-height: 1.68;
  color: #c3d5e6;
}
.sheet-body p b { color: #eaf4ff; }
.sheet-lead { color: var(--muted) !important; font-size: 12.5px !important; }
.sheet-body h3 {
  margin: 26px 0 10px;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cyan);
}
.sheet-body ul { margin: 0 0 16px; padding-left: 18px; }
.sheet-body li {
  margin-bottom: 9px;
  font-size: 13px;
  line-height: 1.6;
  color: #c3d5e6;
}
.note-small { font-size: 11px !important; color: var(--dim) !important; line-height: 1.6 !important; }

.keyfact {
  margin-top: 18px !important;
  padding: 12px 15px;
  border-left: 2px solid var(--orange);
  border-radius: 0 8px 8px 0;
  background: rgba(255, 171, 99, 0.08);
  color: #ffd9b3 !important;
  font-size: 12.5px !important;
}
.keyfact span {
  display: block;
  margin-bottom: 4px;
  font-size: 8.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--orange);
}

/* presenter script sections */
.sc { margin: 0 0 22px; padding-bottom: 18px; border-bottom: 1px solid rgba(120, 200, 255, 0.09); }
.sc:last-child { border-bottom: 0; }
.sc-h { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.sc-h h3 { margin: 0 !important; font-size: 13px !important; letter-spacing: 0 !important; text-transform: none !important; color: #eaf4ff !important; }
.sc-t {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--cyan);
  border: 1px solid rgba(95, 228, 255, 0.3);
  border-radius: 5px;
  padding: 2px 6px;
}
.sc-d { margin-left: auto; font-family: var(--mono); font-size: 9.5px; color: var(--dim); }
.sc p { margin: 0 0 9px; font-size: 13px; line-height: 1.66; color: #c3d5e6; }
.sc .cue {
  font-size: 10.5px !important;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--dim) !important;
  border-left: 2px solid rgba(95, 228, 255, 0.3);
  padding-left: 10px;
}

/* ------------------------------------------------------------------ intro */
.intro {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  background:
    radial-gradient(ellipse 70% 55% at 50% 42%, rgba(24, 52, 92, 0.55), transparent 70%),
    radial-gradient(ellipse 40% 30% at 78% 78%, rgba(88, 40, 24, 0.4), transparent 70%),
    #03060d;
  transition: opacity 0.8s ease, visibility 0.8s;
  text-align: center;
}
.intro.hide { opacity: 0; visibility: hidden; pointer-events: none; }
.intro-inner { max-width: 780px; padding: 34px; }

.intro-kicker {
  margin: 0;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--cyan);
}
.intro h1 {
  margin: 18px 0 0;
  font-size: clamp(34px, 6.4vw, 64px);
  font-weight: 800;
  letter-spacing: 0.05em;
  line-height: 1;
}
.intro h1 span {
  display: block;
  margin-top: 14px;
  font-size: 0.36em;
  letter-spacing: 0.42em;
  font-weight: 600;
  background: linear-gradient(90deg, #5fe4ff, #b8e6ff 60%, #ffab63);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.intro-sub {
  margin: 24px auto 0;
  max-width: 520px;
  font-size: 14.5px;
  line-height: 1.65;
  color: #a9c0d5;
}
.intro-grid {
  display: flex;
  justify-content: center;
  gap: 38px;
  margin: 30px 0 28px;
}
.intro-grid div { display: flex; flex-direction: column; gap: 4px; }
.intro-grid b { font-size: 22px; font-weight: 700; letter-spacing: 0.02em; color: #eaf4ff; }
.intro-grid span {
  font-size: 8.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--dim);
}
.intro-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

.primary {
  border: 0;
  padding: 14px 26px;
  border-radius: 12px;
  background: linear-gradient(135deg, #6fe9ff, #3f9dff);
  color: #04121c;
  font-weight: 800;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 12px 34px rgba(95, 228, 255, 0.3);
  transition: transform 0.18s, filter 0.18s;
}
.primary:hover { filter: brightness(1.08); transform: translateY(-1px); }

.intro-hint {
  margin: 26px 0 0;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  color: rgba(120, 150, 180, 0.65);
}

/* ------------------------------------------------------------------- boot */
.boot {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  background: #03060d;
  text-align: center;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  transition: opacity 0.4s;
}
.boot.hide { display: none; }
.boot p { margin: 0 0 8px; }
.boot-ring {
  width: 44px; height: 44px;
  margin: 0 auto 18px;
  border-radius: 50%;
  border: 1px solid rgba(95, 228, 255, 0.18);
  border-top-color: var(--cyan);
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.boot-error { max-width: 560px; padding: 30px; text-align: left; text-transform: none; letter-spacing: 0; }
.boot-error h3 { color: var(--orange); font-size: 17px; margin: 0 0 10px; }
.boot-error p { font-size: 13px; line-height: 1.6; }

/* compact stage strip (narrow screens only) */
.compact-info {
  display: none;
  position: fixed;
  top: 56px;
  left: 10px;
  right: 10px;
  z-index: 20;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(7, 14, 26, 0.92);
}
.compact-info > span {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--cyan);
  opacity: 0.75;
  flex: none;
}
.compact-info div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.compact-info b {
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.compact-info div span {
  font-size: 8px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ------------------------------------------------------------- responsive */
@media (max-width: 700px) {
  .brand h1 .thin { display: none; }
  .era-chip, #btnFull { display: none; }
  .brand h1 { font-size: 10px; letter-spacing: 0.13em; }
}

@media (max-width: 1180px) {
  .panel { width: 300px; right: 16px; }
  .brand-sub { display: none; }
  .top-actions .ghost:not(.icon):not(.accent) { display: none; }
}

@media (max-width: 900px) {
  .stagerail, .panel, .sizecard, .scale-note { display: none; }
  .compact-info { display: flex; }
  .topbar { padding: 12px 16px 24px; }
  .brand h1 { font-size: 10.5px; letter-spacing: 0.16em; }
  .era-chip { font-size: 9px; padding: 6px 9px; }
  body.present .compact-info { display: none; }
  .controls { flex-wrap: wrap; gap: 7px; padding: 9px 10px; width: calc(100% - 24px); bottom: 10px; }
  .timeline { order: 10; flex-basis: 100%; height: 26px; }
  .tc { order: 11; }
  .speeds { height: 34px; }
  .ctl { height: 34px; min-width: 34px; }
  .ctl.play { min-width: 84px; font-size: 9.5px; }
  .toggles .ghost { height: 34px; }
  .present-caption { bottom: 74px; padding: 18px 20px; }
  .present-caption h2 { font-size: 21px; }
  .present-caption p { font-size: 13px; }
  .present-controls { right: 14px; bottom: 16px; }
  .tag-title { font-size: 9px; }
  .tag--wide .tag-title { font-size: 10.5px; max-width: 180px; }
}

@media (max-height: 700px) {
  .panel { max-height: calc(100vh - 180px); }
  .sizecard { bottom: 118px; }
}

@media (prefers-reduced-motion: reduce) {
  .pulse, .boot-ring { animation: none; }
}
