:root {
  --df-orange: #dca15a;
  --df-orange-hot: #efb76f;
  --df-black: #080a08;
  --df-panel: rgba(8, 10, 8, 0.93);
  --df-panel-soft: rgba(8, 10, 8, 0.72);
  --df-white: #f8f5ed;
  --df-muted: rgba(248, 245, 237, 0.68);
  --df-line: rgba(248, 245, 237, 0.18);
  --df-safe-top: env(safe-area-inset-top, 0px);
  --df-safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }

html,
body,
#experience,
#pano {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
}

@supports (height: 100dvh) {
  html,
  body,
  #experience,
  #pano { height: 100dvh; }
}

body {
  color: var(--df-white);
  background: var(--df-black);
  font-family: Inter, "Helvetica Neue", Arial, sans-serif;
}

button,
a { color: inherit; font: inherit; }
button { border: 0; }
button:focus-visible,
a:focus-visible { outline: 2px solid var(--df-orange); outline-offset: 3px; }

#experience { position: relative; isolation: isolate; }
#pano { position: absolute; inset: 0; z-index: 0; }

#cinematicGrade {
  position: absolute;
  z-index: 1;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at center, transparent 38%, rgba(4, 6, 4, .27) 78%, rgba(3, 4, 3, .6) 115%),
    linear-gradient(180deg, rgba(3, 5, 3, .34), transparent 30%, transparent 62%, rgba(3, 5, 3, .58));
  mix-blend-mode: multiply;
}

#cinematicBars { position: absolute; z-index: 2; inset: 0; pointer-events: none; }
#cinematicBars span { position: absolute; left: 0; right: 0; height: 7px; background: var(--df-black); }
#cinematicBars span:first-child { top: 0; }
#cinematicBars span:last-child { bottom: 0; }

.eyebrow {
  margin: 0;
  color: var(--df-orange);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .18em;
  line-height: 1.4;
}

.ui-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  min-height: 38px;
  padding: 0;
  color: var(--df-orange);
  background: rgba(8, 10, 8, .46);
  border: 1px solid rgba(220, 161, 90, .24);
  border-radius: 10px;
  cursor: pointer;
  backdrop-filter: blur(12px);
  transition: color .18s ease, background .18s ease, border-color .18s ease, transform .18s ease;
}

.no-touch .ui-button:hover {
  color: var(--df-orange-hot);
  background: rgba(8, 10, 8, .68);
  border-color: rgba(220, 161, 90, .62);
  transform: translateY(-1px);
}

.icon-button { width: 38px; height: 38px; }
.icon-button img { width: 16px; height: 16px; object-fit: contain; }
.close-button { flex: 0 0 auto; font-size: 23px; font-weight: 300; }

#intro {
  position: absolute;
  z-index: 100;
  inset: 0;
  display: grid;
  align-items: center;
  padding: max(40px, var(--df-safe-top)) clamp(24px, 8vw, 120px) max(40px, var(--df-safe-bottom));
  background:
    linear-gradient(90deg, rgba(5, 7, 5, .92) 0%, rgba(5, 7, 5, .66) 42%, rgba(5, 7, 5, .12) 76%),
    linear-gradient(180deg, rgba(5, 7, 5, .28), rgba(5, 7, 5, .18));
  transition: opacity .7s ease, visibility .7s ease;
}

#intro::after {
  content: "";
  position: absolute;
  left: clamp(24px, 8vw, 120px);
  top: 15%;
  bottom: 15%;
  width: 1px;
  background: linear-gradient(transparent, var(--df-orange), transparent);
}

.intro-content {
  position: relative;
  width: min(650px, 86vw);
  padding-left: clamp(20px, 3vw, 42px);
}

#introTitle {
  margin: 14px 0 20px;
  color: var(--df-white);
  font-size: clamp(56px, 9vw, 126px);
  font-weight: 800;
  letter-spacing: -.075em;
  line-height: .79;
  text-transform: uppercase;
  text-shadow: 0 16px 40px rgba(0, 0, 0, .48);
}

#introTitle span {
  color: transparent;
  -webkit-text-stroke: 2px var(--df-orange);
  text-shadow: 8px 10px 0 rgba(201, 90, 11, .24);
}

.intro-copy {
  max-width: 490px;
  margin: 0 0 28px;
  color: var(--df-muted);
  font-size: clamp(17px, 2vw, 24px);
  line-height: 1.45;
}

.primary-action {
  display: inline-flex;
  align-items: center;
  gap: 28px;
  min-height: 54px;
  padding: 0 8px 0 22px;
  color: #171006;
  background: var(--df-orange);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .11em;
  cursor: pointer;
  box-shadow: 0 12px 32px rgba(201, 90, 11, .3);
  transition: transform .18s ease, background .18s ease;
}

.no-touch .primary-action:hover { background: var(--df-orange-hot); transform: translateY(-2px); }

.action-arrow {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  color: var(--df-white);
  background: var(--df-black);
  border-radius: 50%;
  font-size: 20px;
}

.intro-note { margin: 17px 0 0; color: var(--df-muted); font-size: 11px; letter-spacing: .07em; }
body:not(.intro-open) #intro { opacity: 0; visibility: hidden; pointer-events: none; }

