/* ==========================================================================
   Ayuria Place Alamesra — 360° tour
   ========================================================================== */
:root {
  --forest: #18231e;
  --forest-2: #26372e;
  --gold: #c7a66a;
  --gold-soft: #e3d2a8;
  --cream: #f5f2ea;
  --muted: #a8b0a8;
  --line: rgba(255, 255, 255, .12);
  --panel-w: 330px;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--forest);
  color: #fff;
  font-family: "DM Sans", Arial, sans-serif;
}

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

a {
  color: inherit;
  text-decoration: none;
}

[hidden] {
  display: none !important;
}

button:focus-visible,
a:focus-visible,
.link-hotspot:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* ---------- Layout ---------- */
.tour-shell {
  height: 100dvh;
  min-height: 540px;
  display: grid;
  grid-template-rows: 72px minmax(0, 1fr);
  grid-template-columns: minmax(0, 1fr) var(--panel-w);
  background: var(--forest);
}

/* ---------- Top bar ---------- */
.topbar {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  background: #17221d;
  border-bottom: 1px solid var(--line);
  z-index: 20;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border: 1px solid var(--gold);
  color: var(--gold);
  display: grid;
  place-items: center;
  font: 600 23px "Playfair Display", serif;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.brand-copy strong {
  font-size: 13px;
  letter-spacing: 2.3px;
}

.brand-copy small {
  font-size: 9px;
  letter-spacing: 1.6px;
  color: #aeb8ae;
}

.topbar-center {
  font-size: 10px;
  letter-spacing: 2px;
  color: #c6cec6;
  display: flex;
  align-items: center;
  gap: 9px;
}

.live-dot {
  width: 7px;
  height: 7px;
  background: #a9c69a;
  border-radius: 50%;
  box-shadow: 0 0 0 4px #a9c69a22;
  animation: live 2s ease-in-out infinite;
}

@keyframes live {
  50% {
    box-shadow: 0 0 0 7px #a9c69a00;
  }
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-button {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #ffffff08;
  display: grid;
  place-items: center;
  transition: border-color .2s, background .2s;
}

.icon-button:hover {
  border-color: var(--gold);
  background: #ffffff14;
}

.icon-button img {
  width: 17px;
  height: 17px;
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: .85;
}

.icon-button svg {
  width: 17px;
  height: 17px;
  stroke: #fff;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: .9;
}

.icon-button .on {
  display: none;
}

.icon-button.enabled .on {
  display: block;
}

.icon-button.enabled .off {
  display: none;
}

.pill-button {
  height: 38px;
  padding: 0 16px 0 13px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--gold);
  border-radius: 30px;
  color: var(--gold-soft);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .6px;
  transition: background .2s, color .2s;
}

.pill-button svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
  stroke: none;
}

.pill-button .on {
  display: none;
}

.pill-button:hover,
.pill-button.enabled {
  background: var(--gold);
  color: #17221d;
}

.pill-button.enabled .on {
  display: block;
}

.pill-button.enabled .off {
  display: none;
}

.cta {
  height: 38px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  border-radius: 30px;
  background: var(--gold);
  color: #17221d;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .6px;
  transition: filter .2s;
}

.cta:hover {
  filter: brightness(1.08);
}

/* ---------- Stage ---------- */
.tour-stage {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: #101713;
}

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

.viewer-gradient {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(8, 15, 11, .58), transparent 28%, transparent 66%, rgba(8, 15, 11, .45));
}

.tour-progress {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 6;
  background: transparent;
  pointer-events: none;
  opacity: 0;
  transition: opacity .3s;
}

.tour-progress.active {
  opacity: 1;
  background: #ffffff1f;
}

.tour-progress span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--gold);
}

.tour-progress.run span {
  animation: tourbar var(--step, 8s) linear forwards;
}

@keyframes tourbar {
  to {
    width: 100%;
  }
}

.viewer-heading {
  position: absolute;
  top: 30px;
  left: 36px;
  z-index: 3;
  pointer-events: none;
}

.viewer-heading>* {
  animation: rise .6s ease both;
}

.viewer-heading h1 {
  animation-delay: .06s;
}

