.room-lighting {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: rgba(0, 0, 0, 0);
  transition: background 260ms ease;
}

.room-lighting.is-dark {
  background: rgba(0, 8, 4, 0.46);
}

.room-game-layer {
  position: absolute;
  inset: 0;
  z-index: 8;
  pointer-events: none;
}

.room-hotspot {
  position: absolute;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: transparent;
  appearance: none;
  pointer-events: auto;
  cursor: crosshair;
  outline: none;
  transition: background 120ms ease, box-shadow 120ms ease;
}

.room-hotspot:hover,
.room-hotspot:focus-visible {
  background: rgba(120, 255, 155, 0.035);
  box-shadow:
    inset 0 0 0 1px rgba(120, 255, 155, 0.34),
    0 0 18px rgba(120, 255, 155, 0.08);
}

.room-hotspot.is-active {
  box-shadow: inset 0 0 18px rgba(120, 255, 155, 0.06);
}

.room-hotspot-label {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 7px);
  transform: translateX(-50%) translateY(4px);
  padding: 4px 7px;
  border: 1px solid rgba(120, 255, 155, 0.45);
  background: rgba(0, 10, 4, 0.9);
  color: #9dffb5;
  font: 700 clamp(8px, 0.52vw, 11px)/1.1 "Courier New", monospace;
  letter-spacing: 0.08em;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  text-shadow: 0 0 6px rgba(120, 255, 155, 0.55);
  transition: opacity 110ms ease, transform 110ms ease;
}

.room-hotspot:hover .room-hotspot-label,
.room-hotspot:focus-visible .room-hotspot-label {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.room-inspector {
  position: absolute;
  left: 50%;
  bottom: 3.4%;
  z-index: 30;
  width: min(46%, 560px);
  transform: translate(-50%, 10px);
  padding: 12px 15px 11px;
  border: 1px solid rgba(120, 255, 155, 0.6);
  background: rgba(0, 8, 3, 0.94);
  color: #85ffa3;
  font: 700 clamp(9px, 0.58vw, 12px)/1.35 "Courier New", monospace;
  letter-spacing: 0.035em;
  box-shadow: 0 0 28px rgba(0, 0, 0, 0.78), inset 0 0 18px rgba(120, 255, 155, 0.035);
  text-shadow: 0 0 6px rgba(120, 255, 155, 0.42);
  opacity: 0;
  visibility: hidden;
  pointer-events: auto;
  transition: opacity 140ms ease, transform 140ms ease, visibility 140ms;
}

.room-inspector.is-open {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

.room-inspector-title {
  margin-bottom: 7px;
  color: #b1ffc1;
  letter-spacing: 0.12em;
}

.room-inspector-body {
  white-space: pre-line;
}

.room-inspector-hint {
  margin-top: 8px;
  color: rgba(120, 255, 155, 0.58);
  font-size: 0.82em;
}

.room-toast {
  position: absolute;
  left: 50%;
  top: 4%;
  z-index: 35;
  transform: translate(-50%, -6px);
  padding: 7px 11px;
  border: 1px solid rgba(120, 255, 155, 0.52);
  background: rgba(0, 9, 3, 0.92);
  color: #a7ffbc;
  font: 700 clamp(8px, 0.54vw, 11px)/1.2 "Courier New", monospace;
  letter-spacing: 0.08em;
  box-shadow: 0 0 18px rgba(0, 0, 0, 0.72);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 120ms ease, transform 120ms ease, visibility 120ms;
}

.room-toast.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

.room-scene.terminal-engaged .screen {
  box-shadow:
    inset 0 0 30px rgba(0, 0, 0, 0.98),
    inset 0 0 16px rgba(120, 255, 155, 0.18),
    0 0 14px rgba(77, 255, 119, 0.18);
}

@media (max-width: 700px), (max-aspect-ratio: 4 / 5) {
  .room-lighting,
  .room-game-layer,
  .room-inspector,
  .room-toast {
    display: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .room-lighting,
  .room-hotspot,
  .room-hotspot-label,
  .room-inspector,
  .room-toast {
    transition: none;
  }
}
