/* 3OSC Synth – tool-specific rules for shell v2 (frame, tokens and components: src/styles/tools.css + tools-tokens.css, docs/TOOLS-FRAME.md).
   Every selector sits under .bft[data-tf="2"] .sy (plate) / .bft-foot, or under .tf-sheetroot .sy-sheetbody (sheets live on <body>). Colours: tokens only.
   Green only for: Play/Download, selected underline (waveform), playhead, selected note outline, drag value, LED (loop on). */
.bft[data-tf="2"] .sy { --sy-row:13px; }
.bft[data-tf="2"] .sy .sy-ttl { font:600 24px/1 var(--font-sans); letter-spacing:0; color:var(--text); }
.bft[data-tf="2"] .sy .tf-kind { display:block; margin-top:6px; }
.bft[data-tf="2"] .sy .sy-slot, .bft[data-tf="2"] .sy .sy-grp { display:flex; align-items:center; gap:12px; min-width:0; }
.bft[data-tf="2"] .sy .sy-presetgrp, .bft[data-tf="2"] .sy #presetGrp { gap:6px; }
.bft[data-tf="2"] .sy #slotPresetD, .bft[data-tf="2"] .sy #slotHistD { gap:6px; }
.bft[data-tf="2"] .sy .sy-hidden-nodes { display:none; }
.bft[data-tf="2"] .sy .tf-field.is-edited .tf-edited { color:var(--text-2); }
.bft[data-tf="2"] .sy .tf-toggle[aria-checked="true"] .tf-led { background:var(--accent); box-shadow:0 0 0 1.5px var(--accent-hover) inset, var(--shadow-led); }
.bft[data-tf="2"] .sy .sy-lic { display:none; width:22px; height:22px; }
.bft[data-tf="2"] .sy .tf-seg [aria-checked="true"] { background:var(--plate-hi); color:var(--text); box-shadow:inset 0 -3px 0 var(--accent); }
.bft[data-tf="2"] .sy .tf-seg [role="radio"]:hover { color:var(--text); }

