:root{color-scheme:dark;--bg:#07121e;--card:#0d2133;--border:#25516b;--ink:#e8f5fa;--muted:#91afbd;--cyan:#16dce4;--green:#35e88d}*{box-sizing:border-box}body{margin:0;background:radial-gradient(ellipse at 50% -25%,#13334b 0,#07121e 65%);font-family:Inter,system-ui,-apple-system,Segoe UI,sans-serif;color:var(--ink);font-size:14px}button,input,select{font:inherit}button{cursor:pointer;border:1px solid #325168;border-radius:10px;background:#1a3042;color:#e5f2f8;padding:10px 16px}button:disabled{opacity:.43;cursor:not-allowed}button:hover:not(:disabled){border-color:var(--cyan)}input[type=range]{width:100%;accent-color:var(--cyan)}.shell{width:100%;min-height:100vh;display:flex;flex-direction:column;padding:0 14px}.topbar{min-height:96px;display:flex;align-items:center;justify-content:space-between;padding:12px 26px;border-bottom:1px solid #1d465c;background:repeating-linear-gradient(167deg,transparent 0,transparent 10px,#09b9c00b 11px,transparent 12px)}.brand{display:flex;align-items:center;gap:20px}.brandmark{width:78px;height:78px;filter:drop-shadow(0 0 9px #12f0de55)}h1{font-size:clamp(21px,2.2vw,32px);font-weight:650;letter-spacing:.22em;margin:0;white-space:nowrap}h1 span{color:var(--cyan)}.eyebrow{letter-spacing:.3em;color:#91adbe;margin-top:7px;font-size:12px}.clock{text-align:right;font-size:24px;font-variant-numeric:tabular-nums;white-space:nowrap}.clock small{font-size:12px;color:var(--muted)}.station-tabs{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px;padding:13px 4px 16px}.station-tab{border:1px solid #2b5871;background:linear-gradient(145deg,#102b42,#0c1c2c);border-radius:15px;min-height:91px;padding:12px 16px;text-align:left;min-width:0}.station-tab.active{border:2px solid var(--cyan);box-shadow:0 0 18px #0ff4ed22}.tab-top{display:flex;align-items:center;justify-content:space-between;gap:8px}.tab-id{font-size:21px;font-weight:700}.tab-status{font-size:11px;color:#b5cbd5;white-space:nowrap}.tab-status.configured{color:var(--green)}.tab-location{color:#d1e3ec;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:4px 0 7px}.tab-bottom{font-size:12px;color:var(--muted)}.workspace{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(0,1fr);gap:13px;flex:1;min-height:0}.left-stack,.right-stack{display:flex;flex-direction:column;gap:13px;min-width:0}.panel{border:1px solid #285371;background:linear-gradient(155deg,#0e253b,#0b1c2d);border-radius:17px;padding:14px 16px;min-width:0}.audio-panel{flex:1;display:flex;flex-direction:column}.panel-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;border-bottom:1px solid #2c5268;padding:0 3px 10px;margin-bottom:12px}.titleline{display:flex;align-items:center;gap:12px;min-width:0}.wave-icon{font-size:30px;color:var(--cyan);line-height:1}h2{font-size:23px;margin:0;white-space:nowrap}.subtle{font-size:13px;color:#c1d3df;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.pill{border:1px solid #397189;border-radius:30px;padding:7px 10px;font-size:11px;color:#a8c7d2;white-space:nowrap}.pill.ready{color:var(--green);border-color:#149a76}.spec-layout{display:grid;grid-template-columns:60px minmax(0,1fr) 82px;gap:8px;flex:1;min-height:235px}.frequency-axis{display:flex;flex-direction:column;justify-content:space-between;align-items:end;font-size:11px;color:#c2d4df;padding:2px 0 25px}.spec-wrap{display:flex;flex-direction:column;min-width:0}#spectrogram{display:block;width:100%;height:100%;min-height:215px;border:1px solid #335976;background:#020b1c}.spec-labels{display:flex;justify-content:space-between;font-size:11px;color:#d4e4eb;padding-top:5px}.meter-group{display:flex;flex-direction:column;align-items:center}.meter-names{display:flex;gap:15px;margin:0 0 8px}.meters{height:calc(100% - 47px);width:52px;display:flex;gap:7px;position:relative}.meter{height:100%;flex:1;background:repeating-linear-gradient(to top,#243b4b 0,#243b4b 7px,#081826 8px,#081826 10px);border:1px solid #365b6e;position:relative;overflow:hidden}.meter-fill{position:absolute;bottom:0;left:0;right:0;height:0%;background:linear-gradient(to top,#08d9e7,#56ee8e 48%,#eaf84a 76%,#fc625c)}.meter-scale{position:absolute;display:none}.db-label{font-size:10px;color:#b8cfd9;margin-top:4px}.player-row,.record-row{display:flex;align-items:center;gap:12px;border-top:1px solid #294c63;margin-top:12px;padding-top:11px}.primary{background:#10d7e2;color:#052331;font-weight:700}.player-state{color:#b6cad6;flex:1}.volume-group{display:flex;align-items:center;gap:12px;width:30%;min-width:110px}.record-btn{border-color:#f55e69;color:#ff9ca2;font-weight:700}.record-btn.recording{background:#a21c33;color:#fff;animation:pulse 1.2s infinite}@keyframes pulse{50%{opacity:.65}}.record-note{margin-left:auto;color:#b4cad4;font-size:12px}.feedback{font-size:12px;color:#90b3c2;margin:9px 2px 0;min-height:17px}.eq-panel{min-height:178px}.switch-label{color:var(--cyan);display:flex;align-items:center;gap:6px;font-weight:700}.eq-grid{display:grid;grid-template-columns:1fr 1fr 1fr 1fr 1.55fr;gap:15px;align-items:end}.eq-grid label{font-size:12px;color:#d4e5ec;display:flex;flex-direction:column;gap:9px;min-width:0}.eq-grid output{font-size:12px;color:#7ce8e9}.eq-grid select{width:100%;padding:9px 7px;border:1px solid #406b80;border-radius:7px;background:#0a1a2a;color:#f4fbff}#eqCurve{width:100%;height:95px;background:#071725;border:1px solid #31576b}.map-panel{padding:0;flex:1;min-height:310px;overflow:hidden}.map-shell{position:relative;width:100%;height:100%;min-height:310px}#map{width:100%;height:100%;min-height:310px;background:#102a3e}.leaflet-container{background:#102a3e}.map-tools{position:absolute;right:15px;top:15px;z-index:700}.map-tools button{background:#071a29ec}.layer-menu{background:#0b1c2ded;border:1px solid #45738a;padding:10px 13px;margin-top:7px;border-radius:10px;display:flex;flex-direction:column;gap:10px}.layer-menu[hidden]{display:none}.layer-menu label{white-space:nowrap}.map-legend{position:absolute;left:15px;bottom:15px;z-index:650;background:#071626e9;border:1px solid #3d6073;padding:9px 12px;border-radius:10px;font-size:12px;line-height:1.9}.map-legend i{display:inline-block;width:12px;height:12px;border-radius:2px;margin-right:8px}.day{background:#f3e45b}.twilight{background:#7788c5}.night{background:#20315b}.map-pin{background:#0ee4e9;border:2px solid #d6fffb;width:16px;height:16px;border-radius:50%;box-shadow:0 0 8px #06e9ef}.info-panel{min-height:235px}.info-grid{display:grid;grid-template-columns:1fr 1fr;gap:15px}.station-facts{border-right:1px solid #34566b;padding-right:14px;display:flex;flex-direction:column;gap:11px}.station-facts>div{display:flex;gap:10px;align-items:center}.station-facts span{color:var(--cyan);font-size:19px;width:23px;text-align:center}.station-facts strong{font-weight:450;font-size:13px;overflow-wrap:anywhere}.weather-heading{color:var(--cyan);font-weight:700}.weather-heading span{font-size:11px;color:#c4d9e2;font-weight:400}.weather-main{display:flex;align-items:center;gap:12px;margin-top:10px}.weather-main span{font-size:36px;color:#d4e8f3}.weather-main strong{font-size:29px}.weather-desc{color:#c1d7df;margin-bottom:9px}.weather-metrics{display:grid;gap:4px;color:#c0d4df;font-size:12px}.weather-note{color:#8eafbd;font-size:10px;margin-top:8px}footer{min-height:45px;border-top:1px solid #1d465c;margin-top:13px;display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:12px;letter-spacing:.07em}footer small{color:#b1c5d0;margin-left:9px}.leaflet-control-attribution{font-size:10px!important}.night-canvas{pointer-events:none!important}@media(min-width:1300px) and (min-height:800px){.workspace{min-height:calc(100vh - 282px)}.audio-panel{min-height:430px}.map-panel{min-height:390px}}@media(max-width:1150px){.workspace{grid-template-columns:1fr}.map-panel{height:400px;flex:none}.spec-layout{height:340px}.station-tabs{grid-template-columns:repeat(3,minmax(0,1fr))}}@media(max-width:700px){.shell{padding:0 8px}.topbar{padding:12px 5px;min-height:75px}.brandmark{width:51px;height:51px}.brand{gap:8px}h1{font-size:16px;letter-spacing:.1em;white-space:normal}.eyebrow{font-size:9px;letter-spacing:.15em}.clock{font-size:13px}.station-tabs{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.station-tab{min-height:72px;padding:8px}.tab-id{font-size:17px}.tab-status{font-size:9px}.panel{padding:10px}.map-panel{padding:0}.titleline{gap:6px}h2{font-size:17px}.subtle{font-size:11px}.spec-layout{grid-template-columns:45px minmax(0,1fr) 42px;height:270px}.frequency-axis{font-size:9px}.meters{width:33px}.meter-names{gap:7px}.player-row,.record-row{gap:6px;flex-wrap:wrap}.record-note{width:100%;margin-left:0}.volume-group{width:120px}.eq-grid{grid-template-columns:repeat(2,minmax(0,1fr))}#eqCurve{grid-column:1/-1}.info-grid{grid-template-columns:1fr}.station-facts{border-right:0;border-bottom:1px solid #34566b;padding:0 0 12px}footer{font-size:10px}}

/* V2 layout repair: constrain the content instead of flex-growing to viewport height. */
.workspace{flex:0 0 auto;align-items:start;min-height:0}
.left-stack,.right-stack{min-height:0}
.audio-panel{flex:0 0 auto;min-height:0}
.spec-layout{flex:none;height:clamp(245px,28vh,330px);min-height:0;grid-template-columns:60px minmax(0,1fr) 100px;align-items:stretch}
.spec-wrap{min-height:0;height:100%}
#spectrogram{height:calc(100% - 22px);min-height:0;max-height:none}
.meter-group{min-height:0;height:100%;display:grid;grid-template-rows:22px minmax(0,1fr) 18px;justify-items:center}
.meter-body{display:flex;align-items:stretch;gap:7px;min-height:0;height:100%;width:100%;justify-content:center}
.meters{height:100%;width:46px;flex:none}
.meter-scale{position:static;display:flex;flex-direction:column;justify-content:space-between;align-items:flex-start;width:32px;font-size:10px;color:#c7dbe4;font-variant-numeric:tabular-nums}
.meter-names{margin:0;gap:14px;font-weight:700;color:#c8e7ed}
.meter{border-radius:3px}
.meter-fill{background:linear-gradient(to top,#05c8db 0%,#37e58d 55%,#e8ee56 80%,#f76b60 100%)}
.meter-readouts{display:flex;gap:8px;justify-content:center;font-size:10px;font-variant-numeric:tabular-nums;color:#d2e6eb}
.meter-legend{display:flex;gap:12px;align-items:center;flex-wrap:wrap;font-size:11px;color:#b9d3df;margin:7px 0 0 60px}
.meter-legend i{width:9px;height:9px;display:inline-block;border-radius:2px;margin-right:4px}
.meter-legend .low{background:#28d99b}.meter-legend .mid{background:#e8ee56}.meter-legend .high{background:#f76b60}
.map-panel{flex:none;height:clamp(320px,39vh,430px);min-height:0}
.map-shell,#map{height:100%;min-height:0}
.eq-panel,.info-panel{flex:none}
@media(min-width:1300px) and (min-height:800px){.workspace,.audio-panel,.map-panel{min-height:0}}
@media(max-width:1150px){.workspace{grid-template-columns:1fr}.spec-layout{height:300px}.map-panel{height:370px}}
@media(max-width:700px){.spec-layout{grid-template-columns:42px minmax(0,1fr) 78px;height:260px}.meters{width:32px;gap:4px}.meter-scale{width:28px;font-size:9px}.meter-body{gap:4px}.meter-legend{margin-left:0;font-size:10px}.map-panel{height:320px}}
