
    :root {
      --velocity-scale-height: 110px;
    }

    html, body, #map {
      margin: 0;
      width: 100%;
      height: 100%;
      overflow: hidden;
      background: #111;
      font-family: "Segoe UI", Tahoma, sans-serif;
    }
    #map-attribution {
      position: fixed;
      bottom: 6px;
      right: 12px;
      z-index: 2000;
      background: rgba(255,255,255,0.75);
      padding: 2px 6px;
      border-radius: 3px;
      font-size: 11px;
      color: #333;
      pointer-events: auto;
    }
    #map-attribution a {
      color: #333;
      text-decoration: none;
    }
    #map-attribution a:hover {
      text-decoration: underline;
    }

    @media (max-width: 768px) {
      .leaflet-control-attribution {
        display: none !important;
      }
      .gm-style-cc {
        display: none !important;
      }
      /* hide the Terms link specifically even if inside .gmnoprint */
      .gmnoprint a[href*="google"] {
        display: none !important;
      }
      .gmnoprint {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
      }
    }
    
    #radar-time-bar {
      position: fixed;
      bottom: 22px;
      left: 12px;
      z-index: 2405;
      display: flex;
      align-items: center;
      gap: 8px;
    }
    #radar-time {
      background: rgba(8, 12, 20, 0.86);
      border: 1px solid rgba(255, 255, 255, 0.18);
      border-radius: 6px;
      color: #fff;
      padding: 6px 10px;
      font-family: monospace;
      font-size: 15px;
      pointer-events: none;
    }
    #my-location-btn {
      position: fixed;
      bottom: 22px;
      right: 12px;
      left: auto;
      z-index: 2300;
      background: #1a2a42;
      border: 1px solid rgba(255,255,255,0.3);
      border-radius: 6px;
      color: #fff;
      font-size: 13px;
      font-family: "Segoe UI", Tahoma, sans-serif;
      padding: 7px 13px;
      cursor: pointer;
      white-space: nowrap;
    }
    #my-location-btn:hover {
      background: #243a5e;
    }
    #my-location-btn:disabled {
      opacity: 0.5;
      cursor: not-allowed;
    }
    #controls {
      position: fixed;
      top: 12px;
      right: 12px;
      z-index: 2300;
      width: 300px;
      background: rgba(8, 12, 20, 0.86);
      border: 1px solid rgba(255, 255, 255, 0.18);
      border-radius: 10px;
      padding: 12px;
      color: #fff;
      box-sizing: border-box;
    }
    #controls .title {
      display: flex;
      align-items: center;
      justify-content: space-between;
      font-size: 14px;
      font-weight: 700;
      margin-bottom: 8px;
    }
    #controls .title-close-btn {
      border: none;
      background: transparent;
      color: rgba(255,255,255,0.6);
      font-size: 18px;
      line-height: 1;
      cursor: pointer;
      padding: 0;
      margin: 0;
    }
    #controls .title-close-btn:hover {
      color: #fff;
    }
    #controls .row {
      margin-top: 10px;
    }
    #controls label {
      display: block;
      font-size: 12px;
      color: rgba(255, 255, 255, 0.82);
      margin-bottom: 4px;
    }
    #controls select,
    #controls input[type="range"] {
      width: 100%;
    }
    .multi-select {
      position: relative;
    }
    .multi-select summary {
      list-style: none;
      cursor: pointer;
      border: 1px solid rgba(255, 255, 255, 0.24);
      border-radius: 6px;
      padding: 7px 10px;
      background: rgba(255, 255, 255, 0.06);
      font-size: 13px;
      user-select: none;
    }
    .multi-select summary::-webkit-details-marker {
      display: none;
    }
    .multi-select-menu {
      margin-top: 6px;
      border: 1px solid rgba(255, 255, 255, 0.2);
      border-radius: 8px;
      background: rgba(10, 14, 24, 0.95);
      padding: 8px;
      display: grid;
      gap: 6px;
    }
    .opacity-inline-control {
      border: 1px solid rgba(255, 255, 255, 0.2);
      border-radius: 8px;
      background: rgba(255, 255, 255, 0.05);
      padding: 8px;
      display: grid;
      gap: 6px;
    }
    .opacity-inline-control[hidden] {
      display: none !important;
    }
    .opacity-inline-control label {
      margin: 0;
      font-size: 11px;
    }
    .multi-select-item {
      display: flex;
      align-items: center;
      gap: 8px;
      font-size: 12px;
      color: rgba(255, 255, 255, 0.92);
    }
    .multi-select-item input[type="checkbox"] {
      width: 14px;
      height: 14px;
      margin: 0;
    }
    #status {
      display: none !important;
      visibility: hidden !important;
      height: 0 !important;
      min-height: 0 !important;
      margin: 0 !important;
      overflow: hidden !important;
    }
    #weather-panel {
      position: fixed;
      right: 12px;
      top: auto;
      bottom: 68px;
      z-index: 2300;
      width: 300px;
      background: rgba(8, 12, 20, 0.86);
      border: 1px solid rgba(255, 255, 255, 0.18);
      border-radius: 10px;
      padding: 12px;
      color: #fff;
      box-sizing: border-box;
      display: none;
    }
    #weather-panel .close {
      position: absolute;
      right: 12px;
      top: 12px;
      float: right;
      border: none;
      background: transparent;
      color: rgba(255, 255, 255, 0.7);
      font-size: 16px;
      cursor: pointer;
      line-height: 1;
      padding: 0;
      margin: 0;
    }
    #weather-panel .close:hover {
      color: #fff;
    }
    #weather-panel .loc {
      font-size: 13px;
      color: rgba(255, 255, 255, 0.78);
      margin-bottom: 6px;
      padding-right: 16px;
    }
    #weather-panel .temp {
      font-size: 32px;
      font-weight: 700;
      margin-bottom: 4px;
    }
    #weather-panel .cond {
      font-size: 13px;
      color: rgba(255, 255, 255, 0.84);
      margin-bottom: 8px;
    }
    #weather-panel .row {
      display: flex;
      justify-content: space-between;
      gap: 8px;
      margin-top: 4px;
      font-size: 12px;
      color: rgba(255, 255, 255, 0.92);
    }
    #weather-panel .k {
      color: rgba(255, 255, 255, 0.7);
    }
    #legend-panel {
      position: fixed;
      left: 12px;
      top: 12px;
      z-index: 2300;
      width: 300px;
      background: rgba(8, 12, 20, 0.86);
      border: 1px solid rgba(255, 255, 255, 0.18);
      border-radius: 10px;
      padding: 12px;
      color: #fff;
      box-sizing: border-box;
    }
    #legend-title {
      font-size: 14px;
      font-weight: 700;
      margin-bottom: 8px;
    }
    #legend-scales-list {
      display: grid;
      gap: 8px;
      margin-bottom: 8px;
    }
    .legend-scale-card {
      border: 1px solid rgba(255, 255, 255, 0.2);
      border-radius: 8px;
      padding: 8px;
      background: rgba(255, 255, 255, 0.03);
    }
    .legend-scale-name {
      font-size: 12px;
      font-weight: 700;
      margin-bottom: 6px;
      color: rgba(255, 255, 255, 0.95);
    }
    .legend-scale-labels {
      display: flex;
      justify-content: space-between;
      gap: 8px;
      margin-bottom: 6px;
      font-size: 11px;
      color: rgba(255, 255, 255, 0.84);
    }
    .legend-scale-labels span:last-child {
      text-align: right;
    }
    .legend-scale-image {
      display: block;
      width: 100%;
      height: auto;
      background: rgba(255, 255, 255, 0.96);
      border-radius: 6px;
    }
    .legend-scale-image-ptype {
      width: auto;
      height: 200px;
      max-width: 100%;
      margin: 0 auto;
    }
    .legend-scale-image-velocity {
      width: auto;
      height: 70px;
      max-width: 100%;
      margin: 0 auto;
    }
    .legend-scale-image-spc {
      width: 50%;
      height: auto;
      margin: 0 auto;
    }
    .legend-scale-image-stormrts {
      width: auto;
      height: 150px;
      max-width: 100%;
      margin: 0 auto;
      background: transparent;
    }
    .legend-scale-bar {
      display: block;
      width: 100%;
      height: 18px;
      border-radius: 6px;
      border: 1px solid rgba(255, 255, 255, 0.18);
      box-sizing: border-box;
    }
    .legend-humidity-scale {
      display: grid;
      gap: 6px;
      background: rgba(255, 255, 255, 0.04);
      border: 1px solid rgba(255, 255, 255, 0.2);
      border-radius: 8px;
      padding: 8px;
    }
    .legend-humidity-row {
      display: flex;
      align-items: center;
      gap: 8px;
      font-size: 12px;
      color: rgba(255, 255, 255, 0.92);
    }
    .legend-humidity-swatch {
      width: 20px;
      height: 12px;
      border-radius: 3px;
      border: 1px solid rgba(255, 255, 255, 0.35);
      flex: 0 0 20px;
    }
    #warning-legend {
      margin-top: 10px;
      border-top: 1px solid rgba(255, 255, 255, 0.16);
      padding-top: 8px;
    }
    #warning-legend-title {
      font-size: 12px;
      font-weight: 700;
      margin-bottom: 6px;
      color: rgba(255, 255, 255, 0.9);
    }
    .warning-legend-item {
      display: flex;
      align-items: center;
      gap: 8px;
      font-size: 11px;
      color: rgba(255, 255, 255, 0.88);
      margin-bottom: 4px;
    }
    .warning-legend-line {
      width: 16px;
      height: 0;
      border-top: 2px dashed #7fd7ff;
      flex: 0 0 16px;
    }
    .warning-legend-swatch {
      width: 12px;
      height: 12px;
      border-radius: 3px;
      border: 1px solid rgba(255, 255, 255, 0.35);
      flex: 0 0 12px;
    }
    #mobile-legend-toggle {
      display: none;
      position: fixed;
      right: 12px;
      bottom: 12px;
      z-index: 2410;
    }
    .legend-arrow-btn {
      width: 34px;
      height: 34px;
      border: 1px solid rgba(255, 255, 255, 0.25);
      border-radius: 8px;
      background: rgba(8, 12, 20, 0.9);
      color: #fff;
      padding: 0;
      font-size: 18px;
      line-height: 34px;
      text-align: center;
      cursor: pointer;
    }
    .legend-arrow-btn:hover {
      background: rgba(18, 24, 38, 0.95);
    }
    #legend-mobile-close {
      display: none;
      position: absolute;
      top: 8px;
      right: 8px;
      z-index: 2401;
    }
    @media (max-width: 768px) {
      #radar-time {
        height: 32px !important;
        display: flex;
        align-items: center;
        padding: 0 10px !important;
        box-sizing: border-box;
      }
      #radar-time-bar {
        bottom: 28px !important;
      }
      #my-location-btn {
        height: 32px !important;
        display: flex;
        align-items: center;
        padding: 0 13px !important;
        bottom: 28px !important;
      }
      .legend-arrow-btn,
      #legend-mobile-close,
      #mobile-legend-toggle {
        height: 32px !important;
        min-width: 32px !important;
        max-width: 100vw;
        line-height: 32px !important;
        font-size: 16px !important;
        border-radius: 6px !important;
        padding: 0 10px !important;
        box-sizing: border-box;
        bottom: 28px !important;
      }
      #legend-mobile-close {
        display: inline-block;
        position: fixed !important;
        top: auto !important;
        left: calc(50% + 44px) !important;
        right: auto !important;
      }
      #mobile-legend-toggle {
        display: inline-block;
        left: calc(50% + 44px);
        right: auto;
        transform: none;
      }
      #radar-time-bar {
        left: 8px;
      }
      #my-location-btn {
        right: 8px;
      }
    }
    .radar-scale-shift {
      filter: hue-rotate(300deg) saturate(1.08) contrast(1.05) brightness(1.01);
      transform: translateZ(0);
      will-change: filter;
    }
    .leaflet-image-layer.satellite-soft-blend {
      transition: opacity 0.35s ease-in-out;
      filter: saturate(1.06) contrast(1.06);
      image-rendering: auto;
    }

    @media (max-width: 768px) {
      #controls,
      #weather-panel,
      #legend-panel {
        left: 8px;
        right: 8px;
        width: auto;
      }

      #controls {
        top: 8px;
        padding: 10px;
      }

      #weather-panel {
        top: auto;
        bottom: 62px;
        max-height: 34vh;
        overflow: auto;
      }

      #legend-panel {
        left: 8px;
        right: 8px;
        width: auto;
        top: 8px;
        padding: 10px;
        position: fixed;
      }

      #radar-time-bar {
        bottom: 28px;
        left: 8px;
      }

      #my-location-btn {
        bottom: 28px;
        right: 8px;
      }

      #legend-panel:not(.mobile-open) {
        display: none;
      }

      #mobile-legend-toggle {
        display: inline-block;
        left: calc(50% + 44px);
        right: auto;
        bottom: 28px;
        transform: none;
      }

      #legend-mobile-close {
        display: inline-block;
        position: fixed !important;
        top: auto !important;
        bottom: 28px !important;
        left: calc(50% + 44px) !important;
        right: auto !important;
      }

      #legend-title,
      #controls .title {
        font-size: 13px;
      }

      #legend-labels,
      #status,
      #controls label,
      #weather-panel .row,
      #weather-panel .loc,
      #weather-panel .cond {
        font-size: 11px;
      }

      #warning-legend-title,
      .warning-legend-item {
        font-size: 10px;
      }

      #weather-panel .temp {
        font-size: 28px;
      }
    }
  