/* ITZA Memory - the stylesheet.
 *
 * The house shell is ITZA Friend's (lifted 2026-11-09): the tokens and the four themes, screens and panes, the
 * modal, sheets and toast, the start screen, the ITZA sign-in card, settings, the lock, the language door. What is
 * ITZA Memory's own follows it: the film library, the making steps, the first look, the player.
 *
 * Rules kept from the house: motion is transform and opacity only; every shadow is an elevation token; logical
 * properties for RTL (margin-inline, inset-inline), never left and right where a direction could flip; no web
 * fonts: Instrument Sans and Roboto ship from this origin.
 */

@font-face {
  font-family: 'Instrument Sans';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/instrument-sans-latin.woff2') format('woff2');
}

/* The wordmark's face is Roboto - brand, not prose (owner, 2026-09-07). */
@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/roboto-latin.woff2') format('woff2');
}

/* ---------------------------------------------------------------------
   Tokens - four rooms, one meaning
   --------------------------------------------------------------------- */

:root {
  --sans: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --brand: 'Roboto', var(--sans);

  /* DEEP (the default): the clips are golden-hour footage and read best on
     deep neutrals. */
  --paper: #0b1016;
  --surface: #121923;
  --ink: #eef1f5;
  --muted: #9aa5b4;        /* 7:1 on --paper */
  --rule: #263140;
  --navy: #0b2a4a;
  --gold: #f5c711;
  --blue: #4d9bff;
  --accent: #4d9bff;
  --accent-ink: #081524;
  --frost: rgba(18, 25, 35, 0.72);
  --danger: #e05a5a;

  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
  --kb: 0px;

  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-full: 999px;
  /* EVERY BUTTON'S SHAPE (owner, 2026-11-05, pointing at the send button: "this is the shape of the button that I like and
   * should be applied across the entire app"): small corners, never a pill. */
  --r-btn: 8px;

  --m-tap: 90ms;
  --m-quick: 160ms;
  --m-enter: 280ms;
  --m-exit: 240ms;
  --ease-enter: cubic-bezier(0.32, 0.72, 0, 1);
  --ease-exit: cubic-bezier(0.4, 0, 1, 1);

  /* Elevation tokens - the only shadows in the tree. */
  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.35), 0 8px 24px rgba(0, 0, 0, 0.45);
  --shadow-float: 0 2px 6px rgba(0, 0, 0, 0.45), 0 12px 32px rgba(0, 0, 0, 0.55);
  --shadow-icon: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.7));   /* bare icons over a bright frame */
  --shadow-piece: drop-shadow(0 12px 22px rgba(0, 0, 0, 0.5));   /* a found piece floating over the frame, no card behind it */
}

html[data-theme='paper'] {
  --paper: #fbfaf7;
  --surface: #ffffff;
  --ink: #12161c;
  --muted: #666d79;
  --rule: #e2ded6;
  --navy: #0b2a4a;
  --blue: #0b6ad4;
  --accent: #0b2a4a;
  --accent-ink: #ffffff;
  --frost: rgba(251, 250, 247, 0.78);
  --shadow-card: 0 1px 2px rgba(11, 42, 74, 0.06), 0 8px 24px rgba(11, 42, 74, 0.08);
  --shadow-float: 0 2px 6px rgba(11, 42, 74, 0.14), 0 12px 32px rgba(11, 42, 74, 0.18);
}

html[data-theme='dark'] {
  --paper: #14171c;
  --surface: #1b2027;
  --ink: #e8e6e1;
  --muted: #9aa1ad;
  --rule: #2b3038;
  --navy: #a9c6e8;
  --blue: #6fb3ff;
  --accent: #6fb3ff;
  --accent-ink: #081524;
  --frost: rgba(20, 23, 28, 0.78);
}

html[data-theme='hc'] {
  --paper: #000000;
  --surface: #000000;
  --ink: #ffffff;
  --muted: #d0d0d0;
  --rule: #ffffff;
  --navy: #ffffff;
  --gold: #ffd84d;
  --blue: #8ec6ff;
  --accent: #ffffff;
  --accent-ink: #000000;
  --frost: rgba(0, 0, 0, 0.85);
}

/* ---------------------------------------------------------------------
   The document - the body never scrolls; panes do
   --------------------------------------------------------------------- */

html {
  font-size: calc(100% * var(--text-scale, 1));
  -webkit-text-size-adjust: 100%;
}
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  background: var(--paper);
  color: var(--ink);
  touch-action: pan-x pan-y;
  -webkit-font-smoothing: antialiased;
}
/* THE PAGE NEVER ZOOMS (owner, 2026-11-11: a two-finger zoom of the whole page on a phone left the picture gone and the
 * page hard to restore). Scrolling only, on every element - a phone reads touch-action only up to the nearest scrolling
 * box, and every step scrolls; the viewer (.lightbox: none) and the crop (canvas.shape) keep their own gestures. A pinch
 * on a picture that has a viewer opens it (ui.js UI.pinchOpens). */
body * { touch-action: pan-x pan-y; }
body {
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.45;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}
input, textarea { user-select: text; -webkit-user-select: text; }
/* NO SCROLL BARS ANYWHERE (owner, 2026-11-05, of her share sheet: "no scroll bars, that's a horrible one"): every
 * sheet, dialog, list and box still scrolls by touch, wheel and keys; only the bar is gone, as the panes and the chat
 * already had it. */
* { scrollbar-width: none; }
*::-webkit-scrollbar { display: none; width: 0; height: 0; }
button { font: inherit; }

html[data-motion='reduce'] *,
html[data-motion='reduce'] *::before,
html[data-motion='reduce'] *::after {
  animation-duration: 0.001ms !important;
  transition-duration: 0.001ms !important;
}
/* The character's clips are content: they keep moving under reduced motion.
   (The videos carry no CSS animation; the crossfade is opacity only.) */

/* ---------------------------------------------------------------------
   Screens, panes, modal, toast (the shell)
   --------------------------------------------------------------------- */

.screen { position: fixed; inset: 0; display: none; }
.screen.on { display: block; }
.screen:focus { outline: none; }

#view { position: absolute; inset: 0; }

.pane {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--paper);
  isolation: isolate;
  scrollbar-width: none;
}
.pane::-webkit-scrollbar { display: none; }
.pane:focus, .pane:focus-visible { outline: none; }
.pane-under { pointer-events: none; }

@keyframes paneIn { from { transform: translate3d(100%, 0, 0); } to { transform: translate3d(0, 0, 0); } }
@keyframes paneOut { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(100%, 0, 0); } }
@keyframes paneFade { from { opacity: 0; } to { opacity: 1; } }
.pane-enter { animation: paneIn var(--m-enter) var(--ease-enter); }
.pane-exit { animation: paneOut var(--m-exit) var(--ease-exit) forwards; z-index: 5; }
.pane-fade { animation: paneFade 180ms ease-out; }
html[dir='rtl'] .pane-enter { animation-name: paneInRtl; }
html[dir='rtl'] .pane-exit { animation-name: paneOutRtl; }
@keyframes paneInRtl { from { transform: translate3d(-100%, 0, 0); } to { transform: translate3d(0, 0, 0); } }
@keyframes paneOutRtl { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(-100%, 0, 0); } }

