@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600&display=swap");

:root {
  /* Defaults; a tour's own colors are set on :root by index.html and player.js. */
  --primary: #1d2733;
  --primary-rgb: 29, 39, 51;
  --primary-light: #34404f;
  --panel: rgba(var(--primary-rgb), 0.88);
  --glass: rgba(var(--primary-rgb), 0.68);
  --line: rgba(255, 255, 255, 0.3);
  --accent: #3fb8a8;
  --accent-rgb: 63, 184, 168;
  --accent-hover: #34a293;
  --logo-height: 28px;
  --accent-soft: rgba(var(--accent-rgb), 0.55);
  --route: #8a3ffc;
  --text: #ffffff;
  --text-soft: #d5d8e6;
  --gap: 20px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-back: cubic-bezier(0.34, 1.56, 0.64, 1);
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  scrollbar-width: thin;
  scrollbar-color: var(--accent) transparent;
}

::selection {
  background: var(--accent);
  color: var(--primary);
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--primary);
  color: var(--text);
  font-family: Montserrat, helvetica, arial, sans-serif;
  font-size: 16px;
  -webkit-user-select: none;
  user-select: none;
}

[hidden] {
  display: none !important;
}

button {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

#pano {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.icon {
  display: block;
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Panels */
#titleBar,
#toolbar,
#sceneList,
#routeBar,
#homeButton,
#sceneListToggle,
.edge-hint {
  transition: opacity 0.25s, transform 0.5s var(--ease-out);
}

body.loading #titleBar {
  opacity: 0;
  transform: translateY(-16px);
}

body.loading #toolbar {
  opacity: 0;
  transform: translateY(-16px);
}

body.dragging #titleBar,
body.dragging #toolbar,
body.dragging #sceneList,
body.dragging #routeBar,
body.dragging #homeButton,
body.dragging #sceneListToggle,
body.dragging .edge-hint {
  opacity: 0.25;
}

/* Title */
#titleBar {
  position: absolute;
  top: var(--gap);
  left: var(--gap);
  max-width: calc(100% - 180px - var(--gap) * 2);
  min-height: 52px;
  padding: 8px 24px;
  border-radius: 26px;
  background: var(--panel);
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo-link {
  flex: none;
  display: block;
  transition: opacity 0.2s;
}

.logo-link:hover {
  opacity: 0.75;
}

.logo-full {
  display: block;
  width: auto;
  max-width: 220px;
  height: var(--logo-height);
  object-fit: contain;
}

.logo-mark {
  display: none;
  width: auto;
  max-width: 44px;
  height: 22px;
  object-fit: contain;
}

.logo-full[hidden],
.logo-mark[hidden],
.logo-link[hidden] {
  display: none !important;
}

.no-logo .title-text {
  padding-left: 0;
  border-left: 0;
}

.title-text {
  min-width: 0;
  padding-left: 16px;
  border-left: 1px solid var(--line);
  display: flex;
  align-items: baseline;
  gap: 12px;
}

#sceneName {
  min-width: 0;
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#sceneName.swap {
  animation: title-swap 0.6s var(--ease-out);
}

@keyframes title-swap {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}

#sceneCounter {
  flex: none;
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
}

/* Toolbar */
#toolbar {
  position: absolute;
  top: var(--gap);
  right: var(--gap);
  padding: 4px;
  border-radius: 26px;
  background: var(--panel);
  display: flex;
  gap: 2px;
}

.tool {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s, color 0.2s;
}

.lang-toggle {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.tool:hover {
  background: var(--primary-light);
  color: var(--accent);
}

.tool .show-on,
.tool[aria-pressed="true"] .show-off {
  display: none;
}

.tool[aria-pressed="true"] .show-on {
  display: block;
}

.tool[aria-pressed="true"],
.tool[aria-pressed="true"]:hover {
  background: var(--accent);
  color: var(--primary);
}

/* Above the scene column, showing or hiding it */
#sceneListToggle {
  position: absolute;
  top: calc(var(--gap) + 64px);
  left: var(--gap);
  width: 144px;
  height: 44px;
  border-radius: 22px;
  background: var(--panel);
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
}

#sceneListToggle:hover {
  background: var(--primary-light);
}

#sceneListToggle[aria-pressed="true"],
#sceneListToggle[aria-pressed="true"]:hover {
  background: var(--accent);
  color: var(--primary);
}

/* Back to the home scene; the credit line sits just under it */
#homeButton {
  position: absolute;
  right: var(--gap);
  bottom: var(--gap);
  width: 144px;
  height: 44px;
  border-radius: 22px;
  background: var(--panel);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
}

