/* Room objects only; shared controls live in interface.css. */
[data-phase="3"] .scene button { border: 0; background: none; box-shadow: none; }
.room-door, .visit-document, .visit-tray, .source-place { position: absolute; transform: translate(-50%, -50%); }
.room-door { display: flex; align-items: end; justify-content: center; padding: 10px !important; }
.room-door > span { padding: 7px 10px; font-size: clamp(14px, 1.1vw, 18px); background: #23384bf2; border: 1px solid #b1c2c1; color: #edf2e9; border-radius: 3px; box-shadow: 0 3px 0 #182b3c; }
.visit-document { display: grid; place-items: center; }
.visit-document > .art { position: absolute; width: 100%; height: 100%; }
.document-label { position: absolute; inset: 12%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 5px; padding: 5px; color: #22384a; font-size: clamp(14px, 1.3vw, 19px); line-height: 1.25; pointer-events: none; }
.document-label strong { font-weight: 600; }
.document-board .document-label { gap: 8px; }
.document-board .document-label strong { font-size: .85em; text-transform: uppercase; letter-spacing: .05em; }
.source-target, .tray-target { position: absolute; inset: 0; width: 100%; height: 100%; }
.source-target > .item-visual, .tray-vial > .item-visual { position: absolute; inset: 0; }
.source-label { position: absolute; top: 100%; left: 50%; transform: translateX(-50%); text-align: center; padding: 5px 10px; border: 1px solid #93aaaf; background: #22384cf5; color: #f2f4ed; font-size: clamp(14px, 1.2vw, 18px); line-height: 1.15; border-radius: 3px; width: max-content; min-width: 100%; max-width: 160%; pointer-events: none; }
.source-empty { display: inline-block; border: 1px dashed #526c79; color: #344d60; font-size: 14px; background: #d6dfd9c9; padding: 15px 6px; }
.tray-target > .art, .tray-target > img { width: 100%; height: 100%; }
/* Separate controls avoid nested hit areas and leave the tray's center free. */
[data-phase="3"] .scene .tray-title { position: absolute; z-index: 2; left: 50%; bottom: 205%; transform: translateX(-50%); min-width: 70%; width: max-content; max-width: 100%; padding: 5px 10px; border: 1px solid #93aaaf; border-radius: 3px; background: #22384cf5; color: #f2f4ed; font-size: clamp(14px, 1.2vw, 18px); line-height: 1.15; }
.tray-title small { display: block; font-size: .85em; margin-top: 3px; }
.tray-vial { position: absolute; bottom: 55%; width: calc(100% / var(--slots)); left: calc(100% * var(--slot) / var(--slots)); aspect-ratio: 786 / 929; z-index: 1; }
.tray-vial > .item-visual { inset: 0 7%; width: 86%; }
.tray-vial.selected { outline: 2px solid var(--amber); outline-offset: 2px; }
.tray-vial.needs-correction { outline: 2px solid #bd745d; outline-offset: 2px; }
.case-age { color: var(--amber) !important; font-size: 1rem !important; border-left: 3px solid var(--amber); padding-left: 12px; }
.case-context { font-size: 1rem !important; color: var(--muted) !important; }
.case-explanation { border-top: 1px solid var(--line); }
.case-explanation p:last-child { font-size: .95rem; color: var(--muted); }
.check-placements { list-style: none; padding: 0; margin: 20px 0; }
.check-placements li { display: flex; flex-wrap: wrap; gap: 6px 12px; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--line); }
.check-placements span { color: var(--muted); }
.plan-summary { padding: 16px 20px; border: 1px solid #8da3a8; background: #24374b; margin-top: 20px; }
.plan-summary h2 { font-size: 1rem; color: var(--amber); }
.plan-summary p { font-size: 1rem; margin: 10px 0 0; }
@media (max-height: 600px) and (orientation: landscape) {
  .source-label, .tray-title { font-size: 14px; padding: 4px 6px; }
  .document-label { font-size: 14px; gap: 2px; }
  .room-door { padding: 4px !important; }
  .room-door > span { font-size: 14px; padding: 5px; }
  .plan-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 12px; margin-top: 10px; padding: 10px 14px; }
  .plan-summary h2 { grid-column: 1 / -1; }
  .plan-summary p { font-size: 14px; line-height: 1.25; margin: 0; }
  [data-phase="3"] .end-art { width: 18%; }
  [data-phase="3"] .end-copy { flex: 1; max-width: 700px; }
  [data-phase="3"] .end-screen { padding: 18px 24px; gap: 20px; }
  [data-phase="3"] .completion-seal { display: none; }
  [data-phase="3"] .end-copy h1 { font-size: 26px; margin: 12px 0; }
  [data-phase="3"] .end-copy > p { margin: 8px 0; }
  [data-phase="3"] .end-actions { margin-top: 14px; gap: 8px; }
  [data-phase="3"] .end-actions button { min-height: 40px; padding: 7px 12px; font-size: 14px; }
}
@media (orientation: portrait) and (max-width: 650px) {
  .document-board .document-label { font-size: 13px; }
}

/* Highlight the visible caption only, never the transparent scene hit area. */
.room-door:hover > span,
.source-target:hover + .source-label,
.scene .tray-title:hover:not(:focus-visible) { outline: 2px solid var(--teal); outline-offset: 2px; }
