.page-header {
  display: none;
}

#wrapper {
  padding-top: 0 !important;
}

#wrapper .container {
  max-width: 100% !important;
  width: 100% !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

#content-wrapper,
#main {
  width: 100%;
  max-width: 100%;
  padding: 0;
  margin: 0;
}

#main > .page-content {
  background: transparent;
  border: 0;
  box-shadow: none;
  border-radius: 0;
  margin: 0;
  padding: 0;
}

.ptm-page {
  background: #f4f7f0;
  border: 0;
  border-radius: 0;
  padding: 0;
  width: 100%;
  max-width: 100%;
  margin: 0;
  overflow-x: hidden;
}

.ptm-map-wrap {
  position: relative;
  overflow-x: hidden;
  --ptm-safe-top: max(0.75rem, env(safe-area-inset-top));
  --ptm-safe-right: max(0.75rem, env(safe-area-inset-right));
}

.ptm-page__header--accessible {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.ptm-page__title {
  margin: 0 0 0.2rem;
  font-size: 1.25rem;
  line-height: 1.2;
}

.ptm-page__subtitle {
  margin: 0;
  color: #2d2d2d;
  font-size: 0.92rem;
  line-height: 1.25;
}

.ptm-map {
  width: 100%;
  height: 94vh;
  min-height: 94vh;
  border-radius: 0;
  overflow: hidden;
  border: 0;
}

.ptm-scroll-rail {
  position: absolute;
  top: 0;
  right: 0;
  width: 47px;
  height: 100%;
  z-index: 25;
  background: rgba(255, 255, 255, 0.24);
  border-left: 1px solid rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(1px);
  touch-action: pan-y;
  cursor: grab;
}

.ptm-scroll-rail::before {
  content: 'drag';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(90deg);
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.85);
  color: #5a3f17;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  pointer-events: none;
}

.ptm-elev-map-cursor {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: #ff7a00;
  border: 2px solid #ffffff;
  box-shadow: 0 0 0 3px rgba(255, 122, 0, 0.26), 0 2px 7px rgba(0, 0, 0, 0.35);
  display: block;
}

.ptm-dir-marker {
  width: 18px;
  height: 18px;
  position: relative;
  pointer-events: none;
}

.ptm-dir-arrow {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 12px;
  height: 9px;
  transform: translate(-50%, -50%);
  transform-origin: center center;
  background: repeating-linear-gradient(
    90deg,
    #ffffff 0 4px,
    #d62828 4px 8px
  );
  clip-path: polygon(0 0, 100% 50%, 0 100%);
  filter: drop-shadow(0 0 1px rgba(0, 0, 0, 0.45));
}

.ptm-map-status {
  margin-top: 0.75rem;
  color: #8b1e1e;
  font-weight: 600;
}

.ptm-map-controls {
  position: absolute;
  top: var(--ptm-safe-top);
  right: 7.25rem;
  z-index: 31;
  width: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.45rem;
}

.ptm-map-controls__primary {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.45rem;
}

.ptm-basemap-switch {
  display: inline-flex;
  width: max-content;
  padding: 1px;
  border: 1px solid rgba(42, 58, 26, 0.14);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 4px 14px rgba(36, 58, 26, 0.10);
  backdrop-filter: blur(3px);
}

.ptm-basemap-switch__btn {
  min-height: 28px;
  padding: 0 0.62rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(36, 58, 26, 0.78);
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.ptm-basemap-switch__btn.is-active {
  background: #6bae3b;
  color: #fff;
  box-shadow: 0 2px 8px rgba(72, 112, 38, 0.20);
}

.ptm-basemap-switch__btn:focus-visible {
  outline: 2px solid rgba(140, 198, 64, 0.65);
  outline-offset: 2px;
}


.ptm-side-panels {
  position: absolute;
  top: 4.2rem;
  left: 10px;
  z-index: 31;
  width: auto;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  align-items: flex-start;
}

.ptm-feature-controls {
  position: relative;
  width: min(320px, 84vw);
  padding: 0.55rem 0.62rem;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(1px);
  transition: width .18s ease, padding .18s ease, transform .18s ease;
}

.ptm-panel__toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0;
  background: transparent;
  border: 0;
  text-align: left;
  color: inherit;
}

