:root {
  --bg: #07111e;
  --panel: rgba(9, 18, 32, 0.96);
  --panel-soft: rgba(19, 33, 53, 0.9);
  --line: rgba(148, 163, 184, 0.26);
  --text: #e5edf7;
  --muted: #91a4bd;
  --cyan: #19c3df;
  --blue: #3b82f6;
  --violet: #6d5dfc;
  --green: #20c997;
  --yellow: #f7c948;
  --orange: #fb923c;
  --red: #ef4444;
}

.gauge-service-card,
.gauge-service-block,
.gauge-popup-service {
  display: grid;
  gap: 10px;
}

.leaflet-popup-content .gauge-popup {
  width: 100%;
  min-width: 0;
  max-width: none;
  box-sizing: border-box;
}

.leaflet-popup-content .gauge-popup-service {
  gap: 8px;
}

.gauge-popup-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.gauge-popup-summary > div {
  min-width: 0;
  overflow: hidden;
  padding: 7px 8px;
  border: 1px solid #dbeafe;
  border-radius: 6px;
  background: #f8fafc;
}

.gauge-popup-summary > div.primary {
  border-color: #7dd3fc;
  background: #ecfeff;
}

.gauge-popup-summary span,
.gauge-popup-summary strong {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.gauge-popup-summary span {
  color: #64748b;
  font-size: 10px;
  font-weight: 750;
}

.gauge-popup-summary strong {
  margin-top: 2px;
  color: #0f172a;
  font-size: 12px;
  line-height: 1.3;
}

.gauge-popup-summary .primary strong {
  color: #0369a1;
  font-size: 17px;
}

.gauge-popup-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 10px;
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
}

.gauge-popup-meta span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.gauge-popup-details,
.gauge-associated-poi {
  position: relative;
  border: 1px solid #dbeafe;
  border-radius: 7px;
  background: #f8fbff;
}

.gauge-popup-details > summary,
.gauge-associated-poi > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 34px;
  padding: 6px 9px;
  color: #075985;
  list-style: none;
  cursor: pointer;
}

.gauge-popup-details > summary::-webkit-details-marker,
.gauge-associated-poi > summary::-webkit-details-marker {
  display: none;
}

.gauge-popup-details > summary span,
.gauge-associated-poi > summary span {
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
}

.gauge-popup-details > summary::after,
.gauge-associated-poi > summary::after {
  content: "+";
  color: #0284c7;
  font-size: 16px;
  font-weight: 900;
}

.gauge-popup-details[open] > summary::after,
.gauge-associated-poi[open] > summary::after {
  content: "−";
}

.gauge-popup-details-panel,
.gauge-associated-poi .gauge-associated-poi-list {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 5px);
  z-index: 70;
  max-height: 210px;
  margin: 0;
  padding: 8px;
  overflow: auto;
  border: 1px solid #bfdbfe;
  border-radius: 7px;
  background: #ffffff;
  box-shadow: 0 16px 32px rgba(15, 23, 42, .22);
}

.gauge-popup-details-panel .detail-table,
.gauge-popup-details-panel .gauge-relation-scope-note {
  margin: 0 0 7px;
}

.gauge-service-card h3,
.gauge-service-block h3 {
  margin: 4px 0 0;
  color: #e0f2fe;
  font-size: 15px;
}

.leaflet-popup-content .gauge-service-card h3,
.leaflet-popup-content .gauge-service-block h3 {
  color: #0f172a;
}

.gauge-service-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(34, 211, 238, .22);
  border-radius: 8px;
  background: rgba(14, 165, 233, .08);
}

.gauge-service-head span {
  display: block;
  color: #7dd3fc;
  font-size: 12px;
  font-weight: 700;
}

.gauge-service-head strong {
  display: block;
  margin-top: 2px;
  color: #f8fafc;
  font-size: 16px;
  line-height: 1.35;
}

.leaflet-popup-content .gauge-service-head {
  background: #eff6ff;
  border-color: #bfdbfe;
}

.leaflet-popup-content .gauge-service-head span {
  color: #0284c7;
}

.leaflet-popup-content .gauge-service-head strong {
  color: #0f172a;
}

.entitlement-control {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 4px 7px 4px 10px;
  border: 1px solid rgba(45, 212, 191, .36);
  border-radius: 999px;
  background: rgba(6, 78, 59, .42);
  color: #bbf7d0;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.entitlement-control span {
  color: #bbf7d0;
  font-size: 12px;
}

.entitlement-control select {
  min-height: 24px;
  max-width: 92px;
  padding: 2px 22px 2px 6px;
  border: 0;
  border-radius: 999px;
  color: #ecfdf5;
  background: rgba(2, 44, 34, .88);
  font: inherit;
  cursor: pointer;
}

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

.account-control {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 3px 4px 3px 10px;
  border: 1px solid rgba(45, 212, 191, .36);
  border-radius: 8px;
  background: rgba(6, 78, 59, .42);
  color: #d1fae5;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.account-control button {
  min-height: 26px;
  padding: 3px 9px;
  border-radius: 6px;
  background: rgba(2, 44, 34, .82);
}

.login-dialog {
  width: min(390px, calc(100vw - 32px));
  padding: 0;
  border: 1px solid #bae6fd;
  border-radius: 8px;
  color: #0f172a;
  background: #f8fafc;
  box-shadow: 0 24px 70px rgba(2, 6, 23, .38);
}

.login-dialog::backdrop {
  background: rgba(2, 6, 23, .68);
  backdrop-filter: blur(3px);
}

.login-form {
  display: grid;
  gap: 15px;
  padding: 22px;
}

.login-heading,
.login-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.login-heading span {
  color: #0e7490;
  font-size: 12px;
  font-weight: 800;
}

.login-heading h2 {
  margin: 3px 0 0;
  font-size: 21px;
  letter-spacing: 0;
}

.login-close {
  width: 34px;
  height: 34px;
  padding: 0;
  color: #475569;
  background: #e2e8f0;
}

.login-form label {
  display: grid;
  gap: 6px;
  color: #334155;
  font-size: 13px;
  font-weight: 800;
}

.login-form input {
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  color: #0f172a;
  background: #fff;
  font: inherit;
}

.login-form input:focus {
  border-color: #0891b2;
  outline: 2px solid rgba(8, 145, 178, .18);
  outline-offset: 1px;
}

.login-error {
  margin: 0;
  color: #b91c1c;
  font-size: 13px;
  line-height: 1.45;
}

.login-actions {
  justify-content: flex-end;
}

.login-actions button {
  min-width: 76px;
  min-height: 38px;
}

.toast-layer {
  position: fixed;
  top: 84px;
  right: 24px;
  z-index: 3000;
  display: grid;
  gap: 8px;
  width: min(360px, calc(100vw - 32px));
  pointer-events: none;
}

.toast-message {
  transform: translateY(-8px);
  opacity: 0;
  padding: 10px 12px;
  border: 1px solid rgba(45, 212, 191, .42);
  border-radius: 8px;
  background: rgba(8, 47, 73, .94);
  color: #ecfeff;
  box-shadow: 0 14px 30px rgba(2, 6, 23, .36);
  transition: opacity .18s ease, transform .18s ease;
}

.toast-message.show {
  transform: translateY(0);
  opacity: 1;
}

.toast-message.success { border-color: rgba(34, 197, 94, .55); }
.toast-message.error { border-color: rgba(248, 113, 113, .65); }

.gauge-quality-grade {
  flex: 0 0 auto;
  min-width: 58px;
  padding: 5px 8px;
  border-radius: 999px;
  color: #052e16;
  background: #86efac;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
  text-align: center;
}

.gauge-quality-grade.grade-b { background: #bae6fd; color: #075985; }
.gauge-quality-grade.grade-c { background: #fde68a; color: #92400e; }
.gauge-quality-grade.grade-d { background: #fecaca; color: #991b1b; }

.gauge-entitlement-panel {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(125, 211, 252, .22);
  border-radius: 8px;
  background: rgba(2, 6, 23, .28);
}

.gauge-entitlement-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.gauge-entitlement-tabs button,
.gauge-service-menu > summary,
.gauge-service-actions button,
.gauge-service-link {
  min-height: 32px;
  border: 1px solid rgba(45, 212, 191, .36);
  border-radius: 7px;
  background: rgba(8, 47, 73, .62);
  color: #dff7ff;
  font-weight: 750;
  cursor: pointer;
}

.gauge-entitlement-tabs button.active,
.gauge-entitlement-tabs button:hover,
.gauge-service-menu[open] > summary,
.gauge-service-menu > summary:hover,
.gauge-service-actions button:hover,
.gauge-service-link:hover {
  border-color: rgba(34, 211, 238, .82);
  background: rgba(8, 145, 178, .55);
  color: #ffffff;
}

.gauge-entitlement-panel p {
  margin: 0;
  color: #a7f3d0;
  font-size: 12px;
  line-height: 1.5;
}

.entitlement-current {
  display: grid;
  gap: 3px;
}

.entitlement-current strong {
  color: #f8fafc;
}

.entitlement-current span,
.entitlement-demo-note {
  color: #a7f3d0;
  font-size: 12px;
  line-height: 1.5;
}

.entitlement-feature-list {
  display: grid;
  gap: 6px;
}

.entitlement-feature-list div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 8px;
  border-radius: 7px;
  border: 1px solid rgba(148, 163, 184, .18);
  background: rgba(15, 23, 42, .26);
}

.entitlement-feature-list strong {
  flex: 0 0 auto;
  color: #93c5fd;
}

.entitlement-feature-list .available strong {
  color: #86efac;
}

.entitlement-feature-list .locked {
  color: #94a3b8;
  background: rgba(15, 23, 42, .16);
}

.manual-inundation-panel {
  display: grid;
  gap: 10px;
}

.manual-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #d9f99d;
  font-weight: 800;
}

.manual-grid,
.manual-map-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px;
  gap: 8px;
  align-items: center;
}

.manual-map-row span {
  color: #b6c7dd;
  font-size: 13px;
}

.manual-inundation-panel input,
.manual-inundation-panel textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid rgba(148, 163, 184, .28);
  border-radius: 7px;
  background: rgba(2, 6, 23, .34);
  color: #f8fafc;
  font: inherit;
}

.manual-inundation-panel input {
  min-height: 34px;
  padding: 7px 9px;
}

.manual-inundation-panel textarea {
  height: 74px;
  padding: 8px 9px;
  resize: vertical;
}

.manual-inundation-panel .button-row.compact {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.manual-inundation-panel button {
  min-height: 34px;
  border: 1px solid rgba(45, 212, 191, .35);
  border-radius: 7px;
  background: rgba(15, 118, 110, .72);
  color: #ecfeff;
  font-weight: 850;
  cursor: pointer;
}

.manual-inundation-panel button:hover {
  background: rgba(20, 184, 166, .64);
}

.manual-inundation-panel button.wide {
  width: 100%;
}

.manual-inundation-panel.previewing {
  border-color: rgba(125, 211, 252, .55);
}

.manual-inundation-panel.previewing #manualInundationStatus {
  color: #bae6fd;
}

.gauge-service-menu {
  position: relative;
  z-index: 5;
}

.gauge-service-menu > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 10px;
  list-style: none;
}

.gauge-service-menu > summary::-webkit-details-marker {
  display: none;
}

.gauge-service-menu > summary small {
  color: #93c5fd;
  font-size: 12px;
  font-weight: 750;
}

.gauge-service-menu > summary::after {
  content: "";
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform .16s ease;
}

.gauge-service-menu[open] > summary::after {
  transform: rotate(225deg);
}

.gauge-service-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.gauge-service-menu .gauge-service-actions {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 50;
  padding: 8px;
  border: 1px solid rgba(45, 212, 191, .34);
  border-radius: 8px;
  background: rgba(7, 17, 30, .98);
  box-shadow: 0 14px 34px rgba(2, 6, 23, .35);
}

.gauge-associated-poi {
  display: block;
}

.gauge-associated-poi-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: #dbeafe;
  font-weight: 900;
}

.gauge-associated-poi-head span {
  color: #7dd3fc;
  font-size: 12px;
  font-weight: 800;
}

.gauge-associated-poi-list {
  display: grid;
  gap: 6px;
  max-height: 168px;
  overflow: auto;
}

.gauge-associated-poi-item {
  display: grid !important;
  gap: 2px;
}