#topBar {
  position: absolute;
  z-index: 20;
  top: max(20px, calc(var(--df-safe-top) + 12px));
  left: 24px;
  right: 24px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 18px;
  pointer-events: none;
}

#topBar > * { pointer-events: auto; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: max-content;
  color: var(--df-white);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  color: var(--df-orange);
  background: rgba(8, 10, 8, .54);
  border: 1px solid rgba(220, 161, 90, .5);
  border-radius: 50%;
  font-size: 18px;
  font-weight: 900;
  font-style: italic;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .32);
}

.brand-copy { display: grid; gap: 1px; }
.brand-copy b { font-size: 15px; letter-spacing: .12em; }
.brand-copy small { color: var(--df-muted); font-size: 8px; letter-spacing: .19em; }

.location {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: rgba(248, 245, 237, .82);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .12em;
}

.location-dot {
  width: 6px;
  height: 6px;
  background: var(--df-orange);
  border-radius: 50%;
  box-shadow: 0 0 0 5px rgba(243, 146, 34, .13);
}

.top-actions { display: flex; justify-content: flex-end; gap: 8px; }
.text-button { gap: 8px; min-height: 38px; padding: 0 13px; font-size: 9px; font-weight: 700; letter-spacing: .1em; }
#fullscreenToggle {
  position: relative;
  top: auto;
  right: auto;
  display: inline-flex;
  width: 38px;
  height: 38px;
  padding: 0;
  background: rgba(8, 10, 8, .46);
}
#fullscreenToggle .icon { position: static; width: 16px; height: 16px; }
#fullscreenToggle .icon.on { display: none; }
#fullscreenToggle.enabled .icon.on { display: block; }
#fullscreenToggle.enabled .icon.off { display: none; }

.scene-toggle {
  position: absolute;
  z-index: 22;
  left: 24px;
  top: calc(max(20px, var(--df-safe-top) + 12px) + 62px);
  gap: 10px;
  padding: 0 13px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .12em;
}

#sceneListToggle {
  position: absolute;
  z-index: 22;
  left: 24px;
  top: calc(max(20px, var(--df-safe-top) + 12px) + 62px);
  display: inline-flex;
  width: auto;
  height: 38px;
  gap: 8px;
  padding: 0 13px;
  background: rgba(8, 10, 8, .46);
}

#quickExploreTools {
  position: absolute;
  z-index: 22;
  left: 24px;
  top: calc(max(20px, var(--df-safe-top) + 12px) + 108px);
  display: flex;
  gap: 6px;
}

.quick-tool {
  width: 34px;
  height: 34px;
  min-width: 34px;
  min-height: 34px;
  border-radius: 50%;
  font-size: 17px;
}
.quick-tool span { transform: translateY(-1px); }

.menu-lines { display: grid; gap: 4px; width: 16px; }
.menu-lines i { display: block; height: 1px; background: currentColor; }
.menu-lines i:last-child { width: 11px; }

#sceneList {
  position: absolute;
  z-index: 60;
  top: 0;
  bottom: 0;
  left: 0;
  width: min(420px, 92vw);
  max-height: none;
  margin: 0;
  padding: max(28px, var(--df-safe-top)) 20px max(24px, var(--df-safe-bottom));
  background: var(--df-panel);
  box-shadow: 22px 0 70px rgba(0, 0, 0, .38);
  backdrop-filter: blur(20px);
  transform: translateX(-104%);
  transition: transform .42s cubic-bezier(.2,.8,.2,1);
  overflow: hidden;
}

#sceneList.enabled { margin: 0; transform: translateX(0); }

.scene-list-head,
.media-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.scene-list-head h2,
.media-head h2 { margin: 5px 0 0; font-size: 26px; line-height: 1.05; }

.explorer-tools { display: grid; gap: 8px; margin: -3px 0 14px; }

.scene-search {
  display: grid;
  grid-template-columns: 34px 1fr 26px;
  align-items: center;
  min-height: 42px;
  padding: 0 8px 0 12px;
  color: var(--df-orange);
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(220, 161, 90, .28);
  border-radius: 10px;
}

