/* Vertical drawbars put all 24 harmonics beside one another; graphs sit below. */
.os-harmonic-ratio{display:none}
#overtone-synth .os-app-title{flex:1;min-width:0;margin:0;color:var(--viz-series-5);font-size:20px;font-weight:700;line-height:1.3;text-align:center}
@media(max-width:500px){#overtone-synth .os-app-title{font-size:18px}}
.os-time-info-header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding-bottom:8px;border-bottom:1px solid var(--border);color:var(--foreground);background:var(--card)}
.os-time-info-close{display:inline-flex;align-items:center;gap:6px;flex:none;min-height:36px;padding:5px 10px;border:1px solid var(--border);border-radius:8px;background:var(--background);color:var(--foreground);font-family:inherit;font-size:13px;font-weight:600;line-height:1.3;cursor:pointer}
.os-time-info-close span{font:24px/1 Arial,sans-serif}
.os-time-info-close:hover{border-color:var(--foreground)}
.os-time-info-close:focus-visible{outline:2px solid var(--primary);outline-offset:2px}
#overtone-synth.os-workspace #os-play{height:40px;padding:8px;font-size:16px;font-weight:700;line-height:1.2;gap:6px!important}
#overtone-synth.os-workspace #os-play svg{width:16px;height:16px;flex:none}
#overtone-synth.os-workspace #os-play .os-play-label{white-space:nowrap}
.os-knob-control.form-label{display:grid;justify-items:center;gap:2px;--os-knob-size:62px;min-width:0}
.os-knob-caption{font-size:10px;line-height:1.3;white-space:nowrap}
.os-knob-face{position:relative;width:var(--os-knob-size);height:calc(var(--os-knob-size)*64/72);direction:ltr}
.os-knob-scale{position:absolute;inset:0;width:100%;height:100%;overflow:visible}
.os-knob-scale line{stroke:var(--muted-foreground);stroke-width:1}
.os-knob-arc{fill:none;stroke:var(--os-knob-color);stroke-width:1.5;opacity:.45}
.os-knob-scale text{fill:var(--muted-foreground);font:9px system-ui,sans-serif}
.os-knob-dial{position:absolute;left:50%;top:50%;width:calc(var(--os-knob-size)*.5);height:calc(var(--os-knob-size)*.5);transform:translate(-50%,-50%);border:1px solid var(--border);border-radius:50%;background:var(--card);box-shadow:inset 0 2px 5px #0003,0 1px 4px #0002;cursor:ns-resize;touch-action:none}
.os-knob-dial:focus-visible{outline:2px solid var(--os-knob-color);outline-offset:3px}
.os-knob-pointer{position:absolute;inset:3px;border-radius:50%;transform:rotate(var(--os-knob-angle));pointer-events:none}
.os-knob-pointer::before{content:"";display:block;width:3px;height:8px;margin:auto;background:var(--os-knob-color);border-radius:2px}
.os-knob-output{color:var(--os-knob-color);font:600 10px/1.3 system-ui,sans-serif;direction:ltr;white-space:nowrap}
.os-knob-control>input[hidden]{display:none!important}
.os-crossfade-control{display:flex;align-items:center;gap:5px;margin-top:5px;font-size:10px;line-height:1.3}
.os-crossfade-control input{direction:ltr;width:100%;min-width:0;height:6px;margin:0;accent-color:var(--viz-series-5)}
.os-crossfade-control output{flex:none;direction:ltr;white-space:nowrap;font-variant-numeric:tabular-nums}
.os-crossfade-control>span{flex:none;color:var(--muted-foreground)}
.os-morph-indicator{display:inline-flex;align-items:center;gap:6px;flex:1 1 120px;max-width:300px;min-width:0;font-size:10px;color:var(--viz-series-3)}
.os-morph-indicator[hidden]{display:none!important}
.os-morph-label{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.os-morph-indicator progress{direction:ltr;width:64px;height:6px;flex:none;accent-color:var(--viz-series-3)}
.os-morph-value{width:30px;flex:none;direction:ltr;font-variant-numeric:tabular-nums}
.os-envelope-knobs{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px;direction:ltr}
.os-midi-section{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:end;gap:7px;padding:5px;border:1px solid color-mix(in srgb,var(--viz-series-5) 55%,var(--border));border-radius:8px;background:color-mix(in srgb,var(--viz-series-5) 12%,var(--card));min-width:0}
.os-midi-section .form-label{color:var(--viz-series-5)}
.os-midi-section .form-select{border-color:var(--viz-series-5)}
#overtone-synth .os-midi-section #os-midi{background:color-mix(in srgb,var(--viz-series-5) 25%,var(--card));color:var(--foreground);border:1px solid var(--viz-series-5)}
@media(min-width:900px) and (min-height:600px){
  body{display:grid;grid-template-rows:minmax(0,1fr) auto;gap:4px;height:100dvh;padding:12px 60px 8px;overflow:hidden}
  #overtone-synth.os-workspace{height:100%;min-height:0;grid-template-rows:auto auto auto minmax(0,1fr);gap:8px}
  #overtone-synth.os-workspace .top{display:grid;grid-template-columns:minmax(125px,1.35fr) 60px 56px minmax(80px,1fr) minmax(100px,1fr) minmax(90px,1fr) minmax(115px,1.15fr) 84px;gap:6px 8px;align-items:center}
  #overtone-synth.os-workspace .top>.os-section-head{grid-column:1/-1}
  #overtone-synth.os-workspace .top>label{min-width:0;max-width:none;width:100%;margin:0}
  #overtone-synth.os-workspace .form-label{display:block;min-width:0;font-size:11px;line-height:1.35}
  #overtone-synth.os-workspace .form-label>.form-select{display:block;width:100%;margin-top:5px;height:29px;padding:4px;font-size:11px}
  #overtone-synth.os-workspace .form-label>.form-range{display:block;width:100%;margin:10px 0 6px;height:6px}
  #overtone-synth.os-workspace #os-play{min-width:0!important;align-self:center}
  #overtone-synth.os-workspace .os-section-head{min-height:22px;margin:0;font-size:13px;line-height:1.3}
  #overtone-synth.os-workspace .os-toggle{width:23px;height:23px;border-radius:6px;font-size:16px}
  #overtone-synth.os-workspace .readout{gap:16px;font-size:11px;min-height:22px;align-items:center}
  #overtone-synth.os-workspace .big{font-size:17px}
  #overtone-synth.os-workspace .os-time-info{padding:6px 10px;border-radius:8px;font-size:11px}
  #overtone-synth.os-workspace .os-time-info[open]>.os-time-info-body{position:fixed;top:145px;right:16px;z-index:25;width:min(420px,calc(100vw - 32px));max-height:calc(100dvh - 170px);overflow:auto;margin:0;padding:16px;border:1px solid var(--border);border-radius:10px;background:var(--card);box-shadow:0 12px 30px #0004;font-size:13px}
  #overtone-synth.os-workspace .os-time-info-header{position:sticky;top:0;z-index:1}
  #overtone-synth.os-workspace .main-content{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1.1fr) minmax(0,1fr);gap:10px;min-height:0;margin:0;align-items:stretch}
  #overtone-synth.os-workspace .overtones-section{display:flex;flex-direction:column;gap:6px;min-height:0}
  #overtone-synth.os-workspace .osc-list{direction:ltr;flex:1;min-height:0;display:grid;grid-template-columns:repeat(24,minmax(0,1fr));grid-template-rows:minmax(0,1fr);gap:4px}
  #overtone-synth.os-workspace .osc{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:auto minmax(20px,1fr) auto;justify-items:center;gap:6px;min-width:0;min-height:0;margin:0;padding:7px 2px;border-radius:7px;background:color-mix(in srgb,var(--card) 70%,var(--background))}
  #overtone-synth.os-workspace .osc-name{flex-direction:column;align-items:center;gap:3px;min-width:0;white-space:nowrap;font-size:11px;line-height:13px}
  #overtone-synth.os-workspace .os-harmonic-name{display:none}
  #overtone-synth.os-workspace .os-harmonic-ratio{display:block;direction:ltr;font-weight:700;font-variant-numeric:tabular-nums}
  #overtone-synth.os-workspace .dot{width:7px;height:7px}
  #overtone-synth.os-workspace .os-level{color:var(--series);font-size:10px;font-variant-numeric:tabular-nums}
  #overtone-synth.os-workspace .osc .form-range{writing-mode:vertical-lr;direction:rtl;appearance:none;-webkit-appearance:none;align-self:stretch;margin:0;width:18px;height:100%;min-height:20px;background:transparent;border-radius:0;cursor:ns-resize}
  #overtone-synth.os-workspace .osc .form-range::-webkit-slider-runnable-track{width:6px;height:100%;border-radius:3px;background:linear-gradient(to top,var(--series) 0%,var(--series) var(--val,0%),var(--border) var(--val,0%),var(--border) 100%)}
  #overtone-synth.os-workspace .osc .form-range::-webkit-slider-thumb{width:18px;height:10px;margin:0;border:2px solid var(--card);border-radius:4px;background:var(--series);box-shadow:0 1px 3px #0003}
  #overtone-synth.os-workspace .osc .form-range::-moz-range-track{width:6px;height:100%;background:var(--border)}
  #overtone-synth.os-workspace .osc .form-range::-moz-range-progress{width:6px;background:var(--series)}
  #overtone-synth.os-workspace .osc .form-range::-moz-range-thumb{width:18px;height:10px;border:2px solid var(--card);border-radius:4px;background:var(--series)}
  #overtone-synth.os-workspace .freq{display:block;min-width:0;max-width:100%;font-size:8px;line-height:11px;text-align:center}
  #overtone-synth.os-workspace .os-frequency{display:flex;flex-direction:column;direction:ltr;white-space:nowrap}
  #overtone-synth.os-workspace [data-freq]{max-width:100%;overflow:hidden;text-overflow:ellipsis}
  #overtone-synth.os-workspace [data-interval]{display:none}
  #overtone-synth.os-workspace .plots-section{position:static;display:flex;flex-direction:row;gap:8px;min-height:0;min-width:0}
  #overtone-synth.os-workspace .plots{display:flex;flex-direction:row;flex:1;min-height:0;min-width:0;gap:8px}
  #overtone-synth.os-workspace .plot{display:grid;grid-template-rows:26px 32px minmax(0,1fr);flex:1;min-height:0;gap:4px}
  #overtone-synth.os-workspace .plot.is-collapsed{flex:0 0 30px}
  #overtone-synth.os-workspace .plot .os-section-head{flex-wrap:nowrap;row-gap:2px}
  #overtone-synth.os-workspace .plot .os-section-head>span{min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  #overtone-synth.os-workspace .plot .os-section-head>label{order:3;width:100%}
  #overtone-synth.os-workspace .plot.is-collapsed .os-section-head>label{display:none}
  #overtone-synth.os-workspace .plot.is-collapsed .os-section-head{flex-direction:column;flex-wrap:nowrap;gap:6px}
  #overtone-synth.os-workspace .plot.is-collapsed .os-section-head>span{display:block;writing-mode:vertical-rl;font-size:11px}
  #overtone-synth.os-workspace .plot.is-collapsed .os-toggle{width:28px;height:28px}
  #overtone-synth.os-workspace .plot canvas{min-height:0;height:100%;width:100%;border-radius:7px}
  #overtone-synth.os-workspace .os-grid-time-label{gap:2px 8px;margin:0;font-size:9px;line-height:1.3}
  #overtone-synth.os-workspace .plot .os-section-head>label{font-size:9px!important;min-width:0}
  #overtone-synth.os-workspace .adsr{flex:0 0 260px;align-content:start;grid-template-columns:minmax(0,1fr);grid-template-rows:auto auto minmax(0,1fr);gap:5px;padding:0 0 0 8px;border-inline-start:1px solid var(--border);min-height:0}
  #overtone-synth.os-workspace .adsr.is-collapsed{flex-basis:30px;padding:0;border:0}
  #overtone-synth.os-workspace .adsr.is-collapsed .os-section-head{flex-direction:column;gap:6px}
  #overtone-synth.os-workspace .adsr.is-collapsed .os-section-head>span{display:block;writing-mode:vertical-rl;font-size:11px}
  #overtone-synth.os-workspace .adsr .btn{padding:5px;font-size:11px}
  #overtone-synth.os-workspace .adsr .form-select{height:26px;margin-top:3px}
  #overtone-synth.os-workspace .adsr .form-range{margin:5px 0;height:6px}
  #overtone-synth.os-workspace .os-knob-control.form-label{display:grid;justify-items:center}
  #overtone-synth.os-workspace .top>.os-knob-control{align-self:center}
  #overtone-synth.os-workspace .adsr .os-knob-control{--os-knob-size:56px}
  #overtone-synth.os-workspace .os-midi-section{align-self:end}
  #overtone-synth.os-workspace .os-midi-section .form-select{height:24px}
  #overtone-synth.os-workspace .os-spectrum-options{align-content:center}
  #overtone-synth.os-workspace .os-spectrum-options label{font-size:10px!important}
  footer[data-cr-footer]{margin:0!important;padding:3px 8px!important;font-size:10px!important;line-height:1.3!important}
}
@media(min-width:900px) and (max-height:700px) and (min-height:600px){
  #overtone-synth.os-workspace{gap:5px}
  #overtone-synth.os-workspace .osc{gap:4px;padding:5px 2px}
  #overtone-synth.os-workspace .osc-name{font-size:10px;line-height:12px}
}
