/* A single viewport footer serves the exterior, panorama, menu and album. */
:root {
  --tour-viewport-height:100vh;
  --tour-tab-band:62px;
  --tour-safe-bottom:0px;
  --tour-safe-left:0px;
  --tour-safe-right:0px;
  --tour-dock-height:calc(var(--tour-tab-band) + var(--tour-safe-bottom));
  --tour-scene-height:calc(var(--tour-viewport-height) - var(--tour-dock-height));
}
@supports (height:100dvh) { :root {--tour-viewport-height:100dvh;} }
@supports (padding:env(safe-area-inset-bottom)) {
  :root {
    --tour-safe-bottom:env(safe-area-inset-bottom,0px);
    --tour-safe-left:env(safe-area-inset-left,0px);
    --tour-safe-right:env(safe-area-inset-right,0px);
  }
}
.tour-bottom.tour-navigation {
  --tour-ink:#242322;
  --tour-selected:#a52f28;
  position:fixed;inset:auto 0 0;z-index:5;
  box-sizing:border-box;width:100%;max-width:none;
  height:var(--tour-dock-height);max-height:none;
  display:flex;align-items:stretch;justify-content:center;gap:0;
  margin:0;padding:0 var(--tour-safe-right) var(--tour-safe-bottom) var(--tour-safe-left);
  overflow:visible;transform:none;
  border:0;border-radius:0;box-shadow:none;pointer-events:none;
  color:var(--tour-ink);background:transparent;
  font-family:inherit;color-scheme:light;
}
.tour-navigation .tour-tab-row {
  display:grid;grid-template-columns:repeat(4,minmax(0,1fr));
  flex:1 1 auto;width:100%;max-width:420px;min-width:0;height:100%;
}
.tour-navigation .tour-tab {
  --tour-icon-accent:currentColor;
  place-self:center;display:grid;place-items:center;
  width:48px;height:48px;margin:0;padding:0;pointer-events:auto;
  border:0;border-radius:50%;background:transparent;color:inherit;
  touch-action:manipulation;-webkit-tap-highlight-color:transparent;
}
.tour-navigation .tour-tab>svg {
  display:block;width:28px;height:28px;fill:none;stroke:none;
  transition:transform .16s ease;
}
.tour-navigation .tour-tab[aria-current=page] {
  --tour-icon-fill:currentColor;--tour-icon-seam:#fff;color:var(--tour-selected);
}
body:has(#inside[open]) .tour-navigation {
  --tour-ink:#fff;--tour-selected:#ffb3a0;
}
body:has(#inside[open]) .tour-navigation .tour-tab>svg {
  filter:drop-shadow(0 0 1px #211e1bf0) drop-shadow(0 1px 2px #211e1bd6);
}
body:has(#inside[open]) .tour-navigation .tour-tab[aria-current=page] {--tour-icon-seam:#632b25;}
@media (hover:hover) and (prefers-reduced-motion:no-preference) {
  .tour-navigation .tour-tab:hover>svg {transform:translateY(-2px);}
}
@media (prefers-reduced-motion:no-preference) {
  .tour-navigation .tour-tab:active>svg {transform:scale(.92);}
}
.tour-navigation .tour-tab:focus-visible,#inside .tour-head button:focus-visible,#inside .point.move:focus-visible {
  outline:2px solid #a13b33;outline-offset:-3px;
}
@supports selector(:popover-open) {
  .tour-bottom.tour-navigation[popover]:not(:popover-open) {display:none;}
  .tour-bottom.tour-navigation:popover-open::backdrop {background:none;pointer-events:none;}
}

/* Photos and the panorama continue behind the four floating icons. */
body.tour-dock-visible .building {max-width:var(--tour-scene-height);}
body.tour-dock-visible dialog.bmenu[open] {
  bottom:var(--tour-dock-height);
  --room-height:calc(var(--tour-scene-height) - var(--edge-y) - var(--edge-y));
}
body.tour-dock-visible #gallery[open] {
  bottom:var(--tour-dock-height);
  max-height:calc(var(--tour-scene-height) - max(22px,env(safe-area-inset-top,0px)));
}

/* Without the top-layer popover API the dock lives inside the active dialog.
   Keep that fixed descendant relative to the viewport and outside the card clip. */
body.tour-nav-fallback.tour-dock-visible #inside[open],
body.tour-nav-fallback.tour-dock-visible #gallery[open],
body.tour-nav-fallback.tour-dock-visible dialog.bmenu[open] {overflow:visible;}
body.tour-nav-fallback.tour-dock-visible #gallery[open],
body.tour-nav-fallback.tour-dock-visible dialog.bmenu[open] {
  backdrop-filter:none;-webkit-backdrop-filter:none;transform:none;animation:none;
}
#inside .tour-head {
  position:absolute;z-index:3;display:flex;align-items:center;gap:7px;
  inset:max(18px,env(safe-area-inset-top)) max(19px,env(safe-area-inset-right)) auto auto;
}
#inside .tour-head button.glass {
  width:42px;height:42px;min-height:42px;padding:0;
  background:rgba(255,255,255,.91);border:1px solid rgba(70,60,47,.14);color:#302d29;
  box-shadow:0 2px 10px rgba(23,18,13,.12);
}
#inside .tour-head button.glass:hover {background:white;}
#inside .tour-head svg {width:18px;height:18px;}
#inside .point.move {color:#332e29;text-shadow:none;}
#inside .point.move b,#inside .point.move span {
  background:rgba(255,255,255,.92);border:1px solid rgba(70,60,47,.16);
  box-shadow:0 1px 7px rgba(22,16,12,.14);color:#332e29;
}
#inside .point.move:hover :is(b,span),#inside .point.move:focus-visible :is(b,span) {background:white;}
#inside .point.move b {width:39px;height:39px;}
#inside .point.move span {font-size:12px;font-weight:650;}
@media (max-width:700px), (pointer:coarse) and (orientation:landscape) and (max-height:530px) {
  .tour-navigation .tour-tab-row {max-width:none;}
  #inside .tour-head {inset:max(12px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) auto auto;}
  #inside .tour-head button.glass {width:40px;height:40px;min-height:40px;}
}
@media (orientation:landscape) and (max-height:480px) {
  :root {--tour-tab-band:49px;}
  .tour-navigation .tour-tab {width:44px;height:44px;}
  .tour-navigation .tour-tab>svg {width:23px;height:23px;}
}