#homeButton:hover {
  background: var(--primary-light);
  color: var(--accent);
}

/* Scene column on the left, under its button */
#sceneList {
  position: absolute;
  top: calc(var(--gap) + 116px);
  left: var(--gap);
  width: 144px;
  max-height: calc(100% - var(--gap) * 2 - 116px);
  padding: 6px;
  border-radius: 20px;
  background: var(--panel);
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow-x: hidden;
  overflow-y: auto;
  animation: strip-in 0.5s var(--ease-out);
}

@keyframes strip-in {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
}

/* Blocks: only the block of the current scene shows its pictures. */
.scene-group,
.scene-group-items {
  flex: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.scene-group-head {
  flex: none;
  width: 100%;
  min-height: 36px;
  padding: 8px 10px;
  border-radius: 12px;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.25;
  text-align: left;
  transition: background-color 0.2s, color 0.2s;
}

.scene-group-head:hover {
  color: var(--accent);
}

.scene-group-count {
  flex: none;
  color: var(--accent);
}

.scene-group.open .scene-group-head {
  background: var(--accent);
  color: var(--primary);
}

.scene-group.open .scene-group-count {
  color: inherit;
}

#credit {
  position: absolute;
  right: 2px;
  bottom: 1px;
  padding: 2px 6px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 9px;
  line-height: 1.2;
  text-decoration: none;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9);
  white-space: nowrap;
}

#credit:hover {
  color: var(--accent);
}

.scene {
  position: relative;
  flex: none;
  width: 100%;
  height: 74px;
  border-radius: 14px;
  overflow: hidden;
  background: var(--primary-light);
  text-align: left;
}

.scene::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 2px solid transparent;
  border-radius: 14px;
  background: linear-gradient(transparent 35%, rgba(var(--primary-rgb), 0.92));
  transition: border-color 0.25s;
}

.scene:hover::after {
  border-color: var(--text-soft);
}

.scene[aria-current="true"]::after {
  border-color: var(--accent);
}

.scene-thumb {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease-out);
}

.scene:hover .scene-thumb {
  transform: scale(1.1);
}

.scene-name {
  position: absolute;
  z-index: 1;
  left: 8px;
  right: 8px;
  bottom: 6px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Hints for hotspots outside the frame */
.edge-hint {
  position: absolute;
  top: 50%;
  min-width: 44px;
  height: 44px;
  margin-top: -22px;
  padding: 0 10px;
  background: var(--accent);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 2px 10px rgba(var(--primary-rgb), 0.45);
}

.edge-left {
  left: 0;
  border-radius: 0 22px 22px 0;
  animation: nudge-left 2.4s ease-in-out infinite;
}

.edge-right {
  right: 0;
  border-radius: 22px 0 0 22px;
  animation: nudge-right 2.4s ease-in-out infinite;
}

/* The scene column takes over the left edge. */
.scene-list-open .edge-left {
  left: calc(var(--gap) + 152px);
  border-radius: 22px;
}

.edge-hint:hover {
  background: var(--accent-hover);
}

.edge-hint.route,
.edge-hint.route:hover {
  background: var(--route);
  color: #ffffff;
}

@keyframes nudge-left {
  50% {
    transform: translateX(5px);
  }
}

@keyframes nudge-right {
  50% {
    transform: translateX(-5px);
  }
}

/* Hotspots. Marzipano positions the root element with a transform. */
.hotspot {
  position: absolute;
  pointer-events: auto;
}

.hotspot.open {
  z-index: 10;
}

.hotspot-marker {
  position: relative;
  display: block;
}

.hotspot.enter .hotspot-marker {
  animation: marker-in 0.6s var(--ease-back) backwards;
  animation-delay: var(--enter-delay, 0s);
}

@keyframes marker-in {
  from {
    opacity: 0;
    transform: scale(0.2);
  }
}

/* Markers are quiet: a small glass disc with a thin white ring. Only the
   next step of a route pulses, once per two seconds. */
.hotspot-marker::before {
  content: "";
  position: absolute;
  inset: var(--marker-inset);
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
}

/* The button is the click area; the smaller face inside it is what shows. */
.hotspot-button {
  position: relative;
  z-index: 1;
  display: flex;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
}

.hotspot-button:focus-visible {
  outline-offset: -2px;
}

.hotspot-face {
  display: flex;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  background: rgba(var(--primary-rgb), 0.45);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.9), 0 1px 6px rgba(0, 0, 0, 0.25);
  color: #ffffff;
  transition: transform 0.25s var(--ease-out), background-color 0.2s, color 0.2s, opacity 0.2s;
}

