:root {
  --sea-deep: #041521;
  --sea: #0f3142;
  --sea-soft: #1f6170;
  --sand: #f1c985;
  --foam: rgba(238, 247, 250, 0.92);
  --panel: rgba(7, 21, 33, 0.78);
  --panel-strong: rgba(5, 17, 28, 0.9);
  --panel-soft: rgba(13, 31, 46, 0.7);
  --panel-border: rgba(116, 188, 204, 0.18);
  --text-main: #eef8fb;
  --text-soft: rgba(201, 224, 231, 0.72);
  --low: #4fc77e;
  --medium: #f0ba51;
  --high: #ec6f5e;
  --shadow: 0 26px 80px rgba(2, 8, 14, 0.42);
  --hud-scroll-track: rgba(8, 25, 38, 0.44);
  --hud-scroll-thumb: rgba(131, 211, 224, 0.4);
  --hud-scroll-thumb-hover: rgba(131, 211, 224, 0.58);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Space Grotesk", sans-serif;
  color: var(--text-main);
  background: linear-gradient(160deg, #03111b, #0c2330);
}

button,
input,
select,
textarea {
  font: inherit;
}

.map-app {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  background:
    radial-gradient(circle at 14% 18%, rgba(61, 131, 149, 0.18), transparent 20%),
    radial-gradient(circle at 82% 14%, rgba(240, 185, 95, 0.12), transparent 22%),
    linear-gradient(180deg, #06131d 0%, #0e2230 100%);
}

.full-map {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.leaflet-container,
.leaflet-grab,
.leaflet-dragging .leaflet-grab,
.leaflet-dragging .leaflet-container {
  cursor: auto !important;
}

.leaflet-container .leaflet-marker-icon,
.leaflet-container .leaflet-interactive,
.leaflet-container .leaflet-pane img {
  cursor: auto !important;
}

.leaflet-tile-pane {
  transition: filter 220ms ease;
}

body[data-map-style="satellite"] .leaflet-tile-pane {
  filter: none;
}

body[data-map-style="street"] .leaflet-tile-pane,
body[data-map-style="terrain"] .leaflet-tile-pane {
  filter: brightness(0.96) saturate(0.9) contrast(0.96);
}

body[data-hud-theme="light"] {
  --panel: rgba(248, 252, 255, 0.6);
  --panel-border: rgba(69, 118, 132, 0.16);
  --text-main: #153746;
  --text-soft: rgba(39, 73, 86, 0.7);
  --shadow: 0 26px 80px rgba(15, 49, 66, 0.16);
  --hud-scroll-track: rgba(189, 220, 231, 0.48);
  --hud-scroll-thumb: rgba(69, 118, 132, 0.42);
  --hud-scroll-thumb-hover: rgba(69, 118, 132, 0.62);
}

body[data-hud-theme="light"] .floating-panel {
  backdrop-filter: blur(26px) saturate(155%);
  -webkit-backdrop-filter: blur(26px) saturate(155%);
}

body[data-hud-theme="light"] .top-panel,
body[data-hud-theme="light"] .legend-panel,
body[data-hud-theme="light"] .beaches-panel {
  background: linear-gradient(180deg, rgba(248, 252, 255, 0.66), rgba(232, 242, 247, 0.46));
}

body[data-hud-theme="light"] .mini-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.68), rgba(234, 243, 247, 0.48));
  border-color: rgba(69, 118, 132, 0.12);
}

body[data-hud-theme="light"] .mini-card.summary-tone-green {
  background: linear-gradient(180deg, rgba(218, 246, 228, 0.9), rgba(196, 234, 209, 0.76));
  border-color: rgba(68, 153, 100, 0.28);
}

body[data-hud-theme="light"] .mini-card.summary-tone-yellow-soft {
  background: linear-gradient(180deg, rgba(248, 243, 213, 0.9), rgba(242, 233, 190, 0.78));
  border-color: rgba(176, 152, 48, 0.28);
}

body[data-hud-theme="light"] .mini-card.summary-tone-yellow {
  background: linear-gradient(180deg, rgba(251, 236, 208, 0.92), rgba(244, 220, 172, 0.8));
  border-color: rgba(191, 136, 44, 0.28);
}

body[data-hud-theme="light"] .mini-card.summary-tone-orange {
  background: linear-gradient(180deg, rgba(252, 226, 205, 0.92), rgba(245, 201, 169, 0.8));
  border-color: rgba(197, 102, 48, 0.28);
}

body[data-hud-theme="light"] .mini-card.summary-tone-red {
  background: linear-gradient(180deg, rgba(251, 215, 214, 0.92), rgba(244, 183, 181, 0.8));
  border-color: rgba(176, 68, 66, 0.28);
}

body[data-hud-theme="light"] .mini-card.summary-tone-purple {
  background: linear-gradient(180deg, rgba(236, 224, 251, 0.92), rgba(217, 196, 245, 0.8));
  border-color: rgba(118, 76, 182, 0.28);
}

body[data-hud-theme="light"] .mini-card strong,
body[data-hud-theme="light"] .popup-header strong {
  color: #143543;
}

body[data-hud-theme="light"] .card-label,
body[data-hud-theme="light"] .section-kicker {
  color: #2d7d8f;
}

body[data-hud-theme="light"] .search-input {
  border-color: rgba(69, 118, 132, 0.14);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(239, 247, 250, 0.72));
  color: #153746;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    0 14px 36px rgba(42, 82, 96, 0.12);
}

body[data-hud-theme="light"] .search-location-button {
  background: rgba(222, 238, 243, 0.96);
  color: #184050;
  border-color: rgba(69, 118, 132, 0.12);
  box-shadow: 0 10px 24px rgba(42, 82, 96, 0.1);
}

