
    /* Global typography and color palette */
    body {
      font-family: Arial, sans-serif;
    }
    #titleBar {
      /* Dark-blue gradient header with gold accent */
      background: linear-gradient(90deg, #023047, #045a8a);
      color: #ffd700;
      padding: 14px;
      font-size: 20px;
      font-weight: bold;
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
      display: flex;
      align-items: center;
      justify-content: space-between;
    }
    #titleText {
      flex-grow: 1;
      text-align: left;
      font-weight: bold;
    }
    #logoContainer {
      display: flex;
      gap: 10px;
    }
    #logoContainer img {
      height: 36px;
    }
    #map {
      width: 100%;
      height: calc(100vh - 60px);
    }
    #creditBar {
      position: absolute;
      bottom: 0;
      left: 0;
      width: 100%;
      background-color: rgba(3, 58, 99, 0.9);
      color: #ffd700;
      padding: 6px 0;
      text-align: center;
      font-size: 12px;
      z-index: 1000;
    }
    #compass {
      position: absolute;
      bottom: 70px;
      right: 10px;
      width: 40px;
      height: 40px;
      background-color: rgba(28, 44, 70, 0.9);
      color: #f1c40f;
      border: 2px solid #f1c40f;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 14px;
      font-weight: bold;
      z-index: 1000;
    }
    #projectInfoCompassBtn {
      position: absolute;
      bottom: 73px;
      right: 58px;
      width: 34px;
      height: 34px;
      background: rgba(28, 44, 70, 0.95);
      color: #f1c40f;
      border: 2px solid #f1c40f;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 16px;
      font-weight: bold;
      z-index: 1000;
      cursor: pointer;
      box-shadow: 0 2px 8px rgba(0,0,0,0.25);
      padding: 0;
      line-height: 1;
    }
    #projectInfoCompassBtn:hover { background: rgba(8, 58, 99, 0.98); }
    #projectInfoCompassBtn:focus { outline: none; box-shadow: 0 0 0 2px rgba(255,215,0,0.35), 0 2px 8px rgba(0,0,0,0.25); }
    body.app-loading #projectInfoCompassBtn { visibility: hidden; opacity: 0; }
    body.app-ready #projectInfoCompassBtn { visibility: visible; opacity: 1; }
    .project-info-tool-btn { display: none !important; }
    .hazard-legend {
      position: absolute;
      bottom: 60px;
      left: 56px;
      background: rgba(255,255,255,0.95);
      padding: 12px;
      border-radius: 8px;
      border: 1px solid #ddd;
      box-shadow: 0 4px 8px rgba(0,0,0,0.2);
      font-size: 13px;
      line-height: 1.5;
      z-index: 1601;
      min-width: 240px;
      max-width: 320px;
    max-height: 45vh;
      overflow: auto;
    }
    .hazard-legend h4 {
      margin: 0 0 6px;
      font-size: 14px;
      font-weight: bold;
      color: #023047;
    }
    .hazard-legend .section {
      margin-bottom: 8px;
    }
    .hazard-legend .item {
      display: flex;
      align-items: center;
      margin-bottom: 4px;
    }
    .hazard-legend .swatch {
      width: 12px;
      height: 12px;
      border-radius: 2px;
      margin-right: 6px;
      border: 1px solid #ccc;
    }
    .leaflet-control-minimap {
      border-radius: 10px;
      overflow: hidden;
      border: 2px solid rgba(255, 215, 0, 0.85);
      box-shadow: 0 6px 16px rgba(0,0,0,0.25);
    }
    .leaflet-control-minimap .leaflet-control-minimap-toggle-display {
      background: rgba(3, 58, 99, 0.9);
      color: #ffd700;
      border-radius: 10px;
      border: 1px solid rgba(255, 215, 0, 0.7);
    }
    .leaflet-control-scale {
      margin-bottom: 140px !important;
    }
    .leaflet-bar.search-control {
      position: absolute;
      top: 12px;
      /* Shift the search bar further right to avoid overlapping zoom controls */
      left: 55px;
      z-index: 1000;
      background: rgba(255,255,255,0.95);
      padding: 6px;
      border-radius: 6px;
      box-shadow: 0 2px 6px rgba(0,0,0,0.2);
      border: 1px solid #ddd;
      display: flex;
      align-items: center;
      gap: 6px;
    }

    /* Language toggle (HY / EN / RU) inside search box */
    .lang-toggle {
      display: flex;
      border: 1px solid rgba(0,0,0,0.12);
      border-radius: 6px;
      overflow: hidden;
      box-shadow: 0 1px 4px rgba(0,0,0,0.12);
    }
    .lang-toggle button {
      appearance: none;
      border: 0;
      padding: 4px 8px;
      font-size: 12px;
      cursor: pointer;
      background: rgba(255,255,255,0.9);
      color: #033a63;
      line-height: 1.2;
    }
    .lang-toggle button + button {
      border-left: 1px solid rgba(0,0,0,0.12);
    }
    
    /* Small table button near search */
    .table-open-btn {
      appearance: none;
      border: 1px solid rgba(0,0,0,0.12);
      background: rgba(255,255,255,0.9);
      color: #033a63;
      border-radius: 6px;
      padding: 4px 8px;
      font-size: 14px;
      cursor: pointer;
      line-height: 1;
      min-width: 34px;
    }
    .table-open-btn:hover { background: rgba(255,255,255,1); }
