:root {
  --bg: #020914;
  --panel: #061326;
  --panel-2: #071b31;
  --panel-3: #0b223b;
  --surface: rgba(5,18,34,.76);
  --surface-2: rgba(8,27,49,.76);
  --border: rgba(118,172,218,.20);
  --border-2: rgba(71,218,255,.30);
  --text: #f3f9ff;
  --text-dim: #9cb5c8;
  --soft: #6f8ba2;
  --accent: #25d9ff;
  --accent-dim: #1d7cff;
  --teal: #16f5c7;
  --green: #21e29b;
  --orange: #ffb454;
  --danger: #ff5f73;
  --glass: rgba(5,18,34,.72);
  --shadow: 0 28px 80px rgba(0,0,0,.42);
  --radius: 18px;
  --font-body: 'General Sans', Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Consolas, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }

body {
  font-family: var(--font-body);
  color: var(--text);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(circle at 48% 0%, rgba(38,217,255,.16), transparent 34%),
    radial-gradient(circle at 85% 18%, rgba(29,124,255,.14), transparent 32%),
    radial-gradient(circle at 20% 100%, rgba(22,245,199,.10), transparent 34%),
    linear-gradient(180deg,#020817 0%,#030b18 52%,#020712 100%);
}

button, input { font: inherit; }
button { user-select: none; }

#app {
  width: 100vw;
  height: 100vh;
  display: grid;
  grid-template-rows: 104px minmax(0, 1fr);
  background:
    linear-gradient(90deg, rgba(23,113,189,.07) 1px, transparent 1px),
    linear-gradient(180deg, rgba(23,113,189,.05) 1px, transparent 1px);
  background-size: 56px 56px;
}

/* ---------- Topbar ---------- */
#topbar {
  height: 104px;
  display: grid;
  grid-template-columns: minmax(560px, 720px) minmax(220px,1fr) 190px 190px 160px;
  align-items: center;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(5,16,32,.94), rgba(2,9,20,.84));
  backdrop-filter: blur(18px);
  box-shadow: 0 10px 40px rgba(0,0,0,.26);
  z-index: 10;
}

.top-brand {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-left: 18px;
}
.logo-shell {
  width: 86px;
  height: 86px;
  border-radius: 0;
  display: grid;
  place-items: center;
  border: 1px solid rgba(37,217,255,.66);
  background: transparent;
  box-shadow: 0 0 26px rgba(37,217,255,.18), inset 0 0 0 1px rgba(255,255,255,.06);
  overflow: visible;
}
.logo-shell img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  filter: drop-shadow(0 0 14px rgba(37,217,255,.75));
}
.hydrosim-wordmark {
  width: min(472px, 42vw);
  height: auto;
  max-height: 96px;
  object-fit: contain;
  object-position: left center;
  filter: drop-shadow(0 12px 24px rgba(0,0,0,.42));
}
.top-brand-text h1 {
  font-size: 21px;
  line-height: 1;
  font-weight: 750;
  letter-spacing: .01em;
}
.top-brand-text span {
  display: block;
  margin-top: 5px;
  color: var(--text-dim);
  font-size: 12px;
  letter-spacing: .05em;
}
.top-search {
  height: 38px;
  border: 1px solid var(--border);
  border-radius: 13px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 15px;
  color: #d9efff;
  background: rgba(3,14,27,.72);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.03);
  max-width: 520px;
}
.search-dot, .live-dot, .green-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 16px rgba(22,245,199,.75);
  flex: 0 0 auto;
}
.top-item {
  height: 104px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 18px;
  border-left: 1px solid rgba(118,172,218,.13);
}
.top-icon {
  font-size: 25px;
  color: var(--accent);
  filter: drop-shadow(0 0 10px rgba(37,217,255,.48));
}
.top-title {
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.1;
}
.top-value {
  font-size: 15px;
  color: var(--text);
  font-weight: 650;
  margin-top: 4px;
  white-space: nowrap;
}
.top-live { padding-right: 22px; }

/* Exit to Sabtan Knowledge hub */
.exit-hub {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  height: 38px;
  padding: 0 14px;
  border: 1px solid var(--border-2);
  border-radius: 0;
  background: rgba(5,18,34,.90);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: all .18s ease;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}
.exit-hub:hover {
  border-color: rgba(37,217,255,.58);
  color: var(--accent);
  box-shadow: 0 0 20px rgba(37,217,255,.16), inset 0 1px 0 rgba(255,255,255,.06);
}
.exit-hub:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.exit-hub__arrow {
  font-size: 15px;
  line-height: 1;
  color: var(--accent);
  filter: drop-shadow(0 0 8px rgba(37,217,255,.5));
}

/* ---------- Workspace ---------- */
.workspace {
  display: grid;
  grid-template-columns: 320px minmax(420px, 1fr) 330px;
  min-height: 0;
  height: calc(100vh - 104px);
}

