.tour-page {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: var(--primary);
}

.tour-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 64px;
  padding: 6px max(16px, env(safe-area-inset-right)) 6px max(16px, env(safe-area-inset-left));
  padding-top: max(6px, env(safe-area-inset-top));
  background: var(--white);
  border-bottom: 1px solid var(--border);
}

.tour-header__logo,
.tour-header__back {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--secondary);
  text-decoration: none;
}

.tour-header__logo {
  flex: 0 1 150px;
  min-width: 88px;
}

.tour-header__logo img {
  width: 100%;
  height: auto;
}

.tour-header__title {
  display: none;
  margin: 0;
  color: var(--primary);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tour-header__back {
  flex-shrink: 0;
  gap: 8px;
  padding: 0 4px;
  font-size: clamp(11px, 1.4vw, 13px);
  font-weight: 700;
}

.tour-header__back svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tour-header__back:hover {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.tour-header a:focus-visible {
  outline: 2px solid var(--secondary);
  outline-offset: 3px;
  border-radius: 4px;
}

.tour-main {
  position: relative;
  min-width: 0;
  min-height: 0;
}

.tour-viewer {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.tour-noscript {
  position: absolute;
  inset: 0;
  margin: 0;
  padding: 32px;
  background: var(--mist);
}

.tour-noscript a {
  color: var(--secondary);
}

@media (min-width: 640px) {
  .tour-header {
    min-height: 72px;
    padding-inline: max(24px, env(safe-area-inset-left)) max(24px, env(safe-area-inset-right));
  }

  .tour-header__title {
    display: block;
  }
}

@media (max-width: 359px) {
  .tour-header__logo {
    flex-basis: 110px;
  }

  .tour-header__back {
    gap: 4px;
  }
}