.lang-toggle button.active {
      background: rgba(3, 58, 99, 0.95);
      color: #ffd700;
      font-weight: 700;
    }
    .tool-control a.active {
      background: rgba(3, 58, 99, 0.95);
      color: #ffd700 !important;
    }

    /* ===== Meteorological hazards panel and control ===== */
    /* Meteorological hazards panel and control styles */
    /* Button that toggles the meteorological panel */
    .meteo-control {
      /* Use default Leaflet control positioning. Styling only for appearance */
      background: rgba(3, 58, 99, 0.95);
      color: #ffd700;
      border: 1px solid #ffd700;
      border-radius: 6px;
      padding: 6px 8px;
      width: 240px;
      cursor: pointer;
      font-size: 13px;
      text-align: center;
      user-select: none;
      box-sizing: border-box;
    }
    .meteo-control:hover {
      background: rgba(3, 58, 99, 1);
    }
    /* Water availability control button */
    .water-control {
      /* Styling for the water availability control; uses default positioning */
      background: rgba(3, 58, 99, 0.95);
      color: #ffd700;
      border: 1px solid #ffd700;
      border-radius: 6px;
      padding: 6px 8px;
      width: 240px;
      cursor: pointer;
      font-size: 13px;
      text-align: center;
      user-select: none;
      box-sizing: border-box;
      margin-top: 4px;
    }
