:root{--navy:#071526;--navy-2:#0b1d31;--navy-3:#10263d;--line:#213b54;--white:#eef7ff;--muted:#a1b5c9;--cyan:#5cdbf8;--green:#43dec1}
*{box-sizing:border-box}html,body{height:100%;margin:0}body{background:var(--navy);font:14px/1.48 system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;color:var(--white)}button,select,input{font:inherit}button{cursor:pointer}.application{display:flex;flex-direction:column;min-height:100vh;height:100dvh}.topbar{height:68px;flex:none;display:flex;justify-content:space-between;align-items:center;background:#061321;padding:0 24px;border-bottom:1px solid var(--line);z-index:5}.brandmark{display:flex;align-items:center;gap:12px}.brand-icon{height:42px;width:42px;border-radius:14px;color:#06283b;background:linear-gradient(130deg,#67e8f9,#36bbd5);display:grid;place-items:center;font-size:34px;font-weight:700}.brand-text{display:flex;flex-direction:column;line-height:1.25}.brand-text strong{font-size:18px;letter-spacing:.1px}.brand-text small{color:var(--muted);font-size:12px;margin-top:4px}.topbar-right{display:flex;align-items:center;gap:22px}.top-pill{font-size:11px;font-weight:700;letter-spacing:.12em;color:var(--green)}.live-dot{display:inline-block;background:var(--green);width:7px;height:7px;border-radius:50%;margin-right:8px}.home-link{color:#c1d6e9;text-decoration:none;font-weight:600}.home-link:hover{color:var(--cyan)}.workspace{min-height:0;flex:1;display:flex;overflow:hidden}.controls{width:325px;min-width:325px;height:100%;overflow-y:auto;border-right:1px solid var(--line);background:var(--navy-2);padding:22px 20px 20px;scrollbar-color:#2b536a transparent}.eyebrow{font-size:10px;letter-spacing:.18em;font-weight:800;color:var(--cyan)}h1{font-size:30px;letter-spacing:-1.2px;line-height:1.1;margin:8px 0 10px}p{margin:0}.control-intro p{color:var(--muted);font-size:13px;max-width:270px}.control-group{border-top:1px solid var(--line);padding-top:18px;margin-top:20px}h2,.field-label{font-weight:750;font-size:13px;margin:0 0 11px;display:block}.layer-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}.layer-button{display:flex;align-items:flex-start;gap:8px;border:1px solid #304a62;background:#10283f;color:var(--white);text-align:left;border-radius:11px;padding:12px 8px;min-height:77px;transition:background .16s,border .16s}.layer-button span:last-child{font-weight:700;font-size:12px}.layer-button small{font-size:10px;font-weight:500;color:var(--muted);display:block;margin-top:5px;line-height:1.25}.layer-button:hover:not(:disabled){border-color:#6dcde9}.layer-button.active{background:#153e58;border-color:var(--cyan);box-shadow:inset 0 0 0 1px #4bb7d666}.layer-button.planned{opacity:.48;cursor:not-allowed}.layer-emoji{font-size:24px;line-height:1;color:var(--cyan)}select{height:43px;border:1px solid #31516d;border-radius:9px;background:#10273f;color:var(--white);width:100%;padding:0 12px}.hint{color:var(--muted);font-size:11px;margin-top:8px}.setting-heading{display:flex;justify-content:space-between;align-items:center;font-weight:650}.setting-heading output{color:var(--cyan);font-size:12px}.gap-top{margin-top:17px}input[type=range]{width:100%;margin:12px 0 1px;accent-color:var(--cyan)}.data-panel{border:1px solid var(--line);border-radius:12px;padding:6px 12px 11px;background:#0a1b2e}.data-row{display:flex;justify-content:space-between;gap:18px;padding:9px 0;border-bottom:1px solid #1b354d;font-size:11px}.data-row span{color:var(--muted);flex:none}.data-row strong{text-align:right;font-weight:600;max-width:175px;overflow-wrap:anywhere}.data-panel a{display:inline-block;margin-top:12px;color:var(--cyan);font-size:11px;text-decoration:none}.footnote{font-size:11px;line-height:1.5;color:#829bb0;margin-top:19px}.map-area{position:relative;min-height:0;flex:1;background:#081e30;overflow:hidden}#map,#flowCanvas{position:absolute;inset:0;width:100%;height:100%}#flowCanvas{pointer-events:none;z-index:2}.map-controls{position:absolute;z-index:3;display:flex;gap:10px;align-items:center}.map-controls-top{top:20px;left:20px;right:64px;justify-content:space-between;pointer-events:none}.map-controls-top>*{pointer-events:auto}.map-controls-bottom{left:20px;bottom:22px}.status{display:flex;align-items:center;gap:9px;max-width:min(560px,70vw);background:#081b2ce8;backdrop-filter:blur(10px);border:1px solid #30516c;color:#d6eefa;box-shadow:0 8px 24px #0005;border-radius:9px;padding:10px 13px;font-size:12px}.status.ready{border-color:#236861}.status.error{border-color:#9f5d53;color:#ffdfd4}.loading-ring{border:2px solid #537890;border-top-color:var(--cyan);height:14px;width:14px;border-radius:50%;animation:spin 1s linear infinite}.status.ready .loading-ring,.status.error .loading-ring{display:none}@keyframes spin{to{transform:rotate(360deg)}}#refreshButton,.action-button{background:#0b2237e8;border:1px solid #3a6077;color:#ecf8ff;border-radius:9px;padding:10px 14px;box-shadow:0 5px 18px #0004;font-size:12px;font-weight:700}#refreshButton:hover,.action-button:hover{border-color:var(--cyan)}.action-button.subtle{background:#0a1c2dd9}.legend{position:absolute;z-index:3;bottom:24px;right:25px;width:205px;padding:12px 13px;border-radius:12px;background:#081b2ce8;backdrop-filter:blur(10px);border:1px solid #345069;box-shadow:0 8px 24px #0005}.legend-top,.legend-labels{display:flex;justify-content:space-between}.legend-top{font-weight:700;font-size:12px;margin-bottom:9px}.legend-top span+span{color:var(--muted);font-size:11px}.legend-gradient{height:8px;border-radius:8px;background:linear-gradient(90deg,#65d9f6,#56ddba,#e9de77,#f58b75,#dd5eaa)}.legend-labels{margin-top:7px;color:#c0d5e4;font-size:10px}.inspect{position:absolute;z-index:3;bottom:95px;left:20px;border-radius:11px;background:#081b2ceb;backdrop-filter:blur(10px);border:1px solid #375972;padding:11px 14px;min-width:225px;max-width:340px;pointer-events:none}.inspect-label{display:block;font-size:9px;letter-spacing:.13em;color:var(--cyan);font-weight:700}.inspect strong{display:block;margin-top:5px;font-size:14px}.inspect small{display:block;margin-top:3px;color:var(--muted);font-size:11px}.maplibregl-control-container .maplibregl-ctrl-bottom-right{bottom:152px!important}.maplibregl-ctrl-attrib{background:#081b2cb0!important;color:#b6c6d1!important}.maplibregl-ctrl-attrib a{color:#b6dcef!important}@media(max-width:900px){.controls{width:275px;min-width:275px;padding:16px 14px}.topbar{padding:0 15px}.map-controls-top{left:11px;top:11px;right:50px}.map-controls-bottom{left:11px;bottom:15px}.inspect{left:11px;bottom:82px}.legend{right:12px;bottom:15px}}@media(max-width:700px){.application{height:auto;min-height:100dvh}.topbar{height:62px}.brand-text strong{font-size:15px}.brand-icon{height:37px;width:37px}.home-link{font-size:11px}.top-pill{display:none}.workspace{display:flex;flex-direction:column;overflow:visible}.controls{width:100%;min-width:0;max-height:none;height:auto;overflow:visible;border-right:0;border-bottom:1px solid var(--line);padding:15px}.control-intro h1{font-size:22px}.control-intro p{font-size:12px;max-width:none}.control-group{margin-top:13px;padding-top:12px}.layer-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.layer-button{min-height:69px;display:block;padding:8px 5px}.layer-button .layer-emoji{display:block;margin-bottom:5px;font-size:18px}.layer-button span:last-child{font-size:10px;line-height:1.1}.layer-button small{font-size:9px}.data-panel,.footnote{display:none}.map-area{height:62vh;min-height:430px;flex:auto}.status{max-width:66vw;font-size:11px;padding:9px}#refreshButton{font-size:11px;padding:8px}.inspect{max-width:55%;min-width:0;padding:9px;bottom:69px}.inspect strong{font-size:12px}.inspect small{font-size:9px}.map-controls-bottom{bottom:12px}.legend{width:133px;padding:10px;bottom:13px}.legend-top{font-size:10px}}

/* v1.0.4 — data-derived color shading and expanded density controls */
#shadeCanvas{position:absolute;inset:0;width:100%;height:100%;z-index:1;pointer-events:none;opacity:.43}
#flowCanvas{z-index:2}
.toggle-row{display:flex;align-items:center;gap:11px;font-size:13px;color:var(--white);cursor:pointer;padding:3px 0 1px}
.toggle-row input{accent-color:var(--cyan);width:17px;height:17px;margin:0;cursor:pointer}
#shadeOpacity:disabled{opacity:.4;cursor:not-allowed}
.legend-note{margin-top:7px;color:#9fb6c8;font-size:10px;line-height:1.4}

/* v1.2: forecast-valid-time controls, independent of streamline motion */
#forecastPanel[hidden]{display:none!important}
.forecast-panel{position:absolute;z-index:3;left:50%;bottom:22px;transform:translateX(-50%);width:min(500px,calc(100% - 490px));min-width:320px;padding:12px 16px;border:1px solid #315b72;border-radius:13px;background:#071b2deF;backdrop-filter:blur(12px);box-shadow:0 9px 26px #0007}
.forecast-top{display:flex;justify-content:space-between;gap:8px;align-items:center}.forecast-top>div{display:flex;align-items:center;gap:9px;min-width:0}
.forecast-eyebrow{color:#5cdbf8;font-size:9px;letter-spacing:.1em;font-weight:800;white-space:nowrap}
.forecast-top strong{font-size:14px;white-space:nowrap}.forecast-valid{font-size:11px;color:#c6d8e8;text-align:right}
.forecast-panel input[type=range]{display:block;width:100%;margin:11px 0 1px;accent-color:#5cdbf8;cursor:pointer}.forecast-panel input[type=range]:disabled{opacity:.5;cursor:not-allowed}
.forecast-bottom{display:flex;justify-content:space-between;color:#849db3;font-size:9px;margin-top:0}
.forecast-actions{display:flex;justify-content:space-between;align-items:center;gap:7px;margin-top:10px}
.forecast-actions button{border:1px solid #355874;background:#123249;color:#eef9ff;border-radius:7px;font-size:11px;padding:7px 11px;font-weight:700;min-width:78px}
.forecast-actions button:hover:not(:disabled){border-color:#6cddff}.forecast-actions button:disabled{cursor:not-allowed;opacity:.38}
.forecast-actions #forecastPlay{flex:1;background:#17516a}
.forecast-note{display:block;color:#98adc1;font-size:9px;margin-top:7px;line-height:1.3}
@media(max-width:1190px) and (min-width:701px){.forecast-panel{left:50%;bottom:80px;width:min(480px,calc(100% - 36px));min-width:0}}
@media(max-width:700px){.forecast-panel{left:12px;right:12px;top:75px;bottom:auto;transform:none;width:auto;min-width:0;padding:10px 12px}.forecast-eyebrow{font-size:8px}.forecast-valid{font-size:10px}.forecast-actions button{font-size:10px;padding:7px 5px;min-width:58px}}

/* v1.3.0: optional temperature overlay. Existing particle layers untouched. */
#backgroundVariableGroup[hidden]{display:none!important}
#backgroundVariableGroup{margin-bottom:13px}
#backgroundVariableGroup .field-label{margin-top:4px;margin-bottom:8px}
#backgroundStatus{min-height:16px}
#backgroundVariable:disabled{opacity:.5}

/* v1.3.4 — geographic isotherms over GFS temperature shading. */
#contourCanvas{position:absolute;inset:0;width:100%;height:100%;z-index:2;pointer-events:none}
#flowCanvas{z-index:3}
#contourGroup[hidden]{display:none!important}
.contour-setting{border-top:1px solid #25415a;margin-top:15px;padding-top:14px}
.contour-setting .field-label{margin:0 0 8px}
#contourHint{line-height:1.45}

/* v1.4.0: pressure isobars use the existing canvas; disabled pressure selection on upper air. */
#backgroundVariable option:disabled{color:#8095a6}


/* v1.7.0 – OBS/stream presentation view. Main page remains unchanged. */
.obs-header,.obs-operator,.obs-sidebar-close{display:none}
.obs-launch{color:#7ae5fb;text-decoration:none;font-size:12px;font-weight:800;border:1px solid #28617b;padding:8px 12px;border-radius:8px;background:#10344a}
.obs-launch:hover{border-color:#80ebff;background:#1a4a62}
.obs-mode body{overflow:hidden}
.obs-mode .application{height:100vh;height:100dvh;min-height:0}
.obs-mode .topbar{display:none}
.obs-mode .workspace{height:100%;min-height:0;overflow:hidden;position:relative}
.obs-mode .map-area{width:100%;height:100%;min-height:0;flex:1}
.obs-mode .controls{display:none}
.obs-mode.obs-sidebar-open .controls{display:block;position:absolute;z-index:15;top:14px;left:14px;bottom:14px;height:auto;width:340px;min-width:0;overflow-y:auto;border:1px solid #5087a5;border-radius:13px;box-shadow:0 18px 55px #000b;background:#0b1d31f5;max-height:calc(100% - 28px);padding:14px 18px}
.obs-mode.obs-sidebar-open .obs-sidebar-close{display:block;width:100%;text-align:right;color:#7fe4fc;background:transparent;border:0;font-weight:750;margin-bottom:10px}
.obs-mode .obs-header{position:absolute;z-index:4;top:19px;left:23px;display:flex;gap:22px;align-items:center;max-width:min(650px,72vw);padding:13px 18px;background:linear-gradient(110deg,#071a2be8,#071a2bb2);border:1px solid #326179a9;border-radius:13px;pointer-events:none;box-shadow:0 8px 25px #0005}
.obs-mode .obs-header-brand{display:flex;align-items:center;gap:9px;padding-right:17px;border-right:1px solid #34576e;white-space:nowrap}
.obs-mode .obs-watermark{display:grid;place-items:center;width:38px;height:38px;border-radius:11px;background:#63dcef;color:#07283c;font-size:31px;font-weight:800}
.obs-mode .obs-header-brand span:last-child{display:flex;flex-direction:column;gap:1px}
.obs-mode .obs-header-brand strong{font-size:14px;letter-spacing:.09em}
.obs-mode .obs-header-brand small{font-size:8px;color:#9ebed5;letter-spacing:.12em}
.obs-mode .obs-header-info{display:flex;flex-direction:column;min-width:0}
.obs-mode #obsLayer{font-size:16px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.obs-mode #obsRegion{font-size:11px;color:#8fe0f6}
.obs-mode #obsValid{font-size:11px;color:#d0dfea}
.obs-mode .obs-operator{position:absolute;z-index:20;top:20px;right:68px;display:flex;gap:12px;align-items:center;pointer-events:none;opacity:0;transition:opacity .15s}
.obs-mode .map-area:hover .obs-operator,.obs-mode.obs-sidebar-open .obs-operator,.obs-mode .obs-operator:focus-within{opacity:1}
.obs-mode .obs-operator button{pointer-events:auto;border:1px solid #3d819a;border-radius:8px;background:#0a2439e9;color:#edfaff;font-weight:700;padding:9px 12px}
.obs-mode .obs-keys{pointer-events:none;color:#aed5e7;font-size:10px;background:#07182cd9;border-radius:7px;padding:8px}
.obs-mode .map-controls-top{top:18px;left:auto;right:70px;max-width:62vw}
.obs-mode .status.ready{display:none}
.obs-mode .status:not(.error):not(.ready){margin-top:54px}
.obs-mode .status.error{margin-top:55px;max-width:500px}
.obs-mode #refreshButton{display:none}
.obs-mode .map-controls-bottom{opacity:0;transition:opacity .15s;bottom:24px}
.obs-mode .map-area:hover .map-controls-bottom,.obs-mode .map-controls-bottom:focus-within{opacity:1}
.obs-mode .legend{bottom:30px;right:24px;width:225px;padding:13px 15px}
.obs-mode .inspect{opacity:0;bottom:105px;left:24px}
.obs-mode .inspect.obs-inspected{opacity:1}
.obs-mode .forecast-panel{bottom:25px;left:50%;right:auto;top:auto;transform:translateX(-50%);width:min(510px,45vw);min-width:300px}
.obs-mode .forecast-eyebrow{font-size:10px}
.obs-mode .forecast-top strong{font-size:17px}
.obs-mode .forecast-actions{opacity:0;max-height:0;overflow:hidden;margin-top:0;transition:opacity .15s,max-height .15s,margin .15s}
.obs-mode .forecast-panel:hover .forecast-actions,.obs-mode .forecast-panel:focus-within .forecast-actions{opacity:1;max-height:80px;margin-top:10px}
.obs-mode .forecast-note{display:none}
.obs-mode .maplibregl-ctrl-attrib{opacity:.8}
@media(max-width:900px){.obs-mode .forecast-panel{width:min(490px,65vw);bottom:89px}.obs-mode .obs-keys{display:none}.obs-mode .obs-header{padding:9px 12px;gap:11px}.obs-mode .obs-header-brand{padding-right:11px}}
@media(max-width:700px){.obs-mode .map-area{height:100%;min-height:0;flex:1}.obs-mode .forecast-panel{left:10px;right:10px;top:auto;bottom:84px;transform:none;width:auto;min-width:0}.obs-mode .obs-header{top:10px;left:10px;max-width:calc(100% - 80px)}.obs-mode .obs-header-brand small{display:none}.obs-mode #obsLayer{font-size:12px}.obs-mode .obs-header-brand strong{font-size:11px}.obs-mode .obs-watermark{width:28px;height:28px;font-size:23px}.obs-mode .legend{width:125px;bottom:12px;right:9px}.obs-mode .obs-operator{right:55px;top:9px}.obs-mode.obs-sidebar-open .controls{width:min(330px,calc(100vw - 24px));left:12px;top:12px}.obs-mode .status.error{margin-top:72px}}
