.pause-toggle {
  position: absolute; z-index: 30; top: calc(12px + var(--safe-top)); left: 12px;
  display: grid; place-items: center; width: 44px; height: 44px;
  border: 0; padding: 12px; background: transparent; color: var(--ink); cursor: pointer; opacity: .8;
}
.pause-toggle svg { width: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; }
/* Controls stay legible over the bright room as well as the night sky. */
.pause-toggle svg, .sound-toggle svg { filter: drop-shadow(0 0 2.5px rgb(30 16 6 / .8)) drop-shadow(0 1px 1px rgb(0 0 0 / .45)); }
.pause-toggle, .sound-toggle { transition: opacity .5s ease; }
[data-act="letter"] :is(.pause-toggle, .sound-toggle) { opacity: .45; }
[data-act="letter"] :is(.pause-toggle, .sound-toggle):hover { opacity: .88; }
/* One lens for the whole film: the bright interior plates take the same warm, shaped light as the night exterior. */
.grade { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 2.6s ease; }
.grade-tone { mix-blend-mode: multiply; background: radial-gradient(118% 82% at 50% 47%, rgb(255 242 228) 28%, rgb(184 146 122) 100%); }
.grade-curve { mix-blend-mode: soft-light; background: linear-gradient(180deg, rgb(66 78 112) 0%, rgb(124 122 120) 46%, rgb(92 70 54) 100%); }
:is([data-act="enter"], [data-act="cake"], [data-act="record"], [data-act="letter"], [data-act="finale"]) .grade-tone { opacity: 1; }
:is([data-act="enter"], [data-act="cake"], [data-act="record"], [data-act="letter"], [data-act="finale"]) .grade-curve { opacity: .85; }
.pause-toggle:focus-visible { outline: 2px solid #fff1cf; outline-offset: 1px; border-radius: 50%; }
.pause-screen, .recovery-screen {
  position: absolute; inset: 0; z-index: 80; padding: 12%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: rgb(4 8 15 / .94); color: var(--ink); text-align: center; touch-action: manipulation;
}
/* Pause freezes the current frame: blurred and dimmed behind a warm vignette, so it follows whichever scene is held. */
.pause-screen {
  background: radial-gradient(120% 85% at 50% 45%, rgb(20 12 8 / .5), rgb(6 4 3 / .85));
  backdrop-filter: blur(16px) brightness(.42) saturate(.8);
  -webkit-backdrop-filter: blur(16px) brightness(.42) saturate(.8);
}
[data-quality="low"] .pause-screen { backdrop-filter: none; -webkit-backdrop-filter: none; background: rgb(12 8 6 / .97); }
.pause-screen h2, .recovery-screen h2 { margin: 0 0 14px; font: 400 24px/1.6 var(--serif); }
.pause-screen p, .recovery-screen p { margin: 0 0 30px; font: 400 14px/1.8 var(--sans); color: var(--ink-soft); }
/* The single pause line, inked in the camellia wax-seal crimson (lifted a touch so it reads on the night backdrop). */
.pause-screen .pause-line {
  --seal-red: #c23a40;
  margin: 0 0 36px; font: 500 clamp(26px, 7.6cqw, 32px)/1.5 var(--hand); letter-spacing: .12em; text-indent: .12em;
  color: var(--seal-red); text-shadow: 0 0 18px rgb(150 24 32 / .45), 0 1px 2px rgb(0 0 0 / .6);
}
body[data-paused="true"] .film > :not(.pause-screen):not(.pause-toggle):not(.recovery-screen) { pointer-events: none; }
.actions { max-width: 100%; }
.actions .btn { min-height: 44px; }
[data-act="finale"] .actions { bottom: calc(3% + var(--safe-bottom)); padding: 0 8px; }
[data-act="finale"] .actions .btn { --track: clamp(.1em, 1.4cqw, .2em); --pad: clamp(6px, 2.2cqw, 9px); font-size: clamp(13px, 3.6cqw, 14px); }
.static-credits { pointer-events: auto; overflow-x: hidden; overflow-y: auto; touch-action: pan-y; padding: 12% 8% 180px; mask-image: none; -webkit-mask-image: none; }
.static-credits .finale-title { display: none; }
.static-credits .roll { position: static; transform: none; }
.static-credits .roll .end { margin-top: 4.5em; }
.static-credits .roll dt:first-child { margin-top: 0; }
[data-quality="low"] .grain { display: none; }
[data-quality="low"] .ambient-layer { filter: blur(24px) brightness(var(--b, .5)); }
[data-quality="low"] .prompt { backdrop-filter: none; -webkit-backdrop-filter: none; background-color: rgb(30 36 46 / .86); }
@media (prefers-reduced-motion: reduce) {
  .film *, .film *::before, .film *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .grain { display: none; }
  .subtitle { filter: none; translate: none; }
}
