/* Tidemark Engine — visual language rebuilt from the reference mockups (not copied): matte panels, brass hairlines,
   chamfered corners, letterspaced small caps, serif body. Logical canvas 1920x1080, scaled to the window. */
@font-face { font-family: 'Cormorant'; src: url('fonts/CormorantGaramond-SemiBold.woff2') format('woff2'); font-weight: 600; font-display: block; }
@font-face { font-family: 'Cormorant'; src: url('fonts/CormorantGaramond-Medium.woff2') format('woff2'); font-weight: 500; font-display: block; }
@font-face { font-family: 'Crimson'; src: url('fonts/CrimsonPro-Regular.woff2') format('woff2'); font-weight: 400; font-display: block; }
@font-face { font-family: 'Crimson'; src: url('fonts/CrimsonPro-Italic.woff2') format('woff2'); font-weight: 400; font-style: italic; font-display: block; }
@font-face { font-family: 'Crimson'; src: url('fonts/CrimsonPro-SemiBold.woff2') format('woff2'); font-weight: 600; font-display: block; }
@font-face { font-family: 'Atkinson'; src: url('fonts/AtkinsonHyperlegible-Regular.woff2') format('woff2'); font-weight: 400; font-display: block; }

/* No system scrollbar anywhere, ever (D-065, D-073): anything that scrolls shows the game's ▲ ▼ arrows or turns pages.
   This catches every element in both documents, including ones a later screen forgets to cover. */
* { scrollbar-width: none; }
*::-webkit-scrollbar { display: none; width: 0; height: 0; }

