/* The desktop explorer is the single home for branding, discovery and map tools. */
.sidebar-map-controls:empty{display:none}
@media screen and (min-width:721px){
 body.sidebar-layout{overflow:hidden}
 .sidebar-layout:not(.record-focus) .workspace{grid-template-columns:clamp(320px,25vw,480px) minmax(0,1fr);height:100dvh;min-height:0}
 .sidebar-layout:not(.record-focus) .map-stage{height:100%;min-height:0;margin:0}
 .sidebar-layout:not(.record-focus) .map-canvas{height:100%;min-height:0;max-height:none}
 .sidebar-layout .explorer{overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;min-width:0;min-height:0}
 .sidebar-layout .explorer-head,.sidebar-layout .explorer-body,.sidebar-layout .explorer-footer,.sidebar-layout .mobile-evidence-summary{flex:none}
 .sidebar-layout .explorer-body{overflow:visible;min-height:0}
 .sidebar-layout .explorer-footer{margin-top:auto}
 .sidebar-layout .explorer .masthead{display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start;gap:12px;height:auto;padding:20px 18px 14px;flex:none;border-bottom:1px solid var(--line);background:transparent}
 .sidebar-layout .masthead .brand{gap:10px;align-items:center}
 .sidebar-layout .masthead .brand-logo{width:40px;height:40px;flex:none}
 .sidebar-layout .masthead .brand strong{font-size:23px;line-height:1.15}
 .sidebar-layout .masthead .brand small{font-size:7px;letter-spacing:1px;white-space:normal}
 .sidebar-layout .header-note{display:flex;align-items:center;gap:7px;font-size:10px;flex-wrap:wrap}
 .sidebar-layout .header-actions{display:flex;gap:4px;justify-content:space-between;flex-wrap:wrap}
 .sidebar-layout .header-actions button{min-height:34px;padding:5px 6px;font-size:11px;white-space:nowrap}
 .sidebar-layout .explorer-head{padding:16px 18px 0}
 .sidebar-layout .explorer-head>.eyebrow,.sidebar-layout .explorer-head>p{display:none}
 .sidebar-layout .explorer-head h1{font-size:22px;margin:0 0 14px}
 .sidebar-layout .search-box{margin-bottom:12px}
 .sidebar-map-controls{margin:0 0 12px}
 .sidebar-layout .selection-bar{padding:0 0 10px;min-height:0;border:0;gap:8px;align-items:flex-start;flex-wrap:wrap}
 .sidebar-layout #selectedChips{flex-wrap:wrap;gap:5px}
 .sidebar-layout #resetView{width:100%;font-size:13px;padding:10px 14px}
 .sidebar-layout .map-topbar{padding:0;display:block;border:0;margin:0}
 .sidebar-layout .map-topbar>div:first-child{display:none}
 .sidebar-layout .map-actions{display:flex;gap:6px;flex-wrap:wrap}
 .sidebar-layout .map-actions button{flex:1;min-height:36px;padding:7px 8px;font-size:11px;white-space:nowrap}
 .sidebar-layout #mobileMapTools{padding:14px 0 0;margin:0;border:0;max-height:none;overflow:visible}
 .sidebar-layout #mobileMapTools .map-settings{flex-wrap:wrap;gap:8px}
 .sidebar-layout #mobileMapTools .map-settings select{min-width:0;max-width:100%}
 .sidebar-layout #mobileMapTools .snapshot-controls{padding:0;display:flex;flex-direction:column;align-items:stretch;gap:12px}
 .sidebar-layout #mobileMapTools .snapshot-controls label{flex-wrap:wrap;gap:6px}
 .sidebar-layout #mobileMapTools .legend-body{gap:8px 12px}
 .sidebar-layout #filterPanel{padding:14px 0 0;max-height:none;overflow:visible;border:0;margin:0}
 .sidebar-layout .filter-grid{grid-template-columns:minmax(0,1fr);gap:12px}
 .sidebar-layout .filter-checks{flex-direction:column;gap:10px}
 .sidebar-layout .filter-heading{align-items:flex-start;gap:8px;font-size:12px}
 .sidebar-layout .filter-heading .text-button{font-size:11px}
 .sidebar-layout .field select,.sidebar-layout .field input{max-width:100%;min-width:0}
 .sidebar-layout .mobile-evidence-summary{padding:12px 18px;max-height:none;overflow:visible;margin:0;border-top:1px solid var(--line)}
 .sidebar-layout .mobile-evidence-summary .map-summary{padding:10px 0 0;display:block;font-size:11px;line-height:1.6}
 .sidebar-layout .mobile-evidence-summary .map-caption{padding:8px 0 0}
}