body[data-hud-theme="light"] .language-select,
body[data-hud-theme="light"] .language-menu-code,
body[data-hud-theme="light"] .language-picker-label {
  color: #184050;
}

body[data-hud-theme="light"] .language-select,
body[data-hud-theme="light"] .language-menu-button {
  background: rgba(248, 252, 255, 0.86);
  border-color: rgba(69, 118, 132, 0.14);
}

body[data-hud-theme="light"] .language-menu-list {
  background: rgba(247, 251, 253, 0.92);
  border-color: rgba(69, 118, 132, 0.12);
}

body[data-hud-theme="light"] .language-menu-option {
  background: rgba(225, 239, 244, 0.8);
  color: #153746;
}

body[data-hud-theme="light"] .language-menu-option:hover {
  border-color: rgba(69, 118, 132, 0.22);
  background: rgba(208, 231, 238, 0.94);
}

body[data-hud-theme="light"] .search-location-button:hover {
  background: rgba(207, 230, 237, 0.98);
}

body[data-hud-theme="light"] .search-leading-icon {
  color: rgba(39, 73, 86, 0.48);
}

body[data-hud-theme="light"] .search-input::placeholder {
  color: rgba(39, 73, 86, 0.42);
}

body[data-hud-theme="light"] .search-input:focus {
  border-color: rgba(69, 118, 132, 0.24);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(242, 248, 251, 0.82));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.65),
    0 0 0 4px rgba(79, 167, 186, 0.12),
    0 18px 40px rgba(42, 82, 96, 0.15);
}

body[data-hud-theme="light"] .search-results {
  background: rgba(247, 251, 253, 0.82);
  border-color: rgba(69, 118, 132, 0.12);
  box-shadow: 0 24px 50px rgba(42, 82, 96, 0.14);
}

body[data-hud-theme="light"] .search-result {
  background: rgba(225, 239, 244, 0.8);
  color: #153746;
}

body[data-hud-theme="light"] .search-result:hover,
body[data-hud-theme="light"] .search-result.is-selected {
  border-color: rgba(69, 118, 132, 0.22);
  background: rgba(208, 231, 238, 0.94);
}

body[data-hud-theme="light"] #reset-view,
body[data-hud-theme="light"] .map-style-button {
  border-color: rgba(69, 118, 132, 0.12);
  background: linear-gradient(135deg, rgba(236, 245, 248, 0.95), rgba(221, 234, 239, 0.95));
  color: #143543;
}

body[data-hud-theme="light"] #reset-view:hover,
body[data-hud-theme="light"] .map-style-button:hover {
  border-color: rgba(69, 118, 132, 0.2);
  box-shadow: 0 12px 28px rgba(42, 82, 96, 0.12);
}

body[data-hud-theme="light"] .map-style-button.is-active {
  background: linear-gradient(135deg, #f1c985, #d89541);
  color: #24160a;
}

body[data-hud-theme="light"] .legend-table td,
body[data-hud-theme="light"] .species-row {
  color: rgba(21, 55, 70, 0.88);
}

body[data-hud-theme="light"] .beach-item {
  border-color: rgba(69, 118, 132, 0.1);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.68), rgba(233, 243, 247, 0.5));
  color: #153746;
}

body[data-hud-theme="light"] .detected-species-item {
  border-color: rgba(69, 118, 132, 0.1);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.68), rgba(233, 243, 247, 0.5));
  color: #153746;
}

body[data-hud-theme="light"] .beach-item:hover,
body[data-hud-theme="light"] .beach-item.is-active {
  border-color: rgba(69, 118, 132, 0.2);
  background: linear-gradient(180deg, rgba(244, 250, 252, 0.82), rgba(226, 239, 244, 0.64));
}

body[data-hud-theme="light"] .detected-species-item:hover {
  border-color: rgba(69, 118, 132, 0.2);
  background: linear-gradient(180deg, rgba(244, 250, 252, 0.82), rgba(226, 239, 244, 0.64));
}

body[data-hud-theme="light"] .leaflet-control-zoom a {
  background: rgba(248, 252, 255, 0.92);
  color: #153746;
  border-bottom-color: rgba(69, 118, 132, 0.08);
  box-shadow: 0 14px 30px rgba(42, 82, 96, 0.12);
}

body[data-hud-theme="light"] .leaflet-popup-content-wrapper,
body[data-hud-theme="light"] .leaflet-popup-tip {
  background: rgba(248, 252, 255, 0.95);
  color: #153746;
}

body[data-hud-theme="light"] .popup-copy {
  color: rgba(39, 73, 86, 0.78);
}

body[data-hud-theme="light"] .popup-photo {
  background: rgba(226, 238, 243, 0.82);
}

body[data-hud-theme="light"] .beach-thumb {
  background: rgba(226, 238, 243, 0.82);
}

body[data-hud-theme="light"] .brand-logo {
  background: rgba(247, 251, 253, 0.72);
  border-color: rgba(69, 118, 132, 0.18);
  box-shadow: 0 10px 24px rgba(42, 82, 96, 0.16);
}

body[data-hud-theme="light"] .species-title {
  color: #2d7d8f;
}

body[data-hud-theme="light"] .species-value {
  color: #af6e1b;
}

body[data-hud-theme="dark"] .leaflet-tile-pane {
  filter: brightness(0.9) saturate(0.72) contrast(0.9) sepia(0.08);
}

.floating-panel {
  position: absolute;
  z-index: 400;
  backdrop-filter: blur(28px) saturate(145%);
  -webkit-backdrop-filter: blur(28px) saturate(145%);
  background: var(--panel);
  border: 1px solid var(--panel-border);
  box-shadow: var(--shadow);
}

.floating-panel[hidden] {
  display: none !important;
}

