:root {
  --bg-deep: #021018;
  --bg-panel: rgba(6, 28, 42, 0.88);
  --bg-panel-solid: #0a2433;
  --cyan: #3de0ff;
  --cyan-dim: #1a8fa8;
  --gold: #f0c14b;
  --good: #2ee59d;
  --fair: #e6c84a;
  --poor: #f08a4b;
  --bad: #f05252;
  --text: #e8f4fa;
  --muted: #8aabb8;
  --border: rgba(61, 224, 255, 0.22);
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  --radius: 14px;
  --font: "Segoe UI", system-ui, -apple-system, sans-serif;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  height: 100%;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg-deep);
  overflow: hidden;
}

/* Animated ocean behind the map (visible in letterbox / as map overlay wash) */
.ocean-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 120% 80% at 50% 100%, #0a4a6e 0%, transparent 55%),
    radial-gradient(ellipse 80% 50% at 20% 80%, #063a55 0%, transparent 50%),
    radial-gradient(ellipse 70% 45% at 80% 70%, #0b5a7a 0%, transparent 45%),
    linear-gradient(180deg, #041822 0%, #0a3d56 40%, #0c5a78 70%, #08708a 100%);
  overflow: hidden;
}

.ocean-bg::before,
.ocean-bg::after {
  content: "";
  position: absolute;
  left: -20%;
  width: 140%;
  height: 45%;
  bottom: 0;
  background:
    repeating-linear-gradient(
      100deg,
      transparent 0 18px,
      rgba(255, 255, 255, 0.03) 18px 20px,
      transparent 20px 40px
    );
  animation: swell 14s ease-in-out infinite;
  pointer-events: none;
}

.ocean-bg::after {
  height: 55%;
  opacity: 0.55;
  animation-duration: 19s;
  animation-direction: reverse;
  background:
    repeating-linear-gradient(
      80deg,
      transparent 0 28px,
      rgba(61, 224, 255, 0.04) 28px 32px,
      transparent 32px 56px
    );
}

.wave-layer {
  position: absolute;
  left: -10%;
  width: 120%;
  height: 120px;
  bottom: 8%;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 120' preserveAspectRatio='none'%3E%3Cpath fill='rgba(61,224,255,0.08)' d='M0,60 C240,100 480,20 720,60 C960,100 1200,20 1440,60 L1440,120 L0,120 Z'/%3E%3C/svg%3E")
    repeat-x;
  background-size: 720px 120px;
  animation: drift 18s linear infinite;
  pointer-events: none;
}

.wave-layer.w2 {
  bottom: 14%;
  opacity: 0.7;
  animation-duration: 24s;
  animation-direction: reverse;
  height: 90px;
}

.wave-layer.w3 {
  bottom: 3%;
  opacity: 0.5;
  animation-duration: 12s;
  height: 70px;
}

@keyframes swell {
  0%, 100% { transform: translateY(0) scaleY(1); }
  50% { transform: translateY(-12px) scaleY(1.04); }
}

@keyframes drift {
  from { background-position-x: 0; }
  to { background-position-x: 720px; }
}

.app {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 360px 1fr;
  grid-template-rows: 64px 1fr;
  height: 100vh;
  height: 100dvh;
}

header {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 20px;
  background: linear-gradient(180deg, rgba(4, 20, 32, 0.95), rgba(4, 20, 32, 0.75));
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(10px);
}

.site-home-link {
  color: var(--cyan);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.88rem;
  white-space: nowrap;
}

.site-home-link:hover {
  text-decoration: underline;
  color: #7aefff;
}

.header-home {
  flex-shrink: 0;
}

.panel-home {
  padding-top: 12px;
  padding-bottom: 10px;
}

.map-logo-link {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 1000;
  line-height: 0;
  pointer-events: auto;
}

.map-logo {
  height: 120px;
  width: auto;
  max-width: min(260px, 38vw);
  object-fit: contain;
  opacity: 0.94;
  filter: drop-shadow(0 4px 14px rgba(0, 0, 0, 0.55));
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.map-logo-link:hover .map-logo {
  opacity: 1;
  transform: scale(1.02);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, #0d7a9a, #3de0ff 50%, #f0c14b);
  display: grid;
  place-items: center;
  font-size: 20px;
  box-shadow: 0 0 20px rgba(61, 224, 255, 0.35);
}

.brand h1 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.brand p {
  margin: 0;
  font-size: 0.72rem;
  color: var(--muted);
}

.header-stats {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 0.85rem;
}

.header-stats strong {
  color: var(--cyan);
  font-variant-numeric: tabular-nums;
}

.header-stats .good strong {
  color: var(--good);
}

aside {
  background: var(--bg-panel);
  border-right: 1px solid var(--border);
  backdrop-filter: blur(14px);
  display: flex;
  flex-direction: column;
  min-height: 0;
  max-height: 100%;
  overflow: hidden;
}

/* Full left panel scroll — filters, legends, wrecks, storms, beach list */
.aside-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: rgba(61, 224, 255, 0.55) rgba(0, 0, 0, 0.35);
}

.aside-scroll::-webkit-scrollbar {
  width: 10px;
}

.aside-scroll::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.35);
  border-left: 1px solid var(--border);
}

