.wreck-explorer { margin-bottom: clamp(2rem, 5vw, 4rem); }
.wreck-map-heading { display: flex; gap: .8rem 1.5rem; justify-content: space-between; align-items: start; }
.wreck-map-heading h2 { max-width: 22ch; }
.wreck-intro { margin-top: .85rem; max-width: 62ch; color: var(--muted); }
.wreck-pilot {
  flex: 0 0 auto; padding: .28rem .55rem; border: 1px solid #b5bdb2;
  color: var(--rust); font-size: .76rem; font-weight: 750;
}
.wreck-interactive {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(16.5rem, 26%);
  margin-top: 1.2rem; background: var(--white); border: 1px solid var(--rule);
}
.wreck-interactive[hidden] { display: none; }
.wreck-map-frame { position: relative; min-width: 0; }
#wreck-map { background: #d4e8eb; width: 100%; height: var(--wreck-map-height, 520px); z-index: 0; }
.wreck-basemap { filter: saturate(.55); }
.wreck-relief { filter: saturate(.45); }
.wreck-map-frame:fullscreen #wreck-map { height: 100%; }
.wreck-map-actions {
  position: absolute; z-index: 1; top: .7rem; right: .7rem; display: flex;
  gap: .35rem; flex-wrap: wrap; justify-content: end;
}
.wreck-map-actions button, .wreck-search, .wreck-result {
  font: inherit; color: var(--ink); background: var(--white);
}
.wreck-map-actions button {
  padding: .42rem .64rem; min-height: 2.5rem; border: 1px solid #879c98;
  border-radius: .18rem; cursor: pointer; font-size: .78rem; font-weight: 750;
}
.wreck-map-actions button:hover, .wreck-result:hover { background: #e8eeea; }
.wreck-sidebar { display: flex; flex-direction: column; min-width: 0; height: var(--wreck-map-height, 520px); }
.wreck-sidebar label[for] { display: block; font-weight: 750; font-size: .89rem; }
.wreck-sidebar-head { padding: .9rem; border-bottom: 1px solid var(--rule); }
.wreck-search {
  display: block; margin-top: .3rem; padding: .4rem .55rem; width: 100%;
  min-height: 2.65rem; border: 1px solid #879c98; border-radius: .18rem;
}
.wreck-layer { display: flex; align-items: center; gap: .45rem; font-size: .85rem; margin-top: .35rem; cursor: pointer; }
.wreck-layer input { width: 1rem; height: 1rem; accent-color: var(--deep); }
.wreck-layer:first-child { margin-top: .68rem; }
#wreck-count { color: var(--muted); font-size: .83rem; margin-top: .5rem; }
#wreck-results { list-style: none; padding: 0; margin: 0; overflow: auto; flex: 1; min-height: 0; }
.wreck-result {
  display: flex; align-items: center; justify-content: space-between; gap: .65rem;
  text-align: left; width: 100%; min-height: 2.75rem; padding: .6rem .9rem;
  border: 0; border-bottom: 1px solid #e2e6dd; cursor: pointer;
}
.wreck-result:focus-visible { outline-offset: -4px; }
.wreck-result-name { font-size: .81rem; font-weight: 670; overflow-wrap: anywhere; }
.wreck-result-distance { font-size: .76rem; color: var(--muted); white-space: nowrap; }
.wreck-symbol { display: inline-block; box-sizing: border-box; border: 1px solid; vertical-align: middle; flex: 0 0 auto; }
.wreck-symbol--circle { border-radius: 50%; }
.wreck-symbol--pin { border-radius: 50% 50% 50% 12%; transform: rotate(-45deg); }
.wreck-symbol--none { opacity: 0; }
.wreck-marker .wreck-symbol { display: block; box-shadow: 0 1px 3px #15373a4f; }
.wreck-cluster {
  display: grid; place-items: center; border-radius: 50%; border: 2px solid #eff7f6;
  background: #165568; box-shadow: 0 0 0 3px #1655683b; color: white;
  font: 750 12px/1 system-ui, sans-serif;
}
.leaflet-tooltip.wreck-place {
  padding: 1px 3px; background: transparent; border: 0; box-shadow: none; color: #24444a;
  font: 700 12px/1.2 system-ui, sans-serif; text-shadow: 0 0 3px #fff, 0 0 3px #fff;
}
.leaflet-tooltip.wreck-place::before { display: none; }
.leaflet-tooltip.wreck-centre { color: #793213; background: #fffcf4dd; padding: 2px 4px; }
.leaflet-tooltip.wreck-marker-tooltip {
  box-sizing: border-box; width: min(16rem, 44vw); white-space: normal; overflow-wrap: anywhere;
}
.wreck-os-label {
  display: grid; place-items: center; white-space: nowrap;
  color: #284743; font: 650 11px/1 system-ui, sans-serif;
  text-shadow: -1px -1px #fff, 1px -1px #fff, -1px 1px #fff, 1px 1px #fff;
}
.wreck-record-dialog {
  box-sizing: border-box; width: min(46rem, calc(100% - 2rem)); max-height: min(48rem, 88dvh);
  margin: auto; padding: 0; border: 1px solid var(--rule); border-radius: .35rem;
  background: var(--white); color: var(--ink); overflow: hidden;
}
.wreck-record-dialog[open] { display: flex; flex-direction: column; }
.wreck-record-dialog::backdrop { background: #0c252e9c; }
.wreck-record-header {
  display: flex; align-items: flex-start; justify-content: space-between; gap: .8rem;
  padding: 1rem 1.25rem; border-bottom: 1px solid var(--rule);
}
.wreck-record-header h3 { margin-top: .3rem; font-size: clamp(1.3rem, 3vw, 1.8rem); overflow-wrap: anywhere; }
.wreck-record-header button {
  font: inherit; padding: .4rem .65rem; border: 1px solid #879c98; border-radius: .18rem;
  background: var(--white); color: var(--ink); cursor: pointer;
}
.wreck-record-body { min-height: 0; padding: .85rem 1.25rem 1.25rem; overflow: auto; overscroll-behavior: contain; }
.wreck-record-summary { color: var(--muted); }
.wreck-record-section { margin-top: 1rem; }
.wreck-record-section h4 { margin-bottom: .25rem; font-size: 1rem; }
.wreck-record-facts { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); font-size: .9rem; }
.wreck-record-facts dt, .wreck-record-facts dd {
  margin: 0; padding: .32rem .4rem .32rem 0; border-bottom: 1px solid var(--rule); overflow-wrap: anywhere;
}
.wreck-record-facts dt { font-weight: 650; }
.wreck-record-notes { margin-top: .85rem; padding: .55rem 0; border-bottom: 1px solid var(--rule); }
.wreck-record-notes summary { cursor: pointer; font-weight: 650; }
.wreck-record-notes p { margin-top: .55rem; white-space: pre-line; overflow-wrap: anywhere; font-size: .9rem; }
.wreck-map-credit { margin-top: .65rem; color: var(--muted); font-size: .82rem; }
.wreck-no-script { margin-top: .65rem; }
@media (max-width: 52rem) {
  .wreck-interactive { grid-template-columns: 1fr; }
  .wreck-sidebar { height: auto; }
  #wreck-map { height: min(var(--wreck-map-height, 520px), max(310px, 55svh)); }
  #wreck-results { max-height: 13.75rem; }
}
@media (max-width: 34rem) {
  .wreck-map-heading { flex-direction: column; }
}
