/* The map itself is the lens; only the two-line caption sits at the tab. */
.app-shell #map-navigation #network-goal-disclosure[open] { width: max-content; }
.app-shell #network-goal-disclosure { position: relative; }
.app-shell #network-goal-disclosure > summary .disclosure-chevron { display: none; }
.app-shell #network-goal-disclosure > .network-goal-body {
  position: absolute; top: calc(100% + 10px); left: 50%;
  width: min(350px, calc(100vw - 100px)); padding: 16px 14px 8px;
  transform: translate(-50%, -4px); box-sizing: border-box;
  border: 1px solid #ffffffa3; border-radius: 20px;
  background: #eef0eee0; color: #303733;
  box-shadow: 0 8px 32px #16271d0a, inset 0 1px 0 #fff;
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  opacity: 0; transition: opacity 1.1s ease, transform 1.1s cubic-bezier(.22,.61,.36,1);
  max-height: calc(100svh - 220px); overflow-y: auto; scrollbar-width: thin;
}
.app-shell #network-goal-disclosure.is-noise-visible > .network-goal-body { opacity: 1; transform: translate(-50%, 0); }
.app-shell .network-noise-preview .network-noise-copy {
  margin: 0; padding: 0; color: #303733; font: 500 16px/1.6 var(--sans);
  text-align: center; pointer-events: none;
}
.network-noise-copy span { display: block; opacity: 0; transition: opacity 1.2s ease; }
.is-noise-closer .network-noise-copy span { opacity: 1; }
.app-shell .network-goal-context { margin-top: 6px; }
.app-shell .network-goal-context > summary { min-height: 28px; padding: 5px; text-align: center; font: 400 11px/1.4 var(--sans); color: #59645e; cursor: pointer; }
.app-shell .network-goal-context > p { padding: 10px 2px 0; }
.app-shell .network-goal-context > small { display: block; padding: 4px 2px 8px; font: 400 11px/1.45 var(--sans); color: #59645e; }
.population-map-lens {
  position: fixed; inset: var(--map-frame-top) var(--map-frame-side) var(--map-frame-bottom);
  border-radius: 32px; overflow: hidden; z-index: 89; pointer-events: none;
  contain: layout paint; isolation: isolate;
}
.population-map-lens[hidden] { display: none; }
.population-map-lens canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
#map.is-population-camera { transform-origin: center; will-change: scale; }
.app-shell #network-goal-disclosure > summary,
.app-shell #network-goal-disclosure > summary * { cursor: pointer; user-select: none; }
@media (max-width: 600px) {
  .app-shell #network-goal-disclosure > .network-goal-body {
    top: calc(100% + 64px); left: calc(50% - 22px); width: calc(100vw - 100px);
    max-height: calc(100svh - 290px); padding: 12px 10px 6px;
  }
  .app-shell .network-noise-preview .network-noise-copy { font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .app-shell #network-goal-disclosure > .network-goal-body { transform: translateX(-50%); }
}

.app-shell #network-goal-disclosure .network-milestones b { white-space:normal;max-width:100%;text-align:center; }

.app-shell #network-goal-disclosure .network-milestones :is(b,span) { min-width:0;max-width:100%;box-sizing:border-box;overflow-wrap:anywhere;text-align:center; }
/* The open explanation sits above the map tools, without losing zoom access. */
.app-shell #map-navigation:has(#network-goal-disclosure[open]) { z-index:105; }
@media(max-width:360px) {
 .app-shell #network-goal-disclosure .network-milestones li > span { display:none; }
 .app-shell #network-goal-disclosure .network-milestones b[data-compact] { font-size:0; }
 .app-shell #network-goal-disclosure .network-milestones b[data-compact]::after { content:attr(data-compact);font:600 12px/1.4 var(--sans); }
}

@media(max-width:360px) { .app-shell #network-goal-disclosure > .network-goal-body { max-height:calc(100svh - 250px); } }