.gauge-associated-poi-item span,
.gauge-associated-poi-item em {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.gauge-associated-poi-item em {
  color: #bae6fd;
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
}

.gauge-associated-poi.empty {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 9px;
  color: #94a3b8;
}

.gauge-associated-poi.empty span {
  color: #475569;
  font-weight: 800;
}

.gauge-associated-poi.empty small {
  font-size: 11px;
}

.gauge-service-feedback {
  margin-bottom: 8px;
  padding: 8px 10px;
  border: 1px solid rgba(45, 212, 191, .42);
  border-radius: 7px;
  background: rgba(13, 148, 136, .16);
  color: #a7f3d0;
  font-weight: 800;
}

.gauge-service-block {
  padding-top: 8px;
  border-top: 1px solid rgba(148, 163, 184, .18);
}

.gauge-service-explanation p {
  margin: 0;
  color: #d5e3f7;
  line-height: 1.65;
}

.leaflet-popup-content .gauge-entitlement-panel {
  background: #f8fafc;
  border-color: #dbeafe;
}

.leaflet-popup-content .gauge-entitlement-panel p {
  color: #0369a1;
}

.leaflet-popup-content .gauge-entitlement-tabs button,
.leaflet-popup-content .gauge-service-menu > summary,
.leaflet-popup-content .gauge-service-actions button,
.leaflet-popup-content .gauge-service-link {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #075985;
}

.leaflet-popup-content .gauge-entitlement-tabs button.active,
.leaflet-popup-content .gauge-entitlement-tabs button:hover,
.leaflet-popup-content .gauge-service-menu[open] > summary,
.leaflet-popup-content .gauge-service-menu > summary:hover,
.leaflet-popup-content .gauge-service-actions button:hover,
.leaflet-popup-content .gauge-service-link:hover {
  background: #dbeafe;
  border-color: #38bdf8;
}

.leaflet-popup-content .gauge-service-menu > summary small {
  color: #0284c7;
}

.leaflet-popup-content .gauge-service-menu .gauge-service-actions {
  background: #ffffff;
  border-color: #bfdbfe;
  box-shadow: 0 16px 30px rgba(15, 23, 42, .18);
}

.leaflet-popup-content .gauge-associated-poi {
  border-color: #e5e7eb;
}

.leaflet-popup-content .gauge-associated-poi-head {
  color: #0f172a;
}

.leaflet-popup-content .gauge-associated-poi-head span {
  color: #0284c7;
}

.leaflet-popup-content .gauge-associated-poi-item em {
  color: #64748b;
}

.leaflet-popup-content .gauge-associated-poi-item {
  color: #075985;
  background: #eff6ff;
  border-color: #bfdbfe;
}

.leaflet-popup-content .gauge-associated-poi-item:hover,
.leaflet-popup-content .gauge-associated-poi-item:focus-visible {
  color: #0f172a;
  background: #dbeafe;
  border-color: #38bdf8;
}

* { box-sizing: border-box; }
html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
html, body, #app { height: 100%; margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  overflow: hidden;
}

.site-compliance {
  align-items: center;
  background: rgba(7, 19, 31, 0.96);
  border-top: 1px solid rgba(45, 212, 191, 0.24);
  bottom: 0;
  display: grid;
  font-size: 11px;
  height: 20px;
  left: 0;
  letter-spacing: 0;
  line-height: 1.2;
  position: fixed;
  right: 0;
  text-align: center;
  z-index: 1299;
}

.site-compliance a {
  color: rgba(226, 232, 240, 0.9);
  text-decoration: none;
}

.leaflet-bottom {
  bottom: 20px;
}

.site-compliance a:hover,
.site-compliance a:focus-visible {
  color: #ffffff;
  text-decoration: underline;
}

@media (max-width: 680px) {
  .site-compliance {
    font-size: 9px;
    white-space: nowrap;
  }
}
button, input, select { font: inherit; min-width: 0; }
button {
  border: 1px solid var(--line);
  background: rgba(30, 41, 59, 0.82);
  color: var(--text);
  border-radius: 6px;
  min-height: 36px;
  height: auto;
  padding: 8px 14px;
  cursor: pointer;
  line-height: 1.25;
  white-space: normal;
  overflow-wrap: anywhere;
  text-wrap: balance;
}
button:hover { border-color: rgba(56, 189, 248, 0.75); }
button.primary {
  background: linear-gradient(135deg, var(--blue), var(--violet));
  border-color: transparent;
}

