.tour-demo-page {
  --tour-panel: rgba(2, 9, 6, 0.86);
  --tour-shadow: 0 30px 100px rgba(0, 0, 0, 0.62);
}

.tour-demo-hero {
  min-height: min(700px, calc(86svh - 76px));
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.62fr);
}

.tour-demo-hero h1 {
  max-width: 850px;
}

.tour-brief {
  position: relative;
  padding: clamp(24px, 4vw, 42px);
  border: 1px solid rgba(var(--a), 0.34);
  background:
    linear-gradient(145deg, rgba(var(--a), 0.085), transparent 58%),
    rgba(2, 10, 6, 0.76);
  box-shadow: 22px 22px 0 rgba(var(--h), 0.075);
}

.tour-brief::before,
.tour-brief::after {
  content: "";
  position: absolute;
  width: 34px;
  height: 34px;
  pointer-events: none;
}

.tour-brief::before {
  inset: -1px auto auto -1px;
  border-top: 2px solid var(--acid);
  border-left: 2px solid var(--acid);
}

.tour-brief::after {
  inset: auto -1px -1px auto;
  border-right: 2px solid var(--hot);
  border-bottom: 2px solid var(--hot);
}

.tour-brief ol {
  display: grid;
  gap: 20px;
  margin-top: 25px;
  list-style: none;
}

.tour-brief li {
  display: grid;
  grid-template-columns: 35px auto 1fr;
  gap: 10px;
  align-items: baseline;
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.55;
}

.tour-brief li span {
  color: var(--hot);
  font-weight: 800;
}

.tour-brief li b {
  color: var(--text);
  letter-spacing: 0.05em;
}

.tour-demo-section {
  padding-top: clamp(70px, 9vw, 120px);
}

.tour-viewer-shell {
  position: relative;
  min-height: 660px;
  overflow: hidden;
  border: 1px solid rgba(var(--a), 0.52);
  background: #000;
  box-shadow: var(--tour-shadow);
  isolation: isolate;
}

.tour-viewer-shell::before,
.tour-viewer-shell::after {
  content: "";
  position: absolute;
  z-index: 8;
  width: 80px;
  height: 80px;
  pointer-events: none;
}

.tour-viewer-shell::before {
  inset: 0 auto auto 0;
  border-top: 3px solid var(--acid);
  border-left: 3px solid var(--acid);
}

.tour-viewer-shell::after {
  inset: auto 0 0 auto;
  border-right: 3px solid var(--hot);
  border-bottom: 3px solid var(--hot);
}

.tour-panorama {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(circle at 50% 50%, rgba(var(--a), 0.11), transparent 38%),
    repeating-linear-gradient(0deg, rgba(var(--a), 0.025) 0 1px, transparent 1px 5px),
    #010403;
}

.tour-panorama .pnlm-render-container {
  filter: saturate(0.96) contrast(1.04);
}

.tour-panorama .pnlm-about-msg,
.tour-panorama .pnlm-controls-container {
  display: none !important;
}

.tour-panorama .pnlm-load-box {
  display: none !important;
}

.tour-hud {
  position: absolute;
  inset: 0 0 auto;
  z-index: 10;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 18px;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(var(--a), 0.3);
  background: linear-gradient(180deg, rgba(1, 4, 3, 0.94), rgba(1, 4, 3, 0.62));
  color: var(--acid);
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  pointer-events: none;
}

.tour-hud span:last-child {
  justify-self: end;
  color: var(--hot);
}

.tour-hud i {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 7px;
  border-radius: 50%;
  background: var(--hot);
  box-shadow: 0 0 12px var(--hot);
  animation: tourPulse 1.5s steps(2, end) infinite;
}

.tour-controls {
  position: absolute;
  z-index: 12;
  inset: auto 14px 14px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px;
  pointer-events: none;
}

.tour-controls button {
  min-height: 39px;
  padding: 9px 12px;
  border: 1px solid rgba(var(--a), 0.48);
  border-radius: 0;
  background: rgba(1, 6, 4, 0.86);
  color: var(--text);
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  cursor: pointer;
  backdrop-filter: blur(9px);
  pointer-events: auto;
  transition: 160ms ease;
}

.tour-controls button:hover,
.tour-controls button:focus-visible,
.tour-controls button[aria-pressed="true"] {
  border-color: var(--acid);
  background: rgba(var(--a), 0.18);
  color: var(--acid);
}