/* ---- piano roll (display slot) ---- */
.bft[data-tf="2"] .sy .sy-roll { margin:18px 0 0; }
.bft[data-tf="2"] .sy .sy-acts { display:flex; gap:8px; }
.bft[data-tf="2"] .sy .sy-acts .tf-btn { padding:0 14px; font-size:12px; letter-spacing:.06em; }
.bft[data-tf="2"] .sy .sy-scroll { overflow-x:auto; overflow-y:hidden; }
.bft[data-tf="2"] .sy .sy-rollbody { display:flex; min-width:621px; }
.bft[data-tf="2"] .sy .sy-keycol { width:61px; flex:none; position:sticky; left:0; z-index:3; background:var(--lcd); }
.bft[data-tf="2"] .sy .sy-corner { height:26px; position:sticky; top:0; z-index:3; background:var(--lcd); border-bottom:1px solid var(--bd-line-faint); border-right:1px solid var(--bd-line-soft); }
.bft[data-tf="2"] .sy .sy-keys { display:flex; flex-direction:column; border-right:1px solid var(--bd-line-soft); }
.bft[data-tf="2"] .sy .key { display:block; width:100%; height:var(--sy-row); min-height:0; padding:0 6px; border:0; border-bottom:1px solid #6E6E69; border-radius:0; background:var(--text); color:var(--text-on-accent); text-align:right; font:500 12px/var(--sy-row) var(--font-mono); position:relative; touch-action:manipulation; -webkit-tap-highlight-color:transparent; }
.bft[data-tf="2"] .sy .key.black { background:var(--well); color:var(--text-3); border-bottom-color:var(--bd-line-soft); padding-right:20px; width:75%; margin-left:auto; border-radius:3px 0 0 3px; }
.bft[data-tf="2"] .sy .key:hover { background:var(--frost); } .bft[data-tf="2"] .sy .key.black:hover { background:var(--plate-hi); }
.bft[data-tf="2"] .sy .key.active, .bft[data-tf="2"] .sy .key:active { background:var(--accent); color:var(--text-on-accent); }
.bft[data-tf="2"] .sy .key:focus-visible { z-index:4; }
.bft[data-tf="2"] .sy .sy-gridcol { flex:1; min-width:560px; display:flex; flex-direction:column; }
.bft[data-tf="2"] .sy .sy-ruler { display:flex; height:26px; flex:none; position:sticky; top:0; z-index:2; background:var(--lcd); border-bottom:1px solid var(--bd-line-faint); }
.bft[data-tf="2"] .sy .sy-ruler span { flex:1; text-align:center; font:500 12px/26px var(--font-mono); color:var(--text-3); border-left:1px solid var(--bd-line-faint); }
.bft[data-tf="2"] .sy .sy-ruler span:nth-child(4n+1) { color:var(--text-2); border-left-color:var(--plot-grid-strong); }
.bft[data-tf="2"] .sy .sy-grid { position:relative; height:calc(25 * var(--sy-row)); cursor:crosshair; touch-action:none; -webkit-user-select:none; user-select:none; -webkit-touch-callout:none; background:var(--lcd); }
.bft[data-tf="2"] .sy .sy-grid canvas { position:absolute; inset:0; width:100%; height:100%; display:block; background:transparent; }
.bft[data-tf="2"] .sy .sy-grid:focus-visible { box-shadow:inset 0 0 0 2px var(--focus-gap), inset 0 0 0 4.5px var(--focus-ring); }
.bft[data-tf="2"] .sy .tf-disp-foot .sy-hint { text-align:right; }
.bft[data-tf="2"] .sy .sy-nbar { align-items:center; gap:8px; padding:8px 10px; border-top:1px solid var(--bd-line-faint); flex-wrap:wrap; }
.bft[data-tf="2"] .sy .sy-ninfo { flex:1 1 100%; font:500 12px/1.4 var(--font-mono); color:var(--text-2); }

/* ---- desktop panels + advanced ---- */
.bft[data-tf="2"] .sy .tf-panel .tf-knobs { justify-content:center; }
.bft[data-tf="2"] .sy .sy-wn { margin-left:auto; font:500 12px var(--font-mono); letter-spacing:.04em; text-transform:none; color:var(--text-3); }
.bft[data-tf="2"] .sy .sy-wseg { display:flex; width:100%; margin-top:12px; }
.bft[data-tf="2"] .sy .sy-wseg button { flex:1; display:grid; place-items:center; color:var(--text-2); }
.bft[data-tf="2"] .sy .sy-wi { width:24px; height:14px; }
.bft[data-tf="2"] .sy .sy-fk { gap:10px 6px; }
.bft[data-tf="2"] .sy .sy-h4, .bft[data-tf="2"] .sy .sy-sub h4, .bft[data-tf="2"] .sy .sy-env h4 { display:flex; align-items:center; gap:10px; margin:0 0 8px; font:var(--label); letter-spacing:.16em; text-transform:uppercase; color:var(--text-2); }
.bft[data-tf="2"] .sy .sy-sub h4 i { width:10px; height:10px; border-radius:2px; background:var(--c); }
.bft[data-tf="2"] .sy .sy-advosc { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.bft[data-tf="2"] .sy .sy-sub { border:1px solid var(--line); border-radius:var(--r-2); padding:12px 14px 14px; background:rgba(10,11,12,.28); min-width:0; }
.bft[data-tf="2"] .sy .sy-sub .tf-knobs { justify-content:space-around; padding-top:6px; }
.bft[data-tf="2"] .sy .sy-sub .tf-kn { width:104px; }
.bft[data-tf="2"] .sy .sy-env { margin-top:18px; }
.bft[data-tf="2"] .sy .sy-envrow { display:flex; flex-wrap:wrap; align-items:center; gap:16px; }
.bft[data-tf="2"] .sy .sy-plot { flex:1 1 280px; min-width:240px; height:150px; border:1px solid var(--bd-line-soft); border-radius:var(--r-1); background:var(--lcd); position:relative; }
.bft[data-tf="2"] .sy .sy-plot canvas { position:absolute; inset:0; width:100%; height:100%; display:block; background:transparent; }
.bft[data-tf="2"] .sy .sy-envrow .tf-knobs { flex:0 1 auto; padding-top:0; }
.bft[data-tf="2"] .sy .sy-envrow .tf-kn { width:104px; }

/* ---- export bar ---- */
.bft[data-tf="2"] .sy .sy-xl { display:flex; align-items:center; gap:22px; flex-wrap:wrap; }
.bft[data-tf="2"] .sy .sy-master .tf-kn { display:grid; grid-template-columns:auto auto; grid-template-areas:'k l' 'k b'; align-items:center; justify-items:start; gap:6px 12px; width:auto; }
.bft[data-tf="2"] .sy .sy-master .tf-knob { grid-area:k; } .bft[data-tf="2"] .sy .sy-master .tf-lcd { grid-area:l; min-width:72px; } .bft[data-tf="2"] .sy .sy-master .tf-lab { grid-area:b; text-align:left; }
.bft[data-tf="2"] .sy .sy-bars { display:flex; flex-direction:column; gap:6px; }
.bft[data-tf="2"] .sy .sy-statusslot { flex:1 1 220px; min-width:200px; }
.bft[data-tf="2"] .sy .sy-file { padding-right:14px; max-width:100%; }
.bft[data-tf="2"] .sy .sy-file .tf-val { font-size:13px; }
.bft[data-tf="2"] .sy .tf-status { flex:1; }

/* ---- footer note (outside the plate) ---- */
.bft[data-tf="2"] .bft-foot { margin:22px 4px 0; display:flex; flex-wrap:wrap; justify-content:space-between; align-items:flex-start; gap:12px 24px; font:400 12px/1.8 var(--font-mono); color:var(--text-2); }
.bft[data-tf="2"] .bft-foot .tf-kbd { margin:0 2px; }
.bft[data-tf="2"] .bft-clear-row { display:flex; flex-wrap:wrap; align-items:center; gap:8px 14px; margin:0; }
.bft[data-tf="2"] .bft-clear { min-height:44px; padding:0 14px; border:1px solid var(--ctrl-edge); border-radius:var(--r-2); background:var(--well); color:var(--text-2); font:var(--label); letter-spacing:.1em; text-transform:uppercase; }
.bft[data-tf="2"] .bft-clear:hover { color:var(--text); border-color:var(--bd-step-on); }
.bft[data-tf="2"] .bft-clear-msg { font:400 12px/1.4 var(--font-mono); color:var(--text-2); }

/* ---- phone / tablet UI ---- */
html[data-ui="phone"] .bft[data-tf="2"] .sy { --sy-row:44px; }
html[data-ui="phone"] .bft[data-tf="2"] .sy .sy-ttl { font-size:20px; }
html[data-ui="phone"] .bft[data-tf="2"] .sy .tf-kind { margin-top:4px; }
html[data-ui="phone"] .bft[data-tf="2"] .sy .sy-mrows { display:grid; gap:8px; padding:8px 12px 0; }
html[data-ui="phone"] .bft[data-tf="2"] .sy #slotPresetM { display:flex; }
html[data-ui="phone"] .bft[data-tf="2"] .sy #presetGrp { width:100%; }
html[data-ui="phone"] .bft[data-tf="2"] .sy #presetGrp .tf-btn.icon { width:48px; min-height:48px; flex:none; }
html[data-ui="phone"] .bft[data-tf="2"] .sy #presetGrp .tf-sel { flex:1; min-width:0; min-height:48px; }
html[data-ui="phone"] .bft[data-tf="2"] .sy #presetGrp .tf-field select { pointer-events:none; }
html[data-ui="phone"] .bft[data-tf="2"] .sy #presetGrp .tf-field { cursor:pointer; }
html[data-ui="phone"] .bft[data-tf="2"] .sy .sy-mrow2 { display:flex; align-items:center; gap:8px; }
html[data-ui="phone"] .bft[data-tf="2"] .sy .sy-mrow2 .tf-sp { flex:1; }
html[data-ui="phone"] .bft[data-tf="2"] .sy .sy-mrow2 .tf-btn { min-height:48px; }
html[data-ui="phone"] .bft[data-tf="2"] .sy #bpmBox .tf-btn, html[data-ui="phone"] .bft[data-tf="2"] .sy #bpmBox input { min-height:48px; }
html[data-ui="phone"] .bft[data-tf="2"] .sy #bpmBox input { width:64px; font-size:18px; }
html[data-ui="phone"] .bft[data-tf="2"] .sy #bpmBox .tf-btn { width:48px; }
html[data-ui="phone"] .bft[data-tf="2"] .sy .sy-roll { margin:10px 0 0; }
html[data-ui="phone"] .bft[data-tf="2"] .sy .sy-roll .tf-disp-top { padding:6px 8px 6px 12px; flex-wrap:nowrap; }
html[data-ui="phone"] .bft[data-tf="2"] .sy .sy-roll .tf-dtitle { font-size:12px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; min-width:0; }
html[data-ui="phone"] .bft[data-tf="2"] .sy .sy-acts .tf-btn { min-height:44px; padding:0 12px; }
html[data-ui="phone"] .bft[data-tf="2"] .sy .sy-scroll { overflow:auto; max-height:min(50dvh,440px); overscroll-behavior:contain; -webkit-overflow-scrolling:touch; scrollbar-width:thin; }
html[data-ui="phone"] .bft[data-tf="2"] .sy .sy-rollbody { min-width:calc(44px + 16 * 44px); }
html[data-ui="phone"] .bft[data-tf="2"] .sy .sy-keycol { width:46px; }
html[data-ui="phone"] .bft[data-tf="2"] .sy .sy-gridcol { min-width:calc(16 * 44px); }
html[data-ui="phone"] .bft[data-tf="2"] .sy .sy-grid { touch-action:pan-x pan-y; cursor:pointer; }
html[data-ui="phone"] .bft[data-tf="2"] .sy .key { font-size:12px; padding:0 4px; text-align:center; }
html[data-ui="phone"] .bft[data-tf="2"] .sy .key.black { padding-right:4px; width:100%; margin-left:0; border-radius:0; }
html[data-ui="phone"] .bft[data-tf="2"] .sy .sy-ruler span { font-size:12px; }
html[data-ui="phone"] .bft[data-tf="2"] .sy .sy-nbar { display:flex; }
html[data-ui="phone"] .bft[data-tf="2"] .sy .sy-nbar .tf-btn { min-height:48px; flex:1; padding:0 12px; }
html[data-ui="phone"] .bft[data-tf="2"] .sy .sy-nbar .tf-btn.icon, html[data-ui="phone"] .bft[data-tf="2"] .sy .sy-nbar #noteShort, html[data-ui="phone"] .bft[data-tf="2"] .sy .sy-nbar #noteLong { flex:0 0 56px; }
html[data-ui="phone"] .bft[data-tf="2"] .sy .sy-nbar #noteDel { flex:1 1 90px; }
html[data-ui="phone"] .bft[data-tf="2"] .sy .tf-disp-foot { flex-wrap:wrap; gap:2px 12px; }
html[data-ui="phone"] .bft[data-tf="2"] .sy .sy-phone { padding:0 0 4px; }
html[data-ui="phone"] .bft[data-tf="2"] .sy .sy-ptabs { margin-top:10px; border:1px solid var(--ctrl-edge); border-radius:var(--r-2); overflow:hidden; }
html[data-ui="phone"] .bft[data-tf="2"] .sy .sy-ptabs button { white-space:nowrap; padding:0 6px; }
html[data-ui="phone"] .bft[data-tf="2"] .sy .tf-more .tf-count { margin-left:2px; }
html[data-ui="phone"] .bft[data-tf="2"] .sy .sy-statusm { padding:8px 14px 0; }
html[data-ui="phone"] .bft[data-tf="2"] .sy .sy-statusm .tf-status { font-size:12px; }
html[data-ui="phone"] .bft[data-tf="2"] .sy .tf-mbar { align-items:stretch; }
html[data-ui="phone"] .bft[data-tf="2"] .sy .tf-mbar .sy-slot, html[data-ui="phone"] .bft[data-tf="2"] .sy .tf-mbar .sy-grp { display:contents; }
html[data-ui="phone"] .bft[data-tf="2"] .sy .tf-mbar #play { flex:1.3; min-height:52px; font-size:15px; padding:0 12px; }
html[data-ui="phone"] .bft[data-tf="2"] .sy .tf-mbar #export { flex:1; min-height:52px; padding:0 12px; }
html[data-ui="phone"] .bft[data-tf="2"] .sy .tf-mbar #loop { flex:0 0 52px; width:52px; min-height:52px; padding:0; justify-content:center; position:relative; }
html[data-ui="phone"] .bft[data-tf="2"] .sy .tf-mbar #loop .sy-lic { display:block; }
html[data-ui="phone"] .bft[data-tf="2"] .sy .tf-mbar #loop .tf-led { position:absolute; top:7px; right:7px; }
html[data-ui="phone"] .bft[data-tf="2"] .sy .tf-mbar #loop .sy-lt { position:absolute; width:1px; height:1px; margin:-1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }
html[data-ui="phone"][data-pclass="expanded"] .bft[data-tf="2"] .sy .sy-scroll { max-height:min(56dvh,560px); }
html[data-ui="phone"][data-orient="landscape"] .bft[data-tf="2"] .sy .sy-scroll { max-height:min(62dvh,320px); }

/* ---- sheets (on <body>) ---- */
.tool-page .tf-sheetroot .sy-sheetbody { padding:2px 0 8px; }
.tool-page .tf-sheetroot .sy-sheetbody .tf-lr-t b { display:flex; align-items:center; gap:8px; font:var(--label); letter-spacing:.14em; text-transform:uppercase; color:var(--text); }
.tool-page .tf-sheetroot .sy-sheetbody .tf-lr-t b i { width:10px; height:10px; border-radius:2px; background:var(--c); }
.tool-page .tf-sheetroot .sy-sheetbody .tf-lcd { min-width:84px; min-height:36px; padding:0 10px; }
.tool-page .tf-sheetroot .sy-sheetbody .sy-wseg { display:flex; width:100%; margin-bottom:8px; }
.tool-page .tf-sheetroot .sy-sheetbody .sy-wseg button { flex:1; min-height:48px; display:grid; place-items:center; color:var(--text-2); }
.tool-page .tf-sheetroot .sy-sheetbody .sy-wi { width:26px; height:15px; }
.tool-page .tf-sheetroot .sy-sheetbody .tf-seg [aria-checked="true"] { background:var(--plate-hi); color:var(--text); box-shadow:inset 0 -3px 0 var(--accent); }
.tool-page .tf-sheetroot .sy-sheetbody .sy-bseg { display:flex; width:100%; }
.tool-page .tf-sheetroot .sy-sheetbody .sy-bseg button { flex:1; min-height:48px; padding:0 8px; }
.tool-page .tf-sheetroot .sy-sheetbody .sy-oct { display:flex; align-items:center; gap:10px; }
.tool-page .tf-sheetroot .sy-sheetbody .sy-oct .tf-scrub { flex:1; margin-top:0; }
.tool-page .tf-sheetroot .sy-sheetbody .tf-scrub { margin-top:0; touch-action:pan-y; }
.tool-page .tf-sheetroot .sy-sheetbody .tf-sbar { touch-action:pan-y; }
.tool-page .tf-sheetroot .sy-plist { margin:0 -16px; }
.tool-page .tf-sheetroot .sy-plist .sy-gh { margin:14px 18px 4px; font:var(--label); letter-spacing:.16em; text-transform:uppercase; color:var(--text-3); }
.tool-page .tf-sheetroot .sy-plist .sy-prowwrap { display:flex; align-items:center; border-bottom:1px solid #26292D; }
.tool-page .tf-sheetroot .sy-plist .sy-prow { flex:1; width:auto; border-bottom:0; min-width:0; }
.tool-page .tf-sheetroot .sy-plist .sy-pn { color:var(--text-3); margin-right:8px; }
.tool-page .tf-sheetroot .sy-fileline { display:flex; align-items:center; gap:10px; margin:6px 0 14px; min-width:0; }
.tool-page .tf-sheetroot .sy-fileline .tf-mono { font-size:13px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; min-width:0; }
.tool-page .tf-sheetroot .sy-go { width:100%; min-height:52px; }
.tool-page .tf-sheetroot .sy-keys-dl { display:grid; grid-template-columns:minmax(0,auto) 1fr; gap:10px 16px; align-items:start; margin:0; }
.tool-page .tf-sheetroot .sy-keys-dl dd { margin:0; font:400 14px/1.45 var(--font-sans); color:var(--text-2); padding-top:3px; }
.tool-page .tf-sheetroot .sy-keys-dl dt { margin:0; }
.tool-page .tf-sheetroot .sy-keys-dl .tf-kbd { white-space:nowrap; }

@media (max-width:1100px) { .bft[data-tf="2"] .sy .sy-advosc { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (prefers-reduced-motion:reduce) { .bft[data-tf="2"] .sy .sy-scroll { scroll-behavior:auto; } }

/* phone: legibility pass */
html[data-ui="phone"] .bft[data-tf="2"] .sy .tf-disp-foot { flex-direction:column; align-items:flex-start; gap:4px; }
html[data-ui="phone"] .bft[data-tf="2"] .sy .sy-hint { text-align:left; }
html[data-ui="phone"] .bft[data-tf="2"] .sy .sy-roll .tf-dtitle { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
html[data-ui="phone"] .bft[data-tf="2"] .sy .sy-roll .tf-disp-top { justify-content:flex-end; }

/* ---- random pattern dialog (sheet on <body>) ---- */
.tool-page .tf-sheetroot .sy-sheetbody.sy-rnd .tf-seg { display:grid; width:100%; }
.tool-page .tf-sheetroot .sy-sheetbody.sy-rnd .sy-rkeys { grid-template-columns:repeat(6,1fr); }
.tool-page .tf-sheetroot .sy-sheetbody.sy-rnd .sy-rscales { grid-template-columns:repeat(2,1fr); }
.tool-page .tf-sheetroot .sy-sheetbody.sy-rnd .tf-seg button { min-height:48px; padding:0 6px; border-left:0; border-top:1px solid var(--line); text-transform:none; letter-spacing:.02em; font:600 14px var(--font-mono); }
.tool-page .tf-sheetroot .sy-sheetbody.sy-rnd .sy-rscales button { font:var(--label); letter-spacing:.1em; text-transform:uppercase; padding:0 8px; }
.tool-page .tf-sheetroot .sy-sheetbody.sy-rnd .sy-rkeys button:nth-child(-n+6), .tool-page .tf-sheetroot .sy-sheetbody.sy-rnd .sy-rscales button:nth-child(-n+2) { border-top:0; }
.tool-page .tf-sheetroot .sy-sheetbody.sy-rnd .sy-rkeys button:not(:nth-child(6n+1)), .tool-page .tf-sheetroot .sy-sheetbody.sy-rnd .sy-rscales button:nth-child(even) { border-left:1px solid var(--line); }
.tool-page .tf-sheetroot .sy-sheetbody.sy-rnd .sy-rnd-hint { margin:4px 2px 10px; font:400 13px/1.45 var(--font-sans); color:var(--text-2); }
.tool-page .tf-sheetroot .sy-sheetbody.sy-rnd .sy-seed { font-size:13px; letter-spacing:.08em; color:var(--text-2); }
.tool-page .tf-sheetroot .sy-sheetbody.sy-rnd .sy-rnd-acts { display:flex; gap:10px; flex-wrap:wrap; }
.tool-page .tf-sheetroot .sy-sheetbody.sy-rnd .sy-rnd-acts .tf-btn { flex:1 1 150px; min-height:52px; }
.tool-page .tf-sheetroot .sy-sheetbody.sy-rnd .sy-midi { margin-top:18px; padding:14px; border:1px dashed var(--ctrl-edge); border-radius:var(--r-2); background:rgba(10,11,12,.22); }
.tool-page .tf-sheetroot .sy-sheetbody.sy-rnd .sy-midi.is-drop { border-color:var(--text); background:var(--state-row-selected); border-style:solid; }
.tool-page .tf-sheetroot .sy-sheetbody.sy-rnd .sy-midi .sy-rnd-hint { margin:0 0 10px; }
.tool-page .tf-sheetroot .sy-sheetbody.sy-rnd .sy-midi .tf-btn { width:100%; min-height:52px; }
.tool-page .tf-sheetroot .sy-sheetbody.sy-rnd .sy-rnd-msg { display:flex; gap:8px; align-items:flex-start; margin:10px 2px 0; font:500 13px/1.45 var(--font-sans); color:var(--text-2); }
.tool-page .tf-sheetroot .sy-sheetbody.sy-rnd .sy-rnd-msg:empty { display:none; }
.tool-page .tf-sheetroot .sy-sheetbody.sy-rnd .sy-rnd-msg.is-err { color:var(--text-error); }
.tool-page .tf-sheetroot .sy-sheetbody.sy-rnd .sy-rnd-msg svg { width:18px; height:18px; flex:none; margin-top:1px; }
.tool-page .tf-sheetroot .sy-sheetbody.sy-rnd .sy-midi .tf-lr { margin:14px 0 0; }
.tool-page .tf-sheetroot .sy-sheetbody.sy-rnd .sy-tracklist { margin:0 -14px 12px; max-height:min(40dvh,320px); overflow-y:auto; overscroll-behavior:contain; }
.tool-page .tf-sheetroot .sy-sheetbody.sy-rnd .sy-tracklist .tf-li { min-height:48px; }
.tool-page .tf-sheetroot .sy-sheetbody.sy-rnd .sy-tracklist .tf-nm2 { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:14px; }
/* v2: filter type selector + LUFS readout */
.sy-fseg{margin:2px 0 6px}.sy-fseg button{min-width:44px;font:600 11px/1 var(--mono,ui-monospace,monospace);letter-spacing:.06em}
.sy-lufs{font:600 12px/1 var(--mono,ui-monospace,monospace);color:var(--text-2,#B9B6AD);text-align:right;padding-top:4px;font-variant-numeric:tabular-nums}
.sy-ptabs{overflow-x:auto;scrollbar-width:none}.sy-ptabs::-webkit-scrollbar{display:none}
.sy-ptabs [role=tab]{min-width:44px}
.sy-duck{border-top:1px solid var(--line,#34373B);padding-top:8px;margin-top:6px;display:grid;gap:6px}.sy-duckh{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.sy-duckt{min-height:44px}.sy-duckh .tf-seg button{min-height:44px}

/* Standalone synth: a composition desk over the oscillator and modulation rack. */
.tool-page .bft[data-tool="3osc-synth"] .sy .sy-roll { border-top: 3px solid var(--accent); }
.tool-page .bft[data-tool="3osc-synth"] .sy .sy-pattern-lab { display:flex; flex-wrap:wrap; align-items:center; gap:6px; padding:12px 16px; background:var(--well); border-bottom:1px solid var(--line); }
.tool-page .bft[data-tool="3osc-synth"] .sy .sy-lab-title { margin-right:auto; padding-right:14px; font:500 10px/1.5 var(--mono); color:var(--text-3); letter-spacing:.11em; }
.tool-page .bft[data-tool="3osc-synth"] .sy .sy-pattern-lab .tf-btn { min-height:34px; padding:0 12px; }
.tool-page .bft[data-tool="3osc-synth"] .sy .sy-note-inspector { display:flex; flex-wrap:wrap; align-items:center; gap:14px; padding:12px 16px; background:var(--sheet); border-top:1px solid var(--line); }
.tool-page .bft[data-tool="3osc-synth"] .sy .sy-note-inspector label { display:grid; gap:5px; font:500 10px var(--mono); text-transform:uppercase; letter-spacing:.07em; color:var(--text-2); }
.tool-page .bft[data-tool="3osc-synth"] .sy .sy-note-inspector input { width:100px; min-height:36px; padding:6px 10px; border:1px solid var(--line); border-radius:4px; background:var(--lcd); color:var(--text); font:500 13px var(--mono); }
.tool-page .bft[data-tool="3osc-synth"] .sy .sy-note-inspector input:disabled { opacity:.4; }
.tool-page .bft[data-tool="3osc-synth"] .sy .sy-inspect-hint { margin-left:auto; color:var(--text-3); font:500 11px/1.5 var(--mono); }
.tool-page .bft[data-tool="3osc-synth"] .sy .sy-panels { gap:10px; }
.tool-page .bft[data-tool="3osc-synth"] .sy .sy-panels .tf-panel { position:relative; border-top:2px solid var(--bd-line-soft); }
@media(max-width:600px){.tool-page .bft[data-tool="3osc-synth"] .sy .sy-lab-title{flex-basis:100%;margin-bottom:3px}.tool-page .bft[data-tool="3osc-synth"] .sy .sy-inspect-hint{margin-left:0;flex-basis:100%}.tool-page .bft[data-tool="3osc-synth"] .sy .sy-note-inspector{gap:10px}.tool-page .bft[data-tool="3osc-synth"] .sy .sy-note-inspector input{width:82px}}

/* Oscillator rack: teal engineering marks, separate composition and sound surfaces. */
.tool-page .bft[data-tool="3osc-synth"] { --tool-tone:#9ec8c9; --tool-tint:#9ec8c90c; }
.tool-page .bft[data-tool="3osc-synth"] .sy .sy-roll { border-top-color:var(--tool-tone); box-shadow:0 8px 24px #0002; }
.tool-page .bft[data-tool="3osc-synth"] .sy .sy-pattern-lab { background:linear-gradient(120deg,#1e3033,#171f25 70%); border-bottom-color:#35474b; }
.tool-page .bft[data-tool="3osc-synth"] .sy .sy-lab-title { color:var(--tool-tone); }
.tool-page .bft[data-tool="3osc-synth"] .sy .sy-note-inspector { background:#1a2329; border-top-color:#3a484f; }
.tool-page .bft[data-tool="3osc-synth"] .sy .sy-note-inspector input { background:#0b1419; border-color:#4b5a63; box-shadow:inset 0 1px 4px #0005; color:#d5e7e8; font-variant-numeric:tabular-nums; }
.tool-page .bft[data-tool="3osc-synth"] .sy .sy-ruler { background:#111c21; color:#a8c4cc; }
.tool-page .bft[data-tool="3osc-synth"] .sy .sy-panels .tf-panel { border-top-color:#55787a; background:linear-gradient(155deg,#242d32,#1b2227); }
.tool-page .bft[data-tool="3osc-synth"] .sy .sy-panels .tf-panel > h3 { color:var(--tool-tone); }
.tool-page .bft[data-tool="3osc-synth"] .sy .sy-sub { background:#121a1f; border-color:#35434b; box-shadow:inset 0 1px #ffffff04; }
.tool-page .bft[data-tool="3osc-synth"] .sy .sy-plot { background:#0b1419; border-color:#35474f; box-shadow:inset 0 2px 8px #0005; }
.tool-page .bft[data-tool="3osc-synth"] .sy .sy-inspect-hint { color:#a5b8c0; }
/* Studio channel panels */
.tool-page .bft[data-tool="3osc-synth"] .sy { --tool-tone:#a9cbd8; background:#111d25; border:1px solid #3f5663; border-radius:14px; overflow:hidden; }
.tool-page .bft[data-tool="3osc-synth"] .sy .tf-head { padding:22px; background:linear-gradient(110deg,#233943,#131f28); border-bottom:1px solid #405663; }
.tool-page .bft[data-tool="3osc-synth"] .sy .sy-ttl { font-size:24px; letter-spacing:-.04em; }
.tool-page .bft[data-tool="3osc-synth"] .sy .tf-kind { color:#9eb8c6; letter-spacing:.1em; }
.tool-page .bft[data-tool="3osc-synth"] .sy .sy-panels { gap:14px; padding:20px; background:#101b23; }
.tool-page .bft[data-tool="3osc-synth"] .sy .sy-panels .tf-panel { border:1px solid #3d5360; border-top:3px solid #a9cbd8; border-radius:10px; background:linear-gradient(155deg,#21333e,#15242d); padding:18px 12px; box-shadow:0 7px 22px #0002; }
.tool-page .bft[data-tool="3osc-synth"] .sy .sy-panels .tf-panel:nth-child(2) { border-top-color:#d0b18c; }
.tool-page .bft[data-tool="3osc-synth"] .sy .sy-panels .tf-panel:nth-child(3) { border-top-color:#b6a4d2; }
.tool-page .bft[data-tool="3osc-synth"] .sy .sy-panels .tf-panel:nth-child(4) { border-top-color:#9fc8b8; }
.tool-page .bft[data-tool="3osc-synth"] .sy .sy-roll { margin:20px; border:1px solid #405663; border-radius:10px; overflow:hidden; }
.tool-page .bft[data-tool="3osc-synth"] .sy .tf-disp-top { background:#1d303b; }
.tool-page .bft[data-tool="3osc-synth"] .sy-rack-host { --ae-ink:#dce8ef; --ae-muted:#a6bbc8; border-top:1px solid #405663; margin-top:20px; }
.tool-page .bft[data-tool="3osc-synth"] .sy-rack-host .ae-live-rack { background:linear-gradient(145deg,#182b36,#101c24); }
.tool-page .bft[data-tool="3osc-synth"] .sy-rack-note { color:#a6bbc8; font:12px/1.6 var(--font-sans); margin:0 0 16px; }
.tool-page .bft[data-tool="3osc-synth"] .sy-rack-host .ae-chain-card { border-radius:10px; }
@media(max-width:700px){.tool-page .bft[data-tool="3osc-synth"] .sy .tf-head{padding:16px}.tool-page .bft[data-tool="3osc-synth"] .sy .sy-roll{margin:10px}.tool-page .bft[data-tool="3osc-synth"] .sy-rack-host{margin-top:12px}}
