/* 360° auto-play panorama viewer */
#tour-section,
.tour-viewer {
  position: relative;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  background: var(--beige, #f2ece1);
}

.tour-viewer__categories,
[data-tour-categories] {
  display: none;
}

.tour-viewer__categories-track,
[data-tour-categories-track] {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.5rem;
  min-width: min-content;
  padding: 0.65rem 1rem;
  white-space: nowrap;
}

.tour-viewer__category-btn {
  flex: 0 0 auto;
  margin: 0;
  padding: 0.5rem 0.95rem;
  border: 1px solid rgba(30, 50, 64, 0.14);
  border-radius: 999px;
  background: rgba(255, 250, 242, 0.72);
  color: rgba(30, 50, 64, 0.62);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.tour-viewer__category-btn.active {
  border-color: rgba(30, 50, 64, 0.22);
  background: rgba(30, 50, 64, 0.9);
  color: var(--cream, #e8d9c8);
  font-weight: 700;
}

.tour-viewer__category-btn:focus-visible {
  outline: 2px solid var(--gold, #a8845a);
  outline-offset: 2px;
}

@media (max-width: 48rem) {
  .tour-viewer__categories,
  [data-tour-categories] {
    display: block;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    background: var(--beige, #f2ece1);
    border-bottom: 1px solid rgba(30, 50, 64, 0.08);
  }

  .tour-viewer__categories::-webkit-scrollbar,
  [data-tour-categories]::-webkit-scrollbar {
    display: none;
  }
}

.tour-viewer__stage,
[data-tour-stage] {
  position: relative;
  width: 100%;
  height: 80vh;
  height: 80dvh;
  max-height: 56rem;
  min-height: clamp(20rem, 80vh, 40rem);
  overflow: hidden;
  background: #0d1419;
  direction: ltr;
  isolation: isolate;
}

.tour-viewer__loading,
[data-tour-loading] {
  position: absolute;
  inset: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  background: #0d1419;
  color: #f5f0e8;
  text-align: center;
  padding: 1.5rem;
}

.tour-viewer__loading[hidden],
[data-tour-loading][hidden] {
  display: none;
}

.tour-viewer__loading-spinner {
  width: 2.5rem;
  height: 2.5rem;
  border: 2px solid rgb(245 240 232 / 0.2);
  border-top-color: #f5f0e8;
  border-radius: 50%;
  animation: tour-viewer-spin 0.8s linear infinite;
}

@keyframes tour-viewer-spin {
  to {
    transform: rotate(360deg);
  }
}

.tour-viewer__loading-text {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.4;
  max-width: 18rem;
}

.tour-viewer.is-loading [data-tour-categories],
.tour-viewer.is-loading .tour-viewer__hint,
.tour-viewer.is-loading [data-tour-fullscreen] {
  visibility: hidden;
  pointer-events: none;
}

.tour-viewer.is-error .tour-viewer__loading-spinner {
  display: none;
}

.tour-viewer__stage:fullscreen,
.tour-viewer__stage:-webkit-full-screen {
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  min-height: 0;
}

.tour-viewer__canvas,
[data-tour-canvas] {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: grab;
}

.tour-viewer__stage.is-dragging .tour-viewer__canvas,
.tour-viewer__stage.is-dragging [data-tour-canvas] {
  cursor: grabbing;
}

.tour-viewer__hotspots,
[data-tour-hotspots] {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  overflow: hidden;
}

.tour-hotspot {
  position: absolute;
  z-index: 2;
  transform: translate(-50%, -50%);
  direction: rtl;
  visibility: hidden;
}

.tour-hotspot__dot {
  display: block;
  width: 0.7rem;
  height: 0.7rem;
  margin: 0 auto;
  border: none;
  padding: 0;
  border-radius: 50%;
  background: var(--gold, #a8845a);
  box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.42);
  cursor: pointer;
  pointer-events: auto;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.tour-hotspot__dot:hover {
  transform: scale(1.1);
}

.tour-hotspot.is-focused .tour-hotspot__dot {
  transform: scale(1.15);
  box-shadow: 0 0 0 7px rgba(255, 255, 255, 0.55);
}

.tour-hotspot__card {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 0.65rem);
  width: min(17rem, 78vw);
  margin: 0;
  padding: 0.85rem 1rem;
  background: rgba(255, 250, 242, 0.96);
  border: 1px solid rgba(30, 50, 64, 0.14);
  border-radius: 0.85rem;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
  transform: translateX(-50%);
  text-align: right;
  pointer-events: none;
}

.tour-hotspot__title {
  margin: 0 0 0.35rem;
  color: var(--gold, #a8845a);
  font-size: clamp(0.9rem, 1.4vw, 1.05rem);
  font-weight: 700;
  line-height: 1.2;
}

.tour-hotspot__body {
  margin: 0;
  color: var(--navy, #1e3240);
  font-size: clamp(0.8rem, 1.15vw, 0.92rem);
  font-weight: 600;
  line-height: 1.45;
}

.tour-viewer__vignette {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse at center, transparent 42%, rgba(13, 20, 25, 0.48) 100%),
    linear-gradient(180deg, rgba(30, 50, 64, 0.1), transparent 22%, transparent 78%, rgba(30, 50, 64, 0.28));
}

.tour-viewer__compass-wrap {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 5;
  width: 5.5rem;
  height: 5.5rem;
  overflow: visible;
  pointer-events: none;
  --compass-stop-radius: 2.45rem;
}

.tour-viewer__compass {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 3.5rem;
  height: 3.5rem;
  border: 2px solid rgba(232, 217, 200, 0.55);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.tour-viewer__compass-stops,
[data-tour-compass-stops] {
  position: absolute;
  inset: -0.7rem;
  pointer-events: none;
}

.tour-viewer__compass-stop {
  display: none;
  position: absolute;
  width: 0.3rem;
  height: 0.3rem;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: var(--gold, #a8845a);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.42);
  transform: translate(-50%, -50%);
  cursor: pointer;
  pointer-events: auto;
  transition: box-shadow 0.2s ease, width 0.2s ease, height 0.2s ease;
}

@media (min-width: 64rem) {
  .tour-viewer__compass-stop {
    display: block;
  }
}

@media (min-width: 64rem) {
  .tour-viewer__compass-stop:hover {
    width: 0.36rem;
    height: 0.36rem;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.55);
  }

  .tour-viewer__compass-stop.is-active {
    width: 0.38rem;
    height: 0.38rem;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.65);
  }

  .tour-viewer__compass-stop:focus-visible {
    outline: 2px solid var(--gold, #a8845a);
    outline-offset: 2px;
  }
}

.tour-viewer__compass-cardinal {
  position: absolute;
  font-size: 0.55rem;
  line-height: 1;
  font-weight: 700;
  color: rgba(232, 217, 200, 0.88);
}

.tour-viewer__compass-cardinal--n {
  top: 0.2rem;
  left: 50%;
  transform: translateX(-50%);
}

.tour-viewer__compass-cardinal--e {
  right: 0.28rem;
  top: 50%;
  transform: translateY(-50%);
}

.tour-viewer__compass-cardinal--s {
  bottom: 0.2rem;
  left: 50%;
  transform: translateX(-50%);
}

.tour-viewer__compass-cardinal--w {
  left: 0.28rem;
  top: 50%;
  transform: translateY(-50%);
}

.tour-viewer__compass-needle {
  position: absolute;
  left: 50%;
  z-index: 2;
  width: 2px;
  height: 38%;
  margin-left: -1px;
  background: var(--gold, #a8845a);
  top: 14%;
  transform-origin: bottom center;
  pointer-events: none;
}

.tour-viewer__badge {
  position: absolute;
  top: 1rem;
  left: 50%;
  z-index: 4;
  transform: translateX(-50%);
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: rgba(30, 50, 64, 0.82);
  color: var(--cream, #e8d9c8);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  pointer-events: none;
}

.tour-viewer__fullscreen,
[data-tour-fullscreen] {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 5;
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: none;
  border-radius: 0.35rem;
  background: rgba(30, 50, 64, 0.55);
  color: #fff;
  cursor: pointer;
  backdrop-filter: blur(4px);
  transition: background 0.2s ease;
}

.tour-viewer__fullscreen:hover {
  background: rgba(30, 50, 64, 0.78);
}

.tour-viewer__fullscreen:focus-visible {
  outline: 2px solid var(--gold, #a8845a);
  outline-offset: 2px;
}

.tour-viewer__fs-icon--exit {
  display: none;
}

.tour-viewer__stage:fullscreen .tour-viewer__fs-icon--enter,
.tour-viewer__stage:-webkit-full-screen .tour-viewer__fs-icon--enter {
  display: none;
}

.tour-viewer__stage:fullscreen .tour-viewer__fs-icon--exit,
.tour-viewer__stage:-webkit-full-screen .tour-viewer__fs-icon--exit {
  display: block;
}

.tour-viewer__hint,
[data-tour-hint] {
  position: absolute;
  left: 50%;
  bottom: 1.25rem;
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: min(36rem, calc(100% - 2rem));
  margin: 0;
  padding: 0.45rem 0.5rem 0.45rem 0.75rem;
  border-radius: 0.35rem;
  background: rgba(255, 250, 242, 0.92);
  color: var(--navy, #1e3240);
  font-size: clamp(0.78rem, 1.1vw, 0.9rem);
  font-weight: 600;
  line-height: 1.45;
  text-align: center;
  transform: translateX(-50%);
  pointer-events: auto;
}

.tour-viewer__hint.is-dismissed,
[data-tour-hint].is-dismissed {
  display: none;
}

.tour-viewer__hint-text {
  flex: 1;
  margin: 0;
}

.tour-viewer__hint-text--desktop {
  display: none;
}

.tour-viewer__hint-close,
[data-tour-hint-close] {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 1.65rem;
  height: 1.65rem;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(30, 50, 64, 0.1);
  color: var(--navy, #1e3240);
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease;
}

.tour-viewer__hint-close:hover {
  background: rgba(30, 50, 64, 0.18);
}

.tour-viewer__hint-close:focus-visible {
  outline: 2px solid var(--gold, #a8845a);
  outline-offset: 2px;
}

@media (min-width: 64rem) {
  .tour-viewer__hint-text--mobile {
    display: none;
  }

  .tour-viewer__hint-text--desktop {
    display: block;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tour-hotspot__card {
    opacity: 1 !important;
    transform: translateX(-50%) translateY(0) scale(1) !important;
  }

  .tour-hotspot:not(:first-child) .tour-hotspot__card {
    display: none;
  }
}
