:root {
  --font-family-ui: "Segoe UI", Arial, sans-serif;
  --font-family-brand: Georgia, "Times New Roman", serif;
  --font-weight-title: 800;
  --font-weight-subtitle: 700;
  --font-weight-body: 450;
  --font-weight-action: 700;
  --font-size-subtitle: 0.8rem;
  --font-size-body: 0.92rem;
  --font-size-title: clamp(1.45rem, 4vw, 2rem);
  --font-size-small: var(--font-size-subtitle);
  --site-header-height: 3.25rem;
  --site-footer-height: 1.75rem;
  --paper: #f7f2e8;
  --paper-soft: rgba(247, 242, 232, 0.58);
  --paper-strong: rgba(247, 242, 232, 0.88);
  --paper-border: rgba(255, 255, 250, 0.38);
  --warm-brown: #73513b;
  --warm-brown-dark: #2f2d28;
  --warm-brown-text: #4f4940;
  --warm-brown-muted: #68705f;
  --wine-accent: #8b1e56;
  --wine-accent-soft: rgba(139, 30, 86, 0.09);
  --wine-accent-border: rgba(139, 30, 86, 0.2);
  --wine-accent-strong: #65173f;
  --glass-panel-strong: var(--paper-strong);
  --glass-border: var(--paper-border);
  --glass-shadow: 0 1.15rem 2.8rem rgba(47, 45, 40, 0.18);
  --glass-blur: blur(12px) saturate(1.08);
  --panel-background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.22), rgba(232, 238, 220, 0.07)),
    var(--glass-panel-strong);
  --control-background: rgba(247, 242, 232, 0.76);
  --control-radius: 6px;
  --panel-radius: 12px;
  --button-background: linear-gradient(135deg, var(--wine-accent), #b35a42);
  --button-background-hover: linear-gradient(135deg, var(--wine-accent-strong), #9d4d38);
}

html {
  font-family: var(--font-family-ui);
}

body {
  font-family: var(--font-family-ui);
  font-weight: var(--font-weight-body);
  margin: 0;
  overflow: hidden;
  padding: 0;
  height: 100%;
  background-color: #000;
  cursor: grab;
}
body.is-over-marker {
  cursor: pointer;
}
body.navigation-mode-orbit-dragging,
body.navigation-mode-orbit-dragging .map-viewport,
body.navigation-mode-orbit-dragging .map-viewport canvas {
  cursor: grabbing;
}
body.navigation-mode-walk {
  cursor: crosshair;
}
body.navigation-fast-travel-active,
body.navigation-fast-travel-active .map-viewport,
body.navigation-fast-travel-active .map-viewport canvas {
  cursor: crosshair;
}
body.navigation-fast-travel-active.navigation-mode-orbit-dragging,
body.navigation-fast-travel-active.navigation-mode-orbit-dragging .map-viewport,
body.navigation-fast-travel-active.navigation-mode-orbit-dragging .map-viewport canvas {
  cursor: grabbing;
}
body.navigation-fast-travel-moving,
body.navigation-fast-travel-moving .map-viewport,
body.navigation-fast-travel-moving .map-viewport canvas {
  cursor: progress;
}
body.navigation-mode-transition,
body.navigation-mode-transition .map-viewport,
body.navigation-mode-transition .map-viewport canvas {
  cursor: default;
}
body.navigation-mode-transition .navigation-mode-select {
  opacity: 0.72;
  pointer-events: none;
}
body.navigation-mode-walk::after {
  content: "";
  position: fixed;
  z-index: 850;
  top: 50%;
  left: 50%;
  width: 0.62rem;
  height: 0.62rem;
  border: 1px solid rgba(255, 252, 244, 0.92);
  border-radius: 50%;
  box-shadow:
    0 0 0 1px rgba(63, 43, 33, 0.34),
    0 0.2rem 0.7rem rgba(63, 43, 33, 0.3);
  pointer-events: none;
  transform: translate(-50%, -50%);
}
body.navigation-mode-walk.is-over-marker::after {
  width: 0.86rem;
  height: 0.86rem;
  border-color: var(--wine-accent);
  box-shadow:
    0 0 0 1px rgba(63, 43, 33, 0.42),
    0 0 0 0.28rem var(--wine-accent-soft),
    0 0.2rem 0.7rem rgba(63, 43, 33, 0.32);
}
body.navigation-mode-walk.navigation-fast-travel-active::after {
  display: none;
}

.svg-icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.marker-selection-feedback {
  position: fixed;
  z-index: 1220;
  left: 0;
  top: 0;
  pointer-events: none;
  transform: translate3d(-100vw, -100vh, 0);
  transition: opacity 160ms ease;
  will-change: transform;
}
.marker-selection-feedback.is-hidden {
  opacity: 0;
}
body.info-panel-open .marker-selection-feedback,
body.image-viewer-open .marker-selection-feedback {
  display: none;
}
.marker-selection-ring {
  display: none;
  position: absolute;
  left: 50%;
  top: 50%;
  width: 3.25rem;
  height: 1.05rem;
  border: 2px solid rgba(255, 252, 244, 0.96);
  border-radius: 50%;
  box-shadow:
    0 0 0 1px rgba(122, 20, 95, 0.24),
    0 0 0 0.35rem rgba(255, 252, 244, 0.18),
    0 0.35rem 0.95rem rgba(58, 38, 27, 0.24);
  transform: translate(-50%, -50%);
  animation: marker-selection-pulse 1.65s ease-out infinite;
}
.marker-selection-card {
  --marker-selection-card-background: rgb(255, 249, 239);
  --marker-selection-card-border: rgba(63, 43, 33, 0.2);
  --marker-selection-card-shadow: drop-shadow(0 0.72rem 1.25rem rgba(58, 38, 27, 0.28));
  --marker-selection-card-gap: 1.35rem;
  position: absolute;
  z-index: 1;
  left: 0;
  top: 0;
  display: block;
  width: max-content;
  min-width: 0;
  max-width: min(16rem, 72vw);
  color: var(--warm-brown-dark);
  background-color: var(--marker-selection-card-background);
  background-image: none;
  border: 1px solid var(--marker-selection-card-border);
  border-radius: 9px;
  box-shadow: none;
  filter: var(--marker-selection-card-shadow);
  padding: 0.55rem 0.65rem;
  transform: translate(-50%, calc(-100% - var(--marker-selection-card-gap)));
  transition: opacity 160ms ease;
}
.marker-selection-card::after {
  content: "";
  position: absolute;
  z-index: -1;
  left: 50%;
  bottom: -0.42rem;
  width: 0.72rem;
  height: 0.72rem;
  background-color: var(--marker-selection-card-background);
  background-image: none;
  border-right: 1px solid var(--marker-selection-card-border);
  border-bottom: 1px solid var(--marker-selection-card-border);
  transform: translateX(-50%) rotate(45deg);
}
.marker-selection-card strong,
.marker-selection-card span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.marker-selection-card strong {
  display: block;
  max-width: min(14rem, 66vw);
  color: var(--warm-brown-dark);
  font-size: var(--font-size-body);
  line-height: 1.15;
}
.marker-selection-card span {
  display: none;
  color: var(--wine-accent);
  font-size: var(--font-size-small);
  font-weight: var(--font-weight-subtitle);
}
.marker-selection-card i {
  display: none;
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  color: var(--wine-accent);
  font-style: normal;
  font-weight: var(--font-weight-action);
}
@keyframes marker-selection-pulse {
  0% {
    opacity: 0.92;
    transform: translate(-50%, -50%) scale(0.7);
  }
  58% {
    opacity: 0.46;
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.85);
  }
}

.touch-navigation-controls {
  position: fixed;
  z-index: 1180;
  inset: 0;
  display: none;
  pointer-events: none;
}
.touch-joystick,
.touch-look-pad,
.touch-action-button {
  pointer-events: auto;
  touch-action: none;
}
.touch-joystick,
.touch-look-pad {
  position: absolute;
  bottom: calc(var(--site-footer-height) + 1.25rem + env(safe-area-inset-bottom));
  display: grid;
  place-items: center;
  width: 7.1rem;
  height: 7.1rem;
  color: rgba(255, 249, 239, 0.92);
  background:
    radial-gradient(circle at center, rgba(255, 249, 239, 0.18) 0 24%, transparent 25%),
    radial-gradient(circle at center, transparent 0 48%, rgba(255, 249, 239, 0.16) 49% 50%, transparent 51%),
    rgba(36, 28, 24, 0.36);
  border: 1px solid rgba(255, 252, 244, 0.38);
  border-radius: 50%;
  box-shadow:
    0 0.85rem 1.9rem rgba(47, 31, 22, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    inset 0 0 0 0.32rem rgba(255, 249, 239, 0.08);
  backdrop-filter: blur(10px) saturate(1.08);
  -webkit-backdrop-filter: blur(10px) saturate(1.08);
}
.touch-joystick {
  left: max(1rem, env(safe-area-inset-left));
}
.touch-look-pad {
  right: max(1rem, env(safe-area-inset-right));
}
.touch-joystick::before,
.touch-look-pad::before {
  content: "";
  width: 3.1rem;
  height: 3.1rem;
  border: 1px dashed rgba(122, 20, 95, 0.3);
  border-radius: inherit;
}
.touch-joystick::after,
.touch-look-pad::after {
  content: "";
  position: absolute;
  inset: 0.85rem;
  border: 1px solid rgba(255, 249, 239, 0.2);
  border-radius: inherit;
  pointer-events: none;
}
.touch-control-label {
  position: absolute;
  left: 50%;
  bottom: -1.35rem;
  min-width: 4.6rem;
  color: rgba(255, 249, 239, 0.9);
  background: rgba(47, 31, 22, 0.48);
  border: 1px solid rgba(255, 249, 239, 0.22);
  border-radius: 999px;
  box-sizing: border-box;
  font-size: var(--font-size-small);
  font-weight: var(--font-weight-action);
  line-height: 1;
  padding: 0.34rem 0.58rem;
  text-align: center;
  transform: translateX(-50%);
  white-space: nowrap;
}
.touch-joystick-knob,
.touch-look-knob {
  position: absolute;
  width: 3.15rem;
  height: 3.15rem;
  background: var(--button-background);
  border: 1px solid rgba(255, 249, 239, 0.46);
  border-radius: 50%;
  box-shadow: 0 0.5rem 1.05rem rgba(74, 12, 58, 0.32);
  transition: transform 80ms ease-out;
}
.touch-look-knob {
  background: linear-gradient(135deg, #3f7c8e, #8b1e56);
}
.touch-action-button {
  position: absolute;
  display: grid;
  place-items: center;
  width: 4.35rem;
  min-height: 2.7rem;
  box-sizing: border-box;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(139, 30, 86, 0.88), rgba(63, 124, 142, 0.82));
  border: 1px solid rgba(255, 249, 239, 0.38);
  border-radius: 999px;
  box-shadow:
    0 0.65rem 1.2rem rgba(47, 31, 22, 0.26),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  font-size: var(--font-size-small);
  font-weight: var(--font-weight-action);
  line-height: 1;
  padding: 0.62rem 0.7rem;
  backdrop-filter: blur(8px) saturate(1.08);
  -webkit-backdrop-filter: blur(8px) saturate(1.08);
  user-select: none;
}
.touch-action-button.active,
.touch-action-button:active {
  background:
    linear-gradient(135deg, rgba(101, 23, 63, 0.96), rgba(38, 99, 115, 0.92));
  box-shadow:
    0 0.4rem 0.95rem rgba(47, 31, 22, 0.2),
    inset 0 0 0 2px rgba(255, 249, 239, 0.2);
  transform: translateY(1px);
}
.touch-action-button-sprint {
  right: max(8.75rem, calc(env(safe-area-inset-right) + 8.75rem));
  bottom: calc(var(--site-footer-height) + 5.1rem + env(safe-area-inset-bottom));
}
.touch-action-button-jump {
  right: max(8.75rem, calc(env(safe-area-inset-right) + 8.75rem));
  bottom: calc(var(--site-footer-height) + 9.6rem + env(safe-area-inset-bottom));
}
.touch-action-button-interact {
  right: max(1.45rem, env(safe-area-inset-right));
  bottom: calc(var(--site-footer-height) + 9.6rem + env(safe-area-inset-bottom));
}

@media (pointer: coarse), (max-width: 900px) {
  body.navigation-mode-walk.navigation-mode-touch .touch-navigation-controls {
    display: block;
  }

  body.navigation-mode-walk.navigation-mode-touch {
    cursor: default;
  }
}

body.info-panel-open .touch-navigation-controls,
body.image-viewer-open .touch-navigation-controls {
  display: none !important;
}

@media (pointer: coarse) and (min-width: 901px) {
  .touch-joystick {
    left: max(1.35rem, env(safe-area-inset-left));
    bottom: calc(4.25rem + env(safe-area-inset-bottom));
  }

  .touch-look-pad {
    right: max(1.35rem, env(safe-area-inset-right));
    bottom: calc(4.25rem + env(safe-area-inset-bottom));
  }

  .touch-action-button-interact {
    right: max(1.35rem, env(safe-area-inset-right));
    bottom: calc(12.55rem + env(safe-area-inset-bottom));
  }

  .touch-action-button-sprint {
    right: max(9.1rem, calc(env(safe-area-inset-right) + 9.1rem));
    bottom: calc(8rem + env(safe-area-inset-bottom));
  }

  .touch-action-button-jump {
    right: max(9.1rem, calc(env(safe-area-inset-right) + 9.1rem));
    bottom: calc(12.55rem + env(safe-area-inset-bottom));
  }
}

button,
input,
textarea,
select {
  font-family: var(--font-family-ui);
}

button {
  cursor: pointer;
  font-weight: var(--font-weight-action);
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--wine-accent);
  outline-offset: 3px;
}

input,
textarea,
select {
  font-weight: var(--font-weight-body);
}

.site-header,
.help-panel,
.about-panel,
.info-panel,
.image-viewer-frame,
.editor-session-panel,
.camera-view-editor-panel,
.collision-editor-panel,
.tree-editor-panel,
.marker-editor-panel {
  color: var(--warm-brown-dark);
  background: var(--panel-background);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.36);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}

.help-panel,
.about-panel,
.image-viewer-frame,
.editor-session-panel,
.camera-view-editor-panel,
.collision-editor-panel,
.tree-editor-panel,
.marker-editor-panel {
  border-radius: var(--panel-radius);
}

.site-nav a:hover,
.site-nav button:hover,
.footer-nav a:hover,
.footer-nav button:hover,
.quality-selector-option:hover,
.quality-selector-option:focus,
.quality-selector-option.selected,
.language-selector-option:hover,
.language-selector-option:focus,
.language-selector-option.selected,
.image-viewer-nav:hover {
  color: var(--wine-accent);
  background: var(--wine-accent-soft);
}

.sun-control,
.quality-selector-button,
.quality-selector-menu,
.language-selector-button,
.language-selector-menu,
.image-viewer-controls,
.collision-editor-details,
.marker-editor-workflow,
.collision-editor-slider,
.marker-editor-section,
.marker-editor-coordinate-preview,
.marker-editor-content-preview,
.marker-editor-edit-list,
.marker-editor-edit-item,
.marker-editor-image-dropzone,
.marker-editor-image-counter {
  background: var(--paper-soft);
  border: 1px solid var(--glass-border);
}

.collision-editor-select,
.collision-editor-number,
.camera-view-editor-current textarea,
.camera-view-editor-finder textarea,
.marker-editor-edit-item textarea,
.marker-editor-image-row input,
.marker-editor-field input,
.marker-editor-field textarea,
.marker-editor-edit-controls button {
  color: var(--warm-brown-dark);
  background: var(--control-background);
  border: 1px solid var(--glass-border);
  border-radius: var(--control-radius);
  box-sizing: border-box;
  font-size: var(--font-size-subtitle);
}

.camera-view-editor-actions button,
.camera-view-editor-finder button,
.marker-editor-actions button,
.collision-editor-actions-save button:last-child {
  color: #fff;
  background: var(--button-background);
  border: 1px solid var(--wine-accent-border);
}

.camera-view-editor-actions button:hover,
.camera-view-editor-finder button:hover,
.marker-editor-actions button:hover,
.collision-editor-actions button:not(:disabled):hover,
.collision-editor-actions-save button:last-child:hover {
  color: #fff;
  background: var(--button-background-hover);
}

/* Header */
.site-header {
  position: fixed;
  z-index: 1300;
  top: 0;
  left: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 1.25rem;
  width: 100%;
  min-height: var(--site-header-height);
  box-sizing: border-box;
  border-width: 0 0 1px;
  padding: 0.25rem 1rem;
}
.site-brand {
  grid-column: 2;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-self: center;
  gap: 0;
  min-width: 0;
  color: var(--warm-brown);
  font-family: var(--font-family-brand);
  font-size: var(--font-size-subtitle);
  font-weight: 400;
  line-height: 0.9;
  text-decoration: none;
}
.site-brand img {
  display: block;
  width: 7.4rem;
  height: 2.65rem;
  object-fit: contain;
}
.site-brand span {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
  letter-spacing: 0;
  margin-top: -0.18rem;
}
.site-brand span::before,
.site-brand span::after {
  content: "";
  display: block;
  width: 1.55rem;
  height: 1px;
  background:
    radial-gradient(circle at 100% 50%, rgba(132, 83, 47, 0.36) 0 1.4px, transparent 1.8px),
    linear-gradient(to right, rgba(132, 83, 47, 0.5), rgba(132, 83, 47, 0.5));
  background-repeat: no-repeat;
  background-size: 100% 100%, calc(100% - 0.04rem) 1px;
  background-position: center, center;
  border-radius: 999px;
  transform: translateY(0.1em);
}
.site-brand span::after {
  transform: translateY(0.1em) scaleX(-1);
}
.site-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.site-nav-right {
  grid-column: 3;
  justify-self: end;
}
.menu-toggle-button {
  display: none;
}
.site-nav a,
.site-nav button,
.footer-nav a,
.footer-nav button {
  float: none;
  color: inherit;
  background: transparent;
  border: 0;
  border-radius: 999px;
  font-size: var(--font-size-small);
  font-weight: var(--font-weight-action);
  line-height: 1;
  padding: 0.65rem 0.75rem;
  text-decoration: none;
}
.navigation-mode-button.active,
.fast-travel-toggle-button.active {
  color: #fff;
  background: var(--wine-accent);
  box-shadow: 0 0.55rem 1.1rem rgba(139, 30, 86, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.navigation-mode-select {
  position: relative;
  flex: 0 0 auto;
}
.navigation-select-button {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 8.9rem;
}
.navigation-select-button strong {
  font: inherit;
  color: var(--warm-brown-dark);
}
.navigation-select-button::after {
  content: "";
  width: 0.42rem;
  height: 0.42rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-0.12rem) rotate(45deg);
  transition: transform 180ms ease;
}
.navigation-mode-select.open .navigation-select-button::after {
  transform: translateY(0.08rem) rotate(225deg);
}
.navigation-select-menu {
  position: absolute;
  top: calc(100% + 0.35rem);
  right: 0;
  z-index: 30;
  display: none;
  min-width: 100%;
  padding: 0.25rem;
  background: rgba(255, 252, 245, 0.98);
  border: 1px solid var(--wine-accent-border);
  border-radius: 0.5rem;
  box-shadow: 0 0.85rem 1.8rem rgba(43, 36, 30, 0.18);
}
.navigation-mode-select.open .navigation-select-menu {
  display: grid;
  gap: 0.15rem;
}
.site-nav .navigation-select-menu button,
.footer-nav .navigation-select-menu button {
  width: 100%;
  text-align: left;
  white-space: nowrap;
}
.environment-toggle-button.active {
  color: var(--warm-brown-dark);
  background: var(--paper-strong);
  box-shadow: inset 0 0 0 1px var(--wine-accent-border);
}
.site-nav .model-load-restart-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.42rem;
  width: 2.75rem;
  padding-inline: 0.65rem;
}
.site-nav .fast-travel-toggle-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.42rem;
  width: 2.75rem;
  padding-inline: 0.65rem;
}
.footer-nav .fast-travel-toggle-button {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.model-load-restart-button svg,
.fast-travel-toggle-button svg {
  width: 1.12rem;
  height: 1.12rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.model-load-restart-label {
  display: none;
}
.site-nav .fast-travel-toggle-label {
  display: none;
}
.model-load-restart-button.is-restarting svg {
  animation: model-replay-spin 900ms cubic-bezier(0.4, 0, 0.2, 1) infinite;
}
.model-load-restart-button:disabled {
  cursor: progress;
  opacity: 0.68;
}
@keyframes model-replay-spin {
  to {
    transform: rotate(-360deg);
  }
}
.editor-session-button.active {
  color: #fff;
  background: var(--wine-accent);
}
.navigation-mode-button:disabled,
.fast-travel-toggle-button:disabled {
  cursor: wait;
  opacity: 0.48;
}
.app-toolbar {
  grid-column: 1;
  justify-self: start;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
}
.sun-control {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 2.2rem;
  color: var(--warm-brown-dark);
  border-radius: 999px;
  box-shadow: 0 0.55rem 1.35rem rgba(58, 38, 27, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.42);
  padding: 0.35rem 0.7rem;
}
.sun-control-label {
  color: var(--warm-brown);
  font-size: var(--font-size-small);
  font-weight: var(--font-weight-subtitle);
  line-height: 1;
  white-space: nowrap;
}
.sun-slider {
  width: clamp(7.5rem, 15vw, 13rem);
  accent-color: var(--wine-accent);
}
/* Loader */
.loader {
  --loader-paper-rgb: 238, 232, 219;
  position: fixed;
  z-index: 9999;
  top: 0;
  left: 0;
  height: 100vh;
  height: 100dvh;
  width: 100vw;
  overflow: hidden;
  background:
    linear-gradient(120deg, rgba(var(--loader-paper-rgb), 0.97), rgba(226, 230, 216, 0.88)),
    radial-gradient(circle at 28% 20%, rgba(115, 81, 59, 0.1), transparent 24rem),
    radial-gradient(circle at 84% 18%, rgba(139, 30, 86, 0.08), transparent 25rem),
    linear-gradient(28deg, transparent 0 23%, rgba(104, 112, 95, 0.06) 23.2% 23.45%, transparent 23.65% 100%),
    linear-gradient(152deg, transparent 0 35%, rgba(115, 81, 59, 0.05) 35.15% 35.4%, transparent 35.6% 100%),
    repeating-linear-gradient(8deg, transparent 0 3.4rem, rgba(79, 73, 64, 0.042) 3.45rem 3.5rem),
    rgb(var(--loader-paper-rgb));
  display: grid;
  place-items: center;
  text-align: center;
  padding: 2.25rem 1.25rem;
  box-sizing: border-box;
}
.loader::before {
  content: "1950";
  position: absolute;
  right: -0.1em;
  bottom: -0.18em;
  color: rgba(115, 81, 59, 0.12);
  text-shadow: 0 1px 0 rgba(247, 242, 232, 0.2);
  font-family: var(--font-family-brand);
  font-size: clamp(13rem, 25vw, 23rem);
  font-weight: var(--font-weight-title);
  line-height: 0.78;
  pointer-events: none;
}
.loader::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: min(42vw, 34rem);
  height: min(45vh, 28rem);
  opacity: 0.36;
  background:
    linear-gradient(to right, rgba(var(--loader-paper-rgb), 0) 0%, rgba(var(--loader-paper-rgb), 0.14) 48%, rgba(var(--loader-paper-rgb), 0.96) 100%),
    linear-gradient(to top, rgba(var(--loader-paper-rgb), 0) 0%, rgba(var(--loader-paper-rgb), 0.22) 48%, rgba(var(--loader-paper-rgb), 0.98) 100%),
    url("../images/M-25/25.2.parroquiasanvicenteferrer/25.2.parroquiasanvicenteferrer.2.Archivo%20B%2BM%20Manuel%20Belgrano.jpg");
  background-position: center bottom;
  background-size: cover;
  filter: grayscale(1) sepia(0.46) saturate(1.18) contrast(1.62) brightness(1.08);
  mix-blend-mode: multiply;
  mask-image:
    linear-gradient(to right, #000 0%, #000 48%, transparent 100%),
    linear-gradient(to top, #000 0%, #000 58%, transparent 100%);
  mask-composite: intersect;
  -webkit-mask-image:
    linear-gradient(to right, #000 0%, #000 48%, transparent 100%),
    linear-gradient(to top, #000 0%, #000 58%, transparent 100%);
  -webkit-mask-composite: source-in;
  pointer-events: none;
}
.loader-content {
  position: relative;
  z-index: 1;
  isolation: isolate;
  width: min(82vw, 740px);
  height: min(calc(100vh - 5.5rem), 650px);
  display: grid;
  place-items: center;
  box-sizing: border-box;
  padding: clamp(2.4rem, 4.8vw, 4rem);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.018), rgba(255, 244, 228, 0.004) 46%, rgba(133, 83, 47, 0.004)),
    rgba(255, 255, 255, 0.002);
  border: 0;
  border-radius: 30px;
  box-shadow:
    0 1.35rem 2.8rem rgba(58, 38, 27, 0.22),
    0 0.28rem 0.85rem rgba(255, 248, 236, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 -1px 0 rgba(132, 83, 47, 0.04);
  backdrop-filter: blur(6px) saturate(1.04);
  -webkit-backdrop-filter: blur(6px) saturate(1.04);
}
.loader-content::before,
.loader-content::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
}
.loader-content::before {
  z-index: -1;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.025), transparent 34%),
    radial-gradient(circle at 18% 10%, rgba(255, 255, 255, 0.02), transparent 18rem),
    radial-gradient(circle at 88% 94%, rgba(132, 83, 47, 0.012), transparent 18rem);
  box-shadow: inset 1px 1px 0 rgba(255, 255, 255, 0.035);
}
.loader-content::after {
  box-shadow: inset 0 0 2.2rem rgba(255, 255, 255, 0.008);
}
.loader-content-inner {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: center;
  align-items: center;
  justify-content: center;
  justify-items: center;
  gap: 0.95rem;
  width: 100%;
  transform: scale(1.06);
  transform-origin: center;
}
.loader-brand {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  color: var(--warm-brown);
  font-family: var(--font-family-brand);
  font-size: clamp(4.8rem, 8.6vw, 6.9rem);
  font-weight: 400;
  line-height: 0.82;
  margin: 0;
}
.loader-logo {
  display: block;
  width: min(72%, 24rem);
  height: clamp(4.5rem, 7.8vw, 6.4rem);
  object-fit: contain;
  margin: 0 0 0.35rem;
}
.loader-brand span {
  display: inline-flex;
  align-items: center;
  gap: clamp(1.5rem, 3vw, 2.2rem);
  color: currentColor;
  letter-spacing: 0;
  margin-top: 0;
  white-space: nowrap;
}
.loader-brand span::before,
.loader-brand span::after {
  content: "";
  display: block;
  width: clamp(4.7rem, 9vw, 7.6rem);
  height: 1px;
  background:
    radial-gradient(circle at 100% 50%, rgba(132, 83, 47, 0.36) 0 3px, transparent 3.5px),
    linear-gradient(to right, rgba(132, 83, 47, 0.5), rgba(132, 83, 47, 0.5));
  background-repeat: no-repeat;
  background-size: 100% 100%, calc(100% - 0.1rem) 1px;
  background-position: center, center;
  border-radius: 999px;
  transform: translateY(0.12em);
}
.loader-brand span::after {
  transform: translateY(0.12em) scaleX(-1);
}
.loader.active {
  display: grid;
}
.loader:not(.active) {
  display: none;
}
.loader-kicker {
  width: min(100%, 31rem);
  color: var(--warm-brown-muted);
  font-size: var(--font-size-subtitle);
  font-weight: var(--font-weight-subtitle);
  letter-spacing: 0.24em;
  line-height: 1.5;
  margin: 0.85rem 0 0;
  text-transform: uppercase;
}
.loader-settings {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 1rem;
  width: min(100%, 28rem);
  margin-top: 0.55rem;
}
.loader-quality-control,
.loader-language-control {
  display: grid;
  justify-items: center;
  gap: 0.6rem;
  width: min(100%, 13.35rem);
}
.quality-selector-label,
.language-selector-label {
  color: var(--wine-accent);
  font-size: var(--font-size-subtitle);
  font-weight: var(--font-weight-subtitle);
  line-height: 1.3;
  margin: 0;
  letter-spacing: 0;
  text-transform: uppercase;
}
.quality-selector,
.language-selector {
  position: relative;
  z-index: 1;
  width: 100%;
}
.quality-selector.open,
.language-selector.open {
  z-index: 20;
}
.quality-selector-button,
.quality-selector-option,
.language-selector-button,
.language-selector-option {
  width: 100%;
  color: var(--warm-brown-dark);
  cursor: pointer;
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-body);
  line-height: 1.3;
  text-align: left;
}
.quality-selector-button,
.language-selector-button {
  position: relative;
  min-height: 2.08rem;
  border-radius: 999px;
  box-shadow: 0 0.48rem 1.05rem rgba(47, 42, 38, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.82);
  margin: 0;
  padding: 0.28rem 2.25rem 0.28rem 0.9rem;
}
.language-selector-value {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.language-selector-flag {
  display: inline-block;
  width: 1.5rem;
  height: 1rem;
  flex: 0 0 1.5rem;
  object-fit: cover;
  border: 1px solid rgba(47, 42, 38, 0.18);
  border-radius: 0.15rem;
  box-shadow: 0 1px 2px rgba(47, 42, 38, 0.12);
  vertical-align: middle;
}
.language-selector-option .language-selector-flag {
  margin-right: 0.5rem;
}
.quality-selector-button::after,
.language-selector-button::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 0.9rem;
  width: 0.48rem;
  height: 0.48rem;
  border-right: 2px solid var(--wine-accent);
  border-bottom: 2px solid var(--wine-accent);
  transform: translateY(-65%) rotate(45deg);
  transition: transform 160ms ease;
}
.quality-selector.open .quality-selector-button::after,
.language-selector.open .language-selector-button::after {
  transform: translateY(-35%) rotate(225deg);
}
.quality-selector-menu,
.language-selector-menu {
  position: absolute;
  z-index: 30;
  top: auto;
  bottom: calc(100% + 0.45rem);
  left: 0;
  display: none;
  width: 100%;
  max-height: min(18rem, calc(100dvh - 2rem));
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  border-radius: 1.05rem;
  box-shadow: 0 0.85rem 1.7rem rgba(47, 42, 38, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.82);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.loader .quality-selector-button,
.loader .language-selector-button,
.loader .quality-selector-menu,
.loader .language-selector-menu {
  background: var(--paper);
}
.quality-selector.open .quality-selector-menu,
.language-selector.open .language-selector-menu {
  display: block;
}
.quality-selector-option,
.language-selector-option {
  display: block;
  min-height: 2.08rem;
  background: var(--paper);
  border: 0;
  border-bottom: 1px solid rgba(118, 87, 62, 0.12);
  border-radius: 0;
  padding: 0.46rem 0.9rem;
  transition: color 160ms ease, background-color 160ms ease;
}
.quality-selector-option:last-child,
.language-selector-option:last-child {
  border-bottom: 0;
}
.quality-selector-option:hover,
.quality-selector-option:focus,
.quality-selector-option.selected,
.language-selector-option:hover,
.language-selector-option:focus,
.language-selector-option.selected {
  outline: 0;
}
.loader .quality-selector-option:hover,
.loader .quality-selector-option:focus,
.loader .quality-selector-option.selected,
.loader .language-selector-option:hover,
.loader .language-selector-option:focus,
.loader .language-selector-option.selected {
  background: #efe1e8;
}
.language-selector.loading .language-selector-button {
  cursor: wait;
  opacity: 0.72;
}
.quality-recommendation {
  width: min(100%, 18rem);
  color: var(--warm-brown-text);
  font-size: var(--font-size-small);
  line-height: 1.35;
  margin: -0.1rem 0 0;
}
.loader-progress-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 3.4rem;
  align-items: center;
  gap: 0.55rem;
  width: min(calc(100% + 7rem), 820px);
  margin-top: 0.15rem;
}
.loader-progress {
  width: 100%;
  height: 8px;
  overflow: hidden;
  background: rgba(93, 64, 87, 0.12);
  border-radius: 999px;
  box-sizing: border-box;
}
.loader-progress-bar {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--wine-accent), #b35a42);
  border-radius: inherit;
  transition: width 220ms ease;
}
.loader-status {
  width: min(100%, 520px);
  color: var(--warm-brown);
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-body);
  line-height: 1.45;
  margin: 0.05rem 0 0.55rem;
  min-height: 1.4em;
  text-align: center;
}
.loader-progress-value {
  color: var(--warm-brown-dark);
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-subtitle);
  line-height: 1;
  min-width: 3.4rem;
  text-align: right;
}
.loader-start-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  width: min(100%, 330px);
  min-height: 50px;
  float: none;
  color: #fff;
  background: var(--button-background);
  border: 0;
  border-radius: 13px;
  box-shadow: 0 1rem 1.9rem rgba(74, 12, 58, 0.34);
  cursor: pointer;
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-action);
  letter-spacing: 0;
  margin: 0.45rem 0 0;
  opacity: 0;
  padding: 0.75rem 1.2rem;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 180ms ease, transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}