.rail {
  border-right: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(4,13,28,.86), rgba(3,10,21,.96));
  padding: 18px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.nav {
  width: 58px;
  height: 58px;
  border-radius: 15px;
  border: 1px solid transparent;
  background: transparent;
  color: #c5d6e5;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  font-size: 10px;
  cursor: default;
}
.nav span { font-size: 22px; line-height: 1; }
.nav small { font-size: 10px; color: currentColor; }
.nav.active {
  background: linear-gradient(145deg, rgba(22,245,199,.28), rgba(29,124,255,.28));
  border-color: rgba(37,217,255,.38);
  box-shadow: 0 0 28px rgba(37,217,255,.20);
  color: #fff;
}
.nav.spacer { margin-top: auto; }

/* ---------- Sidebar and right panel ---------- */
#sidebar, #hydroPanel {
  min-height: 0;
  overflow-y: auto;
  background: linear-gradient(180deg, rgba(5,15,31,.88), rgba(3,10,22,.92));
  padding: 18px 12px;
  scrollbar-width: thin;
  scrollbar-color: rgba(37,217,255,.28) transparent;
}
#sidebar { border-right: 1px solid var(--border); }
#hydroPanel { border-left: 1px solid var(--border); }
#sidebar::-webkit-scrollbar, #hydroPanel::-webkit-scrollbar { width: 8px; }
#sidebar::-webkit-scrollbar-thumb, #hydroPanel::-webkit-scrollbar-thumb {
  background: rgba(37,217,255,.24);
  border-radius: 999px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--accent);
}
.compact-brand {
  margin: 0 2px 12px;
  padding: 8px 3px 14px;
  border-bottom: 1px solid rgba(118,172,218,.13);
}
.brand-logo {
  width: 38px;
  height: 38px;
  object-fit: contain;
  filter: drop-shadow(0 0 12px rgba(37,217,255,.46));
}
.brand-text h1 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: .01em;
}
.brand-text span {
  display: block;
  margin-top: 3px;
  font-size: 11px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: .10em;
}

.panel {
  border: 1px solid var(--border);
  border-radius: 15px;
  background: linear-gradient(180deg, rgba(8,27,49,.78), rgba(4,15,30,.78));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.035), 0 14px 30px rgba(0,0,0,.14);
  padding: 14px;
  margin-bottom: 12px;
}
.panel h2 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--accent);
  font-size: 11px;
  letter-spacing: .10em;
  text-transform: uppercase;
  font-weight: 750;
  margin-bottom: 12px;
}
.region {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 12px;
  color: #fff;
  line-height: 1.25;
}
.meta {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0 10px;
  font-size: 12px;
}
.meta dt, .meta dd {
  padding: 7px 0;
  border-bottom: 1px solid rgba(118,172,218,.11);
}
.meta dt { color: var(--text-dim); }
.meta dd {
  font-family: var(--font-mono);
  text-align: right;
  color: #fff;
  font-size: 11px;
}

/* Layer buttons */
.layer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 8px;
  margin-bottom: 14px;
}
.layer-btn {
  min-height: 58px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(5,18,34,.70);
  color: #c8d8e7;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease, transform .18s ease;
}
.layer-btn span {
  font-size: 20px;
  color: #e7f8ff;
  line-height: 1;
}
.layer-btn:hover {
  border-color: var(--border-2);
  color: #fff;
  transform: translateY(-1px);
}
.layer-btn.active {
  background: linear-gradient(180deg, rgba(22,245,199,.24), rgba(14,96,138,.25));
  border-color: rgba(22,245,199,.52);
  box-shadow: 0 0 20px rgba(22,245,199,.14);
  color: #fff;
}

/* --- Background-load states for layer buttons --- */
/* Pending: data not yet loaded -> greyed out, not interactive. */
.layer-btn.layer-pending,
.layer-btn:disabled {
  opacity: .38;
  cursor: not-allowed;
  pointer-events: none;
  filter: grayscale(.55);
  transform: none;
}
.layer-btn.layer-pending:hover,
.layer-btn:disabled:hover {
  transform: none;
  border-color: var(--border);
  color: #c8d8e7;
}
/* Loading: this layer's file is actively downloading -> spinner badge. */
.layer-btn.layer-loading {
  opacity: .72;
  cursor: progress;
  pointer-events: none;
  position: relative;
}
.layer-btn.layer-loading::after {
  content: "";
  position: absolute;
  top: 6px;
  right: 6px;
  width: 12px;
  height: 12px;
  border: 2px solid rgba(22,245,199,.30);
  border-top-color: rgba(22,245,199,.95);
  border-radius: 50%;
  animation: layerspin .7s linear infinite;
}
@keyframes layerspin { to { transform: rotate(360deg); } }

/* Flood run button while its data is still streaming in. */
#floodRunBtn.layer-pending {
  opacity: .5;
  cursor: progress;
  pointer-events: none;
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #c9d9e8;
  font-size: 13px;
  padding: 9px 0;
  cursor: pointer;
}
.toggle-row input {
  width: 44px;
  height: 24px;
  appearance: none;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.12);
  background: #1b2a3d;
  position: relative;
  cursor: pointer;
  transition: .22s;
}
.toggle-row input::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #e7f7ff;
  transition: .22s;
}
.toggle-row input:checked {
  background: linear-gradient(90deg, var(--teal), var(--accent-dim));
  box-shadow: 0 0 18px rgba(37,217,255,.22);
}
.toggle-row input:checked::after { left: 22px; }