.panel-visibility-toggle {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid rgba(131, 211, 224, 0.22);
  background: rgba(10, 29, 42, 0.82);
  color: #eef8fb;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  z-index: 3;
}

.panel-visibility-toggle i {
  font-size: 0.88rem;
}

.panel-dock {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 650;
  display: grid;
  gap: 8px;
}

.panel-dock-button {
  border: 1px solid rgba(131, 211, 224, 0.18);
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(7, 21, 33, 0.78);
  color: var(--text-main);
  font-size: 0.78rem;
  cursor: pointer;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.panel-dock-button.is-flashing {
  animation: panelDockFlash 1.2s ease-in-out 0s 2;
}

@keyframes panelDockFlash {
  0% {
    opacity: 1;
    transform: scale(1);
    background: rgba(7, 21, 33, 0.78);
    border-color: rgba(131, 211, 224, 0.18);
    box-shadow: 0 0 0 0 rgba(255, 214, 92, 0);
  }
  50% {
    opacity: 1;
    transform: scale(1.01);
    background: linear-gradient(180deg, rgba(82, 63, 12, 0.94), rgba(43, 34, 7, 0.9));
    border-color: rgba(255, 222, 120, 0.72);
    box-shadow:
      0 0 0 6px rgba(255, 214, 92, 0.16),
      0 0 24px rgba(255, 214, 92, 0.42),
      0 0 48px rgba(255, 214, 92, 0.18);
  }
  100% {
    opacity: 1;
    transform: scale(1);
    background: rgba(7, 21, 33, 0.78);
    border-color: rgba(131, 211, 224, 0.18);
    box-shadow: 0 0 0 0 rgba(255, 214, 92, 0);
  }
}

body[data-hud-theme="light"] .panel-visibility-toggle {
  background: rgba(248, 252, 255, 0.92);
  border-color: rgba(69, 118, 132, 0.18);
  color: #153746;
}

body[data-hud-theme="light"] .panel-dock-button {
  background: rgba(248, 252, 255, 0.84);
  border-color: rgba(69, 118, 132, 0.16);
  color: #153746;
}

body[data-hud-theme="light"] .panel-dock-button.is-flashing {
  animation: panelDockFlashLight 1.2s ease-in-out 0s 2;
}

@keyframes panelDockFlashLight {
  0% {
    opacity: 1;
    transform: scale(1);
    background: rgba(248, 252, 255, 0.84);
    border-color: rgba(69, 118, 132, 0.16);
    box-shadow: 0 0 0 0 rgba(245, 196, 67, 0);
  }
  50% {
    opacity: 1;
    transform: scale(1.01);
    background: linear-gradient(180deg, rgba(255, 236, 176, 0.96), rgba(252, 222, 128, 0.92));
    border-color: rgba(226, 176, 49, 0.72);
    box-shadow:
      0 0 0 6px rgba(245, 196, 67, 0.14),
      0 0 22px rgba(245, 196, 67, 0.28),
      0 0 42px rgba(245, 196, 67, 0.14);
  }
  100% {
    opacity: 1;
    transform: scale(1);
    background: rgba(248, 252, 255, 0.84);
    border-color: rgba(69, 118, 132, 0.16);
    box-shadow: 0 0 0 0 rgba(245, 196, 67, 0);
  }
}

.top-panel {
  top: 10vh;
  left: 50%;
  transform: translateX(-50%);
  width: min(452px, calc(100vw - 180px));
  padding: 12px 14px;
  border-radius: 26px;
  display: block;
  background:
    linear-gradient(180deg, rgba(11, 31, 46, 0.6), rgba(7, 21, 33, 0.42));
}

.status-panel {
  top: 20px;
  right: 20px;
  width: 220px;
  display: grid;
  gap: 10px;
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.mobile-status-panel {
  display: none;
}

.detected-species-panel {
  z-index: 401;
  top: 20px;
  right: calc(20px + 236px);
  min-width: 320px;
  width: auto;
  height: 94vh;
  max-height: 94vh;
  padding: 14px;
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background:
    linear-gradient(180deg, rgba(8, 24, 38, 0.58), rgba(5, 17, 28, 0.42));
}

.legend-panel {
  left: 20px;
  bottom: 20px;
  width: min(340px, calc(100vw - 40px));
  padding: 20px;
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(8, 24, 38, 0.58), rgba(5, 17, 28, 0.42));
}

.beaches-panel {
  top: auto;
  right: 20px;
  bottom: 20px;
  height: 84vh;
  width: min(400px, calc(100vw - 40px));
  padding: 20px;
  border-radius: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background:
    linear-gradient(180deg, rgba(8, 24, 38, 0.58), rgba(5, 17, 28, 0.42));
}

.beaches-panel.is-collapsed {
  width: min(260px, calc(100vw - 40px));
  height: auto;
  min-height: 52px;
  max-height: none;
  padding: 12px 14px 10px;
  gap: 6px;
  cursor: pointer;
  justify-content: center;
  align-items: center;
}

.beaches-panel.is-collapsed .beach-list {
  display: none;
}

.beaches-panel.is-collapsed .panel-heading {
  display: flex;
  align-items: center;
  margin: 0 34px 0 0;
  align-self: center;
  min-height: 100%;
}

.beaches-panel.is-collapsed .panel-heading > div {
  display: flex;
  align-items: center;
}

.beaches-panel.is-collapsed #beaches-title {
  display: none;
}

.beaches-panel.is-collapsed .section-kicker {
  display: flex;
  align-items: center;
  font-size: 0.92rem;
  letter-spacing: 0.08em;
  line-height: 1.2;
  white-space: normal;
}

.beaches-panel.is-collapsed .panel-visibility-toggle {
  top: 10px;
  right: 10px;
}

.beaches-panel.is-collapsed .panel-visibility-toggle i {
  transform: rotate(180deg);
}