.loader-start-button::before {
  content: "\2192";
  position: static;
  display: inline-flex;
  align-items: center;
  font-size: 1.55rem;
  line-height: 1;
  transform: translateY(-0.03em);
}
.loader.ready .loader-start-button {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.loader-start-button:not(:disabled):hover {
  box-shadow: 0 1.08rem 2rem rgba(74, 12, 58, 0.42);
  filter: brightness(1.06);
  transform: translateY(-2px);
}
.loader-start-button:disabled {
  cursor: default;
}
.help-overlay {
  position: fixed;
  z-index: 9000;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: rgba(40, 29, 22, 0.34);
  backdrop-filter: blur(10px) saturate(1.04);
  -webkit-backdrop-filter: blur(10px) saturate(1.04);
}
.help-overlay.active {
  display: flex;
}
.help-panel,
.about-panel {
  position: relative;
  max-height: 82vh;
  overflow-y: auto;
}
.help-panel {
  width: min(94vw, 640px);
  padding: clamp(1.25rem, 3.4vw, 1.8rem);
}
.help-kicker {
  color: var(--wine-accent);
  font-size: var(--font-size-small);
  font-weight: var(--font-weight-subtitle);
  letter-spacing: 0.08em;
  line-height: 1.4;
  margin: 0 0 0.45rem;
  text-transform: uppercase;
}
.help-panel h2 {
  color: var(--warm-brown-dark);
  font-size: var(--font-size-title);
  font-weight: var(--font-weight-title);
  line-height: 1.12;
  margin: 0 2.2rem 1rem 0;
}
.help-demo {
  position: relative;
  overflow: hidden;
  min-height: clamp(11rem, 31vw, 15rem);
  margin: 0 0 1.25rem;
  background:
    radial-gradient(circle at 18% 22%, rgba(122, 20, 95, 0.16), transparent 22%),
    radial-gradient(circle at 82% 72%, rgba(132, 83, 47, 0.14), transparent 26%),
    linear-gradient(155deg, rgba(255, 252, 244, 0.74), rgba(255, 249, 239, 0.54));
  border: 1px solid rgba(132, 83, 47, 0.16);
  border-radius: 10px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.68);
}
.help-demo-map {
  position: absolute;
  inset: 0;
  transform-origin: 52% 58%;
}
.help-demo-map::before {
  content: "";
  position: absolute;
  inset: 18% 10% 12%;
  background:
    linear-gradient(34deg, transparent 44%, rgba(132, 83, 47, 0.18) 45% 48%, transparent 49%),
    linear-gradient(145deg, transparent 48%, rgba(132, 83, 47, 0.16) 49% 52%, transparent 53%);
  opacity: 0.72;
}
.help-demo-path {
  position: absolute;
  left: 12%;
  right: 10%;
  bottom: 23%;
  height: 0.42rem;
  background: rgba(132, 83, 47, 0.25);
  border-radius: 999px;
  transform: rotate(-8deg);
}
.help-demo-building {
  position: absolute;
  display: block;
  width: 3.4rem;
  height: 2.35rem;
  background:
    linear-gradient(90deg, rgba(63, 43, 33, 0.12) 1px, transparent 1px) 0 0 / 0.72rem 100%,
    linear-gradient(180deg, #f7f2e8, #c8bfa9);
  border: 1px solid rgba(79, 73, 64, 0.22);
  border-radius: 4px;
  box-shadow: 0 0.8rem 1.3rem rgba(63, 43, 33, 0.16);
}
.help-demo-building::before {
  content: "";
  position: absolute;
  left: -0.12rem;
  right: -0.12rem;
  top: -0.55rem;
  height: 0.65rem;
  background: #7a5540;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}
.help-demo-building-one {
  left: 18%;
  top: 31%;
  transform: rotate(-5deg);
}
.help-demo-building-two {
  right: 19%;
  top: 23%;
  transform: scale(0.9) rotate(6deg);
}
.help-demo-building-three {
  left: 48%;
  bottom: 22%;
  transform: scale(1.05) rotate(2deg);
}
.help-demo-marker {
  position: absolute;
  display: block;
  width: 1.25rem;
  height: 1.25rem;
  background: var(--wine-accent);
  border: 2px solid #f7f2e8;
  border-radius: 50% 50% 50% 0;
  box-shadow: 0 0.4rem 0.85rem rgba(122, 20, 95, 0.28);
  transform: rotate(-45deg);
}
.help-demo-marker::after {
  content: "";
  position: absolute;
  inset: 0.32rem;
  background: #f7f2e8;
  border-radius: 50%;
}
.help-demo-marker-one {
  left: 33%;
  top: 30%;
}
.help-demo-marker-two {
  right: 30%;
  bottom: 31%;
}
.help-demo-cursor {
  position: absolute;
  left: 19%;
  top: 58%;
  width: 1.2rem;
  height: 1.2rem;
  border: 2px solid var(--warm-brown-dark);
  border-top-color: transparent;
  border-left-color: transparent;
  transform: rotate(-35deg);
  filter: drop-shadow(0 0.32rem 0.45rem rgba(63, 43, 33, 0.24));
}
.help-demo-cursor::after {
  content: "";
  position: absolute;
  right: -0.4rem;
  bottom: -0.4rem;
  width: 0.76rem;
  height: 0.76rem;
  background: rgba(122, 20, 95, 0.2);
  border: 1px solid rgba(122, 20, 95, 0.34);
  border-radius: 50%;
  opacity: 0;
}
.help-demo[data-help-demo="orbit"] .help-demo-map {
  animation: help-map-orbit 3.8s ease-in-out infinite;
}
.help-demo[data-help-demo="orbit"] .help-demo-cursor {
  animation: help-cursor-orbit 3.8s ease-in-out infinite;
}
.help-demo[data-help-demo="zoom"] .help-demo-map {
  animation: help-map-zoom 3.4s ease-in-out infinite;
}
.help-demo[data-help-demo="zoom"] .help-demo-cursor {
  animation: help-cursor-zoom 3.4s ease-in-out infinite;
}
.help-demo[data-help-demo="pin"] .help-demo-marker-one {
  animation: help-marker-pulse 2s ease-in-out infinite;
}
.help-demo[data-help-demo="pin"] .help-demo-marker-two {
  animation: help-marker-pulse 2s ease-in-out 0.8s infinite;
}
.help-demo[data-help-demo="pin"] .help-demo-cursor {
  animation: help-cursor-pin 3.2s ease-in-out infinite;
}
.help-demo[data-help-demo="pin"] .help-demo-cursor::after {
  animation: help-cursor-click 3.2s ease-in-out infinite;
}
.help-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.72rem;
}
.help-item {
  font-family: var(--font-family-ui);
  text-align: left;
  display: grid;
  grid-template-columns: 2.15rem 1fr;
  gap: 0.78rem;
  align-items: start;
  min-width: 0;
  padding: 0.72rem;
  background: rgba(255, 252, 244, 0.46);
  border: 1px solid rgba(132, 83, 47, 0.12);
  border-radius: 8px;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}
.help-item:hover,
.help-item.active {
  background: rgba(255, 252, 244, 0.74);
  border-color: rgba(122, 20, 95, 0.28);
  box-shadow: 0 0.62rem 1.25rem rgba(63, 43, 33, 0.11);
}
.help-item:focus-visible {
  outline: 3px solid rgba(122, 20, 95, 0.22);
  outline-offset: 2px;
}
.help-item.active {
  transform: translateY(-1px);
}
.help-icon {
  display: inline-grid;
  place-items: center;
  position: relative;
  width: 2.15rem;
  height: 2.15rem;
  color: var(--wine-accent);
  background: rgba(122, 20, 95, 0.08);
  border: 1px solid rgba(122, 20, 95, 0.16);
  border-radius: 50%;
}
.help-icon::before,
.help-icon::after {
  content: "";
  position: absolute;
}
.help-icon-drag::before {
  width: 0.72rem;
  height: 0.72rem;
  border: 2px solid currentColor;
  border-right: 0;
  border-bottom: 0;
  transform: rotate(-45deg);
}
.help-icon-drag::after {
  width: 1.05rem;
  height: 2px;
  background: currentColor;
  border-radius: 999px;
  transform: translateX(0.08rem);
}
.help-icon-zoom::before {
  width: 0.92rem;
  height: 0.92rem;
  border: 2px solid currentColor;
  border-radius: 50%;
}
.help-icon-zoom::after {
  width: 0.58rem;
  height: 2px;
  background: currentColor;
  border-radius: 999px;
  transform: translate(0.5rem, 0.5rem) rotate(45deg);
}
.help-icon-pin::before {
  width: 0.86rem;
  height: 0.86rem;
  background: currentColor;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
}
.help-icon-pin::after {
  width: 0.28rem;
  height: 0.28rem;
  background: #f7f2e8;
  border-radius: 50%;
  transform: translateY(-0.08rem);
}
.help-item span:not(.help-icon) {
  color: var(--warm-brown-text);
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-body);
  line-height: 1.46;
  margin: 0;
}
.help-item span:not(.help-icon) strong {
  color: var(--warm-brown-dark);
  font-weight: var(--font-weight-subtitle);
}
.help-start-button {
  display: block;
  width: min(100%, 12.5rem);
  min-height: 2.45rem;
  float: none;
  color: #fff;
  background: linear-gradient(135deg, var(--warm-brown), var(--warm-brown-dark));
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  font-size: var(--font-size-small);
  font-weight: var(--font-weight-action);
  margin: 1.75rem auto 0;
  padding: 0.62rem 0.9rem;
}
.help-start-button:hover {
  background: linear-gradient(135deg, var(--warm-brown-dark), var(--warm-brown));
}
@keyframes help-map-orbit {
  0%,
  100% {
    transform: perspective(42rem) rotateY(0deg) translateX(0) scale(1);
  }
  50% {
    transform: perspective(42rem) rotateY(13deg) translateX(-2.5%) scale(1.03);
  }
}
@keyframes help-cursor-orbit {
  0%,
  100% {
    left: 24%;
    top: 58%;
  }
  50% {
    left: 58%;
    top: 42%;
  }
}
@keyframes help-map-zoom {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.16);
  }
}
@keyframes help-cursor-zoom {
  0%,
  100% {
    left: 70%;
    top: 58%;
  }
  50% {
    left: 70%;
    top: 43%;
  }
}
@keyframes help-cursor-pin {
  0%,
  100% {
    left: 54%;
    top: 58%;
  }
  52%,
  74% {
    left: 33%;
    top: 33%;
  }
}
@keyframes help-cursor-click {
  0%,
  48%,
  100% {
    opacity: 0;
    transform: scale(0.4);
  }
  55%,
  74% {
    opacity: 1;
    transform: scale(1.7);
  }
}
@keyframes help-marker-pulse {
  0%,
  100% {
    box-shadow: 0 0.4rem 0.85rem rgba(122, 20, 95, 0.24), 0 0 0 0 rgba(122, 20, 95, 0.28);
  }
  50% {
    box-shadow: 0 0.4rem 0.85rem rgba(122, 20, 95, 0.24), 0 0 0 0.5rem rgba(122, 20, 95, 0);
  }
}
.about-overlay {
  position: fixed;
  z-index: 9100;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(40, 29, 22, 0.36);
  backdrop-filter: blur(10px) saturate(1.04);
  -webkit-backdrop-filter: blur(10px) saturate(1.04);
}
.about-overlay.active {
  display: flex;
}
.about-panel {
  width: min(calc(100vw - 2rem), 1480px);
  max-height: calc(100dvh - 2rem);
  overflow-y: auto;
  padding: clamp(1.15rem, 2vw, 2rem);
}
.dialog-close-button {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  width: 2rem;
  height: 2rem;
  float: none;
  color: var(--warm-brown);
  background: rgba(132, 83, 47, 0.08);
  border: 0;
  border-radius: 50%;
  font-weight: var(--font-weight-action);
  cursor: pointer;
}
.dialog-close-button:hover {
  background: rgba(122, 20, 95, 0.12);
  color: var(--wine-accent);
}
.help-close-button {
  top: 1.15rem;
  right: 1.15rem;
  box-shadow: 0 0.45rem 1rem rgba(0, 0, 0, 0.24);
}
.about-kicker {
  color: var(--warm-brown);
  font-size: var(--font-size-small);
  font-weight: var(--font-weight-subtitle);
  letter-spacing: 0.08em;
  line-height: 1.4;
  margin: 0 0 1.2rem;
  text-transform: uppercase;
}
.about-panel h2 {
  color: #2f2d28;
  font-size: var(--font-size-title);
  font-weight: var(--font-weight-title);
  line-height: 1.05;
  margin: 0 2rem 1.55rem 0;
}
.about-columns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.about-columns article {
  border-left: 3px solid rgba(132, 83, 47, 0.34);
  padding-left: 0.85rem;
}
.about-columns h3 {
  color: var(--warm-brown-dark);
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-subtitle);
  line-height: 1.25;
  margin: 0 0 0.55rem;
}
.about-columns p {
  color: var(--warm-brown-text);
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-body);
  line-height: 1.48;
  margin: 0;
}
.about-panel .about-columns {
  display: none;
}
.about-intro {
  max-width: 58rem;
  color: var(--warm-brown-text);
  font-size: var(--font-size-body);
  line-height: 1.52;
  margin: -0.25rem auto 1.45rem;
  text-align: center;
}
.about-content-layout {
  display: grid;
  grid-template-columns: 1fr;
  align-items: start;
  gap: clamp(1.25rem, 2.4vw, 2rem);
  width: 100%;
  margin-top: 0;
}
.about-team-grid {
  --team-card-radius: 8px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17.5rem), 1fr));
  align-items: stretch;
  justify-content: center;
  width: 100%;
  gap: clamp(0.9rem, 1.7vw, 1.35rem);
  margin-top: 0;
  overflow: visible;
  padding: 0;
}
.about-story {
  width: 100%;
  margin: 0;
  padding: 0 0 clamp(1rem, 2vw, 1.35rem);
  border-bottom: 1px solid rgba(132, 83, 47, 0.18);
}
.about-story-kicker {
  color: var(--warm-brown);
  font-size: var(--font-size-small);
  font-weight: var(--font-weight-subtitle);
  letter-spacing: 0.08em;
  line-height: 1.4;
  margin: 0 0 0.35rem;
  text-align: left;
  text-transform: uppercase;
}
.about-story h3 {
  max-width: 54rem;
  color: #2f2d28;
  font-family: var(--font-family-brand);
  font-size: clamp(1.38rem, 2vw, 1.85rem);
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.08;
  margin: 0 0 0.9rem;
  text-align: left;
}
.about-story p {
  max-width: 72rem;
  color: #4f4940;
  font-size: var(--font-size-body);
  line-height: 1.62;
  margin: 0;
}
.about-story p + p {
  margin-top: 0.78rem;
}
.about-story-highlights {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
  margin-top: 1rem;
}
.about-story-highlights span {
  display: block;
  color: #4f4940;
  background: rgba(255, 252, 246, 0.58);
  border: 1px solid rgba(132, 83, 47, 0.16);
  border-radius: 8px;
  font-size: var(--font-size-small);
  line-height: 1.42;
  padding: 0.68rem 0.75rem;
}
.about-story-highlights strong {
  display: block;
  color: #34322d;
  font-weight: var(--font-weight-subtitle);
  line-height: 1.25;
  margin-bottom: 0.16rem;
}
.team-card {
  position: relative;
  box-sizing: border-box;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  align-content: stretch;
  justify-items: center;
  gap: 0.9rem;
  width: 100%;
  min-height: 31rem;
  min-width: 0;
  color: var(--warm-brown-text);
  background:
    radial-gradient(circle at 14% 10%, rgba(116, 73, 42, 0.08), transparent 5.8rem),
    repeating-linear-gradient(135deg, rgba(116, 73, 42, 0.025) 0 1px, transparent 1px 14px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(255, 250, 243, 0.88)),
    rgba(255, 250, 243, 0.9);
  border: 1px solid rgba(116, 73, 42, 0.24);
  border-radius: var(--team-card-radius);
  box-shadow:
    0 0.9rem 1.65rem rgba(58, 38, 27, 0.18),
    0 0.22rem 0.52rem rgba(58, 38, 27, 0.1),
    0 1px 0 rgba(255, 255, 255, 0.72) inset;
  isolation: isolate;
  overflow: hidden;
  padding: 1.3rem 1.18rem 1.16rem;
  text-align: center;
  transition: border-color 220ms ease, box-shadow 220ms ease, transform 220ms ease;
}
.team-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(116, 73, 42, 0.62), rgba(122, 20, 95, 0.34), rgba(116, 73, 42, 0.28)) top / 100% 4px no-repeat,
    linear-gradient(180deg, rgba(255, 255, 255, 0.24), transparent 5.5rem);
}
.team-card::after {
  position: absolute;
  top: 0.58rem;
  right: 0.58rem;
  display: grid;
  place-items: center;
  width: 1.8rem;
  height: 1.8rem;
  color: #7d1d50;
  background: rgba(255, 252, 246, 0.84);
  border: 1px solid rgba(116, 73, 42, 0.2);
  border-radius: 50%;
  box-shadow: 0 0.35rem 0.8rem rgba(58, 38, 27, 0.1);
  content: attr(data-team-icon);
  font-size: 0.58rem;
  font-weight: var(--font-weight-action);
  line-height: 1;
  text-transform: uppercase;
}
.team-card[data-team-icon="code"]::after {
  content: "</>";
  font-size: 0.62rem;
}
.team-card[data-team-icon="building"]::after {
  content: "3D";
}
.team-card[data-team-icon="archive"]::after {
  content: "IH";
}
.team-card[data-team-icon="landmark"]::after {
  content: "GC";
}
.team-card:hover {
  border-color: rgba(116, 73, 42, 0.38);
  box-shadow:
    0 1.05rem 1.9rem rgba(58, 38, 27, 0.22),
    0 0.28rem 0.62rem rgba(58, 38, 27, 0.12),
    0 1px 0 rgba(255, 255, 255, 0.76) inset;
  transform: translateY(-4px);
}
.team-card-pending {
  border-style: dashed;
  opacity: 0.78;
}
.team-member-project-lead {
  order: 1;
}
.team-member-institutional {
  order: 8;
}
.team-member-historian-one {
  order: 6;
}
.team-member-historian-two {
  order: 7;
}
.team-member-stefano {
  order: 2;
}
.team-member-jose {
  order: 3;
}
.team-member-lucas {
  order: 4;
}
.team-member-architect-pending {
  order: 5;
}
.team-photo-slot {
  position: relative;
  display: grid;
  place-items: center;
  width: clamp(4.9rem, 7vw, 6.35rem);
  height: clamp(4.9rem, 7vw, 6.35rem);
  overflow: visible;
  background:
    radial-gradient(circle at 50% 38%, rgba(255, 252, 246, 0.98), rgba(255, 249, 239, 0.62)),
    linear-gradient(135deg, rgba(122, 20, 95, 0.08), rgba(116, 73, 42, 0.14));
  border: 1px solid rgba(116, 73, 42, 0.32);
  border-radius: 50%;
  box-shadow:
    0 0.5rem 1.1rem rgba(58, 38, 27, 0.14),
    0 0 0 0.25rem rgba(255, 249, 239, 0.54),
    inset 0 1px 0 rgba(255, 255, 255, 0.52);
}
.team-photo-slot::after {
  content: "";
  position: absolute;
  inset: -0.42rem;
  z-index: -1;
  background:
    conic-gradient(from 180deg, rgba(116, 73, 42, 0.14), rgba(122, 20, 95, 0.14), rgba(116, 73, 42, 0.14));
  border-radius: 50%;
  opacity: 0.68;
}
.team-photo-slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}
.team-card-header {
  display: grid;
  gap: 0.48rem;
  width: 100%;
  min-width: 0;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid rgba(116, 73, 42, 0.16);
}
.team-avatar {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: var(--wine-accent);
  background: transparent;
  border: 0;
  border-radius: 50%;
  box-shadow: none;
  font-size: clamp(1rem, 1.7vw, 1.25rem);
  font-weight: var(--font-weight-title);
  line-height: 1;
}
.team-card h3,
.team-card h4,
.team-card p,
.team-card ul,
.team-card blockquote {
  margin: 0;
}
.team-card h3 {
  overflow-wrap: anywhere;
  color: #2f2d28;
  font-family: var(--font-family-brand);
  font-size: 1.12rem;
  font-weight: var(--font-weight-title);
  letter-spacing: 0;
  line-height: 1.12;
  margin-top: 0.08rem;
}
.team-role {
  display: block;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  color: #7d1d50;
  background:
    linear-gradient(90deg, rgba(122, 20, 95, 0.085), rgba(116, 73, 42, 0.07));
  border: 1px solid rgba(122, 20, 95, 0.11);
  border-radius: 6px;
  font-size: 0.68rem;
  font-weight: var(--font-weight-subtitle);
  letter-spacing: 0.015em;
  line-height: 1.24;
  padding: 0.36rem 0.5rem;
}
.team-role::after {
  content: none;
}
.team-subtitle {
  display: -webkit-box;
  overflow: hidden;
  color: #5e6658;
  font-size: 0.68rem;
  line-height: 1.3;
  margin-top: 0.04rem;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.team-card p,
.team-profile-body li {
  font-size: var(--font-size-small);
  line-height: 1.42;
}
.team-card > p,
.team-summary-list > p {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 0.62rem;
  overflow: hidden;
  text-align: left;
}
.team-card > p:nth-of-type(n + 2) {
  display: none;
}
.team-card strong {
  display: block;
  color: #34322d;
  font-weight: var(--font-weight-subtitle);
  line-height: 1.28;
}
.team-summary-list {
  display: grid;
  gap: 0.7rem;
  width: 100%;
  min-height: 12rem;
  align-content: start;
}
.team-summary-list p {
  box-sizing: border-box;
  min-height: 3.15rem;
  padding: 0.68rem 0.72rem;
  background: rgba(255, 252, 246, 0.62);
  border: 1px solid rgba(116, 73, 42, 0.14);
  border-radius: var(--team-card-radius);
  box-shadow: 0 0.18rem 0.48rem rgba(58, 38, 27, 0.045);
  transition: border-color 220ms ease, box-shadow 220ms ease, transform 220ms ease;
}
.team-summary-list p:hover {
  border-color: rgba(116, 73, 42, 0.24);
  box-shadow: 0 0.34rem 0.72rem rgba(58, 38, 27, 0.075);
  transform: translateY(-2px);
}
.team-summary-list p span:last-child {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}
.team-card > p strong {
  display: none;
}
.team-summary-icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 1.65rem;
  height: 1.65rem;
  color: #74492a;
  background: rgba(116, 73, 42, 0.08);
  border: 1px solid rgba(116, 73, 42, 0.18);
  border-radius: 50%;
  flex: 0 0 auto;
}
.team-summary-icon::after {
  content: "";
  position: absolute;
  right: -0.34rem;
  width: 1px;
  height: 1.75rem;
  background: rgba(116, 73, 42, 0.16);
}
.team-summary-icon svg {
  width: 0.96rem;
  height: 0.96rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}
.team-profile {
  align-self: end;
  width: 100%;
  min-width: 0;
}
.team-profile summary {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 2.05rem;
  color: var(--paper);
  background: linear-gradient(135deg, rgba(112, 18, 86, 0.94), rgba(116, 73, 42, 0.94));
  border: 1px solid rgba(116, 73, 42, 0.3);
  border-radius: var(--team-card-radius);
  cursor: pointer;
  font-size: var(--font-size-small);
  font-weight: var(--font-weight-action);
  line-height: 1;
  list-style: none;
  box-shadow: 0 0.44rem 0.82rem rgba(74, 12, 58, 0.16);
  padding: 0.5rem 0.65rem;
  transition: box-shadow 220ms ease, filter 220ms ease, transform 220ms ease;
}
.team-profile summary::-webkit-details-marker {
  display: none;
}
.team-profile summary::after {
  content: ">";
  margin-left: 0.55rem;
  transform: rotate(90deg);
  transition: transform 220ms ease;
}
.team-profile[open] summary::after {
  content: ">";
  transform: rotate(-90deg);
}
.team-profile summary:hover {
  color: #fff;
  background: var(--button-background-hover);
  box-shadow: 0 0.58rem 1rem rgba(74, 12, 58, 0.22);
  filter: brightness(1.04);
  transform: translateY(-2px);
}
.team-profile-body {
  display: grid;
  gap: 0.55rem;
  max-height: 18rem;
  overflow-y: auto;
  margin-top: 0.55rem;
}
.team-profile-body h4 {
  color: var(--warm-brown-dark);
  font-size: var(--font-size-small);
  font-weight: var(--font-weight-subtitle);
  line-height: 1.25;
}
.team-profile-body ul {
  display: grid;
  gap: 0.28rem;
  padding-left: 1.05rem;
}
.team-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.32rem;
}
.team-tags span {
  color: #74492a;
  background: rgba(255, 252, 246, 0.42);
  border: 1px solid rgba(116, 73, 42, 0.32);
  border-radius: 999px;
  font-size: var(--font-size-small);
  line-height: 1;
  padding: 0.34rem 0.48rem;
}
.team-profile blockquote {
  color: #34322d;
  background: rgba(255, 252, 246, 0.62);
  border: 1px solid rgba(116, 73, 42, 0.22);
  border-left: 3px solid #74492a;
  border-radius: 7px;
  font-family: var(--font-family-brand);
  font-size: var(--font-size-small);
  font-style: italic;
  line-height: 1.35;
  padding: 0.55rem 0.65rem;
}
.team-profile-overlay {
  position: fixed;
  z-index: 9300;
  inset: 0;
  display: none;
  place-items: center;
  padding: 1rem;
  overflow-y: auto;
  background: rgba(40, 29, 22, 0.48);
  backdrop-filter: blur(12px) saturate(1.05);
  -webkit-backdrop-filter: blur(12px) saturate(1.05);
}
.team-profile-overlay.active {
  display: grid;
}
.team-profile-frame {
  position: relative;
  display: grid;
  grid-template-rows: auto auto auto;
  gap: 1.05rem;
  width: min(92vw, 880px);
  max-height: none;
  overflow: visible;
  color: #34322d;
  background:
    radial-gradient(circle at 9% 7%, rgba(116, 73, 42, 0.08), transparent 10rem),
    linear-gradient(145deg, rgba(255, 255, 255, 0.28), rgba(255, 250, 243, 0.1)),
    rgba(255, 249, 239, 0.88);
  border: 1px solid rgba(255, 252, 246, 0.38);
  border-radius: var(--panel-radius);
  box-shadow:
    0 1.4rem 3.4rem rgba(58, 38, 27, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.42);
  padding: clamp(1rem, 2.5vw, 1.55rem);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}
