:root {
  color-scheme: light;
  --ink: #151515;
  --muted: #67645f;
  --paper: #fafaf8;
  --line: #e6e0d8;
  --accent: #b63d2b;
  --accent-dark: #8f2e20;
  --teal: #1f7668;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--paper);
  color: var(--ink);
  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

button {
  font: inherit;
}

.page {
  min-height: 100vh;
}

.carousel {
  position: relative;
  height: min(70vh, 520px);
  min-height: 340px;
  overflow: hidden;
  background: #111;
}

.carousel-track {
  display: flex;
  height: 100%;
  transition: transform 220ms ease;
}

.carousel-slide {
  flex: 0 0 100%;
  min-width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.carousel-control,
.icon-button {
  border: 0;
  color: #fff;
  background: rgb(0 0 0 / 0.62);
  cursor: pointer;
}

.carousel-control {
  position: absolute;
  top: 50%;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  transform: translateY(-50%);
  font-size: 32px;
  line-height: 1;
}

.carousel-control.previous {
  right: 12px;
}

.carousel-control.next {
  left: 12px;
}

.carousel-count {
  position: absolute;
  right: 16px;
  bottom: 16px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgb(0 0 0 / 0.62);
  color: #fff;
  font-size: 14px;
}

.content {
  padding: 20px 16px 40px;
}

.tour-button {
  width: 100%;
  min-height: 54px;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
}

.tour-button:active {
  background: var(--accent-dark);
}

h1 {
  margin: 26px 0 12px;
  font-size: 24px;
  line-height: 1.25;
}

.description {
  margin: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.9;
  white-space: pre-wrap;
}

.unavailable {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
  color: var(--ink);
  font-size: 20px;
  text-align: center;
}

.image-viewer {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: calc(env(safe-area-inset-top, 0px) + 64px) 12px
    calc(env(safe-area-inset-bottom, 0px) + 64px);
  background: rgb(0 0 0 / 0.92);
}

.image-viewer-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

.image-viewer-close {
  position: absolute;
  top: calc(env(safe-area-inset-top, 0px) + 12px);
  right: 12px;
}

.image-viewer-control {
  position: absolute;
  top: 50%;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  transform: translateY(-50%);
  background: rgb(0 0 0 / 0.62);
  color: #fff;
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
}

.image-viewer-control.previous {
  right: 12px;
}

.image-viewer-control.next {
  left: 12px;
}

.image-viewer-count {
  position: absolute;
  right: 16px;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 16px);
  padding: 6px 10px;
  border-radius: 999px;
  background: rgb(0 0 0 / 0.62);
  color: #fff;
  font-size: 14px;
}

.viewer {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: #050505;
  overflow: hidden;
  direction: ltr;
}

.pano {
  position: absolute;
  inset: 0;
  touch-action: none;
  direction: ltr;
}

.tour-loader {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgb(0 0 0 / 0.78);
  direction: rtl;
}

.tour-loader-panel {
  width: min(100%, 360px);
  padding: 18px;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 18px 42px rgb(0 0 0 / 0.35);
}

.tour-loader-title {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
}

.tour-loader-progress {
  height: 8px;
  margin-top: 16px;
  overflow: hidden;
  border-radius: 999px;
  background: #e6e0d8;
}

.tour-loader-bar {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transition: width 180ms ease;
}

.tour-loader-details {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
}

.tour-loader-eta {
  margin-top: 12px;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.5;
}

.hotspot {
  min-width: 44px;
  min-height: 44px;
  padding: 10px 14px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 8px 22px rgb(0 0 0 / 0.22);
  cursor: pointer;
  white-space: nowrap;
  direction: rtl;
}

.viewer-topbar {
  position: absolute;
  top: env(safe-area-inset-top, 0);
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  direction: rtl;
  z-index: 3;
}

.icon-button {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  font-size: 30px;
  line-height: 1;
}

.scene-title {
  max-width: calc(100vw - 80px);
  padding: 8px 12px;
  border-radius: 8px;
  background: rgb(0 0 0 / 0.62);
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

[hidden] {
  display: none !important;
}

@media (min-width: 720px) {
  .page {
    max-width: 720px;
    margin: 0 auto;
    background: #fff;
    border-inline: 1px solid var(--line);
  }

  .content {
    padding-inline: 24px;
  }
}