.tour-controls button[data-tour-control="zoom-in"],
.tour-controls button[data-tour-control="zoom-out"] {
  width: 42px;
  padding-inline: 0;
  font-size: 1rem;
}

.tour-controls .scene-step {
  border-color: var(--acid);
  color: var(--acid);
  box-shadow: 0 0 18px rgba(var(--a), 0.2);
}

.tour-controls .scene-step-next {
  background: var(--acid);
  color: #010403;
  box-shadow: 0 0 24px rgba(var(--a), 0.36);
}

.tour-controls .scene-step-next:hover,
.tour-controls .scene-step-next:focus-visible {
  background: var(--hot);
  border-color: var(--hot);
  color: #010403;
}

.tour-loading,
.tour-error {
  position: absolute;
  inset: 0;
  z-index: 11;
  display: grid;
  place-content: center;
  gap: 10px;
  padding: 30px;
  background:
    repeating-linear-gradient(0deg, rgba(var(--a), 0.025) 0 1px, transparent 1px 5px),
    #010403;
  text-align: center;
}

.tour-loading.is-hidden {
  opacity: 0;
  visibility: hidden;
  transition: opacity 360ms ease, visibility 0s linear 360ms;
}

.tour-loading strong,
.tour-error strong {
  color: var(--acid);
  font-size: 0.72rem;
  letter-spacing: 0.13em;
}

.tour-loading small,
.tour-error p {
  color: var(--muted);
  font-size: 0.62rem;
  line-height: 1.6;
}

.tour-error code {
  display: block;
  max-width: min(560px, 84vw);
  margin: 3px auto 8px;
  padding: 9px 12px;
  border: 1px solid rgba(var(--h), 0.38);
  background: rgba(var(--h), 0.06);
  color: var(--hot);
  font-family: var(--mono);
  font-size: 0.58rem;
  overflow-wrap: anywhere;
}

.tour-error button {
  justify-self: center;
  padding: 10px 14px;
  border: 1px solid var(--acid);
  background: rgba(var(--a), 0.1);
  color: var(--acid);
  font-family: var(--mono);
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  cursor: pointer;
}

.tour-error button:hover,
.tour-error button:focus-visible {
  background: var(--acid);
  color: var(--bg);
}

.tour-error[hidden] {
  display: none;
}

.tour-loader {
  width: 48px;
  height: 48px;
  margin: 0 auto 8px;
  border: 2px solid rgba(var(--a), 0.2);
  border-top-color: var(--acid);
  border-right-color: var(--hot);
  border-radius: 50%;
  animation: tourSpin 0.8s linear infinite;
}

.scene-selector {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 12px;
}

.scene-selector button {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  gap: 4px 13px;
  min-height: 82px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  background: rgba(2, 10, 6, 0.74);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: 160ms ease;
}

.scene-selector button:hover,
.scene-selector button.active {
  transform: translateY(-2px);
  border-color: var(--acid);
  background: rgba(var(--a), 0.09);
}

.scene-selector span {
  grid-row: 1 / 3;
  color: var(--hot);
  font-weight: 800;
}

.scene-selector b {
  align-self: end;
  font-size: 0.66rem;
  letter-spacing: 0.08em;
}

.scene-selector small {
  color: var(--muted);
  font-size: 0.54rem;
}

.tour-support-section {
  padding-top: clamp(90px, 11vw, 150px);
}

.tour-video-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.tour-video-card {
  overflow: hidden;
  border: 1px solid var(--line);
  background:
    linear-gradient(145deg, rgba(var(--a), 0.055), transparent 55%),
    rgba(3, 11, 7, 0.92);
  transition: 180ms ease;
}

.tour-video-card:hover {
  transform: translateY(-3px);
  border-color: rgba(var(--a), 0.58);
}

.tour-video-hud {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--acid);
  font-size: 0.54rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.tour-video-hud span:last-child {
  color: var(--hot);
}

.tour-video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #000;
}

.tour-video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.tour-video-copy {
  padding: 22px;
}

.tour-video-copy .card-id {
  color: var(--hot);
  font-size: 0.57rem;
  font-weight: 800;
  letter-spacing: 0.11em;
}

.tour-video-copy h3 {
  margin: 11px 0 8px;
  font-family: var(--sans);
  font-size: 1.15rem;
  text-transform: uppercase;
}

.tour-video-copy p,
.tour-request-strip p:last-child {
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.65;
}

