:root {
  --bg-deep: #0b111a;
  --bg-card: #121a26;
  --bg-player: #151e2c;
  --border-subtle: rgba(212, 175, 55, 0.22);
  --border-faint: rgba(255, 255, 255, 0.08);
  --gold: #d4af37;
  --gold-bright: #f0cc5b;
  --gold-dim: rgba(


212, 175, 55, 0.14);
  --text-main: #e6ebf2;
  --text-muted: #9aa7b8;
  --text-stage: #b4c0d0;
}

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

body {
  background-color: var(--bg-deep);
  color: var(--text-main);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.hidden {
  display: none !important;
}

/* PASSWORD GATE */
.gate-overlay {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at center, #141e2e 0%, #080c14 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 9999;
}

.gate-card {
  width: 100%;
  max-width: 440px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 40px 32px;
  text-align: center;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.65);
}

.gate-eyebrow {
  font-size: 11px;
  letter-spacing: 2.2px;
  color: var(--gold);
  margin-bottom: 10px;
  font-weight: 600;
}

.gate-title {
  font-family: 'Cinzel', serif;
  font-size: 28px;
  color: var(--gold-bright);
  letter-spacing: 1.5px;
  margin-bottom: 6px;
}

.gate-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 26px;
}

.gate-form {
  display: flex;
  gap: 10px;
}

.gate-input {
  flex: 1;
  background: #0b111a;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 6px;
  padding: 12px 14px;
  color: #fff;
  font-size: 14px;
  outline: none;
}

.gate-input:focus {
  border-color: var(--gold);
}

.gate-btn {
  background: var(--gold);
  color: #0b111a;
  border: none;
  border-radius: 6px;
  padding: 0 20px;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 1px;
  cursor: pointer;
  transition: background 0.2s;
}

.gate-btn:hover {
  background: var(--gold-bright);
}

.gate-error {
  color: #ff6b6b;
  font-size: 12px;
  margin-top: 12px;
  min-height: 18px;
}

/* HEADER & NAV */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 17, 26, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-faint);
}

.header-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 18px 24px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.site-title {
  font-family: 'Cinzel', serif;
  font-size: 22px;
  color: var(--gold-bright);
  letter-spacing: 1.6px;
}

.site-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.pdf-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border: 1px solid var(--gold);
  background: var(--gold-dim);
  color: var(--gold-bright);
  text-decoration: none;
  font-size: 12.5px;
  font-weight: 500;
  border-radius: 6px;
  transition: all 0.2s;
}

.pdf-btn:hover {
  background: var(--gold);
  color: #0b111a;
}

.scene-nav {
  max-width: 960px;
  margin: 0 auto;
  padding: 10px 24px 12px;
  border-top: 1px solid var(--border-faint);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12px;
}

.nav-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.act-label {
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.8px;
  margin-right: 2px;
}

.scene-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.scene-pill {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-size: 12px;
  padding: 3px 7px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s;
}

.scene-pill:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.scene-pill.active {
  color: var(--gold-bright);
  border-color: var(--gold);
  background: var(--gold-dim);
  font-weight: 600;
}

.scene-pill.upcoming {
  opacity: 0.42;
}

.nav-divider {
  color: rgba(255, 255, 255, 0.18);
}

/* MAIN SCRIPT READER */
.reader-container {
  max-width: 780px;
  margin: 0 auto;
  padding: 38px 24px 64px;
}

.scene-heading {
  font-family: 'Cinzel', serif;
  font-size: 24px;
  color: #ffffff;
  text-align: center;
  letter-spacing: 1.5px;
  margin-bottom: 10px;
}

.scene-location {
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1.4px;
  color: var(--gold);
  text-transform: uppercase;
  margin: 26px 0 18px;
}

.stage-direction {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-style: italic;
  font-size: 18.5px;
  line-height: 1.55;
  color: var(--text-stage);
  max-width: 680px;
  margin: 14px auto;
  text-align: center;
}

.dialogue-block {
  max-width: 620px;
  margin: 18px auto;
  text-align: center;
}

.character-name {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--gold-bright);
  text-transform: uppercase;
  margin-bottom: 3px;
}

.parenthetical {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-style: italic;
  font-size: 16.5px;
  color: var(--text-muted);
  margin-bottom: 3px;
}

.dialogue-line {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 19.5px;
  line-height: 1.52;
  color: var(--text-main);
}

/* STAGE DESIGN CONCEPT CARD */
.concept-figure {
  margin: 28px auto;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.45);
}

.concept-img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #090e16;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-in;
}

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

.concept-placeholder {
  padding: 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}

.concept-placeholder strong {
  display: block;
  color: var(--gold);
  margin-bottom: 4px;
  letter-spacing: 0.6px;
}

.concept-caption {
  padding: 10px 16px;
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  border-top: 1px solid var(--border-faint);
  background: rgba(9, 14, 22, 0.7);
}

/* INLINE AUDIO PLAYER + SYNCED LYRICS */
.song-card {
  margin: 32px auto;
  background: var(--bg-player);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 20px 22px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
}

.song-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.song-title {
  font-family: 'Cinzel', serif;
  font-size: 15px;
  color: var(--gold-bright);
  letter-spacing: 1px;
}

.song-cast {
  font-size: 12px;
  color: var(--text-muted);
}

.player-controls {
  display: flex;
  align-items: center;
  gap: 14px;
}

.play-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--gold);
  background: var(--gold-dim);
  color: var(--gold-bright);
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s;
}

.play-btn:hover {
  background: var(--gold);
  color: #0b111a;
}

.waveform-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 99px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--gold), var(--gold-bright));
  border-radius: 99px;
  transition: width 0.1s linear;
}

.time-row {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.lyrics-box {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border-faint);
  text-align: center;
}

.lyrics-label {
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 10px;
}

.lyrics-scroll {
  max-height: 150px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 4px 8px;
}

.lyric-line {
  font-size: 13.5px;
  color: var(--text-muted);
  transition: all 0.2s;
}

.lyric-line.active {
  color: var(--gold-bright);
  font-weight: 600;
  font-size: 14.5px;
}

/* PAGER & FOOTER */
.scene-pager {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-top: 44px;
  padding-top: 24px;
  border-top: 1px solid var(--border-faint);
}

.pager-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 10px 18px;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}

.pager-btn:hover:not(:disabled) {
  border-color: var(--gold);
  color: var(--gold-bright);
}

.pager-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.site-footer {
  text-align: center;
  padding: 22px;
  font-size: 11.5px;
  color: var(--text-muted);
  border-top: 1px solid var(--border-faint);
}

/* LIGHTBOX */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(5, 8, 14, 0.94);
  z-index: 9998;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.lightbox img {
  max-width: 92vw;
  max-height: 80vh;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
}

.lightbox-caption {
  margin-top: 12px;
  color: var(--text-muted);
  font-size: 13px;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
}