/* Stage is 1600x900 logical px; js/main.js scales it. Text sits directly on the pictures, over soft dark
   gradient scrims (never over grain/scanlines: those are drawn on the canvas, under all HTML). */
:root {
  --bg: #0A0F10; --panel: #0B1414; --teal: #0E2A2A; --teal2: #1C4440; --glow: #CFE8D8;
  --amber: #E8A54B; --cream: #EDE6D3; --red: #C8352B; --solved: #3FA59A;
  /* Every face must cover Ukrainian (і ї є ґ ’). Bundled in assets/fonts, declared in css/fonts.css (option B "Archive",
     chosen 18 Nov 2026); the rest of each stack is only a fallback while they load. */
  --font-title: 'Bona Nova SC', Georgia, serif;
  --font-body: 'Literata', Georgia, 'Times New Roman', serif;
  --font-mono: 'Anonymous Pro', Consolas, 'Courier New', monospace;
  /* staged apps and web pages inside the evidence imitate real screens, so they keep the system UI font on purpose */
  --font-ui: 'Segoe UI', system-ui, -apple-system, 'Helvetica Neue', Roboto, Arial, sans-serif;
  --shadow: 0 2px 6px #000, 0 0 18px #000;
  /* text size: --ts = 1 (A) or CONFIG.text.largeScale (A+), set by js/settings.js; --fit (1 or less) is set per column by fitText() so large text never overflows */
  --ts: 1; --fit: 1;
  /* one focus ring everywhere (amber), see the :focus-visible rules below */
  --ring: var(--amber); --ring-w: 4px;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #020405; }
body { color: var(--cream); font-family: var(--font-body); font-size: 28px; line-height: 1.45; }

#stage { position: absolute; left: 0; top: 0; width: 1600px; height: 900px; transform-origin: 0 0; background: #020405; overflow: hidden; }
#art { position: absolute; left: 0; top: 0; width: 1600px; height: 900px; }
#ui, #pause, #fade { position: absolute; left: 0; top: 0; width: 1600px; height: 900px; }
#ui > div, #ui > button { position: absolute; }
#ui { text-shadow: var(--shadow); }
#fade { background: #000; opacity: 1; pointer-events: none; z-index: 20; }
#pause { background: radial-gradient(ellipse at center, rgba(3,6,7,.95), rgba(3,6,7,.99)); z-index: 10; }   /* near-opaque: the screen below must not show through the menu text */
#pause[hidden] { display: none; }
.pause-panel { position: absolute; left: 550px; top: 230px; width: 500px; display: flex; flex-direction: column; gap: 24px; }
.pause-panel h2 { margin: 0 0 12px; font: 600 64px var(--font-title); letter-spacing: 0.2em; text-transform: uppercase; }

.appear { opacity: 0; animation: appear 0.8s ease-out forwards; }
@keyframes appear { from { opacity: 0; } to { opacity: 1; } }

/* scrims: soft dark gradients so text stays readable over any picture */
.scrim { pointer-events: none; text-shadow: none; }
.scrim-left { background: linear-gradient(90deg, rgba(3,7,8,.94) 0%, rgba(3,7,8,.86) 45%, rgba(3,7,8,0) 100%); }
.scrim-left.wide { background: linear-gradient(90deg, rgba(3,7,8,.95) 0%, rgba(3,7,8,.9) 60%, rgba(3,7,8,0) 100%); }
.scrim-right { background: linear-gradient(270deg, rgba(3,7,8,.92) 0%, rgba(3,7,8,.8) 60%, rgba(3,7,8,0) 100%); }
.scrim-top { background: linear-gradient(180deg, rgba(3,7,8,.95) 0%, rgba(3,7,8,.88) 55%, rgba(3,7,8,0) 100%); }
.scrim-bottom { background: linear-gradient(0deg, rgba(3,7,8,.95) 0%, rgba(3,7,8,.85) 60%, rgba(3,7,8,0) 100%); }

button { font-family: var(--font-body); font-size: 28px; color: var(--cream); cursor: pointer; text-shadow: none; }
/* one focus ring for every interactive element: amber, 4px, 3px off the edge (inset variants for clipped/light things below) */
/* body.using-mouse is set by js/input.js after a mouse press and cleared by any key: with the keyboard (or before any input) the focused control always shows the ring */
:focus { outline: none; }
:focus-visible, body:not(.using-mouse) :focus, .file-card:focus { outline: var(--ring-w) solid var(--ring); outline-offset: 3px; }
.btn-outline { background: rgba(3,7,8,.55); border: 2px solid var(--cream); padding: 16px 40px; min-width: 320px; text-transform: uppercase; letter-spacing: 0.14em; font-family: var(--font-title); font-size: 30px; transition: background .2s, color .2s, box-shadow .2s; }
.btn-outline:hover { background: var(--cream); color: var(--bg); box-shadow: 0 0 26px rgba(237,230,211,.35); }
.btn-outline.next { min-width: 420px; white-space: nowrap; }

/* title */
.clock { font: 34px var(--font-mono); color: var(--cream); letter-spacing: 0.1em; }
.lang-toggle { display: flex; }
.lang-btn { flex: 1; background: rgba(3,7,8,.6); border: 2px solid var(--cream); padding: 8px 0; font: 700 28px var(--font-mono); letter-spacing: 0.1em; }
.lang-btn.on { background: var(--cream); color: var(--bg); }
.game-title { margin: 0 0 18px; font: 600 118px/1.02 var(--font-title); letter-spacing: 0.14em; text-transform: uppercase; color: var(--cream); text-shadow: 0 0 30px rgba(207,232,216,.25), var(--shadow); }
.tagline { font: 30px var(--font-mono); margin: 0 0 44px; letter-spacing: 0.03em; }
.title-name { display: flex; align-items: baseline; gap: 20px; width: 640px; margin: 10px 0 0; }
.title-name .who-label { font-size: 20px; margin: 0; white-space: nowrap; flex: none; }
.title-name .who-input { flex: 1; min-width: 0; font-size: 28px; border-bottom-width: 2px; background: rgba(3,7,8,.55); }
.title-go { display: flex; justify-content: flex-end; }
.title-name .who-input::placeholder { color: var(--cream); opacity: .45; }
.hint { font: 22px var(--font-mono); margin-top: 26px; opacity: 0.8; }

/* header */
.header { display: flex; align-items: center; padding: 0 40px; }
.h-title { font: 600 38px var(--font-title); letter-spacing: 0.12em; text-transform: uppercase; flex: 1; }
.h-title.long { font-size: 31px; letter-spacing: 0.08em; }
.h-title.xlong { font-size: 26px; letter-spacing: 0.06em; }
.h-progress { font: 30px var(--font-mono); margin-right: 32px; }
.h-review { font: 20px var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--cream); border: 2px solid currentColor; padding: 4px 12px; margin-right: 24px; flex: none; opacity: .85; }
.log-practice { font: 22px/1.35 var(--font-body); color: var(--amber); margin: 0 0 8px; }
.h-practice { color: var(--amber); font-size: 16px; padding: 3px 9px; margin-right: 16px; }
.practice-tag { z-index: 5; }
.h-lang { display: flex; width: 112px; margin-right: 32px; flex: none; }
.h-lang .lang-btn { font-size: 20px; padding: 6px 0; }
.h-menu { background: rgba(3,7,8,.55); border: 2px solid var(--cream); width: 56px; height: 56px; font-size: 34px; padding: 0; line-height: 1; }
.h-menu:hover { background: var(--cream); color: var(--bg); }

