
:root {
  --ink: #1d2a46; --stage: #111a2e; --paper: #f6f9fe; --wash: #e3edfb; --muted: #415069; --border: #bfcee4;
  --highlight: #f7612a; --action: #b73609; --sand: #f5e9de; --screen: #0d1424;
  --act: #1d2a46;                 /* set per act by the player */
  --font-display: Georgia, "Times New Roman", serif;   /* theme.css (written by film_player.py) sets the project's faces */
  --font-text: "Helvetica Neue", Arial, sans-serif;
  --k: 1;                         /* stage scale: rendered width / 1920 */
  --ease: cubic-bezier(.22, 1, .36, 1);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; background: var(--surround, var(--stage)); color: var(--paper); font-family: var(--font-text); }   /* ?bg= sets --surround */
.shell { min-height: 100%; display: flex; flex-direction: column; padding-top: var(--page-top, 0px); }   /* manifest.pageTop: space above the video */
/* With a page top, the video hangs from it (the space above is exactly pageTop; any spare room goes below). */
.shell.top-aligned .stage { top: 0; transform: translateX(-50%) scale(var(--k)); transform-origin: 50% 0; }

/* 1920×1080 design space, scaled to fit. Every position below is in design pixels, matching the Remotion frames. */
.stage-wrap { position: relative; width: 100%; flex: 1; display: grid; place-items: center; overflow: hidden; }
.stage { position: absolute; left: 50%; top: 50%; width: 1920px; height: 1080px; transform: translate(-50%, -50%) scale(var(--k)); transform-origin: 50% 50%; background: var(--paper); overflow: hidden; }

/* The clip stage is always rendered (so YouTube can pre-buffer behind the motion); the active motion segment covers it. */
.motion { position: absolute; inset: 0; z-index: 2; width: 1920px; height: 1080px; object-fit: cover; background: transparent; opacity: 0; pointer-events: none; }
.motion.on { opacity: 1; }
/* ...and while a segment covers it, the clip stage is made transparent (after a beat, so a cut never shows a gap): should a
   browser leave the video a few pixels off after a resize, nothing of the stage can show around it. */
.stage:has(.motion.on) .clip, .stage[data-mode="poster"] .clip { opacity: 0; transition: opacity 0s .15s; }

/* Clip stage — mirrors HandoffFrame in the Remotion build (plan/design.json → handoff). */
.clip { position: absolute; inset: 0; z-index: 1; background: var(--paper); color: var(--ink); }
.brandline { position: absolute; left: 80px; top: 44px; font-size: 20px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.screen { position: absolute; left: 80px; top: 118px; width: 1360px; height: 765px; border-radius: 18px; background: var(--screen); overflow: hidden; box-shadow: 0 24px 60px rgba(29, 42, 70, .22); }
.screen #yt { position: absolute; inset: 0; width: 1360px; height: 765px; border: 0; opacity: 0; transition: opacity .55s var(--ease); }
.screen.live #yt { opacity: 1; }
.screen-name { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--font-display); font-size: 40px; color: rgba(245, 248, 254, .28); transition: opacity .4s; }
.screen.live .screen-name { opacity: 0; }

.rail { position: absolute; left: 1490px; top: 118px; width: 350px; height: 765px; display: flex; flex-direction: column; }
.rail-bar { width: 72px; height: 8px; border-radius: 4px; background: var(--act); margin-bottom: 30px; }
.speaker { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: 46px; line-height: 1.05; letter-spacing: -.01em; color: var(--ink); }
.role { margin: 18px 0 0; font-size: 22px; line-height: 1.3; color: var(--muted); }
.publisher { margin: 12px 0 0; font-size: 18px; line-height: 1.3; color: var(--muted); opacity: .85; }
.cue { margin-top: auto; padding-top: 28px; border-top: 2px solid var(--border); }
.cue-label { margin: 0 0 12px; font-size: 16px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--act); }
.cue-text { margin: 0; font-size: 28px; line-height: 1.28; color: var(--ink); transition: opacity .35s; }
.cue.heard .cue-text { font-family: var(--font-display); font-style: italic; font-size: 32px; line-height: 1.22; }
.cue.heard .cue-text .mark { background: linear-gradient(transparent 62%, color-mix(in srgb, var(--act) 26%, transparent) 62%); background-size: 0% 100%; background-repeat: no-repeat; animation: sweep .9s .15s var(--ease) forwards; }
@keyframes sweep { to { background-size: 100% 100%; } }
.notice { margin: 26px 0 0; font-size: 15px; line-height: 1.35; color: var(--muted); }
.actline { position: absolute; left: 80px; top: 930px; font-size: 22px; font-weight: 600; color: var(--act); letter-spacing: .02em; }

