*{box-sizing:border-box}html,body,#map{margin:0;width:100%;height:100%;overflow:hidden}body{font:15px/1.5 system-ui,sans-serif;color:#e7f1f6;background:#17232b}[hidden]{display:none!important}
button,input,select{font:inherit}button,select,summary{cursor:pointer}button,a,input,select{touch-action:manipulation}button,input,select{min-height:44px;border:1px solid #668897;border-radius:5px;background:#173544;color:#f0f7fa;padding:9px 12px}button:hover{background:#224c60}input,select{max-width:100%;background:#142936}a{color:#b1e0ef;min-height:44px;display:inline-flex;align-items:center;overflow-wrap:anywhere}button:focus-visible,input:focus-visible,select:focus-visible,a:focus-visible,summary:focus-visible{outline:2px solid #bcecff;outline-offset:3px}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
.mn-brand{position:fixed;left:12px;top:12px;z-index:120;background:#09141df5;border:1px solid #344d5c;border-radius:5px;padding:8px 14px;display:flex;gap:14px;align-items:center}.mn-brand strong{font-size:19px}.mn-brand span{color:#b0c7d2;font-size:13px}.mn-entry{position:fixed;left:12px;top:72px;z-index:125}.mn-report-entry{position:fixed;bottom:36px;left:12px;z-index:125;background:#bce6f2;color:#0b2a37;font-weight:650}.mn-report-entry:hover{background:#d6f2fc}.mn-layers{position:fixed;right:12px;top:12px;z-index:130;width:238px;background:#09141df5;border:1px solid #344d5c;border-radius:6px;padding:14px}.mn-layers h2{font-size:17px;margin:0 0 12px}.mn-layers select{width:100%;margin-bottom:10px}.mn-layers label{display:flex;align-items:center;gap:10px;min-height:44px}.mn-layers input[type=checkbox]{width:18px;height:18px;min-height:0;accent-color:#9ddcf0}.mn-layers summary{min-height:44px;align-content:center}.text-action{border:0;padding:5px 0;text-decoration:underline;background:none;font-size:13px;color:#b4cedb}.mn-layers p{font-size:12px;margin:3px 0;color:#bbd6e2}.mn-layers p:empty{display:none}
.mn-panel{position:fixed;left:12px;top:64px;bottom:12px;width:400px;max-width:calc(100vw - 24px);z-index:151;overflow:auto;overscroll-behavior:contain;padding:0 16px 20px;background:#09141dfa;border:1px solid #536d7a;border-radius:7px}.mn-panel header{position:sticky;top:0;z-index:2;background:#09141d;padding:12px 0}.mn-panel h2{font-size:20px;margin:10px 0 0}.mn-panel h3{font-size:17px;margin:16px 0 6px}.mn-panel p{margin:8px 0;overflow-wrap:anywhere}.mn-panel header p,.mn-panel small{font-size:13px;color:#b4cbd7}.mn-panel small{display:block}.mn-panel .mn-back{width:100%;background:#bce6f2;color:#082a36;text-align:left;font-weight:650}.mn-panel input{width:100%;margin:7px 0}.mn-panel label{display:block}.mn-panel button{margin:4px 5px 4px 0;text-align:left}.mn-panel details{border-top:1px solid #344e5b;margin-top:12px}.mn-panel summary{min-height:44px;align-content:center}.mn-panel article{padding:12px 0;border-bottom:1px solid #344e5b}.mn-panel article h3{margin:0 0 6px;font-size:16px;line-height:1.45}.mn-panel article .mn-actions{display:flex;gap:5px;flex-wrap:wrap}.mn-panel article a{font-weight:650}.mn-panel article p{font-size:13px;color:#bfd2dc}.mn-panel [role=status]:empty{display:none}#mn-preview{position:fixed;bottom:32px;left:12px;z-index:155;background:#09141df5;border:1px solid #688a9c;border-radius:6px;padding:8px;max-width:calc(100vw - 24px)}#mn-preview span{display:block;font-size:13px;margin:3px 5px}.cv-detail-open .mn-entry,.cv-detail-open .mn-report-entry,.cv-coverage-preview .mn-entry,.cv-coverage-preview .mn-report-entry{display:none}.maplibregl-ctrl-attrib{font-size:10px}.maplibregl-ctrl-group button{min-height:30px}.maplibregl-ctrl-bottom-right{bottom:22px}.mn-feature-datum{padding:9px 0;border-bottom:1px solid #304553}
@media(max-width:1000px){.cv-detail-open .mn-layers{visibility:hidden}.mn-panel{top:auto;max-height:70dvh;bottom:8px;left:8px;right:8px;width:auto;max-width:none}.mn-brand span{display:none}.mn-layers{width:210px}.cv-saved-research-open{top:122px}}
@media(max-width:480px){.mn-layers{top:8px;right:8px;width:181px;padding:10px;font-size:14px}.mn-layers h2{font-size:16px;margin-bottom:8px}.mn-brand{left:8px;top:8px;padding:8px 10px}.mn-brand strong{font-size:16px}.mn-entry,.cv-saved-research-open{left:8px;font-size:13px;padding:8px 10px}.mn-entry{top:64px}.cv-saved-research-open{top:116px}.mn-panel h2{font-size:18px}}

/* UX loop: calm cartography, an explicit selected point, and smaller mobile controls. */
#mn-layers-toggle,#mn-layers-close{display:none}
#mn-feature{bottom:auto;max-height:calc(100dvh - 90px)}
#mn-geology-note,.mn-layers #mn-map-key p{font-size:12px;line-height:1.5;color:#bed2dc}
.mn-layers #mn-map-key a{font-size:13px}
.mn-selected-point{display:block;width:20px;height:20px;border:3px solid #fff;border-radius:50%;background:#173544;box-shadow:0 0 0 3px #183442,0 0 0 5px #ffffff70;pointer-events:none}
.mn-unit-key{display:flex;align-items:center;gap:9px;color:#c4dce7;font-size:13px}
.mn-unit-swatch{width:20px;height:20px;border:1px solid #f2f5f8;border-radius:3px;flex:none}
.mn-panel .mn-rock-description{font-size:16px;line-height:1.65}
.mn-panel .mn-primary-action{background:#bce6f2;color:#082a36;font-weight:650;width:100%;text-align:center}
#mn-area-label{position:fixed;bottom:93px;left:12px;z-index:125;max-width:calc(100vw - 24px);padding:5px 9px;margin:0;background:#09141df2;border-left:3px solid #edf6fc;border-radius:3px;color:#e9f3f8;font-size:12px}
.cv-detail-open #mn-area-label,.cv-coverage-preview #mn-area-label{display:none}
@media(max-width:1000px){
 #mn-layers-toggle{display:block;position:fixed;right:12px;top:12px;z-index:140;background:#09141df5}
 .mn-layers{display:none;top:64px;max-height:calc(100dvh - 88px);overflow:auto}
 .mn-layers-open .mn-layers{display:block}
 #mn-layers-close{display:block;position:absolute;right:10px;top:6px;min-height:36px;padding:4px 10px;font-size:13px}
 .mn-layers h2{min-height:32px}
 .cv-detail-open #mn-layers-toggle,.cv-coverage-preview #mn-layers-toggle{display:none}
 #mn-feature{top:auto;bottom:8px;max-height:55dvh}
 #mn-feature header{padding-bottom:4px}
 #mn-feature .mn-rock-description{font-size:15px;line-height:1.5}
}

.mn-panel .mn-report-relevance{font-size:12px;color:#bce6f2;margin:6px 0}
#mn-report-list[inert]{opacity:.65}
#mn-reports button:disabled{opacity:.6;cursor:wait}

@media(max-width:1000px){#mn-reports{height:50dvh;max-height:50dvh}}
/* Let the bottom-sheet heading scroll so it cannot cover focused reports. */
@media(max-width:1000px){#mn-reports>header{position:static}}

.mn-layers{max-height:calc(100dvh - 24px);overflow:auto}
#mn-key-units{list-style:none;margin:8px 0;padding:0;max-height:180px;overflow:auto}
#mn-key-units:empty{display:none}
#mn-key-units li{display:flex;gap:9px;align-items:flex-start;padding:8px 0;border-bottom:1px solid #344e5b;font-size:14px;line-height:1.4}
#mn-key-units .mn-unit-swatch{margin-top:2px}
#mn-key-units small{display:block;color:#b4cbd7;font-size:12px;margin-top:3px}
#mn-identify-centre,#mn-key-retry{font-size:13px;width:100%;margin:6px 0}
@media(max-width:1000px){.mn-layers{max-height:calc(100dvh - 88px)}}

#mn-mineral-list{display:flex;flex-wrap:wrap;gap:6px;padding-bottom:10px}#mn-mineral-list button{font-size:14px;margin:0}#mn-mineral-status,#mn-surveys>p{font-size:13px;color:#bfd2dc}#mn-survey-list article>p{overflow-wrap:anywhere}#mn-survey-list article h3{font-size:15px}#mn-surveys>summary,#mn-minerals>summary{font-weight:600}

.mn-mineral-filter{border-top:1px solid #344e5b;border-bottom:1px solid #344e5b;margin:12px 0;padding:8px 0}.mn-mineral-filter>label{font-weight:650;min-height:32px}.mn-mineral-filter select{margin-bottom:5px}.mn-mineral-filter .text-action{display:block}

/* Mongolia phone navigation mirrors the Canadian map-first shell. */
.mn-mobile-tools[hidden]{display:none!important}
@media(max-width:600px){
 .mn-mobile-layout{--mn-dock-bottom:calc(8px + env(safe-area-inset-bottom,0px))}
 .mn-mobile-layout .mn-brand{inset:8px 8px auto;display:flex;align-items:center;gap:12px;min-height:60px;padding:8px 10px}
 .mn-mobile-layout .mn-brand picture{display:block;flex:none}
 .mn-mobile-layout #mn-country{flex:1;width:auto;min-width:0;margin:0;min-height:44px;font-size:16px}
 .mn-mobile-layout #mn-layers-toggle{inset:auto auto var(--mn-dock-bottom) 8px;width:calc(50% - 12px);height:56px;min-height:56px;white-space:normal;font-size:16px}
 .mn-mobile-layout #mn-reports-open{inset:auto 8px var(--mn-dock-bottom) auto;width:calc(50% - 12px);height:56px;min-height:56px;white-space:normal;padding:8px;font-size:16px;line-height:1.3}
 .mn-mobile-layout .mn-layers{inset:max(80px,calc(100dvh - min(80dvh,620px))) 8px calc(80px + env(safe-area-inset-bottom,0px));width:auto;max-height:none;padding:0 14px 14px;overscroll-behavior:contain;scroll-padding-top:72px;scroll-padding-bottom:12px}
 .mn-mobile-layout .mn-layers-header{position:sticky;top:0;z-index:3;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 0;background:#173D32}
 .mn-mobile-layout .mn-layers-header h2{font-size:20px;margin:0;min-height:0}
 .mn-mobile-layout #mn-layers-close{position:static;min-height:44px;padding:8px 10px;font-size:16px}
 /* Fixed map-action z-indices still apply to grid items after reparenting.
    Contain them below the opaque sticky header instead of painting over it. */
 .mn-mobile-layout .mn-mobile-tools{display:grid;position:relative;z-index:0;isolation:isolate;grid-template-columns:1fr 1fr;gap:8px;padding:8px 0 12px;margin-bottom:12px;border-bottom:1px solid #7D9086}
 .mn-mobile-layout .mn-mobile-tools :is(#mn-choose,.cv-saved-research-open){position:static;z-index:auto;display:block;width:auto;min-height:44px;white-space:normal;font-size:16px;padding:8px;line-height:1.3}
 .mn-mobile-layout .mn-layers :is(button,input,select,summary,a){scroll-margin-top:8px;scroll-margin-bottom:8px}
 .mn-mobile-layout .mn-layers-header button{scroll-margin-top:0;scroll-margin-bottom:0}
 .mn-mobile-layout .mn-mobile-tools>a{grid-column:1/-1;justify-content:center;min-height:44px;font-size:16px!important;text-underline-offset:3px}
 .mn-mobile-layout .maplibregl-ctrl-bottom-right{bottom:calc(76px + env(safe-area-inset-bottom,0px))}
 .mn-mobile-layout #mn-area-label{bottom:calc(80px + env(safe-area-inset-bottom,0px))}
 .mn-mobile-layout #mn-preview{bottom:calc(8px + env(safe-area-inset-bottom,0px))}
}
@media(max-width:600px) and (max-height:560px){
 .mn-mobile-layout.mn-layers-open :is(#mn-layers-toggle,#mn-reports-open){visibility:hidden}
 .mn-mobile-layout .mn-layers{top:8px;bottom:var(--mn-dock-bottom)}
}

/* Keep map controls beside the permanent desktop rail. */
@media(min-width:1001px){
 .mn-workspace{--mn-desktop-layer-width:238px}
 .mn-workspace .mn-layers{width:var(--mn-desktop-layer-width)}
 .mn-workspace .maplibregl-ctrl-bottom-right{right:calc(var(--mn-desktop-layer-width) + 24px)}
}
@media(min-width:601px) and (max-width:1000px){
 .mn-workspace{--mn-tablet-layer-width:210px}
 .mn-workspace .mn-layers{width:var(--mn-tablet-layer-width)}
 .mn-workspace.mn-layers-open:not(.cv-detail-open):not(.cv-coverage-preview) .maplibregl-ctrl-bottom-right{right:calc(var(--mn-tablet-layer-width) + 24px)}
}

/* Keep source status beside Geology and also on the map when the drawer is closed. */
#mn-layer-feedback{display:none}
#mn-layer-feedback[hidden]{display:none!important}
#mn-layer-map-status{display:block}
#mn-layer-map-retry{margin:6px 0 0;min-height:40px}
#mn-layer-status{font-size:13px;line-height:1.45;margin:6px 0}
#mn-layer-status:empty{display:none}
@media(max-width:1000px){
 #mn-layer-feedback{display:block;position:fixed;z-index:44;left:14px;top:198px;max-width:min(460px,calc(100vw - 28px));padding:10px 14px;border:1px solid #7D9086;border-radius:6px;background:#173D32;color:#fff;font-size:14px;line-height:1.45;box-shadow:0 2px 8px #0004}
 .mn-layers-open #mn-layer-feedback,.cv-detail-open #mn-layer-feedback,.cv-coverage-preview #mn-layer-feedback{display:none}
}
@media(max-width:600px){#mn-layer-feedback{left:8px;right:8px;max-width:none;top:80px;font-size:13px}}