.legend-bar {
  height: 15px;
  border-radius: 999px;
  margin-bottom: 8px;
  border: 1px solid rgba(255,255,255,.10);
  box-shadow: 0 0 14px rgba(37,217,255,.18);
}
.legend-labels {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
}

.tool-btn {
  width: 100%;
  min-height: 42px;
  border-radius: 12px;
  border: 1px solid var(--border-2);
  background: rgba(5,18,34,.90);
  color: #fff;
  padding: 11px 12px;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
  transition: all .18s ease;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}
.tool-btn:hover {
  border-color: rgba(37,217,255,.58);
  box-shadow: 0 0 20px rgba(37,217,255,.16), inset 0 1px 0 rgba(255,255,255,.06);
}
.tool-btn.active {
  background: linear-gradient(135deg, rgba(22,245,199,.55), rgba(29,124,255,.50));
  border-color: rgba(22,245,199,.62);
  color: #fff;
}
.ghost-btn { margin-top: 7px; color: #c9d9e8; border-color: var(--border); }
.hint {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 10px;
  line-height: 1.55;
}
.side-foot {
  margin-top: auto;
  font-size: 10.5px;
  color: var(--soft);
  font-family: var(--font-mono);
  padding: 12px 2px 6px;
  line-height: 1.6;
}

/* ---------- Main map viewport ---------- */
#viewport {
  position: relative;
  overflow: hidden;
  min-height: 0;
  margin: 14px;
  border-radius: 22px;
  border: 1px solid rgba(118,172,218,.25);
  background: #07111f;
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,.04);
}
#viewport::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(circle at 45% 50%, rgba(37,217,255,.18), transparent 28%),
    linear-gradient(120deg, rgba(0,0,0,.30), transparent 32%, transparent 70%, rgba(0,0,0,.30));
  mix-blend-mode: screen;
}
#viewport::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
  border-radius: inherit;
  box-shadow: inset 0 0 90px rgba(0,0,0,.45), inset 0 0 80px rgba(37,217,255,.04);
}

.readout {
  position: absolute;
  top: 18px;
  left: 18px;
  z-index: 20;
  background: rgba(3,12,24,.62);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 15px;
  padding: 13px 16px;
  min-width: 210px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  pointer-events: none;
  box-shadow: 0 16px 40px rgba(0,0,0,.20);
}
.readout-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--text-dim);
  font-weight: 750;
}
.readout-value {
  font-family: var(--font-mono);
  font-size: 26px;
  font-weight: 600;
  color: var(--accent);
  text-shadow: 0 0 18px rgba(37,217,255,.28);
}
.readout-coord {
  font-family: var(--font-mono);
  font-size: 11px;
  color: #c9d9e8;
  display: flex;
  align-items: baseline;
  gap: 14px;
}
.readout-coord .rc-pair { display: inline-flex; align-items: baseline; gap: 2px; }
.readout-coord .rc-val {
  font-size: 17px;
  font-weight: 600;
  color: #eaf6ff;
  letter-spacing: .2px;
}
.readout-coord .rc-axis { font-size: 11px; color: #9fb6c8; }

#canvasWrap {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}
#mapCanvas, #overlayCanvas, #floodCanvas, #waterCanvas {
  position: absolute;
  max-width: 100%;
  max-height: 100%;
  border-radius: 15px;
  box-shadow: 0 0 34px rgba(0,0,0,.24);
}
#mapCanvas {
  filter: saturate(1.10) contrast(1.05);
}
#overlayCanvas, #floodCanvas, #waterCanvas { pointer-events: none; }
#floodCanvas { mix-blend-mode: screen; }
#threeWrap {
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: 18px;
  overflow: hidden;
}
#threeWrap canvas { width: 100% !important; height: 100% !important; }
#cesiumWrap {
  position: absolute;
  inset: 0;
  z-index: 3;
  border-radius: 18px;
  overflow: hidden;
  background: #0b1220;
}
#cesiumWrap .cesium-viewer,
#cesiumWrap .cesium-viewer-cesiumWidgetContainer,
#cesiumWrap .cesium-widget,
#cesiumWrap .cesium-widget canvas {
  width: 100% !important;
  height: 100% !important;
  border-radius: 18px;
}
#cesiumWrap .cesium-viewer-bottom,
#cesiumWrap .cesium-viewer-toolbar {
  z-index: 4;
}
.fatimah-3d-badge {
  position: absolute;
  left: 16px;
  bottom: 18px;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(56, 189, 248, 0.28);
  background: rgba(7, 27, 49, 0.88);
  border-radius: 2px;
  color: #eaf4ff;
  backdrop-filter: blur(8px);
  pointer-events: none;
}
.fatimah-3d-badge b {
  display: block;
  font-size: 13px;
  font-weight: 600;
}
.fatimah-3d-badge span {
  display: block;
  font-size: 11px;
  color: #9fb4c9;
  margin-top: 2px;
}
.f3d-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #38bdf8;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.7);
  flex: 0 0 auto;
}
.hidden { display: none !important; }

.loading {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: linear-gradient(180deg, rgba(2,9,20,.94), rgba(2,7,18,.98));
  z-index: 30;
  color: var(--text-dim);
  text-align: center;
}
.spinner {
  width: 38px;
  height: 38px;
  border: 3px solid rgba(118,172,218,.20);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .8s linear infinite;
  box-shadow: 0 0 22px rgba(37,217,255,.22);
}
@keyframes spin { to { transform: rotate(360deg); } }

