:root {
  --tour-bg: #050505;
  --tour-fg: #fff;
  --tour-accent: #ea533f;
  --tour-muted: rgba(255,255,255,.55);
  --tour-radius: 1rem;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  background: var(--tour-bg);
  color: var(--tour-fg);
  font-family: 'Poppins', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

.tour-page {
  position: relative;
  width: 100%;
  height: 100dvh;
  background: var(--tour-bg);
  overflow: hidden;
}

/* ── Viewer ── */
#tour-viewer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #000;
  z-index: 1;
}

.pnlm-container { background: #000 !important; }
.pnlm-load-box,
.pnlm-lbox,
.pnlm-load-box p,
.pnlm-lmsg,
.pnlm-lbar,
.pnlm-lbar-fill,
.pnlm-about-msg,
.pnlm-title-box,
.pnlm-panorama-info { display: none !important; }

#tour-gyro { display: none; }
@media (max-width: 767px) {
  #tour-gyro:not([hidden]) { display: inline-flex; }
}

/* Loader laranja */
.tour-loader {
  position: absolute;
  inset: 0;
  z-index: 12;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(5,5,5,.55);
  pointer-events: none;
  opacity: 1;
  transition: opacity .35s ease;
}
.tour-loader.is-hidden {
  opacity: 0;
  visibility: hidden;
}
.tour-loader-ring {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 3px solid rgba(234,83,63,.2);
  border-top-color: #ea533f;
  animation: tour-spin .7s linear infinite;
}
@keyframes tour-spin {
  to { transform: rotate(360deg); }
}

/* Hotspots */
.tour-hotspot {
  background: transparent !important;
  border: none !important;
  width: 44px !important;
  height: 44px !important;
  margin-left: -22px !important;
  margin-top: -22px !important;
  cursor: pointer;
}
.tour-hotspot::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid rgba(234,83,63,.85);
  background: rgba(234,83,63,.35);
  box-shadow: 0 0 0 0 rgba(234,83,63,.45);
  animation: hotspot-pulse 2.2s ease-out infinite;
}
.tour-hotspot::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 10px; height: 10px;
  margin: -5px 0 0 -5px;
  border-radius: 50%;
  background: #fff;
}
@keyframes hotspot-pulse {
  0%   { transform: scale(1);   box-shadow: 0 0 0 0 rgba(234,83,63,.5); }
  70%  { transform: scale(1.15); box-shadow: 0 0 0 14px rgba(234,83,63,0); }
  100% { transform: scale(1);   box-shadow: 0 0 0 0 rgba(234,83,63,0); }
}
.pnlm-hotspot-base.pnlm-tooltip span {
  visibility: visible !important;
  opacity: 1 !important;
  background: rgba(0,0,0,.85) !important;
  border: 1px solid rgba(234,83,63,.5) !important;
  color: #fff !important;
  font-family: 'Poppins', sans-serif !important;
  font-size: .75rem !important;
  font-weight: 500 !important;
  letter-spacing: .04em !important;
  padding: .45rem .7rem !important;
  border-radius: 9999px !important;
  white-space: nowrap !important;
  bottom: 52px !important;
}
.pnlm-hotspot-base.pnlm-tooltip span::before {
  border-top-color: rgba(0,0,0,.85) !important;
}

/* ── Top bar ── */
.tour-top {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: linear-gradient(to bottom, rgba(0,0,0,.72), transparent);
  pointer-events: none;
}
.tour-top > * { pointer-events: auto; }

.tour-back {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  color: #fff;
  text-decoration: none;
  font-size: .85rem;
  font-weight: 500;
  padding: .55rem .9rem;
  border-radius: 9999px;
  background: rgba(0,0,0,.45);
  border: 1px solid rgba(255,255,255,.15);
  backdrop-filter: blur(8px);
  transition: background .2s, border-color .2s;
}
.tour-back:hover {
  background: rgba(234,83,63,.9);
  border-color: transparent;
}
.tour-back svg { width: 16px; height: 16px; }

.tour-room-title {
  font-family: 'Poppins', sans-serif;
  font-size: clamp(1rem, 2.5vw, 1.35rem);
  font-weight: 600;
  letter-spacing: -.01em;
  text-shadow: 0 2px 16px rgba(0,0,0,.6);
}

.tour-actions {
  display: flex;
  gap: .5rem;
}
.tour-action {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(0,0,0,.45);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: background .2s, border-color .2s, color .2s;
}
.tour-action:hover,
.tour-action.is-active {
  background: var(--tour-accent);
  border-color: transparent;
}
.tour-action.is-unavailable { opacity: .4; cursor: not-allowed; }
.tour-action svg { width: 18px; height: 18px; }

/* ── Hint ── */
.tour-hint {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 15;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .75rem;
  padding: 1.1rem 1.4rem;
  border-radius: 1rem;
  background: rgba(0,0,0,.55);
  border: 1px solid rgba(255,255,255,.12);
  backdrop-filter: blur(10px);
  pointer-events: none;
  transition: opacity .5s, transform .5s;
}
.tour-hint.is-hidden {
  opacity: 0;
  transform: translate(-50%, -40%);
  pointer-events: none;
}
.tour-hint-icon {
  width: 36px;
  height: 36px;
  color: var(--tour-accent);
}
.tour-hint p {
  font-size: .8rem;
  font-weight: 500;
  color: rgba(255,255,255,.85);
  text-align: center;
  line-height: 1.4;
}

/* ── Thumbnails strip ── */
.tour-strip {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 20;
  padding: 1.25rem 1rem 1.35rem;
  background: linear-gradient(to top, rgba(0,0,0,.85) 0%, rgba(0,0,0,.35) 70%, transparent 100%);
}
.tour-thumbs {
  display: flex;
  gap: .75rem;
  overflow-x: auto;
  padding: .25rem .25rem .5rem;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(234,83,63,.5) transparent;
  max-width: 1400px;
  margin: 0 auto;
}
.tour-thumbs::-webkit-scrollbar { height: 4px; }
.tour-thumbs::-webkit-scrollbar-thumb {
  background: rgba(234,83,63,.5);
  border-radius: 9999px;
}

.tour-thumb {
  flex: 0 0 auto;
  width: 148px;
  scroll-snap-align: start;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  text-align: left;
  color: #fff;
  font: inherit;
  transition: transform .2s;
}
.tour-thumb:hover { transform: translateY(-3px); }
.tour-thumb-img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: .75rem;
  background-size: cover;
  background-position: center;
  border: 2px solid transparent;
  box-shadow: 0 8px 24px rgba(0,0,0,.35);
  transition: border-color .2s, box-shadow .2s;
}
.tour-thumb.is-active .tour-thumb-img {
  border-color: var(--tour-accent);
  box-shadow: 0 0 0 1px var(--tour-accent), 0 8px 24px rgba(0,0,0,.4);
}
.tour-thumb-name {
  display: block;
  margin-top: .45rem;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .02em;
  color: rgba(255,255,255,.7);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 .15rem;
}
.tour-thumb.is-active .tour-thumb-name { color: #fff; }

@media (max-width: 640px) {
  .tour-top { padding: .85rem .9rem; }
  .tour-room-title { font-size: .95rem; }
  .tour-back span { display: none; }
  .tour-thumb { width: 120px; }
  .tour-strip { padding: 1rem .75rem 1.1rem; }
}