.aside-scroll::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(61, 224, 255, 0.55), rgba(14, 90, 112, 0.85));
  border-radius: 8px;
  border: 2px solid rgba(0, 0, 0, 0.25);
}

.aside-scroll::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(61, 224, 255, 0.85), rgba(18, 128, 160, 0.95));
}

.panel-section {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.panel-section h2 {
  margin: 0 0 10px;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--cyan-dim);
}

/* Legal / hunt-legally disclaimer */
.legal-disclaimer {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--muted);
}

.legal-disclaimer strong {
  color: var(--gold);
  font-weight: 700;
}

.panel-disclaimer {
  background: rgba(240, 193, 75, 0.08);
  border-left: 3px solid var(--gold);
}

.panel-disclaimer h2 {
  color: var(--gold);
}

.legal-disclaimer-compact {
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(240, 193, 75, 0.35);
  background: rgba(240, 193, 75, 0.08);
  font-size: 0.75rem;
}

.filters {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.filters label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  cursor: pointer;
}

.filters select,
.filters button {
  width: 100%;
  margin-top: 4px;
}

select, button {
  font: inherit;
  color: var(--text);
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
}

button {
  cursor: pointer;
  background: linear-gradient(180deg, #0e5a70, #0a3d4e);
  transition: border-color 0.15s, transform 0.1s;
}

button:hover {
  border-color: var(--cyan);
}

button:active {
  transform: scale(0.98);
}

button.primary {
  background: linear-gradient(180deg, #1280a0, #0b5a72);
  border-color: rgba(61, 224, 255, 0.4);
}

.legend {
  display: grid;
  gap: 6px;
  font-size: 0.8rem;
}

.legend-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 8px currentColor;
}

.dot.excellent { background: #1affc0; color: #1affc0; }
.dot.good { background: var(--good); color: var(--good); }
.dot.fair { background: var(--fair); color: var(--fair); }
.dot.poor { background: var(--poor); color: var(--poor); }
.dot.bad { background: var(--bad); color: var(--bad); }

.list-wrap {
  /* Beach list scrolls with the whole left panel (no nested scrollbar) */
  flex: 0 0 auto;
  min-height: 0;
  overflow: visible;
  padding: 8px 10px 24px;
}

.point-card {
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.point-card:hover,
.point-card.active {
  border-color: var(--cyan);
  background: rgba(61, 224, 255, 0.08);
}

.point-card .top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: flex-start;
}

.point-card h3 {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 600;
}

.point-card .meta {
  margin: 2px 0 0;
  font-size: 0.75rem;
  color: var(--muted);
}

.badge {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 3px 7px;
  border-radius: 999px;
  white-space: nowrap;
}

.badge.excellent { background: rgba(26, 255, 192, 0.2); color: #1affc0; }
.badge.good { background: rgba(46, 229, 157, 0.2); color: var(--good); }
.badge.fair { background: rgba(230, 200, 74, 0.2); color: var(--fair); }
.badge.poor { background: rgba(240, 138, 75, 0.2); color: var(--poor); }
.badge.bad { background: rgba(240, 82, 82, 0.2); color: var(--bad); }

.score-num {
  font-variant-numeric: tabular-nums;
  color: var(--gold);
  font-weight: 700;
  font-size: 0.85rem;
}

.map-shell {
  position: relative;
  min-height: 0;
}

#map {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: transparent;
}

/* Soft ocean wash around land — map tiles still show imagery on land */
.map-ocean-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    radial-gradient(ellipse 90% 70% at 50% 55%, transparent 35%, rgba(2, 30, 45, 0.15) 70%, rgba(2, 16, 24, 0.35) 100%);
  mix-blend-mode: soft-light;
  opacity: 0.85;
}

/* Animated wave shimmer over water areas (subtle global) */
.map-shimmer {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0.12;
  background:
    repeating-linear-gradient(
      105deg,
      transparent 0 40px,
      rgba(61, 224, 255, 0.35) 40px 42px,
      transparent 42px 90px
    );
  animation: shimmer 22s linear infinite;
  mix-blend-mode: screen;
}

@keyframes shimmer {
  from { transform: translateX(-80px); }
  to { transform: translateX(80px); }
}

.detail-drawer {
  position: absolute;
  right: 16px;
  bottom: 16px;
  top: auto;
  width: min(420px, calc(100% - 32px));
  /* Tall enough for metrics + 7-day strip; always scroll if content overflows */
  max-height: min(88vh, 900px);
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  z-index: 5;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
  padding: 16px 16px 28px;
  transform: translateY(120%);
  opacity: 0;
  transition: transform 0.28s ease, opacity 0.28s ease;
  pointer-events: none;
}

.drawer-section {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.drawer-h {
  margin: 0 0 8px;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--cyan-dim);
  font-weight: 700;
}

.forecast-loading {
  font-size: 0.82rem;
  color: var(--muted);
  padding: 6px 0;
}

.forecast-note {
  margin: 0 0 8px;
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.35;
}

/* Moon phase panel */
.moon-now {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 10px;
}

.moon-emoji {
  font-size: 2rem;
  line-height: 1;
  filter: drop-shadow(0 0 8px rgba(240, 193, 75, 0.45));
}

.moon-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text);
}

