:root{--bg:#ffffff;--panel:rgba(7,16,22,.78);--line:rgba(255,255,255,.15);--text:#f2f6f7;--muted:#a8b7bd;--accent:#53e0c1;--danger:#ff7e73}*{box-sizing:border-box}html,body,#app{width:100%;height:100%;margin:0;overflow:hidden;background:#ffffff;color:var(--text);font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}button,select,input{font:inherit;color:inherit}#viewport{position:absolute;inset:0;background:#ffffff;overflow:hidden}#backgroundCanvas,#scalarCanvas,#contourCanvas,#particleCanvas,#mapCanvas{position:absolute;inset:0;width:100%;height:100%}#backgroundCanvas{z-index:0;background:#ffffff;pointer-events:none}#scalarCanvas{z-index:1;opacity:1}#contourCanvas{z-index:2;pointer-events:none}#particleCanvas{z-index:3;pointer-events:none}#mapCanvas{z-index:4;pointer-events:none}.glass{background:var(--panel);border:1px solid var(--line);box-shadow:0 12px 35px rgba(0,0,0,.24);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px)}.topbar{position:absolute;top:max(12px,env(safe-area-inset-top));left:12px;right:12px;height:66px;border-radius:16px;display:flex;align-items:center;justify-content:space-between;padding:8px 15px;z-index:5}.brand{display:flex;align-items:center;gap:11px;min-width:0}.logo{width:56px;height:46px;object-fit:contain;border-radius:8px}.brand h1{font-size:18px;line-height:1.05;margin:0;font-weight:720;letter-spacing:.02em}.brand p{font-size:11px;color:var(--muted);margin:5px 0 0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:48vw}.topbar-actions{display:flex;align-items:center;gap:12px}.static-model-link{display:inline-flex;align-items:center;justify-content:center;min-height:34px;padding:7px 13px;border-radius:10px;border:1px solid rgba(83,224,193,.45);background:rgba(83,224,193,.13);color:#effffb;text-decoration:none;font-size:11px;font-weight:700;letter-spacing:.02em;white-space:nowrap;transition:background .18s,border-color .18s,transform .18s}.static-model-link:hover,.static-model-link:focus-visible{background:rgba(83,224,193,.24);border-color:rgba(83,224,193,.78);outline:none}.static-model-link:active{transform:translateY(1px)}.credit{font-size:11px;color:var(--muted);white-space:nowrap}.credit strong{color:var(--text)}.panel{position:absolute;left:12px;top:90px;width:276px;border-radius:17px;padding:14px;z-index:6;transition:width .2s,padding .2s}.panel.collapsed{width:48px;padding:8px}.panel.collapsed .panel-content{display:none}.panel-toggle{position:absolute;right:8px;top:8px;width:32px;height:32px;border:0;border-radius:9px;background:rgba(255,255,255,.08);cursor:pointer}.section-title{text-transform:uppercase;letter-spacing:.13em;color:#cce8e2;font-weight:700;font-size:10px;margin:3px 0 11px}.section-title:not(:first-child){margin-top:18px}.panel label{display:block;color:var(--muted);font-size:11px;margin:9px 0}.panel select{display:block;width:100%;margin-top:5px;background:#12212a;border:1px solid rgba(255,255,255,.14);border-radius:9px;padding:8px 10px;outline:none}.panel input[type=range]{width:100%;accent-color:var(--accent);margin-top:8px}.panel output{float:right;color:var(--text)}.row{display:flex;gap:16px}.switch{display:flex!important;align-items:center;gap:7px;cursor:pointer;color:var(--text)!important}.switch input{position:absolute;opacity:0}.switch span{width:30px;height:17px;border-radius:20px;background:#40515a;position:relative;transition:.2s}.switch span:after{content:"";position:absolute;width:13px;height:13px;border-radius:50%;background:white;top:2px;left:2px;transition:.2s}.switch input:checked+span{background:#209b86}.switch input:checked+span:after{left:15px}.button-grid{display:grid;grid-template-columns:1fr 1fr;gap:7px}.action{border:1px solid rgba(255,255,255,.14);border-radius:9px;background:rgba(255,255,255,.055);padding:8px 5px;font-size:11px;cursor:pointer}.action:hover{background:rgba(255,255,255,.12)}.action.primary{background:rgba(83,224,193,.14);border-color:rgba(83,224,193,.36)}.hint{font-size:10px;color:#82949c;margin:11px 0 0}.legend{position:absolute;left:50%;transform:translateX(-50%);bottom:86px;width:min(560px,calc(100vw - 620px));min-width:350px;border-radius:13px;padding:8px 12px 7px;z-index:5}.legend-head{display:flex;justify-content:space-between;font-size:11px;margin-bottom:5px}.legend-head span{color:var(--muted)}#legendCanvas{display:block;width:100%;height:12px;border-radius:6px}.legend-ticks{display:flex;justify-content:space-between;color:#c7d0d3;font-size:9px;margin-top:4px}.timeline{position:absolute;left:12px;right:12px;bottom:max(12px,env(safe-area-inset-bottom));height:62px;border-radius:16px;display:flex;align-items:center;gap:9px;padding:8px 10px;z-index:5}.timeline button{width:37px;height:37px;flex:0 0 auto;border:1px solid rgba(255,255,255,.14);border-radius:10px;background:rgba(255,255,255,.06);font-size:21px;cursor:pointer}.time-area{flex:1;min-width:0}.time-labels{display:flex;justify-content:space-between;font-size:11px;margin-bottom:2px}.time-labels span{color:var(--muted)}#timeRange{width:100%;height:13px;margin:0;accent-color:var(--accent)}.time-ticks{display:flex;justify-content:space-between;font-size:8px;color:#82939a;line-height:1}.status{position:absolute;right:15px;top:89px;border-radius:12px;padding:7px 10px;display:flex;align-items:center;gap:7px;font-size:10px;color:var(--muted);z-index:5}#statusDot{width:7px;height:7px;border-radius:50%;background:#f1bc4c;box-shadow:0 0 9px currentColor}.status.ready #statusDot{background:#51df9e}.loading{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);display:flex;gap:11px;align-items:center;z-index:4;background:rgba(3,9,13,.72);padding:12px 16px;border-radius:14px;font-size:12px}.loading span{width:17px;height:17px;border:2px solid rgba(255,255,255,.25);border-top-color:var(--accent);border-radius:50%;animation:spin .8s linear infinite}.hidden{display:none!important}@keyframes spin{to{transform:rotate(360deg)}}.error{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);z-index:9;background:#3b1718;border:1px solid #ae4c4f;border-radius:13px;padding:16px;max-width:520px}.readout{position:absolute;z-index:7;pointer-events:none;padding:7px 9px;border-radius:9px;background:rgba(4,11,15,.88);border:1px solid rgba(255,255,255,.16);font-size:10px;line-height:1.45;white-space:nowrap}.readout b{color:white}.readout span{color:#a9bbc1}@media(max-width:900px){.topbar{height:58px}.brand h1{font-size:15px}.credit{display:none}.topbar-actions{gap:6px}.static-model-link{min-height:31px;padding:6px 10px;font-size:10px}.logo{width:46px;height:39px}.panel{top:79px;width:238px}.legend{left:12px;transform:none;bottom:84px;width:calc(100vw - 24px);min-width:0}.status{display:none}.timeline{height:58px}.time-ticks{display:none}}@media(max-width:560px){.static-model-link{padding:6px 8px}.panel{top:75px;left:8px;width:calc(100vw - 16px);max-height:calc(100vh - 220px);overflow:auto}.panel.mobile-closed{width:45px;height:45px;overflow:hidden}.panel.mobile-closed .panel-content{display:none}.panel.mobile-closed .panel-toggle{display:block}.topbar{left:8px;right:8px;top:8px}.timeline{left:8px;right:8px;bottom:8px}.timeline button{width:31px;height:34px}.legend{left:8px;width:calc(100vw - 16px);bottom:74px}.readout{display:none}}
.panel select:disabled{opacity:.72;cursor:not-allowed}
/* Controles para dos fuentes meteorológicas y tres dominios visuales. */
.panel{width:292px;max-height:calc(100vh - 178px);overflow:auto;scrollbar-width:thin;scrollbar-color:rgba(255,255,255,.22) transparent}
.panel.collapsed{overflow:hidden}
.toggles{flex-wrap:wrap;gap:5px 12px}
.toggles .switch{margin:3px 0;white-space:nowrap}
#datasetSelect{border-color:rgba(83,224,193,.34);background:#10272b}
@media(max-width:900px){.panel{width:252px;max-height:calc(100vh - 165px)}}
@media(max-width:560px){.panel{width:calc(100vw - 16px);max-height:calc(100vh - 220px)}.panel.mobile-closed{overflow:hidden}}

/* v2.3 · relieve cartográfico y navegación */
#viewport{touch-action:none;cursor:grab}
#viewport:active{cursor:grabbing}
.zoom-controls{position:absolute;right:14px;top:50%;transform:translateY(-50%);z-index:8;display:flex;flex-direction:column;overflow:hidden;border-radius:13px}
.zoom-controls button{width:42px;height:42px;border:0;border-bottom:1px solid rgba(255,255,255,.13);background:rgba(5,16,22,.78);color:#f2f7f8;font-size:23px;line-height:1;cursor:pointer;text-shadow:0 1px 2px rgba(0,0,0,.8)}
.zoom-controls button:last-child{border-bottom:0;font-size:18px}
.zoom-controls button:hover,.zoom-controls button:focus-visible{background:rgba(42,103,111,.72);outline:none}
.zoom-controls button:active{transform:translateY(1px)}
@media(max-width:560px){.zoom-controls{right:8px;top:52%}.zoom-controls button{width:38px;height:38px}}

/* v3.0 · cartografía vectorial HD y relieve terrestre */
.domain-note{margin:6px 0 2px;padding:8px 9px;border-radius:9px;background:rgba(40,116,124,.13);border:1px solid rgba(90,210,196,.20);font-size:10px;line-height:1.38;color:#aebfc4}
.domain-note strong{color:#d9f4ef}
.hd-map-badge{display:flex;align-items:center;gap:7px;margin:2px 0 10px;padding:8px 9px;border-radius:9px;background:rgba(4,31,38,.64);border:1px solid rgba(83,224,193,.28);font-size:10px;color:#cce1e1}
.hd-map-badge span{width:8px;height:8px;border-radius:50%;background:#53e0c1;box-shadow:0 0 10px rgba(83,224,193,.85)}
#datasetSelect{font-weight:650;background:#0e252c;border-color:rgba(83,224,193,.48)}
.button-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
.button-grid .action{min-width:0;padding-left:7px;padding-right:7px}
@media(max-width:560px){.button-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}

/* v4.0 · tres dominios visuales, acercamientos por país y contacto institucional */
.logo{width:86px;height:48px;object-fit:contain;object-position:center center;border-radius:0;filter:drop-shadow(0 1px 2px rgba(0,0,0,.30))}
#regionSelect{border-color:rgba(103,174,230,.42);background:#10232d}
.disabled-control{opacity:.68}
.contact-footer{position:absolute;left:50%;transform:translateX(-50%);bottom:4px;z-index:9;min-width:290px;text-align:center;padding:4px 14px;border-radius:10px;font-size:11px;color:#cbd6db;background:rgba(4,12,18,.82)}
.contact-footer a{color:#6ab5ec;text-decoration:none;font-weight:650}.contact-footer a:hover{text-decoration:underline}
.timeline{bottom:max(38px,calc(env(safe-area-inset-bottom) + 30px))}
.legend{bottom:112px}
.panel{max-height:calc(100vh - 208px)}
@media(max-width:900px){.logo{width:72px;height:42px}.panel{max-height:calc(100vh - 198px)}.legend{bottom:106px}}
@media(max-width:560px){.logo{width:64px;height:38px}.contact-footer{bottom:2px;min-width:250px;font-size:10px}.timeline{bottom:34px}.legend{bottom:98px}.panel{max-height:calc(100vh - 250px)}}

/* V4.1: doble lectura mm/in para agua precipitable */
.legend-ticks span{display:flex;flex-direction:column;align-items:center;line-height:1.05}.legend-ticks span b{font-weight:500}.legend-ticks span small{font-size:7px;color:#8799a1;margin-top:2px}

/* v4.7: océano blanco y selector de niveles */
#levelSelect:not(:disabled){border-color:rgba(83,224,193,.55);background:#102b31}

/* v5.0.0 · orden explícito de capas: océano blanco → variable → presión → viento → cartografía */
canvas#backgroundCanvas,canvas#scalarCanvas,canvas#contourCanvas,canvas#particleCanvas,canvas#mapCanvas{position:absolute;inset:0;width:100%;height:100%}
#backgroundCanvas{z-index:0;background:#fff;pointer-events:none}
#scalarCanvas{z-index:1;opacity:1;pointer-events:none}
#contourCanvas{z-index:2;pointer-events:none}
#particleCanvas{z-index:3;pointer-events:none}
#mapCanvas{z-index:4;pointer-events:none}
#stationLayer{position:absolute;inset:0;z-index:4;pointer-events:none;overflow:hidden}
.station-marker{position:absolute;left:0;top:0;display:flex;align-items:center;gap:4px;transform-origin:0 0;pointer-events:auto;border:0;background:transparent;color:#161616;padding:0;cursor:pointer;filter:drop-shadow(0 1px 2px rgba(255,255,255,.95))}
.station-marker span{display:block;width:6.5px;height:6.5px;border-radius:50%;background:#fff;border:1.5px solid #2f2f2f;box-shadow:0 0 0 1px rgba(255,255,255,.8)}
.station-marker b{font-size:10px;font-weight:800;background:rgba(255,255,255,.88);border:1px solid rgba(30,30,30,.25);border-radius:5px;padding:2px 4px}
.station-marker:hover span,.station-marker:focus-visible span{background:#53e0c1;transform:scale(1.18)}
.station-marker:focus-visible{outline:2px solid #111;outline-offset:3px}
#windLevelSelect{border-color:rgba(160,160,160,.55);background:#20272a}

.sounding-modal{position:fixed;inset:0;z-index:30;display:flex;align-items:center;justify-content:center;padding:18px;background:rgba(0,0,0,.52);backdrop-filter:blur(4px)}
.sounding-panel{position:relative;width:min(920px,96vw);max-height:92vh;overflow:auto;border-radius:18px;padding:18px;background:rgba(7,16,22,.95)}
.sounding-panel>button{position:absolute;right:12px;top:10px;width:36px;height:36px;border:1px solid rgba(255,255,255,.18);border-radius:10px;background:rgba(255,255,255,.08);font-size:24px;cursor:pointer}
.sounding-panel header{padding-right:48px}.sounding-panel h2{margin:0;font-size:19px}.sounding-panel header p{margin:5px 0 12px;color:var(--muted);font-size:12px}
#soundingBody svg{display:block;width:100%;height:auto;max-height:52vh;background:#fff;border-radius:12px}
.sounding-grid line{stroke:#d4d8db;stroke-width:1}.sounding-grid text{fill:#4a5257;font-size:11px}
.temperature-line{fill:none;stroke:#d1492e;stroke-width:3}.dewpoint-line{fill:none;stroke:#268e9d;stroke-width:3}.wind-profile line,.wind-profile path{stroke:#444;stroke-width:2;fill:none}.wind-profile text{fill:#333;font-size:10px}.theta-profile circle{fill:#8d3290}.theta-profile text{fill:#6f256f;font-size:10px}.chart-label{fill:#d1492e;font-size:12px;font-weight:700}.chart-label.dew{fill:#268e9d}.chart-label.theta{fill:#8d3290}
.sounding-table{overflow:auto;margin-top:10px}.sounding-table table{width:100%;border-collapse:collapse;font-size:11px}.sounding-table th,.sounding-table td{padding:6px 8px;border-bottom:1px solid rgba(255,255,255,.12);text-align:right}.sounding-table th:first-child,.sounding-table td:first-child{text-align:left}.sounding-table th{color:#d7e3e7}.sounding-table td{color:#aebdc2}.sounding-note{margin:10px 0 0;color:#91a2a8;font-size:10px}.sounding-loading,.sounding-error{padding:45px 20px;text-align:center;border-radius:12px;background:rgba(255,255,255,.05)}.sounding-error{color:#ffb0aa}
@media(max-width:560px){.station-marker b{display:none}.station-marker span{width:6px;height:6px}.sounding-modal{padding:6px}.sounding-panel{padding:12px;max-height:96vh}.sounding-panel h2{font-size:15px}}
#stationLayer.compact .station-marker b{display:none}
#stationLayer.compact .station-marker span{width:4.5px;height:4.5px;border-width:1px;box-shadow:0 0 0 .5px rgba(255,255,255,.8)}
.chart-label.wind-label{fill:#444}

/* v5.0.0 · GFS de prueba, sondeos SounderPy-inspired y meteorogramas */
.view-tabs{display:flex;align-items:center;padding:3px;border:1px solid rgba(255,255,255,.14);border-radius:11px;background:rgba(255,255,255,.055)}
.view-tab{min-height:29px;border:0;border-radius:8px;padding:5px 11px;background:transparent;color:#b9c7cb;font-size:11px;font-weight:700;cursor:pointer}
.view-tab.active{background:rgba(83,224,193,.22);color:#f4fffc;box-shadow:inset 0 0 0 1px rgba(83,224,193,.38)}
body.meteorogram-mode #viewport,body.meteorogram-mode #controlPanel,body.meteorogram-mode .legend,body.meteorogram-mode .timeline,body.meteorogram-mode .status,body.meteorogram-mode .contact-footer{visibility:hidden;pointer-events:none}
.meteorogram-view{position:fixed;inset:0;z-index:4;background:#eef2f3;padding:92px 14px 18px;overflow:auto;color:#172229}
.meteorogram-shell{width:min(1300px,100%);margin:0 auto}
.meteorogram-header{position:sticky;top:0;z-index:2;display:flex;align-items:center;justify-content:space-between;gap:18px;border-radius:15px;padding:12px 16px;background:rgba(8,19,25,.94);color:#fff}
.meteorogram-header h2{margin:0;font-size:19px}.meteorogram-header p{margin:4px 0 0;color:#aebdc2;font-size:11px}
.meteorogram-header label{font-size:11px;color:#b9c8cd;min-width:290px}.meteorogram-header select{display:block;width:100%;margin-top:5px;padding:8px 10px;border:1px solid rgba(255,255,255,.2);border-radius:9px;background:#12262e}
.meteorogram-body{margin-top:12px;border-radius:16px;padding:12px;background:rgba(255,255,255,.96);border-color:rgba(20,45,55,.15);box-shadow:0 12px 30px rgba(20,35,42,.12)}
.meteorogram-chart{display:block;width:100%;height:auto;background:#fff;border-radius:12px}
.meteo-panel>rect{fill:#fbfcfc;stroke:#bac4c8;stroke-width:1}.meteo-panel line{stroke:#d8dee1;stroke-width:1}.meteo-panel text{fill:#4c5c63;font-size:10px}
.meteo-line{fill:none;stroke-width:2.4;stroke-linejoin:round;stroke-linecap:round}.series-1{stroke:#c43535!important;fill:#c43535}.series-2{stroke:#2875a9!important;fill:#2875a9}.series-label{font-size:11px!important;font-weight:700}.panel-label{fill:#1d2d34!important;font-size:12px!important;font-weight:800}
.meteo-bar{fill:#2775bd;opacity:.78}.time-axis line{stroke:#39484e}.time-axis text{fill:#39484e;font-size:10px}.meteorogram-title{fill:#15252c;font-size:13px;font-weight:800}

.sounding-modal{padding:0;background:rgba(3,8,11,.88);backdrop-filter:blur(5px)}
.sounding-panel{width:100vw;height:100vh;max-height:none;border-radius:0;padding:18px 22px 26px;overflow:auto;background:#0d171c;color:#edf4f6}
.sounding-panel>button{position:fixed;right:18px;top:14px;z-index:3;background:#25343a;border-color:#53666d}
.sounding-panel header{position:sticky;top:-18px;z-index:2;margin:-18px -22px 14px;padding:17px 70px 13px 22px;background:rgba(10,21,27,.96);border-bottom:1px solid rgba(255,255,255,.12)}
.sounding-panel h2{font-size:21px}.sounding-panel header p{font-size:12px}
.sounding-metrics{display:grid;grid-template-columns:repeat(6,minmax(120px,1fr));gap:8px;margin-bottom:12px}
.sounding-metric{display:grid;grid-template-columns:1fr auto;align-items:end;gap:2px 8px;padding:9px 11px;border:1px solid rgba(255,255,255,.13);border-radius:11px;background:#142229}
.sounding-metric span{grid-column:1/-1;color:#9fb0b6;font-size:10px}.sounding-metric strong{font-size:18px}.sounding-metric small{color:#9fb0b6;font-size:9px;padding-bottom:2px}
.sounding-graphics{display:grid;grid-template-columns:minmax(0,1.7fr) minmax(310px,.8fr);gap:12px;align-items:start}
.sounding-graphics>div{min-width:0;border-radius:12px;overflow:hidden;background:#fff}
#soundingBody svg{width:100%;max-height:none;background:#fff;border-radius:0}
.skewt-bg{fill:#fafafa;stroke:#65747a;stroke-width:1}.pressure-grid{stroke:#b5bec2;stroke-width:.5}.temperature-grid{stroke:#d9caca;stroke-width:.6}.temperature-grid.zero-isotherm{stroke:#60a5fa;stroke-width:1.5}.dry-adiabat{fill:none;stroke:rgba(190,100,100,.28);stroke-width:.8}.moist-adiabat{fill:none;stroke:rgba(70,160,90,.28);stroke-width:.8}.mixing-ratio{fill:none;stroke:rgba(60,150,90,.32);stroke-width:.6;stroke-dasharray:4 6}.axis-label{fill:#435158;font-size:10px}.axis-title{fill:#26373e;font-size:11px;font-weight:700}.plot-title{fill:#1f3037;font-size:14px;font-weight:800}.wind-column-title{fill:#38484e;font-size:10px;font-weight:800}
.temperature-line{stroke:#d23030;stroke-width:2.2;fill:none}.dewpoint-line{stroke:#2e8a4a;stroke-width:2.2;fill:none}.wind-barb line,.wind-barb path{stroke:#1c2a30;stroke-width:1.2;fill:none;stroke-linecap:round;stroke-linejoin:round}.wind-barb .wind-barb-pennant{fill:#1c2a30;stroke:#1c2a30;stroke-width:1}.wind-value{fill:#26373e;font-size:9px}
.hodograph-chart{background:#fbfbfb}.hodo-grid circle{fill:none;stroke:#c4cdd0;stroke-width:1}.hodo-grid line{stroke:#89979d;stroke-width:1}.hodo-grid text{fill:#55656c;font-size:9px}.hodo-line{fill:none;stroke:#5d28a4;stroke-width:2.2;stroke-linejoin:round}.hodo-point{fill:#f06034;stroke:#fff;stroke-width:1.5}.hodo-label{fill:#42545b;font-size:11px;font-weight:800}
.sounding-table{background:#101c22;border:1px solid rgba(255,255,255,.11);border-radius:12px;padding:4px;margin-top:12px}.sounding-table th{position:sticky;top:0;background:#18272e;color:#e9f2f4}.sounding-table td{font-variant-numeric:tabular-nums}.sounding-note{font-size:11px}
@media(max-width:1000px){.sounding-metrics{grid-template-columns:repeat(3,1fr)}.sounding-graphics{grid-template-columns:1fr}.hodograph-chart{max-height:520px}.topbar-actions{gap:5px}.view-tab{padding:5px 7px}.static-model-link{display:none}}
@media(max-width:650px){.view-tabs{position:absolute;right:8px;bottom:-39px;background:rgba(7,16,22,.9)}.sounding-panel{padding:12px}.sounding-panel header{margin:-12px -12px 10px;padding-left:12px}.sounding-metrics{grid-template-columns:repeat(2,1fr)}.meteorogram-view{padding:82px 6px 10px}.meteorogram-header{align-items:stretch;flex-direction:column}.meteorogram-header label{min-width:0}.meteorogram-body{padding:4px}}

/* v5.1.0 · vistas estables de sondeos/meteorogramas y catálogo ampliado de aeropuertos */
.topbar{z-index:50}
#stationLayer{z-index:12}
.station-marker{transition:filter .15s,opacity .15s}
.station-marker:hover,.station-marker:focus-visible{z-index:2;filter:drop-shadow(0 2px 5px rgba(0,0,0,.32))}
.sounding-action{width:100%;margin-top:4px;background:rgba(83,224,193,.17);border-color:rgba(83,224,193,.42);font-weight:750}
.airport-count{margin:6px 0 0;color:#89a0a8;font-size:9px;text-align:right}

body.meteorogram-mode #viewport,
body.meteorogram-mode #controlPanel,
body.meteorogram-mode .legend,
body.meteorogram-mode .timeline,
body.meteorogram-mode .status,
body.meteorogram-mode .contact-footer,
body.sounding-mode #viewport,
body.sounding-mode #controlPanel,
body.sounding-mode .legend,
body.sounding-mode .timeline,
body.sounding-mode .status,
body.sounding-mode .contact-footer{visibility:hidden;pointer-events:none}

.meteorogram-view,.sounding-view{position:fixed;inset:0;z-index:20;overflow:auto;background:#eef2f4;color:#18262d;padding:94px 16px 24px}
.meteorogram-shell,.sounding-shell{width:min(1380px,100%);margin:0 auto}
.product-view-header{position:sticky;top:0;z-index:4;display:flex;align-items:flex-end;justify-content:space-between;gap:20px;padding:15px 18px;border:1px solid rgba(16,42,53,.14);border-radius:16px;background:rgba(250,252,253,.97);box-shadow:0 10px 24px rgba(20,42,51,.10);backdrop-filter:blur(12px)}
.product-view-header h2{margin:2px 0 0;color:#15272f;font-size:22px;line-height:1.15}
.product-view-header p{margin:5px 0 0;max-width:760px;color:#61757e;font-size:12px;line-height:1.45}
.product-kicker{display:block;color:#208a78;font-size:9px;font-weight:800;letter-spacing:.15em;text-transform:uppercase}
.product-view-header label{display:block;min-width:330px;color:#4d626b;font-size:10px;font-weight:700}
.product-view-header select{display:block;width:100%;margin-top:5px;padding:9px 11px;border:1px solid #bdcbd1;border-radius:10px;background:#fff;color:#17282f;font-size:12px}

.meteorogram-body{margin-top:14px}
.meteorogram-summary{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(180px,.65fr) auto;gap:12px;align-items:stretch;margin-bottom:12px}
.meteorogram-summary>div,.meteorogram-summary>button{display:flex;flex-direction:column;justify-content:center;min-height:80px;padding:12px 14px;border:1px solid #cdd8dc;border-radius:14px;background:#fff;box-shadow:0 5px 16px rgba(20,42,51,.06)}
.meteorogram-summary span{color:#51666f;font-size:12px}.meteorogram-summary strong{color:#15272f;font-size:18px}.meteorogram-summary small{margin-top:3px;color:#809199;font-size:10px}
.meteorogram-summary>button{cursor:pointer;border-color:#76baa9;background:#e7f6f1;color:#165e51;font-weight:800;font-size:12px;text-align:center}
.meteorogram-summary>button:hover{background:#d8f1e9}
.meteorogram-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;align-items:start}
.meteorogram-card{min-width:0;overflow:hidden;border:1px solid #cbd7dc;border-radius:16px;background:#fff;box-shadow:0 8px 22px rgba(21,43,52,.07)}
.meteorogram-card>header{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:14px 15px 9px;border-bottom:1px solid #e2e8eb;background:#fbfcfd}
.meteorogram-card h3{margin:0;color:#162a33;font-size:15px}.meteorogram-card p{margin:4px 0 0;color:#6e8088;font-size:10px}
.meteorogram-key-list{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:6px 10px;max-width:48%}
.meteorogram-key{display:inline-flex;align-items:center;gap:5px;color:#4c6068;font-size:9px;white-space:nowrap}.meteorogram-key i{width:18px;height:3px;border-radius:3px;background:#c43535}.series-key-2 i{background:#2875a9}
.meteorogram-latest{padding:7px 15px;color:#3b515a;background:#f4f8f9;font-size:10px;font-weight:650;white-space:normal}
.meteorogram-chart{display:block;width:100%;height:auto;background:#fff}
.meteo-plot-bg{fill:#fcfdfd;stroke:#b9c6cb;stroke-width:1}.meteo-grid-line{stroke:#dce4e7;stroke-width:1}.meteo-axis-text,.meteo-time-text{fill:#4c6068;font-size:10px}.meteo-tick{stroke:#4f626a;stroke-width:1}.meteo-line{fill:none;stroke-width:3;stroke-linejoin:round;stroke-linecap:round}.meteo-bar{fill:#2875a9;opacity:.78}.series-1{stroke:#c43535!important}.series-2{stroke:#2875a9!important}

.sounding-view-header{align-items:center}
.sounding-view-controls{display:grid;grid-template-columns:minmax(250px,1.15fr) minmax(230px,1fr) auto;gap:10px;align-items:end;min-width:min(720px,55vw)}
.sounding-view-controls label{min-width:0}
.sounding-view-controls button{min-height:38px;padding:8px 14px;border:1px solid #78b7a8;border-radius:10px;background:#e5f5ef;color:#155d50;font-size:11px;font-weight:800;cursor:pointer}
.sounding-body{margin-top:14px}
.sounding-body .sounding-metrics{grid-template-columns:repeat(6,minmax(110px,1fr))}
.sounding-body .sounding-metric{border-color:#cbd8dc;background:#fff;color:#182a32;box-shadow:0 4px 12px rgba(20,42,51,.05)}
.sounding-body .sounding-metric span,.sounding-body .sounding-metric small{color:#657980}
.sounding-body .sounding-graphics{grid-template-columns:minmax(0,1.7fr) minmax(320px,.8fr)}
.sounding-body .sounding-graphics>div{border:1px solid #cbd7dc;border-radius:16px;background:#fff;box-shadow:0 8px 22px rgba(21,43,52,.08)}
#soundingBody svg{display:block;width:100%;height:auto;max-height:none;background:#fff;border-radius:16px}
.sounding-body .sounding-table{overflow:auto;max-height:400px;border-color:#cbd7dc;background:#fff;color:#182a32;box-shadow:0 8px 22px rgba(21,43,52,.06)}
.sounding-body .sounding-table th{top:0;background:#e9f0f2;color:#263b44}.sounding-body .sounding-table td{color:#425860;border-bottom-color:#dce5e8}
.sounding-view>.sounding-shell>.sounding-note{margin:12px 2px 0;color:#657980;font-size:10px}

@media(max-width:1050px){
  .meteorogram-grid{grid-template-columns:1fr}
  .meteorogram-summary{grid-template-columns:1fr 1fr}.meteorogram-summary>button{grid-column:1/-1;min-height:48px}
  .sounding-view-header{align-items:stretch;flex-direction:column}.sounding-view-controls{width:100%;min-width:0;grid-template-columns:1fr 1fr auto}
  .sounding-body .sounding-metrics{grid-template-columns:repeat(3,1fr)}
  .sounding-body .sounding-graphics{grid-template-columns:1fr}
}
@media(max-width:700px){
  .meteorogram-view,.sounding-view{padding:124px 7px 14px}
  .product-view-header{position:relative;align-items:stretch;flex-direction:column;padding:12px}.product-view-header label{min-width:0;width:100%}
  .meteorogram-summary{grid-template-columns:1fr}.meteorogram-summary>button{grid-column:auto}
  .meteorogram-card>header{flex-direction:column}.meteorogram-key-list{justify-content:flex-start;max-width:none}
  .sounding-view-controls{grid-template-columns:1fr}.sounding-body .sounding-metrics{grid-template-columns:repeat(2,1fr)}
  .view-tab{padding:5px 6px;font-size:9px}
}

/* v5.2.0: procedencia visible de los perfiles pronosticados */
.sounding-source{
  margin:0 0 14px;
  padding:10px 14px;
  border:1px solid rgba(45,83,105,.22);
  border-radius:10px;
  background:#f5f8fa;
  color:#2c4657;
  font-size:.9rem;
  line-height:1.4;
}

/* v5.4.0: controles de capas, fechas válidas, proyección ortográfica y meteorogramas */
.layer-toggles{display:grid!important;grid-template-columns:1fr 1fr;gap:4px 10px!important;margin-top:8px}
.layer-toggles .switch{margin:4px 0!important;font-size:10px!important}
.layer-hint{margin-top:5px!important;line-height:1.35}
.canada-link{border-color:rgba(108,174,255,.48);background:rgba(75,135,214,.16)}
.canada-link:hover,.canada-link:focus-visible{background:rgba(75,135,214,.27);border-color:rgba(108,174,255,.82)}
.time-labels strong,.time-labels span{font-variant-numeric:tabular-nums}
.time-ticks span{min-width:0;overflow:visible;white-space:nowrap}
.meteorogram-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.meteorogram-grid .meteorogram-card:last-child:nth-child(odd){grid-column:1/-1}
@media(max-width:1000px){.canada-link{display:none}.meteorogram-grid{grid-template-columns:1fr}.meteorogram-grid .meteorogram-card:last-child:nth-child(odd){grid-column:auto}}

/* v5.10.9 · logo centrado, meteorogramas uniformes y dibujo natural */
.brand>.regional-logo{width:246px;height:48px;flex:0 0 auto;object-fit:contain;object-position:center center}
.surface-wind-card{grid-column:1/-1}
.surface-wind-barb-chart{min-height:150px}
.surface-wind-barb-chart .wind-barb line,.surface-wind-barb-chart .wind-barb path{stroke:#14242b;stroke-width:1.45;vector-effect:non-scaling-stroke}
.surface-wind-barb-chart .wind-calm{fill:none;stroke:#14242b;stroke-width:1.45;vector-effect:non-scaling-stroke}
.surface-wind-value{fill:#26373e;font-size:8px;font-weight:650}
.surface-wind-direction{fill:#64757c;font-size:7.5px}
.wind-barb-key i{border:0!important;background:linear-gradient(90deg,transparent 0 42%,#23353d 42% 50%,transparent 50%)!important}
@media(max-width:1260px){.brand>.regional-logo{width:205px;height:40px}.brand p{max-width:34vw}}
@media(max-width:900px){.brand>.regional-logo{width:174px;height:34px}.brand p{max-width:30vw}}
@media(max-width:620px){.brand>.regional-logo{width:128px;height:25px}.brand{gap:6px}.brand h1{font-size:12px}.brand p{font-size:8px;max-width:30vw}}

/* El PNG institucional es transparente: esta placa clara mantiene legibles
   tanto los símbolos como los textos sin cambiar el archivo original. */
.brand>.regional-logo{
  display:block;
  padding:4px 8px;
  border:1px solid rgba(255,255,255,.78);
  border-radius:10px;
  background:linear-gradient(135deg,rgba(255,255,255,.98),rgba(235,244,247,.96));
  box-shadow:0 3px 12px rgba(0,0,0,.24),inset 0 0 0 1px rgba(14,45,58,.06);
}

/* Las cinco tarjetas conservan la misma anchura y todos sus SVG usan el
   mismo lienzo 980×250, incluidas barbas y precipitación. */
.surface-wind-card{grid-column:auto}
.meteorogram-grid .meteorogram-card:last-child:nth-child(odd){grid-column:auto}
.meteorogram-card>header{min-height:78px}
.meteorogram-latest{min-height:34px;display:flex;align-items:center}
.meteorogram-card .meteorogram-chart{width:100%;height:auto;aspect-ratio:980/250}
.surface-wind-barb-chart{min-height:0}

#drawingCanvas{contain:strict;will-change:contents}
.drawing-active #drawingCanvas{
  cursor:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath d='M3 21l3.4-1 12-12-2.4-2.4-12 12L3 21z' fill='%23f4c65d' stroke='%23111'/%3E%3Cpath d='M14.8 6.8l2.4 2.4' stroke='%23111'/%3E%3C/svg%3E") 2 22,crosshair;
}

.meteorogram-key.bar-key i{height:8px;background:#2875a9;border-radius:1px}

/* v5.10.11 · acciones conjuntas para los cinco gráficos del aeropuerto */
.meteorogram-actions{display:flex;flex-direction:column;gap:8px;justify-content:center;min-width:230px;padding:10px;border:1px solid #cdd8dc;border-radius:14px;background:#fff;box-shadow:0 5px 16px rgba(20,42,51,.06)}
.meteorogram-actions button{min-height:38px;padding:9px 13px;border:1px solid #76baa9;border-radius:10px;background:#e7f6f1;color:#165e51;font-weight:800;font-size:11px;cursor:pointer}
.meteorogram-actions button:hover{background:#d8f1e9}.meteorogram-actions button:disabled{cursor:wait;opacity:.65}
@media(max-width:1000px){.meteorogram-actions{grid-column:1/-1;min-width:0;flex-direction:row}.meteorogram-actions button{flex:1}}
@media(max-width:650px){.meteorogram-actions{grid-column:auto;flex-direction:column}}

/* v5.5.0: METAR, dibujo libre y diagnósticos MetPy */
#backgroundCanvas,#scalarCanvas,#contourCanvas,#particleCanvas,#mapCanvas,#drawingCanvas{position:absolute;inset:0;width:100%;height:100%}
#drawingCanvas{z-index:13;pointer-events:none;touch-action:none}
.drawing-active #drawingCanvas{pointer-events:auto;cursor:crosshair}
.panel,.legend,.timeline,.status,.zoom-controls{z-index:40}
.draw-toolbar{display:grid;grid-template-columns:1.5fr repeat(4,28px);gap:6px;align-items:center}
.draw-toolbar .action{min-height:30px}.draw-toolbar #drawEraser,.draw-toolbar #drawUndo,.draw-toolbar #drawClear{grid-column:span 2}
.draw-color{width:28px;height:28px;border:2px solid rgba(255,255,255,.5);border-radius:50%;background:var(--draw-color);cursor:pointer;box-shadow:0 0 0 1px rgba(0,0,0,.35)}
.draw-color.active{outline:2px solid #53e0c1;outline-offset:2px}.draw-color.white{box-shadow:0 0 0 1px #526068}
.metar-panel{display:grid;grid-template-columns:minmax(240px,.8fr) minmax(300px,1.4fr) auto;gap:16px;align-items:center;margin:12px 0 16px;padding:14px 16px;border:1px solid #9fc7bb;border-radius:15px;background:linear-gradient(135deg,#eefaf6,#f9fcfb);color:#19342d}
.metar-panel>div:first-child{display:flex;flex-direction:column;gap:3px}.metar-panel strong{font-size:14px}.metar-panel small{color:#5f7770}.metar-panel p{margin:0;padding:10px 12px;border-radius:9px;background:#fff;border:1px solid #d8e7e2;font:600 12px/1.45 ui-monospace,SFMono-Regular,Consolas,monospace;color:#213d35}
.metar-actions{display:flex;flex-wrap:wrap;gap:6px}.metar-actions button,.metar-actions a{border:1px solid #92afa6;border-radius:8px;background:#fff;color:#214d40;padding:7px 9px;text-decoration:none;font-size:10px;font-weight:700;cursor:pointer}.metar-actions button.active{background:#16765f;color:#fff;border-color:#16765f}
.metar-panel.unavailable{grid-template-columns:1fr;gap:4px;border-color:#d9c890;background:#fffaf0}.metar-panel.unavailable span{color:#725e27;font-size:11px}
.meteo-observation line{stroke:#157b60;stroke-width:2;stroke-dasharray:5 4}.meteo-observation text{fill:#157b60;font-size:11px;font-weight:800}
.parcel-line{fill:none;stroke:#7a2fa1;stroke-width:2.3;stroke-dasharray:7 3}.sounding-level-marker line{stroke:#5f6e75;stroke-width:.8;stroke-dasharray:3 3}.sounding-level-marker text{fill:#405158;font-size:9px;font-weight:800}
.storm-motion circle{fill:#ffcc33;stroke:#191919;stroke-width:1.5}.storm-motion text{fill:#332a00;font-size:10px;font-weight:800}
@media(max-width:900px){.metar-panel{grid-template-columns:1fr}.draw-toolbar{grid-template-columns:1.4fr repeat(4,28px)}}

/* v5.6.0: herramientas flotantes, METAR en mapa y navegación sin caché */
.drawing-tools{position:absolute;right:14px;top:112px;z-index:42;width:184px;padding:9px;border-radius:14px;transition:width .18s,padding .18s;background:rgba(7,16,22,.88)}
.drawing-tools.collapsed{width:44px;height:44px;padding:5px}
.drawing-tools-toggle{width:34px;height:34px;float:right;border:1px solid rgba(255,255,255,.18);border-radius:9px;background:rgba(83,224,193,.14);color:#fff;font-size:17px;cursor:pointer}
.drawing-tools .draw-toolbar{clear:both;display:flex;flex-direction:column;gap:7px;padding-top:8px}
.drawing-tools.collapsed .draw-toolbar{display:none}
.drawing-tools .draw-toolbar .action{width:100%;min-height:32px;padding:7px 8px}
.drawing-tools .draw-toolbar #drawEraser,.drawing-tools .draw-toolbar #drawUndo,.drawing-tools .draw-toolbar #drawClear{grid-column:auto}
.drawing-tools .draw-toolbar .danger{border-color:rgba(255,126,115,.45);color:#ffd6d2}
.draw-colors{display:flex;align-items:center;justify-content:space-between;padding:3px 4px}
.map-metar-popup{position:absolute;z-index:45;padding:15px 16px;border:1px solid rgba(34,112,92,.32);border-radius:15px;background:rgba(250,254,252,.97);box-shadow:0 14px 38px rgba(4,26,20,.28);color:#18352d;backdrop-filter:blur(12px)}
.map-metar-popup h3{margin:4px 25px 2px 0;font-size:15px;color:#14382e}.map-metar-popup>small{display:block;color:#60766f;font-size:10px}.map-metar-popup>p{margin:10px 0;padding:9px 10px;border:1px solid #d6e6e0;border-radius:9px;background:#fff;font:600 11px/1.45 ui-monospace,SFMono-Regular,Consolas,monospace;color:#223e36}
.map-metar-close{position:absolute;right:8px;top:7px;width:28px;height:28px;border:0;border-radius:8px;background:#e9f1ee;color:#29483f;font-size:20px;cursor:pointer}
.map-metar-modes,.map-metar-products{display:flex;gap:7px;margin-top:8px}.map-metar-modes button,.map-metar-products button{flex:1;border:1px solid #91afa5;border-radius:8px;background:#fff;color:#204d40;padding:7px 8px;font-size:10px;font-weight:750;cursor:pointer}.map-metar-modes button.active{background:#16765f;border-color:#16765f;color:#fff}.map-metar-products button{background:#edf7f4}.map-metar-unavailable{color:#765b20!important;background:#fff8e8!important;border-color:#e6d19b!important}
@media(max-width:700px){.drawing-tools{right:8px;top:112px}.map-metar-popup{left:8px!important;right:8px;width:auto!important;top:104px!important}.map-metar-products button{min-height:38px}}

/* La regla final conserva el cursor de lápiz sobre la definición histórica. */
.drawing-active #drawingCanvas{
  cursor:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath d='M3 21l3.4-1 12-12-2.4-2.4-12 12L3 21z' fill='%23f4c65d' stroke='%23111'/%3E%3Cpath d='M14.8 6.8l2.4 2.4' stroke='%23111'/%3E%3C/svg%3E") 2 22,crosshair;
}
