:root {
  color-scheme: dark;
  --navy-950: #030914;
  --navy-900: #071321;
  --navy-800: #0b1c30;
  --gold-300: #efd486;
  --gold-400: #ddb85d;
  --gold-500: #bd8f32;
  --ice: #d9edf6;
  --white: #f8fbfd;
  --muted: rgba(229, 239, 245, .68);
  --glass: rgba(5, 15, 27, .68);
  --glass-strong: rgba(5, 14, 25, .88);
  --line: rgba(255, 255, 255, .16);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--navy-950);
  color: var(--white);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
  font: inherit;
}

#tour {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 420px;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(circle at 50% 35%, rgba(37, 58, 77, .5), transparent 55%),
    var(--navy-950);
}

#viewer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: grab;
  touch-action: none;
  user-select: none;
}

#viewer:active {
  cursor: grabbing;
}

.vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(2, 7, 14, .66) 0%, transparent 26%, transparent 67%, rgba(2, 7, 14, .72) 100%),
    radial-gradient(ellipse at center, transparent 48%, rgba(2, 7, 14, .28) 100%);
  z-index: 2;
}

#transition {
  position: absolute;
  inset: 0;
  z-index: 40;
  pointer-events: none;
  opacity: 0;
  background: var(--navy-950);
  transition: opacity .36s ease;
}

#transition.active {
  opacity: 1;
}

.topbar {
  position: absolute;
  z-index: 20;
  top: calc(18px + var(--safe-top));
  left: calc(22px + var(--safe-left));
  right: calc(22px + var(--safe-right));
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--white);
  text-decoration: none;
  pointer-events: auto;
  filter: drop-shadow(0 4px 16px rgba(0, 0, 0, .34));
}

.brand-mark {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  color: var(--gold-400);
  border: 1px solid rgba(232, 196, 106, .46);
  border-radius: 15px;
  background: linear-gradient(145deg, rgba(15, 32, 49, .88), rgba(3, 11, 20, .76));
  backdrop-filter: blur(14px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .2), inset 0 0 18px rgba(227, 186, 83, .08);
}

.brand-mark svg {
  width: 31px;
  height: 31px;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
  line-height: 1;
  letter-spacing: .14em;
}

.brand-copy strong {
  color: var(--gold-300);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 16px;
  letter-spacing: .1em;
}

.brand-copy small {
  color: var(--ice);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .3em;
}

.top-actions {
  display: flex;
  gap: 8px;
  pointer-events: auto;
}

.icon-button,
.control-button,
.panel-close {
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--glass);
  box-shadow: 0 10px 28px rgba(0, 0, 0, .2);
  backdrop-filter: blur(14px) saturate(125%);
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, background .18s ease, color .18s ease;
}

.icon-button:hover,
.control-button:hover,
.panel-close:hover {
  transform: translateY(-1px);
  border-color: rgba(238, 210, 135, .58);
  color: var(--gold-300);
  background: rgba(8, 22, 38, .88);
}

.icon-button:focus-visible,
.control-button:focus-visible,
.panel-close:focus-visible,
.room-button:focus-visible,
.hotspot:focus-visible,
.primary-link:focus-visible {
  outline: 2px solid var(--gold-300);
  outline-offset: 3px;
}

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

.icon-button svg,
.control-button svg,
.panel-close svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sound-off {
  display: none;
}

#soundButton[aria-pressed="false"] .sound-on {
  display: none;
}

#soundButton[aria-pressed="false"] .sound-off {
  display: block;
}

.room-title {
  position: absolute;
  z-index: 10;
  top: calc(94px + var(--safe-top));
  left: calc(25px + var(--safe-left));
  max-width: min(430px, 58vw);
  pointer-events: none;
  text-shadow: 0 4px 20px rgba(0, 0, 0, .62);
}

.room-title span,
.eyebrow {
  display: block;
  margin-bottom: 8px;
  color: var(--gold-300);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .3em;
}

.room-title h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(32px, 5vw, 64px);
  font-weight: 500;
  line-height: .96;
  letter-spacing: -.02em;
}

.room-title p {
  margin: 10px 0 0;
  color: rgba(255, 255, 255, .78);
  font-size: 13px;
  letter-spacing: .02em;
}

.controls {
  position: absolute;
  z-index: 20;
  top: 50%;
  right: calc(22px + var(--safe-right));
  display: flex;
  flex-direction: column;
  gap: 8px;
  transform: translateY(-50%);
}

.control-button {
  width: 44px;
  height: 44px;
}

.control-button.active {
  color: var(--navy-950);
  border-color: rgba(241, 214, 139, .72);
  background: linear-gradient(145deg, var(--gold-300), var(--gold-500));
}

.control-divider {
  width: 18px;
  height: 1px;
  margin: 3px auto;
  background: var(--line);
}

.orientation {
  position: absolute;
  z-index: 10;
  top: calc(88px + var(--safe-top));
  left: 50%;
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, .62);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  letter-spacing: .12em;
  transform: translateX(-50%);
  pointer-events: none;
}

