/* Opt-in Adaptive Denoise module — isolated styles; no changes to existing controls. */
.master-tool .adaptive-panel{margin-top:18px;padding:20px;border:1px solid rgba(255,204,0,.18);border-radius:18px;background:linear-gradient(130deg,rgba(255,204,0,.055),rgba(18,22,31,.68) 55%);color:var(--text)}
.master-tool .adaptive-head{display:flex;align-items:flex-start;justify-content:space-between;gap:20px}
.master-tool .adaptive-title{min-width:0}
.master-tool .adaptive-kicker{display:block;margin-bottom:9px;color:#e5bd54;font-size:10px;font-weight:850;letter-spacing:.095em}
.master-tool .adaptive-title h3{margin:0 0 8px;font-size:clamp(18px,2.2vw,23px);font-weight:850;line-height:1.22;letter-spacing:-.03em}
.master-tool .adaptive-title h3 span{color:#ffce3e}
.master-tool .adaptive-title p{max-width:660px;margin:0;color:var(--muted);font-size:12px;line-height:1.65}
.master-tool .adaptive-switch{display:flex;flex:none;align-items:center;gap:11px;cursor:pointer;position:relative;padding:10px 12px;border:1px solid rgba(255,255,255,.10);background:rgba(7,9,15,.55);border-radius:12px}
.master-tool .adaptive-switch input{position:absolute;width:1px;height:1px;opacity:0}
.master-tool .adaptive-switch-track{position:relative;width:38px;height:22px;flex:none;border-radius:100px;background:#383e4d;border:1px solid rgba(255,255,255,.13);transition:background .15s}
.master-tool .adaptive-switch-track::after{content:"";position:absolute;top:2px;left:2px;width:16px;height:16px;border-radius:50%;background:#c4cbd4;transition:transform .15s,background .15s}
.master-tool .adaptive-switch input:checked + .adaptive-switch-track{background:#d8aa12;border-color:#ffdf61}
.master-tool .adaptive-switch input:checked + .adaptive-switch-track::after{transform:translateX(16px);background:#15171f}
.master-tool .adaptive-switch input:focus-visible + .adaptive-switch-track{outline:3px solid #fff;outline-offset:3px}
.master-tool .adaptive-switch strong{min-width:80px;font-size:12px;font-weight:800;color:#abb5c4}
.master-tool .adaptive-switch strong.is-on{color:#ffdc70}
.master-tool .adaptive-fields{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-top:18px;transition:opacity .15s}
.master-tool .adaptive-fields.is-disabled{opacity:.52}
.master-tool .adaptive-field{display:flex;flex-direction:column;gap:10px;min-width:0;padding:15px;border:1px solid rgba(255,255,255,.09);border-radius:13px;background:rgba(7,10,17,.44)}
.master-tool .adaptive-field-name{display:flex;justify-content:space-between;align-items:center;gap:8px;flex-wrap:wrap;font-size:12px;line-height:1.4;font-weight:800}
.master-tool .adaptive-field output{color:#ffd454;font-size:12px;font-variant-numeric:tabular-nums}
.master-tool .adaptive-field input[type=range]{width:100%;min-height:27px;margin:1px 0 0;accent-color:#ffcc00}
.master-tool .adaptive-field select{width:100%;max-width:100%;padding:9px 10px;border:1px solid rgba(255,255,255,.13);border-radius:9px;background:#1f2531;color:#f1f3fa;font-size:12px;font-weight:750;cursor:pointer}
.master-tool .adaptive-field select:disabled{cursor:not-allowed}
.master-tool .adaptive-field small{display:block;color:var(--muted);font-size:11px;line-height:1.6}
.master-tool .adaptive-footnote{margin:13px 0 0;color:#9fa8b7;font-size:11px;line-height:1.55}
@media(max-width:800px){.master-tool .adaptive-fields{grid-template-columns:1fr}}
@media(max-width:540px){.master-tool .adaptive-panel{padding:16px}.master-tool .adaptive-head{flex-wrap:wrap;gap:14px}.master-tool .adaptive-switch{width:100%;justify-content:center}}
@media(prefers-reduced-motion:reduce){.master-tool .adaptive-fields,.master-tool .adaptive-switch-track,.master-tool .adaptive-switch-track::after{transition:none}}

/* v11.23 — independent chain routing; existing presets and sliders stay intact. */
.master-tool .processing-route{margin:0 0 21px;padding:18px;border:1px solid rgba(255,204,0,.23);border-radius:17px;background:linear-gradient(120deg,rgba(255,204,0,.065),rgba(18,22,30,.56))}
.master-tool .processing-route-title h3{margin:5px 0 5px;font-size:18px;line-height:1.3;font-weight:850;letter-spacing:-.02em}
.master-tool .processing-route-title p{margin:0;color:var(--muted);font-size:12px;line-height:1.55}
.master-tool .processing-route-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;margin-top:15px}
.master-tool .processing-route-option{display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:5px;text-align:left;min-width:0;min-height:77px;padding:12px 13px;background:rgba(12,15,23,.77);border:1px solid rgba(255,255,255,.13);border-radius:12px;color:#e3e7f0;cursor:pointer;transition:background .16s,border-color .16s,box-shadow .16s}
.master-tool .processing-route-option strong{font-size:13px;font-weight:850;line-height:1.25}
.master-tool .processing-route-option small{font-size:11px;color:#a3afc0;line-height:1.4}
.master-tool .processing-route-option:hover{background:rgba(255,204,0,.075);border-color:rgba(255,204,0,.45)}
.master-tool .processing-route-option.is-active{background:rgba(255,204,0,.14);border-color:rgba(255,204,0,.72);box-shadow:inset 0 0 0 1px rgba(255,204,0,.15)}
.master-tool .processing-route-option.is-active strong{color:#ffdf76}
.master-tool .processing-route-option.is-active small{color:#d6d0ab}
.master-tool .processing-route-option:focus-visible{outline:3px solid #ffdd4a;outline-offset:2px}
.master-tool .processing-route-caption{margin:12px 1px 0;color:#d0c596;font-size:11px;font-weight:650;line-height:1.5}
.master-tool .legacy-controls,.master-tool .preset-library{transition:opacity .18s,filter .18s}
.master-tool .legacy-controls.is-route-disabled,.master-tool .preset-library.is-route-disabled{opacity:.43;filter:saturate(.46)}
.master-tool .legacy-controls.is-route-disabled{cursor:not-allowed}
.master-tool .legacy-controls.is-route-disabled .preset-btn{pointer-events:none}
@media(max-width:720px){.master-tool .processing-route-options{grid-template-columns:1fr}.master-tool .processing-route-option{min-height:61px}.master-tool .processing-route{padding:15px}}
@media(prefers-reduced-motion:reduce){.master-tool .processing-route-option,.master-tool .legacy-controls,.master-tool .preset-library{transition:none}}

.master-tool #defaults:disabled{opacity:.42;cursor:not-allowed}

/* Hide solo-inactive legacy UI even when a legacy selector defines display. */
.master-tool #legacyControls[hidden],.master-tool #userPresetLibrary[hidden],.master-tool #defaults[hidden]{display:none!important}