.scene-search input {
  min-width: 0;
  height: 40px;
  padding: 0 8px;
  color: var(--df-white);
  background: transparent;
  border: 0;
  outline: 0;
  font-size: 13px;
}
.scene-search input::placeholder { color: rgba(248, 245, 237, .48); }
.scene-search button {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  padding: 0;
  color: var(--df-muted);
  background: transparent;
  border-radius: 50%;
  cursor: pointer;
  font-size: 19px;
}
.scene-search button[type="submit"] { width: 32px; height: 32px; color: #171006; background: var(--df-orange); font-size: 18px; }
.scene-search button[type="submit"]:hover { background: var(--df-orange-hot); }
.search-help { margin: -1px 2px 2px; color: rgba(248,245,237,.52); font-size: 9px; line-height: 1.4; }
.search-help b { color: var(--df-orange); font-weight: 700; }

.explorer-view-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.explorer-view-tabs button {
  min-height: 32px;
  color: var(--df-muted);
  background: rgba(255,255,255,.025);
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .13em;
}
.explorer-view-tabs button.active { color: var(--df-orange); background: rgba(220,161,90,.08); border-color: rgba(220,161,90,.32); }

.scene-filters { display: flex; gap: 5px; padding-bottom: 2px; overflow-x: auto; scrollbar-width: thin; }
.scene-filters button {
  flex: 0 0 auto;
  min-height: 27px;
  padding: 0 9px;
  color: var(--df-muted);
  background: transparent;
  border: 1px solid var(--df-line);
  border-radius: 999px;
  cursor: pointer;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .08em;
}
.scene-filters button.active { color: #171006; background: var(--df-orange); border-color: var(--df-orange); }
.scene-filters button.empty-filter:not(.active) { border-style: dashed; opacity: .62; }
.search-summary { margin: 0; color: var(--df-muted); font-size: 10px; line-height: 1.35; }

#sceneList .scenes {
  display: grid;
  gap: 8px;
  width: auto;
  height: auto;
  max-height: calc(100% - 270px);
  margin: 0;
  padding: 0 4px 10px 0;
  background: transparent;
  list-style: none;
  overflow-y: auto;
}
#sceneList .scenes[hidden] { display: none; }

#sceneList .scenes li { display: block; }
#sceneList .scenes li[hidden] { display: none; }

#sceneList .scene {
  display: grid;
  grid-template-columns: 82px 1fr;
  align-items: center;
  gap: 14px;
  width: 100%;
  height: auto;
  min-height: 64px;
  padding: 6px;
  color: var(--df-white);
  background: rgba(255, 255, 255, .025);
  border: 1px solid transparent;
  border-radius: 10px;
  text-align: left;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}

#sceneList .scene img {
  width: 82px;
  height: 52px;
  border-radius: 7px;
  object-fit: cover;
  filter: saturate(.78) contrast(1.05);
}

#sceneList .scene span { display: grid; gap: 5px; font-size: 14px; font-weight: 600; white-space: normal; }
#sceneList .scene small { color: var(--df-orange); font-size: 9px; letter-spacing: .12em; }
.no-touch #sceneList .scene:hover,
#sceneList .scene.current {
  background: rgba(243, 146, 34, .09);
  border-color: rgba(243, 146, 34, .4);
  transform: translateX(3px);
}

#sceneList .scenes li.nearest-result .scene::after {
  content: "MÁS CERCANA";
  justify-self: start;
  grid-column: 2;
  margin-top: -7px;
  color: var(--df-orange);
  font-size: 7px;
  font-weight: 800;
  letter-spacing: .12em;
}

