:root {
  --lx-red: #7b090d;
  --lx-red-deep: #3d0306;
  --lx-red-bright: #b9151c;
  --lx-gold: #ffd86a;
  --lx-gold-deep: #d89a1d;
  --lx-cream: #fff5d5;
  --lx-panel: rgba(47, 4, 7, 0.88);
  --lx-shadow: 0 8px 26px rgba(0, 0, 0, 0.44);
}

html,
body {
  background: #210003;
  font-family: "Segoe UI", Arial, Helvetica, sans-serif;
}

button {
  font: inherit;
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--lx-gold);
  outline-offset: 3px;
}

.splash {
  position: fixed;
  inset: 0;
  z-index: 30000;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 45%, rgba(196, 30, 27, 0.38), transparent 48%),
    linear-gradient(135deg, #2a0104, #6d070b 50%, #240003);
  opacity: 1;
  visibility: visible;
  transition: opacity 0.8s ease, visibility 0s linear 0s;
}

.splash::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 12% 20%, rgba(255, 216, 106, 0.28) 0 1px, transparent 2px),
    radial-gradient(circle at 82% 70%, rgba(255, 216, 106, 0.22) 0 1px, transparent 2px);
  background-size: 86px 86px, 112px 112px;
  opacity: 0.6;
}

.splash.hide {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.8s ease, visibility 0s linear 0.8s;
}

#splashImage {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  filter: drop-shadow(0 0 32px rgba(0, 0, 0, 0.55));
}

.splash-start {
  position: absolute;
  z-index: 2;
  min-width: 176px;
  min-height: 44px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  background: transparent;
  color: transparent;
  touch-action: manipulation;
}

.splash-start::after {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: inherit;
  border: 2px solid transparent;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.no-touch .splash-start:hover::after,
.splash-start:focus-visible::after {
  border-color: rgba(255, 240, 174, 0.82);
  box-shadow: 0 0 28px rgba(255, 210, 76, 0.65);
}

#backToHomepage,
.tour-control,
#autorotateToggle,
#fullscreenToggle,
#sceneListToggle {
  border: 2px solid var(--lx-gold-deep);
  color: var(--lx-cream);
  background: linear-gradient(145deg, var(--lx-red-bright), var(--lx-red-deep));
  box-shadow: var(--lx-shadow), inset 0 1px 0 rgba(255, 243, 176, 0.26);
  cursor: pointer;
  touch-action: manipulation;
}

#backToHomepage {
  position: absolute;
  z-index: 2200;
  top: 12px;
  left: 14px;
  min-width: 126px;
  height: 52px;
  padding: 0 18px;
  border-radius: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 800;
}

#backToHomepage .home-icon {
  font-size: 24px;
  line-height: 1;
}

#tourAudioControls {
  position: absolute;
  z-index: 2200;
  top: 10px;
  right: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tour-control {
  position: relative;
  width: 52px;
  height: 52px;
  padding: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 23px;
  transition: transform 0.18s ease, filter 0.18s ease, opacity 0.18s ease;
}

.no-touch .tour-control:hover,
.no-touch #backToHomepage:hover,
.no-touch #autorotateToggle:hover,
.no-touch #sceneListToggle:hover {
  filter: brightness(1.17);
  transform: translateY(-1px);
}

.tour-control.inactive {
  opacity: 0.6;
  filter: grayscale(0.7);
}

.tour-control:disabled {
  cursor: not-allowed;
  opacity: 0.42;
  filter: grayscale(1);
}

.tour-control.logo-control {
  overflow: hidden;
  padding: 3px;
  background: radial-gradient(circle, #fff8dc 0 56%, #8f090e 57% 100%);
}

.tour-control.logo-control img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

#audioHint {
  position: absolute;
  z-index: 2050;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  max-width: calc(100vw - 160px);
  padding: 9px 16px;
  border: 1px solid rgba(255, 216, 106, 0.72);
  border-radius: 999px;
  background: rgba(45, 2, 5, 0.78);
  color: var(--lx-cream);
  font-size: 13px;
  text-align: center;
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.35s ease;
}

body.audio-unlocked #audioHint {
  opacity: 0;
}

