@font-face {
  font-family:Ari;
  src:url('../assets/fonts/ari-w9500.ttf') format('truetype');
  font-display:swap;
  font-weight:400;
}
@font-face {
  font-family:Ari;
  src:url('../assets/fonts/ari-w9500-bold.ttf') format('truetype');
  font-display:swap;
  font-weight:700;
}
:root {
  color-scheme:dark;
  --bg:#0c0a10;
  --ink:#e7e0ec;
  --muted:#9c8da7;
  --violet:#b89acb;
  --teal:#85c9bd;
  --line:#39303f;
  font-family:Ari,'Courier New',monospace;
  font-synthesis:none;
}
* {
  box-sizing:border-box;
}
[hidden] {
  display:none!important;
}
body {
  margin:0;
  min-height:100svh;
  background:var(--bg);
  color:var(--ink);
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  padding:0;
}
button,input,select {
  font:inherit;
}
button,a,input,select {
  -webkit-tap-highlight-color:transparent;
}
button {
  cursor:pointer;
  color:inherit;
}
button:disabled {
  cursor:not-allowed;
  opacity:.6;
}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible {
  outline:2px solid var(--teal);
  outline-offset:5px;
}
a {
  color:inherit;
}
button {
  border:0;
}
button:active {
  transform:translateY(1px);
}
.hud,.footer {
  width:min(100%,calc((100svh - 110px)*1.777));
  display:flex;
  align-items:center;
  justify-content:space-between;
}
.hud {
  height:56px;
  flex-shrink:0;
  font-size:12px;
  letter-spacing:1px;
  gap:18px;
}
.wordmark {
  text-decoration:none;
  font-weight:700;
  white-space:nowrap;
}
.hud-separator {
  margin:0 13px;
  color:#5e4d6b;
}
.hud-dim {
  font-weight:400;
  color:var(--muted);
}
.session-label {
  font-size:11px;
  color:var(--muted);
  margin-left:auto;
}
.hud-actions {
  display:flex;
  align-items:center;
  gap:18px;
}
.hud-button {
  background:none;
  padding:8px 0;
  font-size:11px;
  color:var(--muted);
  white-space:nowrap;
  letter-spacing:.4px;
}
.hud-button:hover {
  color:var(--ink);
}
.key {
  font-size:10px;
  color:#b5a7be;
  border:1px solid #403647;
  padding:2px 4px;
  margin-left:4px;
}
.footer {
  height:48px;
  font-size:10px;
  color:#75667f;
  letter-spacing:.8px;
  gap:12px;
}
.footer .key {
  margin-left:0;
  margin-right:5px;
}
.footer-dot {
  margin:0 9px;
}
#save-status {
  font-size:9px;
  text-align:right;
}
.stage {
  position:relative;
  width:100%;
  height:100dvh;
  container-type:inline-size;
  isolation:isolate;
  overflow:hidden;
  background:#08090c;
  outline:none;
  border:0;
}
.world,.background,.hotspots,.sprite,.vignette,.ui-art,.title-screen,.end-screen,.fade {
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
}
.world {
  overflow:hidden;
}
.background {
  object-fit:fill;
  transition:filter 1.4s,opacity 1.4s;
  user-select:none;
}
.background.dark {
  filter:brightness(.65);
}
.sprite {
  object-fit:contain;
  pointer-events:none;
  transition:opacity .65s;
  user-select:none;
}
.sprite.vanishing {
  opacity:0;
}
.vignette {
  pointer-events:none;
  box-shadow:inset 0 0 10cqw #0005;
}
.hotspots {
  z-index:2;
}
.hotspot {
  position:absolute;
  background:transparent;
  border:1px solid transparent;
  transition:background .2s,border-color .2s,box-shadow .2s;
}
.hotspot:hover,.hotspot:focus-visible {
  background:#b897d318;
  border-color:#c4a5dd90;
  box-shadow:0 0 20px #b07fd524,inset 0 0 24px #b07fd512;
}
.hotspot span {
  position:absolute;
  left:50%;
  top:8px;
  transform:translateX(-50%);
  padding:5px 8px;
  background:#100b18e8;
  font-size:1.2cqw;
  white-space:nowrap;
  opacity:0;
  pointer-events:none;
}
.hotspot:focus-visible span {
  opacity:1;
}
.hotspot:active { transform:none; }
.hotspot:hover span { opacity:1; }
.hotspot.seen:after {
  content:'·';
  position:absolute;
  right:5px;
  bottom:0;
  color:#b8dfd0;
  font-size:22px;
  text-shadow:0 0 7px #8acec4;
}
.door {
  left:8.6%;
  top:23%;
  width:17.4%;
  height:60%;
}
.glass {
  left:28.2%;
  top:23.4%;
  width:38.5%;
  height:39%;
}
.computer {
  left:75.9%;
  top:42.9%;
  width:17.4%;
  height:27.3%;
  clip-path:polygon(0 0,100% 0,100% 100%,66% 100%,66% 88%,0 88%);
}
.camera {
  left:66.8%;
  top:17.8%;
  width:5.2%;
  height:7%;
}
.table {
  left:47.2%;
  top:63.5%;
  width:52.8%;
  height:16.5%;
  /* Надпись, столешница и клавиатура. Монитор и системный блок исключены. */
  clip-path:polygon(0 20%,24% 0,54% 0,54% 20%,76% 20%,76% 40%,100% 40%,100% 62%,43% 100%,0 36%);
}
.room-hint {
  position:absolute;
  left:4%;
  bottom:4%;
  max-width:92%;
  background:#0c0914f2;
  border-left:2px solid #aa8bc1;
  padding:1cqw 1.4cqw;
  font-size:clamp(13px,1.2cqw,18px);
  color:#cdbfda;
}
.room-heading { display:flex; justify-content:space-between; align-items:center; gap:24px; }
.room-objects { display:flex; gap:8px; margin-top:12px; }
.room-object { display:flex; align-items:center; gap:8px; min-height:40px; padding:8px 12px; border:1px solid #584362; background:#201629; color:#e0d3ea; font-size:clamp(12px,1.05cqw,16px); text-align:left; }
.room-object:hover,.room-object:focus-visible { background:#3b2948; border-color:#c2a1d6; }
.room-object.seen { color:#b6c8c2; border-color:#3e544f; }
.room-object.suggested { border-color:#8cc5b3; box-shadow:inset 0 0 0 1px #8cc5b333; }
.object-key { color:#9785a2; font-size:.8em; }
.object-status { color:var(--teal); margin-left:auto; }
.room-help { font-size:clamp(11px,.85cqw,13px); color:#ac9ab7; margin:10px 0 0; line-height:1.4; }
.continue-note { font-size:clamp(11px,1cqw,15px); color:#a6c7bb; line-height:1.5; overflow-wrap:anywhere; }
.journal-goal { padding:14px 16px; border:1px solid #42685e; background:#132b2a; font-size:15px; line-height:1.6; }
.room-item[aria-pressed=true] { background:#2b5147; border-color:#a3d5b7; }
.session-wait { display:flex; flex-direction:column; justify-content:center; align-items:center; text-align:center; }
.session-countdown { margin:1.2cqw 0 2cqw; color:var(--teal); font-size:clamp(32px,6cqw,84px); font-variant-numeric:tabular-nums; letter-spacing:.08em; }
.session-wait .terminal-caption { max-width:40em; }
.desktop-board { position:relative; height:clamp(260px,22cqw,340px); min-width:0; overflow:hidden; isolation:isolate; border:1px solid #4d7b6c; background:radial-gradient(ellipse at 70% 20%,#1f514633,transparent 65%),#10212b; user-select:none; -webkit-user-select:none; }
.desktop-board::before { content:'SESSION_02'; position:absolute; right:14px; bottom:10px; color:#44655f; font-size:11px; letter-spacing:2px; pointer-events:none; }
.desktop-icon { position:absolute; display:flex; flex-direction:column; align-items:center; justify-content:flex-start; width:96px; height:90px; padding:8px 5px 4px; gap:7px; background:transparent; border:1px solid transparent; color:#dfebe2; font-size:13px; line-height:1.2; touch-action:none; user-select:none; -webkit-user-select:none; cursor:grab; }
.desktop-icon:hover,.desktop-icon:focus-visible { border-color:#9fc8b3; background:#25483e; outline-offset:-3px; }
.desktop-icon:active { transform:none; }
.desktop-icon.dragging { cursor:grabbing; z-index:30!important; border-color:#b9e4c9; background:#2e5348; box-shadow:0 6px 16px #0007; }
.desktop-icon.concealed { visibility:hidden; pointer-events:none; }
.desktop-icon-label { max-width:100%; overflow-wrap:anywhere; text-align:center; }
.desktop-icon-art { position:relative; flex-shrink:0; display:block; width:35px; height:37px; background:#c2d5bf; border:2px solid #8aaa92; box-shadow:2px 2px #061219; }
.icon-text .desktop-icon-art::after { content:'≡'; position:absolute; inset:2px; text-align:center; color:#35594e; font:28px/28px monospace; }
.icon-folder .desktop-icon-art { margin-top:7px; height:30px; background:#c7b382; border-color:#e2cd9c; }
.icon-folder .desktop-icon-art::before { content:''; position:absolute; top:-8px; left:-2px; width:20px; height:7px; border:2px solid #e2cd9c; border-bottom:0; background:#c7b382; }
.icon-computer .desktop-icon-art { height:29px; border:4px solid #b7c8b5; background:#356c5c; margin-bottom:8px; }
.icon-computer .desktop-icon-art::after { content:''; position:absolute; width:23px; height:4px; background:#b7c8b5; left:2px; bottom:-10px; }
.icon-trash .desktop-icon-art { width:26px; height:32px; margin-top:5px; border-color:#a9bbb0; background:repeating-linear-gradient(90deg,#72968a 0 3px,#a7beb1 3px 5px); }
.icon-trash .desktop-icon-art::before { content:''; position:absolute; top:-6px; left:-5px; width:32px; height:4px; background:#b9c7be; }
.desktop-status { margin:8px 0 0; min-height:1.5em; font-size:clamp(12px,1cqw,15px); line-height:1.4; color:#a4bfb1; }
.desktop-file { position:absolute; z-index:20; inset:10px auto 10px 10px; width:calc(100% - 20px); max-width:560px; display:flex; flex-direction:column; background:#10212a; border:1px solid #9aba9c; box-shadow:0 10px 32px #000b; }
.desktop-file-header { display:flex; justify-content:space-between; align-items:center; gap:12px; padding:5px 9px; background:#346851; font-size:14px; color:#e2efda; }
.desktop-file-body { flex:1; min-height:0; overflow:auto; padding:12px 16px; background:#0c1820; user-select:text; -webkit-user-select:text; }
.desktop-file-copy { white-space:pre-wrap; margin:0; font-size:15px; line-height:1.55; }
.desktop-file-caption { margin:0 0 10px; font-size:12px; line-height:1.4; color:#a3b8ad; user-select:none; -webkit-user-select:none; }
.desktop-clue { width:fit-content; max-width:100%; font-family:Ari,monospace; font-size:16px; line-height:1.55; color:#d8e6d7; white-space:pre; user-select:text; -webkit-user-select:text; cursor:text; }
.desktop-clue:focus-visible { outline:1px dashed #8ab6a0; outline-offset:4px; }
.desktop-clue-line,.clue-noise { user-select:text; -webkit-user-select:text; }
.clue-keep { user-select:none; -webkit-user-select:none; }
.desktop-clue::selection,.clue-noise::selection { background:#a2dac0; color:#071a11; }
.clue-keep::selection { background:transparent; color:inherit; }
@media(orientation:portrait) {
  .desktop-icon { width:84px; height:86px; font-size:12px; }
  .desktop-file-body { padding:12px; }
  .desktop-clue { font-size:14px; line-height:1.6; }
  .desktop-board:has(.desktop-file:not([hidden])) { height:360px; }
  .desktop-file-header .small-close { min-width:36px; min-height:36px; }
}
.room-hint #seen-count {
  color:var(--teal);
}
.camera-event {
  position:absolute;
  inset:0;
  pointer-events:none;
  animation:camera-turn .9s ease-in-out;
}
.camera-event img { width:100%; height:100%; object-fit:fill; }
@keyframes camera-turn {
  from { opacity:0; }
  to { opacity:1; }
}
.title-screen {
  z-index:10;
  background:linear-gradient(90deg,#07070ce8 0%,#0b0810bb 36%,#0c071147 70%,#08070d40);
  display:flex;
  align-items:center;
}
.title-content {
  margin-left:9.5%;
  width:76%;
}
.eyebrow {
  display:flex;
  align-items:center;
  gap:10px;
  font-size:1.04cqw;
  letter-spacing:.22cqw;
  color:#b5a3c3;
}
.eyebrow i {
  display:inline-block;
  width:6px;
  height:6px;
  background:var(--teal);
  box-shadow:0 0 12px #85c9bd70;
}
.title-content h1 {
  font-weight:400;
  font-size:10cqw;
  line-height:1;
  margin:3.2cqw 0 1.4cqw;
  letter-spacing:-.45cqw;
  text-shadow:3px 0 #9160b53d;
}
.title-period {
  color:var(--teal);
}
.act-title {
  font-size:1.4cqw;
  letter-spacing:.25cqw;
  color:#c9b8d7;
}
.act-title span {
  margin:0 1cqw;
  color:#665474;
}
.title-rule {
  width:4.5cqw;
  height:1px;
  background:#8e6da6;
  margin:2.7cqw 0 2cqw;
}
.title-whisper {
  font-size:1.65cqw;
  color:#a192ac;
  margin:0 0 3.8cqw;
}
.title-actions {
  display:flex;
  align-items:flex-start;
  flex-direction:column;
  gap:12px;
}
.primary-button {
  min-width:20cqw;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:30px;
  padding:1.25cqw 1.7cqw;
  border:1px solid #78b3a6;
  background:#2b5349e8;
  box-shadow:inset 1px 1px #b1e3d62b,inset -1px -1px #0c211e;
  font-size:1.45cqw;
  text-align:left;
  color:#e0f5ee;
  transition:background .2s,box-shadow .2s;
}
.primary-button:hover {
  background:#3d6d61;
  box-shadow:0 0 30px #6ab6a518;
}
.primary-button span {
  color:#aad9c9;
}
#new-game.secondary-start {
  background:transparent;
  box-shadow:none;
  border:0;
  padding-left:0;
  min-width:0;
  color:#a795b4;
  font-size:1.1cqw;
}
#new-game.secondary-start span {
  display:none;
}
.title-note {
  font-size:.85cqw;
  letter-spacing:.12cqw;
  color:#6e6179;
  margin-top:2cqw;
}
.title-corner {
  position:absolute;
  right:4%;
  bottom:5%;
  font-size:.8cqw;
  line-height:1.8;
  color:#ad92bd;
  opacity:.65;
  text-align:right;
  letter-spacing:.12cqw;
}
.signal-line {
  display:block;
  margin-top:8px;
  height:3px;
  width:9cqw;
  margin-left:auto;
  background:repeating-linear-gradient(90deg,#9c7cbb 0 2px,transparent 2px 5px);
}
.ui-art {
  pointer-events:none;
  z-index:5;
  user-select:none;
}
.dialogue {
  position:absolute;
  z-index:6;
  left:7.08%;
  top:64.35%;
  width:86.83%;
  height:28.33%;
  padding:0 1.2cqw;
  cursor:pointer;
}
.speaker {
  position:absolute;
  left:.55cqw;
  top:.15cqw;
  height:1.8cqw;
  display:flex;
  align-items:center;
  color:#e2f5ec;
  font-size:1.25cqw;
  line-height:1.2;
}
.dialogue-text {
  margin:0;
  position:absolute;
  top:4.4cqw;
  left:1.8cqw;
  right:2cqw;
  font-size:1.85cqw;
  line-height:1.55;
  max-height:9cqw;
  overflow:auto;
  color:#e2e6df;
  text-shadow:1px 1px #000;
  white-space:pre-wrap;
}
.dialogue-next {
  position:absolute;
  right:0;
  bottom:0;
  width:auto;
  height:3cqw;
  display:flex;
  align-items:flex-end;
  justify-content:flex-end;
  background:transparent;
  color:#90b4ac;
  font-size:.92cqw;
  letter-spacing:.1cqw;
  padding:0 1.9cqw 1.4cqw;
}
.dialogue-next span {
  margin-left:10px;
  color:#b3d8c7;
}
.dialogue-next:hover {
  color:#fff;
}
.choices {
  position:absolute;
  inset:0;
  z-index:7;
  pointer-events:none;
}
.choice-button {
  position:absolute;
  left:64.03%;
  width:29.88%;
  height:4.63%;
  background:transparent;
  color:#e5eade;
  font-size:1.35cqw;
  text-align:left;
  padding:0 1.3cqw;
  pointer-events:auto;
}
.choice-button:nth-child(1) {
  top:49%;
}
.choice-button:nth-child(2) {
  top:53.63%;
}
.choice-button:nth-child(3) {
  top:58.26%;
}
.choice-button:hover,.choice-button:focus-visible {
  background:#24483f;
  color:#f2f8ef;
}
.choice-button:active { transform:none; background:#315c4d; color:#fff; }
.choice-button .choice-key {
  color:#83b6ae;
  margin-right:.8cqw;
  font-size:.9cqw;
}
.monitor {
  position:absolute;
  inset:0;
  z-index:3;
  background:#0b1118;
}
.monitor>img {
  position:absolute;
  top:0;
  left:0;
  width:100%;
  height:78%;
  object-fit:contain;
}
.monitor.with-dialogue>img {
  height:64%;
}
.monitor-tray {
  position:absolute;
  left:16%;
  right:16%;
  bottom:4%;
  padding:1.25cqw 1.5cqw;
  border:1px solid #43605e;
  background:#0e1b23;
  box-shadow:inset 1px 1px #74958a22;
  font-size:1.35cqw;
}
.monitor-tray p {
  margin:0 0 1cqw;
  line-height:1.4;
  overflow-wrap:anywhere;
}
.monitor-tray .form-message {
  margin:.8cqw 0 0;
  font-size:1.05cqw;
  color:#cdb5d5;
  min-height:1.3em;
}
.nickname-form label,.terminal-label {
  font-size:1cqw;
  letter-spacing:.14cqw;
  color:#87b6a7;
}
.input-row {
  display:flex;
  gap:1cqw;
  align-items:center;
  margin-top:.65cqw;
}
.input-row>span {
  color:var(--teal);
}
.input-row input {
  min-width:0;
  flex:1;
  border:0;
  border-bottom:1px solid #7fada0;
  border-radius:0;
  background:transparent;
  padding:.7cqw 0;
  color:#e8f3e8;
  font-size:1.7cqw;
  caret-color:var(--teal);
}
.input-row input::placeholder {
  color:#627e7c;
}
.input-row input:focus {
  outline:none;
  border-bottom-color:#c1f6db;
}
.system-button {
  background:#22483f;
  border:1px solid #658d7d;
  padding:.7cqw 1cqw;
  font-size:1.2cqw;
  color:#e0f0e2;
  white-space:nowrap;
}
.system-button:hover {
  background:#356254;
}
.result-actions {
  display:flex;
  justify-content:flex-end;
  gap:12px;
}
.lookup-result {
  max-height:25%;
  overflow:auto;
}
.window-close {
  position:absolute;
  z-index:4;
  right:2%;
  top:3%;
  background:#1c2630;
  color:#ccc;
  border:1px solid #607978;
  font-size:2cqw;
  width:3cqw;
  height:3cqw;
}
.end-screen {
  z-index:9;
  background:radial-gradient(ellipse at 50% 20%,#271c3380,transparent 70%),#0a080ef8;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-align:center;
}
.end-screen h2 {
  font-size:3.4cqw;
  font-weight:400;
  margin:3cqw 0 1.5cqw;
  color:#e7dfef;
}
.end-screen>p {
  font-size:1.5cqw;
  color:#bba7c7;
}
.end-screen .end-note {
  font-size:1.1cqw;
  color:#82718e;
}
.end-actions {
  display:flex;
  align-items:center;
  gap:22px;
  margin-top:2cqw;
}
.text-button {
  background:transparent;
  border-bottom:1px solid #5d476d;
  padding:.7cqw 0;
  font-size:1.2cqw;
  color:#ae9abb;
}
.text-button:hover {
  color:white;
  border-color:#c3a3d7;
}
.fade {
  background:#000;
  z-index:12;
  pointer-events:none;
  animation:wake 2.2s ease-out forwards;
}
@keyframes wake {
  0%,20% {
    opacity:1;
  }
  100% {
    opacity:0;
  }
}
.toast {
  position:absolute;
  left:50%;
  bottom:3%;
  transform:translateX(-50%);
  z-index:20;
  padding:12px 18px;
  background:#1a1124;
  border:1px solid #8c6ca8;
  font-size:14px;
  text-align:center;
}
.noscript {
  position:absolute;
  inset:0;
  background:#100c17;
  padding:60px;
  z-index:50;
}
.settings {
  padding:0;
  width:min(480px,90vw);
  max-height:90svh;
  background:#101820;
  border:1px solid #7f9e95;
  color:var(--ink);
  box-shadow:0 24px 100px #000b;
  font-size:16px;
}
.settings::backdrop {
  background:#06040bd9;
  backdrop-filter:blur(4px);
}
.settings-header {
  display:flex;
  align-items:center;
  justify-content:space-between;
  background:linear-gradient(90deg,#28594f,#316653);
  padding:6px 10px;
  font-size:13px;
  color:#e1eee5;
}
.small-close {
  border:1px solid #9aa69a;
  box-shadow:inset 1px 1px #e0e7d044;
  background:#617b70;
  font-size:20px;
  line-height:20px;
  padding:0 5px;
}
.settings-body {
  padding:26px;
}
.settings h2 {
  font-size:28px;
  font-weight:400;
  margin:0 0 24px;
}
.setting-row {
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin:20px 0;
  gap:20px;
}
.setting-row input[type=range] {
  width:160px;
  accent-color:#85c9bd;
}
.setting-row input[type=checkbox] {
  accent-color:#85c9bd;
  width:18px;
  height:18px;
}
.setting-row select {
  background:#0a1016;
  color:#c9e1d6;
  border:1px solid #45665d;
  padding:5px;
}
.settings-help {
  color:#a798b4;
  font-size:14px;
  line-height:1.6;
  border-top:1px solid #34303e;
  padding-top:16px;
}
.settings-actions {
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:12px;
  margin:24px 0;
}
.settings .primary-button,.settings .text-button {
  font-size:16px;
  padding:12px 16px;
  min-width:180px;
}
.settings .text-button {
  padding:6px 0;
  min-width:0;
}
.credits {
  font-size:11px;
  color:#6f7c82;
  line-height:1.6;
  margin-bottom:0;
}
.confirm p {
  line-height:1.6;
  color:#a798b4;
}
.confirm .end-actions {
  margin-top:20px;
  flex-wrap:wrap;
}
.reduced-motion *, .reduced-motion *::after {
  animation:none!important;
  transition:none!important;
  scroll-behavior:auto!important;
}
.sprite.fullbody {
  clip-path:polygon(28.5% 24%,65.8% 27.8%,65.8% 59.4%,28.5% 63.2%);
}

/* Окна остальных сеансов продолжают оформление исходного диалога. */
.scene-context { position:absolute; z-index:8; left:3%; top:3%; color:#a5c5bd; font-size:.85cqw; letter-spacing:.1cqw; pointer-events:none; text-shadow:0 1px 4px #000; }
.scene-readout { position:absolute; z-index:3; top:12%; left:5%; max-width:38%; padding:1.2cqw; background:#09191eee; border:1px solid #528171; color:#b5d6c0; font:1.05cqw/1.6 Ari,monospace; white-space:pre-wrap; overflow-wrap:anywhere; }
.game-tools { display:flex; align-items:center; gap:18px; }
.game-tools .hud-button { font-size:10px; }
.workstation { position:absolute; z-index:4; inset:8% 6% 7%; }
.desktop-window { height:100%; display:flex; flex-direction:column; border:clamp(10px,1.6cqw,26px) solid transparent; border-image:url('../assets/pc_frame.png') 40 stretch; background:#0e1b23f7; box-shadow:0 14px 70px #000b; }
.app-title { flex-shrink:0; font-size:1.3cqw; font-weight:400; margin:0; padding:.65cqw 1cqw; color:#e4f2dc; background:linear-gradient(90deg,#2a6456,#326b56); border-bottom:1px solid #071b17; }
.app-content { flex:1; min-height:0; overflow:auto; padding:1.8cqw 2.2cqw; scrollbar-color:#598477 #101820; }
.terminal-copy { white-space:pre-wrap; overflow-wrap:anywhere; font-size:1.55cqw; line-height:1.55; margin:0 0 1.2em; color:#d5e2d8; }
.terminal-caption { white-space:pre-wrap; font-size:1.02cqw; line-height:1.5; color:#8eaaa3; }
.app-actions { flex-shrink:0; display:flex; flex-wrap:wrap; justify-content:flex-end; gap:1cqw; padding:1cqw 1.6cqw; border-top:1px solid #3c5555; background:#102129; }
.room-grid,.source-grid { display:grid; grid-template-columns:31% 1fr; gap:1.5cqw; min-height:17cqw; }
.room-list,.source-list { display:flex; flex-direction:column; gap:.65cqw; }
.room-item,.source-button { font-size:1.3cqw; text-align:left; line-height:1.4; border:1px solid #47665f; padding:.8cqw; color:#cce2d6; background:#142c30; }
.room-item:hover,.source-button:hover { background:#285246; }
.room-detail,.fragment-view { padding:1.2cqw; background:#09161c; border:1px solid #2c4547; }
.room-detail .terminal-copy { margin-top:1cqw; }
.history-row { font-size:1.35cqw; color:#d5e2d8; line-height:1.6; border-bottom:1px solid #304346; padding-bottom:.7em; }
.puzzle-form { display:flex; flex-wrap:wrap; align-items:center; gap:.8cqw; margin-top:1.8cqw; }
.puzzle-form label { width:100%; }
.puzzle-input { min-width:0; flex:1; border:1px solid #598477; padding:.8cqw; font-size:1.6cqw; background:#071218; color:#e8f4de; letter-spacing:.15em; }
.puzzle-input[aria-invalid=true] { border-color:#d1a2ad; }
.puzzle-message { width:100%; min-height:1.4em; font-size:1.15cqw; color:#d3b2c1; line-height:1.4; margin:0; }
.sequence-controls { display:flex; flex-wrap:wrap; gap:.8cqw; }
.choices { inset:auto 6% 37% 46%; display:flex; flex-direction:column; gap:.6cqw; pointer-events:none; }
.choice-button { position:static; width:100%; height:auto; min-height:3.3cqw; padding:.7cqw 1.1cqw; background:#0e1b23; border:1px solid #7b9f90; box-shadow:inset 1px 1px #b1ccb822; font-size:1.4cqw; line-height:1.35; pointer-events:auto; }
.room-return { position:absolute; z-index:9; right:3%; top:2%; }
.stage:has(.room-return:not([hidden])) .scene-context { max-width:50%; }
.choice-art { display:none; }
.ending-gallery { display:grid; grid-template-columns:1fr 1fr; gap:1cqw 3cqw; list-style:none; padding:0; margin:1.5cqw 0; color:#6e6578; font-size:1cqw; }
.ending-gallery .found-ending { color:#a5d6bc; }
.end-screen .end-actions { gap:2cqw; }
.end-screen .primary-button { font-size:1.3cqw; min-width:0; }
.import-label { cursor:pointer; }
.file-input { position:absolute; width:1px; height:1px; margin:-1px; padding:0; border:0; overflow:hidden; clip:rect(0,0,0,0); clip-path:inset(50%); white-space:nowrap; opacity:0; }
.file-input:focus-visible { position:static; width:auto; height:auto; margin:0; overflow:visible; clip:auto; clip-path:none; white-space:normal; opacity:1; }
.journal { width:min(760px,92vw); }
.journal h3 { color:#a9cdbc; font-size:16px; margin:10px 0 24px; font-weight:400; }
.journal-line { font-size:15px; line-height:1.6; padding:8px 0; border-bottom:1px solid #263c3b; overflow-wrap:anywhere; }
.journal-clue { border-left:2px solid #76b799; padding-left:12px; font-size:14px; line-height:1.6; }
.journal .terminal-caption { font-size:14px; }
.tape-dialog { width:min(650px,94vw); }
.tape-list { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.tape-track { text-align:left; padding:12px; font-size:16px; border:1px solid #4e7068; background:#172e30; color:#cce4d3; }
.tape-track:hover,.tape-track.active { border-color:#a3d5b7; background:#2b5449; }
#tape-status { font-size:14px; color:#98b7a9; min-height:2em; }
#tape-progress { width:100%; height:5px; accent-color:#8dc6a6; }
.tape-controls { display:flex; gap:12px; margin:18px 0; }
.tape-controls .system-button { font-size:15px; padding:10px 20px; }
.tape-conversation { display:flex; gap:16px; min-height:150px; border-top:1px solid #355048; padding-top:16px; }
#tape-portrait { width:150px; height:150px; object-fit:cover; object-position:center; }
#tape-reaction { flex:1; font-size:16px; line-height:1.5; }
#tape-reaction .terminal-label { font-size:13px; }
#tape-reaction p { margin:8px 0; }
.stage[data-act="3"] .background { filter:brightness(.88); }
.stage[data-act="4"] .background { filter:brightness(.72) saturate(.8); }
.stage[data-act="5"] .background { filter:brightness(.9) sepia(.1); }

@media(max-width:850px) and (orientation:landscape) {
  .app-title { font-size:12px; }
  .terminal-copy { font-size:14px; }
  .terminal-caption,.puzzle-message { font-size:11px; }
  .room-item,.source-button,.history-row,.app-actions .system-button { font-size:12px; }
  .game-tools .key,#save-status { display:none; }
}
@media(orientation:portrait) {
  .scene-context { font-size:9px; top:12px; left:5%; }
  .footer { flex-wrap:wrap; height:74px; gap:6px; justify-content:space-between; align-content:center; }
  .footer #save-status { display:none; }
  .game-tools { gap:14px; }
  .game-tools .key { display:none; }
  .workstation { inset:calc(56.28cqw + 14px) 3% 15px; }
  .desktop-window { border-width:10px; }
  .app-title { font-size:13px; line-height:1.4; padding:10px 12px; }
  .app-content { padding:18px 14px; }
  .terminal-copy { font-size:16px; line-height:1.5; }
  .terminal-caption,.puzzle-message { font-size:12px; }
  .app-actions { padding:12px; gap:14px; }
  .room-grid,.source-grid { grid-template-columns:1fr; gap:14px; min-height:0; }
  .room-list { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
  .room-item,.source-button { padding:10px; font-size:14px; min-height:42px; }
  .room-detail,.fragment-view { padding:14px; }
  .room-detail .terminal-label,.puzzle-form .terminal-label { font-size:12px; }
  .history-row { font-size:15px; }
  .puzzle-form { gap:12px; margin-top:20px; }
  .puzzle-input { font-size:17px; padding:10px; width:100%; flex-basis:100%; }
  .sequence-controls { gap:8px; }
  .sequence-controls .system-button { font-size:14px; padding:8px 12px; }
  .choices { inset:auto 4% auto; top:calc(56.28cqw + 222px); gap:8px; }
  .choice-button { font-size:16px; min-height:44px; padding:10px 14px; }
  .ending-gallery { font-size:11px; gap:14px; margin:14px 0; }
  .end-screen .primary-button { font-size:15px; }
  .end-screen .end-actions { gap:16px; margin-top:16px; }
  .end-screen h2 { font-size:26px; margin:22px 0 12px; }
  .end-screen .eyebrow { font-size:10px; }
  .tape-list { grid-template-columns:1fr; }
  #tape-portrait { display:none; }
}
@media(max-width:850px) and (orientation:landscape) {
  body {
    padding:0;
  }
  .hud {
    height:38px;
  }
  .footer {
    height:28px;
  }
  .hud,.footer {
    width:min(100%,calc((100svh - 72px)*1.777));
  }
  .hud-actions {
    gap:12px;
  }
  .session-label {
    display:none;
  }
  .footer {
    font-size:9px;
  }
  .footer #save-status {
    font-size:8px;
  }
  .key {
    display:none;
  }
  .dialogue-text {
    font-size:max(12px,1.85cqw);
    max-height:10cqw;
  }
  .choice-button {
    font-size:max(11px,1.35cqw);
  }
}
@media(orientation:portrait) {
  body {
    padding:0;
    justify-content:flex-start;
  }
  .hud,.footer,.stage {
    width:100%;
  }
  .hud {
    height:60px;
    gap:8px;
    font-size:11px;
  }
  .hud-separator {
    margin:0 8px;
  }
  .hud-actions {
    gap:14px;
  }
  .hud-button {
    font-size:10px;
  }
  .session-label,.hud .key {
    display:none;
  }
  .footer {
    height:46px;
    font-size:9px;
    align-items:center;
  }
  .footer #save-status {
    max-width:110px;
    font-size:8px;
  }
  .footer .key {
    font-size:9px;
  }
  .stage {
    aspect-ratio:auto;
    height:max(100dvh,calc(56.28vw + 520px));
    min-height:0;
    max-height:none;
  }
  .world {
    height:56.28cqw;
    bottom:auto;
  }
  .hotspot span {
    font-size:12px;
  }
  .room-hint {
    top:calc(56.28cqw + 24px);
    left:6%;
    right:6%;
    bottom:auto;
    justify-content:space-between;
    font-size:16px;
    padding:16px;
  }
  .room-objects { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
  .room-object { font-size:15px; min-height:46px; padding:10px; }
  .room-object:last-child { grid-column:1 / -1; }
  .object-key { display:none; }
  .room-help { font-size:12px; }
  .title-screen {
    background:linear-gradient(0deg,#0c0912 20%,#0c0912e8 60%,#0c091233);
    align-items:flex-end;
    padding-bottom:70px;
  }
  .title-content {
    margin-left:8%;
    width:85%;
  }
  .eyebrow {
    font-size:11px;
    letter-spacing:2px;
  }
  .title-content h1 {
    font-size:17cqw;
    margin:26px 0 18px;
    letter-spacing:-.8cqw;
  }
  .act-title {
    font-size:13px;
    letter-spacing:1.6px;
  }
  .title-rule {
    width:45px;
    margin:25px 0;
  }
  .title-whisper {
    font-size:17px;
    margin-bottom:32px;
  }
  .primary-button {
    min-width:230px;
    padding:16px 18px;
    font-size:17px;
  }
  #new-game.secondary-start {
    font-size:14px;
    padding-top:8px;
  }
  .title-note {
    font-size:9px;
    letter-spacing:1px;
    margin-top:22px;
  }
  .title-corner {
    font-size:8px;
    right:6%;
    bottom:20px;
  }
  .signal-line {
    width:75px;
  }
  .ui-art {
    display:none;
  }
  .dialogue {
    left:4%;
    width:92%;
    top:calc(56.28cqw + 18px);
    height:190px;
    background:#0e1b23;
    border:1px solid #64877c;
    box-shadow:inset 1px 1px #bacdb32b;
  }
  .speaker {
    left:0;
    top:0;
    width:100%;
    height:32px;
    background:linear-gradient(90deg,#2a6456,#326b56);
    padding:7px 12px;
    font-size:14px;
    line-height:18px;
  }
  .dialogue-text {
    left:16px;
    right:16px;
    top:53px;
    font-size:18px;
    line-height:1.5;
    max-height:100px;
  }
  .dialogue-next {
    font-size:11px;
    padding:0 17px 15px;
    height:38px;
  }
  .choices {
    inset:auto 4% auto;
    top:calc(56.28cqw + 222px);
    display:flex;
    flex-direction:column;
    gap:8px;
  }
  .choice-button {
    position:static;
    width:100%;
    height:auto;
    min-height:44px;
    padding:10px 14px;
    font-size:16px;
    background:#0e1b23;
    border:1px solid #64877c;
  }
  .choice-button .choice-key {
    font-size:12px;
    margin-right:14px;
  }
  .monitor>img,.monitor.with-dialogue>img {
    height:56.28cqw;
  }
  .monitor-tray {
    left:4%;
    right:4%;
    bottom:auto;
    top:calc(56.28cqw + 18px);
    padding:18px;
    font-size:16px;
  }
  .nickname-form label,.terminal-label {
    font-size:12px;
    letter-spacing:1px;
  }
  .input-row {
    gap:10px;
    margin-top:10px;
    flex-wrap:wrap;
  }
  .input-row input {
    font-size:18px;
    padding:10px 0;
    width:70%;
  }
  .system-button {
    font-size:15px;
    padding:10px 14px;
  }
  .input-row .system-button {
    width:100%;
    margin-top:10px;
  }
  .monitor-tray .form-message {
    font-size:13px;
    margin-top:12px;
  }
  .monitor-tray p {
    margin-bottom:14px;
  }
  .lookup-result {
    max-height:280px;
  }
  .result-actions {
    flex-wrap:wrap;
  }
  .window-close {
    font-size:24px;
    width:32px;
    height:32px;
    right:3%;
    top:12px;
  }
  .end-screen {
    padding:24px;
  }
  .end-screen h2 {
    font-size:29px;
    line-height:1.4;
    margin:32px 0 20px;
  }
  .end-screen>p {
    font-size:16px;
  }
  .end-screen .end-note {
    font-size:13px;
  }
  .end-actions {
    flex-direction:column;
    gap:20px;
    margin-top:30px;
  }
  .text-button {
    font-size:15px;
    padding:8px 0;
  }
  .camera-event:after {
    width:2px;
    height:2px;
  }
  .toast {
    font-size:12px;
    width:85%;
  }
  .settings-body {
    padding:22px;
  }
  .settings .end-actions {
    align-items:flex-start;
  }
}

@media(pointer:coarse) {
  .hud-button { min-height:44px; padding:10px 5px; }
  .small-close,.window-close { min-width:44px; min-height:44px; }
  .hotspot span { display:none; }
}

/* Телефон и виртуальная комната из исправленного сценария. */
.phone-preview { display:block; position:relative; width:min(100%,600px); margin:0 auto 12px; padding:0; border:1px solid #42665b; background:#122c20; }
.phone-preview img { display:block; width:100%; height:auto; }
.phone-preview>span { display:block; padding:10px; background:#10271f; font-size:14px; }
.phone-dialog { position:fixed; inset:0; width:100vw; height:100dvh; max-width:none; max-height:none; margin:0; padding:0; border:0; overflow:hidden; background:#183b25; }
.phone-dialog .settings-header { position:absolute; z-index:3; inset:0 0 auto; gap:12px; padding:8px 16px; background:linear-gradient(#0b2118ee,#0b211899); }
.phone-dialog .small-close { flex-shrink:0; min-height:44px; padding:6px 12px; font-size:14px; }
.phone-body { position:absolute; inset:64px 0 0; overflow:hidden; }
.phone-dialog .phone { position:absolute; left:50%; top:50%; width:min(100vw,calc((100dvh - 64px) * 16 / 9)); aspect-ratio:16/9; transform:translate(-50%,-50%); container-type:inline-size; }
.phone-art { display:block; width:100%; height:100%; max-width:none; }
.phone-chats { position:absolute; inset:0; }
.phone-chat { position:absolute; left:38.1%; top:calc(25.5% + var(--phone-row) * 7.65%); width:22.1%; height:7.5%; padding:0; border:1px solid transparent; background:transparent; text-align:left; }
.phone-chat span { display:block; position:absolute; left:18%; right:3%; top:12%; padding:0 3px; color:#d1e5d9; background:#030a06; font-size:clamp(8px,.95cqw,18px); line-height:1.3; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.phone-chat:first-child span { opacity:0; }
.phone-chat:is(:hover,:focus-visible) { border-color:#a4ceb0; background:#42735733; }
.phone-chat:first-child:is(:hover,:focus-visible) span { opacity:1; }
.phone-thread { position:absolute; left:37.6%; top:11%; width:22.8%; height:82%; padding:clamp(10px,1cqw,20px); min-width:0; overflow:auto; background:#030a06; border-radius:0 0 7% 7%; }
.phone-back { display:block; min-height:44px; padding:6px; margin:0 0 12px; font-size:clamp(12px,1cqw,18px); color:#b9dbc1; background:#123323; }
.phone-thread h3 { font-size:clamp(14px,1.1cqw,20px); overflow-wrap:anywhere; margin:0 0 20px; }
.phone-thread .terminal-copy,.phone-thread .terminal-label { font-size:clamp(13px,1cqw,18px); }
.phone-outgoing { margin:24px 0 4px; padding:14px; border-radius:12px 12px 0 12px; background:#2d534c; font-size:clamp(13px,1cqw,18px); overflow-wrap:anywhere; }
.phone-read { text-align:right; font-size:12px; color:#9cb5af; }
.phone-cipher { letter-spacing:2px; font-size:clamp(18px,1.6cqw,30px); padding:20px 0; overflow-wrap:anywhere; user-select:text; -webkit-user-select:text; }
@media(orientation:portrait) {
  .phone-dialog .phone { width:min(380vw,calc((100dvh - 64px) * 16 / 9)); transform:translate(-48.85%,-50%); }
  .phone-dialog .settings-header { font-size:12px; padding:8px; }
}
.selection-file,.selection-file span { user-select:text; -webkit-user-select:text; }
.selection-secret { color:transparent; }
.selection-secret::selection { color:#122b25; background:#c2e8bd; }
.virtual-room { position:relative; min-height:210px; margin-bottom:20px; border:1px solid #487064; background:linear-gradient(160deg,#1a3034 0 65%,#284040 65%); }
.virtual-object { position:absolute; padding:10px; border:2px solid #789184; background:#1a2b31; font-size:12px; max-width:35%; }
.virtual-chairs { bottom:12px; left:10%; width:30%; height:60px; border-radius:15px 15px 0 0; }
.virtual-table { bottom:18px; left:47%; width:28%; }
.virtual-computer { bottom:68px; left:51%; width:21%; }
.virtual-photo { left:12%; top:12px; height:94px; width:80px; padding:3px; font-size:9px; }
.virtual-photo img { display:block; height:65px; width:100%; object-fit:cover; }
.virtual-frame { right:13%; top:12px; width:90px; height:70px; border:5px double #a48f73; }
.tape-deck { position:relative; margin-bottom:16px; }
.tape-deck img { display:block; width:100%; max-height:215px; object-fit:cover; border:1px solid var(--line); }
.tape-deck[data-loaded=false] img { filter:saturate(.4); }
.tape-loaded { display:block; padding:10px; background:#152a29; color:#c6e0d0; font-size:13px; border:1px solid #46665b; }
.cassette-letter { display:block; margin-top:8px; letter-spacing:3px; font-size:19px; color:#ead2ab; }
.tape-controls { flex-wrap:wrap; }
.end-links { display:flex; justify-content:center; flex-wrap:wrap; gap:12px; margin:12px 0; }
.end-links a { text-decoration:none; }
.ending-frame { margin:10px auto!important; width:180px; min-height:50px; padding:12px; border:5px double #a48f73; font-size:14px!important; overflow-wrap:anywhere; }
.ending-frame[data-state=truth] { border-color:transparent; color:var(--muted); }
@media(max-width:480px) {
  .tape-controls .system-button { padding:10px; }
  .virtual-object { font-size:10px; }
}
@media(max-width:850px) and (orientation:landscape) {
  .room-hint { padding:8px 12px; bottom:3%; }
  .room-heading { font-size:12px; }
  .room-objects { margin-top:6px; gap:6px; }
  .room-object { min-height:32px; padding:6px 8px; font-size:11px; }
  .object-key,.room-help { display:none; }
}

/* Управление живёт в компьютере; игровая сцена занимает всё окно. */
@media(orientation:landscape) {
  body { overflow:hidden; }
  .world {
    inset:50% auto auto 50%;
    width:max(100vw,177.6833dvh);
    height:max(100dvh,56.2799vw);
    transform:translate(-50%,-50%);
  }
}
.computer-system { z-index:3; left:86.5%; top:60%; width:6.7%; height:10%; clip-path:none; }
.computer-system span { top:40%; font-size:clamp(11px,1cqw,18px); }
.computer-access { position:absolute; z-index:12; top:2%; left:3%; padding:8px 12px; background:#132b2ae8; border:1px solid #6d9b87; font-size:clamp(12px,1cqw,17px); }
.stage:has(#computer-toggle:not([hidden])) .scene-context { left:calc(3% + clamp(110px,11cqw,170px)); }
.computer-dialog { width:min(900px,96vw); border:clamp(12px,1.6vw,26px) solid transparent; border-image:url('../assets/pc_frame.png') 40 stretch; box-shadow:0 18px 100px #000d; }
.computer-screen { min-height:320px; padding:22px; background:radial-gradient(ellipse at center,#173e35,#071b1d); }
.computer-dialog .hud { width:100%; height:auto; flex-wrap:wrap; padding-bottom:20px; border-bottom:1px solid #4c6b5a; }
.computer-dialog .hud-actions { gap:18px; }
.computer-dialog .hud-button { color:#c4dfcd; font-size:13px; }
.computer-dialog .session-label { color:#a2c9b5; min-width:0; max-width:100%; overflow-wrap:anywhere; }
.computer-apps { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; margin:28px 0; }
.computer-app { min-height:120px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:10px; padding:16px 8px; background:#102b2c; border:1px solid #577e68; font-size:14px; }
.computer-app>span { font-size:36px; color:#b1d9bf; }
.computer-app small { color:#85a89a; }
.computer-app:hover,.computer-app:focus-visible { background:#254f41; border-color:#b1d9bf; }
.computer-help,.computer-status { font-size:12px; color:#9fbcae; line-height:1.5; }
.computer-status { display:flex; flex-wrap:wrap; justify-content:space-between; gap:16px; padding-top:16px; border-top:1px solid #4c6b5a; }
.tape-dialog { position:fixed; inset:0; width:100vw; height:100dvh; max-width:none; max-height:none; min-width:0; margin:0; padding:0; border:0; overflow:hidden; background:#071410; box-shadow:none; }
.tape-dialog .settings-header { position:absolute; inset:0 0 auto; z-index:3; background:linear-gradient(#071410f2,#07141099); gap:12px; padding:10px 16px; }
.tape-dialog .small-close { flex-shrink:0; min-height:36px; padding:6px 12px; background:#17352bd9; font-size:14px; }
.tape-body { position:absolute; inset:0; overflow:hidden; display:flex; flex-direction:column; justify-content:flex-end; align-items:flex-start; gap:8px; padding:0 16px 12px; }
.tape-body::before { content:''; position:absolute; inset:-30px; background:url('../assets/cass.png') center/cover; filter:blur(22px) brightness(.35); }
/* Весь рисунок виден: стопка справа и верхние клавиши не обрезаются. */
.tape-deck { position:absolute; left:50%; top:50%; width:min(100vw,177.6833dvh); height:min(100dvh,56.2799vw); transform:translate(-50%,-50%); margin:0; }
.tape-deck img { max-height:none; width:100%; height:100%; object-fit:fill; border:0; }
.tape-deck[data-loaded=false] img { filter:none; }
.tape-list { position:absolute; inset:0; display:block; }
.tape-track { position:absolute; left:71.5%; width:21.5%; display:flex; flex-direction:column; justify-content:flex-end; align-items:center; gap:0; padding:0; background:transparent; border:1px solid transparent; color:#e0ecd8; }
.tape-track:hover,.tape-track.active,.tape-track:focus-visible { background:#a0d1ac1a; border-color:#c4e2bc; }
.tape-track[data-slot="0"] { top:51%; height:19%; }
.tape-track[data-slot="1"] { top:70%; height:7%; }
.tape-track[data-slot="2"] { top:77%; height:6.5%; }
.tape-track[data-slot="3"] { top:83.5%; height:6.5%; }
.tape-track[data-slot="4"] { top:90%; height:6%; }
.tape-deck[data-loaded=true] .tape-track[data-slot="0"] { top:56%; height:18%; }
.tape-deck[data-loaded=true] .tape-track[data-slot="1"] { top:74%; height:7%; }
.tape-deck[data-loaded=true] .tape-track[data-slot="2"] { top:81%; height:7%; }
.tape-deck[data-loaded=true] .tape-track[data-slot="3"] { top:88%; height:7%; }
.tape-track.in-deck { left:31%; top:49%; width:16%; height:19%; }
.cassette-name { position:absolute; bottom:100%; max-width:100%; padding:3px 5px; background:#071410ed; font-size:clamp(9px,1.2vw,14px); line-height:1.25; overflow-wrap:anywhere; opacity:0; pointer-events:none; }
.tape-track:hover .cassette-name,.tape-track:focus-visible .cassette-name { opacity:1; }
.cassette-letter { margin:0; padding:0 4px; background:#071410e6; font-size:clamp(8px,1.1vw,15px); letter-spacing:1px; line-height:1.2; }
.deck-key { position:absolute; top:24%; width:4.5%; height:5%; min-width:24px; min-height:24px; padding:0; background:#264638d9; border:1px solid #b0ccac; font-size:clamp(12px,1.6vw,23px); line-height:1; color:#e1efdb; }
.deck-key:hover { background:#52785d; }
.deck-pause { left:34%; }
.deck-stop { left:44%; }
.tape-readout { position:relative; z-index:2; order:2; flex-shrink:0; display:flex; align-items:center; gap:12px; max-width:min(65vw,115.5dvh); padding:8px 10px; background:#071410df; }
.tape-loaded { flex:1; border:0; background:transparent; padding:0; }
#tape-status { position:relative; z-index:2; order:1; flex-shrink:0; max-width:min(65vw,115.5dvh); min-height:0; margin:0; padding:6px 10px; background:#071410df; font-size:13px; color:#abc6b8; }
#tape-progress { position:relative; order:3; flex-shrink:0; display:block; width:min(65vw,115.5dvh); margin:0; }
.tape-note { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
@media(orientation:portrait) {
  .computer-system { left:75.9%; top:42.9%; width:17.4%; height:27.3%; }
  .stage:has(#computer-toggle:not([hidden])) .scene-context { top:52px; left:5%; }
  .computer-access { top:8px; left:8px; font-size:12px; }
  .computer-dialog .hud { display:grid; gap:14px; }
  .computer-dialog .session-label { display:block; margin:0; }
  .computer-dialog .hud-actions { flex-wrap:wrap; }
  .computer-apps { gap:8px; margin:18px 0; }
  .computer-app { font-size:10px; min-height:100px; padding:8px 2px; }
  .computer-screen { padding:16px 12px; }
  .computer-status { font-size:10px; }
  .tape-readout { flex-wrap:wrap; }
  .tape-readout .system-button { padding:7px; font-size:12px; }
}
@media(max-height:500px) and (orientation:landscape) {
  .tape-dialog .settings-header { padding:5px 10px; font-size:11px; }
  .tape-dialog .small-close { min-height:30px; font-size:12px; }
  .tape-body { padding:0 10px 8px; }
  .tape-readout { padding:5px 8px; gap:8px; }
  .tape-readout .system-button { font-size:11px; padding:5px; }
  .tape-loaded { font-size:11px; }
  #tape-status { font-size:11px; }
}

/* Авторские прозрачные слои совпадают с координатами зелёного подвала. */
.room-highlights,.room-hover { position:absolute; inset:0; width:100%; height:100%; pointer-events:none; }
.room-highlights { z-index:1; }
.room-hover { object-fit:fill; visibility:hidden; user-select:none; }
.stage[data-room-art=true]:has([data-object="door"]:hover,[data-room-object="door"]:hover,[data-scene-object="door"]:hover,[data-item="door"]:hover) .room-hover-door,
.stage[data-room-art=true]:not(:has([data-object]:hover,[data-room-object]:hover,[data-scene-object]:hover,[data-item]:hover)):has([data-object="door"]:focus-visible,[data-room-object="door"]:focus-visible,[data-scene-object="door"]:focus-visible,[data-item="door"]:focus-visible) .room-hover-door { visibility:visible; }
.stage[data-room-art=true]:has([data-object="glass"]:hover,[data-room-object="glass"]:hover,[data-scene-object="glass"]:hover,[data-item="glass"]:hover) .room-hover-glass,
.stage[data-room-art=true]:not(:has([data-object]:hover,[data-room-object]:hover,[data-scene-object]:hover,[data-item]:hover)):has([data-object="glass"]:focus-visible,[data-room-object="glass"]:focus-visible,[data-scene-object="glass"]:focus-visible,[data-item="glass"]:focus-visible) .room-hover-glass { visibility:visible; }
.stage[data-room-art=true]:has([data-object="computer"]:hover,[data-room-object="computer"]:hover,[data-scene-object="computer"]:hover,[data-item="computer"]:hover) .room-hover-computer,
.stage[data-room-art=true]:not(:has([data-object]:hover,[data-room-object]:hover,[data-scene-object]:hover,[data-item]:hover)):has([data-object="computer"]:focus-visible,[data-room-object="computer"]:focus-visible,[data-scene-object="computer"]:focus-visible,[data-item="computer"]:focus-visible) .room-hover-computer { visibility:visible; }
.stage[data-room-art=true]:has([data-object="camera"]:hover,[data-room-object="camera"]:hover,[data-scene-object="camera"]:hover,[data-item="camera"]:hover) .room-hover-camera,
.stage[data-room-art=true]:not(:has([data-object]:hover,[data-room-object]:hover,[data-scene-object]:hover,[data-item]:hover)):has([data-object="camera"]:focus-visible,[data-room-object="camera"]:focus-visible,[data-scene-object="camera"]:focus-visible,[data-item="camera"]:focus-visible) .room-hover-camera { visibility:visible; }
.stage[data-room-art=true]:has([data-object="tape"]:hover,[data-room-object="tape"]:hover,[data-scene-object="tape"]:hover,[data-item="tape"]:hover) .room-hover-tape,
.stage[data-room-art=true]:not(:has([data-object]:hover,[data-room-object]:hover,[data-scene-object]:hover,[data-item]:hover)):has([data-object="tape"]:focus-visible,[data-room-object="tape"]:focus-visible,[data-scene-object="tape"]:focus-visible,[data-item="tape"]:focus-visible) .room-hover-tape { visibility:visible; }
.stage[data-room-art=true]:has([data-object="phone"]:hover,[data-room-object="phone"]:hover,[data-scene-object="phone"]:hover,[data-item="phone"]:hover) .room-hover-phone,
.stage[data-room-art=true]:not(:has([data-object]:hover,[data-room-object]:hover,[data-scene-object]:hover,[data-item]:hover)):has([data-object="phone"]:focus-visible,[data-room-object="phone"]:focus-visible,[data-scene-object="phone"]:focus-visible,[data-item="phone"]:focus-visible) .room-hover-phone { visibility:visible; }
body:has(dialog[open]) .room-hover { visibility:hidden!important; }
.stage[data-room-art=true] .hotspot:is(.door,.glass,.computer,.camera,.tape,.phone,.table):is(:hover,:focus-visible) { background:transparent; border-color:transparent; box-shadow:none; }
/* Зоны нового рисунка; старый фиолетовый контур стола к нему не относится. */
.stage[data-room-art=true] .hotspot.glass { left:26%; top:18%; width:64%; height:61%; z-index:0; }
.stage[data-room-art=true] .hotspot:is(.door,.camera,.tape,.phone) { z-index:2; }
.stage[data-room-art=true] .hotspot.computer:not(.computer-system) { left:74%; top:49.2%; width:26%; height:23%; z-index:2; clip-path:polygon(6% 0,54% 0,54% 7%,100% 7%,100% 96%,55% 100%,0 96%,0 85%,6% 80%); }
.stage[data-room-art=true] .hotspot.computer-system { left:88.1%; top:50.6%; width:11.9%; height:20.5%; }
.stage[data-room-art=true] .hotspot.table { left:47.25%; top:64.4%; width:52.75%; height:13.5%; z-index:1; clip-path:polygon(0 23%,51% 0,51% 43%,77% 55%,100% 55%,100% 58%,42% 100%,0 31%); }
.stage[data-room-art=true] .hotspot.table span { top:60%; left:40%; }
.stage[data-room-art=true] .hotspot.seen::after { content:none; }
.lookup-back { min-width:44px; min-height:44px; padding:6px 12px; font-size:22px; }
.hotspot.tape { left:30.5%; top:68%; width:10.3%; height:14.1%; }
.hotspot.phone { left:67.3%; top:69.4%; width:7%; height:9.1%; }
@media(orientation:landscape) {
  .workstation.room-view { inset:8% auto auto 3%; width:min(620px,40vw); max-height:62dvh; }
  .room-view .desktop-window { height:auto; max-height:62dvh; border-width:10px; }
  .room-view .app-title { padding:7px 10px; font-size:13px; }
  .room-view .app-content { padding:10px; }
  .room-view .room-grid { display:block; min-height:0; }
  .room-view .room-list { flex-direction:row; flex-wrap:wrap; gap:6px; margin-bottom:8px; }
  .room-view .room-item { padding:6px 9px; font-size:12px; }
  .room-view .room-detail { max-height:15dvh; overflow:auto; padding:8px; }
  .room-view .terminal-copy { font-size:12px; margin:4px 0 0; }
  .room-view .room-progress { font-size:11px; margin:7px 0 0; }
  .room-view .room-detail .terminal-label { font-size:10px; }
  .room-view .app-actions { padding:8px; }
  .room-view .app-actions button { font-size:12px; padding:7px 10px; }
}

/* Длинные ответы на узком экране продолжаются вертикально, без обрезания. */
@media(orientation:portrait) {
  .footer { height:74px; }
  .room-return { font-size:12px; padding:9px 12px; top:9px; right:10px; }
  .scene-readout { top:30px; left:5%; max-width:90%; max-height:calc(56.28cqw - 45px); overflow:auto; padding:10px; font-size:11px; line-height:1.4; }
  .stage { height:max(100dvh,calc(56.28vw + 520px)); }
  .dialogue { height:230px; }
  .dialogue-text { max-height:140px; top:48px; }
  .choices { top:calc(56.28cqw + 262px); }
  .stage:has(#choices:not([hidden])) { height:max(100dvh,calc(56.28vw + 600px)); min-height:calc(56.28vw + 600px); max-height:none; }
}
