/* Shared controls: warm paper, dark green, and restrained brass accents. */
#immersive-toggle,#help-toggle{min-width:44px}
.fullscreen-backdrop{
  position:fixed;inset:0;z-index:8;width:100%;height:100%;min-height:0;
  margin:0;padding:0;border:0;border-radius:0;background:rgb(12 30 25 / 46%);
  backdrop-filter:blur(4px);cursor:default;animation:control-fade .18s ease-out both;
}
.fullscreen-backdrop:focus-visible{outline:2px solid #c9a867;outline-offset:-5px}
.help-panel.modal-panel{
  position:fixed;z-index:9;top:90px;right:max(40px,env(safe-area-inset-right));
  bottom:auto;left:auto;width:380px;max-width:calc(100% - 32px);
  max-height:calc(100vh - 130px);max-height:calc(100dvh - 130px);
  margin:0;padding:24px;border:1px solid rgb(255 255 255 / 65%);border-radius:16px;
  display:flex;flex-direction:column;overflow:hidden;overscroll-behavior:contain;touch-action:pan-y;
  color:var(--ink);background:var(--paper);color-scheme:light;
  box-shadow:0 24px 80px rgb(9 28 21 / 28%),0 3px 14px rgb(9 28 21 / 8%);
  animation:control-panel-enter .22s cubic-bezier(.2,.8,.25,1) both;
  scroll-padding-block:20px;
}
.modal-panel .help-heading{flex:none;align-items:flex-start;gap:12px;margin:0}
.modal-panel .help-heading>div{min-width:0}
.modal-panel .help-heading .eyebrow{color:#80683e;font-size:8px;line-height:1.6}
.modal-panel .help-heading h2{margin:7px 0 0;font-size:24px;line-height:1.4}
.modal-panel .paper-icon-button{flex:0 0 44px;width:44px;min-width:44px;min-height:44px;margin:-6px -9px 0 0}
.modal-panel :is(button,select,input,a):focus-visible{outline:2px solid #957744;outline-offset:3px}
.modal-panel .paper-icon-button:focus-visible{outline-offset:-3px}
.control-tabs{
  display:grid;flex:none;grid-template-columns:1fr 1fr;gap:4px;margin:21px 0 4px;padding:4px;
  border:1px solid rgb(32 58 54 / 8%);border-radius:9px;background:#eaeade;
}
.control-tabs button{
  display:flex;align-items:center;justify-content:center;min-width:0;min-height:44px;
  padding:8px 14px;border-radius:6px;background:transparent;color:#69756b;
  font-size:12px;font-weight:500;line-height:1.5;letter-spacing:.025em;
}
.control-tabs button[aria-selected=true]{background:var(--paper);color:var(--ink);box-shadow:0 1px 5px rgb(32 58 54 / 10%)}
.control-tabs button:hover{color:var(--ink)}
.control-tabs button:focus-visible{outline-offset:-3px}
.modal-panel .tab-panel{min-width:0;min-height:0;padding:6px 4px 0 0;overflow:auto;overscroll-behavior:contain;scroll-padding-block:12px;scrollbar-gutter:stable}
.modal-panel .help-section{gap:14px;padding:18px 0}
.modal-panel .help-section>div{min-width:0}
.modal-panel .help-section h3{font-size:12px;line-height:1.5;margin-bottom:7px}
.modal-panel .help-section p{font-size:11px;line-height:1.9;color:#5e6d62}
.modal-panel .section-number{color:#8b7248;line-height:1.5}
.modal-panel .source-note{margin-top:0;padding-top:17px;border-top:0;color:#6c786d;overflow-wrap:anywhere}
.modal-panel .source-note a{color:#3d5e4e}
.modal-panel .source-note a:hover{color:#80683e}
.modal-panel .shortcut-note{margin:16px 0;color:#5e6d62;font-size:11px;line-height:1.9}
.modal-panel .shortcut-note kbd{display:inline-block;min-width:18px;padding:0 4px;border:1px solid #d0d5c7;border-radius:3px;background:#ecece1;color:#42594a;font:10px/1.7 sans-serif;text-align:center}
.setting-field{
  position:relative;display:grid;gap:8px;min-width:0;padding:19px 0;
  border-bottom:1px solid rgb(32 58 54 / 12%);
}
.setting-field>label,.setting-label>label{display:block;min-width:0;font-size:12px;font-weight:500;line-height:1.6}
.setting-label{display:flex;align-items:center;justify-content:space-between;gap:12px;min-width:0}
.setting-field small,.setting-switch small{display:block;color:#6c786d;font-size:10px;font-weight:400;line-height:1.8}
.setting-field select{
  display:block;width:100%;min-width:0;min-height:44px;margin:3px 0 0;padding:9px 12px;
  border:1px solid #cfd3c5;border-radius:7px;background:#efeee5;color:var(--ink);font-size:12px;
}
.setting-field select:hover{border-color:#a4ae9f}
.setting-field output{
  flex:none;justify-self:end;min-width:46px;padding:1px 7px;border-radius:4px;
  background:#e8e9de;color:#52634f;font-size:11px;line-height:1.8;text-align:center;
  font-variant-numeric:tabular-nums;
}
.setting-field input[type=range]{
  display:block;appearance:none;-webkit-appearance:none;width:100%;height:44px;min-height:44px;
  margin:0;padding:0;border:0;border-radius:6px;background:transparent;accent-color:var(--ink);cursor:pointer;
}
.setting-field input[type=range]::-webkit-slider-runnable-track{height:4px;border-radius:4px;background:#cbd1c3}
.setting-field input[type=range]::-webkit-slider-thumb{
  appearance:none;-webkit-appearance:none;width:22px;height:22px;margin-top:-9px;
  border:3px solid var(--paper);border-radius:50%;background:var(--ink);box-shadow:0 0 0 1px #a7b09f,0 2px 5px rgb(32 58 54 / 16%);
}
.setting-field input[type=range]::-moz-range-track{height:4px;border:0;border-radius:4px;background:#cbd1c3}
.setting-field input[type=range]::-moz-range-progress{height:4px;border-radius:4px;background:#6a7c64}
.setting-field input[type=range]::-moz-range-thumb{
  width:16px;height:16px;border:3px solid var(--paper);border-radius:50%;background:var(--ink);
  box-shadow:0 0 0 1px #a7b09f,0 2px 5px rgb(32 58 54 / 16%);
}
.range-labels{display:flex;justify-content:space-between;gap:16px;margin-top:-8px;color:#75806f;font-size:9px;line-height:1.6}
.setting-switch{padding:14px 0;border-bottom:1px solid rgb(32 58 54 / 12%)}
.setting-switch>label{
  display:grid;grid-template-columns:minmax(0,1fr) 46px;column-gap:18px;row-gap:4px;
  align-items:center;min-height:64px;padding:4px 0;font-size:12px;font-weight:500;line-height:1.6;cursor:pointer;
}
.setting-switch>label>small{grid-column:1}
.setting-switch>label>span{min-width:0}
.setting-switch>label>span small{margin-top:5px}
.setting-switch input[type=checkbox]{
  position:relative;grid-column:2;grid-row:1 / span 2;align-self:center;
  appearance:none;-webkit-appearance:none;display:block;width:46px;height:28px;margin:0;
  border:1px solid #b8c1b2;border-radius:16px;background:#ccd2c5;cursor:pointer;
  transition:background .18s,border-color .18s;
}
.setting-switch input[type=checkbox]::before{
  content:"";position:absolute;top:2px;left:2px;width:22px;height:22px;border-radius:50%;
  background:#fffdf6;box-shadow:0 1px 4px rgb(32 58 54 / 22%);transition:transform .18s;
}
.setting-switch input[type=checkbox]:checked{border-color:var(--ink);background:var(--ink)}
.setting-switch input[type=checkbox]:checked::before{transform:translateX(18px)}
.setting-switch input[type=checkbox]:disabled{opacity:.5;cursor:not-allowed}
.setting-actions{display:grid;gap:8px;padding-top:20px}
.setting-actions button{
  display:flex;align-items:center;justify-content:center;gap:9px;width:100%;min-height:44px;
  padding:10px 14px;border:1px solid #d0d5c7;border-radius:7px;background:#eeeee3;
  color:var(--ink);font-size:11px;line-height:1.6;
}
.setting-actions button:hover{background:#e4e8da;border-color:#b6c0af}
.setting-actions button .icon{width:17px;height:17px}
.setting-actions #reset-preferences{border-color:transparent;background:transparent;color:#69766a}
.setting-actions #reset-preferences:hover{color:var(--ink);background:#e9ebdf}
.settings-note{margin:17px 0 0;color:#75806f;font-size:10px;line-height:1.8}
.restore-ui{
  position:fixed;z-index:7;right:max(24px,env(safe-area-inset-right));bottom:max(30px,calc(env(safe-area-inset-bottom) + 18px));
  display:none;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:0 15px;
  border:1px solid rgb(246 243 235 / 40%);border-radius:24px;background:rgb(27 51 42 / 82%);
  color:var(--paper);font-size:11px;line-height:1.5;backdrop-filter:blur(10px);box-shadow:0 3px 18px rgb(10 28 21 / 12%);
}
.restore-ui .icon{width:18px;height:18px}
.restore-ui:hover{background:var(--paper);color:var(--ink);border-color:var(--paper)}
.restore-ui:focus-visible{outline:2px solid #d4b97f;outline-offset:4px}
#experience[data-immersive=true] :is(.topbar,.mode-pill,.toolbar,.hint,.view-location,.scene-shade,.exhibit-callout){display:none}
#experience[data-immersive=true] .restore-ui{display:flex}
#experience[data-immersive=true] .touch-controls{opacity:.38;transition:opacity .2s}
#experience[data-immersive=true] .touch-controls:hover,#experience[data-immersive=true] .touch-controls:focus-within{opacity:.85}
#experience[data-immersive=true] .touch-look-hint{display:none}
#experience[data-intro=true] #immersive-toggle{display:none}
@keyframes control-fade{from{opacity:0}to{opacity:1}}
@keyframes control-panel-enter{from{opacity:0;transform:translateY(-6px)}to{opacity:1;transform:translateY(0)}}
@keyframes control-sheet-enter{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:translateY(0)}}
@media(max-width:700px),(pointer:coarse) and (max-height:520px){
  .help-panel.modal-panel{
    top:auto;left:max(16px,env(safe-area-inset-left));right:max(16px,env(safe-area-inset-right));
    bottom:max(24px,env(safe-area-inset-bottom));width:auto;max-width:none;
    max-height:calc(100vh - 96px);max-height:calc(100dvh - 96px);
    padding:22px 20px 20px;border-radius:18px;animation-name:control-sheet-enter;
  }
  .modal-panel .help-heading h2{font-size:23px}
  .control-tabs{margin-top:18px}
  .modal-panel .help-section{padding:16px 0}
  .setting-field{padding:18px 0}
  .restore-ui{right:max(18px,env(safe-area-inset-right));bottom:max(30px,calc(env(safe-area-inset-bottom) + 18px))}
}
@media(max-height:520px) and (orientation:landscape){
  .help-panel.modal-panel{padding:18px 22px}
  .modal-panel .help-heading h2{font-size:21px;margin-top:4px}
  .control-tabs{margin-top:14px}
  .modal-panel .help-section{padding:13px 0}
  .setting-field{padding:14px 0}
  .setting-switch{padding:10px 0}
  .setting-actions{padding-top:15px}
}
@media(prefers-reduced-motion:reduce){
  .fullscreen-backdrop,.help-panel.modal-panel,.restore-ui,.setting-switch input[type=checkbox],
  .setting-switch input[type=checkbox]::before,#experience[data-immersive=true] .touch-controls{animation:none;transition:none}
}
@media(forced-colors:active){
  .help-panel.modal-panel,.control-tabs,.setting-actions button,.restore-ui{border:1px solid CanvasText}
  .control-tabs button[aria-selected=true]{outline:2px solid Highlight;outline-offset:-3px}
  .setting-switch input[type=checkbox]{appearance:auto;-webkit-appearance:auto;width:28px;height:28px;accent-color:auto}
  .setting-switch input[type=checkbox]::before{content:none}
}