.team-profile-close-button {
  top: 1rem;
  right: 1rem;
  z-index: 1;
}
.team-profile-modal-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 1rem;
  min-width: 0;
  color: var(--paper);
  background: linear-gradient(135deg, rgba(112, 18, 86, 0.94), rgba(116, 73, 42, 0.94));
  border: 1px solid rgba(116, 73, 42, 0.3);
  border-radius: 8px;
  box-shadow: 0 0.75rem 1.45rem rgba(74, 12, 58, 0.18);
  padding: 0.85rem 3rem 0.85rem 0.9rem;
}
.team-profile-modal-photo {
  width: clamp(7rem, 13vw, 10rem);
  height: clamp(7rem, 13vw, 10rem);
}
.team-profile-modal-photo::after {
  font-size: var(--font-size-small);
}
.team-profile-modal-heading {
  min-width: 0;
}
.team-profile-modal-heading h3 {
  overflow-wrap: anywhere;
  color: var(--paper);
  font-family: var(--font-family-brand);
  font-size: clamp(1.7rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.02;
  margin: 0.2rem 0 0;
}
.team-profile-modal-heading .team-role {
  color: var(--paper);
  background: rgba(255, 249, 239, 0.14);
  border: 1px solid rgba(255, 249, 239, 0.24);
}
.team-profile-modal-heading .team-role::after {
  content: none;
}
.team-profile-modal-intro {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  padding: 0.8rem;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.36), rgba(255, 250, 243, 0.46)),
    rgba(255, 250, 243, 0.5);
  border: 1px solid rgba(116, 73, 42, 0.18);
  border-radius: 8px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.42);
}
.team-profile-modal-intro p {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 0.58rem;
  padding: 0.62rem;
  background: rgba(255, 252, 246, 0.62);
  border: 1px solid rgba(116, 73, 42, 0.14);
  border-radius: 7px;
  box-shadow: 0 0.2rem 0.55rem rgba(58, 38, 27, 0.05);
}
.team-profile-modal-intro p,
.team-profile-modal-body p,
.team-profile-modal-body li {
  color: #4f4940;
  font-size: var(--font-size-body);
  line-height: 1.48;
  margin: 0;
}
.team-profile-modal-intro strong {
  display: block;
  color: #34322d;
  font-weight: var(--font-weight-subtitle);
  line-height: 1.25;
  margin-bottom: 0.18rem;
}
.team-profile-modal-intro .team-summary-icon {
  width: 1.9rem;
  height: 1.9rem;
}
.team-profile-modal-body {
  display: grid;
  gap: 0.95rem;
  max-height: none;
  min-height: 0;
  overflow: visible;
  margin-top: 0;
  padding-right: 0;
}
.team-profile-modal-body h4 {
  display: flex;
  align-items: center;
  gap: 0.48rem;
  color: #6f1857;
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-subtitle);
  line-height: 1.25;
  margin: 0;
}
.team-profile-modal-body h4::before {
  content: "";
  width: 0.52rem;
  height: 0.52rem;
  background: linear-gradient(135deg, rgba(112, 18, 86, 0.88), rgba(116, 73, 42, 0.88));
  border-radius: 50%;
  box-shadow: 0 0 0 0.18rem rgba(116, 73, 42, 0.08);
}
.team-profile-modal-body ul {
  display: grid;
  gap: 0.42rem;
  margin: 0;
  padding-left: 0;
  list-style: none;
}
.team-profile-modal-body li {
  position: relative;
  padding-left: 1.25rem;
}
.team-profile-modal-body li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.52em;
  width: 0.42rem;
  height: 0.42rem;
  background: rgba(116, 73, 42, 0.72);
  border-radius: 50%;
}
.team-profile-modal-body .team-tags {
  margin-top: -0.2rem;
}
.team-profile-modal-body blockquote {
  color: #34322d;
  background: rgba(255, 252, 246, 0.62);
  border: 1px solid rgba(116, 73, 42, 0.22);
  border-left: 3px solid #74492a;
  border-radius: 7px;
  font-family: var(--font-family-brand);
  font-size: 1rem;
  font-style: italic;
  line-height: 1.42;
  margin: 0;
  padding: 0.7rem 0.85rem;
  box-shadow: 0 0.28rem 0.75rem rgba(58, 38, 27, 0.06);
}
@media (max-width: 1280px) {
  .about-team-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 16.75rem), 1fr));
  }
}
@media (max-width: 1047px) {
  .about-team-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
/* Base text */
a {
  font-family: var(--font-family-ui);
  cursor: pointer;
}

h1,
h2 {
  font-family: var(--font-family-ui);
  font-weight: var(--font-weight-title);
}

h3 {
  font-family: var(--font-family-ui);
  font-weight: var(--font-weight-subtitle);
}

p,
li,
label {
  font-family: var(--font-family-ui);
  font-weight: var(--font-weight-body);
}

/* Info panel */
.info-panel {
  --info-panel-padding: 1.25rem;
  padding: var(--info-panel-padding) var(--info-panel-padding) var(--info-panel-padding) calc(var(--info-panel-padding) * 1.35);
  width: min(86vw, 380px);
  position: fixed;
  z-index: 950;
  top: var(--site-header-height);
  bottom: var(--site-footer-height);
  left: 0;
  box-sizing: border-box;
  border-radius: 0 12px 12px 0;
  border-left: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-x: none;
  overscroll-behavior-y: contain;
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  opacity: 0;
  transform: translateX(-105%);
  transition:
    transform 240ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 180ms ease,
    width 240ms cubic-bezier(0.22, 1, 0.36, 1),
    padding 240ms cubic-bezier(0.22, 1, 0.36, 1),
    border-radius 240ms ease;
}
.info-panel.active {
  opacity: 1;
  transform: translateX(0);
}

@media (min-width: 721px) {
  body > .info-panel:not(.marker-editor-preview-panel) {
    bottom: 0;
    max-height: none;
    border-radius: 0 12px 0 0;
    padding-bottom: calc(
      var(--info-panel-padding)
      + max(var(--site-footer-height), 2.5rem)
      + env(safe-area-inset-bottom)
    );
    scroll-padding-bottom: calc(
      var(--info-panel-padding)
      + max(var(--site-footer-height), 2.5rem)
      + env(safe-area-inset-bottom)
    );
  }

  body.info-panel-open .footer {
    box-shadow: inset 0 1px 0 rgba(255, 231, 205, 0.12);
  }
}

.info-panel.is-dragging {
  transition: none;
}
.info-panel.is-collapsed.active {
  opacity: 1;
  overflow: visible;
  transform: translateX(-100%);
}
.info-panel.is-collapsed .info-panel-close,
.info-panel.is-collapsed .info-panel-content,
.info-panel.is-collapsed .info-panel-mobile-summary {
  visibility: hidden;
  pointer-events: none;
}
.info-panel h2 {
  color: var(--warm-brown-dark);
  font-size: var(--font-size-title);
  font-weight: var(--font-weight-title);
  line-height: 1.08;
  margin: 0 2.25rem 0.85rem 0;
}
.info-panel-close {
  z-index: 6;
  top: var(--info-panel-padding);
  right: var(--info-panel-padding);
  box-shadow: 0 0.45rem 1rem rgba(0, 0, 0, 0.24);
  pointer-events: auto;
  touch-action: manipulation;
}

.info-panel .info-panel-close-compact {
  display: none;
}
.info-panel-toggle {
  position: absolute;
  z-index: 3;
  top: 50%;
  right: -2.9rem;
  display: inline-grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  align-items: center;
  justify-items: center;
  gap: 0.45rem;
  width: 3.2rem;
  min-height: 12rem;
  color: #fff;
  background: linear-gradient(160deg, var(--wine-accent), #b35a42);
  border: 1px solid rgba(255, 249, 239, 0.35);
  border-radius: 0 13px 13px 0;
  box-shadow:
    0 0.75rem 1.6rem rgba(74, 12, 58, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  font-size: var(--font-size-small);
  font-weight: var(--font-weight-action);
  line-height: 1;
  padding: 0.7rem 0.45rem;
  cursor: grab;
  touch-action: none;
  transform: translateY(-50%);
  transition: filter 160ms ease, box-shadow 160ms ease, transform 220ms ease;
}
.info-panel.is-dragging .info-panel-toggle {
  cursor: grabbing;
}
.info-panel-toggle:hover,
.info-panel:not(.is-collapsed) .info-panel-toggle {
  filter: brightness(1.05);
  box-shadow:
    0 0.85rem 1.85rem rgba(74, 12, 58, 0.34),
    0 0 0 0.2rem var(--wine-accent-soft),
    inset 0 1px 0 rgba(255, 255, 255, 0.24);
}
.info-panel-toggle-icon {
  display: grid;
  place-items: center;
  width: 1.55rem;
  height: 1.55rem;
  color: var(--wine-accent);
  background: var(--paper);
  border-radius: 50%;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1rem;
  font-style: italic;
  line-height: 1;
}
.info-panel-toggle-text {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: rotate(180deg);
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.info-panel-toggle-arrow {
  font-size: 1.15rem;
  line-height: 1;
}
.info-panel-mobile-summary {
  display: none;
}
.info-panel-content {
  min-width: 0;
}
.info-panel p,
.info-panel li {
  max-width: 100%;
  overflow-wrap: anywhere;
  color: var(--warm-brown-text);
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-body);
  line-height: 1.48;
}
.info-panel div,
.info-panel ul,
.info-panel ol {
  max-width: 100%;
}
.info-panel::-webkit-scrollbar {
  width: 6px;
}
.info-panel::-webkit-scrollbar-thumb {
  background-color: transparent;
}
.info-panel img {
  display: block;
  width: 100%;
  border-radius: 8px;
  box-shadow: 0 0.85rem 1.8rem rgba(58, 38, 27, 0.16);
  margin: 1em 0 0;
  cursor: zoom-in;
}
.image-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(4.8rem, 1fr));
  gap: 0.5rem;
  margin-top: 1rem;
}
.image-gallery img {
  width: 100%;
  aspect-ratio: 4 / 3;
  height: auto;
  margin: 0;
  object-fit: cover;
  border-radius: 7px;
  box-shadow: 0 0.4rem 0.9rem rgba(58, 38, 27, 0.14);
  cursor: zoom-in;
  transition: transform 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
}
.image-gallery img:hover {
  opacity: 0.92;
  transform: translateY(-1px);
  box-shadow: 0 0.55rem 1.05rem rgba(58, 38, 27, 0.2);
}
.info-panel > :last-child,
.info-panel > div > :last-child {
  margin-bottom: 0;
}
.marker-editor-preview-panel {
  left: auto;
  right: calc(min(92vw, 32rem) + 1.5rem);
  width: min(30vw, 360px);
  overflow-y: auto;
  scrollbar-color: var(--wine-accent) var(--wine-accent-soft);
  z-index: 1195;
  border-right: 0;
  border-left: 1px solid var(--glass-border);
  border-radius: 12px 0 0 12px;
  opacity: 0;
  transform: translateX(1rem);
  pointer-events: auto;
  overscroll-behavior: contain;
}
.marker-editor-preview-panel[hidden] {
  display: none;
}
.marker-editor-preview-panel.active {
  opacity: 1;
  transform: translateX(0);
}
.marker-editor-preview-panel::-webkit-scrollbar {
  width: 8px;
}
.marker-editor-preview-panel::-webkit-scrollbar-track {
  background: var(--wine-accent-soft);
  border-radius: 999px;
}
.marker-editor-preview-panel::-webkit-scrollbar-thumb {
  background: var(--wine-accent);
  border-radius: 999px;
}
.marker-editor-preview-panel.is-saved {
  animation: marker-editor-preview-saved 520ms ease;
}
.marker-editor-preview-kicker {
  color: var(--wine-accent);
  font-size: var(--font-size-subtitle);
  font-weight: var(--font-weight-subtitle);
  letter-spacing: 0.08em;
  line-height: 1.2;
  margin: 0 0 0.42rem;
  text-transform: uppercase;
}
.marker-editor-preview-panel h2.is-empty,
.marker-editor-preview-body.is-empty {
  color: var(--warm-brown-muted);
  font-style: italic;
}
.marker-editor-preview-body {
  display: grid;
  gap: 0.65rem;
}
.marker-editor-preview-body p,
.marker-editor-preview-body ul {
  margin: 0;
}
.marker-editor-preview-gallery {
  margin-top: 0.9rem;
}
@keyframes marker-editor-preview-saved {
  0% {
    opacity: 1;
    transform: translateX(0);
  }
  48% {
    opacity: 0.78;
    transform: translateX(1.25rem);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Image viewer */
.image-viewer-overlay {
  position: fixed;
  z-index: 9600;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(0.75rem, 2vw, 1.25rem);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.2), rgba(255, 244, 228, 0.06)),
    rgba(255, 249, 239, 0.34);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}
.image-viewer-frame {
  position: relative;
  box-sizing: border-box;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  row-gap: 0.65rem;
  align-items: center;
  justify-content: center;
  justify-items: center;
  width: 100%;
  height: 100%;
  padding: 3rem clamp(3.5rem, 7vw, 5.6rem) 0.75rem;
  color: var(--warm-brown-dark);
  background: transparent;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.image-viewer-stage {
  position: relative;
  grid-row: 1;
  display: grid;
  place-items: center;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  padding: 0;
  overscroll-behavior: contain;
  touch-action: none;
  cursor: zoom-in;
}
.image-viewer-stage.is-zoomed {
  overflow: hidden;
  cursor: grab;
}
.image-viewer-stage img {
  box-sizing: border-box;
  display: block;
  width: auto;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  border-radius: 6px;
  box-shadow: none;
  filter: drop-shadow(0 1.15rem 2.8rem rgba(58, 38, 27, 0.28));
  object-fit: contain;
  object-position: center;
  opacity: 1;
  transform: none;
  transform-origin: center center;
  transition: opacity 180ms ease, transform 120ms ease-out;
  will-change: transform;
  cursor: zoom-in;
}
.image-viewer-stage img.is-landscape {
  width: auto;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
}

.image-viewer-stage img.is-width-limited {
  width: 100%;
  height: auto;
}
.image-viewer-stage img.is-zoomed {
  max-width: 100%;
  max-height: 100%;
  cursor: inherit;
}
.image-viewer-stage img.is-changing {
  opacity: 0;
}
.image-viewer-close {
  top: 1rem;
  right: 1rem;
  box-shadow: 0 0.45rem 1rem rgba(58, 38, 27, 0.2);
}
.image-viewer-controls {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: 4.65rem;
  display: flex;
  align-items: center;
  gap: 0;
  overflow: hidden;
  color: var(--warm-brown-dark);
  background: var(--paper-strong);
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  box-shadow: 0 0.45rem 1.15rem rgba(58, 38, 27, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.24);
  margin: 0;
  transform: translateX(-50%);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.image-viewer-nav {
  position: fixed;
  top: 50%;
  display: grid;
  place-items: center;
  width: 3.1rem;
  height: 4.5rem;
  float: none;
  color: var(--warm-brown-dark);
  background: var(--paper-strong);
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  box-shadow: 0 0.45rem 1.15rem rgba(58, 38, 27, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.24);
  cursor: pointer;
  font-size: 1.5rem;
  font-weight: var(--font-weight-action);
  transform: translateY(-50%);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.image-viewer-prev {
  left: clamp(0.75rem, 2vw, 1.4rem);
}
.image-viewer-next {
  right: clamp(0.75rem, 2vw, 1.4rem);
}
.image-viewer-counter {
  min-width: 4.4rem;
  color: inherit;
  background: transparent;
  border: 0;
  font-size: var(--font-size-small);
  font-weight: var(--font-weight-subtitle);
  line-height: 1;
  margin: 0;
  padding: 0.7rem 0.85rem;
  text-align: center;
}
.image-viewer-thumbnails {
  position: relative;
  z-index: 2;
  grid-row: 2;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  max-width: min(100%, 980px);
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0.35rem 0 0.1rem;
  scrollbar-width: none;
}
.image-viewer-thumbnails::-webkit-scrollbar {
  display: none;
}
.image-viewer-thumbnail {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 4.55rem;
  height: 3.25rem;
  float: none;
  padding: 0;
  background: var(--paper-soft);
  border: 2px solid transparent;
  border-radius: 6px;
  box-shadow: 0 0.45rem 1rem rgba(58, 38, 27, 0.2);
  opacity: 0.68;
  overflow: hidden;
  transition: border-color 160ms ease, opacity 160ms ease, transform 160ms ease;
}
.image-viewer-thumbnail.active {
  border-color: var(--wine-accent);
  opacity: 1;
  transform: translateY(-1px);
}
.image-viewer-thumbnail img {
  display: block;
  width: 100%;
  height: 100%;
  margin: auto;
  object-fit: cover;
}
/* Marker title */
.marker-title {
  position: absolute;
  bottom: 15em;
  left: 10px;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  padding: 5px;
  border-radius: 5px;
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-subtitle);
  z-index: 1;
}
.camera-view-editor-panel,
.collision-editor-panel,
.tree-editor-panel,
.marker-editor-panel {
  position: fixed;
  z-index: 1200;
  display: grid;
  box-sizing: border-box;
  font-size: var(--font-size-body);
  line-height: 1.35;
  pointer-events: auto;
  user-select: text;
}
.camera-view-editor-panel h2,
.collision-editor-panel h2,
.tree-editor-panel h2,
.marker-editor-panel h2 {
  color: var(--wine-accent);
  font-size: var(--font-size-title);
  font-weight: var(--font-weight-title);
  line-height: 1.12;
  margin: 0 2.2rem 0 0;
}
.camera-view-editor-panel[hidden],
.collision-editor-panel[hidden],
.tree-editor-panel[hidden],
.marker-editor-panel[hidden] {
  display: none;
}
.camera-view-editor-actions button,
.camera-view-editor-finder button,
.marker-editor-actions button {
  min-height: 1.8rem;
  font-size: var(--font-size-small);
  font-weight: var(--font-weight-action);
  line-height: 1;
  padding: 0.5rem 0.7rem;
}
.camera-view-editor-actions,
.camera-view-editor-finder,
.collision-editor-actions,
.marker-editor-actions {
  display: grid;
  gap: 0.4rem;
}
.collision-editor-details,
.marker-editor-workflow {
  color: var(--warm-brown-text);
  border-radius: 6px;
  font-size: var(--font-size-small);
  line-height: 1.35;
  padding: 0.48rem 0.55rem;
}
.camera-view-editor-panel {
  left: 0.75rem;
  bottom: calc(var(--site-footer-height) + 0.75rem);
  gap: 0.65rem;
  width: min(92vw, 25rem);
  padding: clamp(1.25rem, 3.4vw, 1.8rem);
}
.camera-view-editor-header {
  min-height: 2rem;
}
.camera-view-editor-panel p {
  color: var(--warm-brown-text);
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-body);
  line-height: 1.46;
  margin: 0;
}
.camera-view-editor-marker {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.camera-view-editor-current {
  display: grid;
  gap: 0.28rem;
  min-width: 0;
}
.camera-view-editor-section-title {
  color: var(--wine-accent);
  font-size: var(--font-size-small);
  font-weight: var(--font-weight-subtitle);
  letter-spacing: 0.08em;
  line-height: 1.4;
  text-transform: uppercase;
}
.camera-view-editor-current textarea,
.camera-view-editor-finder textarea {
  min-height: 4.5rem;
  resize: vertical;
  font-family: Consolas, "Courier New", monospace;
  line-height: 1.35;
  padding: 0.45rem 0.5rem;
}
.camera-view-editor-current textarea {
  resize: none;
}
.camera-view-editor-finder textarea::placeholder {
  color: var(--warm-brown-muted);
}
.camera-view-editor-actions button,
.camera-view-editor-finder button {
  border-radius: 5px;
  box-shadow: 0 0.45rem 1rem rgba(46, 29, 39, 0.22);
}
.camera-view-editor-actions button[data-save-state="saved"],
.camera-view-editor-actions button[data-save-state="saved"]:hover,
.collision-editor-actions-save button[data-save-state="saved"],
.collision-editor-actions-save button[data-save-state="saved"]:hover,
.marker-editor-actions button[data-save-state="saved"],
.marker-editor-actions button[data-save-state="saved"]:hover {
  color: #fff;
  background: linear-gradient(135deg, var(--warm-brown), var(--warm-brown-dark));
  border-color: rgba(132, 83, 47, 0.28);
}
.camera-view-editor-actions button[data-save-state="error"],
.camera-view-editor-actions button[data-save-state="error"]:hover,
.collision-editor-actions-save button[data-save-state="error"],
.collision-editor-actions-save button[data-save-state="error"]:hover,
.marker-editor-actions button[data-save-state="error"],
.marker-editor-actions button[data-save-state="error"]:hover {
  color: #fff;
  background: linear-gradient(135deg, var(--wine-accent), var(--wine-accent-strong));
}
.collision-editor-panel {
  left: 0.75rem;
  top: calc(var(--site-header-height) + 0.75rem);
  gap: 0.58rem;
  width: min(92vw, 27rem);
  max-height: calc(100vh - var(--site-header-height) - 1.5rem);
  padding: clamp(1rem, 2.8vw, 1.45rem);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.collision-editor-panel::-webkit-scrollbar {
  width: 0.45rem;
}
.collision-editor-panel::-webkit-scrollbar-track {
  background: var(--paper-soft);
  border-radius: 999px;
}
.collision-editor-panel::-webkit-scrollbar-thumb {
  background: var(--wine-accent);
  border-radius: 999px;
}
.collision-editor-header {
  min-height: 2rem;
}
.collision-editor-panel p {
  margin: 0;
}
.collision-editor-status {
  color: var(--warm-brown-dark);
  font-weight: var(--font-weight-subtitle);
}
.collision-editor-details {
  font-family: Consolas, "Courier New", monospace;
}
.collision-editor-select-field {
  display: grid;
  gap: 0.35rem;
  color: var(--warm-brown-dark);
  font-size: var(--font-size-small);
  font-weight: var(--font-weight-subtitle);
}
.collision-editor-select {
  width: 100%;
  min-height: 2.2rem;
  box-sizing: border-box;
  color: var(--warm-brown-dark);
  font-size: var(--font-size-small);
  padding: 0.42rem 0.5rem;
}
.collision-editor-actions {
  grid-template-columns: repeat(auto-fit, minmax(5.8rem, 1fr));
}
.collision-editor-actions button {
  min-height: 1.8rem;
  color: var(--wine-accent);
  background: var(--control-background);
  border: 1px solid var(--wine-accent-border);
  border-radius: 8px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.38);
  font-size: var(--font-size-small);
  font-weight: var(--font-weight-action);
  line-height: 1;
  padding: 0.5rem 0.7rem;
}
.collision-editor-actions button:disabled {
  cursor: default;
  opacity: 0.42;
}
.collision-editor-actions-navigation {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.collision-editor-actions-tools,
.collision-editor-actions-bulk {
  padding-top: 0.1rem;
}
.collision-editor-actions-bulk button:first-child {
  color: var(--warm-brown);
  border-color: rgba(132, 83, 47, 0.24);
}
.collision-editor-actions-bulk button:first-child:hover {
  color: #fff;
  background: linear-gradient(135deg, var(--warm-brown), var(--warm-brown-dark));
}
.collision-editor-actions-bulk button:last-child {
  color: var(--wine-accent);
}
.collision-editor-actions-bulk button:last-child:hover {
  color: #fff;
  background: var(--button-background);
}
.collision-editor-actions-save {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
}
.collision-editor-actions-save button:last-child {
  box-shadow: 0 0.45rem 1rem rgba(58, 38, 27, 0.2);
}
.collision-editor-slider {
  display: grid;
  gap: 0.35rem;
  color: var(--warm-brown-dark);
  border-radius: 8px;
  padding: 0.48rem 0.55rem;
}
.collision-editor-slider-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: var(--font-size-small);
  font-weight: var(--font-weight-subtitle);
  line-height: 1.2;
}
.collision-editor-slider-header span:last-child {
  color: var(--wine-accent);
  font-family: Consolas, "Courier New", monospace;
  font-weight: var(--font-weight-body);
}
.collision-editor-slider input {
  width: 100%;
  accent-color: var(--wine-accent);
}
.collision-editor-slider-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 4.9rem;
  align-items: center;
  gap: 0.55rem;
}
.collision-editor-slider-controls input[type="range"] {
  width: 100%;
}
.collision-editor-number {
  width: 100%;
  min-height: 1.7rem;
  box-sizing: border-box;
  color: var(--warm-brown-dark);
  font-family: Consolas, "Courier New", monospace;
  line-height: 1;
  padding: 0.25rem 0.35rem;
}
.tree-editor-panel {
  left: 0.75rem;
  top: calc(var(--site-header-height) + 0.75rem);
  gap: 0.62rem;
  width: min(92vw, 25rem);
  max-height: calc(100vh - var(--site-header-height) - 1.5rem);
  padding: clamp(1rem, 2.8vw, 1.4rem);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.tree-editor-panel [hidden] {
  display: none !important;
}
.tree-editor-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  min-height: 2rem;
}
.tree-editor-panel p {
  margin: 0;
}
.tree-editor-help {
  color: var(--warm-brown-text);
  font-size: var(--font-size-small);
  line-height: 1.42;
}
.tree-editor-status {
  color: var(--warm-brown-dark);
  background: var(--paper-soft);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  font-size: var(--font-size-small);
  font-weight: var(--font-weight-subtitle);
  line-height: 1.35;
  padding: 0.5rem 0.58rem;
}
.tree-editor-status[data-tone="success"] {
  color: #355d3c;
  border-color: rgba(53, 93, 60, 0.28);
}
.tree-editor-status[data-tone="error"] {
  color: var(--wine-accent);
  border-color: rgba(139, 30, 86, 0.3);
}
.tree-editor-step {
  display: grid;
  gap: 0.55rem;
  padding: 0.62rem;
  background: rgba(255, 252, 246, 0.58);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
}
.tree-editor-step-heading {
  display: grid;
  grid-template-columns: 1.75rem minmax(0, 1fr);
  align-items: start;
  gap: 0.55rem;
}
.tree-editor-step-number {
  display: grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  color: #fff;
  background: var(--wine-accent);
  border-radius: 50%;
  font-size: var(--font-size-small);
  font-weight: var(--font-weight-title);
}
.tree-editor-step.completed .tree-editor-step-number {
  background: #587255;
}
.tree-editor-step h3,
.tree-editor-saved-title {
  margin: 0;
  color: var(--warm-brown-dark);
  font-size: var(--font-size-subtitle);
  line-height: 1.2;
}
.tree-editor-step-heading p,
.tree-editor-draw-help,
.tree-editor-point-count {
  margin-top: 0.15rem;
  color: var(--warm-brown-text);
  font-size: var(--font-size-small);
  line-height: 1.35;
}
.tree-editor-step-body {
  display: grid;
  gap: 0.45rem;
}
.tree-editor-point-count {
  color: var(--wine-accent);
  font-weight: var(--font-weight-subtitle);
}
.tree-editor-saved-title {
  margin-top: 0.25rem;
}
.tree-editor-field {
  display: grid;
  gap: 0.38rem;
  color: var(--warm-brown-dark);
}
.tree-editor-field-title,
.tree-editor-density-header {
  font-size: var(--font-size-small);
  font-weight: var(--font-weight-subtitle);
}
.tree-editor-select,
.tree-editor-input {
  width: 100%;
  min-height: 2.2rem;
  box-sizing: border-box;
  color: var(--warm-brown-dark);
  background: var(--control-background);
  border: 1px solid var(--glass-border);
  border-radius: var(--control-radius);
  font-size: var(--font-size-small);
  padding: 0.42rem 0.52rem;
}
.tree-editor-size-options,
.tree-editor-actions {
  display: grid;
  gap: 0.4rem;
}
.tree-editor-size-options {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.tree-editor-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.tree-editor-drawing-actions {
  grid-template-columns: 1fr;
}
.tree-editor-storage-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding-top: 0.15rem;
}
.tree-editor-size-options button,
.tree-editor-actions button {
  min-height: 2.05rem;
  color: var(--wine-accent);
  background: var(--control-background);
  border: 1px solid var(--wine-accent-border);
  border-radius: 8px;
  font-size: var(--font-size-small);
  line-height: 1.1;
  padding: 0.5rem 0.55rem;
}
.tree-editor-size-options button.active,
.tree-editor-size-options button:hover,
.tree-editor-actions button:not(:disabled):hover {
  color: #fff;
  background: var(--button-background);
}
.tree-editor-size-options button:disabled,
.tree-editor-actions button:disabled {
  cursor: default;
  opacity: 0.42;
}
.tree-editor-actions .tree-editor-save-button {
  color: #fff;
  background: var(--button-background);
}
.tree-editor-primary-action {
  width: 100%;
  min-height: 2.35rem !important;
  color: #fff !important;
  background: var(--button-background) !important;
  border: 1px solid var(--wine-accent-border);
  border-radius: 8px;
  font-size: var(--font-size-small);
  font-weight: var(--font-weight-subtitle);
  line-height: 1.1;
  padding: 0.58rem 0.65rem;
}
.tree-editor-density-field {
  padding: 0.5rem 0.58rem;
  background: var(--paper-soft);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
}
.tree-editor-density-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.tree-editor-density-header strong {
  color: var(--wine-accent);
}
.tree-editor-density-field input {
  width: 100%;
  accent-color: var(--wine-accent);
}
body.tree-editor-drawing .map-viewport canvas {
  cursor: crosshair;
}
.editor-session-panel {
  position: fixed;
  z-index: 1320;
  top: calc(var(--site-header-height) + 0.75rem);
  right: 0.75rem;
  display: grid;
  gap: 0.62rem;
  width: min(92vw, 24rem);
  max-height: calc(100vh - var(--site-header-height) - var(--site-footer-height) - 1.5rem);
  overflow-y: auto;
  padding: 1rem;
}
.editor-session-panel[hidden] {
  display: none !important;
}
.editor-session-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 2rem;
}
.editor-session-header h2 {
  color: var(--warm-brown-dark);
  font-size: 1.05rem;
  line-height: 1.1;
  margin: 0;
}
.editor-session-status,
.editor-session-help,
.editor-session-feedback {
  color: var(--warm-brown-dark);
  font-size: var(--font-size-small);
  line-height: 1.35;
  margin: 0;
}
.editor-session-feedback,
.editor-session-help,
.editor-session-audit-entry {
  background: var(--paper-soft);
  border: 1px solid var(--glass-border);
  border-radius: 6px;
  padding: 0.5rem 0.58rem;
}
.editor-session-feedback[data-tone="success"] {
  color: var(--warm-brown);
  border-color: rgba(132, 83, 47, 0.28);
}
.editor-session-feedback[data-tone="error"] {
  color: var(--wine-accent);
  background: rgba(122, 20, 95, 0.08);
  border-color: var(--wine-accent-border);
}
.editor-session-form,
.editor-session-field,
.editor-session-audit {
  display: grid;
  gap: 0.5rem;
}
.editor-session-field span {
  color: var(--wine-accent);
  font-size: var(--font-size-small);
  font-weight: var(--font-weight-subtitle);
  line-height: 1.2;
}
.editor-session-field input {
  width: 100%;
  min-height: 2.1rem;
  color: var(--warm-brown-dark);
  background: var(--control-background);
  border: 1px solid var(--glass-border);
  border-radius: var(--control-radius);
  box-sizing: border-box;
  font-size: var(--font-size-subtitle);
  padding: 0.48rem 0.55rem;
}
.editor-session-form button,
.editor-session-actions button {
  min-height: 2.15rem;
  color: #fff;
  background: var(--button-background);
  border: 1px solid var(--wine-accent-border);
  border-radius: 8px;
  box-shadow: 0 0.45rem 1rem rgba(58, 38, 27, 0.18);
  font-size: var(--font-size-small);
  line-height: 1;
  padding: 0.55rem 0.7rem;
}
.editor-session-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.5rem;
}
.editor-session-actions button:last-child {
  color: var(--wine-accent);
  background: var(--paper-soft);
}
.editor-session-audit-entry {
  display: grid;
  gap: 0.2rem;
}
.editor-session-audit-entry strong,
.editor-session-audit-entry span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.editor-session-audit-entry strong {
  color: var(--warm-brown-dark);
  font-size: var(--font-size-small);
  line-height: 1.2;
}
.editor-session-audit-entry span {
  color: var(--warm-brown-text);
  font-size: var(--font-size-small);
  line-height: 1.25;
}
.sync-status {
  position: fixed;
  z-index: 1310;
  right: 0.75rem;
  bottom: calc(var(--site-footer-height) + 0.75rem);
  max-width: min(22rem, calc(100vw - 1.5rem));
  color: var(--warm-brown-dark);
  background: var(--paper-strong);
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  box-shadow: var(--glass-shadow);
  font-size: var(--font-size-small);
  font-weight: var(--font-weight-action);
  line-height: 1.2;
  padding: 0.58rem 0.75rem;
  pointer-events: none;
}
.sync-status[data-tone="success"] {
  color: var(--warm-brown);
}
.sync-status[data-tone="error"] {
  color: var(--wine-accent);
}
.editor-presence-panel {
  position: fixed;
  z-index: 1290;
  left: 0.75rem;
  bottom: calc(var(--site-footer-height) + 0.75rem);
  display: grid;
  gap: 0.5rem;
  width: min(92vw, 18rem);
  color: var(--warm-brown-dark);
  background: var(--paper-strong);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  box-shadow: var(--glass-shadow);
  padding: 0.72rem;
  pointer-events: auto;
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}
.editor-presence-panel[hidden] {
  display: none !important;
}
.editor-presence-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
}
.editor-presence-header strong {
  color: var(--wine-accent);
  font-size: var(--font-size-small);
  line-height: 1.15;
}
.editor-presence-header span,
.editor-presence-copy span {
  color: var(--warm-brown-text);
  font-size: var(--font-size-small);
  line-height: 1.25;
}
.editor-presence-list {
  display: grid;
  gap: 0.42rem;
}
.editor-presence-entry {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.48rem;
  min-width: 0;
  background: var(--paper-soft);
  border: 1px solid var(--glass-border);
  border-left: 3px solid var(--editor-color);
  border-radius: 7px;
  padding: 0.46rem 0.52rem;
}
.editor-presence-color {
  width: 0.72rem;
  height: 0.72rem;
  background: var(--editor-color);
  border: 2px solid rgba(255, 249, 239, 0.78);
  border-radius: 50%;
  box-shadow: 0 0.15rem 0.42rem rgba(58, 38, 27, 0.24);
}
.editor-presence-copy {
  display: grid;
  gap: 0.08rem;
  min-width: 0;
}
.editor-presence-copy strong,
.editor-presence-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.editor-presence-copy strong {
  color: var(--warm-brown-dark);
  font-size: var(--font-size-small);
  line-height: 1.2;
}
.marker-editor-panel {
  right: 0.75rem;
  bottom: calc(var(--site-footer-height) + 0.75rem);
  gap: 0.58rem;
  width: min(92vw, 32rem);
  max-height: calc(100vh - var(--site-header-height) - var(--site-footer-height) - 1.5rem);
  overflow-y: auto;
  padding: clamp(1rem, 2.8vw, 1.45rem);
}
.marker-editor-panel [hidden] {
  display: none !important;
}
.marker-editor-header {
  min-height: 2rem;
}
.marker-editor-panel p {
  color: var(--warm-brown-dark);
  font-size: var(--font-size-body);
  margin: 0;
}
.marker-editor-status {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.marker-editor-feedback {
  color: var(--warm-brown-dark);
  background: var(--paper-soft);
  border: 1px solid var(--glass-border);
  border-radius: 6px;
  font-size: var(--font-size-small);
  line-height: 1.35;
  padding: 0.48rem 0.55rem;
}
.marker-editor-feedback[data-tone="success"] {
  color: var(--warm-brown);
  background: rgba(255, 249, 239, 0.72);
  border-color: rgba(132, 83, 47, 0.28);
}
.marker-editor-feedback[data-tone="error"] {
  color: var(--wine-accent);
  background: rgba(122, 20, 95, 0.08);
  border-color: var(--wine-accent-border);
}
.marker-editor-section {
  display: grid;
  gap: 0.52rem;
  min-width: 0;
  border-radius: 9px;
  overflow: hidden;
}
.marker-editor-section-header {
  display: flex;
  align-items: center;
  min-height: 2rem;
  color: var(--wine-accent);
  cursor: pointer;
  font-size: var(--font-size-small);
  font-weight: var(--font-weight-subtitle);
  letter-spacing: 0;
  line-height: 1.2;
  padding: 0.58rem 0.68rem;
  user-select: none;
}
.marker-editor-section-header::marker {
  color: var(--wine-accent);
}
.marker-editor-section-body {
  display: grid;
  gap: 0.58rem;
  min-width: 0;
  padding: 0 0.68rem 0.68rem;
}
.marker-editor-coordinate-preview {
  overflow: hidden;
  color: var(--warm-brown-dark);
  font-family: Consolas, "Courier New", monospace;
  line-height: 1.35;
  margin: 0;
  padding: 0.42rem 0.52rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.marker-editor-content-preview {
  display: grid;
  gap: 0.42rem;
  min-height: 4.5rem;
  max-height: 13rem;
  overflow-y: auto;
  color: var(--warm-brown-dark);
  font-size: var(--font-size-subtitle);
  line-height: 1.42;
  padding: 0.58rem 0.64rem;
}
.marker-editor-content-preview h3 {
  color: var(--wine-accent);
  font-size: var(--font-size-body);
  line-height: 1.25;
  margin: 0.25rem 0 0;
}
.marker-editor-content-preview p,
.marker-editor-content-preview ul {
  margin: 0;
}
.marker-editor-content-preview ul {
  padding-left: 1.1rem;
}
.marker-editor-edit-list {
  display: grid;
  gap: 0.5rem;
  min-width: 0;
  color: var(--warm-brown-text);
  border-radius: 6px;
  font-size: var(--font-size-small);
  line-height: 1.35;
  padding: 0.5rem;
}
.marker-editor-edit-item {
  display: grid;
  gap: 0.42rem;
  min-width: 0;
  border-radius: 6px;
  padding: 0.45rem;
}
.marker-editor-edit-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
  min-width: 0;
}
.marker-editor-edit-item-header span {
  overflow: hidden;
  color: var(--wine-accent);
  font-weight: var(--font-weight-subtitle);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.marker-editor-edit-controls {
  display: flex;
  flex: 0 0 auto;
  gap: 0.25rem;
}
.marker-editor-edit-controls button {
  min-height: 1.55rem;
  color: var(--warm-brown-text);
  font-size: var(--font-size-subtitle);
  line-height: 1;
  padding: 0.35rem 0.42rem;
}
.marker-editor-edit-controls button:hover {
  background: var(--paper-strong);
}
.marker-editor-edit-controls button:disabled {
  cursor: default;
  opacity: 0.42;
}
.marker-editor-edit-item textarea,
.marker-editor-image-row input {
  width: 100%;
  font-family: var(--font-family-ui);
  line-height: 1.35;
  padding: 0.44rem 0.5rem;
}
.marker-editor-edit-item textarea {
  resize: vertical;
}
.marker-editor-image-row {
  display: grid;
  grid-template-columns: 3.2rem minmax(0, 1fr);
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
}
.marker-editor-image-row img {
  width: 3.2rem;
  height: 2.35rem;
  object-fit: cover;
  background: rgba(132, 83, 47, 0.08);
  border-radius: 5px;
}
.marker-editor-image-dropzone {
  display: grid;
  place-items: center;
  min-height: 4.25rem;
  color: var(--warm-brown-text);
  border: 1px dashed rgba(132, 83, 47, 0.34);
  border-radius: 6px;
  font-size: var(--font-size-small);
  line-height: 1.35;
  padding: 0.65rem;
  text-align: center;
}
.marker-editor-image-counters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.38rem;
}
.marker-editor-image-counter {
  display: grid;
  gap: 0.15rem;
  align-content: center;
  min-height: 2.55rem;
  color: var(--warm-brown-text);
  border-radius: 6px;
  padding: 0.42rem 0.48rem;
  text-align: center;
}
.marker-editor-image-counter span {
  overflow: hidden;
  font-size: var(--font-size-subtitle);
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.marker-editor-image-counter strong {
  color: var(--wine-accent);
  font-size: var(--font-size-body);
  line-height: 1;
}
.marker-editor-image-dropzone.is-dragging,
.marker-editor-image-dropzone.is-uploading {
  color: var(--warm-brown-dark);
  background: var(--paper-strong);
  border-color: rgba(132, 83, 47, 0.42);
}
.marker-editor-field {
  display: grid;
  gap: 0.28rem;
  min-width: 0;
}
.marker-editor-field-title {
  color: var(--wine-accent);
  font-size: var(--font-size-small);
  font-weight: var(--font-weight-subtitle);
  letter-spacing: 0;
  line-height: 1.4;
}
.marker-editor-field input,
.marker-editor-field textarea {
  width: 100%;
  resize: vertical;
  font-family: var(--font-family-ui);
  line-height: 1.35;
  padding: 0.48rem 0.55rem;
}
.marker-editor-field.is-invalid input,
.marker-editor-field.is-invalid textarea {
  border-color: var(--wine-accent);
  box-shadow: 0 0 0 2px var(--wine-accent-soft);
}
.marker-editor-advanced-section {
  background: var(--paper-soft);
}
.marker-editor-advanced-section .marker-editor-section-header {
  min-height: 1.65rem;
  color: var(--warm-brown-text);
  font-size: var(--font-size-subtitle);
}
.marker-editor-advanced-field textarea {
  font-family: Consolas, "Courier New", monospace;
}
.marker-editor-actions-inline {
  grid-template-columns: repeat(auto-fit, minmax(7.1rem, 1fr));
}
.marker-editor-actions button {
  border-radius: 8px;
  box-shadow: 0 0.45rem 1rem rgba(58, 38, 27, 0.22);
}
.marker-editor-actions button:disabled {
  cursor: wait;
  opacity: 0.72;
}
.marker-editor-actions button.active {
  background: linear-gradient(135deg, var(--warm-brown), var(--warm-brown-dark));
}
.marker-editor-delete-button {
  background: var(--wine-accent) !important;
}
.marker-editor-delete-button:hover {
  background: var(--wine-accent-strong) !important;
}
@media (min-width: 1120px) {
  .info-panel {
    width: min(30vw, 400px);
  }
}
@media (min-width: 1047px) and (max-width: 1180px) {
  .info-panel {
    width: min(34vw, 380px);
  }
}

@media (max-width: 1047px) {
  .info-panel {
    width: min(86vw, 360px);
  }

  .marker-editor-preview-panel {
    display: none !important;
  }
}
/* Footer */
.footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  position: fixed;
  bottom: 0;
  left: 0;
  z-index: 1000;
  width: 100%;
  min-height: var(--site-footer-height);
  box-sizing: border-box;
  background:
    linear-gradient(135deg, rgba(115, 81, 59, 0.92), rgba(47, 45, 40, 0.96)),
    var(--warm-brown-dark);
  border-top: 1px solid rgba(255, 231, 205, 0.16);
  color: #eee5d6;
  padding: 0.22rem 1rem;
  box-shadow: 0 -0.75rem 1.8rem rgba(58, 38, 27, 0.22), inset 0 1px 0 rgba(255, 231, 205, 0.12);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}
.footer strong {
  display: block;
  color: #f7f2e8;
  font-size: var(--font-size-small);
  font-weight: var(--font-weight-title);
  line-height: 1.2;
  margin: 0;
}
.footer-info {
  min-width: 0;
}
.footer p {
  font-size: var(--font-size-small);
  font-weight: var(--font-weight-body);
  line-height: 1.35;
  margin: 0;
}
.footer-nav {
  display: flex;
  align-items: center;
  justify-self: end;
  gap: 0.15rem;
}
.footer-nav a,
.footer-nav button {
  padding-block: 0.35rem;
}
.footer-copy {
  color: #cfc5ad;
  grid-column: 2;
  grid-row: 1;
  align-self: center;
  justify-self: center;
  text-align: center;
  white-space: nowrap;
}

@media (max-width: 720px) {
  :root {
    --site-header-height: 6.1rem;
    --site-footer-height: 2.5rem;
  }

  .loader {
    padding: 1.25rem 1.25rem;
  }

  .loader::before {
    right: -0.28em;
    bottom: -0.08em;
    font-size: 9rem;
  }

  .loader::after {
    left: 0.8rem;
    bottom: 0.7rem;
    width: 11rem;
    height: 4.5rem;
    opacity: 0.14;
  }

  .loader-content {
    width: 100%;
    max-height: calc(100vh - 2.5rem);
    max-height: calc(100dvh - 2.5rem);
    aspect-ratio: auto;
    overflow-y: auto;
    gap: 0.82rem;
    border-radius: 26px;
    padding: 1.85rem 1.15rem;
  }

  .loader-brand {
    font-size: clamp(3.4rem, 19vw, 4.6rem);
  }

  .loader-logo {
    width: min(78%, 16rem);
    height: 5.4rem;
  }

  .loader-brand span {
    gap: 0.72rem;
    margin-top: -0.14rem;
  }

  .loader-brand span::before,
  .loader-brand span::after {
    width: clamp(2.2rem, 13vw, 3.1rem);
  }

  .loader-kicker,
  .loader-status {
    width: min(100%, 19rem);
  }

  .loader-progress-row {
    width: min(100%, 19rem);
    grid-template-columns: minmax(0, 1fr) 2.75rem;
    gap: 0.6rem;
  }

  .loader-start-button {
    width: min(100%, 20rem);
    min-height: 52px;
  }

  .loader-settings {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    width: min(100%, 19rem);
    gap: 0.65rem;
  }

  .loader-quality-control,
  .loader-language-control,
  .quality-selector,
  .language-selector {
    width: min(100%, 15rem);
  }

  .site-header {
    align-items: center;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 0.55rem;
    padding: 0.3rem 0.75rem;
  }

  .site-brand {
    grid-column: 2;
    grid-row: 1;
  }

  .site-brand img {
    width: 5.4rem;
    height: 2.55rem;
  }

  .menu-toggle-button {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
    display: inline-grid;
    place-items: center;
    align-content: center;
    gap: 0.16rem;
    width: 2.25rem;
    height: 2.25rem;
    color: var(--warm-brown-dark);
    background: rgba(255, 249, 239, 0.62);
    border: 1px solid var(--glass-border);
    border-radius: 9px;
    padding: 0;
  }

  .menu-toggle-button span {
    display: block;
    width: 1.05rem;
    height: 2px;
    background: currentColor;
    border-radius: 999px;
    transition: opacity 160ms ease, transform 160ms ease;
  }

  .menu-toggle-button.active span:nth-child(1) {
    transform: translateY(0.28rem) rotate(45deg);
  }

  .menu-toggle-button.active span:nth-child(2) {
    opacity: 0;
  }

  .menu-toggle-button.active span:nth-child(3) {
    transform: translateY(-0.28rem) rotate(-45deg);
  }

  .site-nav {
    grid-column: 1 / -1;
    grid-row: 3;
    display: none;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.22rem;
    width: 100%;
    overflow: visible;
    padding: 0.15rem 0 0;
  }

  .site-nav.active {
    display: flex;
  }

  .site-nav a,
  .site-nav button,
  .footer-nav a,
  .footer-nav button {
    flex: 0 0 auto;
    padding: 0.55rem 0.6rem;
  }

  .site-nav .model-load-restart-button {
    width: auto;
  }

  .site-nav .fast-travel-toggle-button {
    width: auto;
  }

  .model-load-restart-label,
  .site-nav .fast-travel-toggle-label {
    display: inline;
  }

  .navigation-mode-select {
    position: relative;
  }

  .navigation-select-button {
    min-width: 8.4rem;
  }

  .navigation-select-menu {
    right: auto;
    left: 0;
  }

  .app-toolbar {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: stretch;
    max-width: 100%;
  }

  .sun-control {
    justify-content: center;
    gap: 0.45rem;
    width: 100%;
    box-sizing: border-box;
    padding: 0.45rem 0.6rem;
  }

  .sun-control-label {
    font-size: var(--font-size-small);
  }

  .sun-slider {
    width: min(44vw, 14rem);
  }

  .help-panel {
    width: min(92vw, 420px);
    padding: 1.05rem;
  }

  .help-demo {
    min-height: 10rem;
  }

  .help-grid {
    grid-template-columns: 1fr;
    gap: 0.58rem;
  }

  .help-item {
    align-items: center;
    padding: 0.62rem;
  }

  .image-viewer-overlay {
    padding: 0.75rem;
  }

  .camera-view-editor-panel {
    left: 0.5rem;
    bottom: calc(var(--site-footer-height) + 0.5rem);
    width: calc(100vw - 1rem);
    font-size: var(--font-size-subtitle);
    gap: 0.55rem;
    padding: 0.65rem;
  }

  .camera-view-editor-panel code {
    font-size: var(--font-size-subtitle);
  }

  .camera-view-editor-finder button,
  .camera-view-editor-actions button {
    width: 100%;
  }

  .collision-editor-panel {
    left: 0.5rem;
    top: calc(var(--site-header-height) + 0.5rem);
    width: calc(100vw - 1rem);
    max-height: calc(100vh - var(--site-header-height) - 1rem);
    font-size: var(--font-size-subtitle);
    gap: 0.55rem;
    padding: 0.65rem;
  }

  .tree-editor-panel {
    left: 0.5rem;
    top: calc(var(--site-header-height) + 0.5rem);
    width: calc(100vw - 1rem);
    max-height: calc(100vh - var(--site-header-height) - 1rem);
    font-size: var(--font-size-subtitle);
    gap: 0.55rem;
    padding: 0.65rem;
  }

  .editor-session-panel {
    left: 0.5rem;
    right: auto;
    top: calc(var(--site-header-height) + 0.5rem);
    width: calc(100vw - 1rem);
    max-height: calc(100vh - var(--site-header-height) - var(--site-footer-height) - 1rem);
    padding: 0.75rem;
  }

  .sync-status {
    left: 0.75rem;
    right: 0.75rem;
    bottom: calc(var(--site-footer-height) + 0.75rem);
    max-width: none;
    border-radius: 8px;
    text-align: center;
  }

  .editor-presence-panel {
    left: 0.5rem;
    bottom: calc(var(--site-footer-height) + 3.65rem);
    width: calc(100vw - 1rem);
    max-width: none;
    padding: 0.62rem;
  }

  .collision-editor-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .marker-editor-panel {
    right: 0.5rem;
    bottom: calc(var(--site-footer-height) + 0.5rem);
    width: calc(100vw - 1rem);
    max-height: calc(100vh - var(--site-header-height) - var(--site-footer-height) - 1rem);
    font-size: var(--font-size-subtitle);
    gap: 0.55rem;
    padding: 0.65rem;
  }

  .marker-editor-actions-inline {
    grid-template-columns: 1fr;
  }

  .info-panel {
    --info-panel-padding: 1rem;
    left: 0;
    right: 0;
    top: auto;
    bottom: calc(var(--site-footer-height) + env(safe-area-inset-bottom));
    width: 100%;
    max-height: calc(100vh - var(--site-header-height) - var(--site-footer-height) - env(safe-area-inset-bottom));
    max-height: calc(100dvh - var(--site-header-height) - var(--site-footer-height) - env(safe-area-inset-bottom));
    border-radius: 16px 16px 0 0;
    border-width: 1px 0 0;
    padding: 0;
    overflow: visible;
    transform: translateY(110%);
  }

  .info-panel.active {
    transform: translateY(0);
  }

  .info-panel.is-expanded {
    overflow: visible;
  }

  .info-panel-close {
    top: 0.75rem;
    right: 0.75rem;
  }

  .info-panel.is-mobile-sheet.is-compact .info-panel-close-compact {
    display: grid;
  }

  .info-panel-toggle {
    top: -2.85rem;
    right: auto;
    left: 50%;
    grid-template-rows: 1fr;
    grid-template-columns: auto auto auto;
    gap: 0.45rem;
    width: auto;
    min-height: 2.55rem;
    max-width: calc(100vw - 2rem);
    border-radius: 999px;
    padding: 0.42rem 0.75rem;
    transform: translateX(-50%);
  }

  .info-panel-toggle-text {
    writing-mode: horizontal-tb;
    transform: none;
  }

  .info-panel-mobile-summary {
    display: grid;
    grid-template-columns: 4.4rem minmax(0, 1fr);
    gap: 0.7rem;
    align-items: center;
    min-height: 6.4rem;
    max-height: 8.6rem;
    overflow: hidden;
    opacity: 1;
    padding: 1rem 3.1rem calc(1rem + env(safe-area-inset-bottom)) 1rem;
    transition:
      max-height 260ms cubic-bezier(0.22, 1, 0.36, 1),
      opacity 180ms ease,
      padding 260ms cubic-bezier(0.22, 1, 0.36, 1);
  }

  .info-panel-mobile-summary img {
    width: 4.4rem;
    height: 4.4rem;
    margin: 0;
    object-fit: cover;
    border-radius: 8px;
  }

  .info-panel-mobile-summary-copy {
    display: grid;
    gap: 0.25rem;
    min-width: 0;
  }

  .info-panel-mobile-summary-copy strong {
    overflow: hidden;
    color: var(--warm-brown-dark);
    font-size: var(--font-size-body);
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .info-panel-mobile-summary-copy p {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    margin: 0;
  }

  .info-panel-mobile-summary-copy button {
    justify-self: start;
    color: #fff;
    background: var(--button-background);
    border: 1px solid var(--wine-accent-border);
    border-radius: 999px;
    font-size: var(--font-size-small);
    line-height: 1;
    padding: 0.55rem 0.75rem;
  }

  .info-panel-content {
    display: block;
    max-height: 0;
    overflow-y: auto;
    opacity: 0;
    padding: 0 1rem;
    transition:
      max-height 300ms cubic-bezier(0.22, 1, 0.36, 1),
      opacity 180ms ease,
      padding 260ms cubic-bezier(0.22, 1, 0.36, 1);
  }

  .info-panel.is-expanded .info-panel-mobile-summary {
    max-height: 0;
    min-height: 0;
    opacity: 0;
    padding-top: 0;
    padding-bottom: 0;
    pointer-events: none;
  }

  .info-panel.is-expanded .info-panel-content {
    max-height: calc(100vh - var(--site-header-height) - var(--site-footer-height) - 5.4rem);
    max-height: calc(100dvh - var(--site-header-height) - var(--site-footer-height) - 5.4rem);
    opacity: 1;
    padding: 1rem 1rem calc(1rem + env(safe-area-inset-bottom));
  }

  .info-panel.is-mobile-sheet.is-sheet-dragging .info-panel-mobile-summary,
  .info-panel.is-mobile-sheet.is-sheet-dragging .info-panel-content {
    transition: none;
  }

  .image-viewer-frame {
    grid-template-rows: minmax(0, 1fr) auto;
    width: 100%;
    height: 100%;
    padding: 3.2rem 0.7rem 0.7rem;
  }

  .image-viewer-stage {
    width: 100%;
    height: 100%;
    padding: 0;
  }

  .image-viewer-stage img {
    max-height: calc(100% - 4.2rem);
  }

  .image-viewer-stage img.is-zoomed {
    max-width: 100%;
    max-height: calc(100% - 4.2rem);
  }

  .image-viewer-controls {
    bottom: 4.1rem;
  }

  .image-viewer-nav {
    width: 2.55rem;
    height: 3.75rem;
    font-size: 1.3rem;
  }

  .image-viewer-thumbnails {
    max-width: 100%;
    padding-top: 0.35rem;
  }

  .image-viewer-thumbnail {
    width: 3.6rem;
    height: 2.65rem;
  }

  .about-columns {
    grid-template-columns: 1fr;
  }

  .about-panel {
    width: calc(100vw - 0.75rem);
    max-height: calc(100dvh - var(--site-header-height) - var(--site-footer-height) - 0.75rem);
    padding: 0.95rem;
  }

  .about-kicker {
    margin-bottom: 0.55rem;
  }

  .about-panel h2 {
    margin: 0 2.25rem 1rem 0;
  }

  .about-intro {
    text-align: left;
  }

  .about-content-layout {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .about-story {
    margin: 0;
    padding: 0 0 1rem;
    border-right: 0;
    border-bottom: 1px solid rgba(132, 83, 47, 0.2);
  }

  .about-story-kicker,
  .about-story h3 {
    text-align: left;
  }

  .about-story h3 {
    font-size: 1.36rem;
    line-height: 1.12;
  }

  .about-story-highlights {
    grid-template-columns: 1fr;
    gap: 0.52rem;
  }

  .team-summary-list {
    grid-template-columns: 1fr;
  }

  .about-team-grid {
    grid-template-columns: minmax(0, 1fr);
    grid-auto-columns: auto;
    width: 100%;
    justify-content: center;
    row-gap: 1.1rem;
    margin-top: 0;
  }

  .team-card {
    min-height: 0;
    gap: 0.75rem;
    padding: 0.9rem;
  }

  .team-summary-list {
    min-height: 0;
  }

  .team-summary-list p {
    min-height: 0;
    padding: 0.62rem;
  }

  .team-summary-list p span:last-child {
    -webkit-line-clamp: 6;
  }

  .team-role,
  .team-subtitle,
  .team-profile summary {
    overflow-wrap: anywhere;
  }

  .team-photo-slot {
    width: 5.4rem;
    height: 5.4rem;
  }

  .team-avatar {
    width: 100%;
    height: 100%;
  }

  .team-card h3 {
    font-size: var(--font-size-body);
  }

  .team-profile-overlay {
    padding: 0.75rem;
  }

  .team-profile-frame {
    width: 100%;
    max-height: calc(100dvh - 1.5rem);
    overflow-y: auto;
    gap: 0.75rem;
    padding: 0.9rem;
  }

  .team-profile-modal-header {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    gap: 0.7rem;
    padding: 0.85rem 2.4rem 0.85rem 0.85rem;
  }

  .team-profile-modal-photo {
    width: 7.5rem;
    height: 7.5rem;
  }

  .team-profile-modal-intro {
    grid-template-columns: 1fr;
    gap: 0.58rem;
    padding: 0.65rem;
  }

  .footer {
    grid-template-columns: 1fr;
    place-items: center;
    gap: 0;
    min-height: var(--site-footer-height);
    padding: 0.45rem 0.75rem;
  }

  .footer-info,
  .footer-nav {
    display: none;
  }

  .footer-copy {
    grid-column: 1;
    grid-row: 1;
    justify-self: center;
    text-align: center;
  }
}

/* Final visual override layer: keeps the modern design pass above effective. */
:root {
  --font-family-ui: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, Arial, sans-serif;
  --font-family-brand: Georgia, "Times New Roman", serif;
  --font-size-small: 0.78rem;
  --font-size-subtitle: var(--font-size-small);
  --font-size-body: 0.94rem;
  --font-size-title: clamp(1.55rem, 3vw, 2.15rem);
  --paper: #f6efe3;
  --paper-soft: rgba(246, 239, 227, 0.66);
  --paper-strong: rgba(253, 248, 238, 0.92);
  --paper-border: rgba(255, 252, 246, 0.52);
  --warm-brown: #76573e;
  --warm-brown-dark: #2b2924;
  --warm-brown-text: #51483d;
  --warm-brown-muted: #6d7663;
  --wine-accent: #8b1e56;
  --wine-accent-soft: rgba(139, 30, 86, 0.1);
  --wine-accent-border: rgba(139, 30, 86, 0.24);
  --wine-accent-strong: #62143c;
  --sage-accent: #6d7663;
  --glass-panel-strong: rgba(253, 248, 238, 0.82);
  --glass-border: rgba(255, 255, 250, 0.44);
  --glass-shadow: 0 1.6rem 3.6rem rgba(43, 36, 30, 0.18), 0 0.2rem 0.55rem rgba(43, 36, 30, 0.08);
  --glass-blur: blur(18px) saturate(1.14);
  --panel-background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.48), rgba(246, 239, 227, 0.72) 46%, rgba(226, 232, 214, 0.5)),
    var(--glass-panel-strong);
  --control-background: rgba(255, 250, 242, 0.78);
  --control-radius: 8px;
  --panel-radius: 14px;
  --button-background: linear-gradient(135deg, var(--wine-accent), #a84a42);
  --button-background-hover: linear-gradient(135deg, var(--wine-accent-strong), #8f3f37);
}

.site-header {
  min-height: calc(var(--site-header-height) + 0.3rem);
  background:
    linear-gradient(90deg, rgba(253, 248, 238, 0.88), rgba(246, 239, 227, 0.74) 52%, rgba(226, 232, 214, 0.72)),
    var(--panel-background);
  border-bottom-color: rgba(118, 87, 62, 0.18);
}

.site-brand {
  color: var(--warm-brown-dark);
  filter: drop-shadow(0 0.28rem 0.55rem rgba(43, 36, 30, 0.12));
}

.site-nav a,
.site-nav button,
.footer-nav a,
.footer-nav button,
.loader-start-button,
.help-start-button,
.quality-selector-button,
.language-selector-button,
.team-card {
  transition:
    background-color 180ms ease,
    color 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.site-nav a:hover,
.site-nav button:hover,
.footer-nav a:hover,
.footer-nav button:hover,
.quality-selector-button:hover,
.language-selector-button:hover,
.loader-start-button:not(:disabled):hover,
.help-start-button:hover {
  transform: translateY(-1px);
}

.navigation-mode-button.active,
.editor-session-button.active {
  box-shadow: 0 0.55rem 1.1rem rgba(139, 30, 86, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.loader {
  background:
    linear-gradient(118deg, rgba(246, 239, 227, 0.96), rgba(236, 230, 217, 0.9) 48%, rgba(224, 230, 212, 0.9)),
    radial-gradient(circle at 16% 20%, rgba(139, 30, 86, 0.11), transparent 26rem),
    radial-gradient(circle at 82% 18%, rgba(109, 118, 99, 0.16), transparent 24rem),
    repeating-linear-gradient(8deg, transparent 0 3.6rem, rgba(81, 72, 61, 0.048) 3.65rem 3.72rem),
    var(--paper);
}

.loader::before {
  color: rgba(118, 87, 62, 0.1);
  animation: loader-year-parallax 9s ease-in-out infinite alternate;
}

.loader::after {
  width: min(48vw, 40rem);
  height: min(48vh, 31rem);
  opacity: 0.42;
  animation: loader-photo-parallax 14s ease-in-out infinite alternate;
}

.loader-content {
  width: min(86vw, 760px);
  border-radius: 22px;
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.42), rgba(246, 239, 227, 0.2)), rgba(253, 248, 238, 0.18);
  box-shadow: 0 1.8rem 4.5rem rgba(58, 38, 27, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.32);
}

.loader-kicker,
.loader-status,
.about-kicker,
.help-kicker,
.about-story-kicker,
.team-role,
.marker-editor-field-title,
.marker-editor-section-header {
  color: var(--wine-accent);
  letter-spacing: 0.04em;
}

.loader-progress-bar {
  background: linear-gradient(90deg, var(--wine-accent), #a84a42 54%, var(--sage-accent));
  box-shadow: 0 0.35rem 1rem rgba(139, 30, 86, 0.22);
}

.help-overlay,
.about-overlay,
.image-viewer-overlay {
  background:
    radial-gradient(circle at 18% 18%, rgba(139, 30, 86, 0.18), transparent 24rem),
    radial-gradient(circle at 86% 20%, rgba(109, 118, 99, 0.18), transparent 23rem),
    rgba(24, 22, 19, 0.42);
  backdrop-filter: blur(14px) saturate(1.08);
  -webkit-backdrop-filter: blur(14px) saturate(1.08);
}

.help-panel,
.about-panel,
.info-panel,
.image-viewer-frame,
.editor-session-panel,
.camera-view-editor-panel,
.collision-editor-panel,
.tree-editor-panel,
.marker-editor-panel {
  border-color: rgba(255, 252, 246, 0.5);
  box-shadow: var(--glass-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.42);
}

.about-panel,
.help-panel {
  position: relative;
  overflow: hidden;
}

.about-panel::before,
.help-panel::before {
  content: "";
  position: absolute;
  inset: -18% -12% auto auto;
  width: 28rem;
  height: 28rem;
  opacity: 0.16;
  background:
    radial-gradient(circle, rgba(139, 30, 86, 0.36), transparent 58%),
    radial-gradient(circle at 28% 68%, rgba(109, 118, 99, 0.5), transparent 44%);
  filter: blur(2px);
  pointer-events: none;
  animation: panel-parallax 12s ease-in-out infinite alternate;
}

.about-content-layout,
.about-columns,
.about-team-grid,
.help-grid {
  position: relative;
  z-index: 1;
}

.about-story-highlights span,
.about-columns article,
.help-item,
.team-card,
.team-summary-list p,
.team-profile-body,
.marker-selection-card {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.42), rgba(246, 239, 227, 0.76));
  border-color: rgba(118, 87, 62, 0.16);
  box-shadow: 0 0.75rem 1.8rem rgba(43, 36, 30, 0.09), inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.team-card {
  border-radius: 12px;
}

.team-card:hover {
  border-color: rgba(139, 30, 86, 0.22);
  box-shadow: 0 1.05rem 2.4rem rgba(43, 36, 30, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.5);
  transform: translateY(-3px);
}

.team-avatar {
  background: linear-gradient(145deg, rgba(139, 30, 86, 0.9), rgba(118, 87, 62, 0.9));
}

.team-summary-icon {
  color: var(--wine-accent);
  background: rgba(139, 30, 86, 0.08);
  border: 1px solid rgba(139, 30, 86, 0.14);
}

.team-tags span,
.environment-toggle-button.active {
  background: rgba(109, 118, 99, 0.12);
  border-color: rgba(109, 118, 99, 0.18);
}

.footer {
  background: linear-gradient(90deg, rgb(43, 41, 36), rgb(118, 87, 62) 54%, rgb(43, 41, 36));
  border-top-color: rgba(255, 239, 220, 0.18);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

@media (prefers-reduced-motion: reduce) {
  .loader::before,
  .loader::after,
  .about-panel::before,
  .help-panel::before {
    animation: none;
  }

  .site-nav a:hover,
  .site-nav button:hover,
  .footer-nav a:hover,
  .footer-nav button:hover,
  .quality-selector-button:hover,
  .loader-start-button:not(:disabled):hover,
  .help-start-button:hover,
  .team-card:hover {
    transform: none;
  }
}

@media (max-width: 720px) {
  .site-header {
    min-height: var(--site-header-height);
  }

  .loader-content {
    border-radius: 18px;
  }

  .about-panel::before,
  .help-panel::before {
    width: 18rem;
    height: 18rem;
  }

  .team-card:hover {
    transform: none;
  }
}

/* Viewport guardrails: spacing, overflow and canvas-safe layout. */
:root {
  --screen-gutter: clamp(0.75rem, 2vw, 1.35rem);
  --section-gap: clamp(0.75rem, 1.8vw, 1.25rem);
  --content-gap: clamp(0.55rem, 1.4vw, 0.95rem);
}

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

html,
body {
  width: 100%;
  max-width: 100%;
}

canvas,
img,
svg,
video {
  max-width: 100%;
}

canvas {
  display: block;
}

body {
  overscroll-behavior: none;
}

.site-header,
.footer {
  padding-left: max(var(--screen-gutter), env(safe-area-inset-left));
  padding-right: max(var(--screen-gutter), env(safe-area-inset-right));
}

.site-header {
  gap: var(--content-gap);
  width: 100%;
  max-width: 100vw;
}

.app-toolbar,
.site-nav,
.footer-info,
.footer-nav,
.footer-copy,
.site-brand {
  min-width: 0;
}

.site-nav,
.footer-nav {
  flex-wrap: wrap;
  max-width: 100%;
}

.site-nav button,
.footer-nav button,
.loader-start-button,
.help-start-button,
.quality-selector-button,
.language-selector-button {
  max-width: 100%;
  white-space: nowrap;
}

.sun-control {
  max-width: 100%;
}

.sun-slider {
  min-width: 5rem;
}

.loader {
  padding:
    max(var(--screen-gutter), env(safe-area-inset-top))
    max(var(--screen-gutter), env(safe-area-inset-right))
    max(var(--screen-gutter), env(safe-area-inset-bottom))
    max(var(--screen-gutter), env(safe-area-inset-left));
}

.loader-content {
  width: min(100%, 760px);
  max-height: calc(100dvh - (var(--screen-gutter) * 2));
  overflow: auto;
  scrollbar-gutter: stable both-edges;
}

.loader-content-inner {
  max-width: 100%;
}

.loader-brand,
.loader-kicker,
.loader-status,
.quality-selector-label,
.language-selector-label,
.quality-recommendation {
  overflow-wrap: anywhere;
}

.help-overlay,
.about-overlay,
.image-viewer-overlay {
  padding:
    max(var(--screen-gutter), env(safe-area-inset-top))
    max(var(--screen-gutter), env(safe-area-inset-right))
    max(var(--screen-gutter), env(safe-area-inset-bottom))
    max(var(--screen-gutter), env(safe-area-inset-left));
}

.help-panel,
.about-panel,
.image-viewer-frame,
.team-profile-frame {
  width: min(100%, calc(100vw - (var(--screen-gutter) * 2)));
  max-height: calc(100dvh - (var(--screen-gutter) * 2));
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.help-panel,
.about-panel {
  padding: clamp(0.95rem, 2vw, 1.4rem);
}

.help-grid,
.about-content-layout,
.about-columns,
.about-team-grid,
.team-summary-list,
.about-story-highlights {
  gap: var(--content-gap);
  min-width: 0;
}

.about-story,
.about-columns article,
.help-item,
.team-card,
.team-summary-list p,
.team-profile-body,
.info-panel,
.image-viewer-frame,
.marker-selection-card {
  min-width: 0;
  overflow-wrap: anywhere;
}

.team-card {
  max-width: 100%;
}

.team-photo-slot,
.team-photo-slot img,
.team-avatar {
  flex: 0 0 auto;
}

.info-panel {
  max-width: calc(100vw - var(--screen-gutter));
  max-height: calc(100dvh - var(--site-header-height) - var(--site-footer-height) - var(--screen-gutter));
  overflow: auto;
  overscroll-behavior: contain;
}

.image-viewer-stage,
.image-viewer-stage img {
  min-width: 0;
  min-height: 0;
}

.image-viewer-stage img {
  object-fit: contain;
}

.marker-selection-card {
  max-width: min(16rem, calc(100vw - (var(--screen-gutter) * 2)));
}

.marker-selection-card strong {
  max-width: min(14rem, calc(100vw - (var(--screen-gutter) * 3)));
}

@media (max-width: 1047px) {
  .info-panel {
    width: min(86vw, calc(100vw - (var(--screen-gutter) * 2)));
  }
}

@media (max-width: 720px) {
  :root {
    --screen-gutter: 0.75rem;
    --section-gap: 0.8rem;
    --content-gap: 0.6rem;
  }

  .site-nav {
    max-height: calc(100dvh - var(--site-header-height) - var(--site-footer-height) - 0.75rem);
    overflow-y: auto;
  }

  .site-nav button,
  .footer-nav button {
    min-height: 2.25rem;
    white-space: normal;
  }

  .loader-content {
    width: 100%;
    max-height: calc(100dvh - 1.5rem);
  }

  .help-panel,
  .about-panel,
  .image-viewer-frame,
  .team-profile-frame {
    width: calc(100vw - 1.5rem);
    max-height: calc(100dvh - 1.5rem);
  }

  .about-panel {
    max-height: calc(100dvh - var(--site-header-height) - var(--site-footer-height) - 0.75rem);
  }

  .info-panel {
    max-width: 100vw;
    max-height: calc(100dvh - var(--site-header-height) - var(--site-footer-height));
  }

  .info-panel-toggle {
    max-width: calc(100vw - 1.5rem);
  }
}

/* Help screen redesign: onboarding, commands and responsive clarity. */
.help-panel {
  width: min(96vw, 980px);
  display: grid;
  gap: var(--section-gap);
}

.help-panel h2 {
  max-width: 16ch;
  margin-bottom: 0;
}

.help-intro {
  max-width: 62rem;
  color: var(--warm-brown-text);
  font-size: var(--font-size-body);
  line-height: 1.55;
  margin: -0.35rem 2.6rem 0 0;
}

.help-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(17rem, 0.85fr);
  gap: var(--section-gap);
  align-items: stretch;
  min-width: 0;
}

.help-layout .help-demo {
  min-height: clamp(15rem, 30vw, 20rem);
  margin: 0;
}

.help-shortcuts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--content-gap);
  min-width: 0;
}

.help-shortcuts article,
.help-mode-grid article {
  min-width: 0;
  color: var(--warm-brown-text);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.46), rgba(246, 239, 227, 0.78));
  border: 1px solid rgba(118, 87, 62, 0.16);
  border-radius: 10px;
  box-shadow:
    0 0.7rem 1.55rem rgba(43, 36, 30, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.44);
  padding: 0.78rem;
}

.help-shortcut-key {
  display: inline-flex;
  align-items: center;
  min-height: 1.85rem;
  color: var(--warm-brown-dark);
  background: rgba(255, 250, 242, 0.8);
  border: 1px solid rgba(139, 30, 86, 0.18);
  border-bottom-color: rgba(43, 36, 30, 0.22);
  border-radius: 7px;
  box-shadow: 0 0.18rem 0 rgba(43, 36, 30, 0.16);
  font-size: var(--font-size-small);
  font-weight: var(--font-weight-title);
  line-height: 1;
  padding: 0.42rem 0.55rem;
  white-space: nowrap;
}

.help-shortcuts p,
.help-mode-grid p,
.help-note {
  color: var(--warm-brown-text);
  font-size: var(--font-size-small);
  line-height: 1.45;
  margin: 0;
}

.help-shortcuts p {
  margin-top: 0.62rem;
}

.help-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--content-gap);
}

