/* Meet the Uwees (lib/site/pages/uwees.ts; design audit 2026-11-09, U23). Page-own rules only: the page's own
   classes (`door-host`, `door-says`) and its own section ids. The imported sheet (css/uwees.css) and the shared
   section sheet are untouched; this sheet loads on /uwees only. */

/* 2. the rooms: Biscuit says her line at the front door. The bubble sits over the card's top edge on the
   right, its tail pointing down toward her on the steps, so it reads as hers and covers none of her. */
.door-host { position: relative; padding-top: 8px; }
[data-site] .door-host .door-says { max-width: 15ch; margin: 0 0 14px auto; margin-right: 6%; font-size: clamp(1.35rem, 1.1rem + .8vw, 1.8rem); }
[data-site] .door-host .door-says::after { left: 30%; }

/* 4. the name: Errata at working size. Her loop is a wide frame with room around her (she fills about two thirds of
   its height), and her ground shadow moves up under her feet. */
/* Build six part two FIX-11: the box is her loop's own frame (960 by 540) at the column's width, so she prints at the size
   she did, but the frame no longer sits letterboxed in a 350px box (80 to 95px of dead air above and below her at 861 to
   1024). Bubble, Errata and her caption now read as one group. She stands from 12% to 82% of the frame's height, so the
   shadow (bottom 15% of the box) is under her feet. */
#name .uwee { width: 100%; }
#name .uwee video { width: 100%; height: auto; aspect-ratio: 960 / 540; object-fit: contain; }
#name .uwee .shadow { left: 36%; right: 36%; bottom: 15%; height: 5%; }

/* The ending's scene is the corridor walk, a 16:5 strip: the band takes the strip's own shape (the shared ending
   holds a 16:9 box). On a phone the box is taller and holds the middle of the walk. */