/* case text on the picture */
.slate { font: 24px var(--font-mono); color: var(--amber); letter-spacing: 0.08em; margin-bottom: 10px; }
.lead { font-size: calc(32px * var(--ts) * var(--fit)); font-weight: 700; margin-bottom: 14px; }
.situation { font-size: calc(28px * var(--ts) * var(--fit)); }
.debug { font: 18px var(--font-mono); color: var(--amber); margin-top: 8px; }

/* caption phase: typewriter on near-black with a block cursor */
.caption-block { text-align: center; }
.caption-case { font: 600 34px var(--font-title); letter-spacing: 0.3em; text-transform: uppercase; color: var(--amber); margin-bottom: 14px; }
.caption-text { font: 48px var(--font-mono); min-height: 64px; letter-spacing: 0.04em; }
.caption-text.typing::after { content: ''; display: inline-block; width: 0.55em; height: 0.95em; background: var(--cream); margin-left: 6px; vertical-align: -0.1em; animation: blink 0.9s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* choices: outlined, like the reference button */
.choice { font-size: calc(26px * var(--ts) * var(--fit)); height: 150px; top: 712px; display: flex; align-items: center; gap: 22px; text-align: left; background: rgba(3,7,8,.72); border: 2px solid rgba(237,230,211,.85); padding: 18px 26px; line-height: 1.3; transition: background .15s, border-color .15s, box-shadow .15s; }
.choice:hover:not(:disabled), .choice:focus-visible { border-color: var(--amber); background: rgba(14,32,32,.88); box-shadow: 0 0 28px rgba(232,165,75,.25); }
.choice.picked { background: var(--cream); color: var(--bg); border-color: var(--cream); }
.choice-num { flex: none; width: 54px; height: 54px; border: 2px solid currentColor; border-radius: 50%; font: 700 30px/50px var(--font-mono); text-align: center; }
.choice-label { flex: 1; line-height: 1.25; }
.keys-hint { font: 22px var(--font-mono); opacity: 0.85; }
/* key hints stay in the layout but are hidden until the "?" button (#help-btn, index.html) turns on body.show-help */
#ui .keys-hint { visibility: hidden; }
body.show-help #ui .keys-hint { visibility: visible; }
#help-btn { display: none; position: absolute; left: 1548px; top: 865px; width: 30px; height: 30px; padding: 0; border-radius: 50%;
  border: 2px solid rgba(237,230,211,.5); background: rgba(3,7,8,.6); color: var(--cream); font: 700 18px/26px var(--font-mono);
  text-align: center; cursor: pointer; opacity: .75; transition: opacity .2s, border-color .2s; }