.animals-lab-panel {
  left: 372px;
  bottom: 20px;
  width: 214px;
  max-height: 96px;
  padding: 12px;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: linear-gradient(180deg, rgba(8, 24, 38, 0.58), rgba(5, 17, 28, 0.42));
}

.animals-lab-panel h2 {
  margin: 0;
  font-size: 0.94rem;
}

.animal-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 9px;
  border-radius: 10px;
  border: 1px solid rgba(131, 211, 224, 0.14);
  background: rgba(14, 35, 50, 0.48);
  cursor: pointer;
  user-select: none;
}

.animal-row input {
  accent-color: #83d3e0;
}

.animal-row span {
  font-size: 0.85rem;
}

.animal-buttons-strip {
  position: absolute;
  z-index: 410;
  left: calc(20px + min(340px, calc(100vw - 40px)) + 22px);
  bottom: 20px;
  display: flex;
  flex-direction: row;
  align-items: center;
  flex-wrap: nowrap;
  overflow-x: auto;
  max-width: min(520px, calc(100vw - 396px));
  gap: 8px;
  padding: 2px 2px 4px;
}

.animal-buttons-strip-mobile {
  display: none;
}

.animal-chip {
  --chip-color: #83d3e0;
  width: 46px;
  height: 46px;
  border-radius: 999px;
  border: 1px solid rgba(131, 211, 224, 0.24);
  background: rgba(8, 24, 38, 0.64);

  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, opacity 180ms ease;
}

.animal-chip img {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  object-fit: cover;
  filter: brightness(0) invert(1);
}

.animal-chip:hover {
  transform: translateY(-1px);

}

.animal-chip.is-active {
  border-color: color-mix(in srgb, var(--chip-color) 82%, #ffffff 18%);
  background: color-mix(in srgb, var(--chip-color) 36%, rgba(8, 24, 38, 0.64));

}

.animal-chip.is-active:hover {
  border-color: color-mix(in srgb, var(--chip-color) 82%, #ffffff 18%);
  background: color-mix(in srgb, var(--chip-color) 36%, rgba(8, 24, 38, 0.64));

}

body[data-hud-theme="light"] .animal-row {
  border-color: rgba(69, 118, 132, 0.12);
  background: rgba(236, 246, 250, 0.75);
  color: #153746;
}

body[data-hud-theme="light"] .animal-master {
  border-color: rgba(69, 118, 132, 0.2);
  background: rgba(226, 240, 246, 0.92);
}

body[data-hud-theme="light"] .animal-chip {
  border-color: rgba(69, 118, 132, 0.2);
  background: rgba(246, 251, 253, 0.88);

}

body[data-hud-theme="light"] .animal-chip.is-active {
  border-color: color-mix(in srgb, var(--chip-color) 80%, #ffffff 20%);
  background: color-mix(in srgb, var(--chip-color) 26%, rgba(246, 251, 253, 0.88));
  box-shadow:
    0 10px 22px rgba(42, 82, 96, 0.2),
    0 0 0 2px color-mix(in srgb, var(--chip-color) 24%, transparent);
}

body[data-hud-theme="light"] .animal-chip.is-active:hover {
  border-color: color-mix(in srgb, var(--chip-color) 80%, #ffffff 20%);
  background: color-mix(in srgb, var(--chip-color) 26%, rgba(246, 251, 253, 0.88));
  box-shadow:
    0 10px 22px rgba(42, 82, 96, 0.2),
    0 0 0 2px color-mix(in srgb, var(--chip-color) 24%, transparent);
}

.animal-master {
  border-color: rgba(131, 211, 224, 0.24);
  background: rgba(18, 43, 60, 0.55);
}

.animal-marker-wrap {
  pointer-events: auto;
  background: transparent;
  border: 0;
}

.animal-marker {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(255, 255, 255, 0.65);
  box-shadow: none;
  background: color-mix(in srgb, var(--animal-color) 56%, rgba(5, 17, 28, 0.44));
  font-size: 0.9rem;
  line-height: 1;
}

.animal-marker img {
  width: 18px;
  height: 18px;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.legend-panel h2,
.detected-species-panel h2,
.beaches-panel h2,
p {
  margin-top: 0;
}

.eyebrow,
.section-kicker,
.card-label {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 1.25rem;
  color: #83d3e0;
  font-weight: 700;
}

.brand-block {
  max-width: none;
  text-align: left;
}

.brand-head {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 0 auto 8px;
}

.brand-logo {
  display: block;
  width: 72px;
  height: 72px;
  margin: 0;
}

.brand-logo lottie-player {
  display: block;
  width: 100%;
  height: 100%;
}

.brand-logo dotlottie-player {
  display: block;
  width: 100%;
  height: 100%;
  filter: saturate(0.82);
}

.brand-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.eyebrow {
  color: #f7d08b;
  text-shadow: 0 0 18px rgba(247, 208, 139, 0.18);
  line-height: 1.2;
}

.app-tagline {
  margin: 0;
  color: var(--text-soft);
  font-size: 1.05rem;
  margin-top: 4px;
  line-height: 1.25;
  text-align: center;
  display: inline-block;
  transform-origin: left center;
  animation: taglineWave 4.8s ease-in-out infinite;
}

@keyframes taglineWave {
  0%,
  100% {
    transform: translateX(0) rotate(0deg);
  }
  20% {
    transform: translateX(1px) rotate(-0.5deg);
  }
  40% {
    transform: translateX(-1px) rotate(0.6deg);
  }
  60% {
    transform: translateX(1px) rotate(-0.35deg);
  }
  80% {
    transform: translateX(-0.5px) rotate(0.3deg);
  }
}

.legend-note,
.beach-meta,
.mini-card span {
  color: var(--text-soft);
  line-height: 1.55;
}

.search-shell {
  position: relative;
  margin-top: 2px;
  max-width: 460px;
  margin-left: auto;
  margin-right: auto;
}

.search-toolbar {
  position: fixed;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 520;
  display: flex;
  justify-content: center;
  margin-bottom: 0;
}

.legacy-toolbar {
  display: none !important;
}

.language-picker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  position: relative;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(10, 29, 42, 0.56);
  border: 1px solid rgba(131, 211, 224, 0.14);
}

.language-picker-label {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(201, 224, 231, 0.8);
  font-weight: 700;
}

.language-selected-flag {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid rgba(131, 211, 224, 0.24);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.18);
  flex: 0 0 22px;
}

.language-selected-flag img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.language-menu-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(131, 211, 224, 0.16);
  border-radius: 999px;
  background: rgba(15, 40, 56, 0.88);
  color: var(--text-main);
  padding: 6px 10px;
  min-width: 84px;
  outline: none;
  cursor: pointer;
}

.language-menu-code {
  font-weight: 700;
  letter-spacing: 0.04em;
}

.language-menu-list {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  display: none;
  width: 120px;
  padding: 8px;
  border-radius: 14px;
  background: rgba(7, 20, 31, 0.92);
  border: 1px solid rgba(131, 211, 224, 0.14);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.32);
  z-index: 30;
}

.language-menu-list.is-open {
  display: grid;
  gap: 6px;
}

.language-menu-option {
  width: 100%;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 6px 8px;
  background: rgba(19, 48, 66, 0.72);
  color: var(--text-main);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  text-align: left;
  font-weight: 600;
}

.language-menu-option:hover {
  border-color: rgba(131, 211, 224, 0.28);
  background: rgba(31, 82, 102, 0.88);
}

.language-menu-option.is-active {
  border-color: rgba(131, 211, 224, 0.28);
  background: rgba(31, 82, 102, 0.88);
}

.language-menu-option img {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  object-fit: cover;
}

.language-select-hidden {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
}

.language-select {
  border: 1px solid rgba(131, 211, 224, 0.16);
  border-radius: 999px;
  background: rgba(15, 40, 56, 0.88);
  color: var(--text-main);
  padding: 6px 10px;
  min-width: 68px;
  outline: none;
  cursor: pointer;
}

.search-box {
  position: relative;
}

.search-leading-icon {
  position: absolute;
  top: 50%;
  left: 16px;
  transform: translateY(-50%);
  color: rgba(196, 221, 230, 0.62);
  pointer-events: none;
  z-index: 2;
}

.search-input {
  width: 100%;
  border: 1px solid rgba(131, 211, 224, 0.18);
  border-radius: 999px;
  padding: 14px 64px 14px 44px;
  background: linear-gradient(180deg, rgba(17, 40, 56, 0.96), rgba(11, 30, 44, 0.92));
  color: var(--text-main);
  outline: none;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 14px 36px rgba(0, 0, 0, 0.22);
}

.search-input::placeholder {
  color: rgba(196, 221, 230, 0.42);
}

.search-input:focus {
  border-color: rgba(131, 211, 224, 0.46);
  background: linear-gradient(180deg, rgba(18, 44, 62, 0.98), rgba(12, 34, 48, 0.96));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 0 0 4px rgba(79, 167, 186, 0.14),
    0 18px 40px rgba(0, 0, 0, 0.3);
}

.search-location-button {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border: 1px solid rgba(131, 211, 224, 0.16);
  border-radius: 50%;
  background: rgba(19, 48, 66, 0.96);
  color: #eef8fb;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0;
  line-height: 1;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.24);
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease, opacity 180ms ease;
}

