/* Playroom PROTOTYPE (#48), round 3. Throwaway: plain CSS, no build step.
   Hand lettering: Caveat (ink) and Nothing You Could Do (pencil), both OFL, self-hosted in fonts/. The sheet in the
   typewriter is typed, so it keeps the system typewriter face. */
@font-face { font-family: Caveat; src: url(fonts/caveat-latin-wght.woff2) format("woff2"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "Nothing You Could Do"; src: url(fonts/nothing-you-could-do-latin-400.woff2) format("woff2"); font-weight: 400; font-display: swap; }

:root {
  --ink: #2b1d14;
  --ink-blue: rgba(27, 37, 70, .93);      /* blue-black fountain-pen ink */
  --ink-red: rgba(140, 28, 24, .9);       /* stamp-pad red */
  --graphite: rgba(70, 72, 78, .88);      /* pencil */
  --redp: rgba(178, 52, 38, .9);          /* the red pencil: the one accent */
  --paper: #f4ecd9;
  --slip: #f1e7d1;                        /* paper bits in front of the picture (tags, slips, notes) */
  --accent: #a8261c;
  --muted: #8a735a;
  --bg: #1b130e;
  --hand: Caveat, "Segoe Print", "Bradley Hand", cursive;
  --pencil: "Nothing You Could Do", Caveat, cursive;
  --type: "American Typewriter", "Courier Prime", "Courier New", Courier, monospace;   /* system typewriter */
  /* paper tooth, tiled: a little fibre noise multiplied into every paper bit */
  --tex: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .3  0 0 0 0 .24  0 0 0 0 .16  .22 0 0 0 -.05'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --ring-in: #1b2546;                     /* focus ring: dark inside, light outside, so it reads on any picture */
  --ring-out: rgba(255, 246, 226, .96);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --bg: #0d0907; --slip: #c9b693; color-scheme: dark; }
}
:root[data-theme="dark"] { --bg: #0d0907; --slip: #c9b693; color-scheme: dark; }

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); overflow: hidden; overscroll-behavior: none; }
body { font: 15px/1.45 Georgia, "Times New Roman", serif; color: var(--ink); -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
svg.defs { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ---- ink, pencil, words ---- */
.ink { color: var(--ink-blue); filter: url(#f-ink); }
.pencil { color: var(--graphite); font-family: var(--pencil); font-weight: 400; filter: url(#f-pencil); }
.redp { color: var(--redp); font-family: var(--pencil); font-weight: 400; filter: url(#f-pencil); }
.wd { display: inline-block; transform: translateY(var(--dy, 0)) rotate(var(--r, 0deg)); }
.swoosh path, .ring path { fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; }
/* a focus ring that reads on light paper and on a dark picture alike */
.focusring, .back:focus-visible, .note:focus-visible, .search:focus-within, .pager button:focus-visible, #theme:focus-visible,
.model-card .build:focus-visible, .model-card .watch:focus-visible, #sheet .x:focus-visible, #sheet a:focus-visible {
  outline: 2.5px solid var(--ring-in); outline-offset: 2px; box-shadow: 0 0 0 5.5px var(--ring-out);
}

/* ---- places ---- */
#room { position: fixed; inset: 0; overflow: hidden; touch-action: none; }
.view { position: absolute; inset: 0; overflow: hidden; visibility: hidden; background: var(--bg); cursor: grab; }
.view.on { visibility: visible; }
body.dragging, body.dragging * { cursor: grabbing !important; }
body.dragging .view { user-select: none; }
/* the picture, in its own pixels; JS sets transform: translate(x, y) scale(s). --s = the resting scale */
.stage { position: absolute; left: 0; top: 0; transform-origin: 0 0; --s: 1; }
.stage > img.still { position: absolute; inset: 0; width: 100%; height: 100%; display: block; user-select: none; -webkit-user-drag: none; -webkit-touch-callout: none; }
.hots, .slots, .letters, .tags { position: absolute; inset: 0; pointer-events: none; }
.hots > * { pointer-events: auto; }
.view.moving .hots, .view.moving .tags, .view.moving .shapes, .view.moving .ui, .view.moving .slots .name, body.busy .hint { opacity: 0; transition: opacity .12s; pointer-events: none; }

/* ---- click targets: real buttons/links cut to their object's shape (clip-path, set by JS) ---- */
.hot { position: absolute; display: block; border: 0; padding: 0; margin: 0; background: transparent; cursor: pointer; outline: none; -webkit-touch-callout: none; user-select: none; }
/* hover = the object itself gets brighter: a pixel-registered copy of the still, brightened and masked (feathered) to
   the object's outline; no lift, no ring. Keyboard focus adds a thin, quiet ring along the padded outline. */
.shapes { position: absolute; left: 0; top: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; z-index: 2; }
/* PERF (12 Nov): the brightened copy is a pre-drawn canvas per target (proto.js litFor/drawLit: the same filter values,
   brightness(1.18) saturate(1.05), 1.22 in the dark, and the same feathered outline), so the hover fade is an opacity
   change on its own layer and never re-rasterises the picture. An object known only by its rect gets none. */
.lits { position: absolute; left: 0; top: 0; width: 100%; height: 100%; pointer-events: none; z-index: 2; }
.litc { position: absolute; display: block; pointer-events: none; opacity: 0; visibility: hidden; transition: opacity .15s ease-out, visibility 0s linear .15s; }
.litc.on { opacity: 1; visibility: visible; transition: opacity .15s ease-out, visibility 0s; }
.view.moving .lits { opacity: 0; transition: opacity .12s; }
.shape path.o, .shape path.e { fill: none; stroke: none; stroke-linejoin: round; }
.shape.focus .o { stroke: var(--ring-out); stroke-opacity: .7; stroke-width: calc(3px / var(--s)); }
.shape.focus .e { stroke: var(--ring-in); stroke-width: calc(1.3px / var(--s)); }
body.debug .shape .e { stroke: #3cff5a; stroke-width: calc(2px / var(--s)); }
body.debug .shape.quad .e { stroke: #ffe83c; }
body.debug .shape.synth .e { stroke: #3cf0ff; }
body.debug .shape path.l { fill: none; stroke: #ff3cf0; stroke-width: calc(1px / var(--s)); stroke-dasharray: calc(3px / var(--s)) calc(3px / var(--s)); }
.shape path.l { fill: none; stroke: none; }
body.debug .shape.rect .e { stroke: #ff9a3c; stroke-dasharray: calc(8px / var(--s)) calc(5px / var(--s)); }
.slotdbg { display: none; fill: none; stroke: #3cf0ff; stroke-width: calc(1.5px / var(--s)); stroke-dasharray: calc(6px / var(--s)) calc(4px / var(--s)); }
body.debug .slotdbg { display: inline; }
body.debug .pick { outline: calc(2px / var(--s)) solid #3cf0ff; }
body.debug .letter, body.debug .sheetform { outline: calc(1.5px / var(--s)) dashed #ff3cf0; }
body.debug .window-life { outline: calc(2px / var(--s)) dashed #ffd23c; }
body.debug .tag { opacity: .55; }

/* ---- tags: little hand-written paper tags, screen-sized; never at rest, only while their target is lit ---- */
.tag {
  position: absolute; left: 0; top: 0; pointer-events: none; transform-origin: 0 0; z-index: 8;
  transform: scale(calc(var(--k, .92) / var(--s))) translate(-50%, -50%);
  opacity: 0; transition: opacity .16s ease-out;
  filter: drop-shadow(0 1px .5px rgba(0, 0, 0, .35)) drop-shadow(0 3px 5px rgba(0, 0, 0, .22));
}
.tag .card, .pick .name .card {
  position: relative; display: block; white-space: nowrap; text-align: center;
  background: var(--tex), var(--slip);
  transform: rotate(var(--rot, -2deg)); transition: transform .3s cubic-bezier(.3, 1.7, .5, 1);
}
.tag .card { padding: 3px 13px 5px 22px; clip-path: polygon(11px 0, 100% 0, 100% 100%, 11px 100%, 0 50%); transform-origin: 6px 50%; }
.tag .card::before {   /* the tag's punched hole */
  content: ""; position: absolute; left: 6px; top: 50%; width: 7px; height: 7px; margin-top: -3.5px; border-radius: 50%;
  background: rgba(40, 28, 18, .62); box-shadow: 0 0 0 1.6px rgba(150, 118, 76, .55);
}
.tag .tx { font: 600 21px/1.05 var(--hand); }
.tag small { display: block; margin-top: 1px; font-size: 13px; line-height: 1.1; }
.tag.lit { opacity: 1; }
.tag.lit .card { transform: rotate(calc(var(--rot, -2deg) * .45)); }

/* ---- lettering on the blank printed faces (each .letter is mapped onto its quad with matrix3d) ---- */
.letter { position: absolute; left: 0; top: 0; transform-origin: 0 0; pointer-events: none; overflow: hidden; mix-blend-mode: multiply; }
.letter .in {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  font-family: var(--hand); transform: rotate(var(--tilt, 0deg));
}
.l-title .w { font-weight: 700; font-size: min(calc(var(--h) * .64), calc(var(--w) * .15)); line-height: 1; white-space: nowrap; margin-top: calc(var(--h) * .06); }
.l-title .w.wiggle { animation: wiggle .55s ease; }
/* round 3: the name in the card's free area on brand-yellow paper: bolder, near-black ink, fills the area */
.l-title.on-yellow .w { color: rgba(18, 20, 32, .95); font-weight: 700; font-size: min(calc(var(--h) * .74), calc(var(--w) * .135)); margin-top: 0; letter-spacing: .005em; }
@keyframes wiggle { 30% { transform: rotate(3deg) scale(1.06); } 60% { transform: rotate(-3deg) scale(1.03); } }
.l-title .swoosh { display: block; width: 58%; height: calc(var(--h) * .13); margin-top: calc(var(--h) * -.03); stroke-width: 3; }
body.reading .l-wish .ink, body.reading .l-wish .redp { filter: none; }
.l-wish .in { justify-content: flex-start; align-items: flex-start; text-align: left; padding: calc(var(--h) * .07) calc(var(--w) * .09) 0; }
.l-wish b { font-weight: 700; font-size: min(calc(var(--h) * .085), calc(var(--w) * .2)); line-height: 1; align-self: center; margin-bottom: .25em; white-space: nowrap; }
/* round 3: a tall, narrow sheet: the size follows the width, a long wish may take two lines */
.l-wish ol { margin: 0; padding-left: 1.05em; width: 100%; font-weight: 500; font-size: min(calc(var(--h) * .6 / (var(--n, 3) + 4)), calc(var(--w) * .095)); line-height: 1.12; }
.l-wish li { border-bottom: max(1px, calc(var(--h) * .003)) solid rgba(70, 72, 78, .28); padding: .12em 0 .1em; }
.l-wish .in > i { font-style: normal; white-space: normal; margin-top: .35em; font-size: min(calc(var(--h) * .031), calc(var(--w) * .064)); line-height: 1.15; align-self: center; text-align: center; padding-right: calc(var(--w) * .04); }
/* each wish: the name on the left (a red-pencil "coming" beside it when it is being built), its count on the right */
.l-wish li, #bsheet .wishes li { display: list-item; }
.l-wish li .wn, #bsheet .wishes li .wn { display: inline; }
.l-wish li .wc, #bsheet .wishes li .wc { float: right; margin-left: .4em; font-variant-numeric: tabular-nums; opacity: .85; }
.l-wish li .cm, #bsheet .wishes li .cm { font-style: normal; font-size: .72em; white-space: nowrap; }
.l-wish li .cm { font-size: .78em; }
#bsheet .wishes li .cm { font: 400 17px/1 var(--pencil); color: var(--ink-red); margin-left: .25em; display: inline-block; transform: rotate(-4deg); }
.l-stamp .stamp { width: calc(min(var(--w), var(--h)) * 1); height: calc(min(var(--w), var(--h)) * 1); overflow: visible; }
.stamp path { fill: currentColor; }
.ink-red { color: var(--ink-red); }
.ink-blue { color: rgba(25, 34, 66, .9); }
/* title only, sized from the card itself so it stays legible however small the card is drawn */
/* the books' spine labels: the title along the spine (a tall label turns the writing 90 degrees) */
.l-spine b { font-weight: 700; font-size: min(calc(var(--h) * .5), calc(var(--w) * .27)); line-height: 1; white-space: nowrap; }
.l-spine.vert b { writing-mode: vertical-rl; font-size: min(calc(var(--w) * .62), calc(var(--h) * .19)); }
.l-price .in { gap: calc(var(--h) * .015); padding-top: calc(var(--h) * .12); }
.l-price b { font-weight: 700; font-size: min(calc(var(--h) * .22), calc(var(--w) * .18)); line-height: 1; margin-bottom: calc(var(--h) * .02); }
.l-price .pl { font-weight: 600; font-size: min(calc(var(--h) * .21), calc(var(--w) * .135)); line-height: 1.05; white-space: nowrap; }
.l-paper .in { justify-content: flex-start; padding: calc(var(--h) * .14) calc(var(--w) * .1) 0; align-items: flex-start; text-align: left; font: 700 calc(var(--h) * .065)/1.6 var(--type); color: #2a211b; transform: none; }
.l-paper b { font-size: calc(var(--h) * .085); letter-spacing: .04em; margin-bottom: .6em; color: #8c1e15; }

/* ---- the window: the real outside's loop, masked to the glass (frame 0 = the still, so it fades in unseen) ---- */
.window-life { position: absolute; overflow: hidden; pointer-events: none; -webkit-mask-size: 100% 100%; mask-size: 100% 100%; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; }
.window-life video { position: absolute; left: 0; top: 0; width: 100%; height: 100%; display: block; object-fit: fill; opacity: 0; transition: opacity .4s; }
.window-life video.on { opacity: 1; }

/* ---- the shelf: a cut-out per slot, the target hugs the model ---- */
.slot { position: absolute; inset: 0; pointer-events: none; }
.slot .cut { position: absolute; display: block; pointer-events: none; transition: filter .15s ease-out; user-select: none; -webkit-user-drag: none; }
/* a model on the shelf brightens the same way (its own cut-out, so the edge is the model's own alpha) */
.slot:has(.pick:hover) .cut, .slot:has(.pick:focus-visible) .cut, .slot:has(.pick.lit) .cut { filter: brightness(1.18) saturate(1.05); }
:root[data-theme="dark"] .slot:has(.pick:hover) .cut, :root[data-theme="dark"] .slot:has(.pick:focus-visible) .cut, :root[data-theme="dark"] .slot:has(.pick.lit) .cut { filter: brightness(1.22); }
body.touch .slot:has(.pick:hover) .cut { filter: none; }
body.touch .slot:has(.pick.lit) .cut { filter: brightness(1.2) saturate(1.05); }
.pick { position: absolute; border: 0; padding: 0; margin: 0; background: transparent; cursor: pointer; outline: none; pointer-events: auto; border-radius: calc(10px / var(--s)); -webkit-touch-callout: none; user-select: none; }
.pick:focus-visible { box-shadow: 0 0 0 calc(1.3px / var(--s)) var(--ring-in), 0 0 0 calc(3px / var(--s)) rgba(255, 246, 226, .7); }
.pick .name {
  position: absolute; left: 50%; top: 100%; transform-origin: 0 0; z-index: 3; pointer-events: none;
  transform: scale(calc(var(--k, .9) / var(--s))) translate(-50%, 4px); opacity: 0; transition: opacity .15s;
  filter: drop-shadow(0 1px .5px rgba(0, 0, 0, .35)) drop-shadow(0 3px 5px rgba(0, 0, 0, .25));
}
.pick .name .card { padding: 2px 10px 4px; font: 600 20px/1.05 var(--hand); }
.pick:hover .name, .pick:focus-visible .name, .pick.lit .name { opacity: 1; }
body.touch .pick:hover .name { opacity: 0; }
body.touch .pick.lit .name { opacity: 1; }

/* ---- the radio: the amber LCD display (glow adds light in `screen`, segments print in `multiply`) and the tab ---- */
.radio-dial { position: absolute; left: 0; top: 0; transform-origin: 0 0; pointer-events: none; }
.radio-dial.glow { mix-blend-mode: screen; overflow: visible; opacity: .32; transition: opacity .4s ease-out; }
body.radio-on .radio-dial.glow { opacity: 1; }
.radio-dial.glow .panel { position: absolute; inset: 0; border-radius: calc(var(--h) * .06);
  background: radial-gradient(ellipse at 50% 45%, rgba(255, 190, 90, .95), rgba(255, 150, 40, .85) 60%, rgba(220, 110, 20, .75)); }
.radio-dial.glow .spill { position: absolute; inset: -30% -18%; background: radial-gradient(ellipse at 50% 50%, rgba(255, 150, 50, .32), rgba(255, 120, 30, .1) 45%, rgba(0, 0, 0, 0) 70%); }
.radio-dial.marks { mix-blend-mode: multiply; overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4%; }
.radio-dial.marks::before { content: ""; position: absolute; inset: 0; box-shadow: inset 0 0 calc(var(--h) * .14) rgba(70, 30, 0, .55); opacity: 0; transition: opacity .4s; }
body.radio-on .radio-dial.marks::before { opacity: 1; }
.radio-dial .clock { width: 78%; height: 58%; display: block; }
.radio-dial .sg { fill: rgba(60, 24, 0, .9); opacity: .06; transition: opacity .2s; }
body.radio-on .radio-dial .sg { opacity: .13; }
.radio-dial .sg.on { opacity: .8; }          /* off: a dim standby glow, the 24 h clock always reads; the station only when on */
body.radio-on .radio-dial .sg.on { opacity: 1; }
.radio-dial .colon rect { fill: rgba(60, 24, 0, .9); opacity: .8; }
body.radio-on .radio-dial .colon rect { opacity: 1; animation: lcdblink 1s steps(1) infinite; }
@keyframes lcdblink { 50% { opacity: .13; } }
body.reduced .radio-dial .colon rect { animation: none; }
/* the station line: monospace capitals seen through a dot mask, like a dot-matrix LCD row */
.radio-dial .st { position: relative; font: 700 calc(var(--h) * .17)/1 ui-monospace, Menlo, "Courier New", monospace; letter-spacing: .12em; color: rgba(60, 24, 0, .92);
  white-space: nowrap; opacity: 0; transition: opacity .3s;
  -webkit-mask-image: radial-gradient(circle, #000 52%, transparent 62%); mask-image: radial-gradient(circle, #000 52%, transparent 62%);
  -webkit-mask-size: calc(var(--h) * .03) calc(var(--h) * .03); mask-size: calc(var(--h) * .03) calc(var(--h) * .03); }
body.radio-on .radio-dial .st { opacity: 1; }
.hot.dialzone { cursor: default; }
#radio-tab {
  position: fixed; left: 12px; bottom: 12px; z-index: 30; display: flex; align-items: center; gap: 2px; padding: 2px 6px 2px 12px;
  transform: rotate(-1.2deg); font: 400 15px/1 var(--pencil); color: var(--graphite);
}
#radio-tab[hidden] { display: none; }
#radio-tab .lbl { margin-right: 6px; font: 600 18px/1 var(--hand); color: var(--ink-blue); }
#radio-tab .lbl small { display: block; font: 400 10px/1 var(--pencil); color: var(--redp); letter-spacing: .04em; }
#radio-tab .st { min-width: 6.5em; font: 500 17px/1 var(--hand); color: var(--ink-blue); }
#radio-tab button { min-width: 44px; min-height: 44px; border: 0; background: transparent; cursor: pointer; padding: 4px 8px; font: 600 18px/1 var(--hand); color: var(--ink-blue); border-radius: 3px; }
#radio-tab button:hover { text-decoration: underline; text-decoration-color: var(--redp); text-underline-offset: 4px; }
#radio-tab button:focus-visible { outline: 2.5px solid var(--ring-in); outline-offset: 1px; box-shadow: 0 0 0 5px var(--ring-out); }
#radio-tab .pw[aria-pressed="true"] { color: var(--redp); }
#radio-tab.away .lbl, #radio-tab.away .nx, #radio-tab.away .st { display: none; }
body.radio-on #radio-tab .lbl::after { content: " ♪"; color: var(--redp); }
#sheet .credits { padding-left: 1.1em; }
#sheet .credits li { margin: 6px 0; }
#sheet .credits .now { font-weight: 700; }

/* ---- the display stand: the model on the felt disc (a turntable frame drawn into pedestal_stage.rect) ---- */
.slot.out .cut { visibility: hidden; }
#stage .hero { position: absolute; pointer-events: auto; touch-action: none; outline: none; z-index: 3; }
#stage .hero i { position: absolute; inset: 0; background-repeat: no-repeat; pointer-events: none; }
#stage .hero.spins { cursor: grab; }
#stage .hero.wait i, #stage .hero.wait .cshadow { visibility: hidden; }   /* ?nice=1: until the turn's front is placed */
#stage .hero.drag { cursor: grabbing; }
#stage .hero:focus-visible { box-shadow: 0 0 0 calc(1.3px / var(--s)) var(--ring-in), 0 0 0 calc(3px / var(--s)) rgba(255, 246, 226, .7); border-radius: calc(12px / var(--s)); }
#stage .stage > img.still { cursor: pointer; }
#glide { position: fixed; inset: 0; z-index: 25; pointer-events: none; }
#glide[hidden] { display: none; }
#glide .g { position: absolute; display: block; transform-origin: 0 0; background-repeat: no-repeat; will-change: transform, opacity; }

/* ---- the open book: the text is set on each page's quad (matrix3d), one page-sized column per page ---- */
.pages { position: absolute; inset: 0; pointer-events: none; z-index: 3; }
.bookpage { position: absolute; left: 0; top: 0; transform-origin: 0 0; overflow: hidden; pointer-events: auto; mix-blend-mode: multiply; cursor: pointer; }
.bookflow { position: absolute; top: 0; column-fill: auto; color: rgba(46, 32, 22, .94);
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif; line-height: 1.42; text-align: left; hyphens: auto; -webkit-hyphens: auto; }
.bookflow.measure { visibility: hidden; left: 0; }
.bookflow h1 { font: 700 2.3em/1 var(--hand); color: var(--ink-blue); margin: .1em 0 .2em; filter: url(#f-ink); break-after: avoid; }
.bookflow h2 { font: 700 1.5em/1.05 var(--hand); color: var(--ink-blue); margin: .7em 0 .15em; break-after: avoid; filter: url(#f-ink); }
.bookflow p, .bookflow li { margin: 0 0 .55em; orphans: 2; widows: 2; }
.bookflow ul { margin: 0 0 .55em; padding-left: 1.2em; }
.bookflow .muted { font-style: italic; color: rgba(90, 70, 50, .9); }
.bookflow code { font: .86em/1 ui-monospace, Menlo, monospace; }
.bookflow a { color: rgba(140, 30, 22, .95); text-decoration-thickness: .06em; text-underline-offset: .15em; cursor: pointer; }
.bookpage .folio { position: absolute; bottom: -.15em; left: 0; right: 0; text-align: center; font-size: calc(var(--fs, 30px)); font-family: var(--pencil); color: var(--graphite); }
.bookpage .sweep { position: absolute; inset: 0; pointer-events: none; opacity: 0;
  background: linear-gradient(90deg, rgba(0,0,0,0) 30%, rgba(60, 40, 20, .22) 48%, rgba(255,255,255,.0) 52%, rgba(0,0,0,0) 70%); }
#book .bpager { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%) rotate(-.8deg); padding: 4px 12px 7px; display: flex; align-items: center; gap: 2px; white-space: nowrap; }
.bpager button { white-space: nowrap; border: 0; cursor: pointer; background: transparent; min-width: 44px; min-height: 44px; padding: 6px 12px; font: 600 22px/1 var(--hand); color: var(--ink-blue); }
.bpager button:hover:not(:disabled) { text-decoration: underline; text-decoration-color: var(--redp); text-decoration-thickness: 2px; text-underline-offset: 5px; }
.bpager button:disabled { color: rgba(70, 72, 78, .35); cursor: default; }
.bpager button:focus-visible { outline: 2.5px solid var(--ring-in); outline-offset: 1px; box-shadow: 0 0 0 5px var(--ring-out); }
.bpager .count { font: 400 18px/1 var(--pencil); color: var(--graphite); padding: 0 8px; }
#book .view, #book { cursor: default; }

/* ---- paper bits in front of the room: slips, notes, the paging slip, scraps ---- */
.ui { z-index: 10; }
.slip { position: relative; isolation: isolate; border: 0; background: transparent; color: var(--ink-blue);
  filter: drop-shadow(0 1px .6px rgba(0, 0, 0, .35)) drop-shadow(0 4px 6px rgba(0, 0, 0, .28)); }
.slip::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--tex), var(--slip); clip-path: var(--cut, none); }
.back {
  display: inline-flex; align-items: center; min-height: 44px; cursor: pointer; white-space: nowrap;
  font: 600 21px/1 var(--hand); padding: 6px 16px 8px 26px; transform: rotate(-1.4deg);
  --cut: polygon(14px 0, 100% 2px, calc(100% - 2px) 100%, 14px calc(100% - 1px), 0 50%);
  transition: transform .15s;
}
.back > span { filter: url(#f-ink); }
.back:hover { transform: translateX(-3px) rotate(-.6deg); }
.cab-top { position: absolute; left: 0; right: 0; top: 0; padding: calc(12px + env(safe-area-inset-top, 0px)) calc(16px + env(safe-area-inset-right, 0px)) 0 calc(16px + env(safe-area-inset-left, 0px)); display: flex; align-items: flex-start; gap: 14px; pointer-events: none; }
.cab-top > * { pointer-events: auto; }
.notes { flex: 1; display: flex; justify-content: center; gap: 14px; flex-wrap: nowrap; padding-top: 6px; }
.note {
  position: relative; border: 0; cursor: pointer; color: var(--ink-blue); background: var(--tex), var(--slip);
  display: inline-flex; align-items: baseline; min-height: 44px; padding: 9px 14px 7px; border-radius: 1px; white-space: nowrap;
  font: 600 22px/1 var(--hand); transform: rotate(var(--rot, -2deg));
  box-shadow: 0 1px 1px rgba(0, 0, 0, .2), 0 4px 10px rgba(0, 0, 0, .35); transition: transform .15s;
}
.note::before { content: ""; position: absolute; left: 50%; top: -4px; width: 9px; height: 9px; margin-left: -4px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #e0655a, #8d1d14); box-shadow: 0 1px 2px rgba(0, 0, 0, .5); }
.note small { font-size: 16px; margin-left: 7px; color: rgba(55, 57, 62, .95); }
.note .ring { position: absolute; left: -7px; top: -5px; width: calc(100% + 14px); height: calc(100% + 10px); overflow: visible; opacity: 0; pointer-events: none; stroke-width: 2.6; transition: opacity .15s; }
.note[aria-pressed="true"] .ring { opacity: 1; }
.note:hover { transform: rotate(0deg) translateY(2px) scale(1.04); }
.search { display: block; padding: 2px 14px 4px; transform: rotate(1.2deg); }
.search input {
  display: block; width: 200px; min-height: 44px; border: 0; border-bottom: 1.5px solid rgba(70, 72, 78, .5); background: transparent;
  color: var(--ink-blue); font: 600 22px/1.2 var(--hand); padding: 8px 2px 3px; border-radius: 0; outline: none;
}
.search input::placeholder { font: 400 17px/1.2 var(--pencil); color: rgba(70, 72, 78, .8); }
.pager { position: absolute; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%) rotate(-.8deg); padding: 4px 12px 7px; text-align: center; }
.pager-row { display: inline-flex; align-items: center; gap: 2px; }
.pager button {
  white-space: nowrap; border: 0; cursor: pointer; background: transparent; min-width: 44px; min-height: 44px; padding: 6px 12px;
  font: 600 22px/1 var(--hand); color: var(--ink-blue);
}
.pager button:hover:not(:disabled) { text-decoration: underline; text-decoration-color: var(--redp); text-decoration-thickness: 2px; text-underline-offset: 5px; }
.pager button:disabled { color: rgba(70, 72, 78, .35); cursor: default; }
.pager .count { font: 400 18px/1 var(--pencil); color: var(--graphite); padding: 0 8px; min-width: 64px; }
.pager .caption { margin: -2px 0 2px; font: 400 14px/1.25 var(--pencil); color: var(--graphite); white-space: nowrap; }
.scrap {
  margin: 0; padding: 6px 14px 8px; background: var(--tex), var(--slip); color: var(--graphite); font: 400 16px/1 var(--pencil);
  box-shadow: 0 1px 1px rgba(0, 0, 0, .25), 0 3px 8px rgba(0, 0, 0, .3); pointer-events: none;
  clip-path: polygon(0 4%, 12% 0, 30% 5%, 52% 0, 75% 4%, 100% 0, 99% 96%, 80% 100%, 55% 95%, 33% 100%, 10% 96%, 1% 100%);
}
.scrap > span { filter: url(#f-pencil); display: inline-block; }

/* ---- nav (close-up, order) ---- */
.nav { position: absolute; left: calc(12px + env(safe-area-inset-left, 0px)); top: calc(12px + env(safe-area-inset-top, 0px)); display: flex; gap: 12px; align-items: flex-start; }
.nav .desk { transform: rotate(1.2deg); }

.spin-hint { position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%) rotate(1deg); white-space: nowrap; }
.model-card {
  position: absolute; right: calc(4vw + env(safe-area-inset-right, 0px)); top: 50%; transform: translateY(-50%) rotate(.6deg); width: min(330px, 30vw);
  background: var(--tex), var(--slip); padding: 20px 24px 18px; border-radius: 2px; box-shadow: 0 2px 2px rgba(0,0,0,.25), 0 14px 40px rgba(0,0,0,.55);
}
.model-card .fr { margin: 0; font: 500 18px/1 var(--hand); color: var(--graphite); filter: url(#f-pencil); }
.model-card .name { margin: 8px 0 4px; font: 700 42px/1 var(--hand); color: var(--ink-blue); filter: url(#f-ink); outline: none; }
.model-card .by { margin: 0 0 14px; font: 500 20px/1.1 var(--hand); color: var(--ink-blue); }
.model-card .acts { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.model-card .build { display: flex; flex-direction: column; align-items: center; text-decoration: none; color: var(--ink-red); padding: 6px 8px 4px; border-radius: 4px; min-height: 44px; }
.model-card .build .stamp {
  display: inline-block; font: 700 32px/1 var(--hand); letter-spacing: .02em; padding: 4px 22px 7px; border: 3.5px solid currentColor; border-radius: 6px;
  transform: rotate(-2.5deg); filter: url(#f-stamp-css); mix-blend-mode: multiply; transition: transform .15s;
}
.model-card .build small { margin-top: 6px; font: 400 13px/1 var(--pencil); color: var(--graphite); }
.model-card .build:hover .stamp { transform: rotate(-1deg) scale(1.03); }
.model-card .watch {
  display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 10px; text-decoration: underline;
  text-decoration-color: rgba(178, 52, 38, .55); text-decoration-thickness: 1.5px; text-underline-offset: 5px;
  font: 600 21px/1 var(--hand); color: var(--ink-blue); border-radius: 3px;
}
.model-card .moc { margin: 8px 0 0; font: 400 13px/1.2 var(--pencil); color: var(--graphite); }
.model-card .pnote { margin: 10px 0 0; padding: 6px 8px; font: 500 17px/1.15 var(--hand); color: var(--redp); border-left: 2px solid rgba(178, 52, 38, .5); }

/* ---- the order desk: the form on the sheet (typed) ---- */
.sheetform {
  position: absolute; left: 0; top: 0; transform-origin: 0 0; margin: 0;
  padding: 1.5em 2.1em 1em; display: flex; flex-direction: column; gap: .3em;
  font-family: var(--type); color: #2a211b; mix-blend-mode: multiply;
}
.sheetform .ln { margin: 0; }
.sheetform h2 { font: 700 1.3em/1.1 var(--type); letter-spacing: .03em; text-transform: uppercase; color: #8c1e15; margin: 0; }
.sheetform .sub { font-size: .82em; font-style: italic; margin-bottom: .45em; }
.sheetform > label { display: flex; align-items: baseline; gap: .6em; }
.sheetform > label > span { flex: 0 0 5.4em; font-size: .9em; }
.sheetform input:not([type="radio"]), .sheetform textarea {
  flex: 1; min-width: 0; font: inherit; font-size: 1em; color: #1d1712; background: transparent; border: 0; border-bottom: .08em dashed rgba(42, 33, 27, .6);
  padding: .3em .1em .25em; outline: none; border-radius: 0;
}
.sheetform textarea { resize: none; line-height: 1.45; background: repeating-linear-gradient(transparent 0 1.4em, rgba(42,33,27,.35) 1.4em 1.45em); border-bottom: 0; }
.sheetform input::placeholder, .sheetform textarea::placeholder { color: rgba(42, 33, 27, .42); font-style: italic; }
.sheetform input:focus, .sheetform textarea:focus { background-color: rgba(168, 38, 28, .07); border-bottom-color: #8c1e15; }
.sheetform .msg { align-items: flex-start; }
.sheetform .msg > span { padding-top: .3em; }
.sheetform .pk { border: 0; padding: .15em 0; margin: 0; }
.sheetform .pk legend { float: left; width: 5.4em; margin-right: .6em; padding: 0; font-size: .9em; }
.sheetform .pk label { display: inline-flex; align-items: baseline; gap: .35em; margin-right: 1.2em; cursor: pointer; white-space: nowrap; }
.sheetform .pk input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.sheetform .pk .box::before { content: "[ ]"; white-space: pre; }
.sheetform .pk input:checked + .box::before { content: "[x]"; color: #8c1e15; }
.sheetform .pk input:focus-visible + .box { outline: .1em solid #1b2546; outline-offset: .12em; }
.sheetform .end { display: flex; align-items: center; gap: .8em; margin-top: .5em; }
.sheetform button { font: 700 1.05em/1 var(--type); color: #9c1d16; background: transparent; border: 0; padding: .35em .15em; cursor: pointer; letter-spacing: .04em; }
.sheetform button:hover { text-decoration: underline; text-decoration-thickness: .08em; text-underline-offset: .2em; }
.sheetform button:focus-visible { outline: .1em solid #1b2546; outline-offset: .15em; }
.sheetform .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.sheetform input[aria-invalid="true"], .sheetform textarea[aria-invalid="true"] { border-bottom: .1em solid rgba(178, 52, 38, .9); background-color: rgba(178, 52, 38, .06); }
.sheetform .err { margin: .2em 0 0; font: 400 1.05em/1.25 var(--pencil); transform: rotate(-1.2deg); }
.sheetform button:disabled { opacity: .55; cursor: progress; }
/* the order desk is not open yet (no mail service until go-live): an honest note in red pencil, the address selectable */
.sheetform .soon { margin: .3em 0 0; font: 400 1.05em/1.3 var(--pencil); color: var(--redp); transform: rotate(-1deg); user-select: text; -webkit-user-select: text; }
.sheetform .soon a { color: #1b2546; font-family: var(--type); font-size: .9em; text-decoration: underline; text-decoration-color: rgba(178, 52, 38, .6); text-underline-offset: .2em; white-space: nowrap; }
.sheetform .end small { font-size: .72em; font-style: italic; opacity: .75; }
.sheetform .done {
  position: absolute; left: 16%; right: 16%; top: 40%; margin: 0; padding: .35em .4em .4em; text-align: center;
  font: 700 1.8em/1 var(--type); letter-spacing: .14em; text-transform: uppercase; color: #9c1d16;
  border: .12em solid currentColor; border-radius: .12em; transform: rotate(-7deg); filter: url(#f-stamp-css);
}
.sheetform .done small { display: block; font: italic 400 .36em/1.3 var(--type); letter-spacing: .02em; text-transform: none; margin-top: .45em; }
.sheetform.laid .ln { animation: typein .42s steps(16) both; animation-delay: calc(140ms + var(--i) * 150ms); }
@keyframes typein { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }

/* ---- the camera moves: overscan clips play inside the from-view's stage, registered with its still ---- */
.stage > .instage { position: absolute; left: 0; top: 0; width: 100%; height: 100%; display: block; z-index: 30; pointer-events: none; visibility: visible; object-fit: fill; }

/* ---- first-visit hint: a pencil note on a scrap, once, briefly ---- */
.hint { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%) rotate(-1.5deg); transition: opacity .8s; }
.hint.gone, body.reading .hint { opacity: 0; }

/* ---- the light switch: a brass plate with a toggle (up = lights on = the light room) ---- */
#theme {
  position: fixed; right: calc(12px + env(safe-area-inset-right, 0px)); bottom: calc(12px + env(safe-area-inset-bottom, 0px)); z-index: 30; display: grid; place-items: center; min-width: 44px; min-height: 44px;
  padding: 3px; border: 0; background: transparent; cursor: pointer; border-radius: 6px;
}
#theme .plate {
  position: relative; width: 34px; height: 56px; border-radius: 4px; display: flex; flex-direction: column; align-items: center; justify-content: space-between; padding: 5px 0;
  background: linear-gradient(140deg, #f0d48b 0%, #c39443 38%, #8c6526 66%, #c9a253 100%);
  box-shadow: inset 0 1px 0 rgba(255, 246, 205, .75), inset 0 -1px 1px rgba(60, 40, 10, .6), 0 2px 5px rgba(0, 0, 0, .5);
}
#theme .screw { position: relative; width: 6px; height: 6px; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #f8e6b0, #7d5a20); box-shadow: inset 0 0 0 .5px rgba(60, 40, 10, .6); }
#theme .screw::after { content: ""; position: absolute; left: 0; right: 0; top: 2.5px; height: 1px; background: rgba(50, 32, 8, .7); transform: rotate(35deg); }
#theme .toggle { position: relative; width: 11px; height: 17px; border-radius: 3px; background: #2e2112; box-shadow: inset 0 1px 2px rgba(0, 0, 0, .8), 0 .5px 0 rgba(255, 240, 200, .5); }
#theme .lever { position: absolute; left: 2px; width: 7px; height: 13px; top: -8px; border-radius: 3.5px; background: linear-gradient(90deg, #fbf4e2, #b8ac93); box-shadow: 0 1px 2px rgba(0, 0, 0, .55); transition: top .14s ease-in; }
#theme.off .lever { top: 12px; }
#theme[hidden] { display: none; }
.stage > img.still.ghost { z-index: 1; pointer-events: none; }
#theme .tx { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
#theme:hover .plate { filter: brightness(1.08); }

/* ---- paper overlay (stubs and the notes) ---- */
#sheet { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; background: rgba(15,10,7,.55); padding: 16px; touch-action: auto; }
#sheet[hidden] { display: none; }
#sheet .paper {
  position: relative; width: min(620px, 100%); max-height: calc(100% - 80px); overflow: auto; background: var(--paper);
  padding: 30px 34px 26px; border-radius: 2px; transform: rotate(-.6deg); box-shadow: 0 20px 60px rgba(0,0,0,.6);
  background-image: var(--tex), repeating-linear-gradient(transparent 0 25px, rgba(120,150,190,.18) 25px 26px);
}
#sheet .paper.small { width: min(440px, 100%); }
#sheet .x { position: absolute; right: 6px; top: 4px; min-width: 44px; min-height: 44px; border: 0; background: transparent; font: 600 34px/1 var(--hand); cursor: pointer; color: var(--redp); padding: 0; border-radius: 4px; }
#sheet h1 { font: 700 36px/1.05 var(--hand); color: var(--ink-blue); margin: 0 0 10px; }
#sheet h2 { font: 700 23px/1.15 var(--hand); color: var(--ink-blue); margin: 18px 0 4px; }
#sheet p, #sheet li { font-size: 14.5px; }
#sheet .muted { color: var(--muted); font-style: italic; }
#sheet .coming { display: inline-block; margin-top: 6px; font: 600 18px/1 var(--hand); color: var(--redp); border: 2px solid currentColor; padding: 2px 8px 4px; transform: rotate(-3deg); border-radius: 3px; }
#sheet a { color: var(--accent); }

#toast { position: fixed; left: 50%; top: 16px; transform: translateX(-50%) rotate(-1deg); z-index: 45; background: var(--tex), var(--slip); color: var(--graphite); padding: 8px 16px 10px; font: 400 16px/1.2 var(--pencil); box-shadow: 0 6px 20px rgba(0,0,0,.4); }
#toast[hidden] { display: none; }

/* ---- prototype state (debug=1 only) ---- */
#bar {
  position: fixed; left: 10px; bottom: 10px; z-index: 50; display: flex; align-items: center; gap: 8px;
  max-width: calc(100% - 150px); padding: 6px 10px; background: rgba(22, 16, 12, .86); color: #e9dcc4; border-radius: 10px;
  font: 10px/1.35 ui-monospace, Menlo, monospace; box-shadow: 0 4px 18px rgba(0,0,0,.45);
}
#bar[hidden] { display: none; }
#bar .proto { font: 700 10px/1 -apple-system, system-ui, sans-serif; letter-spacing: .1em; text-transform: uppercase; color: #1b130e; background: #e9b949; padding: 3px 6px; border-radius: 999px; flex: none; }

/* ---- tall / narrow screens ---- */
@media (max-aspect-ratio: 1/1), (max-width: 760px) {
  .cab-top { flex-wrap: wrap; padding: calc(10px + env(safe-area-inset-top, 0px)) calc(10px + env(safe-area-inset-right, 0px)) 0 calc(10px + env(safe-area-inset-left, 0px)); gap: 8px 10px; }
  .cab-top .back { order: 1; font-size: 19px; }
  .search { order: 2; flex: 1; min-width: 0; }
  .search input { width: 100%; }
  .notes { order: 3; flex-basis: 100%; justify-content: flex-start; overflow-x: auto; padding: 8px 6px 10px; gap: 10px; scrollbar-width: none; touch-action: pan-x; }
  .notes::-webkit-scrollbar { display: none; }
  .note { font-size: 20px; padding: 9px 12px 7px; }
  .pager { bottom: calc(10px + env(safe-area-inset-bottom, 0px)); max-width: calc(100% - 84px); }
  .pager .w { display: none; }
  .pager button { font-size: 26px; padding: 4px 14px; }
  .pager .caption { font-size: 12px; white-space: normal; max-width: 240px; margin: -2px auto 2px; }
  .model-card { position: absolute; left: calc(12px + env(safe-area-inset-left, 0px)); right: calc(12px + env(safe-area-inset-right, 0px)); top: auto; bottom: calc(70px + env(safe-area-inset-bottom, 0px)); width: auto; transform: rotate(-.4deg); padding: 12px 16px 10px; }
  .model-card .name { font-size: 34px; margin: 4px 0 2px; }
  .model-card .by { margin-bottom: 8px; font-size: 18px; }
  .model-card .acts { flex-direction: row; justify-content: space-around; }
  .model-card .build .stamp { font-size: 26px; padding: 3px 16px 6px; }
  .model-card .build small { font-size: 11px; }
  .model-card .moc { display: none; }
  .model-card .pnote { margin-top: 6px; font-size: 15px; padding: 4px 8px; }
  .spin-hint { bottom: auto !important; top: 74px; }
  #bar { max-width: calc(100% - 20px); bottom: 74px; }
  #theme { right: calc(8px + env(safe-area-inset-right, 0px)); bottom: calc(8px + env(safe-area-inset-bottom, 0px)); }
  #radio-tab { left: 8px; bottom: 8px; padding-left: 8px; }
  html[data-place="cabinet"] #radio-tab { bottom: 96px; }
  html[data-ped="1"] #radio-tab { bottom: auto; top: 64px; left: auto; right: 8px; }
  #radio-tab .st { min-width: 0; display: none; }
  body.radio-on #radio-tab .st { display: inline; }
  .hint { bottom: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0s !important; animation-duration: 0s !important; animation-delay: 0s !important; }
}

/* ---- dark theme while the Moody set is not round 3 yet: the Afternoon pictures at dusk (a fallback only) ---- */
html[data-dusk="1"] .view > .stage, html[data-dusk="1"] #glide { filter: brightness(.48) saturate(.75) sepia(.18) hue-rotate(-6deg); }
html[data-dusk="1"] .view::after { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 1;
  background: radial-gradient(ellipse at 55% 45%, rgba(0,0,0,0) 40%, rgba(0,0,0,.45) 100%); }
.view > .ui { z-index: 10; }
/* during a move (the glide, a crossfade, a theme switch: ~1 s) a clear shield over the room takes every tap. Before, a
   quick tap while the stand faded out hit the stand's card and opened Build it in a new tab, and a tap that went
   through a fading slip reached the projector (YouTube). The page ignored those taps anyway. (phone test, 12 Nov) */
body.busy #room::after { content: ""; position: absolute; inset: 0; z-index: 60; }

/* ---- phones: the stand's card and the book's page slip ---- */
@media (max-aspect-ratio: 1/1), (max-width: 760px) {
  .bpager { bottom: 10px; max-width: calc(100% - 84px); }
  .bpager .w { display: none; }
  .bpager button { font-size: 26px; padding: 4px 14px; }
  #stage .model-card { bottom: calc(80px + env(safe-area-inset-bottom, 0px)); }
}

/* ---- contact shadows drawn by the page (under the model on the stand, and small ones on the shelf) ---- */
.cshadow { position: absolute; display: block; pointer-events: none; border-radius: 50%; mix-blend-mode: multiply;
  background: radial-gradient(closest-side, rgba(36, 20, 10, var(--a, .5)) 0%, rgba(36, 20, 10, calc(var(--a, .5) * .6)) 42%, rgba(36, 20, 10, 0) 100%); }
#stage .hero .cshadow { z-index: 0; }
#stage .hero i { z-index: 1; }
.slot.out .cshadow { visibility: hidden; }
.sclip { position: absolute; pointer-events: none; }

/* ---- short landscape phones (844 x 390): the paging slip at the bottom covered the shelf's bottom row (taps on those
   models hit the slip). It becomes two paper tabs at the screen's sides, in the wall beside the cabinet, and the count
   sits under the "next" tab; the caption is left out. (phone test, 12 Nov) ---- */
@media (orientation: landscape) and (max-height: 500px) {
  #cabinet .pager { left: 0; right: 0; top: 0; bottom: 0; max-width: none; padding: 0; transform: none; pointer-events: none; filter: none; }
  #cabinet .pager::before, #cabinet .pager .caption, #cabinet .pager .w { display: none; }
  #cabinet .pager button {
    position: absolute; top: 50%; pointer-events: auto; min-width: 44px; min-height: 64px; padding: 4px 10px; font-size: 30px;
    background: var(--tex), var(--slip); box-shadow: 0 1px 1px rgba(0, 0, 0, .25), 0 4px 8px rgba(0, 0, 0, .3);
  }
  #cabinet .pager .prev { left: calc(6px + env(safe-area-inset-left, 0px)); transform: translateY(-50%) rotate(-1.5deg); }
  #cabinet .pager .next { right: calc(6px + env(safe-area-inset-right, 0px)); transform: translateY(-50%) rotate(1.5deg); }
  #cabinet .pager .count {
    position: absolute; top: calc(50% + 40px); right: calc(4px + env(safe-area-inset-right, 0px)); min-width: 0; padding: 3px 6px 4px;
    font-size: 14px; white-space: nowrap; background: var(--tex), var(--slip); box-shadow: 0 2px 5px rgba(0, 0, 0, .3);
  }
}

/* ---- short portrait screens (iPhone SE, the Instagram in-app browser): a more compact card on the stand, so the
   model keeps its room above it (phone test, 12 Nov) ---- */
@media (max-aspect-ratio: 1/1) and (max-height: 740px) {
  #stage .model-card { padding: 8px 14px 8px; }
  #stage .model-card .fr { font-size: 15px; }
  #stage .model-card .name { font-size: 29px; margin: 2px 0 0; }
  #stage .model-card .by { font-size: 16px; margin-bottom: 2px; }
  #stage .model-card .build small { margin-top: 2px; }
  #stage .model-card .pnote { font-size: 13px; margin-top: 4px; padding: 2px 6px; }
}
/* ---- narrow landscape phones (667 x 375, 740 x 360): the phone rules put the card across the bottom, over the model;
   the stand's landscape camera wants it beside the model, as on wider screens (phone test, 12 Nov) ---- */
@media (orientation: landscape) and (max-height: 500px) and (max-width: 760px) {
  #stage .model-card { left: auto; right: calc(10px + env(safe-area-inset-right, 0px)); top: 50%; bottom: auto; width: min(260px, 38vw);
    transform: translateY(-50%) rotate(.6deg); padding: 8px 12px 8px; }
  #stage .model-card .name { font-size: 28px; }
  #stage .model-card .acts { flex-direction: column; gap: 0; }
  #stage .model-card .pnote { font-size: 13px; }
}

/* ====================================================================================================================
   PHONES (12 Nov, Chris approved from the mock-up): a touch-only screen with a short side under 540 px (html.phone,
   set by proto.js; ?touch=1 forces it). Everything below is scoped to html.phone: the desktop page is unchanged.
   ==================================================================================================================== */
#thumb { display: none; }
html.phone #home .hint { display: none; }
.lits .halo { position: absolute; display: block; pointer-events: none; opacity: 0; mix-blend-mode: screen; }
html.phone #stage .hero.ghost { z-index: 2; }

/* ---- the thumb bar: a torn paper strip, the three places (window · desk · shelf), the current one ringed in red
   pencil; on the desk, the shelf and the stand ---- */
html.phone #thumb {
  position: fixed; left: 50%; bottom: calc(10px + env(safe-area-inset-bottom, 0px)); z-index: 30;
  display: flex; align-items: center; padding: 3px 10px 5px; isolation: isolate; white-space: nowrap;
  filter: drop-shadow(0 1px .6px rgba(0, 0, 0, .35)) drop-shadow(0 5px 8px rgba(0, 0, 0, .3));
  opacity: 0; transform: translate(-50%, 22px) rotate(-1.2deg); pointer-events: none;
  transition: opacity .22s ease-out, transform .38s cubic-bezier(.2, .8, .2, 1);
}
html.phone #thumb[hidden] { display: none; }
html.phone #thumb.on { opacity: 1; transform: translate(-50%, 0) rotate(-1.2deg); pointer-events: auto; }
html.phone #thumb::before {
  content: ""; position: absolute; inset: 0; z-index: -1; background: var(--tex), var(--slip);
  clip-path: polygon(0 9%, 7% 1%, 19% 7%, 33% 0, 49% 6%, 63% 1%, 78% 7%, 91% 0, 100% 6%, 99% 90%, 92% 100%, 77% 94%, 60% 100%, 44% 95%, 27% 100%, 12% 94%, 1% 100%);
}
html.phone #thumb button {
  min-width: 64px; min-height: 48px; border: 0; background: transparent; cursor: pointer; padding: 5px 13px 9px;
  font: 600 25px/1 var(--hand); color: var(--ink-blue); border-radius: 4px; -webkit-tap-highlight-color: transparent;
}
html.phone #thumb button > span { display: inline-block; transition: transform .12s; }
html.phone #thumb button:active > span { transform: translateY(1.5px) scale(.96); }
html.phone #thumb button { position: relative; }
html.phone #thumb .ring { position: absolute; left: 3px; top: 4px; width: calc(100% - 6px); height: calc(100% - 9px); overflow: visible; pointer-events: none; stroke-width: 2.4; opacity: 0; transition: opacity .2s; }
html.phone #thumb button[aria-current] .ring { opacity: 1; }
html.phone #thumb button:not([aria-current]) > span { opacity: .82; }
html.phone #thumb button:focus-visible { outline: 2.5px solid var(--ring-in); outline-offset: -2px; box-shadow: 0 0 0 5px var(--ring-out); }
html.phone #thumb .sep { font: 400 22px/1 var(--pencil); color: var(--graphite); padding-bottom: 4px; }

/* ---- the brass light switch: top right on phones (the bottom is the thumb's) ---- */
html.phone #theme { top: calc(8px + env(safe-area-inset-top, 0px)); bottom: auto; right: calc(8px + env(safe-area-inset-right, 0px)); }
html.phone #radio-tab { top: calc(8px + env(safe-area-inset-top, 0px)) !important; bottom: auto !important; left: calc(8px + env(safe-area-inset-left, 0px)) !important; right: auto !important; }

/* ---- bottom sheets: a sheet of paper slides up (at most ~60 % of the screen; scrolls inside) ---- */
html.phone #bsheet { display: block; position: fixed; inset: 0; z-index: 42; }
html.phone #bsheet[hidden] { display: none; }
#bsheet .scrim { position: absolute; inset: 0; background: rgba(12, 8, 5, .4); opacity: 0; transition: opacity .35s ease-out; }
#bsheet.open .scrim { opacity: 1; }
#bsheet .bpaper {
  position: absolute; left: calc(6px + env(safe-area-inset-left, 0px)); right: calc(6px + env(safe-area-inset-right, 0px)); bottom: -12px;
  max-height: calc(min(62vh, 62dvh) + 12px); display: flex; flex-direction: column;
  padding: 8px 20px calc(24px + env(safe-area-inset-bottom, 0px)); color: var(--ink);
  background: var(--tex), var(--slip); border-radius: 5px 5px 0 0; box-shadow: 0 -4px 26px rgba(0, 0, 0, .42);
  transform: translateY(calc(100% + 30px)) rotate(-.5deg); transition: transform .42s cubic-bezier(.2, .8, .2, 1); touch-action: none;
  font: 16px/1.4 Georgia, serif;
}
#bsheet.open .bpaper { transform: translateY(0) rotate(-.4deg); }
/* the grab handle: a 26 px drag zone (the bar drawn inside it) outside the scrolling text, so a swipe down there is the sheet's */
#bsheet .grab { flex: none; position: relative; width: 140px; height: 26px; margin: -8px auto 0; touch-action: none; }
#bsheet .grab::before { content: ""; position: absolute; left: 50%; top: 9px; width: 46px; height: 5px; margin-left: -23px; border-radius: 3px; background: rgba(60, 45, 30, .25); }
#bsheet .x { position: absolute; right: 4px; top: 2px; min-width: 48px; min-height: 48px; border: 0; background: transparent; font: 600 34px/1 var(--hand); color: var(--redp); cursor: pointer; }
#bsheet .body { overflow: auto; overscroll-behavior: contain; min-height: 0; }
#bsheet .bpaper.scrolls .body { touch-action: pan-y; }
#bsheet h2 { margin: 0 44px 8px 0; font: 700 34px/1.05 var(--hand); color: var(--ink-blue); outline: none; }
#bsheet .wishes { margin: 0; padding-left: 1.5em; font: 500 23px/1.15 var(--hand); color: var(--ink-blue); }
#bsheet .wishes li { padding: 3px 0 3px; border-bottom: 1px solid rgba(70, 72, 78, .25); }
#bsheet .from { margin: 10px 0 0; text-align: left; font-size: 17px; line-height: 1.3; color: var(--graphite); }
#bsheet .prices { list-style: none; margin: 0 0 6px; padding: 0; font: 600 30px/1.3 var(--hand); }
#bsheet .sub { margin: 4px 0 14px; font-size: 16px; line-height: 1.3; }
#bsheet .cta, #bsheet .btns button, #bsheet .cr {
  display: flex; align-items: center; justify-content: center; width: 100%; min-height: 54px; border: 3px solid var(--ink-red); border-radius: 6px;
  background: transparent; color: var(--ink-red); font: 700 24px/1 var(--hand); cursor: pointer; transform: rotate(-.8deg);
}
#bsheet .cta .ink { color: inherit; }
#bsheet .btns { display: flex; gap: 10px; margin: 6px 0 8px; }
#bsheet .btns .nx, #bsheet .cr { border-color: rgba(27, 37, 70, .6); color: var(--ink-blue); transform: rotate(.6deg); }
#bsheet .cr { min-height: 44px; border: 0; font-size: 20px; text-decoration: underline; text-decoration-color: rgba(178, 52, 38, .5); text-underline-offset: 5px; transform: none; }
#bsheet .btns .pw[aria-pressed="true"] { background: rgba(178, 52, 38, .1); }
#bsheet .lcd {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; height: 92px; margin: 2px 0 8px;
  border-radius: 12px; background: #2a1a10; box-shadow: inset 0 0 0 5px #5a3a22, inset 0 0 0 7px #24160c; overflow: hidden;
}
#bsheet .lcd .glowp { position: absolute; inset: 7px; border-radius: 7px; background: radial-gradient(ellipse at 50% 45%, rgba(255, 190, 90, .95), rgba(255, 150, 40, .85) 60%, rgba(220, 110, 20, .75)); opacity: .3; transition: opacity .4s; }
body.radio-on #bsheet .lcd .glowp { opacity: 1; }
#bsheet .lcd .clock { position: relative; width: 46%; height: 46px; display: block; }
#bsheet .lcd .sg { fill: rgba(60, 24, 0, .92); opacity: .07; }
#bsheet .lcd .sg.on { opacity: .75; }
body.radio-on #bsheet .lcd .sg.on { opacity: 1; }
#bsheet .lcd .colon rect { fill: rgba(60, 24, 0, .9); opacity: .75; }
body.radio-on #bsheet .lcd .colon rect { opacity: 1; animation: lcdblink 1s steps(1) infinite; }
#bsheet .lcd .st { position: relative; font: 700 15px/1 ui-monospace, Menlo, monospace; letter-spacing: .14em; color: rgba(60, 24, 0, .92); opacity: 0; transition: opacity .3s; }
body.radio-on #bsheet .lcd .st { opacity: 1; }
#bsheet .now { margin: 0 0 6px; font-size: 15px; line-height: 1.3; color: var(--graphite); min-height: 2.6em; }

/* ---- the order desk: a full-width typed sheet docked at the bottom, above the on-screen keyboard (--kb) ---- */
html.phone #order .osheet {
  position: absolute; left: 0; right: 0; bottom: var(--kb, 0px); z-index: 10; display: flex; flex-direction: column;
  max-height: calc(var(--vvh, 100vh) - env(safe-area-inset-top, 0px) - 20px);
  background: var(--tex), var(--paper); border-radius: 5px 5px 0 0; box-shadow: 0 -4px 26px rgba(0, 0, 0, .45);
}
html.phone #order .osheet .nav { position: static; padding: 8px calc(10px + env(safe-area-inset-left, 0px)) 0; }
html.phone #order .osheet .back { font-size: 20px; }
html.phone #order .oscroll { overflow: auto; overscroll-behavior: contain; touch-action: pan-y; min-height: 0; }
html.phone #order .sheetform {
  position: relative; left: auto; top: auto; transform: none !important; width: auto !important; height: auto !important;
  mix-blend-mode: normal; font-size: 16px; padding: 2px calc(18px + env(safe-area-inset-right, 0px)) 0 calc(18px + env(safe-area-inset-left, 0px)); gap: 0;
}
html.phone #order .sheetform h2 { font-size: 19px; line-height: 1.15; }
html.phone #order .sheetform .sub { font-size: 15px; margin: 4px 0 6px; }
html.phone #order .sheetform > label { align-items: center; min-height: 48px; }
html.phone #order .sheetform > label > span { flex-basis: 5.6em; font-size: 16px; }
html.phone #order .sheetform input:not([type="radio"]), html.phone #order .sheetform textarea { font-size: 16px; min-height: 44px; }
html.phone #order .sheetform textarea { min-height: 70px; line-height: 1.45; padding-top: .45em; }
html.phone #order .sheetform .msg { align-items: flex-start; padding-top: 4px; }
html.phone #order .sheetform .pk { display: flex; flex-wrap: wrap; align-items: center; min-height: 48px; padding: 0; }
html.phone #order .sheetform .pk legend { float: none; display: inline-block; width: 5.6em; font-size: 16px; }
html.phone #order .sheetform .pk label { min-height: 44px; align-items: center; font-size: 16px; margin-right: 1em; }
html.phone #order .sheetform .end {
  position: sticky; bottom: 0; margin: 6px -18px 0; padding: 6px 18px calc(10px + env(safe-area-inset-bottom, 0px));
  background: var(--tex), var(--paper); box-shadow: 0 -6px 10px -6px rgba(40, 30, 20, .25); flex-wrap: wrap; gap: 2px 12px;
}
html.kb.phone #order .sheetform .end { padding-bottom: 10px; }
html.phone #order .sheetform button[type="submit"] {
  min-height: 52px; flex: 1 0 auto; font-size: 18px; border: 2px solid rgba(156, 29, 22, .75); border-radius: 4px; padding: 0 14px;
}
html.phone #order .sheetform .end small { font-size: 13px; }
html.phone #order .sheetform .err { font-size: 17px; }
html.phone #order .sheetform .soon { font-size: 19px; padding: 4px 0 calc(14px + env(safe-area-inset-bottom, 0px)); }
html.phone #order .sheetform .soon a { font-size: 17px; display: inline-block; min-height: 44px; line-height: 44px; }
html.phone #order .sheetform .done { font-size: 26px; top: 30%; }

html.phone #stage .spin-hint { top: calc(12px + env(safe-area-inset-top, 0px)); }

/* ---- the shelf (phones; Chris 12 Nov: the side arrows did not read as "more shelves"): one obvious paper slip centred
   above the bar, "‹  shelf 1 of 2 · 34 models  ›" with 56 px arrows, a one-time "more models ›" nudge; the filters and
   the search are secondary, in a row at the top; the bar is the way back to the desk ---- */
.pager .dots, .pager .more { display: none; }
html.phone #cabinet .pager {
  left: 50%; right: auto; bottom: calc(74px + env(safe-area-inset-bottom, 0px)); padding: 0 2px; max-width: calc(100% - 16px);
  transform: translateX(-50%) rotate(-1deg); display: flex; align-items: center; white-space: nowrap;
}
html.phone #cabinet .pager .pager-row { display: contents; }
html.phone #cabinet .pager button { order: 0; min-width: 56px; min-height: 56px; padding: 0 10px 6px; font-size: 38px; line-height: 1; }
html.phone #cabinet .pager .next { order: 3; }
html.phone #cabinet .pager button:disabled { color: rgba(70, 72, 78, .3); }
html.phone #cabinet .pager .count { order: 1; padding: 0 4px; min-width: 0; font: 600 21px/1 var(--hand); color: var(--ink-blue); }
html.phone #cabinet .pager .count::before { content: "shelf "; }
html.phone #cabinet .pager .caption { order: 2; margin: 2px 0 0; padding-right: 2px; max-width: 150px; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html.phone #cabinet .pager .caption::before { content: "· "; }
/* the one-time nudge: inside the slip, the count gives way to "more models" in red pencil and the › wiggles (5 s) */
html.phone #cabinet .pager.nudging .caption { display: none; }
html.phone #cabinet .pager.nudging .more { display: block; order: 2; padding: 0 2px; font: 600 19px/1 var(--hand); color: var(--ink-red); }
html.phone #cabinet .pager.nudging .next { color: var(--ink-red); animation: nudge 1s ease-in-out 3; }
@keyframes nudge { 0%, 100% { transform: translateX(0); } 40% { transform: translateX(6px); } 60% { transform: translateX(2px); } }
html.phone #cabinet .cab-top {
  top: 0; bottom: auto; flex-wrap: nowrap; align-items: center; gap: 6px;
  padding: calc(6px + env(safe-area-inset-top, 0px)) calc(62px + env(safe-area-inset-right, 0px)) 0 calc(6px + env(safe-area-inset-left, 0px));
}
html.phone #cabinet .cab-top .back { display: none; }
html.phone #cabinet .notes { order: 1; flex: 1 1 auto; flex-basis: auto; min-width: 0; padding: 6px 6px 6px; gap: 8px; }
html.phone #cabinet .note { font-size: 18px; padding: 9px 10px 7px; }
html.phone #cabinet .note small { font-size: 14px; margin-left: 5px; }
html.phone #cabinet .search { order: 2; flex: 0 0 100px; padding: 0 6px 2px; }
html.phone #cabinet .search input { width: 100%; font-size: 18px; min-height: 44px; }
html.phone #cabinet .search input::placeholder { font-size: 16px; }

/* ---- the book (phones): "close" bottom left, the page slip bottom right, both in thumb reach ---- */
html.phone #book .nav { top: auto; bottom: calc(10px + env(safe-area-inset-bottom, 0px)); }
html.phone #book .bpager { left: auto; right: calc(8px + env(safe-area-inset-right, 0px)); bottom: calc(10px + env(safe-area-inset-bottom, 0px)); transform: rotate(-.8deg); max-width: calc(100% - 120px); }
html.phone.kb[data-place="order"] #theme { visibility: hidden; }
/* the shelf-full leaving on a page flick (phones): one copy, one layer, gone after 220 ms */
.slots-leaving { position: absolute; inset: 0; pointer-events: none; }
.oslot { position: absolute; inset: 0; pointer-events: none; }
.oslot .cut { position: absolute; display: block; }
.oslot .pick { display: none; }
/* the light switch on phones: one screen-size veil dims the room while the pictures change (setTheme) */
.themeveil { position: absolute; inset: 0; z-index: 55; background: var(--bg); opacity: 0; pointer-events: none; }

/* ---- a phone on its side: the page is built for a phone held upright (Chris, 12 Nov); a paper note covers the room ---- */
#upright { display: none; }
html.phone.sideways #upright { display: grid; position: fixed; inset: 0; z-index: 100; place-items: center; background: var(--bg); touch-action: none; }
#upright p { margin: 0; padding: 20px 34px 18px; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; transform: rotate(-1.5deg); }
#upright .ink { font: 700 34px/1 var(--hand); color: var(--ink-blue); }
#upright small { font: 400 16px/1.2 var(--pencil); color: var(--graphite); }
#upright .phone-glyph { display: block; width: 26px; height: 44px; margin-bottom: 4px; border: 3px solid rgba(27, 37, 70, .85); border-radius: 6px; animation: upright 1.8s ease-in-out infinite alternate; }
@keyframes upright { 0%, 25% { transform: rotate(90deg); } 75%, 100% { transform: rotate(0deg); } }
/* ---- ?debug=1: a tiny readout top left (build, place, live pictures / canvases / videos, decoded MB, last error) ---- */
#dbg { position: fixed; left: calc(4px + env(safe-area-inset-left, 0px)); top: calc(2px + env(safe-area-inset-top, 0px)); right: 64px; z-index: 200;
  font: 9px/1.25 ui-monospace, Menlo, monospace; color: #e9ffd9; background: rgba(0, 0, 0, .62); padding: 2px 5px; border-radius: 3px; pointer-events: none; word-break: break-word; }
html.phone .tag, html.phone .pick .name { display: none; }      /* phones: no tags (a tap does the thing) */
/* a closing sheet never takes a tap (its scrim fades out for ~0.4 s) */
#bsheet:not(.open) { pointer-events: none; }
/* phones: no text under 14 px; a pressed control answers under the finger */
html.phone #order .sheetform .end small { font-size: 14px; }
html.phone :is(#thumb button, #cabinet .pager button, .mstep, #book .bpager button, #bsheet button, #bsheet a, .model-card a, .back, .note):active { opacity: .62; transition: opacity 0s; }

/* ---- two-tap tags (phones, 12 Nov evening): the first tap on a desk / window object shows ONE paper tag by it, a tap on
   the tag does the thing. One fixed element in screen space, outside the room's picture (the iOS rule: nothing animated
   or layered per object inside the .stage); >= 48 px tall; placed by showPTag inside the screen and above the bar ---- */
.ptag { display: none; }
html.phone .ptag {
  display: block; position: fixed; left: 0; top: 0; z-index: 35; margin: 0; padding: 0; border: 0; background: transparent;
  text-decoration: none; cursor: pointer; -webkit-tap-highlight-color: transparent; color: var(--ink-blue);
  filter: drop-shadow(0 1px .6px rgba(0, 0, 0, .4)) drop-shadow(0 4px 7px rgba(0, 0, 0, .3));
  opacity: 0; transform: translateY(4px); transition: opacity .14s ease-out, transform .2s cubic-bezier(.2, .8, .2, 1);
}
html.phone .ptag.on { opacity: 1; transform: none; }
html.phone .ptag .card {
  position: relative; display: flex; align-items: center; min-height: 52px; white-space: nowrap;
  padding: 4px 18px 6px 30px; background: var(--tex), var(--slip);
  clip-path: polygon(14px 0, 100% 0, 100% 100%, 14px 100%, 0 50%); transform: rotate(var(--rot, -1.5deg)); transform-origin: 8px 50%;
}
html.phone .ptag .card::before {
  content: ""; position: absolute; left: 9px; top: 50%; width: 9px; height: 9px; margin-top: -4.5px; border-radius: 50%;
  background: rgba(40, 28, 18, .62); box-shadow: 0 0 0 1.8px rgba(150, 118, 76, .55);
}
html.phone .ptag .tx { font: 700 25px/1.05 var(--hand); color: var(--ink-blue); }
html.phone .ptag:active .card { opacity: .7; }
html.phone .ptag:focus-visible { outline: 2.5px solid var(--ring-in); outline-offset: 2px; }
html.phone .ptag[inert] { pointer-events: none; }
/* phones: the yellow title card is not a target; the brightened copies and the radio's display change without
   transitions (no per-object animation inside the picture); the radio's controls live in its sheet only */
html.phone #home .hot[data-key="title_card"] { pointer-events: none; }
html.phone .litc, html.phone .litc.on { transition: none; }
html.phone .radio-dial .sg, html.phone .radio-dial.glow, html.phone .radio-dial.marks::before, html.phone .radio-dial .st { transition: none; }
html.phone body.radio-on .radio-dial .colon rect { animation: none; }
html.phone #radio-tab { display: none !important; }
/* the order sheet never grows wider than the screen (Chris's iPhone: "Send proposal" cut off on the right). A fieldset's
   default min-width is its content's, and the typewriter face on iOS is wider than on the Mac: every row may shrink and
   wrap, the Send row is the sheet's own width, the button's label may wrap */
html.phone #order .osheet, html.phone #order .oscroll { max-width: 100vw; overflow-x: hidden; }
html.phone #order .sheetform, html.phone #order .sheetform > *, html.phone #order .sheetform .pk { min-width: 0; max-width: 100%; box-sizing: border-box; }
html.phone #order .sheetform .pk label { white-space: normal; }
html.phone #order .sheetform > .end { max-width: none; }
html.phone #order .sheetform button[type="submit"] { flex: 1 1 100%; min-width: 0; max-width: 100%; white-space: normal; line-height: 1.15; }
html.phone #order .sheetform h2 { overflow-wrap: anywhere; }
html.phone .ptag:not(.on) { pointer-events: none; }

/* ============ the Screening (desktop stand, 12 Nov; the mock-up prototypes/stage/ direction B). The board is laid out
   in 1440 x 900 design px and scaled by proto.js (scrLayout); the strip spans the window. Phones and portrait screens
   keep the card (html.phone rules below restyle it as the compact screening). ============ */
#stage .scr { display: none; position: absolute; inset: 0; pointer-events: none; z-index: 9; --chalk: rgba(242, 238, 226, .95); --sdim: 1; }
:root[data-theme="dark"] #stage .scr { --sdim: .78; }
html:not(.phone)[data-mode="landscape"] #stage .scr { display: block; }
html:not(.phone)[data-mode="landscape"] #stage .model-card { display: none; }
#stage .scr-board { position: absolute; left: 0; top: 0; width: 1440px; height: 900px; transform-origin: 0 0; pointer-events: none; }
#stage .scr-board > * { pointer-events: auto; }
#stage .scr .beam { position: absolute; left: 0; top: 0; width: 1440px; height: 900px; pointer-events: none; mix-blend-mode: screen; opacity: .22; z-index: 0; }
:root[data-theme="dark"] #stage .scr .beam { opacity: .12; }
#stage .scr .screen { position: absolute; left: 800px; top: 18px; width: 532px; height: 640px; z-index: 1; }
#stage .scr .case { position: absolute; left: -10px; right: -10px; top: 0; height: 30px; border-radius: 15px; z-index: 2;
  background: linear-gradient(#5c5650, #2c2724 45%, #171412 70%, #3b3530); box-shadow: 0 6px 10px rgba(0, 0, 0, .45); }
#stage .scr .case::before, #stage .scr .case::after { content: ""; position: absolute; top: -3px; width: 22px; height: 36px; border-radius: 6px; background: linear-gradient(90deg, #6f6a62, #2b2622); }
#stage .scr .case::before { left: -4px; } #stage .scr .case::after { right: -4px; }
#stage .scr .cloth { position: absolute; left: 8px; right: 8px; top: 20px; height: 584px; background: #dcd8cd var(--tex);
  box-shadow: 5px 16px 30px -10px rgba(30, 16, 6, .6); filter: brightness(var(--sdim)); }
:root[data-theme="dark"] #stage .scr .cloth { background-color: #8f8a80; }
#stage .scr .slat { position: absolute; left: 0; right: 0; top: 598px; height: 14px; border-radius: 3px; background: linear-gradient(#7a5434, #4a2f1a); box-shadow: 0 4px 6px rgba(0, 0, 0, .4); }
#stage .scr .cord { position: absolute; left: 84%; top: 612px; width: 2px; height: 20px; background: #3a2a1c; }
#stage .scr .cord::after { content: ""; position: absolute; left: -7px; top: 18px; width: 14px; height: 14px; border: 3px solid #b48a3c; border-radius: 50%; }
/* the projected picture: a warm dark title card (no thumbnail: the model itself stands in the room) */
#stage .scr .film { position: absolute; left: 26px; right: 26px; top: 44px; height: 536px; overflow: hidden;
  background: radial-gradient(ellipse at 50% 42%, #5a4632 0%, #2e2219 58%, #1a120c 100%);
  box-shadow: 0 0 40px 8px rgba(255, 236, 190, .22); filter: brightness(var(--sdim)); }
:root[data-theme="dark"] #stage .scr .film { box-shadow: 0 0 30px 4px rgba(255, 236, 190, .1); }
#stage .scr .film::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at 50% 45%, rgba(255, 240, 205, .1), rgba(20, 10, 0, .45) 100%); }
#stage .scr .tcard { position: absolute; left: 0; right: 0; top: 40px; z-index: 2; text-align: center; color: #fbf3e2; padding: 0 28px; text-shadow: 0 2px 10px rgba(0, 0, 0, .55); }
#stage .scr .tcard p { margin: 0; }
#stage .scr .sfr { font: 400 20px/1 var(--pencil); opacity: .9; }
#stage .scr .sname { margin: 12px 0 0; font: 700 76px/.95 var(--hand); color: #fbf3e2; outline: none; overflow-wrap: anywhere; }
#stage .scr .rule { width: 120px; height: 14px; margin: 14px auto 10px; display: block; }
#stage .scr .rule path { fill: none; stroke: #fbf3e2; stroke-width: 2.2; stroke-linecap: round; opacity: .8; }
#stage .scr .lbl { font: 400 21px/1 var(--pencil); opacity: .92; }
#stage .scr .cred { margin-top: 8px !important; padding-bottom: 14px; }
#stage .scr .sig { position: relative; display: inline-block; font: 700 56px/1.05 var(--hand); color: #ffe2a4; }
#stage .scr a.sig { text-decoration: none; }
#stage .scr .sig .swoosh { position: absolute; left: -2%; bottom: -10px; width: 104%; height: 20px; overflow: visible; }
#stage .scr .sig .swoosh path { fill: none; stroke: #ffc77e; stroke-width: 3; stroke-linecap: round; }
#stage .scr .play { position: absolute; left: 50%; bottom: 34px; transform: translateX(-50%); z-index: 3; display: flex; flex-direction: column; align-items: center; gap: 10px;
  color: #fbf3e2; background: none; border: 0; padding: 6px 14px; cursor: pointer; border-radius: 8px; }
#stage .scr .play svg { width: 88px; height: 88px; transition: transform .2s; }
#stage .scr .play span { font: 600 28px/1 var(--hand); text-shadow: 0 2px 8px rgba(0, 0, 0, .6); }
#stage .scr .play:hover svg, #stage .scr .play:focus-visible svg { transform: scale(1.08); }
#stage .scr a.play { text-decoration: none; }
#stage .scr .play[hidden] { display: none; }
#stage .scr .play:focus-visible, #stage .scr .ticket:focus-visible, #stage .scr .strip button:focus-visible { outline: 2.5px solid #fff3da; outline-offset: 3px; }
/* the slate: chalk on black, leaning on the screen */
#stage .scr .slate { position: absolute; left: 660px; top: 560px; width: 300px; transform: rotate(-3.5deg); z-index: 3; filter: drop-shadow(5px 12px 14px rgba(20, 10, 2, .55)) brightness(var(--sdim)); }
#stage .scr .slate .sticks { position: relative; height: 34px; }
#stage .scr .slate .sticks i { position: absolute; left: 0; right: 0; height: 15px; border-radius: 2px; background: repeating-linear-gradient(-55deg, #f2efe6 0 22px, #1d1d1c 22px 44px); }
#stage .scr .slate .sticks i:first-child { top: 0; transform: rotate(-9deg); transform-origin: 2% 100%; }
#stage .scr .slate .sticks i:last-child { bottom: 0; }
#stage .scr .slab { background: #26292a radial-gradient(ellipse at 30% 20%, rgba(255, 255, 255, .06), transparent 60%); border-radius: 0 0 4px 4px; padding: 8px 12px 10px; color: var(--chalk); }
#stage .scr .slab .row { display: grid; border-top: 1.5px solid rgba(242, 238, 226, .4); }
#stage .scr .slab .row:first-child { border-top: 0; }
#stage .scr .slab .row.three { grid-template-columns: .9fr 1fr 1.45fr; }
#stage .scr .slab .row.two { grid-template-columns: 1fr 1fr; }
#stage .scr .slab .cell { padding: 4px 6px 5px; border-left: 1.5px solid rgba(242, 238, 226, .4); min-width: 0; }
#stage .scr .slab .cell:first-child { border-left: 0; }
#stage .scr .slab .k { display: block; font: 700 10px/1 var(--type); letter-spacing: .14em; color: rgba(242, 238, 226, .66); white-space: nowrap; }
#stage .scr .slab .v { display: block; font: 600 26px/1.05 var(--hand); filter: url(#f-chalk); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#stage .scr .slab .v.big { font-size: 29px; }
/* Build it: a red cinema ticket, Admit One */
#stage .scr .ticket { position: absolute; left: 1010px; top: 668px; z-index: 3; display: flex; transform: rotate(2deg); text-decoration: none; max-width: 400px;
  filter: drop-shadow(4px 10px 10px rgba(30, 14, 4, .5)) brightness(var(--sdim)); transition: transform .15s ease-out; }
#stage .scr .ticket:hover { transform: rotate(1deg) translateY(-3px); }
#stage .scr .ticket .main, #stage .scr .ticket .stub { background: #c8463a var(--tex); color: #fff4e4; }
#stage .scr .ticket .main { padding: 10px 20px 12px 26px; display: flex; flex-direction: column; justify-content: center; min-width: 0;
  -webkit-mask: radial-gradient(circle 9px at 0 50%, transparent 98%, #000); mask: radial-gradient(circle 9px at 0 50%, transparent 98%, #000); }
#stage .scr .ticket .main b { font: 700 50px/.95 var(--hand); }
#stage .scr .ticket .main small { font: 400 16px/1.25 var(--pencil); }
#stage .scr .ticket .main small em { font: 700 21px/1 var(--hand); font-style: normal; overflow-wrap: anywhere; }
#stage .scr .ticket .stub { width: 58px; flex: none; border-left: 3px dotted rgba(255, 244, 228, .7); display: flex; align-items: center; justify-content: center;
  -webkit-mask: radial-gradient(circle 9px at 100% 50%, transparent 98%, #000); mask: radial-gradient(circle 9px at 100% 50%, transparent 98%, #000); }
#stage .scr .ticket .stub span { writing-mode: vertical-rl; transform: rotate(180deg); font: 700 12px/1 var(--type); letter-spacing: .2em; }
/* the 35 mm film strip of the neighbouring models */
#stage .scr .strip { position: absolute; left: 0; right: 0; bottom: 0; pointer-events: auto; overflow: hidden;
  background: linear-gradient(#3a2009, #5b3410 14%, #4a2a0c 86%, #2e1906); box-shadow: 0 -4px 14px rgba(0, 0, 0, .45); }
#stage .scr .strip-in { position: absolute; left: 0; bottom: 0; height: 112px; transform-origin: 0 100%; display: flex; align-items: center; justify-content: center; gap: 14px; }
#stage .scr .strip-in::before, #stage .scr .strip-in::after { content: ""; position: absolute; left: 0; right: 0; height: 10px; pointer-events: none;
  background: repeating-linear-gradient(90deg, transparent 0 9px, rgba(245, 228, 196, .85) 9px 19px, transparent 19px 28px); border-radius: 2px; }
#stage .scr .strip-in::before { top: 6px; } #stage .scr .strip-in::after { bottom: 6px; }
#stage .scr .frames { display: flex; gap: 16px; }
#stage .scr .strip-in { padding-right: 64px; }
#stage .scr .strip .fr { position: relative; width: 126px; height: 72px; flex: none; background: #1d1206; border-radius: 3px; border: 0; padding: 0; cursor: pointer; display: block; }
#stage .scr .strip .fr.empty { opacity: .5; cursor: default; }
#stage .scr .strip .fr .cut { position: absolute; inset: 0; overflow: hidden; border-radius: 3px; filter: sepia(.45) brightness(.88); transition: filter .15s; }
#stage .scr .strip .fr .cut img { position: absolute; max-width: none; }
#stage .scr .strip .fr:hover .cut, #stage .scr .strip .fr:focus-visible .cut, #stage .scr .strip .fr.now .cut { filter: none; }
:root[data-theme="dark"] #stage .scr .strip .fr .cut { filter: sepia(.4) brightness(.6); }
:root[data-theme="dark"] #stage .scr .strip .fr.now .cut, :root[data-theme="dark"] #stage .scr .strip .fr:hover .cut { filter: brightness(.82); }
#stage .scr .strip .fr.now { outline: 3px solid rgba(232, 74, 52, .95); outline-offset: 3px; }
#stage .scr .strip .fr .nm { position: absolute; left: 50%; bottom: 100%; margin-bottom: 4px; transform: translateX(-50%); white-space: nowrap; padding: 3px 10px 5px; z-index: 3;
  background: var(--slip) var(--tex); font: 600 18px/1 var(--hand); color: var(--ink-blue); box-shadow: 2px 5px 8px rgba(0, 0, 0, .35); opacity: 0; transition: opacity .12s; pointer-events: none; }
#stage .scr .strip .fr:hover .nm, #stage .scr .strip .fr:focus-visible .nm { opacity: 1; }
#stage .scr .strip { overflow: visible; }
#stage .scr .strip .arrow { width: 56px; height: 66px; flex: none; display: flex; align-items: center; justify-content: center; border: 0; z-index: 2;
  background: rgba(245, 228, 196, .92) var(--tex); border-radius: 4px; cursor: pointer; color: var(--ink-blue); box-shadow: 0 3px 8px rgba(0, 0, 0, .4); }
#stage .scr .strip .arrow:disabled { opacity: .35; cursor: default; }
#stage .scr .strip .arrow .chev { width: 18px; height: 26px; stroke: currentColor; stroke-width: 3; fill: none; stroke-linecap: round; stroke-linejoin: round; }
html:not(.phone)[data-mode="landscape"] #stage .spin-hint { display: none; }

#stage .scr .strip .fr .cut .tx { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center; padding: 4px; font: 600 17px/1 var(--hand); color: #f3e2c2; }

#stage .scr .beam { opacity: .13; }
:root[data-theme="dark"] #stage .scr .beam { opacity: .08; }

/* ====================================================================================================================
   PHONES: the stand's slim strip (v3; Chris, 12 Nov night: "i love v3! lets go with that one!"; the mock-up
   prototypes/stage-phone/?v=3). The model gets the screen (phoneStageFocus); a torn paper strip at the bottom holds the
   NAME with a little chalk slate chip "more" (the full slate pops up: #slatepop), "model designed by" + the DESIGNER in
   red on one line (shrinks, never clips), Build it (a red Admit One ticket) and Watch it (a 35 mm film frame) side by
   side, "‹ shelf" bottom left, ‹ › bottom right. No bar on this screen (it falls away: #thumb.fall), no film strip.
   Everything here is UI outside the stand's picture; the only animations are the bar's fall and the slate's pop.
   ==================================================================================================================== */
html.phone #stage .model-card.v3 {
  --tk: #c8463a; --tk-ink: #fff4e4; --chalk: rgba(242, 238, 226, .95); --dim: 1;
  position: absolute; left: 0; right: 0; top: auto; bottom: 0; width: auto; transform: none; border-radius: 0; background: none; box-shadow: none;
  padding: 15px calc(16px + env(safe-area-inset-right, 0px)) calc(6px + env(safe-area-inset-bottom, 0px)) calc(16px + env(safe-area-inset-left, 0px));
  isolation: isolate; filter: drop-shadow(0 -3px 9px rgba(0, 0, 0, .42)); color: var(--ink);
}
html.phone[data-theme="dark"] #stage .model-card.v3 { --dim: .84; }
html.phone #stage .model-card.v3::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--tex), var(--slip);
  clip-path: polygon(0 9px, 6% 2px, 15% 7px, 27% 1px, 40% 6px, 52% 0, 64% 6px, 77% 1px, 88% 7px, 100% 2px, 100% 100%, 0 100%); }
html.phone #stage .model-card.v3 :is(p, h1) { margin: 0; }
html.phone #stage .model-card.v3 :is(a, button) { cursor: pointer; text-decoration: none; -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; }
html.phone #stage .model-card.v3 .fr, html.phone #stage .model-card.v3 .moc { display: none; }
html.phone #stage .model-card.v3 .pnote { margin: 0 0 8px; padding: 2px 8px; font-size: 15px; }
/* the name and the "more" chip */
html.phone #stage .model-card.v3 .r1 { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
html.phone #stage .model-card.v3 .name { min-width: 0; margin: 0; font: 700 32px/1 var(--hand); color: var(--ink-blue); white-space: nowrap; filter: url(#f-ink); outline: none; }
html.phone #stage .model-card.v3 .name .t { display: inline-block; }
html.phone #stage .model-card.v3 .more { flex: none; display: flex; flex-direction: column; min-width: 74px; min-height: 48px; padding: 0; border: 0; background: transparent; transform: rotate(2deg);
  filter: drop-shadow(1px 3px 4px rgba(20, 10, 2, .4)) brightness(var(--dim)); transition: transform .15s; }
html.phone #stage .model-card.v3 .more .sticks { height: 8px; border-radius: 2px 2px 0 0; background: repeating-linear-gradient(-55deg, #f2efe6 0 7px, #1d1d1c 7px 14px); transform-origin: 3% 100%; transition: transform .18s; }
html.phone #stage .model-card.v3 .more .slab { flex: 1; display: flex; align-items: center; justify-content: center; gap: 5px; padding: 0 9px 3px; background: #26292a; border-radius: 0 0 3px 3px;
  font: 700 22px/1 var(--hand); color: var(--chalk); }
html.phone #stage .model-card.v3 .more .slab span { filter: url(#f-chalk); padding-bottom: 2px; }
html.phone #stage .model-card.v3 .more .slab em { font-style: normal; font-size: 13px; opacity: .8; transition: transform .2s; }
html.phone #stage .model-card.v3 .more[aria-expanded="true"] .sticks { transform: rotate(-14deg); }
html.phone #stage .model-card.v3 .more[aria-expanded="true"] .slab em { transform: rotate(180deg); }
html.phone #stage .model-card.v3 .more:active { transform: rotate(2deg) translateY(2px) scale(.96); opacity: 1; }
/* the credit: "model designed by" + the designer in red, one line (a very long name goes under the label: .stack) */
html.phone #stage .model-card.v3 .by { margin: 1px 0 11px; display: flex; align-items: baseline; gap: 7px; white-space: nowrap; overflow: visible; font: inherit; color: inherit; }
html.phone #stage .model-card.v3 .by .lbl { flex: none; display: inline; margin: 0; font: 400 14px/1 var(--pencil); color: var(--graphite); filter: url(#f-pencil); }
html.phone #stage .model-card.v3 .by .who { position: relative; display: inline-block; min-width: 0; font: 700 28px/1.05 var(--hand); color: var(--ink-red); }
html.phone #stage .model-card.v3 .by .who .swoosh { position: absolute; left: -1%; bottom: -7px; width: 102%; height: 12px; overflow: visible; pointer-events: none; }
html.phone #stage .model-card.v3 .by .who .swoosh path { fill: none; stroke: var(--redp); stroke-width: 2.4; stroke-linecap: round; opacity: .8; }
html.phone #stage .model-card.v3 .by.stack { display: block; }
html.phone #stage .model-card.v3 .by.stack .lbl { display: block; margin-bottom: 1px; }
/* Build it and Watch it, side by side, ~50 % each */
html.phone #stage .model-card.v3 .acts.pair { display: flex; flex-direction: row; align-items: stretch; justify-content: flex-start; gap: 10px; }
html.phone #stage .model-card.v3 .pair > * { flex: 1 1 50%; min-width: 0; }
html.phone #stage .model-card.v3 .pair > .build { flex-grow: 1.06; }
/* Build it: the red cinema ticket, notched both sides, Admit One */
html.phone #stage .model-card.v3 .build { position: relative; display: flex; flex-direction: row; align-items: stretch; min-height: 60px; padding: 0; border-radius: 0; color: var(--tk-ink);
  filter: drop-shadow(0 3px 5px rgba(40, 14, 4, .32)) brightness(var(--dim)); transition: transform .15s; }
html.phone #stage .model-card.v3 .build .main { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 5px 10px 7px; background: var(--tk) var(--tex);
  -webkit-mask: radial-gradient(circle 7px at 0 50%, transparent 98%, #000), radial-gradient(circle 7px at 100% 50%, transparent 98%, #000); -webkit-mask-composite: source-in;
  mask: radial-gradient(circle 7px at 0 50%, transparent 98%, #000) intersect, radial-gradient(circle 7px at 100% 50%, transparent 98%, #000); }
html.phone #stage .model-card.v3 .build .adm { display: block; margin-bottom: 2px; font: 700 9px/1 var(--type); letter-spacing: .2em; opacity: .8; }
html.phone #stage .model-card.v3 .build b { display: block; font: 700 30px/.95 var(--hand); letter-spacing: .01em; white-space: nowrap; }
html.phone #stage .model-card.v3 .build small { display: block; margin-top: 2px; font: 500 15px/1.05 var(--hand); color: inherit; opacity: .92; white-space: nowrap; }
html.phone #stage .model-card.v3 .build .punch { position: absolute; right: 13px; top: 8px; width: 11px; height: 11px; border-radius: 50%; background: var(--slip); box-shadow: inset 0 1px 2px rgba(0, 0, 0, .45);
  opacity: 0; transform: scale(.3); transition: opacity .1s, transform .18s cubic-bezier(.2, 1.6, .4, 1); }
html.phone #stage .model-card.v3 .build.punched .punch { opacity: 1; transform: none; }
html.phone #stage .model-card.v3 .build:active { transform: translateY(2px) scale(.98); opacity: 1; filter: drop-shadow(0 1px 2px rgba(40, 14, 4, .3)) brightness(calc(var(--dim) * .9)); }
/* Watch it: a 35 mm film frame (sprocket holes along both edges, a lit frame with the play mark) */
html.phone #stage .model-card.v3 .watch { position: relative; display: flex; align-items: stretch; justify-content: stretch; min-height: 60px; padding: 9px 6px; border-radius: 3px;
  font: inherit; text-decoration: none; color: #fbf3e2;
  background: linear-gradient(#3a2009, #5b3410 14%, #4a2a0c 86%, #2e1906); filter: drop-shadow(0 3px 5px rgba(30, 14, 4, .35)) brightness(var(--dim)); transition: transform .15s; }
html.phone #stage .model-card.v3 .watch::before, html.phone #stage .model-card.v3 .watch::after { content: ""; position: absolute; left: 4px; right: 4px; height: 5px; border-radius: 1px;
  background: repeating-linear-gradient(90deg, transparent 0 5px, rgba(245, 228, 196, .85) 5px 11px, transparent 11px 16px); }
html.phone #stage .model-card.v3 .watch::before { top: 2px; }
html.phone #stage .model-card.v3 .watch::after { bottom: 2px; }
html.phone #stage .model-card.v3 .watch .win { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: center; gap: 8px; border-radius: 2px; padding: 0 6px;
  background: radial-gradient(ellipse at 50% 45%, #6a533b 0%, #3a2b1f 70%, #241a12 100%); box-shadow: inset 0 0 10px rgba(255, 236, 190, .15); }
html.phone #stage .model-card.v3 .watch .win svg { flex: none; width: 15px; height: 17px; fill: #ffd28e; }
html.phone #stage .model-card.v3 .watch .tx { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; }
html.phone #stage .model-card.v3 .watch b { font: 700 26px/.92 var(--hand); white-space: nowrap; }
html.phone #stage .model-card.v3 .watch small { font: 500 15px/1.05 var(--hand); opacity: .88; white-space: nowrap; }
html.phone #stage .model-card.v3 .watch:active { transform: translateY(2px) scale(.98); opacity: 1; }
/* the foot: "‹ shelf" (a paper slip cut to an arrow) and ‹ › (two pencilled squares) */
html.phone #stage .model-card.v3 .foot { display: flex; align-items: center; justify-content: space-between; margin: 8px -2px 0 -6px; }
html.phone #stage .model-card.v3 .nav { position: static; display: flex; gap: 0; align-items: center; }
html.phone #stage .model-card.v3 .nav .desk { display: none; }
html.phone #stage .model-card.v3 .nav .back { position: relative; isolation: isolate; display: inline-flex; align-items: center; min-height: 52px; padding: 4px 18px 8px 26px; border: 0; background: transparent;
  font: 600 24px/1 var(--hand); color: var(--ink-blue); white-space: nowrap; transform: rotate(-1.4deg);
  filter: drop-shadow(0 1px .6px rgba(0, 0, 0, .3)) drop-shadow(0 3px 5px rgba(0, 0, 0, .22)); }
html.phone #stage .model-card.v3 .nav .back::before { content: ""; position: absolute; inset: 7px 0 5px; z-index: -1; background: var(--tex), var(--paper);
  clip-path: polygon(14px 0, 100% 2px, calc(100% - 2px) 100%, 14px calc(100% - 1px), 0 50%); }
html.phone #stage .model-card.v3 .nav .back > span { filter: url(#f-ink); }
html.phone #stage .model-card.v3 .nav .back.desk { display: none; }
html.phone #stage .model-card.v3 .nav .back:active { transform: rotate(-1.4deg) translateX(-3px) scale(.97); opacity: 1; filter: brightness(.92); }
html.phone #stage .model-card.v3 .steps { display: flex; gap: 8px; }
html.phone #stage .model-card.v3 .mstep { display: grid; place-items: center; position: static; width: 52px; height: 52px; min-width: 52px; min-height: 52px; padding: 0 0 6px; border: 0; background: transparent; border-radius: 6px;
  font: 600 34px/1 var(--hand); color: var(--ink-blue); box-shadow: inset 0 0 0 1.5px rgba(27, 37, 70, .35); }
html.phone #stage .model-card.v3 .mstep.mprev { transform: rotate(-2deg); }
html.phone #stage .model-card.v3 .mstep.mnext { transform: rotate(2deg); }
html.phone #stage .model-card.v3 .mstep:active { transform: translateY(1.5px) scale(.94); background: rgba(27, 37, 70, .08); opacity: 1; }
html.phone #stage .model-card.v3 .mstep:disabled { opacity: .4; cursor: default; }
html.phone #stage .model-card.v3 :is(.more, .build, .watch, .back, .mstep):focus-visible { outline: 2.5px solid var(--ring-in); outline-offset: 2px; box-shadow: 0 0 0 5.5px var(--ring-out); }
/* short screens (iPhone SE, the Instagram browser): a little tighter */
@media (max-height: 720px) {
  html.phone #stage .model-card.v3 .name { font-size: 30px; }
  html.phone #stage .model-card.v3 .by { margin-bottom: 9px; }
}
/* the slate behind "more": pops up over the picture just above the strip, the clapper claps once (fixed, outside the
   stand's picture; JS sets its bottom) */
#slatepop { display: none; }
html.phone #slatepop { --chalk: rgba(242, 238, 226, .95); --dim: 1; display: block; position: fixed; z-index: 20; right: calc(12px + env(safe-area-inset-right, 0px)); width: min(300px, calc(100vw - 24px));
  transform: rotate(-2.5deg); transform-origin: 85% 100%; cursor: pointer;
  filter: drop-shadow(4px 10px 12px rgba(20, 10, 2, .55)) brightness(var(--dim)); animation: slatein .22s cubic-bezier(.2, .9, .3, 1.2); }
html.phone[data-theme="dark"] #slatepop { --dim: .84; }
html.phone #slatepop[hidden] { display: none; }
@keyframes slatein { from { opacity: 0; transform: translateY(14px) rotate(1deg) scale(.92); } to { opacity: 1; transform: rotate(-2.5deg); } }
#slatepop .sticks { position: relative; height: 26px; }
#slatepop .sticks i { position: absolute; left: 0; right: 0; height: 12px; border-radius: 2px; background: repeating-linear-gradient(-55deg, #f2efe6 0 18px, #1d1d1c 18px 36px); }
#slatepop .sticks i:first-child { top: 0; transform-origin: 2% 100%; animation: clap .38s ease-in .05s both; }
#slatepop .sticks i:last-child { bottom: 0; }
@keyframes clap { 0% { transform: rotate(-22deg); } 70% { transform: rotate(-22deg); } 100% { transform: rotate(-6deg); } }
#slatepop .slab { background: #26292a radial-gradient(ellipse at 30% 20%, rgba(255, 255, 255, .06), transparent 60%); border-radius: 0 0 4px 4px; padding: 6px 10px 8px; color: var(--chalk); }
#slatepop .row { display: grid; grid-template-columns: 1fr; border-top: 1.5px solid rgba(242, 238, 226, .4); }
#slatepop .row:first-child { border-top: 0; }
#slatepop .row.n2 { grid-template-columns: 1fr 1.3fr; }
#slatepop .row.scene.n3 { grid-template-columns: .8fr .6fr 1.3fr; }
#slatepop .row.facts.n3 { grid-template-columns: .8fr 1fr 1.25fr; }
#slatepop .cell { padding: 4px 6px 5px; border-left: 1.5px solid rgba(242, 238, 226, .4); min-width: 0; }
#slatepop .cell:first-child { border-left: 0; }
#slatepop .k { display: block; font: 700 9.5px/1 var(--type); letter-spacing: .14em; color: rgba(242, 238, 226, .66); white-space: nowrap; }
#slatepop .v { display: block; font: 600 24px/1.05 var(--hand); filter: url(#f-chalk); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* the bar falls away as the table view opens: it comes loose at the right end, swings down and drops off the bottom
   edge (one fixed element, outside the stand's picture); then it is hidden until the shelf or the desk */
html.phone #thumb { visibility: hidden; transition: opacity .22s ease-out, transform .38s cubic-bezier(.2, .8, .2, 1), visibility 0s linear .38s; }
html.phone #thumb.on { visibility: visible; transition: opacity .22s ease-out, transform .38s cubic-bezier(.2, .8, .2, 1), visibility 0s; }
html.phone #thumb.fall { visibility: visible; opacity: 1; transform-origin: 12% 40%; transition: none; pointer-events: none;
  animation: barfall .82s cubic-bezier(.5, 0, .9, .45) .12s both; }
html.phone #thumb.gone { visibility: hidden; opacity: 0; transition: none; }
@keyframes barfall {
  0%   { transform: translate(-50%, 0) rotate(-1.2deg); }
  22%  { transform: translate(-50%, -3px) rotate(4deg); animation-timing-function: cubic-bezier(.4, 0, .9, .4); }
  38%  { transform: translate(-50%, 6px) rotate(11deg); }
  100% { transform: translate(-50%, calc(100% + 150px)) rotate(26deg); opacity: .9; }
}
