/* TripWeave v6.17.0 map-first workspace */
.map-panel{width:100%;max-width:none;margin-inline:auto;padding:18px 20px 16px}
.map-runtime-head{align-items:center;padding:2px 2px 6px}.map-runtime-head>div:first-child{min-width:0}.map-runtime-head>b{font-size:20px}.map-status{line-height:1.5}
.map-primary-actions{justify-content:center;margin:10px auto 14px;gap:8px}.map-primary-actions>.primary{min-width:150px}.map-more-actions{position:relative}.map-more-actions>summary{list-style:none;cursor:pointer;border:1px solid #d7e2d8;background:#fff;border-radius:10px;padding:8px 12px;font-weight:800;color:#174f3f}.map-more-actions>summary::-webkit-details-marker{display:none}.map-more-menu{position:absolute;right:0;top:calc(100% + 6px);z-index:30;min-width:210px;padding:8px;border:1px solid #d9e3da;border-radius:12px;background:#fff;box-shadow:0 14px 34px rgba(20,52,43,.14);display:grid;gap:6px}.map-more-menu button{width:100%;text-align:left}
.map-first-workspace{display:grid!important;grid-template-columns:1fr!important;gap:14px!important}
.map-first-workspace>.map-visual-stage{grid-column:1;min-height:640px!important;height:min(68vh,760px);border-radius:18px;box-shadow:0 12px 34px rgba(27,70,57,.08)}
.map-first-workspace>.map-sidebar{grid-column:1;display:grid;grid-template-columns:minmax(0,1.25fr) minmax(320px,.75fr);gap:14px;align-items:start;max-height:none!important}
.map-first-workspace .map-stop-list{max-height:350px!important;overflow:auto!important;margin:0!important;padding:2px 5px 2px 0}
.map-first-workspace .map-selected-place{position:sticky;top:96px;min-height:150px;max-height:350px;overflow:auto;background:#fff}
.map-stop-card{border-radius:13px;transition:transform .18s ease,box-shadow .18s ease}.map-stop-card:has(.map-stop-item.selected){box-shadow:0 8px 24px rgba(31,82,65,.12);transform:translateY(-1px)}
.map-stop-item{width:100%;text-align:left;cursor:pointer}.map-stop-item>b{min-width:42px;padding-inline:6px}.map-stop-item.selected>b{background:#174f3f;color:#fff}
.map-external-links{display:flex;justify-content:flex-end;gap:8px;padding:2px 12px 10px;flex-wrap:wrap}.map-external-links a{font-size:11px;font-weight:800;color:#295f50;text-decoration:none}.map-external-links a:hover{text-decoration:underline}
.map-transfer[data-leg]{transition:opacity .18s ease,color .18s ease,border-color .18s ease}.map-transfer[data-leg].selected{color:#174f3f;border-color:#174f3f;font-weight:900;background:#f1f7f3;border-radius:8px}
.map-base-layer [data-leg]{transition:opacity .2s ease,stroke-width .2s ease}.map-base-layer [data-leg].selected{opacity:1!important;stroke-width:8!important}.map-base-layer:has([data-stop].selected) [data-leg]:not(.selected){opacity:.24!important}
.tw-map-marker.selected{transform:scale(1.14);box-shadow:0 0 0 7px rgba(245,186,66,.28),0 8px 18px rgba(16,54,45,.3);animation:tw-map-pulse .38s ease-out}.tw-map-marker{transition:transform .18s ease,box-shadow .18s ease}@keyframes tw-map-pulse{0%{transform:scale(.9)}60%{transform:scale(1.22)}100%{transform:scale(1.14)}}
.map-travel-summary{max-width:980px;margin-inline:auto;text-align:center}.map-legend{text-align:center;max-width:980px;margin-inline:auto}
.map-detail-actions{justify-content:flex-start}.map-detail-actions a,.map-detail-actions button{transition:background .16s ease,transform .16s ease}.map-detail-actions a:hover,.map-detail-actions button:hover{background:#edf6f0;transform:translateY(-1px)}
/* planner headings: visual axis centered, field labels remain left aligned */
.step-heading{justify-content:center;text-align:center}.step-heading>span{align-self:center}.step-heading>div{max-width:760px}.planner-step>.form-grid{margin-top:20px}
/* candidate explanation */
.candidate-card.featured{border-color:#8bbca5;box-shadow:0 14px 34px rgba(30,83,64,.11)}.candidate-smart-pick{display:flex;align-items:flex-start;gap:8px;margin:10px 0;padding:10px 12px;border-radius:11px;background:#edf7ef;color:#245344;font-size:12px;line-height:1.5}.candidate-smart-pick b{white-space:nowrap}.theme-budget-note{margin-top:10px;padding:11px 13px;border-radius:11px;background:#f2f7ef;border:1px solid #d8e7d4;color:#365b48;line-height:1.55}
@media(max-width:900px){.map-first-workspace>.map-visual-stage{height:54vh;min-height:440px!important}.map-first-workspace>.map-sidebar{grid-template-columns:1fr}.map-first-workspace .map-selected-place{position:static;max-height:none}.map-first-workspace .map-stop-list{max-height:300px!important}.step-heading{justify-content:flex-start;text-align:left}}
@media(max-width:560px){.map-panel{padding:10px}.map-first-workspace>.map-visual-stage{height:44vh;min-height:350px!important}.map-primary-actions{display:grid;grid-template-columns:1fr auto}.map-primary-actions>.primary{min-width:0}.map-more-menu{right:0;left:auto}.map-first-workspace .map-stop-list{max-height:none!important;overflow:visible!important}.map-selected-place{border-radius:14px}.step-heading{gap:10px}.step-heading>div b{font-size:17px}.map-health-row{display:none!important}}
/* Static Map fallback: real map stays primary, TripWeave route diagram remains as an honest inset instead of pretending to align as a road polyline. */
.map-visual-stage>.map-static-card{z-index:2}
.map-base-layer.static-inset{visibility:visible!important;position:absolute!important;right:14px;bottom:14px;left:auto;top:auto;z-index:5;width:min(34%,360px);height:210px;min-height:0!important;border:1px solid rgba(255,255,255,.92)!important;border-radius:14px;overflow:hidden;box-shadow:0 10px 28px rgba(19,56,44,.2);background:#f5f8f3}.map-base-layer.static-inset svg{min-height:0!important;width:100%;height:100%;object-fit:cover}.map-base-layer.static-inset svg text{font-size:13px}.map-base-layer.static-inset svg>text:nth-of-type(2){display:none}
.map-recommend-why{margin:8px 0;padding:8px 10px;border-radius:10px;background:#f0f7f2;color:#315c4b;font-size:12px;line-height:1.5}
@media(max-width:560px){.map-base-layer.static-inset{width:42%;height:130px;right:8px;bottom:8px}}
/* When map mode is active, navigation + map are moved directly under trip discovery so the map is the primary planning surface. */
#result.map-mode-active .plan-browser-nav{margin-top:12px}#result.map-mode-active .map-panel{margin-top:0}#result.map-mode-active>.metrics{margin-top:18px}