.search-location-button::before {
  content: "\f3c5";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  font-size: 1rem;
}

.search-location-button:hover {
  transform: translateY(-50%) scale(1.03);
  background: rgba(29, 69, 89, 0.98);
  border-color: rgba(131, 211, 224, 0.28);
}

.search-location-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.search-results {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  display: grid;
  gap: 8px;
  max-height: 320px;
  overflow: auto;
  padding: 8px;
  border-radius: 22px;
  background: rgba(7, 20, 31, 0.74);
  border: 1px solid rgba(131, 211, 224, 0.14);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.4);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.search-results.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.search-results,
.beach-list,
.detected-species-list {
  scrollbar-width: thin;
  scrollbar-color: var(--hud-scroll-thumb) var(--hud-scroll-track);
}

.search-results::-webkit-scrollbar,
.beach-list::-webkit-scrollbar,
.detected-species-list::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

.search-results::-webkit-scrollbar-track,
.beach-list::-webkit-scrollbar-track,
.detected-species-list::-webkit-scrollbar-track {
  background: var(--hud-scroll-track);
  border-radius: 999px;
}

.search-results::-webkit-scrollbar-thumb,
.beach-list::-webkit-scrollbar-thumb,
.detected-species-list::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--hud-scroll-thumb), rgba(0, 0, 0, 0));
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

.search-results::-webkit-scrollbar-thumb:hover,
.beach-list::-webkit-scrollbar-thumb:hover,
.detected-species-list::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--hud-scroll-thumb-hover), var(--hud-scroll-thumb));
}

.search-result {
  width: 100%;
  border: 1px solid transparent;
  border-radius: 16px;
  padding: 12px 14px;
  background: rgba(19, 48, 66, 0.72);
  color: var(--text-main);
  text-align: left;
  cursor: pointer;
}

.search-result:hover,
.search-result.is-selected {
  border-color: rgba(131, 211, 224, 0.28);
  background: rgba(31, 82, 102, 0.88);
}

.search-result-name {
  display: block;
  margin-bottom: 5px;
  font-weight: 700;
}

.search-result-meta {
  color: var(--text-soft);
  font-size: 0.9rem;
}

#beach-count {
  text-align: center;
}