.fallback { position: absolute; left: 80px; top: 118px; width: 1360px; height: 765px; border-radius: 18px; background: var(--screen); color: var(--paper); display: flex; flex-direction: column; justify-content: center; padding: 80px; z-index: 5;
  opacity: 0; transform: scale(.985); transition: opacity 1s cubic-bezier(.65, 0, .35, 1), transform 1s cubic-bezier(.65, 0, .35, 1); }
.fallback.on { opacity: 1; transform: none; transition: opacity .8s var(--ease), transform .8s var(--ease); }
.fallback-label { font-size: 22px; letter-spacing: .1em; text-transform: uppercase; color: #96a2c2; margin: 0 0 24px; }
.fallback blockquote { margin: 0; font-family: var(--font-display); font-style: italic; font-size: 54px; line-height: 1.18; }
.fallback-note { margin: 28px 0 0; font-size: 22px; color: #96a2c2; }
.fallback-note:empty { display: none; }
.fallback-actions { display: flex; gap: 24px; margin-top: 44px; }
.fallback-actions button { font: 600 24px var(--font-text); padding: 16px 30px; border-radius: 999px; border: 2px solid rgba(245, 248, 254, .55); background: transparent; color: var(--paper); cursor: pointer; }
.fallback-actions button.primary { background: var(--highlight); border-color: var(--highlight); }
.fallback-actions button:focus-visible, .embed-next:focus-visible { outline: 4px solid var(--highlight); outline-offset: 4px; }

/* The YouTube embed after a third failed load: over the video window, faded in and out. */
.embed { position: absolute; left: 80px; top: 118px; width: 1360px; height: 765px; border-radius: 18px; overflow: hidden; background: var(--screen); z-index: 5;
  opacity: 0; transform: scale(.985); transition: opacity 1s cubic-bezier(.65, 0, .35, 1), transform 1s cubic-bezier(.65, 0, .35, 1); box-shadow: 0 24px 60px rgba(29, 42, 70, .22); }
/* In with a soft ease-out; out (the rule above) with a slower, even ease so the leaving is as smooth as the coming. */
.embed.on { opacity: 1; transform: none; transition: opacity .8s var(--ease), transform .8s var(--ease); }
.embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; opacity: 0; transition: opacity 1s var(--ease); }
.embed.ready iframe { opacity: 1; }
.embed-next { position: absolute; right: 22px; top: 22px; font: 600 20px var(--font-text); padding: 12px 22px; border-radius: 999px; border: 0; background: rgba(13, 20, 36, .78); color: var(--paper); cursor: pointer;
  opacity: 0; transition: opacity .4s var(--ease); }
.embed:hover .embed-next, .embed-next:focus-visible { opacity: 1; }
@media (hover: none) { .embed-next { opacity: .92; } }   /* touch screens have no hover to reveal it */
.embed-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: rgba(245, 248, 254, .14); }
.embed-progress div { height: 100%; width: 0; background: var(--highlight); }

/* Brand mark: top center over everything; --bm-y / --bm-h come from manifest.brand. Light frames get the colored logo,
   dark frames the white one; "hide" frames (a brand-open, a frame that draws its own logo) get neither. */
.brandmark { position: absolute; left: var(--bm-cx, 960px); top: var(--bm-y, 30px); transform: translateX(-50%); z-index: 7; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none;
  transition: opacity .6s var(--ease), left .8s var(--ease); filter: drop-shadow(0 6px 18px rgba(17, 26, 46, .12)); }