.tour-request-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: center;
  margin-top: 16px;
  padding: clamp(24px, 4vw, 38px);
  border: 1px solid rgba(var(--h), 0.42);
  background:
    linear-gradient(145deg, rgba(var(--h), 0.09), transparent 55%),
    rgba(3, 11, 7, 0.9);
}

.tour-request-strip h3 {
  margin: 8px 0;
  font-family: var(--sans);
  font-size: clamp(1.35rem, 2.5vw, 2.35rem);
  text-transform: uppercase;
}

.tour-request-strip .actions {
  margin: 0;
}

.embed-callout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 34px;
  align-items: center;
  margin-top: clamp(80px, 10vw, 130px);
  padding: clamp(28px, 5vw, 52px);
  border: 1px solid rgba(var(--a), 0.38);
  background:
    linear-gradient(120deg, rgba(var(--a), 0.09), transparent 48%),
    rgba(3, 11, 7, 0.82);
}

.embed-callout h2 {
  margin-top: 8px;
  font-family: var(--sans);
  font-size: clamp(1.7rem, 3vw, 3rem);
  text-transform: uppercase;
}

.embed-callout p:last-child {
  max-width: 750px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.7;
}

.tour-noscript {
  margin-top: 12px;
  padding: 14px;
  border: 1px solid var(--hot);
  color: var(--hot);
  font-size: 0.68rem;
}

.tour-embed-mode .sub-header,
.tour-embed-mode .tour-demo-hero,
.tour-embed-mode .tour-demo-section > .section-heading,
.tour-embed-mode .scene-selector,
.tour-embed-mode .tour-support-section,
.tour-embed-mode .embed-callout,
.tour-embed-mode .project-footer {
  display: none;
}

.tour-embed-mode .project-main {
  padding: 0;
}

.tour-embed-mode .tour-demo-section {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
}

.tour-embed-mode .tour-viewer-shell {
  width: 100%;
  height: 100svh;
  min-height: 420px;
  border: 0;
  box-shadow: none;
}

.tour-scene-hotspot {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 2px solid var(--acid);
  border-radius: 50%;
  background: rgba(1, 6, 4, 0.9);
  box-shadow:
    0 0 0 6px rgba(var(--a), 0.1),
    0 0 28px rgba(var(--a), 0.46);
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.tour-scene-hotspot::before {
  content: "→";
  color: var(--acid);
  font-family: var(--mono);
  font-size: 1.25rem;
  font-weight: 900;
  line-height: 1;
}

.tour-scene-hotspot-back::before {
  content: "←";
}

.tour-scene-hotspot-restart::before {
  content: "↺";
}

.tour-scene-hotspot:hover,
.tour-scene-hotspot:focus-visible {
  border-color: var(--hot);
  background: rgba(var(--h), 0.22);
  box-shadow:
    0 0 0 7px rgba(var(--h), 0.14),
    0 0 32px rgba(var(--h), 0.52);
}

div.tour-scene-hotspot.pnlm-tooltip span {
  padding: 7px 10px;
  border: 1px solid var(--acid);
  border-radius: 0;
  background: rgba(1, 6, 4, 0.94);
  color: var(--acid);
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

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

@keyframes tourPulse {
  50% { opacity: 0.35; }
}

@media (max-width: 900px) {
  .tour-demo-hero {
    min-height: auto;
    grid-template-columns: 1fr;
    padding-bottom: 80px;
  }

  .tour-viewer-shell {
    min-height: 68svh;
  }

  .embed-callout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 650px) {
  .tour-demo-page .sub-header nav a:nth-child(2) {
    display: none;
  }

  .tour-viewer-shell {
    min-height: 72svh;
    border-inline: 0;
  }

  .tour-hud {
    grid-template-columns: 1fr auto;
  }

  .tour-hud span:nth-child(2) {
    display: none;
  }

  .scene-selector {
    grid-template-columns: 1fr;
  }

  .scene-selector button {
    min-height: 68px;
  }

  .tour-video-grid {
    grid-template-columns: 1fr;
  }

  .tour-request-strip {
    grid-template-columns: 1fr;
  }

  .tour-controls {
    inset-inline: 8px;
    bottom: 8px;
  }

  .tour-controls button {
    flex: 1 1 auto;
  }

  .tour-controls button[data-tour-control="zoom-in"],
  .tour-controls button[data-tour-control="zoom-out"] {
    flex: 0 0 40px;
  }

  .tour-controls .scene-step {
    flex: 1 1 calc(50% - 4px);
    order: -1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tour-hud i,
  .tour-loader {
    animation: none;
  }
}