#titleBar {
  z-index: 2000;
  top: 0;
  left: 154px !important;
  right: 246px !important;
  height: 72px;
  pointer-events: none;
}

#titleBar .sceneName {
  height: 72px;
  padding: 20px 16px 10px;
  line-height: 32px;
  color: #fff9df;
  background: linear-gradient(180deg, rgba(57, 1, 4, 0.9), rgba(57, 1, 4, 0.5) 68%, transparent);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.72);
}

#sceneListToggle {
  z-index: 2300;
  top: auto;
  left: 14px;
  bottom: 14px;
  width: 52px;
  height: 52px;
  padding: 10px;
  border-radius: 50%;
}

#sceneListToggle .icon,
.mobile #sceneListToggle .icon {
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
}

#autorotateToggle {
  z-index: 2100;
  top: auto;
  right: 14px !important;
  bottom: 14px;
  width: 52px;
  height: 52px;
  padding: 10px;
  border-radius: 50%;
}

#autorotateToggle .icon,
.mobile #autorotateToggle .icon {
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
}

#fullscreenToggle {
  border-radius: 50%;
}

#sceneList {
  z-index: 2150;
  left: -270px;
  width: 270px;
  padding-top: 74px;
  padding-bottom: 78px;
  background: linear-gradient(180deg, rgba(41, 1, 4, 0.98), rgba(79, 5, 8, 0.92));
  border-right: 1px solid rgba(255, 216, 106, 0.44);
  box-shadow: 10px 0 30px rgba(0, 0, 0, 0.32);
  scrollbar-color: var(--lx-gold-deep) rgba(63, 4, 7, 0.8);
}

#sceneList.enabled {
  margin-left: 270px;
}

#sceneList .scenes {
  background: transparent;
}

#sceneList .scene {
  height: 38px;
  border-bottom: 1px solid rgba(255, 238, 176, 0.08);
}

#sceneList .scene .text {
  padding: 0 16px;
  line-height: 38px;
  color: #fff3c7;
  font-size: 13px;
  letter-spacing: 0.015em;
}

.no-touch #sceneList .scene:hover {
  background: rgba(200, 39, 31, 0.72);
}

#sceneList .scene.current {
  position: relative;
  background: linear-gradient(90deg, rgba(190, 27, 28, 0.96), rgba(124, 7, 12, 0.86));
  box-shadow: inset 4px 0 0 var(--lx-gold);
}

#sceneList .scene.current .text {
  color: #fffbe8;
  font-weight: 800;
}

.link-hotspot {
  position: relative;
  width: 51px;
  height: 51px;
  margin-left: -25.5px;
  margin-top: -25.5px;
  opacity: 1;
  isolation: isolate;
  overflow: visible;
}

.cover-arrow-hotspot {
  transform-origin: center;
}

.link-hotspot::before {
  content: '';
  position: absolute;
  inset: -6px;
  z-index: 3;
  box-sizing: border-box;
  padding: 4px;
  border-radius: 50%;
  pointer-events: none;
  background: conic-gradient(
    from 0deg,
    transparent 0 63%,
    #ff5a18 70%,
    #ffd43b 77%,
    #fffbe7 84%,
    #ffd43b 90%,
    transparent 97% 100%
  );
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  mask-composite: exclude;
  filter:
    drop-shadow(0 0 3px rgba(255, 249, 211, 0.95))
    drop-shadow(0 0 7px rgba(255, 188, 35, 0.9));
  opacity: 0.98;
  transform-origin: center;
  animation: hotspot-border-spin 1.45s linear infinite;
  will-change: transform;
}