.map-glow-card {
  position: absolute;
  right: 18px;
  bottom: 18px;
  z-index: 21;
  display: flex;
  align-items: center;
  gap: 11px;
  max-width: 300px;
  padding: 13px 15px;
  border-radius: 15px;
  border: 1px solid rgba(255,255,255,.13);
  background: rgba(3,12,24,.58);
  backdrop-filter: blur(12px);
  box-shadow: 0 16px 40px rgba(0,0,0,.22);
}
.map-glow-card b {
  display: block;
  color: #fff;
  font-size: 13px;
  margin-bottom: 3px;
}
.map-glow-card span:not(.green-dot) {
  color: var(--text-dim);
  font-size: 11px;
}

.water-banner {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 22;
  background: rgba(37,217,255,.13);
  border: 1px solid rgba(37,217,255,.50);
  color: #b8f3ff;
  padding: 9px 14px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 650;
  display: flex;
  align-items: center;
  gap: 8px;
  backdrop-filter: blur(10px);
  box-shadow: 0 0 24px rgba(37,217,255,.10);
}
.wb-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 14px rgba(37,217,255,.8);
  animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }

/* Profile panel */
.profile-panel {
  position: absolute;
  bottom: 18px;
  left: 18px;
  right: 18px;
  z-index: 25;
  background: rgba(3,12,24,.72);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 16px;
  padding: 16px;
  max-width: 820px;
  margin: 0 auto;
  box-shadow: 0 24px 60px rgba(0,0,0,.34);
}
.profile-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.profile-head h3 { font-size: 14px; font-weight: 750; color: #fff; }
#closeProfile {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
}
#closeProfile:hover { color: #fff; }
#profileChart { width: 100%; height: 160px; display: block; }
.profile-stats {
  display: flex;
  gap: 22px;
  margin-top: 10px;
  font-size: 12px;
  flex-wrap: wrap;
  color: #c9d9e8;
}
.profile-stats b {
  font-family: var(--font-mono);
  color: var(--teal);
  font-weight: 600;
}
#mapCanvas.crosshair { cursor: crosshair; }

/* ---------- Water simulation controls ---------- */
.water-panel {
  border-color: rgba(37,217,255,.24);
  background:
    radial-gradient(circle at 82% 4%, rgba(37,217,255,.13), transparent 34%),
    linear-gradient(180deg, rgba(8,27,49,.82), rgba(4,15,30,.82));
}
.water-panel h2 { color: var(--teal); }

/* Flood / Rainfall segmented toggle */
.sim-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 4px;
  margin-bottom: 4px;
  border: 1px solid rgba(37,217,255,.24);
  background: rgba(3,12,24,.55);
}
.sim-seg {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all .18s ease;
}
.sim-seg__ico { font-size: 14px; letter-spacing: 0; }
.sim-seg:hover {
  color: #e7f7ff;
  border-color: rgba(37,217,255,.45);
}
.sim-seg.active {
  color: #04111f;
  background: linear-gradient(135deg, var(--teal), var(--accent));
  border-color: rgba(37,217,255,.70);
  box-shadow: 0 0 18px rgba(37,217,255,.32);
}
.sim-view.is-hidden { display: none; }

.water-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, rgba(22,245,199,.45), rgba(29,124,255,.42));
  border-color: rgba(37,217,255,.48);
}
.water-btn.active {
  background: linear-gradient(135deg, rgba(255,180,84,.68), rgba(29,124,255,.42));
  border-color: rgba(255,180,84,.70);
}
.wb-ico { font-size: 15px; }

/* Run / Stop row for live flood mode */
.flood-run-row {
  display: flex;
  gap: 8px;
}
.flood-run-row .water-btn { flex: 1 1 auto; }
.flood-stop-btn {
  flex: 0 0 92px;
  width: auto;
  gap: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(5,18,34,.90);
  border-color: rgba(255,95,115,.42);
  color: #ffb7c1;
}
.flood-stop-btn:hover:not(:disabled) {
  border-color: rgba(255,95,115,.85);
  box-shadow: 0 0 18px rgba(255,95,115,.22);
}
.flood-stop-btn:disabled {
  opacity: .4;
  cursor: not-allowed;
  color: var(--soft);
  border-color: var(--border);
}
.water-btn.live {
  background: linear-gradient(135deg, rgba(255,180,84,.72), rgba(29,124,255,.42));
  border-color: rgba(255,180,84,.78);
  box-shadow: 0 0 20px rgba(255,180,84,.28);
}
.slider-block { margin-top: 14px; }
.slider-block label {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 12.5px;
  color: #c9d9e8;
  margin-bottom: 8px;
}
.slider-num {
  font-family: var(--font-mono);
  color: var(--accent);
  text-shadow: 0 0 12px rgba(37,217,255,.28);
}
.slider-block input[type=range] {
  width: 100%;
  accent-color: var(--accent);
  cursor: pointer;
}
.slider-block input[type=range]::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(22,245,199,.72), rgba(29,124,255,.76));
}
.slider-block input[type=range]::-webkit-slider-thumb {
  margin-top: -6px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #e7f7ff;
  box-shadow: 0 0 14px rgba(37,217,255,.55);
}
.divider {
  border: none;
  border-top: 1px solid rgba(118,172,218,.18);
  margin: 16px 0 4px;
}
.flood-stat {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 12px;
  line-height: 1.55;
  padding: 11px;
  border-radius: 12px;
  border: 1px solid rgba(118,172,218,.14);
  background: rgba(3,12,24,.38);
}
.flood-stat b {
  font-family: var(--font-mono);
  color: var(--teal);
  font-weight: 650;
}
.flood-readout > div { padding: 3px 0; }
.flood-readout .hint-sub {
  font-size: 11px;
  color: var(--text-dim);
  opacity: .86;
  border-top: 1px dashed rgba(118,172,218,.20);
  margin-top: 5px;
  padding-top: 6px;
}
.status-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  color: var(--text-dim);
  padding: 7px 0;
  border-bottom: 1px solid rgba(118,172,218,.11);
}
.status-row b {
  color: #fff;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
}

