@media (min-width: 769px), (min-aspect-ratio: 1/1) {
  .point-vegetation { --point-x: 35.89%; --point-y: 41.94%; --point-width: 11.66%; --point-height: 24.19%; }
  .point-water { --point-x: 50.84%; --point-y: 45.48%; --point-width: 10.47%; --point-height: 16.61%; }
  .point-road { --point-x: 44.86%; --point-y: 66.13%; --point-width: 9.15%; --point-height: 18.55%; }
}
@media (max-width: 768px) and (max-aspect-ratio: 1/1) {
  .point-vegetation { --point-x: 13.79%; --point-y: 40.35%; --point-width: 33.62%; --point-height: 17.54%; }
  .point-water { --point-x: 56.90%; --point-y: 42.92%; --point-width: 30.17%; --point-height: 12.05%; }
  .point-road { --point-x: 39.66%; --point-y: 57.89%; --point-width: 26.38%; --point-height: 13.45%; }
}

.territory-responsive-photo { display: contents; }

@media (min-width: 769px) {
  .territory-scene { background: #20382e; }
  .territory-scene::before { content: none; }
  .territory-image-plane {
    --panorama-width: max(100cqw, min(max(130cqw, 350.58cqh), 215cqw, 445cqh));
    --panorama-height: calc(var(--panorama-width) * 620 / 1672);
    width: var(--panorama-width);
    height: var(--panorama-height);
    aspect-ratio: auto;
    top: clamp(
      min(0px, calc(100cqh - var(--panorama-height))),
      calc(50cqh - var(--panorama-height) * .57),
      max(0px, calc(100cqh - var(--panorama-height)))
    );
    transform: translateX(-50%);
  }
  .territory-photo { mask-image: none; filter: brightness(.71); }
  .territory-panel[data-point] .territory-reading {
    left: var(--reading-x);
    top: var(--reading-y);
    right: auto;
    width: min(var(--reading-width), 17rem);
    font-size: clamp(.875rem, 1.1vw, 1rem);
    overflow-wrap: anywhere;
  }
  .territory-reading.point-vegetation { --reading-x: 29%; --reading-y: 67%; --reading-width: 15%; }
  .territory-reading.point-water { --reading-x: 55.5%; --reading-y: 64%; --reading-width: 15%; }
  .territory-reading.point-road { --reading-x: 55.5%; --reading-y: 72%; --reading-width: 15%; }
}

@media (max-width: 768px) {
  .territory-panel[data-point] {
    --scene-height: max(28rem, calc(100svh - var(--header-height, 4.5rem)));
    height: var(--scene-height);
  }
  .territory.is-sticky .territory-panel[data-point] {
    --scene-height: calc(100dvh - var(--header-height, 4.5rem));
    height: var(--scene-height);
  }
  .territory-panel[data-point] .territory-image-window { overflow: visible; }
  .territory-panel[data-point] .territory-readings { background: transparent; }
  .territory-panel[data-point] .territory-scene::after {
    background: linear-gradient(180deg, #0b110bc2, #0b110b13 43%, #0b110b13 60%, #0b110bc5);
  }
  .territory-panel[data-point="2"] .territory-point:not([aria-pressed="true"]):not(:focus-visible) {
    opacity: 0;
    pointer-events: none;
  }
  .territory-panel[data-point] .territory-scene {
    background: #172b24 url("/assets/paisagem-detalhada-desktop.f67e7da9ba72.webp") center / cover;
  }
  .territory-image-plane .territory-picture {
    --photo-width: max(116cqw, calc(var(--scene-height) * 4.45));
    --photo-height: calc(var(--photo-width) * 620 / 1672);
    left: clamp(calc(100cqw - var(--photo-width)), calc(50cqw - var(--frame-x) * var(--photo-width)), 0px);
    top: clamp(calc(var(--scene-height) - var(--photo-height)), calc(57cqh - var(--frame-y) * var(--photo-height)), 0px);
  }
  .territory-panel[data-point="0"] { --frame-x: .417; --frame-y: .54; }
  .territory-panel[data-point="1"] { --frame-x: .561; --frame-y: .538; }
  .territory-panel[data-point="2"] { --frame-x: .494; --frame-y: .754; }
  .territory-picture .territory-photo { object-position: center; filter: brightness(.66); }
  .territory-image-plane .territory-picture { transition: none; }
  @media (prefers-reduced-motion: no-preference) {
    .territory.is-sticky .territory-image-plane .territory-picture {
      transition: left .65s cubic-bezier(.22,.61,.36,1), top .65s cubic-bezier(.22,.61,.36,1);
    }
  }
}

@media (max-width: 768px) and (max-aspect-ratio: 1/1) {
  .territory-panel[data-point] .territory-scene {
    background-image: url("/assets/paisagem-detalhada-mobile.61fead04d515.webp");
  }
  .territory-image-plane .territory-picture {
    --photo-width: max(145cqw, calc(var(--scene-height) * .86));
    --photo-height: calc(var(--photo-width) * 855 / 580);
  }
  .territory-panel[data-point="0"] { --frame-x: .306; --frame-y: .491; }
  .territory-panel[data-point="1"] { --frame-x: .72; --frame-y: .489; }
  .territory-panel[data-point="2"] { --frame-x: .528; --frame-y: .646; }
}