.help-item {
  position: relative;
  min-height: 7.2rem;
  align-content: start;
  padding: 0.86rem;
}

.help-item::after {
  content: "";
  position: absolute;
  inset: auto 0.85rem 0.72rem;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(139, 30, 86, 0.42), transparent);
  opacity: 0;
  transform: scaleX(0.4);
  transition: opacity 180ms ease, transform 180ms ease;
}

.help-item.active::after {
  opacity: 1;
  transform: scaleX(1);
}

.help-item span:not(.help-icon) {
  display: block;
}

.help-item span:not(.help-icon) strong {
  display: block;
  margin-bottom: 0.18rem;
}

.help-mode-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--content-gap);
}

.help-mode-title {
  color: var(--wine-accent) !important;
  font-size: var(--font-size-small) !important;
  font-weight: var(--font-weight-title) !important;
  letter-spacing: 0.04em;
  line-height: 1.2 !important;
  margin-bottom: 0.42rem !important;
  text-transform: uppercase;
}

.help-note {
  color: var(--warm-brown-dark);
  background: rgba(139, 30, 86, 0.08);
  border: 1px solid rgba(139, 30, 86, 0.14);
  border-radius: 10px;
  padding: 0.72rem 0.85rem;
}

.help-start-button {
  width: min(100%, 15rem);
  margin-top: 0.25rem;
}

@media (max-width: 860px) {
  .help-layout,
  .help-grid,
  .help-mode-grid {
    grid-template-columns: 1fr;
  }

  .help-shortcuts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .help-item {
    min-height: 0;
  }
}

@media (max-width: 520px) {
  .help-panel {
    width: calc(100vw - 1.5rem);
    gap: 0.72rem;
  }

  .help-panel h2 {
    max-width: calc(100% - 2.6rem);
  }

  .help-intro {
    margin-right: 0;
  }

  .help-layout .help-demo {
    min-height: 12.5rem;
  }

  .help-shortcuts {
    grid-template-columns: 1fr;
  }

  .help-shortcuts article,
  .help-mode-grid article,
  .help-item,
  .help-note {
    padding: 0.7rem;
  }
}

/* Designer motion layer: subtle parallax and staged reveals without changing structure. */
:root {
  --pointer-x: 0;
  --pointer-y: 0;
  --motion-distance: clamp(0.45rem, 1.4vw, 0.95rem);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0.78;
  pointer-events: none;
  background:
    radial-gradient(circle at calc(50% + (var(--pointer-x) * 18%)) calc(20% + (var(--pointer-y) * 12%)), rgba(139, 30, 86, 0.1), transparent 24rem),
    radial-gradient(circle at calc(78% - (var(--pointer-x) * 14%)) calc(42% - (var(--pointer-y) * 10%)), rgba(109, 118, 99, 0.12), transparent 26rem),
    linear-gradient(115deg, rgba(246, 239, 227, 0.05), transparent 42%);
}

.loader::before {
  transform:
    translate3d(
      calc(var(--pointer-x) * -1.1rem),
      calc(var(--pointer-y) * -0.8rem),
      0
    );
}

.loader::after {
  transform:
    translate3d(
      calc(var(--pointer-x) * 0.8rem),
      calc(var(--pointer-y) * 0.55rem),
      0
    )
    scale(1.02);
}

.help-overlay.active,
.about-overlay.active,
.image-viewer-overlay.active {
  animation: overlay-fade-in 220ms ease both;
}