/* Over the clip stage the mark centers on the video window (manifest.brand.screenX), and glides back when a full frame takes over. */
.brandmark.over-screen { left: var(--bm-sx, 760px); }
.bm-logos { position: relative; display: block; height: var(--bm-h, 44px); }
.bm-logos img { display: block; height: 100%; width: auto; transition: opacity .6s var(--ease); }
.bm-logos .bm-dark { position: absolute; left: 0; top: 0; opacity: 0; }
.bm-line { font: 600 14px var(--font-text); letter-spacing: .2em; text-transform: uppercase; color: var(--muted); white-space: nowrap; transition: color .6s var(--ease); }
.brandmark[data-tone="dark"] .bm-light { opacity: 0; }
.brandmark[data-tone="dark"] .bm-dark { opacity: 1; }
.brandmark[data-tone="dark"] .bm-line { color: rgba(245, 248, 254, .78); }
.brandmark[data-tone="hide"] { opacity: 0; }
/* A short label at the left of the header row, centered on the logo's height (manifest.brand.side). */
.brandside { position: absolute; left: 80px; top: calc(var(--bm-y, 30px) + var(--bm-h, 44px) / 2); transform: translateY(-50%); z-index: 7; pointer-events: none;
  font: 700 15px/1.45 var(--font-text); letter-spacing: .2em; text-transform: uppercase; color: var(--muted); white-space: pre-line; transition: color .6s var(--ease), opacity .6s var(--ease); }
.brandside[data-tone="dark"] { color: rgba(245, 248, 254, .82); }
.brandside[data-tone="hide"] { opacity: 0; }

/* Floating enrollment button, top right in the header band the brand mark shares. */
.ctafloat { position: absolute; right: 80px; top: calc(var(--bm-y, 30px) + var(--bm-h, 44px) / 2 - 27px); height: 54px; z-index: 7; display: flex; align-items: center; gap: 12px; padding: 14px 26px; border-radius: 999px; background: var(--action); color: #fff; font: 600 22px var(--font-text); text-decoration: none; white-space: nowrap;
  box-shadow: 0 10px 30px rgba(183, 54, 9, .28); opacity: 0; transform: translateY(-10px); pointer-events: none; transition: opacity .7s var(--ease), transform .7s var(--ease), box-shadow .3s; }
.ctafloat.on { opacity: 1; transform: none; pointer-events: auto; }
.ctafloat:hover, .ctafloat:focus-visible { box-shadow: 0 14px 36px rgba(183, 54, 9, .42); outline: none; }
.ctafloat:focus-visible { outline: 4px solid var(--highlight); outline-offset: 5px; }
.ctafloat-arrow { font-size: 20px; opacity: .9; }
.ctafloat::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: 0 0 0 0 rgba(247, 97, 42, .55); }
.ctafloat.nudge::after { animation: nudge 1.6s var(--ease) 3; }
@keyframes nudge { 0% { box-shadow: 0 0 0 0 rgba(247, 97, 42, .55); } 100% { box-shadow: 0 0 0 26px rgba(247, 97, 42, 0); } }
.ctafloat-nudge { position: absolute; right: 8px; top: calc(100% + 12px); padding: 8px 14px; border-radius: 10px; background: var(--ink); color: var(--paper); font: 500 17px var(--font-text); opacity: 0; transform: translateY(-6px); transition: opacity .5s var(--ease), transform .5s var(--ease); pointer-events: none; }
.ctafloat.nudge .ctafloat-nudge { opacity: 1; transform: none; }

.hits { position: absolute; inset: 0; z-index: 6; pointer-events: none; }
.hits a { position: absolute; border-radius: 14px; pointer-events: auto; cursor: pointer; }
.hits a:hover, .hits a:focus-visible { outline: 4px solid var(--highlight); outline-offset: 6px; }

