/* Keep the geographic canvas clear; all interface panels live in the page flow. */
.map-shell {
  display:grid;
  grid-template-rows:auto auto minmax(300px, 1fr) auto;
  min-height:0;
  overflow:auto;
  background:#1c2020;
  isolation:isolate;
}
.map-shell:after { display:none; }
.map-header { padding:20px 24px 15px; border-bottom:1px solid var(--line); }
.map-shell .map-heading {
  position:static; max-width:none; padding:0; border:0; border-radius:0;
  background:none; box-shadow:none; backdrop-filter:none; pointer-events:auto;
}
.map-heading .eyebrow { font-size:7px; }
.map-shell .map-heading h2 { font-size:30px; margin:5px 0 9px; }
.map-heading h2 span, .map-shell.satellite .map-heading h2 span { display:inline; font-size:11px; margin:0 0 0 7px; letter-spacing:1px; }
.map-shell .map-heading > div:last-child { font-size:7px; }
.map-toolbar { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:10px 16px; padding:12px 24px; border-bottom:1px solid var(--line); }
.map-shell .base-control, .map-shell .map-tools,
.map-shell .map-legend, .map-shell .detail-card, .map-shell .map-footnote, .map-shell .tile-message {
  position:static; inset:auto; transform:none; backdrop-filter:none; box-shadow:none;
}
.map-view-tools { display:flex; align-items:center; justify-content:space-between; width:100%; gap:10px; }
.map-shell .base-control { padding:3px; }
.map-shell .base-control button { min-height:34px; padding:7px 11px; }
.map-shell .map-tools { flex-direction:row; align-items:center; padding:3px; }
.map-shell .map-tools button { width:32px; height:34px; }
.map-shell .map-tools span { width:1px; height:20px; margin:0 2px; }
.map-canvas { position:relative; min-width:0; min-height:300px; overflow:hidden; background:#3b413b; }
.map-canvas #map { position:absolute; inset:0; width:100%; height:100%; }
.map-footer { min-width:0; padding:12px 24px; border-top:1px solid var(--line); background:#1c2020; }
.map-shell .map-legend { width:100%; max-width:none; padding:0; border:0; border-radius:0; background:none; gap:10px 16px; }
.map-shell.has-selection .map-legend { display:flex; }
.map-shell.has-selection .leaflet-control-scale { display:flex; }
.map-shell .map-legend > span { display:flex; }
.map-shell .map-legend .elevation-key { display:flex; width:170px; max-width:100%; border:0; padding:0; }
.map-shell:not(.relief) .elevation-key { display:none; }
.map-shell .map-legend button { width:auto; min-height:32px; margin:0 0 0 auto; padding:6px 10px; border:1px solid #3b413b; border-radius:4px; }
.map-meta { display:flex; justify-content:space-between; align-items:center; gap:12px; margin:9px 0; }
.map-shell .map-footnote { background:none; padding:0; border:0; font-size:9px; }
.map-shell .map-footnote span { display:inline; }
.map-shell .map-footnote .relief-detail-status { display:inline; color:#b5b8ae; margin-left:12px; }
.map-shell .map-footnote .relief-detail-status[hidden] { display:none; }
.external-scale { flex-shrink:0; }
.external-scale .leaflet-control-scale { float:none; margin:0 !important; display:flex; align-items:center; gap:7px; }
.external-scale .leaflet-control-scale-line { background:none !important; font-size:8px !important; }
.external-attribution { min-width:0; }
.external-attribution .leaflet-control-attribution { float:none; margin:0 !important; padding:0 !important; background:none !important; font-size:8px !important; line-height:1.6; }
.map-shell .detail-card { width:100%; max-width:none; border-radius:6px; margin:12px 0; }
.map-shell.no-selection .detail-card { display:none; }
.map-shell .card-top { padding:13px 16px 0; }
.map-shell .card-main { padding:4px 16px 13px; }
.map-shell .card-title { margin-bottom:0; }
.map-shell .card-title h3 { font-size:24px; }
.map-shell .card-description { margin-top:7px; }
.map-shell .card-meta { margin-top:9px; }
.map-shell .card-bottom { padding:8px 10px; }
.map-shell .tile-message { width:100%; max-width:none; margin:10px 0; font-size:10px; }
.map-shell .tile-message[hidden] { display:none; }
.rapid-map-stage { display:grid; grid-template-rows:auto minmax(220px, 1fr) auto; background:#1c2020; }
.rapid-toolbar { padding:10px 14px; display:flex; flex-wrap:wrap; justify-content:space-between; align-items:center; gap:8px; border-bottom:1px solid var(--line); }
.rapid-map-stage .rapid-view-controls { position:static; flex-direction:row; flex-wrap:wrap; align-items:center; gap:8px; }
.rapid-view-tabs, .rapid-labels, .rapid-map-tools { box-shadow:none; }
.rapid-map-stage .rapid-map-tools { position:static; flex-direction:row; padding:3px; }
.rapid-map-tools button + button { border-top:0; border-left:1px solid #3b413b; }
.rapid-canvas { position:relative; min-width:0; min-height:220px; overflow:hidden; }
.rapid-map-footer { min-width:0; padding:9px 14px; background:#1c2020; border-top:1px solid var(--line); }
.rapid-map-meta { display:flex; align-items:center; gap:12px; flex-wrap:wrap; margin-bottom:6px; }
.rapid-map-stage .rapid-north { position:static; display:flex; flex-direction:row; gap:4px; font-size:8px; text-shadow:none; }
.rapid-map-stage .rapid-north span { font-size:18px; }
.rapid-map-stage .rapid-imagery-date { position:static; border:0; background:none; padding:0; font-size:7px; backdrop-filter:none; color:#b5b8ae; }
.rapid-map-stage[data-view=atlas] .rapid-imagery-date { background:none; color:#b5b8ae; }
.rapid-map-meta .external-scale { margin-left:auto; }
.rapid-map-stage[data-view=aerial] .atlas-only, .rapid-map-stage[data-view=atlas] .aerial-only { display:none; }
@media (min-width: 1450px) { .map-header, .map-toolbar, .map-footer { padding-left:28px; padding-right:28px; } }
@media (max-width: 1150px) and (min-width: 761px) {
  .explorer { grid-template-columns:290px minmax(0, 1fr); }
  .map-header, .map-toolbar, .map-footer { padding-left:18px; padding-right:18px; }
  .map-toolbar { gap:10px; }
  .map-shell .map-heading h2 span { display:block; margin:7px 0 0; }
}
@media (max-width: 760px) {
  .explorer { height:auto; min-height:0; }
  .map-shell { height:auto; min-height:0; max-height:none; overflow:visible; grid-template-rows:auto auto auto auto; }
  .map-header { padding:18px 17px 14px; }
  .map-shell .map-heading h2 { font-size:29px; margin:5px 0 10px; }
  .map-shell .map-heading h2 span { display:inline; font-size:7px; margin:0 0 0 5px; letter-spacing:.8px; }
  .map-toolbar { padding:10px 14px; gap:9px; }
  .map-view-tools { width:100%; justify-content:space-between; gap:8px; }
  .map-shell .base-control button { font-size:10px; padding:7px 12px; }
  .map-canvas { height:clamp(380px, 54dvh, 530px); min-height:380px; }
  .map-footer { padding:12px 16px 14px; }
  .map-shell .map-legend { gap:11px 14px; font-size:9px; }
  .map-shell .map-legend .elevation-key { width:175px; order:1; }
  .map-shell .map-legend button { order:2; margin-left:auto; font-size:9px; }
  .map-meta { margin-top:10px; }
  .map-shell .map-footnote { font-size:8px; }
  .map-shell .map-footnote span { display:none; }
  .map-shell .map-footnote .relief-detail-status { display:block; margin:5px 0 0; }
  .map-shell .detail-card { margin-top:13px; }
  .map-shell .card-kicker { font-size:8px; }
  .map-shell .card-description { display:block; font-size:12px; }
  .rapid-map-stage { height:auto; min-height:0; flex:none; grid-template-rows:auto auto auto; overflow:visible; }
  .rapid-toolbar { padding:10px 12px; gap:8px; }
  .rapid-map-stage .rapid-view-controls { gap:7px; }
  .rapid-view-tabs button { font-size:10px; padding:8px 10px; min-height:32px; }
  .rapid-labels { min-height:34px; }
  .rapid-map-stage .rapid-map-tools { margin-left:auto; }
  .rapid-canvas { height:49dvh; min-height:340px; }
  .rapid-map-footer { padding:9px 12px; }
  .rapid-map-stage .rapid-north { display:flex; }
}
