:root {
  color-scheme: dark;
  font: 500 16px/1.35 "Inter", "Segoe UI", system-ui, sans-serif;
  --glass: rgba(15, 30, 34, .82);
  --line: rgba(216, 242, 240, .27);
  --ink: #f7faf6;
  --muted: #c9d9d4;
}
* { box-sizing: border-box }
html, body, main, #viewfinder { width: 100%; height: 100%; margin: 0; overflow: hidden }
body { color: var(--ink); background: #18272a }
main { position: relative; isolation: isolate; background: radial-gradient(ellipse at center, #829795 0, #26393b 70%); }
#viewfinder { position: absolute; inset: 0; }
#scene { position: absolute; overflow: hidden; width: 100%; height: 100%; transform-origin: 0 0; transition: transform 1.65s cubic-bezier(.27,.75,.22,1); }
#architecture, #occupants { position: absolute; inset: 0; width: 100%; height: 100%; display: block }
#architecture { object-fit: fill }
.prop { position: absolute; display: block; pointer-events: none; user-select: none }
.sprite { transform: translate(-50%,-100%); width: auto; }
.cast-member { position:absolute; inset:0; pointer-events:none; }
.cast-member .sprite { filter:drop-shadow(.3px 1.5px 1px #241c1748); }
.cast-member.enters .prop.sprite { animation: settle-figure .55s ease-out both; }
@keyframes settle-figure { from { transform:translate(-52%,-100%); } to { transform:translate(-50%,-100%); } }
.top, footer { position: absolute; inset-inline: max(1.6vw, 15px); display: flex; justify-content: space-between; gap: .75rem; align-items: flex-start; pointer-events: none; }
.top { top: max(1.7vh, 12px, env(safe-area-inset-top)); }
footer { bottom: max(1.8vh, 12px, env(safe-area-inset-bottom)); align-items: flex-end; }
.identity, .schedule, .navigation, .actions, noscript {
  border: 1px solid var(--line); background: var(--glass); box-shadow: 0 3px 14px #0e191d2c; border-radius: .65rem;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.identity { max-width: min(660px, 75vw); padding: .65rem .95rem .62rem; }
.eyebrow { display:flex; align-items:center; gap:.4rem; text-transform: uppercase; font-size: .64rem; letter-spacing: .16em; color: #c9e6d9; font-weight: 720; }
.eyebrow i { height: .45rem; width: .45rem; background: #c8d1cf; border-radius: 50%; }
main[data-signal="ok"] .eyebrow i { background:#91dcbf; box-shadow: 0 0 7px #8cd8ae66; }
h1 { margin:.12rem 0 0; line-height:1.13; font-size: clamp(1.04rem,1.22vw,1.6rem); font-weight: 620; text-wrap: balance; }
#place { margin:.19rem 0 0; font-size:.75rem; color:var(--muted); line-height:1.2; }
.schedule { padding:.48rem .7rem .55rem; }
.schedule-title { color:var(--muted); font-size:.67rem; white-space:nowrap; }
#stamp:not(:empty)::before { content:" · "; }
dl, dt, dd { margin:0; }
dl { display:flex; align-items:baseline; gap:.75rem; padding-top:.14rem; }
dl > div { display:flex; gap:.28rem; align-items:baseline; }
dt { font-size:.74rem; }
dd { order:-1; font-variant-numeric:tabular-nums; font-size:1.05rem; font-weight:720; }
.actions, .navigation { pointer-events:auto; display:flex; align-items:center; overflow:hidden; }
button, .actions a, select { font:inherit; color:var(--ink); background:transparent; border:0; cursor:pointer; padding:.35rem .65rem; min-height:40px; }
.actions a, button { display:inline-flex; align-items:center; justify-content:center; text-decoration:none; }
.actions a, #fullscreen, #tour { min-width:40px; }
.actions a + button, .navigation > * + * { border-left:1px solid var(--line); }
.navigation button, select { font-size:.78rem; }
select { max-width:min(25vw,230px); width:100%; }
option { color:#172327; background:#fff; }
button:hover, a:hover, select:hover { background:#ffffff20 }
button:focus-visible, a:focus-visible, select:focus-visible { outline:2px solid #bcf6df; outline-offset:-3px; }
button:disabled { display:none; }
svg { width:19px; height:19px; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; fill:none; }
[hidden] { display:none!important; }
.a11y { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; clip-path:inset(50%); }
noscript { position:absolute; padding:.7rem; top:40%; left:1rem; }
main[data-picture] .top, main[data-picture] footer { inset-inline: 8px; }
main[data-picture] .actions, main[data-picture] .navigation { display:none; }
main[data-picture] .identity { max-width:95%; }
@media (max-width:650px) {
  .top, footer { inset-inline: max(10px, env(safe-area-inset-left)); }
  .identity { max-width:calc(100% - 88px); padding:.5rem .7rem; }
  footer { flex-wrap:wrap; gap:.42rem; }
  .navigation { margin-left:auto; }
  select { max-width:44vw; }
  .actions a,#fullscreen,#tour { min-width:39px; }
  .schedule { padding:.4rem .59rem; }
  dl { gap:.6rem; }
  .schedule-title { font-size:.65rem; }
  button, select,.actions a { min-height:42px; }
}
@media (max-height:450px) {
  .top { top:6px; } footer { bottom:6px; }
  .identity { padding:.35rem .6rem; }
  .eyebrow,.schedule-title { font-size:.6rem; }
  .schedule { padding:.25rem .55rem; }
  #place { font-size:.65rem; }
  h1 { font-size:.98rem; }
}
@media (prefers-reduced-motion:reduce) {
  #scene, .prop { animation:none!important; transition:none!important; }
}
body.paused #scene, main[data-still] #scene { transition: none; }
.etched { position:absolute; transform:translate(-50%,-50%) rotate(-2.2deg); text-align:center; font:600 25px/1.05 "Segoe UI",sans-serif; color:#222c2e; text-shadow:0 1px 0 #f7fbfa; }

/* The optical signature is part of every viewfinder, including read-only embedded pictures. */
#makers-mark {
  position: absolute;
  z-index: 1;
  top: max(4.5rem, 7.5vh);
  right: max(1.6vw, 15px, env(safe-area-inset-right));
  width: clamp(146px, 12.4vw, 225px);
  height: auto;
  filter: drop-shadow(0 2px 3px #18352e55);
  pointer-events: none;
  user-select: none;
}
@media (max-width: 650px) {
  #makers-mark { top: max(5.8rem, 12vh); right: 10px; width: clamp(114px, 30vw, 145px); }
}
@media (max-height: 450px) {
  #makers-mark { top: 3.9rem; width: clamp(94px, 15vw, 132px); }
}
/* If a portrait display needs a wider cutaway, extend the empty plate's light
   into the letterbox. Only the sharply focused room contains patients. */
#viewfinder[data-framing="chair-group"]::before { content:"";position:absolute;inset:-4%;
  background:linear-gradient(#1b3035aa,#09282fc4),var(--ambient-clinic) center/cover no-repeat;
  filter:blur(19px);pointer-events:none; }
