/* Planner layout owns its space: header, map, optional stop dock, booking action. */
.planner-intro{padding:18px 28px!important;gap:16px}
.planner-intro h1{font-size:30px!important;line-height:1.15;margin:0 0 5px!important;letter-spacing:-1px}
.planner-intro p{font-size:13px!important;margin:0}
.planner-promise{font-size:12px;color:var(--muted)}
.mobile-planner-tabs{display:none}
.planner-tab-icon{width:16px;height:16px;flex:none;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
/* District chips echo the route colours; view navigation stays visually separate. */
#stops-screen .areas{gap:6px}
#stops-screen .areas button{display:inline-flex;align-items:center;justify-content:center;gap:5px;border:1px solid #e5e3db;border-radius:999px;background:#fffdf8;color:#62645d;box-shadow:none;font-weight:550;transition:background .15s,border-color .15s,color .15s}
#stops-screen .areas button::before{display:none}
#stops-screen .areas button[data-area]::before{content:'';display:block;width:5px;height:5px;flex:none;margin:0;border-radius:50%;background:var(--district-color)}
#stops-screen .areas button[aria-pressed=true]{border-color:#e7b798;background:#fff0e3;color:#9c3e18;font-weight:700}
#stops-screen .areas button[data-area][aria-pressed=true]{border-color:var(--district-color);background:var(--district-tint);color:var(--district-color)}
@media(hover:hover){#stops-screen .areas button:hover{background:#f7f2e9;border-color:#cfc8bb}#stops-screen .areas button[data-area]:hover{background:var(--district-tint);border-color:var(--district-color)}}
.planner-demo-note{font-size:11px;color:var(--muted)}
#stops-screen .map-panel{height:clamp(440px,calc(100dvh - 230px),900px);box-shadow:none}
#stops-screen .map-column{box-shadow:none}
#stops-screen .map-controls button{width:38px;height:38px;min-height:38px;padding:0;font-size:20px}
#stops-screen .close-place{width:44px;height:44px;top:4px;right:4px;z-index:2;background:#fffdf8}
#stops-screen .place-body{padding-right:18px}
#stops-screen .journey-stop-heading{padding-right:32px}
#stops-screen .place-body h2{margin-right:30px}
#stops-screen .place-card.no-photo{grid-template-columns:minmax(0,1fr)}
#stops-screen .search-row input{min-width:0}
#stops-screen .search-results{top:calc(100% + 4px);max-height:min(240px,40dvh);overscroll-behavior:contain;border-radius:12px}
#stops-screen .search-results button{min-height:44px}
#stops-screen .place-search{z-index:12}
#stops-screen .place-actions{flex-wrap:wrap}
#stops-screen .dwell-label select{min-height:44px}
#stops-screen .journey-stop-navigation button{width:44px;height:44px}
#stops-screen .optimize-tools button,#stops-screen .stop-order-controls button{min-height:44px}
.brandbar #menu{max-width:calc(100vw - 24px);max-height:calc(100dvh - 90px);overflow:auto;overscroll-behavior:contain}
.brandbar #menu a{display:block;padding:12px;min-height:44px;font-size:13px;color:inherit;text-decoration:none}
.app dialog{max-width:calc(100vw - 24px);max-height:calc(100dvh - 24px);overflow:auto;overscroll-behavior:contain}
.app .form-grid>*{min-width:0}
.app input,.app select,.app textarea{max-width:100%}

.map-action-icon{display:block;flex:none;width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
#stops-screen .search-row button,#stops-screen .route-trigger{display:flex;align-items:center;justify-content:center;gap:6px}
#stops-screen .route-trigger .map-action-label{display:inline}
#stops-screen .map-controls #recenter{font-size:19px;transform:none}
@media(min-width:761px) and (max-width:1000px){
 #map-explorer.explore-layout{grid-template-columns:minmax(0,1fr) 270px;gap:14px;padding-inline:16px}
 #stops-screen .journey-summary{padding:16px}
 #stops-screen .journey-metrics strong{font-size:19px}
 #stops-screen .areas button{padding-inline:10px;font-size:11px}
}
@media(max-width:760px){
 #stops-screen .map-action-label,#stops-screen .route-trigger .map-action-label{display:none}
 /* The booking bar is in the flex layout, so its actual height is reserved. */
 .app:has(#stops-screen:not([hidden])){display:flex;flex-direction:column;height:100dvh;min-height:480px;max-width:none;margin:0;border-radius:0;padding:0;overflow:hidden}
 .app:has(#stops-screen:not([hidden]))>.brandbar{flex:none;min-height:52px;padding:4px 12px;padding-top:max(4px,env(safe-area-inset-top));gap:8px}
 .app:has(#stops-screen:not([hidden]))>.feature-nav{display:none}
 .app:has(#stops-screen:not([hidden]))>main{flex:1;min-height:0;overflow:hidden}
 #stops-screen:not([hidden]){height:100%;min-height:0;display:flex;flex-direction:column;animation:none}
 #stops-screen .planner-intro{position:absolute;width:1px;height:1px;padding:0!important;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
 .brandbar .header-actions{gap:4px;min-width:0}
 .brandbar .header-actions>a:not(.atlas-entry){display:flex;align-items:center;min-height:44px;font-size:11px!important;padding:5px!important;white-space:nowrap}
 .brandbar .header-actions>.atlas-entry{display:none}
 .brandbar #menu-toggle{width:44px;min-width:44px;height:44px;padding:8px}
 .brandbar #menu{top:calc(100% - 2px);right:12px}
 .mobile-planner-tabs{display:grid;flex:none;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px;padding:0 0 3px;margin:0 12px 6px;border-bottom:1px solid #e8e3d9;background:transparent;border-radius:0}
 .mobile-planner-tabs button{position:relative;display:flex;align-items:center;justify-content:center;gap:7px;min-width:0;min-height:38px;padding:7px 4px;border:0;border-radius:8px;background:transparent;color:#73746d;font-size:13px;font-weight:550;white-space:nowrap;box-shadow:none;transition:color .15s,background .15s}
 .mobile-planner-tabs button::after{content:'';position:absolute;bottom:-4px;left:calc(50% - 18px);width:36px;height:3px;border-radius:3px;background:transparent}
 .mobile-planner-tabs button:hover{background:#f5eee3;color:#9c3e18}
 .mobile-planner-tabs button[aria-pressed=true]{background:transparent;color:#ac431b;font-weight:700}
 .mobile-planner-tabs button[aria-pressed=true]::after{background:#ed632b}
 #stops-screen #map-explorer{display:flex;flex:1;min-height:0;flex-direction:column;padding:0 8px 8px;gap:8px;overflow:auto;overscroll-behavior:contain}
 #stops-screen .map-column{display:flex;flex:1;min-height:280px;flex-direction:column;width:100%;border-radius:16px}
 #stops-screen .map-panel{flex:1;height:auto;min-height:290px;padding:0;border:0!important;border-radius:0}
 #stops-screen .hero{inset:0 0 auto;height:42px;padding:3px 6px;background:#fffdf8}
 #stops-screen .areas{gap:4px;min-width:0}
 #stops-screen .areas button{flex:1;min-width:0;min-height:32px;padding:5px 6px;font-size:11px;white-space:nowrap}
 #stops-screen .areas #whole-journey{flex:1.35}
 #stops-screen .place-search{top:44px;left:8px;width:calc(100% - 16px)}
 #stops-screen .search-row{gap:6px}
 #stops-screen .search-row input{font-size:16px;min-height:40px;padding:8px}
 #stops-screen .search-row button{width:40px;min-height:40px;padding:8px;font-size:11px;flex:none;display:grid;place-items:center}
 #stops-screen .map-viewport{inset:92px 0 24px}
 #stops-screen .map-controls{top:100px;right:8px;gap:6px}
 #stops-screen .map-controls button{width:38px;height:38px;min-height:38px;padding:0;font-size:20px}
 #stops-screen .zoom-controls{display:grid;gap:6px}
 #stops-screen #enter-map-fullscreen{top:100px;left:8px;bottom:auto;width:38px;height:38px;min-height:38px;padding:8px;display:grid;place-items:center;border-radius:10px}
 #stops-screen .route-trigger{left:8px;right:auto;top:auto;bottom:32px;width:38px;height:38px;min-height:38px;padding:8px;display:grid;place-items:center;border-radius:10px}
 #stops-screen .map-credit{inset:auto 0 0;max-width:none;width:100%;height:24px;display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:0 3px;font-size:7px;padding:2px 4px;border-radius:0;background:#fffdf8;line-height:1.2}
 #stops-screen .journey-playback{flex:none;padding:6px 8px;gap:8px}
 #play-journey{min-width:0;min-height:44px;padding:8px 12px;font-size:11px}
 #journey-playback-note{display:none}
 #journey-progress{height:24px}
 #restart-journey{width:44px;height:44px}
 #stops-screen .journey-rail{display:none}
 #stops-screen .tour-sidebar{flex:none;width:100%;min-height:0;padding:0;gap:10px;overflow:visible;z-index:auto}
 #stops-screen[data-mobile-view=map] .journey-summary,
 #stops-screen[data-mobile-view=map] .itinerary,
 #stops-screen[data-mobile-view=map] #street-route-status{display:none}
 #stops-screen[data-mobile-view=map] .tour-sidebar:not(:has(#place-card:not([hidden]),#custom-editor:not([hidden]))){display:none}
 /* Stop details are a bounded dock, never a fixed scrim over map controls. */
 #stops-screen #place-card:not([hidden]),#stops-screen #custom-editor:not([hidden]){position:relative;inset:auto;width:100%;max-height:32dvh;overflow:auto;overscroll-behavior:contain;box-shadow:none;border:1px solid var(--border);border-radius:16px;background:#fffdf8;scroll-margin:0}
 #stops-screen #place-card:not([hidden]){display:grid;grid-template-columns:72px minmax(0,1fr);align-items:start}
 #stops-screen #place-card.no-photo{grid-template-columns:minmax(0,1fr)}
 #stops-screen .place-card>img{width:60px;height:76px;margin:12px 0 0 10px;border-radius:10px}
 #stops-screen .place-body{padding:10px 12px}
 #stops-screen .place-body h2{font-size:19px;margin:5px 30px 6px 0;overflow-wrap:anywhere}
 #stops-screen .journey-stop-heading .eyebrow{display:none}
 #stops-screen .place-meta{font-size:11px}
 #stops-screen .place-more{font-size:12px;margin:6px 0}
 #stops-screen .place-more summary{min-height:44px;display:flex;align-items:center}
 #stops-screen .place-actions{gap:8px;justify-content:space-between}
 #stops-screen .dwell-label{display:flex;align-items:center;gap:6px;font-size:11px}
 #stops-screen .dwell-label select{font-size:16px;max-width:90px}
 #stops-screen .place-actions .orange-button{flex:1;min-height:44px;font-size:12px}
 #stops-screen .journey-stop-navigation{margin-top:8px;padding-top:6px}
 #stops-screen .custom-editor{padding:16px}
 #stops-screen .custom-editor h2{padding-right:32px;font-size:22px}
 #stops-screen[data-mobile-view=stops] #map-explorer{display:block}
 #stops-screen:not([data-mobile-view=map]) .map-column{display:none}
 #stops-screen[data-mobile-view=stops] .journey-summary{padding:4px 8px 12px;border:0!important;background:transparent!important}
 #stops-screen[data-mobile-view=stops] .journey-summary-heading,
 #stops-screen[data-mobile-view=stops] .journey-summary h2,
 #stops-screen[data-mobile-view=stops] .journey-price,
 #stops-screen[data-mobile-view=stops] #journey-continue,
 #stops-screen[data-mobile-view=stops] .journey-summary>small{display:none}
 #stops-screen .journey-metrics{padding:8px 0 12px;border-top:0}
 #stops-screen .route-endpoints summary{min-height:44px;align-content:center}
 #stops-screen .itinerary-heading{min-height:44px}
 #stops-screen #selected-stops{max-height:none;overflow:visible}
 #stops-screen #selected-stops .stop-about summary{grid-template-columns:48px minmax(0,1fr);gap:10px}
 #stops-screen .stop-thumbnail{width:48px;height:48px}
 #stops-screen .stop-about-hint{font-size:11px}
 #stops-screen .arrival-note{font-size:11px}
 #stops-screen:not([data-mobile-view=ideas]) .tour-price-catalog{display:none}
 #stops-screen[data-mobile-view=ideas] #map-explorer{display:none}
 #stops-screen .tour-price-catalog{min-height:0;overflow:auto;padding:8px 12px 20px!important;margin:0!important;overscroll-behavior:contain}
 #stops-screen .tour-price-catalog .section-head{display:block}
 #stops-screen .tour-price-catalog h2{font-size:24px!important;margin-bottom:8px}
 .app:has(#stops-screen:not([hidden])) #booking-bar{position:relative;inset:auto;flex:none;z-index:25;width:100%;padding:8px 12px calc(8px + env(safe-area-inset-bottom));min-height:72px;gap:8px;border-radius:0;background:#fffdf8}
 #booking-bar .quote{min-width:0;line-height:1.2}
 #booking-bar .quote>div{margin-top:2px;line-height:1.15}
 #booking-bar .quote strong{font-size:25px}
 #booking-bar .quote>span{font-size:11px}
 #booking-bar .orange-button{min-height:44px;padding:10px 12px;font-size:12px}
 #booking-bar #estimate-note{font-size:10px}
 .app .toast{bottom:calc(100px + env(safe-area-inset-bottom));pointer-events:none;width:max-content;max-width:calc(100% - 24px)}
 .app input:not([type=range]),.app select,.app textarea{font-size:16px}
 .app .steps{overflow-x:auto;justify-content:flex-start;max-width:100%;padding:10px 12px}
 .app .steps button{min-height:44px;flex-shrink:0}
 .app .form-buttons{flex-wrap:wrap;gap:12px}
 /* Full screen uses the same dock and remains usable in short viewports. */
 body.map-fullscreen #map-explorer{height:100dvh;padding:env(safe-area-inset-top) 8px env(safe-area-inset-bottom);gap:6px;overflow:auto;z-index:100}
 body.map-fullscreen #stops-screen .map-column{display:flex;flex:1;min-height:280px}
 body.map-fullscreen #stops-screen .map-panel{flex:1;min-height:290px;height:auto}
 body.map-fullscreen #stops-screen #enter-map-fullscreen{display:none}
 body.map-fullscreen #stops-screen .tour-sidebar{max-height:none;padding:0;overflow:visible}
 body.map-fullscreen #stops-screen #place-card:not([hidden]),body.map-fullscreen #stops-screen #custom-editor:not([hidden]){position:relative;max-height:32dvh;margin:0}
 body.map-fullscreen .map-fullscreen-bar{padding:4px 0;min-height:52px}
}
@media(max-width:360px){
 #booking-bar .quote strong{font-size:23px}
 #booking-bar .orange-button{font-size:11px;padding-inline:9px}
 #stops-screen .areas button{font-size:10px}
 #stops-screen .place-actions{flex-direction:column;align-items:stretch}
 .app .form-grid{grid-template-columns:minmax(0,1fr)}
}
@media(max-width:760px) and (max-height:650px){
 #stops-screen .journey-playback{display:none}
 #stops-screen .map-column{min-height:290px}
 #stops-screen #place-card:not([hidden]),#stops-screen #custom-editor:not([hidden]){max-height:44dvh}
 #stops-screen .map-column:has(+.tour-sidebar #place-card:not([hidden])),#stops-screen .map-column:has(+.tour-sidebar #custom-editor:not([hidden])){flex:none;height:290px}
}
/* A landscape phone keeps the working map above the fold. */
@media(min-width:761px) and (max-width:1000px) and (max-height:500px){
 .app:has(#stops-screen:not([hidden])){margin:0;border-radius:0}
 .app:has(#stops-screen:not([hidden]))>.brandbar{min-height:60px;padding:8px 16px}
 .app:has(#stops-screen:not([hidden]))>.feature-nav,#stops-screen .planner-intro{display:none}
 #stops-screen #map-explorer{padding-top:8px}
 #stops-screen .map-panel{height:calc(100dvh - 76px);min-height:300px}
 #stops-screen .route-trigger{left:12px;right:auto}
}

/* Tour itineraries stay in the ideas panel, leaving the map controls clear. */
.tour-price-links .tour-option{flex:1;min-width:0}
.tour-price-links .tour-option>a{height:auto;width:100%;box-sizing:border-box}
.tour-option details{margin:10px 4px;font-size:13px;line-height:1.6}
.tour-option summary{cursor:pointer;font-weight:600;min-height:32px}
.tour-option ol{padding-left:22px;margin:8px 0}
.tour-option>button{width:100%;min-height:44px;border:1px solid #ead9c4;background:#fffdf8;border-radius:12px;padding:10px;color:#9c3e18;font-weight:650}
@media(max-width:760px){.tour-price-links .tour-option{flex:auto;width:100%}}

#map-markers .geo-pin.tiny .pin-number{display:none}