.hotspot:hover .hotspot-face,
.hotspot.open .hotspot-face {
  transform: scale(1.12);
  background: var(--accent);
  color: var(--primary);
  box-shadow: inset 0 0 0 1.5px var(--accent), 0 1px 8px rgba(0, 0, 0, 0.3);
}

.link-hotspot {
  --marker-inset: 10px;
  width: 52px;
  height: 52px;
  margin: -26px 0 0 -26px;
}

.link-hotspot .hotspot-marker {
  width: 52px;
  height: 52px;
}

.link-hotspot .hotspot-face {
  width: 32px;
  height: 32px;
}

/* A lift button: a small lit disc that glows softly, brighter on hover. */
.link-hotspot.button-hotspot {
  --marker-inset: 8px;
  width: 40px;
  height: 40px;
  margin: -20px 0 0 -20px;
}

.button-hotspot .hotspot-marker {
  width: 40px;
  height: 40px;
}

.link-hotspot.button-hotspot .hotspot-face {
  width: 24px;
  height: 24px;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 2px rgba(150, 200, 255, 0.95), 0 0 8px 2px rgba(110, 170, 255, 0.8);
  animation: lift-glow 2.4s ease-in-out infinite;
}

.button-hotspot:hover .hotspot-face,
.button-hotspot .hotspot-button:focus-visible .hotspot-face {
  background: rgba(130, 185, 255, 0.55);
  box-shadow: inset 0 0 0 2px #ffffff, 0 0 14px 5px rgba(110, 170, 255, 0.95);
  animation: none;
}

.button-number {
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  color: #ffffff;
  text-shadow: 0 0 4px rgba(90, 160, 255, 0.9);
}

@keyframes lift-glow {
  50% {
    box-shadow: inset 0 0 0 2px rgba(190, 220, 255, 1), 0 0 13px 4px rgba(110, 170, 255, 0.95);
  }
}

@media (prefers-reduced-motion: reduce) {
  .link-hotspot.button-hotspot .hotspot-face {
    animation: none;
  }
}

/* Rotation from the editor sits on the wrapper. */
.link-arrow {
  display: block;
  width: 18px;
  height: 18px;
}

.link-arrow .icon {
  width: 18px;
  height: 18px;
  stroke-width: 2;
}

.hotspot-label {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: calc(100% - 4px);
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--glass);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translate(-6px, -50%);
  transition: opacity 0.2s, transform 0.25s var(--ease-out);
}

.hotspot:hover .hotspot-label,
.hotspot-marker:focus-within + .hotspot-label {
  opacity: 1;
  transform: translate(0, -50%);
}

/* Touch has no hover, so the scene names stay visible there. */
@media (hover: none) {
  .hotspot-label {
    opacity: 1;
    transform: translate(0, -50%);
  }
}

.info-hotspot {
  --marker-inset: 12px;
  width: 44px;
  height: 44px;
  margin: -22px 0 0 -22px;
}

.info-hotspot .hotspot-marker {
  width: 44px;
  height: 44px;
}

.info-hotspot .hotspot-face {
  width: 22px;
  height: 22px;
}

.info-hotspot .hotspot-face .icon {
  width: 14px;
  height: 14px;
  stroke-width: 2.5;
}

/* The reception guide is a white speech bubble instead of a disc. */
.info-hotspot.guide-hotspot {
  --marker-inset: 6px;
  width: 52px;
  height: 44px;
  margin: -30px 0 0 -18px;
}

.guide-hotspot .hotspot-marker {
  width: 52px;
  height: 44px;
}

.guide-hotspot .hotspot-button {
  border-radius: 40%;
}

.info-hotspot.guide-hotspot .hotspot-face,
.guide-hotspot:hover .hotspot-face,
.guide-hotspot.open .hotspot-face {
  width: 44px;
  height: 36px;
  border-radius: 0;
  background: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  box-shadow: none;
  filter: drop-shadow(2px 3px 3px rgba(0, 0, 0, 0.35));
}

.bubble {
  display: block;
  width: 44px;
  height: 36px;
  fill: #ffffff;
  stroke: #1a1a1a;
  stroke-width: 1.6;
  stroke-linejoin: round;
  transition: fill 0.2s;
}

.bubble .bubble-join {
  stroke: none;
}

.guide-hotspot:hover .bubble,
.guide-hotspot.open .bubble {
  fill: var(--accent);
}

