/* RC-UX-02 (Design Lead, 2026-11-20). Home only. Everything is scoped to <1024 px except the hidden defaults; desktop >=1024 is unchanged.
   Motion: transform/opacity only, removed with prefers-reduced-motion. No inline styles; JS only toggles attributes/classes and two custom properties. */
.rc-handle,.rc-fullmap,.rc-hero-spacer{display:none}
@media (max-width:1023px){
/* 1. Handle = real 44 px button over the existing 40x4 bar (the bar itself stays where it was: first screen identical) */
html[data-theme] .v15-home .sheet>.rc-handle{display:flex;position:absolute;z-index:4;top:0;left:50%;width:64px;height:44px;margin:0 0 0 -32px;padding:0;border:0;border-radius:12px;background:transparent;color:inherit;cursor:grab;touch-action:none;-webkit-tap-highlight-color:transparent}
html[data-theme] .v15-home .sheet>.rc-handle:focus-visible{outline:3px solid #2172df;outline-offset:-3px}
html[data-theme=dark] .v15-home .sheet>.rc-handle:focus-visible{outline-color:#9fcbff}
html[data-theme] .v15-home .sheet:before{z-index:3;transition:transform .18s ease,opacity .18s ease}
html[data-theme] .v15-home .sheet:has(>.rc-handle:hover):before,html[data-theme] .v15-home .sheet:has(>.rc-handle:focus-visible):before{transform:scaleX(1.3)}
html[data-theme] .v15-home .sheet.rc-dragging{translate:0 var(--rc-dy,0px);transition:none}/* RC-UX-02b: `translate`, not `transform` - the base 'rise' animation (fill both) pins transform, so the drag was invisible */
html[data-theme] .v15-home .sheet.rc-dragging>.rc-handle{cursor:grabbing}
/* spacer keeps the hero's place in the flow while the hero is fixed (min/full): content below never moves */
html[data-theme] .v15-home #view>.rc-hero-spacer{height:var(--rc-hero-h,0px)}
html[data-theme] .v15-home #view>.rc-hero-spacer:has(+.hero[data-rc-sheet]){display:block}
html[data-rc-sheet],html[data-rc-sheet] body{overflow:hidden}
/* min + full: the hero becomes the app screen between the app bar and the bottom nav */
html[data-theme] .v15-home #view[data-view]>.hero[data-rc-sheet]{position:fixed!important;z-index:85;left:0;right:0;top:var(--rc-top,60px);bottom:var(--rc-sc-nav,0px);height:auto!important;min-height:0!important;max-width:none!important;margin:0!important;display:flex!important;flex-direction:column;background:var(--rcx-bg)}
html[data-theme] .v15-home #view[data-view]>.hero[data-rc-sheet]>.sheet{padding-top:44px!important;margin:0!important;max-width:none}
/* min: map grows, panel = total + Calculate */
html[data-theme] .v15-home #view[data-view]>.hero[data-rc-sheet=min]>.map{flex:1 1 auto;height:auto!important;min-height:120px!important}
html[data-theme] .v15-home #view[data-view]>.hero[data-rc-sheet=min]>.sheet{flex:none;border-radius:18px 18px 0 0!important;margin-top:-8px!important;padding-bottom:10px!important}
html[data-theme] .v15-home .hero[data-rc-sheet=min]>.sheet>:not(form):not(.rc-handle),
html[data-theme] .v15-home .hero[data-rc-sheet=min] #calc>:not(.res):not(.v15-actions),
html[data-theme] .v15-home .hero[data-rc-sheet=min] #calc .res>.mini,html[data-theme] .v15-home .hero[data-rc-sheet=min] #calc .v15-actions>.v15-copy{display:none!important}
html[data-theme] .v15-home .hero[data-rc-sheet=min] #calc .res{margin-top:0!important}
html[data-theme] .v15-home .hero[data-rc-sheet=min] #calc .v15-actions{margin-top:10px}
/* full: panel fills the screen, scrolls inside, Calculate stays at its bottom */
html[data-theme] .v15-home #view[data-view]>.hero[data-rc-sheet=full]{padding:0!important}
html[data-theme] .v15-home #view[data-view]>.hero[data-rc-sheet=full]>.map,html[data-theme] .v15-home .hero[data-rc-sheet=full]>.rc-fullmap{display:none!important}
html[data-theme] .v15-home #view[data-view]>.hero[data-rc-sheet=full]>.sheet{flex:1 1 auto;min-height:0;overflow-x:hidden!important;overflow-y:auto!important;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;border-radius:0!important;padding-bottom:0!important}
/* only the Calculate button sticks (actions box flattened so the button's sticky range is the whole form); Copy link scrolls normally */
html[data-theme] .v15-home .hero[data-rc-sheet=full] #calc .v15-actions{display:contents}
html[data-theme] .v15-home .hero[data-rc-sheet=full] #calc .v15-calc{order:6;position:sticky;bottom:10px;z-index:3;box-shadow:0 8px 24px rgba(16,40,66,.22),0 0 0 8px var(--rcx-surface)}
html[data-theme] .v15-home .hero[data-rc-sheet=full] #calc .v15-copy{order:6;margin-top:8px}/* keep the mid-state order (.v15-actions has order:6) */
html[data-theme] .v15-home .hero[data-rc-sheet=full]>.sheet{scroll-padding-bottom:84px}
@keyframes rc-sheet-in{from{transform:translateY(28px);opacity:.6}to{transform:none;opacity:1}}
@keyframes rc-map-in{from{opacity:.4;transform:scale(1.04)}to{opacity:1;transform:none}}
@keyframes rc-sheet-down{from{transform:translateY(-56px);opacity:.7}to{transform:none;opacity:1}}/* RC-UX-02b: collapsing (swipe down) visibly slides the panel down */
html[data-theme] .v15-home .sheet.rc-anim.rc-down{animation-name:rc-sheet-down;animation-duration:.3s}
html[data-theme] .v15-home .sheet.rc-anim{animation:rc-sheet-in .24s cubic-bezier(.2,.7,.2,1) both}
html[data-theme] .v15-home .hero[data-rc-sheet=min]>.map{animation:rc-map-in .3s cubic-bezier(.2,.7,.2,1) both}
/* "Full map" toggle: top-right of the map, left of Google's fullscreen slot (right 56 px reserved, as the banner did), only once a route exists */
html[data-theme] .v15-home .hero>.rc-fullmap{position:absolute;z-index:6;top:16px;right:66px;width:44px;height:44px;padding:0;margin:0;border:1px solid rgba(20,44,69,.22);border-radius:12px;background:rgba(255,255,255,.94);color:#142c45;align-items:center;justify-content:center;cursor:pointer;box-shadow:0 2px 8px rgba(11,18,32,.18);-webkit-tap-highlight-color:transparent}
html[data-theme] .v15-home #view[data-route-status=Loaded]>.hero>.rc-fullmap,html[data-theme] .v15-home .hero[data-rc-sheet=min]>.rc-fullmap{display:flex}
html[data-theme] .v15-home .hero>.rc-fullmap svg{width:20px;height:20px}
html[data-theme] .v15-home .hero>.rc-fullmap[aria-pressed=true] svg{transform:rotate(180deg)}
html[data-theme] .v15-home .hero>.rc-fullmap:focus-visible{outline:3px solid #2172df;outline-offset:2px}
/* 3. OSM attribution (stations on the map): one small line above Google's own credits; 44 px tall hit box drawn only at its bottom 15 px */
}
@media (max-width:700px){html[data-theme] .v15-home .hero>.rc-fullmap{top:16px;right:66px}html[data-theme] .v15-home .hero[data-rc-sheet=min]>.rc-fullmap{top:16px}}
@media (min-width:701px) and (max-width:1023px){html[data-theme] .v15-home .hero>.rc-fullmap{top:20px;right:72px}}
/* 2. Route banner -> compact chip (top-left), never wider than the space left of the map buttons */
@media (max-width:767px){
html[data-theme] .v15-home .rcx-map-banner{right:auto!important;max-width:calc(100% - 132px)!important;padding:4px 10px!important;border-radius:999px!important;font-size:12px!important;line-height:1.3!important}
}
@media (prefers-reduced-motion:reduce){
html[data-theme] .v15-home .sheet.rc-anim,html[data-theme] .v15-home .hero[data-rc-sheet=min]>.map{animation:none!important}
html[data-theme] .v15-home .sheet:before{transition:none}
html[data-theme] .v15-home .sheet.rc-dragging{translate:none}
}
@media print{.rc-handle,.rc-fullmap,.rc-a2hs{display:none!important}}
/* 4. Install hint (a2hs.js): fixed card, top under the app bar; .is-bottom above the bottom nav; .is-wait = hidden while both spots would cover the total/Calculate */
/* RC-UX-02b: Add to Home Screen = light one-line toast (icon + text + one action + close), ~56 px */
.rc-a2hs[hidden]{display:none!important}
html[data-theme] .rc-a2hs{position:fixed;z-index:95;left:10px;right:10px;top:calc(var(--rc-a2hs-top,60px) + 8px);max-width:440px;margin:0 auto;display:flex;gap:8px;align-items:center;min-height:56px;padding:6px 4px 6px 10px;border-radius:14px;background:var(--rcx-surface,#fff);color:var(--rcx-ink,#152239);border:1px solid var(--rcx-line,#dce5ed);box-shadow:0 6px 20px rgba(11,18,32,.22);font-size:14px;line-height:1.3;animation:rc-a2hs-in .26s cubic-bezier(.2,.7,.2,1) both}
html[data-theme] .rc-a2hs.is-bottom{top:auto;bottom:calc(var(--rc-sc-nav,0px) + 8px)}
html[data-theme] .rc-a2hs.is-low{top:calc(var(--rc-a2hs-top,60px) + 68px)}
html[data-theme] .rc-a2hs.is-wait{visibility:hidden;opacity:0;pointer-events:none}
html[data-theme] .rc-a2hs-ic{flex:none;display:block;width:28px;height:28px;border-radius:7px}
html[data-theme] .rc-a2hs-t{flex:1 1 auto;min-width:0;margin:0;font-weight:650;color:var(--rcx-ink,#152239);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
html[data-theme] .rc-a2hs.is-steps .rc-a2hs-t{white-space:normal;font-weight:500}
html[data-theme] .rc-a2hs-t svg{width:16px;height:16px;vertical-align:-3px}
html[data-theme] .rc-a2hs-t:focus-visible{outline:3px solid #2172df;outline-offset:2px;border-radius:4px}
html[data-theme] .rc-a2hs-go{flex:none;min-height:44px;min-width:44px;padding:0 14px;border:0;border-radius:11px;background:#ff6a3d;color:#0b1220;font:inherit;font-size:14px;font-weight:720;cursor:pointer;-webkit-tap-highlight-color:transparent}
html[data-theme] .rc-a2hs-x{flex:none;display:flex;align-items:center;justify-content:center;width:44px;height:44px;padding:0;border:0;border-radius:11px;background:transparent;color:var(--rcx-muted,#60718a);cursor:pointer;-webkit-tap-highlight-color:transparent}
html[data-theme] .rc-a2hs-x svg{width:18px;height:18px}
html[data-theme] .rc-a2hs button:focus-visible{outline:3px solid #2172df;outline-offset:1px}
html[data-theme=dark] .rc-a2hs button:focus-visible,html[data-theme=dark] .rc-a2hs-t:focus-visible{outline-color:#9fcbff}
@keyframes rc-a2hs-in{from{opacity:0;transform:translateY(-6px)}to{opacity:1;transform:none}}
html[data-theme] .rc-a2hs.is-bottom{animation-name:rc-a2hs-in-b}
@keyframes rc-a2hs-in-b{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
@media (prefers-reduced-motion:reduce){html[data-theme] .rc-a2hs{animation:none!important}}

/* RC-UX-02c (Alexandr 15:35 "the OpenStreetMap banner is still there"): the on-map OSM credit is one tiny line like Google's own
   attribution row: 14 px, 10 px text on a translucent white strip, at the bottom of the map right after the Google logo (same line as
   Google's "Map data / Terms" row). sheet.js measures the Google logo and row: if the line would touch the row it moves up above the logo.
   All widths (also desktop). The link is an attribution (exempt from the 44 px rule) and covers nothing else. */
html[data-theme] #view #map .v15-osm-attr{position:absolute!important;top:auto!important;right:auto!important;bottom:0!important;left:var(--rc-osm-left,72px)!important;z-index:5;margin:0!important;padding:0!important;line-height:0;pointer-events:none}
html[data-theme] #view #map .v15-osm-attr.is-up{left:var(--rc-osm-up-left,0px)!important;bottom:var(--rc-osm-up,28px)!important}
html[data-theme] #view #map .v15-osm-attr a{pointer-events:auto;display:block!important;min-height:0!important;min-width:0!important;height:14px;padding:0 6px!important;border:0!important;border-radius:0!important;background:rgba(255,255,255,.78)!important;color:#1f1f1f!important;font:400 10px/14px Roboto,Arial,sans-serif!important;text-decoration:none!important;white-space:nowrap;box-shadow:none!important}
html[data-theme] #view #map .v15-osm-attr a:hover{text-decoration:underline!important}
html[data-theme] #view #map .v15-osm-attr a:focus-visible{outline:2px solid #2172df;outline-offset:-2px}
/* RC-UX-03: route-source chip removed from the map (all widths); sheet.js shows its text as a small line in the panel */
html.rc-src-in-panel[data-theme] #view .rcx-map-banner{display:none!important}
html[data-theme] #view .rc-route-src{order:3;margin:4px 0 0;min-height:calc(2em * 1.35);/* 2 lines reserved: text swaps manual<->Google route without moving content (CLS 0) */font-size:12px;line-height:1.35;color:var(--rcx-muted,#60718a)}
html[data-theme] #view .rc-route-src:empty{display:none}

