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

:root {
  --bg: #060606;
  --name: rgba(255, 255, 255, 0.9);
  --role: rgba(255, 255, 255, 0.38);
  --section: rgba(255, 255, 255, 0.18);
  --line: rgba(255, 255, 255, 0.09);
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--name);
}

/* ── Vignette ─────────────────────────────────────────────────── */
#vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 20;
  background: radial-gradient(
    ellipse 75% 75% at 50% 50%,
    transparent 25%,
    rgba(0, 0, 0, 0.72) 100%
  );
}

/* ── Control Panel ────────────────────────────────────────────── */
#panel {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  display: flex;
  align-items: stretch;
  background: rgba(8, 8, 8, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 3px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  overflow: hidden;
  transition:
    opacity 0.35s ease,
    transform 0.35s ease;
  user-select: none;
}

#panel.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(8px);
}

/* Vertical separator between groups */
.p-sep {
  width: 1px;
  background: rgba(255, 255, 255, 0.07);
  flex-shrink: 0;
}

/* Button base */
.p-btn {
  font-family: "Raleway", sans-serif;
  font-weight: 300;
  font-size: 9.5px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.28);
  background: transparent;
  border: none;
  padding: 0 18px;
  height: 38px;
  cursor: pointer;
  transition:
    color 0.2s,
    background 0.2s;
  outline: none;
  white-space: nowrap;
}
.p-btn:hover {
  color: rgba(255, 255, 255, 0.65);
  background: rgba(255, 255, 255, 0.04);
}
.p-btn.active {
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.06);
}

/* Pause button gets a slightly wider feel */
#btn-pause {
  padding: 0 22px;
}
#btn-pause.playing {
  color: rgba(255, 255, 255, 0.55);
}

/* H-hint label at the far right */
#panel-hint {
  font-family: "Raleway", sans-serif;
  font-weight: 200;
  font-size: 8px;
  letter-spacing: 2px;
  color: rgba(255, 255, 255, 0.12);
  padding: 0 12px 0 10px;
  display: flex;
  align-items: center;
  pointer-events: none;
}

/* ── Watermark ────────────────────────────────────────────────── */
#watermark {
  position: fixed;
  bottom: 76px;
  left: 0;
  right: 0;
  text-align: center;
  pointer-events: none;
  z-index: 5;
  font-family: "Raleway", sans-serif;
  font-weight: 200;
  font-size: 8px;
  letter-spacing: 7px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.06);
}

/* ══════════════════════════════════════════════════════════════
SCROLL MODE
══════════════════════════════════════════════════════════════ */
#scroll-stage {
  position: fixed;
  inset: 0;
  overflow: hidden;
}

#scroll-track {
  position: absolute;
  left: 0;
  right: 0;
  text-align: center;
}

.cr-block {
  padding: 20px 60px;
  width: 100%;
}

.cr-role {
  font-family: "Raleway", sans-serif;
  font-weight: 300;
  font-size: 10px;
  letter-spacing: 4.5px;
  text-transform: uppercase;
  color: var(--role);
  margin-bottom: 11px;
}

.cr-name {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 300;
  font-size: 22px;
  letter-spacing: 4px;
  color: var(--name);
}

.cr-name-row {
  display: flex;
  justify-content: center;
  gap: 72px;
}
.cr-name-row .cr-name {
  font-size: 18px;
}

.cr-divider {
  padding: 46px 40px 18px;
  text-align: center;
}
.cr-divider-pip {
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, transparent, var(--line), transparent);
  margin: 0 auto 14px;
}
.cr-divider-label {
  font-family: "Raleway", sans-serif;
  font-weight: 200;
  font-size: 8.5px;
  letter-spacing: 6px;
  text-transform: uppercase;
  color: var(--section);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 8px 28px;
  display: inline-block;
}

/* ══════════════════════════════════════════════════════════════
SCENE MODE
══════════════════════════════════════════════════════════════ */
#scene-stage {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
}

.sc-card {
  position: absolute;
  text-align: center;
  padding: 48px 80px;
  min-width: 360px;
  opacity: 0;
  transition: opacity 1.3s cubic-bezier(0.25, 0, 0.75, 1);
}
.sc-card.visible {
  opacity: 1;
}

.sc-role {
  font-family: "Raleway", sans-serif;
  font-weight: 200;
  font-size: 10px;
  letter-spacing: 5px;
  text-transform: uppercase;
  color: var(--role);
  margin-bottom: 22px;
}

.sc-names {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 300;
  font-size: 33px;
  letter-spacing: 5px;
  color: var(--name);
  line-height: 1.65;
  white-space: pre;
}
.sc-names.multi {
  font-size: 24px;
}

.sc-accent {
  width: 20px;
  height: 1px;
  background: rgba(255, 255, 255, 0.14);
  margin: 20px auto 0;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  z-index: 1001;
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-family: "Raleway", sans-serif;
  font-size: 0.8rem;
  text-decoration: none;
}
.skip-link:focus {
  top: 0;
}

:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.7);
  outline-offset: 2px;
}

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

@media (max-width: 640px) {
  #panel {
    max-width: calc(100vw - 16px);
    overflow-x: auto;
    overflow-y: hidden;
  }
  .p-btn {
    font-size: 8px;
    letter-spacing: 1.5px;
    padding: 0 10px;
  }
  #btn-pause {
    padding: 0 12px;
  }
  #panel-hint {
    display: none;
  }

  .cr-block {
    padding: 20px 24px;
  }
  .cr-role {
    letter-spacing: 3px;
  }
  .cr-name {
    letter-spacing: 2px;
  }
  .cr-name-row {
    gap: 24px;
    flex-wrap: wrap;
  }

  .sc-card {
    min-width: 0;
    width: 90vw;
    padding: 32px 24px;
  }
  .sc-role {
    letter-spacing: 3px;
  }
  .sc-names {
    font-size: 26px;
    letter-spacing: 3px;
    white-space: normal;
  }
  .sc-names.multi {
    font-size: 20px;
  }
}