#close div:has(> img[src$="/strips/t5-crew-walk-16x5.webp"]) { aspect-ratio: 1672 / 522; }
@media (max-width: 700px) { #close div:has(> img[src$="/strips/t5-crew-walk-16x5.webp"]) { aspect-ratio: 16 / 9; } }

/* 1b. The tower strip (round two U24, specs/about.md part G): the cut-away tower moved out of the hero, unchanged, into
   its own painted strip under it. It keeps its own shape (1672 by 941) at full width at every size, with no height clamp
   (site.css gives a .strip scene 1672 by 522, and 16 by 9 on a phone), so js/uwees.js's floor pins, which follow the
   picture's cover crop, land on their floors as before. */
#tower .scene { aspect-ratio: 1672 / 941; max-width: none; }

/* 1. Build five U10 (Sarah 8U-Psm0hkMzB): the page opens on the tower. Its title and two doors sit over the picture at
   the right, under the moon (the moon's center is at about 76% across and 17% down the 1672 by 941 picture; the dark sky
   under it runs to the rooftops at about 40%), centered under it. The words box is a sibling of the scene, placed by the
   section's box, which is the picture's box at every width (the scene rule above). The map pins (z 3) stay above it.
   Under 1100px the sky band is too short for a 48px button row, so the words sit on the section's navy ground under
   the picture instead. */
#tower .tower-words { position: relative; z-index: 2; display: grid; justify-items: center; gap: 14px; padding: 24px var(--gutter) 32px; text-align: center; color: var(--on-dark); }
#tower .tower-words h1 { margin: 0; color: var(--on-dark); font-size: clamp(2rem, 1.4rem + 2.4vw, 3.4rem); line-height: 1.05; text-wrap: balance; }
#tower .tower-words .doors { justify-content: center; gap: 10px 20px; }
#tower .tower-words .tcta { color: var(--on-dark); font-weight: 600; text-decoration: underline; text-underline-offset: 4px; }
/* Build six part two UW (Dan Q24 B): the line under the title, one quiet step below it, then the doors. */
#tower .tower-words .tower-line { margin: -4px 0 4px; max-width: 30ch; color: var(--on-dark); font-size: clamp(1.05rem, .95rem + .45vw, 1.3rem); line-height: 1.35; text-wrap: balance; }
@media (min-width: 1100px) {
  #tower .tower-words { position: absolute; left: 59%; top: 26%; width: 34%; padding: 0; gap: clamp(12px, 1.2vw, 18px); }
  #tower .tower-words h1 { font-size: clamp(2.4rem, 3.4vw, 4rem); }
}
/* Build five close: from 861 to 1099 wide (a 1024 by 768 screen) the words under the picture put the button below the
   fold, behind the cookie bar. They sit in the sky here too, one size down so the title and the button row fit the band. */
@media (min-width: 861px) and (max-width: 1099.98px) {
  #tower .tower-words { position: absolute; left: 58%; top: 23.5%; width: 36%; padding: 0; gap: 8px; }
  #tower .tower-words h1 { font-size: 2rem; }
  #tower .tower-words .doors { gap: 6px 14px; font-size: .88rem; }
  #tower .tower-words .doors .btn { min-height: 40px; padding: .5em 1em; font-size: inherit; }
  #tower .tower-words .doors .tcta { font-size: inherit; }
  #tower .tower-words .tower-line { margin: -2px 0 2px; font-size: .95rem; line-height: 1.3; }
}

/* 2. Build six part two UW (Sarah RcbqJjNEhEKN): the nine rooms read floor 1 to 9 left to right, in rows (1 2 3 / 4 5 6 /
   7 8 9), the order js/uwees.js prints them, so reading order and keyboard order are the same at every width. The
   imported sheet's grid (css/uwees.css .room-grid, three across, row flow; two across on a phone) does this on its own;
   the build-five rule that set them down the columns is gone. */

/* The room view: a click on a room opens its picture full screen (a native modal dialog: Close, Escape and a click on
   the dark ground close it, and focus goes back to the room). The picture is shown whole; the room's words sit under it. */
.room-view { position: fixed; inset: 0; width: 100vw; max-width: none; height: 100vh; height: 100dvh; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(12, 15, 28, .96); color: var(--on-dark); overflow: hidden; }
.room-view::backdrop { background: rgba(12, 15, 28, .7); }
.room-view__close { position: absolute; top: 12px; right: 12px; z-index: 2; margin: 0; }
.room-view__close .btn { min-height: 44px; background: var(--paper); border-color: var(--paper); color: var(--ink); }
.room-view__in { display: grid; grid-template-rows: minmax(0, 1fr) auto; height: 100%; }
.room-view__pic { margin: 0; display: grid; grid-template-rows: minmax(0, 1fr); place-items: center; min-height: 0; padding: clamp(56px, 6vh, 72px) clamp(12px, 3vw, 40px) 12px; }
.room-view__pic img { display: block; width: auto; max-width: 100%; height: auto; max-height: 100%; object-fit: contain; border-radius: 12px; }
.room-view__cap { display: grid; justify-items: center; gap: 6px; padding: 8px var(--gutter) clamp(20px, 3vh, 32px); text-align: center; }
.room-view__floor { background: var(--amber); color: var(--navy); font-family: var(--ui); font-weight: 700; font-size: .78rem; padding: 3px 10px; border-radius: 999px; }
.room-view__cap h3 { margin: 0; color: var(--on-dark); font-size: clamp(1.4rem, 1.1rem + 1vw, 2rem); }
.room-view__cap .role { margin: 0; font-family: var(--ui); font-weight: 700; color: var(--on-dark-2); }
.room-view__says { margin: 4px 0 0; max-width: 46ch; font-family: var(--serif-accent); font-style: italic; font-size: 1.2rem; line-height: 1.3; color: var(--amber-hi, var(--amber)); }
.room-view__more { min-height: 44px; padding: 0 6px; border: 0; background: none; color: var(--on-dark); font: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
.room-view__more:focus-visible, .room-view__close .btn:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; }
@media (max-width: 600px) { .room-view__says { font-size: 1.05rem; } }

/* Build six part two UW (Sarah cJxvimauS4sV): in a crew member's story (the side panel each card opens), the open quote on
   every line they say sits right against its first letter. The imported sheet (css/uwees.css .says li) hangs the quote in
   an 18px gutter, which reads as a space; here it sits inline, the way the room view prints its line. */
#bio .says li { padding-left: 0; }
#bio .says li::before { position: static; }
/* FIX-12: the script strips each line's own quote marks and the imported sheet adds only the open one; close it here */
#bio .says li::after { content: "\201D"; }

/* Build six part two FIX-11: the side panel is a dialog outside every section, so it sits on no ground and its muted ink
   came from the app's own --muted (a cream fill colour): the Says, The job, Owns, Guards against, Backstory labels and
   the "Link to this card" line printed cream on the cream panel and read as empty space. The panel takes the paper
   ground's muted ink. */
#bio { --muted: var(--ink-2); }

/* Card waves sit where the still stood (2026-11-18). On hover the still hides and the wave shows (css/uwees.css .ucard-loop:
   160% of the art well, bottom centre). Measured in Chromium at 1440px against each still's figure (alpha over half, first
   frame of the wave), every wave drew its figure about three quarters of the still's size and about 26px higher (fold
   and register also 11px to the left), the eleven v12 waves included. Each card's wave is scaled about its bottom centre and moved, in its own box's percent, so
   its first frame covers the still's figure: --wave-s scale, --wave-x and --wave-y offsets. A card with no line moves as
   before. Re-measure with a card's new wave before keeping its line. */
#cast .ucard-loop { transform-origin: 50% 100%; transform: translateX(-50%) translate(var(--wave-x, 0%), var(--wave-y, 0%)) scale(var(--wave-s, 1)); }
#cast .ucard[data-slug="atlas"] .ucard-loop { --wave-s: 1.281; --wave-y: 18.26%; }
#cast .ucard[data-slug="biscuit"] .ucard-loop { --wave-s: 1.336; --wave-y: 19.3%; }
#cast .ucard[data-slug="bram"] .ucard-loop { --wave-s: 1.396; --wave-x: 1.61%; --wave-y: 18.74%; }
#cast .ucard[data-slug="bristle"] .ucard-loop { --wave-s: 1.329; --wave-y: 18.73%; }
#cast .ucard[data-slug="clipping"] .ucard-loop { --wave-s: 1.329; --wave-y: 16.99%; }
#cast .ucard[data-slug="definitely"] .ucard-loop { --wave-s: 1.329; --wave-y: 19.17%; }
#cast .ucard[data-slug="depth"] .ucard-loop { --wave-s: 1.336; --wave-y: 19.3%; }
#cast .ucard[data-slug="drift"] .ucard-loop { --wave-s: 1.329; --wave-y: 18.94%; }
#cast .ucard[data-slug="dusty"] .ucard-loop { --wave-s: 1.389; --wave-y: 20.65%; }
#cast .ucard[data-slug="errata"] .ucard-loop { --wave-s: 1.23; --wave-y: 15.25%; }
#cast .ucard[data-slug="filler"] .ucard-loop { --wave-s: 1.329; --wave-y: 19.17%; }
#cast .ucard[data-slug="fold"] .ucard-loop { --wave-s: 1.407; --wave-x: 4.27%; --wave-y: 22.52%; }
#cast .ucard[data-slug="galley"] .ucard-loop { --wave-s: 1.256; --wave-x: 0.58%; --wave-y: 13.23%; }
#cast .ucard[data-slug="margin"] .ucard-loop { --wave-s: 1.336; --wave-x: 0.31%; --wave-y: 18.86%; }
#cast .ucard[data-slug="murmur"] .ucard-loop { --wave-s: 1.334; --wave-y: 19.27%; }
#cast .ucard[data-slug="nesta"] .ucard-loop { --wave-s: 1.329; --wave-y: 18.94%; }
#cast .ucard[data-slug="ocho"] .ucard-loop { --wave-s: 1.316; --wave-y: 18.49%; }
#cast .ucard[data-slug="pilot"] .ucard-loop { --wave-s: 1.336; --wave-y: 19.3%; }
#cast .ucard[data-slug="ping"] .ucard-loop { --wave-s: 1.214; --wave-y: 16.97%; }
#cast .ucard[data-slug="pitch"] .ucard-loop { --wave-s: 1.35; --wave-x: 0.53%; --wave-y: 20.89%; }
#cast .ucard[data-slug="plug"] .ucard-loop { --wave-s: 1.341; --wave-y: 19.6%; }
#cast .ucard[data-slug="pockets"] .ucard-loop { --wave-s: 1.357; --wave-y: 20.14%; }
#cast .ucard[data-slug="pop"] .ucard-loop { --wave-s: 1.336; --wave-y: 19.3%; }
#cast .ucard[data-slug="post"] .ucard-loop { --wave-s: 1.343; --wave-y: 19.87%; }
#cast .ucard[data-slug="proof"] .ucard-loop { --wave-s: 1.348; --wave-y: 19.86%; }
#cast .ucard[data-slug="register"] .ucard-loop { --wave-s: 1.296; --wave-x: 4.14%; --wave-y: 20.01%; }
#cast .ucard[data-slug="shelby"] .ucard-loop { --wave-s: 1.107; --wave-y: 15.07%; }
#cast .ucard[data-slug="snap"] .ucard-loop { --wave-s: 1.336; --wave-y: 19.3%; }
#cast .ucard[data-slug="stale"] .ucard-loop { --wave-s: 1.267; --wave-y: 17.99%; }
#cast .ucard[data-slug="stet"] .ucard-loop { --wave-s: 1.218; --wave-y: 12.25%; }
#cast .ucard[data-slug="switcheroo"] .ucard-loop { --wave-s: 1.343; --wave-y: 19.43%; }
#cast .ucard[data-slug="traffic"] .ucard-loop { --wave-s: 1.265; --wave-x: 0.67%; --wave-y: 15.04%; }
#cast .ucard[data-slug="tween"] .ucard-loop { --wave-s: 1.01; --wave-y: 13.08%; }
#cast .ucard[data-slug="wire"] .ucard-loop { --wave-s: 1.336; --wave-y: 19.74%; }

/* The detail card's picture ground is the card's own light surface for every crew member (Dan, 2026-11-18: "they all
   should be on the same background color on the site"); css/uwees.css tints it by lane. The white the cards sit on
   (#cast is data-ground="studio", --card #ffffff), spelled out: #bio sits outside every ground, so var(--card) there
   is the app's token, which globals.css turns navy under .dark (a dark-OS visitor), and Uwees never sit on dark here. */
#bio .bio-art { background: #ffffff; }