.viewer-heading p {
  animation-delay: .12s;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

.eyebrow {
  font-size: 9px;
  letter-spacing: 2.2px;
  color: var(--gold);
  font-weight: 700;
  display: block;
}

.viewer-heading h1 {
  font: 600 clamp(24px, 2.8vw, 36px) "Playfair Display", serif;
  margin: 8px 0 5px;
  text-shadow: 0 2px 18px #0008;
}

.viewer-heading p {
  font-size: 11px;
  color: #e0e5df;
  margin: 0;
}

/* ---------- Radar (where am I looking / where can I go) ---------- */
.radar {
  position: absolute;
  top: 26px;
  right: 26px;
  width: 92px;
  height: 92px;
  z-index: 4;
  filter: drop-shadow(0 4px 14px #0006);
}

.radar svg {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
}

.radar-bg {
  fill: rgba(20, 30, 25, .62);
  stroke: rgba(255, 255, 255, .28);
  stroke-width: 1;
}

.radar-ring {
  fill: none;
  stroke: rgba(255, 255, 255, .14);
  stroke-width: 1;
  stroke-dasharray: 2 3;
}

.radar-cone {
  fill: rgba(199, 166, 106, .38);
  stroke: rgba(227, 210, 168, .85);
  stroke-width: 1;
}

.radar-you {
  fill: #fff;
}

.radar-dot {
  fill: var(--gold);
  stroke: #17221d;
  stroke-width: 1.4;
  cursor: pointer;
  transition: r .15s;
}

.radar-dot:hover {
  fill: #fff;
  r: 5.6;
}

.radar-hit {
  fill: transparent;
  cursor: pointer;
}

/* ---------- Scene navigation pill ---------- */
.scene-nav {
  position: absolute;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 4px;
  background: rgba(20, 30, 25, .72);
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 30px;
  backdrop-filter: blur(10px);
}

.scene-nav button {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  transition: background .2s;
}

.scene-nav button:hover {
  background: var(--gold);
  color: #17221d;
}

.scene-nav svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.scene-counter {
  min-width: 62px;
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.4px;
  font-variant-numeric: tabular-nums;
}

.scene-counter span {
  color: var(--muted);
  font-weight: 400;
}

/* ---------- Hint / toast ---------- */
.viewer-hint {
  position: absolute;
  bottom: 31px;
  left: 36px;
  color: #ffffffcc;
  font-size: 9px;
  letter-spacing: 1.5px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 9px;
  pointer-events: none;
  transition: opacity .6s;
}

.viewer-hint.gone {
  opacity: 0;
}

.hint-hand {
  width: 26px;
  height: 26px;
  border: 1px solid rgba(255, 255, 255, .5);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--gold);
  font-size: 13px;
  animation: nudge 2.2s ease-in-out infinite;
}

@keyframes nudge {

  0%,
  100% {
    transform: translateX(-3px);
  }

  50% {
    transform: translateX(3px);
  }
}

.toast {
  position: absolute;
  left: 50%;
  bottom: 82px;
  z-index: 8;
  transform: translate(-50%, 12px);
  max-width: min(92%, 440px);
  padding: 12px 18px;
  border-radius: 12px;
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
  background: rgba(20, 30, 25, .94);
  border: 1px solid rgba(199, 166, 106, .6);
  backdrop-filter: blur(10px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s, transform .3s;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
  pointer-events: auto;
}

.toast a {
  display: inline-block;
  margin-top: 8px;
  padding: 7px 16px;
  border-radius: 20px;
  background: var(--gold);
  color: #17221d;
  font-weight: 700;
}

/* ---------- Welcome overlay ---------- */
.welcome {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 24px;
  text-align: center;
  background: radial-gradient(ellipse at center, rgba(14, 22, 18, .55), rgba(10, 16, 13, .9));
  backdrop-filter: blur(7px);
  transition: opacity .6s, visibility .6s;
}

.welcome.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.welcome-card {
  max-width: 460px;
  animation: rise .8s ease both;
}

.welcome-mark {
  width: 54px;
  height: 54px;
  margin: 0 auto 18px;
  border: 1px solid var(--gold);
  color: var(--gold);
  display: grid;
  place-items: center;
  font: 600 32px "Playfair Display", serif;
}

.welcome h2 {
  font: 600 clamp(28px, 4vw, 40px) "Playfair Display", serif;
  margin: 10px 0 12px;
  text-wrap: balance;
}

.welcome p {
  font-size: 13px;
  line-height: 1.7;
  color: #d6dcd5;
  margin: 0 0 26px;
}

.welcome-meta {
  display: flex;
  justify-content: center;
  gap: 22px;
  margin-bottom: 26px;
  font-size: 10px;
  letter-spacing: 1.4px;
  color: var(--gold-soft);
}

.welcome-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  padding: 13px 24px;
  border-radius: 30px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .6px;
  transition: filter .2s, background .2s;
}

.btn-primary {
  background: var(--gold);
  color: #17221d;
}

.btn-primary:hover {
  filter: brightness(1.08);
}

.btn-ghost {
  border: 1px solid rgba(255, 255, 255, .4);
}

.btn-ghost:hover {
  border-color: var(--gold);
  background: #ffffff10;
}

/* ---------- View controls ---------- */
.view-controls {
  position: absolute;
  right: 24px;
  bottom: 24px;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.view-controls-row,
.zoom-controls {
  display: flex;
  gap: 5px;
}

.viewControlButton {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #18231ecc;
  border: 1px solid #ffffff40;
  display: grid;
  place-items: center;
  backdrop-filter: blur(10px);
  transition: background .2s;
}

.viewControlButton:hover {
  background: var(--gold);
}

.viewControlButton img {
  width: 14px;
  height: 14px;
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: .9;
}

.viewControlButton:hover img {
  filter: brightness(0);
}

/* ==========================================================================
   HOTSPOT MARKERS — small, soft, with a gentle pulse.
   Size is controlled by --marker (change this one number to resize them).
   ========================================================================== */
.link-hotspot {
  --marker: 30px;
  position: absolute;
  width: var(--marker);
  height: var(--marker);
  margin: calc(var(--marker) / -2) 0 0 calc(var(--marker) / -2);
  cursor: pointer;
  outline: none;
}

.marker-pulse {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1.5px solid var(--gold-soft);
  opacity: 0;
  animation: pulse 2.6s ease-out infinite;
  pointer-events: none;
}

.marker {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(20, 30, 25, .5);
  border: 1.5px solid rgba(255, 255, 255, .92);
  box-shadow: 0 2px 10px rgba(0, 0, 0, .35), inset 0 0 0 3px rgba(255, 255, 255, .08);
  backdrop-filter: blur(4px);
  transition: transform .2s ease, background .2s, border-color .2s;
}

.marker svg {
  width: 42%;
  height: 42%;
  stroke: #fff;
  fill: none;
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke .2s;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: .85;
  }

  100% {
    transform: scale(2.2);
    opacity: 0;
  }
}

.link-hotspot:hover,
.link-hotspot:focus-visible {
  z-index: 5;
}

.link-hotspot:hover .marker,
.link-hotspot:focus-visible .marker {
  transform: scale(1.18);
  background: var(--gold);
  border-color: #fff;
}

.link-hotspot:hover .marker svg,
.link-hotspot:focus-visible .marker svg {
  stroke: #17221d;
}

/* Hover preview card */
.tip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 16px);
  width: 164px;
  transform: translate(-50%, 6px);
  background: rgba(20, 30, 25, .95);
  border: 1px solid rgba(199, 166, 106, .7);
  border-radius: 11px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s, transform .18s;
  box-shadow: 0 10px 28px #0007;
}

