/* Residenz 360 HUD — tokens from system.css. Layout only; no second palette. */

html,
body.page-tour {
  height: 100%;
  overflow: hidden;
  background: var(--color-ink);
  color: var(--color-paper);
  font-family: var(--font-body);
}

button { font-family: inherit; }

#pano { position: absolute; inset: 0; }
.pnlm-container { background: var(--color-ink); }
.pnlm-panorama-info,
.pnlm-hotspot-base.pnlm-info,
.pnlm-controls-container,
.pnlm-load-box,
.pnlm-load-button { display: none !important; }
.pnlm-lbar { background: var(--color-gold); }
.pnlm-pointer { cursor: grab; }
.pnlm-grab:active { cursor: grabbing; }

.hs {
  background: rgba(18, 18, 18, 0.35);
  border: 1px solid var(--color-gold);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.4);
}
.hs::after {
  content: "";
  position: absolute;
  inset: -10px;
  border: 1px solid oklch(0.86 0.07 75 / 0.55);
  border-radius: 50%;
  animation: tour-pulse 2.4s ease-out infinite;
}
@keyframes tour-pulse {
  from { transform: scale(0.7); opacity: 0.8; }
  to { transform: scale(1.35); opacity: 0; }
}

#hud {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 5;
}
#hud > * { pointer-events: auto; }

.tour-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding: calc(var(--space-2) + env(safe-area-inset-top)) var(--space-3) var(--space-2);
  background: linear-gradient(180deg, rgba(18, 18, 18, 0.72), transparent);
}
.tour-top .logo { z-index: 1; }
.tour-actions {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.room {
  position: absolute;
  left: 22px;
  bottom: calc(22px + env(safe-area-inset-bottom));
  font-family: var(--font-display);
  font-size: var(--text-title);
  letter-spacing: -0.02em;
  text-shadow: 0 10px 28px rgba(0, 0, 0, 0.55);
  pointer-events: none;
}
.room small {
  display: block;
  margin-top: var(--space-half);
  font-family: var(--font-mono);
  font-size: var(--text-kicker);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-gold);
  font-style: normal;
}

.rooms {
  position: absolute;
  left: 50%;
  bottom: calc(22px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
  max-width: min(94vw, 720px);
}
.rooms button {
  border: 1px solid rgba(221, 226, 229, 0.22);
  background: rgba(18, 18, 18, 0.55);
  color: var(--color-nav);
  padding: var(--space-1) 12px;
  font-size: 12px;
  letter-spacing: 0.04em;
  cursor: pointer;
}
.rooms button.is-on,
.rooms button:hover {
  border-color: var(--color-gold);
  color: var(--color-paper);
}

.map-wrap {
  position: absolute;
  right: 18px;
  bottom: calc(18px + env(safe-area-inset-bottom));
  width: 176px;
  padding: var(--space-1);
  background: rgba(18, 18, 18, 0.72);
  border: 1px solid var(--color-line);
}
.map-wrap svg { display: block; width: 100%; height: auto; }
.map-wrap .dot { fill: var(--color-gold); }
.map-wrap .zone {
  fill: rgba(221, 226, 229, 0.06);
  stroke: rgba(221, 226, 229, 0.22);
  cursor: pointer;
}
.map-wrap .zone.is-on {
  fill: rgba(224, 195, 122, 0.28);
  stroke: var(--color-gold);
}

.help {
  position: absolute;
  right: 18px;
  top: calc(64px + env(safe-area-inset-top));
  font-size: 12px;
  line-height: 1.55;
  color: var(--color-muted);
  max-width: 230px;
  background: rgba(18, 18, 18, 0.5);
  padding: 12px var(--space-2);
  border: 1px solid rgba(221, 226, 229, 0.1);
  transition: opacity 0.6s ease;
}

#gate {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: grid;
  align-items: end;
  background: var(--color-ink);
}
#gate img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
#gate .veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(18, 18, 18, 0.28) 10%, rgba(18, 18, 18, 0.18) 40%, rgba(18, 18, 18, 0.92) 100%);
}
#gate .copy {
  position: relative;
  padding: 0 var(--space-4) calc(var(--space-4) + env(safe-area-inset-bottom));
  max-width: 780px;
}
#gate h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(40px, 7vw, 84px);
  line-height: 0.98;
  letter-spacing: -0.03em;
  margin: 0;
}
#gate h1 i {
  font-style: italic;
  color: var(--color-gold-bright);
}
#gate p {
  max-width: 460px;
  font-weight: 300;
  font-size: var(--text-body);
  line-height: 1.5;
  color: var(--color-nav);
  margin: var(--space-2) 0 var(--space-3);
}
#gate .row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}
#gate.is-out {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s var(--ease);
}

@media (max-width: 860px) {
  .help { display: none; }
  .rooms {
    left: 18px;
    right: 18px;
    transform: none;
    bottom: calc(196px + env(safe-area-inset-bottom));
    justify-content: flex-start;
  }
  .room {
    font-size: 26px;
    bottom: calc(110px + env(safe-area-inset-bottom));
  }
  .map-wrap { width: 140px; }
}