.topbar {
  height: 72px;
  display: grid;
  grid-template-columns: minmax(440px, 1fr) auto;
  align-items: center;
  padding: 0 18px 0 14px;
  gap: 18px;
  background:
    radial-gradient(circle at 104px 50%, rgba(45, 212, 191, .18) 0 1px, transparent 2px 100%),
    radial-gradient(circle at 82% -90%, rgba(20, 184, 166, .18), transparent 44%),
    linear-gradient(96deg, #07131f 0%, #0a1d2a 48%, #0d1724 100%);
  border-bottom: 1px solid rgba(45, 212, 191, 0.32);
  box-shadow: 0 12px 32px rgba(0,0,0,.32), inset 0 -1px 0 rgba(45, 212, 191, .12);
  position: relative;
  z-index: 20;
  overflow: hidden;
}
.topbar::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(45, 212, 191, .13), transparent 18%),
    repeating-linear-gradient(90deg, transparent 0 42px, rgba(94, 234, 212, .045) 43px 44px),
    repeating-linear-gradient(0deg, transparent 0 24px, rgba(148, 163, 184, .035) 25px 26px);
  mask-image: linear-gradient(90deg, #000 0%, rgba(0,0,0,.62) 58%, transparent 100%);
}
.topbar::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, #2dd4bf 18%, #38bdf8 54%, rgba(45, 212, 191, .2) 82%, transparent);
  opacity: .9;
}
.brand { display: flex; align-items: center; gap: 14px; min-width: 0; position: relative; z-index: 1; }
.brand-mark {
  width: 44px; height: 44px; border-radius: 12px;
  display: grid; place-items: center; font-weight: 900;
  color: #dffcf7;
  background:
    radial-gradient(circle at 32% 24%, rgba(240, 253, 250, .52), transparent 18%),
    linear-gradient(145deg, rgba(6, 78, 59, .92), rgba(13, 148, 136, .8) 54%, rgba(14, 116, 144, .72));
  border: 1px solid rgba(94, 234, 212, .5);
  box-shadow: 0 0 0 1px rgba(20, 184, 166, .16), 0 0 24px rgba(20, 184, 166, .24);
  position: relative;
  isolation: isolate;
}
.brand-mark::before,
.brand-mark::after {
  content: "";
  position: absolute;
  pointer-events: none;
}
.brand-mark::before {
  inset: 6px;
  border: 1px solid rgba(204, 251, 241, .32);
  border-radius: 10px;
  transform: rotate(45deg) scale(.72);
  opacity: .82;
}
.brand-mark::after {
  width: 6px;
  height: 6px;
  right: 8px;
  top: 8px;
  border-radius: 999px;
  background: #99f6e4;
  box-shadow: 0 0 12px rgba(153, 246, 228, .75);
}
.brand-drop {
  width: 22px;
  height: 30px;
  display: block;
  position: relative;
  z-index: 1;
  border-radius: 70% 70% 78% 78% / 72% 72% 92% 92%;
  background:
    radial-gradient(circle at 35% 34%, rgba(255,255,255,.94) 0 3px, rgba(255,255,255,.46) 4px, transparent 7px),
    linear-gradient(180deg, #eaffff 0%, #67e8f9 38%, #14b8a6 100%);
  box-shadow: inset -4px -7px 10px rgba(8, 47, 73, .28), 0 0 16px rgba(94, 234, 212, .68);
  clip-path: path("M11 0 C17 7 22 13 22 20 C22 26 17 30 11 30 C5 30 0 26 0 20 C0 13 5 7 11 0 Z");
}
@supports not (clip-path: path("M0 0L1 1")) {
  .brand-drop {
    width: 20px;
    height: 20px;
    border-radius: 50% 50% 50% 0;
    transform: rotate(45deg);
  }
  .brand-drop::before {
    transform: rotate(-21deg);
  }
}
.brand-drop::before {
  content: "";
  position: absolute;
  width: 8px;
  height: 13px;
  left: 5px;
  top: 8px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255,255,255,.72), rgba(255,255,255,0));
  transform: rotate(24deg);
}
.brand-copy { min-width: 0; }
.brand-kicker {
  color: #5eead4;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  line-height: 1.1;
  margin-bottom: 3px;
  opacity: .92;
}
.brand h1 { margin: 0; font-size: 22px; letter-spacing: 0; line-height: 1.12; overflow-wrap: anywhere; }
.brand p {
  margin: 5px 0 0;
  color: #9fb6d3;
  font-size: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.brand p span {
  padding: 2px 7px;
  border: 1px solid rgba(45, 212, 191, .18);
  border-radius: 999px;
  background: rgba(8, 47, 73, .32);
}
.top-actions { display: flex; align-items: center; gap: 10px; color: var(--muted); white-space: nowrap; position: relative; z-index: 1; }
#clockText {
  color: #c8dde5;
  font-variant-numeric: tabular-nums;
  padding: 6px 9px;
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 999px;
  background: rgba(2, 8, 23, .34);
}
.forecast-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 235px;
  padding: 6px 10px;
  border: 1px solid rgba(45, 212, 191, .28);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(8, 83, 76, .46), rgba(15, 23, 42, .74));
  color: #d9fbf6;
  font-size: 12px;
  overflow: hidden;
  box-shadow: inset 0 0 18px rgba(20, 184, 166, .1);
}
.forecast-status[data-tone="ok"] { border-color: rgba(34, 197, 94, .42); color: #bbf7d0; }
.forecast-status[data-tone="error"] { border-color: rgba(248, 113, 113, .48); color: #fecaca; }
.forecast-status[data-tone="loading"] { border-color: rgba(34, 211, 238, .42); color: #a5f3fc; }
.data-source-status { max-width: 210px; }
.forecast-status-tag {
  flex: 0 0 auto;
  padding: 2px 6px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  color: #04111f;
  background: #94a3b8;
}
.forecast-status-tag.ok { background: #86efac; }
.forecast-status-tag.error { background: #fecaca; }
.forecast-status-tag.loading { background: #67e8f9; }
.forecast-status-tag.idle { background: #bfdbfe; }
.forecast-status-message {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.scenario-select {
  min-height: 34px;
  max-width: 172px;
  padding: 6px 30px 6px 11px;
  border-radius: 8px;
  color: #d9fbf6;
  border: 1px solid rgba(94, 234, 212, .24);
  background:
    linear-gradient(135deg, rgba(8, 47, 73, .72), rgba(15, 23, 42, .88)),
    linear-gradient(135deg, rgba(45, 212, 191, .14), rgba(37, 99, 235, .10));
  box-shadow: inset 0 0 16px rgba(20, 184, 166, .10);
  cursor: pointer;
}
.scenario-select:focus {
  outline: 2px solid rgba(34, 211, 238, .42);
  outline-offset: 2px;
}
.scenario-select option {
  color: #0f172a;
  background: #f8fafc;
}
.top-actions button {
  min-height: 34px;
  border-radius: 8px;
  background: rgba(15, 23, 42, .62);
  border-color: rgba(94, 234, 212, .2);
}
.top-actions button.primary {
  background: linear-gradient(135deg, #0f766e, #0891b2 62%, #2563eb);
  border-color: rgba(94, 234, 212, .32);
  box-shadow: 0 0 18px rgba(20, 184, 166, .22);
}
.top-actions button.secondary-action {
  color: #cdeff4;
  background: rgba(8, 47, 73, .7);
  border-color: rgba(34, 211, 238, .28);
}
.top-actions button.secondary-action:hover {
  background: rgba(14, 116, 144, .42);
  border-color: rgba(103, 232, 249, .5);
}

.workspace {
  height: calc(100% - 72px);
  display: grid;
  grid-template-columns: 248px minmax(520px, 1fr) minmax(380px, 420px);
  gap: 0;
  min-height: 0;
}
.left-panel, .right-panel {
  background: rgba(8, 15, 29, 0.98);
  border-right: 1px solid var(--line);
  padding: 16px 14px;
  overflow: auto;
  min-height: 0;
}
.right-panel { border-right: 0; border-left: 1px solid var(--line); }
.panel {
  background: linear-gradient(180deg, rgba(13, 25, 44, .98), rgba(7, 14, 26, .96));
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 14px;
  box-shadow: 0 12px 28px rgba(0,0,0,.22);
}
.panel-title {
  font-size: 17px;
  font-weight: 900;
  color: #f8fbff;
  margin-bottom: 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  line-height: 1.3;
  overflow-wrap: anywhere;
  letter-spacing: 0;
  text-shadow: 0 1px 14px rgba(34, 211, 238, .18);
}
.right-panel .panel-title {
  min-height: 34px;
  padding: 0 0 10px;
  border-bottom: 1px solid rgba(34, 211, 238, .22);
  position: relative;
}
.right-panel .panel-title::before {
  content: "";
  width: 4px;
  height: 18px;
  border-radius: 999px;
  background: linear-gradient(180deg, #67e8f9, #2563eb);
  box-shadow: 0 0 16px rgba(34, 211, 238, .45);
}
.tool {
  width: 100%;
  min-height: 46px;
  margin: 5px 0;
  text-align: left;
  padding: 10px 12px 10px 16px;
  display: flex;
  align-items: center;
}
.tool.active {
  border-color: rgba(34, 211, 238, .7);
  background: rgba(20, 184, 166, .18);
}
.layer-checklist {
  display: grid;
  gap: 8px;
}
.layer-panel label,
.theme-list label,
.overlay-list label {
  display: flex;
  gap: 10px;
  align-items: center;
  min-height: 36px;
  color: #d7e3f4;
  font-size: 14px;
  line-height: 1.35;
  padding: 8px 10px;
  border: 1px solid rgba(148, 163, 184, .16);
  border-radius: 7px;
  background: rgba(15, 23, 42, .48);
  overflow-wrap: anywhere;
}
.theme-list label:has(input:checked),
.overlay-list label:has(input:checked) {
  border-color: rgba(34, 211, 238, .56);
  background: rgba(20, 184, 166, .14);
}
.layer-checklist input {
  flex: 0 0 auto;
  accent-color: var(--cyan);
}
.social-layer-status {
  margin-top: 8px;
  color: #a7f3d0;
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.social-layer-status[data-status="replay_fixture"],
.social-layer-status[data-status="previous_valid_kept"] {
  color: #fde68a;
}
.social-layer-status[data-status="source_unavailable"] {
  color: #fca5a5;
}
.social-event-icon {
  background: transparent;
  border: 0;
}
.social-event-marker {
  position: relative;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 50% 50% 50% 6px;
  transform: rotate(-45deg);
  background: #ef4444;
  color: #fff;
  box-shadow: 0 4px 13px rgba(15, 23, 42, .38);
}
.social-event-marker span {
  transform: rotate(45deg);
  font-size: 12px;
  font-weight: 900;
}
.social-event-marker.replay_fixture,
.social-event-marker.previous_valid_kept {
  background: #f59e0b;
}
.social-event-marker.partial_refresh {
  background: #0ea5e9;
}
.social-event-marker.source_unavailable {
  background: #64748b;
}
.advanced-group {
  display: grid;
  gap: 8px;
}
body:not(.diagnostic-mode-enabled) .advanced-group,
body:not([data-user-mode="manual"]) .manual-inundation-panel {
  display: none;
}
.diagnostic-layer-panel[hidden] {
  display: none;
}
.advanced-group summary {
  min-height: 32px;
  padding: 7px 10px;
  border: 1px dashed rgba(148, 163, 184, .28);
  border-radius: 7px;
  color: #9fb5ce;
  font-size: 13px;
  cursor: pointer;
  list-style-position: inside;
  background: rgba(15, 23, 42, .28);
}
.advanced-group[open] summary {
  color: #d7e3f4;
  border-color: rgba(34, 211, 238, .35);
  background: rgba(20, 184, 166, .08);
}
.advanced-group label {
  margin-top: 8px;
}
.layer-note {
  margin: -4px 0 8px;
  color: #9fb5ce;
  font-size: 12px;
  line-height: 1.45;
  border-left: 3px solid rgba(56, 189, 248, .55);
  padding-left: 8px;
}
.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.health-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}
.health-grid div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  background: rgba(15, 23, 42, .74);
  border: 1px solid rgba(148, 163, 184, .16);
  border-radius: 7px;
  padding: 10px;
}
.health-grid span { color: var(--muted); font-size: 13px; }
.health-grid strong { color: #67e8f9; font-size: 16px; overflow-wrap: anywhere; text-align: right; }
.stat-grid div {
  background: rgba(15, 23, 42, 0.82);
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 7px;
  padding: 10px;
}
.stat-grid strong { display: block; font-size: 24px; color: var(--cyan); }
.stat-grid span { color: var(--muted); font-size: 12px; }
.mini-note {
  margin-top: 12px;
  color: #c7d2fe;
  font-size: 13px;
  line-height: 1.55;
}

.map-stage { position: relative; min-width: 0; min-height: 0; isolation: isolate; }
#map { position: absolute; inset: 0; z-index: 0; background: #dce5eb; }
.leaflet-popup-pane { z-index: 1450; }
.leaflet-control-attribution { font-size: 10px; }
.map-search {
  position: absolute;
  top: 14px;
  left: 58px;
  z-index: 1300;
  display: flex;
  width: 42px;
  height: 42px;
  background: transparent;
  border-radius: 8px;
  transition: width .18s ease, box-shadow .18s ease, background-color .18s ease;
}
.map-search.expanded {
  width: min(420px, calc(100% - 28px));
  background: rgba(255,255,255,.96);
  box-shadow: 0 10px 24px rgba(15,23,42,.22);
}
.map-search-toggle {
  position: relative;
  flex: 0 0 42px;
  width: 42px;
  min-width: 42px;
  min-height: 42px;
  padding: 0;
  border: 1px solid rgba(103, 232, 249, .42);
  border-radius: 8px;
  background: rgba(8, 47, 73, .92);
  color: #e0f2fe;
  box-shadow: 0 8px 18px rgba(15,23,42,.22);
  cursor: pointer;
}
.map-search.expanded .map-search-toggle {
  border-color: transparent;
  border-right: 1px solid #dbeafe;
  border-radius: 8px 0 0 8px;
  background: #0f766e;
  box-shadow: none;
}
.map-search-toggle:hover,
.map-search-toggle:focus-visible {
  background: #0369a1;
  outline: 2px solid rgba(103, 232, 249, .34);
  outline-offset: 2px;
}
.search-glyph {
  position: absolute;
  left: 13px;
  top: 11px;
  width: 12px;
  height: 12px;
  border: 2px solid currentColor;
  border-radius: 50%;
}
.search-glyph::after {
  content: "";
  position: absolute;
  right: -6px;
  bottom: -4px;
  width: 7px;
  height: 2px;
  border-radius: 1px;
  background: currentColor;
  transform: rotate(45deg);
  transform-origin: left center;
}
.map-search-panel {
  display: none;
  min-width: 0;
  flex: 1;
  align-items: stretch;
  overflow: hidden;
  border-radius: 0 8px 8px 0;
}
.map-search.expanded .map-search-panel {
  display: flex;
}
.map-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  padding: 0 14px;
  outline: 0;
  color: #172033;
  min-height: 40px;
  background: transparent;
}
.map-search #searchBtn {
  border: 0;
  border-radius: 0;
  background: #0f766e;
  color: #fff;
}
.map-search-close {
  width: 38px;
  min-width: 38px;
  min-height: 42px;
  padding: 0;
  border: 0;
  border-left: 1px solid #e2e8f0;
  border-radius: 0;
  background: #f8fafc;
  color: #475569;
  font-size: 22px;
  line-height: 1;
}
.map-search-close:hover,
.map-search-close:focus-visible {
  background: #e2e8f0;
  color: #0f172a;
  outline: none;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.map-reset-view {
  position: absolute;
  top: 72px;
  left: 50%;
  z-index: 1300;
  min-height: 38px;
  transform: translateX(-50%);
  padding: 0 16px;
  border: 1px solid rgba(14, 165, 233, .36);
  border-radius: 999px;
  background: rgba(15, 23, 42, .90);
  color: #e0f2fe;
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
  box-shadow: 0 12px 26px rgba(15,23,42,.24);
}
.map-reset-view:hover,
.map-reset-view:focus-visible {
  background: rgba(3, 105, 161, .95);
  border-color: rgba(103, 232, 249, .72);
  outline: none;
}
.map-stage:has(.leaflet-popup) .map-reset-view {
  left: auto;
  right: 18px;
  transform: none;
}
.legend-card, .timeline {
  position: absolute;
  z-index: 1300;
  background: rgba(255,255,255,.94);
  color: #1f2937;
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(15,23,42,.20);
}
.legend-card {
  left: 18px;
  bottom: 146px;
  z-index: 1350;
  pointer-events: auto;
  width: 310px;
  padding: 12px 14px;
  font-size: 13px;
  max-height: min(390px, calc(100vh - 272px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.legend-toggle {
  display: flex;
  width: 100%;
  min-height: 30px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #0f172a;
}
.legend-toggle span {
  padding: 3px 8px;
  border-radius: 999px;
  background: #e0f2fe;
  color: #0369a1;
  font-size: 12px;
}
.legend-body {
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
  scrollbar-width: thin;
}
.legend-body.collapsed { display: none; }
.legend-section { margin-top: 8px; }
.legend-section + .legend-section {
  border-top: 1px solid rgba(15, 23, 42, .12);
  padding-top: 9px;
}
.legend-item { display: flex; align-items: flex-start; gap: 8px; margin: 7px 0; line-height: 1.35; }
.swatch { width: 13px; height: 13px; border-radius: 3px; display: inline-block; }
.standard-legend-section .swatch {
  flex: 0 0 auto;
  margin-top: 2px;
}
.legend-standard-note {
  margin: 9px 0 0;
  padding-top: 8px;
  border-top: 1px solid rgba(15, 23, 42, .12);
  color: #475569;
  font-size: 12px;
  line-height: 1.45;
}
.legend-standard-details {
  margin-top: 8px;
  padding: 7px 8px;
  border: 1px solid rgba(14, 116, 144, .18);
  border-radius: 6px;
  background: rgba(240, 249, 255, .72);
  color: #334155;
  font-size: 12px;
  line-height: 1.45;
}
.legend-standard-details summary {
  cursor: pointer;
  font-weight: 800;
  color: #0f766e;
}
.legend-standard-details p {
  margin: 6px 0 0;
}
.layer-source-legend {
  margin-top: 9px;
}
.rain-dot-sample {
  border-radius: 50%;
  background: #1d4ed8;
  box-shadow: 0 0 0 5px rgba(96, 165, 250, .18);
}
.rain-colorbar {
  height: 12px;
  border-radius: 4px;
  border: 1px solid rgba(15, 23, 42, .18);
  margin: 8px 0 10px;
}
.demo-depth-gradient {
  height: 14px;
  border-radius: 5px;
  border: 1px solid rgba(15, 23, 42, .18);
  margin: 9px 0 6px;
  background: linear-gradient(90deg, #8fd3f4 0%, #4aa8df 8%, #207ecb 22%, #6d8fdd 35%, #ed8936 49%, #c2410c 67%, #991b1b 100%);
}
.demo-depth-ticks {
  display: flex;
  justify-content: space-between;
  gap: 4px;
  color: #475569;
  font-size: 11px;
  line-height: 1.2;
}
.timeline {
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  width: min(760px, calc(100% - 60px));
  padding: 12px 18px 10px;
  background: rgba(8, 15, 29, .94);
  color: #dbeafe;
  z-index: 1200;
  pointer-events: auto;
  touch-action: none;
}
.timeline input { width: 100%; accent-color: var(--cyan); }
.time-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; color: #cbd5e1; }
.time-row span { min-width: 0; overflow-wrap: anywhere; }
.time-row button { min-height: 30px; min-width: 74px; padding: 5px 12px; }
.evolution-ticker {
  margin-top: 8px;
  height: 28px;
  overflow: hidden;
  border: 1px solid rgba(34, 211, 238, .24);
  border-radius: 6px;
  background: rgba(15, 23, 42, .82);
  color: #dbeafe;
  white-space: nowrap;
}
.ticker-track {
  display: inline-flex;
  align-items: center;
  gap: 56px;
  min-width: max-content;
  height: 100%;
  padding-left: 100%;
  font-size: 13px;
  line-height: 28px;
  animation: ticker-scroll 38s linear infinite;
}
.ticker-track span { display: inline-block; }
.timeline:hover .ticker-track { animation-play-state: paused; }
@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.loading-mask {
  position: absolute;
  inset: 0;
  z-index: 1500;
  display: none;
  place-items: center;
  background: rgba(15, 23, 42, .42);
  backdrop-filter: blur(2px);
}
.loading-mask.show { display: grid; }
.loading-box {
  width: min(360px, calc(100% - 40px));
  padding: 20px 22px;
  border: 1px solid rgba(34, 211, 238, .32);
  border-radius: 8px;
  background: rgba(8, 15, 29, .96);
  color: #e2e8f0;
  box-shadow: 0 18px 40px rgba(15, 23, 42, .35);
}
.loading-box strong { display: block; margin: 10px 0 6px; font-size: 18px; }
.loading-box p { margin: 0; color: #94a3b8; line-height: 1.5; }
.loading-progress {
  position: relative;
  height: 8px;
  margin-top: 14px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 999px;
  background: rgba(148, 163, 184, .18);
}
.loading-progress span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #22d3ee, #14b8a6, #2563eb);
  box-shadow: 0 0 14px rgba(34, 211, 238, .38);
  transition: width .25s ease;
}
.loading-progress.indeterminate span {
  width: 42%;
  animation: loading-progress-sweep 1.1s ease-in-out infinite;
}
.loading-progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
  color: #cbd5e1;
  font-size: 12px;
}
.loading-progress-meta span:first-child {
  min-width: 0;
  text-align: left;
  overflow-wrap: anywhere;
}
.loader {
  width: 30px;
  height: 30px;
  display: inline-block;
  border-radius: 50%;
  border: 3px solid rgba(34, 211, 238, .20);
  border-top-color: #22d3ee;
  animation: spin 900ms linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
@keyframes loading-progress-sweep {
  0% { transform: translateX(-120%); }
  55% { transform: translateX(60%); }
  100% { transform: translateX(240%); }
}

.score-row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  margin-top: 2px;
}
.eyebrow {
  display: block;
  color: #c7d2fe;
  font-size: 17px;
  font-weight: 900;
  line-height: 1.25;
}
#cityRiskScore {
  display: block;
  margin-top: 5px;
  color: var(--cyan);
  font-size: 38px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0;
}
.badge {
  display: inline-flex;
  min-width: 78px;
  justify-content: center;
  align-self: start;
  margin-top: 14px;
  border-radius: 999px;
  padding: 8px 10px;
  background: rgba(34,197,94,.14);
  color: #86efac;
  border: 1px solid rgba(34,197,94,.35);
}
.rain-chart {
  height: 126px;
  display: grid;
  grid-template-rows: 16px 76px auto;
  gap: 4px;
  padding: 2px 0 6px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 10px;
  position: relative;
  overflow: visible;
}
.dual-chart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(56, 189, 248, .36);
  color: #93c5fd;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
}
.dual-chart-head span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.dual-chart-head i {
  display: inline-block;
  width: 11px;
  height: 3px;
  border-radius: 2px;
  background: #38bdf8;
}
.dual-chart-head .risk-axis-label i {
  background: #f87171;
}
.risk-axis-label { color: #fecaca; }
.dual-chart-columns {
  position: relative;
  display: flex;
  align-items: stretch;
  gap: 3px;
  min-height: 76px;
}
.rain-reference-line {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 1;
  border-top: 1px dashed rgba(250, 204, 21, .74);
  pointer-events: none;
}
.rain-reference-line em {
  position: absolute;
  right: 0;
  top: -8px;
  padding: 1px 4px;
  border-radius: 999px;
  background: rgba(15, 23, 42, .82);
  color: #fde68a;
  font-size: 8px;
  font-style: normal;
  font-weight: 900;
  letter-spacing: 0;
}
.rain-bar {
  flex: 1;
  min-width: 3px;
  padding: 0;
  border: 0;
  background: transparent;
  border-radius: 4px;
  opacity: .92;
  position: relative;
  z-index: 3;
  cursor: pointer;
  transition: background .14s ease, filter .14s ease, opacity .14s ease;
  align-self: stretch;
  min-height: 76px;
}
.rain-bar:hover,
.rain-bar:focus-visible {
  filter: brightness(1.22);
  opacity: 1;
  outline: none;
  background: rgba(148, 163, 184, .10);
}
.rain-bar.active {
  background: rgba(127, 29, 29, .30);
  box-shadow: inset 0 0 0 1px rgba(254, 202, 202, .38), 0 0 16px rgba(248, 113, 113, .22);
}
.chart-rain,
.chart-risk {
  position: absolute;
  display: block;
  pointer-events: none;
}
.chart-rain {
  top: auto;
  bottom: 30px;
  left: 22%;
  right: 22%;
  max-height: 43px;
  min-height: 0;
  border-radius: 3px 3px 0 0;
  background: linear-gradient(180deg, #7dd3fc, #0284c7);
  box-shadow: 0 0 7px rgba(56, 189, 248, .28);
}
.chart-risk {
  bottom: 0;
  left: 48%;
  right: 8%;
  min-height: 3px;
  border-radius: 3px 3px 0 0;
  background: linear-gradient(180deg, #fca5a5, #dc2626);
  box-shadow: 0 0 8px rgba(239, 68, 68, .30);
}
.rain-risk-divider {
  position: absolute;
  left: 0;
  right: 0;
  top: 49px;
  z-index: 1;
  border-top: 1px solid rgba(148, 163, 184, .24);
  pointer-events: none;
}
.risk-line-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 76px;
  z-index: 2;
  overflow: visible;
  pointer-events: none;
}
.risk-midline {
  stroke: rgba(248, 113, 113, .22);
  stroke-width: .7;
  stroke-dasharray: 3 4;
}
.risk-series-line {
  fill: none;
  stroke: #f87171;
  stroke-width: 1.8;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 0 3px rgba(248, 113, 113, .38));
}
.risk-active-point {
  fill: #fff7ed;
  stroke: #ef4444;
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
}
.precision-zone-label {
  pointer-events: none;
}
.precision-zone-label span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(250, 204, 21, .78);
  background: rgba(15, 23, 42, .78);
  color: #fde68a;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
  box-shadow: 0 0 18px rgba(250, 204, 21, .22), 0 10px 22px rgba(15, 23, 42, .28);
  white-space: nowrap;
}
.rain-bar.active .chart-rain {
  background: linear-gradient(180deg, #bae6fd, #0284c7);
}
.rain-bar.active .chart-risk {
  background: linear-gradient(180deg, #fed7aa, #ef4444);
  box-shadow: 0 0 12px rgba(251, 146, 60, .56);
}
.rain-current-label {
  display: inline-flex;
  align-self: start;
  justify-self: center;
  margin-top: 15px;
  z-index: 3;
  min-width: max-content;
  padding: 4px 9px;
  border-radius: 6px;
  border: 1px solid rgba(254, 202, 202, .55);
  background: rgba(127, 29, 29, .94);
  color: #fff7ed;
  font-size: 15px;
  font-weight: 900;
  line-height: 1.15;
  box-shadow: 0 8px 18px rgba(0, 0, 0, .26);
  pointer-events: none;
  white-space: nowrap;
}
.city-risk-summary {
  margin: 10px 0 12px;
  display: grid;
  gap: 10px;
}
.risk-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.mode-summary-card,
.area-metric-grid {
  display: grid;
  gap: 8px;
}
.mode-summary-card {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid rgba(34, 211, 238, .18);
  border-radius: 7px;
  padding: 8px;
  background: rgba(8, 47, 73, .28);
}
.mode-summary-card p {
  grid-column: 1 / -1;
  margin: 0;
  color: #b6c7dc;
  font-size: 12px;
  line-height: 1.45;
}
.area-metric-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.risk-summary-grid > div,
.risk-summary-grid > button {
  min-width: 0;
  border: 1px solid rgba(148, 163, 184, .16);
  border-radius: 7px;
  padding: 8px;
  background: rgba(15, 23, 42, .62);
}
.mode-summary-card div,
.area-metric-grid div {
  min-width: 0;
  border: 1px solid rgba(148, 163, 184, .16);
  border-radius: 7px;
  padding: 8px;
  background: rgba(15, 23, 42, .58);
}
.risk-summary-grid span,
.mode-summary-card span,
.area-metric-grid span,
.summary-title {
  color: var(--muted);
  font-size: 13px;
}
.summary-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-top: 2px;
  color: #c7d2fe;
  font-size: 15px;
  font-weight: 900;
}
.summary-title span {
  min-width: 0;
  color: #93c5fd;
  font-size: 11px;
  font-weight: 700;
  text-align: right;
  overflow-wrap: anywhere;
}
.summary-scope-tag {
  display: inline-block;
  margin-right: 6px;
  padding: 2px 6px;
  border: 1px solid rgba(34, 211, 238, .28);
  border-radius: 999px;
  color: #d9fbf6;
  background: rgba(8, 145, 178, .18);
  font-style: normal;
  font-size: 11px;
}
.risk-summary-grid strong {
  display: block;
  margin-top: 4px;
  color: #67e8f9;
  font-size: 16px;
  overflow-wrap: anywhere;
}
.summary-metric-button {
  width: 100%;
  appearance: none;
  border: 0;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease, transform .16s ease;
}
.summary-metric-button:hover:not(:disabled),
.summary-metric-button:focus-visible:not(:disabled) {
  border-color: rgba(34, 211, 238, .62);
  background: rgba(8, 145, 178, .18);
  transform: translateY(-1px);
  outline: none;
}
.summary-metric-button:disabled,
.depth-area-summary button:disabled {
  cursor: default;
  opacity: .62;
}
.depth-area-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 7px 9px;
  border: 1px solid rgba(148, 163, 184, .14);
  border-radius: 7px;
  background: rgba(15, 23, 42, .38);
}
.depth-area-summary > div,
.depth-area-summary > button {
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
}
.depth-area-summary > button {
  cursor: pointer;
}
.depth-area-summary > button:hover:not(:disabled) strong,
.depth-area-summary > button:focus-visible:not(:disabled) strong {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.depth-area-summary span,
.depth-area-summary small {
  display: block;
  color: var(--muted);
  font-size: 11px;
}
.depth-area-summary strong {
  display: block;
  margin: 2px 0;
  color: #67e8f9;
  font-size: 14px;
}
.depth-area-summary > div:first-child strong {
  color: #facc15;
}
.mode-summary-card strong,
.area-metric-grid strong {
  display: block;
  margin-top: 4px;
  color: #67e8f9;
  font-size: 14px;
  overflow-wrap: anywhere;
}
.area-metric-grid div:nth-child(2) strong {
  color: #facc15;
}
.low-depth-explain {
  border-color: rgba(56, 189, 248, .3);
  background: rgba(14, 116, 144, .22);
}
.probability-summary-note {
  display: grid;
  gap: 3px;
  padding: 8px 10px;
  border: 1px solid rgba(34, 211, 238, .18);
  border-radius: 7px;
  background: rgba(8, 47, 73, .32);
}
.probability-summary-note strong {
  color: #a7f3d0;
  font-size: 13px;
}
.probability-summary-note span {
  color: #b6c7dc;
  font-size: 12px;
  line-height: 1.4;
}
.summary-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 14px;
}
.summary-table th,
.summary-table td {
  border-bottom: 1px solid rgba(148, 163, 184, .12);
  padding: 7px 4px;
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
}
.summary-table th:first-child,
.summary-table td:first-child { width: 24px; color: var(--muted); }
.summary-table th:nth-child(3),
.summary-table td:nth-child(3),
.summary-table th:nth-child(4),
.summary-table td:nth-child(4) { width: 54px; text-align: right; }
.summary-table.objective-table th:nth-child(3),
.summary-table.objective-table td:nth-child(3) { width: 68px; text-align: right; color: #a7f3d0; }
.summary-table.objective-table th:nth-child(4),
.summary-table.objective-table td:nth-child(4),
.summary-table.objective-table th:nth-child(5),
.summary-table.objective-table td:nth-child(5) { width: 48px; text-align: right; }
.summary-click-row {
  cursor: pointer;
  transition: background .16s ease, color .16s ease;
}
.summary-click-row:hover,
.summary-click-row:focus-visible {
  background: rgba(34, 211, 238, .09);
  outline: 1px solid rgba(34, 211, 238, .22);
  outline-offset: -1px;
}
.summary-row-link,
.summary-gauge-link,
.summary-target-link {
  position: relative;
  padding: 0;
  border: 0;
  background: transparent;
  color: #e0f2fe;
  font: inherit;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}
.summary-row-link:hover,
.summary-gauge-link:hover span,
.summary-target-link:hover {
  color: #67e8f9;
  text-decoration: underline;
}
.summary-list {
  margin: 0;
  padding-left: 0;
  color: #dbeafe;
  font-size: 14px;
  line-height: 1.55;
  list-style: none;
  display: grid;
  gap: 4px;
}
.summary-gauge-link {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  width: 100%;
  padding: 4px 16px 4px 2px;
  border-bottom: 1px solid rgba(148, 163, 184, .10);
}
.summary-gauge-link span {
  min-width: 0;
  color: #dbeafe;
  overflow-wrap: anywhere;
}
.summary-gauge-link strong {
  color: #fef3c7;
  font-size: 14px;
}
.summary-gauge-link::after,
.summary-target-link::after,
.summary-row-link::after {
  content: "›";
  position: absolute;
  right: 2px;
  top: 50%;
  transform: translateY(-50%);
  color: #67e8f9;
  font-weight: 900;
  text-decoration: none;
}
.summary-gauge-link.status-zero,
.summary-gauge-link.status-quiet {
  opacity: .72;
}
.summary-gauge-link.status-forecast_attention {
  border-color: rgba(14, 165, 233, .30);
  background: rgba(14, 165, 233, .08);
}
.summary-gauge-link.status-stale,
.summary-gauge-link.status-previous_valid_kept,
.summary-gauge-link.status-offline {
  border-color: rgba(251, 191, 36, .24);
  background: rgba(251, 191, 36, .06);
}
.gauge-monitor-filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}
.gauge-monitor-filters button {
  min-width: 0;
  min-height: 30px;
  border: 1px solid rgba(34, 211, 238, .18);
  border-radius: 7px;
  background: rgba(15, 23, 42, .42);
  color: #bfd3ea;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}
.gauge-monitor-filters button span {
  margin-left: 5px;
  color: #67e8f9;
}
.gauge-monitor-filters button:hover,
.gauge-monitor-filters button:focus-visible,
.gauge-monitor-filters button.active {
  color: #ecfeff;
  border-color: rgba(34, 211, 238, .42);
  background: rgba(8, 145, 178, .20);
  outline: none;
}
.gauge-monitor-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  padding: 3px;
  border: 1px solid rgba(34, 211, 238, .16);
  border-radius: 8px;
  background: rgba(15, 23, 42, .52);
}
.gauge-monitor-tabs button {
  min-width: 0;
  min-height: 30px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: #bfd3ea;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}
.gauge-monitor-tabs button:hover,
.gauge-monitor-tabs button:focus-visible {
  color: #e0f2fe;
  border-color: rgba(34, 211, 238, .28);
  outline: none;
}
.gauge-monitor-tabs button.active {
  color: #67e8f9;
  border-color: rgba(34, 211, 238, .36);
  background: rgba(8, 145, 178, .22);
}
.gauge-monitor-panel {
  display: grid;
  gap: 8px;
}
.gauge-monitor-title {
  margin-top: 0;
}
.gauge-monitor-forecast-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}
.gauge-monitor-forecast-grid div {
  min-width: 0;
  border: 1px solid rgba(148, 163, 184, .14);
  border-radius: 7px;
  padding: 7px 8px;
  background: rgba(8, 47, 73, .28);
}
.gauge-monitor-forecast-grid span {
  display: block;
  color: #8fb3cc;
  font-size: 11px;
}
.gauge-monitor-forecast-grid strong {
  display: block;
  margin-top: 2px;
  color: #67e8f9;
  font-size: 15px;
}
.summary-gauge-forecast-link span {
  display: grid;
  gap: 1px;
}
.summary-gauge-forecast-link span em {
  color: #8fb3cc;
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
}
.summary-gauge-forecast-link strong {
  display: grid;
  justify-items: end;
  gap: 0;
  color: #a7f3d0;
}
.summary-gauge-forecast-link strong small {
  color: #8fb3cc;
  font-size: 10px;
  font-weight: 700;
}
.summary-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.summary-tags span,
.summary-tag {
  max-width: 100%;
  border: 1px solid rgba(34, 211, 238, .22);
  border-radius: 999px;
  padding: 4px 7px;
  color: #cffafe;
  background: rgba(14, 165, 233, .1);
  font-size: 12px;
  overflow-wrap: anywhere;
  cursor: pointer;
}
.summary-tag:hover,
.summary-tag.active {
  color: #fef3c7;
  border-color: rgba(251, 191, 36, .48);
  background: rgba(251, 191, 36, .12);
}
.summary-target-details {
  margin-top: 8px;
}
.summary-target-panel {
  border: 1px solid rgba(148, 163, 184, .16);
  border-radius: 7px;
  background: rgba(15, 23, 42, .54);
  overflow: hidden;
}
.summary-target-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 9px;
  color: #dbeafe;
  border-bottom: 1px solid rgba(148, 163, 184, .12);
}
.summary-target-close {
  min-height: 26px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 12px;
}
.summary-target-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 12px;
}
.summary-target-table th,
.summary-target-table td {
  padding: 6px 7px;
  border-bottom: 1px solid rgba(148, 163, 184, .10);
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
}
.summary-target-table th:nth-child(1),
.summary-target-table td:nth-child(1) { width: 44%; }
.summary-target-table th:nth-child(2),
.summary-target-table td:nth-child(2) { width: 28%; }
.summary-target-table th:nth-child(3),
.summary-target-table td:nth-child(3) { width: 28%; }
.summary-target-link {
  color: #bfdbfe;
  font-size: 12px;
}
.road-impact-detail {
  margin-top: 12px;
  padding: 10px;
  border: 1px solid rgba(249, 115, 22, .22);
  border-radius: 7px;
  background: rgba(15, 23, 42, .48);
}
.road-impact-detail > strong {
  display: block;
  margin-bottom: 8px;
  color: #fed7aa;
  font-size: 14px;
}
.kv { margin: 0; }
.kv div { display: flex; justify-content: space-between; gap: 14px; padding: 7px 0; border-bottom: 1px solid rgba(148,163,184,.12); }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; text-align: right; }
.detail-panel h2 { margin: 2px 0 10px; font-size: 20px; }
.detail-text { color: #d5e3f7; font-size: 14px; line-height: 1.65; max-height: 320px; overflow: auto; }
.detail-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}
.detail-actions button { width: 100%; min-width: 0; }
#clearSelectionBtn {
  background: rgba(148, 163, 184, .16);
  color: #dbeafe;
  border-color: rgba(148, 163, 184, .32);
}
.detail-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  line-height: 1.45;
}
.detail-table tr { border-bottom: 1px solid rgba(148, 163, 184, .14); }
.detail-table th {
  width: 34%;
  padding: 7px 8px 7px 0;
  color: var(--muted);
  font-weight: 600;
  text-align: left;
  vertical-align: top;
}
.detail-table td {
  padding: 7px 0;
  color: #e5edf7;
  word-break: break-word;
  vertical-align: top;
}
.poi-link-list {
  display: grid;
  gap: 6px;
}
.poi-detail-link {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 6px 8px;
  border: 1px solid rgba(147, 197, 253, .16);
  border-radius: 6px;
  background: rgba(37, 99, 235, .08);
  color: #93c5fd;
  font: inherit;
  text-align: left;
  text-decoration: none;
  line-height: 1.35;
  cursor: pointer;
  position: relative;
}
.poi-detail-link::before {
  display: none;
}
.poi-list-vector {
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--poi-color) 45%, transparent);
  border-radius: 5px;
  color: var(--poi-color);
  background: rgba(255,255,255,.92);
}
.poi-list-vector svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.poi-link-copy {
  min-width: 0;
  display: grid;
  gap: 1px;
}
.poi-link-copy strong {
  overflow-wrap: anywhere;
}
.poi-link-copy small {
  color: #94a3b8;
  font-size: 11px;
  font-weight: 600;
}
.poi-detail-link:hover,
.poi-detail-link:focus-visible {
  color: #fef3c7;
  border-color: rgba(251, 191, 36, .52);
  background: rgba(251, 191, 36, .12);
  text-decoration: underline;
  outline: 0;
}
.poi-detail-link.active {
  color: #fbbf24;
  font-weight: 800;
  border-color: rgba(251, 191, 36, .62);
  background: rgba(251, 191, 36, .16);
}
.form-stack { display: grid; gap: 8px; }
.form-stack input,
.form-stack select {
  width: 100%;
  min-height: 36px;
  border: 1px solid rgba(148, 163, 184, .25);
  border-radius: 6px;
  padding: 8px 10px;
  color: var(--text);
  background: rgba(15, 23, 42, .82);
  outline: 0;
}
.form-grid,
.button-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.custom-list {
  margin-top: 10px;
  display: grid;
  gap: 8px;
  color: #d5e3f7;
  font-size: 13px;
  line-height: 1.45;
  max-height: 138px;
  overflow: auto;
}
.custom-item {
  background: rgba(15, 23, 42, .72);
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 7px;
  padding: 8px 10px;
  overflow-wrap: anywhere;
}
.custom-item button {
  margin-top: 6px;
  min-height: 28px;
  padding: 4px 8px;
  font-size: 12px;
}
.assistant-feed {
  max-height: 220px;
  overflow: auto;
  display: grid;
  gap: 10px;
  color: #dbeafe;
  font-size: 14px;
  line-height: 1.55;
}
.assistant-msg {
  background: rgba(15, 23, 42, .76);
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 8px;
  padding: 10px 12px;
}
.quick-actions { display: grid; gap: 8px; margin-top: 12px; }
.quick-actions button { width: 100%; text-align: left; }

.risk-popup { min-width: 220px; }
.leaflet-popup-content-wrapper,
.leaflet-popup-content {
  overflow: visible;
}
.leaflet-popup-content .detail-table th { color: #64748b; }
.leaflet-popup-content .detail-table td { color: #1f2937; }
.info-popup {
  min-width: 220px;
  max-width: min(520px, 72vw);
  color: #1f2937;
  line-height: 1.5;
}
.info-popup-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 5px;
}
.leaflet-popup-content .gauge-popup .info-popup-header {
  padding-right: 20px;
}
.info-popup-title {
  flex: 1;
  min-width: 0;
  color: #111827;
  font-size: 16px;
  font-weight: 900;
  overflow-wrap: anywhere;
}
.leaflet-popup-content .gauge-popup .info-popup-title {
  font-size: 15px;
  line-height: 1.3;
}
.info-popup-collapse {
  flex: 0 0 auto;
  min-height: 24px;
  padding: 2px 9px;
  border: 1px solid rgba(14, 165, 233, .25);
  border-radius: 999px;
  background: rgba(224, 242, 254, .92);
  color: #075985;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  white-space: nowrap;
}
.info-popup-collapse:hover,
.info-popup-collapse:focus-visible {
  background: #bae6fd;
  outline: 2px solid rgba(14, 165, 233, .22);
  outline-offset: 1px;
}
.info-popup-body {
  margin-top: 4px;
}
.social-popup-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.social-popup-summary strong {
  color: #9a3412;
  font-size: 12px;
  text-align: right;
}
.social-source-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 6px;
  background: #ffedd5;
  color: #9a3412;
  font-size: 12px;
  font-weight: 800;
}
.social-popup-text {
  margin: 7px 0 9px;
  padding: 8px 10px;
  border-left: 3px solid #f59e0b;
  background: #fff7ed;
  color: #374151;
  font-size: 13px;
  overflow-wrap: anywhere;
}
.social-popup-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
}
.social-source-link,
.social-source-muted {
  color: #0369a1;
  font-size: 12px;
  font-weight: 800;
}
.social-source-muted {
  color: #64748b;
}
.info-popup.collapsed {
  min-width: 180px;
}
.info-popup.collapsed .info-popup-body {
  display: none;
}
.gauge-forecast-action {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(15, 23, 42, .10);
}
.gauge-forecast-toggle {
  min-height: 28px;
  padding: 4px 11px;
  border: 1px solid rgba(14, 165, 233, .28);
  border-radius: 999px;
  background: rgba(224, 242, 254, .9);
  color: #075985;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}
.gauge-forecast-toggle:hover,
.gauge-forecast-toggle:focus-visible {
  background: #bae6fd;
  outline: 2px solid rgba(14, 165, 233, .20);
  outline-offset: 1px;
}
.gauge-forecast-toggle:disabled {
  cursor: not-allowed;
  color: #94a3b8;
  background: rgba(226, 232, 240, .78);
}
.gauge-forecast-panel {
  display: grid;
  gap: 7px;
  margin-top: 8px;
  padding: 9px;
  border: 1px solid rgba(14, 165, 233, .18);
  border-radius: 8px;
  background: rgba(240, 249, 255, .72);
}
.gauge-forecast-panel[hidden] {
  display: none;
}
.gauge-forecast-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.gauge-forecast-head strong {
  color: #0f172a;
  font-size: 13px;
}
.gauge-forecast-head span {
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
  text-align: right;
}
.gauge-forecast-chart {
  width: 100%;
  max-width: 330px;
  height: auto;
  color: #64748b;
  overflow: visible;
}
.gauge-forecast-chart line {
  stroke: rgba(100, 116, 139, .35);
  stroke-width: 1;
}
.gauge-forecast-chart text {
  fill: #64748b;
  font-size: 9px;
}
.gauge-forecast-chart .forecast-band {
  fill: rgba(14, 165, 233, .18);
  stroke: none;
}
.gauge-forecast-chart .forecast-p50 {
  fill: none;
  stroke: #2563eb;
  stroke-width: 2.1;
}
.gauge-forecast-chart .forecast-prob-area {
  fill: rgba(37, 99, 235, .13);
  stroke: none;
}
.gauge-forecast-chart .forecast-prob-line {
  fill: none;
  stroke: #2563eb;
  stroke-width: 2;
}
.gauge-forecast-chart .forecast-prob-points circle {
  fill: #fff;
  stroke: #2563eb;
  stroke-width: 1.5;
}
.gauge-forecast-chart .forecast-threshold-prob-line {
  fill: none;
  stroke: #f97316;
  stroke-width: 2;
  stroke-dasharray: 6 4;
}
.gauge-forecast-chart .forecast-threshold-prob-points circle {
  fill: #fff7ed;
  stroke: #f97316;
  stroke-width: 1.35;
}
.gauge-forecast-chart .forecast-threshold-prob-label {
  fill: #c2410c;
  stroke: rgba(255, 255, 255, .94);
  stroke-width: 3px;
  paint-order: stroke fill;
  stroke-linejoin: round;
  font-weight: 900;
}
.gauge-forecast-chart .forecast-prob-ref line {
  stroke-width: 1;
  stroke-dasharray: 5 4;
}
.gauge-forecast-chart .forecast-prob-ref.low line { stroke: rgba(34, 197, 94, .7); }
.gauge-forecast-chart .forecast-prob-ref.medium line { stroke: rgba(245, 158, 11, .72); }
.gauge-forecast-chart .forecast-prob-ref.high line { stroke: rgba(239, 68, 68, .72); }
.gauge-forecast-chart .forecast-prob-ref text {
  fill: #475569;
  stroke: rgba(255, 255, 255, .94);
  stroke-width: 3px;
  paint-order: stroke fill;
  stroke-linejoin: round;
  font-weight: 800;
}
.gauge-forecast-chart .forecast-axis-title {
  fill: #0f172a;
  font-weight: 800;
}
.gauge-forecast-chart .forecast-panel-divider {
  stroke: rgba(100, 116, 139, .2);
  stroke-dasharray: 3 4;
}
.gauge-forecast-chart .forecast-observed-point {
  fill: #111827;
  stroke: #fff;
  stroke-width: 1.2;
}
.gauge-forecast-chart .forecast-standard-ref line {
  stroke: rgba(15, 118, 110, .56);
  stroke-width: 1;
  stroke-dasharray: 5 4;
}
.gauge-forecast-chart .forecast-standard-ref.light line { stroke: rgba(14, 165, 233, .54); }
.gauge-forecast-chart .forecast-standard-ref.medium line { stroke: rgba(250, 204, 21, .64); }
.gauge-forecast-chart .forecast-standard-ref.heavy line { stroke: rgba(239, 68, 68, .64); }
.gauge-forecast-chart .forecast-standard-ref text {
  fill: #0f766e;
  stroke: rgba(255, 255, 255, .94);
  stroke-width: 3px;
  paint-order: stroke fill;
  stroke-linejoin: round;
  font-weight: 900;
}
.gauge-forecast-chart .forecast-hit {
  fill: transparent;
  stroke: transparent;
  pointer-events: auto;
  cursor: crosshair;
}
.gauge-forecast-chart .forecast-hit:hover,
.gauge-forecast-chart .forecast-hit.locked {
  fill: rgba(37, 99, 235, .06);
  stroke: rgba(37, 99, 235, .28);
  stroke-width: 1;
}
.gauge-forecast-panel.hide-band .forecast-band,
.gauge-forecast-dialog-card.hide-band .forecast-band,
.gauge-forecast-dialog-main.hide-band .forecast-band { display: none; }
.gauge-forecast-panel.hide-p50 .forecast-p50,
.gauge-forecast-dialog-card.hide-p50 .forecast-p50,
.gauge-forecast-dialog-main.hide-p50 .forecast-p50 { display: none; }
.gauge-forecast-panel.hide-prob .forecast-probability-layer,
.gauge-forecast-dialog-card.hide-prob .forecast-probability-layer,
.gauge-forecast-dialog-main.hide-prob .forecast-probability-layer { display: none; }
.gauge-forecast-panel.hide-wet-prob .forecast-wet-probability-layer,
.gauge-forecast-dialog-card.hide-wet-prob .forecast-wet-probability-layer,
.gauge-forecast-dialog-main.hide-wet-prob .forecast-wet-probability-layer { display: none; }
.gauge-forecast-panel.hide-threshold-prob .forecast-threshold-probability-layer,
.gauge-forecast-dialog-card.hide-threshold-prob .forecast-threshold-probability-layer,
.gauge-forecast-dialog-main.hide-threshold-prob .forecast-threshold-probability-layer { display: none; }
.gauge-forecast-panel.hide-standard .forecast-standard-lines,
.gauge-forecast-dialog-card.hide-standard .forecast-standard-lines,
.gauge-forecast-dialog-main.hide-standard .forecast-standard-lines { display: none; }
.gauge-forecast-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  color: #475569;
  font-size: 11px;
  font-weight: 700;
}
.gauge-forecast-legend span,
.gauge-forecast-legend button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.gauge-forecast-legend button {
  min-height: 22px;
  padding: 2px 6px;
  border: 1px solid rgba(14, 165, 233, .16);
  border-radius: 999px;
  background: rgba(255, 255, 255, .58);
  color: #475569;
  font: inherit;
  cursor: pointer;
}
.gauge-forecast-legend button:hover,
.gauge-forecast-legend button:focus-visible {
  border-color: rgba(14, 165, 233, .38);
  color: #075985;
  outline: none;
}
.gauge-forecast-legend button.muted {
  opacity: .46;
  text-decoration: line-through;
}
.gauge-forecast-legend i {
  width: 13px;
  height: 4px;
  border-radius: 999px;
}
.gauge-forecast-legend .band { background: rgba(14, 165, 233, .26); }
.gauge-forecast-legend .median { background: #2563eb; }
.gauge-forecast-legend .prob { background: #2563eb; }
.gauge-forecast-legend .threshold-prob {
  background: repeating-linear-gradient(90deg, #f97316 0 5px, transparent 5px 8px);
}
.gauge-forecast-legend .observed {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #111827;
}
.gauge-forecast-legend .standard { background: repeating-linear-gradient(90deg, #0f766e 0 4px, transparent 4px 8px); }
.gauge-chart-readout {
  min-height: 24px;
  padding: 5px 7px;
  border: 1px solid rgba(14, 165, 233, .14);
  border-radius: 6px;
  background: rgba(255, 255, 255, .58);
  color: #0f172a;
  font-size: 11px;
  font-weight: 800;
  overflow-wrap: anywhere;
}
.gauge-forecast-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}
.gauge-forecast-stat-grid div {
  min-width: 0;
  border: 1px solid rgba(100, 116, 139, .12);
  border-radius: 6px;
  padding: 5px 6px;
  background: rgba(255, 255, 255, .58);
}
.gauge-forecast-stat-grid span {
  display: block;
  color: #64748b;
  font-size: 10px;
}
.gauge-forecast-stat-grid strong {
  display: block;
  margin-top: 1px;
  color: #0f766e;
  font-size: 12px;
}
.gauge-standard-panel {
  display: grid;
  gap: 5px;
  border-top: 1px solid rgba(14, 165, 233, .18);
  padding-top: 7px;
}
.gauge-standard-panel div {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 6px;
  align-items: baseline;
}
.gauge-standard-panel span {
  color: #64748b;
  font-size: 10px;
  font-weight: 700;
}
.gauge-standard-panel strong {
  min-width: 0;
  color: #0f172a;
  font-size: 11px;
  font-weight: 800;
  overflow-wrap: anywhere;
}
.gauge-standard-panel p {
  margin: 2px 0 0;
  color: #475569;
  font-size: 10px;
  line-height: 1.4;
}
.gauge-forecast-empty {
  padding: 8px;
  border-radius: 7px;
  color: #64748b;
  background: rgba(226, 232, 240, .55);
  font-size: 12px;
  font-weight: 700;
}
.gauge-forecast-empty.dark {
  color: #a9c5de;
  background: rgba(15, 23, 42, .46);
}
.gauge-forecast-dialog[hidden] {
  display: none;
}
.gauge-forecast-dialog {
  position: fixed;
  inset: 0;
  z-index: 2600;
  display: grid;
  place-items: center;
  padding: 28px;
}
.gauge-forecast-dialog-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, .62);
  backdrop-filter: blur(5px);
}
.gauge-forecast-dialog-card {
  position: relative;
  width: min(1040px, calc(100vw - 56px));
  max-height: min(760px, calc(100vh - 56px));
  overflow: auto;
  border: 1px solid rgba(56, 189, 248, .26);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(248, 252, 255, .98), rgba(232, 244, 252, .98));
  box-shadow: 0 28px 70px rgba(2, 6, 23, .42);
  color: #0f172a;
  transform: translate3d(var(--drag-x, 0px), var(--drag-y, 0px), 0);
}
.leaflet-popup.draggable-info-window {
  translate: var(--drag-x, 0px) var(--drag-y, 0px);
}
.draggable-info-window-handle {
  cursor: grab;
  user-select: none;
}
.draggable-info-window-handle:active {
  cursor: grabbing;
}
.gauge-forecast-dialog-header {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 22px 14px;
  border-bottom: 1px solid rgba(14, 165, 233, .18);
  background: rgba(248, 252, 255, .96);
}
.gauge-forecast-dialog-header span {
  display: block;
  color: #0891b2;
  font-size: 12px;
  font-weight: 900;
}
.gauge-forecast-dialog-header h2 {
  margin: 4px 0 2px;
  color: #0f172a;
  font-size: 22px;
  letter-spacing: 0;
}
.gauge-forecast-dialog-header p {
  margin: 0;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}
.gauge-forecast-dialog-close {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 6px 14px;
  border: 1px solid rgba(14, 165, 233, .24);
  border-radius: 999px;
  background: #e0f2fe;
  color: #075985;
  font-weight: 900;
  cursor: pointer;
}
.gauge-forecast-dialog-close:hover,
.gauge-forecast-dialog-close:focus-visible {
  background: #bae6fd;
  outline: 2px solid rgba(14, 165, 233, .20);
  outline-offset: 2px;
}
.gauge-forecast-dialog-body {
  padding: 18px 22px 22px;
}
.gauge-forecast-dialog-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 18px;
}
.gauge-business-replay-intro {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  padding: 9px 12px;
  border-left: 4px solid #0e7490;
  background: rgba(224, 242, 254, .72);
}
.gauge-business-replay-intro strong { color: #0f172a; font-size: 14px; }
.gauge-business-replay-intro span { color: #475569; font-size: 11px; text-align: right; }
.gauge-business-replay-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 230px;
  gap: 16px;
}
.gauge-business-replay-main { min-width: 0; }
.gauge-business-replay-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 9px;
  color: #475569;
  font-size: 11px;
  font-weight: 800;
}
.gauge-business-replay-legend span { display: inline-flex; align-items: center; gap: 5px; }
.gauge-business-replay-legend i { display: inline-block; width: 22px; height: 5px; }
.gauge-business-replay-legend .observed { background: #17252f; }
.gauge-business-replay-legend .forecast { background: repeating-linear-gradient(90deg, #0e7490 0 6px, transparent 6px 10px); }
.gauge-business-replay-legend .band {
  height: 10px;
  border: 1px solid rgba(14, 116, 144, .42);
  background: repeating-linear-gradient(135deg, rgba(14,116,144,.18) 0 3px, transparent 3px 7px);
}
.gauge-business-replay-chart .replay-panel-bg {
  fill: rgba(248, 250, 252, .76);
  stroke: rgba(148, 163, 184, .24);
}
.gauge-business-replay-chart .replay-band { stroke: rgba(14, 116, 144, .34); stroke-width: .8; }
.gauge-business-replay-chart .replay-p50 {
  fill: none;
  stroke: #0e7490;
  stroke-width: 2.6;
  vector-effect: non-scaling-stroke;
}
.gauge-business-replay-chart .replay-forecast-marker { fill: #0e7490; stroke: #ecfeff; stroke-width: 1; }
.gauge-business-replay-chart .replay-observed {
  fill: none;
  stroke: #17252f;
  stroke-width: 2.4;
  vector-effect: non-scaling-stroke;
}
.gauge-business-replay-chart .replay-observed-marker { fill: #17252f; stroke: #fff; stroke-width: .8; }
.gauge-business-replay-chart .replay-threshold {
  stroke: rgba(120, 98, 77, .72);
  stroke-width: 1;
  stroke-dasharray: 6 5;
}
.gauge-business-replay-chart .replay-issue-line {
  stroke: #dc2626;
  stroke-width: 1;
  stroke-dasharray: 4 4;
}
.gauge-business-replay-chart .replay-cross-line {
  stroke: #17252f;
  stroke-width: 1;
  stroke-dasharray: 2 4;
}
.gauge-business-replay-chart .replay-tick { stroke: #94a3b8; }
.gauge-business-replay-chart .replay-axis-text { fill: #64748b; font-size: 10px; }
.gauge-business-replay-chart .replay-panel-title { fill: #0f172a; font-size: 11px; font-weight: 900; }
.gauge-business-replay-chart .replay-panel-metric { fill: #475569; font-size: 9.6px; font-weight: 800; }
.gauge-forecast-dialog-main,
.gauge-forecast-dialog-side {
  min-width: 0;
}
.gauge-forecast-dialog-chart {
  padding: 12px;
  border: 1px solid rgba(14, 165, 233, .16);
  border-radius: 8px;
  background: rgba(255, 255, 255, .66);
}
.gauge-forecast-dialog .gauge-forecast-chart {
  max-width: none;
  width: 100%;
}
.gauge-forecast-dialog .gauge-forecast-chart text {
  font-size: 12px;
}
.gauge-forecast-dialog .gauge-forecast-chart .forecast-p50,
.gauge-forecast-dialog .gauge-forecast-chart .forecast-pred {
  stroke-width: 3;
}
.gauge-forecast-dialog-note {
  margin: 10px 0 0;
  color: #475569;
  font-size: 12px;
  line-height: 1.55;
}
body.gauge-forecast-dialog-open {
  overflow: hidden;
}
@media (max-width: 980px) {
  .gauge-forecast-dialog {
    padding: 14px;
  }
  .gauge-forecast-dialog-card {
    width: calc(100vw - 28px);
    max-height: calc(100vh - 28px);
  }
  .gauge-forecast-dialog-grid {
    grid-template-columns: 1fr;
  }
  .gauge-business-replay-grid { grid-template-columns: 1fr; }
  .gauge-business-replay-intro { align-items: flex-start; flex-direction: column; }
  .gauge-business-replay-intro span { text-align: left; }
}
.poi-popup {
  min-width: 220px;
  color: #0f172a;
  line-height: 1.45;
}
.poi-popup-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.poi-popup-title {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}
.poi-popup-collapse {
  flex: 0 0 auto;
  min-height: 24px;
  padding: 2px 8px;
  border: 1px solid rgba(14, 165, 233, .25);
  border-radius: 999px;
  background: rgba(224, 242, 254, .86);
  color: #075985;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}
.poi-popup-collapse:hover,
.poi-popup-collapse:focus-visible {
  background: #bae6fd;
  outline: 2px solid rgba(14, 165, 233, .22);
  outline-offset: 1px;
}
.poi-popup-body {
  margin-top: 6px;
}
.poi-popup-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 3px;
}
.poi-popup-facts span {
  padding: 2px 6px;
  border-radius: 4px;
  background: #f1f5f9;
  color: #475569;
  font-size: 11px;
  font-weight: 700;
}
.poi-popup-facts [data-poi-near-scene-summary] {
  background: #e0f2fe;
  color: #0369a1;
}
.poi-popup.collapsed {
  min-width: 180px;
}
.poi-popup.collapsed .poi-popup-body {
  display: none;
}
.poi-relation-context {
  display: grid;
  gap: 2px;
  margin-top: 8px;
  padding: 7px 9px;
  border: 1px solid #bae6fd;
  border-radius: 6px;
  background: #f0f9ff;
}
.poi-relation-context strong {
  color: #075985;
  font-size: 11px;
}
.poi-relation-context span {
  color: #334155;
  font-size: 12px;
}
.poi-popup-advice {
  margin-top: 8px;
  padding-top: 7px;
  border-top: 1px solid rgba(15, 23, 42, .12);
  display: grid;
  gap: 4px;
}
.poi-popup-advice strong { color: #0f172a; }
.poi-popup-advice span {
  display: block;
  padding-left: 10px;
  position: relative;
  color: #334155;
}
.poi-popup-advice span::before {
  content: "";
  position: absolute;
  left: 0;
  top: .72em;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #ef4444;
}
.poi-detail-icon,
.gauge-relation-vector {
  border: 0;
  background: transparent;
  overflow: visible;
}
.poi-vector-marker,
.relation-vector-marker {
  position: relative;
  width: 34px;
  height: 34px;
  display: block;
  color: var(--poi-color);
}
.poi-vector-symbol,
.relation-vector-symbol {
  position: absolute;
  inset: 2px;
  z-index: 2;
  display: grid;
  place-items: center;
  border: 2px solid var(--poi-color);
  border-radius: 7px;
  color: var(--poi-color);
  background: rgba(255,255,255,.96);
  box-shadow: 0 3px 10px rgba(15,23,42,.28);
}
.poi-vector-symbol svg,
.relation-vector-symbol svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.poi-vector-label,
.relation-vector-label {
  position: absolute;
  left: 37px;
  top: 50%;
  z-index: 1;
  display: none;
  transform: translateY(-50%);
  min-width: max-content;
  padding: 2px 5px;
  border: 1px solid color-mix(in srgb, var(--poi-color) 42%, #ffffff);
  border-radius: 4px;
  color: #0f172a;
  background: rgba(255,255,255,.94);
  box-shadow: 0 2px 8px rgba(15,23,42,.2);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
}
.poi-detail-icon.show-label .poi-vector-label,
.gauge-relation-vector.show-label .relation-vector-label {
  display: block;
}
.poi-vector-pulse {
  position: absolute;
  left: 17px;
  top: 17px;
  width: 28px;
  height: 28px;
  border: 2px solid var(--poi-color);
  border-radius: 8px;
  opacity: 0;
  transform: translate(-50%,-50%);
}
.poi-detail-icon.active .poi-vector-symbol {
  color: #fff;
  background: var(--poi-color);
  box-shadow: 0 0 0 3px rgba(255,255,255,.88), 0 5px 16px rgba(15,23,42,.38);
}
.poi-detail-icon.active .poi-vector-pulse {
  animation: poi-vector-pulse 1.05s ease-out 3;
}
.gauge-relation-vector.gauge-relation-extended {
  opacity: .76;
}
.gauge-relation-vector.gauge-relation-core .relation-vector-symbol {
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--poi-color) 24%, transparent), 0 3px 10px rgba(15,23,42,.28);
}
@keyframes poi-vector-pulse {
  0% { transform: translate(-50%,-50%) scale(.72); opacity: .9; }
  75% { transform: translate(-50%,-50%) scale(1.8); opacity: .08; }
  100% { transform: translate(-50%,-50%) scale(1.95); opacity: 0; }
}
.map-hover-tooltip {
  background: rgba(15, 23, 42, .94);
  border: 1px solid rgba(251, 191, 36, .52);
  border-radius: 6px;
  color: #e5edf7;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .28);
  font-size: 12px;
  line-height: 1.45;
  padding: 6px 8px;
}
.map-hover-tooltip::before { border-top-color: rgba(15, 23, 42, .94); }
.road-impact-mode .leaflet-tooltip.street-hover-tooltip {
  display: none;
  pointer-events: none;
}
.leaflet-tooltip.road-impact-tooltip {
  border-color: rgba(249, 115, 22, .72);
  box-shadow: 0 12px 28px rgba(15, 23, 42, .34);
  z-index: 980;
}
.leaflet-marker-icon.facility-dot,
.leaflet-marker-icon.gauge-dot,
.leaflet-marker-icon.parking-dot,
.leaflet-marker-icon.rain-dot {
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 4px 10px rgba(0,0,0,.25);
}
.gauge-depth-icon {
  background: transparent;
  border: 0;
}
.gauge-depth-marker {
  position: relative;
  width: 118px;
  height: 28px;
  pointer-events: auto;
}
.gauge-pulse,
.gauge-core {
  position: absolute;
  left: 5px;
  top: 50%;
  border-radius: 50%;
  transform: translateY(-50%);
}
.gauge-pulse {
  width: 18px;
  height: 18px;
  background: rgba(20, 184, 166, .28);
  animation: gauge-pulse 1.35s ease-out infinite;
}
.gauge-core {
  width: 10px;
  height: 10px;
  margin-left: 4px;
  background: #14b8a6;
  border: 2px solid #fff;
  box-shadow: 0 0 0 2px rgba(20, 184, 166, .26), 0 4px 10px rgba(15,23,42,.28);
}
.gauge-depth-marker.active .gauge-pulse {
  background: rgba(14, 165, 233, .34);
}
.gauge-depth-marker.active .gauge-core {
  background: #0ea5e9;
}
.gauge-depth-marker.severe .gauge-pulse {
  background: rgba(239, 68, 68, .38);
  animation-duration: .9s;
}
.gauge-depth-marker.severe .gauge-core {
  background: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, .24), 0 4px 12px rgba(127,29,29,.38);
}
.gauge-depth-marker.realtime .gauge-pulse {
  background: rgba(34, 197, 94, .34);
}
.gauge-depth-marker.realtime .gauge-core {
  background: #22c55e;
}
.gauge-depth-marker.forecast_attention .gauge-pulse {
  background: rgba(14, 165, 233, .34);
  animation-duration: 1.8s;
}
.gauge-depth-marker.forecast_attention .gauge-core {
  background: #0ea5e9;
  box-shadow: 0 0 0 2px rgba(14, 165, 233, .28), 0 4px 10px rgba(15,23,42,.24);
}
.gauge-depth-marker.delayed .gauge-pulse,
.gauge-depth-marker.stale .gauge-pulse {
  background: rgba(250, 204, 21, .30);
  animation-duration: 2.2s;
}
.gauge-depth-marker.delayed .gauge-core,
.gauge-depth-marker.stale .gauge-core {
  background: #facc15;
}
.gauge-depth-marker.previous_valid_kept .gauge-pulse,
.gauge-depth-marker.offline .gauge-pulse {
  display: none;
}
.gauge-depth-marker.previous_valid_kept .gauge-core,
.gauge-depth-marker.offline .gauge-core {
  background: #94a3b8;
  box-shadow: 0 0 0 2px rgba(148, 163, 184, .24), 0 4px 10px rgba(15,23,42,.20);
}
.gauge-depth-marker.quiet,
.gauge-depth-marker.zero,
.gauge-depth-marker.compact-label {
  width: 30px;
}
.gauge-depth-marker.quiet .gauge-pulse,
.gauge-depth-marker.zero .gauge-pulse,
.gauge-depth-marker.compact-label .gauge-pulse {
  display: none;
}
.gauge-depth-marker.quiet .gauge-core,
.gauge-depth-marker.zero .gauge-core {
  background: #cbd5e1;
  border-color: rgba(255, 255, 255, .86);
  box-shadow: 0 0 0 1px rgba(100, 116, 139, .26), 0 3px 7px rgba(15,23,42,.16);
}
.gauge-depth-label {
  position: absolute;
  left: 25px;
  top: 50%;
  transform: translateY(-50%);
  min-width: 52px;
  padding: 3px 6px;
  border: 1px solid rgba(15, 23, 42, .18);
  border-radius: 5px;
  background: rgba(255,255,255,.96);
  color: #0f172a;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  box-shadow: 0 5px 12px rgba(15,23,42,.20);
}
.gauge-depth-marker.zero .gauge-depth-label {
  color: #0f766e;
}
.gauge-depth-marker.active .gauge-depth-label {
  color: #075985;
}
.gauge-depth-marker.severe .gauge-depth-label {
  color: #991b1b;
}
.gauge-depth-marker.delayed .gauge-depth-label,
.gauge-depth-marker.stale .gauge-depth-label {
  color: #92400e;
}
.gauge-depth-marker.previous_valid_kept .gauge-depth-label,
.gauge-depth-marker.offline .gauge-depth-label {
  color: #475569;
}
.gauge-depth-marker.compact-label .gauge-depth-label {
  display: none;
}
.gauge-depth-marker.forecast_attention .gauge-depth-label {
  color: #075985;
}
@keyframes gauge-pulse {
  0% { transform: translateY(-50%) scale(.72); opacity: .95; }
  70% { transform: translateY(-50%) scale(1.9); opacity: .12; }
  100% { transform: translateY(-50%) scale(2.15); opacity: 0; }
}
.gauge-service-ring {
  vector-effect: non-scaling-stroke;
}
.gauge-relation-vector {
  animation: relation-vector-in .32s ease-out both;
}
.gauge-relation-scope-note {
  margin: 8px 0 10px;
  padding: 8px 10px;
  border: 1px solid #dbeafe;
  border-radius: 6px;
  background: #f8fbff;
  color: #334155;
  font-size: 12px;
}
.gauge-relation-scope-note > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  font-weight: 700;
}
.gauge-relation-scope-note span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.gauge-relation-scope-note i {
  width: 10px;
  height: 10px;
  border: 2px solid #0891b2;
  border-radius: 50%;
}
.gauge-relation-scope-note i.extended {
  border-color: #38bdf8;
  border-style: dashed;
}
.gauge-relation-scope-note small {
  display: block;
  margin-top: 5px;
  color: #64748b;
  line-height: 1.45;
}
@keyframes relation-vector-in {
  0% { transform: scale(.72); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .gauge-pulse,
  .gauge-relation-vector,
  .poi-vector-pulse {
    animation: none !important;
  }
}
.rain-heat-canvas {
  image-rendering: auto;
  filter: saturate(1.08) contrast(1.02);
  pointer-events: none;
}
.near-scene-badge {
  position: absolute;
  left: 50%;
  top: 118px;
  transform: translateX(-50%);
  z-index: 1250;
  display: none;
  align-items: center;
  gap: 10px;
  max-width: min(620px, calc(100% - 36px));
  padding: 9px 13px;
  border: 1px solid rgba(14, 165, 233, .35);
  border-radius: 8px;
  background: rgba(248, 252, 255, .95);
  color: #0f172a;
  box-shadow: 0 12px 28px rgba(15, 23, 42, .18);
  font-size: 13px;
  font-weight: 800;
  pointer-events: none;
}
.near-scene-badge.show {
  display: flex;
}
.near-scene-badge span {
  color: #0369a1;
}
.near-scene-badge small {
  color: #64748b;
  font-weight: 700;
}
.near-scene-badge small b {
  color: #be123c;
  font-weight: 900;
}
.leaflet-building-pane canvas {
  image-rendering: auto;
  pointer-events: auto;
}
.leaflet-tooltip.near-building-tooltip {
  border: 1px solid rgba(148, 163, 184, .35);
  border-radius: 5px;
  padding: 5px 8px;
  background: rgba(15, 23, 42, .94);
  box-shadow: 0 6px 16px rgba(15, 23, 42, .26);
  color: #f8fafc;
  font-size: 12px;
  font-weight: 800;
}
.leaflet-tooltip.near-building-tooltip::before {
  border-top-color: rgba(15, 23, 42, .94);
}
.near-building-tooltip .affected {
  color: #fecaca;
}
.near-building-tooltip .unaffected {
  color: #dbeafe;
}
.building-status-popup {
  min-width: 190px;
  color: #334155;
  line-height: 1.55;
}
.building-status-popup strong {
  display: block;
  margin-bottom: 4px;
  color: #0f172a;
  font-size: 14px;
}
.building-status-popup .building-state {
  font-weight: 900;
}
.building-status-popup .building-state.affected {
  color: #be123c;
}
.building-status-popup .building-state.unaffected {
  color: #475569;
}
.building-status-popup small {
  display: block;
  margin-top: 5px;
  color: #64748b;
}
.leaflet-selection-pane,
.leaflet-selection-pane * {
  pointer-events: none !important;
}
.leaflet-flood-pane,
.leaflet-flood-pane *,
.leaflet-inundationCell-pane,
.leaflet-inundationCell-pane *,
.leaflet-nearFlood-pane,
.leaflet-nearFlood-pane *,
.leaflet-nearFloodPane-pane,
.leaflet-nearFloodPane-pane *,
.leaflet-inundation-cell-pane,
.leaflet-inundation-cell-pane * {
  pointer-events: none !important;
}
.leaflet-inundationCell-pane path.inundation-subcell {
  vector-effect: non-scaling-stroke;
  paint-order: stroke fill;
  filter: drop-shadow(0 0 4px rgba(6, 182, 212, .92));
}
.leaflet-inundationCell-pane path.inundation-subcell-halo {
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 0 8px rgba(34, 211, 238, .96));
}
.leaflet-inundationCell-pane path.inundation-subcell-glow {
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 0 11px rgba(248, 250, 252, .92));
}
.street-inundation-raster-patch,
.near-street-inundation-raster-patch,
.continuous-inundation-raster-patch {
  image-rendering: crisp-edges;
  image-rendering: pixelated;
}
.continuous-inundation-primary {
  filter: saturate(1.22) contrast(1.08);
}
.leaflet-nearFlood-pane path,
.leaflet-nearFloodPane-pane path {
  vector-effect: non-scaling-stroke;
}

/* Laptop readability baseline: retain the dense operations layout while
   avoiding 10-12px business text in panels, popups, and forecast dialogs. */
@media (min-width: 821px) {
  body { font-size: 15px; }
  .legend-card { font-size: 14px; }

  .legend-toggle span,
  .legend-standard-note,
  .legend-standard-details,
  .layer-note,
  .mode-summary-card p,
  .summary-title span,
  .summary-scope-tag,
  .poi-link-copy small { font-size: 13px; }

  .dual-chart-head,
  .rain-reference-line em { font-size: 11px; }

  .gauge-popup-summary span,
  .gauge-forecast-stat-grid span,
  .gauge-standard-panel span,
  .gauge-standard-panel p { font-size: 12px; }

  .gauge-popup-summary strong,
  .gauge-popup-meta,
  .gauge-popup-details > summary span,
  .gauge-associated-poi > summary span,
  .gauge-chart-readout,
  .gauge-forecast-legend,
  .gauge-forecast-stat-grid strong,
  .gauge-standard-panel strong,
  .gauge-forecast-dialog-header span,
  .gauge-forecast-dialog-header p,
  .gauge-forecast-dialog-note,
  .poi-popup-facts span { font-size: 13px; }

  .leaflet-popup-content,
  .detail-table,
  .gauge-monitor-filters button,
  .gauge-monitor-tabs button,
  .summary-target-table,
  .summary-target-link { font-size: 14px; }

  .leaflet-popup-content .gauge-popup .info-popup-title { font-size: 17px; }
  .gauge-popup-summary .primary strong { font-size: 19px; }

  .gauge-monitor-forecast-grid span,
  .summary-gauge-forecast-link span em,
  .summary-gauge-forecast-link strong small { font-size: 12px; }

  .gauge-monitor-forecast-grid strong { font-size: 16px; }
  .gauge-forecast-dialog .gauge-forecast-chart text { font-size: 13px; }
}

/* Keep the operations canvas usable on laptop-height viewports and when a
   Chromium browser has a larger per-site zoom. The compact density preserves
   readable business text while returning horizontal and vertical space to the
   map; it is viewport-driven and therefore identical in Chrome and Edge. */
@media (min-width: 821px) and (max-width: 1680px),
       (min-width: 821px) and (max-height: 900px) {
  body { font-size: 14px; }

  .topbar {
    height: 64px;
    grid-template-columns: minmax(350px, 1fr) auto;
    gap: 10px;
    padding: 0 12px 0 10px;
  }
  .workspace {
    height: calc(100% - 64px);
    grid-template-columns: 220px minmax(480px, 1fr) minmax(340px, 370px);
  }
  .brand { gap: 10px; }
  .brand-mark { width: 38px; height: 38px; border-radius: 10px; }
  .brand-drop { transform: scale(.88); }
  .brand-kicker { font-size: 9px; margin-bottom: 2px; }
  .brand h1 { font-size: 19px; }
  .brand p { margin-top: 3px; font-size: 11px; gap: 4px; }
  .brand p span { padding: 1px 6px; }

  .top-actions { gap: 6px; font-size: 13px; }
  #clockText { padding: 5px 7px; }
  .forecast-status { max-width: 190px; padding: 5px 8px; font-size: 11px; }
  .data-source-status { max-width: 170px; }
  .forecast-status-tag { font-size: 10px; padding: 2px 5px; }
  .scenario-select { min-height: 32px; max-width: 154px; padding: 5px 27px 5px 9px; }
  .top-actions button { min-height: 32px; padding: 6px 10px; }

  .left-panel,
  .right-panel { padding: 11px 10px; }
  .panel { padding: 11px; margin-bottom: 10px; }
  .panel-title { font-size: 15px; margin-bottom: 9px; }
  .right-panel .panel-title { min-height: 30px; padding-bottom: 8px; }
  .tool { min-height: 40px; padding: 8px 10px 8px 13px; }
  .layer-panel label,
  .theme-list label,
  .overlay-list label { min-height: 33px; padding: 7px 8px; font-size: 13px; }
  .layer-checklist { gap: 6px; }

  .legend-card { font-size: 13px; }
  .legend-toggle span,
  .legend-standard-note,
  .legend-standard-details,
  .layer-note,
  .mode-summary-card p,
  .summary-title span,
  .summary-scope-tag,
  .poi-link-copy small { font-size: 12px; }

  .leaflet-popup-content,
  .detail-table,
  .gauge-monitor-filters button,
  .gauge-monitor-tabs button,
  .summary-target-table,
  .summary-target-link { font-size: 13px; }
  .leaflet-popup-content .gauge-popup .info-popup-title { font-size: 16px; }
  .gauge-popup-summary .primary strong { font-size: 18px; }
  .gauge-forecast-dialog .gauge-forecast-chart text { font-size: 12px; }
}

@media (min-width: 1181px) and (max-width: 1366px) {
  .workspace { grid-template-columns: 205px minmax(430px, 1fr) minmax(315px, 335px); }
  .top-actions { gap: 4px; }
  .forecast-status { max-width: 160px; }
  .data-source-status { max-width: 145px; }
  .scenario-select { max-width: 142px; }
}

/* Correct a saved Chromium page zoom without scaling the Leaflet map itself. */
html.browser-zoom-large body { font-size: 13px; }
html.browser-zoom-large .topbar {
  height: 60px;
  grid-template-columns: minmax(330px, 1fr) auto;
  gap: 6px;
  padding-inline: 9px;
}
html.browser-zoom-large .workspace {
  height: calc(100% - 60px);
  grid-template-columns: 202px minmax(500px, 1fr) minmax(315px, 340px);
}
html.browser-zoom-large .brand-mark { width: 34px; height: 34px; }
html.browser-zoom-large .brand h1 { font-size: 17px; }
html.browser-zoom-large .brand p,
html.browser-zoom-large .brand-kicker { font-size: 9px; }
html.browser-zoom-large .top-actions { gap: 4px; font-size: 12px; }
html.browser-zoom-large .top-actions button,
html.browser-zoom-large .scenario-select { min-height: 30px; padding-block: 4px; }
html.browser-zoom-large .left-panel,
html.browser-zoom-large .right-panel { padding: 9px 8px; }
html.browser-zoom-large .panel { padding: 9px; margin-bottom: 8px; }
html.browser-zoom-large .panel-title { font-size: 14px; }
html.browser-zoom-large .legend-card { font-size: 12px; }

@media (max-width: 1180px) {
  .workspace { grid-template-columns: 220px 1fr; }
  .right-panel { position: absolute; right: 14px; top: 82px; width: 310px; max-height: calc(100% - 100px); z-index: 12; border: 1px solid var(--line); border-radius: 8px; }
  .topbar { grid-template-columns: auto minmax(0, 1fr); }
  .brand-kicker,
  .brand p,
  #clockText,
  #dataSourceStatus,
  .entitlement-control > span { display: none; }
  .brand-mark { width: 34px; height: 34px; }
  .brand h1 { font-size: 17px; white-space: nowrap; }
  .top-actions { min-width: 0; justify-content: flex-end; overflow: hidden; }
  .forecast-status { max-width: 132px; }
  .entitlement-control { padding-left: 6px; }
  .entitlement-control select { max-width: 82px; }
  .scenario-select { max-width: 132px; }
  .top-actions button { padding-inline: 8px; white-space: nowrap; }
  .timeline { width: min(620px, calc(100% - 36px)); }
  .legend-card {
    width: 286px;
    bottom: 146px;
    max-height: min(340px, calc(100vh - 272px));
  }
}

@media (max-width: 820px) {
  .workspace { grid-template-columns: 1fr; }
  .left-panel { display: none; }
  .right-panel { display: none; }
  .topbar { height: auto; min-height: 64px; grid-template-columns: 1fr; align-items: start; padding: 10px 12px; }
  .top-actions { flex-wrap: wrap; white-space: normal; }
  .workspace { height: calc(100% - 92px); }
  .timeline { bottom: 14px; padding: 10px 12px; width: calc(100% - 24px); }
  .time-row { font-size: 12px; }
  .map-reset-view { top: 68px; left: auto; right: 12px; transform: none; }
  .map-stage:has(.social-popup) .leaflet-control-zoom,
  .map-stage:has(.social-popup) .map-search,
  .map-stage:has(.social-popup) .map-reset-view {
    visibility: hidden;
    pointer-events: none;
  }
  .near-scene-badge {
    top: 112px;
    left: 12px;
    right: 12px;
    max-width: none;
    transform: none;
  }
  .legend-card {
    left: 12px;
    bottom: 136px;
    width: min(310px, calc(100% - 24px));
    max-height: min(260px, calc(100vh - 260px));
  }
}























.risk-reason-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  margin-top: 3px;
}

.risk-reason-badges em {
  border: 1px solid rgba(34, 211, 238, 0.38);
  border-radius: 3px;
  color: #9be7f2;
  font-size: 10px;
  font-style: normal;
  line-height: 1.35;
  padding: 0 3px;
}

.gauge-v3-product {
  display: grid;
  gap: 14px;
}

.gauge-v3-product > section {
  min-width: 0;
}

.gauge-v3-shadow-banner {
  align-items: center;
  background: #fff4df;
  border: 1px solid #e0a447;
  border-radius: 4px;
  color: #70420b;
  display: flex;
  justify-content: space-between;
  padding: 7px 10px;
}

.gauge-v3-shadow-banner strong,
.gauge-v3-shadow-banner span {
  font-size: 12px;
}

.gauge-v3-city-risk {
  border-bottom: 1px solid rgba(90, 115, 128, 0.22);
  padding-bottom: 13px;
}

.gauge-v3-city-risk-grid {
  border-bottom: 1px solid #dce6eb;
  border-top: 1px solid #dce6eb;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 8px;
}

.gauge-v3-city-risk-grid > div {
  min-width: 0;
  padding: 9px 10px;
}

.gauge-v3-city-risk-grid > div + div {
  border-left: 1px solid #dce6eb;
}

.gauge-v3-city-risk-grid span,
.gauge-v3-city-risk-grid strong {
  display: block;
  letter-spacing: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gauge-v3-city-risk-grid span {
  color: #65747d;
  font-size: 10px;
}

.gauge-v3-city-risk-grid strong {
  color: #173f56;
  font-size: 17px;
  margin-top: 2px;
}

.gauge-v3-brier-compare {
  display: grid;
  gap: 5px;
  margin-top: 10px;
}

.gauge-v3-brier-compare > div {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: 58px minmax(80px, 1fr) 38px;
}

.gauge-v3-brier-compare span,
.gauge-v3-brier-compare strong {
  color: #526b78;
  font-size: 10px;
}

.gauge-v3-brier-compare i {
  background: #e3ebef;
  display: block;
  height: 7px;
  overflow: hidden;
}

.gauge-v3-brier-compare b {
  background: #21856f;
  display: block;
  height: 100%;
}

.gauge-v3-brier-compare .reference b {
  background: #8b9da7;
}

.gauge-v3-city-risk-foot {
  align-items: start;
  display: flex;
  gap: 8px 16px;
  justify-content: space-between;
  margin-top: 9px;
}

.gauge-v3-city-risk-foot span,
.gauge-v3-city-risk-foot strong {
  font-size: 10px;
  letter-spacing: 0;
  line-height: 1.35;
}

.gauge-v3-city-risk-foot span {
  color: #65747d;
}

.gauge-v3-city-risk-foot strong {
  color: #a95212;
  text-align: right;
}

.gauge-v3-city-risk.compact .gauge-v3-city-risk-foot {
  display: block;
}

.gauge-v3-city-risk.compact .gauge-v3-city-risk-foot strong {
  display: block;
  margin-top: 3px;
  text-align: left;
}

.gauge-v3-window-chart {
  display: grid;
  grid-template-columns: repeat(8, minmax(42px, 1fr));
  gap: 6px;
  height: 154px;
  margin-top: 12px;
}

.gauge-v3-series-head {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-top: 11px;
}

.gauge-v3-series-head span,
.gauge-v3-series-head strong {
  font-size: 10px;
  letter-spacing: 0;
}

.gauge-v3-series-head span {
  color: #526b78;
}

.gauge-v3-series-head strong {
  color: #27465b;
}

.gauge-v3-series-head.rainfall {
  border-top: 1px solid #dce6eb;
  padding-top: 9px;
}

.gauge-v3-rain-chart {
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(8, minmax(42px, 1fr));
  margin-top: 7px;
}

.gauge-v3-rain-window {
  display: grid;
  gap: 4px;
  grid-template-rows: 18px 48px 24px;
  min-width: 0;
  text-align: center;
}

.gauge-v3-rain-window > strong,
.gauge-v3-rain-window > small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gauge-v3-rain-window > strong {
  color: #126a83;
  font-size: 11px;
}

.gauge-v3-rain-window > strong small {
  font-size: 8px;
}

.gauge-v3-rain-window > small {
  color: #65747d;
  font-size: 9px;
  line-height: 1.25;
  white-space: normal;
}

.gauge-v3-rain-track {
  align-items: end;
  background: #e4edf1;
  display: flex;
  height: 48px;
  overflow: hidden;
}

.gauge-v3-rain-track i {
  background: #38a7c7;
  display: block;
  min-height: 0;
  width: 100%;
}

.gauge-v3-time-anchor-note {
  color: #65747d;
  font-size: 9px;
  line-height: 1.4;
  letter-spacing: 0;
  margin-top: 5px;
  padding-bottom: 10px;
  text-align: right;
}

.gauge-v3-window {
  appearance: none;
  background: transparent;
  border: 0;
  border-radius: 3px;
  color: inherit;
  cursor: pointer;
  display: grid;
  grid-template-rows: 20px 1fr 28px;
  min-width: 0;
  text-align: center;
}

.gauge-v3-window:focus-visible {
  outline: 2px solid #1677b8;
  outline-offset: 2px;
}

.gauge-v3-window strong,
.gauge-v3-window small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gauge-v3-window strong {
  color: #27465b;
  font-size: 11px;
}

.gauge-v3-window small {
  color: #65747d;
  font-size: 9px;
  line-height: 1.25;
  white-space: normal;
}

.gauge-v3-window-track {
  align-items: end;
  background: #e4edf1;
  border-radius: 3px;
  display: flex;
  min-height: 78px;
  overflow: hidden;
}

.gauge-v3-window-track i {
  background: #2980a8;
  display: block;
  min-height: 2px;
  width: 100%;
}

.gauge-v3-window.active .gauge-v3-window-track i {
  background: #d9822b;
}

.gauge-v3-window.active strong {
  color: #a95212;
}

.gauge-v3-link-status {
  align-items: center;
  border-top: 1px solid rgba(90, 115, 128, 0.22);
  display: flex;
  font-size: 12px;
  justify-content: space-between;
  padding-top: 10px;
}

.gauge-v3-link-status span {
  color: #65747d;
}

.gauge-v3-product.compact .gauge-v3-window-chart {
  height: 126px;
}

.gauge-v3-product.compact .gauge-v3-rain-window {
  grid-template-rows: 18px 36px 24px;
}

.gauge-v3-product.compact .gauge-v3-rain-track {
  height: 36px;
}

@media (max-width: 680px) {
  .gauge-v3-city-risk-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gauge-v3-city-risk-grid > div:nth-child(3) {
    border-left: 0;
    border-top: 1px solid #dce6eb;
  }

  .gauge-v3-city-risk-grid > div:nth-child(4) {
    border-top: 1px solid #dce6eb;
  }

  .gauge-v3-city-risk-foot {
    display: block;
  }

  .gauge-v3-city-risk-foot strong {
    display: block;
    margin-top: 4px;
    text-align: left;
  }

  .gauge-v3-window-chart {
    gap: 3px;
    grid-template-columns: repeat(4, minmax(48px, 1fr));
    height: auto;
  }

  .gauge-v3-rain-chart {
    gap: 3px;
    grid-template-columns: repeat(4, minmax(48px, 1fr));
  }

  .gauge-v3-window {
    grid-template-rows: 18px 58px 24px;
  }
}