.route-map { height: calc(100% - 270px); min-height: 300px; overflow-y: auto; }
.route-map[hidden] { display: none; }
.route-map-intro { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.route-map-intro p { display: grid; gap: 3px; margin: 0; }
.route-map-intro b { color: var(--df-orange); font-size: 9px; letter-spacing: .12em; }
.route-map-intro span, .map-legend { color: var(--df-muted); font-size: 9px; }
.map-legend { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.map-legend i { width: 8px; height: 8px; background: var(--df-orange); border: 2px solid var(--df-white); border-radius: 50%; box-shadow: 0 0 0 3px rgba(220,161,90,.18); }
.route-map-canvas {
  position: relative;
  height: min(470px, 55vh);
  min-height: 340px;
  overflow: hidden;
  background:
    linear-gradient(rgba(220,161,90,.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(220,161,90,.055) 1px, transparent 1px),
    radial-gradient(circle at 50% 48%, rgba(220,161,90,.09), transparent 52%),
    #0c100d;
  background-size: 28px 28px, 28px 28px, auto, auto;
  border: 1px solid rgba(220,161,90,.18);
  border-radius: 13px;
}
.route-map-diamond { position: absolute; inset: 12% 15%; border: 1px solid rgba(220,161,90,.28); transform: rotate(45deg) scale(.72); }
.route-map-diamond i { position: absolute; background: rgba(220,161,90,.12); }
.route-map-diamond i:nth-child(1), .route-map-diamond i:nth-child(2) { left: 50%; top: -18%; bottom: -18%; width: 1px; }
.route-map-diamond i:nth-child(2) { transform: rotate(90deg); }
.route-map-diamond i:nth-child(3), .route-map-diamond i:nth-child(4) { left: -18%; right: -18%; top: 33%; height: 1px; transform: rotate(45deg); }
.route-map-diamond i:nth-child(4) { top: 66%; transform: rotate(-45deg); }
.route-map-markers { position: absolute; inset: 0; }
.route-map-marker {
  position: absolute;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  margin: -9px;
  padding: 0;
  color: var(--df-orange);
  background: rgba(8,10,8,.92);
  border: 1px solid rgba(220,161,90,.62);
  border-radius: 50%;
  box-shadow: 0 3px 10px rgba(0,0,0,.5);
  cursor: pointer;
  transition: transform .16s ease, background .16s ease, color .16s ease;
}
.route-map-marker span { font-size: 7px; font-weight: 800; line-height: 1; }
.route-map-marker[hidden] { display: none; }
.route-map-marker.current { z-index: 3; color: #171006; background: var(--df-orange); border: 2px solid var(--df-white); transform: scale(1.35); }
.no-touch .route-map-marker:hover { z-index: 4; color: #171006; background: var(--df-orange-hot); transform: scale(1.35); }
.route-map-marker::after {
  content: attr(data-label);
  position: absolute;
  left: 50%;
  bottom: 24px;
  width: max-content;
  max-width: 190px;
  padding: 6px 8px;
  color: var(--df-white);
  background: rgba(8,10,8,.94);
  border: 1px solid rgba(220,161,90,.3);
  border-radius: 6px;
  font-size: 9px;
  font-weight: 700;
  line-height: 1.25;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 5px);
  transition: opacity .16s ease, transform .16s ease;
}
.no-touch .route-map-marker:hover::after, .route-map-marker:focus-visible::after { opacity: 1; transform: translate(-50%, 0); }
.map-disclaimer { margin: 10px 2px 0; color: rgba(248,245,237,.48); font-size: 9px; line-height: 1.45; }

.suggested-routes { height: calc(100% - 270px); overflow-y: auto; padding-right: 4px; }
.suggested-routes[hidden] { display: none; }
.route-list-intro { margin-bottom: 12px; }
.route-list-intro > p:last-child { margin: 5px 0 0; color: var(--df-muted); font-size: 11px; line-height: 1.45; }
.suggested-route-items { display: grid; gap: 9px; padding-bottom: 12px; }
.suggested-route-card {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(220,161,90,.18);
  border-radius: 11px;
}
.suggested-route-card > div { display: grid; gap: 4px; }
.suggested-route-card small { color: var(--df-orange); font-size: 8px; font-weight: 800; letter-spacing: .11em; }
.suggested-route-card h3 { margin: 0; font-size: 16px; line-height: 1.15; }
.suggested-route-card p { margin: 2px 0; color: var(--df-muted); font-size: 10px; line-height: 1.4; }
.suggested-route-card > div > span { color: rgba(248,245,237,.5); font-size: 9px; }
.suggested-route-card > button {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  color: #171006;
  background: var(--df-orange);
  border-radius: 50%;
  cursor: pointer;
}
.suggested-route-card > button span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.suggested-route-card > button b { font-size: 19px; }
.no-touch .suggested-route-card > button:hover { background: var(--df-orange-hot); transform: translateX(2px); }

.active-route-bar {
  position: absolute;
  z-index: 24;
  left: 50%;
  bottom: max(24px, calc(var(--df-safe-bottom) + 14px));
  display: grid;
  grid-template-columns: minmax(150px, 1fr) 32px 32px 28px;
  align-items: center;
  gap: 5px;
  width: min(440px, calc(100vw - 220px));
  padding: 7px 8px 7px 13px;
  background: rgba(8,10,8,.88);
  border: 1px solid rgba(220,161,90,.34);
  border-radius: 999px;
  box-shadow: 0 12px 36px rgba(0,0,0,.36);
  backdrop-filter: blur(14px);
  transform: translateX(-50%);
}
.active-route-bar[hidden] { display: none; }
.active-route-bar > div { display: grid; grid-template-columns: 1fr auto; gap: 1px 8px; min-width: 0; }
.active-route-bar small { grid-column: 1 / 3; color: var(--df-orange); font-size: 7px; font-weight: 800; letter-spacing: .11em; }
.active-route-bar b { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.active-route-bar span { color: var(--df-muted); font-size: 9px; }
.active-route-bar > button { width: 30px; height: 30px; padding: 0; color: var(--df-orange); background: rgba(255,255,255,.04); border: 1px solid rgba(220,161,90,.22); border-radius: 50%; cursor: pointer; font-size: 18px; }
.active-route-bar > button:disabled { opacity: .28; cursor: default; }
.active-route-bar #activeRouteClose { width: 26px; height: 26px; color: var(--df-muted); border-color: transparent; font-size: 17px; }

#sceneStory {
  position: absolute;
  z-index: 15;
  left: clamp(24px, 5vw, 70px);
  bottom: clamp(34px, 7vh, 76px);
  width: min(610px, calc(100vw - 48px));
  padding-left: 18px;
  border-left: 2px solid var(--df-orange);
  pointer-events: none;
  text-shadow: 0 3px 18px rgba(0, 0, 0, .65);
  transition: opacity .22s ease, transform .22s ease;
}

#sceneStory.is-changing { opacity: 0; transform: translateY(10px); }
.scene-index { display: flex; align-items: center; gap: 9px; margin-bottom: 18px; color: var(--df-muted); font-size: 10px; letter-spacing: .12em; }
.scene-index .currentSceneNumber { color: var(--df-white); font-size: 19px; font-weight: 700; }
.scene-index i { width: 50px; height: 1px; background: rgba(248, 245, 237, .42); }
.scene-kicker { margin-bottom: 6px; }

#sceneStory .sceneName {
  width: auto;
  height: auto;
  margin: 0;
  padding: 0;
  color: var(--df-white);
  background: transparent;
  font-size: clamp(34px, 5vw, 66px);
  font-weight: 800;
  letter-spacing: -.045em;
  line-height: .98;
  text-transform: uppercase;
  white-space: normal;
  overflow: visible;
}

.sceneDescription { max-width: 540px; margin: 12px 0 0; color: rgba(248, 245, 237, .8); font-size: 14px; line-height: 1.55; }
.scene-connections { margin: 8px 0 0; color: rgba(248,245,237,.58); font-size: 9px; font-weight: 700; letter-spacing: .08em; }
.scene-connections span { color: var(--df-orange); }

#interactionHint {
  position: absolute;
  z-index: 14;
  left: 50%;
  bottom: 34px;
  margin: 0;
  color: rgba(248, 245, 237, .7);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .13em;
  transform: translateX(-50%);
  pointer-events: none;
}

#interactionHint span { display: block; margin-bottom: 5px; color: var(--df-orange); font-size: 20px; text-align: center; animation: hintMove 1.8s ease-in-out infinite; }

#controlDock {
  position: absolute;
  z-index: 18;
  right: 24px;
  bottom: max(26px, calc(var(--df-safe-bottom) + 14px));
  display: flex;
  gap: 6px;
}

.dock-button {
  position: relative;
  top: auto;
  right: auto;
  left: auto;
  bottom: auto;
  display: inline-flex;
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  padding: 0;
  background: rgba(8, 10, 8, .46);
  font-size: 21px;
  font-weight: 300;
}

#autorotateToggle {
  position: relative;
  top: auto;
  right: auto;
  display: inline-flex;
  width: 36px;
  height: 36px;
  padding: 0;
  background: rgba(8, 10, 8, .46);
}