.tip-img {
  height: 92px;
  background: #26372e center / cover no-repeat;
}

.tip-text {
  padding: 9px 11px 10px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  text-align: left;
}

.tip-text small {
  font-size: 8px;
  letter-spacing: 1.4px;
  color: var(--gold);
  font-weight: 700;
}

.tip-text strong {
  font-size: 12px;
  font-weight: 600;
  color: #fff;
}

.link-hotspot:hover .tip,
.link-hotspot:focus-visible .tip {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* Info hotspots (none used right now — kept so you can add them later) */
.hotspot {
  color: #fff;
}

.info-hotspot {
  background: #18231ef2;
  border: 1px solid var(--gold);
  border-radius: 8px;
  color: #fff;
}

.info-hotspot-title,
.info-hotspot-text {
  font-family: "DM Sans", sans-serif;
}

.info-hotspot-header {
  background: transparent;
}

.info-hotspot-close-wrapper {
  cursor: pointer;
}

.info-hotspot-modal {
  background: #18231ef5;
  color: #fff;
  border: 1px solid var(--gold);
  border-radius: 10px;
}

/* ---------- Location panel ---------- */
.location-panel {
  min-height: 0;
  background: var(--cream);
  color: var(--forest);
  display: flex;
  flex-direction: column;
  z-index: 5;
  border-left: 1px solid #ffffff15;
}

.panel-heading {
  padding: 24px 22px 8px;
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 10px;
}

.panel-heading .eyebrow {
  color: #8b744c;
}

.panel-heading h2 {
  font: 600 24px "Playfair Display", serif;
  margin: 7px 0 0;
}

.scene-count {
  display: none;
}

/* counts are shown on the type tabs */
.explored {
  padding: 6px 22px 14px;
  border-bottom: 1px solid #dfe2d9;
}

.explored-row {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  letter-spacing: 1px;
  color: #6f786e;
  margin-bottom: 7px;
  font-weight: 600;
}

.explored-bar {
  height: 4px;
  border-radius: 4px;
  background: #dcdfd4;
  overflow: hidden;
}

.explored-bar span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #b99655, var(--gold));
  border-radius: 4px;
  transition: width .5s ease;
}