.ptm-side-panels .ptm-panel:not(.is-open) {
  width: 40px;
  padding: 0.35rem 0.18rem;
  border-radius: 0 10px 10px 0;
  transform: translateX(calc(-100% + 40px));
}

.ptm-side-panels .ptm-panel:not(.is-open) .ptm-panel__toggle {
  min-height: 150px;
  justify-content: center;
  position: relative;
  overflow: hidden;
  writing-mode: horizontal-tb;
  -webkit-writing-mode: horizontal-tb;
  transform: none;
  -webkit-transform: none;
  text-align: center;
  gap: 0;
}

.ptm-side-panels .ptm-panel:not(.is-open) .ptm-panel__toggle::after {
  display: none;
}

.ptm-side-panels .ptm-panel:not(.is-open) .ptm-feature-controls__title,
.ptm-side-panels .ptm-panel:not(.is-open) .ptm-symbol-legend__title {
  position: absolute;
  top: 50%;
  left: 50%;
  display: block;
  font-size: 0.76rem;
  line-height: 1.05;
  white-space: nowrap;
  transform: translate(-50%, -50%) rotate(-90deg);
  -webkit-transform: translate(-50%, -50%) rotate(-90deg);
  transform-origin: center center;
  -webkit-transform-origin: center center;
}

.ptm-panel__toggle::after {
  content: '▾';
  font-size: 0.9rem;
  color: #5a3f17;
  flex: 0 0 auto;
}

.ptm-panel:not(.is-open) .ptm-panel__toggle::after {
  transform: rotate(-90deg);
}

.ptm-panel__body {
  margin-top: 0.42rem;
}

.ptm-panel:not(.is-open) .ptm-panel__body {
  display: none;
}

.ptm-side-panels .ptm-panel.is-open {
  transform: translateX(0);
}

.ptm-feature-controls__title {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 700;
  color: #2a2a2a;
}

.ptm-feature-controls__rows {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.7rem;
}

.ptm-feature-controls__item {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.77rem;
  color: #313131;
  white-space: nowrap;
}

.ptm-feature-controls__item input {
  margin: 0;
}

.ptm-feature-controls__zone {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.42rem;
}

.ptm-feature-controls__zone span {
  font-size: 0.74rem;
  font-weight: 600;
  color: #454545;
}

.ptm-feature-controls__zone select {
  width: 100%;
  min-width: 0;
  min-height: 30px;
  border: 1px solid rgba(0, 0, 0, 0.16);
  border-radius: 7px;
  background: #fff;
  color: #222;
  font-size: 0.76rem;
  padding: 0 0.4rem;
}

.ptm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 152px;
  border: 1px solid rgba(0, 0, 0, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  color: #243a1a;
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1;
  min-height: 36px;
  padding: 0.5rem 0.72rem;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.ptm-btn:focus-visible {
  outline: 2px solid rgba(140, 198, 64, 0.7);
  outline-offset: 2px;
}

.ptm-btn[aria-pressed="true"] {
  background: #8cc640;
  border-color: #7bb136;
  color: #fff;
}

.ptm-tooltip {
  position: absolute;
  top: calc(100% + 0.35rem);
  left: 50%;
  transform: translateX(-50%);
  margin-top: 0;
  padding: 0.42rem 0.56rem;
  border-radius: 7px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: rgba(255, 255, 255, 0.96);
  color: #2e2e2e;
  font-size: 0.78rem;
  line-height: 1.3;
  white-space: pre-line;
  width: 220px;
  max-width: 220px;
  pointer-events: none;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

.ptm-tooltip.is-toast {
  background: rgba(64, 43, 13, 0.95);
  color: #fff;
  border-color: rgba(64, 43, 13, 0.95);
}

.ptm-info-control {
  z-index: 31;
}

.ptm-map-controls .ptm-info-control {
  position: static;
  z-index: auto;
}

.ptm-btn--info {
  width: auto;
  min-width: 0;
  min-height: 34px;
  padding: 0.48rem 0.68rem;
  gap: 0.32rem;
  border-radius: 999px;
}

.ptm-btn--info__icon {
  font-size: 0.9rem;
  line-height: 1;
}

.ptm-btn--info__text {
  line-height: 1;
}

.ptm-info-drawer {
  position: absolute;
  top: 0;
  right: 0;
  width: min(420px, 96vw);
  height: 100%;
  transform: translateX(100%);
  transition: transform 0.25s ease;
  z-index: 33;
  background: rgba(255, 255, 255, 0.95);
  border-left: 1px solid rgba(0, 0, 0, 0.14);
  box-shadow: -8px 0 24px rgba(0, 0, 0, 0.14);
  backdrop-filter: blur(2px);
  display: flex;
  flex-direction: column;
}

.ptm-info-drawer.is-open {
  transform: translateX(0);
}

.ptm-info-drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.9rem 1rem 0.8rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.ptm-info-drawer__title {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.2;
  color: #1d1d1d;
}

.ptm-info-close {
  width: 30px;
  height: 30px;
  border: 1px solid rgba(0, 0, 0, 0.16);
  border-radius: 8px;
  background: #fff;
  color: #2c2c2c;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}

.ptm-info-drawer__body {
  flex: 1 1 auto;
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 0.75rem 0.9rem 1rem;
}

.ptm-info-section {
  padding: 0.75rem;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.8);
}

.ptm-info-section + .ptm-info-section {
  margin-top: 0.8rem;
}

.ptm-info-section__title {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
  line-height: 1.25;
  color: #222;
}

.ptm-info-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 0.55rem;
}

.ptm-info-row__label {
  font-size: 0.84rem;
  color: #2e2e2e;
}

.ptm-switch {
  position: relative;
  display: inline-flex;
  width: 38px;
  height: 22px;
}

.ptm-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.ptm-switch__slider {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.2);
  transition: background 0.2s ease;
}

