/* One route tray across the map and editorial guides. */
body.route-tray-open{overflow:hidden}
.global-route-trigger{display:inline-flex!important;align-items:center;justify-content:space-between;gap:18px;min-height:44px;padding:0 16px!important;background:#272b28!important;color:#fcfbf6!important;border:1px solid #272b28!important;border-radius:0!important;font:500 14px/1.3 GuideSans,Arial,sans-serif!important;cursor:pointer;white-space:nowrap}
.global-route-trigger span{font-variant-numeric:tabular-nums;opacity:.7}
.global-route{box-sizing:border-box;position:fixed;inset:var(--route-top,72px) var(--route-right,24px) auto auto;margin:0;padding:0;width:440px;max-width:calc(100% - 48px);max-height:calc(100dvh - 96px);border:1px solid #dedfd5;border-radius:0;background:#fcfbf6;color:#272b28;box-shadow:0 16px 48px #1d252022;overflow:hidden;font:400 15px/1.5 GuideSans,Arial,sans-serif}
.global-route[open]{display:flex;flex-direction:column;animation:none}
.global-route::backdrop{background:#1d252040;backdrop-filter:none}
.global-route *{box-sizing:border-box}
.global-route button{font:inherit;color:inherit;background:none;border:0;border-radius:0;cursor:pointer;min-height:44px}
.global-route button:disabled{opacity:.3;cursor:default}
.global-route svg{display:block;width:20px;height:20px}
.global-route .route-tray-heading{display:flex;align-items:center;justify-content:space-between;padding:16px 20px;border-bottom:1px solid #dedfd5;gap:16px}
.global-route .route-tray-heading h2{font:400 28px/1.2 GuideSerif,Georgia,serif;margin:0;letter-spacing:-.02em}
.global-route #trip-count{font:400 14px GuideSans,Arial,sans-serif;color:#60695f;margin-left:8px}
.global-route .route-tray-close{position:static;display:grid;place-items:center;flex:none;width:44px;padding:0}
.global-route .route-tray-scroll{overflow-y:auto;overscroll-behavior:contain;min-height:0;padding:0 20px}
.global-route .trip-panel{padding:0}
.global-route .trip-list{padding:0;margin:0;list-style:none}
.global-route .trip-list li{display:grid;grid-template-columns:18px minmax(0,1fr) repeat(3,44px);gap:0;align-items:center;padding:14px 0;border-bottom:1px solid #dedfd5;min-height:76px}
.global-route .trip-order{font:400 12px GuideSans,Arial,sans-serif;color:#60695f}
.global-route .trip-name{font:400 19px/1.3 GuideSerif,Georgia,serif;padding-right:8px;overflow-wrap:anywhere}
.global-route .trip-list button{display:grid;place-items:center;padding:0;width:44px;min-width:44px;min-height:44px}
.global-route .route-tray-browse{padding:12px 0;min-height:52px;text-decoration:underline;text-underline-offset:4px}
.global-route .loop-option{display:flex;align-items:center;gap:12px;font:400 13px/1.4 GuideSans,Arial,sans-serif;padding:16px 0;margin:0;border:0;border-top:1px solid #dedfd5}
.global-route .loop-option input{width:20px;height:20px;min-height:20px;flex:none;margin:0;accent-color:#53624f}
.global-route .route-tray-options{border-top:1px solid #dedfd5;padding:0;margin:0 0 8px;font:400 13px/1.5 GuideSans,Arial,sans-serif}
.global-route .route-tray-options summary{padding:12px 0;min-height:44px;cursor:pointer;color:#60695f}
.global-route .route-tray-options button{display:block;text-decoration:underline;text-underline-offset:4px;padding:0}
.global-route .route-tray-options p,.global-route .trip-metrics{font:400 12px/1.5 GuideSans,Arial,sans-serif!important;color:#60695f;margin:0 0 12px}
.global-route .trip-anchor{font:400 12px/1.5 GuideSans,Arial,sans-serif;color:#60695f;margin:14px 0}
.global-route .route-tray-empty{font:400 20px/1.4 GuideSerif,Georgia,serif;margin:24px 0 8px}
.global-route .route-tray-footer{flex:none;border-top:1px solid #dedfd5;padding:16px 20px;margin:0}
.global-route .primary-action{display:block;width:100%;background:#272b28;color:#fcfbf6;padding:14px 20px;min-height:48px;text-align:center;font:400 15px/1.4 GuideSans,Arial,sans-serif}
.global-route :focus-visible,.global-route-trigger:focus-visible{outline:2px solid #53624f;outline-offset:3px}
.global-route [hidden]{display:none!important}
@media(max-width:700px){
 .has-route-tray{padding-bottom:calc(76px + env(safe-area-inset-bottom,0px))}
 .global-route-trigger{position:fixed;left:16px;right:16px;bottom:calc(12px + env(safe-area-inset-bottom,0px));z-index:100;min-height:52px;font-size:15px!important;padding:0 18px!important;box-shadow:0 0 0 12px #fcfbf6}
 .global-route{inset:auto 0 0;width:100%;max-width:100%;max-height:85dvh;border-width:1px 0 0;border-radius:14px 14px 0 0}
 .global-route .route-tray-footer{padding-bottom:calc(16px + env(safe-area-inset-bottom,0px))}
 .global-route .route-tray-heading{padding:12px 18px}
 .global-route .route-tray-scroll{padding:0 18px}
 .global-route .trip-name{font-size:18px}
 .global-route .trip-list li{grid-template-columns:18px minmax(0,1fr) repeat(3,44px)}
 .global-route .trip-list button{width:44px;min-width:44px}
 .custom-journey .global-route-trigger{display:none!important}
}

.topbar [hidden]{display:none!important}

/* Compact navigation stays with the page; the itinerary opens only on request. */
.route-mobile-nav{display:none}
.global-route-trigger{gap:10px;background:transparent!important;color:#272b28!important;border:0!important;padding:0 10px!important;font-size:13px!important;box-shadow:none}
.global-route-trigger span{opacity:1;color:#53624f;border-left:1px solid #c7ccc1;padding-left:10px}
.global-route-trigger[aria-expanded=true]{color:#53624f!important}
.global-route{width:420px;border:0;box-shadow:0 12px 40px #1d252024;opacity:1;transform:translateY(0)}
.global-route[data-motion=pointer]{transition:transform 150ms cubic-bezier(0.2,0,0,1),opacity 150ms cubic-bezier(0.2,0,0,1)}
.global-route[data-motion=pointer]:not(.is-open){opacity:0;transform:translateY(8px)}
.global-route[data-motion=pointer].is-open{transition-duration:220ms}
.global-route .route-tray-heading{padding:10px 16px;gap:4px}
.global-route .route-tray-heading h2{font-size:24px;margin-right:auto}
.global-route .route-edit-toggle{font-size:12px;padding:0 8px;text-decoration:underline;text-underline-offset:4px}
.global-route .route-tray-scroll{padding:0 16px}
.global-route .trip-list li{grid-template-columns:18px 40px minmax(0,1fr);column-gap:10px;min-height:62px;padding:10px 0}
.global-route .trip-photo{width:40px;height:40px;object-fit:cover;outline:1px solid oklch(0 0 0 / .1);outline-offset:-1px}
.global-route .trip-name{font-size:17px;line-height:1.25;padding-right:0}
.global-route .trip-list button{display:none}
.global-route.is-editing .trip-list li{grid-template-columns:18px 40px minmax(0,1fr) repeat(3,44px);column-gap:0}
.global-route.is-editing .trip-photo{grid-column:2;grid-row:1;margin-right:8px}
.global-route.is-editing .trip-name{grid-column:3 / -1;grid-row:1;padding-left:8px}
.global-route.is-editing .trip-list button{display:grid;grid-row:2}
.global-route.is-editing [data-up]{grid-column:4}
.global-route.is-editing [data-down]{grid-column:5}
.global-route.is-editing [data-remove]{grid-column:6}
.global-route .loop-option{padding:10px 0;min-height:44px;font-size:12px}
.global-route .route-tray-browse{min-height:44px;padding:8px 0;font-size:13px}
.global-route .route-tray-footer{padding:12px 16px}
.global-route .primary-action{min-height:44px;padding:10px 16px;font-size:14px}
.global-route .trip-anchor{margin:12px 0;font-size:11px}
.route-feedback{position:fixed;z-index:110;top:74px;right:24px;margin:0;padding:8px 12px;background:#272b28;color:#fcfbf6;box-shadow:0 4px 16px #1d252020;font:400 12px/1.4 GuideSans,Arial,sans-serif;opacity:0;pointer-events:none;transition:opacity 120ms cubic-bezier(0.2,0,0,1)}
.route-feedback.is-visible{opacity:1}
@media(max-width:700px){
 body.has-route-tray{padding-bottom:0;padding-top:calc(48px + env(safe-area-inset-top,0px))}
 .route-mobile-nav{display:flex;align-items:center;justify-content:space-between;position:fixed;inset:0 0 auto;z-index:100;height:calc(48px + env(safe-area-inset-top,0px));padding:env(safe-area-inset-top,0px) 16px 0;background:#fcfbf6;border-bottom:1px solid #dedfd5}
 .route-mobile-nav .route-home{display:flex;align-items:center;min-height:44px;color:#272b28;font:400 20px/1.2 GuideSerif,Georgia,serif;text-decoration:none}
 .route-mobile-nav .global-route-trigger{position:static;min-height:44px;box-shadow:none;min-width:0;flex:none;font-size:13px!important;padding:0 0 0 12px!important}
 body.has-route-tray .topbar,body.has-route-tray .masthead{display:none}
 .global-route{width:100%;max-width:none;border-radius:14px 14px 0 0;max-height:80dvh}
 .global-route .route-tray-footer{padding-bottom:calc(12px + env(safe-area-inset-bottom,0px))}
 .route-feedback{top:calc(54px + env(safe-area-inset-top,0px));right:12px}
 body.custom-journey .route-mobile-nav{display:none}
 body.custom-journey.has-route-tray{padding-top:0}
 body.winery-experience.has-route-tray{--mobile-header:calc(48px + env(safe-area-inset-top,0px))}
}
@media(hover:hover) and (pointer:fine){.global-route-trigger:hover,.route-mobile-nav a:hover{color:#53624f!important}}
@media(prefers-reduced-motion:reduce){.global-route[data-motion],.route-feedback{transition:none}}

@media(prefers-reduced-motion:no-preference){
 .global-route button,.global-route-trigger,[data-add],[data-add-winery]{transition-property:transform;transition-duration:150ms;transition-timing-function:cubic-bezier(0.2,0,0,1)}
 .global-route button[data-pressed],.global-route-trigger[data-pressed],[data-add][data-pressed],[data-add-winery][data-pressed]{transform:scale(.96)}
}

/* Generated guide pages keep their own header on phones; the trigger sits in it. */
@media(max-width:700px){body.has-route-tray.has-topbar{padding-top:0}body.has-route-tray.has-topbar .topbar{display:grid}}

/* Phones: your route opens in the same bottom sheet as the map's stop details and planner. */
@media(max-width:700px){
 .global-route.is-sheet{inset:auto 0 0;width:100%;max-width:none;height:calc(100dvh - max(12px,env(safe-area-inset-top,0px)));max-height:none;margin:0;padding:0;border:0;border-radius:0;background:transparent;box-shadow:none;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;scrollbar-width:none;touch-action:pan-x pan-y pinch-zoom;scroll-behavior:auto;overflow-anchor:none;opacity:1;transition:none}
 .global-route.is-sheet[open]{display:block}
 .global-route.is-sheet::-webkit-scrollbar{display:none}
 .global-route.is-sheet::backdrop{background:rgb(27 35 29 / .28);animation:tray-shade-in 220ms ease both}
 .global-route.is-sheet.sheet-closing::backdrop{animation:tray-shade-out 220ms ease both}
 .global-route.sheet-moving{will-change:transform}
 .global-route .sheet-spacer{height:var(--sheet-preview,0px)}
 .global-route .sheet-surface{min-height:100%;background:#fcfbf6;border-radius:16px 16px 0 0;box-shadow:0 -6px 30px #17281d18;display:flex;flex-direction:column}
 .global-route .sheet-chrome{position:sticky;top:0;z-index:5;flex:none;height:48px;background:#fcfbf6;border-radius:16px 16px 0 0;touch-action:none;user-select:none;cursor:grab}
 .global-route .sheet-grab{position:absolute;inset:0 52px;width:calc(100% - 104px);height:48px;min-height:48px;display:flex;align-items:center;justify-content:center;padding:0}
 .global-route .sheet-grab span{display:block;width:32px;height:3px;border-radius:2px;background:#a0a69b;pointer-events:none}
 .global-route .sheet-grab:focus{outline:none}
 .global-route .sheet-grab:focus-visible span{outline:2px solid #53624f;outline-offset:5px}
 .global-route .sheet-chrome .sheet-close{position:absolute;inset:2px 8px auto auto;width:44px;height:44px}
 .global-route .sheet-scroll{display:flex;flex-direction:column;flex:1;padding:0;overflow:visible}
 .global-route.is-sheet .route-tray-heading{padding:0 18px 12px}
 .global-route.is-sheet .route-tray-scroll{flex:1;overflow:visible;padding:0 18px}
 .global-route.is-sheet .route-tray-footer{position:sticky;bottom:0;z-index:4;background:#fcfbf6}
 @keyframes tray-shade-in{from{opacity:0}}
 @keyframes tray-shade-out{to{opacity:0}}
}
@media(prefers-reduced-motion:reduce){.global-route.is-sheet::backdrop{animation:none}}