.scene-list-scroll {
  overflow-y: auto;
  min-height: 0;
  flex: 1;
  padding: 10px 12px;
}

.scenes {
  list-style: none;
  margin: 0;
  padding: 0;
}

.scenes li {
  margin: 3px 0;
}

.scene {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 8px;
  min-height: 66px;
  text-align: left;
  border: 1px solid transparent;
  border-radius: 10px;
  transition: background .2s, border-color .2s;
}

.scene:hover {
  background: #e9ece4;
}

.scene.current {
  background: #fff;
  border-color: #d9c69f;
  box-shadow: 0 4px 14px #24352a0d;
}

.scene-thumb {
  width: 76px;
  height: 48px;
  flex: 0 0 76px;
  border-radius: 6px;
  background: #c7c9bd center / cover no-repeat;
  position: relative;
  overflow: hidden;
}

.scene-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #17251c22, #17251c00);
}

.visited-check {
  position: absolute;
  right: 3px;
  bottom: 3px;
  z-index: 1;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--gold);
  color: #17221d;
  font: 700 10px/16px "DM Sans", sans-serif;
  text-align: center;
  font-style: normal;
  transform: scale(0);
  transition: transform .3s cubic-bezier(.3, 1.6, .5, 1);
}

.scene.visited .visited-check {
  transform: scale(1);
}

.scene-label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.scene-label small {
  font-size: 8px;
  letter-spacing: 1.3px;
  color: #8d7955;
  font-weight: 700;
}

.scene-label strong {
  font-size: 12.5px;
  font-weight: 600;
  color: #27362d;
}

.scene-arrow {
  margin-left: auto;
  color: #9a8a6c;
  font-size: 15px;
  opacity: 0;
  transition: opacity .2s;
}

.scene.current .scene-arrow,
.scene:hover .scene-arrow {
  opacity: 1;
}

.panel-footer {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 22px;
  border-top: 1px solid #dfe2d9;
  font-size: 11px;
  font-weight: 600;
}

.panel-footer small {
  display: inline-block;
  color: #818a80;
  font-size: 10px;
  font-weight: 400;
  margin-top: 4px;
}

.footer-pin {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid #d4c5a5;
  border-radius: 50%;
  color: #947a4e;
  font-size: 17px;
}

.mobile-scenes-toggle {
  display: none;
}


/* ---------- Unit type selector (panel tabs + welcome cards) ---------- */
.type-tabs {
  display: flex;
  gap: 6px;
  padding: 4px 22px 12px;
}

.type-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 9px 4px 8px;
  border: 1px solid #d9dccf;
  border-radius: 10px;
  background: #fff0;
  color: #55604f;
  transition: all .2s;
}

.type-tab strong {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .3px;
}

.type-tab small {
  font-size: 9px;
  letter-spacing: .8px;
  color: #8a9386;
}

.type-tab:hover {
  background: #e9ece4;
}

.type-tab.active {
  background: var(--forest);
  border-color: var(--forest);
  color: #fff;
  box-shadow: 0 4px 12px #18231e30;
}

.type-tab.active small {
  color: var(--gold-soft);
}

.welcome-label {
  font-size: 9px;
  letter-spacing: 2px;
  color: var(--gold-soft);
  margin-bottom: 12px;
}

.welcome-types {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-bottom: 26px;
}

.type-chip {
  min-width: 108px;
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 12px;
  background: #ffffff0d;
  transition: all .2s;
}

.type-chip strong {
  font: 600 17px "Playfair Display", serif;
}

