/* Small selected-subject tabs; the phone map owns the viewport. */
#selectedChips{gap:4px}
#selectedChips .chip{min-height:24px;height:24px;padding:0 3px 0 5px;gap:3px;font-size:10px;line-height:1.2;border-radius:3px;white-space:nowrap}
#selectedChips .chip i{width:5px;height:5px;flex:none}
#selectedChips .chip button{min-width:24px;width:24px;min-height:24px;height:24px;padding:0;font-size:14px;line-height:1;display:grid;place-items:center}
.sidebar-layout #selectedChips{gap:4px}
@media screen{
 body.atlas-phone{--atlas-nav-height:54px;--atlas-nav-space:calc(var(--atlas-nav-height) + env(safe-area-inset-bottom));height:100vh;height:100dvh;overflow:hidden;padding:0;overscroll-behavior:none}
 .atlas-phone .workspace{position:fixed;inset:0 0 var(--atlas-nav-space);display:block;height:auto;min-height:0;overflow:hidden}
 .atlas-phone .map-stage{position:relative;z-index:0;display:block;width:100%;height:100%;min-height:0;margin:0;overflow:hidden}
 .atlas-phone .map-canvas{position:relative;display:block;width:100%;height:100%;min-height:0;max-height:none}
 .atlas-phone #map{width:100%;height:100%;min-height:0}
 .atlas-phone .map-stage>.selection-bar{position:absolute;z-index:700;top:max(8px,env(safe-area-inset-top));left:max(10px,env(safe-area-inset-left));right:max(10px,env(safe-area-inset-right));display:flex;align-items:center;min-height:0;padding:0;border:0;background:transparent;pointer-events:none}
 .atlas-phone #selectedChips{flex:1;min-width:0;max-height:none;flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;gap:4px;pointer-events:none;padding:2px 0}
 .atlas-phone #selectedChips::-webkit-scrollbar{display:none}
 .atlas-phone #selectedChips .chip{flex:none;pointer-events:auto;background:#fffefaee}
 .atlas-phone .map-summary,.atlas-phone .map-caption,.atlas-phone .mobile-evidence-summary,.atlas-phone .record-focus-bar{display:none}
 .atlas-phone .atlas-mobile-nav{position:fixed;inset:auto 0 0;display:flex;height:var(--atlas-nav-space);min-height:var(--atlas-nav-space);padding:0 env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);z-index:1100;border-top:1px solid #cbd8d0;box-shadow:none;background:var(--paper,#fffefa)}
 .atlas-phone .atlas-mobile-nav button{flex:1;min-height:var(--atlas-nav-height);border:0;border-radius:0;background:transparent;font-size:13px;color:var(--ink);padding:8px}
 .atlas-phone .atlas-mobile-nav button+button{border-left:1px solid var(--line)}
 .atlas-phone .atlas-mobile-nav button[aria-pressed=true]{color:#09665c;font-weight:700;box-shadow:inset 0 3px #09665c}
 .atlas-phone .explorer{display:flex;flex-direction:column;position:absolute;inset:0;z-index:950;height:100%;min-height:0;width:100%;border:0;background:var(--paper);overflow:auto;padding-top:env(safe-area-inset-top);padding-left:env(safe-area-inset-left);padding-right:env(safe-area-inset-right);transform:translateY(100%);visibility:hidden;pointer-events:none;transition:transform 200ms ease,visibility 0s 200ms}
 .atlas-phone[data-mobile-view=subjects] .explorer,.atlas-phone[data-mobile-view=records] .explorer{transform:translateY(0);visibility:visible;pointer-events:auto;transition-delay:0s}
 .atlas-sheet-handle{display:none}
 .atlas-phone .atlas-sheet-handle{order:-1;display:flex;align-items:center;justify-content:center;position:sticky;top:0;z-index:2;flex:none;width:100%;height:40px;min-height:40px;margin:0;padding:0;border:0;border-radius:0;background:var(--paper);color:var(--muted);cursor:pointer;touch-action:none}
 .atlas-phone .atlas-sheet-handle span{width:36px;height:4px;border-radius:2px;background:#aabbb3}
 .atlas-phone .atlas-sheet-handle:focus-visible{outline:2px solid #09665c;outline-offset:-4px}
 .atlas-phone .explorer .masthead{display:flex;height:auto;min-height:48px;flex:none;padding:8px 14px;border-bottom:1px solid var(--line);gap:12px}
 .atlas-phone .explorer .brand{gap:8px}.atlas-phone .brand-logo{width:30px;height:30px}.atlas-phone .brand strong{font-size:17px}.atlas-phone .brand small,.atlas-phone .header-note{display:none}
 .atlas-phone .header-actions .quiet{font-size:11px;min-height:40px;padding:5px}
 .atlas-phone .explorer-head{flex:none;padding:12px 14px 0}.atlas-phone .explorer-head>.eyebrow,.atlas-phone .explorer-head>p{display:none}.atlas-phone .explorer-head h1{font-size:22px;margin:0 0 10px}
 .atlas-phone .search-box{min-height:42px;padding:8px 10px}.atlas-phone .search-box input{font-size:16px}
 .atlas-phone .explorer-body{flex:1;min-height:140px;max-height:none;overflow:auto;overscroll-behavior:contain;padding:10px 14px 20px}
 .atlas-phone .explorer-footer{flex:none;padding:10px 14px;font-size:11px}.atlas-phone .tabs{margin-top:6px}.atlas-phone .tabs button{min-height:40px}
 .atlas-phone .sidebar-map-controls{display:grid;grid-template-columns:auto minmax(0,1fr);gap:8px;margin:10px 0}
 .atlas-phone .sidebar-map-controls #resetView{width:auto;min-height:40px;font-size:11px;padding:8px 10px;align-self:start}
 .atlas-phone .sidebar-map-controls .map-topbar{display:block;padding:0;min-height:0;border:0;margin:0;background:none}
 .atlas-phone .map-topbar>div:first-child{display:none}.atlas-phone .map-actions{display:flex;gap:6px;flex-wrap:wrap}.atlas-phone .map-actions button{min-height:40px;font-size:11px;padding:7px 9px;flex:1}
 .atlas-phone #mobileMapTools,.atlas-phone #filterPanel{grid-column:1/-1;position:static;padding:10px 0;background:none;border:0;box-shadow:none;max-height:35dvh;overflow:auto}
 .atlas-phone #mobileMapTools .map-settings{position:static;display:flex;flex-wrap:wrap;gap:8px;margin:0 0 12px}.atlas-phone #mobileMapTools .snapshot-controls{display:block;padding:0;border:0;background:none}.atlas-phone #mobileMapTools .snapshot-controls label{display:flex;flex-wrap:wrap;gap:6px;align-items:center;margin:0 0 10px}
 .atlas-phone #mobileMapTools .legend{position:static;max-width:none;max-height:none;border:0;padding:0;background:none;box-shadow:none}.atlas-phone #mobileMapTools select,.atlas-phone #mobileMapTools button,.atlas-phone #filterPanel select,.atlas-phone #filterPanel input{min-height:40px;font-size:13px}
 .atlas-phone .filter-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.atlas-phone .field{min-width:0}.atlas-phone .field select,.atlas-phone .field input{max-width:100%;min-width:0}
 .atlas-phone .detail-panel{position:fixed;inset:auto 0 var(--atlas-nav-space);width:100%;height:auto;max-height:calc(100dvh - var(--atlas-nav-space) - max(12px,env(safe-area-inset-top)));padding:18px max(20px,env(safe-area-inset-right)) 24px max(20px,env(safe-area-inset-left));border-radius:10px 10px 0 0;z-index:1000;overflow:auto;overscroll-behavior:contain}
 .atlas-phone .detail-panel h2{clear:both;font-size:25px}.atlas-phone .detail-panel .close-button{position:sticky;top:0;float:right;width:40px;height:40px;font-size:24px;z-index:10;background:var(--paper)}
 .atlas-phone .evidence-tabs{top:-18px}.atlas-phone .empty-map{max-width:calc(100% - 60px);font-size:12px}
 .atlas-phone .leaflet-control-zoom{margin-right:max(10px,env(safe-area-inset-right))!important;margin-bottom:44px!important}.atlas-phone .leaflet-control-zoom a{width:36px!important;height:36px!important;line-height:36px!important}
 .atlas-phone .leaflet-control-scale{margin-left:max(10px,env(safe-area-inset-left))!important;margin-bottom:50px!important}.atlas-phone .leaflet-control-attribution{font-size:8px!important;line-height:1.3;max-width:100%}
 .atlas-phone .map-signature{left:max(10px,env(safe-area-inset-left));bottom:20px}.atlas-phone .map-signature small{display:none}.atlas-phone .map-signature img{width:18px;height:18px}.atlas-phone .map-signature strong{font-size:10px}
 .atlas-phone .research-reader{width:100%;height:100dvh;max-height:100dvh;margin:0;border:0;border-radius:0}.atlas-phone .reader-layout{display:block;overflow:auto}.atlas-phone .reader-nav{display:none}.atlas-phone .reader-body{padding:24px 20px;height:100%}.atlas-phone .reader-toolbar{padding:10px 14px;gap:8px}.atlas-phone .reader-toolbar strong{font-size:18px}
}
@media screen and (prefers-reduced-motion:reduce){.atlas-phone .explorer{transition:none}}
@media print{body.atlas-phone{height:auto;overflow:visible}.atlas-phone .workspace{position:static;height:auto;overflow:visible}.atlas-phone .map-stage{height:90vh}.atlas-phone .atlas-mobile-nav,.atlas-phone .map-stage>.selection-bar,.atlas-sheet-handle{display:none!important}}
