/* Sigma Maps v0.5 — touch-first refinements and functional app surfaces. */
.icon-defs{position:absolute;width:0;height:0;overflow:hidden;pointer-events:none}
.line-icon{width:18px;height:18px;display:inline-block;flex:none;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;vertical-align:middle}
.brand .line-icon{stroke-width:2}
.styles-symbol{width:26px;height:26px;color:var(--sigma-mint);stroke-width:1.5}
.styles-chevron,.styles-glyph{display:none}
.styles-launcher{justify-content:flex-start}
.clear-search,.route-close,.theme-close,.drawer-close,.modal-close{display:grid;place-items:center}
.clear-search .line-icon{width:16px;height:16px}
.route-close .line-icon,.theme-close .line-icon,.drawer-close .line-icon,.modal-close .line-icon{width:19px;height:19px}
.selected-badge{display:grid;place-items:center}
.selected-badge .line-icon{width:14px;height:14px;stroke:#073e3b;stroke-width:3}
.theme-card[aria-pressed=false] .selected-badge{display:none}
.primary-button .line-icon,.secondary-button .line-icon{width:18px;height:18px;stroke-width:2}
.route-style-button .line-icon{width:15px;height:15px}
.search-result .line-icon{width:18px;height:18px;margin-top:2px;color:var(--sigma-mint)}
.quick-places button>.line-icon{color:var(--sigma-mint);width:13px;height:13px;stroke-width:2.2}
.quick-places button span:last-child{margin-left:0}
.sheet-expand{border:0;background:transparent;width:58px;height:18px;display:none;place-items:center;margin:-11px auto 3px;padding:0;cursor:pointer}
.sheet-expand .sheet-grip{display:block!important;width:38px;height:4px;margin:0;background:var(--shell-muted);opacity:.5}
.place-utilities{display:flex;gap:7px;margin-top:14px}
.utility-button{display:flex;gap:6px;align-items:center;justify-content:center;min-width:0;flex:1;min-height:37px;padding:7px 9px;border:1px solid var(--shell-stroke);border-radius:11px;background:rgba(255,255,255,.045);color:var(--shell-ink);font:600 10px/1.2 'DM Sans',sans-serif;white-space:nowrap}
.utility-button .line-icon{width:15px;height:15px;color:var(--sigma-mint)}
.utility-button[aria-pressed=true]{background:rgba(101,244,210,.16);border-color:rgba(101,244,210,.53)}
.utility-button[aria-pressed=true] .line-icon{fill:rgba(101,244,210,.2)}
.utility-button:hover{border-color:var(--sigma-mint)}
.origin-summary{display:flex;align-items:center;gap:9px;width:100%;margin-top:10px;padding:8px 10px;border:1px solid var(--shell-stroke);border-radius:10px;background:rgba(255,255,255,.035);color:var(--shell-ink);text-align:left;min-height:35px}
.origin-summary>.line-icon{width:15px;height:15px;color:var(--sigma-mint)}
.origin-summary>span:nth-child(2){display:flex;align-items:baseline;gap:7px;min-width:0;flex:1;color:var(--shell-muted);font:700 9px 'Space Grotesk',sans-serif;letter-spacing:.09em}
.origin-summary strong{font:600 11px 'DM Sans',sans-serif;letter-spacing:0;color:var(--shell-ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.origin-change{color:var(--sigma-mint);font:700 9px 'Space Grotesk',sans-serif;letter-spacing:.08em}
.origin-editor{border:1px solid var(--shell-stroke);border-radius:12px;margin-top:7px;padding:9px;background:var(--shell-bg-raised)}
.origin-shortcuts{display:flex;gap:7px;margin-bottom:8px}
.origin-shortcuts button{flex:1;min-height:34px;padding:6px 8px;border:1px solid var(--shell-stroke);border-radius:9px;background:rgba(101,244,210,.07);color:var(--shell-ink);font:700 9px 'Space Grotesk',sans-serif;letter-spacing:.05em}
.origin-shortcuts .line-icon{width:14px;height:14px;color:var(--sigma-mint);margin-right:5px}
#originSearch{width:100%;min-height:41px;padding:10px 12px;border:1px solid var(--shell-stroke);border-radius:9px;background:rgba(255,255,255,.06);color:var(--shell-ink);font:500 16px 'DM Sans',sans-serif;outline-offset:0}
#originSearch::placeholder{color:var(--shell-muted)}
.origin-results{display:flex;flex-direction:column;gap:3px;max-height:190px;overflow-y:auto;margin-top:7px}
.origin-result{display:flex;align-items:center;gap:9px;min-height:44px;padding:8px;border:0;border-radius:9px;text-align:left;background:transparent;color:var(--shell-ink)}
.origin-result:focus,.origin-result:hover{background:rgba(101,244,210,.1)}
.origin-result>.line-icon{width:16px;height:16px;color:var(--sigma-mint)}
.origin-result span{display:flex;flex-direction:column;gap:4px;min-width:0}
.origin-result strong{font:600 12px 'DM Sans',sans-serif;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.origin-result small{font:500 10px 'DM Sans',sans-serif;color:var(--shell-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.origin-message{font:500 11px 'DM Sans',sans-serif;color:var(--shell-muted);padding:6px;margin:0}
.route-card.under-drawer{opacity:0;pointer-events:none}
.route-alternatives{display:flex;gap:7px;overflow-x:auto;scrollbar-width:none;margin-top:13px}
.route-alternatives::-webkit-scrollbar{display:none}
.alternative-button{flex:1;min-width:135px;display:flex;flex-direction:column;gap:4px;text-align:left;padding:10px 12px;border:1px solid var(--shell-stroke);background:rgba(255,255,255,.04);border-radius:10px;color:var(--shell-ink)}
.alternative-button[aria-pressed=true]{border-color:var(--sigma-mint);background:rgba(101,244,210,.11)}
.alternative-button strong{font:700 11px 'Space Grotesk',sans-serif}
.alternative-button span{font:500 10px 'DM Sans',sans-serif;color:var(--shell-muted)}
.directions-toggle{display:flex;align-items:center;gap:10px;margin-top:13px;padding:13px 11px;width:100%;background:rgba(255,255,255,.05);border:1px solid var(--shell-stroke);border-radius:11px;color:var(--shell-ink);font:700 11px 'Space Grotesk',sans-serif;text-align:left}
.directions-toggle .line-icon{width:17px;height:17px;color:var(--sigma-mint)}
.directions-toggle .chevron{margin-left:auto;transition:transform .2s}
.directions-toggle[aria-expanded=true] .chevron{transform:rotate(180deg)}
.directions-list{list-style:none;padding:0 2px 0 0;margin:10px 0 0;max-height:260px;overflow-y:auto;overscroll-behavior:contain}
.directions-list li{display:flex;gap:12px;align-items:flex-start;padding:12px 6px;border-bottom:1px solid var(--shell-stroke)}
.directions-list li:last-child{border-bottom:0}
.step-number{width:29px;height:29px;flex:none;border:1px solid rgba(101,244,210,.4);border-radius:9px;background:rgba(101,244,210,.1);display:grid;place-items:center;font:700 11px 'Space Grotesk';color:var(--sigma-mint)}
.directions-list li>div{display:flex;flex-direction:column;min-width:0;gap:5px}
.directions-list strong{font:600 12px/1.35 'DM Sans',sans-serif;color:var(--shell-ink)}
.directions-list small{font:500 10px 'DM Sans',sans-serif;color:var(--shell-muted)}
.places-drawer{position:absolute;z-index:16;bottom:22px;left:24px;width:min(430px,calc(100% - 48px));max-height:min(72dvh,630px);display:flex;flex-direction:column;border:1px solid var(--shell-stroke);border-radius:23px;padding:20px;background:linear-gradient(150deg,var(--shell-bg-raised),var(--shell-bg));color:var(--shell-ink);box-shadow:0 24px 75px var(--shell-shadow);backdrop-filter:blur(32px)}
.drawer-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:13px}
.drawer-heading h2{font:700 28px/1 'Space Grotesk',sans-serif;letter-spacing:-.05em;margin:7px 0 0}
.drawer-close{width:34px;height:34px;border:1px solid var(--shell-stroke);border-radius:10px;background:rgba(255,255,255,.05);color:var(--shell-ink)}
.drawer-section-heading{display:flex;justify-content:space-between;align-items:center;gap:8px;padding:11px 0;color:var(--shell-muted);font:700 10px 'Space Grotesk',sans-serif;letter-spacing:.12em}
.drawer-section-heading>span:first-child{display:flex;align-items:center;gap:7px;color:var(--sigma-mint)}
.drawer-section-heading .line-icon{width:15px;height:15px}
.recent-heading{margin-top:7px;border-top:1px solid var(--shell-stroke)}
.places-list{display:flex;flex-direction:column;gap:4px;overflow-y:auto;flex-shrink:1;min-height:0;max-height:210px}
.place-row{display:flex;align-items:center;border-radius:11px;background:rgba(255,255,255,.035);border:1px solid var(--shell-stroke)}
.place-row-select{display:flex;align-items:center;gap:10px;min-width:0;flex:1;text-align:left;padding:12px 10px;background:none;border:0;color:var(--shell-ink)}
.place-row-select>.line-icon:first-child{color:var(--sigma-mint)}
.place-row-select>.line-icon:last-child{color:var(--shell-muted);width:14px;height:14px}
.place-row-select span{display:flex;flex-direction:column;gap:4px;flex:1;min-width:0}
.place-row-select strong{font:600 13px 'DM Sans',sans-serif;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.place-row-select small{font:500 11px 'DM Sans',sans-serif;color:var(--shell-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.place-row-remove{width:32px;height:38px;flex:none;border:0;background:none;color:var(--shell-muted);display:grid;place-items:center}
.place-row-remove .line-icon{width:15px;height:15px}
.places-empty{font:500 12px/1.5 'DM Sans',sans-serif;color:var(--shell-muted);padding:8px 2px 12px;margin:0}
.text-button{border:0;background:transparent;color:var(--shell-muted);font:700 10px 'Space Grotesk',sans-serif;letter-spacing:.1em}
.drawer-foot{font:500 10px 'DM Sans',sans-serif;color:var(--shell-muted);padding-top:13px}
.offline-indicator{position:absolute;z-index:17;left:50%;top:86px;transform:translateX(-50%);display:flex;gap:8px;align-items:center;padding:9px 12px;white-space:nowrap;border-radius:10px;background:#19353d;color:#f4fffd;border:1px solid rgba(255,255,255,.2);font:600 11px 'DM Sans',sans-serif}
.offline-indicator .line-icon{width:15px;height:15px;color:var(--sigma-mint)}
.modal-credits{font-size:10px!important;line-height:1.5;color:var(--shell-muted)!important}
.modal-credits a{color:var(--sigma-mint);text-underline-offset:2px}
.toast{pointer-events:none;top:calc(70px + env(safe-area-inset-top));padding:9px 14px;min-width:0;width:max-content;border-radius:9px;font-size:11px}
.map-shell [hidden]{display:none!important}

/* Distinct but approximate raster treatments if WebGL vector rendering is unavailable. */
body[data-theme=neon] .leaflet-tile-pane img{filter:brightness(.31) contrast(1.76) hue-rotate(128deg) saturate(1.7)}
body[data-theme=rose] .leaflet-tile-pane img{filter:sepia(.23) hue-rotate(290deg) saturate(.71) brightness(.97) contrast(1.12)}
body[data-theme=midnight] .leaflet-tile-pane img{filter:brightness(.29) contrast(1.52) saturate(.52) hue-rotate(28deg)}
body[data-theme=aero] .leaflet-tile-pane img{filter:saturate(.84) hue-rotate(3deg) brightness(1.03)}

@media(max-width:900px){
  .top-chrome{padding:calc(10px + env(safe-area-inset-top)) 12px 0}
  .brand{gap:8px}.brand-mark{width:37px;height:37px;border-radius:11px}.brand-mark span{font-size:27px;line-height:36px}
  .brand-type strong{font-size:17px}.brand-type>span{font-size:6px;letter-spacing:.11em}
  .header-actions{gap:6px}.circle-button{width:37px;height:37px;border-radius:11px}.circle-button svg{width:18px;height:18px}
  .map-caption,.engine-indicator{display:none}
  .map-tools{top:calc(95px + env(safe-area-inset-top));right:12px;gap:7px}
  .tool-button{width:42px;height:42px;border-radius:12px}
  .bottom-controls{left:12px;right:12px;bottom:calc(11px + env(safe-area-inset-bottom));gap:7px}
  .search-box{height:56px;padding:0 12px;gap:9px;border-radius:15px}
  .search-icon svg{width:19px;height:19px}
  .styles-launcher{width:103px;min-width:103px;border-radius:15px;padding:0 10px;gap:8px}
  .styles-symbol{width:21px;height:21px}
  .styles-copy strong{font-size:10px}.styles-copy small{font-size:9px}
  .quick-places{left:12px;right:12px;bottom:calc(77px + env(safe-area-inset-bottom));gap:6px}
  .quick-places button{font-size:11px;padding:9px 10px;border-radius:11px}
  .search-results{max-height:min(35dvh,230px);bottom:calc(100% + 8px);border-radius:15px;padding:4px}
  .search-result{padding:10px 9px;gap:9px}.search-result strong{font-size:12px}.search-result small{font-size:10px}
  .search-message{font-size:12px}
  .route-card{left:0;right:0;bottom:0;width:100%;max-width:none;padding:11px 14px calc(13px + env(safe-area-inset-bottom));border-radius:22px 22px 0 0;max-height:min(63dvh,510px);overflow-y:auto;overscroll-behavior:contain;scrollbar-width:none}
  .route-card::-webkit-scrollbar{display:none}
  .route-card.expanded{max-height:calc(82dvh - env(safe-area-inset-top))}
  .sheet-expand{display:grid}.route-head{margin-top:0}.route-kicker{font-size:9px;letter-spacing:.1em}
  .route-style-button{height:30px;min-height:30px;padding:0 8px;font-size:9px}.route-close{width:30px;height:30px}
  .route-place{margin-top:8px;gap:9px}.route-place-symbol{width:40px;height:40px;border-radius:12px}.route-place-symbol svg{width:22px;height:22px}
  .route-destination{font-size:17px;line-height:1.1}.route-subline{font-size:10px;margin-top:4px}
  .place-utilities{margin-top:10px;gap:5px}.utility-button{min-height:32px;font-size:9px;padding:6px 6px;gap:4px;border-radius:9px}.utility-button .line-icon{width:14px;height:14px}
  .origin-summary{margin-top:7px;min-height:30px;padding:6px 9px}.origin-summary strong{font-size:10px}.origin-editor{padding:7px}
  .route-stats{margin-top:10px;padding:10px 13px;border-radius:10px}.route-stats strong{font-size:20px}.route-stats span{font-size:8px;margin-top:4px}.stat-sep{height:29px}
  .route-alternatives{margin-top:8px}.alternative-button{padding:8px 10px;min-width:122px}
  .route-actions{margin-top:9px;gap:7px}.primary-button,.secondary-button{min-height:43px;font-size:10px;border-radius:10px}
  .route-notice{display:none}.route-card.expanded .route-notice{display:block;margin-top:8px;font-size:10px}
  .directions-toggle{margin-top:8px;padding:10px 11px;font-size:10px}.directions-list{max-height:38dvh}
  .theme-scrim{display:none!important}
  .theme-dock{left:0;right:0;bottom:0;max-width:none;width:100%;padding:13px 13px calc(17px + env(safe-area-inset-bottom));border-radius:21px 21px 0 0;box-shadow:0 -12px 40px rgba(0,0,0,.14);background:var(--shell-bg-raised);animation:sigma-sheet .2s ease}
  .theme-dock .sheet-grip{margin:0 auto 9px}.dock-heading{align-items:center;margin-bottom:11px}
  .dock-heading h2{font-size:21px;margin-top:3px}.dock-heading p,.dock-foot{display:none}
  .dock-eyebrow{font-size:8px}.theme-close{width:31px;height:31px}
  .theme-list{display:flex;gap:9px;overflow-x:auto;padding:1px 1px 4px;scroll-snap-type:x proximity;scrollbar-width:none}
  .theme-list::-webkit-scrollbar{display:none}
  .theme-card{flex:0 0 137px;min-width:137px;height:119px;padding:5px;border-radius:12px;scroll-snap-align:start}
  .theme-art{height:77px;flex-basis:77px;border-radius:8px}
  .theme-details{margin:7px 3px 0}.theme-details strong{font-size:12px}.theme-details small{font-size:7px}
  .selected-badge{width:19px;height:19px;top:10px;right:10px}
  .places-drawer{left:0;right:0;bottom:0;width:100%;max-height:min(59dvh,510px);border-radius:22px 22px 0 0;padding:17px 15px calc(18px + env(safe-area-inset-bottom))}
  .drawer-heading h2{font-size:24px}.drawer-section-heading{padding:8px 0}.places-list{max-height:140px}.place-row-select{padding:9px}
  .toast{top:calc(65px + env(safe-area-inset-top));max-width:calc(100% - 120px);white-space:normal;font-size:10px;padding:8px 10px}
  .demo-banner{top:calc(72px + env(safe-area-inset-top));max-width:calc(100% - 18px);font-size:9px;border-radius:12px;padding:9px 10px}
  .demo-banner span{overflow:hidden;text-overflow:ellipsis}
  .maplibregl-ctrl-bottom-left,.maplibregl-ctrl-bottom-right,.leaflet-bottom{bottom:calc(146px + env(safe-area-inset-bottom))}
  .offline-indicator{top:calc(67px + env(safe-area-inset-top));max-width:calc(100% - 24px);font-size:10px}
  .modal-backdrop{padding:10px;align-items:end;backdrop-filter:blur(3px);background:rgba(4,19,25,.4)}
  .modal{width:100%;max-height:78dvh;overflow-y:auto;border-radius:22px 22px 13px 13px;padding:22px}
}
@media(max-width:370px){
  .brand-type>span{display:none}.styles-launcher{width:91px;min-width:91px}.styles-copy small{font-size:8px}
  .utility-button{font-size:8px}.route-destination{font-size:16px}.route-card{max-height:69dvh}
}
@media(max-height:650px) and (max-width:900px){
  .route-card{max-height:68dvh}.theme-card{height:104px}.theme-art{height:63px;flex-basis:63px}
  .theme-dock{padding-top:10px}.dock-heading{margin-bottom:7px}.places-drawer{max-height:70dvh}
}
@media(prefers-reduced-motion:reduce){.directions-toggle .chevron{transition:none}}

/* Center every map dismiss action independent of the selected icon family. */
:is(#clearSearch,#routeClose,#themeClose,#placesClose,#aboutClose,.place-row-remove){
  display:grid;place-items:center;box-sizing:border-box;padding:0!important;
  line-height:0;text-align:center;
}
:is(#clearSearch,#routeClose,#themeClose,#placesClose,#aboutClose,.place-row-remove)>:is(svg,img){
  grid-area:1/1;place-self:center;margin:0!important;
}
#aboutClose{width:36px;height:36px}