.ptm-switch__slider::before {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s ease;
}

.ptm-switch input:checked + .ptm-switch__slider {
  background: #8cc640;
}

.ptm-switch input:checked + .ptm-switch__slider::before {
  transform: translateX(16px);
}

.ptm-weather-controls {
  margin-top: 0.45rem;
}

.ptm-weather-controls[hidden] {
  display: none !important;
}

.ptm-weather-pill {
  --ptm-weather-accent: #3b82f6;
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  padding: 0.16rem 0.42rem 0.16rem 0.22rem;
  color: #1d1d1d;
  cursor: pointer;
  line-height: 1;
}

.ptm-weather-pill:hover {
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.16);
}

.ptm-weather-pill__icon {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--ptm-weather-accent);
  background-color: var(--ptm-weather-accent);
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  -webkit-mask-size: 24px 24px;
  mask-repeat: no-repeat;
  mask-position: center;
  mask-size: 24px 24px;
}

.ptm-weather-pill__icon--sun {
  -webkit-mask-image: url('../img/weather-icons/sun.svg');
  mask-image: url('../img/weather-icons/sun.svg');
  background-color: #f2a10a;
  border-color: #f2a10a;
}

.ptm-weather-pill__icon--cloud {
  -webkit-mask-image: url('../img/weather-icons/cloud.svg');
  mask-image: url('../img/weather-icons/cloud.svg');
  background-color: #8a95a4;
  border-color: #8a95a4;
}

.ptm-weather-pill__icon--cloud-partly {
  -webkit-mask-image: url('../img/weather-icons/cloud-partly.svg');
  mask-image: url('../img/weather-icons/cloud-partly.svg');
  background-color: #ba8a1e;
  border-color: #ba8a1e;
}

.ptm-weather-pill__icon--rain {
  -webkit-mask-image: url('../img/weather-icons/rain.svg');
  mask-image: url('../img/weather-icons/rain.svg');
  background-color: #2f83c8;
  border-color: #2f83c8;
}

.ptm-weather-pill__icon--snow {
  -webkit-mask-image: url('../img/weather-icons/snow.svg');
  mask-image: url('../img/weather-icons/snow.svg');
  background-color: #7ca6c9;
  border-color: #7ca6c9;
}

.ptm-weather-pill__icon--wind {
  -webkit-mask-image: url('../img/weather-icons/wind.svg');
  mask-image: url('../img/weather-icons/wind.svg');
  background-color: #5d7f72;
  border-color: #5d7f72;
}

.ptm-weather-pill__value {
  font-size: 0.8rem;
  font-weight: 700;
  color: #202020;
}