.moon-tip {
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.35;
  margin-top: 2px;
}

.moon-tip.prime {
  color: var(--good);
  font-weight: 600;
}

.moon-calendar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.moon-day {
  text-align: center;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 2px;
  font-size: 0.62rem;
  color: var(--muted);
}

.moon-day.spring {
  border-color: rgba(240, 193, 75, 0.55);
  background: rgba(240, 193, 75, 0.12);
  color: var(--gold);
}

.moon-day .me {
  display: block;
  font-size: 0.95rem;
  line-height: 1.1;
}

.moon-day .md {
  font-weight: 600;
  color: #c5e0eb;
}

.detail-moon {
  font-size: 0.85rem;
  color: #c5e0eb;
  line-height: 1.4;
  padding: 8px 10px;
  background: rgba(0, 0, 0, 0.28);
  border-radius: 8px;
  border: 1px solid var(--border);
}

.detail-moon.prime {
  border-color: rgba(46, 229, 157, 0.45);
  background: rgba(46, 229, 157, 0.08);
}

.mini-forecast {
  display: grid;
  grid-template-columns: repeat(7, minmax(48px, 1fr));
  gap: 4px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.mini-day {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 4px;
  text-align: center;
  min-width: 48px;
  border-top: 3px solid var(--fair);
}

.mini-day.excellent { border-top-color: #1affc0; }
.mini-day.good { border-top-color: var(--good); }
.mini-day.fair { border-top-color: var(--fair); }
.mini-day.poor { border-top-color: var(--poor); }
.mini-day.bad { border-top-color: var(--bad); }

.mini-day .d {
  font-size: 0.65rem;
  font-weight: 700;
  color: #c5e0eb;
  margin-bottom: 2px;
}

.mini-day .wx {
  font-size: 0.58rem;
  color: var(--muted);
  line-height: 1.2;
  min-height: 1.8em;
  margin-bottom: 3px;
}

.mini-day .t {
  font-size: 0.72rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.mini-day .meta {
  font-size: 0.58rem;
  color: var(--muted);
  margin-top: 2px;
  line-height: 1.25;
}

.mini-day .sc {
  margin-top: 4px;
  font-size: 0.6rem;
  font-weight: 800;
  color: var(--gold);
}

.tide-station {
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  color: var(--muted);
  font-size: 0.7rem;
}

.tide-chart-wrap {
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 8px 6px;
}

.tide-chart {
  width: 100%;
  height: 110px;
  display: block;
}

.tide-empty {
  margin: 0;
  padding: 12px 6px;
  font-size: 0.8rem;
  color: var(--muted);
}

.tide-legend {
  display: flex;
  justify-content: space-between;
  font-size: 0.65rem;
  color: var(--muted);
  margin-top: 2px;
  padding: 0 2px;
}

.tide-daily {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
  gap: 4px;
  margin-top: 8px;
}

.tide-day-chip {
  font-size: 0.62rem;
  background: rgba(61, 224, 255, 0.06);
  border-radius: 6px;
  padding: 4px 5px;
  color: #c5e0eb;
  line-height: 1.3;
}

.tide-day-chip b {
  display: block;
  color: var(--cyan);
  font-size: 0.65rem;
}

.detail-drawer.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.detail-drawer .close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 8px;
}

.detail-drawer h2 {
  margin: 0 28px 4px 0;
  font-size: 1.15rem;
}

.detail-drawer .sub {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.85rem;
}

.metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}

.metric {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  padding: 8px 10px;
}

.metric .k {
  display: block;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.metric .v {
  font-size: 0.95rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.reasons {
  margin: 0;
  padding-left: 18px;
  font-size: 0.84rem;
  line-height: 1.45;
  color: #c5e0eb;
}

.reasons li {
  margin-bottom: 6px;
}

.status-bar {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 4;
  background: rgba(4, 20, 32, 0.85);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 0.75rem;
  color: var(--muted);
  backdrop-filter: blur(8px);
}

.status-bar.error {
  color: var(--bad);
  border-color: rgba(240, 82, 82, 0.4);
}

/* Leaflet marker pins */
.bd-marker {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 12px currentColor, 0 2px 6px rgba(0, 0, 0, 0.5);
}

.bd-marker.pulse {
  animation: pulse 2s ease-out infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 currentColor, 0 2px 6px rgba(0, 0, 0, 0.5); }
  70% { box-shadow: 0 0 0 14px transparent, 0 2px 6px rgba(0, 0, 0, 0.5); }
  100% { box-shadow: 0 0 0 0 transparent, 0 2px 6px rgba(0, 0, 0, 0.5); }
}

.leaflet-popup-content-wrapper {
  background: var(--bg-panel-solid);
  color: var(--text);
  border-radius: 10px;
  border: 1px solid var(--border);
}

.leaflet-popup-tip {
  background: var(--bg-panel-solid);
}

.leaflet-popup-content {
  margin: 10px 12px;
  font-size: 0.85rem;
}

.leaflet-control-attribution {
  background: rgba(4, 20, 32, 0.75) !important;
  color: var(--muted) !important;
  font-size: 10px !important;
}

.leaflet-control-attribution a {
  color: var(--cyan-dim) !important;
}

.loading-overlay {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: grid;
  place-items: center;
  background: rgba(2, 16, 24, 0.55);
  backdrop-filter: blur(4px);
  transition: opacity 0.3s;
}

.loading-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.spinner {
  width: 48px;
  height: 48px;
  border: 3px solid rgba(61, 224, 255, 0.2);
  border-top-color: var(--cyan);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-overlay p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.loading-box {
  text-align: center;
}

.forecast-cta {
  display: inline-block;
  margin-top: 8px;
  padding: 10px 14px;
  background: linear-gradient(180deg, #1280a0, #0b5a72);
  border: 1px solid rgba(61, 224, 255, 0.45);
  border-radius: 10px;
  color: #fff !important;
  font-weight: 700;
  text-decoration: none;
  font-size: 0.9rem;
}

.forecast-cta:hover {
  border-color: var(--cyan);
}

.bd-cluster {
  background: transparent !important;
  border: none !important;
}

/* Tropical cyclone markers */
.storm-marker {
  background: transparent !important;
  border: none !important;
}

.storm-pin {
  position: relative;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(255,255,255,0.35), var(--storm, #f05252));
  border: 2px solid #fff;
  box-shadow: 0 0 0 2px var(--storm, #f05252), 0 4px 14px rgba(0,0,0,0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: storm-pulse 2.4s ease-out infinite;
}

.storm-pin .storm-sym {
  font-size: 16px;
  line-height: 1;
  filter: drop-shadow(0 1px 1px rgba(0,0,0,0.5));
}

.storm-pin .storm-tag {
  position: absolute;
  top: -8px;
  right: -10px;
  background: #021018;
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  padding: 1px 4px;
  border-radius: 4px;
  border: 1px solid var(--storm, #f05252);
}

.storm-pin .storm-name {
  position: absolute;
  left: 50%;
  bottom: -16px;
  transform: translateX(-50%);
  white-space: nowrap;
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 3px #000, 0 0 6px #000;
  pointer-events: none;
}

.storm-hurricane {
  animation-duration: 1.6s;
}

@keyframes storm-pulse {
  0% { box-shadow: 0 0 0 0 var(--storm), 0 4px 14px rgba(0,0,0,0.55); }
  70% { box-shadow: 0 0 0 12px transparent, 0 4px 14px rgba(0,0,0,0.55); }
  100% { box-shadow: 0 0 0 0 transparent, 0 4px 14px rgba(0,0,0,0.55); }
}

.storm-list {
  /* Let the main left scrollbar handle long lists */
  max-height: none;
  overflow: visible;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.storm-empty {
  margin: 0;
  font-size: 0.78rem;
  color: var(--muted);
}

.storm-card {
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
  transition: border-color 0.15s;
}

.storm-card:hover {
  border-color: var(--gold);
}

.storm-card-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
}

.storm-badge {
  font-size: 0.65rem;
  font-weight: 800;
  color: #fff;
  padding: 2px 6px;
  border-radius: 4px;
}

.storm-card-meta {
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.35;
}

/* Shipwreck markers */
.wreck-marker {
  background: transparent !important;
  border: none !important;
}

.wreck-pin {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(145deg, #3a2a12, #1a1208);
  border: 2px solid #f0c14b;
  box-shadow: 0 0 10px rgba(240, 193, 75, 0.55), 0 2px 8px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  line-height: 1;
}

.wreck-legend {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #1a1208;
  border: 1px solid #f0c14b;
  font-size: 11px;
}

.wreck-card {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(240, 193, 75, 0.25);
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
  transition: border-color 0.15s;
}

.wreck-card:hover {
  border-color: var(--gold);
}

.wreck-card-top {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 2px;
}

.wreck-card-top strong {
  font-size: 0.82rem;
  line-height: 1.25;
}

.wreck-badge {
  flex-shrink: 0;
}

.wreck-link {
  display: inline-block;
  margin-top: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--gold);
  text-decoration: none;
}

.wreck-link:hover {
  text-decoration: underline;
}

.leaflet-marker-icon.bd-cluster {
  margin-left: -20px !important;
  margin-top: -20px !important;
}

@media (max-width: 860px) {
  .app {
    grid-template-columns: 1fr;
    grid-template-rows: auto 38vh 1fr;
  }

  aside {
    border-right: none;
    border-bottom: 1px solid var(--border);
    max-height: 38vh;
    overflow: hidden;
  }

  .aside-scroll {
    max-height: 100%;
  }

  header {
    padding: 8px 12px;
    flex-wrap: wrap;
  }

  .header-stats {
    display: none;
  }

  .header-home {
    font-size: 0.8rem;
  }

  .map-logo {
    height: 72px;
  }

  .detail-drawer {
    left: 12px;
    right: 12px;
    width: auto;
    bottom: 12px;
    top: auto;
    max-height: min(70vh, 640px);
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 24px;
  }
}