:root {
  --ink: #111416; --panel: rgba(13, 16, 17, 0.88); --panel-solid: #0f1213; --bone: #e6dbc3; --bone-dim: #b9ae97;
  --brass: #c8a04a; --brass-dim: #8a6f35; --teal: #1e4744; --olive: #6e7a2e; --oxblood: #6a2b2c; --think: #a9c3cf;
  /* text sizes, one per kind of text (Settings › Fonts: All text times that kind's size; set by app.applySettings) */
  --ts-dialogue: 1; --ts-names: 1; --ts-subtitles: 1; --ts-menus: 1; --ts-buttons: 1; --ts-record: 1;
  --ts-documents: 1; --ts-history: 1; --ts-examine: 1; --ts-notices: 1; --ts-title: 1; --ts-settings: 1; --ts-keys: 1;
  /* how much each kind's boxes grow on the desktop design: its size, never below the design's own */
  --g-dialogue: max(1, var(--ts-dialogue)); --g-names: max(1, var(--ts-names));
  --g-menus: max(1, var(--ts-menus)); --g-buttons: max(1, var(--ts-buttons)); --g-record: max(1, var(--ts-record));
  --g-settings: max(1, var(--ts-settings)); --g-title: max(1, var(--ts-title)); --g-history: max(1, var(--ts-history));
  --body-font: 'Crimson', 'Georgia', serif; --display-font: 'Cormorant', 'Georgia', serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #000; overflow: hidden; }
body { font-family: var(--body-font); color: var(--bone); user-select: none; -webkit-user-select: none; cursor: default; }
#frame { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; background: #000; }
#stage { position: relative; width: 1920px; height: 1080px; overflow: clip; transform-origin: 0 0; background: #050607; flex: none; }   /* (clip, not hidden: a scrollIntoView inside it must never scroll the stage itself) */
#boot { position: fixed; inset: 0; z-index: 100; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; background: #000;
  color: #e6dbc3; font: 600 28px/1 'Georgia', serif; letter-spacing: .4em; text-indent: .4em; }
#boot span { font: italic 15px 'Georgia', serif; letter-spacing: .1em; color: #8a7e66; animation: bootpulse 1.4s ease-in-out infinite; }
@keyframes bootpulse { 50% { opacity: .35; } }
#stage.shake { animation: shake 0.42s linear; }
@keyframes shake { 0%,100%{translate:0 0} 10%{translate:-14px 6px} 25%{translate:12px -8px} 40%{translate:-10px 4px} 55%{translate:8px -3px} 70%{translate:-5px 2px} 85%{translate:3px -1px} }

/* ---------- backgrounds & actors ---------- */
#bg, .bglayer { position: absolute; inset: 0; }
.bglayer { background-size: cover; background-position: center; opacity: 0; transition: opacity var(--fade, 300ms) linear; }
.bglayer.on { opacity: 1; }
#bg.cam { transition: transform 700ms cubic-bezier(.3,.1,.2,1); }
#actors { position: absolute; inset: 0; pointer-events: none; }
.actor { position: absolute; bottom: 0; transform-origin: 50% 100%; transition: opacity 250ms, left 300ms ease-out; will-change: transform; }
.actor .rig { position: relative; transform-origin: 50% 100%; }
.actor img { display: block; position: absolute; left: 0; top: 0; image-rendering: auto; }
.actor img.base { position: relative; }
.actor.hidden { opacity: 0; }
.actor .patch { pointer-events: none; }
.actor.dim { filter: brightness(0.62) saturate(0.8); }
.actor.pop .rig { animation: pop 180ms ease-out; }
@keyframes pop { 0%{translate:0 8px} 100%{translate:0 0} }
.actor.hit .rig { animation: hit 360ms ease-out; }
@keyframes hit { 0%{translate:0 0; filter:brightness(1.8)} 20%{translate:-18px 0} 45%{translate:12px 0} 70%{translate:-6px 0} 100%{translate:0 0; filter:none} }
.actor .sweat { position: absolute; width: 22px; height: 30px; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; background: rgba(200,230,240,.85); border: 2px solid #111; opacity: 0; }
.actor.sweating .sweat { animation: sweat 1.6s ease-in infinite; }
@keyframes sweat { 0%{opacity:0; translate:0 -10px} 20%{opacity:1} 100%{opacity:0; translate:0 60px} }
.placeholder-figure { position: relative; width: 520px; height: 980px; }
.placeholder-figure svg { width: 100%; height: 100%; }

#fxcanvas { position: absolute; inset: 0; pointer-events: none; }
#shotlayer { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
#shotlayer .shot { position: absolute; inset: -4%; background-size: cover; background-position: center; opacity: 0; transition: opacity 500ms; }
#shotlayer .shot.on { opacity: 1; }
#shotlayer .shotcap { position: absolute; left: 80px; bottom: 170px; z-index: 1; font-size: calc(39.1px * var(--ts-subtitles)); color: #efe3c2; text-shadow: 0 2px 8px #000; opacity: 0; transition: opacity 500ms; }
#shotlayer .shotcap.on { opacity: 1; }
#shotlayer video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 400ms; }
#shotlayer video.on { opacity: 1; }
#flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; }
#flash.go { animation: flash 380ms ease-out; }
@keyframes flash { 0%{opacity:.85} 100%{opacity:0} }
#flash.soft { animation: softflash 700ms ease-in-out; }
@keyframes softflash { 0%{opacity:0} 22%{opacity:.6} 100%{opacity:0} }

/* grain overlay (matte print feel) */
#stage::after { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .05; mix-blend-mode: overlay; z-index: 50;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"); }

/* #hud holds the interface. On desktop it sits inside the stage and its panel groups (#dock, #portui) add no boxes of
   their own, so everything is laid out on the 1920x1080 stage exactly as designed. touch.css re-lays it for touch screens. */
#hud { position: absolute; inset: 0; pointer-events: none; }
#dock, #portui { display: contents; }
#sceneui { position: absolute; inset: 0; z-index: 6; pointer-events: none; }
#sceneui > * { pointer-events: auto; }
#tbar, #menubtn, .panarrow, .exdock, #rotatehint, .touch-only { display: none; }
#ui { position: absolute; inset: 0; pointer-events: none; z-index: 10; }
#ui > * { pointer-events: auto; }
#overlay { position: absolute; inset: 0; z-index: 20; pointer-events: none; }
#overlay > * { pointer-events: auto; }

/* ---------- shared UI primitives ---------- */
.smallcaps { font-family: var(--display-font); font-weight: 600; letter-spacing: .32em; text-transform: uppercase; }
.panel { background: var(--panel); position: absolute; clip-path: polygon(26px 0, 100% 0, 100% calc(100% - 26px), calc(100% - 26px) 100%, 0 100%, 0 26px); }
.panel::before { content: ''; position: absolute; inset: 0; pointer-events: none; border: 1px solid rgba(200,160,74,.55);
  clip-path: polygon(26px 0, 100% 0, 100% calc(100% - 26px), calc(100% - 26px) 100%, 0 100%, 0 26px); }
.hair { position: absolute; height: 1px; background: linear-gradient(90deg, rgba(200,160,74,.8), rgba(200,160,74,0)); }
.btn { font-family: var(--display-font); font-weight: 600; color: var(--bone); background: rgba(15,18,19,.82); border: 1px solid rgba(230,219,195,.45);
  font-size: calc(34.5px * var(--ts-buttons)); padding: 14px 26px; display: inline-flex; align-items: center; gap: 16px; cursor: pointer; transition: background 120ms, color 120ms, border-color 120ms; }
.btn:hover, .btn.focus { border-color: var(--brass); }
.btn.gold { background: linear-gradient(180deg, #d8b25a, #b88f3c); color: #16130c; border-color: #f0d38c; }
.btn.disabled { opacity: .35; pointer-events: none; }
.btn svg { width: 30px; height: 30px; stroke: currentColor; fill: none; stroke-width: 1.6; }

/* ---------- dialogue panel (investigation / normal) ---------- */
#dlg { left: 34px; right: 34px; bottom: 34px; height: 224px; display: none; }
#dlg.on { display: block; }
#dlg .nameplate { position: absolute; left: 46px; top: 8px; height: 50px; padding: 0 60px 0 28px; display: flex; align-items: center;
  background: var(--panel-solid); clip-path: polygon(0 0, 100% 0, calc(100% - 34px) 100%, 0 100%); }
#dlg .nameplate::after { content: ''; position: absolute; left: 0; bottom: 0; right: 30px; height: 1px; background: rgba(200,160,74,.7); }
/* (a cross-examination statement is a line of dialogue: its name and text look exactly the same) */
:is(#dlg, #ceplate) .name { color: var(--brass); font-size: calc(28.75px * var(--ts-names)); }
:is(#dlg, #cebox) .text { font-size: calc(43.7px * var(--ts-dialogue)); line-height: 1.34; color: var(--bone); }
:is(#dlg, #cebox) .text em { font-style: normal; color: #f1d38a; }
#dlg .text { position: absolute; left: 74px; top: 70px; right: 360px; }
#dlg.noverbs .text { right: 80px; }
#dlg .text.think { color: var(--think); font-style: italic; }
#dlg .text.radio, #dlg .text.phone { color: #d9cfb7; }
#dlg .adv { position: absolute; right: 380px; bottom: 26px; width: 0; height: 0; border-left: 13px solid transparent; border-right: 13px solid transparent; border-top: 16px solid var(--bone); opacity: 0; }
#dlg.noverbs .adv { right: 60px; }
#dlg .adv.on { opacity: .9; animation: bob 1s ease-in-out 4; }   /* bobs a few times when the line is whole, then rests (bobbing
   for as long as the player read kept the screen redrawing, and a phone warm) */
@keyframes bob { 0%,100%{translate:0 0} 50%{translate:0 6px} }
#dlg .auto { position: absolute; right: 60px; top: 18px; font-size: calc(18.4px * var(--ts-buttons)); color: var(--brass-dim); letter-spacing: .3em; }

/* verb menu inside the dialogue panel (right column) */
#verbs { position: absolute; right: 0; top: 0; bottom: 0; width: 330px; border-left: 1px solid rgba(230,219,195,.35); padding: 26px 20px 20px 22px; display: flex; flex-direction: column; gap: 6px; }
#dlg.noverbs #verbs { display: none; }
.verb { position: relative; display: flex; align-items: center; gap: 22px; height: 46px; padding-left: 20px; font-family: var(--body-font); font-size: calc(32.2px * var(--ts-menus)); color: var(--bone-dim); cursor: pointer; }
.verb svg { width: 28px; height: 28px; stroke: currentColor; fill: none; stroke-width: 1.7; }
.verb:hover, .verb.sel { color: #f0e2bd; }
.verb.sel::before { content: ''; position: absolute; inset: 2px -20px 2px 0; background: linear-gradient(90deg, rgba(128,140,48,.75), rgba(128,140,48,.25) 70%, rgba(128,140,48,0)); z-index: -1; }
.verb.disabled { opacity: .3; pointer-events: none; }
.verb .dot { position: absolute; left: 4px; width: 7px; height: 7px; border-radius: 50%; background: var(--brass); box-shadow: 0 0 8px var(--brass); }

/* sub-menus: talk topics, move list, choices */
.menu { position: absolute; right: 60px; bottom: 290px; width: 700px; padding: 26px 0; }
.menu .mtitle { padding: 0 40px 14px; color: var(--brass); font-size: calc(25.3px * var(--ts-menus)); }
.menu .item { position: relative; padding: 12px 40px 12px calc(89.7px * max(1, var(--ts-menus)));   /* (room for the NEW badge) */ font-size: calc(34.5px * var(--ts-menus)); color: var(--bone-dim); cursor: pointer; }
.menu .item:hover, .menu .item.sel { color: #f3e6c4; background: linear-gradient(90deg, rgba(200,160,74,.22), rgba(200,160,74,0)); }
.menu .item.seen { color: #857d6c; }
.menu .item .new { position: absolute; left: 30px; top: 50%; translate: 0 -50%; font-size: calc(16.1px * var(--ts-menus)); letter-spacing: .2em; color: var(--brass); }
.menu .item .tick { position: absolute; left: 34px; color: #6d6656; }
.menu .back { margin: 10px 40px 0; font-size: calc(25.3px * var(--ts-menus)); color: var(--bone-dim); cursor: pointer; letter-spacing: .25em; }
.choice-menu { right: auto; left: 50%; translate: -50% 0; bottom: 330px; width: 900px; }
.mscroll { position: relative; } .mscroll .more { display: none; }
.phwrap { display: contents; }
.dmore { display: none; } body.touch .dmore { display: block; }   /* (touch: the arrows over the record's detail, touch.css) */
.ddbox { display: contents; } .ddbox > .more { display: none; }   /* (the desktop design's scroll box for a long description; touch flows) */   /* (desktop: the prompt is placed on its own; touch.css makes this its scroll box) */   /* scroll arrows: touch only (touch.css) */

/* examine mode */
#examine { position: absolute; inset: 0; cursor: crosshair; }
#examine .hs { position: absolute; border: 2px solid transparent; transition: border-color 150ms, background 150ms; }
#examine .hs:hover, #examine.assist .hs { border-color: rgba(230,200,120,.65); background: rgba(230,200,120,.06); }
/* the done mark sits on its own dark badge so it reads on any artwork (a pale tick vanished over a lit bulb), above
   neighbouring hotspot boxes */
#examine .hs.done::after { content: '\2713'; position: absolute; right: 6px; top: 6px; z-index: 1; width: 32px; height: 32px; display: grid; place-items: center;
  border-radius: 50%; background: rgba(10,12,12,.8); border: 1px solid var(--brass-dim); box-shadow: 0 1px 6px rgba(0,0,0,.6); color: var(--bone); font-size: calc(21.85px * var(--ts-examine)); line-height: 1; }
#examine .hint { position: absolute; left: 50%; bottom: 40px; translate: -50% 0; padding: 14px 40px; font-size: calc(29.9px * var(--ts-examine)); pointer-events: none; }   /* clicks reach the spots under it */
#examine .cursorlabel { position: absolute; z-index: 2; padding: 6px 14px; font-size: calc(25.3px * var(--ts-examine)); background: rgba(10,12,12,.85); border: 1px solid var(--brass-dim); pointer-events: none; white-space: nowrap; }

/* ---------- cross-examination HUD ---------- */
#cehud { position: absolute; inset: 0; display: none; pointer-events: none; }
#cehud.on { display: block; }
#cehud > * { pointer-events: auto; }
#patience { position: absolute; right: 56px; top: 40px; display: flex; gap: 10px; }
#patience svg { width: 30px; height: 30px; fill: var(--brass); opacity: .9; }
#patience svg.lost { opacity: .18; }
#cebox { left: 64px; bottom: 150px; width: 1330px; height: 170px; display: none; }
#cebox.on { display: block; }
#ceplate { position: absolute; left: 64px; bottom: 319px; height: 52px; padding: 0 70px 0 34px; display: none; align-items: center; background: var(--panel-solid);
  clip-path: polygon(0 0, calc(100% - 40px) 0, 100% 100%, 0 100%); border-top: 1px solid rgba(200,160,74,.55); }
#ceplate.on { display: flex; }
#cebox .text { position: absolute; left: 42px; top: 34px; right: 40px; }
#cebox .rule { position: absolute; left: 42px; right: 250px; bottom: 26px; height: 1px; background: rgba(230,219,195,.35); }
#cebtns { position: absolute; left: 106px; bottom: 58px; display: none; gap: 20px; }
#cebtns.on { display: flex; }
#cebtns .btn { height: 64px; }
#cebtns .btn.wide { width: 238px; justify-content: center; }
#cebtns .btn.sq { width: 66px; justify-content: center; padding: 0; }
#recordbtn { position: absolute; right: 30px; bottom: 150px; display: flex; flex-direction: column; align-items: flex-end; }
#recordbtn .stack { position: relative; width: 250px; height: 130px; margin-bottom: -16px; }
#recordbtn .stack img, #recordbtn .stack .card { position: absolute; width: 150px; height: 118px; object-fit: cover; border: 5px solid #e8e0cd; box-shadow: 0 6px 16px rgba(0,0,0,.6); background: #333; }
#recordbtn .btn { width: 270px; height: 56px; font-size: calc(28.75px * var(--ts-buttons)); white-space: nowrap; position: relative; z-index: 1; }

/* shouts */
#shout { position: absolute; left: 50%; top: 42%; translate: -50% -50%; font-family: var(--display-font); font-weight: 600; font-size: 150px; letter-spacing: .06em;
  color: #f4e7c4; text-shadow: 0 0 0 #000, 6px 6px 0 #000, -2px -2px 0 #000; pointer-events: none; opacity: 0; z-index: 30; white-space: nowrap; }
#shout.go { animation: shout 900ms cubic-bezier(.2,.9,.2,1); }
#shout .bar { position: absolute; left: -60px; right: -60px; top: 50%; height: 190px; translate: 0 -50%; background: rgba(12,14,15,.86); z-index: -1;
  clip-path: polygon(3% 0, 100% 0, 97% 100%, 0 100%); border-top: 2px solid var(--brass); border-bottom: 2px solid var(--brass); }
@keyframes shout { 0%{opacity:0; scale:1.6} 12%{opacity:1; scale:1} 80%{opacity:1; scale:1.02} 100%{opacity:0; scale:1.04} }

/* ---------- overlays: court record, history, menus, cards ---------- */
.fullpanel { position: absolute; inset: 40px 60px; background: rgba(9, 11, 12, .95); border: 1px solid rgba(200,160,74,.5); }
.fullpanel .head { position: absolute; left: 60px; top: 36px; font-size: calc(36.8px * var(--ts-buttons)); letter-spacing: .38em; color: var(--bone); }
.fullpanel .close { position: absolute; right: 40px; top: 30px; font-size: calc(27.6px * var(--ts-buttons)); letter-spacing: .3em; color: var(--bone-dim); cursor: pointer; padding: 10px; }
.fullpanel .close:hover { color: var(--brass); }
.tabs { position: absolute; left: 60px; top: 100px; display: flex; gap: 40px; }
.tabs .tab { font-size: calc(27.6px * var(--ts-buttons)); letter-spacing: .3em; color: var(--bone-dim); cursor: pointer; padding-bottom: 8px; border-bottom: 2px solid transparent; }
.tabs .tab.on { color: var(--brass); border-color: var(--brass); }
.grid { position: absolute; left: 60px; top: 170px; width: 640px; display: grid; grid-template-columns: repeat(4, 140px); gap: 20px; max-height: 760px; overflow-y: auto; padding: 4px; }
.grid .cell { width: 140px; height: 140px; background: #1a1e1f; border: 2px solid #3a3a33; cursor: pointer; position: relative; overflow: hidden; }
.grid .cell img, .grid .cell .ico { width: 100%; height: 100%; object-fit: cover; }
.grid .cell.sel { border-color: var(--brass); box-shadow: 0 0 0 2px var(--brass); }
.grid .cell .newdot { position: absolute; right: 6px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--brass); }
.grid .cell .cname { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 6px 6px; font-size: calc(17.25px * var(--ts-record)); line-height: 1.12; color: #efe4c9; text-align: center;
  background: linear-gradient(180deg, rgba(0,0,0,0), rgba(0,0,0,.85) 40%); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; pointer-events: none;
  hyphens: auto; overflow-wrap: anywhere; }   /* each exhibit's name along the foot of its square (D-075; touch.css sizes it for touch) */
/* more exhibits than the grid shows: it scrolls under the game's arrows, in the gutter at its right, never the system
   scrollbar (D-065; record.js moreArrows). Touch layouts turn pages instead (touch.css). */
/* (the same for every desktop scroll box: the record's grid and documents, history, save slots, settings; hub.js
   moreArrows adds the arrows and the up / down classes) */
body:not(.touch) :is(.fullpanel.record .grid, .detail .dview > .doc, .history, .slots, .settings .fp-body) { scrollbar-width: none; }
body:not(.touch) :is(.fullpanel.record .grid, .detail .dview > .doc, .history, .slots, .settings .fp-body)::-webkit-scrollbar { display: none; }
body:not(.touch) :is(.fullpanel, .detail .dview, .ddbox) > .more { position: absolute; width: 40px; height: 44px; display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--brass); opacity: 0; visibility: hidden; transition: opacity 180ms, visibility 180ms; z-index: 2; }
body:not(.touch) :is(.fullpanel, .detail .dview, .ddbox) > .more.up { color: #7f7869; }
body:not(.touch) :is(.fullpanel.up, .detail .dview.up, .ddbox.up) > .more.up, body:not(.touch) :is(.fullpanel.down, .detail .dview.down, .ddbox.down) > .more.down { opacity: 1; visibility: visible; }
body.touch :is(.fullpanel, .detail .dview) > .more { display: none; }   /* (a fold or a turn to a touch layout with a panel open) */
body:not(.touch) :is(.fullpanel, .detail .dview, .ddbox) > .more i { display: flex; filter: drop-shadow(0 1px 3px #000); }
body:not(.touch) :is(.fullpanel, .detail .dview, .ddbox) > .more svg { width: 34px; height: 34px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
/* (the ▼ bobs a few times when it appears, then rests: an endless bob kept the screen redrawing) */
body:not(.touch) :is(.fullpanel.down, .detail .dview.down, .ddbox.down) > .more.down i { animation: morebob 1.3s ease-in-out 3 forwards; }
body:not(.touch) :is(.fullpanel, .detail .dview, .ddbox) > .more:hover i { filter: drop-shadow(0 1px 3px #000) brightness(1.4); }
@media (prefers-reduced-motion: reduce) { body:not(.touch) :is(.fullpanel.down, .detail .dview.down, .ddbox.down) > .more.down i { animation: none; } }
.fullpanel.record > .more { left: 708px; } .fullpanel.record > .more.up { top: 170px; } .fullpanel.record > .more.down { top: 886px; }
.fullpanel.record.presenting > .more.up { top: 214px; } .fullpanel.record.presenting > .more.down { top: 890px; }
.detail .dview > .more { right: 0; } .detail .dview > .more.up { top: 22px; } .detail .dview > .more.down { bottom: 22px; }
.histpanel > .more { right: 10px; } .histpanel > .more.up { top: 110px; } .histpanel > .more.down { bottom: 40px; }
.slotpanel > .more { right: 10px; } .slotpanel > .more.up { top: 110px; } .slotpanel > .more.down { bottom: 60px; }
.settings > .more { right: 24px; } .settings > .more.up { top: 130px; } .settings > .more.down { bottom: 90px; }
.detail { position: absolute; left: 760px; top: 150px; right: 60px; bottom: 60px; }
.detail .dname { font-family: var(--display-font); font-size: calc(50.6px * var(--ts-record)); font-weight: 600; color: #f0e2bd; }
.detail .ddesc { margin-top: 16px; font-size: calc(34.5px * var(--ts-record)); line-height: 1.4; color: var(--bone); max-width: 980px; }
.detail .dview { margin-top: 26px; width: 980px; height: 470px; background: #0c0e0f; border: 1px solid #333; position: relative; overflow: hidden; }
.detail .dview img.full { width: 100%; height: 100%; object-fit: contain; }
/* the Pierhead map on the Tide Table's back cover (E06): the map, and the cover's printed foot line under it */
.mapview { position: absolute; inset: 0; display: flex; flex-direction: column; background: #dfe4d6; }
.mapview > svg { flex: 1 1 0; min-height: 0; height: 100%; display: block; }
.mapfoot { flex: none; padding: 4px 12px 10px; text-align: center; font-family: 'Crimson', serif; font-size: calc(27.6px * var(--ts-documents)); letter-spacing: .06em; color: #1c1a15; }
.fullpanel > .actions { position: absolute; right: 60px; bottom: 60px; display: flex; gap: 20px; }
.doc { position: absolute; inset: 22px 40px; background: #e9e1cc; color: #1c1a15; padding: 30px 40px; font-family: 'Crimson', serif; font-size: calc(28.75px * var(--ts-documents)); line-height: 1.45; overflow-y: auto;
  box-shadow: inset 0 0 60px rgba(90,70,30,.25); }
.doc.small { font-size: calc(21.85px * var(--ts-documents)); line-height: 1.34; padding: 22px 34px; }   /* long documents that must fit one view (E15) */
.doc .dt { font-family: var(--display-font); font-weight: 600; letter-spacing: .18em; font-size: calc(25.3px * var(--ts-documents)); margin-bottom: 14px; color: #3b3121; }
.doc.print { background: #efeee6; font-family: 'Courier New', monospace; font-size: calc(29.9px * var(--ts-documents) * var(--fit, 1)); }
.doc.print .pl { white-space: pre; width: max-content; }   /* (one printed line, never wrapped: record.js fitPrint shrinks the type instead) */
.tapeplay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }   /* the tape: its Play button alone */
.tapeplay .btn { height: 70px; padding: 0 36px; }
.doc.ghost { background: #d9d2c0; }
.doc.ghost .gl { color: transparent; text-shadow: 1px 1px 0 rgba(255,255,255,.7), -1px -1px 0 rgba(60,50,30,.55); font-family: 'Crimson', serif; font-style: italic; font-size: calc(32.2px * var(--ts-documents)); }
.notes { margin-top: 10px; font-size: calc(25.3px * var(--ts-settings)); color: var(--bone-dim); }
.pointhint { position: absolute; left: 120px; right: 120px; top: 82px; padding: 8px 24px; text-align: center; font-size: calc(29.9px * var(--ts-record)); background: rgba(8,9,10,.9); border: 1px solid var(--brass); z-index: 3; }
.pointer-cross { position: absolute; width: 60px; height: 60px; border: 2px solid var(--brass); border-radius: 50%; pointer-events: none; translate: -50% -50%; }

.history { overflow-y: auto; position: absolute; left: 60px; right: 60px; top: 110px; bottom: 40px; padding-right: 20px; }
.history .h { padding: 12px 0; border-bottom: 1px solid rgba(230,219,195,.08); font-size: calc(31.05px * var(--ts-history)); line-height: 1.4; }
.history .h .who { color: var(--brass); font-family: var(--display-font); font-weight: 600; letter-spacing: .2em; font-size: calc(23px * var(--ts-names)); margin-right: 18px; }
.history .h.think .t { color: var(--think); font-style: italic; }
.history .h .play { margin-left: 16px; color: var(--bone-dim); cursor: pointer; font-size: calc(23px * var(--ts-history)); }
.history .h .play:hover { color: var(--brass); }

#card { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; background: rgba(0,0,0,.72); opacity: 0; pointer-events: none; transition: opacity 500ms; z-index: 25; }
#card.on { opacity: 1; }
#card .c1 { font-family: var(--display-font); font-weight: 600; font-size: calc(62.1px * var(--ts-notices)); letter-spacing: .4em; color: #f0e2bd; }
#card .c2 { margin-top: 18px; font-size: calc(34.5px * var(--ts-notices)); color: var(--bone-dim); letter-spacing: .12em; }
#card .rule { width: 520px; height: 1px; background: var(--brass); margin: 26px 0; opacity: .7; }
#subs { position: absolute; left: 50%; bottom: 170px; translate: -50% 0; max-width: 1400px; text-align: center; font-size: calc(41.4px * var(--ts-subtitles)); line-height: 1.35; color: #f3ead3;
  text-shadow: 0 2px 4px #000, 0 0 12px #000; z-index: 12; pointer-events: none; }
#subs .sname { display: block; font-family: var(--display-font); font-weight: 600; letter-spacing: .3em; font-size: calc(23px * var(--ts-names)); color: var(--brass); margin-bottom: 6px; }
#titlecard { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; opacity: 0; transition: opacity 900ms; z-index: 26; pointer-events: none; }
#titlecard.on { opacity: 1; }
#titlecard img { width: 1040px; }
#titlecard .t2 { margin-top: 30px; font-size: calc(34.5px * var(--ts-notices)); letter-spacing: .5em; color: var(--bone); }

#toast { position: absolute; right: 44px; top: 150px; z-index: 40; pointer-events: none; display: flex; flex-direction: column; align-items: flex-end; }
#toast .t { padding: 16px 36px 16px 24px; font-size: calc(29.9px * var(--ts-notices)); display: flex; align-items: center; gap: 20px; background: rgba(10,12,13,.94); border: 1px solid var(--brass-dim); margin-bottom: 12px; animation: toastin 3.2s ease forwards; }
#toast .t img, #toast .t .ico { width: 64px; height: 64px; object-fit: cover; border: 3px solid #e8e0cd; }
#toast .t .lbl { color: var(--brass); letter-spacing: .25em; font-size: calc(18.4px * var(--ts-notices)); display: block; }
@keyframes toastin { 0%{opacity:0; translate:0 -12px} 8%{opacity:1; translate:0 0} 85%{opacity:1} 100%{opacity:0} }

/* title / main menu */
#title { position: absolute; inset: 0; background-size: cover; background-position: center; }
#title .shade { position: absolute; inset: 0; background: radial-gradient(ellipse 640px 280px at 75% 50%, rgba(8,12,12,.6), rgba(8,12,12,0)),
    linear-gradient(90deg, rgba(8,12,12,.92) 0%, rgba(8,12,12,.72) 34%, rgba(8,12,12,0) 58%); }
#title .logo { position: absolute; left: 1080px; top: 443px; width: 720px; }
#title .logo img { width: 100%; }
#title .sub { position: absolute; left: 990px; top: 603px; width: 900px; --cap: min(calc(32.8px * var(--ts-title)), calc(900px / 21)); }
#title .items { position: absolute; left: 232px; top: 420px; display: flex; flex-direction: column; gap: 10px; }
#title .it { position: relative; font-family: var(--body-font); font-size: calc(43.7px * var(--ts-title)); color: var(--bone-dim); padding: 6px 12px; cursor: pointer; }
#title .it.sel, #title .it:hover { color: #efd79a; }
#title .it.sel::after { content: ''; position: absolute; left: -40px; right: -150px; bottom: 2px; height: 1px; background: linear-gradient(90deg, #d8b25a, rgba(216,178,90,0)); }
#title .it.sel::before { content: ''; position: absolute; left: -46px; bottom: 2px; width: 30px; height: 1px; background: #d8b25a; transform: rotate(40deg); transform-origin: 100% 0; }
#title .it.disabled { opacity: .35; pointer-events: none; }

.settings .row { display: flex; align-items: center; gap: 30px; height: 64px; font-size: calc(32.2px * var(--ts-settings)); }
.settings .row .lab { width: 420px; color: var(--bone); }
.settings .row input[type=range] { width: 420px; accent-color: #c8a04a; }
.settings .row .val { width: 90px; color: var(--brass); }
.settings .row .opt { padding: 6px 18px; border: 1px solid rgba(230,219,195,.35); cursor: pointer; font-size: calc(27.6px * var(--ts-settings)); }
.settings .row .opt.on { border-color: var(--brass); color: var(--brass); }
.slots { position: absolute; left: 60px; right: 60px; top: 110px; bottom: 60px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; overflow-y: auto; }
.slot { height: 250px; background: #14181a; border: 1px solid #3a3a33; display: flex; cursor: pointer; }
.slot:hover { border-color: var(--brass); }
.slot img { width: 250px; height: 100%; object-fit: cover; background: #222; }
.slot .info { padding: 18px 20px; font-size: calc(25.3px * var(--ts-settings)); line-height: 1.5; color: var(--bone-dim); }
.slot .info b { color: var(--bone); font-family: var(--display-font); letter-spacing: .15em; font-size: calc(25.3px * var(--ts-settings)); }
.modal { position: absolute; left: 50%; top: 50%; translate: -50% -50%; min-width: 820px; padding: 50px 60px; text-align: center; background: #0d1011; }   /* (nothing under it reads through) */
.modal .mt { font-size: calc(39.1px * var(--ts-menus)); letter-spacing: .3em; color: var(--brass); }
.modal .mb { margin: 26px 0 36px; font-size: calc(34.5px * var(--ts-menus)); line-height: 1.4; }
.modal .row { display: flex; gap: 26px; justify-content: center; }
.modal .row .btn { white-space: nowrap; }   /* (the modal widens to its buttons' words) */
/* cloud saves (D-137): this device's save beside the other one, to choose between */
.modal:has(.cards) { width: 1380px; }
.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 30px; text-align: left; }
.cards .slot, .cards .slot:hover { cursor: default; border-color: #3a3a33; }
/* the offline download (D-142): a bar filling as the game comes down, and how much and how long */
.modal .bar { height: 16px; margin: 4px 0 18px; background: rgba(230,219,195,.08); border: 1px solid var(--brass-dim); }
.modal .bar > i { display: block; width: 0; height: 100%; background: var(--brass); transition: width .25s linear; }
.modal .barv { min-height: 1.4em; color: var(--bone-dim); font-size: calc(27.6px * var(--ts-menus)); }
/* ...and in the background, a thin bar in a top corner and how far it has come: over the game and the title, gone
   under a menu or a question, never in a cinematic, never in the way of a tap */
#dlbar { position: absolute; right: 56px; top: 12px; z-index: 21; display: none; align-items: center; gap: 12px; pointer-events: none; opacity: .9; }
#dlbar.on { display: flex; }
body.cine #dlbar, body.trailer #dlbar, #overlay:has(> .fullpanel, > .modal) ~ #dlbar { display: none; }
#dlbar .pct { color: var(--bone); font-size: calc(20px * var(--ts-notices)); letter-spacing: .06em; text-shadow: 0 1px 3px #000; }
#dlbar .track { width: 170px; height: 5px; background: rgba(230,219,195,.2); box-shadow: 0 1px 3px rgba(0,0,0,.6); }
#dlbar .fill { display: block; width: 0; height: 100%; background: var(--brass); transition: width .25s linear; }
.notebook .lead { font-size: calc(32.2px * var(--ts-history)); padding: 12px 0 12px 40px; position: relative; color: var(--bone); }
.notebook .lead::before { content: '\2014'; position: absolute; left: 0; color: var(--brass); }
.verdict { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; z-index: 28; pointer-events: none; }
.verdict .v { font-family: var(--display-font); font-weight: 600; font-size: 170px; letter-spacing: .14em; color: #f3e6c4; text-shadow: 6px 6px 0 #000; opacity: 0; animation: verdict 3.2s ease forwards; }
@keyframes verdict { 0%{opacity:0; letter-spacing:.5em} 25%{opacity:1; letter-spacing:.14em} 85%{opacity:1} 100%{opacity:0} }
.dys { --body-font: 'Atkinson', sans-serif; }
.contrast #dlg, .contrast #cebox { background: rgba(0,0,0,.97); }

.fullpanel .pprompt { position: absolute; left: 60px; right: 300px; top: 92px; font-size: calc(31.05px * var(--ts-record)); font-style: italic; color: #f0e2bd; }
.fullpanel.presenting .tabs { top: 146px; }
.fullpanel.presenting .grid { top: 214px; max-height: 720px; }
.fullpanel.presenting .detail { top: 190px; }

/* ---- input hints (keyboard keys by default, gamepad buttons once a controller is used) ---- */
.kh { display: inline-flex; align-items: center; margin-left: 10px; vertical-align: middle; pointer-events: none; }
.kh kbd { font-family: var(--body-font); font-size: calc(19.55px * var(--ts-keys)); line-height: 1; letter-spacing: 0; color: var(--bone-dim); border: 1px solid rgba(230,219,195,.4); border-bottom-width: 2px; border-radius: 5px; padding: 3px 7px 2px; background: rgba(0,0,0,.35); min-width: 14px; text-align: center; }
.kh kbd.g { display: none; border-radius: 12px; padding: 3px 9px 2px; }
body[data-input=pad] .kh kbd.k { display: none; }
body[data-input=pad] .kh kbd.g { display: inline-block; }
body[data-input=pad] .key-only { display: none; }   /* words for a keyboard or mouse only ("click on something") */
.verb .kh { position: absolute; right: 8px; opacity: .75; }
body[data-input=pad] .verb .kh { display: none; }
#cebtns .btn .kh { margin-left: 12px; }
#cebtns .btn.sq .kh { display: none; }
.fullpanel .close .kh, .menu .back .kh { margin-left: 12px; }
.tabs .kh { margin: 0 6px; opacity: .8; }
.settings .row.sel { background: linear-gradient(90deg, rgba(200,160,74,.18), rgba(200,160,74,0)); outline: 1px solid rgba(200,160,74,.45); outline-offset: 2px; }
.settings .row { padding-left: 12px; }
.slot.sel { border-color: var(--brass); box-shadow: 0 0 0 2px rgba(200,160,74,.5); }
/* save files: the tiles leading the Save and Load screens; Load › Export dims what can't be exported */
.slot.tool { background: #182022; }
.slot.tool img { object-fit: contain; background: #10181a; flex-shrink: 0; }
.slotpanel.exporting .slot:is(.empty, [data-t=import]) { opacity: .35; }
.cards.one { grid-template-columns: 1fr; }
.modal:has(.cards.one) { width: 900px; }
.keyhelp { position: absolute; left: 80px; right: 80px; bottom: 26px; font-size: calc(23px * var(--ts-keys)); color: var(--bone-dim); text-align: center; }
/* a full-screen panel opened from the pause menu hides the menu underneath instead of showing through */
.modal:has(~ .fullpanel) { visibility: hidden; }

/* ---- panels given class hooks for the touch layouts (these keep the desktop layout as it was) ---- */
.settings .fp-body { position: absolute; left: 80px; top: 130px; right: 80px; bottom: 90px; overflow-y: auto; }
.notebook .fp-body { position: absolute; left: 80px; top: 140px; right: 80px; }
.settings .row .opts { display: flex; gap: 30px; }
.settings .row.step .opts { align-items: center; gap: 18px; }
.settings .row.sub { cursor: pointer; }
.settings .row.sub .opt { border-color: transparent; color: var(--brass); padding-left: 0; }
.settings .row.step .stepv { min-width: 260px; text-align: center; color: var(--brass); white-space: pre; }
.settings .row.step.fixed .arrow { visibility: hidden; }
.settings .row.step.fixed .stepv { color: rgba(230,219,195,.6); }
.pwrap { display: contents; }
.pointview { position: absolute; left: 120px; right: 120px; top: 150px; bottom: 50px; background: #0c0e0f; border: 1px solid #444; cursor: crosshair; overflow: hidden; }
.pointview .pinner { position: absolute; inset: 0; }
.pointview .pinner img.full { width: 100%; height: 100%; object-fit: contain; }

/* ---------- larger text on the desktop design (D-074) ----------
   The design's boxes are fixed in its 1920x1080 canvas. Each one that holds text grows with its kind's Fonts size
   (--g-*, never below 1, so at 100% nothing here changes anything), and what sits above or below it moves with it.
   (Not the touch layouts, which flow, nor the Thor's top screen, which dual.css sizes.) */
body:not(.touch):not(.l-dual) {
  --dlgh: max(calc(257.6px * max(var(--g-dialogue), var(--g-menus))),                         /* the dialogue panel, */
              calc(24px + 57.5px * var(--g-names) + var(--dlgtext, 0px)));                      /* taller for a long line (dialogue.js fit) */
  --hd: calc(52.9px * (var(--g-buttons) - 1));                                                 /* a full panel's heading, grown */
  --tb: calc(39.1px * (var(--g-buttons) - 1));                                                 /* its tabs, grown */
  --pp: calc(41.4px * (var(--g-record) - 1));                                                  /* the Present prompt, grown */
  --ceb: calc(73.6px * var(--g-buttons));                                                      /* cross-examination buttons */
}
body:not(.touch):not(.l-dual) #dlg { height: var(--dlgh); }
body:not(.touch):not(.l-dual) #dlg .nameplate { height: calc(57.5px * var(--g-names)); }
body:not(.touch):not(.l-dual) #dlg .text { top: calc(20px + 57.5px * var(--g-names)); right: calc(30px + 379.5px * var(--g-menus)); }
body:not(.touch):not(.l-dual) #dlg.noverbs .text { right: 80px; }
body:not(.touch):not(.l-dual) #dlg .adv { right: calc(50px + 379.5px * var(--g-menus)); }
body:not(.touch):not(.l-dual) #dlg.noverbs .adv { right: 60px; }
body:not(.touch):not(.l-dual) #verbs { width: calc(379.5px * var(--g-menus)); }
body:not(.touch):not(.l-dual) .verb { height: calc(52.9px * var(--g-menus)); }
body:not(.touch):not(.l-dual) .menu { bottom: calc(66px + var(--dlgh)); }
body:not(.touch):not(.l-dual) .choice-menu { bottom: calc(106px + var(--dlgh)); }
/* cross-examination: the buttons' row grows up from the foot, the testimony box and the name plate sit on it */
body:not(.touch):not(.l-dual) #cebtns .btn { height: var(--ceb); }
body:not(.touch):not(.l-dual) #cebtns .btn.wide { width: auto; min-width: 238px; }
body:not(.touch):not(.l-dual) #cebtns .btn.sq { width: calc(75.9px * var(--g-buttons)); }
/* past the design's size the statement takes the full width and the Court Record button moves up over its right end
   (--big: 0 at the design's size, 1 once anything here has grown) */
body:not(.touch):not(.l-dual) { --big: min(1, calc((max(var(--g-buttons), var(--g-dialogue)) - 1) * 1000)); }
body:not(.touch):not(.l-dual) #hud { --ceh: max(170px, calc(var(--cetext, 0px) + 60px)); }   /* (crossexam.js measures the statement) */
body:not(.touch):not(.l-dual) #cebox { bottom: calc(86px + var(--ceb)); height: var(--ceh); width: calc(1330px + 462px * var(--big)); }
body:not(.touch):not(.l-dual) #ceplate { bottom: calc(85px + var(--ceb) + var(--ceh)); height: calc(59.8px * var(--g-names)); }
body:not(.touch):not(.l-dual) #recordbtn { bottom: calc(86px + var(--ceb) + (var(--ceh) + 12px) * var(--big)); }
body:not(.touch):not(.l-dual).dlgline #recordbtn { bottom: calc(46px + var(--dlgh)); }   /* (a press's line: it sits on the dialogue panel) */
body:not(.touch):not(.l-dual) #recordbtn .btn { width: calc(310.5px * var(--g-buttons)); height: calc(64.4px * var(--g-buttons)); }
/* the pause menu's button (touch layouts have their top bar's Menu instead) */
body:not(.touch):not(.l-dual).insession:not(.cine) #menubtn { display: flex; }
#menubtn { position: absolute; left: 30px; top: 30px; height: calc(56px * var(--g-buttons)); padding: 0 18px; gap: 12px; align-items: center; font-size: calc(23px * var(--ts-buttons)); letter-spacing: .12em; pointer-events: auto; opacity: .85; }
#menubtn:hover { opacity: 1; }
#menubtn svg { width: 26px; height: 26px; }
#menubtn .kh { margin-left: 0; }
body[data-input=pad] #menubtn .rclick { display: none; }
/* full panels: what is under the heading (and the tabs, and the Present prompt) moves down as they grow */
body:not(.touch):not(.l-dual) .tabs { top: calc(100px + var(--hd)); }
body:not(.touch):not(.l-dual) .grid { top: calc(170px + var(--hd) + var(--tb)); max-height: calc(760px - var(--hd) - var(--tb)); }
body:not(.touch):not(.l-dual) .detail { top: calc(150px + var(--hd) + var(--tb)); display: flex; flex-direction: column; }
body:not(.touch):not(.l-dual) .detail .dview { flex: 1 1000 auto; min-height: 160px; height: auto; max-height: 470px; }   /* (gives up its room first) */
body:not(.touch):not(.l-dual) .ddbox { position: relative; flex: 0 1 auto; min-height: calc(34.5px * var(--ts-record) * 1.4 * 2); display: flex; flex-direction: column; margin-top: 16px; }
body:not(.touch):not(.l-dual) .ddbox .ddesc { margin-top: 0; min-height: 0; overflow-y: auto; scrollbar-width: none; }
body:not(.touch):not(.l-dual) .ddbox .ddesc::-webkit-scrollbar { display: none; }
body:not(.touch):not(.l-dual) .ddbox > .more { right: -46px; } body:not(.touch):not(.l-dual) .ddbox > .more.up { top: 0; } body:not(.touch):not(.l-dual) .ddbox > .more.down { bottom: 0; }
body:not(.touch):not(.l-dual) .fullpanel.record > .more.up { top: calc(170px + var(--hd) + var(--tb)); }
body:not(.touch):not(.l-dual) .fullpanel .pprompt { top: calc(92px + var(--hd)); }
body:not(.touch):not(.l-dual) .fullpanel.presenting .tabs { top: calc(146px + var(--hd) + var(--pp)); }
body:not(.touch):not(.l-dual) .fullpanel.presenting .grid { top: calc(214px + var(--hd) + var(--pp) + var(--tb)); max-height: calc(720px - var(--hd) - var(--pp) - var(--tb)); }
body:not(.touch):not(.l-dual) .fullpanel.presenting .detail { top: calc(190px + var(--hd) + var(--pp) + var(--tb)); bottom: calc(60px + 120.75px * (var(--g-buttons) - 1)); }   /* (clear of Present as it grows) */
body:not(.touch):not(.l-dual) .fullpanel.record.presenting > .more.up { top: calc(214px + var(--hd) + var(--pp) + var(--tb)); }
body:not(.touch):not(.l-dual) .history, body:not(.touch):not(.l-dual) .slots { top: calc(110px + var(--hd)); }
body:not(.touch):not(.l-dual) :is(.histpanel, .slotpanel) > .more.up { top: calc(110px + var(--hd)); }
body:not(.touch):not(.l-dual) .settings .fp-body { top: calc(130px + var(--hd)); }
body:not(.touch):not(.l-dual) .settings > .more.up { top: calc(130px + var(--hd)); }
body:not(.touch):not(.l-dual) .notebook .fp-body { top: calc(140px + var(--hd)); }
/* a heading that would run under Close keeps its letters closer (layers.js fitHead) */
body:not(.touch):not(.l-dual) .fullpanel .head.crowded { letter-spacing: .12em; }
body:not(.touch):not(.l-dual) .settings .row { height: auto; min-height: calc(73.6px * var(--g-settings)); }
body:not(.touch):not(.l-dual) .settings .row .lab { width: calc(483px * var(--g-settings)); }
body:not(.touch):not(.l-dual) .settings .row .val { width: calc(103.5px * var(--g-settings)); }
/* save slots: as many columns as fit slots about 540px wide (three in the design), fewer with larger text */
body:not(.touch):not(.l-dual) .slots { grid-template-columns: repeat(auto-fill, minmax(calc(621px * var(--g-settings)), 1fr)); }
body:not(.touch):not(.l-dual) .slot { height: calc(287.5px * var(--g-settings)); }
/* the title: the menu in a second column if larger text needs one */
body:not(.touch):not(.l-dual) body:not(.touch):not(.l-dual) #title .items { max-height: calc(570px - 34.5px * (var(--g-title) - 1));
  flex-wrap: wrap; column-gap: 120px; }
/* pointing at evidence: the prompt over the picture, the picture in the room left */
body:not(.touch):not(.l-dual) .fullpanel.pointing { display: flex; flex-direction: column; gap: 18px; padding: calc(82px + var(--hd)) 120px 50px; }
body:not(.touch):not(.l-dual) .fullpanel.pointing .pointhint { position: relative; left: auto; right: auto; top: auto; flex: none; }
body:not(.touch):not(.l-dual) .fullpanel.pointing .pointview { position: relative; left: auto; right: auto; top: auto; bottom: auto; flex: 1 1 auto; min-height: 0; }
/* one dialog at a time: a confirmation hides the menu it came from */
.modal:has(~ .modal) { visibility: hidden; }
/* the talk, move and choice lists: never past the top of the screen; past that they scroll under the game's arrows */
body:not(.touch):not(.l-dual) #ui > .menu { display: flex; flex-direction: column; max-height: calc(974px - var(--dlgh)); }
body:not(.touch):not(.l-dual) #ui > .choice-menu { max-height: calc(934px - var(--dlgh)); }
body:not(.touch):not(.l-dual) #ui > .menu .mscroll { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
body:not(.touch):not(.l-dual) #ui > .menu .mitems { flex: 1 1 auto; min-height: 0; overflow-y: auto; scrollbar-width: none; }
body:not(.touch):not(.l-dual) #ui > .menu .mitems::-webkit-scrollbar { display: none; }
body:not(.touch):not(.l-dual) #ui > .menu .mscroll .more { display: flex; position: absolute; right: 6px; z-index: 2; width: 40px; height: 44px; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; transition: opacity 180ms, visibility 180ms; cursor: pointer; color: var(--brass); }
body:not(.touch):not(.l-dual) #ui > .menu .mscroll .more.up { top: 0; color: #7f7869; } body:not(.touch):not(.l-dual) #ui > .menu .mscroll .more.down { bottom: 0; }
body:not(.touch):not(.l-dual) #ui > .menu .mscroll.up .more.up, body:not(.touch):not(.l-dual) #ui > .menu .mscroll.down .more.down { opacity: 1; visibility: visible; }
body:not(.touch):not(.l-dual) #ui > .menu .mscroll .more i { display: flex; filter: drop-shadow(0 1px 3px #000); }
body:not(.touch):not(.l-dual) #ui > .menu .mscroll .more svg { width: 34px; height: 34px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- the series trailer (D-078; engine/ui/trailer.js) ----------
   The desktop design on every screen, the dialogue box and the scene only: no interface, no toasts, no arrows. */
body.trailer #toast, body.trailer #portui, body.trailer #subs, body.trailer #lowerframe, body.trailer #dlg .adv { display: none !important; }
body.trailer #dlg #verbs { display: none; }
body.lower.trailer { background: #000; }
body.lower.trailer > * { visibility: hidden; }
#trailer { position: absolute; inset: 0; z-index: 60; pointer-events: none; }
#trailer .fx { position: absolute; }
/* ghost writing: pale glowing serif with smeared echoes, surfacing through rippling water (the SVG filter on .gbody) */
.ghost { position: absolute; left: 0; right: 0; display: flex; justify-content: center; text-align: center; transition: opacity .8s ease-in, translate .8s ease-in; }
.ghost.p-top { top: 96px; } .ghost.p-center { top: 40%; translate: 0 -50%; } .ghost.p-low { bottom: 300px; }
.ghost.p-under { top: 54%; }
.ghost.k-title { top: 34%; translate: 0 -50%; }
.ghost .gbody { position: relative; padding: 40px 80px; }
.ghost.k-final .gbody { max-width: 1640px; }
.ghost .gline { position: relative; }
.ghost .main, .ghost .echo { font-family: var(--body-font); font-weight: 600; color: #effcff; line-height: 1.12; letter-spacing: .02em;
  text-shadow: 0 0 6px rgba(190,245,255,.9), 0 0 18px rgba(110,215,255,.75), 0 0 46px rgba(50,150,230,.5); }
.ghost.k-tag .main, .ghost.k-tag .echo { font-size: calc(89.7px * var(--ts-notices) * var(--fit, 1)); }
.ghost.k-final .main, .ghost.k-final .echo { font-size: calc(119.6px * var(--ts-notices)); text-wrap: balance; }
.ghost.k-title .main, .ghost.k-title .echo { font-family: var(--display-font); font-size: calc(161px * var(--ts-notices) * var(--fit, 1)); letter-spacing: .14em; text-indent: .14em; }
/* the tagline, as the trailer's last card and under the title: pale ice-blue capitals, spaced out and glowing (the glow in em,
   so it grows with the size), a little narrower than the wordmark; --cap sets the size where it isn't the trailer's */
.ghost.k-caption .main, .ghost.k-caption .echo { font-family: var(--display-font); font-size: var(--cap, calc(54px * var(--ts-notices) * var(--fit, 1))); letter-spacing: .5em; text-indent: .5em; color: #d8f4ff;
  text-shadow: 0 0 .13em rgba(190,245,255,.9), 0 0 .39em rgba(110,215,255,.75), 0 0 1em rgba(50,150,230,.5); }
.ghost.k-caption .main span { text-indent: 0; }   /* the letters are boxes of their own: the line is indented once, at its start */
/* ghost writing that stays in the flow of a screen (the title's tagline) instead of floating over a picture */
.ghost.still { position: relative; left: auto; right: auto; }
.ghost.still .gbody { padding: 0; }
.ghost:not(.k-final) .gline, .ghost:not(.k-final) .echo { white-space: nowrap; }
.ghost .main .w { display: inline-block; white-space: nowrap; }
.ghost .gsub { font-family: var(--body-font); font-style: italic; font-size: calc(46px * var(--ts-notices)); letter-spacing: .45em; text-indent: .45em; color: #bfeaff;
  text-shadow: 0 0 14px rgba(110,215,255,.8); margin-bottom: 6px; opacity: 0; animation: gsub 1.1s ease-out .15s forwards; }
.ghost .main span { display: inline-block; opacity: 0; animation: gletter .95s cubic-bezier(.2,.7,.3,1) both; white-space: pre; }
/* the echoes: a large drowned copy and a smeared double that slide and fade as the line surfaces */
.ghost .echo { position: absolute; inset: 0; pointer-events: none; white-space: pre-wrap; }
.ghost .e1 { color: rgba(150,225,255,.55); filter: blur(9px); animation: gecho1 2.6s ease-out forwards; }
.ghost .e2 { color: rgba(200,245,255,.6); filter: blur(3px); animation: gecho2 1.8s ease-out forwards; }
.ghost.out { opacity: 0; translate: 0 -18px; }
.ghost.out.p-center, .ghost.out.k-title { translate: 0 calc(-50% - 18px); }
@keyframes gletter { 0% { opacity: 0; filter: blur(14px); transform: translateY(10px) scale(1.25, .9); } 35% { opacity: .9; }
  60% { opacity: .55; filter: blur(2px); } 100% { opacity: 1; filter: blur(0); transform: none; } }
@keyframes gecho1 { 0% { opacity: 0; transform: scale(1.55) translateX(-50px); } 20% { opacity: .75; } 100% { opacity: .16; transform: scale(1.22) translateX(26px); } }
@keyframes gecho2 { 0% { opacity: 0; transform: translate(-22px, 4px); } 25% { opacity: .9; } 100% { opacity: 0; transform: translate(34px, -3px); } }
@keyframes gsub { from { opacity: 0; filter: blur(8px); letter-spacing: .8em; } to { opacity: .9; filter: blur(0); letter-spacing: .45em; } }
/* the title on the last hits */
#trailer .tlogo { position: absolute; left: 50%; top: 40%; translate: -50% -50%; animation: tlogo .7s cubic-bezier(.15,.8,.25,1) both; transition: opacity .6s; }
#trailer .tlogo img { width: 1180px; display: block; filter: drop-shadow(0 0 30px rgba(90,190,240,.35)); }
#trailer .tlogo .word { font-family: var(--display-font); font-weight: 600; font-size: calc(195.5px * var(--ts-notices)); letter-spacing: .2em; color: #efe3c2; }
#trailer .tlogo.out { opacity: 0; }
@keyframes tlogo { from { opacity: 0; scale: 1.35; filter: blur(16px); } 55% { opacity: 1; } to { opacity: 1; scale: 1; filter: blur(0); } }
/* a screen held upright: turn it to see the trailer */
#rotate { position: fixed; inset: 0; z-index: 200; background: #050607; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px;
  color: var(--bone); text-align: center; padding: 24px; transition: opacity .6s; }
#rotate.done { opacity: 0; }
#rotate .phone { width: 64px; height: 112px; border: 3px solid var(--brass); border-radius: 12px; position: relative; animation: turnme 2.4s ease-in-out infinite; }
#rotate .phone .scr { position: absolute; inset: 9px 6px; background: linear-gradient(140deg, #1e3a3a, #0b1112); border-radius: 3px; }
#rotate .r1 { font-family: var(--display-font); font-weight: 600; font-size: calc(29.9px * var(--ts-notices)); letter-spacing: .3em; color: #f0e2bd; margin-top: 18px; }
#rotate .r2 { font-size: calc(21.85px * var(--ts-notices)); color: var(--bone-dim); }
@keyframes turnme { 0%, 20% { rotate: 0deg; } 50%, 75% { rotate: -90deg; } 100% { rotate: 0deg; } }
