#museum3d.awaiting-entry {
  background:linear-gradient(100deg,rgba(4,16,24,.88),rgba(4,16,24,.48)),url('museum-3d-hall.webp') center/cover;
}
#museum3d.awaiting-entry #museumCanvas { visibility:hidden; }
#museum3d :is(button,a,select,input,summary):focus-visible {
  outline:3px solid #fff;
  outline-offset:3px;
  box-shadow:0 0 0 6px #07549a;
}
#museum3d #museumCanvas:focus-visible { outline:3px solid #fff;outline-offset:-5px; }
#museum3d .m3d-keyboard-help {
  color:#dbe8f0;
  font:400 13px/1.65 'Museum Sans',sans-serif;
  padding:12px 0;
  border-top:1px solid #ffffff30;
}
#museum3d #m3dMapPanel .m3d-keyboard-help { max-width:62ch;margin:14px 0; }
#museum3d.touch-device .m3d-keyboard-help { display:none; }
#museum3d #m3dBegin.retry-load { background:#fff;color:#102f45;border:2px solid #07549a; }
#museum3d #m3dStart[aria-busy="true"] .m3d-loading i { opacity:.65; }
@media(max-width:420px) {
  .story-home #museum3d.real3d #m3dGuide.space-guide:not(.panel-open) { width:calc(50% - 22px)!important;min-width:0; }
  #museum3d #m3dMissionToggle { width:calc(50% - 22px);max-width:none; }
}

/* Preserve native two-finger magnification while one finger controls the view. */
.museum3d.real3d #museumCanvas{touch-action:pinch-zoom}
.museum3d.real3d .m3d-start{touch-action:pan-y pinch-zoom}
/* These arrows indicate physical directions, independent of reading order. */
#museum3d .m3d-touch{direction:ltr}

/* Expanded observation instructions must stay readable above scene actions. */
#museum3d.real3d #m3dMission.panel-open{z-index:19}
#museum3d.real3d #m3dMission.panel-open>p{display:block}
@media(max-height:500px){
 #museum3d.real3d #m3dMission.panel-open{top:calc(var(--museum-bar-height,80px) + 76px)!important;max-height:calc(100dvh - var(--museum-bar-height,80px) - 152px)!important;overscroll-behavior:contain;padding:12px!important}
 #museum3d.real3d #m3dMission.panel-open>p{margin:8px 0;line-height:1.45}
 #museum3d.real3d:has(#m3dMission.panel-open) .m3d-experience-toolbar{visibility:hidden}
}

