/* css/scenes/curtain.css · scene 7 `curtain`: one light stays on (SPEC 2.7) · prefix curtain-
   The ghost light stands in the stage root (curtain.js places it above the dock, bulb near 30 % / 34 %);
   the bill and the ways forward sit in the dock. Only opacity ever animates (from JS); the glow is static. */

/* ---- the ghost light ---- */
.curtain-lamp{position:absolute;left:0;top:0;width:var(--sp-8);height:auto;overflow:visible;opacity:0;pointer-events:none}
.curtain-glow,.curtain-bulb,.curtain-lit{opacity:0}
.curtain-s-core{stop-color:var(--c-wick);stop-opacity:1}
.curtain-s-wick{stop-color:var(--c-wick);stop-opacity:.92}
.curtain-s-edge{stop-color:var(--c-tungsten);stop-opacity:.78}
.curtain-s-hot{stop-color:var(--c-tungsten);stop-opacity:.62}
.curtain-s-warm{stop-color:var(--c-tungsten);stop-opacity:.16}
.curtain-s-off{stop-color:var(--c-tungsten);stop-opacity:0}
.curtain-filament{stroke:var(--c-wick)}
.curtain-wire{stroke:rgba(var(--rgb-wick), .55)}

/* ---- the bill: direction, the title, the playbill, the credit ---- */
.scene-ui--curtain .dock > .curtain-bill{display:flex;flex-direction:column;align-items:center;gap:var(--sp-3);width:100%;max-width:none}
.scene-ui--curtain .curtain-bill > *{max-width:var(--measure)}
/* the title wraps greedily, so on a phone it echoes the peak: "Happy birthday," over her name, whatever its length
   (balancing would leave "Happy" alone over "birthday, Al.") */
.scene-ui--curtain .curtain-bill > .curtain-title{max-width:100%;margin:var(--sp-2) 0 var(--sp-4);overflow-wrap:anywhere;text-wrap:wrap}
/* one long line tilted 3° drops about 20 px at its ends on wide screens: give it that much more air */
@media (min-width:760px){ .scene-ui--curtain .curtain-bill > .curtain-title{margin:var(--sp-4) 0 var(--sp-5)} }
/* a playbill that wraps breaks into even lines ("Opening night ·" over the date and time), never one stray word */
.scene-ui--curtain .curtain-bill > .curtain-playbill{text-wrap:balance}

.scene-ui--curtain .curtain-wait{visibility:hidden}   /* a line holds its place until its cue */

/* ---- the ways forward: the replay tape, the gaffers in one row (the reply only when set), the ghost ---- */
/* the gaps leave room for the 6 px focus ring around a tilted tape, so a ring never touches the tape next to it */
.scene-ui--curtain .curtain-acts{display:flex;flex-direction:column;align-items:center;gap:var(--sp-4);margin-top:var(--sp-2)}
.scene-ui--curtain .curtain-gaffers{gap:var(--sp-4) var(--sp-5)}
@media (min-width:760px){ .scene-ui--curtain .curtain-acts{gap:var(--sp-5)} }   /* wider tapes tilt further at their ends */

/* short portrait phones (360 × 640): the bill and the ways forward close up so the ghost light keeps its room */
@media (orientation:portrait) and (max-height:700px){
  .scene-ui--curtain .dock > .curtain-bill{gap:var(--sp-2)}
  .scene-ui--curtain .curtain-bill > .curtain-title{margin:var(--sp-1) 0 var(--sp-2)}
  .scene-ui--curtain .curtain-acts{gap:var(--sp-3);margin-top:0}
  .scene-ui--curtain .curtain-gaffers{row-gap:var(--sp-3)}
}

/* landscape phones: the lamp stands in the left 30 %; the bill and the ways forward share the rest, side by side */
@media (orientation:landscape) and (max-height:500px){
  .scene-ui--curtain{--curtain-lamp-share:25%;--curtain-acts-share:50%}
  .scene-ui--curtain .dock{left:var(--curtain-lamp-share);width:auto;flex-direction:row;align-items:center;gap:var(--sp-5)}
  .scene-ui--curtain .dock > .curtain-bill{flex:1 1 0;min-width:0}
  .scene-ui--curtain .curtain-acts{flex:0 0 var(--curtain-acts-share);min-width:0;margin-top:0}   /* its share is held before the controls arrive */
}

/* ---- the ticket box ---- */
.curtain-ticket-box{
  background:#FAF6EE;
  border:1px solid rgba(255,255,255,0.22);
  border-radius:14px;
  padding:12px;
  box-shadow:0 18px 36px rgba(0,0,0,0.5), 0 4px 12px rgba(0,0,0,0.25);
  width:100%;
  max-width:420px;
  margin:0 auto var(--sp-2);
  overflow:hidden;
}
.curtain-ticket{
  width:100%;
  height:auto;
  max-height:55vh;
  object-fit:contain;
  display:block;
  border-radius:8px;
}

.scene-ui--curtain .direction {
  font-family: 'Noto Serif Georgian', 'Georgia', serif;
  font-size: clamp(1.1rem, 2.4vw, 1.4rem);
  line-height: 1.6;
  color: #fff;
  text-shadow: 0 2px 14px rgba(0,0,0,0.85), 0 0 22px rgba(255,255,255,0.3);
  margin-top: var(--sp-3);
  margin-bottom: var(--sp-2);
  padding: 0 var(--sp-3);
  text-align: center;
  font-weight: 500;
  letter-spacing: 0.02em;
}