.ptm-weather-pill__time {
  font-size: 0.72rem;
  color: #666;
}

.ptm-radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.6rem;
}

.ptm-radio-group label {
  display: inline-flex;
  align-items: center;
  gap: 0.22rem;
  font-size: 0.82rem;
  color: #2c2c2c;
}

.ptm-select-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
  margin-top: 0.55rem;
}

.ptm-select-grid label {
  display: block;
}

.ptm-select-grid label span {
  display: block;
  font-size: 0.75rem;
  color: #4b4b4b;
  margin-bottom: 0.2rem;
}

.ptm-select-grid select {
  width: 100%;
  height: 34px;
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 7px;
  background: #fff;
  color: #1e1e1e;
  font-size: 0.82rem;
  padding: 0 0.45rem;
}

.ptm-teaser {
  margin-top: 0.5rem;
  padding: 0.65rem;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: rgba(244, 247, 240, 0.95);
}

.ptm-teaser p {
  margin: 0 0 0.45rem;
  font-size: 0.82rem;
  line-height: 1.35;
  color: #2c2c2c;
  white-space: pre-line;
}

.ptm-info-status {
  margin: 0.55rem 0 0;
  font-size: 0.78rem;
  color: #4b4b4b;
}

#ptm-elevation-canvas {
  width: 100%;
  height: 190px;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: #f2f2f2;
}

.ptm-elevation-summary {
  margin-top: 0.45rem;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.35rem;
  font-size: 0.76rem;
  color: #3a3a3a;
}

.ptm-elevation-summary span {
  display: inline-flex;
  flex-direction: column;
  gap: 0.1rem;
  padding: 0.36rem 0.4rem;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.8);
}

.ptm-elevation-summary strong {
  font-size: 0.7rem;
  font-weight: 700;
  color: #6a6a6a;
}

.ptm-3d-wrap {
  position: absolute;
  top: 0.75rem;
  right: 5rem;
  z-index: 31;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.ptm-toggle-3d {
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  color: #243a1a;
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1;
  padding: 0.45rem 0.62rem;
}

.ptm-toggle-3d[aria-pressed="true"] {
  background: #8cc640;
  border-color: #7bb136;
  color: #fff;
}

.ptm-3d-note {
  padding: 0.22rem 0.46rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(0, 0, 0, 0.12);
  color: #2f2f2f;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.15;
}

.ptm-map-wrap .maplibregl-ctrl-top-right {
  top: var(--ptm-safe-top);
  right: 3rem;
}

.ptm-map-wrap .maplibregl-ctrl-top-right .ptm-search-control {
  margin-top: 0.35rem;
  position: relative;
  overflow: visible;
}

.ptm-search-btn {
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  background: #fff;
  cursor: pointer;
}

.ptm-search-icon {
  position: relative;
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid #4a4a4a;
  border-radius: 50%;
  vertical-align: middle;
}

.ptm-search-icon::after {
  content: '';
  position: absolute;
  width: 7px;
  height: 2px;
  background: #4a4a4a;
  right: -6px;
  bottom: -1px;
  transform: rotate(45deg);
  transform-origin: center;
}

.ptm-search-panel {
  position: absolute;
  top: calc(100% + 0.35rem);
  right: 0;
  width: min(330px, 72vw);
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(0, 0, 0, 0.16);
  border-radius: 9px;
  padding: 0.45rem;
  max-height: min(52vh, 360px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.13);
}

.ptm-search-input-wrap {
  position: relative;
}

.ptm-search-input {
  width: 100%;
  min-height: 38px;
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 7px;
  font-size: 0.88rem;
  line-height: 1.2;
  padding: 0.45rem 2rem 0.45rem 0.55rem;
  outline: none;
}

.ptm-search-input:focus {
  border-color: #5a3f17;
  box-shadow: 0 0 0 2px rgba(140, 198, 64, 0.25);
}

.ptm-search-clear {
  position: absolute;
  top: 50%;
  right: 0.4rem;
  transform: translateY(-50%);
  width: 1.35rem;
  height: 1.35rem;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.08);
  color: #4a4a4a;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
}

.ptm-search-clear:hover {
  background: rgba(0, 0, 0, 0.14);
}