@media (max-width: 1260px) {
  #topbar { grid-template-columns: minmax(520px, 1fr) 260px 180px 160px; }
  #topbar .top-item:nth-last-child(1) { display: none; }
  .workspace { grid-template-columns: 300px minmax(420px, 1fr) 310px; }
}

@media (max-width: 1080px) {
  #topbar { grid-template-columns: minmax(430px, 1fr) 1fr; }
  #topbar .top-item { display: none; }
  .workspace { grid-template-columns: 286px minmax(420px, 1fr); }
  #hydroPanel { display: none; }
}

@media (max-width: 860px) {
  body { overflow: auto; }
  #app { height: auto; min-height: 100vh; grid-template-rows: auto auto; }
  #topbar { height: auto; grid-template-columns: 1fr; gap: 12px; padding: 14px; }
  .top-brand { padding-left: 0; }
  .top-search { max-width: none; }
  .workspace { height: auto; grid-template-columns: 1fr; }
  .rail { display: none; }
  #sidebar, #hydroPanel { display: block; border: 0; max-height: none; overflow: visible; }
  #viewport { height: 70vh; min-height: 420px; }
}
.three-error {
  position:absolute;
  inset:0;
  display:grid;
  place-items:center;
  padding:30px;
  color:#c9d9e8;
  background:linear-gradient(180deg,rgba(2,9,20,.95),rgba(2,7,18,.98));
  font-size:14px;
  text-align:center;
}


/* ---------- HydroSim sharp executive finish ---------- */
:root { --radius: 0px; }
.logo-shell,
.top-search,
.nav,
.panel,
.layer-btn,
.tool-btn,
.sim-toggle,
.sim-seg,
.flood-stop-btn,
#viewport,
#viewport::after,
.readout,
#mapCanvas, #overlayCanvas, #floodCanvas, #waterCanvas,
#threeWrap,
#cesiumWrap,
.map-glow-card,
.water-banner,
.profile-panel,
.flood-stat,
.legend-bar,
.toggle-row input,
.toggle-row input::after,
.slider-block input[type=range]::-webkit-slider-runnable-track,
.slider-block input[type=range]::-webkit-slider-thumb {
  border-radius: 0 !important;
}
.logo-shell {
  background: transparent !important;
}
.panel, .layer-btn, .tool-btn, .readout, .map-glow-card, .profile-panel, .flood-stat {
  box-shadow: inset 0 1px 0 rgba(255,255,255,.035), 0 14px 30px rgba(0,0,0,.18);
}
@media (max-width: 860px) {
  .logo-shell { width: 68px; height: 68px; }
  .logo-shell img { width: 58px; height: 58px; }
  .hydrosim-wordmark { width: min(330px, calc(100vw - 110px)); max-height: 78px; }
}


