.home {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  background: #120e17;
}

.room-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px 24px;
  flex-wrap: wrap;
}

.room-button {
  border: 1px solid #423340;
  border-radius: 5px;
  padding: 8px 11px;
  color: var(--soft-pink);
  background: #1c141e;
  font: inherit;
  font-size: .8rem;
  text-decoration: none;
}

.room-button {
  cursor: pointer;
}

.room-button:hover {
  border-color: var(--neon-pink);
  color: var(--neon-pink);
}

.home a:focus-visible,
.room-button:focus-visible,
.support-directory a:focus-visible {
  outline: 2px solid var(--mint);
  outline-offset: 4px;
}

.room {
  width: min(100%, 960px);
  /* Fit the entire 960 × 652 scene in short landscape windows as well. */
  max-width: calc(100svh * 960 / 652);
}

.room-footer {
  padding: 10px 14px;
  background: #1b1520;
}

.room-footer {
  border-top: 1px solid #392e3b;
  border-radius: 0 0 7px 7px;
}

.room-footer p {
  margin: 0;
  color: var(--ink-dim);
  font-size: .72rem;
}

.room-canvas {
  display: block;
  width: 100%;
  height: auto;
  image-rendering: pixelated;
}

.room-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.room-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.room-button:disabled {
  color: #a69aa6;
  cursor: default;
  border-color: #423340;
}

.room-lights::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #78677c;
  content: "";
}

.room-lights[aria-pressed="true"]::before {
  background: var(--mint);
  box-shadow: 0 0 7px #8dffbe88;
}

.support-directory .logo {
  margin-bottom: 26px;
  font-size: clamp(2.25rem, 6vw, 4rem);
}

.home-support-list {
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
  list-style: none;
}

.home-support-list li {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 24px;
  padding-block: 14px;
  border-bottom: 1px solid var(--line);
}

.home-app-name {
  flex: 0 0 18ch;
  color: var(--warm);
  font-weight: 700;
  text-decoration-color: var(--line-soft);
  text-underline-offset: 4px;
}

.home-support-links {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 18px;
}

.home-support-links a {
  padding-block: 3px;
  color: var(--ink-dim);
  font-size: .875rem;
  text-decoration-color: #8a8389;
  text-underline-offset: 4px;
}

.home-support-list a:hover {
  color: var(--neon-pink);
  text-decoration-color: currentColor;
}

@media (max-width: 600px) {
  .home-support-list li {
    flex-direction: column;
    align-items: flex-start;
  }

  .home-app-name {
    flex-basis: auto;
  }

  .support-directory .site-footer .legal-links {
    margin-left: 0;
  }
}

/* Object hit areas use the same 480 × 326 space as the room drawing. */
.room-stage { position: relative; }
.room-object { position: absolute; margin: 0; border: 0; padding: 0; background: transparent; cursor: default; }
.wall-board { left: 30.3%; top: 22.4%; width: 11.7%; transform: skewY(-26.565deg); transform-origin: top left; }
.wall-board img { width: 100%; filter: brightness(.77) sepia(.09); }
.safe-target { left: 60.85%; top: 44.6%; width: 5.8%; height: 8.8%; min-width: 30px; min-height: 30px; transform: translate(-50%, -50%); }
.room-footer[hidden], .room-controls[hidden], .safe-panel [hidden] { display: none; }
.room-object:focus-visible, .object-dialog :focus-visible { outline: 2px solid #ec96be; outline-offset: 3px; }
.object-dialog {
  border: 0; padding: 0; margin: auto; overflow: visible;
  background: transparent; color: var(--ink); max-width: calc(100vw - 30px);
}
.object-dialog::backdrop { background: #100c16c9; }
.object-dialog[open] { animation: inspect-object .18s ease-out; }
@keyframes inspect-object { from { opacity: 0; transform: translateY(5px) scale(.97); } }
@media (prefers-reduced-motion: reduce) { .object-dialog[open] { animation: none; } }
.dialog-close {
  display: block; width: 36px; height: 36px; margin: 0 0 6px auto;
  border: 1px solid #726373; border-radius: 50%; background: #251c29; color: #f3dce7;
  font: 23px/1 monospace; cursor: pointer;
}
.board-dialog { width: min(640px, calc(100vw - 30px), 138vh); }
.board-face { position: relative; filter: drop-shadow(0 9px 14px #08060c80); }
.board-face img { width: 100%; }
.board-face a { position: absolute; border-radius: 6px; }
.board-face a:focus-visible { outline-color: #235c53; }
.board-email { left: 7%; top: 29%; width: 83%; height: 22%; }
.board-help { left: 10%; top: 55%; width: 50%; height: 23%; }

.safe-dialog { width: min(295px, calc(100vw - 30px)); max-height: calc(100dvh - 20px); overflow-y: auto; }
.safe-panel {
  position: relative; padding: 30px 32px 30px 48px; border: 3px solid #332e3a; border-radius: 12px;
  background: radial-gradient(circle at 12px 12px,#302d37 2px,#ac9aaa 3px,transparent 4px) 0 0 / 100% 100%,
    linear-gradient(130deg,#8a8293,#676170 50%,#494654);
  box-shadow: inset 2px 2px 0 #aea5b5,inset -3px -4px 0 #423d4e;
}
.safe-panel::before { content: ''; position: absolute; top: 44%; bottom: 27%; left: 13px; width: 11px;
  border: 2px solid #38323f; border-radius: 5px; background: linear-gradient(90deg,#555161,#b7abba 52%,#756e80); box-shadow: 2px 3px 0 #332c3e; }
.safe-screen { position: relative; height: 49px; margin-bottom: 16px; border: 3px solid #403c49; border-radius: 4px;
  background: #202d2d; box-shadow: inset 1px 3px 3px #101819,0 1px 0 #b4a7b4; }
.safe-screen input, .safe-message { width: 100%; height: 100%; padding: 0 10px; background: transparent; color: #c7f2d4; border: 0;
  font: bold 21px/43px monospace; letter-spacing: .16em; text-align: center; }
.safe-screen input::placeholder { color: #7e9e8a; }
.safe-message { position: absolute; inset: 0; pointer-events: none; font-size: 15px; }
.safe-message:not(:empty) { background: #202d2d; }
.safe-keys { display: grid; grid-template-columns: repeat(3,1fr); gap: 7px; }
.safe-keys button, .safe-lock { min-height: 43px; border: 1px solid #383240; border-radius: 4px;
  box-shadow: inset 0 1px 0 #a397a9,0 2px 0 #38323e; background: #635a6c; color: #fff0e5;
  font: bold 1.02rem monospace; cursor: pointer; }
.safe-keys button:active, .safe-lock:active { transform: translateY(1px); box-shadow: none; }
.safe-keys .safe-enter, .safe-lock { background: #415e59; }
.safe-lock { width: 100%; }
@media(max-height: 420px) { .safe-panel { padding-block: 15px; } .safe-keys button { min-height: 33px; } }