.water-control:hover {
  background: rgba(3, 58, 99, 1);
}

    .water-support-control {
      background: rgba(3, 58, 99, 0.95);
      color: #ffd700;
      border: 1px solid #ffd700;
      border-radius: 6px;
      padding: 6px 8px;
      width: 240px;
      cursor: pointer;
      font-size: 13px;
      text-align: center;
      user-select: none;
      box-sizing: border-box;
      margin-top: 4px;
    }
    .water-support-control:hover {
      background: rgba(3, 58, 99, 1);
    }

    .water-legend-box {
      margin-top: 8px;
      border-top: 1px solid rgba(255,215,0,0.35);
      padding-top: 8px;
      font-size: 12px;
      line-height: 1.25;
    }
    .water-legend-title {
      color: #f1c40f;
      font-weight: bold;
      margin-bottom: 6px;
    }
    .water-legend-note {
      color: #dbeafe;
      font-size: 11px;
      margin-top: 4px;
      margin-bottom: 8px;
    }
    .water-legend-item {
      display: flex;
      align-items: center;
      gap: 8px;
      margin-bottom: 6px;
    }
    .water-legend-swatch {
      display: inline-block;
      width: 18px;
      min-width: 18px;
      height: 10px;
      border-radius: 3px;
      border: 1px solid rgba(255,255,255,0.6);
      box-sizing: border-box;
    }
    .water-legend-line {
      height: 0;
      border-top-width: 3px;
      border-top-style: solid;
      border-radius: 0;
      border-left: none;
      border-right: none;
      border-bottom: none;
      background: transparent !important;
    }
    .water-legend-line.dashed {
      border-top-style: dashed;
    }

    /* Administrative boundaries control button */
    .admin-control {
      background: rgba(3, 58, 99, 0.95);
      color: #ffd700;
      border: 1px solid #ffd700;
      border-radius: 6px;
      padding: 6px 8px;
      width: 240px;
      cursor: pointer;
      font-size: 13px;
      text-align: center;
      user-select: none;
      box-sizing: border-box;
      margin-top: 4px;
    }
    .admin-control:hover {
      background: rgba(3, 58, 99, 1);
    }

    /* Physical hazards control button */
    .physical-control {
      background: rgba(3, 58, 99, 0.95);
      color: #ffd700;
      border: 1px solid #ffd700;
      border-radius: 6px;
      padding: 6px 8px;
      width: 240px;
      cursor: pointer;
      font-size: 13px;
      text-align: center;
      user-select: none;
      box-sizing: border-box;
      margin-top: 4px;
    }
    .physical-control:hover {
      background: rgba(3, 58, 99, 1);
    }

    /* ===== Thematic panels (4 windows) ===== */
    /* These panels share the same professional look and appear on the right side. */
    #meteoPanel,
    #waterPanel,
    #waterSupportPanel,
    #adminPanel,
    #physicalPanel {
      position: absolute;
      top: 180px;
      bottom: auto;
      right: 10px;
      left: auto;
      width: 260px;
      max-height: 60vh;
      overflow-y: auto;
      background: rgba(3, 58, 99, 0.95);
      color: #ffffff;
      border: 1px solid #ffd700;
      border-radius: 8px;
      box-shadow: 0 4px 8px rgba(0,0,0,0.2);
      padding: 10px;
      font-size: 13px;
      z-index: 1100;
      display: none;
    }

    #meteoPanel h3,
    #waterPanel h3,
    #waterSupportPanel h3,
    #adminPanel h3,
    #physicalPanel h3 {
      margin: 0 0 8px;
      font-size: 14px;
      font-weight: bold;
      color: #f1c40f;
      padding-right: 18px;
    }

    /* Close button inside the thematic panels */
    .meteo-close {
      position: absolute;
      top: 6px;
      right: 10px;
      color: #f1c40f;
      cursor: pointer;
      font-size: 18px;
      line-height: 18px;
      user-select: none;
    }

    /* Make the 4 right-side window buttons stack tighter (override Leaflet defaults) */
    .leaflet-top.leaflet-right .leaflet-control.meteo-control,
    .leaflet-top.leaflet-right .leaflet-control.water-control,
    .leaflet-top.leaflet-right .leaflet-control.water-support-control,
    .leaflet-top.leaflet-right .leaflet-control.admin-control,
    .leaflet-top.leaflet-right .leaflet-control.physical-control {
      margin-top: 6px;
    }

    /* Each hazard item contains a checkbox and its label */
    .hazard-item {
      display: flex;
      align-items: center;
      margin-bottom: 6px;
    }
    .hazard-item input[type="checkbox"] {
      margin-right: 6px;
    }
    .hazard-item label {
      flex: 1;
      line-height: 1.25;
    }

    /* ------------------------------------------------------------------ */
    /* Custom fullscreen and reset view controls                          */
    .fullscreen-control,
    .reset-control {
      background: rgba(3, 58, 99, 0.95);
      color: #ffd700;
      border: 1px solid #ffd700;
      border-radius: 4px;
      width: 32px;
      height: 32px;
      line-height: 32px;
      text-align: center;
      cursor: pointer;
      box-shadow: 0 2px 4px rgba(0,0,0,0.3);
      font-size: 18px;
      user-select: none;
    }
    .fullscreen-control:hover,
    .reset-control:hover {
      background: rgba(3, 58, 99, 1);
    }

    /* Measurement control: styled similarly to other controls */
    .measurement-control {
      background: rgba(3, 58, 99, 0.95);
      color: #ffd700;
      border: 1px solid #ffd700;
      border-radius: 4px;
      width: 32px;
      height: 32px;
      line-height: 32px;
      text-align: center;
      cursor: pointer;
      font-size: 20px;
      user-select: none;
    }
    .measurement-control:hover,
    .measurement-control.active {
      background: rgba(3, 58, 99, 1);
    }

    /* Coordinates display control style: shows lat/lng in bottom-left */
    .coord-control {
      background: rgba(3, 58, 99, 0.8);
      color: #ffd700;
      border: 1px solid #ffd700;
      border-radius: 4px;
      padding: 4px 6px;
      font-size: 12px;
      line-height: 14px;
      margin-left: 8px;
      margin-bottom: 34px; /* ensure it sits above the legend */
      pointer-events: none;
    }

    /* Style the Leaflet measure control to match the map's color scheme */
    .leaflet-control-measure .leaflet-control-measure-toggle {
      background: rgba(3, 58, 99, 0.95);
      color: #ffd700;
      border: 1px solid #ffd700;
      border-radius: 4px;
      width: 32px;
      height: 32px;
      line-height: 32px;
      text-align: center;
      cursor: pointer;
    }
    .leaflet-control-measure .leaflet-control-measure-toggle:hover {
      background: rgba(3, 58, 99, 1);
    }
    /* Fullscreen mode hides header and credit bar and expands the map */
    .fullscreen-active #titleBar,
    .fullscreen-active #creditBar {
      display: none;
    }
    .fullscreen-active #map {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100vh;
      z-index: 9998;
    }
    /* Ensure control container stays above the map in fullscreen */
    .fullscreen-active .leaflet-control-container {
      z-index: 9999;
    }

    /* ------------------------------------------------------------------ */
    /* Overrides for mis-inserted duplicated styles                       */
    /* Ensures the meteorological panel header and close button have      */
    /* consistent styling. These rules appear later in the cascade to     */
    /* override any malformed duplicate definitions above.                */
    #meteoPanel h3 {
      margin-top: 0;
      margin-bottom: 8px;
      font-size: 14px;
      font-weight: bold;
      color: #f1c40f;
      position: relative;
    }
    .meteo-close {
      position: absolute;
      top: 4px;
      right: 8px;
      color: #f1c40f;
      cursor: pointer;
      font-size: 16px;
      line-height: 16px;
    }
  
    /* ===== Settlements & Hazards Table (CSV/XLSX) ===== */
    .table-control {
      background: rgba(3, 58, 99, 0.95);
      color: #ffd700;
      border: 1px solid #ffd700;
      border-radius: 6px;
      padding: 6px 8px;
      width: 240px;
      cursor: pointer;
      font-size: 13px;
      text-align: center;
      user-select: none;
      box-sizing: border-box;
      margin-top: 4px;
    }
    .table-control:hover { background: rgba(3, 58, 99, 1); }
    .table-control-settlements{display:none !important;}
    .table-controls-row {
      display: flex !important;
      flex-direction: row;
      align-items: stretch;
      gap: 6px;
      margin-right: 10px !important;
      margin-top: 6px !important;
      background: transparent !important;
      border: 0 !important;
      box-shadow: none !important;
      padding: 0 !important;
      clear: both;
      float: right;
      box-sizing: border-box;
    }
    .table-controls-row .table-control {
      margin: 0 !important;
      clear: none !important;
      float: none !important;
      flex: 0 0 240px;
      display: flex;
      align-items: center;
      justify-content: center;
      min-height: 34px;
    }
    @media (max-width: 900px) {
      .table-controls-row { flex-direction: column; gap: 4px; }
      .table-controls-row .table-control { flex-basis: auto; }
    }

    #tablePanel {
      position: absolute;
      top: 120px;
      right: 10px;
      left: auto;
      width: min(720px, calc(100vw - 20px));
      max-height: 72vh;
      overflow: hidden;
      background: rgba(3, 58, 99, 0.95);
      color: #ffffff;
      border: 1px solid #ffd700;
      border-radius: 8px;
      box-shadow: 0 6px 14px rgba(0,0,0,0.25);
      padding: 10px;
      font-size: 13px;
      z-index: 1200;
      display: none;
    }
    #tablePanel .tablepanel-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      margin-bottom: 8px;
    }
    #tablePanel .tablepanel-title {
      font-weight: 700;
      font-size: 14px;
      color: #ffd700;
      line-height: 1.2;
    }
    #tablePanel .tablepanel-close {
      background: transparent;
      border: 1px solid rgba(255, 215, 0, 0.65);
      color: #ffd700;
      border-radius: 6px;
      padding: 2px 8px;
      cursor: pointer;
      font-size: 18px;
      line-height: 1.1;
    }
    #tablePanel .tablepanel-close:hover { background: rgba(255,255,255,0.08); }

    #tablePanel .tablepanel-actions {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
      margin-bottom: 8px;
    }
    #tablePanel .tablepanel-btn {
      background: rgba(255, 215, 0, 0.14);
      border: 1px solid rgba(255, 215, 0, 0.7);
      color: #ffd700;
      border-radius: 6px;
      padding: 6px 8px;
      cursor: pointer;
      font-size: 12px;
      user-select: none;
    }
    #tablePanel .tablepanel-btn:hover { background: rgba(255, 215, 0, 0.22); }

    #tablePanel .tablepanel-search {
      width: 100%;
      box-sizing: border-box;
      padding: 8px 10px;
      border-radius: 6px;
      border: 1px solid rgba(255,255,255,0.25);
      background: rgba(0,0,0,0.15);
      color: #fff;
      outline: none;
      margin-bottom: 8px;
    }
    #tablePanel .tablepanel-search::placeholder { color: rgba(255,255,255,0.7); }

    #tablePanel .tablepanel-stat {
      font-size: 12px;
      opacity: 0.92;
      margin-bottom: 6px;
    }

    #tablePanel .tablepanel-tablewrap {
      max-height: 52vh;
      overflow: auto;
      border: 1px solid rgba(255,255,255,0.15);
      border-radius: 8px;
      background: rgba(0,0,0,0.12);
    }
    #tablePanel table {
      border-collapse: collapse;
      width: 100%;
      min-width: 640px;
      font-size: 12px;
    }
    #tablePanel thead th {
      position: sticky;
      top: 0;
      background: rgba(3, 58, 99, 0.98);
      color: #ffd700;
      border-bottom: 1px solid rgba(255,255,255,0.2);
      padding: 6px 8px;
      text-align: left;
      z-index: 2;
    }
    #tablePanel tbody td {
      border-bottom: 1px solid rgba(255,255,255,0.12);
      padding: 6px 8px;
      vertical-align: top;
      color: #fff;
    }
    #tablePanel tbody tr:hover {
      background: rgba(255,255,255,0.06);
      cursor: pointer;
    }
    #tablePanel .tablepanel-zoombtn {
      background: rgba(255, 215, 0, 0.14);
      border: 1px solid rgba(255, 215, 0, 0.65);
      color: #ffd700;
      border-radius: 6px;
      padding: 3px 8px;
      cursor: pointer;
      font-size: 12px;
      user-select: none;
    }
    #tablePanel .tablepanel-zoombtn:hover { background: rgba(255, 215, 0, 0.22); }


    /* Historic drought popup */
    .historic-drought-overlay {
      cursor: crosshair;
    }
    .drought-popup table {
      border-collapse: collapse;
      width: 100%;
      font-size: 12px;
    }
    .drought-popup td {
      border-bottom: 1px solid #e8eef7;
      padding: 3px 4px;
      vertical-align: top;
    }
    .drought-popup td:first-child {
      color: #34495e;
      font-weight: 600;
      width: 36%;
    }
    .drought-popup-note {
      margin-top: 6px;
      font-size: 11px;
      color: #6b7280;
      line-height: 1.3;
    }

    /* User layer update/import control */
    .layer-update-control {
      z-index: 2600 !important;
      background: rgba(3, 58, 99, 0.96);
      border: 1px solid #ffd700;
      border-radius: 8px;
      box-shadow: 0 3px 8px rgba(0,0,0,0.25);
      color: #fff;
      font: 12px/1.35 Arial, sans-serif;
      overflow: visible;
      position: relative;
    }
    .layer-update-toggle {
      display: block;
      width: 34px;
      height: 34px;
      border: 0;
      background: rgba(3, 58, 99, 1);
      color: #ffd700;
      font-size: 20px;
      line-height: 34px;
      text-align: center;
      cursor: pointer;
    }
    .layer-update-toggle:hover {
      background: #045a8a;
    }
    .layer-update-panel {
      display: none;
      position: absolute;
      left: 58px;
      top: 0;
      width: 340px;
      max-height: 66vh;
      overflow-y: auto;
      padding: 10px;
      box-sizing: border-box;
      background: rgba(3, 58, 99, 0.96);
      border: 1px solid #ffd700;
      border-radius: 8px;
      box-shadow: 0 8px 18px rgba(0,0,0,0.28);
      z-index: 2700 !important;
    }
    .leaflet-top.leaflet-left { z-index: 2500 !important; }
    .layer-update-control.open .layer-update-panel {
      display: block;
    }
    .layer-update-title {
      color: #ffd700;
      font-weight: 700;
      font-size: 14px;
      margin: 0 0 8px;
    }
    .layer-update-help {
      color: #dceaf7;
      font-size: 11px;
      margin: 0 0 8px;
    }
    .layer-update-help[data-i18n-role="help"] {
      display: none;
    }
    .layer-update-panel label {
      display: block;
      margin-top: 8px;
      color: #f6f7fb;
      font-weight: 600;
      font-size: 10.6px;
    }
    .layer-update-panel input[type="text"],
    .layer-update-panel input[type="file"],
    .layer-update-panel textarea,
    .layer-update-panel select {
      width: 100%;
      margin-top: 3px;
      box-sizing: border-box;
      border: 1px solid rgba(255,255,255,0.35);
      border-radius: 5px;
      padding: 5px;
      font-size: 12px;
      background: #ffffff;
      color: #1f2937;
    }
    .layer-update-panel textarea {
      min-height: 58px;
      resize: vertical;
      font-family: Arial, sans-serif;
    }
    .layer-update-row {
      display: flex;
      gap: 8px;
      align-items: center;
    }
    .layer-update-row > div {
      flex: 1;
    }
    .layer-update-actions {
      display: flex;
      gap: 6px;
      flex-wrap: wrap;
      margin-top: 9px;
    }
    .layer-update-actions button,
    .user-layer-list button {
      border: 1px solid rgba(255,255,255,0.35);
      border-radius: 5px;
      background: #0b6fa4;
      color: #fff;
      cursor: pointer;
      font-size: 11px;
      padding: 5px 7px;
    }
    .layer-update-actions button:hover,
    .user-layer-list button:hover {
      background: #1689c7;
    }
    .user-layer-list {
      margin-top: 10px;
      border-top: 1px solid rgba(255,215,0,0.45);
      padding-top: 8px;
    }
    .user-layer-item {
      border: 1px solid rgba(255,255,255,0.2);
      border-radius: 6px;
      padding: 6px;
      margin-bottom: 6px;
      background: rgba(255,255,255,0.08);
    }
    .user-layer-item-main {
      display: flex;
      align-items: center;
      gap: 6px;
      margin-bottom: 5px;
    }
    .user-layer-name {
      flex: 1;
      min-width: 0;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      font-weight: 700;
    }
    .user-layer-meta {
      color: #dceaf7;
      font-size: 10px;
      margin-bottom: 5px;
    }

    /* Layer information buttons and side panel */
    .layer-info-btn {
      margin-left: auto;
      width: 20px;
      height: 20px;
      border: 1px solid rgba(255, 215, 0, 0.75);
      border-radius: 50%;
      background: rgba(255,255,255,0.1);
      color: #ffd700;
      cursor: pointer;
      font-size: 12px;
      line-height: 18px;
      text-align: center;
      flex: 0 0 auto;
      font-weight: 700;
    }
    .layer-info-btn:hover {
      background: rgba(255, 215, 0, 0.18);
    }
    .layer-info-panel {
      position: absolute;
      top: 180px;
      right: 285px;
      width: 320px;
      max-height: 60vh;
      overflow-y: auto;
      background: rgba(3, 58, 99, 0.97);
      color: #ffffff;
      border: 1px solid #ffd700;
      border-radius: 10px;
      box-shadow: 0 8px 18px rgba(0,0,0,0.30);
      padding: 12px;
      font-size: 12px;
      line-height: 1.38;
      z-index: 1450;
      display: none;
      box-sizing: border-box;
    }
    .layer-info-panel h3 {
      margin: 0 24px 8px 0;
      color: #ffd700;
      font-size: 13.5px;
      line-height: 1.22;
    }
    .layer-info-panel .layer-info-close {
      position: absolute;
      top: 7px;
      right: 10px;
      color: #ffd700;
      cursor: pointer;
      font-size: 18px;
      font-weight: 700;
      user-select: none;
    }
    .layer-info-panel .layer-info-body {
      color: #eef6ff;
    }

    .layer-info-panel[data-layer-info-key="hail"] .layer-info-body {
      font-size: 11px;
      line-height: 1.35;
    }
    .layer-info-panel .layer-info-source {
      margin-top: 9px;
      padding-top: 8px;
      border-top: 1px solid rgba(255,255,255,0.18);
      color: #fff6cc;
      font-size: 10.7px;
      line-height: 1.28;
    }
    .layer-info-panel .layer-info-source strong {
      color: #ffd700;
    }
    .layer-info-panel .layer-info-note {
      margin-top: 9px;
      padding-top: 8px;
      border-top: 1px solid rgba(255,255,255,0.18);
      color: #dceaf7;
      font-size: 10.5px;
    }
    @media (max-width: 780px) {
      .layer-info-panel {
        top: 110px;
        left: 10px;
        right: 10px;
        width: auto;
        max-height: 50vh;
      }
      .layer-update-panel {
        left: 42px;
        width: min(330px, calc(100vw - 70px));
      }
    }


    .hist-burned-control button { cursor: pointer; }
    .hist-burned-control button:hover { filter: brightness(0.94); }


    /* Clean first paint: do not show partial/old UI while embedded layers initialize */
    body.app-loading #map,
    body.app-loading #compass,
    body.app-loading #creditBar,
    body.app-loading #hazardLegend,
    body.app-loading #populationLegend {
      opacity: 0;
      pointer-events: none;
    }
    body.app-ready #map,
    body.app-ready #compass,
    body.app-ready #creditBar,
    body.app-ready #hazardLegend,
    body.app-ready #populationLegend {
      opacity: 1;
      transition: opacity 180ms ease-in;
    }
    #appLoading {
      position: fixed;
      inset: 60px 0 0 0;
      z-index: 99999;
      background: linear-gradient(135deg, #f7fbff, #e8f4fb);
      display: flex;
      align-items: center;
      justify-content: center;
      font-family: Arial, sans-serif;
      color: #023047;
    }
    body.app-ready #appLoading {
      display: none;
    }
    .app-loading-card {
      width: min(520px, calc(100vw - 48px));
      background: rgba(255,255,255,0.94);
      border: 1px solid rgba(3,58,99,0.16);
      border-radius: 18px;
      padding: 22px 24px;
      box-shadow: 0 18px 45px rgba(2,48,71,0.16);
      text-align: center;
    }
    .app-loading-title {
      font-size: 18px;
      font-weight: 700;
      margin-bottom: 8px;
      color: #023047;
    }
    .app-loading-sub {
      font-size: 13px;
      line-height: 1.45;
      color: #345;
      margin-bottom: 16px;
    }
    .app-loading-bar {
      height: 8px;
      border-radius: 999px;
      overflow: hidden;
      background: #d7eaf4;
    }
    .app-loading-bar span {
      display: block;
      height: 100%;
      width: 45%;
      border-radius: 999px;
      background: linear-gradient(90deg, #5aa9e6, #5bbf8a, #f4a261);
      animation: appLoadMove 1.3s ease-in-out infinite;
    }
    @keyframes appLoadMove {
      0% { transform: translateX(-105%); }
      100% { transform: translateX(235%); }
    }

  