/* ---------- HydroSim home reveal gate ---------- */
.home-gate {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 36%, rgba(37,217,255,.16), transparent 34%),
    radial-gradient(circle at 50% 70%, rgba(29,124,255,.10), transparent 42%),
    linear-gradient(180deg, #020914 0%, #020914 42%, #01050c 100%);
  opacity: 1;
  transition: opacity 4.45s cubic-bezier(.22,.72,.14,1), visibility 0s linear 4.65s;
}
.home-gate.is-exiting {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}
.home-gate.is-hidden { display: none; }
.home-gate__grid {
  position: absolute;
  inset: -1px;
  background:
    linear-gradient(90deg, rgba(37,217,255,.055) 1px, transparent 1px),
    linear-gradient(180deg, rgba(37,217,255,.045) 1px, transparent 1px);
  background-size: 68px 68px;
  mask-image: radial-gradient(circle at center, black 0%, black 46%, transparent 78%);
  opacity: .72;
}
.home-gate__glow {
  position: absolute;
  width: 48vw;
  height: 48vw;
  min-width: 520px;
  min-height: 520px;
  border-radius: 0;
  filter: blur(60px);
  opacity: .28;
  background: rgba(37,217,255,.36);
}
.home-gate__glow--one { top: -18%; left: 7%; }
.home-gate__glow--two { right: 4%; bottom: -24%; background: rgba(29,124,255,.40); }
.home-gate__content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: min(1120px, 92vw);
  min-height: 72vh;
  transform: translateY(-1.2vh);
}
.home-logo-btn {
  width: clamp(260px, 32vw, 520px);
  height: clamp(260px, 32vw, 520px);
  border: 0;
  background: transparent;
  display: grid;
  place-items: center;
  cursor: pointer;
  transform: translateY(0) scale(1);
  opacity: 1;
  transition:
    transform 4.45s cubic-bezier(.22,.72,.14,1),
    opacity 4.45s cubic-bezier(.22,.72,.14,1),
    filter 4.45s cubic-bezier(.22,.72,.14,1);
}
.home-logo-btn:hover .home-logo-frame {
  border-color: rgba(191,239,255,.92);
  box-shadow:
    0 0 0 1px rgba(255,255,255,.13),
    0 0 64px rgba(37,217,255,.35),
    inset 0 0 34px rgba(37,217,255,.10);
}
.home-logo-frame {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  border: 1px solid rgba(37,217,255,.70);
  background: transparent;
  box-shadow:
    0 0 0 1px rgba(255,255,255,.08),
    0 0 46px rgba(37,217,255,.22),
    inset 0 0 30px rgba(37,217,255,.08);
  overflow: visible;
  transition: border-color .6s ease, box-shadow .6s ease;
}
.home-logo-frame img {
  width: 86%;
  height: 86%;
  object-fit: contain;
  filter:
    drop-shadow(0 0 22px rgba(37,217,255,.82))
    drop-shadow(0 28px 34px rgba(0,0,0,.42));
}
.home-wordmark {
  width: min(900px, 86vw);
  height: auto;
  margin-top: 22px;
  object-fit: contain;
  filter:
    drop-shadow(0 16px 34px rgba(0,0,0,.55))
    drop-shadow(0 0 18px rgba(37,217,255,.18));
  opacity: .98;
  transition:
    opacity 4.45s cubic-bezier(.22,.72,.14,1),
    transform 4.45s cubic-bezier(.22,.72,.14,1),
    filter 4.45s cubic-bezier(.22,.72,.14,1);
}
.home-enter-line {
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: rgba(210,238,255,.74);
  text-shadow: 0 0 18px rgba(37,217,255,.24);
  transition: opacity 4.45s cubic-bezier(.22,.72,.14,1), transform 4.45s cubic-bezier(.22,.72,.14,1);
}
.home-gate.is-exiting .home-logo-btn {
  transform: translateY(150px) scale(.34);
  opacity: 0;
  filter: blur(6px);
}
.home-gate.is-exiting .home-wordmark,
.home-gate.is-exiting .home-enter-line {
  transform: translateY(150px) scale(.90);
  opacity: 0;
  filter: blur(5px);
}
@media (max-width: 860px) {
  .home-gate__content { min-height: 68vh; }
  .home-logo-btn { width: min(74vw, 340px); height: min(74vw, 340px); }
  .home-wordmark { width: min(90vw, 620px); margin-top: 14px; }
}