.ptm-search-results {
  list-style: none;
  margin: 0.38rem 0 0;
  padding: 0;
  max-height: 210px;
  overflow: auto;
}

.ptm-search-result {
  width: 100%;
  text-align: left;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #2a2a2a;
  cursor: pointer;
  min-height: 40px;
  padding: 0.5rem 0.55rem;
  font-size: 0.84rem;
  line-height: 1.3;
}

.ptm-search-result {
  width: 100% !important;
}

.ptm-search-result:hover,
.ptm-search-result:focus {
  background: rgba(140, 198, 64, 0.18);
}

.ptm-search-empty {
  margin-top: 0.42rem;
  font-size: 0.78rem;
  color: #5a3f17;
}

.ptm-search-note {
  margin-top: 0.45rem;
  padding: 0.45rem 0.5rem;
  border-radius: 8px;
  border: 1px solid rgba(90, 63, 23, 0.22);
  background: rgba(242, 240, 234, 0.9);
}

.ptm-search-note p {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.35;
  color: #4a2f10;
}

.ptm-search-cta {
  display: inline-flex;
  margin-top: 0.45rem;
  align-items: center;
  justify-content: center;
  padding: 0.32rem 0.58rem;
  border-radius: 6px;
  background: #8cc640;
  color: #fff !important;
  font-size: 0.76rem;
  font-weight: 700;
  text-decoration: none;
}

.ptm-search-cta:hover {
  background: #77ad34;
}

.maplibregl-ctrl-bottom-right {
  right: 52px;
}

.ptm-symbol-legend {
  width: min(320px, 84vw);
  padding: 0.55rem 0.62rem;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(1px);
  transition: width .18s ease, padding .18s ease, transform .18s ease;
}

.ptm-symbol-legend__title {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 700;
  color: #2a2a2a;
}

.ptm-symbol-legend__list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.ptm-symbol-legend__item {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 0.55rem;
  align-items: center;
  font-size: 0.76rem;
  color: #313131;
  line-height: 1.2;
}

.ptm-symbol-legend__icons {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.ptm-symbol-legend__icons img {
  display: block;
  max-height: 18px;
  width: auto;
}

.ptm-symbol-legend__line {
  display: inline-block;
  width: 70px;
  height: 4px;
  border-radius: 999px;
}

.ptm-symbol-legend__line--gpx {
  background: #007aff;
}

.ptm-symbol-legend__line--network {
  background: #e53935;
}

.ptm-symbol-legend__line--closed {
  height: 0;
  border-top: 4px dashed #d92d20;
  background: transparent;
}

.ptm-symbol-legend__line--experienced {
  height: 0;
  border-top: 4px dashed #2f3437;
  background: transparent;
}

.ptm-symbol-legend__line--municipal {
  background: repeating-linear-gradient(
    90deg,
    #ffd400 0 10px,
    transparent 10px 15px
  );
  opacity: 0.95;
}

.ptm-symbol-legend__line--liguria {
  background: hsl(210, 20%, 35%);
  height: 5px;
}

.ptm-legend {
  position: absolute;
  bottom: 0.75rem;
  left: 0.75rem;
  z-index: 30;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.8rem;
  align-items: center;
  padding: 0.55rem 0.7rem;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.75);
}

.ptm-legend {
  display: none !important;
}

.ptm-legend__title {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 700;
  color: #2c2c2c;
}

.ptm-legend__item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.84rem;
  color: #333;
}

.ptm-legend__item input {
  margin: 0;
}

.pt-map-popup {
  z-index: 80;
}

.pt-map-popup .maplibregl-popup-content {
  border-radius: 10px;
  padding: 0.7rem 0.75rem;
  background: rgba(255, 255, 255, 0.98);
}

.ptm-map .maplibregl-marker {
  z-index: 15;
}

.ptm-map .maplibregl-marker:has(.ptm-feature-marker),
.ptm-map .maplibregl-marker:has(.ptm-waymark-marker) {
  z-index: 12;
}

.pt-popup {
  min-width: 200px;
}

.pt-popup--locked {
  min-width: 220px;
  text-align: center;
}

.pt-thumb {
  display: block;
  width: 100%;
  height: 86px;
  object-fit: cover;
  border-radius: 8px;
  margin: 0 0 0.45rem;
}