.orientation-line {
  width: 35px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-300));
}

.coachmark {
  position: absolute;
  z-index: 15;
  top: 50%;
  left: 50%;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 12px 17px 12px 12px;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 18px;
  background: rgba(4, 13, 23, .72);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .36);
  backdrop-filter: blur(16px);
  transform: translate(-50%, -50%);
  transition: opacity .35s ease, transform .35s ease;
  pointer-events: none;
}

.coachmark.hidden {
  opacity: 0;
  transform: translate(-50%, -44%);
}

.coachmark strong,
.coachmark small {
  display: block;
  white-space: nowrap;
}

.coachmark strong {
  font-size: 12px;
}

.coachmark small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.drag-icon {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--gold-300);
  border-radius: 12px;
  background: rgba(223, 184, 89, .12);
}

.drag-icon svg {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#hotspots {
  position: absolute;
  inset: 0;
  z-index: 12;
  overflow: hidden;
  pointer-events: none;
}

.hotspot {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 12px 7px 7px;
  color: var(--white);
  border: 1px solid rgba(245, 218, 146, .58);
  border-radius: 999px;
  background: rgba(5, 16, 28, .8);
  box-shadow: 0 12px 35px rgba(0, 0, 0, .32), 0 0 0 6px rgba(232, 196, 106, .08);
  backdrop-filter: blur(12px);
  cursor: pointer;
  transform: translate(-50%, -50%);
  transition: opacity .2s ease, transform .2s ease, background .2s ease;
  pointer-events: auto;
}

.hotspot::before {
  content: "";
  position: absolute;
  inset: -8px;
  border: 1px solid rgba(233, 199, 111, .36);
  border-radius: inherit;
  animation: hotspotPulse 2.2s ease-out infinite;
}

.hotspot:hover {
  color: var(--navy-950);
  background: var(--gold-300);
  transform: translate(-50%, -50%) scale(1.04);
}

.hotspot-icon {
  display: grid;
  width: 27px;
  height: 27px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--navy-950);
  border-radius: 50%;
  background: linear-gradient(145deg, var(--gold-300), var(--gold-500));
  font-size: 15px;
  font-weight: 800;
}

.hotspot-label {
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

@keyframes hotspotPulse {
  0% { opacity: .72; transform: scale(.9); }
  80%, 100% { opacity: 0; transform: scale(1.24); }
}

.room-nav {
  position: absolute;
  z-index: 20;
  right: calc(22px + var(--safe-right));
  bottom: calc(20px + var(--safe-bottom));
  left: calc(22px + var(--safe-left));
  width: min(600px, calc(100% - 44px - var(--safe-right) - var(--safe-left)));
  margin: 0 auto;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(4, 13, 23, .72);
  box-shadow: 0 18px 54px rgba(0, 0, 0, .34);
  backdrop-filter: blur(18px) saturate(125%);
}

.room-nav-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 5px 9px;
  color: rgba(255, 255, 255, .6);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .22em;
}

.room-nav-header small {
  letter-spacing: .08em;
}

.room-nav-header b {
  color: var(--gold-300);
}

.room-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.room-button {
  position: relative;
  min-width: 0;
  height: 64px;
  padding: 0;
  overflow: hidden;
  color: var(--white);
  text-align: left;
  border: 1px solid transparent;
  border-radius: 14px;
  background-color: #132235;
  background-position: center;
  background-size: cover;
  cursor: pointer;
  isolation: isolate;
  transition: border-color .2s ease, transform .2s ease;
}

.room-button::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(2, 8, 14, .9), rgba(2, 8, 14, .25));
}

.room-button::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08);
}

.room-button:hover {
  transform: translateY(-2px);
  border-color: rgba(239, 212, 134, .58);
}

.room-button.active {
  border-color: var(--gold-300);
  box-shadow: 0 0 0 2px rgba(222, 184, 91, .12);
}

.room-button span {
  position: absolute;
  bottom: 9px;
  left: 10px;
  right: 8px;
  overflow: hidden;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.info-panel {
  position: absolute;
  z-index: 35;
  top: 0;
  right: 0;
  width: min(430px, 100%);
  height: 100%;
  padding: calc(76px + var(--safe-top)) calc(34px + var(--safe-right)) calc(38px + var(--safe-bottom)) 34px;
  overflow-y: auto;
  border-left: 1px solid var(--line);
  background:
    radial-gradient(circle at 90% 10%, rgba(220, 181, 84, .14), transparent 34%),
    var(--glass-strong);
  box-shadow: -28px 0 80px rgba(0, 0, 0, .35);
  backdrop-filter: blur(24px) saturate(120%);
  transform: translateX(103%);
  transition: transform .38s cubic-bezier(.2, .8, .2, 1);
}

.info-panel.open {
  transform: translateX(0);
}

.panel-close {
  position: absolute;
  top: calc(19px + var(--safe-top));
  right: calc(20px + var(--safe-right));
  width: 43px;
  height: 43px;
}

.info-panel h2 {
  margin: 10px 0 18px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(31px, 6vw, 48px);
  font-weight: 500;
  line-height: 1.05;
}

.info-panel > p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.info-panel dl {
  margin: 28px 0;
  border-top: 1px solid var(--line);
}

.info-panel dl div {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.info-panel dt {
  color: rgba(255, 255, 255, .5);
  font-size: 11px;
}

.info-panel dd {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  text-align: right;
}

.primary-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 15px 18px;
  color: var(--navy-950);
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--gold-300), var(--gold-500));
  box-shadow: 0 14px 34px rgba(189, 143, 50, .2);
}