/* ---------- Multi-region HydroSim merge overrides ---------- */
#topbar {
  grid-template-columns: minmax(540px, 690px) minmax(250px,1fr) 180px 190px 155px;
}
.workspace {
  grid-template-columns: 338px minmax(440px, 1fr) 352px;
}
#sidebar,
#hydroPanel {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.scope-panel .tool-btn { margin-top: 8px; }
.region-select {
  width: 100%;
  height: 42px;
  color: var(--text);
  border: 1px solid var(--border);
  background-color: rgba(3,14,27,.72);
  padding: 0 40px 0 12px;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
  appearance: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.035);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%239cb5c8' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
  margin-bottom: 0;
}
.region-select:hover,
.region-select:focus {
  outline: none;
  border-color: var(--border-2);
  box-shadow: 0 0 18px rgba(37,217,255,.12), inset 0 1px 0 rgba(255,255,255,.04);
}
.scope-panel .region { margin-top: 12px; }
#overviewHint { display: none; }
.layer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.layer-btn { min-height: 54px; padding: 8px 6px; }
.layer-btn.wide { grid-column: 1 / -1; min-height: 48px; }
.layer-btn[style*="display: none"] { display: none !important; }
#mapCanvas.overview-cursor { cursor: pointer; }
#mapCanvas,
#overlayCanvas,
#floodCanvas,
#waterCanvas,
#damsCanvas {
  position: absolute;
  max-width: 100%;
  max-height: 100%;
  border-radius: 0 !important;
  box-shadow: 0 0 34px rgba(0,0,0,.24);
}
#overlayCanvas,
#floodCanvas,
#waterCanvas,
#damsCanvas { pointer-events: none; }
#floodCanvas { mix-blend-mode: screen; }
#damsPanel {
  border-color: rgba(22,245,199,.22);
  background:
    radial-gradient(circle at 84% 0%, rgba(22,245,199,.09), transparent 34%),
    linear-gradient(180deg, rgba(8,27,49,.78), rgba(4,15,30,.78));
}
.dams-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.dams-head h2 { margin-bottom: 0; }
.toggle-inline {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--text-dim);
  font-size: 11px;
  cursor: pointer;
  font-family: var(--font-mono);
  white-space: nowrap;
}
.toggle-inline input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  cursor: pointer;
}
.dams-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 360px;
  overflow-y: auto;
  padding-right: 2px;
  scrollbar-width: thin;
  scrollbar-color: rgba(37,217,255,.28) transparent;
}
.dams-list::-webkit-scrollbar { width: 7px; }
.dams-list::-webkit-scrollbar-thumb { background: rgba(37,217,255,.24); border-radius: 0; }
.dam-row {
  border: 1px solid rgba(118,172,218,.17);
  background: rgba(5,18,34,.62);
  padding: 9px 10px;
  font-size: 12px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.028);
}
.dam-row.overflow {
  border-color: rgba(255,95,115,.62);
  box-shadow: 0 0 20px rgba(255,95,115,.10), inset 0 1px 0 rgba(255,255,255,.035);
}
.dam-row-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.dam-name {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  font-weight: 650;
  font-size: 12px;
  color: #fff;
  line-height: 1.25;
}
.dam-dot {
  width: 9px;
  height: 9px;
  border-radius: 0 !important;
  flex: 0 0 auto;
  box-shadow: 0 0 12px rgba(37,217,255,.18);
}
.dam-cap {
  font-family: var(--font-mono);
  color: var(--text-dim);
  font-size: 10.5px;
  white-space: nowrap;
}
.dam-bar {
  height: 7px;
  margin-top: 7px;
  border: 1px solid rgba(255,255,255,.06);
  background: rgba(3,12,24,.52);
  overflow: hidden;
}
.dam-bar-fill {
  height: 100%;
  transition: width .4s ease;
}
.dam-sub {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 6px;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 10.5px;
  line-height: 1.35;
}
.dam-sub b { color: #fff; font-weight: 600; }
.dam-est {
  color: var(--soft);
  opacity: .72;
  font-size: 9.5px;
  font-style: italic;
}
.dams-summary {
  margin-top: 10px;
  padding: 11px;
  border: 1px solid rgba(22,245,199,.22);
  background: rgba(22,245,199,.06);
  color: var(--text-dim);
  font-size: 11.5px;
  line-height: 1.55;
}
.dams-summary b {
  color: var(--teal);
  font-family: var(--font-mono);
  font-weight: 650;
}
.dams-summary .ov { color: var(--danger); }
.flood-readout > div { padding: 3px 0; }
.flood-readout .hint-sub {
  font-size: 11px;
  color: var(--text-dim);
  opacity: .86;
  border-top: 1px dashed rgba(118,172,218,.20);
  margin-top: 5px;
  padding-top: 6px;
}
.water-panel .tool-btn + .tool-btn { margin-top: 7px; }
.status-panel { margin-top: auto; }
.three-error {
  position:absolute;
  inset:0;
  display:grid;
  place-items:center;
  padding:30px;
  color:#c9d9e8;
  background:linear-gradient(180deg,rgba(2,9,20,.95),rgba(2,7,18,.98));
  font-size:14px;
  text-align:center;
}
@media (max-width: 1360px) {
  #topbar { grid-template-columns: minmax(500px, 1fr) 250px 170px 170px; }
  #topbar .top-item:nth-last-child(1) { display: none; }
  .workspace { grid-template-columns: 318px minmax(420px, 1fr) 330px; }
}
@media (max-width: 1120px) {
  #topbar { grid-template-columns: minmax(430px, 1fr) 1fr; }
  #topbar .top-item { display: none; }
  .workspace { grid-template-columns: 300px minmax(420px, 1fr); }
  #hydroPanel { display: none; }
}
@media (max-width: 860px) {
  body { overflow: auto; }
  #app { height: auto; min-height: 100vh; grid-template-rows: auto auto; }
  #topbar { height: auto; grid-template-columns: 1fr; gap: 12px; padding: 14px; }
  .top-brand { padding-left: 0; }
  .top-search { max-width: none; }
  .workspace { height: auto; grid-template-columns: 1fr; }
  .rail { display: none; }
  #sidebar, #hydroPanel { display: block; border: 0; max-height: none; overflow: visible; }
  #viewport { height: 70vh; min-height: 420px; }
  .status-panel { margin-top: 0; }
}

/* ---------- Dam hover tooltip (design DNA: accent bar · overline · serif title+metric · gradient bar · status chips) ---------- */
.dam-tip {
  position: absolute;
  z-index: 60;
  top: 0; left: 0;
  width: 312px;
  max-width: calc(100% - 24px);
  padding: 16px 16px 14px;
  pointer-events: none;
  color: var(--text);
  font-family: var(--font-body);
  background:
    radial-gradient(circle at 86% -10%, rgba(37,217,255,.12), transparent 46%),
    linear-gradient(180deg, rgba(7,22,41,.97), rgba(3,12,25,.98));
  border: 1px solid var(--border-2);
  box-shadow: 0 24px 60px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.05);
  backdrop-filter: blur(14px);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .14s ease, transform .14s ease;
}
.dam-tip.is-visible { opacity: 1; transform: translateY(0); }
.dam-tip[hidden] { display: none; }