/* Already viewed: paler, full again on hover. */
.hotspot.viewed:not(.route):not(:hover):not(.open) .hotspot-face {
  opacity: 0.6;
}

/* The next step of the visitor's route */
.hotspot.route {
  z-index: 5;
}

.hotspot.route .hotspot-face,
.hotspot.route:hover .hotspot-face {
  background: var(--route);
  color: #ffffff;
  box-shadow: inset 0 0 0 1.5px #ffffff, 0 1px 8px rgba(0, 0, 0, 0.3);
}

.hotspot.route .hotspot-marker::before {
  border: 2px solid var(--route);
  animation: marker-pulse 2s ease-out infinite;
}

@keyframes marker-pulse {
  from {
    opacity: 0.8;
    transform: scale(1);
  }
  to {
    opacity: 0;
    transform: scale(1.7);
  }
}

.hotspot.route .hotspot-label {
  opacity: 1;
  transform: translate(0, -50%);
}

#routeBar {
  position: absolute;
  left: 50%;
  bottom: var(--gap);
  transform: translateX(-50%);
  max-width: calc(100% - (var(--gap) + 152px) * 2);
  min-height: 44px;
  padding: 6px 6px 6px 18px;
  border-radius: 22px;
  background: var(--route);
  box-shadow: 0 2px 10px rgba(var(--primary-rgb), 0.45);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
}

#routeBar .route-teleport {
  flex: none;
  height: 32px;
  padding: 0 12px;
  border-radius: 16px;
  background: #ffffff;
  color: var(--route);
  font-size: 12px;
  font-weight: 600;
}

#routeBar .route-teleport:hover {
  background: var(--text-soft);
}

#routeBar .route-cancel {
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

#routeBar .icon {
  width: 16px;
  height: 16px;
  stroke-width: 2;
}

/* Text card next to the marker */
.info-card {
  position: absolute;
  z-index: 2;
  width: 230px;
  max-height: 170px;
  padding: 10px 6px 12px 14px;
  border-radius: 14px;
  background: var(--glass);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 6px 24px rgba(var(--primary-rgb), 0.35);
  overflow-y: auto;
  cursor: auto;
  -webkit-user-select: text;
  user-select: text;
  animation: card-in 0.35s var(--ease-out);
}

@keyframes card-in {
  from {
    opacity: 0;
    transform: scale(0.85);
  }
}

.info-card.place-right {
  top: 0;
  left: calc(100% + 6px);
  transform-origin: left top;
}

.info-card.place-left {
  top: 0;
  right: calc(100% + 6px);
  transform-origin: right top;
}

.info-card.place-below {
  top: calc(100% + 6px);
  left: 50%;
  margin-left: -115px;
  transform-origin: center top;
}

.info-card.place-above {
  bottom: calc(100% + 6px);
  left: 50%;
  margin-left: -115px;
  transform-origin: center bottom;
}

.info-card-head {
  display: flex;
  align-items: flex-start;
  gap: 2px;
}

.info-card-title {
  flex: 1;
  min-width: 0;
  margin: 4px 0 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
}

/* A question needs a click: a passing pointer would close the open list. */
.info-card-guide {
  display: block;
  margin: 8px 8px 0 0;
  font-size: 13px;
  line-height: 1.35;
}

.hotspot:not(.pinned) .info-card-guide {
  display: none;
}

.info-card-guide select {
  display: block;
  width: 100%;
  height: 38px;
  margin-top: 6px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--primary);
  color: var(--text);
  color-scheme: dark;
  font: inherit;
  cursor: pointer;
}

.info-card-close {
  flex: none;
  width: 32px;
  height: 32px;
  margin: -4px 0 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* While previewing on hover there is nothing to close. */
.hotspot:not(.pinned) .info-card-close {
  display: none;
}

.info-card-close:hover {
  background: var(--primary-light);
  color: var(--accent);
}

.info-card-close .icon {
  width: 16px;
  height: 16px;
  stroke-width: 2;
}

.info-card-text {
  margin: 4px 8px 0 0;
  color: var(--text);
  font-size: 13px;
  line-height: 1.45;
  white-space: pre-line;
}

/* Loader */
#loader {
  position: absolute;
  inset: 0;
  z-index: 50;
  background: var(--primary);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  transition: opacity 0.7s ease, visibility 0.7s;
}

#loader.done {
  opacity: 0;
  visibility: hidden;
}

.loader-mark {
  width: 64px;
  height: 64px;
  object-fit: contain;
  animation: loader-pulse 1.6s ease-in-out infinite;
}

.loader-spin .loader-mark {
  animation: hourglass 2s var(--ease-out) infinite;
}