.type-chip small {
  font-size: 9px;
  letter-spacing: 1.2px;
  color: #cfd6ce;
}

.type-chip:hover {
  border-color: var(--gold);
  background: #ffffff18;
}

.type-chip.active {
  border-color: var(--gold);
  background: var(--gold);
  color: #17221d;
}

.type-chip.active small {
  color: #3a3524;
}

@media (max-width: 850px) {
  .type-tabs {
    padding: 4px 18px 10px;
  }
}

@media (max-width: 650px) {
  .type-tabs {
    padding: 2px 18px 8px;
  }

  .type-tab {
    padding: 7px 4px 6px;
  }

  .welcome-types {
    gap: 8px;
  }

  .type-chip {
    min-width: 0;
    flex: 1;
    padding: 12px 6px;
  }
}


/* ---------- "Loading HD" chip ---------- */
.hd-chip {
  position: absolute;
  top: 18px;
  left: 50%;
  z-index: 5;
  transform: translate(-50%, -6px);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 30px;
  background: rgba(20, 30, 25, .72);
  border: 1px solid rgba(255, 255, 255, .2);
  backdrop-filter: blur(8px);
  font-size: 10px;
  letter-spacing: 1.4px;
  font-weight: 600;
  color: #fff;
  pointer-events: none;
  opacity: 0;
  transition: opacity .3s, transform .3s;
}

.hd-chip.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.hd-chip i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .3);
  border-top-color: var(--gold);
  animation: spin .8s linear infinite;
}

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

@media (max-width: 650px) {
  .hd-chip {
    top: auto;
    bottom: 66px;
  }
}


/* ---------- First-room loader (hides blocky tiles while the first view downloads) ---------- */
.room-loader {
  position: absolute;
  inset: 0;
  z-index: 15;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #101713;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .6s, visibility .6s;
}

.room-loader.show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.room-loader-bg {
  position: absolute;
  inset: -30px;
  background: var(--thumb, none) center / cover no-repeat;
  filter: blur(22px) brightness(.55) saturate(1.1);
  transform: scale(1.05);
}

.room-loader-box {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  font-size: 11px;
  letter-spacing: 1.6px;
  font-weight: 600;
  text-transform: uppercase;
}

.room-loader-box i {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2.5px solid rgba(255, 255, 255, .25);
  border-top-color: var(--gold);
  animation: spin .8s linear infinite;
}


/* ---------- Music button ---------- */
.music-button {
  position: relative;
}

.music-button::after {
  /* diagonal "off" line */
  content: "";
  position: absolute;
  width: 22px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transform: rotate(-45deg);
  opacity: .85;
  transition: opacity .2s;
}

.music-button.enabled {
  border-color: var(--gold);
  background: rgba(199, 166, 106, .2);
}

.music-button.enabled svg {
  stroke: var(--gold-soft);
}

.music-button.enabled::after {
  opacity: 0;
}

@media (prefers-reduced-motion: reduce) {

  .marker-pulse,
  .live-dot,
  .hint-hand,
  .hd-chip i {
    animation: none;
  }

  .viewer-heading>* {
    animation: none;
  }
}

/* ---------- Tablet ---------- */
@media (max-width: 850px) {
  :root {
    --panel-w: 290px;
  }

  .topbar {
    padding: 0 18px;
  }

  .topbar-center {
    display: none;
  }

  .panel-heading {
    padding: 20px 18px 8px;
  }

  .explored {
    padding: 6px 18px 12px;
  }

  .scene-list-scroll {
    padding: 8px;
  }

  .panel-footer {
    padding: 12px 18px;
  }

  .viewer-hint {
    display: none;
  }

  .radar {
    width: 78px;
    height: 78px;
    top: 20px;
    right: 18px;
  }
}