#autorotateToggle .icon { position: static; width: 14px; height: 14px; }

.dock-button img { position: static; width: 14px; height: 14px; }
#autorotateToggle .icon.on { display: none; }
#autorotateToggle.enabled .icon.on { display: block; }
#autorotateToggle.enabled .icon.off { display: none; }

.hidden-control { position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden; clip: rect(0 0 0 0); }

#mediaPanel {
  position: absolute;
  z-index: 58;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(440px, 94vw);
  padding: max(28px, var(--df-safe-top)) 22px max(24px, var(--df-safe-bottom));
  background: var(--df-panel);
  box-shadow: -22px 0 70px rgba(0, 0, 0, .38);
  backdrop-filter: blur(20px);
  transform: translateX(104%);
  transition: transform .42s cubic-bezier(.2,.8,.2,1);
  overflow-y: auto;
}

#mediaPanel.enabled { transform: translateX(0); }

.media-gallery { display: grid; grid-template-columns: 1.4fr 1fr; grid-template-rows: 140px 140px; gap: 8px; }

.media-photo {
  position: relative;
  min-height: 0;
  overflow: hidden;
  padding: 0;
  background: #151815;
  border-radius: 10px;
  cursor: pointer;
}

.media-photo:first-child { grid-row: 1 / 3; }
.media-photo img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.82) contrast(1.06); transition: transform .42s ease, filter .42s ease; }
.media-photo::after { content: attr(data-label); position: absolute; left: 10px; bottom: 10px; padding: 5px 7px; color: var(--df-white); background: rgba(5, 7, 5, .7); border-radius: 5px; font-size: 9px; font-weight: 700; letter-spacing: .08em; }
.no-touch .media-photo:hover img { transform: scale(1.04); filter: saturate(1) contrast(1.05); }

.media-gallery.has-curated-photo {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: min(390px, 48vh);
  justify-items: center;
}
.media-gallery.has-curated-photo .media-photo {
  grid-row: auto;
  width: min(100%, 390px);
  aspect-ratio: 1;
  background: #080a08;
}
.media-gallery.has-curated-photo .media-photo img,
.media-gallery.has-curated-photo .media-photo:hover img {
  object-fit: contain;
  filter: none;
  transform: none;
}

.video-feature {
  display: grid;
  grid-template-columns: 112px 1fr;
  align-items: center;
  gap: 15px;
  width: 100%;
  margin-top: 14px;
  padding: 8px;
  color: var(--df-white);
  background: rgba(255, 255, 255, .035);
  border: 1px solid rgba(220, 161, 90, .24);
  border-radius: 11px;
  text-align: left;
  cursor: pointer;
}

