:root{color-scheme:light;--ink:#30382f;--paper:#f5f2e9;--muted:#75796d;--line:#d5d3c7;--accent:#7d543b}*{box-sizing:border-box}body{margin:0;background:#ddd7c8;color:var(--ink);font-family:Arial,Helvetica,sans-serif}button,a,select{-webkit-tap-highlight-color:transparent}button,select{font:inherit}button{cursor:pointer}button:disabled{cursor:wait;opacity:.58}button:focus-visible,a:focus-visible,select:focus-visible{outline:3px solid #bb8c56;outline-offset:4px}[hidden]{display:none!important}#museum,#scene{position:fixed;inset:0;width:100%;height:100%}#scene{display:block;outline:none;touch-action:none}.topbar{position:absolute;top:0;left:0;right:0;height:103px;padding:25px 36px;display:flex;align-items:center;justify-content:space-between;background:linear-gradient(#f5f2e9ed,#f5f2e900);pointer-events:none}.identity{display:flex;gap:15px;align-items:center;color:var(--ink);text-decoration:none;pointer-events:auto}.seal{font:37px Georgia,serif;border:1px solid #797c68;width:47px;height:52px;display:grid;place-items:center;border-radius:24px 24px 2px 2px}.eyebrow{font-size:10px;letter-spacing:2.2px;font-weight:700;display:block}.identity strong{display:block;font:26px Georgia,serif;letter-spacing:.3px;margin-top:4px}.top-actions{display:flex;align-items:center;gap:10px;pointer-events:auto}.edition{font-size:9px;letter-spacing:1.8px;margin-right:15px;display:flex;align-items:center;gap:10px}.edition i{height:4px;width:4px;background:#727c64;border-radius:50%}.icon-button{height:36px;width:36px;border:1px solid #c4c5b5;background:#f5f2e9c9;color:var(--ink);border-radius:50%;font-size:20px}.welcome{position:absolute;left:6%;top:clamp(120px,21vh,230px);width:420px;padding:31px 33px 22px;background:#f7f4ecf5;border:1px solid #fff9;box-shadow:0 15px 60px #25282015}.welcome h1{font:normal clamp(36px,3.4vw,53px)/1.04 Georgia,serif;letter-spacing:-1.9px;margin:22px 0}.welcome>p{font-size:13px;line-height:1.7;color:#626858;margin:0 0 23px}.room-preview{display:flex;gap:22px;border-top:1px solid var(--line);padding-top:18px;margin-bottom:24px;font-size:10px;color:#8d7a5d}.room-preview b{display:block;margin-top:8px;color:#494e43;font-size:11px;font-weight:400}.primary{background:var(--ink);color:var(--paper);border:0;padding:16px 18px;width:100%;font-size:12px;display:flex;align-items:center;justify-content:space-between;gap:12px}.primary span{font-size:20px;line-height:14px}.primary:hover{background:#4a5544}.loading-line{display:flex;justify-content:space-between;gap:12px;font-size:10px;color:var(--muted);margin:13px 0 7px}.progress{height:2px;background:#d8d9ce}.progress span{display:block;height:100%;background:#8d9a7c;width:0%;transition:width .25s}.welcome .welcome-note{font-size:10px;margin:15px 0 0;letter-spacing:.3px}.room-card{position:absolute;left:36px;bottom:104px;text-shadow:0 1px 15px #fff;background:#f5f2e9df;border-left:2px solid #8a977b;padding:17px 23px 16px;pointer-events:none}.room-card h2{font:26px Georgia,serif;margin:8px 0}.room-card p{font-size:11px;color:#626b5c;margin:0}.map-card{position:absolute;right:36px;bottom:103px;width:182px;background:#f5f2e9ed;padding:16px 14px 13px;border:1px solid #fff7}.map-heading{display:flex;justify-content:space-between;align-items:center}.map-heading .eyebrow{font-size:8px;letter-spacing:1.3px}#quality-badge{font-size:7px;letter-spacing:1px;color:#838b70}#minimap{display:block;width:135px;height:186px;margin:12px auto 10px}.map-legend{font-size:9px;display:flex;justify-content:space-between;color:#727a67}.controlbar{position:absolute;bottom:0;left:0;right:0;min-height:73px;padding:16px 36px;background:#f4f1e8f5;border-top:1px solid #ffffffc0;display:flex;justify-content:space-between;align-items:center;gap:18px}.key-guide{display:flex;align-items:center;gap:20px;color:#717966;font-size:10px}.key-guide span{white-space:nowrap}kbd{font:9px Arial,sans-serif;border:1px solid #bdc1af;padding:5px 7px;border-radius:3px;margin-right:5px;color:#3d4938;letter-spacing:.6px}.bottom-actions{display:flex;gap:8px;align-items:center}.bottom-actions button,.bottom-actions select{background:transparent;border:1px solid #c4c8b7;font-size:10px;padding:10px 12px;color:#38452e;border-radius:2px}.bottom-actions #move-button{background:#38452e;color:#fff;border-color:#38452e}#crosshair{position:absolute;left:50%;top:50%;width:6px;height:6px;border-radius:50%;background:#fff9;border:1px solid #2a352e88;transform:translate(-50%,-50%);pointer-events:none}#object-actions{position:absolute;left:50%;top:calc(50% + 30px);transform:translateX(-50%);border:1px solid #d9dac9;background:#f5f2e9eb;padding:13px 16px;color:#34432d;font-size:12px;box-shadow:0 3px 16px #0001;white-space:nowrap}#toast{position:absolute;top:110px;left:50%;transform:translateX(-50%);padding:12px 20px;background:#30382fed;color:#fff;font-size:12px;max-width:90%;text-align:center}#error{position:absolute;left:50%;top:110px;transform:translateX(-50%);max-width:600px;width:90%;background:#fff1df;color:#744126;border:1px solid #ccaa7b;padding:18px;font-size:13px;line-height:1.6;z-index:10}dialog{border:1px solid #ddd9c9;background:var(--paper);color:var(--ink);padding:40px;width:min(460px,92vw);max-height:85vh;overflow:auto;box-shadow:0 20px 100px #0004}dialog::backdrop{background:#20291f66;backdrop-filter:blur(4px)}dialog h2{font:38px Georgia,serif;margin:18px 0 10px}.dialog-close{position:absolute;right:15px;top:10px;background:none;border:0;color:var(--ink);font-size:27px}dialog p,dialog dd{font-size:13px;line-height:1.7}.object-origin{color:#8a785b;font-size:11px}.divider{height:1px;background:var(--line);margin:25px 0}.muted{color:#7b8073;font-size:11px!important}dialog .primary{margin-top:28px}dialog dt{font-size:12px;font-weight:bold;margin-top:20px}dialog dd{margin:5px 0;color:#6d7662}.tour-active .welcome{display:none}.tour-active .topbar{background:linear-gradient(#f5f2e9c9,#f5f2e900)}body:not(.tour-active) .room-card{display:none}
@media(max-width:1100px){.key-guide{gap:10px}.key-guide span:nth-child(3){display:none}.controlbar{padding:16px 22px}.edition{display:none}.welcome{left:5%;width:370px}.room-card{left:22px}.map-card{right:22px}.topbar{padding:22px}}@media(max-height:760px){.welcome{top:112px;padding:22px 28px;width:380px}.welcome h1{font-size:40px;margin:16px 0}.welcome>p{margin-bottom:15px}.room-preview{margin-bottom:15px;padding-top:12px}.welcome-note{display:none}.map-card{width:150px}#minimap{width:106px;height:146px}.map-heading .eyebrow{font-size:7px}.room-card{bottom:90px}.map-card{bottom:90px}}@media(max-width:700px){.welcome{left:20px;right:20px;top:110px;width:auto;max-width:420px}.map-card{display:none}.key-guide{display:none}.bottom-actions{flex-wrap:wrap}.controlbar{padding:12px 16px}.room-card{left:16px;bottom:83px}.room-card h2{font-size:21px}.identity strong{font-size:23px}.topbar{padding:16px}.room-card p{display:none}}
/* Quiet interface for the darker, illuminated exhibition. */
.topbar,.tour-active .topbar{background:linear-gradient(#161b18eb,#161b1800)}
.identity,.top-actions{color:#ede9dc}.seal{border-color:#bbb398}.icon-button{background:#222a23c9;color:#eee9da;border-color:#777f69}
.room-card,.map-card{background:#20251eea;color:#ece7d6;text-shadow:none;border-color:#727b63;backdrop-filter:blur(8px)}
.room-card p,.map-legend{color:#c0c3ae}#quality-badge{color:#c3c9b0}.controlbar{background:#1b211beF;border-top-color:#626957;color:#d4d8c3}
.key-guide{color:#c1c7af}.key-guide kbd{color:#e1e4d3;border-color:#6c775d}.bottom-actions button,.bottom-actions select{color:#e4e7d5;border-color:#616e55;background:#252d23}.bottom-actions #move-button{background:#c2cbae;color:#293221;border-color:#c2cbae}
#object-actions{background:#20281feF;color:#f0eddf;border-color:#929d7d}#object-actions kbd{color:#e1e8cf;border-color:#79886c}

.motion-option{display:flex;align-items:center;gap:.7rem;margin:1.3rem 0;font-size:.95rem}.motion-option input{width:1.1rem;height:1.1rem;accent-color:#7a8965}

#object-dialog{width:min(620px,92vw)}#object-description{white-space:pre-line}#object-source{font-size:12px;color:#66512e}#sketchfab-dialog{width:min(1280px,96vw);max-width:none;height:92vh;max-height:92vh;padding:0;overflow:hidden;flex-direction:column}#sketchfab-dialog[open]{display:flex}#sketchfab-dialog header{padding:20px 28px;border-bottom:1px solid var(--line)}#sketchfab-dialog h2{font-size:26px;margin:8px 45px 0 0}#sketchfab-host{flex:1;min-height:0;background:#242720}#sketchfab-host iframe{width:100%;height:100%;border:0}#sketchfab-dialog footer{padding:14px 24px;display:flex;gap:20px;align-items:center;justify-content:space-between;font-size:12px}#sketchfab-dialog footer a{color:#66512e}#sketchfab-dialog footer button{background:#30382f;color:#f5f2e9;padding:10px 16px;border:0}.tour-select{color:#d4d8c3;font-size:11px}dialog a:focus-visible{outline:3px solid #bb8c56} @media(max-width:700px){#sketchfab-dialog footer>span{display:none}}

/* Museum edition: quiet typography, one direct model-and-text overlay, touch controls. */
html,body{overscroll-behavior:none}#museum,#scene{height:100dvh}.identity{gap:0}.identity strong{font-size:28px}.identity-subtitle{display:block;font:17px Georgia;margin-top:3px;color:#d7cfba}.topbar{height:108px}.room-card{padding:15px 20px}.room-card h2{margin-bottom:0}.key-guide{gap:15px}.key-guide span[hidden]{display:none}.welcome-note{display:block!important}
#object-dialog.object-detail{padding:0;width:min(1440px,96vw);max-width:none;height:min(900px,91dvh);max-height:91dvh;overflow:hidden;border:1px solid #b7a984;box-shadow:0 22px 100px #0008;background:#e9e2d0}
#object-dialog[open]{display:grid;grid-template-columns:minmax(0,1.65fr) minmax(330px,1fr)}
#object-dialog .dialog-close{position:absolute;right:12px;top:12px;width:46px;height:46px;z-index:5;font:32px Arial;line-height:1;background:#f6f2e8eF;border:1px solid #b6aa91;border-radius:50%;display:grid;place-items:center;color:#2e332a}
#object-dialog .detail-model{position:relative;min-height:0;background:#d9d3c3;border-right:1px solid #c8bfa9;overflow:hidden}
#object-viewer{position:absolute;inset:0}#object-viewer iframe{position:absolute;inset:0;width:100%;height:100%;border:0}.viewer-poster{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;opacity:.8}
#viewer-status{position:absolute;left:20px;right:20px;bottom:24px;display:flex;justify-content:center;align-items:center;flex-wrap:wrap;gap:12px;padding:12px 16px;background:#f6f2e9ed;color:#514934;border:1px solid #bdb099;font-size:14px;pointer-events:none}#viewer-retry{pointer-events:auto;background:#37412e;color:#fff;border:0;padding:10px 14px}
.detail-copy{padding:65px 34px 36px;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;background:#f3efe4}.detail-copy h2{font-size:clamp(29px,3vw,44px);line-height:1.13;margin:0 0 20px;overflow-wrap:break-word}.detail-copy #object-dating{font-size:17px;color:#6c583a;font-weight:600}.detail-copy #object-description{font-size:17px;line-height:1.75;white-space:pre-line}.detail-copy #object-details{font-size:14px;line-height:1.6;color:#6f715f;margin-top:28px}.detail-copy .divider{margin:24px 0}
dialog::backdrop{background:#1b211970;backdrop-filter:blur(9px);-webkit-backdrop-filter:blur(9px)}#about-dialog{width:min(650px,92vw)}#about-text{white-space:pre-line;font-size:17px;line-height:1.8}.text-button{background:transparent;border:0;border-bottom:1px solid #7a705b;padding:6px 0;font:16px Georgia;color:#4e593c}
.touch-help{display:none}.touch-mode .touch-help{display:block}.touch-mode .desktop-help{display:none}.touch-mode .key-guide,.touch-mode #move-button,.touch-mode .edition{display:none}.touch-mode .topbar{padding:20px 24px}.touch-mode .identity strong{font-size:27px}.touch-mode .icon-button{width:44px;height:44px}.touch-mode .welcome{top:145px;left:6%;width:410px;max-height:calc(100dvh - 245px);overflow-y:auto}.touch-mode .welcome h1{font-size:43px}.touch-mode .welcome>p{font-size:15px}.touch-mode .welcome-controls{font-size:13px}.touch-mode .room-card{top:116px;bottom:auto;left:24px;padding:12px 16px}.touch-mode .room-card h2{font-size:23px;margin-top:7px}.touch-mode .room-card .eyebrow{font-size:9px}.touch-mode .map-card{top:116px;bottom:auto;right:24px;width:126px;padding:12px}.touch-mode #minimap{width:90px;height:123px;margin:8px auto}.touch-mode .map-legend{display:none}.touch-mode .map-heading .eyebrow{font-size:7px}.touch-mode .controlbar{min-height:64px;justify-content:flex-end;padding:10px 24px calc(10px + env(safe-area-inset-bottom));gap:10px}.touch-mode .bottom-actions button,.touch-mode .bottom-actions select{min-height:44px;font-size:13px;padding:9px 12px}.touch-mode #object-actions{top:auto;bottom:90px;max-width:calc(100vw - 350px);white-space:normal;font-size:16px;padding:14px 20px}.touch-mode #object-actions kbd{display:none}
#touch-controls{position:fixed;inset:0;pointer-events:none;display:none;z-index:2}.touch-mode.tour-active:not(.modal-open) #touch-controls{display:block}#walk-pad{position:absolute;left:24px;bottom:calc(94px + env(safe-area-inset-bottom));width:144px;height:144px;border:1px solid #b3b69c99;border-radius:50%;background:radial-gradient(circle,#29342688,#192019b8);box-shadow:0 5px 25px #0003;touch-action:none;user-select:none;-webkit-user-select:none;pointer-events:auto;cursor:grab}#walk-pad.active{border-color:#e2d2a5;background:#303d2ab8}#walk-knob{position:absolute;left:calc(50% - 20px);top:calc(50% - 20px);width:40px;height:40px;border:1px solid #c5bfa4;border-radius:50%;background:#c6c3a8d9;box-shadow:0 2px 8px #0004;pointer-events:none}.pad-direction{position:absolute;display:grid;place-items:center;width:24px;height:24px;color:#ecead7ac;pointer-events:none}.pad-direction svg{display:block;width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}.pad-direction.north{top:9px;left:50%;transform:translateX(-50%)}.pad-direction.south{bottom:9px;left:50%;transform:translateX(-50%)}.pad-direction.west{left:9px;top:50%;transform:translateY(-50%)}.pad-direction.east{right:9px;top:50%;transform:translateY(-50%)}.pad-direction.east svg{transform:rotate(90deg)}.pad-direction.south svg{transform:rotate(180deg)}.pad-direction.west svg{transform:rotate(-90deg)}#touch-speed{position:absolute;left:184px;bottom:calc(104px + env(safe-area-inset-bottom));min-height:46px;padding:10px 16px;border:1px solid #a6aa91;background:#273024e8;color:#efecdb;border-radius:23px;font-size:14px;pointer-events:auto;touch-action:manipulation}#touch-speed[aria-pressed=true]{background:#d0c49f;color:#2f3928}.look-hint{position:absolute;right:28px;bottom:calc(120px + env(safe-area-inset-bottom));font-size:13px;line-height:1.7;color:#f2ebd5;text-align:right;text-shadow:0 2px 4px #000;pointer-events:none}.touch-mode #help-dialog{width:min(600px,92vw)}.touch-mode #help-dialog dt,.touch-mode #help-dialog dd{font-size:16px}
@media(max-width:900px){#object-dialog[open]{grid-template-columns:minmax(0,1.2fr) minmax(290px,1fr)}.detail-copy{padding:68px 24px 25px}.detail-copy #object-description{font-size:16px}.identity strong{font-size:24px}.identity-subtitle{font-size:15px}}
@media(orientation:portrait),(max-width:650px){#object-dialog[open]{display:flex;flex-direction:column}#object-dialog .detail-model{flex:0 0 52%;min-height:240px;border-right:0;border-bottom:1px solid #c8bfa9}.detail-copy{flex:1;min-height:0;padding:22px 26px 26px}.detail-copy h2{font-size:32px;margin-bottom:12px}.detail-copy #object-dating{font-size:16px}.detail-copy .divider{margin:16px 0}.detail-copy #object-description{font-size:17px;margin-top:0}.touch-mode .map-card{display:none}.touch-mode .welcome{left:5%;right:5%;width:auto;max-width:480px}.touch-mode .look-hint{bottom:260px}.touch-mode #object-actions{bottom:260px;max-width:70vw}.touch-mode .room-card h2{font-size:21px}}
@media(max-height:650px){.touch-mode .welcome{top:105px;max-height:calc(100dvh - 180px);padding:20px}.touch-mode .welcome h1{font-size:32px}.touch-mode .room-card{top:105px}.touch-mode .room-card h2{font-size:19px}.touch-mode .map-card{display:none}.touch-mode #walk-pad{bottom:78px;width:128px;height:128px}.touch-mode #touch-speed{left:170px;bottom:90px}.touch-mode .look-hint{display:none}.touch-mode #object-actions{bottom:85px}}

/* Visible, indeterminate loading feedback; no invented percentage. */
#viewer-status{column-gap:12px;row-gap:10px;padding:15px 20px;box-shadow:0 4px 20px #302b1910}
.loading-spinner{flex:0 0 24px;width:24px;height:24px;border:2px solid #cfc2a6;border-top-color:#82612f;border-right-color:#82612f;border-radius:50%;animation:museum-loading-spin .9s linear infinite}
#viewer-message{line-height:1.5}
.loading-track{flex-basis:100%;height:3px;overflow:hidden;border-radius:2px;background:#d9cfbb}
.loading-track i{display:block;width:35%;height:100%;border-radius:2px;background:#977342;animation:museum-loading-travel 1.7s ease-in-out infinite}
#viewer-status:not([data-state=loading]) .loading-spinner{display:none}
@keyframes museum-loading-spin{to{transform:rotate(360deg)}}
@keyframes museum-loading-travel{0%{transform:translateX(-110%)}100%{transform:translateX(390%)}}
@media(prefers-reduced-motion:reduce){.loading-spinner,.loading-track i{animation:none}.loading-track i{width:100%;opacity:.45}}

/* The mouse mode is explicit even when pointer lock is unavailable. */
.bottom-actions #move-button[aria-pressed=false]{background:#252d23;color:#e4e7d5;border-color:#818b70}
.bottom-actions #move-button[aria-pressed=true]{background:#d5c294;color:#262c20;border-color:#e7d6ac;box-shadow:inset 0 0 0 1px #f4e6c5}
body.free-look #scene{cursor:crosshair}

/* Persistent desktop tempo, matching the mouse-look switch. */
.bottom-actions #run-button{white-space:nowrap;background:#252d23;color:#e4e7d5;border-color:#818b70}
.bottom-actions #run-button[aria-pressed=true]{background:#d5c294;color:#262c20;border-color:#e7d6ac;box-shadow:inset 0 0 0 1px #f4e6c5}
.touch-mode #run-button{display:none}
.controlbar{flex-wrap:wrap}
.bottom-actions{margin-left:auto}

/* The object action replaces the look hint; they never share the same space. */
.touch-mode #object-actions:not([hidden]) ~ #touch-controls .look-hint{display:none}
.touch-mode #object-actions{line-height:1.35;overflow-wrap:anywhere}
@media(orientation:portrait),(max-width:650px){
  .touch-mode #object-actions{bottom:calc(260px + env(safe-area-inset-bottom));max-width:calc(100vw - 40px);width:max-content}
  .touch-mode .look-hint{left:20px;right:20px;bottom:calc(260px + env(safe-area-inset-bottom));text-align:center}
}
@media(max-width:650px){
  .touch-mode .topbar{padding-left:max(16px,env(safe-area-inset-left));padding-right:max(16px,env(safe-area-inset-right));gap:12px}
  .touch-mode .identity{min-width:0}
  .touch-mode .identity strong{font-size:clamp(22px,6vw,27px)}
  .touch-mode .top-actions{flex-shrink:0}
  .touch-mode .room-card{left:16px;max-width:calc(100vw - 32px)}
  .touch-mode .controlbar{padding-left:16px;padding-right:16px}
  .touch-mode #walk-pad{left:max(16px,env(safe-area-inset-left));bottom:calc(82px + env(safe-area-inset-bottom));width:128px;height:128px}
  .touch-mode #touch-speed{left:160px;bottom:calc(98px + env(safe-area-inset-bottom));max-width:calc(100vw - 176px);padding:10px 13px}
  .touch-mode #object-actions,.touch-mode .look-hint{bottom:calc(226px + env(safe-area-inset-bottom))}
  .touch-mode #object-actions{padding:12px 16px}
}
@media(max-height:650px) and (orientation:landscape){
  .touch-mode #walk-pad{left:max(16px,env(safe-area-inset-left));bottom:calc(78px + env(safe-area-inset-bottom))}
  .touch-mode #touch-speed{left:170px;bottom:calc(90px + env(safe-area-inset-bottom));max-width:140px}
  .touch-mode #object-actions{left:326px;right:20px;bottom:calc(85px + env(safe-area-inset-bottom));transform:none;width:auto;max-width:none}
}
@media(max-height:420px) and (orientation:landscape){
  .touch-mode .room-card{left:auto;right:16px;top:98px;padding:8px 12px;max-width:calc(100vw - 186px)}
  .touch-mode .room-card h2{font-size:16px;margin-top:3px}
}

/* Safari's browser bars must never sample the old light page background. */
:root{background:#171d18;color-scheme:dark}
html,body{background:#171d18;color-scheme:dark;width:100%;height:100%;overflow:hidden;overscroll-behavior:none}
dialog,.welcome{color-scheme:light}
#museum{background:#171d18;isolation:isolate;overflow:hidden;height:100dvh}
#scene{position:absolute;inset:0;width:100%;height:100%;background:#171d18}
.controlbar{min-height:50px;padding:7px 24px;gap:10px}
.bottom-actions button,.bottom-actions select{padding:8px 11px;min-height:34px}
.touch-mode .controlbar{min-height:54px;padding:5px max(16px,env(safe-area-inset-right)) calc(5px + env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left))}
.touch-mode .bottom-actions button,.touch-mode .bottom-actions select{min-height:44px;padding:7px 11px}
.map-legend{gap:4px;flex-wrap:wrap}
.room-preview{gap:18px;flex-wrap:wrap}
#room-transition{position:fixed;inset:0;z-index:30;display:grid;place-items:center;background:#171d18;color:#ece7d6;font:24px Georgia,serif}
@media(max-width:650px){.room-preview{gap:12px;font-size:9px}.room-preview b{font-size:10px}}

/* A quiet reading sheet; the same text is on the framed workshop wall. */
body:not(.touch-mode) #object-actions[data-kind=biography]{top:auto;bottom:76px}
#biography-dialog{width:min(740px,94vw);max-height:90dvh;padding:0;border:1px solid #b6a17c;background:#f3edde;color:#302b22;box-shadow:0 20px 90px #0008;overflow:auto;overscroll-behavior:contain}
#biography-dialog .dialog-close{position:sticky;display:grid;place-items:center;top:12px;margin:12px 12px 0 auto;right:auto;width:44px;height:44px;font:30px Arial;line-height:1;background:#f3edde;border:1px solid #b6a17c;border-radius:50%;color:#302b22;z-index:2}
.biography-copy{padding:0 clamp(24px,5vw,54px) 38px}
.biography-copy>.eyebrow{color:#77603d;font-size:11px;letter-spacing:2.4px}
#biography-title{font:normal clamp(29px,5vw,43px)/1.13 Georgia,serif;margin:14px 0 12px;letter-spacing:-.5px}
.biography-dates{font:17px/1.6 Georgia,serif;color:#685534;margin:0 0 27px;padding-bottom:24px;border-bottom:1px solid #cbbd9e}
#biography-text p{font:18px/1.75 Arial,Helvetica,sans-serif;margin:0 0 20px}
.biography-references{margin-top:28px;border-top:1px solid #cbbd9e;padding-top:16px;font-size:14px;color:#685534}
.biography-references summary{cursor:pointer;padding:6px 0}
#biography-sources{display:grid;gap:12px;padding-top:12px}
#biography-sources a{color:#65502e;line-height:1.5;text-underline-offset:3px}
@media(max-width:500px){#biography-dialog{max-height:92dvh}.biography-copy{padding:0 24px 28px}.biography-dates{font-size:16px}#biography-text p{font-size:17px;line-height:1.7}}

#door-status{position:absolute;left:50%;bottom:80px;transform:translateX(-50%);width:min(400px,calc(100% - 32px));padding:16px 22px;background:#20281fee;border:1px solid #a79870;color:#f1ead7;box-shadow:0 6px 30px #0004;text-align:center;z-index:4;pointer-events:none}
#door-destination{display:block;font:23px/1.2 Georgia,serif;margin-bottom:8px}
#door-message{display:block;font-size:14px;line-height:1.5}
#door-message::before{content:'';display:inline-block;width:12px;height:12px;margin-right:9px;vertical-align:-2px;border:2px solid #d0c19b50;border-top-color:#d0c19b;border-radius:50%;animation:door-spin 1s linear infinite}
#door-status[data-state=error] #door-message::before{display:none}
#door-progress{display:block;width:100%;height:5px;margin:13px 0 0;border:0;accent-color:#c8b789;background:#626753}
#door-progress::-webkit-progress-bar{background:#626753}#door-progress::-webkit-progress-value{background:#c8b789;transition:width .2s}
#door-progress:not([value]){background:linear-gradient(90deg,#626753 0%,#c8b789 50%,#626753 100%);background-size:200% 100%;animation:door-loading 1.5s linear infinite}
#door-retry{pointer-events:auto;min-height:44px;margin-top:12px;padding:8px 16px;border:1px solid #b4a57c;background:#d3c69f;color:#242b21;font:14px Arial}
.touch-mode #door-status{bottom:calc(228px + env(safe-area-inset-bottom))}
.touch-mode #door-status:not([hidden]) ~ #touch-controls .look-hint{display:none}
@keyframes door-loading{to{background-position:-200% 0}}
@keyframes door-spin{to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){#door-progress:not([value]),#door-message::before{animation:none}}
@media(max-height:500px) and (orientation:landscape){.touch-mode #door-status{left:auto;right:18px;bottom:80px;transform:none;width:min(340px,42vw)}}

/* Never expose the outdoor panorama before the enclosing room is rendered. */
#scene{opacity:0}body.scene-ready #scene{opacity:1}
#collection-loading{position:absolute;left:50%;bottom:80px;transform:translateX(-50%);width:min(400px,calc(100% - 32px));padding:13px 18px;border:1px solid #a79870;background:#20281fee;color:#f1ead7;box-shadow:0 6px 30px #0004;text-align:center;font-size:13px;line-height:1.45;pointer-events:none;z-index:4}
#collection-destination{display:block;font:20px/1.2 Georgia,serif;margin-bottom:7px}
#collection-message{display:block}
#collection-loading[data-state=loading] #collection-message::before{content:'';display:inline-block;width:11px;height:11px;margin-right:8px;vertical-align:-2px;border:2px solid #d0c19b50;border-top-color:#d0c19b;border-radius:50%;animation:door-spin 1s linear infinite}
#collection-loading[data-state=ready] #collection-message::before{content:'✓';margin-right:8px;color:#c8d2a6}
#collection-progress{display:block;width:100%;height:4px;margin:10px 0 0;border:0;accent-color:#c8b789;background:#626753}
#collection-progress::-webkit-progress-bar{background:#626753}#collection-progress::-webkit-progress-value{background:#c8b789;transition:width .2s}
#collection-progress:not([value]){background:linear-gradient(90deg,#626753 0%,#c8b789 50%,#626753 100%);background-size:200% 100%;animation:door-loading 1.5s linear infinite}
.touch-mode #collection-loading{bottom:calc(228px + env(safe-area-inset-bottom))}
#collection-loading:not([hidden]) ~ #touch-controls .look-hint{display:none}
@media(prefers-reduced-motion:reduce){#collection-progress:not([value]),#collection-loading[data-state=loading] #collection-message::before{animation:none}}
@media(max-height:500px) and (orientation:landscape){.touch-mode #collection-loading{bottom:70px;width:min(360px,46vw);padding:8px 12px}.touch-mode #collection-destination{font-size:17px}}

/* Compact entrance: no inventories or room lists; progress and entry always remain reachable. */
.welcome h1{margin-top:0}
.touch-mode .welcome{top:120px;max-height:calc(100dvh - 138px - env(safe-area-inset-bottom));padding:24px 28px;overscroll-behavior:contain}
.touch-mode .welcome h1{font-size:38px;line-height:1.06;margin:0 0 16px}
.touch-mode .welcome>p{font-size:14px;line-height:1.55;margin-bottom:20px}
.touch-mode .welcome .welcome-note{font-size:11px;margin:12px 0 0}
.touch-mode .welcome .primary{min-height:44px;font-size:14px}
.touch-mode .loading-line{font-size:11px;align-items:flex-end}
#load-count{white-space:nowrap}
.touch-mode:not(.tour-active) .controlbar,.touch-mode:not(.tour-active) .map-card{display:none}
.touch-mode .controlbar{min-height:0;padding:1px max(16px,env(safe-area-inset-right)) calc(1px + env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left));gap:6px}
.touch-mode .bottom-actions{flex-wrap:nowrap;gap:8px}
.touch-mode .bottom-actions button,.touch-mode .bottom-actions select{min-height:44px;padding:5px 10px;font-size:12px}
/* A persistent two-choice control: the highlighted word is the selected speed. */
#touch-speed{display:flex;gap:2px;padding:3px;min-height:0;border-radius:24px;max-width:none}
#touch-speed button{border:0;border-radius:20px;min-width:68px;min-height:44px;padding:9px 12px;background:transparent;color:#eee9dc;font-size:14px;touch-action:manipulation;pointer-events:auto}
#touch-speed button[aria-pressed=true]{background:#d0c49f;color:#2f3928}
.touch-mode #touch-speed{padding:3px;max-width:none}
@media(max-width:650px){.touch-mode #touch-speed{left:156px}.touch-mode #touch-speed button{min-width:62px;padding:9px 10px}.touch-mode .welcome{left:16px;right:16px;width:auto;padding:22px;max-width:480px}}
@media(max-height:650px){.touch-mode .welcome{top:108px;max-height:calc(100dvh - 122px - env(safe-area-inset-bottom));padding:18px 24px}.touch-mode .welcome h1{font-size:32px;margin-bottom:12px}.touch-mode .welcome>p{font-size:13px;margin-bottom:14px}}
@media(max-height:500px) and (orientation:landscape){.touch-mode .welcome{width:min(540px,70vw);max-width:none;padding:15px 22px}.touch-mode .welcome h1{font-size:28px;margin-bottom:10px}.touch-mode .welcome h1 br{display:none}.touch-mode .welcome h1 br::after{content:' '}.touch-mode .welcome .welcome-note{display:none!important}}

/* Clear loading feedback, including against a fully rendered exhibition. */
.welcome{background:#f5f2e9;box-shadow:0 16px 64px #0006}
.entrance-progress{margin-top:14px;padding:14px 16px 16px;border:1px solid #57624a;background:#253021;color:#f7f1de;border-radius:4px}
.entrance-progress .loading-line,.touch-mode .entrance-progress .loading-line{color:#f7f1de;font-size:13px;line-height:1.45;margin:0 0 12px;align-items:center}
#load-label{display:flex;gap:10px;align-items:center}
body:not(.museum-ready) #load-label::before{content:'';flex:0 0 18px;width:18px;height:18px;border:2px solid #ffffff50;border-top-color:#f2dca6;border-radius:50%;animation:museum-loading-spin .9s linear infinite}
#load-count{font-weight:700;font-variant-numeric:tabular-nums}
.entrance-progress .progress{height:10px;background:#59634e;border-radius:6px;overflow:hidden}
.entrance-progress .progress span{background:#e4ca88;border-radius:6px;min-width:5px}
.entrance-progress .progress.indeterminate span{width:35%!important;animation:museum-loading-travel 1.7s ease-in-out infinite}
#door-status,#collection-loading{background:#20281f;border:2px solid #d8c293;box-shadow:0 6px 30px #0009}
#door-progress,#collection-progress{height:9px;border-radius:5px;overflow:hidden}
.touch-mode .look-hint{opacity:0;visibility:hidden;transition:opacity .35s,visibility .35s}
.touch-mode.touch-introduction .look-hint{opacity:1;visibility:visible}
/* Symmetric padding keeps the controls away from the upper rule. The safe
   area is outside that row, where Safari places its home indicator. */
.touch-mode .controlbar{min-height:60px;padding:8px max(16px,env(safe-area-inset-right)) calc(8px + env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left));align-items:center}
.touch-mode .bottom-actions{align-self:center;align-items:center;margin-top:0;margin-bottom:0}
@media(max-height:650px){.touch-mode .entrance-progress{padding:10px 12px;margin-top:10px}.touch-mode .entrance-progress .loading-line{font-size:12px;margin-bottom:8px}}
@media(prefers-reduced-motion:reduce){body:not(.museum-ready) #load-label::before,.entrance-progress .progress.indeterminate span{animation:none}.touch-mode .look-hint{transition:none}}

/* Keep the last rendered room visible while its presentation is rebuilt. */
#quality-preview{position:fixed;inset:0;width:100%;height:100%;display:block;pointer-events:none}
#quality-status{position:fixed;left:50%;bottom:82px;transform:translateX(-50%);z-index:10;width:min(420px,calc(100vw - 32px));padding:14px 18px;background:#20281f;color:#f7f1de;border:2px solid #d8c293;box-shadow:0 6px 30px #0007;text-align:center;font-size:14px;pointer-events:none}
#quality-message{display:block;line-height:1.4}
#quality-progress{display:block;width:100%;height:9px;margin-top:10px;border:0;border-radius:5px;overflow:hidden;accent-color:#e4ca88;background:#59634e}
#quality-progress::-webkit-progress-bar{background:#59634e}#quality-progress::-webkit-progress-value{background:#e4ca88}
.welcome .automatic-entry{font-size:13px;margin:0 0 12px}
.map-legend{display:none}
#map-toggle{display:block;width:100%;padding:0;border:0;background:transparent;color:#ece7d6;cursor:zoom-in;touch-action:manipulation}
#map-toggle-label{display:block;font-size:12px;line-height:1.4;padding:4px 0}
#map-close{min-height:44px;width:100%;margin-top:16px;border:1px solid #a9af91;background:#303a2b;color:#f5f0df;font-size:15px;touch-action:manipulation}
body:not(.tour-active) #map-card{display:none}
body .map-card.map-expanded{--map-image-height:372px;display:block;position:fixed;z-index:15;left:auto;top:auto;right:clamp(16px,2.5vw,36px);bottom:calc(103px + env(safe-area-inset-bottom));transform:none;width:min(364px,calc(100vw - 32px));max-height:calc(100dvh - 140px - env(safe-area-inset-bottom));padding:16px;overflow-y:auto;background:#20251efc;box-shadow:0 8px 32px #0006}
body .map-expanded .map-heading{display:flex}body .map-expanded .map-heading .eyebrow{font-size:12px}
body .map-expanded #quality-badge{font-size:10px}
body .map-expanded #minimap{display:block;width:auto;height:min(var(--map-image-height),calc(100dvh - 380px - env(safe-area-inset-bottom)));max-width:100%;margin:10px auto}
body .map-expanded #map-toggle{cursor:zoom-out}
body .map-expanded #map-toggle-label{display:none}
body .map-expanded .map-legend{display:grid;grid-template-columns:1fr;gap:6px;font-size:14px;line-height:1.4;color:#ece7d6}
body.touch-mode .map-card.map-expanded{--map-image-height:246px;width:min(252px,calc(100vw - 32px));right:16px;bottom:calc(82px + env(safe-area-inset-bottom));padding:14px;max-height:calc(100dvh - 110px - env(safe-area-inset-bottom))}
.map-legend b{display:inline-block;min-width:30px;color:#c9c19e}

@media(max-width:700px),(max-height:650px){body .map-card:not(.map-expanded){display:block;top:auto;bottom:calc(82px + env(safe-area-inset-bottom));right:16px;width:auto;padding:7px 12px}body .map-card:not(.map-expanded) .map-heading,body .map-card:not(.map-expanded) #minimap{display:none}body .map-card:not(.map-expanded) #map-toggle{min-height:30px}body .map-card:not(.map-expanded) #map-toggle-label{font-size:13px}}
@media(orientation:portrait){body.touch-mode .map-card:not(.map-expanded){display:block;top:auto;bottom:calc(82px + env(safe-area-inset-bottom));right:16px;width:auto;padding:7px 12px}body.touch-mode .map-card:not(.map-expanded) .map-heading,body.touch-mode .map-card:not(.map-expanded) #minimap{display:none}body.touch-mode .map-card:not(.map-expanded) #map-toggle{min-height:30px}}
body.touch-mode #quality-status{bottom:calc(235px + env(safe-area-inset-bottom))}
@media(max-height:500px) and (orientation:landscape){body.touch-mode #quality-status{bottom:76px;width:min(380px,50vw)}body .map-card.map-expanded{display:grid;grid-template-columns:86px minmax(0,1fr);gap:10px;width:min(364px,calc(100vw - 32px));bottom:calc(76px + env(safe-area-inset-bottom));padding:12px}body .map-expanded .map-heading,body .map-expanded #map-close{grid-column:1 / -1}body .map-expanded #minimap{height:118px;margin:0 auto}body .map-expanded .map-legend{grid-template-columns:1fr;font-size:12px;gap:5px;align-content:center}body .map-expanded #map-close{margin-top:0}}

/* Readable help for both input methods, with a close control that stays in view. */
body #help-button{width:auto;min-width:70px;height:44px;padding:0 16px;border-radius:24px;font-size:14px;font-weight:600;flex-shrink:0}
body #help-dialog{width:min(680px,92vw);max-height:86dvh;padding:0 28px 20px;overscroll-behavior:contain}
#help-dialog .help-heading{position:sticky;top:0;z-index:1;display:flex;align-items:center;justify-content:space-between;gap:12px;background:var(--paper);padding:18px 0 14px;border-bottom:1px solid var(--line)}
#help-dialog .help-heading h2{font:30px/1.15 Georgia,serif;margin:0}
#help-dialog .dialog-close{position:static;flex:0 0 44px;width:44px;height:44px;display:grid;place-items:center;border:1px solid #b4b6a6;border-radius:50%;font:28px/1 Arial}
#help-dialog h3{font:24px/1.25 Georgia,serif;margin:26px 0 14px}
#help-dialog dl{margin:0}
body #help-dialog dt{font-size:15px;margin-top:16px}
body #help-dialog dd{font-size:15px;line-height:1.6;margin:5px 0 0;color:#505b49}
#help-dialog section+section{margin-top:24px;border-top:1px solid var(--line)}
#help-dialog .motion-option{padding-top:20px;border-top:1px solid var(--line);line-height:1.5;align-items:flex-start}
#help-dialog .motion-option input{flex-shrink:0;margin-top:3px}
@media(max-width:650px){.topbar .identity{min-width:0;flex:1;padding-right:12px}.topbar .identity strong{font-size:clamp(19px,5.2vw,23px)}.topbar .eyebrow{font-size:9px;letter-spacing:1.5px}.topbar .top-actions{flex-shrink:0;gap:8px}body #help-button{min-width:64px;padding:0 12px}body #help-dialog{padding:0 20px 16px}#help-dialog .help-heading h2{font-size:25px}#help-dialog h3{font-size:23px}}


/* Compact audio controls remain available while the museum is loading. */
.audio-button{min-height:44px;border:1px solid #899275;border-radius:24px;background:#222a23ed;color:#eee9da;font:14px Arial,sans-serif;padding:10px 16px;touch-action:manipulation;cursor:pointer;white-space:nowrap;flex-shrink:0}
#audio-player{position:fixed;top:88px;right:36px;z-index:5;width:280px;padding:12px 14px 10px;background:#20281ff2;color:#eee9da;border:1px solid #899275;border-radius:12px;box-shadow:0 4px 16px #0003}
.audio-player-heading{display:flex;align-items:baseline;gap:8px;justify-content:space-between;min-height:20px}
#audio-title{font-size:14px;font-weight:500;line-height:1.4}
#audio-status{font-size:11px;line-height:1.3;color:#e1cf9d;text-align:right}
.audio-player-controls{display:flex;align-items:center;gap:4px;margin-top:4px}
#audio-player button,#object-audio{flex-shrink:0;display:grid;place-items:center;width:44px;height:44px;border:1px solid #79886c;background:#303b2e;color:#f0eddf;border-radius:50%;padding:10px;touch-action:manipulation}
#audio-player button:disabled{cursor:default;opacity:.4}
#audio-player button svg{width:20px;height:20px;fill:currentColor}
.audio-timeline{flex:1;min-width:0;padding-left:7px}
#audio-seek{display:block;width:100%;height:26px;margin:0;accent-color:#d8c491;cursor:pointer;touch-action:pan-y}
#audio-seek:focus-visible{outline:2px solid #d8c491;outline-offset:2px}
.audio-times{display:flex;justify-content:space-between;font-size:11px;font-variant-numeric:tabular-nums;color:#e0dece}
body.modal-open #audio-player{visibility:hidden}
body.modal-open #object-dialog #audio-player,body.modal-open #biography-dialog #audio-player,body.modal-open #about-dialog #audio-player{position:static;width:100%;margin:12px 0 10px;padding:7px 0 10px;visibility:visible;box-shadow:none;background:transparent;color:#655d4e;border:0;border-radius:0}
dialog #audio-player .audio-player-heading{min-height:16px}
dialog #audio-player #audio-title{font-size:12px;font-weight:400;color:#716956}
dialog #audio-player .audio-player-controls{gap:1px;margin-top:1px}
dialog #audio-player button{width:32px;height:32px;padding:8px;border:0;background:transparent;color:#6b614d}
dialog #audio-player button:hover:not(:disabled){background:#e6e0d2}
dialog #audio-player button svg{width:16px;height:16px}
dialog #audio-player .audio-times{font-size:10px;color:#7b7262}
dialog #audio-player #audio-status{font-size:10px;color:#806746}
dialog #audio-player #audio-seek{height:18px;accent-color:#93866d}
body.touch-mode dialog #audio-player button{width:44px;height:44px;padding:13px}
body.touch-mode.map-open .look-hint{visibility:hidden}
/* The object action and speaker share one target, without opening the viewer. */
body #object-actions{display:flex;align-items:center;gap:8px;padding:0;z-index:4;background:transparent;border:0;box-shadow:none;width:max-content;max-width:none}
body #object-prompt{position:static;display:grid;place-items:center;flex:0 0 44px;width:44px;height:44px;min-height:44px;padding:9px;border:1px solid #79886c;border-radius:50%;background:#303b2eed;color:#f0eddf;cursor:pointer}
#object-prompt svg{width:26px;height:26px;fill:none;stroke:currentColor;stroke-width:1.45;stroke-linecap:round;stroke-linejoin:round}
#object-prompt:hover,#object-audio:hover{background:#47543fee;border-color:#c6c9aa}
#object-prompt kbd{margin-right:10px}
#object-audio svg,#map-card svg{width:23px;height:23px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
#map-toggle-label{display:flex;justify-content:center;align-items:center;min-height:36px;padding:0}
body .map-card #map-close{position:absolute;top:7px;right:7px;width:40px;min-height:40px;margin:0;padding:8px;border-radius:50%;display:grid;place-items:center}
body .map-expanded .map-heading{padding-right:35px}
body .map-expanded #minimap{height:min(var(--map-image-height),calc(100dvh - 330px - env(safe-area-inset-bottom)))}
@media(max-width:650px){
  .topbar,.touch-mode .topbar{align-items:flex-start;padding:16px}
  .topbar .top-actions{display:flex;flex-direction:column;align-items:stretch;gap:6px}
  .topbar #help-button{order:0}.topbar .audio-button{order:1;max-width:102px;white-space:normal;padding:7px 10px;font-size:12px}
  .topbar #fullscreen-button{display:none}
  #audio-player{top:120px;right:16px;width:244px;padding:9px 12px}
  body:not(.tour-active) .welcome{top:232px;max-height:calc(100dvh - 248px);overflow-y:auto}
  body.touch-mode .room-card{top:220px}
  body.touch-mode .map-card.map-expanded{width:min(210px,calc(100vw - 160px));padding:12px;bottom:calc(192px + env(safe-area-inset-bottom))}
  body.touch-mode .map-expanded .map-legend{font-size:12px;gap:4px}
  body.touch-mode .map-expanded .map-heading .eyebrow{font-size:10px;letter-spacing:1px}
  body.touch-mode .map-expanded #quality-badge{display:none}
  body.touch-mode .map-expanded #minimap{height:132px}
  body.touch-mode.map-open #object-actions{visibility:hidden}
}
@media(max-width:360px) and (orientation:portrait){body.touch-mode .map-card:not(.map-expanded){bottom:calc(166px + env(safe-area-inset-bottom))}}
@media(max-height:500px) and (orientation:landscape){
  #audio-player{top:76px;right:16px;width:250px;padding:7px 10px}
  body.touch-mode .room-card{left:16px;right:auto;top:100px;max-width:calc(100vw - 360px)}
  body .map-card.map-expanded,body.touch-mode .map-card.map-expanded{right:16px;bottom:76px;width:min(350px,calc(100vw - 360px));padding:10px;grid-template-columns:70px minmax(0,1fr)}
  body .map-expanded #minimap{height:88px}
  body .map-expanded .map-heading{grid-column:1 / -1}
  body:not(.tour-active) .welcome{top:106px;max-height:calc(100dvh - 120px)}
}

/* The collapsed plan floats directly over the room, without a panel around it. */
body .map-card:not(.map-expanded),body.touch-mode .map-card:not(.map-expanded){width:128px;padding:0;background:transparent;border:0;box-shadow:none;backdrop-filter:none;overflow:visible}
body .map-card:not(.map-expanded) .map-heading{display:none}
body .map-card:not(.map-expanded) #minimap{width:128px;height:176px;margin:0;border:1px solid #bdbb9e90;border-radius:3px;box-shadow:0 2px 9px #0002}
body .map-card:not(.map-expanded) #map-toggle{position:relative;min-height:0}
body .map-card:not(.map-expanded) #map-toggle-label{position:absolute;right:-10px;bottom:-10px;display:grid;place-items:center;width:34px;height:34px;min-height:34px;padding:6px;border:1px solid #bdb8a0;border-radius:50%;background:#ebe5d5;color:#4b5344;box-shadow:0 2px 8px #0002}
body .map-card #map-close{border:1px solid #a5aa92;background:#303a2b;color:#f0eddf}
@media(max-width:700px),(max-height:650px){
  body .map-card:not(.map-expanded),body.touch-mode .map-card:not(.map-expanded){width:44px}
  body .map-card:not(.map-expanded) #map-toggle-label{position:static;width:44px;height:44px;background:#242c22e8;color:#ece7d6;border-color:#899275;padding:10px}
}
@media(orientation:portrait){
  body.touch-mode .map-card:not(.map-expanded){width:44px}
  body.touch-mode .map-card:not(.map-expanded) #map-toggle-label{position:static;width:44px;height:44px;background:#242c22e8;color:#ece7d6;border-color:#899275;padding:10px}
}

/* Object-local actions follow the projected model base, including on touch. */
#object-hotspots{position:fixed;inset:0;pointer-events:none;z-index:4}
.modal-open #object-hotspots{visibility:hidden}
.hotspot-actions{position:absolute;transform:translateX(-50%);display:flex;gap:8px;align-items:center;width:max-content;pointer-events:auto}
.hotspot-actions button{display:grid;place-items:center;flex:0 0 44px;width:44px;height:44px;min-height:44px;border:1px solid #79886c;border-radius:50%;padding:9px;background:#303b2eed;color:#f0eddf;touch-action:manipulation;box-shadow:0 2px 8px #0003}
.hotspot-actions button:hover{background:#47543fee;border-color:#c6c9aa}
.hotspot-actions svg{width:26px;height:26px;fill:none;stroke:currentColor;stroke-width:1.45;stroke-linecap:round;stroke-linejoin:round}
.hotspot-actions .hotspot-audio svg{width:23px;height:23px;stroke-width:1.6}

/* Phone: one menu, a slim audio strip and two small floating bottom controls. */
#mobile-menu-button{display:none}
body.compact-touch .topbar{height:64px;padding:10px max(12px,env(safe-area-inset-right)) 8px max(12px,env(safe-area-inset-left));align-items:center;gap:10px;background:linear-gradient(#171d18c9,transparent)}
body.compact-touch .topbar .top-actions{display:none}
body.compact-touch .identity .eyebrow{display:none}
body.compact-touch .identity strong{font-size:21px;margin:0;letter-spacing:0}
body.compact-touch .identity-subtitle{font-size:13px;margin-top:2px}
body.compact-touch #mobile-menu-button{display:grid;place-items:center;pointer-events:auto;flex:0 0 44px;width:44px;height:44px;padding:10px;border:1px solid #9da58c99;border-radius:50%;background:#242d22d9;color:#f0eddf}
#mobile-menu-button svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round}
body.compact-touch .controlbar,body.compact-touch .room-card,body.compact-touch .look-hint{display:none}
body.compact-touch #walk-pad{left:max(14px,env(safe-area-inset-left));bottom:calc(16px + env(safe-area-inset-bottom));width:96px;height:96px;background:#25302388;border-color:#d4d7c15c;box-shadow:none}
body.compact-touch #walk-pad.active{background:#253023c9;border-color:#d4d7c1a6}
body.compact-touch #walk-knob{width:30px;height:30px;left:calc(50% - 15px);top:calc(50% - 15px);background:#d6d0b3bd}
body.compact-touch .pad-direction{width:18px;height:18px}
body.compact-touch .pad-direction svg{width:18px;height:18px}
body.compact-touch .pad-direction.north{top:6px}
body.compact-touch .pad-direction.south{bottom:6px}
body.compact-touch .pad-direction.west{left:6px}
body.compact-touch .pad-direction.east{right:6px}
body.compact-touch .map-card:not(.map-expanded){right:max(14px,env(safe-area-inset-right));bottom:calc(18px + env(safe-area-inset-bottom));width:44px}
body.compact-touch .map-card:not(.map-expanded) #minimap{display:none}
body.compact-touch #museum > #audio-player{top:66px;left:max(12px,env(safe-area-inset-left));right:max(12px,env(safe-area-inset-right));width:auto;display:grid;grid-template-columns:minmax(0,1fr) 44px 44px;column-gap:4px;row-gap:0;padding:6px 8px;border-radius:9px;background:#20281fe8;border-color:#a1a88b66;box-shadow:none}
body.compact-touch #museum > #audio-player .audio-player-heading{grid-column:1;grid-row:1;min-height:17px;overflow:hidden}
body.compact-touch #museum > #audio-player #audio-title{font-size:12px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;min-width:0}
body.compact-touch #museum > #audio-player #audio-status{font-size:10px;white-space:nowrap}
body.compact-touch #museum > #audio-player .audio-player-controls{display:contents}
body.compact-touch #museum > #audio-player .audio-timeline{grid-column:1;grid-row:2;padding:0}
body.compact-touch #museum > #audio-player #audio-seek{height:16px}
body.compact-touch #museum > #audio-player .audio-times{font-size:9px}
body.compact-touch #museum > #audio-player button{align-self:center;grid-row:1 / 3;width:44px;height:44px;border:0;background:transparent;padding:12px}
body.compact-touch #museum > #audio-player #audio-play{grid-column:2}
body.compact-touch #museum > #audio-player #audio-stop{grid-column:3}
body.compact-touch #museum > #audio-player button:hover:not(:disabled){background:#ffffff12}
body.compact-touch .welcome{top:142px;max-height:calc(100dvh - 158px - env(safe-area-inset-bottom))}
body.compact-touch .map-card.map-expanded{right:max(14px,env(safe-area-inset-right));bottom:calc(72px + env(safe-area-inset-bottom));width:min(230px,calc(100vw - 130px));max-height:calc(100dvh - 220px);padding:12px}
body.compact-touch .map-expanded #minimap{height:140px;max-width:100%}
body.compact-touch .map-expanded .map-legend{font-size:11px}
body.compact-touch #quality-status,body.compact-touch #door-status,body.compact-touch #collection-loading{bottom:calc(126px + env(safe-area-inset-bottom))}
#mobile-menu{width:min(360px,calc(100vw - 24px));max-height:calc(100dvh - 32px);padding:20px;border-radius:12px;overscroll-behavior:contain}
.mobile-menu-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding-bottom:15px;margin-bottom:4px;border-bottom:1px solid #d5d3c7}
#mobile-menu h2{font-size:28px;margin:0 0 5px}
#mobile-menu .mobile-menu-heading p{font-size:12px;line-height:1.4;color:#777765;margin:0}
#mobile-menu .dialog-close{position:static;display:grid;place-items:center;flex:0 0 44px;width:44px;height:44px;padding:0;border:1px solid #b4b6a6;border-radius:50%;font:28px/1 Arial}
.menu-setting{display:grid;grid-template-columns:75px minmax(0,1fr);gap:12px;align-items:center;padding:10px 0;font-size:14px}
#mobile-menu .audio-button{width:100%;background:#e6e5d8;color:#35432f;border-color:#b5b9a5;border-radius:7px}
#mobile-menu #touch-speed{position:static;width:100%;display:flex;padding:3px;max-width:none;border:1px solid #b5b9a5;border-radius:7px;background:#e6e5d8}
#mobile-menu #touch-speed button{flex:1;min-width:0;padding:8px;min-height:44px;color:#424d3c;border-radius:5px}
#mobile-menu #touch-speed button[aria-pressed=true]{background:#46543b;color:#f7f4e8}
#mobile-menu #quality{width:100%;min-height:44px;padding:8px;border:1px solid #b5b9a5;border-radius:7px;background:#e6e5d8;color:#35432f;font-size:13px}
#menu-navigation{display:flex;flex-wrap:wrap;gap:8px;border-top:1px solid #d5d3c7;padding-top:16px;margin-top:6px}
#mobile-menu #home-button,#mobile-menu #help-button,#mobile-menu #fullscreen-button{position:static;flex:1;min-height:44px;height:auto;width:auto;min-width:80px;padding:10px;border:1px solid #b5b9a5;background:transparent;color:#35432f;border-radius:7px;font:14px Arial}
#mobile-menu #home-button{flex:1.4}
@media(max-height:520px) and (orientation:landscape){
 body.compact-touch #museum > #audio-player{top:10px;left:auto;right:calc(68px + env(safe-area-inset-right));width:min(320px,calc(100vw - 300px))}
 body.compact-touch .map-card.map-expanded{bottom:calc(16px + env(safe-area-inset-bottom));width:260px;max-height:calc(100dvh - 100px);display:grid;grid-template-columns:70px minmax(0,1fr);gap:6px}
 body.compact-touch .map-expanded #minimap{height:100px}
 body.compact-touch .welcome{top:85px;max-height:calc(100dvh - 100px)}
 #mobile-menu{width:min(540px,calc(100vw - 32px));padding:16px 20px}
 #mobile-menu .mobile-menu-heading{padding-bottom:8px;margin-bottom:0}
 #mobile-menu .menu-setting{padding:6px 0}
 #mobile-menu #menu-navigation{padding-top:10px;margin-top:3px}
}

/* Museum controls are actions, so repeated clicks/taps must not select their
   labels. Reading text in the help, biography and object dialogs stays selectable. */
#museum :is(button,select,input[type="range"],input[type="checkbox"],label,summary),
#museum :is(.topbar,.controlbar,.map-card,#audio-player,#touch-controls,#mobile-menu,.room-card,#object-actions,#object-hotspots,#collection-loading,#quality-status,#room-transition,#toast,#door-status,#viewer-status,.loading-line){
 -webkit-user-select:none;
 user-select:none;
 -webkit-touch-callout:none;
}
/* Keep normal taps, scrolling and pinch zoom; suppress double-tap zoom on
   action controls only. The scene and walking pad retain their own gestures. */
#museum :is(button,select,input[type="checkbox"],label,summary){touch-action:manipulation}