.pt-thumb--locked {
  max-width: 280px;
  height: 130px;
  object-fit: cover;
  object-position: center;
  margin: 0 auto 0.55rem;
}

.pt-title {
  margin: 0 0 0.35rem;
  color: #1d1d1d;
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.3;
}

.pt-muted {
  margin: 0 0 0.55rem;
  font-size: 0.9rem;
  color: #4f4f4f;
  line-height: 1.35;
}

.pt-cta {
  display: inline-flex;
  width: 100%;
  justify-content: center;
  align-items: center;
  text-align: center;
  margin: 0 0 0.35rem;
  padding: 0.46rem 0.72rem;
  border-radius: 8px;
  background: #8cc640;
  color: #fff !important;
  font-size: 0.86rem;
  font-weight: 700;
  text-decoration: none;
}

.pt-cta:hover {
  background: #77ad34;
}

.pt-link {
  color: #5a3f17;
  font-size: 0.86rem;
  text-decoration: underline;
}

@media (max-width: 767px) {
  .ptm-map-controls {
    left: calc(0.75rem + env(safe-area-inset-left));
    right: auto;
    align-items: flex-start;
  }

  .ptm-map-controls__primary {
    justify-content: flex-start;
  }
}

@media (max-width: 768px) {
  .ptm-map-wrap {
    --ptm-safe-top: max(0.5rem, env(safe-area-inset-top));
    --ptm-safe-right: max(0.5rem, env(safe-area-inset-right));
  }

  .ptm-page {
    border-radius: 0;
    padding: 0;
  }

  .ptm-page__title {
    font-size: 1rem;
  }

  .ptm-page__subtitle {
    font-size: 0.8rem;
  }

  .ptm-map {
    height: 90vh;
    min-height: 90vh;
  }

  .ptm-3d-wrap {
    top: 0.5rem;
    right: 4.2rem;
    gap: 0.3rem;
  }

  .ptm-map-controls {
    top: var(--ptm-safe-top);
    right: calc(4.8rem + env(safe-area-inset-right));
    width: auto;
  }

  .ptm-btn--info {
    min-width: 0;
    padding: 0.42rem 0.58rem;
    font-size: 0.78rem;
  }

  .ptm-feature-controls {
    width: 100%;
    padding: 0.45rem 0.5rem;
  }

  .ptm-side-panels {
    top: 3.7rem;
    left: 0;
    width: auto;
    gap: 0.45rem;
  }

  .ptm-feature-controls__title {
    font-size: 0.74rem;
  }

  .ptm-feature-controls__item {
    font-size: 0.72rem;
  }

  .ptm-feature-controls__zone span,
  .ptm-feature-controls__zone select {
    font-size: 0.72rem;
  }

  .ptm-btn {
    font-size: 0.78rem;
    min-height: 38px;
    padding: 0.45rem 0.62rem;
    width: auto;
    min-width: 134px;
  }

  .ptm-tooltip {
    font-size: 0.72rem;
    width: 175px;
    max-width: 175px;
  }

  .ptm-tooltip.is-toast {
    width: 175px;
    max-width: 175px;
  }

  .ptm-toggle-3d {
    font-size: 0.78rem;
    padding: 0.4rem 0.55rem;
  }

  .ptm-3d-note {
    font-size: 0.64rem;
    padding: 0.2rem 0.38rem;
    max-width: 90px;
  }

  .ptm-map-wrap .maplibregl-ctrl-top-right {
    top: var(--ptm-safe-top);
    right: calc(2.7rem + env(safe-area-inset-right));
  }

  .ptm-map-wrap .maplibregl-ctrl-top-right .ptm-search-control {
    margin-top: 0.28rem;
  }

  .ptm-search-panel {
    width: min(296px, calc(100vw - 78px));
    max-height: min(56vh, 380px);
  }

  .ptm-scroll-rail {
    width: 47px;
    cursor: grab;
    background: rgba(255, 255, 255, 0.28);
  }

  .ptm-info-drawer {
    width: 100%;
    max-width: 100%;
    border-left: 0;
  }

  .ptm-info-drawer__head {
    padding: 0.75rem 0.8rem;
  }

  .ptm-info-drawer__body {
    padding: 0.65rem 0.7rem 0.85rem;
  }

  .ptm-select-grid {
    grid-template-columns: 1fr;
  }

  .ptm-elevation-summary {
    grid-template-columns: 1fr 1fr;
  }

  .ptm-panel__body {
    display: none;
  }

  .ptm-panel.is-open .ptm-panel__body {
    display: block;
  }

  .ptm-symbol-legend {
    padding: 0.45rem 0.5rem;
  }

  .ptm-symbol-legend__title {
    font-size: 0.74rem;
  }

  .ptm-symbol-legend__item {
    grid-template-columns: 76px minmax(0, 1fr);
    font-size: 0.72rem;
  }

  .ptm-symbol-legend__icons img {
    max-height: 16px;
  }

  .pt-map-popup .maplibregl-popup-content {
    max-width: 240px;
  }
}