/* Help stays reachable during the tour and fits small touch screens. */
#museum3d.real3d #m3dHelpButton{width:44px!important;min-width:44px;min-height:44px;padding:8px;font-size:20px;font-weight:750}
#museum3d.real3d #m3dHelpDialog{box-sizing:border-box;width:min(620px,calc(100% - 24px));max-width:none;max-height:calc(100dvh - 24px);padding:28px;margin:auto;background:#fff;color:#102f45;border:1px solid #a6bac7;border-radius:10px;overflow:auto;text-align:start;font:400 16px/1.65 'Museum Sans',sans-serif}
#m3dHelpDialog::backdrop{background:#102f45b8}
#museum3d.real3d #m3dHelpDialog h2{font-size:clamp(24px,3vw,30px);margin:0 0 16px}
#museum3d.real3d #m3dHelpDialog .tour-help-header{display:flex;align-items:flex-start;gap:12px}
#museum3d.real3d #m3dHelpDialog .tour-help-header h2{flex:1;min-width:0}
#museum3d.real3d #m3dHelpDialog .tour-help-dismiss{flex:0 0 44px;width:44px;min-height:44px;padding:4px;background:#edf2f5;color:#102f45;border:1px solid #a6bac7;border-radius:5px;font:400 28px/1.2 'Museum Sans',sans-serif}
#museum3d.real3d #m3dHelpDialog p{margin:14px 0}
#museum3d.real3d #m3dHelpDialog dl{margin:24px 0}
#museum3d.real3d #m3dHelpDialog dt{font-weight:700;margin-top:18px}
#museum3d.real3d #m3dHelpDialog dd{margin:5px 0 0;color:#496174}
#museum3d.real3d #m3dHelpDialog .tour-help-note,#museum3d.real3d #m3dHelpDialog .tour-help-keyboard{font-size:14px;color:#496174}
#museum3d.real3d #m3dHelpDialog .tour-help-close{width:100%;min-height:48px;padding:12px 16px;background:#07549a;color:#fff;border:1px solid #07549a;border-radius:5px;font:inherit;font-weight:650}
@media(max-width:900px){#museum3d.real3d #m3dHelpButton{order:5}#museum3d.real3d .m3d-level-control{flex:1 1 calc(100% - 158px)}#museum3d.real3d #m3dHelpDialog{padding:20px}}

/* Exhibit information remains usable while its picture loads. */
body.curated-home #masterDetail .photo-detail-media img[hidden],body.curated-home #masterDetail .exhibit-media-state[hidden],body.curated-home #masterDetail .exhibit-media-retry[hidden]{display:none!important}
body.curated-home #masterDetail .exhibit-media-state{display:grid;place-content:center;gap:16px;width:100%;min-height:280px;padding:32px;background:#edf2f5;color:#102f45;text-align:center}
body.curated-home #masterDetail .exhibit-media-state p{max-width:38ch;margin:auto;color:#496174;line-height:1.65}
body.curated-home #masterDetail .exhibit-media-retry{min-height:48px;padding:12px 18px;background:#07549a;color:#fff;border:1px solid #07549a;border-radius:5px;font:inherit}
@media(max-width:600px){body.curated-home #masterDetail .facts{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-block:18px}body.curated-home #masterDetail .fact:last-child{grid-column:1/-1}body.curated-home #masterDetail .fact{min-width:0;padding:10px;overflow-wrap:anywhere}}

/* Short landscape screens: the level selector remains in the tour bar. */
@media(max-height:500px) and (min-width:500px){
 body.curated-home #museum3d.real3d #m3dStart{padding:14px 20px!important}
 body.curated-home #museum3d.real3d #m3dStart>.m3d-start-logo,
 body.curated-home #museum3d.real3d #m3dStart>.m3d-kicker,
 body.curated-home #museum3d.real3d #m3dStart>.m3d-start-return,
 body.curated-home #museum3d.real3d #m3dStart>.virtual-levels{display:none!important}
 body.curated-home #museum3d.real3d #m3dStart>h2{font-size:24px!important;line-height:1.2!important;margin:0 0 8px!important;max-width:none!important}
 body.curated-home #museum3d.real3d #m3dStart>h2+p{font-size:14px!important;line-height:1.45!important;margin:0 0 10px!important;max-width:none!important}
 body.curated-home #museum3d.real3d #m3dBegin{min-height:48px;margin:0!important;font-size:15px!important;padding:10px 16px!important}
}
/* A fixed header keeps map controls apart from the scrolling room choices. */
body.curated-home #museum3d.real3d #m3dMapPanel{padding:0!important}
#museum3d.real3d .m3d-map-header{position:sticky;top:0;z-index:2;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 20px;background:#fff;color:#102f45;border-bottom:1px solid #d7e1e7}
#museum3d.real3d .m3d-map-header h2{font-size:22px!important;line-height:1.2!important;margin:0!important}
#museum3d.real3d #m3dMapClose{float:none;flex-shrink:0;min-height:44px;padding:8px 12px;background:#fff;color:#07549a;border:1px solid #a9bdcc;border-radius:6px;font:inherit;cursor:pointer}
#museum3d.real3d #m3dMapPanel>.museum-passport{margin:20px}
#museum3d.real3d #m3dMapRooms{padding:0 20px 20px}
body.curated-home #museum3d.real3d #m3dLevelSelect{min-height:44px!important}

#museum3d.real3d #m3dMapPanel>.map-visit,#museum3d.real3d #m3dMapPanel>.m3d-keyboard-help{margin:16px 20px}

/* The same narrator stays reachable in card rooms and in the compact 3D tour. */
#roomNarration:empty{display:none}
#roomNarration{clear:both;padding:16px clamp(16px,4vw,30px) 0}
#roomNarration .melpo-narration{margin:0;max-width:none}
#roomNarration .melpo-narration-head>div{min-width:0}
#roomNarration #melpoPlay{flex-shrink:0;min-width:48px;min-height:48px}
#roomNarration .melpo-meta{flex-wrap:wrap;gap:12px}
.story-home #museum3d.real3d #m3dGuide.space-guide:not(.panel-open) #melpoPartStatus{display:block!important;font-size:12px;line-height:1.4;margin-top:5px;overflow-wrap:anywhere}

/* Keep one action per destination instead of a duplicate scene hint. */
#museum3d.real3d.experience-action-visible :is(#m3dNotice,#m3dView){display:none!important}
.guide-toggle-name{display:none}
.tour-school-menu{margin:16px 20px}
.tour-school-menu:empty{display:none}
.tour-school-menu .school-entry-link{width:100%;box-sizing:border-box}
@media(max-width:900px){
 .story-home #museum3d.real3d #m3dGuide.space-guide:not(.panel-open){
  display:grid!important;grid-template-columns:minmax(0,1fr) 44px;gap:4px 6px;
  width:calc(50% - 22px)!important;max-width:198px!important;min-width:0;padding:6px!important;
 }
 .story-home #museum3d.real3d #m3dGuide.space-guide:not(.panel-open) :is(.guide-person,.melpo-narration,.melpo-narration-head){display:contents!important}
 .story-home #museum3d.real3d #m3dGuide.space-guide:not(.panel-open) .guide-person>div,
 .story-home #museum3d.real3d #m3dGuide.space-guide:not(.panel-open) :is(#melpoTitle,#melpoAuthentic,.guide-toggle-icon){display:none!important}
 .story-home #museum3d.real3d #m3dGuide.space-guide:not(.panel-open) .guide-toggle-name{display:block;overflow-wrap:anywhere;font-size:14px;line-height:1.3}
 .story-home #museum3d.real3d #m3dGuide.space-guide:not(.panel-open) #m3dGuideToggle{grid-column:1;grid-row:1;width:100%;max-width:none;min-width:44px;min-height:44px}
 .story-home #museum3d.real3d #m3dGuide.space-guide:not(.panel-open) #melpoPlay{grid-column:2;grid-row:1;width:44px;height:44px;min-width:44px;min-height:44px;margin:0}
 .story-home #museum3d.real3d #m3dGuide.space-guide:not(.panel-open) .melpo-narration-head>div{grid-column:1/-1;grid-row:2}
 .story-home #museum3d.real3d #m3dGuide.space-guide:not(.panel-open) #melpoPartStatus{margin:0;font-size:12px;line-height:1.35;display:-webkit-box!important;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
 .story-home #museum3d.real3d #m3dGuide.space-guide.panel-open{width:min(320px,calc(100% - 24px))!important}
 #museum3d.real3d:has(#m3dGuide.panel-open) #m3dMissionToggle{visibility:hidden}
 #museum3d.real3d #m3dMissionToggle{width:calc(50% - 22px);max-width:198px;min-height:56px;font-size:13px}
 #museum3d.real3d .m3d-experience-toolbar{bottom:82px;max-width:calc(100% - 196px)}
 #museum3d.real3d .m3d-experience-toolbar button{width:100%;min-height:48px;font-size:14px;line-height:1.35;overflow-wrap:anywhere}
}