.video-preview { display: grid; place-items: center; height: 74px; background: radial-gradient(circle, rgba(243, 146, 34, .24), transparent 52%), linear-gradient(135deg, #19231a, #0d100d); border-radius: 8px; }
.video-preview i { display: grid; place-items: center; width: 38px; height: 38px; padding-left: 3px; color: var(--df-black); background: var(--df-orange); border-radius: 50%; font-size: 13px; font-style: normal; }
.video-feature > span:last-child { display: grid; gap: 4px; }
.video-feature small { color: var(--df-orange); font-size: 9px; font-weight: 800; letter-spacing: .12em; }
.video-feature b { font-size: 14px; }
.video-feature em { color: var(--df-muted); font-size: 11px; font-style: normal; }
.media-note { margin: 14px 0 0; color: var(--df-muted); font-size: 11px; line-height: 1.5; }

#videoModal {
  position: absolute;
  z-index: 120;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(2, 3, 2, .87);
  backdrop-filter: blur(16px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .26s ease, visibility .26s ease;
}

#videoModal.visible { opacity: 1; visibility: visible; }
.video-dialog { width: min(840px, 100%); color: var(--df-white); background: #0c0e0c; border: 1px solid var(--df-line); border-radius: 14px; box-shadow: 0 24px 80px rgba(0, 0, 0, .56); overflow: hidden; }
.video-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; padding: 10px 14px 10px 20px; }
.video-dialog-head p { margin: 0; color: var(--df-orange); font-size: 10px; font-weight: 800; letter-spacing: .13em; }
.video-placeholder { display: grid; place-items: center; min-height: 420px; padding: 40px; text-align: center; background: radial-gradient(circle at 50% 40%, rgba(243, 146, 34, .14), transparent 32%), linear-gradient(145deg, #111711, #060806); }
.play-symbol { display: grid; place-items: center; width: 70px; height: 70px; padding-left: 5px; color: var(--df-black); background: var(--df-orange); border-radius: 50%; box-shadow: 0 0 0 12px rgba(243, 146, 34, .1); }
.video-placeholder h2 { margin: 26px 0 8px; font-size: clamp(25px, 4vw, 42px); }
.video-placeholder p { max-width: 520px; margin: 0; color: var(--df-muted); line-height: 1.55; }

.hotspot { position: relative; cursor: pointer; }
.link-hotspot { width: 42px; height: 42px; margin: -21px 0 0 -21px; padding: 0; opacity: 1; background: transparent !important; border: 0; border-radius: 50%; appearance: none; -webkit-appearance: none; }
.mobile .link-hotspot { top: auto; width: 42px; height: 42px; margin: -21px 0 0 -21px; }
.link-hotspot-core { position: absolute; inset: 5px; display: grid; place-items: center; color: var(--df-orange); background: rgba(8, 10, 8, .78); border: 1px solid rgba(220, 161, 90, .55); border-radius: 50%; box-shadow: 0 5px 16px rgba(0, 0, 0, .3); transition: transform .18s ease, color .18s ease, background .18s ease; }
.link-hotspot-core::before { content: ""; position: absolute; inset: -6px; border: 1px solid rgba(220, 161, 90, .48); border-radius: 50%; animation: hotspotPulse 2.6s ease-out infinite; }
.link-hotspot-arrow { display: block; font-size: 16px; font-weight: 600; transform-origin: center; }
.no-touch .link-hotspot:hover .link-hotspot-core { color: var(--df-black); background: var(--df-orange-hot); transform: scale(1.07); }

.hotspot-tooltip {
  position: absolute;
  left: calc(100% + 7px);
  top: 10px;
  max-width: 260px;
  padding: 7px 9px;
  color: var(--df-white);
  background: rgba(8, 10, 8, .84);
  border: 1px solid rgba(220, 161, 90, .3);
  border-radius: 7px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .04em;
  white-space: nowrap;
  opacity: 0;
  transform: translateX(-5px);
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
  backdrop-filter: blur(10px);
}

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

.info-hotspot { width: 42px; height: 42px; margin: -21px 0 0 -21px; opacity: 1; }
.info-hotspot-marker { position: absolute; inset: 5px; display: grid; place-items: center; color: var(--df-orange); background: rgba(8, 10, 8, .78); border: 1px solid rgba(220, 161, 90, .55); border-radius: 50%; font-family: Georgia, serif; font-size: 15px; font-style: italic; box-shadow: 0 5px 16px rgba(0, 0, 0, .3); }
.info-hotspot-card { position: absolute; left: 50px; top: -22px; width: 330px; padding: 18px; color: var(--df-white); background: var(--df-panel); border: 1px solid var(--df-line); border-radius: 12px; box-shadow: 0 18px 54px rgba(0, 0, 0, .44); opacity: 0; visibility: hidden; transform: translateX(-8px); transition: opacity .22s ease, visibility .22s ease, transform .22s ease; cursor: default; backdrop-filter: blur(16px); }
.info-hotspot.visible .info-hotspot-card { opacity: 1; visibility: visible; transform: translateX(0); }
.info-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.info-card-head small { display: block; margin-bottom: 5px; color: var(--df-orange); font-size: 9px; font-weight: 800; letter-spacing: .13em; }
.info-card-head h3 { margin: 0; font-size: 20px; line-height: 1.1; }
.info-card-close { display: grid; place-items: center; flex: 0 0 34px; width: 34px; height: 34px; color: var(--df-white); background: rgba(255, 255, 255, .06); border-radius: 50%; font-size: 22px; cursor: pointer; }
.info-hotspot-card p { margin: 12px 0 0; color: rgba(248, 245, 237, .76); font-size: 13px; line-height: 1.55; user-select: text; }
.info-hotspot-modal { display: none; }

@keyframes hotspotPulse { from { opacity: .88; transform: scale(.76); } to { opacity: 0; transform: scale(1.38); } }
@keyframes hintMove { 0%, 100% { transform: translateX(-5px); } 50% { transform: translateX(5px); } }

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

@media (max-width: 700px), (max-height: 560px) {
  #cinematicBars span { height: 4px; }
  #intro { align-items: end; padding: max(34px, var(--df-safe-top)) 22px max(46px, calc(var(--df-safe-bottom) + 34px)); background: linear-gradient(0deg, rgba(5, 7, 5, .94), rgba(5, 7, 5, .48) 58%, rgba(5, 7, 5, .18)); }
  #intro::after { left: 22px; top: auto; bottom: 46px; height: 48%; }
  .intro-content { width: 100%; padding-left: 20px; }
  #introTitle { margin-top: 10px; font-size: clamp(54px, 19vw, 86px); }
  .intro-copy { max-width: 330px; font-size: 16px; }
  .primary-action { width: 100%; justify-content: space-between; }
  #topBar { top: max(12px, calc(var(--df-safe-top) + 7px)); left: 14px; right: 14px; display: flex; justify-content: space-between; }
  .brand-copy small, .location, .text-button span:last-child { display: none; }
  .text-button { width: 38px; padding: 0; font-size: 16px; }
  .scene-toggle { top: calc(max(12px, var(--df-safe-top) + 7px) + 55px); left: 14px; min-height: 40px; padding: 0 14px; }
  #sceneListToggle { top: calc(max(12px, var(--df-safe-top) + 7px) + 49px); left: 14px; width: auto; height: 38px; min-height: 38px; padding: 0 12px; }
  #quickExploreTools { left: 14px; top: calc(max(12px, var(--df-safe-top) + 7px) + 94px); }
  .quick-tool { width: 32px; height: 32px; min-width: 32px; min-height: 32px; }
  body.mobile #sceneList { width: 100%; height: 100%; left: 0; padding-left: 14px; padding-right: 14px; }
  body.mobile #sceneList.enabled { margin: 0; margin-left: 0; transform: translateX(0); }
  .scene-list-head { margin-bottom: 14px; }
  .explorer-tools { gap: 8px; margin-bottom: 10px; }
  #sceneList .scenes { max-height: calc(100% - 255px); }
  .route-map, .suggested-routes { height: calc(100% - 255px); }
  .route-map-canvas { height: min(470px, 52vh); min-height: 310px; }
  .route-map-marker { width: 20px; height: 20px; margin: -10px; }
  #sceneStory { left: 18px; bottom: max(76px, calc(var(--df-safe-bottom) + 64px)); width: calc(100vw - 36px); padding-left: 13px; }
  body.route-active #sceneStory { bottom: max(126px, calc(var(--df-safe-bottom) + 114px)); }
  .scene-index { margin-bottom: 9px; }
  #sceneStory .sceneName { max-width: 92%; font-size: clamp(29px, 9.5vw, 43px); }
  .sceneDescription { max-width: 92%; margin-top: 7px; font-size: 12px; line-height: 1.4; }
  #interactionHint { display: none; }
  #controlDock { left: 14px; right: 14px; bottom: max(12px, calc(var(--df-safe-bottom) + 6px)); justify-content: flex-end; }
  .active-route-bar { bottom: max(56px, calc(var(--df-safe-bottom) + 48px)); width: calc(100vw - 28px); grid-template-columns: minmax(120px, 1fr) 32px 32px 26px; }
  .dock-button:nth-of-type(2), .dock-button:nth-of-type(3) { display: none; }
  #mediaPanel { width: 100%; padding-left: 14px; padding-right: 14px; }
  .media-gallery { grid-template-rows: 118px 118px; }
  .info-hotspot-card { position: fixed; left: 14px; right: 14px; top: auto; bottom: max(78px, calc(var(--df-safe-bottom) + 68px)); width: auto; transform: translateY(8px); }
  .info-hotspot.visible .info-hotspot-card { transform: translateY(0); }
  .video-placeholder { min-height: 300px; padding: 28px 20px; }
}

/* Mobile-first refinement: same DinoFly identity, lighter and easier to use by touch. */
@media (max-width: 700px) {
  .ui-button { min-width: 44px; min-height: 44px; border-radius: 12px; }

  #intro {
    padding: max(28px, calc(var(--df-safe-top) + 18px)) 18px max(30px, calc(var(--df-safe-bottom) + 22px));
  }
  #intro::after { left: 18px; bottom: max(30px, calc(var(--df-safe-bottom) + 22px)); height: 46%; }
  .intro-content { padding-left: 18px; }
  #introTitle { margin: 8px 0 16px; font-size: clamp(48px, 17vw, 72px); line-height: .82; }
  #introTitle span { -webkit-text-stroke-width: 1.5px; text-shadow: 5px 7px 0 rgba(201, 90, 11, .22); }
  .intro-copy { margin-bottom: 20px; font-size: 15px; line-height: 1.4; }
  .primary-action { min-height: 52px; padding-left: 18px; }
  .intro-note { margin-top: 13px; font-size: 9px; line-height: 1.4; }

  #topBar { gap: 8px; }
  .brand-mark { width: 42px; height: 42px; }
  .brand-copy b { font-size: 13px; }
  .top-actions { gap: 6px; }
  .text-button, #fullscreenToggle { width: 44px; height: 44px; min-width: 44px; min-height: 44px; }

  #sceneListToggle {
    top: calc(max(12px, var(--df-safe-top) + 7px) + 54px);
    min-height: 44px;
    height: 44px;
  }
  #quickExploreTools { top: calc(max(12px, var(--df-safe-top) + 7px) + 105px); gap: 7px; }
  .quick-tool { width: 40px; height: 40px; min-width: 40px; min-height: 40px; }

  body.mobile #sceneList {
    height: 100dvh;
    padding: max(18px, calc(var(--df-safe-top) + 12px)) 14px max(16px, calc(var(--df-safe-bottom) + 10px));
    overscroll-behavior: contain;
  }
  .scene-list-head { align-items: center; margin-bottom: 10px; }
  .scene-list-head h2 { font-size: 21px; }
  .scene-list-head .eyebrow { font-size: 9px; }
  .scene-search { min-height: 44px; }
  .scene-search input { height: 42px; font-size: 16px; }
  .search-help { display: none; }
  .explorer-view-tabs button { min-height: 38px; }
  .scene-filters button { min-height: 32px; }
  #sceneList .scenes { max-height: calc(100% - 214px); gap: 6px; overscroll-behavior: contain; }
  #sceneList .scene { grid-template-columns: 72px 1fr; gap: 11px; min-height: 60px; }
  #sceneList .scene img { width: 72px; height: 48px; }
  #sceneList .scene span { font-size: 13px; }
  .route-map, .suggested-routes { height: calc(100% - 214px); overscroll-behavior: contain; }

  #sceneStory {
    left: 14px;
    bottom: max(72px, calc(var(--df-safe-bottom) + 62px));
    width: calc(100vw - 28px);
    padding: 11px 12px 11px 14px;
    background: linear-gradient(90deg, rgba(8,10,8,.76), rgba(8,10,8,.35) 72%, transparent);
    border-radius: 0 12px 12px 0;
  }
  .scene-index { margin-bottom: 5px; }
  .scene-index .currentSceneNumber { font-size: 15px; }
  .scene-index i { width: 32px; }
  #sceneStory .sceneName { max-width: 95%; font-size: clamp(25px, 8.2vw, 36px); line-height: .96; }
  .sceneDescription {
    display: -webkit-box;
    max-width: 96%;
    margin-top: 6px;
    overflow: hidden;
    font-size: 11px;
    line-height: 1.38;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
  }
  .scene-connections { margin-top: 5px; font-size: 8px; }

  #controlDock { gap: 7px; }
  .dock-button, #autorotateToggle { width: 44px; height: 44px; min-width: 44px; min-height: 44px; }

  #mediaPanel {
    top: auto;
    width: 100%;
    height: min(84dvh, 720px);
    padding: 16px 16px max(18px, calc(var(--df-safe-bottom) + 12px));
    border-top: 1px solid rgba(220,161,90,.28);
    border-radius: 18px 18px 0 0;
    box-shadow: 0 -22px 70px rgba(0,0,0,.5);
    transform: translateY(104%);
    overscroll-behavior: contain;
  }
  #mediaPanel.enabled { transform: translateY(0); }
  .media-head { align-items: center; margin-bottom: 14px; }
  .media-head h2 { font-size: 22px; }
  .media-gallery.has-curated-photo { grid-template-rows: auto; }
  .media-gallery.has-curated-photo .media-photo { width: min(100%, 48dvh, 390px); }
  .media-photo::after { left: 8px; bottom: 8px; font-size: 8px; }
  .video-feature { margin-top: 12px; grid-template-columns: 82px 1fr; gap: 11px; }
  .video-preview { height: 62px; }
  .media-note { margin-top: 10px; font-size: 10px; }

  #videoModal { padding: 12px; }
  .video-dialog { max-height: calc(100dvh - 24px); }
  .video-dialog-head { min-height: 54px; padding-left: 14px; }
  .video-placeholder { min-height: min(62dvh, 420px); }

  .link-hotspot, .info-hotspot { width: 48px; height: 48px; margin: -24px 0 0 -24px; }
  .hotspot-tooltip { display: none; }
  .info-hotspot-card {
    bottom: max(66px, calc(var(--df-safe-bottom) + 56px));
    max-height: 44dvh;
    padding: 15px;
    overflow-y: auto;
  }
}