.mini-card {
  padding: 10px 12px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(16, 38, 54, 0.56), rgba(8, 23, 35, 0.4));
  border: 1px solid rgba(131, 211, 224, 0.14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: background 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

.mini-card.summary-tone-green {
  background: linear-gradient(180deg, rgba(41, 126, 78, 0.52), rgba(24, 72, 48, 0.4));
  border-color: rgba(146, 235, 181, 0.32);
}

.mini-card.summary-tone-yellow-soft {
  background: linear-gradient(180deg, rgba(182, 157, 56, 0.5), rgba(99, 84, 25, 0.38));
  border-color: rgba(247, 223, 130, 0.32);
}

.mini-card.summary-tone-yellow {
  background: linear-gradient(180deg, rgba(189, 130, 47, 0.5), rgba(105, 70, 19, 0.38));
  border-color: rgba(246, 194, 118, 0.34);
}

.mini-card.summary-tone-orange {
  background: linear-gradient(180deg, rgba(188, 96, 40, 0.52), rgba(106, 49, 18, 0.4));
  border-color: rgba(246, 171, 118, 0.34);
}

.mini-card.summary-tone-red {
  background: linear-gradient(180deg, rgba(163, 52, 49, 0.54), rgba(91, 27, 26, 0.42));
  border-color: rgba(244, 143, 140, 0.34);
}

.mini-card.summary-tone-purple {
  background: linear-gradient(180deg, rgba(104, 62, 162, 0.56), rgba(55, 30, 90, 0.44));
  border-color: rgba(190, 159, 245, 0.36);
}

.mini-card strong {
  display: block;
  margin-bottom: 4px;
  font-size: 1rem;
  color: #f4fbfd;
}

.mini-card-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: 8px;
}

#reset-view,
.map-style-button {
  width: 100%;
  border: 1px solid rgba(131, 211, 224, 0.14);
  border-radius: 999px;
  padding: 8px 12px;
  background: linear-gradient(135deg, rgba(20, 58, 76, 0.98), rgba(11, 34, 49, 0.98));
  color: #eef8fb;
  cursor: pointer;
  font-weight: 700;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background 180ms ease;
}

#reset-view:hover,
.map-style-button:hover {
  transform: translateY(-1px);
  border-color: rgba(131, 211, 224, 0.26);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
}

.map-style-switcher {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: 8px;
}

.map-style-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  column-gap: 10px;
  width: 90%;
  margin-left: auto;
}

.map-style-switcher [data-map-style],
.map-style-switcher [data-radar-toggle],
.map-style-switcher #hud-theme-toggle {
  width: 42px;
  height: 42px;
  min-width: 42px;
  border-radius: 50%;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.02rem;
}

.map-style-switcher [data-map-style] i,
.map-style-switcher #hud-theme-toggle i {
  font-size: 1rem;
}

.map-style-label {
  min-width: 0;
  color: rgba(236, 248, 251, 0.92);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.15;
}

.map-style-switcher [data-radar-toggle] {
  font-size: 1.05rem;
  line-height: 1;
}

.radar-jelly-icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
  display: block;
  filter: brightness(0) invert(1);
}

.map-style-switcher [data-radar-toggle].is-active .radar-jelly-icon {
  filter: brightness(0) invert(0);
}

.map-style-button.is-active {
  background: linear-gradient(135deg, #f1c985, #d89541);
  color: #24160a;
  border-color: rgba(255, 214, 144, 0.45);
  box-shadow: 0 10px 24px rgba(216, 149, 65, 0.22);
}

#toggle-turtles,
#toggle-temperature {
  display: none !important;
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.panel-heading.compact {
  align-items: flex-end;
}

.legend-list,
.beach-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.legend-table {
  width: 100%;
  border-collapse: collapse;
}

.legend-table td {
  padding: 4px 0;
  vertical-align: middle;
  color: rgba(233, 246, 250, 0.9);
}

.legend-table td:first-child {
  width: 32px;
}

.legend-table td:last-child {
  width: 34px;
  text-align: right;
}

.legend-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
}

.legend-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(255, 250, 240, 0.92);
  box-shadow:
    0 0 0 4px rgba(255, 255, 255, 0.08),
    0 4px 10px rgba(7, 24, 34, 0.22);
}

.legend-dot-yellow-soft {
  background: #9adbe8;
}

.legend-dot-green {
  background: #4ba86c;
}

.legend-dot-yellow {
  background: #f2c94c;
}

.legend-dot-orange {
  background: #ff9f43;
}

.legend-dot-red {
  background: #ff5b5b;
}

.legend-dot-purple {
  background: #9b6bff;
}

#legend-yellow-soft {
  color: #f3d273;
}

#legend-purple {
  color: #c7a6ff;
}

.legend-eye-toggle {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid rgba(131, 211, 224, 0.24);
  background: rgba(10, 29, 42, 0.72);
  color: #eef8fb;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  font-size: 0.78rem;
}

.legend-eye-toggle i {
  font-size: 0.82rem;
}

.legend-eye-toggle.is-hidden {
  opacity: 0.48;
  filter: grayscale(0.3);
}

body[data-hud-theme="light"] .legend-table td {
  color: rgba(21, 55, 70, 0.88);
}

body[data-hud-theme="light"] .legend-eye-toggle {
  background: rgba(248, 252, 255, 0.88);
  border-color: rgba(69, 118, 132, 0.18);
  color: #153746;
}

body[data-hud-theme="light"] .legend-dot {
  border-color: rgba(255, 255, 255, 0.96);
  box-shadow:
    0 0 0 4px rgba(21, 55, 70, 0.08),
    0 5px 10px rgba(21, 55, 70, 0.12);
}

