/* The crew's film (switch dv_crewfilm, only with dv_delight; src/lib/crew-film.ts, delight-film.js, docs/CHARACTERS.md "The film").
   The stage is drawn in its LAST picture: with no script, or for anyone who asks for less motion, this file alone shows the film's final picture, still and
   complete, with the four moments written underneath. Only transform and opacity ever move. One line weight for the crew (2.2), one ink, one green;
   gold only as a thin line (the two rings, their soft outer ring, the thread, the frame's edge). Nothing here is wider than its box. */
.nmf{--ink:#16130F;--green:#0E5A43;--bg:#F6F3EC;--gold:#C9A86A;--night:#110F0C;--ease:cubic-bezier(.2,.8,.2,1);position:relative;max-width:640px;margin:28px auto 0;text-align:left}
.nmf [hidden]{display:none!important}
.nmf--page{margin-left:0}
.nmf__frame{position:relative;overflow:hidden;border-radius:20px;background:var(--night);box-shadow:0 0 0 1px rgba(201,168,106,.45),0 18px 40px -24px rgba(17,15,12,.55);isolation:isolate}
.nmf__view{position:relative}
.nmf__stage{display:block;width:100%;height:auto;aspect-ratio:3/2;overflow:hidden}

/* the stage */
.nmf-paper{fill:var(--bg)}
.nmf-floor{fill:none;stroke:var(--ink);stroke-opacity:.1;stroke-width:2.2;stroke-linecap:round}
.nmf-veil{fill:var(--night);opacity:0}
.nmf-hole{opacity:1}
.nmf-flood{opacity:0;transform-box:view-box;transform-origin:180px 172px}
.nmf-under,.nmf-gap{opacity:0}
.nmf-line{fill:#FBEFD3}
.nmf-pool{opacity:1}
.nmf-glow{opacity:.28;transform-box:fill-box;transform-origin:center}
.nmf-thread{fill:none;stroke:var(--gold);stroke-width:1.8;stroke-linecap:round;transform-box:view-box;transform-origin:117.5px 80px}
.nmf-core{fill:none;stroke:var(--gold);stroke-width:2}
.nmf-halo{fill:none;stroke:var(--gold);stroke-width:1;opacity:.45;transform-box:fill-box;transform-origin:center}
.nmf-ring{transform-box:fill-box;transform-origin:center}
.nmf-c--ring{transform-box:view-box;transform-origin:150px 102px}

/* the crew, exactly as on the website (delight-site.css), for this stage only */
.nmf__stage :is(.k,.kf,.pq,.gf,.bz,.kw,.mth){stroke-linecap:round;stroke-linejoin:round}
.nmf__stage .k{fill:none;stroke:var(--ink);stroke-width:2.2}
.nmf__stage .kf,.nmf__stage .m-eye,.nmf__stage .m-pup{fill:var(--ink)}
.nmf__stage .pq{fill:var(--bg);stroke:var(--ink);stroke-width:2}
.nmf__stage .wh{fill:#fff}.nmf__stage .ns{stroke:none}
.nmf__stage .gf{fill:var(--green)}
.nmf__stage .m-body{stroke:var(--bg);stroke-width:3}
.nmf__stage .gd{fill:rgba(22,19,15,.07)}
.nmf__stage .bz{fill:none;stroke:#B08D57;stroke-width:1.8}
.nmf__stage .bz--on-dark{stroke:var(--gold);stroke-width:2.4}
.nmf__stage .kw{fill:none;stroke:#fff;stroke-width:2.4}
.nmf__stage .mth{fill:none;stroke:#fff;stroke-width:1.4}
.nmf__stage .m-in,.nmf__stage .m-light{fill:#F1E8D6;stroke:none}
.nmf__stage .m-pane{fill:none;stroke:#fff;stroke-opacity:.3;stroke-width:1.4}
.nmf__stage :is(.m-arm,.m-swing,.m-legs,.m-flame,.m-leaf){transform-box:view-box}
.nmf__stage .m-arm{transform-origin:88px 58px}
.nmf__stage .m-swing{transform-origin:54px 0}
.nmf__stage .m-flame{transform-origin:54px 79px}
.nmf__stage .m-leaf{transform-origin:32px 86px}
.nmf__stage .m-eye{transform-box:fill-box;transform-origin:center}

/* small life while it plays only: eyes blink, Ring sways, the light under the door breathes. Paused the rest of the time (and off screen). */
.nmf.is-playing .nmf__stage .m-eye{animation:nmf-blink 4.8s infinite}
.nmf.is-playing .nmf__stage [data-f="nib"] .m-eye{animation-delay:-1.6s}
.nmf.is-playing .nmf__stage [data-f="wick"] .m-eye{animation-delay:-3.1s}
.nmf.is-playing .nmf__stage .m-swing{animation:nmf-sway 5.6s ease-in-out infinite alternate}
.nmf.is-playing .nmf__stage .m-light{animation:nmf-breathe 3.2s ease-in-out infinite alternate}
@keyframes nmf-blink{0%,93%,100%{transform:scaleY(1)}96%{transform:scaleY(.1)}}
@keyframes nmf-sway{from{transform:rotate(-3deg)}to{transform:rotate(3deg)}}
@keyframes nmf-breathe{from{opacity:.55}to{opacity:1}}

/* the band under the picture: the speaker, the words with the N, pause */
.nmf__band{display:flex;align-items:center;gap:10px;min-height:68px;padding:10px 12px 12px;color:var(--bg)}
.nmf__words{flex:1 1 auto;min-width:0;margin:0;display:flex;align-items:center;justify-content:center;gap:10px;font-size:clamp(15px,2.3vw,18px);line-height:1.35;font-weight:500;letter-spacing:.005em;color:var(--bg)}
.nmf__words .nmf__n{flex:none;width:auto;height:24px}
.nmf .nmf__n .nm-eye{animation:none}
.nmf__words br{display:none}
@media(max-width:520px){.nmf__words br{display:inline}}
.nmf__btn{flex:none;display:grid;place-items:center;width:44px;height:44px;padding:0;border-radius:50%;border:1px solid rgba(201,168,106,.5);background:transparent;color:var(--bg);cursor:pointer;-webkit-tap-highlight-color:transparent}
.nmf__btn svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.nmf__btn:focus-visible,.nmf__play:focus-visible,.nmf-skip:focus-visible{outline:2px solid var(--gold);outline-offset:3px}
/* the speaker: always with its words. Muted (the start): a speaker with a line through it and "Sound off", in a plain outline. On: a plain speaker, "Sound on", filled gold-edged. */
.nmf__snd{flex:none;display:inline-flex;align-items:center;gap:8px;box-sizing:border-box;min-width:112px;min-height:44px;padding:0 14px 0 10px;border-radius:999px;border:1px solid rgba(201,168,106,.55);background:transparent;color:var(--bg);font:inherit;font-size:15px;font-weight:600;line-height:1;white-space:nowrap;cursor:pointer;-webkit-tap-highlight-color:transparent}
.nmf__snd svg{flex:none;width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.nmf__snd .nmf-i-off{stroke:#F2D9A3;stroke-width:2.4}
.nmf__snd[aria-pressed="false"] .nmf-i-on,.nmf__snd[aria-pressed="true"] .nmf-i-off{display:none}
.nmf__snd[aria-pressed="true"]{background:rgba(201,168,106,.22);border-color:var(--gold)}
.nmf__snd:focus-visible{outline:2px solid var(--gold);outline-offset:3px}
/* the pause button keeps its place while hidden, so nothing moves when the film starts */
.nmf.is-motion .nmf__pause[hidden]{display:grid!important;visibility:hidden}
.nmf__band{flex-wrap:wrap}
.nmf__snd{order:1}.nmf__words{order:2}.nmf__pause{order:3}
@media(max-width:520px){.nmf__pause{margin-left:auto}.nmf__snd{order:1}.nmf__pause{order:2}.nmf__words{order:3;flex:1 1 100%;margin-top:2px}}

/* the Play button, in the middle of the picture before it starts, when paused, and at the end ("Watch again") */
.nmf__play{position:absolute;left:50%;top:40%;transform:translate(-50%,-50%);display:inline-flex;align-items:center;gap:10px;min-height:52px;padding:10px 22px 10px 16px;border:0;border-radius:999px;background:rgba(246,243,236,.95);color:var(--ink);font:inherit;font-size:17px;font-weight:600;line-height:1.1;white-space:nowrap;cursor:pointer;box-shadow:0 0 0 1px rgba(201,168,106,.7),0 10px 26px -12px rgba(17,15,12,.6);transition:opacity .35s var(--ease)}
.nmf__play svg{width:24px;height:24px;fill:currentColor}
.nmf__play small{font-size:14px;font-weight:500;opacity:.72}
.nmf.is-playing .nmf__play{opacity:0;pointer-events:none}

/* "Watch again", under the film once it has ended, so the last picture stays clear */
.nmf__again{display:flex;align-items:center;gap:8px;min-height:44px;margin:12px auto 0;padding:8px 18px 8px 14px;border-radius:999px;border:1px solid rgba(176,141,87,.6);background:transparent;color:inherit;font:inherit;font-size:16px;font-weight:600;cursor:pointer}
.nmf__again svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.nmf__again:focus-visible{outline:2px solid var(--gold);outline-offset:3px}

/* the four moments in words: shown under the still picture; read out (not shown) while the film can move */
.nmf__lines{margin:14px 4px 0;font-size:16px;line-height:1.5}
.nmf__lines ol{margin:0;padding:0 0 0 1.4em}
.nmf__lines li+li{margin-top:2px}
.nmf.is-motion .nmf__lines ol{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap}
.nmf-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap}

/* the welcome, once, straight after joining: over the whole screen, clear of the notch and the bars (safe areas), Skip from the first second.
   Hidden until the script opens it, so with no script it never traps anyone. */
.nmf-welcome{display:none;position:fixed;inset:0;z-index:2147483000;width:100%;height:100%;max-width:none;max-height:none;margin:0;border:0;box-sizing:border-box;overflow-y:auto;overscroll-behavior:contain;background:#110F0C;color:#F6F3EC;
  padding:max(16px,env(safe-area-inset-top)) max(16px,env(safe-area-inset-right)) max(16px,env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left));opacity:0;transition:opacity .45s cubic-bezier(.2,.8,.2,1)}
.nmf-welcome.is-open{display:flex}
.nmf-welcome::backdrop{background:transparent}
.nmf-welcome.is-shown{opacity:1}
.nmf-welcome__in{display:flex;flex-direction:column;width:100%;max-width:min(560px,calc((100vh - 200px) * 1.5));max-width:min(560px,calc((100dvh - 200px) * 1.5));min-width:min(280px,100%);margin:auto}
.nmf-skip{align-self:flex-end;min-height:44px;margin:0 0 12px;padding:0 20px;border-radius:999px;border:1px solid rgba(246,243,236,.45);background:transparent;color:#F6F3EC;font:inherit;font-size:16px;font-weight:600;cursor:pointer}
.nmf--welcome{margin:0;max-width:none}
.nmf--welcome .nmf__lines{color:#F6F3EC}
html.nmf-lock,html.nmf-lock body{overflow:hidden}

@media(prefers-reduced-motion:reduce){
  .nmf *,.nmf-welcome{animation:none!important;transition:none!important}
}
