/* Interaction hierarchy: preserve the map, put visiting facts ahead of metadata. */
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.search-scope{color:#b6d7cd;font-size:12px;margin:0 0 6px}
.place-row-copy .search-match-context{display:block;color:var(--accent);margin:4px 0}
.row-arrow svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.empty-actions{display:grid;gap:8px;margin-top:12px}
.empty-actions .secondary{margin:0}
.route-quarter{display:flex;align-items:center;justify-content:space-between;gap:9px;padding:8px 9px;margin:0 0 7px;border:1px solid var(--line);border-radius:10px;font-size:11px;line-height:1.5;color:#c7e5dc}
.route-quarter strong{color:var(--text)}
.route-quarter button{flex-shrink:0;padding:5px 9px;min-height:36px;font-size:11px}
.distance-hint{margin:0 0 14px;color:#b2d0c6;font-size:11px;line-height:1.45}
.preset-copy .preset-facts{display:grid;gap:2px}
.preset-facts b{font-size:13px;font-weight:650;color:var(--accent)}
.preset-facts span{font-size:11px;color:#bad7cc}
.app-shortcuts{display:flex;gap:5px;margin-left:auto;flex-shrink:0}
.app-shortcuts .pwa-open{padding:5px 7px;min-height:44px;font-size:11px;gap:3px}
.app-shortcuts .pwa-open svg{width:16px;height:20px;flex-shrink:0}
.app-shortcuts .pwa-open span{max-width:none;white-space:nowrap}
.app-shortcuts .pwa-open:hover{background:#c5f4df16}
.atlas:is(.detail-open,.itinerary-open,.list-open) ~ .app-update{display:none}
.map-tools button{width:44px;height:44px}
.map-caption button[data-action="legend"]{display:none}
#legend-items{display:flex;align-items:center;flex-wrap:wrap;list-style:none;padding:0;margin:0;gap:7px 12px}
#legend-items li{display:flex;align-items:center;gap:5px;white-space:nowrap}
#legend-items .legend-swatch{width:9px;height:9px;margin:0;border:1px solid #f0fff5}
.legend-swatch.beach{background:#1b685b}
.legend-swatch.sights{background:#a27037}
.legend-swatch.nature{background:#45714b}
.legend-swatch.food{background:#a3523f}
.legend-swatch.bus{background:#386987}
.map-caption .legend-bus,.map-caption .legend-route{display:none!important}
.atlas:has(.bus-scope) .map-caption .legend-bus,.route-on-map .map-caption .legend-route{display:flex!important}
.legend-route b{display:grid;place-items:center;width:17px;height:17px;color:#123832;background:#baf7de;border-radius:5px}
.route-on-map .marker-cluster{opacity:.24}
.route-on-map .pin-wrapper:not(:hover):not(:focus-within) .pin:not(.numbered):not(.is-selected){opacity:.24}
.route-on-map .pin-wrapper:not(:hover):not(:focus-within) .pin:not(.numbered):not(.is-selected)+.pin-name{opacity:.25}
.route-on-map .pin.numbered{background:#baf7de;color:#0b342e;border:2px solid #156755;border-radius:11px 11px 11px 3px}
.route-on-map .pin.numbered.is-selected{border-color:#123e36;background:#e8fff3}
.map-tools button:focus-visible,.detail-more:focus-visible,.detail-close:focus-visible,.itinerary-title button:focus-visible,.app-shortcuts button:focus-visible{outline:2px solid #a5f1d5;outline-offset:1px}

.detail-close{position:absolute;right:10px;top:10px;z-index:4;width:44px;height:44px;background:#102f36ed}
.detail .quick-fact,.detail .detail-more,.detail .no-desktop-actions{display:none}
.detail-content .coords{margin-top:14px}
.detail-actions .detail-save,.detail-actions .detail-nav{min-height:44px;white-space:normal}
.itinerary-title{position:relative;padding:15px 17px 11px;border-bottom:1px solid var(--line);flex-shrink:0}
.itinerary-title h2{margin:5px 48px 0 0}
.itinerary-title .round{position:absolute;right:10px;top:9px;width:44px;height:44px}
.itinerary-body{min-height:0;flex:1;overflow:auto;scrollbar-width:thin;scrollbar-color:#396b60 transparent}
.route-overview{padding:11px 17px 9px;border-bottom:1px solid var(--line)}
.route-summary{display:flex;align-items:center;flex-wrap:wrap;justify-content:space-between;gap:5px 14px}
.route-summary>div:first-child{display:flex;gap:5px 7px;align-items:baseline;flex-wrap:wrap}
.route-summary strong{font:700 19px/1.15 Manrope,system-ui;color:var(--accent)}
.route-summary small{font-size:11px;color:#c9e4db}
.route-metrics{display:flex;gap:6px;padding:3px 0;font-size:12px;color:#c5dfd6}
.route-metrics span+span:before{content:'·';margin-right:6px;color:var(--muted)}
.route-overview .route-time-window{font-size:12px;color:#d0e3b7;margin:7px 0}
.route-settings summary{color:#bae5d9;font-size:12px;line-height:1.4;cursor:pointer;padding:8px 0}
.itinerary .stops{overflow:visible;padding:0 17px 10px}
.stops-heading{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-top:5px}
.stops-heading h3{font-size:14px;margin:0}
.stops-heading h3 span{font-size:11px;margin-left:6px;color:#bdd8d0}
.stops-heading button{min-height:44px;padding:4px 8px;font-size:11px}
.itinerary .stop{padding:10px 0;grid-template-columns:64px minmax(0,1fr);gap:3px 10px}
.itinerary .stop-photo{width:64px;height:59px;grid-row:1 / span 2}
.stop-copy{min-height:44px}
.stop-copy strong{font-size:15px;font-weight:650}
.stop-copy .stop-practical{font-size:12px;color:#daf0e6;line-height:1.38;margin:3px 0 0;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}
.stop-copy small,.stop-copy .stop-photo-note{font-size:11px;line-height:1.4}
.itinerary .stop-controls{grid-column:2;justify-content:flex-end;margin-right:0}
.itinerary .stop-controls button{width:44px;min-height:44px}
.itinerary .edit-stops-hint{font-size:11px}
.route-footer .primary{min-height:44px}
.route-secondary-actions{display:flex;gap:6px}
.itinerary .route-secondary-actions .secondary{flex:1;min-height:44px}
.itinerary .route-secondary-actions .route-show-map{display:none}

@media(max-width:760px){
 .app-shortcuts .pwa-open{padding:4px 6px;font-size:10px}
 .app-shortcuts .pwa-open svg{width:14px;height:18px}
 .masthead .brand{min-width:0}
 .atlas.list-open .explorer{overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin}
 .atlas.list-open .explorer>section{flex:0 0 auto;overflow:visible;min-height:0}
 .atlas.list-open .explorer :is(.results,#route-presets,#guide-list){overflow:visible;max-height:none;flex:none}
 .explorer:has(#routes-content:not([hidden])) .town-context-head{display:none}
 .explorer .route-filter{position:static}
 .explorer .preset-image{height:85px}
 .explorer .preset-copy small{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
 .map-tools{gap:2px}
 .map-tools button{width:44px;height:44px}
 .detail,.itinerary{height:calc(100dvh - 174px - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px));max-height:calc(100dvh - 174px - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px))}
 .detail.collapsed{display:grid;grid-template-columns:minmax(68px,25%) minmax(0,1fr);grid-template-rows:minmax(0,1fr) auto;height:160px}
 .detail.collapsed .detail-hero{height:auto;margin:9px 0 9px 10px;border-radius:9px}
 .detail.collapsed .hero-credit,.detail.collapsed .photo-counter{display:none}
 .detail.collapsed .detail-hero .no-photo{padding:5px;font-size:10px}
 .detail.collapsed .detail-content{display:flex;flex-direction:column;justify-content:center;padding:5px 46px 5px 11px;min-width:0}
 .detail.collapsed .detail-content .original-name,.detail.collapsed .detail-category span:last-child{display:none}
 .detail.collapsed .detail-category{margin:0 0 3px;letter-spacing:.5px}
 .detail.collapsed h2{font-size:clamp(16px,4.5vw,21px);margin:0;letter-spacing:-.25px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
 .detail.collapsed .detail-content>.quick-fact:not(.original-name):not(.detail-category){font-size:12px;line-height:1.32;color:#bae9d9;margin:4px 0 0;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
 .detail.collapsed .detail-close{right:4px;top:4px}
 .detail-actions,.detail .no-desktop-actions{display:flex;padding:6px 9px;gap:6px}
 .detail .detail-more{display:inline-flex;flex:1;min-height:44px;padding:5px 9px}
 .detail-actions .detail-save,.detail-actions .detail-nav{padding:5px 8px}
 .detail.collapsed .detail-actions{grid-column:1/-1}
 .detail.collapsed .detail-save{display:none}
 .detail-content .coords button{min-height:44px}
 .itinerary-title{padding:9px 13px 8px}
 .itinerary-title .round{top:4px;right:5px}
 .itinerary-title h2{font-size:19px}
 .route-overview{padding:8px 12px 4px}
 .route-settings summary{min-height:40px;display:list-item;padding-top:10px}
 .itinerary .stops{padding-left:12px;padding-right:12px}
 .route-footer{padding:7px 10px}
 .itinerary .route-secondary-actions .route-show-map{display:inline-flex}
 .route-quarter button{min-height:44px}
 .mobile-dock button{height:44px;min-width:0}
}
@media(min-width:520px) and (max-width:760px){
 .route-footer{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
}
@media(max-width:760px) and (max-height:540px){
 .detail:not(.collapsed) .detail-hero{height:clamp(62px,17dvh,115px)}
 .detail-content{padding:12px}
 .itinerary .stop{padding:6px 0}
}