@keyframes loader-pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.6;
    transform: scale(0.92);
  }
}

/* Turns like an hourglass: half a turn, then a pause. */
@keyframes hourglass {
  0%,
  35% {
    transform: rotate(0deg);
  }
  65%,
  100% {
    transform: rotate(180deg);
  }
}

.loader-wordmark {
  width: 180px;
  max-height: 80px;
  height: auto;
  object-fit: contain;
}

.loader-title {
  max-width: calc(100% - 40px);
  font-size: 20px;
  font-weight: 600;
  text-align: center;
}

#loader [hidden] {
  display: none;
}

.loader-line {
  width: 120px;
  height: 2px;
  background: var(--primary-light);
  overflow: hidden;
}

.loader-line span {
  display: block;
  width: 40%;
  height: 100%;
  background: var(--accent);
  animation: loader-run 1.2s ease-in-out infinite;
}

@keyframes loader-run {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(250%);
  }
}

#message {
  position: absolute;
  z-index: 60;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 420px;
  max-width: calc(100% - var(--gap) * 2);
  padding: 20px 24px;
  border-radius: 16px;
  background: var(--primary-light);
  font-size: 16px;
  line-height: 1.5;
  text-align: center;
}

/* Phones and small windows */
@media (max-width: 700px), (max-height: 500px) {
  :root {
    --gap: 12px;
  }

  #titleBar {
    max-width: calc(100% - 138px - var(--gap) * 2);
    padding: 8px 16px 8px 12px;
    gap: 10px;
  }

  .tool {
    width: 40px;
    height: 40px;
  }

  .logo-full {
    display: none;
  }

  .logo-mark {
    display: block;
  }

  .title-text {
    padding-left: 10px;
  }

  #sceneCounter {
    display: none;
  }

  #sceneList {
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    width: auto;
    max-height: none;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    border-radius: 18px 18px 0 0;
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    animation-name: sheet-in;
  }

  @keyframes sheet-in {
    from {
      transform: translateY(100%);
    }
  }

  .scene {
    width: 116px;
    height: 66px;
  }

  /* Low enough to clear the horizon, just above the scene sheet. */
  .edge-hint {
    top: auto;
    bottom: calc(110px + env(safe-area-inset-bottom));
    margin-top: 0;
  }

  .scene-list-open .edge-left {
    left: 0;
    border-radius: 0 22px 22px 0;
  }

  /* Stacked over the left hint, out of the way of the route bar. */
  #sceneListToggle {
    top: auto;
    bottom: calc(166px + env(safe-area-inset-bottom));
    width: 44px;
    height: 44px;
  }

  #homeButton {
    bottom: calc(28px + env(safe-area-inset-bottom));
    width: 44px;
  }

  #homeButton span,
  #sceneListToggle span {
    display: none;
  }

  /* The open sheet lifts the home button, and the right hint out of its way. */
  .scene-list-open #homeButton {
    bottom: calc(104px + env(safe-area-inset-bottom));
  }

  .scene-list-open .edge-right {
    bottom: calc(156px + env(safe-area-inset-bottom));
  }

  #credit {
    bottom: calc(1px + env(safe-area-inset-bottom));
  }

  .scene-list-open #credit {
    bottom: calc(87px + env(safe-area-inset-bottom));
  }

  .scene-group,
  .scene-group-items {
    flex-direction: row;
  }

  .scene-group-head {
    width: auto;
    height: 66px;
    max-width: 110px;
    flex-direction: column;
    justify-content: center;
    text-align: center;
  }

  #routeBar {
    top: calc(var(--gap) + 64px);
    left: var(--gap);
    right: var(--gap);
    bottom: auto;
    transform: none;
    max-width: none;
    justify-content: space-between;
  }

  /* Smaller text makes iOS zoom the page when the list opens. */
  .info-card-guide select {
    font-size: 16px;
  }

  .info-card {
    width: 210px;
    max-height: 150px;
  }

  .info-card.place-below,
  .info-card.place-above {
    margin-left: -105px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .hotspot-marker::before,
  .hotspot-marker::after {
    opacity: 0.9;
  }
}

/* Shown only in the editor's preview. */
#previewBadge {
  position: absolute;
  z-index: 40;
  left: 50%;
  top: 6px;
  transform: translateX(-50%);
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font-size: 12px;
  pointer-events: auto;
}

/* Editor preview: shown while an uncut panorama downloads */
.pano-loading {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  z-index: 5;
}

.pano-loading.visible {
  opacity: 1;
}