#scrim {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  /* Above the sheets (81) and below the toast (90): a dialog opened from a sheet opened BEHIND it before (2026-11-05). */
  z-index: 86;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  padding: 1rem;
  overflow-y: auto;
}
/* The notice (UI.notice): large, centred, read at a glance. */
.mnotice { text-align: center; padding: 0.4rem 0.2rem 0; }
.mnotice-ic { display: inline-flex; color: var(--danger); margin-bottom: 0.6rem; }
.mnotice .mhead { font-size: 1.45rem; line-height: 1.25; margin-bottom: 0.9rem; }
.mnotice .mtext { font-size: 1.12rem; line-height: 1.5; margin: 0 0 0.7rem; }
.mnotice .mbtns { justify-content: stretch; margin-top: 1.3rem; }
.mnotice .mbtns .btn { flex: 1; font-size: 1.05rem; padding: 0.85rem 1rem; }
.mnotice .mbtns-stack { flex-direction: column; align-items: stretch; gap: 0.6rem; }
#scrim.on { display: flex; align-items: safe center; justify-content: center; }
#modal {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  width: 100%;
  max-width: 32rem;
  margin: 3vh auto;
  padding: 1.25rem;
  font-size: 1rem;
  max-height: calc(100vh - 6vh - 2rem);
  overflow-y: auto;
  box-shadow: var(--shadow-float);
}
#modal input {
  width: 100%;
  box-sizing: border-box;
  font: inherit;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--r-sm);
  padding: 0.55rem 0.7rem;
  margin: 0.4rem 0 0.2rem;
}
.mhead { font-weight: 700; font-size: 1.25rem; color: var(--ink); margin-bottom: 0.8rem; }
.mtext { font-size: 0.95rem; line-height: 1.5; color: var(--ink); margin: 0 0 0.8rem; }
.mbtns { margin-top: 1.1rem; display: flex; justify-content: flex-end; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
@media (max-width: 480px) { .mbtns { flex-direction: column-reverse; align-items: stretch; } }
.mbtns-stack { flex-direction: column; align-items: stretch; }
.diag { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.diag td { padding: 0.3rem 0.2rem; border-bottom: 1px solid var(--rule); word-break: break-all; }
.diag td:first-child { color: var(--muted); white-space: nowrap; }
.diag tr.diag-tap { cursor: pointer; }
/* The edge test (settings.js diagnostics): green behind the app, a red band on its top edge. */
html[data-edge-test], html[data-edge-test] body { background: #00c853 !important; }
html[data-edge-test]::backdrop { background: #00c853; }
html[data-edge-test] body::before { content: ''; position: fixed; top: 0; left: 0; right: 0; height: 3px; background: #ff1744; z-index: 2147483647; pointer-events: none; }

#toast {
  position: fixed;
  inset-inline-start: 50%;
  bottom: calc(var(--safe-b) + 7.5rem);
  transform: translateX(-50%) translateY(1rem);
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--rule);
  font-size: 0.85rem;
  line-height: 1.4;
  padding: 0.7rem 1rem;
  border-radius: var(--r-md);
  max-width: min(34rem, calc(100vw - 2rem));
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 90;
  box-shadow: var(--shadow-float);
}
#toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }
#toast.has-act { pointer-events: auto; }

/* ---------------------------------------------------------------------
   Controls
   --------------------------------------------------------------------- */

.btn {
  display: inline-block;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--accent-ink);
  background: var(--accent);
  border: 1px solid transparent;
  border-radius: var(--r-btn);
  padding: 0.7rem 1.3rem;
  min-height: 48px;
  cursor: pointer;
  text-align: center;
  transition: transform var(--m-tap) ease-out, opacity var(--m-tap) ease-out;
}
.btn:active { transform: scale(0.96); }
.btn.wide { display: block; width: 100%; }
.btn.ghost { background: var(--frost); color: var(--ink); border-color: var(--rule); font-weight: 500; }
/* The named PRIMARY of a screen: ITZA gold. Acting is blue, kept is gold -
   Start and Create are the two gold acts in this app. */
.btn.gold { background: var(--gold); color: #231c00; font-weight: 700; box-shadow: var(--shadow-float); }
.btn.danger { background: var(--danger); color: #fff; }
.btn[disabled] { opacity: 0.5; cursor: default; }
/* After .btn.wide, whose display would beat the hidden attribute (the expert's Forget button showed with nothing kept). */
.btn[hidden] { display: none; }
.linklike { background: none; border: none; color: var(--blue); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; padding: 8px; }

.tbtn {
  width: 44px; height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  border: none; border-radius: var(--r-btn);
  background: var(--frost);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  color: var(--ink);
  cursor: pointer;
  transition: transform var(--m-tap) ease-out;
}
.tbtn:active { transform: scale(0.92); }
/* The install guide's secondary text (itza-install-guide.js reads --iig-muted through boot.js's theme): navy on its
 * white card (owner, 2026-11-10: "change the text to navy blue - its too hard to see"), the guide's own grey in dark. */
:root { --ig-muted: #1f3a5f; }
@media (prefers-color-scheme: dark) { :root { --ig-muted: #d4dae6; } }   /* the guide's own grey was grey on grey (owner): a light slate instead */

/* The back-to-full-screen icon (fullscreen.js) is drawn in every bar and shown only when it is needed. */
.tbtn[hidden] { display: none; }

/* ---------------------------------------------------------------------
   The start screen (v1 7.2)
   --------------------------------------------------------------------- */

/* Centred, top to bottom and side to side (owner, 2026-10-21). */
#screen-start.on { display: flex; align-items: center; justify-content: center; }
.start-poster {
  position: absolute; inset: 0;
  /* The brand's own backdrop: a dark gradient with a warm glow where the
   * wordmark sits - no character here (owner, 2026-10-21). */
  background: radial-gradient(60% 40% at 50% 68%, rgba(245, 199, 17, 0.18), transparent 70%), linear-gradient(170deg, #1c2a3a 0%, #0b1016 60%, #06090d 100%);
  background-size: cover; background-position: center top;
}
.start-poster::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.05) 0%, rgba(0,0,0,0.25) 45%, rgba(0,0,0,0.75) 100%);
}
.start-card {
  position: relative;
  width: 100%;
  max-width: 30rem;
  padding: 24px;
  display: flex; flex-direction: column; align-items: center; gap: 16px;
  color: #eef1f5;
  text-align: center;
}
.start-card .btn, .start-card .fieldErr { width: 100%; }
/* THE WORDMARK - THE HOUSE STANDARD, as ITZA Tab carries it (owner,
 * 2026-10-21: "make that match"): the pyramid mark, ITZA in the
 * dark-context blue, the product word in metal gold, Roboto, no space. */
.brand { display: inline-flex; align-items: center; gap: 0.55rem; font-family: 'Roboto', var(--sans); font-size: clamp(1.55rem, 6vw, 1.9rem); letter-spacing: -0.01em; margin: 0; text-decoration: none; }
.brand-mark { width: 32px; height: 32px; }
/* On the start screen the mark sits ABOVE the wordmark, both centred
 * (owner, 2026-10-21). */
.start-card .brand { flex-direction: column; gap: 10px; }
.start-card .brand-mark { width: 56px; height: 56px; }
.wm { white-space: nowrap; font-family: 'Roboto', var(--sans); }
.wm-itza { color: #4d9bff; font-weight: 600; }
.wm-prod {
  color: var(--gold); font-weight: 800;
  background: linear-gradient(105deg, #8a6206 0%, #c99a10 22%, #f9df6d 40%, #f5c711 52%, #a67c08 72%, #e0b312 88%, #b98a0a 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.start-line { margin: 0; color: #d7dde6; font-size: 1.05rem; }
/* THE CREDIT under Start (owner, 2026-10-27: "made by ITZAStudios using ITZAGo - using nice writing"): the two names as wordmarks, as the app's own, joined by light italic words. */
/* What the companions are, under Start (owner, 2026-10-28; it was the front page's line). */
.start-about { margin: 2px 0 0; color: #aeb6c2; font-size: 0.92rem; line-height: 1.45; max-width: 26rem; text-wrap: balance; }
.start-credit { margin: 4px 0 0; display: flex; flex-wrap: wrap; align-items: baseline; justify-content: center; gap: 0.4em; color: #aeb6c2; font-size: 0.95rem; }
.start-credit .credit-word { font-style: italic; font-weight: 300; letter-spacing: 0.03em; }
.start-credit .wm { font-size: 1.08rem; letter-spacing: -0.005em; }
.start-go { font-size: 1.15rem; min-height: 56px; }

/* ---------------------------------------------------------------------
   Sign in - PORTED 1:1 FROM ITZA CHESS via ITZA DIARY (pillar 02). The only
   per-app changes: the h1, the tagline, the logo and the gate note.
   ALWAYS THE LIGHT CARD (owner, 2026-10-28: "I want the signing page light
   mode, not dark mode"), whatever the room's theme; the wordmark is the
   house one, blue into gold, as ITZA Tab's card wears it.
   --------------------------------------------------------------------- */

#screen-onboard{
  --ob-blue:#0c7ffb; --ob-blue-soft:#1d6fd0; --ob-gold:#f5c711;
  --ob-acc:#0c7ffb; --ob-acc-ink:#ffffff;
  --ob-bg:#f3f4f6; --ob-bg2:#ffffff; --ob-bg3:#f7f7f8;
  --ob-ink:#0b2a4a; --ob-ink2:#1e416b; --ob-ink3:#41618c;
  --ob-line:#d7dbe2; --ob-line2:#c5ccd6; --ob-hover:rgba(12,127,251,.06);
  --ob-card-shadow:var(--shadow-float);
  --ob-mono:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  --ob-r-sm:8px;
  --ob-danger:#c62828;
}
#screen-onboard{padding:0}
#screen-onboard.on{
  position:fixed; inset:0; z-index:50; display:flex; align-items:center; justify-content:center;
  padding:16px; overflow-y:auto; overscroll-behavior:contain;
  padding-top:calc(var(--safe-t) + 16px); padding-bottom:calc(var(--safe-b) + 16px);
  background:linear-gradient(to bottom,#ffffff 0,#ffffff 200px,var(--ob-blue) 200px,var(--ob-blue) 224px,var(--ob-bg) 224px);
}
#screen-onboard .obcard{
  width:100%; max-width:430px; margin:0; text-align:start;
  background:var(--ob-bg2); border:1px solid var(--ob-line); border-radius:22px;
  padding:22px; box-shadow:var(--ob-card-shadow); color:var(--ob-ink);
  font:13px/1.45 -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
}
#screen-onboard .hd{display:flex; align-items:center; gap:10px; margin-bottom:4px}
/* The wordmark at card scale (ITZA Tab's card): on the white card ITZA takes the light-context blue. */
#screen-onboard .brand{font-size:clamp(1.55rem, 6vw, 1.9rem); gap:0.55rem; margin:0}
#screen-onboard .brand-mark{width:32px; height:32px}
#screen-onboard .wm-itza{color:#0c7ffb}
#screen-onboard .tag{font-size:11.5px; color:var(--ob-ink2); margin-bottom:14px}
#screen-onboard .tag b{color:#8d6f00}
#screen-onboard label{display:block; margin:12px 0 4px; font-size:11.5px; color:var(--ob-ink2); font-weight:600; text-align:start}
#screen-onboard input,#screen-onboard textarea{
  width:100%; box-sizing:border-box; font:inherit; color:var(--ob-ink); background:var(--ob-bg3);
  border:1px solid var(--ob-line2); border-radius:var(--ob-r-sm); padding:6px 9px; outline:none;
}
#screen-onboard input:focus,#screen-onboard textarea:focus{border-color:var(--ob-acc)}
#screen-onboard ::placeholder{color:var(--ob-ink3)}
#screen-onboard .obtoggle{display:flex; gap:4px; margin-bottom:12px}
#screen-onboard .obtoggle button{flex:1; font-size:11.5px; padding:6px; border-radius:var(--ob-r-sm); border:1px solid var(--ob-line2); color:var(--ob-ink2); background:none; cursor:pointer}
#screen-onboard .obtoggle button.on{border-color:var(--ob-acc); color:var(--ob-ink); background:var(--ob-hover); font-weight:700}
#screen-onboard .row2{display:flex; gap:8px}
#screen-onboard .row2 .btn,#screen-onboard .row2 input{flex:1; min-width:0}
#screen-onboard .btn{
  background:linear-gradient(135deg,var(--ob-acc),var(--ob-blue-soft)); color:var(--ob-acc-ink);
  font-weight:700; font-size:12.5px; padding:8px 16px; min-height:0; border-radius:var(--r-btn); border:none; cursor:pointer;
  box-shadow:var(--shadow-card);
}
#screen-onboard .btn:disabled{opacity:.45; cursor:default; box-shadow:none}
#screen-onboard .btn.ghost{background:var(--ob-bg3); color:var(--ob-ink); border:1px solid var(--ob-line2); font-weight:600; box-shadow:none}
#screen-onboard .btn.gold{background:var(--ob-gold); color:#231c00; box-shadow:none}
#screen-onboard .btn.wide{width:100%}
#screen-onboard .feenote{font-size:10px; color:var(--ob-ink3); text-align:start; margin-top:0}
#screen-onboard .feenote b{color:var(--ob-ink2)}
#screen-onboard .linklike{display:block; margin:14px auto 0; background:none; border:none; color:var(--ob-blue); font-size:12px; cursor:pointer; text-decoration:underline; text-underline-offset:3px}
#screen-onboard .qrframe{display:flex; justify-content:center; margin:6px 0 2px}
#screen-onboard #obQrBox{width:190px; height:190px; border-radius:12px; background:#fff; border:1px solid var(--ob-line); display:flex; align-items:center; justify-content:center; position:relative}
#screen-onboard #obQrBox .qrph{font-family:var(--ob-mono); font-size:34px; color:var(--ob-line2); letter-spacing:2px}
/* Sits under the username (placement rule, 2026-10-21): tight below so it reads as part of that field. */
#screen-onboard .savekey{display:flex; gap:10px; align-items:flex-start; margin:10px 0 2px; font-size:11.5px; line-height:1.4; color:var(--ob-ink2); font-weight:400; cursor:pointer}
#screen-onboard .savekey input{width:auto; margin-top:2px}
#screen-onboard .settingsec{border-top:1px solid var(--ob-line); margin-top:12px; padding-top:10px}
#screen-onboard .settingsec h4{font-size:11px; text-transform:uppercase; letter-spacing:.07em; color:var(--ob-ink3); margin-bottom:6px}
#screen-onboard .spinner{display:inline-block; width:13px; height:13px; border:2px solid var(--ob-line2); border-top-color:var(--ob-blue); border-radius:50%; animation:spin .8s linear infinite; vertical-align:-2px; margin-inline-end:4px}
@keyframes spin{to{transform:rotate(360deg)}}
#screen-onboard #obChoose{ display:flex; flex-direction:column; gap:10px; margin:16px 0 4px; }
#screen-onboard #obChoose .btn{ height:46px; font-size:15px; font-weight:700; }
#screen-onboard #obBack{ margin-top:0; margin-bottom:10px; display:inline-block; }
.pwwrap{ position:relative; display:block; }
.pwwrap input{ width:100%; padding-inline-end:44px; }
.pweye{
  position:absolute; top:50%; inset-inline-end:6px; transform:translateY(-50%);
  width:32px; height:32px; display:flex; align-items:center; justify-content:center;
  border-radius:8px; color:var(--ob-ink3); cursor:pointer; padding:0;
  background:none; border:none;
}
.pweye svg{ width:20px; height:20px; display:block; }
.pweye.on{ color:var(--ob-acc); }
#screen-onboard .pwwrap input{ padding-inline-end:44px; }
#screen-onboard .fieldErr{ color:#c62828; border-color:#c62828; background:rgba(198,40,40,.07); }
html[data-theme="hc"] #screen-onboard .fieldErr{ color:#8c0000; border-color:#8c0000; background:rgba(140,0,0,.10); }
#screen-onboard input.err{ border-color:#c62828; box-shadow:0 0 0 3px rgba(198,40,40,.16); }
.obWarnBig{ border:2px solid var(--danger); border-radius:12px; padding:14px 16px; margin:4px 0 6px; font-size:1rem; line-height:1.55; }
.aw-wrote { display:flex; align-items:flex-start; gap:10px; font-size:0.9rem; line-height:1.5; margin:14px 2px; cursor:pointer; }
.aw-wrote input { width:1.1em; height:1.1em; margin-top:0.15em; accent-color:var(--gold); }
#screen-onboard .feenote.gate{ margin-top:14px; }


/* ---------------------------------------------------------------------
   Settings, first run, the bar
   --------------------------------------------------------------------- */

.tbar {
  position: sticky; top: 0; z-index: 2;
  display: flex; align-items: center; gap: 10px;
  padding: calc(var(--safe-t) + 10px) 12px 10px;
  background: var(--frost);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--rule);
}
.tbar h2 { margin: 0; font-size: 1.1rem; font-weight: 700; }
/* A button AFTER the title (the gallery's hamburger) sits at the far end (owner, 2026-10-21). */
.tbar h2 + .tbtn { margin-inline-start: auto; }
/* Bare icons in every bar, as on the talk screen: no disc behind them (owner, 2026-10-21). */
.tbar .tbtn { background: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; }
.tbar h2 + .tbtn + .tbtn { margin-inline-start: 0; }
/* With the full-screen icon away, the button after it is the one that sits at the far end. */
.tbar h2 + .fs-full[hidden] + .tbtn { margin-inline-start: auto; }
html[dir='rtl'] .tbar .tbtn svg { transform: scaleX(-1); }

.set-list { max-width: 32rem; margin: 0 auto; padding: 8px 16px calc(var(--safe-b) + 32px); }

/* SETTINGS IN THE HOUSE FORM (ITZA Tab's; owner, 2026-10-21): the identity
 * card, a rail of tabs with the lit one, rows with the label left and the
 * value or a small action right, quiet notes, a real switch. */
.set-id { display: flex; align-items: center; gap: 12px; padding: 12px; margin-bottom: 12px; border: 1px solid var(--rule); border-radius: var(--r-md); background: color-mix(in srgb, var(--surface) 60%, transparent); }
.set-avatar { flex: none; width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--r-sm); background: var(--gold); color: #1a1400; font-weight: 800; letter-spacing: 0.02em; }
.set-avatar.has-pic { background-size: cover; background-position: center; color: transparent; }
.set-who { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.set-facebtns { display: flex; gap: 14px; }
.mlink { background: none; border: none; padding: 0; font: inherit; font-size: 0.82rem; color: var(--accent); cursor: pointer; }
.set-who b { font-size: 1.05rem; }
.set-who .setNote { margin: 0; }
.set-tabs { display: flex; flex-wrap: nowrap; gap: 6px; padding: 4px; margin: -4px -4px 8px; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.set-tabs::-webkit-scrollbar { display: none; }
@media (min-width: 768px) { .set-tabs { justify-content: center; } }
.set-tab { flex: none; white-space: nowrap; background: transparent; color: var(--ink); border: 1px solid var(--rule); border-radius: var(--r-sm); padding: 0.45rem 0.8rem; font: inherit; font-size: 0.88rem; cursor: pointer; transition: transform var(--m-tap) ease-out; }
.set-tab:active { transform: scale(0.96); }
.set-tab.on { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.setRow { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.6rem 1rem; padding: 0.6rem 0; border-bottom: 1px solid var(--rule); }
.setRow > span:first-child { flex: 1; }
.setRow[hidden] { display: none; }
.setRow select, .setSel { font: inherit; font-size: 0.82rem; padding: 0.3rem 0.4rem; border: 1px solid var(--rule); border-radius: var(--r-sm); background: transparent; color: var(--ink); }
/* The list a select opens is the browser's own white panel: its options
 * must not inherit the page's light ink (seen 2026-10-21: an invisible
 * language list). Dark on white, whatever the theme. */
.setRow select option, .setSel option { color: #111; background: #fff; }
.setNote { font-size: 0.78rem; color: var(--muted); margin: 6px 0 13px; line-height: 1.45; }
.verVal { font-size: 0.8rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.verVal.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.rv-label { display: block; font-size: 0.78rem; color: var(--muted); margin: 10px 0 6px; }
.fact { display: flex; justify-content: space-between; gap: 1rem; padding: 0.45rem 0; font-size: 0.85rem; }
.fact-label { color: var(--muted); }
.fact-value { color: var(--ink); font-variant-numeric: tabular-nums; }
/* The small row actions wear the tabs' shape, not the big button's pill (owner, 2026-10-21). */
.btn.sm { padding: 0.45rem 0.8rem; font-size: 0.88rem; min-height: 0; height: auto; line-height: 1.2; border-radius: var(--r-sm); }
.btn.ghost.danger { background: transparent; color: var(--danger); border-color: var(--danger); }   /* the filled danger button hid its own text (seen 2026-10-21) */
.switch { position: relative; display: inline-block; width: 46px; height: 28px; flex: none; }
.switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.switch i { position: absolute; inset: 0; border-radius: var(--r-full); background: color-mix(in srgb, var(--rule) 70%, var(--muted)); transition: background var(--m-quick); pointer-events: none; }
.switch i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--surface); box-shadow: var(--shadow-card); transition: transform var(--m-quick) var(--ease-enter); }
.switch input:checked + i { background: var(--accent); }
.switch input:checked + i::after { transform: translateX(18px); }
html[dir='rtl'] .switch input:checked + i::after { transform: translateX(-18px); }


/* Text size calibrator (Diary's) */
.tsc { display: flex; flex-direction: column; min-height: 40vh; }
.tsc-head { margin: 0 0 0.8rem; }
.tsc-sample { flex: 1; overflow-y: auto; background: var(--paper); border: 1px solid var(--rule); border-radius: 10px; padding: 1rem 1.1rem; }
.tsc-sample p { margin: 0; line-height: 1.55; }
.tsc-bar { position: sticky; bottom: 0; padding: 12px 0 8px; background: var(--surface); }
.tsc-steps { display: flex; gap: 10px; margin-bottom: 10px; }
.tsc-btn { flex: 1 1 0; min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--rule); border-radius: var(--r-btn); background: var(--paper); color: var(--ink); cursor: pointer; }
.tsc-a { font-size: 14px; line-height: 1; }
.tsc-A { font-size: 24px; line-height: 1; font-weight: 600; }
.tsc-ch { display: inline-flex; }
.tsc-ch.up svg { transform: rotate(180deg); }
.tsc-btn.dim { opacity: 0.35; }
.sr-live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Sheets (the lock's setup) */
.scrim2 { position: fixed; inset: 0; z-index: 80; background: rgba(0, 0, 0, 0.5); opacity: 0; transition: opacity var(--m-quick); }
.scrim2.on { opacity: 1; }
.sheet {
  position: fixed; inset-inline-start: 50%; transform: translate(-50%, 105%); bottom: 0; z-index: 81;
  width: min(100%, 30rem); max-height: 86vh; overflow-y: auto;
  /* The padding counts inside the width (2026-10-28): without it a sheet on a phone was 36px wider than the
   * screen and every sheet lost 18px of text at each edge. */
  box-sizing: border-box;
  background: var(--surface); color: var(--ink);
  border-radius: var(--r-lg) var(--r-lg) 0 0; box-shadow: var(--shadow-float);
  padding: 8px 18px calc(var(--safe-b) + 18px);
  transition: transform var(--m-enter) var(--ease-enter);
}
.sheet.on { transform: translate(-50%, 0); }
.sheet-grab { width: 38px; height: 4px; border-radius: var(--r-full); background: var(--rule); margin: 6px auto 12px; }
.sheet h3 { font-size: 1.1rem; margin: 0 0 10px; }
.se-note { color: var(--muted); font-size: 0.85rem; }
.sheet-row { display: flex; align-items: center; gap: 14px; width: 100%; border: none; background: transparent; text-align: start; padding: 13px 2px; font: inherit; color: var(--ink); cursor: pointer; border-bottom: 1px solid var(--rule); }
.sheet-row:last-child { border-bottom: none; }
.sheet-row svg { width: 20px; height: 20px; color: var(--muted); flex: none; }
.sheet-row.danger, .sheet-row.danger svg { color: var(--danger); }
.mform label { display: block; margin: 10px 0 4px; font-size: 0.9rem; color: var(--muted); }

/* The lock (Tab's) */
.lockgate { position: fixed; inset: 0; z-index: 300; background: var(--paper); display: flex; align-items: center; justify-content: center; padding: 20px; }
.lock-card { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-float); padding: 26px 22px; max-width: 21rem; width: 100%; display: flex; flex-direction: column; align-items: center; gap: 12px; color: var(--ink); }
.lock-card > svg { color: var(--gold); }
.lock-title { font-size: 1.15rem; font-weight: 700; margin: 0; }
.lock-dots { display: flex; gap: 10px; min-height: 14px; }
.lock-dots i { width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid var(--muted); display: inline-block; }
.lock-dots i.on { background: var(--accent); border-color: var(--accent); }
.lock-dots.err i { border-color: var(--danger); }
.lock-pad { display: grid; grid-template-columns: repeat(3, 64px); gap: 10px; justify-content: center; }
.lock-key { height: 54px; border: 1px solid var(--rule); border-radius: var(--r-md); background: transparent; color: var(--ink); font-size: 1.2rem; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.lock-key:active { transform: scale(0.94); }
.lock-note { font-size: 0.78rem; color: var(--muted); text-align: center; margin: 4px 0 0; }

/* The offline pill */
.offline-pill {
  position: fixed; top: calc(var(--safe-t) + 64px); inset-inline-start: 50%; transform: translateX(-50%); z-index: 60;
  display: flex; align-items: center; gap: 8px;
  background: var(--frost); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border: 1px solid var(--rule); border-radius: var(--r-full);
  color: var(--ink); font-size: 0.8rem; padding: 6px 10px 6px 14px; cursor: pointer; text-align: start;
}
.offline-pill[hidden] { display: none !important; }
.offline-pill .offline-x { flex: none; width: 20px; height: 20px; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--r-btn); background: rgba(127, 127, 127, 0.25); font-size: 0.9rem; line-height: 1; }

/* The noscript article */
.article { max-width: 32rem; margin: 10vh auto; padding: 0 20px; }


/* The app's own confirm, asked from the lock screen, stands over it (lock.js). */
#scrim.over-lock { z-index: 310; }

/* THE LANGUAGE DOOR (boot.js, ITZA Tab's in shape): the first question, pre-answered. */
.langcard { max-width: 30rem; margin: 0 auto; padding: calc(var(--safe-t) + 28px) 20px calc(var(--safe-b) + 24px); display: flex; flex-direction: column; gap: 14px; height: 100%; box-sizing: border-box; }
.langcard h1 { font-size: 1.5rem; margin: 0 0 4px; color: var(--ink); }
.langlist { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; border: 1px solid var(--rule); border-radius: var(--r-md); background: var(--surface); }
.langrow { display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 14px; border: 0; border-bottom: 1px solid var(--rule); background: transparent; color: var(--ink); font: inherit; font-size: 1rem; text-align: start; cursor: pointer; }
/* The list clips at its rounded corners: the first and last rows take the same radius so the gold outline of a chosen row at either end is not cut (owner, 2026-11-10). */
.langrow:first-child { border-radius: var(--r-md) var(--r-md) 0 0; }
.langrow:last-child { border-bottom: 0; border-radius: 0 0 var(--r-md) var(--r-md); }
.langrow.on { background: color-mix(in srgb, var(--gold) 14%, transparent); outline: 2px solid var(--gold); outline-offset: -2px; }
.langflag { flex: none; width: 24px; display: inline-flex; }
.langflag svg { width: 24px; height: 16.5px; border-radius: 2px; display: block; }
.langname { flex: 1; }
.langen { color: var(--muted); font-size: 0.82rem; }
.lang-note { margin: 0; color: var(--muted); font-size: 0.85rem; text-align: center; }
#screen-lang { background: var(--paper); }

/* NO ZOOM ON A TAP (owner, 2026-10-28, iPhone Safari: the name screen after sign-in came up "too wide", then
 * shrank back on a tap in its field). Safari zooms into any field whose text is under 16px when it is tapped,
 * and keeps that zoom on the next screen: the sign-in fields were 13px. On a touch screen every field writes at
 * 16px or more, its own size when that is bigger; the desktop keeps the sizes above. */
@media (pointer: coarse) {
  #screen-onboard input, #screen-onboard textarea { font-size: max(16px, 1rem); }
  .setRow select, .setSel, #modal input, #modal textarea, #modal select { font-size: max(16px, 1rem); }
}

/* THE MONEY (2026-10-28; money.js): the first-conversation sheet and Settings > Billing. */
.money-sheet { padding: 4px 4px 8px; }
.money-line { margin: 0 0 8px; font-size: 1.05rem; color: var(--ink); line-height: 1.4; }
.money-sub { margin: 0 0 6px; color: var(--muted); font-size: 0.92rem; }
.money-short { color: var(--danger); }
.money-btns { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.bill-add { display: inline-flex; gap: 8px; align-items: center; }
.bill-add input { width: 6.5rem; padding: 0.35rem 0.5rem; border: 1px solid var(--rule); border-radius: var(--r-sm); background: transparent; color: var(--ink); font: inherit; }
.bill-note { margin: 10px 2px 0; color: var(--muted); font-size: 0.88rem; line-height: 1.4; }
@media (pointer: coarse) { .bill-add input { font-size: max(16px, 1rem); } }
.bill-head { margin: 22px 2px 6px; font-size: 0.95rem; color: var(--ink); }
/* The not-enough sheet's price line is the summary's own row (make.js): the label and the dollars, no padding of its own. */
.money-sheet .fact { padding: 0 0 6px; font-size: 1rem; }


/* The theme swatches (Settings > Look): each theme as a small picture of its own room. */
.sw-row { display: flex; gap: 10px; padding: 4px 4px 14px; border-bottom: 1px solid var(--rule); overflow-x: auto; }
.sw-swatch { flex: none; width: 88px; border: 2px solid transparent; border-radius: 12px; background: transparent; padding: 3px; cursor: pointer; display: flex; flex-direction: column; gap: 4px; align-items: center; color: var(--muted); font-size: 0.78rem; }
.sw-swatch.on { border-color: var(--accent); color: var(--ink); }
.sw-card { display: block; width: 78px; height: 52px; border-radius: 8px; position: relative; overflow: hidden; border: 1px solid rgba(0,0,0,0.15); }
.sw-bar { position: absolute; top: 0; inset-inline: 0; height: 12px; }
.sw-line { position: absolute; top: 22px; inset-inline: 10px; height: 4px; border-radius: 2px; }
.sw-dots { position: absolute; bottom: 8px; inset-inline-start: 10px; display: flex; gap: 6px; }
.sw-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.sw-deep { background: #0b1016; } .sw-deep .sw-bar { background: #121923; } .sw-deep .sw-line { background: #263140; } .sw-deep .sw-dot-accent { background: #4d9bff; } .sw-deep .sw-dot-gold { background: #f5c711; }
.sw-paper { background: #fbfaf7; } .sw-paper .sw-bar { background: #0b2a4a; } .sw-paper .sw-line { background: #e2ded6; } .sw-paper .sw-dot-accent { background: #0b2a4a; } .sw-paper .sw-dot-gold { background: #f5c711; }
.sw-dark { background: #14171c; } .sw-dark .sw-bar { background: #1b2027; } .sw-dark .sw-line { background: #2b3038; } .sw-dark .sw-dot-accent { background: #6fb3ff; } .sw-dark .sw-dot-gold { background: #f5c711; }
.sw-hc { background: #000; } .sw-hc .sw-bar { background: #fff; } .sw-hc .sw-line { background: #fff; } .sw-hc .sw-dot-accent { background: #fff; } .sw-hc .sw-dot-gold { background: #ffd84d; }

/* =====================================================================
   ITZA Memory's own screens
   ===================================================================== */

/* A wait, said plainly: a spinner beside words, never a blank page. */
.loading { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 28px 16px; color: var(--muted); font-size: 0.95rem; }
.spinner { display: inline-block; width: 1em; height: 1em; border: 2px solid currentColor; border-inline-end-color: transparent; border-radius: 50%; vertical-align: -0.15em; animation: spin 0.8s linear infinite; }
.spinner.big { width: 34px; height: 34px; border-width: 3px; color: var(--gold); }
.toast-act { margin-inline-start: 8px; background: none; border: 0; color: var(--accent); font: inherit; font-weight: 700; cursor: pointer; }

/* Sheets as this app uses them: a title, a line, stacked buttons. */
.sheet-title { margin: 4px 0 8px; font-size: 1.2rem; font-weight: 700; color: var(--ink); }
.sheet-note { margin: 0 0 12px; color: var(--muted); font-size: 0.95rem; line-height: 1.5; }
.sheet-btns { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.crop-sheet, .mine-sheet, .ask-sheet { padding: 4px 4px 10px; }
.mine-sheet .sheet-note { color: var(--ink); font-size: 1.02rem; }
.crop-wrap { display: flex; justify-content: center; border-radius: var(--r-md); overflow: hidden; background: #000; }
.crop-wrap canvas { display: block; max-width: 100%; max-height: 52vh; touch-action: pan-x pan-y; cursor: crosshair; }
/* The place's crop (owner, 2026-11-10): the gold box is drawn on the canvas and dragged, so the finger must not
 * scroll the sheet. */
.crop-wrap canvas.shape { touch-action: none; cursor: grab; }
.crop-wrap canvas.shape.drag { cursor: grabbing; }
.crop-size { display: block; margin-top: 12px; }
.pick-list { display: flex; flex-direction: column; gap: 8px; max-height: 56vh; overflow-y: auto; }
.pick-row { width: 100%; text-align: start; padding: 12px 14px; border: 1px solid var(--rule); border-radius: var(--r-md); background: var(--surface); color: var(--ink); font: inherit; font-size: 1rem; line-height: 1.4; cursor: pointer; transition: transform var(--m-tap) ease-out; }
.pick-row:active { transform: scale(0.98); }

/* ---------------------------------------------------------------------
   My films
   --------------------------------------------------------------------- */

.pane[data-route="films"] .tbar { position: static; background: none; -webkit-backdrop-filter: none; backdrop-filter: none; border-bottom: 0; }
.pane[data-route="films"] .tbar h2 { font-size: 1.5rem; }
/* The button and the list sit in the middle of the screen while they are short (owner, 2026-11-10: "the button
 * centered, not at the top"); a long list scrolls as before. Auto margins in a flex column do both. */
.pane[data-route="films"] { display: flex; flex-direction: column; }
.pane[data-route="films"] .tbar { flex: none; }
.fl-body { width: 100%; max-width: 34rem; margin: auto; padding: 4px 16px calc(var(--safe-b) + 32px); box-sizing: border-box; }
.fl-body > .btn svg { vertical-align: -0.2em; }
/* Carry on (owner, 2026-11-11: it sat flush on "Make a new film" in a colour of its own): quiet, with air under it. */
#flCarry { margin-bottom: 10px; }
#flList { margin-top: 16px; display: flex; flex-direction: column; gap: 12px; }
.fl-card { display: flex; align-items: stretch; gap: 12px; width: 100%; box-sizing: border-box; padding: 10px; border: 1px solid var(--rule); border-radius: var(--r-lg); background: var(--surface); color: var(--ink); font: inherit; text-align: start; box-shadow: var(--shadow-card); }
button.fl-card { cursor: pointer; transition: transform var(--m-tap) ease-out; }
button.fl-card:active { transform: scale(0.985); }
.fl-thumb { position: relative; flex: none; width: 84px; aspect-ratio: 9 / 16; border-radius: var(--r-md); overflow: hidden; background: #0b1016; display: flex; align-items: center; justify-content: center; }
.fl-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.fl-thumb img:not([src]) { visibility: hidden; }
.fl-card.making .fl-thumb img { opacity: 0.45; }
.fl-thumb .spinner { position: relative; }
.fl-play { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; background: rgba(0, 0, 0, 0.45); color: #fff; }
.fl-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 4px; }
.fl-meta b { font-size: 1.02rem; line-height: 1.3; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.fl-meta span { font-size: 0.9rem; color: var(--ink); }
.fl-sub, .fl-meta .fl-sub { font-size: 0.82rem; color: var(--muted); }
.fl-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
/* The i of a film (owner, 2026-11-11): at the card's right edge, beside the card's own tap, not inside it. */
.fl-held { position: relative; }
.fl-card.withinfo { position: relative; }
.withinfo .fl-meta { padding-inline-end: 36px; }
.fl-info { position: absolute; top: 8px; inset-inline-end: 8px; z-index: 1; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border: 0; border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer; }
.fl-info:active { background: var(--rule); color: var(--ink); }
.fl-card.ended { border-color: color-mix(in srgb, var(--danger) 55%, var(--rule)); }
.fl-empty { text-align: center; color: var(--muted); padding: 40px 12px; }
.fl-empty p { margin: 0 0 6px; }
.fl-empty p:first-child { color: var(--ink); font-size: 1.1rem; }
.fl-off { text-align: center; margin: 0; }

/* ---------------------------------------------------------------------
   Making a film: the page every step shares
   --------------------------------------------------------------------- */

.pane[data-route="new"] { display: flex; flex-direction: column; overflow: hidden; }
.pane[data-route="new"] .tbar { flex: none; position: static; }
.mk-count { margin-inline-start: auto; color: var(--muted); font-size: 0.85rem; font-variant-numeric: tabular-nums; }
.mk-bar { flex: none; height: 3px; background: var(--rule); overflow: hidden; }
.mk-bar i { display: block; height: 100%; background: var(--gold); transform-origin: left center; transition: transform var(--m-enter) var(--ease-enter); }
html[dir='rtl'] .mk-bar i { transform-origin: right center; }
.mk-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; width: 100%; max-width: 34rem; margin: 0 auto; padding: 18px 16px 24px; box-sizing: border-box; }
/* A short step sits in the middle of the screen, not at the top (owner, 2026-11-10: "why does the slider have to be
 * at the very top"); a step taller than the screen still starts at the top and scrolls. The body is a flex column
 * with a spacer before and after its children that share the spare room - they centre what fits and shrink to
 * nothing for what does not. Spacers, not auto margins on the first and last child: a last child that is hidden (an
 * empty note, display:none) took its margin with it and the whole step sank to the bottom (owner, 2026-11-11:
 * "this should be vertically aligned properly in the center", the first-look step). */
.mk-body { display: flex; flex-direction: column; align-items: stretch; }
.mk-body::before, .mk-body::after { content: ''; flex: 1 1 0; min-height: 0; }
/* No child is squeezed to make a tall step fit: the body scrolls instead (2026-11-10, a phone-high place step
 * shrank its tab row - which clips its overflow - to two pixels). */
.mk-body > * { flex-shrink: 0; }
.mk-foot { flex: none; width: 100%; max-width: 34rem; margin: 0 auto; padding: 10px 16px calc(var(--safe-b) + 14px + var(--kb)); box-sizing: border-box; background: var(--paper); border-top: 1px solid var(--rule); }
.mk-foot .fieldErr { margin: 0 0 8px; }
.mk-foot .fieldErr[hidden] { display: none; }
/* The scroll gate's line (make.js): "Scroll down to see every choice", over a Next that waits for it. */
.mk-more { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 0 0 8px; font-size: 0.85rem; color: var(--muted); line-height: 1.3; }
.mk-more[hidden] { display: none; }
.mk-foot .btn:disabled { opacity: 0.45; cursor: default; }
.mk-lead { margin: 0 0 14px; font-size: 1.15rem; line-height: 1.4; color: var(--ink); font-weight: 600; }
.mk-note { margin: 10px 0 0; font-size: 0.85rem; color: var(--muted); line-height: 1.45; }
.mk-note:empty { display: none; }
.mk-tips { margin: 18px 0 0; padding-inline-start: 1.2em; color: var(--muted); font-size: 0.9rem; line-height: 1.6; }
.mk-label { display: block; font-size: 0.85rem; color: var(--muted); margin: 14px 0 6px; }
.mk-text, .mk-in, .mk-sel { width: 100%; box-sizing: border-box; font: inherit; font-size: 1rem; color: var(--ink); background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-md); padding: 0.7rem 0.8rem; }
.mk-text { resize: vertical; min-height: 3.2rem; line-height: 1.45; }
.mk-text:focus, .mk-in:focus, .mk-sel:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.mk-sel option { color: #111; background: #fff; }
.mk-num { max-width: 8rem; }
.mk-in[hidden] { display: none; }
@media (pointer: coarse) { .mk-text, .mk-in, .mk-sel { font-size: max(16px, 1rem); } }

/* A choice of two or three, side by side. */
.seg { display: flex; gap: 0; border: 1px solid var(--rule); border-radius: var(--r-md); overflow: hidden; background: var(--surface); }
/* A segmented control that follows another control in a step keeps its distance (owner, 2026-11-10: the shape select
 * and "Use a photo / Describe it" sat squashed together). */
.mk-body > .seg { margin-top: 14px; }
.seg-b { flex: 1; padding: 0.65rem 0.5rem; border: 0; border-inline-start: 1px solid var(--rule); background: transparent; color: var(--ink); font: inherit; font-size: 0.95rem; cursor: pointer; }
.seg-b:first-child { border-inline-start: 0; }
.seg-b.on { background: var(--accent); color: var(--accent-ink); font-weight: 700; }
.seg.sm { display: inline-flex; }
.seg.sm .seg-b { flex: none; padding: 0.35rem 0.8rem; font-size: 0.85rem; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 4px; }
.chip { padding: 0.4rem 0.8rem; border: 1px solid var(--rule); border-radius: var(--r-full); background: transparent; color: var(--ink); font: inherit; font-size: 0.85rem; cursor: pointer; }
.chip:active { transform: scale(0.96); }

/* 1 and 2: the photos */
.ph-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.ph-tile { position: relative; aspect-ratio: 3 / 4; border-radius: var(--r-md); overflow: hidden; background: var(--surface); border: 1px solid var(--rule); }
.ph-pic { display: block; width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: pointer; }
.ph-pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph-pic img:not([src]) { visibility: hidden; }
.ph-main { position: absolute; inset-inline-start: 6px; bottom: 6px; padding: 2px 8px; border-radius: var(--r-full); background: var(--gold); color: #231c00; font-size: 0.72rem; font-weight: 700; }
.ph-x { position: absolute; top: 4px; inset-inline-end: 4px; width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 50%; background: rgba(0, 0, 0, 0.6); color: #fff; cursor: pointer; }
.ph-add { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; border: 2px dashed var(--rule); background: transparent; color: var(--muted); font: inherit; font-size: 0.85rem; cursor: pointer; }
.ph-add:active { transform: scale(0.97); }

/* 3: the place */
.sc-body { margin-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.sc-body .mk-label { margin-top: 0; }
.sc-pic, .fr-pic { position: relative; border-radius: var(--r-lg); overflow: hidden; background: #0b1016; display: flex; justify-content: center; box-shadow: var(--shadow-card); }
/* SEE IT LARGER (owner, 2026-11-10): a frosted disc in the picture's top-right corner opens the lightbox; the place
 * picture opens on a tap too (the first look's tap draws the box, so there only the disc opens it). */
.pic-expand { position: absolute; top: 8px; inset-inline-end: 8px; z-index: 1; width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 50%; background: rgba(20, 24, 30, 0.55); color: #fff; cursor: pointer; pointer-events: auto; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.sc-pic img { cursor: zoom-in; }
.lightbox { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; background: rgba(0, 0, 0, 0.94); touch-action: none; overscroll-behavior: contain; }
.lightbox .lb-img { display: block; max-width: 100%; max-height: 100%; object-fit: contain; transform-origin: center center; will-change: transform; user-select: none; -webkit-user-drag: none; cursor: grab; }
.lightbox .lb-x { position: absolute; top: calc(var(--safe-t) + 10px); inset-inline-end: 10px; color: #fff; background: rgba(20, 24, 30, 0.55); border-radius: 50%; }
.sc-pic img, .fr-pic img { display: block; max-width: 100%; max-height: 46vh; object-fit: contain; }
.sc-pic img:not([src]), .fr-pic img:not([src]) { min-height: 30vh; visibility: hidden; }
/* THE CROP DISC (owner, 2026-11-14: "an icon bottom right under the zoom image"): the same frosted disc as the
 * viewer's, in the bottom corner; ringed in gold while a crop stands, with Undo crop a disc to its left. */
.pic-crop, .pic-uncrop { position: absolute; bottom: 8px; z-index: 1; width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 50%; background: rgba(20, 24, 30, 0.55); color: #fff; cursor: pointer; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.pic-crop { inset-inline-end: 8px; }
.pic-uncrop { inset-inline-end: 52px; }
.pic-crop.on { color: var(--gold); box-shadow: 0 0 0 2px var(--gold); }
/* "Reuse photo" (owner, 2026-11-10): an arrow each side of the picture, the count under it. */
.sc-reuse, .sc-place { display: flex; flex-direction: column; gap: 6px; }
.sc-arrow { position: absolute; top: 50%; z-index: 1; width: 42px; height: 42px; margin-top: -21px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 50%; background: rgba(20, 24, 30, 0.6); color: #fff; cursor: pointer; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.sc-arrow.prev { inset-inline-start: 8px; }
.sc-arrow.next { inset-inline-end: 8px; }
.sc-arrow:disabled { opacity: 0.3; cursor: default; }
[dir="rtl"] .sc-arrow svg { transform: scaleX(-1); }
.sc-count { margin: 0; text-align: center; color: var(--muted); font-size: 0.85rem; }
/* THE PLACE CAROUSEL (owner, 2026-11-14: "on a mobile you can swipe to change or arrows on desktop"): the box is a
 * strip of one group's places that snaps a place at a time, no gap, so the slide in front is scrollLeft / width.
 * A phone swipes, so its arrows go. */
.sc-car { display: flex; width: 100%; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.sc-car::-webkit-scrollbar { display: none; }
.sc-slide { flex: 0 0 100%; display: flex; justify-content: center; scroll-snap-align: center; scroll-snap-stop: always; }
@media (hover: none) and (pointer: coarse) { .sc-stock .sc-arrow { display: none; } }
/* The groups' icons, each with its name under it, in one row that scrolls sideways when it must; the group shown is
 * ringed in gold. */
.sc-groups { display: flex; gap: 6px; overflow-x: auto; overflow-y: hidden; padding: 3px 2px 4px; scrollbar-width: none; overscroll-behavior-x: contain; }
.sc-groups::-webkit-scrollbar { display: none; }
.sc-gbtn { flex: 1 0 64px; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 4px; border: 1px solid var(--rule); border-radius: var(--r-md); background: var(--surface); color: var(--ink); font: inherit; font-size: 0.7rem; line-height: 1.15; cursor: pointer; }
.sc-gbtn span { text-align: center; }
.sc-gbtn.on { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold); }
.sc-gbtn:active { transform: scale(0.97); }

/* 4: the words */
/* The role row (owner, 2026-11-10): "As" at the start, then the five buttons as one joined segment like every other
 * choice row (owner: "formatted like the rest"); the longer names wrap inside their cell on a narrow phone. */
.as-row { display: flex; align-items: center; gap: 10px; margin: 0 0 6px; }
.as-row .mk-label { margin: 0; flex: none; }
.as-seg { flex: 1; min-width: 0; }
.as-seg .seg-b { flex: 1 1 auto; padding: 0.5rem 0.3rem; font-size: 0.85rem; line-height: 1.2; min-width: 0; white-space: normal; }
@media (max-width: 400px) { .as-seg .seg-b { font-size: 0.78rem; padding-inline: 0.2rem; } }
.as-note { margin: 0 0 14px; }
.names { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; margin-bottom: 6px; }
.names .mk-label { grid-row: 1; margin-top: 0; }
.names .mk-in { grid-row: 2; }
/* The saved word sets (owner, 2026-11-10): numbered 36px squares in a row that scrolls sideways, the open one gold. */
.ws { margin-top: 10px; }
.ws[hidden] { display: none; }
.ws .mk-label { margin: 0 0 6px; }
.ws-row { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 6px; scrollbar-width: thin; }
.ws-box { flex: none; width: 36px; height: 36px; border: 1px solid var(--rule); border-radius: var(--r-md); background: var(--surface); color: var(--ink); font: inherit; font-weight: 700; font-variant-numeric: tabular-nums; cursor: pointer; touch-action: pan-x; }
.ws-box.on { background: var(--gold); border-color: var(--gold); color: #231c00; }
.wd-warn[hidden] { display: none; }
.lns { display: flex; flex-direction: column; gap: 12px; margin-top: 14px; }
.ln { padding: 10px; border: 1px solid var(--rule); border-radius: var(--r-lg); background: color-mix(in srgb, var(--surface) 70%, transparent); }
.ln-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.ln-x { width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer; }
.ln-help { margin-top: 6px; padding: 4px 0; }
.ln-acts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.wd-meter { margin-top: 16px; }
.meter { height: 8px; border-radius: var(--r-full); background: var(--rule); overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--accent); transform-origin: left center; transition: transform var(--m-quick) ease-out; }
html[dir='rtl'] .meter i { transform-origin: right center; }
.meter.over i { background: var(--danger); }
.meter-text { display: block; margin-top: 6px; font-size: 0.85rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.meter-warn { margin: 6px 0 0; font-size: 0.9rem; color: var(--danger); line-height: 1.4; }

/* 5: the feeling */
.feels { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 560px) { .feels { grid-template-columns: repeat(3, 1fr); } }
.feel { display: flex; flex-direction: column; gap: 4px; text-align: start; padding: 12px; min-height: 76px; border: 1px solid var(--rule); border-radius: var(--r-lg); background: var(--surface); color: var(--ink); font: inherit; cursor: pointer; transition: transform var(--m-tap) ease-out; }
.feel:active { transform: scale(0.97); }
.feel b { font-size: 1rem; }
.feel span { font-size: 0.82rem; color: var(--muted); line-height: 1.35; }
.feel.on { border-color: var(--gold); outline: 2px solid var(--gold); outline-offset: -2px; background: color-mix(in srgb, var(--gold) 12%, var(--surface)); }

/* 6: finishing touches */
.fin-row { margin-bottom: 4px; }
.fin-row .mk-in { margin-top: 8px; }
.fin-row .mk-num { margin-top: 0; }

/* 7: the first look */
.fr-pic img { max-height: 54vh; }
.fr-pic.sm img { max-height: 30vh; }
.fr-pic + .mk-lead { margin-top: 16px; }
.fr-acts { display: flex; gap: 10px; }
.fr-acts .btn { flex: 1; }
.fr-wait { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; min-height: 46vh; text-align: center; color: var(--muted); }
.fr-wait p { margin: 0; max-width: 22rem; }
.fr-problem { color: var(--ink); font-size: 1.05rem; line-height: 1.45; }
/* THE THREE FIRST LOOKS (spec 6.9): the two-shot first and larger, the two singles side by side under it, each
 * named, each with its own two buttons and its tries left. */
.fr-looks { display: flex; flex-direction: column; gap: 16px; }
.fr-look { min-width: 0; }
.fr-look-name { margin: 0 0 6px; font-size: 0.85rem; font-weight: 600; letter-spacing: 0.02em; color: var(--muted); }
.fr-look .fr-acts { margin-top: 8px; }
.fr-look .fr-left { margin: 6px 0 0; }
.fr-look .fr-problem { margin: 8px 0 0; font-size: 0.95rem; }
/* The failure's own name beside the words (Make.refOf): small and plain, for the owner to read out. */
.fr-problem .fr-ref { font-family: ui-monospace, monospace; font-size: 0.8rem; color: var(--muted); white-space: nowrap; }
.fr-look.two .fr-pic img { max-height: 40vh; }
.fr-look.two .fr-wait { min-height: 30vh; }
/* THE LOOKS AS A CAROUSEL (owner, 2026-11-11: "no I prefer carousel style"): a slide a look, full width, snapping;
 * the dots under it say which is in front. Scrolled sideways by the finger (touch-action pan-x pan-y, as the page). */
.fr-car { display: flex; gap: 12px; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.fr-car::-webkit-scrollbar { display: none; }
.fr-car > .fr-look { flex: 0 0 100%; scroll-snap-align: center; scroll-snap-stop: always; }
.fr-car .fr-pic img { max-height: 52vh; }
.fr-car .fr-wait { min-height: 40vh; }
.fr-dots { display: flex; justify-content: center; gap: 10px; margin-top: 12px; }
.fr-dot { width: 10px; height: 10px; padding: 0; border-radius: 50%; border: 1px solid var(--muted); background: transparent; cursor: pointer; }
.fr-dot.on { background: var(--gold, var(--ink)); border-color: var(--gold, var(--ink)); }
.fr-singles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fr-singles .fr-pic img { max-height: 28vh; }
.fr-singles .fr-wait { min-height: 22vh; gap: 10px; font-size: 0.9rem; }
.fr-singles .fr-acts { flex-direction: column; gap: 6px; }
.fr-singles .fr-look-name { min-height: 2.4em; }
/* A single is made from the two-shot (owner, 2026-11-11): the two-shot's line on what changing it remakes, and a
 * single's line while it waits for its two-shot (in place of its buttons when it has a picture). */
.fr-look .fr-remakes { margin: 6px 0 0; }
.fr-look .fr-base { margin: 8px 0 0; font-size: 0.85rem; }
/* KEEP IT OR MAKE A NEW ONE (owner, 2026-11-12): the two side by side under the picture, one row at phone width (each
 * half, the words allowed to wrap), Change something smaller beneath; the takes by number above them, as the words
 * step's saved sets. */
.fr-look .fr-takes { margin-top: 10px; }
.fr-look .fr-takes .mk-label { margin: 0 0 4px; font-size: 0.8rem; }
.fr-keep { display: flex; gap: 10px; margin-top: 10px; }
.fr-keep .btn { flex: 1 1 0; min-width: 0; white-space: normal; }
.fr-look .fr-keep + .fr-acts { margin-top: 8px; }

/* The second cut (spec 6.8) - 1: how long */
.len { display: flex; align-items: center; justify-content: center; gap: 18px; margin: 10px 0 6px; }
.len-b { width: 52px; height: 52px; border: 1px solid var(--rule); border-radius: 50%; background: var(--surface); color: var(--ink); font: inherit; font-size: 1.6rem; line-height: 1; cursor: pointer; }
.len-b:disabled { opacity: 0.35; cursor: default; }
.len-n { min-width: 8rem; text-align: center; font-size: 1.9rem; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
/* The sliders: the length, the strength, the closeness, the pace, the rehearsal's progress. */
.mk-range { display: block; width: 100%; margin: 10px 0 4px; accent-color: var(--gold); }
.range-ends { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 0.82rem; color: var(--muted); }
.range-now { flex: 1; text-align: center; color: var(--ink); font-weight: 600; font-size: 0.95rem; }
/* A SLIDER BLOCK (owner, 2026-11-10: "not arranged properly and so its not clear what wording belongs to what"):
 * the label and the current setting's word (gold) on one head row, the range under them, the two end words small
 * and muted beneath its ends, the block's own note last; 16px and a hairline between blocks. */
.mk-slider { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--rule); }
.mk-slider-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.mk-slider-head .mk-label { margin: 0; flex: 1; }
.mk-slider-head .range-now { flex: none; text-align: end; color: var(--gold); font-weight: 700; }
.mk-slider .mk-range { margin: 8px 0 2px; }
.mk-slider .range-ends { font-size: 0.78rem; }
.mk-slider .mk-note { margin-top: 10px; }

/* 7: your voice */
.vc-line { margin: 0 0 16px; padding: 12px 14px; border-inline-start: 3px solid var(--gold); background: var(--surface); border-radius: var(--r-md); font-size: 1.1rem; line-height: 1.45; color: var(--ink); }
.vc-rec { display: flex; flex-direction: column; align-items: center; gap: 10px; margin: 18px 0 10px; }
.vc-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; width: 120px; height: 120px; border: 2px solid var(--gold); border-radius: 50%; background: var(--surface); color: var(--ink); font: inherit; font-size: 0.85rem; cursor: pointer; }
.vc-btn.live { background: var(--danger); border-color: var(--danger); color: #fff; animation: vcLive 1.2s ease-in-out infinite; }
@keyframes vcLive { 0%, 100% { box-shadow: 0 0 0 0 rgba(220, 60, 60, 0.45); } 50% { box-shadow: 0 0 0 14px rgba(220, 60, 60, 0); } }
.vc-time { font-size: 0.9rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.vc-take { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; margin-top: 6px; }
.vc-have { font-size: 0.9rem; color: var(--muted); }
.vc-none { margin: 16px 0; padding: 12px 14px; border: 1px solid var(--rule); border-radius: var(--r-md); color: var(--muted); line-height: 1.45; }
.vc-skip { display: block; margin: 14px auto 0; }

/* 8: music, in the finishing touches */
.fin-own { margin: 0; font-size: 0.95rem; color: var(--ink); }
.tracks { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.track { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border: 1px solid var(--rule); border-radius: var(--r-md); background: var(--surface); }
.track.on { border-color: var(--gold); }
.track-play { width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 50%; background: color-mix(in srgb, var(--gold) 18%, var(--surface)); color: var(--ink); cursor: pointer; }
.track-play[aria-pressed="true"] { background: var(--gold); color: #231c00; }
.track-pick { flex: 1; display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 0.95rem; color: var(--ink); }
.track-pick input { accent-color: var(--gold); width: 1.1rem; height: 1.1rem; }

/* 10: the rehearsal */
.rh-stage { position: relative; width: 100%; max-height: 52vh; margin: 0 auto; border-radius: var(--r-lg); overflow: hidden; background: #0b1016; box-shadow: var(--shadow-card); }
/* The three looks stacked; the shot in force shows one, cut hard (spec 6.9), pushed in gently over the shot's own
 * seconds (rehearse.js sets the duration). */
.rh-stage img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; transform-origin: 50% 40%; }
.rh-stage img[hidden] { display: none; }
.rh-stage img:not([src]) { visibility: hidden; }
.rh-stage img.push { animation: rhPush 3s linear forwards; }
@keyframes rhPush { from { transform: scale(1); } to { transform: scale(1.06); } }
/* The turn of the film's shape (P.shotBeats 'closer'): the push goes in to very close on the face. */
.rh-stage img.push.closer { animation-name: rhPushClose; transform-origin: 50% 32%; }
@keyframes rhPushClose { from { transform: scale(1); } to { transform: scale(1.35); } }
.rh-cap { position: absolute; inset-inline: 5%; bottom: 8%; text-align: center; pointer-events: none; color: #fff; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.95), 0 0 12px rgba(0, 0, 0, 0.7); line-height: 1.35; }
.rh-cap b { display: block; font-size: 0.78rem; letter-spacing: 0.04em; text-transform: uppercase; opacity: 0.85; }
.rh-cap span { font-size: 1.05rem; font-weight: 600; }
.rh-cap[hidden] { display: none; }
.rh-tear { position: absolute; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: rgba(190, 220, 255, 0.95); box-shadow: 0 0 8px 3px rgba(150, 200, 255, 0.6); pointer-events: none; opacity: 0; }
.rh-tear[hidden] { display: none; }
/* Where the tear shows: under the speaker's eyes in a single (the face is the shot's), between the two in the two-shot. */
.rh-tear.on-one { left: 50%; top: 38%; }
.rh-tear.on-two { left: 50%; top: 34%; }
.rh-tear.pulse1 { animation: rhTear 1.6s ease-in-out 1; }
.rh-tear.pulse2 { animation: rhTear 1.6s ease-in-out 2; }
.rh-tear.pulse3 { animation: rhTear 1.6s ease-in-out infinite; }
@keyframes rhTear { 0% { opacity: 0; transform: translateY(0) scale(0.6); } 30% { opacity: 1; transform: translateY(2px) scale(1); } 100% { opacity: 0; transform: translateY(14px) scale(0.8); } }
.rh-ctl { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.rh-ctl .tbtn { flex: none; }
.rh-bar { flex: 1; margin: 0; }
.rh-time { margin: 4px 0 0; text-align: center; font-size: 0.85rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.rh-ctl + .rh-time + .mk-note { margin-top: 12px; }
#rhChange { margin-top: 12px; }
html[data-motion="reduce"] .rh-stage img.push { animation: none; }
html[data-motion="reduce"] .rh-tear { animation-iteration-count: 1; }

/* 11: the price */
.sum { margin-top: 16px; border-top: 1px solid var(--rule); }
.sum .fact { border-bottom: 1px solid var(--rule); padding: 0.7rem 0; font-size: 0.95rem; }
/* The script on the summary (owner, 2026-11-12): a button under the sections; the lines in place when it is open. */
.sum-script { margin-top: 14px; }
.sum-lines { list-style: none; margin: 10px 0 0; padding: 0; border-top: 1px solid var(--rule); }
.sum-line { display: flex; flex-direction: column; gap: 2px; padding: 0.55rem 0; border-bottom: 1px solid var(--rule); font-size: 0.95rem; }
.sum-who { color: var(--muted); font-size: 0.8rem; font-weight: 600; }
.sum-said { color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; }
/* What shapes the film (owner, 2026-11-11): the choices in sections, on the Make step and in a film's i sheet.
 * A long value (a line of the person's own) wraps under its label's end rather than pushing it out. */
.choices-title { margin: 26px 0 0; font-size: 1.1rem; font-weight: 700; color: var(--ink); text-align: center; }
.choices .sum-h { margin: 18px 0 0; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--gold); }
.choices .sum { margin-top: 6px; }
.choices .fact { align-items: baseline; }
.choices .fact-label { flex: 1 1 50%; min-width: 0; }
.choices .fact-value { flex: 1 1 50%; min-width: 0; text-align: end; overflow-wrap: anywhere; }
.info-sheet .choices .sum-h:first-child { margin-top: 6px; }
.pane[data-route="new"] label.setRow { cursor: pointer; }

/* ---------------------------------------------------------------------
   Watching a film
   --------------------------------------------------------------------- */

.pl-pane { display: flex; flex-direction: column; overflow: hidden; background: #000; }
.pl-pane .tbar { flex: none; position: static; background: #000; border-bottom: 0; color: #fff; -webkit-backdrop-filter: none; backdrop-filter: none; }
.pl-pane .tbar .tbtn { color: #fff; }
.pl-pane .tbar .tbtn.off { opacity: 0.45; }
.pl-pane .tbar h2 { flex: 1; }
.pl-stage { position: relative; flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; background: #000; color: #cfd6df; }
.pl-stage video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.pl-cap { position: absolute; inset-inline: 5%; bottom: 13%; text-align: center; pointer-events: none; font-size: 1.15rem; font-weight: 600; line-height: 1.35; color: #fff; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.95), 0 0 12px rgba(0, 0, 0, 0.7); }
.pl-cap[hidden] { display: none; }
.pl-foot { flex: none; padding: 12px 16px calc(var(--safe-b) + 14px); background: var(--paper); color: var(--ink); max-height: 42vh; overflow-y: auto; }
.pl-foot:empty { display: none; }
.pl-foot .btn svg { vertical-align: -0.2em; }
.pl-note { margin: 0 0 10px; font-size: 0.88rem; color: var(--muted); line-height: 1.45; text-align: center; }
.pl-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.pl-acts .btn { flex: 1; white-space: nowrap; }