@media (max-width: 420px) {
  .ptm-page__title {
    font-size: 0.92rem;
    line-height: 1.15;
  }

  .ptm-page__subtitle {
    font-size: 0.74rem;
    line-height: 1.2;
  }

  .ptm-map-wrap .maplibregl-ctrl-top-right {
    right: calc(2.35rem + env(safe-area-inset-right));
  }

  .ptm-feature-controls {
    width: min(270px, 80vw);
  }

  .ptm-map-wrap .maplibregl-ctrl-top-right .maplibregl-ctrl {
    margin-top: 7px;
    margin-right: 7px;
  }

  .ptm-map-controls {
    right: calc(4.25rem + env(safe-area-inset-right));
  }

  .ptm-btn {
    min-width: 122px;
    min-height: 36px;
    font-size: 0.74rem;
    padding: 0.4rem 0.5rem;
  }

  .ptm-btn--info {
    width: 34px;
    min-width: 34px;
    padding: 0;
    font-size: 0.74rem;
  }

  .ptm-btn--info__text {
    display: none;
  }

  .ptm-tooltip,
  .ptm-tooltip.is-toast {
    width: 162px;
    max-width: 162px;
    font-size: 0.7rem;
    line-height: 1.2;
  }

  .ptm-search-panel {
    width: min(270px, calc(100vw - 64px));
    max-height: min(58vh, 360px);
    padding: 0.4rem;
  }

  .ptm-search-input {
    min-height: 36px;
    font-size: 0.82rem;
  }

  .ptm-search-result {
    min-height: 38px;
    font-size: 0.8rem;
    padding: 0.45rem 0.5rem;
  }


  .ptm-info-drawer__head {
    padding: 0.68rem 0.72rem;
  }

  .ptm-info-drawer__body {
    padding: 0.58rem 0.62rem 0.78rem;
  }
}

@media (max-width: 360px) {
  .ptm-page__subtitle {
    display: none;
  }

  .ptm-map-controls {
    right: calc(3.95rem + env(safe-area-inset-right));
  }

  .ptm-btn {
    min-width: 116px;
    font-size: 0.72rem;
    padding: 0.38rem 0.44rem;
  }

  .ptm-btn--info {
    width: 32px;
    min-width: 32px;
    font-size: 0.72rem;
    padding: 0;
  }

  .ptm-search-panel {
    width: min(248px, calc(100vw - 58px));
  }
}
.ptm-locality-marker {
  display: none !important;
}

.ptm-viewpoint-marker {
  display: none !important;
}

.ptm-feature-marker {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  pointer-events: none;
  transform: translateZ(0);
  z-index: 20;
}

.ptm-feature-marker img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.25));
}

.ptm-feature-marker--rest_area {
  width: 22px;
  height: 22px;
}

.ptm-waymark-marker {
  display: block;
  line-height: 0;
  transform: translateZ(0);
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

.ptm-waymark-marker img {
  display: block;
  height: auto;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.24));
}

.maplibregl-ctrl-attrib {
  max-width: 26px;
  padding: 0 !important;
}

.maplibregl-ctrl-attrib .maplibregl-ctrl-attrib-inner {
  display: none !important;
}

.maplibregl-ctrl-attrib .maplibregl-ctrl-attrib-button,
.maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-button,
.maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-button {
  display: block !important;
}

.maplibregl-ctrl-attrib.maplibregl-compact-show {
  max-width: none;
  padding-right: 28px !important;
}

.maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-inner {
  display: block !important;
}
