/* The hotspot follows the original 1536 × 1024 photograph, including portrait framing. */
.terminal-key {
  display: none;
  position: absolute;
  left: 29.17%;
  top: 71.1%;
  width: 2.1%;
  height: 2.5%;
  transform: translate(-50%, -50%);
  border-radius: 2px;
}
@media (min-width: 1024px) and (hover: hover) and (pointer: fine) {
  body.ready:not(.computer-off):not(.powered-off):not(.consent-open):not(.zoomed) .terminal-key:not(:disabled) { display: block; }
}
.terminal-key:hover { background: transparent; box-shadow: none; }
.terminal-key:focus-visible { outline: 2px dashed #c2da98; outline-offset: 3px; }
.boot-pending .terminal-key { display: none !important; }
.terminal-open #content,
.terminal-open #object-world { display: none; }
.terminal-open :is(.screen-top, .screen-footer, #room-view) { display: none; }
.terminal-panel {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: .3cqw 0;
  gap: .3cqw;
  font: 400 clamp(7px, .74cqw, 13px)/1.35 monospace;
  color: #c1dca9;
  text-shadow: 0 0 2px #bddd9d30;
}
.terminal-console { display: flex; flex: 1; min-height: 0; flex-direction: column; gap: .3cqw; overflow-y: auto; scrollbar-width: thin; }
.terminal-log { flex: none; overflow-wrap: anywhere; }
.terminal-log:empty { display: none; }
.terminal-log p { white-space: pre-wrap; }
.terminal-log .terminal-echo { color: #839d7d; margin-top: .25em; }
.terminal-command { display: flex; flex: none; gap: .4em; align-items: baseline; }
.terminal-command label { white-space: nowrap; }
.terminal-command input {
  min-width: 0;
  flex: 1;
  color: #d3edba;
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0 0 .1em;
  outline: none;
  caret-color: #d3edba;
  font: inherit;
}
.terminal-command input:focus-visible { outline: none; box-shadow: none; }
/* Bootstrap at the final glass dimensions while the terminal still owns input. */
body:is(.terminal-loading, .terminal-playing) .screen-inner { inset: 0; padding: 0; }
.terminal-loading .terminal-console { position: absolute; inset: 5% 6%; outline: none; }
.terminal-game, .terminal-game iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.terminal-game { background: #000; }
.terminal-loading .terminal-game { visibility: hidden; }
.terminal-playing .screen::before { opacity: .46; }
.terminal-playing .screen::after { opacity: .19; }

/* Keep the control inside the curved glass and outside the fullscreen picture. */
.game-expand {
  display: none;
  position: absolute;
  right: 5%;
  bottom: 5%;
  z-index: 2;
  width: max(24px, 1.25cqw);
  height: max(24px, 1.25cqw);
  color: #beceb2;
  background: #101710a6;
  border: none;
  border-radius: 2px;
}
.terminal-playing:not(.powered-off):not(.computer-off):not(.consent-open) .game-expand:not([hidden]) {
  display: grid;
  place-items: center;
}
.game-expand svg { width: 60%; fill: none; stroke: currentColor; stroke-width: 2; }
.game-expand span {
  display: none;
  position: absolute;
  right: 0;
  bottom: calc(100% + 3px);
  white-space: nowrap;
  padding: .3em .55em;
  color: #d1dfbe;
  background: #161b15;
  font: 11px/1.3 monospace;
}
.game-expand:is(:hover, :focus-visible) span { display: block; }
.game-expand:focus-visible { outline: 2px solid #c2da98; outline-offset: 2px; }
.terminal-game:popover-open { position: fixed; inset: 0; margin: 0; border: 0; padding: 0; max-width: none; max-height: none; }
.terminal-game:is(:fullscreen, :popover-open) { width: 100%; height: 100%; background: black; }
.terminal-game:is(:fullscreen, :popover-open) iframe { margin: auto; width: min(100vw, 133.3333vh); height: min(75vw, 100vh); }
.terminal-game:is(:fullscreen, :popover-open) iframe.game-native-viewport { width: 100%; height: 100%; }

/* The return control stays in the same bottom-right position in expanded play. */
.game-collapse { display:none; position:absolute; right:5%; bottom:5%; z-index:2; width:28px; height:28px; color:#beceb2; background:#101710a6; border:0; border-radius:2px; }
.terminal-game:popover-open .game-collapse { display:grid; place-items:center; }
.game-collapse svg { width:60%; fill:none; stroke:currentColor; stroke-width:2; }
.game-collapse span { display:none; position:absolute; right:0; bottom:calc(100% + 3px); white-space:nowrap; padding:.3em .55em; color:#d1dfbe; background:#161b15; font:11px/1.3 monospace; }
.game-collapse:is(:hover,:focus-visible) span { display:block; }
.game-collapse:focus-visible { outline:2px solid #c2da98; outline-offset:2px; }