.legend-tortoise-icon {
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(248, 222, 166, 0.32), rgba(241, 201, 133, 0.14));
  border: 1px solid rgba(241, 201, 133, 0.45);
}

.legend-tortoise-icon img {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.legend-fa-icon {
  font-size: 0.92rem;
  line-height: 1;
}

.legend-temp-icon {
  border-radius: 50%;
  background: transparent;
  border: 1px solid #3da3ff;
}

.legend-temp-icon img {
  width: 16px;
  height: 16px;
  object-fit: contain;
}

.legend-safe {
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #baf0c9, #4ba86c 72%);
  border: 2px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 6px 14px rgba(75, 168, 108, 0.2);
}

.legend-safe-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ffffff;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.08);
}

.dot.low {
  background: var(--low);
}

.dot.medium {
  background: var(--medium);
}

.dot.high {
  background: var(--high);
}

.beach-list {
  display: grid;
  gap: 10px;
  overflow: auto;
  padding-right: 4px;
}

.beach-item {
  width: 100%;
  border: 1px solid rgba(131, 211, 224, 0.12);
  border-radius: 18px;
  padding: 14px;
  background: linear-gradient(180deg, rgba(14, 35, 50, 0.56), rgba(9, 24, 36, 0.4));
  color: var(--text-main);
  text-align: left;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.beach-item:hover,
.beach-item.is-active {
  transform: translateY(-2px);
  border-color: rgba(131, 211, 224, 0.3);
  background: linear-gradient(180deg, rgba(19, 48, 66, 0.72), rgba(12, 31, 44, 0.56));
}

.beach-thumb {
  width: 92px;
  height: 72px;
  border-radius: 14px;
  overflow: hidden;
  background: rgba(18, 39, 51, 0.72);
}

.beach-thumb:empty {
  display: none;
}

.beach-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.beach-content {
  min-width: 0;
}

.beach-topline,
.popup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.beach-name,
.popup-header strong {
  font-size: 0.98rem;
  font-weight: 700;
}

.risk-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 76px;
  padding: 8px 12px;
  border-radius: 999px;
  color: white;
  font-size: 0.84rem;
  font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.risk-low {
  background: var(--low);
}

.risk-medium {
  background: var(--medium);
}

.risk-high {
  background: var(--high);
}

.risk-extreme {
  background: linear-gradient(135deg, #9d59ff, #6f34c9);
}

.beach-meta {
  margin: 8px 0 0;
  font-size: 0.92rem;
}

.leaflet-control-zoom a {
  background: rgba(9, 25, 37, 0.94);
  color: #eef8fb;
  border-bottom-color: rgba(131, 211, 224, 0.1);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.28);
}

.wind-flow-line {
  pointer-events: none;
  stroke-linecap: round;
}

.wind-lottie-wrap {
  pointer-events: none !important;
  background: transparent;
  border: 0;
}

.wind-lottie-node {
  position: relative;
  width: 36px;
  height: 36px;
  transform: rotate(var(--wind-rot, 0deg));
  opacity: var(--wind-opacity, 0.4);
  filter: contrast(1.1) brightness(0.2) saturate(0);
}

.wind-lottie-node dotlottie-player {
  display: block;
  width: 100%;
  height: 100%;
}

.wind-lottie-fallback {
  position: absolute;
  inset: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  color: rgba(0, 0, 0, 0.52);
  opacity: 0;
}

.wind-lottie-node dotlottie-player:empty + .wind-lottie-fallback {
  opacity: 1;
}

.wind-lottie-fallback.is-visible {
  opacity: 1;
}

.wind-lottie-node-fallback {
  filter: none;
}

.wind-speed-wrap {
  pointer-events: none !important;
  background: transparent;
  border: 0;
}

.wind-speed-chip {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.1;
  color: rgba(8, 24, 38, 0.92);
  background: rgba(244, 250, 252, 0.78);
  border: 1px solid rgba(116, 188, 204, 0.34);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.jelly-marker-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  margin-left: -21px;
  margin-top: -21px;
}

.turtle-marker-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-left: -20px;
  margin-top: -20px;
}

.turtle-marker {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.3), rgba(5, 17, 28, 0.18));
  border: 2px solid var(--turtle-accent, #f0c14b);
  box-shadow:
    0 8px 20px rgba(0, 0, 0, 0.26),
    0 0 0 4px rgba(255, 255, 255, 0.12);
}

.turtle-marker img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.35));
}

.turtle-potential-wrap {
  pointer-events: auto;
  background: transparent;
  border: 0;
}

.turtle-potential-marker {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(
    circle at 30% 30%,
    color-mix(in srgb, var(--turtle-potential-color) 36%, #ffffff 64%),
    color-mix(in srgb, var(--turtle-potential-color) 60%, rgba(5, 17, 28, 0.4) 40%)
  );
  border: 2px solid color-mix(in srgb, var(--turtle-potential-color) 70%, #ffffff 30%);
  box-shadow:
    0 8px 18px rgba(0, 0, 0, 0.22),
    0 0 0 5px color-mix(in srgb, var(--turtle-potential-color) calc(var(--turtle-potential-opacity) * 100%), transparent);
}

.turtle-potential-marker img {
  width: 20px;
  height: 20px;
  object-fit: contain;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.4));
}

.temp-marker-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  margin-left: -17px;
  margin-top: -17px;
}

.temp-marker {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 2px solid #3da3ff;
  box-shadow:
    0 8px 20px rgba(0, 0, 0, 0.22),
    0 0 0 4px rgba(255, 255, 255, 0.1);
}

.temp-marker img {
  width: 18px;
  height: 18px;
  object-fit: contain;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.35));
}

.temp-overlay-wrap {
  pointer-events: none;
  background: transparent;
  border: 0;
}