.link-hotspot-icon {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  padding: 3px;
  border-radius: 50%;
  border: 2px solid var(--lx-gold);
  background: rgba(255, 250, 226, 0.96);
  box-shadow: 0 7px 20px rgba(0, 0, 0, 0.5), 0 0 18px rgba(255, 194, 48, 0.45);
  object-fit: contain;
  transform: scale(var(--hotspot-scale, 1));
  transform-origin: center;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.no-touch .link-hotspot:hover .link-hotspot-icon {
  transform: scale(var(--hotspot-hover-scale, 1.08));
  filter: brightness(1.08);
}

.touch .link-hotspot.show-tooltip .link-hotspot-tooltip {
  opacity: 1;
  transform: translateX(0);
}

.link-hotspot-tooltip {
  z-index: 4;
  top: 15px;
  margin-left: 8px;
  max-width: min(320px, 52vw);
  padding: 9px 13px;
  border: 1px solid var(--lx-gold-deep);
  border-radius: 18px;
  color: var(--lx-cream);
  background: var(--lx-panel);
  box-shadow: var(--lx-shadow);
  font-size: 14px;
  font-weight: 700;
}

@keyframes hotspot-border-spin {
  from {
    transform: scale(var(--hotspot-scale, 1)) rotate(0deg);
  }

  to {
    transform: scale(var(--hotspot-scale, 1)) rotate(360deg);
  }
}

.scene-transition-flash {
  position: fixed;
  inset: 0;
  z-index: 1900;
  pointer-events: none;
  background: radial-gradient(circle at center, rgba(255, 228, 143, 0.42), transparent 60%);
  animation: sceneFlash 0.55s ease-out forwards;
}

@keyframes sceneFlash {
  from { opacity: 0.8; }
  to { opacity: 0; }
}

.info-hotspot .info-hotspot-header,
.info-hotspot-modal .info-hotspot-header {
  background-color: var(--lx-red);
}

.info-hotspot .info-hotspot-text,
.info-hotspot-modal .info-hotspot-text {
  color: var(--lx-cream);
  background-color: rgba(52, 2, 5, 0.94);
}

@media (max-width: 760px), (max-height: 520px) {
  .cover-arrow-hotspot {
    scale: 1.2;
  }

  #backToHomepage {
    top: 6px;
    left: 6px;
    min-width: 46px;
    width: 46px;
    height: 46px;
    padding: 0;
  }

  #backToHomepage .home-label {
    display: none;
  }

  #tourAudioControls {
    top: 5px;
    right: 6px;
    gap: 4px;
  }

  .tour-control {
    width: 44px;
    height: 44px;
    font-size: 19px;
  }

  #titleBar,
  body.fullscreen-enabled.mobile #titleBar {
    left: 54px !important;
    right: 194px !important;
    height: 56px;
  }

  #titleBar .sceneName,
  .mobile #titleBar .sceneName {
    height: 56px;
    padding: 11px 5px 7px;
    line-height: 30px;
    font-size: 12px;
  }

  .mobile #sceneList {
    left: -100%;
    width: 100%;
    padding-top: 58px;
    padding-bottom: 70px;
  }

  .mobile #sceneList.enabled {
    margin-left: 100%;
  }

  .mobile #sceneList .scene {
    height: 42px;
  }

  .mobile #sceneList .scene .text {
    line-height: 42px;
    font-size: 13px;
  }

  #sceneListToggle,
  #autorotateToggle {
    bottom: 8px;
    width: 46px;
    height: 46px;
    padding: 9px;
  }

  #sceneListToggle {
    left: 8px;
  }

  #autorotateToggle {
    right: 8px !important;
  }

  #sceneListToggle .icon,
  .mobile #sceneListToggle .icon,
  #autorotateToggle .icon,
  .mobile #autorotateToggle .icon {
    top: 8px;
    right: 8px;
    width: 26px;
    height: 26px;
  }

  #audioHint {
    bottom: 10px;
    max-width: calc(100vw - 130px);
    padding: 7px 11px;
    font-size: 11px;
  }

  .link-hotspot,
  .mobile .link-hotspot {
    width: 45px;
    height: 45px;
    margin-left: -22.5px;
    margin-top: -22.5px;
  }

  .link-hotspot-tooltip {
    top: 12px;
    max-width: 58vw;
    padding: 8px 10px;
    font-size: 12px;
  }
}

@media (orientation: portrait) and (max-width: 600px) {
  .splash {
    background:
      radial-gradient(circle at 50% 50%, rgba(180, 25, 22, 0.52), transparent 45%),
      linear-gradient(180deg, #2b0104, #72090d 48%, #2a0104);
  }
}

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

  .link-hotspot::before {
    animation-duration: 1.45s !important;
    animation-iteration-count: infinite !important;
  }
}
