/* A vertical drawer must shrink its list, not clip an inherited horizontal rail. */
.living-atlas .region-portal{min-height:0}
.living-atlas .region-portraits{flex:1 1 0;min-height:0;overflow-x:hidden;overflow-y:auto;overscroll-behavior-y:contain;touch-action:pan-y;scroll-padding:8px;-webkit-overflow-scrolling:touch;pointer-events:auto}
.living-atlas .region-portrait{flex-shrink:0;touch-action:pan-y;min-height:88px}
.living-atlas .region-portrait .dc-profile-status{display:none}
.living-atlas .region-copy>p{display:none}
.living-atlas .region-portal .region-copy{padding-bottom:10px}
.living-atlas .region-evidence{margin-top:8px}
.living-atlas .region-copy .region-actions .picker-close{min-width:44px;min-height:44px;top:2px;right:2px}
.living-atlas #speciesPanel,.living-atlas .cluster-grid,.living-atlas .search-results,.atlas-filter-panel{overscroll-behavior:contain;touch-action:pan-y;-webkit-overflow-scrolling:touch}
.living-atlas .region-portal:focus-visible,.living-atlas .region-portraits:focus-visible{outline:2px solid #c2dc82;outline-offset:2px}
.living-atlas .atlas-tools details>div{max-height:calc(100dvh - 240px);overflow-y:auto;overscroll-behavior:contain}
.living-atlas .atlas-search:focus-within{z-index:42}
.living-atlas .search-results{max-height:min(52dvh,440px);overflow-y:auto}
.living-atlas #speciesPanel .panel-actions{position:sticky;bottom:0;padding:12px 0 4px;background:#0b1813;z-index:3}
.living-atlas #speciesPanel .panel-close{position:sticky;top:8px;float:right;margin-bottom:-44px;z-index:10}
.living-atlas .atlas-tools:has(.atlas-filter-toggle[aria-expanded=true]){z-index:45}
@media(max-width:899px){
 .living-atlas .region-portal,.living-atlas #speciesPanel{height:min(52dvh,calc(100dvh - 250px));max-height:none;min-height:0}
 .living-atlas .region-portraits{overflow-y:auto;touch-action:pan-y}
 .living-atlas .region-copy h2{font-size:20px;margin:3px 0 4px}
 .living-atlas .region-portal .region-copy{padding:10px 48px 8px 12px}
 .living-atlas .region-portrait{min-height:88px}
 .living-atlas .region-portrait img{min-height:88px}
 .living-atlas .region-copy .region-actions button{min-height:44px}
 .living-atlas #speciesPanel .panel-actions{grid-template-columns:1fr 1fr}
 .living-atlas .atlas-filter-panel{position:fixed;top:136px;bottom:16px;left:12px;right:12px;width:auto;max-height:none;max-width:none;z-index:50}
 .living-atlas .region-copy>small{font-size:10px}
}
@media(max-width:899px) and (max-height:560px){
 .living-atlas .region-portal{top:6px;bottom:calc(var(--atlas-chat-bottom,80px) + 8px);left:12px;right:12px;width:auto;height:auto;max-height:none}
 .living-atlas .region-portraits{overflow-y:auto;touch-action:pan-y}
}
@media(max-height:560px) and (max-width:1000px){
 .living-atlas .region-portal,.living-atlas #speciesPanel{top:6px;bottom:calc(var(--atlas-chat-bottom,80px) + 8px);height:auto;max-height:none;left:auto;right:8px;width:min(360px,52vw);z-index:34}
 .living-atlas .region-portal .region-copy{padding:6px 45px 6px 10px}
 .living-atlas .region-copy h2{font-size:17px;margin:2px 0}
 .living-atlas .region-actions,.living-atlas .region-evidence{display:none}
 .living-atlas .region-actions:has(.picker-close){display:block;position:absolute;top:0;right:0}
 .living-atlas .region-actions>button:not(.picker-close){display:none}
 .living-atlas .atlas-filter-panel{top:90px;bottom:8px}
 .living-atlas .atlas-editorial{display:none}
 .living-atlas #speciesPanel .hero{height:90px;min-height:90px}
 .living-atlas .zoom-controls{display:none}
}