.temp-overlay-badge {
  min-width: 54px;
  height: 24px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  color: #081721;
  font-size: 0.72rem;
  font-weight: 700;
  background: color-mix(in srgb, var(--temp-overlay-color) 76%, #ffffff 24%);
  border: 1px solid color-mix(in srgb, var(--temp-overlay-color) 62%, #ffffff 38%);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.eddy-marker-wrap,
.waterspout-marker-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  margin-left: -36px;
  margin-top: -36px;
}

.eddy-marker {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: inline-flex;
  position: relative;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.3), rgba(5, 17, 28, 0.18));
  border: 2px solid var(--eddy-accent, #77c6f2);
  color: var(--eddy-accent, #77c6f2);
  box-shadow:
    0 8px 18px rgba(0, 0, 0, 0.22),
    0 0 0 4px rgba(255, 255, 255, 0.11);
}

.eddy-marker dotlottie-player {
  width: 52px;
  height: 52px;
  pointer-events: none;
}

.eddy-marker-fallback {
  display: none;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.eddy-marker dotlottie-player:empty + .eddy-marker-fallback,
.eddy-marker-fallback.is-visible {
  display: inline-flex;
}

.eddy-marker-fallback i {
  font-size: 1.8rem;
  animation: eddy-spin 3.3s linear infinite;
}

@keyframes eddy-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.waterspout-marker {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.28), rgba(5, 17, 28, 0.2));
  border: 2px solid rgba(186, 204, 224, 0.92);
  color: #f3f7fb;
  box-shadow:
    0 8px 18px rgba(0, 0, 0, 0.24),
    0 0 0 4px rgba(255, 255, 255, 0.1);
}

.waterspout-marker i {
  font-size: 0.98rem;
}

.jelly-marker {
  width: 42px;
  height: 42px;
  filter: drop-shadow(0 6px 14px rgba(31, 86, 99, 0.2));
}

.safe-marker {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin-left: -16px;
  margin-top: -16px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #baf0c9, #4ba86c 72%);
  border: 2px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 8px 18px rgba(75, 168, 108, 0.28);
  color: #ffffff;
  font-size: 0.95rem;
  line-height: 1;
}

.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
  background: rgba(8, 21, 32, 0.96);
  color: var(--text-main);
}

.leaflet-popup-pane {
  z-index: 700;
}

.popup-copy {
  margin: 10px 0 0;
  color: rgba(206, 225, 232, 0.78);
  line-height: 1.5;
}

.popup-photo {
  width: 100%;
  aspect-ratio: 16 / 10;
  margin-bottom: 12px;
  border-radius: 14px;
  overflow: hidden;
  background: rgba(18, 39, 51, 0.72);
}

.popup-photo:empty {
  display: none;
}

.popup-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.species-block {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(131, 211, 224, 0.14);
}

.species-title {
  margin: 0 0 8px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #8ed8e3;
}

.species-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.species-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.88rem;
  color: rgba(230, 245, 249, 0.88);
}

.species-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.species-name {
  flex: 1;
}

.species-value {
  color: #f6d08a;
}

.species-icon {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid rgba(131, 211, 224, 0.25);
  filter: drop-shadow(0 3px 8px rgba(31, 86, 99, 0.18));
}

.species-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  cursor: pointer;
}

.detected-species-list {
  display: grid;
  gap: 8px;
  overflow: auto;
  padding-right: 4px;
  flex: 1 1 auto;
  min-height: 0;
}

.detected-species-item {
  width: 100%;
  border: 1px solid rgba(131, 211, 224, 0.12);
  border-radius: 16px;
  padding: 8px;
  background: linear-gradient(180deg, rgba(14, 35, 50, 0.56), rgba(9, 24, 36, 0.4));
  color: var(--text-main);
  text-align: left;
  cursor: pointer;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.detected-species-item:hover {
  transform: translateY(-1px);
  border-color: rgba(131, 211, 224, 0.24);
  background: linear-gradient(180deg, rgba(19, 48, 66, 0.72), rgba(12, 31, 44, 0.56));
}

.detected-species-item img {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  object-fit: cover;
  display: block;
}

.detected-species-meta {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.detected-species-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.detected-species-name {
  font-size: 0.86rem;
  line-height: 1.25;
}

.detected-species-value {
  color: #f6d08a;
  font-size: 0.88rem;
  font-weight: 700;
}

.detected-species-profile {
  display: grid;
  gap: 2px;
}

.detected-species-profile p {
  margin: 0;
  font-size: 0.92rem !important;
  line-height: 1.25;
  color: var(--text-soft);
}

.detected-species-profile span {
  color: #f6d08a;
}

.species-lightbox {
  position: fixed;
  inset: 0;
  z-index: 900;
  background: rgba(3, 11, 18, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: grid;
  place-items: center;
  gap: 10px;
  padding: 18px;
}

.species-lightbox[hidden] {
  display: none !important;
}

.species-lightbox-image {
  width: min(70vw, 520px);
  max-height: min(70vh, 620px);
  object-fit: contain;
  border-radius: 16px;
  box-shadow: 0 24px 54px rgba(0, 0, 0, 0.4);
}

.species-lightbox-caption {
  margin: 0;
  font-weight: 700;
  color: #edf9fc;
}

.species-lightbox-details {
  width: min(70vw, 520px);
}

.detected-species-profile.in-lightbox {
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(131, 211, 224, 0.22);
  background: rgba(7, 21, 33, 0.58);
}

.detected-species-profile.in-lightbox p {
  font-size: 0.86rem;
}

.species-lightbox-close {
  position: absolute;
  top: 16px;
  right: 18px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(131, 211, 224, 0.22);
  background: rgba(7, 21, 33, 0.74);
  color: #eef8fb;
  font-size: 1.65rem;
  line-height: 1;
  cursor: pointer;
}

body.species-lightbox-open {
  overflow: hidden;
}