body:has(#ui .keys-hint) #help-btn { display: block; }
#help-btn:hover, #help-btn:focus-visible { opacity: 1; border-color: var(--amber); }
body.show-help #help-btn { opacity: 1; border-color: var(--amber); color: var(--amber); }

/* stamps */
.stamp { font: 700 72px/1.1 var(--font-title); letter-spacing: 0.14em; text-transform: uppercase; padding: 10px 28px; border: 6px solid currentColor; background: rgba(3,7,8,.55); transform: rotate(-4deg); text-shadow: none; }
.stamp.land { animation: stampLand 0.45s cubic-bezier(.2,.9,.3,1.2) both; }
.stamp.fatal { color: #e2483d; } .stamp.safe { color: var(--solved); } .stamp.scratched { color: var(--amber); }
.stamp.small { font-size: 26px; border-width: 3px; padding: 4px 12px; margin-top: 12px; display: inline-block; }
@keyframes stampLand { 0% { opacity: 0; transform: rotate(-4deg) scale(2.2); } 60% { opacity: 1; transform: rotate(-4deg) scale(0.96); } 80% { transform: rotate(-5deg) scale(1.02) translateX(-6px); } 100% { opacity: 1; transform: rotate(-4deg) scale(1); } }
.verdict-line { font: 700 calc(32px * var(--ts) * var(--fit)) var(--font-body); margin-top: 22px; }
.verdict-line.fatal { color: #ff8b80; margin-top: 16px; } .verdict-label { color: #ffd2cc; } .verdict-line.safe { color: #7fe0d4; } .verdict-line.scratched { color: var(--amber); }
.report-line { margin-top: 12px; font: calc(22px * var(--vs, 1) * var(--ts)) var(--font-mono); color: var(--glow); }
.report-line.dim { margin-top: 4px; color: var(--amber); }
.best-move { margin-top: 14px; font-size: calc(26px * var(--ts) * var(--fit)); }
/* verdict: "case file" column on the left, picture in the rest */
.verdict-col { --vs: 1; display: flex; flex-direction: column; padding-top: 8px; padding-bottom: 24px; overflow: hidden;
  background: linear-gradient(90deg, rgba(3,7,8,.97) 0%, rgba(3,7,8,.95) 90%, rgba(3,7,8,.7) 100%); }
.verdict-col .story-text { position: static; flex: 0 0 auto; }
.verdict-col .situation { font-size: calc(28px * var(--vs) * var(--ts)); }
.verdict-col .verdict-line { font-size: calc(32px * var(--vs) * var(--ts)); margin-top: calc(16px * var(--vs)); }
.verdict-col .best-move { font-size: calc(26px * var(--vs) * var(--ts)); }
.verdict-col .stamp-wrap { flex: 0 0 auto; padding: 22px 8px 0 4px; }
.verdict-col .stamp { display: inline-block; font-size: calc(40px * var(--vs)); letter-spacing: 0.08em; white-space: normal; text-align: center; box-sizing: border-box; padding: 6px 18px; border-width: 5px; transform: rotate(-3deg); max-width: 100%; }
:lang(uk) .verdict-col .stamp { font-size: calc(32px * var(--vs)); letter-spacing: 0.04em; }   /* longer Ukrainian stamps */
.verdict-col .verdict-foot { margin-top: auto; padding-top: 12px; }
.verdict-col .btn-outline.next { min-width: 0; width: 100%; font-size: 28px; padding: 12px 20px; }
.verdict-col .keys-hint { margin-top: 10px; font-size: 20px; }

/* emoji next to a quote (ui.js emojiText): never wrap apart, pull in the font's side bearings */
.emo-run { white-space: nowrap; }
.emoji { margin: 0 -0.1em 0 -0.14em; }

/* notes */
.notes-col h2 { margin: 0 0 4px; font: 600 calc(28px * var(--fit)) var(--font-title); letter-spacing: 0.07em; text-transform: uppercase; color: var(--amber); }
.notes-col p { margin: 0 0 14px; }
.notes-col { font-size: calc(26px * var(--ts) * var(--fit)); line-height: 1.35; }
.notes-col ol { margin: 0 0 16px; padding-left: 36px; font-size: calc(26px * var(--ts) * var(--fit)); line-height: 1.35; }
.notes-col li { margin-bottom: 4px; }
.notes-col .note, .notes-col .athome { font-size: calc(26px * var(--ts) * var(--fit)); }
.notes-col .real { font-size: calc(22px * var(--ts) * var(--fit)); line-height: 1.35; margin-bottom: 8px; }
.sources { font: calc(20px * var(--fit, 1)) var(--font-mono); }
a { color: var(--glow); }

/* board (hub) */
.board-info { }
.board-score { font: 600 32px var(--font-title); letter-spacing: 0.1em; text-transform: uppercase; }
.board-note { font-size: calc(26px * var(--ts) * var(--fit)); min-height: 40px; margin-top: 4px; line-height: 1.3; }
.board-end-head { font: 600 30px var(--font-title); letter-spacing: 0.3em; text-transform: uppercase; color: var(--amber); display: flex; align-items: center; gap: 28px; }
.board-end-head .stamp.small { margin-top: 0; font-size: 24px; }
.board-end-head { margin-bottom: 4px; }
.board-info.ending .board-score { font-size: 32px; }
.board-info.ending .board-note { font-size: calc(24px * var(--ts) * var(--fit)); }
.board-track { font: 22px var(--font-mono); letter-spacing: 0.04em; margin-top: 6px; color: var(--glow); }
.cert-slot { border: 2px solid rgba(237,230,211,.6); box-shadow: 0 8px 24px #000c; background: #0A0F10; transform: rotate(1deg); }
.cert-thumb { display: block; cursor: pointer; }
.btn-outline.cert-btn { min-width: 0; width: 250px; padding: 8px 10px; font-size: 18px; letter-spacing: 0.02em; line-height: 1.15; height: 66px; }
.btn-outline.small { min-width: 0; padding: 10px 24px; font-size: 24px; letter-spacing: 0.08em; }
.btn-outline.danger { border-color: #ff8b80; color: #ffd2cc; }
.btn-outline:disabled { opacity: .35; cursor: default; }
.btn-outline:disabled:hover { background: rgba(3,7,8,.55); color: var(--cream); box-shadow: none; }

/* who are you: visitor log */
.who-panel { background: rgba(8,16,16,.94); border: 2px solid rgba(237,230,211,.75); padding: 38px 48px 30px; box-shadow: 0 0 60px #000d; }
.who-title { margin: 0; font: 600 54px var(--font-title); letter-spacing: 0.22em; text-transform: uppercase; }
.who-sub { font: 24px var(--font-mono); color: var(--amber); margin: 6px 0 26px; letter-spacing: 0.02em; }
.who-field { margin-bottom: 14px; }
.who-label { display: block; font: 22px var(--font-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--glow); opacity: .9; margin-bottom: 10px; }
.who-input { width: 100%; font: 32px var(--font-mono); color: var(--cream); background: rgba(237,230,211,.06); border: 0; border-bottom: 3px solid var(--cream); padding: 10px 12px; text-shadow: none; border-radius: 0; }
.who-input:focus { background: rgba(237,230,211,.14); border-bottom-color: var(--amber); box-shadow: 0 6px 18px rgba(232,165,75,.2); }
.who-input[aria-invalid] { border-bottom-color: #ff8b80; }
.who-err { min-height: 32px; font: 22px/1.3 var(--font-mono); color: #ff8b80; padding-top: 4px; text-shadow: none; }
.who-go { margin-top: 8px; width: 100%; }
.who-privacy { font: 20px/1.4 var(--font-mono); opacity: .8; margin-top: 18px; text-shadow: none; }

/* briefing */
.brief-block .slate { font-size: 28px; margin-bottom: 18px; }
.brief-lead { font: 600 50px/1.18 var(--font-title); letter-spacing: 0.04em; margin: 0 0 6px; }
.brief-text { font-size: calc(32px * var(--ts) * var(--fit)); margin: 18px 0 22px; }
.brief-text em { color: var(--amber); font-style: italic; }
.brief-rule { font: calc(26px * var(--ts) * var(--fit))/1.4 var(--font-mono); border-left: 4px solid var(--amber); padding-left: 20px; margin: 0 0 38px; }

/* admin */
.admin-bg { width: 1600px; height: 900px; background: rgba(3,7,8,.9); left: 0; top: 0; }
.admin-title { margin: 0; font: 600 48px var(--font-title); letter-spacing: 0.14em; text-transform: uppercase; }
.admin-count { font: 24px var(--font-mono); color: var(--amber); margin: 4px 0 14px; }
.admin-bar { display: flex; gap: 16px; margin-bottom: 14px; }
.admin-confirm { display: flex; align-items: center; gap: 16px; font-size: 24px; background: rgba(200,53,43,.18); border: 2px solid #ff8b80; padding: 10px 16px; margin-bottom: 14px; }
.admin-confirm span { flex: 1; }
.admin-empty { font: 28px var(--font-mono); opacity: .8; margin-top: 30px; }
.admin-table-wrap { max-height: 640px; overflow: auto; border: 1px solid rgba(237,230,211,.4); }
.admin-table { border-collapse: collapse; width: 100%; font: 19px var(--font-mono); text-shadow: none; }
.admin-table th { position: sticky; top: 0; background: #12201f; text-align: left; color: var(--amber); padding: 6px 10px; }
.admin-table td { padding: 5px 10px; border-top: 1px solid rgba(237,230,211,.18); white-space: nowrap; }
.admin-table tr:nth-child(even) td { background: rgba(237,230,211,.04); }
.file-card { --rot: 0deg; --lift: 8px; background: #e8dfc6; color: #151515; padding: 22px 16px 12px; box-shadow: 0 10px 22px #000c; text-shadow: none; overflow: visible;
  transform: rotate(var(--rot)); transition: transform .15s, box-shadow .15s, filter .15s; outline-offset: 5px; }
.file-card .pin { position: absolute; left: 50%; top: -6px; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #ffd98a, #8a5a14); }
.file-no { font: 20px var(--font-mono); }
.file-title { font: 700 25px/1.18 var(--font-body); margin: 4px 0 6px; }
.file-key { position: absolute; right: 8px; top: 8px; width: 26px; height: 26px; border: 2px solid #151515; border-radius: 50%; font: 700 17px/22px var(--font-mono); text-align: center; opacity: .55; }
.file-card .stamp { background: transparent; font-size: 21px; letter-spacing: 0.06em; text-align: center; white-space: normal; max-width: 100%; padding: 3px 8px; margin-top: 6px; }
.file-card .stamp.second { color: #2f7f9a; }
:lang(uk) .file-card .stamp { font-size: 19px; letter-spacing: 0.02em; }   /* Ukrainian stamps are longer */
.file-card .stamp.fatal { color: #b3261e; } .file-card .stamp.safe { color: #1f7f74; } .file-card .stamp.scratched { color: #b8741c; }
.file-new { display: inline-block; margin-top: 6px; padding: 2px 10px; border: 2px dashed #7a6f4e; color: #5b5238; font: 700 18px var(--font-mono); letter-spacing: 0.08em; }
.file-card.pickable { cursor: pointer; background: #f4ecd2; }
.file-card.pickable:hover, .file-card.pickable:focus { transform: rotate(0deg) translateY(calc(var(--lift) * -1)); box-shadow: 0 16px 28px #000d, 0 0 24px rgba(232,165,75,.45); }
.file-card.reopened-look, .file-card.fatal { box-shadow: 0 10px 22px #000c, 0 0 0 3px rgba(200,53,43,.8); }
.file-card.closed { cursor: pointer; filter: brightness(.82) saturate(.85); }
.file-card.suggested { box-shadow: 0 10px 22px #000c, 0 0 0 4px var(--amber); }
.file-card.suggested::after { content: ''; position: absolute; inset: -4px; pointer-events: none; box-shadow: 0 0 36px rgba(232,165,75,.8); animation: pickPulse 1.8s ease-in-out infinite; }
.file-pick { position: absolute; left: 50%; bottom: -17px; transform: translateX(-50%); white-space: nowrap; background: var(--amber); color: #1a1208; font: 700 17px var(--font-mono); letter-spacing: 0.06em; padding: 3px 12px; box-shadow: 0 3px 8px #000a; }
@keyframes pickPulse { 50% { opacity: .35; } }
.still .file-card.suggested::after { animation: none; }

/* options (text size, sound) on the title */
.snd-icon { width: 44px; height: 44px; padding: 0; display: flex; align-items: center; justify-content: center; background: transparent; border: 2px solid transparent; border-radius: 6px; color: var(--cream); opacity: .7; cursor: pointer; transition: opacity .15s, background .15s; }
.snd-icon:hover, .snd-icon:focus-visible { opacity: 1; background: rgba(3,7,8,.6); border-color: var(--amber); }
.snd-icon svg { display: block; filter: drop-shadow(0 1px 3px #000); }
/* global sound icon (js/main.js mountSound): bottom right on every screen, just left of the "?" when that is shown */
#snd-btn { position: absolute; left: 1506px; top: 863px; width: 34px; height: 34px; }
#snd-btn svg { width: 28px; height: 26px; }
body:not(:has(#ui .keys-hint)) #snd-btn { left: 1546px; }
body[data-scene="admin"] #snd-btn { display: none; }
.opt-row { display: flex; gap: 20px; margin-top: 22px; }
.opt-row .btn-outline.small { padding: 8px 18px; font-size: 22px; letter-spacing: 0.06em; min-width: 0; }

/* reduced motion (js/settings.js sets .reduce-motion from prefers-reduced-motion or ?reducedmotion): fades shortened, nothing slams, blinks or pulses */
.reduce-motion .appear { animation-duration: 0.12s; animation-delay: 0s !important; }
.reduce-motion .stamp.land { animation: none; }
.reduce-motion .caption-text.typing::after { animation: none; }
.reduce-motion .file-card.suggested::after { animation: none; opacity: .6; }
.reduce-motion *:not(#fade) { transition-duration: 0.01s !important; }
.still .appear { animation: none; opacity: 1; } .still #fade { display: none; } .still .stamp.land { animation: none; }

/* the Inspector's desk (js/scenes/desk.js): items lying on the desk top */
.desk-head { font: 600 44px var(--font-title); letter-spacing: 0.16em; text-transform: uppercase; }
.desk-intro { font: calc(22px * var(--ts) * var(--fit)) var(--font-mono); color: var(--amber); margin-top: 4px; max-width: 1180px; line-height: 1.3; }
.desk-item { --rot: 0deg; --lift: 8px; display: flex; flex-direction: column; text-shadow: none; cursor: pointer; transform: rotate(var(--rot)); transition: transform .15s, box-shadow .15s, filter .15s; box-shadow: 0 12px 26px #000c; }
.desk-item:hover, .desk-item:focus { transform: rotate(0deg) translateY(calc(var(--lift) * -1)); box-shadow: 0 18px 30px #000d, 0 0 26px rgba(232,165,75,.4); }
.desk-item.closed { cursor: pointer; filter: brightness(.8) saturate(.8); }
.desk-item.closed:hover, .desk-item.closed:focus { transform: rotate(var(--rot)); box-shadow: 0 12px 26px #000c; }
.desk-item.fatal { box-shadow: 0 12px 26px #000c, 0 0 0 3px rgba(200,53,43,.85); }
.desk-item.suggested { box-shadow: 0 12px 26px #000c, 0 0 0 4px var(--amber), 0 0 34px rgba(232,165,75,.6); }
.desk-item.phone { width: 190px; height: 280px; border-radius: 26px; background: #14181c; border: 3px solid #333a42; padding: 12px 9px; color: #1b1b1b; }
.desk-item.tablet { width: 340px; height: 240px; border-radius: 16px; background: #14181c; border: 3px solid #333a42; padding: 14px; color: #1b1b1b; }
.desk-item.printout { width: 270px; height: 270px; background: #f1ecdc; border: 1px solid #cfc8b0; padding: 14px 16px; color: #1b1b1b; }
.desk-screen { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 4px; overflow: hidden; }
.desk-item.phone .desk-screen, .desk-item.tablet .desk-screen { background: linear-gradient(#ecece6, #d6d6ce); border-radius: 12px; padding: 10px 10px 8px; }
.desk-kind { font: 700 15px var(--font-mono); letter-spacing: 0.12em; color: #5b5a52; }
.desk-key { position: absolute; right: -6px; top: -6px; width: 26px; height: 26px; border: 2px solid var(--cream); background: #0b1414; color: var(--cream); border-radius: 50%; font: 700 16px/22px var(--font-mono); text-align: center; }
.desk-title { font: 700 calc(23px * var(--ts) * var(--fit)) / 1.2 var(--font-body); }
.desk-item.phone .desk-title { font-size: calc(21px * var(--ts) * var(--fit)); }
.desk-item .stamp { background: transparent; font-size: 19px; letter-spacing: 0.04em; text-align: center; white-space: normal; padding: 3px 7px; margin-top: auto; align-self: flex-start; }
:lang(uk) .desk-item .stamp { font-size: 17px; letter-spacing: 0.01em; }
.desk-item .stamp.fatal { color: #b3261e; } .desk-item .stamp.safe { color: #1f7f74; } .desk-item .stamp.scratched { color: #b8741c; } .desk-item .stamp.second { color: #2f7f9a; }
.desk-new { margin-top: auto; align-self: flex-start; padding: 2px 10px; border: 2px dashed #7a6f4e; color: #5b5238; font: 700 17px var(--font-mono); letter-spacing: 0.08em; }
.desk-pick { position: absolute; left: 50%; bottom: -16px; transform: translateX(-50%); white-space: nowrap; background: var(--amber); color: #1a1208; font: 700 16px var(--font-mono); letter-spacing: 0.06em; padding: 3px 12px; box-shadow: 0 3px 8px #000a; }
.desk-empty { border: 3px dashed rgba(237,230,211,.28); border-radius: 14px; color: rgba(237,230,211,.45); font: 20px var(--font-mono); display: flex; align-items: center; justify-content: center; text-align: center; padding: 20px; text-shadow: none; }
.rooms-row { left: 36px; top: 30px; display: flex; gap: 14px; }
/* back arrow (ui.js backButton): section hubs (in .rooms-row, top left) and case headers (before the title) */
.back-btn { width: 52px; height: 52px; padding: 0; display: flex; align-items: center; justify-content: center; flex: none;
  background: rgba(3,7,8,.55); border: 2px solid rgba(237,230,211,.6); color: var(--cream); cursor: pointer; transition: background .2s, color .2s, border-color .2s; }
.back-btn:hover { background: var(--cream); color: var(--bg); border-color: var(--cream); }
.header .back-btn { margin-right: 22px; }
.reduce-motion .desk-item { transition-duration: 0.01s; }
.still .desk-item { transition: none; }

/* the Inspector's office (js/scenes/office.js): invisible hotspot buttons over the picture, labels, one-line prompt */
#ui > .office-spot { background: transparent; border: 0; padding: 0; border-radius: 22px; cursor: pointer; transition: box-shadow .2s, background .2s; }
#ui > .office-spot:focus, #ui > .office-spot:focus-visible { outline: none; }
.office-spot:hover, .office-kbd .office-spot:focus { background: radial-gradient(ellipse at center, rgba(232,165,75,.16), rgba(232,165,75,.04) 70%); box-shadow: 0 0 0 3px rgba(232,165,75,.85), 0 0 38px 6px rgba(232,165,75,.5); }
.office-spot.debug-spot { outline: 2px dashed #ff5a4d; outline-offset: 0; }
.office-spot.debug-spot::after { content: attr(data-spot) '  ' attr(data-rect); position: absolute; left: 4px; top: 4px; font: 16px var(--font-mono); color: #ff9d94; background: #000a; padding: 1px 6px; }
.office-label { display: flex; flex-direction: column; gap: 6px; min-width: 340px; width: max-content; max-width: 560px; padding: 8px 16px 8px; background: rgba(3,7,8,.78); border: 2px solid rgba(237,230,211,.55); border-radius: 12px; pointer-events: none; transition: border-color .2s, background .2s; }
.office-label.above { flex-direction: column-reverse; }
.office-label.show { border-color: var(--amber); background: rgba(3,7,8,.92); }
.office-label.done { border-color: rgba(63,165,154,.8); }
.office-label-head { display: flex; align-items: baseline; gap: 12px; white-space: nowrap; }
.office-key { flex: none; width: 26px; height: 26px; border: 2px solid var(--cream); border-radius: 50%; font: 700 16px/22px var(--font-mono); text-align: center; align-self: center; }
.office-name { font: 600 calc(26px * var(--ts)) var(--font-title); letter-spacing: 0.1em; text-transform: uppercase; }
.office-tag { margin-left: auto; font: 700 calc(21px * var(--ts)) var(--font-mono); color: var(--amber); letter-spacing: 0.04em; }
.office-label.done .office-tag { color: #6fd3c6; }
.office-hint { display: none; font: calc(21px * var(--ts)) / 1.3 var(--font-body); color: var(--cream); width: 0; min-width: 100%; }
.office-label.show .office-hint { display: block; }
.office-prompt, .office-prompt ~ .keys-hint { text-align: center; }
.office-prompt .board-note { font: calc(26px * var(--ts) * var(--fit)) / 1.25 var(--font-body); }
.office-measure { cursor: crosshair; z-index: 5; }
.office-measure-rect { position: absolute; border: 2px solid #5ad1ff; background: rgba(90,209,255,.15); }
.office-measure-out { position: absolute; left: 20px; top: 20px; font: 22px var(--font-mono); background: #000c; color: #5ad1ff; padding: 4px 10px; }
.still .office-spot, .reduce-motion .office-spot { transition: none; }

/* the morning paper (js/scenes/paper.js): the front page lying on a table, headline cards on it */
.paper-sheet { --serif: 'Literata', Georgia, 'Times New Roman', serif; display: flex; flex-direction: column; background: #e9e1cb; color: #1c1a15; text-shadow: none; padding: 16px 40px 14px; box-shadow: 0 18px 54px #000e; transform: rotate(-0.25deg); overflow: hidden; font-family: var(--serif); }
.paper-mast { flex: none; text-align: center; font: 700 70px/1.05 var(--serif); letter-spacing: 0.08em; text-transform: uppercase; border-bottom: 4px double #1c1a15; padding-bottom: 6px; }
.paper-dateline { flex: none; display: flex; justify-content: space-between; gap: 24px; font: 20px var(--font-mono); border-bottom: 1px solid #1c1a15; padding: 6px 2px; margin-bottom: 14px; }
.paper-dateline .paper-tag { font: italic 21px var(--serif); text-transform: none; text-align: right; }
.paper-intro { flex: none; margin: -4px 0 12px; font: italic calc(22px * var(--ts) * var(--fit)) / 1.3 var(--serif); color: #7a2a20; }
.paper-grid { flex: 0 1 auto; display: grid; gap: 20px 28px; align-content: start; margin-bottom: 14px; }
.paper-card { position: relative; display: flex; flex-direction: column; gap: 8px; min-height: 330px; padding: 14px 22px 14px; background: #f3ecd8; border: 2px solid #1c1a15; cursor: pointer; transition: transform .15s, box-shadow .15s, background .15s; }
.paper-card.pickable:hover, .paper-card.pickable:focus { background: #fff8e0; transform: translateY(-4px); box-shadow: 0 12px 22px #0008; }
.paper-card.closed { cursor: pointer; background: #e3dcc6; }
.paper-card.fatal { box-shadow: 0 0 0 3px rgba(179,38,30,.85); }
.paper-card.suggested { box-shadow: 0 0 0 4px #c98422, 0 0 28px rgba(201,132,34,.5); }
.paper-kicker { display: flex; justify-content: space-between; align-items: center; gap: 12px; font: 700 calc(17px * var(--ts) * var(--fit)) var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: #6a3b12; padding-right: 36px; }
.paper-aud { border: 2px solid currentColor; padding: 0 10px; letter-spacing: 0.04em; text-transform: none; font-size: calc(16px * var(--ts) * var(--fit)); }
.paper-title { font: 700 calc(38px * var(--ts) * var(--fit)) / 1.1 var(--serif); }
.paper-teaser { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; font: calc(23px * var(--ts) * var(--fit)) / 1.3 var(--font-body); color: #3a372c; }
.paper-card .stamp { margin-top: auto; align-self: flex-start; background: transparent; font-size: calc(22px * var(--fit)); letter-spacing: 0.06em; border-width: 3px; padding: 3px 12px; }
:lang(uk) .paper-card .stamp { font-size: calc(19px * var(--fit)); letter-spacing: 0.02em; }
.paper-card .stamp.fatal { color: #b3261e; } .paper-card .stamp.safe { color: #1f7f74; } .paper-card .stamp.scratched { color: #b8741c; } .paper-card .stamp.second { color: #2f7f9a; }
.paper-new { margin-top: auto; align-self: flex-start; padding: 2px 12px; border: 2px dashed #7a6f4e; color: #5b5238; font: 700 calc(18px * var(--fit)) var(--font-mono); letter-spacing: 0.08em; }
.paper-key { position: absolute; right: 10px; top: 10px; width: 28px; height: 28px; border: 2px solid #1c1a15; border-radius: 50%; font: 700 17px/24px var(--font-mono); text-align: center; opacity: .6; }
.paper-pick { position: absolute; right: 14px; bottom: 12px; background: #c98422; color: #1a1208; font: 700 16px var(--font-mono); letter-spacing: 0.06em; padding: 3px 12px; box-shadow: 0 3px 8px #0007; }
.paper-foot { flex: none; margin-top: auto; border-top: 3px double #1c1a15; padding-top: 8px; }
.paper-end-head { font: 700 26px var(--font-title); letter-spacing: 0.3em; text-transform: uppercase; color: #7a2a20; }
.paper-tally { font: 700 calc(26px * var(--ts) * var(--fit)) var(--font-title); letter-spacing: 0.1em; text-transform: uppercase; }
.paper-note { font: calc(22px * var(--ts) * var(--fit)) / 1.3 var(--font-body); min-height: 30px; margin-top: 2px; color: #2c2a22; }
.paper-sheet .keys-hint { margin-top: 4px; color: #4a463a; font-size: 20px; }
.still .paper-card, .reduce-motion .paper-card { transition-duration: 0.01s; }

/* certificate / case-log pop-ups (js/modals.js): above the pause layer's level, under the scene fade */
#modal { position: absolute; left: 0; top: 0; width: 1600px; height: 900px; z-index: 11; background: radial-gradient(ellipse at center, rgba(3,6,7,.97), rgba(3,6,7,.995)); display: flex; align-items: center; justify-content: center; text-shadow: none; }
#modal[hidden] { display: none; }
.modal-panel { display: flex; flex-direction: column; align-items: center; gap: 30px; max-width: 1540px; max-height: 880px; }
.modal-cert { border: 2px solid rgba(237,230,211,.6); box-shadow: 0 10px 40px #000; background: #0A0F10; flex: none; }
.modal-cert canvas { display: block; }
.modal-bar { display: flex; flex-wrap: wrap; justify-content: center; gap: 24px; }
.btn-outline.modal-btn { min-width: 0; min-height: 66px; padding: 12px 30px; font-size: calc(24px * var(--ts)); letter-spacing: 0.06em; line-height: 1.15; }
.modal-panel.log { align-items: stretch; gap: 18px; }
.modal-title { margin: 0; text-align: center; font: 600 44px var(--font-title); letter-spacing: 0.2em; text-transform: uppercase; color: var(--amber); }
.modal-log-body { overflow-y: auto; padding: 0 18px 0 6px; display: flex; flex-direction: column; gap: 20px; scrollbar-color: var(--cream) transparent; }
.modal-log-body:focus-visible { outline-offset: -4px; }
.log-head { display: flex; justify-content: space-between; align-items: baseline; gap: 24px; border-bottom: 2px solid rgba(237,230,211,.45); padding-bottom: 4px; margin-bottom: 4px; }
.log-head h3 { margin: 0; font: 600 calc(28px * var(--ts)) var(--font-title); letter-spacing: 0.12em; text-transform: uppercase; color: var(--cream); }
.log-tally { font: calc(22px * var(--ts)) var(--font-mono); color: var(--amber); text-align: right; }
.log-row { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; padding: 6px 0; border-bottom: 1px solid rgba(237,230,211,.14); align-items: baseline; }
.log-row.link { cursor: pointer; }
.log-row.link:hover { background: rgba(237,230,211,.06); }
.log-case { font: calc(22px * var(--ts)) / 1.25 var(--font-body); }
.log-res-main { font: 700 calc(22px * var(--ts)) / 1.25 var(--font-mono); }
.log-res-detail { font: calc(20px * var(--ts)) / 1.3 var(--font-mono); opacity: .8; }
.log-res.safe .log-res-main { color: #6fd3c6; }
.log-res.scratched .log-res-main, .log-res.second .log-res-main { color: var(--amber); }
.log-res.fatal .log-res-main { color: #ff8b80; }
.log-res.open .log-res-main { opacity: .6; }
.office-cert-bar { display: flex; gap: 16px; }