.help-overlay.active .help-panel,
.about-overlay.active .about-panel,
.image-viewer-overlay.active .image-viewer-frame {
  animation: panel-rise-in 340ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.about-panel::before,
.help-panel::before {
  transform:
    translate3d(
      calc((var(--pointer-x) * 0.8rem) + (var(--panel-scroll, 0) * -0.9rem)),
      calc((var(--pointer-y) * 0.65rem) + (var(--panel-scroll, 0) * 1.1rem)),
      0
    )
    scale(1.02);
}

.about-content-layout,
.about-columns,
.help-grid,
.about-story-highlights,
.team-summary-list {
  row-gap: var(--section-gap);
  column-gap: var(--content-gap);
}

.team-card,
.help-item,
.about-columns article,
.about-story-highlights span {
  contain: layout paint;
}

.team-card:hover,
.help-item:hover,
.about-columns article:hover,
.about-story-highlights span:hover {
  transform: translateY(-3px);
}

.design-reveal {
  opacity: 0;
  transform: translateY(var(--motion-distance));
  transition:
    opacity 520ms ease,
    transform 520ms cubic-bezier(0.22, 1, 0.36, 1);
}

.design-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.loader-content-inner > .design-reveal:nth-child(1),
.help-grid > .design-reveal:nth-child(1),
.about-team-grid > .design-reveal:nth-child(1) {
  transition-delay: 40ms;
}

.loader-content-inner > .design-reveal:nth-child(2),
.help-grid > .design-reveal:nth-child(2),
.about-team-grid > .design-reveal:nth-child(2) {
  transition-delay: 90ms;
}

.loader-content-inner > .design-reveal:nth-child(3),
.help-grid > .design-reveal:nth-child(3),
.about-team-grid > .design-reveal:nth-child(3) {
  transition-delay: 140ms;
}

.loader-content-inner > .design-reveal:nth-child(n + 4),
.about-team-grid > .design-reveal:nth-child(n + 4) {
  transition-delay: 180ms;
}

.site-header,
.footer,
.loader-content,
.help-panel,
.about-panel,
.info-panel,
.image-viewer-frame,
.team-card {
  will-change: transform;
}

@keyframes overlay-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes panel-rise-in {
  from {
    opacity: 0;
    transform: translateY(0.9rem) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes loader-year-parallax {
  from {
    translate: -0.25rem 0.15rem;
  }
  to {
    translate: 0.25rem -0.15rem;
  }
}

@keyframes loader-photo-parallax {
  from {
    scale: 1;
  }
  to {
    scale: 1.025;
  }
}

@keyframes panel-parallax {
  from {
    opacity: 0.13;
  }
  to {
    opacity: 0.19;
  }
}

@media (prefers-reduced-motion: reduce) {
  body::before,
  .loader::before,
  .loader::after,
  .about-panel::before,
  .help-panel::before,
  .help-overlay.active,
  .about-overlay.active,
  .image-viewer-overlay.active,
  .help-overlay.active .help-panel,
  .about-overlay.active .about-panel,
  .image-viewer-overlay.active .image-viewer-frame {
    animation: none;
  }

  .loader-content,
  .loader::before,
  .loader::after,
  .about-panel::before,
  .help-panel::before,
  .team-card:hover,
  .help-item:hover,
  .about-columns article:hover,
  .about-story-highlights span:hover,
  .design-reveal,
  .design-reveal.is-visible {
    transform: none;
  }

  .design-reveal {
    opacity: 1;
    transition: none;
  }
}

@media (max-width: 720px) {
  .loader-content,
  .loader::before,
  .loader::after {
    transform: none;
  }

  .team-card:hover,
  .help-item:hover,
  .about-columns article:hover,
  .about-story-highlights span:hover {
    transform: none;
  }
}

/* Compact help and contextual guidance: no long reading, no visible scrollbars. */
.help-panel {
  width: min(94vw, 760px);
  max-height: min(92dvh, 620px);
  overflow: hidden;
  gap: clamp(0.62rem, 1.3vw, 0.9rem);
}

.help-panel h2 {
  max-width: none;
  font-size: clamp(1.35rem, 3vw, 1.9rem);
  margin-right: 2.5rem;
}

.help-intro {
  max-width: 42rem;
  margin: -0.25rem 2.5rem 0 0;
  line-height: 1.42;
}

.help-layout {
  grid-template-columns: minmax(0, 1fr) minmax(15rem, 0.82fr);
  align-items: stretch;
}

.help-layout .help-demo {
  min-height: clamp(12rem, 25vw, 16rem);
}

.help-layout .help-grid {
  grid-template-columns: 1fr;
}

.help-grid {
  align-content: stretch;
}

.help-item {
  min-height: 0;
  grid-template-columns: 2rem minmax(0, 1fr);
  align-items: center;
  padding: 0.68rem;
}

.help-item span:not(.help-icon) {
  font-size: var(--font-size-small);
  line-height: 1.35;
}

.help-icon {
  width: 2rem;
  height: 2rem;
}

.help-note {
  padding: 0.58rem 0.72rem;
}

.help-shortcuts,
.help-mode-grid {
  display: none;
}

.footer {
  grid-template-columns: minmax(0, 1fr) auto;
}

.footer-nav {
  display: none;
}

.footer-copy {
  grid-column: 2;
}

.help-panel,
.about-panel,
.info-panel,
.image-viewer-frame,
.loader-content,
.site-nav {
  scrollbar-width: none;
}

.help-panel::-webkit-scrollbar,
.about-panel::-webkit-scrollbar,
.info-panel::-webkit-scrollbar,
.image-viewer-frame::-webkit-scrollbar,
.loader-content::-webkit-scrollbar,
.site-nav::-webkit-scrollbar {
  display: none;
}

.context-help-toast {
  position: fixed;
  z-index: 9400;
  right: max(1rem, env(safe-area-inset-right));
  bottom: calc(var(--site-footer-height) + 1rem + env(safe-area-inset-bottom));
  display: grid;
  gap: 0.18rem;
  width: min(22rem, calc(100vw - 2rem));
  color: var(--warm-brown-text);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.62), rgba(246, 239, 227, 0.9));
  border: 1px solid rgba(255, 252, 246, 0.6);
  border-radius: 12px;
  box-shadow:
    0 1.1rem 2.4rem rgba(43, 36, 30, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
  padding: 0.82rem 2.6rem 0.9rem 0.9rem;
  opacity: 0;
  pointer-events: none;
  transform: translateY(0.75rem);
  transition:
    opacity 180ms ease,
    transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}

.context-help-toast.active {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.context-help-close {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  display: grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  color: var(--warm-brown);
  background: rgba(255, 250, 242, 0.78);
  border: 1px solid rgba(118, 87, 62, 0.12);
  border-radius: 50%;
  line-height: 1;
}

.context-help-kicker {
  color: var(--wine-accent);
  font-size: var(--font-size-small);
  font-weight: var(--font-weight-title);
  letter-spacing: 0.04em;
  line-height: 1.1;
  margin: 0;
  text-transform: uppercase;
}

.context-help-title {
  color: var(--warm-brown-dark);
  font-size: var(--font-size-body);
  line-height: 1.2;
}

.context-help-body {
  font-size: var(--font-size-small);
  line-height: 1.38;
  margin: 0;
}

@media (max-width: 860px) {
  .help-panel {
    max-height: calc(100dvh - 1.5rem);
    overflow: hidden;
  }

  .help-layout {
    grid-template-columns: 1fr;
  }

  .help-layout .help-demo {
    min-height: 10.5rem;
  }

  .help-layout .help-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .help-item {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }
}

@media (max-width: 620px) {
  .help-panel {
    width: calc(100vw - 1rem);
    max-height: calc(100dvh - 1rem);
    padding: 0.78rem;
  }

  .help-layout .help-demo {
    min-height: 8.4rem;
  }

  .help-layout .help-grid {
    grid-template-columns: 1fr;
  }

  .help-panel h2,
  .help-intro {
    margin-right: 2.2rem;
  }

  .help-note {
    display: none;
  }

  .context-help-toast {
    right: 0.75rem;
    bottom: calc(var(--site-footer-height) + 0.75rem + env(safe-area-inset-bottom));
    width: calc(100vw - 1.5rem);
  }
}

/* Accessible viewport and interaction targets. */
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  margin: -1px !important;
  padding: 0 !important;
  border: 0 !important;
  white-space: nowrap !important;
}

.map-viewport {
  position: fixed;
  z-index: 0;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  outline: none;
}

.map-viewport canvas {
  width: 100%;
  height: 100%;
}

.context-help-toast[hidden] {
  display: none;
}

.site-nav button,
.footer-nav button,
.quality-selector-button,
.quality-selector-option,
.language-selector-button,
.language-selector-option,
.help-start-button,
.dialog-close-button,
.menu-toggle-button,
.context-help-close,
.touch-action-button {
  min-height: 44px;
}

.dialog-close-button,
.menu-toggle-button {
  width: 44px;
  height: 44px;
}

.context-help-close {
  width: 44px;
  height: 44px;
}

.sun-slider {
  height: 44px;
  margin-block: -0.3rem;
}

.context-help-toast {
  z-index: 1170;
}

@media (max-width: 620px) {
  .context-help-toast {
    top: calc(var(--site-header-height) + 0.65rem + env(safe-area-inset-top));
    right: 0.75rem;
    bottom: auto;
    width: calc(100vw - 1.5rem);
    max-height: min(10rem, calc(100dvh - var(--site-header-height) - var(--site-footer-height) - 1.5rem));
    overflow: auto;
  }
}

/* Compact mobile chrome: keep the map dominant and reveal lighting on demand. */
.sun-control-toggle {
  display: none;
}

@media (max-width: 720px) {
  :root {
    --site-header-height: 4.25rem;
    --site-footer-height: 2rem;
  }

  .site-header {
    height: calc(var(--site-header-height) + env(safe-area-inset-top));
    min-height: calc(var(--site-header-height) + env(safe-area-inset-top));
    grid-template-columns: minmax(4.75rem, 1fr) auto minmax(4.75rem, 1fr);
    grid-template-rows: 1fr;
    align-items: center;
    gap: 0.45rem;
    padding: calc(0.35rem + env(safe-area-inset-top)) 0.75rem 0.35rem;
  }

  .site-brand {
    grid-column: 2;
    grid-row: 1;
  }

  .site-brand img {
    width: 5.15rem;
    height: 2.25rem;
  }

  .site-brand span {
    font-size: 0.88rem;
  }

  .menu-toggle-button {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
  }

  .sun-control-toggle {
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.42rem;
    min-width: 4.15rem;
    min-height: 44px;
    color: var(--warm-brown-dark);
    background: rgba(255, 249, 239, 0.7);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 0.45rem 0.7rem;
    font: inherit;
    font-size: var(--font-size-small);
    font-weight: var(--font-weight-action);
    line-height: 1;
  }

  .sun-control-toggle.active {
    color: #fff;
    background: var(--wine-accent);
    border-color: transparent;
  }

  .sun-control-toggle-icon {
    width: 0.9rem;
    height: 0.9rem;
    flex: 0 0 auto;
    background: #f4c64d;
    border: 2px solid currentColor;
    border-radius: 50%;
    box-shadow: 0 0 0 2px rgba(244, 198, 77, 0.24);
  }

  .app-toolbar {
    position: fixed;
    z-index: 4;
    top: calc(var(--site-header-height) + 0.5rem + env(safe-area-inset-top));
    right: 0.75rem;
    left: 0.75rem;
    grid-column: auto;
    grid-row: auto;
    justify-self: auto;
    display: flex;
    width: auto;
    max-width: none;
    box-sizing: border-box;
    padding: 0.42rem;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-0.45rem) scale(0.985);
    transition:
      opacity 160ms ease,
      transform 180ms cubic-bezier(0.22, 1, 0.36, 1),
      visibility 0s linear 180ms;
  }

  .app-toolbar.mobile-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0) scale(1);
    transition-delay: 0s;
  }

  .sun-control {
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    min-height: 48px;
    box-sizing: border-box;
    background: rgba(255, 250, 241, 0.96);
    border: 1px solid var(--glass-border);
    padding: 0.35rem 0.65rem;
  }

  .sun-control-label {
    font-size: 0.75rem;
  }

  .sun-slider {
    flex: 1 1 auto;
    width: auto;
    min-width: 6rem;
  }

  .site-nav {
    position: fixed;
    z-index: 5;
    top: calc(var(--site-header-height) + 0.5rem + env(safe-area-inset-top));
    right: 0.75rem;
    left: 0.75rem;
    grid-column: auto;
    grid-row: auto;
    width: auto;
    max-height: calc(100dvh - var(--site-header-height) - var(--site-footer-height) - 1.5rem);
    overflow: auto;
    background: rgba(255, 250, 241, 0.97);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: 0 1rem 2.3rem rgba(43, 36, 30, 0.2);
    padding: 0.65rem;
  }

  .footer {
    height: calc(var(--site-footer-height) + env(safe-area-inset-bottom));
    min-height: calc(var(--site-footer-height) + env(safe-area-inset-bottom));
    padding: 0.25rem 0.75rem calc(0.25rem + env(safe-area-inset-bottom));
  }

  .footer-copy {
    font-size: 0.75rem;
    line-height: 1;
  }
}

