:root {
  --bg: #150910;
  --bg2: #240f1a;
  --gold: #d4af37;
  --gold-dim: #8a743a;
  --ink: #f3e7d8;
  --dim: #b9a493;
  --card: #1e0e17;
  --border: #43223a;
  font-family: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
}

body {
  min-height: 100vh;
  background:
    radial-gradient(ellipse 70% 40% at 50% 0%, #3a1626 0%, transparent 70%),
    radial-gradient(ellipse 60% 30% at 50% 100%, #2a0f1c 0%, transparent 70%),
    var(--bg);
}

a { color: var(--gold); }
code {
  background: rgba(212, 175, 55, 0.12);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}

.house {
  max-width: 880px;
  margin: 0 auto;
  padding: 32px 20px 60px;
}

.marquee { text-align: center; margin-bottom: 28px; }
.eyebrow {
  letter-spacing: 0.3em;
  text-transform: uppercase;
  font-size: 11px;
  color: var(--gold-dim);
  margin: 0 0 8px;
}
h1 {
  font-size: clamp(28px, 5vw, 46px);
  line-height: 1.15;
  margin: 0 0 10px;
  color: var(--gold);
  text-shadow: 0 0 24px rgba(212, 175, 55, 0.35);
  letter-spacing: 0.02em;
}
.tagline { color: var(--dim); margin: 0 0 18px; font-size: 15px; }
.program-note {
  text-align: left;
  color: var(--dim);
  font-size: 13px;
  line-height: 1.6;
  max-width: 640px;
  margin: 0 auto;
  padding: 14px 18px;
  border: 1px dashed var(--border);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.15);
}

.stage-wrap { position: relative; }

.stage {
  position: relative;
  min-height: 420px;
  background: linear-gradient(180deg, #2a0f1c 0%, #170a12 70%, #0e050a 100%);
  border: 2px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  padding: 28px 24px 24px;
  box-shadow: 0 0 0 6px rgba(212, 175, 55, 0.08), inset 0 0 80px rgba(0, 0, 0, 0.55);
}

.curtain {
  position: absolute;
  top: -2px; bottom: -2px;
  width: 9%;
  background: repeating-linear-gradient(90deg, #5a1330 0 10px, #4a0f27 10px 20px);
  box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.6);
  z-index: 5;
  transition: transform 900ms ease;
  pointer-events: none;
}
.curtain-l { left: 0; border-radius: 14px 0 0 14px; transform-origin: left center; }
.curtain-r { right: 0; border-radius: 0 14px 14px 0; transform-origin: right center; }
.curtain.open.curtain-l { transform: translateX(-105%); }
.curtain.open.curtain-r { transform: translateX(105%); }

.spotlight {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 340px 260px at 50% 38%, rgba(255, 232, 170, 0.16), transparent 70%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 500ms ease;
}
.spotlight.on { opacity: 1; }

.cast-row {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
  min-height: 56px;
}
.cast-token {
  width: 42px; height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 15px;
  color: #100208;
  opacity: 0.35;
  transform: translateY(0) scale(1);
  transition: all 320ms cubic-bezier(.2,.9,.3,1.4);
  border: 2px solid rgba(255,255,255,0.15);
}
.cast-token.active {
  opacity: 1;
  transform: translateY(-10px) scale(1.28);
  box-shadow: 0 0 22px currentColor;
}
.cast-token.done { opacity: 0.6; }

.playbill {
  text-align: center;
  padding: 20px 10px 8px;
}
.playbill-title {
  color: var(--gold-dim);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-size: 11px;
  margin-bottom: 10px;
}
.playbill-list {
  list-style: none;
  padding: 0;
  margin: 0 0 22px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 6px 14px;
  max-width: 620px;
  margin-left: auto;
  margin-right: auto;
  text-align: left;
  font-size: 13px;
  color: var(--dim);
}
.playbill-list li { display: flex; align-items: center; gap: 8px; }
.playbill-swatch {
  width: 10px; height: 10px; border-radius: 50%; flex: none;
}

.begin-btn {
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  padding: 14px 28px;
  border-radius: 999px;
  border: 2px solid var(--gold);
  background: linear-gradient(180deg, rgba(212,175,55,0.22), rgba(212,175,55,0.08));
  color: var(--gold);
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease;
}
.begin-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(212,175,55,0.25); }
.begin-btn:active { transform: translateY(0); }

.record-toggle {
  display: block;
  margin: 16px auto 6px;
  font-size: 13px;
  color: var(--dim);
  cursor: pointer;
}
.record-toggle input { transform: translateY(2px); margin-right: 6px; }
.record-hint {
  max-width: 460px;
  margin: 6px auto 0;
  font-size: 11.5px;
  color: #8a7568;
  line-height: 1.5;
  display: none;
}
.record-hint.show { display: block; }

.performance { text-align: center; padding: 10px 6px 4px; }
.speaker-plate { margin-bottom: 6px; }
.speaker-name {
  font-weight: 800;
  font-size: 20px;
  color: var(--gold);
  margin-right: 8px;
}
.speaker-handle { font-size: 13px; color: var(--dim); text-decoration: none; }
.speaker-handle:hover { text-decoration: underline; }
.stage-direction {
  font-style: italic;
  color: var(--dim);
  font-size: 13px;
  margin: 4px 0 16px;
}
.quote {
  font-size: clamp(17px, 2.6vw, 22px);
  line-height: 1.55;
  max-width: 600px;
  margin: 0 auto 18px;
  min-height: 3em;
}
.quote .word { opacity: 0.55; transition: opacity 120ms ease, color 120ms ease; }
.quote .word.spoken { opacity: 1; color: var(--gold); }

.progress-rail {
  max-width: 420px;
  height: 4px;
  margin: 0 auto;
  background: rgba(255,255,255,0.08);
  border-radius: 4px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  width: 0%;
  background: var(--gold);
  transition: width 200ms linear;
}

.curtain-call { text-align: center; padding: 20px 6px; }
.curtain-call h2 {
  color: var(--gold);
  margin: 0 0 4px;
  font-size: 26px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.curtain-call p { color: var(--dim); margin: 0 0 18px; font-size: 13px; }
.bow-row {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}
.post-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.ghost-btn {
  font-family: inherit;
  font-size: 13.5px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1.5px solid var(--gold-dim);
  color: var(--ink);
  background: transparent;
  text-decoration: none;
  cursor: pointer;
}
.ghost-btn:hover { border-color: var(--gold); color: var(--gold); }

.controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 16px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(0,0,0,0.25);
  max-width: fit-content;
  margin-left: auto;
  margin-right: auto;
}
.controls button {
  font-family: inherit;
  font-size: 16px;
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.03);
  color: var(--ink);
  cursor: pointer;
}
.controls button:hover { border-color: var(--gold); color: var(--gold); }
.speed-control { font-size: 11px; color: var(--dim); display: flex; align-items: center; gap: 6px; }
.speed-control input { accent-color: var(--gold); }

.colophon {
  text-align: center;
  margin-top: 34px;
  font-size: 12px;
  color: #7a6a5f;
}
.colophon a { color: #a68f4e; text-decoration: none; }
.colophon a:hover { text-decoration: underline; }

@media (max-width: 480px) {
  .stage { padding: 20px 12px 18px; min-height: 380px; }
  .playbill-list { grid-template-columns: 1fr 1fr; }
}
