:root {
  color-scheme: light;
  --forest: #123c32;
  --forest-soft: #1d5a49;
  --cream: #f5f1e7;
  --paper: #fffdf8;
  --ink: #17241f;
  --muted: #61706a;
  --accent: #ef9d27;
  --line: #d9ddd7;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--cream);
}

button, input, textarea, select { font: inherit; }
button { cursor: pointer; }

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: max(1rem, env(safe-area-inset-top)) clamp(1rem, 4vw, 3rem) 1rem;
  color: white;
  background: linear-gradient(115deg, #0d3027, #1d5a49);
}

h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: clamp(1.4rem, 4vw, 2rem); }
.eyebrow { margin-bottom: .2rem; font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; opacity: .78; }

.network-badge {
  flex: 0 0 auto;
  padding: .45rem .7rem;
  border: 1px solid rgb(255 255 255 / .3);
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 700;
  background: rgb(255 255 255 / .12);
}
.network-badge.is-offline { background: #7a2e25; }

main { width: min(1500px, 100%); margin: 0 auto; padding-bottom: 3rem; }

.view-switch {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .3rem;
  margin: 1rem;
  padding: .3rem;
  border-radius: .8rem;
  background: #dde2dc;
}

.switch-button {
  min-width: 0;
  padding: .75rem 1rem;
  color: #42504a;
  border: 0;
  border-radius: .6rem;
  background: transparent;
  font-weight: 750;
  line-height: 1.15;
  overflow-wrap: anywhere;
}
.switch-button.is-active { color: white; background: var(--forest); box-shadow: 0 2px 10px rgb(18 60 50 / .2); }
.switch-button:disabled { cursor: not-allowed; color: #6d756f; background: #cbd0ca; opacity: 1; }
.pro-badge { display: inline-block; margin-left: .15rem; padding: .12rem .3rem; color: #5b3d00; border-radius: 999px; background: #ffd76c; font-size: .52rem; line-height: 1; letter-spacing: .05em; vertical-align: super; }
.switch-button:disabled .pro-badge { opacity: .65; }
.tab-availability { display: none; }
.switch-button:disabled .tab-availability { display: block; margin-top: .2rem; font-size: .62rem; font-weight: 800; }
.switch-button:disabled .tab-availability::after { content: "Non disponibile offline"; }

.view-panel { margin: 0 2.75rem 0 1rem; }

.search-panel {
  margin: 0 1rem 1rem;
  padding: clamp(1rem, 3vw, 1.4rem);
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--paper);
  box-shadow: 0 8px 28px rgb(31 49 41 / .06);
}
.search-heading { display: flex; align-items: start; justify-content: space-between; gap: 1rem; }
.search-heading h2 { margin-bottom: .3rem; font-size: clamp(1.2rem, 3vw, 1.55rem); }
.search-heading-actions { display: flex; align-items: center; gap: .5rem; }
.search-mode-badge { flex: 0 0 auto; padding: .4rem .65rem; color: #315548; border-radius: 999px; background: #dfece5; font-size: .72rem; font-weight: 800; }
.search-mode-badge.is-ai { color: #3d3972; background: #e7e4ff; }
.panel-toggle { display: inline-flex; align-items: center; gap: .35rem; min-height: 2rem; padding: .35rem .55rem; color: #315548; border: 1px solid #cbd8d1; border-radius: .55rem; background: #f1f6f2; font-size: .72rem; font-weight: 800; }
.panel-toggle-icon { font-size: .9rem; }
.search-panel.is-collapsed { padding-top: .8rem; padding-bottom: .8rem; }
.search-panel.is-collapsed .search-heading h2 { margin-bottom: 0; }
.search-panel.is-collapsed .search-panel-body { display: none; }
.natural-search label { display: block; margin-bottom: .35rem; color: var(--muted); font-size: .78rem; font-weight: 700; }
.search-input-row { display: grid; grid-template-columns: 1fr auto auto; gap: .45rem; }
.search-input-row input, .filter-form select {
  width: 100%;
  min-height: 2.8rem;
  padding: .6rem .75rem;
  color: var(--ink);
  border: 1px solid #bcc7c0;
  border-radius: .65rem;
  background: white;
}
.search-input-row button, .filter-form > button {
  min-height: 2.8rem;
  padding: .6rem 1rem;
  color: white;
  border: 0;
  border-radius: .65rem;
  background: var(--forest-soft);
  font-weight: 800;
}
.search-submit { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-width: 6.5rem; }
.search-submit:disabled { cursor: wait; opacity: .82; }
.search-spinner {
  display: none;
  width: 1rem;
  height: 1rem;
  flex: 0 0 auto;
  border: 2px solid rgb(255 255 255 / .4);
  border-top-color: white;
  border-radius: 50%;
  animation: search-spin .75s linear infinite;
}
.search-submit.is-loading .search-spinner { display: block; }
@keyframes search-spin { to { transform: rotate(360deg); } }
.search-input-row .secondary-button { color: #43514b; border: 1px solid var(--line); background: #edf1ed; }
.search-examples { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; margin-top: .6rem; color: var(--muted); font-size: .72rem; }
.search-examples button { padding: .3rem .5rem; color: #315548; border: 1px solid #cbd8d1; border-radius: 999px; background: #f1f6f2; font-size: .7rem; }
.guided-search { margin-top: .8rem; border-top: 1px solid var(--line); }
.guided-search summary { padding-top: .75rem; cursor: pointer; color: #315548; font-size: .8rem; font-weight: 800; }
.filter-form { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .65rem; margin-top: .75rem; }
.filter-form > label { color: var(--muted); font-size: .7rem; font-weight: 750; }
.filter-form select { display: block; margin-top: .25rem; font-size: .78rem; }
.filter-checks { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: .6rem 1rem; }
.filter-checks label { color: #46564f; font-size: .78rem; }
.filter-form > button { justify-self: start; }
.search-feedback { margin-top: .8rem; color: var(--muted); font-size: .8rem; }
.interpreted-filters { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .45rem; }
.interpreted-filters span, .metadata-tags span { padding: .28rem .48rem; border-radius: 999px; background: #e9efe9; font-size: .68rem; font-weight: 750; }
.search-results { display: grid; grid-template-columns: repeat(3, 1fr); gap: .55rem; margin-top: .7rem; }
.search-result { padding: .7rem; text-align: left; color: var(--ink); border: 1px solid var(--line); border-radius: .7rem; background: #fbfaf5; }
.search-result strong, .search-result span { display: block; }
.search-result span { margin-top: .25rem; color: var(--muted); font-size: .72rem; }
.search-result small { display: inline-block; margin-top: .45rem; color: #315548; font-weight: 800; }
.route-description { max-width: 78ch; margin: .4rem 0 .65rem; color: var(--muted); }
.metadata-tags { display: flex; flex-wrap: wrap; gap: .35rem; }
.route-chip.is-filtered-out { display: none; }
.geo-route.is-filtered-out, .geo-route-marker.is-filtered-out { opacity: .08; }
.geo-route-halo.is-filtered-out { opacity: 0; }
.geo-route-hit.is-filtered-out { pointer-events: none; }
.svg-overlay .is-filtered-out { opacity: .12 !important; pointer-events: none !important; }
.map-hotspot.is-filtered-out { display: none; }

.map-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .7rem .85rem;
  color: white;
  border-radius: .8rem .8rem 0 0;
  background: #293d35;
}
.map-toolbar p { margin: 0; font-size: .85rem; }
.map-toolbar-actions { display: flex; flex: 0 0 auto; align-items: center; gap: .7rem; }
.map-interaction-hint { flex: 0 0 auto; color: #d8e2dc; font-size: .74rem !important; }
.zoom-controls { display: flex; gap: .25rem; }
.zoom-controls button, .online-overlay button {
  min-width: 2.2rem;
  min-height: 2.2rem;
  padding: .35rem .65rem;
  color: white;
  border: 1px solid rgb(255 255 255 / .25);
  border-radius: .45rem;
  background: rgb(255 255 255 / .12);
}

.map-viewport {
  overflow: auto;
  width: 100%;
  height: min(62vh, 690px);
  border: 1px solid #293d35;
  background: #14211c;
  overscroll-behavior: contain;
}
.map-frame { position: relative; background: #14211c; }
.map-fullscreen-button {
  display: inline-flex;
  position: absolute;
  z-index: 7;
  top: .75rem;
  right: .75rem;
  align-items: center;
  gap: .4rem;
  min-height: 2.2rem;
  padding: .45rem .7rem;
  color: white;
  border: 1px solid rgb(255 255 255 / .42);
  border-radius: 999px;
  background: rgb(16 43 35 / .9);
  box-shadow: 0 2px 8px rgb(0 0 0 / .28);
  font-size: .72rem;
  font-weight: 800;
}
.fullscreen-icon { font-size: 1rem; line-height: 1; }
.map-frame.is-map-fullscreen, .online-view.is-map-fullscreen {
  position: fixed;
  z-index: 1000;
  inset: 0;
}
body.has-map-fullscreen { overflow: hidden; }
.map-frame:fullscreen, .online-view:fullscreen,
.map-frame.is-map-fullscreen, .online-view.is-map-fullscreen,
.map-frame:-webkit-full-screen, .online-view:-webkit-full-screen {
  width: 100%;
  height: 100%;
  margin: 0;
  border-radius: 0;
  background: #14211c;
}
.map-frame:fullscreen .map-viewport, .map-frame:-webkit-full-screen .map-viewport, .map-frame.is-map-fullscreen .map-viewport,
.online-view:fullscreen .google-3d-container, .online-view:-webkit-full-screen .google-3d-container, .online-view.is-map-fullscreen .google-3d-container {
  width: 100%;
  height: 100%;
  max-height: none;
}
.map-frame:fullscreen .skip-map-button, .map-frame:-webkit-full-screen .skip-map-button, .map-frame.is-map-fullscreen .skip-map-button,
.online-view:fullscreen .skip-map-button, .online-view:-webkit-full-screen .skip-map-button, .online-view.is-map-fullscreen .skip-map-button {
  display: none;
}
.skip-map-button {
  flex: 0 0 auto;
  padding: .5rem .7rem;
  color: white;
  border: 1px solid rgb(255 255 255 / .42);
  border-radius: 999px;
  background: rgb(255 255 255 / .12);
  font-size: .72rem;
  font-weight: 800;
}

.map-canvas {
  position: relative;
  width: 100%;
  min-width: 760px;
  aspect-ratio: 6846 / 2111;
}

.interactive-map-viewport {
  overflow: hidden;
  cursor: grab;
  touch-action: none;
  scrollbar-width: none;
}
.interactive-map-viewport::-webkit-scrollbar { display: none; }
.interactive-map-viewport:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.interactive-map-viewport.is-dragging { cursor: grabbing; user-select: none; }
.geo-map-viewport { background: #d8dfcf; }
.editorial-map-canvas { min-width: 0; }
.geo-map-canvas {
  --geo-symbol-scale: 1;
  position: relative;
  width: 100%;
  aspect-ratio: 2.1 / 1;
  overflow: hidden;
  background: #d8dfcf;
}
.geo-base-mount, .geo-base-mount > svg, .geo-route-overlay, .geo-label-overlay, .geo-marker-overlay {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}
.geo-base-mount .roads path { fill: none; vector-effect: non-scaling-stroke; stroke-linecap: round; stroke-linejoin: round; }
.geo-base-mount .roads.minor path { stroke: #ffffff; stroke-width: 1.15; opacity: .92; }
.geo-base-mount .roads.trail path { stroke: #9c7354; stroke-width: 1.15; stroke-dasharray: 2.2 3.2; opacity: .9; }
.geo-base-mount .roads.track path { stroke: #b48c58; stroke-width: 1.45; stroke-dasharray: 5 2.5; }
.geo-base-mount .roads.local.casing path { stroke: #c8c3b6; stroke-width: 4.2; }
.geo-base-mount .roads.local:not(.casing) path { stroke: #fffdf7; stroke-width: 2.5; }
.geo-base-mount .roads.major.casing path { stroke: #c9a664; stroke-width: 6.4; }
.geo-base-mount .roads.major:not(.casing) path { stroke: #ffe6a6; stroke-width: 4.2; }
.geo-label-overlay .labels { color: #25372f; font-family: inherit; }
.geo-label-overlay .labels > g { transform: scale(var(--geo-symbol-scale)); transform-box: fill-box; transform-origin: center; }
.geo-label-overlay .labels > .is-label-collided { visibility: hidden; }
.geo-map-canvas[data-geo-detail="overview"] .geo-label-overlay .labels > :not(.municipality):not(.town):not(.village) { display: none; }
.geo-map-canvas[data-geo-detail="medium"] .geo-label-overlay .labels > :is(.locality, .isolated_dwelling, .farm, .square, .peak) { display: none; }
.geo-label-overlay .labels text { fill: currentColor; font-size: 12px; font-weight: 720; text-anchor: middle; paint-order: stroke; stroke: #f7f3e7; stroke-width: 3px; stroke-linejoin: round; }
.geo-label-overlay .labels .town text, .geo-label-overlay .labels .village text { font-size: 16px; font-weight: 850; }
.geo-label-overlay .labels .hamlet text, .geo-label-overlay .labels .locality text { font-size: 10px; }
.geo-label-overlay .labels .poi { color: #5c3323; }
.geo-label-overlay .labels .poi text { font-size: 9px; }
.geo-label-overlay .labels .peak circle { fill: #6e5e55; }
.geo-label-overlay .labels .hut circle { fill: #c04f35; stroke: white; stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.geo-route-overlay { z-index: 2; pointer-events: none; }
.geo-label-overlay { z-index: 3; pointer-events: none; }
.geo-marker-overlay { z-index: 4; pointer-events: none; }
.geo-route {
  fill: none;
  stroke-width: 5;
  vector-effect: non-scaling-stroke;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.geo-route-halo {
  fill: none;
  stroke: white;
  stroke-width: 12;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  opacity: 0;
  pointer-events: none;
}
.geo-route-halo.is-selected { opacity: .92 !important; }
.geo-route.is-selected { stroke-width: 8; opacity: 1 !important; }
.geo-route-hit { fill: none; stroke: transparent; stroke-width: 20; vector-effect: non-scaling-stroke; pointer-events: stroke; cursor: pointer; }
.geo-route-marker { stroke: white; stroke-width: 2.5; vector-effect: non-scaling-stroke; pointer-events: none; transform: scale(var(--geo-symbol-scale)); transform-box: fill-box; transform-origin: center; }
.route-traveler { pointer-events: none; }
.geo-map-canvas .route-traveler-visual { transform: scale(var(--geo-symbol-scale)); transform-origin: 0 0; }
.route-traveler-shadow { fill: #101c18; opacity: .35; }
.route-traveler-badge { stroke: white; stroke-width: 2.5; vector-effect: non-scaling-stroke; filter: drop-shadow(0 2px 2px rgb(0 0 0 / .35)); }
.route-traveler-pictogram { fill: none; stroke: white; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.route-traveler-pictogram .traveler-head { fill: white; stroke: white; }
.route-traveler-bob { transform-box: fill-box; transform-origin: center bottom; animation: traveler-step .6s ease-in-out infinite alternate; }
@keyframes traveler-step { to { transform: translateY(-2px); } }
.geo-user-location { pointer-events: none; }
.geo-user-location-visual { transform: scale(var(--geo-symbol-scale)); transform-origin: 0 0; }
.geo-user-accuracy { fill: #1685e6; fill-opacity: .16; stroke: #1685e6; stroke-opacity: .35; stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.geo-user-pulse { fill: none; stroke: #1685e6; stroke-width: 3; vector-effect: non-scaling-stroke; transform-box: fill-box; transform-origin: center; animation: location-pulse 1.8s infinite; }
.geo-user-dot { fill: #1685e6; stroke: white; stroke-width: 3; vector-effect: non-scaling-stroke; }
.geo-user-label rect { fill: rgb(18 48 65 / .92); stroke: white; stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.geo-user-label text { fill: white; font-size: 11px; font-weight: 850; }
@keyframes location-pulse { 70%, 100% { transform: scale(2); opacity: 0; } }
.geo-custom-poi { pointer-events: all; cursor: pointer; }
.geo-custom-poi-visual { transform: scale(var(--geo-symbol-scale)); transform-origin: 0 8px; }
.geo-custom-poi-pointer { fill: #ffd34e; stroke: #725600; stroke-width: 2; vector-effect: non-scaling-stroke; }
.geo-custom-poi-ring { fill: #ffd34e; stroke: white; stroke-width: 3; vector-effect: non-scaling-stroke; filter: drop-shadow(0 3px 4px rgb(32 28 8 / .42)); }
.geo-custom-poi-label rect { fill: #fff8c9; stroke: #725600; stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.geo-custom-poi-label text { fill: #332800; font-size: 11px; font-weight: 900; text-anchor: middle; }
.geo-custom-poi:hover .geo-custom-poi-ring,
.geo-custom-poi:focus .geo-custom-poi-ring { stroke: #332800; stroke-width: 4; }
.geo-custom-poi:focus { outline: none; }
.map-attribution {
  position: absolute;
  z-index: 5;
  right: .25rem;
  bottom: .2rem;
  padding: .15rem .3rem;
  color: #35443e;
  background: rgb(255 255 255 / .86);
  font-size: .62rem;
}
.map-load-error { margin: 0; padding: 2rem; color: #7a2e25; }
.map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1rem;
  padding: .5rem .7rem;
  color: var(--muted);
  border: 1px solid var(--line);
  border-top: 0;
  background: var(--paper);
  font-size: .7rem;
}
.map-legend span { display: inline-flex; align-items: center; gap: .35rem; }
.legend-poi-icon { width: 1.4rem; height: 1.4rem; object-fit: contain; padding: .1rem; border-radius: 50%; background: #ffd34e; }
.legend-line { display: inline-block; width: 1.8rem; height: 0; border-top: 3px solid; }
.legend-line--road { border-color: #d3a94f; }
.legend-line--track { border-color: #b48c58; border-top-style: dashed; }
.legend-line--trail { border-color: #9c7354; border-top-style: dotted; }
.legend-line--route { border-color: #ed5145; border-top-width: 5px; }
.map-canvas > img, .svg-overlay, .svg-overlay > svg {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}
.map-canvas > img { object-fit: fill; pointer-events: none; user-select: none; -webkit-user-drag: none; }
.svg-overlay { z-index: 2; pointer-events: none; }
.svg-overlay > svg { pointer-events: none !important; }
.svg-overlay .editorial-route,
.svg-overlay .editorial-route-halo,
.svg-overlay .poc-hitarea {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}
.svg-overlay .editorial-route { stroke-width: 1.5px; }
.svg-overlay .editorial-route-halo { stroke: rgb(255 255 255 / .88); stroke-width: 3px; }
.svg-overlay .poc-hitarea { stroke: transparent; stroke-width: 20px; pointer-events: stroke; cursor: pointer; }
.svg-overlay .editorial-route-layer.is-filtered-out { opacity: .1; pointer-events: none; }
.svg-overlay .editorial-route-layer.is-selected .editorial-route-halo { stroke-width: 6px; }
.svg-overlay .poc-selected {
  stroke: #ffd34e !important;
  stroke-width: 3px !important;
}

.map-hotspot {
  position: absolute;
  z-index: 3;
  top: 27.11%;
  left: 64.08%;
  width: 2.35rem;
  height: 2.35rem;
  transform: translate(-50%, -50%);
  color: white;
  border: 3px solid white;
  border-radius: 50%;
  background: #c6382d;
  box-shadow: 0 2px 10px rgb(0 0 0 / .45);
  font-size: .7rem;
  font-weight: 900;
}
.map-hotspot::after { content: ""; position: absolute; inset: -.55rem; border: 2px solid rgb(255 255 255 / .8); border-radius: 50%; animation: pulse 1.8s infinite; }
@keyframes pulse { 70%, 100% { transform: scale(1.35); opacity: 0; } }

.route-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .65rem;
  padding: .75rem 0;
}
.route-chip {
  display: flex;
  align-items: center;
  gap: .65rem;
  min-width: 0;
  padding: .7rem;
  text-align: left;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: .75rem;
  background: var(--paper);
}
.route-chip.is-selected { outline: 3px solid rgb(239 157 39 / .35); border-color: var(--accent); }
.route-chip span:last-child { min-width: 0; }
.route-chip strong, .route-chip small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.route-chip strong { font-size: .84rem; }
.route-chip small { margin-top: .2rem; color: var(--muted); }
.route-dot { flex: 0 0 auto; width: .8rem; height: .8rem; border-radius: 50%; }
.route-dot--orange { background: #ed8a25; }
.route-dot--green { background: #2d9b62; }
.route-dot--red { background: #c6382d; }

.online-view { position: relative; min-height: 62vh; overflow: hidden; border-radius: .8rem; background: #0f1d19; }
.view-panel.online-view { margin-right: 1rem; }
.google-3d-container { width: 100%; height: 68vh; min-height: 430px; }
.google-3d-map { display: block; width: 100%; height: 100%; }
.online-overlay { position: absolute; z-index: 5; top: .75rem; left: .75rem; right: .75rem; display: flex; align-items: center; gap: .75rem; pointer-events: none; }
.online-overlay button { pointer-events: auto; background: rgb(16 43 35 / .9); }
.online-overlay > span { min-width: 0; padding: .55rem .75rem; overflow: hidden; color: white; border-radius: .45rem; background: rgb(16 43 35 / .9); font-size: .82rem; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.online-overlay > span:empty { display: none; }
.online-overlay .skip-map-button { margin-left: auto; border-radius: 999px; }
.online-overlay .skip-map-button span { padding: 0; background: transparent; }
.online-overlay .map-fullscreen-button { position: static; flex: 0 0 auto; }
.online-notice { position: absolute; z-index: 8; inset: 0; display: grid; place-content: center; padding: 2rem; text-align: center; color: white; background: #10251f; }
.online-notice[hidden] { display: none; }
.online-notice a { color: #ffd34e; }

.poi-dialog {
  width: min(92vw, 620px);
  max-height: 88vh;
  padding: 0;
  overflow: visible;
  color: var(--ink);
  border: 0;
  border-radius: 1.1rem;
  background: transparent;
}
.poi-dialog::backdrop { background: rgb(8 24 19 / .72); backdrop-filter: blur(3px); }
.poi-dialog-shell { position: relative; max-height: 88vh; padding: clamp(1rem, 4vw, 1.6rem); overflow: auto; border: 3px solid #ffd34e; border-radius: 1.1rem; background: var(--paper); box-shadow: 0 24px 70px rgb(0 0 0 / .35); }
.poi-dialog-close { position: absolute; z-index: 2; top: .7rem; right: .7rem; width: 2.4rem; height: 2.4rem; padding: 0; color: #302500; border: 1px solid #d4b233; border-radius: 50%; background: #fff5a8; font-size: 1.6rem; line-height: 1; }
.poi-card { color: var(--ink); }
.poi-card h2 { margin: 0 3rem .65rem 0; font-size: clamp(1.45rem, 4vw, 2rem); }
.poi-card-eyebrow { color: #765c00; }
.poi-card-tags { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1rem; }
.poi-card-tags span { padding: .3rem .55rem; color: #183129; border-radius: 999px; background: #edf1eb; font-size: .72rem; font-weight: 800; }
.poi-card-tags .poi-sponsored-badge { color: #4b3900; background: #ffe16d; }
.poi-card-hero { display: grid; grid-template-columns: 118px 1fr; align-items: center; gap: 1rem; }
.poi-card-hero img { width: 118px; height: 118px; object-fit: contain; padding: .35rem; border-radius: 1rem; background: #fff5b8; }
.poi-card-hero p { margin-top: 0; }
.poi-card-suggestion { color: #614c08; font-weight: 700; }
.poi-card-meta { display: grid; gap: .3rem; margin-top: 1rem; padding: .75rem; border-radius: .7rem; background: #edf1eb; color: var(--muted); font-size: .78rem; }
.poi-card-note { margin: .8rem 0 0; color: var(--muted); font-size: .72rem; }
gmp-popover .poi-card { color: #f7faf7; }
gmp-popover .poi-card-eyebrow { color: #ffd34e; }
gmp-popover .poi-card-suggestion { color: #ffe16d; }
gmp-popover .poi-card-note { color: #c7d3cd; }

.route-details, .developer-tools {
  margin: 1rem;
  padding: clamp(1rem, 3vw, 1.5rem);
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--paper);
  box-shadow: 0 8px 28px rgb(31 49 41 / .06);
}
.empty-details { color: var(--muted); }
.empty-details h2 { color: var(--ink); }
.details-heading { display: flex; align-items: start; justify-content: space-between; gap: 1rem; }
.details-title { margin-bottom: .4rem; font-size: clamp(1.25rem, 3vw, 1.7rem); }
.stat-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: .6rem; margin: 1rem 0; }
.stat { padding: .7rem; border-radius: .65rem; background: #edf1eb; }
.stat strong, .stat span { display: block; }
.stat strong { font-size: 1.05rem; }
.stat span { margin-top: .2rem; color: var(--muted); font-size: .7rem; text-transform: uppercase; letter-spacing: .04em; }
.profile-card { padding: .8rem; border: 1px solid var(--line); border-radius: .75rem; }
.profile-labels { display: flex; justify-content: space-between; gap: 1rem; color: var(--muted); font-size: .78rem; }
.elevation-profile { display: block; width: 100%; height: auto; min-height: 120px; margin-top: .5rem; }

.developer-tools summary { cursor: pointer; font-weight: 800; }
.developer-tools label { display: block; margin-top: 1rem; }
.developer-tools button { margin-top: 1rem; padding: .6rem .8rem; }
.developer-tools p { margin: .7rem 0 0; color: var(--muted); font-size: .8rem; }

.editor-tools {
  margin: 1rem;
  padding: clamp(1rem, 3vw, 1.5rem);
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--paper);
  box-shadow: 0 8px 28px rgb(31 49 41 / .06);
}
.editor-tools-heading { display: flex; align-items: start; justify-content: space-between; gap: 1rem; }
.editor-tools-heading h2 { margin-bottom: .3rem; font-size: clamp(1.25rem, 3vw, 1.7rem); }
.editor-tools-intro { max-width: 78ch; color: var(--muted); }
.editor-status { flex: 0 0 auto; padding: .4rem .65rem; color: #3d4a45; border-radius: 999px; background: #e7ebe8; font-size: .72rem; font-weight: 800; }
.editor-status.is-ready { color: #174c35; background: #d9f1e3; }
.editor-status.is-warning { color: #6b4c00; background: #fff0bd; }
.editor-tool-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-top: 1rem; }
.editor-tool-card { min-width: 0; padding: 1rem; border: 1px solid #d6ddd8; border-radius: .85rem; background: #f8faf7; }
.editor-tool-card h3 { margin: 0 0 .4rem; }
.editor-tool-card > p { color: var(--muted); font-size: .82rem; }
.editor-form fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.editor-form fieldset:disabled { opacity: .55; }
.editor-form label, .translation-results label { display: block; margin: .75rem 0 .3rem; color: #394c44; font-size: .76rem; font-weight: 800; }
.editor-form textarea, .editor-form input, .translation-results textarea {
  width: 100%;
  padding: .65rem .75rem;
  color: var(--ink);
  border: 1px solid #b9c7bf;
  border-radius: .6rem;
  background: white;
}
.editor-form textarea, .translation-results textarea { display: block; resize: vertical; line-height: 1.4; }
.editor-form button, .place-confirm-button {
  min-height: 2.7rem;
  margin-top: .65rem;
  padding: .55rem .85rem;
  color: white;
  border: 0;
  border-radius: .6rem;
  background: var(--forest-soft);
  font-weight: 800;
}
.editor-form button:disabled { cursor: wait; opacity: .7; }
.editor-input-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .5rem; align-items: end; }
.editor-input-row button { margin-top: 0; white-space: nowrap; }
.editor-feedback { min-height: 1.2em; margin: .7rem 0 0; color: #35564a; font-size: .8rem; font-weight: 700; }
.editor-feedback.is-error { color: #8b2e22; }
.editor-feedback--success { color: #17633f; }
.translation-results { margin-top: .8rem; }
.translation-results textarea { min-height: 5.5rem; }
.editor-note { margin: .75rem 0 0; color: var(--muted); font-size: .72rem; }
.places-results { display: grid; gap: .45rem; margin-top: .7rem; }
.places-results-heading { margin: 0; color: var(--ink); font-size: .8rem; font-weight: 800; }
.place-candidate { display: grid; gap: .18rem; width: 100%; padding: .65rem .7rem; text-align: left; color: var(--ink); border: 1px solid #c7d2cc; border-radius: .6rem; background: white; }
.place-candidate span { color: var(--muted); font-size: .75rem; }
.place-candidate.is-selected { border-color: var(--forest-soft); outline: 2px solid rgb(29 90 73 / .22); background: #edf6f1; }
.place-details { margin-top: .75rem; padding: .8rem; border-left: 4px solid var(--accent); border-radius: .45rem; background: #fffaf0; }
.place-details h4 { margin: 0 0 .3rem; font-size: 1.05rem; }
.place-details > p { margin: 0 0 .55rem; color: var(--muted); font-size: .82rem; }
.place-details > a { display: inline-block; color: #155845; font-weight: 800; }
.place-coordinates { display: grid; grid-template-columns: auto 1fr; gap: .2rem .65rem; margin: .6rem 0; font-size: .8rem; }
.place-coordinates dt { color: var(--muted); }
.place-coordinates dd { margin: 0; font-variant-numeric: tabular-nums; }
.place-confirm-button { display: block; }

@media (max-width: 760px) {
  .view-switch { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .switch-button { min-width: 0; padding: .65rem .3rem; font-size: .75rem; }
  .search-heading { align-items: center; }
  .search-heading-actions { align-items: flex-end; flex-direction: column-reverse; }
  .panel-toggle-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .panel-toggle { justify-content: center; min-width: 2.25rem; min-height: 2.25rem; padding: .3rem; }
  .search-panel.is-collapsed .search-heading .eyebrow { display: none; }
  .search-panel.is-collapsed .search-heading h2 { font-size: 1rem; }
  .map-viewport {
    height: min(58vh, 520px);
    height: min(58svh, 520px);
  }
  .route-strip { grid-template-columns: 1fr; }
  .geo-map-canvas { aspect-ratio: 1.4 / 1; }
  .map-canvas:not(.editorial-map-canvas) { min-width: 680px; }
  .map-toolbar { align-items: flex-start; }
  .map-toolbar > p { max-width: 58%; }
  .map-interaction-hint { display: none; }
  .stat-grid { grid-template-columns: repeat(3, 1fr); }
  .details-heading { display: block; }
  .search-input-row { grid-template-columns: 1fr auto; }
  .search-input-row input { grid-column: 1 / -1; }
  .filter-form { grid-template-columns: 1fr 1fr; }
  .search-results { grid-template-columns: 1fr; }
  .poi-card-hero { grid-template-columns: 82px 1fr; align-items: start; }
  .poi-card-hero img { width: 82px; height: 82px; }
  .online-overlay > span { flex: 1 1 auto; padding: .4rem .55rem; }
  .online-overlay .skip-map-button { min-width: auto; white-space: nowrap; }
  .editor-tools-heading { display: block; }
  .editor-status { display: inline-block; margin-bottom: .6rem; }
  .editor-tool-grid { grid-template-columns: 1fr; }
  .editor-input-row { grid-template-columns: 1fr; }
  .editor-input-row button { width: 100%; }
  .fullscreen-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .map-fullscreen-button { justify-content: center; min-width: 2.35rem; padding: .4rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