/* Closing loop: the bar replaces the act line under the screen. */
.loopbar { position: absolute; left: 80px; top: 912px; width: 1360px; display: flex; align-items: center; gap: 28px; z-index: 6; opacity: 0; transform: translateY(14px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.loopbar.on { opacity: 1; transform: none; }
.loop-cta { flex: none; padding: 18px 36px; border-radius: 999px; background: var(--action); color: #fff; font: 700 28px var(--font-text); text-decoration: none; box-shadow: 0 14px 34px rgba(183, 54, 9, .3); }
.loop-cta::after { content: "  →"; }
.loop-cta:hover, .loop-cta:focus-visible { outline: 4px solid var(--highlight); outline-offset: 5px; }
.loop-label { flex: 1; font: 600 20px var(--font-text); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.loop-restart { flex: none; font: 600 20px var(--font-text); padding: 12px 22px; border-radius: 999px; cursor: pointer; background: transparent; color: var(--ink); border: 2px solid var(--border); }
.stage.looping .actline { opacity: 0; transition: opacity .5s; }

/* Enrollment under the video (manifest.enroll): a lead line, one large button per format, and the loop's restart. It fills
   the band between the video and the frame's bottom edge, centered under the video (and so under the logo above it). */
.enrollbar { position: absolute; left: 80px; top: 933px; width: 1360px; height: var(--enroll-band, 147px); z-index: 7; display: flex; align-items: center; justify-content: center;
  opacity: 0; transform: translateY(18px); pointer-events: none; visibility: hidden; transition: opacity .8s var(--ease), transform .8s var(--ease), height .35s var(--ease), visibility 0s linear .8s; }
.enrollbar.on { opacity: 1; transform: none; pointer-events: auto; visibility: visible; transition: opacity .8s var(--ease), transform .8s var(--ease), height .35s var(--ease), visibility 0s; }
.enroll-lead { position: absolute; left: 0; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 6px; max-width: 250px; }
.enroll-lead-title { font: 600 30px/1.1 var(--font-display); color: var(--ink); }
.enroll-lead-sub { font: 500 18px/1.3 var(--font-text); color: var(--muted); }
.enroll-buttons { display: flex; gap: 22px; }
.enroll-btn { position: relative; display: flex; align-items: center; gap: 20px; width: 390px; height: 92px; padding: 0 15px 0 32px; border-radius: 999px; color: #fff; text-decoration: none;
  background: var(--action); box-shadow: 0 14px 34px rgba(183, 54, 9, .30); transition: transform .3s var(--ease), box-shadow .3s var(--ease); }
.enroll-btn.ink { background: var(--ink); box-shadow: 0 14px 34px rgba(29, 42, 70, .26); }
.enroll-text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.enroll-kicker { font: 700 13px/1 var(--font-text); letter-spacing: .16em; text-transform: uppercase; opacity: .78; }
.enroll-title { font: 700 29px/1.12 var(--font-text); margin-top: 5px; white-space: nowrap; }
.enroll-sub { font: 500 16px/1.25 var(--font-text); opacity: .86; margin-top: 3px; white-space: nowrap; }
.enroll-go { flex: none; width: 62px; height: 62px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .16); font-size: 26px;
  transition: background .3s, color .3s, transform .3s var(--ease); }
.enroll-btn:hover, .enroll-btn:focus-visible { transform: translateY(-3px); box-shadow: 0 20px 44px rgba(183, 54, 9, .42); outline: none; }
.enroll-btn.ink:hover, .enroll-btn.ink:focus-visible { box-shadow: 0 20px 44px rgba(29, 42, 70, .38); }
.enroll-btn:focus-visible { outline: 4px solid var(--highlight); outline-offset: 5px; }
.enroll-btn:hover .enroll-go, .enroll-btn:focus-visible .enroll-go { background: #fff; color: var(--action); transform: translate(2px, -2px); }
.enroll-btn.ink:hover .enroll-go, .enroll-btn.ink:focus-visible .enroll-go { color: var(--ink); }
.enroll-btn::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: 0 0 0 0 rgba(247, 97, 42, .55); pointer-events: none; }
.enrollbar.on .enroll-btn:first-child::after { animation: nudge 1.6s var(--ease) 1s 2; }
.enroll-restart { position: absolute; right: 0; top: 50%; transform: translateY(-50%); font: 600 18px var(--font-text); padding: 12px 20px; border-radius: 999px; cursor: pointer;
  background: transparent; color: var(--muted); border: 2px solid var(--border); }
.enroll-restart:hover, .enroll-restart:focus-visible { color: var(--ink); border-color: var(--ink); }
.stage.enrolling .actline { opacity: 0; transition: opacity .5s; }
/* With the controls floating over the film (full screen, embedded) and showing, the enrollment bar fits between the video
   and them (fit() measures how much they cover). Where that leaves too little height, the buttons don't shrink: they turn
   compact (wider, one line, larger type: "Enroll in the Full Course"), the lead steps aside and the restart becomes an icon.
   When the controls hide, the full layout comes back. */
.enroll-short { display: none; }
.enroll-btn { transition: transform .3s var(--ease), box-shadow .3s var(--ease), width .35s var(--ease), height .35s var(--ease); }
:is(.is-full, .is-embed):not(.ui-calm) .enrollbar.tight { height: calc(var(--enroll-band, 147px) - var(--bar-cover, 0px) - 4px); }
:is(.is-full, .is-embed):not(.ui-calm) .enrollbar.tight .enroll-lead { display: none; }
:is(.is-full, .is-embed):not(.ui-calm) .enrollbar.tight .enroll-buttons { gap: 26px; }
:is(.is-full, .is-embed):not(.ui-calm) .enrollbar.tight .enroll-btn { width: 548px; height: var(--enroll-h, 60px); padding: 0 calc(var(--enroll-h, 60px) * .12) 0 34px; gap: 14px; }
:is(.is-full, .is-embed):not(.ui-calm) .enrollbar.tight .enroll-text > :not(.enroll-short) { display: none; }
:is(.is-full, .is-embed):not(.ui-calm) .enrollbar.tight .enroll-short { display: block; font: 700 var(--enroll-fs, 26px)/1.1 var(--font-text); white-space: nowrap; }
:is(.is-full, .is-embed):not(.ui-calm) .enrollbar.tight .enroll-go { width: calc(var(--enroll-h, 60px) * .76); height: calc(var(--enroll-h, 60px) * .76); font-size: calc(var(--enroll-fs, 26px) * .9); }
:is(.is-full, .is-embed):not(.ui-calm) .enrollbar.tight .enroll-restart { width: var(--enroll-h, 60px); height: var(--enroll-h, 60px); padding: 0; display: grid; place-items: center; font-size: calc(var(--enroll-fs, 26px) * 1.1); }
:is(.is-full, .is-embed):not(.ui-calm) .enrollbar.tight .enroll-restart-text { display: none; }

/* Click anywhere on the picture to pause or resume (links, buttons and the YouTube window keep their own clicks). */
.stage { cursor: pointer; }
.tapflash { position: absolute; left: 50%; top: 50%; width: 150px; height: 150px; margin: -75px 0 0 -75px; border-radius: 50%; z-index: 9; display: grid; place-items: center;
  background: rgba(13, 20, 36, .58); color: #fff; font: 600 54px var(--font-text); opacity: 0; pointer-events: none; }
.tapflash.go { animation: tapflash .75s var(--ease) forwards; }
@keyframes tapflash { 0% { opacity: .95; transform: scale(.82); } 100% { opacity: 0; transform: scale(1.32); } }

.endcard { position: absolute; inset: 0; z-index: 6; }
/* With manifest.course.hit the link sits over the button drawn in the final frame; without it, a visible pill. */
.endcard-hit { position: absolute; border-radius: 12px; cursor: pointer; }
.endcard-hit.pill { left: 50%; top: 860px; transform: translateX(-50%); padding: 16px 34px; border-radius: 999px; background: var(--action); color: #fff; font: 600 28px var(--font-text); text-decoration: none; white-space: nowrap; }
.endcard-hit:hover, .endcard-hit:focus-visible { outline: 4px solid var(--highlight); outline-offset: 6px; }
.endcard-again { position: absolute; left: 50%; top: 950px; transform: translateX(-50%); font: 600 26px var(--font-text); padding: 14px 30px; border-radius: 999px; cursor: pointer; background: transparent; color: var(--ink); border: 2px solid var(--border); }
.seq-note a { color: #c3cce4; }
.bigplay { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: flex; align-items: center; gap: 28px; padding: 30px 48px 30px 34px; border: 0; border-radius: 999px; background: var(--highlight); color: #fff; font: 700 36px var(--font-text); cursor: pointer; z-index: 10; box-shadow: 0 20px 60px rgba(17, 26, 46, .35); }
.bigplay-icon { width: 0; height: 0; border-left: 34px solid #fff; border-top: 22px solid transparent; border-bottom: 22px solid transparent; margin-left: 10px; }
.stage[data-mode="poster"] .motion:first-of-type { opacity: 1; }
.stage:not([data-mode="poster"]) .bigplay { display: none; }
.bigplay-restart { position: absolute; left: 50%; top: calc(50% + 84px); transform: translateX(-50%); z-index: 10; padding: 12px 26px; border-radius: 999px; cursor: pointer;
  border: 2px solid rgba(246, 249, 254, .7); background: rgba(13, 20, 36, .5); color: #fff; font: 600 24px var(--font-text); white-space: nowrap; }
.bigplay-restart:hover, .bigplay-restart:focus-visible { background: rgba(13, 20, 36, .75); outline: none; }
.stage:not([data-mode="poster"]) .bigplay-restart { display: none; }
/* Starting from the poster: the poster stays up, with a spinner, until the first frame is ready (no empty stage between). */
.stage.starting .motion:first-of-type { opacity: 1; }
.stage.starting .clip { opacity: 0; }
.stage.starting::after { content: ""; position: absolute; left: 50%; top: 50%; width: 84px; height: 84px; margin: -42px 0 0 -42px; z-index: 11; border-radius: 50%;
  border: 6px solid rgba(246, 249, 254, .28); border-top-color: #fff; animation: film-spin .9s linear infinite; }
@keyframes film-spin { to { transform: rotate(360deg); } }
.stage[data-mode="poster"] .ctafloat { display: none; }

/* Controls */
.bar { display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: #0b1222; border-top: 1px solid rgba(195, 204, 228, .12); }
.bar button { background: transparent; color: var(--paper); border: 1px solid rgba(195, 204, 228, .25); border-radius: 8px; min-width: 40px; height: 36px; font: 600 14px var(--font-text); cursor: pointer; }
.bar button[aria-pressed="true"] { background: var(--paper); color: var(--ink); }
.now { display: flex; flex-direction: column; min-width: 0; max-width: 34ch; }
.now span:first-child { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.now span:last-child { font-size: 12px; color: #96a2c2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.track { flex: 1; height: 8px; border-radius: 4px; background: rgba(195, 204, 228, .18); cursor: pointer; position: relative; min-width: 60px; }
.track-fill { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: 4px; background: var(--highlight); }
.time { font-variant-numeric: tabular-nums; font-size: 13px; color: #c3cce4; white-space: nowrap; }

/* Full screen (and embedded, below): the film keeps its 16:9 frame, scaled up as one piece and centered; only the dark surround runs to the
   screen's edges. The bar floats over the bottom and steps aside while the film plays and the pointer rests. */
#btnFull svg { display: block; margin: auto; }
#btnFull .fs-close, .is-full #btnFull .fs-open { display: none; }
.is-full #btnFull .fs-close { display: inline; }
:is(.is-full, .is-embed), :is(.is-full, .is-embed) body { overflow: hidden; }
:is(.is-full, .is-embed) .shell { padding-top: 0; }
:is(.is-full, .is-embed) .stage-wrap { position: fixed; inset: 0; z-index: 1; }
:is(.is-full, .is-embed) .shell.top-aligned .stage { top: 50%; transform: translate(-50%, -50%) scale(var(--k)); transform-origin: 50% 50%; }
:is(.is-full, .is-embed) .bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 15; border-top: 0; background: linear-gradient(rgba(11, 18, 34, 0), rgba(11, 18, 34, .9) 45%);
  padding-top: 28px; transition: opacity .45s var(--ease), transform .45s var(--ease); }
:is(.is-full, .is-embed).ui-idle .bar { opacity: 0; transform: translateY(14px); pointer-events: none; }
:is(.is-full, .is-embed).ui-idle, :is(.is-full, .is-embed).ui-idle * { cursor: none !important; }
/* Embedded (in an iframe, e.g. a page header): the same layout as full screen inside the frame. Before the first play only
   the poster and its play button show; the bar arrives with the film. */
.is-embed:not(.film-started) .bar { opacity: 0; transform: translateY(14px); pointer-events: none; }

/* The sequence panel slides; during playback it eases out to a slim edge (peek) that a rollover or tap brings back. */
.seq { position: fixed; right: 0; top: 0; bottom: 0; width: min(420px, 100vw); background: #0b1222; border-left: 1px solid rgba(195, 204, 228, .14); overflow: auto; z-index: 20; padding: 16px 18px 40px;
  transform: translateX(100%); transition: transform .9s cubic-bezier(.65, 0, .35, 1), box-shadow .9s; visibility: hidden; }
.seq[data-state="open"] { transform: none; visibility: visible; box-shadow: -24px 0 60px rgba(0, 0, 0, .35); transition: transform .6s var(--ease), box-shadow .6s; }
.seq[data-state="peek"] { transform: translateX(calc(100% - 14px)); visibility: visible; overflow: hidden; cursor: pointer; }
.seq-edge { position: absolute; left: 0; top: 0; bottom: 0; width: 14px; opacity: 0; transition: opacity .6s; background: linear-gradient(90deg, rgba(247, 97, 42, .22), transparent); }
.seq-edge span { position: absolute; left: 4px; top: 50%; width: 4px; height: 56px; margin-top: -28px; border-radius: 2px; background: var(--highlight); opacity: .8; }
.seq[data-state="peek"] .seq-edge { opacity: 1; }
.seq[data-state="peek"] > :not(.seq-edge) { opacity: 0; transition: opacity .3s; }
.seq > :not(.seq-edge) { transition: opacity .5s .1s; }
.seq header { display: flex; justify-content: space-between; align-items: center; }
.seq h3 { margin: 0; font-family: var(--font-display); font-size: 24px; }
.seq header button { background: transparent; border: 0; color: var(--paper); font-size: 20px; cursor: pointer; }
.seq ol { list-style: none; padding: 0; margin: 14px 0 0; }
.seq li { margin: 0; }
.seq li.act { margin-top: 18px; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: #96a2c2; }
.seq li button { width: 100%; text-align: left; background: transparent; border: 0; border-radius: 8px; color: var(--paper); padding: 8px 10px; font: 14px/1.35 var(--font-text); cursor: pointer; display: flex; gap: 10px; }
.seq li button:hover, .seq li button.current { background: rgba(195, 204, 228, .1); }
.seq li button .k { color: #96a2c2; min-width: 3.4em; font-variant-numeric: tabular-nums; }
.seq li button.clipitem .k::before { content: "▶ "; color: var(--highlight); }
.seq li button.loopitem .k::before { content: "↻ "; color: var(--highlight); }
.seq-note { font-size: 12px; color: #96a2c2; margin-top: 24px; line-height: 1.45; }

@media (max-width: 720px) {
  .shell { padding-top: min(var(--page-top, 0px), 24px); }
  .now { display: none; }
  .bar { gap: 6px; padding: 8px 10px; }
  .bar button { min-width: 34px; height: 34px; }
}
@media (max-width: 480px) {
  .time { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .screen .yt, .cue-text { transition: none; }
  .ctafloat.nudge::after, .enrollbar.on .enroll-btn:first-child::after { animation: none; }
  .tapflash.go { animation-duration: .01s; }
  .stage.starting::after { animation-duration: 3s; }
  .seq, .seq[data-state="open"] { transition: none; }
  .fallback, .embed, .embed iframe { transition: none; }
  .is-full .bar { transition: none; }
  .cue.heard .cue-text .mark { animation: none; background-size: 100% 100%; }
}