.dam-tip__bar {
  display: block;
  width: 46px; height: 4px;
  margin-bottom: 13px;
  background: linear-gradient(90deg, var(--accent), var(--teal));
  box-shadow: 0 0 14px rgba(37,217,255,.55);
}
.dam-tip__over {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--accent);
  opacity: .92;
  margin-bottom: 7px;
}
.dam-tip__title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -.01em;
}
.dam-tip__title .pct {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 600;
  white-space: nowrap;
}
.dam-tip__ar {
  margin-top: 4px;
  font-size: 13px;
  color: var(--text-dim);
  direction: rtl;
  text-align: left;
}
.dam-tip__desc {
  margin-top: 9px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text-dim);
}
.dam-tip__warn {
  margin-top: 9px;
  padding: 7px 9px;
  font-size: 11.5px;
  line-height: 1.45;
  color: #f3d27a;
  background: rgba(255,180,84,.10);
  border: 1px solid rgba(255,180,84,.40);
  border-radius: 0;            /* sharp corners */
}
.dam-tip__div {
  border: 0;
  border-top: 1px solid rgba(118,172,218,.18);
  margin: 13px 0 11px;
}
.dam-tip__mlabel {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 9px;
}
.dam-tip__panel {
  padding: 12px 12px 11px;
  background: rgba(5,18,34,.6);
  border: 1px solid rgba(118,172,218,.16);
}
.dam-tip__phead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}
.dam-tip__phead span:first-child {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--soft);
}
.dam-tip__big {
  font-family: var(--font-mono);
  font-size: 26px;
  font-weight: 600;
  line-height: 1;
}
.dam-tip__track {
  height: 7px;
  margin: 10px 0 9px;
  background: rgba(118,172,218,.16);
  overflow: hidden;
}
.dam-tip__fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--orange), var(--green));
  transition: width .2s ease;
}
.dam-tip__note {
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--text-dim);
}
.dam-tip__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}
.dam-chip {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 6px 10px;
  border: 1px solid rgba(118,172,218,.26);
  color: var(--text-dim);
  background: rgba(118,172,218,.06);
  white-space: nowrap;
}
.dam-chip--good   { color: var(--green);  border-color: rgba(33,226,155,.5);  background: rgba(33,226,155,.1); }
.dam-chip--warn   { color: var(--orange); border-color: rgba(255,180,84,.5);  background: rgba(255,180,84,.1); }
.dam-chip--danger { color: var(--danger); border-color: rgba(255,95,115,.55); background: rgba(255,95,115,.12); }
.dam-chip--cta    { color: var(--accent); border-color: rgba(37,217,255,.5);  background: rgba(37,217,255,.08); width: 100%; text-align: center; }

#mapCanvas.dam-hover { cursor: help; }

/* ===================== Dam markers (DOM/SVG overlay) ===================== */
.dam-layer {
  position: absolute;
  inset: 0;
  z-index: 6;
  pointer-events: none;
}
.dam-mk {
  position: absolute;
  left: 0; top: 0;
  width: 30px; height: 30px;
  transform-origin: center center;
  transition: transform .18s cubic-bezier(.22,.61,.36,1);
  will-change: transform;
  pointer-events: none;
}
.dam-mk svg {
  display: block;
  width: 100%; height: 100%;
  overflow: visible;
  color: inherit;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,.6)) drop-shadow(0 0 7px currentColor);
}
.dam-mk .tri-stroke { fill: rgba(6,14,25,.78); stroke: currentColor; stroke-width: 6.5; stroke-linejoin: round; }
.dam-mk .inner-stroke { fill: none; stroke: currentColor; stroke-width: 5.2; stroke-linecap: round; stroke-linejoin: round; }
.dam-mk .dam-fill { fill: currentColor; opacity: .96; }
.dam-mk .dam-cut { fill: #071322; opacity: .96; }
.dam-mk .highlight { fill: rgba(255,255,255,.28); mix-blend-mode: screen; }

/* status colours (alert levels) */
.dam-mk--none     { color: #7dd3fc; }
.dam-mk--normal   { color: #80e45f; }
.dam-mk--alert    { color: #ffad37; }
.dam-mk--critical { color: #ff474a; }

/* estimated dams (unknown / DEM-estimated capacity): white marker.
   Persists across alert states so estimated dams are always distinguishable. */
.dam-mk--est:not(.dam-mk--alert):not(.dam-mk--critical):not(.dam-mk--normal) { color: #ffffff; }

/* critical: pulsing icon + expanding rings */
.dam-mk--critical svg { animation: damMarkerPulse 1.45s ease-in-out infinite; }
.dam-mk__rings { position: absolute; inset: 0; pointer-events: none; }
.dam-mk__rings .ring {
  position: absolute; inset: 1px;
  border: 2px solid currentColor; border-radius: 50%;
  opacity: 0; animation: damRingPulse 2.2s ease-out infinite;
  filter: drop-shadow(0 0 8px currentColor);
}
.dam-mk__rings .r2 { animation-delay: .55s; }
.dam-mk__rings .r3 { animation-delay: 1.1s; }

@keyframes damMarkerPulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.08); } }
@keyframes damRingPulse { 0% { transform: scale(.55); opacity: .7; } 68% { opacity: .25; } 100% { transform: scale(1.9); opacity: 0; } }