@media (max-width: 700px) and (max-height: 680px) {
  .intro-note { display: none; }
  #sceneStory .sceneDescription { -webkit-line-clamp: 2; }
  #mediaPanel { height: 90dvh; }
  .media-gallery.has-curated-photo .media-photo { width: min(100%, 42dvh, 330px); }
}

@media (orientation: landscape) and (max-height: 560px) {
  #intro { align-items: center; padding: 14px 7vw; }
  #intro::after { left: 7vw; top: 12%; bottom: 12%; height: auto; }
  .intro-content { width: min(520px, 58vw); }
  #introTitle { font-size: clamp(44px, 12vh, 66px); }
  .intro-copy { margin-bottom: 12px; font-size: 13px; }
  .intro-note { display: none; }
  #sceneStory { bottom: 14px; width: min(54vw, 520px); }
  #sceneStory .sceneName { font-size: clamp(23px, 6vh, 34px); }
  .sceneDescription { -webkit-line-clamp: 2; }
  #controlDock { bottom: max(10px, calc(var(--df-safe-bottom) + 4px)); }
  #mediaPanel { top: 0; right: 0; bottom: 0; width: min(430px, 76vw); height: 100dvh; border-radius: 16px 0 0 16px; transform: translateX(104%); }
  #mediaPanel.enabled { transform: translateX(0); }
  .media-gallery.has-curated-photo .media-photo { width: min(100%, 50vh, 330px); }
}

@media (max-width: 390px) {
  .brand-mark { width: 38px; height: 38px; }
  .scene-toggle span:last-child { display: none; }
  .scene-toggle { width: 42px; padding: 0; }
  .scene-list-head h2, .media-head h2 { font-size: 22px; }
  #sceneList .scene { grid-template-columns: 70px 1fr; }
  #sceneList .scene img { width: 70px; }
  .media-gallery { grid-template-columns: 1.2fr 1fr; }
  .video-feature { grid-template-columns: 94px 1fr; }
}