/* One prominent reset action, in the sidebar or the focused toolbar. */
#resetView,.record-focus-bar #focusResetView{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:9px 14px;border:1px solid #155f50;border-radius:5px;background:#155f50;color:#fff;font-size:13px;font-weight:600;line-height:1.2;cursor:pointer;white-space:nowrap;text-decoration:none}
#resetView svg,.record-focus-bar #focusResetView svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;flex:none}
#resetView:hover,.record-focus-bar #focusResetView:hover{background:#0c493d;border-color:#0c493d}
#resetView:focus-visible,.record-focus-bar #focusResetView:focus-visible{outline:3px solid #b48337;outline-offset:3px}
.record-focus-bar #focusResetView{min-height:38px;padding:8px 12px}
@media(max-width:720px){#resetView{min-height:44px;font-size:12px;padding:9px 12px;flex-shrink:0}}

/* Compact phone header: keep navigation in flow and touch targets generous. */
@media screen and (max-width:720px){
 .masthead{height:50px;min-height:50px;padding:3px 12px;gap:8px}
 .brand{gap:7px;min-width:0}.brand-logo{width:30px;height:30px}
 .brand strong{font-size:17px;line-height:1.2;white-space:nowrap}
 .brand small,.header-note{display:none}
 .header-actions .quiet{min-height:44px;padding:6px 8px;font-size:11px}
 .map-stage{margin:0}
 .map-topbar{padding:4px 10px;gap:8px;align-items:center;min-height:52px}
 .map-topbar>div:first-child{min-width:0;flex:1}
 .map-topbar .eyebrow,#coastViewHint{display:none}
 .map-topbar h2{font-size:16px;line-height:1.25;margin:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 .map-actions{gap:5px;flex-shrink:0}
 .map-actions button{min-height:44px;padding:6px 8px;font-size:11px;white-space:nowrap}
 .map-stage>.selection-bar{padding:0 10px 6px;min-height:0;gap:8px;align-items:center}
 #selectedChips{min-width:0;flex:1;flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none}
 #selectedChips::-webkit-scrollbar{display:none}
 .chip{min-height:44px;padding:0 3px 0 6px;font-size:11px}
 .chip button{min-width:40px;min-height:44px;padding:0;line-height:1}
 #resetView{min-height:44px;padding:8px 10px;font-size:12px;flex-shrink:0}
 .mobile-evidence-summary{display:none}
 .explorer-head{padding:14px 12px 0}
 .explorer-head>.eyebrow,.explorer-head>p{display:none}
 .explorer-head h1{font-size:22px;margin:0 0 10px;line-height:1.2}
 .search-box{min-height:44px;padding:8px 10px}
 .search-box input{font-size:16px}
 .tabs{margin-top:6px;gap:10px}.tabs button{min-height:44px}
}

/* Text-sized place labels; the transparent button keeps a comfortable hit area. */
.coastal-place{display:flex;align-items:center;justify-content:center}
.coastal-place button{display:flex;align-items:center;justify-content:center;width:max-content;max-width:126px;min-height:44px;padding:0;background:transparent}
.coastal-place button:hover,.coastal-place button:focus-visible{background:transparent}
.coastal-place .place-label{display:block;max-width:126px;margin:0;padding:2px 5px;border-radius:2px;background:#fffefae0;font:inherit;line-height:1.2}
.coastal-place button:hover .place-label,.coastal-place button:focus-visible .place-label{background:#fff}

/* Evidence stays discoverable when a map position cannot be published. */
.evidence-view-switch{display:flex;gap:4px;padding:3px;margin:0 0 10px;background:#eef3ef;border:1px solid #dce6e0;border-radius:7px}
.evidence-view-switch button{flex:1;min-height:44px;padding:7px 5px;border:0;border-radius:5px;background:transparent;color:#385c5d;font-family:inherit;font-weight:600;font-size:12px;line-height:1.25;cursor:pointer}
.evidence-view-switch button[aria-pressed="true"]{background:#fff;color:#174d4c;box-shadow:0 1px 4px #173c4015}
.evidence-view-switch span{font-size:11px;font-weight:400;margin-left:3px;font-variant-numeric:tabular-nums}
.library-scope-note{font-size:12px;line-height:1.45;color:#5a706e;margin:0 0 12px}
.record-card .record-brief{display:block;font-size:12px;line-height:1.5;color:#33595a;margin:5px 0;overflow-wrap:anywhere}
.record-location-tag{display:inline-block;font-size:11px;line-height:1.4;color:#5b7066;border-left:2px solid #8eaaa0;padding-left:6px;margin-top:7px}
.evidence-view-switch button:focus-visible{outline:2px solid #29766e;outline-offset:1px}

/* Boundary interiors must not intercept habitat clicks underneath. */
.leaflet-pane .boundary-outline{pointer-events:stroke}
