/* Shared map feedback. Animate the number, never the map engine's marker transform. */
.app{overflow:clip}
.sheet-content{height:100%;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#cad8e3 transparent;scroll-padding-top:76px}
button:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible{outline:3px solid #087aff;outline-offset:3px}
.cluster-count-marker{padding:0;border:0;background:transparent;box-shadow:none;overflow:visible;min-width:44px;height:44px}
.marker-number{display:grid;place-items:center;min-width:44px;height:44px;padding:0 8px;border:3px solid #fff;border-radius:50%;background:linear-gradient(145deg,#2d8eff,#135ccc);color:#fff;font-size:16px;font-weight:800;box-shadow:0 5px 18px #135ccc38;animation:cluster-arrive .44s cubic-bezier(.2,.8,.2,1.2) both;transform-origin:center}
.cluster-count-marker[data-size=large] .marker-number{min-width:54px;height:54px;background:linear-gradient(145deg,#1b74ee,#183f96)}
.cluster-count-marker.is-opening .marker-number{animation:cluster-open .42s ease-out both}
.cluster-count-marker:hover .marker-number{box-shadow:0 7px 24px #135ccc66;filter:brightness(1.08)}
.region-summary-marker{transition:opacity .25s,box-shadow .25s}
.region-summary-marker.is-opening{opacity:.55;box-shadow:0 0 0 12px #087aff18}
@keyframes cluster-arrive{from{opacity:0;transform:translate(var(--from-x,0px),var(--from-y,12px)) scale(.4)}to{opacity:1;transform:translate(0,0) scale(1)}}
@keyframes cluster-open{0%{transform:scale(1)}45%{transform:scale(1.18);box-shadow:0 0 0 16px #087aff18}100%{transform:scale(.85);opacity:.55}}

@media(min-width:801px){
  :root{--panel:clamp(410px,38vw,540px)}
  body{font-size:19.5px;background:#eef3f7}
  .topbar{left:16px;right:16px;top:16px;height:82px;padding:0 24px;gap:30px;border-radius:20px;background:#fff}
  .brand{gap:14px;flex:none}.brand b{font-size:28.5px}.brand small{font-size:15px;margin-top:4px}.brand-mark{width:44px;height:50px}.brand-mark svg{width:36px;height:36px}.brand b i{font-size:10px}
  .search{height:52px;max-width:780px;padding:0 18px;border-radius:14px}.search input{font-size:18px}.search input::placeholder{font-size:16.5px}.search-icon{width:23px;height:23px}
  .search-results{top:62px;max-height:65vh;padding:8px}.search-result{padding:16px}.search-result b{font-size:18px}.search-result small,.search-empty{font-size:15px}
  .live-total strong{font-size:27px}.live-total span{font-size:13.5px}
  #map{left:calc(var(--panel) + 32px);top:116px;right:16px;bottom:16px;border-radius:22px;overflow:hidden;box-shadow:0 4px 18px #17374712}
  .atlas-panel{left:16px;top:116px;bottom:16px;width:var(--panel);overflow:visible;border-radius:22px;background:#fff}
  .sheet-content{border-radius:22px}
  .mode-switch{height:70px;padding:0 24px;gap:16px}.mode-switch button{font-size:18px;padding:0 8px;border-bottom-width:4px}
  .source-tabs{padding:18px 24px 12px;gap:9px}.source-tabs button{font-size:15px;min-height:40px;padding:7px 12px;border-radius:11px}.source-tabs em{font-size:13.5px}
  .live-rail,.traffic-panel{padding:0 24px 24px}
  .explore-intro{padding-top:22px}.explore-intro>small,.traffic-head>div>small{font-size:13.5px}.explore-intro h1{font-size:31.5px;line-height:1.45;margin:10px 0}.explore-intro p{font-size:16.5px}
  .quick-regions{gap:10px;margin:20px 0}.quick-regions button{font-size:18px;padding:12px;min-height:64px;border-radius:13px}.quick-regions small{font-size:13.5px}
  .explore-note{font-size:15px;padding:16px;border-radius:14px;gap:12px}.explore-note button{font-size:15px;min-height:36px}
  .rail-head{padding:24px 0 16px;gap:10px}.rail-head b{font-size:21px}.rail-head small,.rail-head #railCount{font-size:15px}.rail-tools button{font-size:15px;min-height:40px;padding:7px 9px}
  .live-card{min-height:122px;grid-template-columns:86px minmax(0,1fr);padding:18px 42px 18px 0;gap:16px}.card-media{width:86px;height:72px;border-radius:13px}.card-copy{gap:8px}.card-copy b{font-size:18px;line-height:1.5}.card-meta{font-size:15px;gap:5px}.card-source,.provider-chip{font-size:13.5px}.favorite-star{width:38px;height:42px;font-size:26px;right:0}.rail-empty{font-size:16.5px;padding:24px 0}
  .region-group summary{padding:16px 0;font-size:18px;gap:10px;min-height:64px}.region-group summary strong{font-size:18px}.region-group summary i{font-size:15px}.region-row{font-size:18px;padding:14px 0}.region-row small{font-size:15px}.region-row em{font-size:13.5px}
  .region-row-main b{font-size:18px}.region-row-main small{font-size:13.5px}.region-row-action{font-size:15px}.camera-source{font-size:13.5px}.card-live{font-size:10.5px}
  .sidebar{top:132px;left:calc(var(--panel) + 48px);right:100px;flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;padding:2px 0 8px;gap:8px;pointer-events:auto}
  .side-item[data-category],.incident-toggle{flex:none;min-height:46px;padding:9px 13px;border-radius:14px;background:#fffffff5;box-shadow:0 3px 12px #17374715}.side-item b{font-size:16.5px}.side-item em{font-size:13.5px}.side-item>span{width:23px;height:23px}.side-item svg{width:22px;height:22px}.incident-toggle{font-size:15px}.side-sep{display:none}
  .sidebar .side-item.active{background:var(--blue);border-color:var(--blue);color:#fff}
  .map-controls{top:132px;right:32px}.map-controls>button,.map-navigation button{width:48px;height:48px;border-radius:15px}.map-navigation #locateBtn{top:188px;right:32px}.map-navigation #homeBtn{top:244px;right:32px}
  #mapLayersPanel{min-width:250px;font-size:16.5px;padding:18px;line-height:1.7}#mapLayersPanel p{font-size:15px}
  .map-legend{left:calc(var(--panel) + 48px);right:auto;bottom:36px;max-width:480px;font-size:15px;padding:14px 18px;border-radius:16px;gap:12px 18px}.map-legend small{font-size:13.5px}.map-legend i{width:10px;height:10px}
  .status{left:calc(var(--panel) + 48px);right:auto;bottom:145px;font-size:15px;padding:12px 16px}.toast{font-size:16.5px;padding:15px 22px;left:calc(50% + var(--panel)/2);border-radius:16px}
  .cluster-guide{left:calc(var(--panel) + 48px);font-size:15px}
  .region-summary-marker{height:62px;min-width:76px;padding:8px 12px;border-radius:18px}.region-summary-marker span{font-size:15px}.region-summary-marker strong{font-size:19.5px}
  .atlas-panel:has(.viewer:not([hidden])) .source-tabs{display:flex}.atlas-panel:has(.viewer:not([hidden])) .live-rail{display:block}
  .viewer{position:fixed;z-index:38;left:calc((100vw + var(--panel) + 16px)/2);top:190px;transform:translateX(-50%);width:min(860px,calc(100vw - var(--panel) - 88px));max-height:calc(100dvh - 222px);overflow:auto;overscroll-behavior:contain;border-radius:22px;background:#fff;border:1px solid #dae5ed;box-shadow:0 16px 70px #17374745;scrollbar-width:thin}
  .viewer-head{position:sticky;top:0;z-index:2;background:#fff;min-height:60px;padding:10px 24px}.viewer-head button{font-size:18px;min-height:40px}.viewer-head svg{width:25px;height:25px}.viewer-head>span{font-size:13.5px}
  .viewer-media{max-height:46dvh}.viewer-credit{font-size:13.5px;padding:10px 24px}.viewer-copy{padding:22px 26px}.viewer-meta{font-size:13.5px}.viewer h1{font-size:28.5px;margin:10px 0}.viewer p{font-size:16.5px;margin-bottom:18px}.viewer-actions{gap:10px}.viewer-actions button{font-size:15px;min-height:50px;padding:12px;border-radius:13px}.viewer-secondary{margin:16px 0;gap:24px}.viewer-secondary button{font-size:15px;min-height:38px}.viewer-nearby>h3{font-size:18px}.nearby-camera{font-size:16.5px;padding:14px 0;min-height:62px}.nearby-camera b{font-size:16.5px}.nearby-camera small{font-size:13.5px}.nearby-camera>em{font-size:15px}
  .traffic-panel{padding-top:22px}.traffic-head h1{font-size:30px;margin:6px 0 18px}.traffic-head button{font-size:15px;min-height:44px}.traffic-search{gap:10px}.traffic-search input{font-size:16.5px;padding:13px}.traffic-search select{font-size:15px;max-width:145px}.traffic-options,.traffic-note,.traffic-layers legend,.incident-filters label,#trafficStatus{font-size:15px}.traffic-options summary span{font-size:13.5px}.traffic-layers label{min-height:42px}.traffic-layers input,.incident-filters input{width:18px;height:18px}.incident-filters label{padding:9px 12px;border-radius:11px}.traffic-group{padding:20px 0}.traffic-group h2{font-size:18px}.traffic-group>small{font-size:13.5px}.traffic-row{padding:18px 2px;min-height:112px;gap:8px}.traffic-row b{font-size:18px}.traffic-row small{font-size:13.5px}.traffic-row em,.traffic-kind{font-size:15px}.traffic-empty{font-size:16.5px}.traffic-pagination{font-size:15px}.traffic-pagination button{font-size:15px;min-height:44px}.incident-detail h2{font-size:27px}.incident-detail p,.incident-detail dl{font-size:16.5px}.detail-back,.nearby-action{font-size:16.5px;min-height:48px}.incident-marker{width:44px;height:44px}.incident-marker.incident-cluster{font-size:16px}
  .cluster-head{padding:22px 24px}.cluster-head span{font-size:15px}.cluster-head b{font-size:21px}.cluster-list{padding:0 24px 24px}.cluster-item{grid-template-columns:68px minmax(0,1fr) 26px;padding:16px 0;gap:13px}.cluster-thumb{width:68px;height:50px;border-radius:10px}.cluster-copy b{font-size:16.5px;white-space:normal;line-height:1.5}.cluster-copy small{font-size:13.5px}.cluster-play{font-size:15px}
}

@media(max-width:800px){
  :root{--sheet-visible:190px;--sheet-full:calc(100dvh - 218px);--dock:calc(66px + env(safe-area-inset-bottom))}
  .app{--sheet-size:var(--sheet-visible)}
  .app:has(.atlas-panel[data-sheet]),.app:has(.viewer:not([hidden])){--sheet-size:var(--sheet-visible)}
  .topbar{top:calc(10px + env(safe-area-inset-top));height:54px}.brand b{font-size:25px}.brand small{font-size:11px;line-height:1.25}.mobile-mode-switch{top:calc(76px + env(safe-area-inset-top));height:46px}.topbar .search{top:63px;height:50px}.topbar .search input,.topbar .search input::placeholder{font-size:14px}
  .sidebar,.app[data-mode=traffic] .incident-filters{top:calc(133px + env(safe-area-inset-top))}.side-item[data-category],.incident-toggle{min-height:38px}.side-item b,.incident-toggle{font-size:13px}.incident-filters label{font-size:12px;min-height:38px}
  .app>.incident-filters{display:none}.app[data-mode=traffic][data-traffic-view=incidents]>.incident-filters{display:flex!important}.app[data-mode=traffic][data-traffic-view=flow]>.incident-filters{display:none!important}
  .mobile-area-card{display:none}
  .atlas-panel,.atlas-panel[data-sheet],.atlas-panel:has(.viewer:not([hidden]))[data-sheet=half]{height:var(--sheet-full);min-height:0;max-height:none;overflow:hidden;bottom:var(--dock);padding:0;border-radius:26px 26px 0 0;transform:translate3d(0,calc(var(--sheet-full) - var(--sheet-visible)),0);transition:transform .32s cubic-bezier(.22,.8,.25,1);box-shadow:0 -6px 32px #15374720}
  .sheet-handle{height:58px;position:relative;display:grid;grid-template-columns:1fr auto;grid-template-rows:8px 26px;padding:9px 20px 8px;gap:4px 10px;align-items:center;justify-items:start;background:#fafdff;border-bottom:1px solid #e7eef5;cursor:grab;touch-action:none}
  .sheet-handle>span{grid-column:1/-1;justify-self:center;width:44px;height:5px;background:#b8c9d8}.sheet-handle small{display:block;font-size:13px;color:#4b637b;font-weight:650;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}.sheet-handle i{font-style:normal;color:#68839e;font-size:22px;line-height:1;transition:rotate .2s}.atlas-panel[data-sheet=full] .sheet-handle i{rotate:180deg}
  .sheet-content{height:calc(var(--sheet-visible) - 58px);overflow:auto;touch-action:pan-y;overscroll-behavior-y:contain;scroll-padding-top:12px;border-radius:0}
  .is-sheet-dragging .atlas-panel,.is-sheet-dragging .map-controls,.is-sheet-dragging .map-navigation button,.is-sheet-dragging .map-legend{transition:none!important}.is-sheet-dragging .sheet-handle{cursor:grabbing}.is-sheet-dragging .sheet-content{pointer-events:none}
  .map-controls{bottom:calc(var(--sheet-visible) + var(--dock) + 66px)}.map-navigation #locateBtn{bottom:calc(var(--sheet-visible) + var(--dock) + 118px)}.map-navigation #homeBtn{bottom:calc(var(--sheet-visible) + var(--dock) + 14px)}
  .map-legend{bottom:calc(var(--sheet-visible) + var(--dock) + 12px)!important;font-size:10px;padding:9px 11px}.map-legend small{font-size:10px}.status{bottom:calc(var(--sheet-visible) + var(--dock) + 86px)!important;font-size:11px}.toast{position:fixed;bottom:calc(var(--dock) + 18px);font-size:14px;z-index:60}
  .app:has(.atlas-panel[data-sheet=full]) .map-controls,.app:has(.atlas-panel[data-sheet=full]) .map-navigation,.app:has(.atlas-panel[data-sheet=full]) .map-legend{display:none}
  .source-tabs{padding:10px 18px;min-height:44px}.source-tabs button{font-size:13px;min-height:34px;padding:6px 10px}.source-tabs em{font-size:11px}
  .rail-head{padding:12px 0}.rail-head b{font-size:18px}.rail-head #railCount,.rail-head small{font-size:12px}.rail-tools button{font-size:12px;min-height:36px}.card-copy b{font-size:15px;line-height:1.5}.card-meta{font-size:12px}.live-card{min-height:96px;padding:13px 35px 13px 11px}.card-media{width:52px;height:52px}.rail-empty{font-size:14px;line-height:1.7}
  .camera-source{font-size:12px}.card-live{font-size:10px}.region-row-main b{font-size:15px}.region-row-main small,.region-row-action{font-size:12px}
  .atlas-panel[data-sheet=peek] .rail-head{padding:10px 0 8px}.atlas-panel[data-sheet=peek] .live-card{min-height:84px}.atlas-panel[data-sheet=peek] .camera-result{flex-basis:268px}.atlas-panel[data-sheet=peek] .region-group summary{font-size:14px;min-height:66px;padding:12px}.atlas-panel[data-sheet=peek] .region-group summary strong{font-size:14px}
  .region-group summary,.region-row{font-size:15px;min-height:48px}.region-row small{font-size:12px}.quick-regions button{font-size:15px;min-height:52px}.explore-intro p,.explore-note{font-size:13px}.explore-note button{font-size:13px;min-height:32px}
  .viewer-head{padding:9px 18px;min-height:46px}.viewer-head button{font-size:14px;min-height:32px}.viewer-head>span{font-size:11px}.viewer-media{max-height:31dvh}.viewer-credit,.viewer-meta{font-size:11px}.viewer h1{font-size:22px}.viewer p{font-size:13px}.viewer-actions button{font-size:12px;min-height:44px}.viewer-secondary button{font-size:13px;min-height:36px}.nearby-camera b{font-size:14px}.nearby-camera small{font-size:12px}.nearby-camera>em{font-size:12px}
  .traffic-head h1{font-size:21px}.traffic-head button{font-size:12px;min-height:40px}.traffic-row b{font-size:15px}.traffic-row small{font-size:12px}.traffic-row em,.traffic-kind{font-size:13px}.traffic-group h2{font-size:15px}.traffic-group>small{font-size:12px}.traffic-search input{font-size:14px;min-height:42px}.traffic-search select{font-size:12px;max-width:108px}.traffic-options,.traffic-options summary,.traffic-note,#trafficStatus{font-size:13px;line-height:1.8}.traffic-layers label{min-height:40px;font-size:13px}.incident-detail p,.incident-detail dl{font-size:14px}.detail-back,.nearby-action{font-size:14px;min-height:44px}
  .mobile-traffic-summary>span{font-size:12px}.mobile-traffic-summary b{font-size:16px}.mobile-flow-status{font-size:12px;line-height:1.6}.atlas-panel[data-sheet=peek] .traffic-row{min-height:92px;flex-basis:275px}.atlas-panel[data-sheet=peek] .traffic-group>small{font-size:12px}
  .mobile-dock button{font-size:12px}.mobile-dock svg{width:25px;height:25px}
  .cluster-copy b{font-size:14px;white-space:normal;line-height:1.5}.cluster-copy small{font-size:12px}.cluster-item{min-height:72px}.cluster-head span{font-size:13px}.cluster-head b{font-size:18px}
}
@media(max-width:350px){.sheet-handle{padding-inline:16px}.sheet-handle small{font-size:12px}.brand b{font-size:23px}.incident-filters label{font-size:11px}.viewer-actions button{font-size:11px}.rail-head b{font-size:17px}}
@media(prefers-reduced-motion:reduce){.marker-number,.cluster-count-marker.is-opening .marker-number{animation:none}.atlas-panel,.region-summary-marker,.sheet-handle i{transition:none!important}}