/* ---------- Phone ---------- */
@media (max-width: 650px) {
  .tour-shell {
    height: 100dvh;
    min-height: 0;
    display: flex;
    flex-direction: column;
  }

  .topbar {
    height: 60px;
    min-height: 60px;
    padding: 0 14px;
  }

  .brand-mark {
    width: 33px;
    height: 33px;
    font-size: 20px;
  }

  .brand-copy strong {
    font-size: 11px;
    letter-spacing: 1.5px;
  }

  .brand-copy small {
    display: none;
  }

  .icon-button {
    width: 34px;
    height: 34px;
  }

  .pill-button {
    width: 34px;
    height: 34px;
    padding: 0;
    justify-content: center;
  }

  .pill-button .btn-label {
    display: none;
  }

  .cta {
    height: 34px;
    padding: 0 13px;
    font-size: 10px;
  }

  .tour-stage {
    flex: 1;
    min-height: 0;
  }

  .viewer-heading {
    top: 18px;
    left: 16px;
  }

  .viewer-heading h1 {
    font-size: 24px;
  }

  .viewer-heading p {
    display: none;
  }

  .radar {
    width: 64px;
    height: 64px;
    top: 16px;
    right: 14px;
  }

  .view-controls {
    display: none;
  }

  /* phones: drag to look, pinch to zoom */
  .scene-nav {
    bottom: 12px;
  }

  .toast {
    bottom: 66px;
  }

  .link-hotspot {
    --marker: 28px;
  }

  .tip {
    display: none;
  }

  .location-panel {
    position: absolute;
    z-index: 12;
    left: 0;
    right: 0;
    bottom: 0;
    height: min(60dvh, 440px);
    border-radius: 18px 18px 0 0;
    border: 0;
    box-shadow: 0 -12px 35px #0003;
    transform: translateY(100%);
    transition: transform .32s ease;
    visibility: hidden;
  }

  .location-panel.enabled {
    transform: translateY(0);
    visibility: visible;
  }

  .panel-heading {
    padding: 16px 18px 8px;
  }

  .panel-heading h2 {
    font-size: 21px;
  }

  .explored {
    padding: 4px 18px 10px;
  }

  .scene-list-scroll {
    padding: 5px 10px;
  }

  .scene {
    min-height: 60px;
  }

  .scene-thumb {
    height: 43px;
  }

  .panel-footer {
    display: none;
  }

  .mobile-scenes-toggle {
    display: flex;
    position: absolute;
    z-index: 14;
    bottom: 12px;
    left: 12px;
    align-items: center;
    gap: 7px;
    border: 1px solid #ffffff55;
    border-radius: 30px;
    padding: 0 13px;
    height: 42px;
    background: #18231ee8;
    color: #fff;
    font-size: 10px;
    letter-spacing: .3px;
    backdrop-filter: blur(8px);
  }

  .mobile-scenes-toggle .icon {
    width: 12px;
    height: 12px;
    filter: brightness(0) invert(1);
  }

  .mobile-scenes-toggle .on {
    display: none;
  }

  .mobile-scenes-toggle.enabled .on {
    display: block;
  }

  .mobile-scenes-toggle.enabled .off {
    display: none;
  }

  .scene-nav {
    left: auto;
    right: 12px;
    transform: none;
    bottom: 12px;
  }

  body.sheet-open .scene-nav {
    display: none;
  }

  body.sheet-open .mobile-scenes-toggle {
    bottom: calc(min(60dvh, 440px) + 10px);
  }

  .welcome h2 {
    font-size: 28px;
  }

}

.brand-logo {
  height: 38px;
  width: auto;
  display: block;
}

@media (max-width: 650px) {
  .brand-logo {
    height: 2px;
  }
}

.welcome-logo {
  display: block;
  box-sizing: content-box;
  /* keeps the logo the size you set; the box grows around it */
  height: 72px;
  /* logo size */
  width: auto;
  max-width: 70%;
  margin: 0 auto 18px;
  padding: 14px 22px;
  /* space between the logo and the box line */
  border: 1px solid var(--gold);
  border-radius: 6px;
  /* 0 for sharp corners, 14px for rounder ones */
}

@media (max-width: 650px) {
  .welcome-logo {
    height: 56px;
    padding: 12px 18px;
  }
}

.footer-logo {
  height: 34px;
  /* make this bigger or smaller if you want */
  width: auto;
  max-width: 72px;
  flex: 0 0 auto;
  object-fit: contain;
}

.back-button {
  height: 38px;
  padding: 0 16px 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: #ffffff08;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .6px;
  color: #fff;
  transition: border-color .2s, background .2s;
}

.back-button svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.back-button:hover {
  border-color: var(--gold);
  background: #ffffff14;
}

@media (max-width: 650px) {
  .back-button {
    width: 34px;
    height: 34px;
    padding: 0;
    justify-content: center;
  }

  .back-button .btn-label {
    display: none;
  }

  /* phone: arrow icon only */
  .brand-copy {
    display: none;
  }

  /* phone: saves space for the buttons */
}