/* Only this module and its detail window own these styles. */
body.notice-map-prototype{margin:0;height:100dvh;display:flex;flex-direction:column;background:var(--color-bg);color:var(--color-text);font-family:"Segoe UI",system-ui,sans-serif}
.notice-map-prototype>header{display:flex;align-items:center;gap:16px;padding:8px 12px}.notice-map-prototype>header h1{font-size:16px;margin:0}.notice-map-prototype>header a{color:var(--color-accent-cyan)}
#notice-map-mount{flex:1;min-height:0;display:flex;flex-direction:column}
#notice-map-view{display:flex;flex-direction:column;flex:1;min-width:0;min-height:0;color:var(--color-text);background:var(--color-bg);font:14px/1.45 "Segoe UI",system-ui,sans-serif}
#notice-map-view *{box-sizing:border-box}#notice-map-view p{margin:6px 0}#notice-map-view h2{font-size:17px;margin:0 0 8px}
#notice-map-view button{font:inherit;min-height:44px;padding:7px 12px;border:1px solid var(--color-border-strong);border-radius:7px;background:var(--color-surface-active);color:var(--color-text);cursor:pointer;overflow-wrap:anywhere}
#notice-map-view button:focus-visible{outline:3px solid var(--color-focus);outline-offset:2px}
.notice-map-toolbar{display:flex;align-items:center;flex-wrap:wrap;gap:6px;padding:7px 10px;background:var(--color-surface-alt);border-bottom:1px solid var(--color-border)}#status{flex:1;color:var(--color-text-muted);font-size:12px}#list-toggle{display:none}
.notice-map-layout{flex:1;display:flex;min-height:0;min-width:0}#notice-map-view #map{flex:1;min-width:0;min-height:180px;background:var(--color-surface-alt);isolation:isolate}
#notice-map-view #sidebar{display:flex;flex-direction:column;width:350px;flex:none;min-height:0;overflow:hidden;padding:12px;background:var(--color-surface);border-left:1px solid var(--color-border)}
#notice-list-scroll{flex:1;min-width:0;min-height:0;overflow-y:auto;scrollbar-gutter:stable;overscroll-behavior:contain}
#notice-list-scroll:focus-visible{outline:2px solid var(--color-focus);outline-offset:-2px}
#notice-map-view .publication{display:block;width:100%;margin:7px 0;text-align:left;border-left:4px solid #922451;background:var(--color-surface-alt)}#notice-map-view .publication strong,#notice-map-view .publication small{display:block}#notice-map-view .publication small{font-size:12px;color:var(--color-text-muted);margin-top:5px}
#notice-map-view .publication.read{border-left-color:var(--color-text-muted)}#notice-map-view .publication.active{outline:3px solid var(--color-accent-cyan);outline-offset:0;background:var(--color-surface-active)}
#map-legend{padding:7px 10px;border-bottom:1px solid var(--color-border);background:var(--color-surface-alt);font-size:12px}.legend-items{display:flex;flex-wrap:wrap;gap:5px 18px}.legend-items>span{display:flex;align-items:center;gap:6px;flex-wrap:wrap}.legend-items i{display:inline-block;flex:none;width:26px}.legend-corridor{height:12px;background:#006b83;border:1px solid white}.legend-notice{height:5px;background:#922451}.legend-items .legend-object{width:15px;height:15px;border-radius:50%;background:#922451;border:2px solid #581043}#notice-map-view #unknown-open{font-size:12px;flex:none;margin:0 0 8px;padding-right:8px;border-left-style:solid}
#notice-map-view details{margin:10px 0}#notice-map-view summary{min-height:44px;padding:10px 0;cursor:pointer}#notice-map-view #unassessable-content>div{border-bottom:1px solid var(--color-border);padding:6px 0}#notice-map-view #unassessable-content p{font-size:12px;color:var(--color-text-muted)}#notice-map-view #unassessable-content button{text-align:left;width:100%}
#selected-trajectories-status,#coverage-content,#notice-navigation-status{font-size:12px;overflow-wrap:anywhere;color:var(--color-text-muted)}#notice-navigation-status:empty{display:none}
#notice-map-view .publication-trajectory,#notice-map-view .publication-object,#detail .publication-trajectory,#detail .publication-object{filter:drop-shadow(0 0 1px #fff) drop-shadow(0 0 1px #fff)}#notice-map-view .leaflet-interactive{cursor:pointer}#notice-map-view .leaflet-interactive:focus-visible{outline:3px solid #17252b;outline-offset:3px}#notice-map-view .leaflet-popup-content button{display:block;width:100%;text-align:left;margin:5px 0}
@media(max-width:800px),(max-height:500px){#notice-map-view .notice-map-layout{flex-direction:column;flex:none}#notice-map-view #map{flex:none;height:clamp(220px,calc(70dvh - var(--notice-map-header-height,8rem)),440px)}#notice-map-view #sidebar{width:100%;border-left:0;border-top:1px solid var(--color-border)}#notice-list-scroll{flex:0 1 auto;max-height:60dvh}#list-toggle{display:block}.notice-map-prototype #notice-map-mount{overflow-y:auto}#notice-map-view.list-hidden #sidebar{display:none}}
/* Detail window only: reuse the application's light/dark semantic palette. */
#detail{padding:0;width:min(1180px,96vw);height:min(880px,94dvh);max-width:96vw;max-height:94dvh;margin:auto;border:1px solid var(--color-border-strong);border-radius:14px;background:var(--color-surface);color:var(--color-text);box-shadow:0 18px 70px var(--color-shadow-detail);overflow:hidden;font-family:"Segoe UI",system-ui,sans-serif;line-height:1.55}
#detail[open]{display:flex;flex-direction:column}#detail::backdrop{background:var(--color-backdrop-dialog)}
#detail .detail-header{position:relative;top:auto;display:flex;justify-content:space-between;align-items:center;gap:12px;padding:14px 18px;flex:none;background:var(--color-surface-alt);border-bottom:1px solid var(--color-border)}
.detail-identity,.detail-actions{display:flex;align-items:center;flex-wrap:wrap;gap:10px}.detail-brand{color:var(--color-brand-bronze);font-size:18px;font-weight:700}.detail-identity{min-width:0}#detail-number{color:var(--color-text-muted);font-size:13px;overflow-wrap:anywhere}
#detail button{min-height:44px;padding:8px 14px;border-radius:8px;border:1px solid var(--color-border-strong);background:var(--color-surface-active);color:var(--color-text);font:inherit;font-size:14px;font-weight:600}#detail #detail-close{background:var(--color-brand-bronze);border-color:var(--color-brand-bronze);color:#091724}#detail button:hover{filter:brightness(1.12)}#detail button:focus-visible{outline:3px solid var(--color-focus);outline-offset:3px}
.detail-layout{display:grid;grid-template-columns:minmax(280px,.9fr) minmax(360px,1.1fr);grid-template-areas:"map content";min-height:0;flex:1;overflow:hidden}
#detail-content{grid-area:content;min-width:0;min-height:0;padding:24px;overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable}
#detail-location{grid-area:map;display:flex;flex-direction:column;gap:12px;min-width:0;min-height:0;padding:18px;background:var(--color-surface-alt);border-right:1px solid var(--color-border)}
#detail-location h3{margin:0;color:var(--color-accent-cyan);font-size:14px;font-weight:600}#detail-map{flex:1;min-height:250px;width:100%;border:1px solid var(--color-border-strong);border-radius:10px;background:var(--color-bg);overflow:hidden}#detail-map-note{font-size:12px;color:var(--color-text-muted);margin:0;overflow-wrap:anywhere}.detail-map-empty{padding:20px;color:var(--color-text-muted);font-size:14px}
#detail .detail-type{display:inline-block;max-width:100%;margin:0 0 12px;padding:5px 10px;border:1px solid var(--color-brand-bronze);border-radius:7px;color:var(--color-text);font-size:15px;font-weight:650;overflow-wrap:anywhere;background:var(--color-surface-alt)}
#detail-heading{font-size:clamp(20px,2vw,26px);font-weight:650;line-height:1.3;margin:0;color:var(--color-text);overflow-wrap:anywhere}.detail-locations{margin-top:8px;color:var(--color-text-muted);font-size:14px;overflow-wrap:anywhere}.detail-locations p+p{margin-top:6px}
.detail-message{margin-top:24px}#detail .detail-message h3{font-size:13px;font-weight:600;color:var(--color-accent-cyan);margin:0 0 12px}.source-text{white-space:pre-wrap;tab-size:4;overflow-wrap:anywhere;font-size:16px;line-height:1.65}.source-text+.source-text{margin-top:22px}.source-cell{padding:8px 0;border-bottom:1px solid var(--color-border);margin:0}.source-unavailable{margin:0 0 18px;padding:12px;border-left:3px solid var(--color-brand-bronze);background:var(--color-surface-alt);color:var(--color-text-muted);font-size:14px}
#detail-validity{margin-top:24px;padding-top:18px;border-top:1px solid var(--color-border)}.detail-dates{display:grid;gap:10px;margin:0}.detail-dates+.detail-dates{margin-top:16px}.detail-dates>div{display:grid;grid-template-columns:105px minmax(0,1fr);gap:12px}.detail-dates dt{font-size:14px;font-weight:600;color:var(--color-text-muted)}.detail-dates dd{margin:0;font-size:15px;overflow-wrap:anywhere}#detail #storage-warning{color:var(--color-warning);font-size:13px;margin-top:12px}#detail #storage-warning:empty{display:none}
@media(max-width:800px),(max-width:1000px) and (max-height:500px){
 #detail{width:100%;max-width:100%;height:auto;max-height:96dvh;margin:auto 0 0;border-radius:14px 14px 0 0;overflow-x:hidden;overflow-y:auto}#detail[open]{display:block}
 #detail .detail-header{position:sticky;top:0;z-index:1001;padding:10px 12px;gap:8px;flex-wrap:wrap}.detail-actions{margin-left:auto;gap:6px}#detail button{padding:8px 10px;font-size:13px}.detail-brand{font-size:16px}#detail-number{font-size:12px}
 .detail-layout{display:flex;flex-direction:column;overflow:visible}#detail-content{order:0;padding:20px 16px;overflow:visible;scrollbar-gutter:auto}#detail-location{order:1;padding:16px;min-height:340px;border-right:0;border-top:1px solid var(--color-border)}#detail-map{flex:none;height:clamp(280px,48dvh,400px);min-height:280px}#detail-heading{font-size:22px}.source-text{font-size:16px}.detail-dates>div{grid-template-columns:98px minmax(0,1fr);gap:8px}
}
/* A separate overview retains the list scroll while the official detail is open. */
#unassessable { padding:0; width:min(54rem,96vw); max-height:90dvh; margin:auto; border:1px solid var(--color-border); border-radius:var(--radius); background:var(--color-surface); color:var(--color-text); overflow:hidden; }
#unassessable[open] { display:flex; flex-direction:column; }
#unassessable::backdrop { background:var(--color-backdrop-dialog); }
#unassessable > header { flex:none; padding:1rem; margin:0; border-bottom:1px solid var(--color-border); }
#unassessable h2 { margin:0; font-size:1.1rem; }
#unassessable .unassessable-list { padding:1rem; overflow-y:auto; overscroll-behavior:contain; min-height:0; }
#unassessable-content > div { border-bottom:1px solid var(--color-border); padding:.5rem 0; }
#unassessable-content button { width:100%; text-align:left; min-height:44px; padding:.65rem; border:1px solid var(--color-border); border-radius:8px; background:var(--color-surface-alt); color:var(--color-text); font:inherit; cursor:pointer; }
#unassessable-content p { color:var(--color-text-muted); font-size:.85rem; }
#notice-map-view .notice-fit-control button { display:grid; place-items:center; width:44px; height:44px; padding:0; border:0; border-radius:2px; background:var(--color-surface); color:var(--color-text); }
#notice-map-view .unknown-publications { border-left-color:var(--color-brand-bronze); }
/* Optional user explanation; technical evidence remains in the dev viewer. */
#map-legend { position:relative; z-index:1001; }
#notice-map-view #map-info { position:relative; margin:0 0 0 auto; }
#notice-map-view #map-info > summary { display:grid; place-items:center; width:44px; min-height:44px; padding:0; list-style:none; font-size:20px; color:var(--color-accent-cyan); }
#map-info > summary::-webkit-details-marker { display:none; }
#map-info > summary:focus-visible { outline:3px solid var(--color-focus); border-radius:var(--radius); }
#map-info .map-info-content { position:absolute; right:0; top:100%; width:min(26rem,calc(100vw - 2rem)); max-height:55dvh; overflow-y:auto; padding:12px; border:1px solid var(--color-border-strong); border-radius:var(--radius); background:var(--color-surface); color:var(--color-text); box-shadow:0 8px 32px var(--color-shadow-detail); }
#selected-publication-panel { margin:16px 0; padding-top:12px; border-top:1px solid var(--color-border-strong); }
#notice-map-view #selected-publication-panel h2 { font-size:14px; color:var(--color-text-muted); }
#notice-map-view .publication-locate { width:100%; }
/* Approved SlemSoft dark background (variant C). Raster images only: never
   filter a map, pane, overlay or control. Light mode keeps original OSM colours. */
.notice-osm-map .sst-osm-tiles img.leaflet-tile { filter:none; }
html[data-theme="dark"] .notice-osm-map .sst-osm-tiles img.leaflet-tile { filter:invert(1) hue-rotate(175deg) brightness(.85) contrast(.92) saturate(.55); }
.notice-osm-map .leaflet-control-attribution { max-width:calc(100% - 12px); font-size:10px; }
.notice-osm-map select { max-width:min(52vw,260px); min-height:38px; background:var(--color-surface); color:var(--color-text); border:1px solid var(--color-brand-bronze); padding:5px; }
.osm-view .legend-corridor { height:2px; background:var(--color-accent-cyan); border:0; }
.osm-view .legend-notice,.osm-view .legend-object { background:var(--color-brand-bronze); border-color:var(--color-brand-bronze); }
#notice-list-scroll, #map-info .map-info-content, #detail, #detail-content, #unassessable .unassessable-list { scrollbar-color:var(--color-border-strong) var(--color-surface); }
@supports not (scrollbar-color:auto) {
 :is(#notice-list-scroll,#map-info .map-info-content,#detail,#detail-content,#unassessable .unassessable-list)::-webkit-scrollbar-track { background:var(--color-surface); }
 :is(#notice-list-scroll,#map-info .map-info-content,#detail,#detail-content,#unassessable .unassessable-list)::-webkit-scrollbar-thumb { background:var(--color-border-strong); }
}