/* Short-lived status shown while the first useful buildings enter the scene. */
.scene-loading-indicator {
  position: fixed;
  z-index: 1160;
  right: 50%;
  bottom: calc(var(--site-footer-height) + 1rem + env(safe-area-inset-bottom));
  display: inline-flex;
  align-items: center;
  gap: 0.58rem;
  min-height: 2.55rem;
  color: var(--warm-brown-dark);
  background: rgba(255, 250, 241, 0.94);
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  box-shadow: 0 0.75rem 1.8rem rgba(43, 36, 30, 0.18);
  padding: 0.5rem 0.85rem;
  font-size: var(--font-size-small);
  font-weight: var(--font-weight-action);
  line-height: 1.2;
  opacity: 0;
  pointer-events: none;
  transform: translate(50%, 0.45rem);
  transition:
    opacity 180ms ease,
    transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

.scene-loading-indicator[hidden] {
  display: none;
}

.scene-loading-indicator.active {
  opacity: 1;
  transform: translate(50%, 0);
}

.scene-loading-indicator.ready {
  color: var(--wine-accent);
}

.scene-loading-spinner {
  width: 0.9rem;
  height: 0.9rem;
  flex: 0 0 auto;
  border: 2px solid rgba(122, 20, 95, 0.2);
  border-top-color: var(--wine-accent);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}

.scene-loading-indicator.ready .scene-loading-spinner {
  border-color: var(--wine-accent);
  animation: none;
}

@media (max-width: 720px) {
  .scene-loading-indicator {
    bottom: calc(var(--site-footer-height) + 0.7rem + env(safe-area-inset-bottom));
    max-width: calc(100vw - 1.5rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  .model-load-restart-button.is-restarting svg {
    animation: none;
  }

  .scene-loading-indicator {
    transition: none;
  }

  .scene-loading-spinner {
    animation-duration: 1.5s;
  }
}

/* Place discovery: searchable, filterable access to every heritage marker. */
.site-nav .places-open-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  color: var(--wine-accent-strong);
  box-shadow: inset 0 0 0 1px var(--wine-accent-border);
}

.site-nav .places-open-button svg {
  width: 1rem;
  height: 1rem;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.place-explorer-overlay {
  position: fixed;
  z-index: 960;
  inset: var(--site-header-height) 0 var(--site-footer-height) 0;
  display: flex;
  align-items: stretch;
  justify-content: flex-start;
  box-sizing: border-box;
  padding: 0;
  background: transparent;
  opacity: 0;
  cursor: default;
  transition: opacity 180ms ease;
}

.place-explorer-overlay[hidden] {
  display: none;
}

.place-explorer-overlay.active {
  opacity: 1;
}

.place-explorer-panel {
  --info-panel-padding: 1.25rem;
  position: relative;
  width: min(86vw, 380px);
  height: 100%;
  box-sizing: border-box;
  color: var(--warm-brown-text);
  background: var(--panel-background);
  border: 1px solid var(--glass-border);
  border-left: 0;
  border-radius: 0 12px 12px 0;
  box-shadow: var(--glass-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.36);
  padding:
    var(--info-panel-padding)
    var(--info-panel-padding)
    var(--info-panel-padding)
    calc(var(--info-panel-padding) * 1.35);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  overflow: hidden;
  opacity: 0;
  transform: translateX(-105%);
  transition:
    opacity 200ms ease,
    transform 280ms cubic-bezier(0.22, 1, 0.36, 1);
}

.place-explorer-overlay.active .place-explorer-panel {
  opacity: 1;
  transform: translateX(0);
}

.place-explorer-content {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
}

.place-explorer-close {
  z-index: 6;
  top: var(--info-panel-padding);
  right: var(--info-panel-padding);
  box-shadow: 0 0.45rem 1rem rgba(0, 0, 0, 0.24);
}

.place-explorer-header {
  flex: 0 0 auto;
  padding-right: 2.2rem;
}

.place-explorer-kicker {
  color: var(--wine-accent);
  font-size: 0.72rem;
  font-weight: var(--font-weight-subtitle);
  letter-spacing: 0.09em;
  line-height: 1.3;
  margin: 0 0 0.35rem;
  text-transform: uppercase;
}

.place-explorer-header h2 {
  color: var(--warm-brown-dark);
  font-family: var(--font-family-brand);
  font-size: clamp(1.7rem, 4vw, 2.25rem);
  line-height: 1.05;
  margin: 0;
}

.place-explorer-header > p:last-child {
  max-width: 34rem;
  font-size: 0.85rem;
  line-height: 1.4;
  margin: 0.45rem 0 0;
}

.place-explorer-search {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.6rem;
  flex: 0 0 auto;
  min-height: 46px;
  background: rgba(255, 252, 246, 0.86);
  border: 1px solid rgba(115, 81, 59, 0.2);
  border-radius: 13px;
  margin-top: 1rem;
  padding: 0 0.85rem;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.place-explorer-search:focus-within {
  border-color: var(--wine-accent);
  box-shadow: 0 0 0 3px var(--wine-accent-soft);
}

.place-explorer-search svg {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: var(--wine-accent);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.place-explorer-search input {
  min-width: 0;
  height: 44px;
  color: var(--warm-brown-dark);
  background: transparent;
  border: 0;
  outline: 0;
  font: inherit;
  font-size: 0.88rem;
}

.place-explorer-search input::placeholder {
  color: rgba(79, 73, 64, 0.68);
}

.place-explorer-filters {
  display: flex;
  gap: 0.42rem;
  flex: 0 0 auto;
  margin: 0.75rem -0.1rem 0;
  padding: 0.1rem;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}

.place-explorer-filters::-webkit-scrollbar {
  display: none;
}

.place-explorer-filters button {
  flex: 0 0 auto;
  min-height: 34px;
  color: var(--warm-brown-text);
  background: rgba(255, 252, 246, 0.62);
  border: 1px solid rgba(115, 81, 59, 0.16);
  border-radius: 999px;
  padding: 0.42rem 0.7rem;
  font: inherit;
  font-size: 0.72rem;
  font-weight: var(--font-weight-action);
  line-height: 1;
}

.place-explorer-filters button[aria-pressed="true"] {
  color: #fff;
  background: var(--wine-accent);
  border-color: transparent;
}

.place-explorer-status {
  flex: 0 0 auto;
  color: var(--warm-brown-muted);
  font-size: 0.73rem;
  font-weight: var(--font-weight-action);
  line-height: 1.3;
  margin: 0.75rem 0 0.45rem;
}

.place-explorer-results {
  display: grid;
  gap: 0.55rem;
  flex: 1 1 auto;
  min-height: 0;
  margin: 0 -0.35rem 0 0;
  padding: 0 0.35rem 0 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  list-style: none;
  scrollbar-color: rgba(139, 30, 86, 0.24) transparent;
  scrollbar-width: thin;
}

.place-explorer-result {
  display: grid;
  grid-template-columns: 5.2rem minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 0.18rem 0.75rem;
  width: 100%;
  min-height: 6.2rem;
  box-sizing: border-box;
  color: var(--warm-brown-text);
  background: rgba(255, 252, 246, 0.68);
  border: 1px solid rgba(115, 81, 59, 0.14);
  border-radius: 14px;
  padding: 0.55rem;
  text-align: left;
  cursor: pointer;
  transition:
    background 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.place-explorer-result:hover,
.place-explorer-result:focus-visible {
  background: rgba(255, 252, 246, 0.94);
  border-color: var(--wine-accent-border);
  box-shadow: 0 0.65rem 1.3rem rgba(58, 38, 27, 0.12);
  transform: translateY(-1px);
}

.place-explorer-result[aria-current="true"] {
  background: rgba(255, 249, 244, 0.94);
  border-color: var(--wine-accent);
  box-shadow: inset 3px 0 0 var(--wine-accent);
}

.place-explorer-thumbnail {
  position: relative;
  grid-row: 1 / 3;
  display: grid;
  place-items: center;
  width: 5.2rem;
  height: 5.2rem;
  overflow: hidden;
  color: var(--wine-accent);
  background: linear-gradient(145deg, rgba(139, 30, 86, 0.1), rgba(132, 83, 47, 0.08));
  border-radius: 10px;
}

.place-explorer-thumbnail img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.place-explorer-thumbnail svg {
  width: 1.55rem;
  height: 1.55rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.75;
}

.place-explorer-result-copy {
  display: grid;
  align-content: start;
  min-width: 0;
}

.place-explorer-result-meta {
  color: var(--wine-accent);
  font-size: 0.65rem;
  font-weight: var(--font-weight-subtitle);
  letter-spacing: 0.04em;
  line-height: 1.2;
  text-transform: uppercase;
}

.place-explorer-result-copy strong {
  color: var(--warm-brown-dark);
  font-size: 0.91rem;
  line-height: 1.18;
  margin-top: 0.15rem;
}

.place-explorer-result-summary {
  display: -webkit-box;
  color: var(--warm-brown-text);
  font-size: 0.72rem;
  line-height: 1.3;
  margin-top: 0.25rem;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.place-explorer-result-action {
  align-self: end;
  color: var(--wine-accent);
  font-size: 0.68rem;
  font-weight: var(--font-weight-action);
  line-height: 1.2;
}

.place-explorer-result-action::after {
  content: " →";
}

.place-explorer-empty {
  display: grid;
  place-items: center;
  align-content: center;
  min-height: 12rem;
  color: var(--warm-brown-text);
  background: rgba(255, 252, 246, 0.52);
  border: 1px dashed rgba(115, 81, 59, 0.26);
  border-radius: 14px;
  padding: 1.25rem;
  text-align: center;
}

.place-explorer-empty strong {
  color: var(--warm-brown-dark);
}

.place-explorer-empty span {
  max-width: 18rem;
  font-size: 0.8rem;
  line-height: 1.4;
  margin-top: 0.3rem;
}

body.place-explorer-open .touch-navigation-controls {
  opacity: 0;
  pointer-events: none;
}

body.info-panel-open .scene-loading-indicator {
  display: none;
}

@media (min-width: 1120px) {
  .place-explorer-panel {
    width: min(30vw, 400px);
  }
}

@media (min-width: 1047px) and (max-width: 1180px) {
  .place-explorer-panel {
    width: min(34vw, 380px);
  }
}

@media (max-width: 1047px) {
  .place-explorer-panel {
    width: min(86vw, 360px);
  }
}

@media (max-width: 720px) {
  .place-explorer-overlay {
    align-items: flex-end;
    padding: 0;
  }

  .place-explorer-panel {
    --info-panel-padding: 1rem;
    width: 100%;
    height: 100%;
    max-height: 100%;
    border-width: 1px 0 0;
    border-radius: 16px 16px 0 0;
    padding: 1rem 0.9rem calc(0.8rem + env(safe-area-inset-bottom));
    transform: translateY(110%);
  }

  .place-explorer-overlay.active .place-explorer-panel {
    transform: translateY(0);
  }

  .place-explorer-close {
    top: 0.75rem;
    right: 0.75rem;
  }

  .place-explorer-header h2 {
    font-size: 1.7rem;
  }

  .place-explorer-header > p:last-child {
    font-size: 0.8rem;
  }

  .place-explorer-search {
    margin-top: 0.8rem;
  }

  .place-explorer-result {
    grid-template-columns: 4.7rem minmax(0, 1fr);
    min-height: 5.7rem;
  }

  .place-explorer-thumbnail {
    width: 4.7rem;
    height: 4.7rem;
  }

}

@media (prefers-reduced-motion: reduce) {
  .place-explorer-overlay,
  .place-explorer-panel,
  .place-explorer-result {
    transition: none;
  }
}

/* Structured heritage records: metadata, readable history and named galleries. */
.info-panel-metadata {
  display: grid;
  gap: 0.28rem;
  margin: 0 0 0.85rem;
  padding: 0.62rem 0;
  border-top: 1px solid rgba(115, 81, 59, 0.13);
  border-bottom: 1px solid rgba(115, 81, 59, 0.13);
}

.info-panel-metadata > div {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  align-items: baseline;
  gap: 0.45rem;
  min-width: 0;
  color: var(--warm-brown-text);
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
}

.info-panel-metadata dt {
  color: var(--warm-brown-muted);
  font-size: 0.68rem;
  font-weight: var(--font-weight-action);
  letter-spacing: 0.01em;
  line-height: 1.3;
  text-transform: none;
}

.info-panel-metadata dt::after {
  content: ":";
}

.info-panel-metadata dd {
  overflow-wrap: anywhere;
  font-size: 0.72rem;
  font-weight: var(--font-weight-body);
  line-height: 1.35;
  margin: 0;
}

.info-panel-primary-image {
  display: block;
  width: 100%;
  background: transparent;
  border: 0;
  border-radius: 9px;
  margin: 0.2rem 0 0;
  padding: 0;
  cursor: zoom-in;
}

.info-panel-primary-image:focus-visible,
.image-gallery-button:focus-visible {
  outline: 3px solid var(--wine-accent);
  outline-offset: 3px;
}

.info-panel .info-panel-primary-image img {
  margin: 0;
}

.info-panel-section {
  border-top: 1px solid rgba(115, 81, 59, 0.14);
  margin-top: 1.2rem;
  padding-top: 1rem;
}

.info-panel-section h3 {
  color: var(--warm-brown-dark);
  font-family: var(--font-family-brand);
  font-size: 1.18rem;
  line-height: 1.15;
  margin: 0 0 0.7rem;
}

.info-panel-history-copy > p:first-child {
  color: var(--warm-brown-dark);
  font-size: 0.98rem;
  line-height: 1.52;
}

.info-panel-history-copy p {
  margin: 0.8rem 0;
}

.info-panel-history-copy ul,
.info-panel-history-copy ol {
  padding-left: 1.2rem;
}

.info-panel-history-copy strong {
  color: var(--warm-brown-dark);
}

.info-panel-history-copy a {
  color: var(--wine-accent-strong);
  font-weight: var(--font-weight-action);
  text-decoration-color: var(--wine-accent-border);
  text-underline-offset: 0.15em;
}

.info-panel-section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.7rem;
}

.info-panel-section-heading h3 {
  margin-bottom: 0;
}

.info-panel-section-heading span {
  color: var(--warm-brown-muted);
  font-size: 0.68rem;
  font-weight: var(--font-weight-action);
  line-height: 1.2;
  white-space: nowrap;
}

.image-gallery-button {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background:
    linear-gradient(110deg, rgba(139, 30, 86, 0.06), rgba(255, 252, 246, 0.62), rgba(139, 30, 86, 0.06));
  border: 0;
  border-radius: 8px;
  padding: 0;
  cursor: zoom-in;
}

.image-gallery-button img {
  height: 100%;
  opacity: 1;
  object-fit: cover;
  transition:
    opacity 180ms ease,
    transform 160ms ease,
    box-shadow 160ms ease;
}

.image-gallery-button img:not([src]) {
  opacity: 0;
}

.image-gallery-button:hover img {
  opacity: 0.92;
  transform: translateY(-1px);
  box-shadow: 0 0.55rem 1.05rem rgba(58, 38, 27, 0.2);
}

.info-panel-mobile-metadata {
  overflow: hidden;
  color: var(--wine-accent);
  font-size: 0.66rem;
  font-weight: var(--font-weight-subtitle);
  letter-spacing: 0.035em;
  line-height: 1.2;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

@media (max-width: 720px) {
  .info-panel {
    width: 100%;
  }

  .info-panel-metadata {
    margin-right: 2.35rem;
  }

  .info-panel-section {
    margin-top: 1rem;
    padding-top: 0.9rem;
  }

  .info-panel-section h3 {
    font-size: 1.12rem;
  }

  .info-panel-history-copy > p:first-child {
    font-size: 0.94rem;
  }
}

/* Institutional story and credits */
.about-overlay {
  background: rgba(34, 27, 22, 0.62);
}

.about-panel {
  width: min(calc(100vw - 2rem), 1280px);
  background:
    radial-gradient(circle at 92% 4%, rgba(139, 30, 86, 0.08), transparent 20rem),
    linear-gradient(145deg, rgba(255, 253, 248, 0.99), rgba(246, 241, 232, 0.99));
  border-color: rgba(255, 252, 246, 0.72);
}

.about-panel-header {
  position: relative;
  z-index: 4;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.1rem;
}

.about-panel-header .about-kicker {
  margin-bottom: 0.3rem;
}

.about-panel-header h2 {
  margin-bottom: 0;
}

.about-panel-header .about-close-button {
  position: static;
  flex: 0 0 2.75rem;
  width: 2.75rem;
  height: 2.75rem;
  color: var(--wine-accent);
  background: rgba(139, 30, 86, 0.08);
  border: 1px solid rgba(139, 30, 86, 0.14);
}

.about-panel-header .about-close-button:hover {
  color: #fff;
  background: var(--wine-accent);
}

.about-content-layout {
  gap: clamp(1.35rem, 2.4vw, 2rem);
}

.about-story {
  display: grid;
  grid-template-columns: minmax(14rem, 0.7fr) minmax(0, 1fr);
  column-gap: clamp(1.5rem, 4vw, 4rem);
  row-gap: 0.65rem;
  padding: clamp(1rem, 2vw, 1.5rem);
  background: rgba(255, 252, 246, 0.64);
  border: 1px solid rgba(115, 81, 59, 0.14);
  border-radius: 14px;
  box-shadow: 0 0.75rem 1.8rem rgba(43, 36, 30, 0.07);
}

.about-story-kicker,
.about-story h3 {
  grid-column: 1;
}

.about-story h3 {
  align-self: start;
  margin-bottom: 0;
}

.about-story > p:not(.about-story-kicker),
.about-story-highlights {
  grid-column: 2;
}

.about-story > p:not(.about-story-kicker) {
  max-width: 60rem;
}

.about-story > p + p {
  margin-top: 0;
}

.about-story-highlights {
  margin-top: 0.3rem;
}

.about-team-section,
.about-areas {
  min-width: 0;
}

.about-section-heading {
  display: grid;
  gap: 0.2rem;
  margin-bottom: 0.85rem;
}

.about-section-heading > p {
  color: var(--wine-accent);
  font-size: 0.68rem;
  font-weight: var(--font-weight-subtitle);
  letter-spacing: 0.08em;
  line-height: 1.2;
  margin: 0;
  text-transform: uppercase;
}

.about-section-heading h3 {
  color: var(--warm-brown-dark);
  font-family: var(--font-family-brand);
  font-size: clamp(1.3rem, 2vw, 1.7rem);
  line-height: 1.12;
  margin: 0;
}

.about-section-heading > span {
  color: var(--warm-brown-muted);
  font-size: var(--font-size-small);
  line-height: 1.4;
}

.about-team-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(0.75rem, 1.3vw, 1rem);
}

.team-card {
  grid-template-columns: 4.2rem minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr) auto;
  align-content: start;
  justify-items: stretch;
  gap: 0.75rem;
  min-height: 0;
  padding: 1rem;
  text-align: left;
}

.team-card::after {
  top: 0.5rem;
  right: 0.5rem;
}

.team-photo-slot {
  grid-column: 1;
  grid-row: 1;
  align-self: center;
  width: 4.2rem;
  height: 4.2rem;
}

.team-card-header {
  grid-column: 2;
  grid-row: 1;
  align-self: center;
  padding: 0 1.7rem 0 0;
  border-bottom: 0;
}

.team-card-header .team-role {
  display: inline-block;
  width: auto;
  text-align: left;
}

.team-card h3 {
  font-size: 1.03rem;
}

.team-summary-list {
  grid-column: 1 / -1;
  grid-row: 2;
  min-height: 0;
  gap: 0.55rem;
}

.team-summary-list p {
  min-height: 0;
  padding: 0.58rem 0.62rem;
}

.team-summary-list p:hover {
  transform: none;
}

.team-summary-list p span:last-child {
  -webkit-line-clamp: 3;
}

.team-profile {
  grid-column: 1 / -1;
  grid-row: 3;
}

.team-profile summary {
  min-height: 2.75rem;
}

.about-areas {
  padding-top: 1.35rem;
  border-top: 1px solid rgba(115, 81, 59, 0.16);
}

.about-areas-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(0.65rem, 1.3vw, 1rem);
}

.about-areas-grid article {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 0.65rem;
  min-width: 0;
  padding: 0.85rem;
  background: rgba(255, 252, 246, 0.62);
  border: 1px solid rgba(115, 81, 59, 0.14);
  border-radius: 12px;
}

.about-areas-grid h4,
.about-areas-grid p {
  margin: 0;
}

.about-areas-grid h4 {
  color: var(--warm-brown-dark);
  font-size: var(--font-size-body);
  line-height: 1.25;
}

.about-areas-grid p {
  color: var(--warm-brown-text);
  font-size: var(--font-size-small);
  line-height: 1.42;
  margin-top: 0.22rem;
}

.about-area-icon {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  color: var(--wine-accent);
  background: rgba(139, 30, 86, 0.08);
  border: 1px solid rgba(139, 30, 86, 0.14);
  border-radius: 50%;
}

.about-area-icon svg {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.team-profile-close-button,
.team-profile-close-button:hover {
  color: #fff;
  background: rgba(43, 41, 36, 0.46);
  border: 1px solid rgba(255, 252, 246, 0.34);
}

@media (max-width: 1080px) {
  .about-story {
    grid-template-columns: 1fr;
  }

  .about-story-kicker,
  .about-story h3,
  .about-story > p:not(.about-story-kicker),
  .about-story-highlights {
    grid-column: 1;
  }

  .about-team-grid,
  .about-areas-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .about-overlay {
    padding: 0;
  }

  .about-panel {
    width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    padding:
      max(0.85rem, env(safe-area-inset-top))
      max(0.85rem, env(safe-area-inset-right))
      max(1.1rem, env(safe-area-inset-bottom))
      max(0.85rem, env(safe-area-inset-left));
    border: 0;
    border-radius: 0;
    scrollbar-gutter: auto;
  }

  .about-panel-header {
    position: sticky;
    top: calc(max(0.85rem, env(safe-area-inset-top)) * -1);
    align-items: center;
    margin:
      calc(max(0.85rem, env(safe-area-inset-top)) * -1)
      calc(max(0.85rem, env(safe-area-inset-right)) * -1)
      0.9rem
      calc(max(0.85rem, env(safe-area-inset-left)) * -1);
    padding:
      max(0.75rem, env(safe-area-inset-top))
      max(0.85rem, env(safe-area-inset-right))
      0.7rem
      max(0.85rem, env(safe-area-inset-left));
    background: rgba(251, 247, 240, 0.995);
    border-bottom: 1px solid rgba(115, 81, 59, 0.14);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
  }

  .about-panel-header .about-kicker {
    margin-bottom: 0.16rem;
  }

  .about-panel-header h2 {
    font-size: 1.65rem;
    margin: 0;
    white-space: nowrap;
  }

  .about-content-layout {
    gap: 1.2rem;
  }

  .about-story {
    gap: 0.55rem;
    padding: 0.9rem;
  }

  .about-story h3 {
    font-size: 1.35rem;
  }

  .about-story p {
    line-height: 1.5;
  }

  .about-story-highlights,
  .about-team-grid,
  .about-areas-grid {
    grid-template-columns: 1fr;
  }

  .about-story-highlights {
    gap: 0.5rem;
  }

  .about-story-highlights span {
    padding: 0.58rem 0.65rem;
  }

  .team-card {
    gap: 0.65rem;
    padding: 0.85rem;
  }

  .team-card:hover {
    transform: none;
  }

  .team-photo-slot {
    width: 3.8rem;
    height: 3.8rem;
  }

  .team-summary-list {
    display: grid;
  }

  .team-summary-list p {
    display: none;
    grid-template-columns: auto minmax(0, 1fr);
  }

  .team-summary-list p:last-child {
    display: grid;
  }

  .team-summary-list p:last-child span:last-child {
    display: block;
    -webkit-line-clamp: unset;
  }

  .about-areas {
    margin-top: 1.2rem;
  }

  .team-profile-overlay {
    padding: 0;
  }

  .team-profile-frame {
    width: 100%;
    min-height: 100dvh;
    max-height: 100dvh;
    border: 0;
    border-radius: 0;
    padding: 0.8rem;
    scrollbar-gutter: auto;
  }

  .team-profile-close-button {
    position: fixed;
    top: max(0.9rem, env(safe-area-inset-top));
    right: max(0.9rem, env(safe-area-inset-right));
    z-index: 3;
    width: 2.75rem;
    height: 2.75rem;
  }
}

/* Help demonstrations: show the gesture, the map response and the result. */
.help-demo {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-height: clamp(14rem, 25vw, 17rem);
  isolation: isolate;
}

.help-demo-toolbar {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 2.8rem;
  padding: 0.42rem 0.58rem 0.42rem 0.72rem;
  background: rgba(255, 252, 246, 0.88);
  border-bottom: 1px solid rgba(118, 87, 62, 0.13);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.help-demo-step {
  display: none;
  align-items: center;
  min-height: 1.7rem;
  color: var(--wine-accent);
  background: rgba(139, 30, 86, 0.08);
  border: 1px solid rgba(139, 30, 86, 0.14);
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: var(--font-weight-title);
  letter-spacing: 0.08em;
  line-height: 1;
  padding: 0.3rem 0.52rem;
}

.help-demo[data-help-demo="orbit"] [data-help-for="orbit"],
.help-demo[data-help-demo="zoom"] [data-help-for="zoom"],
.help-demo[data-help-demo="pin"] [data-help-for="pin"] {
  display: flex;
}

.help-demo-replay {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.36rem;
  min-width: 5.5rem;
  min-height: 2rem;
  color: var(--warm-brown-dark);
  background: rgba(255, 250, 242, 0.9);
  border: 1px solid rgba(118, 87, 62, 0.18);
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
  font-size: 0.76rem;
  font-weight: var(--font-weight-action);
  padding: 0.35rem 0.62rem;
  transition: color 160ms ease, background 160ms ease, border-color 160ms ease;
}

.help-demo-replay:hover {
  color: var(--wine-accent);
  background: #fffaf2;
  border-color: rgba(139, 30, 86, 0.28);
}

.help-demo-replay:focus-visible {
  outline: 3px solid rgba(139, 30, 86, 0.22);
  outline-offset: 2px;
}

.help-demo-replay-icon {
  display: inline-grid;
  place-items: center;
  width: 1.2rem;
  height: 1.2rem;
  color: var(--wine-accent);
  font-size: 1.18rem;
  line-height: 1;
  transform-origin: 50% 52%;
}

.help-demo.is-replaying .help-demo-replay-icon {
  animation: help-clarity-replay-icon 560ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.help-demo-stage {
  position: relative;
  z-index: 1;
  min-height: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 48%, rgba(255, 252, 244, 0.96), transparent 52%),
    linear-gradient(155deg, #f2ebde, #e3d8c7);
}

.help-demo-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  background: radial-gradient(circle at 50% 48%, transparent 48%, rgba(88, 61, 43, 0.08));
}

.help-demo-map {
  inset: 0;
  z-index: 1;
  transform-origin: 50% 54%;
  animation: none !important;
}

.help-demo-map::before {
  display: none;
}

.help-demo-building {
  background: linear-gradient(180deg, #f7f2e8, #c8bfa9);
  border-color: rgba(79, 73, 64, 0.28);
  box-shadow: 0 0.7rem 1.1rem rgba(63, 43, 33, 0.2);
}

.help-demo-building > .help-demo-marker {
  top: -1.55rem;
  right: auto;
  bottom: auto;
  left: 50%;
  z-index: 6;
  opacity: 1;
  transform: translateX(-50%) rotate(-45deg);
}

.help-demo-marker {
  z-index: 3;
  animation: none !important;
}

.help-demo-cursor {
  z-index: 8;
  width: 1.55rem;
  height: 1.95rem;
  border: 0;
  filter: drop-shadow(0 0.24rem 0.28rem rgba(43, 36, 30, 0.3));
  transform: none;
  animation: none !important;
}

.help-demo-cursor svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.help-demo-cursor path {
  fill: #fffaf2;
  stroke: var(--warm-brown-dark);
  stroke-linejoin: round;
  stroke-width: 2.2;
}

.help-demo-cursor::after {
  display: none;
}

.help-demo-cursor-click {
  position: absolute;
  left: -0.55rem;
  top: -0.5rem;
  width: 2.6rem;
  height: 2.6rem;
  border: 2px solid rgba(139, 30, 86, 0.5);
  border-radius: 50%;
  opacity: 0;
  transform: scale(0.35);
}

.help-demo-orbit-guide,
.help-demo-zoom-guide,
.help-demo-place-card {
  display: none;
}

.help-demo[data-help-demo="orbit"] .help-demo-orbit-guide {
  position: absolute;
  z-index: 6;
  left: 20%;
  top: 52%;
  display: flex;
  align-items: center;
  width: 58%;
  color: var(--wine-accent);
}

.help-demo-orbit-track {
  flex: 1;
  height: 2px;
  background:
    repeating-linear-gradient(90deg, rgba(139, 30, 86, 0.68) 0 0.45rem, transparent 0.45rem 0.75rem);
  transform-origin: left center;
}

.help-demo-orbit-arrow {
  display: grid;
  place-items: center;
  width: 1.35rem;
  height: 1.35rem;
  font-size: 1.8rem;
  line-height: 1;
  text-shadow: 0 0.2rem 0.5rem rgba(139, 30, 86, 0.2);
}

.help-demo[data-help-demo="zoom"] .help-demo-zoom-guide {
  position: absolute;
  z-index: 6;
  inset: 12% 18%;
  display: block;
}

.help-demo-zoom-ring,
.help-demo-touch-point {
  position: absolute;
  border-radius: 50%;
}

.help-demo-zoom-ring {
  left: 50%;
  top: 50%;
  width: 4.5rem;
  height: 4.5rem;
  border: 2px solid rgba(139, 30, 86, 0.34);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.55);
}

.help-demo-zoom-ring-two {
  border-color: rgba(109, 118, 99, 0.45);
}

.help-demo-touch-point {
  left: 50%;
  top: 50%;
  width: 1.05rem;
  height: 1.05rem;
  background: rgba(255, 250, 242, 0.92);
  border: 2px solid var(--wine-accent);
  box-shadow: 0 0.32rem 0.62rem rgba(63, 43, 33, 0.2);
  transform: translate(-50%, -50%);
}

.help-demo[data-help-demo="zoom"] .help-demo-cursor {
  display: none;
}

.help-demo[data-help-demo="pin"] .help-demo-place-card {
  position: absolute;
  z-index: 7;
  top: 0;
  bottom: 0;
  left: 0;
  display: grid;
  grid-template-rows: auto minmax(3rem, 1fr) auto;
  gap: 0.48rem;
  align-content: stretch;
  width: min(9.5rem, 36%);
  min-height: 0;
  background: rgba(255, 252, 246, 0.94);
  border: 1px solid rgba(139, 30, 86, 0.2);
  border-left: 0;
  border-radius: 0 9px 9px 0;
  box-shadow: 0.8rem 0 1.7rem rgba(43, 36, 30, 0.2);
  opacity: 0;
  padding: 0.58rem;
  transform: translateX(-105%);
}

.help-demo-place-card-close {
  position: absolute;
  top: 0.36rem;
  right: 0.38rem;
  display: grid;
  place-items: center;
  width: 1.05rem;
  height: 1.05rem;
  color: var(--warm-brown);
  background: rgba(118, 87, 62, 0.08);
  border-radius: 50%;
  font-size: 0.72rem;
  line-height: 1;
}

.help-demo-place-card-title {
  display: block;
  width: 68%;
  height: 0.46rem;
  margin: 0.18rem 1.2rem 0.08rem 0;
  background: var(--warm-brown-dark);
  border-radius: 999px;
}

.help-demo-place-card-image {
  width: 100%;
  min-height: 3rem;
  background:
    linear-gradient(145deg, transparent 45%, rgba(255, 252, 246, 0.38) 46% 53%, transparent 54%),
    linear-gradient(160deg, #80614b, #c9b89f 58%, #68745c);
  border-radius: 6px;
}

.help-demo-place-card-copy {
  display: grid;
  align-content: end;
  gap: 0.32rem;
}

.help-demo-place-card-copy span {
  display: block;
  height: 0.26rem;
  background: rgba(63, 43, 33, 0.25);
  border-radius: 999px;
}

.help-demo-place-card-copy span:last-child {
  width: 48%;
  background: rgba(139, 30, 86, 0.3);
}

.help-demo-copy {
  position: relative;
  z-index: 5;
  min-height: 3.35rem;
  background: rgba(255, 252, 246, 0.9);
  border-top: 1px solid rgba(118, 87, 62, 0.13);
  padding: 0.52rem 0.72rem 0.58rem;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.help-demo-copy p {
  display: none;
  align-items: baseline;
  gap: 0.48rem;
  color: var(--warm-brown-text);
  font-size: var(--font-size-small);
  line-height: 1.35;
  margin: 0;
}

.help-demo-copy strong {
  color: var(--wine-accent);
  font-weight: var(--font-weight-title);
  white-space: nowrap;
}

.help-demo-copy span {
  min-width: 0;
}

.help-item.active {
  background: rgba(255, 252, 244, 0.92);
  border-color: rgba(139, 30, 86, 0.38);
  box-shadow:
    inset 3px 0 0 var(--wine-accent),
    0 0.62rem 1.25rem rgba(63, 43, 33, 0.11);
}

.help-item.active .help-icon {
  color: #fffaf2;
  background: var(--wine-accent);
  border-color: var(--wine-accent);
  box-shadow: 0 0.36rem 0.8rem rgba(139, 30, 86, 0.22);
}

.help-demo[data-help-demo="orbit"] .help-demo-building-two {
  right: auto;
}

.help-demo[data-help-demo="orbit"] .help-demo-building-three {
  bottom: auto;
}

.help-demo.is-replaying[data-help-demo="orbit"] .help-demo-building-one {
  animation: help-clarity-orbit-building-one 4.2s cubic-bezier(0.45, 0, 0.2, 1) both;
}

.help-demo.is-replaying[data-help-demo="orbit"] .help-demo-building-two {
  animation: help-clarity-orbit-building-two 4.2s cubic-bezier(0.45, 0, 0.2, 1) both;
}

.help-demo.is-replaying[data-help-demo="orbit"] .help-demo-building-three {
  animation: help-clarity-orbit-building-three 4.2s cubic-bezier(0.45, 0, 0.2, 1) both;
}

.help-demo.is-replaying[data-help-demo="orbit"] .help-demo-cursor {
  animation: help-clarity-orbit-cursor 4.2s cubic-bezier(0.45, 0, 0.2, 1) both !important;
}

.help-demo.is-replaying[data-help-demo="zoom"] .help-demo-map {
  animation: help-clarity-zoom-map 4.2s cubic-bezier(0.4, 0, 0.2, 1) both !important;
}

.help-demo.is-replaying[data-help-demo="zoom"] .help-demo-touch-point-one {
  animation: help-clarity-zoom-touch-one 4.2s ease both;
}

.help-demo.is-replaying[data-help-demo="zoom"] .help-demo-touch-point-two {
  animation: help-clarity-zoom-touch-two 4.2s ease both;
}

.help-demo.is-replaying[data-help-demo="zoom"] .help-demo-zoom-ring-one {
  animation: help-clarity-zoom-ring 4.2s ease 0.15s both;
}

.help-demo.is-replaying[data-help-demo="zoom"] .help-demo-zoom-ring-two {
  animation: help-clarity-zoom-ring 4.2s ease 0.48s both;
}

.help-demo.is-replaying[data-help-demo="pin"] .help-demo-cursor {
  animation: help-clarity-pin-cursor 4.2s cubic-bezier(0.4, 0, 0.2, 1) both !important;
}

.help-demo.is-replaying[data-help-demo="pin"] .help-demo-cursor-click {
  animation: help-clarity-pin-click 4.2s ease both;
}

.help-demo.is-replaying[data-help-demo="pin"] .help-demo-marker-one {
  animation: help-clarity-pin-marker 4.2s ease both !important;
}

.help-demo.is-replaying[data-help-demo="pin"] .help-demo-place-card {
  animation: help-clarity-pin-card 4.2s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes help-clarity-replay-icon {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes help-clarity-orbit-building-one {
  from {
    left: 16%;
    top: 38%;
    z-index: 1;
    opacity: 0.74;
    transform: scale(0.68) rotate(-3deg);
  }
  to {
    left: 67%;
    top: 32%;
    z-index: 3;
    opacity: 0.94;
    transform: scale(0.92) rotate(4deg);
  }
}

@keyframes help-clarity-orbit-building-two {
  from {
    left: 39%;
    top: 45%;
    z-index: 5;
    opacity: 1;
    transform: scale(1.24) rotate(2deg);
  }
  to {
    left: 16%;
    top: 38%;
    z-index: 1;
    opacity: 0.74;
    transform: scale(0.68) rotate(-3deg);
  }
}

@keyframes help-clarity-orbit-building-three {
  from {
    left: 67%;
    top: 32%;
    z-index: 3;
    opacity: 0.94;
    transform: scale(0.92) rotate(4deg);
  }
  to {
    left: 39%;
    top: 45%;
    z-index: 5;
    opacity: 1;
    transform: scale(1.24) rotate(2deg);
  }
}

@keyframes help-clarity-orbit-cursor {
  from {
    left: 24%;
    top: 58%;
    opacity: 1;
  }
  to {
    left: 68%;
    top: 42%;
    opacity: 0.72;
  }
}

@keyframes help-clarity-zoom-map {
  0%,
  18% {
    transform: scale(1);
  }
  72%,
  100% {
    transform: scale(1.46);
  }
}

@keyframes help-clarity-zoom-touch-one {
  0% {
    left: 50%;
    top: 50%;
    opacity: 0;
  }
  16% {
    left: 46%;
    top: 47%;
    opacity: 1;
  }
  70%,
  100% {
    left: 26%;
    top: 30%;
    opacity: 1;
  }
}

@keyframes help-clarity-zoom-touch-two {
  0% {
    left: 50%;
    top: 50%;
    opacity: 0;
  }
  16% {
    left: 54%;
    top: 53%;
    opacity: 1;
  }
  70%,
  100% {
    left: 74%;
    top: 70%;
    opacity: 1;
  }
}

@keyframes help-clarity-zoom-ring {
  0%,
  10% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.45);
  }
  52% {
    opacity: 0.56;
  }
  82%,
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(2.15);
  }
}

@keyframes help-clarity-pin-cursor {
  0% {
    left: 62%;
    top: 66%;
    opacity: 0;
  }
  18% {
    left: 55%;
    top: 60%;
    opacity: 1;
  }
  52%,
  72% {
    left: 27%;
    top: 14%;
    opacity: 1;
  }
  100% {
    left: 27%;
    top: 14%;
    opacity: 0.65;
  }
}

@keyframes help-clarity-pin-click {
  0%,
  48% {
    opacity: 0;
    transform: scale(0.35);
  }
  58% {
    opacity: 0.78;
  }
  74%,
  100% {
    opacity: 0;
    transform: scale(1.25);
  }
}

@keyframes help-clarity-pin-marker {
  0%,
  42% {
    box-shadow: 0 0.4rem 0.85rem rgba(122, 20, 95, 0.24), 0 0 0 0 rgba(122, 20, 95, 0.35);
  }
  62% {
    box-shadow: 0 0.4rem 0.85rem rgba(122, 20, 95, 0.24), 0 0 0 0.72rem rgba(122, 20, 95, 0);
  }
  100% {
    box-shadow: 0 0.4rem 0.85rem rgba(122, 20, 95, 0.24), 0 0 0 0 rgba(122, 20, 95, 0);
  }
}

@keyframes help-clarity-pin-card {
  0%,
  56% {
    opacity: 0;
    transform: translateX(-105%);
  }
  72%,
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes help-clarity-pin-card-mobile {
  0%,
  56% {
    opacity: 0;
    transform: translateY(105%);
  }
  72%,
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 860px) {
  .help-panel {
    overflow-y: auto;
  }

  .help-layout .help-demo {
    min-height: 14rem;
  }
}

@media (max-width: 720px) {
  .help-demo[data-help-demo="pin"] .help-demo-place-card {
    top: auto;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 62%;
    grid-template-columns: 3.2rem minmax(0, 1fr);
    grid-template-rows: auto 1fr;
    column-gap: 0.52rem;
    row-gap: 0.32rem;
    border-width: 1px 0 0;
    border-radius: 9px 9px 0 0;
    box-shadow: 0 -0.7rem 1.4rem rgba(43, 36, 30, 0.18);
    padding: 0.48rem 0.58rem;
    transform: translateY(105%);
  }

  .help-demo[data-help-demo="pin"] .help-demo-place-card-title {
    grid-column: 2;
    grid-row: 1;
    align-self: center;
    margin-top: 0;
  }

  .help-demo[data-help-demo="pin"] .help-demo-place-card-image {
    grid-column: 1;
    grid-row: 1 / 3;
    min-height: 0;
    height: 100%;
  }

  .help-demo[data-help-demo="pin"] .help-demo-place-card-copy {
    grid-column: 2;
    grid-row: 2;
    align-content: start;
  }

  .help-demo.is-replaying[data-help-demo="pin"] .help-demo-place-card {
    animation: help-clarity-pin-card-mobile 4.2s cubic-bezier(0.22, 1, 0.36, 1) both;
  }
}

@media (max-width: 620px) {
  .help-layout .help-demo {
    min-height: 13.5rem;
  }

  .help-demo-toolbar {
    min-height: 2.65rem;
  }

  .help-demo-replay {
    min-height: 2.2rem;
  }

  .help-demo-copy {
    min-height: 3.1rem;
  }

  .help-demo-copy p {
    gap: 0.36rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .help-demo *,
  .help-demo *::before,
  .help-demo *::after {
    animation: none !important;
    transition: none !important;
  }

  .help-demo[data-help-demo="orbit"] .help-demo-map {
    transform: none;
  }

  .help-demo[data-help-demo="orbit"] .help-demo-building-one {
    left: 67%;
    top: 32%;
    z-index: 3;
    opacity: 0.94;
    transform: scale(0.92) rotate(4deg);
  }

  .help-demo[data-help-demo="orbit"] .help-demo-building-two {
    left: 16%;
    top: 38%;
    z-index: 1;
    opacity: 0.74;
    transform: scale(0.68) rotate(-3deg);
  }

  .help-demo[data-help-demo="orbit"] .help-demo-building-three {
    left: 39%;
    top: 45%;
    z-index: 5;
    opacity: 1;
    transform: scale(1.24) rotate(2deg);
  }

  .help-demo[data-help-demo="orbit"] .help-demo-cursor {
    left: 64%;
    top: 43%;
  }

  .help-demo[data-help-demo="zoom"] .help-demo-map {
    transform: scale(1.3);
  }

  .help-demo[data-help-demo="zoom"] .help-demo-touch-point-one {
    left: 27%;
    top: 31%;
  }

  .help-demo[data-help-demo="zoom"] .help-demo-touch-point-two {
    left: 73%;
    top: 69%;
  }

  .help-demo[data-help-demo="pin"] .help-demo-cursor {
    left: 27%;
    top: 14%;
  }

  .help-demo[data-help-demo="pin"] .help-demo-place-card {
    opacity: 1;
    transform: none;
  }
}

/* Navegación de la experiencia: cabecera editorial y herramientas sobre el mapa. */
.site-header {
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: clamp(1rem, 2vw, 2rem);
  padding-block: 0.25rem;
}

.site-brand {
  grid-column: 2;
  justify-self: center;
  color: var(--warm-brown-dark);
  background: transparent;
  border: 0;
  border-radius: 0.65rem;
  padding: 0.08rem 0.22rem;
  cursor: pointer;
}

.site-brand:hover {
  filter: drop-shadow(0 0.35rem 0.7rem rgba(43, 36, 30, 0.18));
}

.site-brand:focus-visible {
  outline: 2px solid var(--wine-accent);
  outline-offset: 0.22rem;
}

.site-nav {
  grid-column: 3;
  justify-self: end;
  flex-wrap: nowrap;
  gap: 0.18rem;
  max-width: none;
  padding-left: 0;
}

.site-nav > button {
  color: var(--warm-brown-dark);
}

.site-nav > button:hover,
.site-nav > button:focus-visible {
  color: var(--wine-accent);
  background: rgba(139, 30, 86, 0.07);
}

.map-tool-rail {
  position: fixed;
  z-index: 1240;
  top: calc(var(--site-header-height) + 1rem + env(safe-area-inset-top));
  right: max(0.85rem, env(safe-area-inset-right));
  left: auto;
  color: var(--warm-brown-dark);
}

.map-tool-primary {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  width: 4.65rem;
  box-sizing: border-box;
  padding: 0.38rem;
  background: #fffaf1;
  border: 1px solid rgba(91, 63, 45, 0.2);
  border-radius: 1.1rem;
  box-shadow:
    0 1rem 2.4rem rgba(43, 36, 30, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.map-tool-button,
.map-tool-mode .navigation-select-button {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.28rem;
  width: 100%;
  min-width: 0;
  min-height: 3.65rem;
  box-sizing: border-box;
  color: var(--warm-brown-dark);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 0.82rem;
  padding: 0.42rem 0.28rem;
  font-family: inherit;
  font-size: 0.67rem;
  font-weight: var(--font-weight-action);
  line-height: 1.05;
  text-align: center;
  cursor: pointer;
  transition:
    color 160ms ease,
    background-color 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.map-tool-button:hover,
.map-tool-button:focus-visible,
.map-tool-mode .navigation-select-button:hover,
.map-tool-mode .navigation-select-button:focus-visible {
  color: var(--wine-accent);
  background: rgba(139, 30, 86, 0.065);
  border-color: rgba(139, 30, 86, 0.12);
}

.map-tool-button:focus-visible,
.map-tool-mode .navigation-select-button:focus-visible {
  outline: 2px solid var(--wine-accent);
  outline-offset: 2px;
}

.map-tool-button.active,
.map-tool-primary .fast-travel-toggle-button.active {
  color: #fff;
  background: var(--wine-accent);
  border-color: transparent;
  box-shadow:
    0 0.6rem 1.1rem rgba(139, 30, 86, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.map-tool-button svg {
  width: 1.18rem;
  height: 1.18rem;
}

.map-tool-primary .fast-travel-toggle-label,
.map-tool-primary .model-load-restart-label {
  display: inline;
}

.map-tool-mode {
  width: 100%;
}

.map-tool-mode .navigation-select-button {
  position: relative;
  gap: 0.12rem;
  padding-right: 0.8rem;
}

.map-tool-mode .navigation-select-button > span {
  font-size: 0.58rem;
  letter-spacing: 0.02em;
}

.map-tool-mode .navigation-select-button strong {
  max-width: 100%;
  overflow: hidden;
  color: inherit;
  font-size: 0.72rem;
  text-overflow: ellipsis;
}

.map-tool-mode .navigation-select-button::after {
  position: absolute;
  right: 0.55rem;
  bottom: 0.62rem;
  width: 0.32rem;
  height: 0.32rem;
  border-width: 0 1.5px 1.5px 0;
}

.map-tool-rail .navigation-select-menu {
  top: 0;
  right: calc(100% + 0.55rem);
  left: auto;
  min-width: 8.6rem;
  padding: 0.35rem;
  background: #fffaf1;
  border-radius: 0.75rem;
  box-shadow: 0 0.9rem 2rem rgba(43, 36, 30, 0.2);
}

.map-tool-rail .navigation-select-menu button {
  width: 100%;
  color: var(--warm-brown-dark);
  background: transparent;
  border: 0;
  border-radius: 0.5rem;
  padding: 0.65rem 0.7rem;
  font: inherit;
  font-size: 0.78rem;
  font-weight: var(--font-weight-action);
  text-align: left;
  cursor: pointer;
}

.map-tool-rail .navigation-select-menu button:hover,
.map-tool-rail .navigation-select-menu button:focus-visible {
  color: var(--wine-accent);
  background: rgba(139, 30, 86, 0.07);
}

.map-tool-rail .navigation-select-menu .active {
  color: #fff;
  background: var(--wine-accent);
}

.map-tool-sun-icon {
  position: relative;
  width: 1rem;
  height: 1rem;
  box-sizing: border-box;
  background: #f1bd45;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  box-shadow: 0 0 0 0.2rem rgba(241, 189, 69, 0.2);
}

.map-tool-more-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  width: 1.2rem;
  height: 1.2rem;
}

.map-tool-more-icon i {
  width: 0.2rem;
  height: 0.2rem;
  background: currentColor;
  border-radius: 50%;
}

.map-tool-popover {
  position: absolute;
  top: 0;
  right: calc(100% + 0.65rem);
  left: auto;
  width: min(19rem, calc(100vw - 7rem));
  box-sizing: border-box;
  opacity: 0;
  color: var(--warm-brown-dark);
  background: #fffaf1;
  border: 1px solid rgba(91, 63, 45, 0.2);
  border-radius: 1rem;
  box-shadow:
    0 1.1rem 2.7rem rgba(43, 36, 30, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  padding: 0.9rem;
  transform: translateX(0.45rem) scale(0.98);
  transform-origin: right top;
  transition:
    opacity 170ms ease,
    transform 190ms cubic-bezier(0.22, 1, 0.36, 1);
}

.map-tool-popover.active {
  opacity: 1;
  transform: translateX(0) scale(1);
}

.map-tool-popover-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 2.5rem;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.8rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid rgba(91, 63, 45, 0.15);
}

.map-tool-popover-heading span {
  display: block;
  margin-bottom: 0.15rem;
  color: var(--wine-accent);
  font-size: 0.61rem;
  font-weight: var(--font-weight-title);
  letter-spacing: 0.12em;
  line-height: 1;
  text-transform: uppercase;
}

.map-tool-popover-heading h2 {
  grid-column: 1;
  justify-self: start;
  margin: 0;
  color: var(--warm-brown-dark);
  font-family: var(--font-family-title);
  font-size: 1.18rem;
  line-height: 1.1;
  text-align: left;
}

.map-tool-popover-close {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  flex: 0 0 auto;
  color: var(--warm-brown-dark);
  background: #f2eadc;
  border: 1px solid rgba(91, 63, 45, 0.16);
  border-radius: 50%;
  padding: 0;
  font: inherit;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
}

.map-tool-popover-close:hover,
.map-tool-popover-close:focus-visible {
  color: #fff;
  background: var(--wine-accent);
}

.map-tool-popover .app-toolbar {
  position: static;
  display: block;
  width: 100%;
  max-width: none;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: none;
}

.map-tool-popover .sun-control {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.55rem;
  min-height: 0;
  background: #f3ecdf;
  border: 1px solid rgba(91, 63, 45, 0.13);
  border-radius: 0.75rem;
  box-shadow: none;
  padding: 0.72rem;
}

.map-tool-popover .sun-slider {
  width: 100%;
  min-width: 0;
}

.map-tool-popover .sun-control-label {
  font-size: 0.66rem;
}

.map-tool-wide-action {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.65rem;
  width: 100%;
  min-height: 2.8rem;
  box-sizing: border-box;
  margin-top: 0.65rem;
  color: var(--warm-brown-dark);
  background: #f3ecdf;
  border: 1px solid rgba(91, 63, 45, 0.15);
  border-radius: 0.72rem;
  padding: 0.68rem 0.8rem;
  font: inherit;
  font-size: 0.76rem;
  font-weight: var(--font-weight-action);
  text-align: left;
  cursor: pointer;
}

.map-tool-wide-action:hover,
.map-tool-wide-action:focus-visible {
  color: var(--wine-accent);
  background: #fff7ea;
  border-color: rgba(139, 30, 86, 0.25);
}

.map-tool-wide-action svg {
  width: 1.15rem;
  height: 1.15rem;
}

.map-tool-wide-action .model-load-restart-label {
  display: inline;
}

.map-settings-editor-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
  margin-top: 0.7rem;
}

.map-settings-editor-actions .map-tool-wide-action {
  justify-content: center;
  margin-top: 0;
  text-align: center;
}

.map-tool-hint {
  margin: 0.7rem 0 0;
  color: rgba(74, 59, 48, 0.78);
  font-size: 0.69rem;
  line-height: 1.45;
}

@media (max-width: 1120px) {
  .site-header {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  }

  .menu-toggle-button {
    grid-column: 3;
  }

  .site-nav {
    grid-column: auto;
    justify-self: auto;
    width: min(18rem, calc(100vw - 1.5rem));
    padding: 0.55rem;
  }

  .site-nav.active {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }

  .site-nav > button {
    justify-content: flex-start;
    width: 100%;
    min-height: 2.8rem;
    border-radius: 0.65rem;
    padding-inline: 0.8rem;
    text-align: left;
  }
}

@media (max-width: 720px) {
  .site-brand img {
    width: 6.45rem;
    height: 2.35rem;
  }

  .site-brand span {
    font-size: 0.86rem;
  }

  .map-tool-rail {
    top: auto;
    right: auto;
    bottom: calc(var(--site-footer-height) + 0.65rem + env(safe-area-inset-bottom));
    left: 50%;
    width: min(25rem, calc(100vw - 1rem));
    transform: translateX(-50%);
  }

  .map-tool-primary {
    flex-direction: row;
    gap: 0.22rem;
    width: 100%;
    padding: 0.32rem;
    border-radius: 1rem;
  }

  .map-tool-primary > .map-tool-button,
  .map-tool-primary > .map-tool-mode {
    flex: 1 1 0;
    width: auto;
    min-width: 0;
  }

  .map-tool-button,
  .map-tool-mode .navigation-select-button {
    min-height: 3.3rem;
    border-radius: 0.72rem;
    padding-block: 0.35rem;
    font-size: 0.63rem;
  }

  .map-tool-mode .navigation-select-button > span {
    font-size: 0.52rem;
  }

  .map-tool-mode .navigation-select-button strong {
    font-size: 0.65rem;
  }

  .map-tool-rail .navigation-select-menu {
    top: auto;
    right: auto;
    bottom: calc(100% + 0.55rem);
    left: 0;
    min-width: 8rem;
    transform-origin: left bottom;
  }

  .map-tool-popover {
    top: auto;
    right: 0;
    bottom: calc(100% + 0.55rem);
    left: 0;
    width: 100%;
    transform: translateY(0.45rem) scale(0.98);
    transform-origin: center bottom;
  }

  .map-tool-popover.active {
    transform: translateY(0) scale(1);
  }

  body.navigation-mode-walk .map-tool-rail {
    top: calc(var(--site-header-height) + 0.55rem + env(safe-area-inset-top));
    bottom: auto;
  }

  body.navigation-mode-walk .map-tool-rail .navigation-select-menu {
    top: calc(100% + 0.55rem);
    bottom: auto;
    transform-origin: left top;
  }

  body.navigation-mode-walk .map-tool-popover {
    top: calc(100% + 0.55rem);
    bottom: auto;
    transform-origin: center top;
  }
}

@media (max-width: 390px) {
  .map-tool-rail {
    width: calc(100vw - 0.65rem);
  }

  .map-tool-primary {
    gap: 0.08rem;
    padding: 0.24rem;
  }

  .map-tool-button,
  .map-tool-mode .navigation-select-button {
    min-height: 3.05rem;
    font-size: 0.58rem;
  }

  .map-tool-popover {
    padding: 0.75rem;
  }

  .map-tool-popover .sun-control {
    grid-template-columns: 1fr;
  }

  .map-tool-popover .sun-control-label:last-child {
    text-align: right;
  }
}

@media (prefers-reduced-motion: reduce) {
  .map-tool-button,
  .map-tool-mode .navigation-select-button,
  .map-tool-popover {
    transition: none;
  }
}

/* Navegación principal: separa controles del recorrido y secciones del sitio. */
.site-nav {
  flex-wrap: nowrap;
  gap: 0.62rem;
  max-width: none;
}

.site-nav-right {
  padding-left: 1rem;
}

.site-nav-group {
  display: flex;
  align-items: center;
  gap: 0.16rem;
  min-width: 0;
}

.site-nav-group-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  margin: -1px;
  white-space: nowrap;
}

.site-nav-controls {
  padding: 0.18rem;
  background: rgba(139, 30, 86, 0.055);
  border: 1px solid rgba(139, 30, 86, 0.14);
  border-radius: 999px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.58);
}

.site-nav-primary {
  padding-left: 0.55rem;
  border-left: 1px solid rgba(91, 63, 45, 0.2);
}

.site-nav-controls .navigation-select-button {
  min-height: 40px;
  background: rgba(255, 250, 242, 0.72);
  border: 1px solid rgba(91, 63, 45, 0.12);
  box-shadow: 0 0.2rem 0.5rem rgba(48, 36, 28, 0.05);
}

.site-nav-controls > button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-width: 2.65rem;
}

.site-nav .environment-toggle-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.38rem;
}

.environment-toggle-icon {
  width: 1rem;
  height: 1rem;
  flex: 0 0 auto;
  box-sizing: border-box;
  background:
    linear-gradient(90deg, #fdf8ee 0 50%, #aebbb3 50% 100%);
  border: 1px solid rgba(91, 63, 45, 0.32);
  border-radius: 50%;
  box-shadow: 0 0.18rem 0.4rem rgba(48, 36, 28, 0.12);
}

.environment-toggle-button.active .environment-toggle-icon {
  background:
    linear-gradient(90deg, #8ba5b5 0 50%, #dce7ed 50% 100%);
}

.tree-toggle-icon {
  width: 1rem;
  height: 1rem;
  flex: 0 0 auto;
  box-sizing: border-box;
  background:
    radial-gradient(circle at 50% 38%, #7f985f 0 42%, transparent 43%),
    linear-gradient(180deg, transparent 0 62%, #74503a 62% 100%);
  border-radius: 0.2rem;
}

.tree-toggle-button.active .tree-toggle-icon {
  opacity: 0.4;
}

.site-nav-primary button {
  color: var(--about-copy, var(--warm-brown-text));
}

.site-nav-primary button:hover {
  color: var(--wine-accent);
}

.footer {
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
}

.footer-copy {
  grid-column: 2;
}

@media (max-width: 1500px) and (min-width: 1121px) {
  .site-nav {
    gap: 0.32rem;
  }

  .site-nav-controls .navigation-select-button {
    min-width: 5.4rem;
  }

  .site-nav-controls .navigation-select-button > span {
    display: none;
  }

  .site-nav-primary {
    gap: 0;
    padding-left: 0.32rem;
  }

  .site-nav-primary button {
    padding-inline: 0.55rem;
  }
}

@media (max-width: 1350px) and (min-width: 1121px) {
  .site-nav .environment-toggle-label {
    display: none;
  }

  .site-nav .environment-toggle-button {
    width: 2.65rem;
    padding-inline: 0.6rem;
  }
}

@media (max-width: 1120px) {
  .menu-toggle-button {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
    display: inline-grid;
    place-items: center;
    align-content: center;
    gap: 0.16rem;
    width: 44px;
    height: 44px;
    color: var(--warm-brown-dark);
    background: rgba(255, 249, 239, 0.72);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 0;
  }

  .menu-toggle-button span {
    display: block;
    width: 1.05rem;
    height: 2px;
    background: currentColor;
    border-radius: 999px;
    transition: opacity 160ms ease, transform 160ms ease;
  }

  .menu-toggle-button.active span:nth-child(1) {
    transform: translateY(0.28rem) rotate(45deg);
  }

  .menu-toggle-button.active span:nth-child(2) {
    opacity: 0;
  }

  .menu-toggle-button.active span:nth-child(3) {
    transform: translateY(-0.28rem) rotate(-45deg);
  }

  .site-nav {
    position: fixed;
    z-index: 5;
    top: calc(var(--site-header-height) + 0.6rem + env(safe-area-inset-top));
    right: max(0.75rem, env(safe-area-inset-right));
    display: none;
    width: min(25rem, calc(100vw - 1.5rem));
    max-height: calc(100dvh - var(--site-header-height) - var(--site-footer-height) - 1.5rem);
    box-sizing: border-box;
    overflow: auto;
    padding: 0.65rem;
    background: rgba(255, 250, 241, 0.98);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: 0 1rem 2.3rem rgba(43, 36, 30, 0.22);
    backdrop-filter: blur(18px) saturate(1.08);
    -webkit-backdrop-filter: blur(18px) saturate(1.08);
  }

  .site-nav-right {
    padding-left: 0;
  }

  .site-nav.active {
    display: grid;
    gap: 0.65rem;
  }

  .site-nav-group {
    min-width: 0;
    box-sizing: border-box;
  }

  .site-nav-primary {
    order: 1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.35rem;
    padding: 0.72rem;
    background: rgba(255, 250, 242, 0.72);
    border: 1px solid rgba(91, 63, 45, 0.12);
    border-radius: 12px;
  }

  .site-nav-controls {
    order: 2;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.4rem;
    padding: 0.72rem;
    background: rgba(139, 30, 86, 0.055);
    border: 1px solid rgba(139, 30, 86, 0.14);
    border-radius: 12px;
  }

  .site-nav-group-label {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip: auto;
    clip-path: none;
    margin: 0 0 0.18rem;
    color: var(--wine-accent);
    font-size: 0.66rem;
    font-weight: var(--font-weight-title);
    letter-spacing: 0.11em;
    line-height: 1.2;
    text-transform: uppercase;
    white-space: normal;
  }

  .site-nav-primary .site-nav-group-label {
    grid-column: 1 / -1;
  }

  .site-nav-controls .site-nav-group-label,
  .site-nav-controls .navigation-mode-select {
    grid-column: 1 / -1;
  }

  .site-nav-primary button,
  .site-nav-controls > button,
  .site-nav-controls .navigation-select-button {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    box-sizing: border-box;
    border-radius: 9px;
  }

  .site-nav-primary button {
    justify-content: flex-start;
    padding-inline: 0.7rem;
    text-align: left;
  }

  .site-nav-controls .navigation-select-button {
    justify-content: space-between;
    padding-inline: 0.72rem;
  }

  .site-nav .fast-travel-toggle-label,
  .site-nav .model-load-restart-label,
  .site-nav .environment-toggle-label {
    display: inline;
  }

  .site-nav-controls > button {
    flex-direction: column;
    gap: 0.25rem;
    min-height: 3.6rem;
    padding: 0.45rem 0.35rem;
    font-size: 0.7rem;
    line-height: 1.12;
    text-align: center;
    white-space: normal;
  }

  .site-nav .navigation-select-menu {
    right: 0;
    left: 0;
  }
}

@media (max-width: 720px) {
  .site-nav {
    top: calc(var(--site-header-height) + 0.5rem + env(safe-area-inset-top));
    right: 0.75rem;
    left: 0.75rem;
    width: auto;
  }

  .footer {
    grid-template-columns: 1fr;
  }

  .footer-info {
    display: none;
  }

  .footer-copy {
    grid-column: 1;
  }
}

@media (max-width: 390px) {
  .site-nav {
    right: 0.5rem;
    left: 0.5rem;
    padding: 0.5rem;
  }

  .site-nav-primary,
  .site-nav-controls {
    padding: 0.6rem;
  }

  .site-nav-controls > button {
    font-size: 0.65rem;
  }
}

/* Quiénes somos: composición editorial y perfiles tipo dossier. */
.about-overlay {
  --about-ink: #302d28;
  --about-copy: #51483f;
  --about-muted: #756b60;
  --about-paper: #f7f1e6;
  --about-paper-light: #fffaf2;
  --about-line: rgba(91, 63, 45, 0.18);
  padding: clamp(0.75rem, 2vw, 1.5rem);
  background: rgba(28, 23, 20, 0.74);
  backdrop-filter: blur(16px) saturate(0.9);
  -webkit-backdrop-filter: blur(16px) saturate(0.9);
}

.about-overlay .about-panel {
  position: relative;
  width: min(calc(100vw - 2rem), 1180px);
  max-height: min(92dvh, 960px);
  box-sizing: border-box;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  color: var(--about-copy);
  background:
    linear-gradient(rgba(91, 63, 45, 0.028) 1px, transparent 1px),
    var(--about-paper);
  background-size: 100% 2rem;
  border: 1px solid rgba(255, 249, 239, 0.72);
  border-radius: 24px;
  box-shadow:
    0 2.2rem 6rem rgba(17, 12, 9, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.72);
  padding: 0;
  scrollbar-gutter: stable;
}

.about-overlay .about-panel::-webkit-scrollbar {
  width: 0.62rem;
}

.about-overlay .about-panel::-webkit-scrollbar-thumb {
  background: rgba(91, 63, 45, 0.26);
  border: 2px solid var(--about-paper);
  border-radius: 999px;
}

.about-panel .about-panel-header {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 1.5rem;
  min-height: 10.5rem;
  box-sizing: border-box;
  overflow: hidden;
  margin: 0;
  padding: clamp(1.6rem, 3.6vw, 2.75rem) clamp(1.5rem, 4vw, 3.5rem);
  color: #fffaf2;
  background:
    linear-gradient(118deg, rgba(47, 36, 30, 0.98), rgba(87, 50, 56, 0.96) 58%, rgba(139, 30, 86, 0.9));
  border-bottom: 1px solid rgba(255, 239, 220, 0.18);
}

.about-panel .about-panel-header::before {
  content: "1950";
  position: absolute;
  z-index: -1;
  right: clamp(4.8rem, 11vw, 8rem);
  bottom: -0.3em;
  color: rgba(255, 250, 242, 0.065);
  font-family: var(--font-family-brand);
  font-size: clamp(6.5rem, 15vw, 11rem);
  font-weight: 700;
  letter-spacing: -0.08em;
  line-height: 0.8;
  pointer-events: none;
}

.about-panel .about-panel-header::after {
  content: "";
  position: absolute;
  z-index: -1;
  left: clamp(1.5rem, 4vw, 3.5rem);
  right: clamp(1.5rem, 4vw, 3.5rem);
  bottom: 1rem;
  height: 1px;
  background: linear-gradient(90deg, rgba(255, 239, 220, 0.48), transparent 74%);
}

.about-heading-copy {
  position: relative;
  z-index: 1;
  max-width: 46rem;
}

.about-panel-header .about-kicker {
  color: rgba(255, 246, 234, 0.72);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  margin: 0 0 0.45rem;
}

.about-panel-header h2 {
  color: #fffaf2;
  font-family: var(--font-family-brand);
  font-size: clamp(2.7rem, 6vw, 5.4rem);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 0.88;
  margin: 0;
}

.about-panel-header .about-lead {
  max-width: 40rem;
  color: rgba(255, 246, 234, 0.82);
  font-family: var(--font-family-brand);
  font-size: clamp(1rem, 1.7vw, 1.25rem);
  line-height: 1.35;
  margin: 0.85rem 0 0;
}

.about-panel-header .about-close-button {
  position: relative;
  z-index: 3;
  display: grid;
  place-items: center;
  flex: none;
  width: 2.8rem;
  height: 2.8rem;
  color: #fffaf2;
  background: rgba(255, 250, 242, 0.08);
  border: 1px solid rgba(255, 250, 242, 0.24);
  border-radius: 50%;
  box-shadow: none;
}

.about-panel-header .about-close-button:hover {
  color: var(--wine-accent);
  background: #fffaf2;
  border-color: #fffaf2;
  transform: rotate(4deg);
}

.about-panel .about-content-layout {
  display: grid;
  gap: clamp(2.3rem, 5vw, 4.2rem);
  width: auto;
  margin: 0;
  padding: clamp(1.5rem, 4vw, 3.5rem);
}

.about-panel .about-story {
  display: grid;
  grid-template-columns: minmax(15rem, 0.72fr) minmax(0, 1.28fr);
  column-gap: clamp(2rem, 6vw, 5.2rem);
  row-gap: 0.75rem;
  width: auto;
  margin: 0;
  padding: 0 0 clamp(2rem, 4vw, 3.25rem);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--about-line);
  border-radius: 0;
  box-shadow: none;
}

.about-panel .about-story-heading {
  grid-column: 1;
  display: grid;
  align-content: start;
  gap: 0.65rem;
  min-width: 0;
}

.about-panel .about-story-copy {
  grid-column: 2;
  display: grid;
  align-content: start;
  gap: 0.9rem;
  min-width: 0;
}

.about-panel .about-story-kicker {
  color: var(--wine-accent);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  margin: 0;
}

.about-panel .about-story h3 {
  max-width: 27rem;
  color: var(--about-ink);
  font-family: var(--font-family-brand);
  font-size: clamp(2rem, 4.2vw, 3.55rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 0.98;
  margin: 0;
}

.about-panel .about-story-copy p {
  max-width: 48rem;
  color: var(--about-copy);
  font-size: clamp(0.94rem, 1.25vw, 1.04rem);
  line-height: 1.72;
  margin: 0;
}

.about-panel .about-section-heading {
  display: grid;
  grid-template-columns: minmax(8rem, 0.35fr) minmax(0, 1fr);
  align-items: end;
  column-gap: clamp(1rem, 3vw, 2.5rem);
  row-gap: 0.32rem;
  margin: 0 0 1.15rem;
}

.about-panel .about-section-heading > p {
  grid-column: 1;
  grid-row: 1 / span 2;
  align-self: start;
  color: var(--wine-accent);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  margin-top: 0.25rem;
}

.about-panel .about-section-heading h3,
.about-panel .about-section-heading > span {
  grid-column: 2;
}

.about-panel .about-section-heading h3 {
  color: var(--about-ink);
  font-family: var(--font-family-brand);
  font-size: clamp(1.75rem, 3.4vw, 2.8rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1;
}

.about-panel .about-section-heading > span {
  max-width: 44rem;
  color: var(--about-muted);
  font-size: 0.84rem;
  line-height: 1.5;
}

.about-panel .about-areas {
  margin: 0;
  padding: clamp(2rem, 4vw, 3.25rem) 0 0;
  border: 0;
  border-top: 1px solid var(--about-line);
}

.about-panel .about-areas-grid {
  counter-reset: about-area;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(0.7rem, 1.5vw, 1rem);
}

.about-panel .about-areas-grid article {
  counter-increment: about-area;
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: 1fr;
  align-content: start;
  gap: 1.2rem;
  min-height: 12.5rem;
  box-sizing: border-box;
  overflow: hidden;
  padding: 1.25rem;
  color: var(--about-copy);
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.66), transparent 58%),
    #eee4d4;
  border: 1px solid rgba(91, 63, 45, 0.14);
  border-top: 3px solid var(--wine-accent);
  border-radius: 4px 4px 14px 14px;
  box-shadow: 0 0.7rem 1.5rem rgba(48, 36, 28, 0.07);
}

.about-panel .about-areas-grid article::after {
  content: "0" counter(about-area);
  position: absolute;
  z-index: -1;
  right: 0.45rem;
  bottom: -0.22em;
  color: rgba(91, 63, 45, 0.07);
  font-family: var(--font-family-brand);
  font-size: 5.8rem;
  font-weight: 700;
  line-height: 1;
}

.about-panel .about-area-icon {
  width: 2.55rem;
  height: 2.55rem;
  color: #fffaf2;
  background: var(--wine-accent);
  border: 0;
  border-radius: 50%;
  box-shadow: 0 0.45rem 0.9rem rgba(139, 30, 86, 0.18);
}

.about-panel .about-area-icon svg {
  width: 1.15rem;
  height: 1.15rem;
}

.about-panel .about-areas-grid h4 {
  color: var(--about-ink);
  font-family: var(--font-family-brand);
  font-size: 1.18rem;
  line-height: 1.1;
}

.about-panel .about-areas-grid p {
  color: var(--about-copy);
  font-size: 0.82rem;
  line-height: 1.5;
  margin-top: 0.45rem;
}

.about-panel .about-team-section {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.about-panel .about-team-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(0.85rem, 2vw, 1.25rem);
  margin: 0;
}

.about-panel .team-card {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: 6.5rem minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr) auto;
  align-content: start;
  justify-items: stretch;
  gap: 0.85rem 1rem;
  min-width: 0;
  min-height: 17.5rem;
  box-sizing: border-box;
  overflow: hidden;
  padding: 1.2rem;
  color: var(--about-copy);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.78), rgba(255, 250, 242, 0.92)),
    var(--about-paper-light);
  border: 1px solid rgba(91, 63, 45, 0.18);
  border-radius: 16px;
  box-shadow:
    0 0.8rem 1.8rem rgba(48, 36, 28, 0.09),
    inset 0 1px 0 rgba(255, 255, 255, 0.82);
  text-align: left;
  transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
}

.about-panel .team-card::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background:
    linear-gradient(90deg, var(--wine-accent), #a76447) 0 0 / 100% 4px no-repeat,
    radial-gradient(circle at 0 100%, rgba(139, 30, 86, 0.07), transparent 11rem);
  opacity: 1;
  pointer-events: none;
}

.about-panel .team-card::after {
  content: none;
}

.about-panel .team-card:hover {
  border-color: rgba(139, 30, 86, 0.3);
  box-shadow:
    0 1.1rem 2.3rem rgba(48, 36, 28, 0.13),
    inset 0 1px 0 rgba(255, 255, 255, 0.86);
  transform: translateY(-3px);
}

.about-panel .team-photo-slot {
  grid-column: 1;
  grid-row: 1 / span 2;
  align-self: start;
  width: 6.5rem;
  height: 7.75rem;
  overflow: hidden;
  background: #ded0bc;
  border: 1px solid rgba(91, 63, 45, 0.2);
  border-radius: 10px;
  box-shadow:
    0 0.6rem 1.2rem rgba(48, 36, 28, 0.14),
    0 0 0 0.32rem rgba(255, 250, 242, 0.88);
}

.about-panel .team-photo-slot::after {
  content: none;
}

.about-panel .team-photo-slot img {
  width: 100%;
  height: 100%;
  filter: saturate(0.82) contrast(1.04);
  object-fit: cover;
}

.about-panel .team-avatar {
  width: 100%;
  height: 100%;
  color: #fffaf2;
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.16), transparent 44%),
    linear-gradient(145deg, #71513d, #8b1e56);
  border: 0;
  border-radius: 0;
  font-family: var(--font-family-brand);
  font-size: 1.65rem;
  letter-spacing: 0.04em;
}

.about-panel .team-card-header {
  grid-column: 2;
  grid-row: 1;
  align-self: start;
  min-width: 0;
  padding: 0.12rem 2.4rem 0 0;
  border: 0;
}

.about-panel .team-card-header .team-role {
  display: block;
  width: auto;
  max-width: 24rem;
  color: var(--wine-accent);
  background: transparent;
  border: 0;
  border-radius: 0;
  font-size: 0.65rem;
  letter-spacing: 0.095em;
  line-height: 1.35;
  margin: 0 0 0.4rem;
  padding: 0;
  text-align: left;
  text-transform: uppercase;
}

.about-panel .team-card-header .team-role::after {
  content: none;
}

.about-panel .team-card h3 {
  color: var(--about-ink);
  font-family: var(--font-family-brand);
  font-size: clamp(1.38rem, 2.4vw, 1.8rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.05;
  margin: 0;
}

.about-panel .team-subtitle {
  color: var(--about-muted);
  font-size: 0.76rem;
  line-height: 1.4;
  margin-top: 0.4rem;
}

.about-panel .team-summary-list {
  grid-column: 2;
  grid-row: 2;
  display: block;
  min-height: 0;
  margin: 0;
}

.about-panel .team-summary-list p {
  display: none;
}

.about-panel .team-summary-list p:last-child {
  display: block;
  min-height: 0;
  color: var(--about-copy);
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  font-size: 0.8rem;
  line-height: 1.52;
  margin: 0;
  padding: 0;
}

.about-panel .team-summary-list p:last-child .team-summary-icon {
  display: none;
}

.about-panel .team-summary-list p:last-child span:last-child {
  display: block;
  overflow: visible;
  -webkit-box-orient: initial;
  -webkit-line-clamp: unset;
}

.about-panel .team-summary-list strong {
  display: block;
  color: var(--about-ink);
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  line-height: 1.3;
  margin-bottom: 0.28rem;
  text-transform: uppercase;
}

.about-panel .team-profile {
  grid-column: 2;
  grid-row: 3;
  align-self: end;
  width: max-content;
  max-width: 100%;
  margin: 0;
}

.about-panel .team-profile summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  min-height: 2.5rem;
  box-sizing: border-box;
  color: #fffaf2;
  background: var(--wine-accent);
  border: 1px solid var(--wine-accent);
  border-radius: 999px;
  box-shadow: 0 0.45rem 0.9rem rgba(139, 30, 86, 0.18);
  font-size: 0.72rem;
  padding: 0.65rem 1rem;
}

.about-panel .team-profile summary::after {
  content: "→";
  font-size: 1rem;
  line-height: 1;
  transform: none;
}

.about-panel .team-profile summary:hover {
  color: #fffaf2;
  background: var(--wine-accent-strong);
  border-color: var(--wine-accent-strong);
  box-shadow: 0 0.65rem 1.2rem rgba(139, 30, 86, 0.24);
  transform: translateX(2px);
}

.about-panel .team-profile-body {
  display: none;
}

.team-profile-overlay {
  padding: clamp(0.75rem, 2vw, 1.5rem);
  background: rgba(25, 20, 17, 0.82);
  backdrop-filter: blur(18px) saturate(0.86);
  -webkit-backdrop-filter: blur(18px) saturate(0.86);
}

.team-profile-overlay .team-profile-frame {
  position: relative;
  display: grid;
  grid-template-columns: minmax(15rem, 18rem) minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  gap: 0;
  width: min(calc(100vw - 2rem), 980px);
  max-height: min(92dvh, 820px);
  overflow-x: hidden;
  overflow-y: auto;
  color: #51483f;
  background: #f7f1e6;
  border: 1px solid rgba(255, 249, 239, 0.7);
  border-radius: 22px;
  box-shadow: 0 2.2rem 6rem rgba(15, 10, 8, 0.48);
  padding: 0;
  scrollbar-gutter: stable;
}

.team-profile-frame .team-profile-close-button {
  position: absolute;
  z-index: 5;
  top: 1rem;
  right: 1rem;
  display: grid;
  place-items: center;
  width: 2.7rem;
  height: 2.7rem;
  color: var(--wine-accent);
  background: rgba(255, 250, 242, 0.9);
  border: 1px solid rgba(139, 30, 86, 0.18);
  border-radius: 50%;
  box-shadow: 0 0.55rem 1.1rem rgba(48, 36, 28, 0.16);
}

.team-profile-frame .team-profile-close-button:hover {
  color: #fffaf2;
  background: var(--wine-accent);
  border-color: var(--wine-accent);
}

.team-profile-frame .team-profile-modal-header {
  position: sticky;
  top: 0;
  grid-column: 1;
  grid-row: 1 / span 2;
  align-self: start;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.2rem;
  min-width: 0;
  min-height: 100%;
  box-sizing: border-box;
  color: #fffaf2;
  background:
    radial-gradient(circle at 20% 8%, rgba(255, 255, 255, 0.12), transparent 12rem),
    linear-gradient(155deg, #3f3028, #6d3846 58%, #8b1e56);
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 2rem 1.5rem;
}

.team-profile-frame .team-profile-modal-photo {
  width: min(100%, 11rem);
  height: 12.5rem;
  margin-top: 0.2rem;
  overflow: hidden;
  background: rgba(255, 250, 242, 0.1);
  border: 1px solid rgba(255, 250, 242, 0.24);
  border-radius: 12px;
  box-shadow: 0 0.8rem 1.8rem rgba(20, 12, 9, 0.24);
}

.team-profile-frame .team-profile-modal-photo::after {
  content: none;
}

.team-profile-frame .team-profile-modal-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.team-profile-frame .team-profile-modal-heading {
  min-width: 0;
}

.team-profile-frame .team-profile-modal-heading .team-role {
  display: block;
  width: auto;
  color: rgba(255, 246, 234, 0.72);
  background: transparent;
  border: 0;
  border-radius: 0;
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  line-height: 1.45;
  margin: 0 0 0.65rem;
  padding: 0;
  text-transform: uppercase;
}

.team-profile-frame .team-profile-modal-heading h3 {
  color: #fffaf2;
  font-family: var(--font-family-brand);
  font-size: clamp(2rem, 4vw, 3.25rem);
  letter-spacing: -0.04em;
  line-height: 0.98;
  margin: 0;
}

.team-profile-frame .team-profile-modal-intro {
  grid-column: 2;
  grid-row: 1;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.65rem;
  margin: 0;
  padding: 2rem 4.8rem 1rem 2rem;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.team-profile-frame .team-profile-modal-intro p {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 0.7rem;
  color: #51483f;
  background: #fffaf2;
  border: 1px solid rgba(91, 63, 45, 0.14);
  border-radius: 10px;
  box-shadow: 0 0.4rem 0.9rem rgba(48, 36, 28, 0.06);
  line-height: 1.55;
  padding: 0.78rem;
}

.team-profile-frame .team-profile-modal-intro strong {
  color: #302d28;
}

.team-profile-frame .team-profile-modal-intro p span:last-child {
  display: block;
  overflow: visible;
  -webkit-box-orient: initial;
  -webkit-line-clamp: unset;
}

.team-profile-frame .team-profile-modal-intro .team-summary-icon {
  color: #fffaf2;
  background: var(--wine-accent);
  border: 0;
}

.team-profile-frame .team-profile-modal-body {
  grid-column: 2;
  grid-row: 2;
  display: grid;
  gap: 0.7rem;
  max-height: none;
  overflow: visible;
  margin: 0;
  padding: 0.25rem 2rem 2rem;
}

.team-profile-frame .team-profile-modal-body h4 {
  color: var(--wine-accent);
  font-size: 0.73rem;
  letter-spacing: 0.08em;
  line-height: 1.3;
  margin: 0.8rem 0 0;
  text-transform: uppercase;
}

.team-profile-frame .team-profile-modal-body h4::before {
  width: 0.42rem;
  height: 0.42rem;
  background: var(--wine-accent);
}

.team-profile-frame .team-profile-modal-body p,
.team-profile-frame .team-profile-modal-body li {
  color: #51483f;
  line-height: 1.58;
}

.team-profile-frame .team-profile-modal-body ul {
  gap: 0.52rem;
}

.team-profile-frame .team-profile-modal-body li::before {
  background: var(--wine-accent);
}

.team-profile-frame .team-tags {
  gap: 0.42rem;
}

.team-profile-frame .team-tags span {
  color: #5a4135;
  background: #eee4d4;
  border-color: rgba(91, 63, 45, 0.14);
}

.team-profile-frame .team-profile-modal-body blockquote {
  color: #3e342d;
  background: #fffaf2;
  border: 1px solid rgba(91, 63, 45, 0.16);
  border-left: 4px solid var(--wine-accent);
  border-radius: 0 10px 10px 0;
  font-size: 1.08rem;
  line-height: 1.5;
  padding: 0.9rem 1rem;
}

@media (max-width: 980px) {
  .about-panel .about-story {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .about-panel .about-story-heading,
  .about-panel .about-story-copy {
    grid-column: 1;
  }

  .about-panel .about-story h3 {
    max-width: 42rem;
    margin-bottom: 0.55rem;
  }

  .about-panel .about-areas-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .team-profile-overlay .team-profile-frame {
    grid-template-columns: minmax(13rem, 15rem) minmax(0, 1fr);
  }
}

@media (max-width: 720px) {
  .about-overlay {
    padding: 0;
  }

  .about-overlay .about-panel {
    width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    border: 0;
    border-radius: 0;
    scrollbar-gutter: auto;
  }

  .about-panel .about-panel-header {
    position: relative;
    top: auto;
    min-height: 9.5rem;
    margin: 0;
    padding:
      calc(1.2rem + env(safe-area-inset-top))
      calc(1rem + env(safe-area-inset-right))
      1.35rem
      calc(1rem + env(safe-area-inset-left));
  }

  .about-panel .about-panel-header::before {
    right: 4.2rem;
    font-size: 7.5rem;
  }

  .about-panel-header h2 {
    font-size: clamp(2.45rem, 13vw, 3.6rem);
    white-space: normal;
  }

  .about-panel-header .about-lead {
    max-width: 18rem;
    font-size: 0.9rem;
    margin-top: 0.65rem;
  }

  .about-panel-header .about-close-button {
    width: 2.65rem;
    height: 2.65rem;
  }

  .about-panel .about-content-layout {
    gap: 2.4rem;
    padding:
      1.4rem
      calc(0.9rem + env(safe-area-inset-right))
      calc(1.8rem + env(safe-area-inset-bottom))
      calc(0.9rem + env(safe-area-inset-left));
  }

  .about-panel .about-story {
    padding-bottom: 2rem;
  }

  .about-panel .about-story h3 {
    font-size: clamp(1.85rem, 9vw, 2.6rem);
  }

  .about-panel .about-story-copy p {
    font-size: 0.9rem;
    line-height: 1.62;
  }

  .about-panel .about-section-heading {
    grid-template-columns: 1fr;
    gap: 0.28rem;
  }

  .about-panel .about-section-heading > p,
  .about-panel .about-section-heading h3,
  .about-panel .about-section-heading > span {
    grid-column: 1;
    grid-row: auto;
  }

  .about-panel .about-section-heading > p {
    margin: 0 0 0.12rem;
  }

  .about-panel .about-section-heading h3 {
    font-size: 2rem;
  }

  .about-panel .about-areas-grid,
  .about-panel .about-team-grid {
    grid-template-columns: 1fr;
  }

  .about-panel .about-areas-grid article {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.85rem;
    min-height: 0;
    padding: 1rem;
  }

  .about-panel .about-area-icon {
    grid-row: 1;
  }

  .about-panel .about-areas-grid article > div {
    grid-column: 2;
    grid-row: 1;
  }

  .about-panel .about-areas-grid article::after {
    font-size: 4.5rem;
  }

  .about-panel .about-team-section {
    padding: 0;
  }

  .about-panel .about-areas {
    padding-top: 2.2rem;
  }

  .about-panel .team-card {
    grid-template-columns: 4.5rem minmax(0, 1fr);
    gap: 0.72rem 0.85rem;
    min-height: 0;
    padding: 1rem;
  }

  .about-panel .team-photo-slot {
    width: 4.5rem;
    height: 5.25rem;
    box-shadow:
      0 0.45rem 0.9rem rgba(48, 36, 28, 0.12),
      0 0 0 0.22rem rgba(255, 250, 242, 0.88);
  }

  .about-panel .team-card-header {
    padding-right: 1.3rem;
  }

  .about-panel .team-card h3 {
    font-size: 1.35rem;
  }

  .about-panel .team-summary-list,
  .about-panel .team-profile {
    grid-column: 1 / -1;
  }

  .about-panel .team-summary-list {
    grid-row: 3;
  }

  .about-panel .team-profile {
    grid-row: 4;
  }

  .team-profile-overlay {
    padding: 0;
  }

  .team-profile-overlay .team-profile-frame {
    display: block;
    width: 100%;
    min-height: 100dvh;
    max-height: 100dvh;
    border: 0;
    border-radius: 0;
    scrollbar-gutter: auto;
  }

  .team-profile-frame .team-profile-close-button {
    position: fixed;
    top: calc(0.8rem + env(safe-area-inset-top));
    right: calc(0.8rem + env(safe-area-inset-right));
  }

  .team-profile-frame .team-profile-modal-header {
    position: relative;
    min-height: 0;
    padding:
      calc(1.2rem + env(safe-area-inset-top))
      4.3rem
      1.2rem
      calc(1rem + env(safe-area-inset-left));
  }

  .team-profile-frame .team-profile-modal-photo {
    width: 5.5rem;
    height: 6.4rem;
    margin: 0;
  }

  .team-profile-frame .team-profile-modal-heading h3 {
    font-size: 2.25rem;
  }

  .team-profile-frame .team-profile-modal-intro {
    padding: 1rem;
  }

  .team-profile-frame .team-profile-modal-body {
    padding: 0 1rem calc(1.5rem + env(safe-area-inset-bottom));
  }
}

@media (max-width: 390px) {
  .about-panel .team-card {
    grid-template-columns: 3.9rem minmax(0, 1fr);
  }

  .about-panel .team-photo-slot {
    width: 3.9rem;
    height: 4.6rem;
  }

  .about-panel .team-card-header .team-role {
    font-size: 0.59rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .about-panel .team-card,
  .about-panel .team-profile summary,
  .about-panel-header .about-close-button {
    transition: none;
  }
}

/* Ayuda específica del modo peatonal */
.walk-help-overlay {
  position: fixed;
  inset: 0;
  z-index: 9050;
  display: grid;
  place-items: center;
  padding: clamp(0.75rem, 2.5vw, 1.8rem);
  background:
    radial-gradient(circle at 18% 18%, rgba(139, 30, 86, 0.18), transparent 24rem),
    radial-gradient(circle at 86% 20%, rgba(109, 118, 99, 0.18), transparent 23rem),
    rgba(24, 22, 19, 0.42);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 220ms ease, visibility 220ms ease;
  backdrop-filter: blur(14px) saturate(1.08);
  -webkit-backdrop-filter: blur(14px) saturate(1.08);
}

.walk-help-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.walk-help-panel {
  position: relative;
  width: min(94vw, 50rem);
  max-height: min(92dvh, 48rem);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: clamp(1.25rem, 3vw, 2rem);
  border: 1px solid rgba(255, 252, 246, 0.5);
  border-radius: var(--panel-radius);
  color: var(--warm-brown-text);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.42), rgba(232, 238, 220, 0.13)),
    var(--paper-strong);
  box-shadow: var(--glass-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.42);
  opacity: 0;
  transform: translateY(1rem) scale(0.985);
  transition: opacity 240ms ease, transform 320ms cubic-bezier(0.22, 1, 0.36, 1);
  scrollbar-width: none;
}

.walk-help-panel::-webkit-scrollbar {
  display: none;
}

.walk-help-panel::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: -18% -12% auto auto;
  width: 28rem;
  height: 28rem;
  opacity: 0.16;
  background:
    radial-gradient(circle, rgba(139, 30, 86, 0.36), transparent 58%),
    radial-gradient(circle at 28% 68%, rgba(109, 118, 99, 0.5), transparent 44%);
  filter: blur(2px);
  pointer-events: none;
  transform:
    translate3d(
      calc((var(--pointer-x) * 0.8rem) + (var(--panel-scroll, 0) * -0.9rem)),
      calc((var(--pointer-y) * 0.65rem) + (var(--panel-scroll, 0) * 1.1rem)),
      0
    )
    scale(1.02);
  animation: panel-parallax 12s ease-in-out infinite alternate;
}

.walk-help-overlay.active .walk-help-panel {
  opacity: 1;
  transform: none;
}

.walk-help-header,
.walk-help-layout,
.walk-help-tip,
.walk-help-start-button,
.walk-help-close-button {
  position: relative;
  z-index: 1;
}

.walk-help-panel .walk-help-close-button {
  top: 1rem;
  right: 1rem;
}

.walk-help-header {
  max-width: 39rem;
  margin: 0 auto clamp(1rem, 2.5vw, 1.5rem);
  padding-inline: 1rem;
  text-align: center;
}

.walk-help-header .help-kicker {
  margin-bottom: 0.35rem;
  color: var(--wine-accent);
}

.walk-help-header h2 {
  margin: 0;
  color: var(--warm-brown-dark);
  font-size: clamp(1.65rem, 4vw, 2.5rem);
  line-height: 1.08;
}

.walk-help-header > p:last-child {
  margin: 0.65rem auto 0;
  color: var(--warm-brown-text);
  line-height: 1.5;
}

.walk-help-layout {
  display: grid;
  grid-template-columns: minmax(14rem, 0.82fr) minmax(18rem, 1.18fr);
  gap: clamp(1rem, 2.5vw, 1.5rem);
  align-items: stretch;
}

.walk-help-demo {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  min-height: 20rem;
  overflow: hidden;
  border: 1px solid rgba(118, 87, 62, 0.16);
  border-radius: 10px;
  background: rgba(255, 252, 246, 0.72);
  box-shadow:
    0 0.75rem 1.8rem rgba(43, 36, 30, 0.09),
    inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.walk-help-scene {
  position: relative;
  min-height: 16.9rem;
  overflow: hidden;
  isolation: isolate;
  border: 0;
  border-radius: 0;
  background:
    radial-gradient(circle at 50% 40%, rgba(255, 252, 244, 0.96), transparent 52%),
    linear-gradient(to bottom, #e4ebdd 0 43%, #e8ddcc 43% 49%, #c7bba8 49% 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.walk-help-scene::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 7;
  border-radius: inherit;
  background: radial-gradient(circle at 50% 48%, transparent 48%, rgba(88, 61, 43, 0.08));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
  pointer-events: none;
}

.walk-help-world {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  transform-origin: 50% 58%;
}

.walk-help-demo-copy {
  position: relative;
  z-index: 8;
  display: grid;
  place-items: center;
  min-height: 3.1rem;
  color: var(--wine-accent);
  background: rgba(255, 252, 246, 0.9);
  border-top: 1px solid rgba(118, 87, 62, 0.13);
  font-size: var(--font-size-small);
  font-weight: var(--font-weight-title);
  letter-spacing: 0.03em;
}

.walk-help-demo-copy strong {
  display: none;
}

.walk-help-demo[data-walk-help-demo="move"] [data-walk-help-for="move"],
.walk-help-demo[data-walk-help-demo="look"] [data-walk-help-for="look"],
.walk-help-demo[data-walk-help-demo="jump"] [data-walk-help-for="jump"],
.walk-help-demo[data-walk-help-demo="run"] [data-walk-help-for="run"] {
  display: block;
}

.walk-help-skyline {
  position: absolute;
  z-index: 1;
  bottom: 47%;
  width: 36%;
  height: 30%;
  border-radius: 0.2rem 0.2rem 0 0;
  background:
    repeating-linear-gradient(90deg, transparent 0 16%, rgba(79, 73, 64, 0.32) 16% 22%),
    linear-gradient(165deg, #f7f2e8, #c8bfa9);
  box-shadow:
    0.55rem -1rem 0 -0.15rem #ddd4c4,
    1.2rem 0.1rem 0 #b8ad9a,
    0 0.7rem 1.1rem rgba(63, 43, 33, 0.16);
}

.walk-help-skyline::before,
.walk-help-skyline::after {
  content: "";
  position: absolute;
  bottom: 0;
  background: linear-gradient(160deg, #eee8dc, #bdb39f);
}

.walk-help-skyline::before {
  left: 105%;
  width: 72%;
  height: 78%;
}

.walk-help-skyline::after {
  left: 182%;
  width: 44%;
  height: 112%;
}

.walk-help-skyline-left {
  left: -7%;
}

.walk-help-skyline-right {
  right: -7%;
  transform: scaleX(-1);
}

.walk-help-road {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: -7%;
  width: 86%;
  height: 60%;
  background: linear-gradient(90deg, #aaa292, #c5bcaa 48%, #a79e8e);
  clip-path: polygon(43% 0, 57% 0, 100% 100%, 0 100%);
  transform: translateX(-50%);
  box-shadow: inset 0 0 1.5rem rgba(63, 43, 33, 0.13);
}

.walk-help-path {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 0;
  width: 0.22rem;
  height: 51%;
  background: repeating-linear-gradient(
    to top,
    rgba(255, 252, 246, 0.9) 0 0.8rem,
    transparent 0.8rem 1.55rem
  );
  transform: translateX(-50%) perspective(7rem) rotateX(18deg);
  transform-origin: bottom;
}

.walk-help-person {
  position: absolute;
  z-index: 6;
  left: 50%;
  bottom: 13%;
  width: 1.3rem;
  height: 3.4rem;
  transform: translateX(-50%);
  animation: walk-help-person-step 1.3s ease-in-out infinite;
}

.walk-help-person-head {
  position: absolute;
  top: 0;
  left: 50%;
  width: 0.92rem;
  height: 0.92rem;
  border-radius: 50%;
  background: var(--warm-brown);
  transform: translateX(-50%);
  box-shadow: 0 0.25rem 0.6rem rgba(36, 28, 18, 0.34);
}

.walk-help-person-body {
  position: absolute;
  top: 0.88rem;
  left: 50%;
  width: 0.74rem;
  height: 1.48rem;
  border-radius: 0.5rem 0.5rem 0.24rem 0.24rem;
  background: var(--wine-accent);
  transform: translateX(-50%);
}

.walk-help-person-body::before,
.walk-help-person-body::after {
  content: "";
  position: absolute;
  top: 1.25rem;
  width: 0.32rem;
  height: 1.18rem;
  border-radius: 0.25rem;
  background: var(--warm-brown-dark);
  transform-origin: top;
}

.walk-help-person-body::before {
  left: 0.06rem;
  transform: rotate(10deg);
}

.walk-help-person-body::after {
  right: 0.06rem;
  transform: rotate(-10deg);
}

.walk-help-step {
  position: absolute;
  z-index: 5;
  left: 50%;
  width: 0.42rem;
  height: 0.7rem;
  border: 2px solid rgba(139, 30, 86, 0.62);
  border-top: 0;
  border-radius: 50%;
  opacity: 0;
  transform: translateX(-50%) rotate(12deg);
  animation: walk-help-footstep 2.6s ease-out infinite;
}

.walk-help-step-one {
  bottom: 29%;
}

.walk-help-step-two {
  bottom: 38%;
  margin-left: -0.65rem;
  animation-delay: 0.45s;
}

.walk-help-step-three {
  bottom: 46%;
  margin-left: 0.4rem;
  animation-delay: 0.9s;
}

.walk-help-look-ring {
  position: absolute;
  z-index: 5;
  top: 1rem;
  right: 1rem;
  width: 3.1rem;
  height: 3.1rem;
  border: 1px solid rgba(139, 30, 86, 0.28);
  border-left-color: var(--wine-accent);
  border-radius: 50%;
  animation: walk-help-look 4s linear infinite;
}

.walk-help-look-ring::before,
.walk-help-look-ring::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 0.42rem;
  height: 0.42rem;
  border-top: 2px solid var(--wine-accent);
  border-right: 2px solid var(--wine-accent);
}

.walk-help-look-ring::before {
  left: -0.12rem;
  transform: translateY(-50%) rotate(-135deg);
}

.walk-help-look-ring::after {
  right: -0.12rem;
  transform: translateY(-50%) rotate(45deg);
}

.walk-help-look-label {
  position: absolute;
  z-index: 6;
  top: 2rem;
  right: 1.6rem;
  color: var(--wine-accent);
  font-size: 0.72rem;
  font-weight: 800;
}

.walk-help-controls {
  min-width: 0;
  padding: clamp(0.85rem, 2vw, 1.1rem);
  border: 1px solid rgba(118, 87, 62, 0.16);
  border-radius: 10px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.42), rgba(246, 239, 227, 0.76));
  box-shadow: 0 0.75rem 1.8rem rgba(43, 36, 30, 0.09), inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.walk-help-overlay[data-input="keyboard"] .walk-help-controls-touch,
.walk-help-overlay[data-input="touch"] .walk-help-controls-keyboard {
  display: none;
}

.walk-help-device-copy {
  min-height: 3.8rem;
  margin: 0 0 0.85rem;
  color: var(--warm-brown-text);
  font-size: 0.9rem;
  line-height: 1.45;
}

.walk-help-control-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.65rem;
}

.walk-help-control-card {
  display: grid;
  grid-template-columns: 3.7rem minmax(0, 1fr);
  align-items: center;
  width: 100%;
  min-height: 3.25rem;
  gap: 0.65rem;
  padding: 0.48rem 0.7rem;
  border: 1px solid rgba(118, 87, 62, 0.16);
  border-radius: var(--control-radius);
  color: var(--warm-brown-text);
  background: rgba(255, 252, 246, 0.72);
  cursor: pointer;
  font: inherit;
  text-align: left;
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.walk-help-control-card:hover {
  border-color: rgba(139, 30, 86, 0.28);
  transform: translateY(-1px);
}

.walk-help-control-card.active {
  background: rgba(255, 252, 244, 0.94);
  border-color: rgba(139, 30, 86, 0.38);
  box-shadow:
    inset 3px 0 0 var(--wine-accent),
    0 0.62rem 1.25rem rgba(63, 43, 33, 0.11);
}

.walk-help-control-card:focus-visible {
  outline: 3px solid rgba(139, 30, 86, 0.22);
  outline-offset: 2px;
}

.walk-help-control-card strong {
  color: var(--warm-brown-dark);
  font-size: 0.86rem;
}

.walk-help-keypad {
  display: grid;
  grid-template-columns: repeat(3, 1rem);
  grid-template-rows: repeat(2, 1rem);
  gap: 0.15rem;
  place-content: center;
}

.walk-help-key {
  display: grid;
  place-items: center;
  width: 1rem;
  height: 1rem;
  padding: 0;
  border: 1px solid rgba(101, 23, 63, 0.26);
  border-radius: 0.18rem;
  color: #fffaf2;
  background: var(--wine-accent);
  box-shadow: 0 0.12rem 0 var(--wine-accent-strong);
  font: 800 0.52rem/1 sans-serif;
}

.walk-help-key-w {
  grid-column: 2;
  grid-row: 1;
}

.walk-help-key:nth-child(2) {
  grid-column: 1;
  grid-row: 2;
}

.walk-help-key:nth-child(3) {
  grid-column: 2;
  grid-row: 2;
}

.walk-help-key:nth-child(4) {
  grid-column: 3;
  grid-row: 2;
}

.walk-help-mouse {
  position: relative;
  justify-self: center;
  width: 1.75rem;
  height: 2.7rem;
  border: 2px solid var(--wine-accent);
  border-radius: 1rem;
}

.walk-help-mouse::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 1px;
  height: 0.8rem;
  background: rgba(139, 30, 86, 0.42);
}

.walk-help-mouse i {
  position: absolute;
  top: 0.45rem;
  left: 50%;
  width: 0.22rem;
  height: 0.48rem;
  border-radius: 999px;
  background: var(--wine-accent);
  transform: translateX(-50%);
}

.walk-help-demo-mouse {
  position: absolute;
  z-index: 9;
  left: 50%;
  top: 56%;
  width: 1.95rem;
  height: 3rem;
  border: 2px solid var(--wine-accent);
  border-radius: 1.1rem;
  background: rgba(255, 252, 246, 0.94);
  box-shadow: 0 0.55rem 1rem rgba(43, 36, 30, 0.2);
  opacity: 0;
  transform: translate(-50%, -50%);
}

.walk-help-demo-mouse::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 1px;
  height: 0.85rem;
  background: rgba(139, 30, 86, 0.42);
}

.walk-help-demo-mouse i {
  position: absolute;
  top: 0.46rem;
  left: 50%;
  width: 0.23rem;
  height: 0.5rem;
  border-radius: 999px;
  background: var(--wine-accent);
  transform: translateX(-50%);
}

.walk-help-wide-key {
  justify-self: center;
  min-width: 3.15rem;
  padding: 0.45rem 0.4rem;
  border: 1px solid rgba(101, 23, 63, 0.26);
  border-radius: 0.4rem;
  color: #fffaf2;
  background: var(--wine-accent);
  box-shadow: 0 0.18rem 0 var(--wine-accent-strong);
  font: 800 0.58rem/1 sans-serif;
  text-align: center;
}

.walk-help-touch-pad {
  position: relative;
  justify-self: center;
  width: 2.8rem;
  height: 2.8rem;
  border: 1px solid rgba(139, 30, 86, 0.5);
  border-radius: 50%;
  background: var(--wine-accent-soft);
}

.walk-help-touch-pad i {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 50%;
  background: var(--wine-accent);
  transform: translate(-50%, -50%);
}

.walk-help-touch-move i {
  animation: walk-help-touch-move 2.5s ease-in-out infinite;
}

.walk-help-touch-look {
  border-radius: 0.65rem;
}

.walk-help-touch-look::before,
.walk-help-touch-look::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 0.38rem;
  height: 0.38rem;
  border-top: 2px solid var(--wine-accent);
  border-right: 2px solid var(--wine-accent);
}

.walk-help-touch-look::before {
  left: 0.32rem;
  transform: translateY(-50%) rotate(-135deg);
}

.walk-help-touch-look::after {
  right: 0.32rem;
  transform: translateY(-50%) rotate(45deg);
}

.walk-help-touch-look i {
  width: 0.6rem;
  height: 0.6rem;
  background: var(--warm-brown);
  animation: walk-help-touch-look 2.5s ease-in-out infinite;
}

.walk-help-action-key {
  display: grid;
  place-items: center;
  justify-self: center;
  width: 2.8rem;
  height: 2.8rem;
  border: 2px solid var(--wine-accent);
  border-radius: 50%;
  color: var(--wine-accent);
  background: var(--wine-accent-soft);
  font-size: 1.3rem;
  font-weight: 900;
}

.walk-help-action-key-run {
  letter-spacing: -0.2rem;
  padding-right: 0.2rem;
}

.walk-help-tip {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.55rem;
  margin: 1rem auto;
  color: var(--warm-brown-text);
  font-size: 0.88rem;
  text-align: center;
}

.walk-help-tip span {
  flex: 0 0 auto;
  color: var(--wine-accent);
  text-shadow: 0 0 0.65rem rgba(139, 30, 86, 0.28);
}

.walk-help-panel .walk-help-start-button {
  display: block;
  min-width: min(100%, 18rem);
  margin: 0 auto;
}

.walk-help-person,
.walk-help-step,
.walk-help-look-ring,
.walk-help-touch-move i,
.walk-help-touch-look i {
  animation: none;
}

.walk-help-look-ring,
.walk-help-look-label {
  opacity: 0;
}

.walk-help-control-card.active .walk-help-touch-move i {
  animation: walk-help-touch-move 2.5s ease-in-out infinite;
}

.walk-help-control-card.active .walk-help-touch-look i {
  animation: walk-help-touch-look 2.5s ease-in-out infinite;
}

.walk-help-demo.is-replaying[data-walk-help-demo="move"] .walk-help-world {
  animation: walk-help-world-forward 3.8s ease-in-out infinite alternate;
}

.walk-help-demo.is-replaying[data-walk-help-demo="move"] .walk-help-person {
  animation: walk-help-person-step 1.3s ease-in-out infinite;
}

.walk-help-demo.is-replaying[data-walk-help-demo="move"] .walk-help-step {
  animation: walk-help-footstep 2.6s ease-out infinite;
}

.walk-help-demo.is-replaying[data-walk-help-demo="look"] .walk-help-world {
  animation: walk-help-world-look 4.8s ease-in-out infinite;
}

.walk-help-demo.is-replaying[data-walk-help-demo="look"] .walk-help-demo-mouse {
  opacity: 1;
  animation: walk-help-mouse-look 4.8s ease-in-out infinite;
}

.walk-help-demo.is-replaying[data-walk-help-demo="look"] .walk-help-look-ring {
  opacity: 1;
  animation: walk-help-look 4.8s linear infinite;
}

.walk-help-demo.is-replaying[data-walk-help-demo="look"] .walk-help-look-label {
  opacity: 1;
}

.walk-help-demo.is-replaying[data-walk-help-demo="jump"] .walk-help-person {
  animation: walk-help-person-jump 2.2s cubic-bezier(0.45, 0, 0.2, 1) infinite;
}

.walk-help-demo.is-replaying[data-walk-help-demo="run"] .walk-help-world {
  animation: walk-help-world-run 1.8s ease-in-out infinite alternate;
}

.walk-help-demo.is-replaying[data-walk-help-demo="run"] .walk-help-person {
  animation: walk-help-person-run 0.58s ease-in-out infinite;
}

.walk-help-demo.is-replaying[data-walk-help-demo="run"] .walk-help-step {
  animation: walk-help-footstep 1.25s ease-out infinite;
}

@keyframes walk-help-world-forward {
  from {
    transform: scale(1);
  }
  to {
    transform: scale(1.07);
  }
}

@keyframes walk-help-world-look {
  0%,
  100% {
    transform: translate(0, 0) scale(1.04);
  }
  20% {
    transform: translate(3.5%, 2.5%) scale(1.08);
  }
  40% {
    transform: translate(-4%, 1%) scale(1.08);
  }
  60% {
    transform: translate(-2.5%, -3%) scale(1.08);
  }
  80% {
    transform: translate(3.5%, -2%) scale(1.08);
  }
}

@keyframes walk-help-mouse-look {
  0%,
  100% {
    left: 50%;
    top: 56%;
    transform: translate(-50%, -50%);
  }
  20% {
    left: 29%;
    top: 32%;
    transform: translate(-50%, -50%) rotate(-5deg);
  }
  40% {
    left: 72%;
    top: 37%;
    transform: translate(-50%, -50%) rotate(5deg);
  }
  60% {
    left: 68%;
    top: 72%;
    transform: translate(-50%, -50%) rotate(4deg);
  }
  80% {
    left: 31%;
    top: 68%;
    transform: translate(-50%, -50%) rotate(-4deg);
  }
}

@keyframes walk-help-person-jump {
  0%,
  12%,
  88%,
  100% {
    transform: translate(-50%, 0) scaleY(0.96);
  }
  42%,
  58% {
    transform: translate(-50%, -3.8rem) scaleY(1.03);
  }
}

@keyframes walk-help-world-run {
  from {
    transform: scale(1);
  }
  to {
    transform: scale(1.13);
  }
}

@keyframes walk-help-person-run {
  0%,
  100% {
    transform: translate(-50%, 0) rotate(-3deg);
  }
  50% {
    transform: translate(-50%, -0.42rem) rotate(3deg);
  }
}

@keyframes walk-help-person-step {
  0%,
  100% {
    transform: translate(-50%, 0) rotate(-1deg);
  }
  50% {
    transform: translate(-50%, -0.26rem) rotate(1deg);
  }
}

@keyframes walk-help-footstep {
  0% {
    opacity: 0;
    transform: translateX(-50%) scale(1.2) rotate(12deg);
  }
  25%,
  58% {
    opacity: 0.9;
  }
  100% {
    opacity: 0;
    transform: translateX(-50%) scale(0.55) rotate(12deg);
  }
}

@keyframes walk-help-look {
  to {
    transform: rotate(360deg);
  }
}

@keyframes walk-help-touch-move {
  0%,
  100% {
    transform: translate(-50%, -50%);
  }
  35% {
    transform: translate(-50%, -90%);
  }
  70% {
    transform: translate(-15%, -50%);
  }
}

@keyframes walk-help-touch-look {
  0%,
  100% {
    transform: translate(-50%, -50%);
  }
  35% {
    transform: translate(-120%, -50%);
  }
  70% {
    transform: translate(20%, -50%);
  }
}

@media (max-width: 720px) {
  .walk-help-panel {
    width: min(96vw, 32rem);
    max-height: 94dvh;
    padding: 1.1rem 0.9rem;
    border-radius: 1.15rem;
  }

  .walk-help-header {
    margin-bottom: 0.85rem;
    padding-inline: 1.6rem;
  }

  .walk-help-header h2 {
    font-size: clamp(1.45rem, 7vw, 2rem);
  }

  .walk-help-header > p:last-child {
    font-size: 0.87rem;
  }

  .walk-help-layout {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .walk-help-demo {
    min-height: 13rem;
  }

  .walk-help-scene {
    min-height: 10rem;
  }

  .walk-help-person {
    bottom: 9%;
  }

  .walk-help-controls {
    padding: 0.75rem;
  }

  .walk-help-control-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .walk-help-device-copy {
    min-height: 0;
    margin-bottom: 0.7rem;
    font-size: 0.82rem;
  }

  .walk-help-control-card {
    grid-template-columns: 3.2rem minmax(0, 1fr);
    min-height: 3.75rem;
    padding: 0.45rem 0.55rem;
  }

  .walk-help-tip {
    margin-block: 0.75rem;
    font-size: 0.8rem;
  }
}

@media (max-width: 380px) {
  .walk-help-control-grid {
    grid-template-columns: 1fr;
    gap: 0.45rem;
  }

  .walk-help-control-card {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 0.32rem;
    min-height: 5rem;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .walk-help-panel,
  .walk-help-panel::before,
  .walk-help-world,
  .walk-help-demo-mouse,
  .walk-help-person,
  .walk-help-step,
  .walk-help-look-ring,
  .walk-help-touch-pad i {
    animation: none !important;
    transition: none !important;
  }

  .walk-help-step {
    opacity: 0.65;
  }

  .walk-help-demo[data-walk-help-demo="look"] .walk-help-demo-mouse,
  .walk-help-demo[data-walk-help-demo="look"] .walk-help-look-ring,
  .walk-help-demo[data-walk-help-demo="look"] .walk-help-look-label {
    opacity: 1;
  }
}

/* Mantener la nueva cabecera por encima de los estilos heredados del menú agrupado. */
.site-header {
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: clamp(1rem, 2vw, 2rem);
  padding-block: 0.25rem;
}

.site-brand {
  grid-column: 2;
  justify-self: center;
}

.site-nav,
.site-nav-right {
  grid-column: 3;
  justify-self: end;
  flex-wrap: nowrap;
  gap: 0.18rem;
  max-width: none;
  padding-left: 0;
}

.site-nav > button {
  color: var(--warm-brown-dark);
}

.site-nav > button:hover,
.site-nav > button:focus-visible {
  color: var(--wine-accent);
  background: rgba(139, 30, 86, 0.07);
}

@media (max-width: 1120px) {
  .site-header {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  }

  .menu-toggle-button {
    grid-column: 3;
  }

  .site-nav,
  .site-nav-right {
    grid-column: auto;
    justify-self: auto;
    width: min(18rem, calc(100vw - 1.5rem));
    padding: 0.55rem;
  }

  .site-nav.active {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }

  .site-nav > button {
    justify-content: flex-start;
    width: 100%;
    min-height: 2.8rem;
    border-radius: 0.65rem;
    padding-inline: 0.8rem;
    text-align: left;
  }
}

@media (max-width: 720px) {
  .site-nav,
  .site-nav-right {
    right: 0.75rem;
    left: auto;
    width: min(18rem, calc(100vw - 1.5rem));
  }
}

/* Herramientas del mapa integradas en el lado izquierdo de la cabecera. */
@media (min-width: 1121px) {
  .site-header .map-tool-rail {
    position: relative;
    z-index: 1;
    top: auto;
    right: auto;
    left: auto;
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
    transform: none;
  }

  .site-header .map-tool-primary {
    flex-direction: row;
    gap: 0.08rem;
    width: auto;
    padding: 0.22rem;
    border-radius: 0.9rem;
    box-shadow:
      0 0.45rem 1.15rem rgba(43, 36, 30, 0.12),
      inset 0 1px 0 rgba(255, 255, 255, 0.9);
  }

  .site-header .map-tool-mode {
    width: auto;
  }

  .site-header .map-tool-button,
  .site-header .map-tool-mode .navigation-select-button {
    position: relative;
    flex-direction: row;
    width: auto;
    min-width: 4.15rem;
    min-height: 2.65rem;
    gap: 0.38rem;
    border-radius: 0.65rem;
    padding: 0.58rem 0.65rem;
    font-family: inherit;
    font-size: var(--font-size-small);
    font-weight: var(--font-weight-action);
    line-height: 1;
    white-space: nowrap;
  }

  .site-header .map-tool-mode .navigation-select-button {
    width: auto;
    min-width: 5rem;
    padding-right: 1.3rem;
  }

  .site-header .map-tool-mode .navigation-select-button strong,
  .site-header .fast-travel-toggle-label,
  .site-header .map-tool-button-label {
    display: inline;
  }

  .site-header .map-tool-navigation-label {
    display: none;
  }

  .site-header .map-tool-mode .navigation-select-button strong {
    color: inherit;
    font-size: inherit;
    font-weight: inherit;
  }

  .site-header .map-tool-mode .navigation-select-button::after {
    right: 0.62rem;
    bottom: 50%;
    width: 0.32rem;
    height: 0.32rem;
    transform: translateY(32%) rotate(45deg);
  }

  .site-header .map-tool-mode.open .navigation-select-button::after {
    transform: translateY(68%) rotate(225deg);
  }

  .site-header .map-tool-rail .navigation-select-menu {
    top: calc(100% + 0.55rem);
    right: auto;
    bottom: auto;
    left: 0;
    transform-origin: left top;
  }

  .site-header .map-tool-popover {
    top: calc(100% + 0.65rem);
    right: auto;
    bottom: auto;
    left: 0;
    transform: translateY(-0.4rem) scale(0.98);
    transform-origin: left top;
  }

  .site-header .map-tool-popover.active {
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 1120px) {
  .site-header .map-tool-rail {
    position: absolute;
    z-index: 1240;
    top: calc(100dvh - var(--site-footer-height) - 4.65rem - env(safe-area-inset-bottom));
    right: auto;
    bottom: auto;
    left: 50%;
    grid-column: auto;
    width: min(25rem, calc(100vw - 1rem));
    transform: translateX(-50%);
  }

  .site-header .map-tool-primary {
    flex-direction: row;
    gap: 0.22rem;
    width: 100%;
    padding: 0.32rem;
    border-radius: 1rem;
  }

  .site-header .map-tool-primary > .map-tool-button,
  .site-header .map-tool-primary > .map-tool-mode {
    flex: 1 1 0;
    width: auto;
    min-width: 0;
  }

  .site-header .map-tool-button,
  .site-header .map-tool-mode .navigation-select-button {
    min-height: 3.3rem;
    border-radius: 0.72rem;
    padding-block: 0.35rem;
    font-size: 0.63rem;
  }

  .site-header .map-tool-rail .navigation-select-menu {
    top: auto;
    right: auto;
    bottom: calc(100% + 0.55rem);
    left: 0;
    min-width: 8rem;
    transform-origin: left bottom;
  }

  .site-header .map-tool-popover {
    top: auto;
    right: 0;
    bottom: calc(100% + 0.55rem);
    left: 0;
    width: 100%;
    transform: translateY(0.45rem) scale(0.98);
    transform-origin: center bottom;
  }

  .site-header .map-tool-popover.active {
    transform: translateY(0) scale(1);
  }

  body.navigation-mode-walk .site-header .map-tool-rail {
    top: calc(100% + 0.55rem + env(safe-area-inset-top));
    bottom: auto;
  }

  body.navigation-mode-walk .site-header .map-tool-rail .navigation-select-menu {
    top: calc(100% + 0.55rem);
    bottom: auto;
    transform-origin: left top;
  }

  body.navigation-mode-walk .site-header .map-tool-popover {
    top: calc(100% + 0.55rem);
    bottom: auto;
    transform-origin: center top;
  }
}

@media (max-width: 390px) {
  .site-header .map-tool-rail {
    width: calc(100vw - 0.65rem);
  }
}

/* Configuración accesible desde el mapa. */
.map-tool-panel-button svg {
  width: 1.18rem;
  height: 1.18rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.75;
}

.map-tool-settings-panel {
  max-height: min(42rem, calc(100dvh - var(--site-header-height) - var(--site-footer-height) - 1.5rem));
  overflow-y: auto;
}

.map-settings-grid {
  display: grid;
  gap: 0.85rem;
}

.map-settings-control {
  display: grid;
  gap: 0.4rem;
  min-width: 0;
}

.map-settings-control .quality-selector-label,
.map-settings-control .language-selector-label {
  color: var(--wine-accent);
  font-size: 0.64rem;
  letter-spacing: 0.08em;
}

.map-settings-control .quality-selector-button,
.map-settings-control .language-selector-button,
.map-settings-control .quality-selector-menu,
.map-settings-control .language-selector-menu {
  background: #fffaf1;
  border: 1px solid rgba(91, 63, 45, 0.16);
  box-shadow: none;
}

.map-settings-control .quality-selector-menu,
.map-settings-control .language-selector-menu {
  position: static;
  width: 100%;
  max-height: 13.5rem;
  margin-top: 0.35rem;
  overflow-y: auto;
  border-radius: 0.75rem;
}

.map-settings-control .quality-selector-option:hover,
.map-settings-control .quality-selector-option:focus,
.map-settings-control .quality-selector-option.selected,
.map-settings-control .language-selector-option:hover,
.map-settings-control .language-selector-option:focus,
.map-settings-control .language-selector-option.selected {
  color: var(--wine-accent);
  background: #f2e4eb;
}

.map-settings-note {
  margin: 0.8rem 0 0;
  color: var(--warm-brown-muted);
  font-size: 0.69rem;
  line-height: 1.42;
}

/* La clase repetida mantiene esta apariencia por encima de variantes históricas. */
.dialog-close-button.dialog-close-button,
.map-tool-popover-close {
  display: grid;
  place-items: center;
  width: 2.5rem;
  min-width: 2.5rem;
  height: 2.5rem;
  min-height: 2.5rem;
  aspect-ratio: 1;
  box-sizing: border-box;
  color: var(--wine-accent);
  background: #fffaf1;
  border: 1px solid rgba(139, 30, 86, 0.18);
  border-radius: 50%;
  box-shadow: 0 0.45rem 1rem rgba(0, 0, 0, 0.18);
  padding: 0;
  font: inherit;
  font-size: 0;
  font-weight: var(--font-weight-action);
  line-height: 0;
  cursor: pointer;
}

.dialog-close-button.dialog-close-button::before,
.dialog-close-button.dialog-close-button::after,
.map-tool-popover-close::before,
.map-tool-popover-close::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0.85rem;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  pointer-events: none;
  transform-origin: center;
}

.dialog-close-button.dialog-close-button::before,
.map-tool-popover-close::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.dialog-close-button.dialog-close-button::after,
.map-tool-popover-close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.dialog-close-button.dialog-close-button:hover,
.dialog-close-button.dialog-close-button:focus-visible,
.map-tool-popover-close:hover,
.map-tool-popover-close:focus-visible {
  color: #fff;
  background: var(--wine-accent);
  border-color: var(--wine-accent);
  transform: none;
}

.map-tool-popover .dialog-close-button {
  position: relative;
  inset: auto;
  grid-column: 2;
  justify-self: end;
  flex: 0 0 2.5rem;
}

.about-panel .about-panel-header {
  padding-right: clamp(5rem, 8vw, 6.4rem);
}

.about-panel-header .about-close-button {
  position: absolute;
  top: clamp(1.35rem, 3vw, 2.25rem);
  right: clamp(1.35rem, 3vw, 2.75rem);
}

.walk-help-panel .walk-help-close-button {
  position: absolute;
  top: 1rem;
  right: 1rem;
}

/* Fichas conectadas con el explorador y entre sí. */
.info-panel-place-navigation {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) 2.5rem;
  align-items: center;
  gap: 0.45rem;
  margin: 0 0 0.85rem;
}

.info-panel-place-navigation + h2 {
  margin-right: 0;
}

.info-panel-place-navigation button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  min-height: 2.35rem;
  color: var(--warm-brown-dark);
  background: rgba(255, 252, 246, 0.72);
  border: 1px solid rgba(115, 81, 59, 0.16);
  border-radius: 999px;
  padding: 0.45rem 0.65rem;
  font: inherit;
  font-size: 0.69rem;
  font-weight: var(--font-weight-action);
}

.info-panel-previous-button {
  grid-column: 1;
  justify-self: stretch;
}

.info-panel-places-button {
  grid-column: 2;
  justify-self: center;
}

.info-panel-next-button {
  grid-column: 3;
  justify-self: stretch;
}

.info-panel-place-navigation .info-panel-close-navigation {
  position: relative;
  inset: auto;
  grid-column: 4;
  justify-self: end;
}

.info-panel-place-navigation button:hover,
.info-panel-place-navigation button:focus-visible {
  color: #fff;
  background: var(--wine-accent);
  border-color: var(--wine-accent);
}

.info-panel-places-button {
  color: var(--wine-accent) !important;
}

.info-panel-places-button:hover,
.info-panel-places-button:focus-visible {
  color: #fff !important;
}

.place-explorer-results {
  align-content: start;
  grid-auto-rows: max-content;
}

/* Señal de continuidad mínima en Quiénes somos. */
.about-scroll-cue {
  grid-column: 2;
  justify-self: start;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  min-height: 2.35rem;
  color: var(--wine-accent);
  background: rgba(139, 30, 86, 0.06);
  border: 1px solid rgba(139, 30, 86, 0.2);
  border-radius: 50%;
  padding: 0;
  font: inherit;
  font-size: 0.72rem;
  font-weight: var(--font-weight-action);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.about-scroll-cue span {
  font-size: 1rem;
  transition: transform 160ms ease;
}

.about-scroll-cue:hover span,
.about-scroll-cue:focus-visible span {
  transform: translateY(0.2rem);
}

/* Créditos, fuentes y accesibilidad. */
.credits-overlay {
  position: fixed;
  z-index: 9200;
  inset: 0;
  display: grid;
  place-items: center;
  padding: clamp(0.75rem, 2.5vw, 1.75rem);
  background: rgba(28, 22, 18, 0.68);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 200ms ease, visibility 200ms ease;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.credits-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.credits-panel {
  position: relative;
  width: min(92vw, 920px);
  max-height: min(90dvh, 720px);
  overflow-y: auto;
  color: var(--warm-brown-text);
  background:
    radial-gradient(circle at 92% 8%, rgba(139, 30, 86, 0.09), transparent 18rem),
    #f7f1e6;
  border: 1px solid rgba(255, 252, 246, 0.72);
  border-radius: 22px;
  box-shadow: 0 2rem 5rem rgba(17, 12, 9, 0.42);
  padding: clamp(1.2rem, 3.5vw, 2.6rem);
}

.credits-panel h2 {
  max-width: calc(100% - 3.6rem);
  margin: 0;
  color: var(--warm-brown-dark);
  font-family: var(--font-family-brand);
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1;
}

.credits-intro {
  margin: 0.65rem 0 1.35rem;
  color: var(--warm-brown-muted);
  font-size: 0.95rem;
}

.credits-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
}

.credits-grid article {
  display: grid;
  align-content: start;
  gap: 0.65rem;
  min-width: 0;
  background: rgba(255, 252, 246, 0.68);
  border: 1px solid rgba(115, 81, 59, 0.15);
  border-radius: 14px;
  padding: 1rem;
}

.credits-icon {
  display: grid;
  place-items: center;
  width: 2.45rem;
  height: 2.45rem;
  color: #fff;
  background: var(--wine-accent);
  border-radius: 50%;
}

.credits-icon svg {
  width: 1.15rem;
  height: 1.15rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.credits-grid h3,
.credits-grid p {
  margin: 0;
}

.credits-grid h3 {
  color: var(--warm-brown-dark);
  font-family: var(--font-family-brand);
  font-size: 1.18rem;
  line-height: 1.15;
}

.credits-grid p,
.credits-note {
  font-size: 0.82rem;
  line-height: 1.55;
}

.credits-note {
  margin: 1rem 0 0;
  color: var(--warm-brown-muted);
  border-top: 1px solid rgba(115, 81, 59, 0.16);
  padding-top: 0.85rem;
}

.footer-nav .credits-open-button {
  min-height: 1.55rem;
  color: #f7f2e8;
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(247, 242, 232, 0.35);
  border-radius: 0;
  padding: 0.1rem 0;
  font: inherit;
  font-size: var(--font-size-small);
  cursor: pointer;
}

.footer-nav .credits-open-button:hover,
.footer-nav .credits-open-button:focus-visible {
  color: #fff;
  background: transparent;
  border-bottom-color: #fff;
}

.loader-start-button:disabled {
  opacity: 0.46;
  filter: saturate(0.35);
  box-shadow: none;
}

@media (max-width: 980px) {
  .about-scroll-cue {
    grid-column: 1;
  }
}

@media (max-width: 720px) {
  body.place-explorer-open .site-header .map-tool-rail,
  body.info-panel-open .site-header .map-tool-rail {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }

  .site-header .map-tool-rail {
    transition: opacity 160ms ease, visibility 160ms ease;
  }

  .site-header .map-tool-button,
  .site-header .map-tool-mode .navigation-select-button {
    font-size: 0.58rem;
  }

  .info-panel-place-navigation {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) 2.5rem;
    gap: 0.3rem;
  }

  .info-panel-place-navigation button {
    min-width: 0;
    padding-inline: 0.38rem;
    font-size: 0.62rem;
  }

  .credits-overlay {
    padding: 0;
  }

  .credits-panel {
    width: 100%;
    min-height: 100dvh;
    max-height: 100dvh;
    box-sizing: border-box;
    border: 0;
    border-radius: 0;
    padding:
      calc(1.25rem + env(safe-area-inset-top))
      calc(1rem + env(safe-area-inset-right))
      calc(1.5rem + env(safe-area-inset-bottom))
      calc(1rem + env(safe-area-inset-left));
  }

  .credits-grid {
    grid-template-columns: 1fr;
  }

  .footer {
    grid-template-columns: minmax(0, 1fr) auto;
    place-items: center stretch;
    gap: 0.7rem;
    padding: 0.25rem 0.7rem;
  }

  .footer-info {
    display: none;
  }

  .footer-copy {
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
    font-size: 0.61rem;
  }

  .footer-nav {
    display: flex;
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
  }

  .footer-nav .credits-open-button {
    font-size: 0.61rem;
  }

  .about-panel .about-panel-header {
    padding-right: calc(4.5rem + env(safe-area-inset-right));
  }

  .about-panel-header .about-close-button {
    top: calc(0.9rem + env(safe-area-inset-top));
    right: calc(0.9rem + env(safe-area-inset-right));
  }

  .team-profile-frame .team-profile-close-button {
    position: fixed;
    top: calc(0.8rem + env(safe-area-inset-top));
    right: calc(0.8rem + env(safe-area-inset-right));
  }
}

@media (prefers-reduced-motion: reduce) {
  .credits-overlay,
  .site-header .map-tool-rail,
  .about-scroll-cue span {
    transition: none;
  }
}

/* La ayuda peatonal comparte el lenguaje gráfico de la explicación aérea. */
.walk-help-demo {
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.walk-help-demo[data-walk-help-demo="move"] [data-walk-help-for="move"],
.walk-help-demo[data-walk-help-demo="look"] [data-walk-help-for="look"],
.walk-help-demo[data-walk-help-demo="jump"] [data-walk-help-for="jump"],
.walk-help-demo[data-walk-help-demo="run"] [data-walk-help-for="run"] {
  display: flex;
}

.walk-help-demo-copy {
  min-height: 3.35rem;
  padding: 0.52rem 0.72rem 0.58rem;
  color: var(--warm-brown-text);
  background: rgba(255, 252, 246, 0.9);
  border-top: 1px solid rgba(118, 87, 62, 0.13);
}

.walk-help-demo-copy strong {
  color: var(--wine-accent);
  font-weight: var(--font-weight-title);
}

.walk-help-control-card {
  grid-template-columns: 2.15rem minmax(0, 1fr);
  gap: 0.78rem;
  min-height: 3.4rem;
  padding: 0.62rem 0.72rem;
  border-radius: 8px;
}

.walk-help-control-icon {
  width: 2.15rem;
  height: 2.15rem;
}

.walk-help-control-icon svg {
  width: 1.12rem;
  height: 1.12rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.walk-help-control-card.active .walk-help-control-icon {
  color: #fffaf2;
  background: var(--wine-accent);
  border-color: var(--wine-accent);
  box-shadow: 0 0.36rem 0.8rem rgba(139, 30, 86, 0.22);
}

.walk-help-control-card:hover .walk-help-control-icon {
  border-color: rgba(139, 30, 86, 0.32);
}

@media (max-width: 720px) {
  .walk-help-control-card {
    grid-template-columns: 2.15rem minmax(0, 1fr);
    min-height: 3.4rem;
  }
}

@media (max-width: 380px) {
  .walk-help-control-card {
    grid-template-columns: 1fr;
  }
}
