/* Phases of degeneration (src/body/degen-markup.mjs): placed only with CF_DEGEN=1. Its own stylesheet, loaded only
   by the page that places it. The stage is always dark, whatever the page's theme. */
.degen{margin:28px 0}
.dg-head h2{margin:0 0 4px}.dg-head p{margin:0 0 12px;opacity:.85}
.dg-stage{position:relative;aspect-ratio:1120/760;background:var(--stage,#08111a);border-radius:18px;overflow:hidden;display:none;color:#EDF1F3}
.dg-ok .dg-stage{display:block}
.dg-stage .stage-canvas{position:absolute;inset:0;width:100%;height:100%;opacity:0;transition:opacity .5s ease}
.dg-stage.live .stage-canvas{opacity:1}
.dg-stage .stage-label{color:#EDF1F3;background:rgba(8,17,26,.82);border-color:rgba(255,255,255,.22)}
.dg-stage .stage-labels .leader{background:rgba(237,241,243,.65)}
.dg-lens{position:absolute;right:14px;top:14px;width:min(25%,230px);z-index:3;text-align:center;pointer-events:none;display:none}
.degen.live .dg-lens{display:block}
.degen.comparing .dg-lens,.degen.comparing .dg-pins{display:none}
.dg-lens svg{display:block;width:100%;height:auto;filter:drop-shadow(0 6px 24px rgba(0,0,0,.6))}
.dg-lens p{margin:6px 0 0;font-size:13px;line-height:1.3;color:#EDF1F3;background:rgba(8,17,26,.8);border-radius:8px;padding:3px 8px}
.dg-lens .l-t{font-size:15px;font-weight:700;fill:#12202A;font-family:var(--display,sans-serif)}
.dg-cmp{position:absolute;z-index:2;font-family:var(--display,sans-serif);font-size:14px;font-weight:700;color:#EDF1F3;background:rgba(8,17,26,.82);border:1px solid rgba(255,255,255,.22);border-radius:999px;padding:4px 10px;display:none}
.degen.comparing .dg-cmp{display:block}
.dg-bar{display:none;align-items:center;gap:10px;margin:12px 0;flex-wrap:wrap}
.degen.live .dg-bar{display:flex}
.dg-phases{display:flex;gap:6px}
.dg-phase,.dg-compare{min-height:44px;padding:0 14px;border-radius:12px;border:1px solid rgba(127,127,127,.4);background:transparent;color:inherit;font-family:var(--display,sans-serif);font-size:15px;cursor:pointer}
.dg-phase[aria-pressed="true"],.dg-compare[aria-pressed="true"]{background:var(--nerve,#6BE6FF);color:#12202A;border-color:var(--nerve,#6BE6FF)}
.dg-range{flex:1;min-width:140px;min-height:44px}
.dg-steps{list-style:none;margin:0;padding:0}
.dg-step{margin:0 0 28px}
.dg-frame{margin:0}.dg-frame img{width:100%;height:auto;border-radius:18px;background:var(--stage,#08111a)}
.dg-text h3{margin:12px 0 4px}.dg-n{color:var(--nerve,#6BE6FF);margin-right:6px}
.degen.live .dg-step{display:none}.degen.live .dg-step.on{display:block}
.degen.live .dg-frame{display:none}
.dg-note{font-size:15px;opacity:.85}
@media (max-width:760px){.dg-stage{aspect-ratio:780/900}.dg-lens{width:30%;right:8px;top:8px}.dg-lens p{font-size:11px;padding:2px 6px}.dg-phase{padding:0 10px}}
@media print{.dg-stage,.dg-bar,.dg-lens{display:none!important}.degen .dg-step,.degen .dg-frame{display:block!important}}
.dg-cmp.a{left:14px;top:14px}.dg-cmp.b{right:14px;top:14px}
@media (max-width:760px){.dg-stage .stage-label{font-size:12px;padding:3px 8px}}

/* round 4: the same theatre as the film (src/film.css): a large stage on the left, the panel on the right, one screen
   high; full screen; on a phone a tall stage with the words and a compact row of controls under it */
.sec.film{padding:20px 0 8px;border-top:0}
.sec.film .wrap{max-width:1480px}
.degen{margin:0}
.dg-theatre{display:block}
.degen.live .dg-theatre{display:grid;grid-template-columns:minmax(0,1fr) minmax(300px,360px);gap:18px;align-items:start}
.dg-screen{min-width:0}
.degen.live .dg-stage{aspect-ratio:16/10;max-height:calc(100svh - 112px);border-radius:16px}
.dg-stage .stage-label,.dg-stage .stage-labels .leader,.dg-stage .stage-labels .ldot{transition:opacity .45s ease}
.dg-stage .dg-pins .fade{opacity:0}
.dg-panel{display:flex;flex-direction:column;gap:12px}
.degen.live .dg-panel{max-height:calc(100svh - 110px);overflow-y:auto;overflow-x:hidden}
.dg-panel>*{max-width:100%;min-width:0;box-sizing:border-box}
.dg-range{max-width:100%;box-sizing:border-box}
.degen.live .dg-bar{display:flex;flex-direction:column;align-items:stretch;gap:10px;margin:0}
.dg-phases{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}
.dg-phase{padding:0 6px}
.dg-range{width:100%;flex:none}
.dg-ctl{display:flex;flex-wrap:wrap;gap:8px}
.dg-names,.dg-fs{min-height:44px;padding:0 14px;border-radius:12px;border:1px solid rgba(127,127,127,.4);background:transparent;color:inherit;font-family:var(--display,sans-serif);font-size:15px;cursor:pointer}
.dg-names[aria-pressed="true"]{background:var(--nerve,#6BE6FF);color:#12202A;border-color:var(--nerve,#6BE6FF)}
.degen.live .dg-step{margin:0}
.degen.live .dg-text h3{margin:2px 0 6px;font-size:20px}
.degen.live .dg-text p{font-size:17px;line-height:1.45;margin:0}
.dg-theatre:fullscreen{background:#08111A;color:#EDF1F3;padding:14px;display:grid;grid-template-columns:minmax(0,1fr) 340px;gap:18px;align-items:stretch}
.dg-theatre:fullscreen .dg-stage{aspect-ratio:auto;height:calc(100vh - 28px);max-height:none}
@media (max-width:760px){
  .degen.live .dg-theatre{display:flex;flex-direction:column;gap:10px;align-items:stretch}
  .degen.live .dg-stage{aspect-ratio:4/5;max-height:calc(100svh - 200px)}
  .degen.live .dg-panel{max-height:none;overflow:visible;flex-direction:column-reverse}
  .degen.live .dg-text p{font-size:16px}
  .dg-ctl button{font-size:14px;padding:0 10px}
  .dg-fs{display:none}
}
.degen.live .dg-phase{min-width:0;padding:0 4px;font-size:14px}
.dg-stage .stage-labels .leader{background:rgba(237,241,243,.3)}