.primary-link span {
  font-size: 18px;
}

.info-panel .ai-note {
  margin-top: 20px;
  padding-left: 12px;
  color: rgba(255, 255, 255, .43);
  font-size: 10px;
  line-height: 1.5;
  border-left: 2px solid rgba(222, 184, 91, .45);
}

.loading {
  position: absolute;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: rgba(255, 255, 255, .68);
  background:
    radial-gradient(circle at 50% 42%, rgba(32, 55, 76, .75), transparent 40%),
    var(--navy-950);
  font-size: 10px;
  letter-spacing: .22em;
  transition: opacity .55s ease, visibility .55s ease;
}

.loading.hidden {
  opacity: 0;
  visibility: hidden;
}

.loading-mark {
  display: grid;
  width: 72px;
  height: 72px;
  place-items: center;
  color: var(--gold-300);
  border: 1px solid rgba(238, 208, 129, .54);
  border-radius: 23px;
  background: rgba(8, 23, 39, .8);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 23px;
  box-shadow: 0 0 48px rgba(221, 184, 92, .1);
  animation: markFloat 2.4s ease-in-out infinite;
}

.loading-line {
  width: 140px;
  height: 2px;
  overflow: hidden;
  border-radius: 2px;
  background: rgba(255, 255, 255, .12);
}

.loading-line i {
  display: block;
  width: 28%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--gold-500), var(--gold-300));
  box-shadow: 0 0 12px rgba(237, 206, 123, .65);
  transition: width .35s ease;
}

@keyframes markFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.error-message {
  position: absolute;
  z-index: 110;
  top: 50%;
  left: 50%;
  width: min(390px, calc(100% - 38px));
  padding: 24px;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--glass-strong);
  transform: translate(-50%, -50%);
}

.error-message strong,
.error-message span {
  display: block;
}

.error-message span {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 700px) {
  .topbar {
    top: calc(12px + var(--safe-top));
    left: calc(13px + var(--safe-left));
    right: calc(13px + var(--safe-right));
  }

  .brand-mark {
    width: 43px;
    height: 43px;
    border-radius: 13px;
  }

  .brand-copy strong {
    font-size: 14px;
  }

  .brand-copy small {
    font-size: 7px;
  }

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

  #soundButton {
    display: none;
  }

  .room-title {
    top: calc(79px + var(--safe-top));
    left: calc(16px + var(--safe-left));
    max-width: calc(100% - 82px);
  }

  .room-title h1 {
    font-size: 34px;
  }

  .room-title p {
    margin-top: 7px;
    font-size: 11px;
  }

  .orientation {
    display: none;
  }

  .controls {
    top: 46%;
    right: calc(11px + var(--safe-right));
    gap: 6px;
  }

  .control-button {
    width: 40px;
    height: 40px;
  }

  .control-divider,
  #zoomInButton,
  #zoomOutButton {
    display: none;
  }

  .coachmark {
    top: 48%;
    padding: 10px 14px 10px 10px;
  }

  .room-nav {
    right: calc(10px + var(--safe-right));
    bottom: calc(10px + var(--safe-bottom));
    left: calc(10px + var(--safe-left));
    width: auto;
    padding: 8px;
    border-radius: 18px;
  }

  .room-nav-header {
    padding: 0 4px 7px;
  }

  .room-list {
    gap: 6px;
  }

  .room-button {
    height: 54px;
    border-radius: 11px;
  }

  .room-button span {
    bottom: 7px;
    left: 7px;
    font-size: 8px;
    letter-spacing: .04em;
  }

  .hotspot {
    gap: 6px;
    padding: 5px 9px 5px 5px;
  }

  .hotspot-icon {
    width: 24px;
    height: 24px;
    font-size: 13px;
  }

  .hotspot-label {
    max-width: 125px;
    overflow: hidden;
    font-size: 9px;
    text-overflow: ellipsis;
  }

  .info-panel {
    padding-right: calc(24px + var(--safe-right));
    padding-left: calc(24px + var(--safe-left));
  }
}

@media (max-height: 580px) and (orientation: landscape) {
  .room-title {
    top: calc(72px + var(--safe-top));
  }

  .room-title p,
  .room-nav-header,
  .coachmark {
    display: none;
  }

  .room-nav {
    right: auto;
    bottom: calc(9px + var(--safe-bottom));
    left: calc(10px + var(--safe-left));
    width: min(440px, 58vw);
  }

  .room-button {
    height: 46px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
