:root{--c-blue:#0877c6;--c-border:#bbc9d3;--c-text:#153048}
*{box-sizing:border-box}html,body{margin:0;min-height:100%;font-family:Arial,sans-serif;color:var(--c-text)}body{display:flex;flex-direction:column}body>header{flex:0 0 auto}#climateApp{flex:1 1 auto;min-height:340px;height:calc(100dvh - 120px);position:relative;overflow:hidden}#climateMap{position:absolute;inset:0;background:#dce9f1}.leaflet-container{z-index:0}#climateHud{position:absolute;z-index:1100;right:10px;top:10px;width:min(316px,calc(100% - 20px));max-height:calc(100% - 20px);display:flex;flex-direction:column;border:1px solid var(--c-border);border-radius:12px;background:rgba(255,255,255,.97);box-shadow:0 3px 18px #15293b44;overflow:hidden}#climateHud[hidden],#climateShow[hidden]{display:none!important}.c-head{display:flex;justify-content:space-between;align-items:center;gap:8px;background:#eef5fc;padding:9px 12px;font-size:15px}.c-head button{background:transparent;border:1px solid #b2c3d2;border-radius:7px;padding:5px 9px;cursor:pointer}.c-body{padding:10px 12px;overflow-y:auto;min-height:0;overscroll-behavior:contain;scrollbar-width:thin}.c-row{display:flex;flex-direction:column;gap:4px;margin:9px 0}.c-row label{font-size:12px;font-weight:700}.c-row select{width:100%;min-width:0;padding:7px 8px;border:1px solid #b4c8d6;border-radius:7px;background:#fff;font:13px Arial,sans-serif}.c-row input{width:100%}.c-two{display:grid;grid-template-columns:1fr 1fr;gap:9px}.c-segment{display:flex;gap:5px}.c-segment button{flex:1;border:1px solid #a7bbc8;border-radius:7px;background:#f1f5f8;padding:9px 4px;cursor:pointer;font-size:12px;font-weight:700}.c-segment button.active{background:var(--c-blue);border-color:var(--c-blue);color:#fff}.c-play{display:flex;gap:7px;margin:12px 0 8px}.c-play button{flex:1;background:#edf3f8;border:1px solid #abc0d3;border-radius:7px;min-height:34px;cursor:pointer;color:#153048}.c-play button:hover{background:#dceafa}#climateStatus{border-left:3px solid #2581b8;background:#eef5fa;padding:8px 10px;border-radius:4px;font-size:12px;line-height:1.4}#climateStatus.error{border-left-color:#ac5b24;background:#fff4e9}.c-source{font-size:11px;color:#53677a;line-height:1.4;margin-top:9px;overflow-wrap:anywhere}#climateShow{position:absolute;right:10px;top:10px;z-index:1200;background:#fff;border:1px solid #b4c8d6;border-radius:8px;padding:10px;box-shadow:0 2px 6px #0003;cursor:pointer}#climateLegend{position:absolute;z-index:950;bottom:11px;left:50%;transform:translateX(-50%);background:#ffffffec;border:1px solid #c3d1da;border-radius:9px;box-shadow:0 2px 12px #0002;min-width:235px;max-width:calc(100vw - 22px);padding:8px 12px;font-size:11px;text-align:center}#climateLegend[hidden]{display:none!important}#legendTitle{display:block;font-weight:700;margin-bottom:5px}#legendRamp{height:10px;border-radius:5px;background:linear-gradient(90deg,#244b9b,#fff,#ad362e)}#legendTicks{display:flex;justify-content:space-between;font-size:10px;margin:3px 0}#legendFooter{color:#586c7b}#mapStatus{position:absolute;top:10px;left:55px;z-index:600;background:#ffffffdd;border:1px solid #c4d1db;border-radius:7px;padding:5px 8px;font-size:11px;max-width:min(420px,calc(100vw - 110px));pointer-events:none}#mapStatus[hidden]{display:none!important}body>footer{padding:5px 12px;background:#f1f4f6;color:#506579;text-align:center;font-size:11px}body>footer p{margin:0}@media (max-width:767px){#climateApp{height:calc(100dvh - 95px)}#climateHud{right:7px;top:7px;width:min(290px,calc(100vw - 70px));max-height:min(47dvh,390px)}.c-body{padding:8px}.c-row{margin:6px 0}.c-row select{min-height:40px;font-size:16px}.c-head{padding:6px 9px}.c-play button{min-height:42px}#climateLegend{bottom:7px;min-width:175px;padding:6px 8px}#mapStatus{left:52px;top:7px;max-width:calc(100% - 120px)}}

#historicalDateRow[hidden],#climateCycleRow[hidden],#climateTimeRow[hidden]{display:none!important}#climateHistoricDate{background:white;border:1px solid #b4c8d6;border-radius:7px;padding:7px 8px;font-size:13px;min-width:0}#historicalDateRow small{font-size:10px;color:#65798a;line-height:1.35}

/* R5: use the same no-per-image-fade policy as Interactive.html.
   Leaflet positions the old and new georeferenced layers without CSS crossfades. */
.leaflet-fade-anim .climate-image-layer,
.leaflet-fade-anim .climate-wrf-tiles .leaflet-tile,
.climate-image-layer,
.climate-wrf-tiles .leaflet-tile { transition:none !important; }
.climate-wrf-tiles .leaflet-tile-loaded { opacity:1 !important; }
