:root {
    /* Primitive tokens */
    --at-p-white: #fff;
    --at-p-rose-25: #fffafa;
    --at-p-rose-50: #fff5f6;
    --at-p-rose-100: #ffe6e9;
    --at-p-rose-300: #f7a5ae;
    --at-p-rose-500: #d63846;
    --at-p-rose-700: #9f2130;
    --at-p-coral-400: #ff786e;
    --at-p-slate-950: #111827;
    --at-p-slate-700: #334155;
    --at-p-slate-500: #64748b;
    --at-p-slate-300: #cbd5e1;
    --at-p-slate-200: #e2e8f0;
    --at-p-teal-700: #0f766e;
    /* Semantic tokens */
    --at-surface-canvas: var(--at-p-rose-25);
    --at-surface-raised: var(--at-p-white);
    --at-surface-accent: var(--at-p-rose-50);
    --at-text-primary: var(--at-p-slate-950);
    --at-text-secondary: #5d6b82;
    --at-border-subtle: #eadde0;
    --at-border-strong: #d9b9bf;
    --at-action-primary: var(--at-p-rose-500);
    --at-action-primary-hover: var(--at-p-rose-700);
    --at-focus-ring: rgba(214, 56, 70, .3);
    --at-success: var(--at-p-teal-700);
    /* Component aliases */
    --at-control-radius: 14px;
    --at-panel-radius: 22px;
    --at-control-height: 44px;
    --at-panel-shadow: 0 30px 75px -54px rgba(75, 20, 33, .54);
    /* Backwards-compatible aliases used below */
    --at-ink: var(--at-text-primary);
    --at-muted: var(--at-text-secondary);
    --at-line: var(--at-border-subtle);
    --at-soft: var(--at-surface-accent);
    --at-accent: var(--at-action-primary);
    --at-accent-dark: var(--at-action-primary-hover);
    --at-coral: var(--at-p-coral-400);
    --at-teal: var(--at-success);
    --at-shadow: var(--at-panel-shadow);
}

.autotune-page main > .container:first-child { max-width: 1120px !important; }
.autotune-page [hidden] { display: none !important; }
.autotune-page .tool-hero { padding-bottom: 30px; }
.autotune-page #app { max-width: 1040px; margin-inline: auto; }
.autotune-page .tool-panel { border-color: #eee6e8; box-shadow: var(--at-shadow); }
.autotune-page .tool-panel.hidden { display: none; }

.autotune-console {
    position: relative;
    overflow: hidden;
    padding: 0 !important;
    border: 1px solid #e8cfd4 !important;
    background: linear-gradient(180deg, #fff 0%, #fffbfb 56%, #fff7f8 100%) !important;
    box-shadow: 0 34px 90px -56px rgba(104, 27, 44, .64) !important;
}
.autotune-console > h2 { margin: 0 !important; padding: 26px 28px 14px; font-size: clamp(1.45rem, 3vw, 2rem); }
.autotune-console-eyebrow {
    display: block; margin-bottom: 5px; color: var(--at-accent-dark); font-size: .68rem;
    font-weight: 850; letter-spacing: .13em; text-transform: uppercase;
}

.autotune-workspace-nav {
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px;
    margin: 0 28px 22px; padding: 6px; border: 1px solid var(--at-border-subtle); border-radius: 17px;
    background: #f7f2f3;
}
.autotune-workspace-tab {
    min-width: 0; min-height: 58px; padding: 9px 13px; border: 1px solid transparent; border-radius: 12px;
    color: var(--at-text-secondary); background: transparent; font: inherit; text-align: left; cursor: pointer;
    transition: transform .16s ease, background-color .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.autotune-workspace-tab strong, .autotune-workspace-tab span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.autotune-workspace-tab strong { color: inherit; font-size: .9rem; }
.autotune-workspace-tab span { margin-top: 3px; font-size: .69rem; }
.autotune-workspace-tab:hover { color: var(--at-text-primary); background: rgba(255,255,255,.72); }
.autotune-workspace-tab[aria-selected="true"] { border-color: #ead3d7; color: var(--at-action-primary-hover); background: var(--at-surface-raised); box-shadow: 0 8px 22px -18px rgba(78, 22, 34, .75); }
.autotune-workspace-tab:focus-visible, .autotune-page button:focus-visible, .autotune-page input:focus-visible, .autotune-page select:focus-visible { outline: 3px solid var(--at-focus-ring); outline-offset: 2px; }
.autotune-workspace[hidden] { display: none !important; }
.autotune-workspace { min-width: 0; }
.autotune-workspace-intro {
    display: flex; align-items: end; justify-content: space-between; gap: 24px; margin: 0 28px 16px;
}
.autotune-workspace-intro h3 { margin: 0 !important; color: var(--at-text-primary); font-size: 1.2rem; }
.autotune-workspace-intro p { max-width: 58ch; margin: 0; color: var(--at-text-secondary); font-size: .8rem; line-height: 1.55; }

.autotune-preset-strip {
    display: flex; align-items: center; justify-content: space-between; gap: 18px;
    padding: 14px 28px; border-block: 1px solid var(--at-line); background: rgba(255, 247, 248, .75);
}
.autotune-preset-strip h3 { margin: 0 !important; font-size: .98rem; }
.autotune-preset-buttons { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.autotune-preset {
    min-height: 42px; padding: 9px 15px; border: 1px solid #ddc8cc; border-radius: 999px;
    color: #41272d; background: #fff; font: inherit; font-size: .82rem; font-weight: 780;
    cursor: pointer; touch-action: manipulation; transition: .18s ease;
}
.autotune-preset:hover { border-color: var(--at-accent); color: var(--at-accent-dark); transform: translateY(-1px); }
.autotune-preset[aria-pressed="true"] { border-color: var(--at-accent); color: #fff; background: var(--at-accent); box-shadow: 0 10px 22px -15px rgba(159, 33, 48, .95); }
.autotune-preset:focus-visible, .autotune-scale-key:focus-visible { outline: 3px solid rgba(214, 56, 70, .28); outline-offset: 2px; }

.autotune-tuner-display {
    display: grid; grid-template-columns: 1fr 1fr 1.2fr; gap: 1px; margin: 22px 28px 0;
    overflow: hidden; border: 1px solid #eadadd; border-radius: 18px; background: #eadadd;
    box-shadow: inset 0 1px 0 #fff;
}
.autotune-tuner-display > div { min-width: 0; padding: 18px 20px; background: rgba(255, 255, 255, .96); }
.autotune-tuner-display span { display: block; color: var(--at-muted); font-size: .68rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.autotune-tuner-display strong { display: block; overflow-wrap: anywhere; margin-top: 5px; color: var(--at-ink); font-size: clamp(1.35rem, 3vw, 2.05rem); font-variant-numeric: tabular-nums; line-height: 1.05; }
.autotune-tuner-reading strong { color: #172554; }
.autotune-tuner-target strong { color: var(--at-accent); }
.autotune-tuner-display small { display: block; margin-top: 6px; color: var(--at-muted); font-size: .74rem; line-height: 1.35; }

.autotune-controls-grid {
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px;
    max-width: 100%; padding: 20px 28px 8px;
}
.autotune-control-card {
    min-width: 0; max-width: 100%; padding: 15px; border: 1px solid #eadfe1;
    border-radius: 15px; background: rgba(255, 255, 255, .92); box-shadow: 0 9px 25px -24px rgba(17, 24, 39, .7);
}
.autotune-control-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.autotune-control-label { display: block; color: var(--at-ink); font-size: .84rem; font-weight: 790; }
.autotune-control-card output { flex: 0 0 auto; color: var(--at-accent-dark); font-size: .8rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.autotune-control-card select {
    width: 100%; min-height: 44px; margin-top: 10px; padding: 9px 32px 9px 11px;
    border: 1px solid #dcdfe6; border-radius: 10px; color: var(--at-ink); background: #fff; font: inherit; font-size: .88rem;
}
.autotune-control-card input[type="range"], .autotune-live-actions input[type="range"] { width: 100%; margin: 14px 0 4px; accent-color: var(--at-accent); cursor: pointer; }
.autotune-control-card .status-note { min-height: 3.9em; margin: 9px 0 0 !important; color: var(--at-muted); font-size: .75rem; line-height: 1.5; }
.autotune-control-card:focus-within { border-color: #dfaeb6; box-shadow: 0 0 0 3px rgba(214, 56, 70, .08); }

.autotune-custom-scale, .autotune-key-suggest, .autotune-midi-panel, .autotune-workspace > .status-note, .autotune-console > .status-note, .autotune-console > .row, .autotune-console > #autotune-progress-wrap, .autotune-console > [class^="status"] { margin-inline: 28px; }
.autotune-custom-scale {
    display: grid; grid-template-columns: minmax(190px, .8fr) minmax(0, 2fr); gap: 24px; align-items: center;
    margin-top: 14px; padding: 18px; border: 1px solid #e9d6da; border-radius: 17px; background: #fff;
}
.autotune-custom-scale[hidden] { display: none; }
.autotune-custom-scale h3 { margin: 0 0 5px !important; font-size: 1rem; }
.autotune-custom-scale p { margin: 0; color: var(--at-muted); font-size: .78rem; line-height: 1.45; }
.autotune-scale-keyboard { display: grid; grid-template-columns: repeat(12, minmax(44px, 1fr)); gap: 5px; overflow-x: auto; padding: 3px; }
.autotune-scale-key {
    min-width: 44px; min-height: 54px; border: 1px solid #d9dde5; border-radius: 9px;
    color: #5d6678; background: #f7f8fa; font: inherit; font-size: .76rem; font-weight: 850; cursor: pointer;
}
.autotune-scale-key[aria-pressed="true"] { border-color: var(--at-accent); color: #fff; background: linear-gradient(180deg, #ec4b58, #bd2937); box-shadow: 0 8px 18px -13px rgba(159, 33, 48, .9); }

.autotune-key-suggest {
    display: grid; grid-template-columns: max-content 1fr; gap: 14px; align-items: center;
    margin-top: 14px; padding: 14px 16px; border: 1px solid #d9ebe8; border-radius: 15px; background: #f5fbfa;
}
.autotune-key-suggest .status-note { margin: 0; color: #395e5a; line-height: 1.5; }
.autotune-console > .status-note { line-height: 1.6; }

.autotune-midi-panel {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, .8fr); gap: 24px; align-items: center;
    margin-top: 14px; padding: 18px; border: 1px solid #dbe5ef; border-radius: 17px;
    background: linear-gradient(135deg, #f8fbff, #fff);
}
.autotune-midi-panel h3 { margin: 0 0 5px !important; font-size: 1rem; }
.autotune-midi-panel p { margin: 0; color: var(--at-text-secondary); font-size: .78rem; line-height: 1.5; }
.autotune-midi-actions { display: grid; grid-template-columns: 1fr max-content; gap: 9px; align-items: center; }
.autotune-midi-actions .status-note { grid-column: 1 / -1; }
.autotune-switch { display: inline-flex; align-items: center; gap: 9px; min-height: var(--at-control-height); color: var(--at-text-primary); font-size: .8rem; font-weight: 750; cursor: pointer; }
.autotune-switch input { width: 18px; height: 18px; accent-color: var(--at-action-primary); }

.autotune-live-panel {
    display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(280px, .8fr); gap: 24px; align-items: center;
    margin: 18px 28px 0; padding: 20px; border: 1px solid #efc8ce; border-radius: 18px;
    background: radial-gradient(circle at 94% 4%, rgba(255, 120, 110, .19), transparent 38%), linear-gradient(135deg, #fff7f8, #fff);
}
.autotune-live-copy h3 { margin: 8px 0 5px !important; font-size: 1.18rem; }
.autotune-live-copy p { max-width: 60ch; margin: 0; color: var(--at-muted); font-size: .82rem; line-height: 1.55; }
.autotune-live-badge { display: inline-flex; align-items: center; gap: 7px; color: var(--at-accent-dark); font-size: .7rem; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.autotune-live-badge i { width: 8px; height: 8px; border-radius: 50%; background: var(--at-accent); box-shadow: 0 0 0 5px rgba(214, 56, 70, .11); }
.autotune-live-actions label { display: flex; justify-content: space-between; color: var(--at-ink); font-size: .78rem; font-weight: 750; }
.autotune-live-actions output { color: var(--at-accent-dark); font-variant-numeric: tabular-nums; }
.autotune-live-actions button { width: 100%; min-height: 46px; margin-top: 7px; }
.autotune-live-actions button.is-live { background: #172554; box-shadow: 0 12px 28px -17px rgba(23, 37, 84, .75); }
.autotune-live-actions .status-note { margin: 7px 0 0; font-size: .72rem; line-height: 1.4; }
.autotune-console > .row { padding-bottom: 2px; }
.autotune-console > :last-child { margin-bottom: 26px; }

.autotune-graph-editor {
    display: grid; grid-template-columns: minmax(210px, .7fr) minmax(0, 1.7fr); gap: 14px;
    margin: 14px 28px 4px;
}
.autotune-graph-events {
    display: grid; align-content: start; gap: 7px; max-height: 430px; overflow: auto; padding: 7px;
    border: 1px solid var(--at-border-subtle); border-radius: 16px; background: #faf7f8;
}
.autotune-graph-event {
    display: grid; grid-template-columns: 28px 1fr; gap: 2px 9px; min-height: 58px; padding: 9px 11px;
    border: 1px solid transparent; border-radius: 11px; color: var(--at-text-secondary); background: transparent; font: inherit; text-align: left; cursor: pointer;
}
.autotune-graph-event > span { grid-row: 1 / 3; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 9px; color: var(--at-action-primary-hover); background: var(--at-p-rose-100); font-size: .7rem; font-weight: 850; }
.autotune-graph-event strong { color: var(--at-text-primary); font-size: .92rem; }
.autotune-graph-event small { font-size: .68rem; }
.autotune-graph-event:hover { background: var(--at-surface-raised); }
.autotune-graph-event[aria-selected="true"] { border-color: var(--at-border-strong); background: var(--at-surface-raised); box-shadow: 0 10px 20px -19px rgba(74,18,32,.85); }
.autotune-graph-event.is-edited > span { color: #fff; background: var(--at-action-primary); }
.autotune-graph-event.is-bypassed { opacity: .58; text-decoration: line-through; }
.autotune-graph-inspector { min-width: 0; padding: 18px; border: 1px solid var(--at-border-subtle); border-radius: 16px; background: var(--at-surface-raised); }
.autotune-empty-inspector { display: grid; place-items: center; min-height: 220px; color: var(--at-text-secondary); text-align: center; }
.autotune-empty-inspector strong, .autotune-empty-inspector span { display: block; }
.autotune-empty-inspector strong { color: var(--at-text-primary); }
.autotune-graph-inspector-head { display: flex; align-items: end; justify-content: space-between; gap: 18px; padding-bottom: 14px; border-bottom: 1px solid var(--at-border-subtle); }
.autotune-graph-inspector-head span, .autotune-graph-inspector-head strong { display: block; }
.autotune-graph-inspector-head span { color: var(--at-action-primary-hover); font-size: .68rem; font-weight: 850; letter-spacing: .09em; text-transform: uppercase; }
.autotune-graph-inspector-head strong { margin-top: 4px; font-size: 1.05rem; }
.autotune-graph-inspector-head small { color: var(--at-text-secondary); font-size: .72rem; }
.autotune-graph-controls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; margin-top: 14px; }
.autotune-graph-controls label { display: grid; grid-template-columns: 1fr max-content; gap: 8px; padding: 12px; border: 1px solid var(--at-border-subtle); border-radius: 12px; color: var(--at-text-primary); font-size: .78rem; font-weight: 760; }
.autotune-graph-controls input, .autotune-graph-controls select { grid-column: 1 / -1; width: 100%; min-height: 40px; accent-color: var(--at-action-primary); }
.autotune-graph-controls select { padding: 7px 9px; border: 1px solid var(--at-p-slate-300); border-radius: 9px; background: #fff; }
.autotune-graph-controls output { color: var(--at-action-primary-hover); }
.autotune-graph-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 9px; margin-top: 14px; }
.autotune-graph-actions .autotune-switch { margin-right: auto; }

.autotune-harmony-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 0 28px; }
.autotune-harmony-voice { min-width: 0; padding: 14px; border: 1px solid var(--at-border-subtle); border-radius: 15px; background: var(--at-surface-raised); }
.autotune-harmony-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-bottom: 8px; border-bottom: 1px solid var(--at-border-subtle); }
.autotune-harmony-head b { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 10px; color: var(--at-action-primary-hover); background: var(--at-p-rose-100); font-size: .7rem; }
.autotune-harmony-voice > label, .autotune-harmony-master > label { display: grid; grid-template-columns: 1fr max-content; gap: 7px; margin-top: 11px; color: var(--at-text-primary); font-size: .75rem; font-weight: 720; }
.autotune-harmony-voice input[type="range"], .autotune-harmony-master input[type="range"] { grid-column: 1 / -1; width: 100%; accent-color: var(--at-action-primary); }
.autotune-harmony-voice output, .autotune-harmony-master output { color: var(--at-action-primary-hover); font-variant-numeric: tabular-nums; }
.autotune-harmony-master { margin: 12px 28px 4px; padding: 16px 18px; border: 1px solid #d9ebe8; border-radius: 15px; background: #f5fbfa; }
.autotune-harmony-master > label { margin: 0; }
.autotune-harmony-master .status-note { margin: 9px 0 0; color: #395e5a; }

.autotune-result-panel { overflow: hidden; }
.autotune-pitch-map { margin: 0 28px; padding: 18px; border: 1px solid #eadfe1; border-radius: 18px; background: #fffafb; }
.autotune-pitch-map-head { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 12px; }
.autotune-pitch-map h3 { margin: 0 !important; font-size: 1.05rem; }
.autotune-pitch-legend { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 12px; color: var(--at-muted); font-size: .7rem; font-weight: 700; }
.autotune-pitch-legend span { display: inline-flex; align-items: center; gap: 5px; }
.autotune-pitch-legend i { width: 18px; height: 3px; border-radius: 99px; background: #172554; }
.autotune-pitch-legend i.target { background: var(--at-accent); }
.autotune-pitch-legend i.skipped { height: 6px; background: #98a2b3; }
.autotune-pitch-canvas-wrap { overflow: hidden; border: 1px solid #f0e7e9; border-radius: 12px; background: #fffafb; }
.autotune-pitch-canvas-wrap canvas { display: block; max-width: 100%; }
.autotune-pitch-map > .status-note { margin: 9px 0 0; font-size: .72rem; }

@media (max-width: 920px) {
    .autotune-controls-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .autotune-preset-strip, .autotune-pitch-map-head, .autotune-workspace-intro { align-items: flex-start; flex-direction: column; }
    .autotune-preset-buttons, .autotune-pitch-legend { justify-content: flex-start; }
    .autotune-live-panel { grid-template-columns: 1fr; }
    .autotune-custom-scale { grid-template-columns: 1fr; }
    .autotune-midi-panel { grid-template-columns: 1fr; }
    .autotune-harmony-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .autotune-graph-editor { grid-template-columns: 1fr; }
    .autotune-graph-events { grid-template-columns: repeat(3, minmax(0, 1fr)); max-height: none; overflow-x: auto; }
}

@media (max-width: 620px) {
    .autotune-page { overflow-x: clip; }
    .autotune-page main, .autotune-page main > .container:first-child, .autotune-page #app, .autotune-page .tool-panel { width: 100%; min-width: 0; max-width: 100% !important; box-sizing: border-box; }
    .autotune-page main > .container:first-child { padding-inline: 14px; }
    .autotune-page .tool-hero { padding-top: 34px; }
    .autotune-page .tool-hero { overflow: hidden; padding-inline: 4px; }
    .autotune-page .tool-hero .heading-lg { max-width: 100%; font-size: clamp(2rem, 9.4vw, 2.7rem); white-space: normal !important; overflow-wrap: break-word; }
    .autotune-page .tool-hero .lede { max-width: 100%; font-size: .96rem; white-space: normal !important; overflow-wrap: break-word; }
    .autotune-page .nav-finder-trigger { display: none !important; }
    .autotune-page .nav-burger { display: inline-flex !important; }
    .autotune-page .privacy-ribbon { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
    .autotune-console > h2 { padding: 22px 18px 12px; }
    .autotune-workspace-nav { grid-template-columns: 1fr 1fr; margin-inline: 18px; }
    .autotune-workspace-tab { min-height: 54px; }
    .autotune-workspace-intro { margin-inline: 18px; }
    .autotune-preset-strip { padding: 14px 18px; }
    .autotune-preset-buttons { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
    .autotune-preset { width: 100%; }
    .autotune-tuner-display { grid-template-columns: 1fr 1fr; margin-inline: 18px; }
    .autotune-tuner-display > div { padding: 15px; }
    .autotune-tuner-scale { grid-column: 1 / -1; }
    .autotune-controls-grid { grid-template-columns: 1fr; padding-inline: 18px; }
    .autotune-control-card .status-note { min-height: 0; }
    .autotune-custom-scale, .autotune-key-suggest, .autotune-midi-panel, .autotune-live-panel, .autotune-workspace > .status-note, .autotune-console > .status-note, .autotune-console > .row, .autotune-console > #autotune-progress-wrap { margin-inline: 18px; }
    .autotune-key-suggest { grid-template-columns: 1fr; }
    .autotune-key-suggest button { width: 100%; }
    .autotune-scale-keyboard { grid-template-columns: repeat(6, minmax(44px, 1fr)); }
    .autotune-pitch-map { padding: 14px; }
    .autotune-pitch-map { margin-inline: 18px; }
    .autotune-midi-actions, .autotune-graph-controls, .autotune-harmony-grid { grid-template-columns: 1fr; }
    .autotune-midi-actions button { width: 100%; }
    .autotune-graph-editor, .autotune-harmony-grid, .autotune-harmony-master { margin-inline: 18px; }
    .autotune-graph-events { display: flex; overflow-x: auto; }
    .autotune-graph-event { flex: 0 0 170px; }
    .autotune-graph-inspector-head, .autotune-graph-actions { align-items: flex-start; flex-direction: column; }
    .autotune-graph-actions button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    .autotune-page *, .autotune-page *::before, .autotune-page *::after { scroll-behavior: auto !important; transition-duration: .001ms !important; }
}

/* ===========================================================================
   Pitch Workstation v4 — light, original plugin-style information architecture
   ========================================================================== */
.autotune-page {
    --at-workspace-bg: #f7f4f5;
    --at-workspace-line: #dfd5d8;
    --at-workspace-ink: #17151a;
    --at-workspace-muted: #655e69;
    --at-workspace-pink: #d63846;
    --at-workspace-pink-dark: #9f2130;
    --at-workspace-blue: #243b73;
    --at-workspace-teal: #0f766e;
    --at-z-stage: 1;
    --at-z-sticky: 20;
}
.autotune-page .autotune-tool-container { max-width: 1280px !important; }
.autotune-page #app { max-width: 1240px; }
.autotune-page #app > .autotune-plugin-frame { margin-bottom: 34px; }

.autotune-plugin-frame {
    position: relative;
    overflow: clip;
    border: 1px solid var(--at-workspace-line);
    border-radius: 28px;
    background: var(--at-workspace-bg);
    box-shadow: 0 38px 90px -58px rgba(58, 22, 31, .58), 0 1px 0 #fff inset;
}
.autotune-plugin-header {
    display: grid;
    grid-template-columns: minmax(250px, 1fr) auto minmax(190px, auto);
    align-items: center;
    gap: 18px;
    min-height: 76px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--at-workspace-line);
    background: linear-gradient(180deg, #fff, #fbf8f9);
}
.autotune-plugin-identity { display: flex; align-items: center; gap: 12px; min-width: 0; }
.autotune-plugin-mark {
    display: grid;
    flex: 0 0 44px;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 13px;
    color: #fff;
    background: linear-gradient(145deg, var(--at-workspace-pink), #ef6670);
    box-shadow: 0 12px 24px -15px rgba(159, 33, 48, .86);
}
.autotune-plugin-mark svg, .autotune-source-panel button svg, #autotune-process svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.autotune-plugin-identity strong, .autotune-plugin-identity small { display: block; }
.autotune-plugin-identity strong { color: var(--at-workspace-ink); font-size: .96rem; letter-spacing: -.01em; }
.autotune-plugin-identity small { margin-top: 3px; color: var(--at-workspace-muted); font-size: .7rem; }
.autotune-plugin-trust { display: flex; align-items: center; gap: 8px; }
.autotune-plugin-trust span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 34px;
    padding: 6px 11px;
    border: 1px solid #dbe8e5;
    border-radius: 999px;
    color: #345b56;
    background: #f3faf8;
    font-size: .68rem;
    font-weight: 800;
}
.autotune-plugin-trust i { width: 7px; height: 7px; border-radius: 50%; background: var(--at-workspace-teal); box-shadow: 0 0 0 4px rgba(15,118,110,.11); }
.autotune-plugin-state { display: flex; flex-direction: column; min-width: 0; text-align: right; }
.autotune-plugin-state b { color: var(--at-workspace-ink); font-size: .78rem; }
.autotune-plugin-state span { overflow: hidden; margin-top: 2px; color: var(--at-workspace-muted); font-size: .68rem; text-overflow: ellipsis; white-space: nowrap; }

.autotune-plugin-frame > .autotune-preset-strip {
    padding: 11px 20px;
    border-top: 0;
    border-bottom: 1px solid var(--at-workspace-line);
    background: #fff;
}
.autotune-plugin-frame > .autotune-preset-strip h3 { font-size: .86rem; }
.autotune-plugin-frame > .autotune-preset-strip .autotune-console-eyebrow { margin-bottom: 2px; }
.autotune-plugin-frame .autotune-preset { min-height: 44px; padding: 8px 14px; }

.autotune-audition-dock {
    position: sticky;
    z-index: var(--at-z-sticky);
    top: 76px;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    padding: 10px 20px 12px;
    border-bottom: 1px solid var(--at-workspace-line);
    background: rgba(255,255,255,.96);
    box-shadow: 0 16px 28px -28px rgba(40,18,25,.75);
    backdrop-filter: blur(12px);
}
.autotune-audition-head { display: grid; grid-template-columns: auto auto auto minmax(130px,1fr); align-items: center; gap: 10px; }
.autotune-audition-head > div:first-child strong { display: block; color: var(--at-workspace-ink); font-size: .84rem; }
.autotune-ab-switch { display: grid; grid-template-columns: 1fr 1fr; min-width: 184px; padding: 3px; border: 1px solid #d9d4db; border-radius: 12px; background: #f1eef0; }
.autotune-ab-switch button, .autotune-bypass-hold {
    min-height: 44px;
    border: 0;
    border-radius: 9px;
    color: #514b55;
    background: transparent;
    font: inherit;
    font-size: .75rem;
    font-weight: 820;
    cursor: pointer;
    touch-action: manipulation;
    transition: box-shadow .18s ease;
}
.autotune-ab-switch button[aria-pressed="true"] { color: #fff; background: var(--at-workspace-ink); box-shadow: 0 7px 16px -12px rgba(0,0,0,.8); }
.autotune-audition-dock.is-tuned .autotune-ab-switch button[aria-pressed="true"] { background: #b42334; }
.autotune-bypass-hold { min-width: 110px; padding-inline: 12px; border: 1px solid #d9ccd0; background: #fff; }
.autotune-bypass-hold[aria-pressed="true"] { border-color: var(--at-workspace-pink); color: #fff; background: var(--at-workspace-pink); }
.autotune-ab-switch button:disabled, .autotune-bypass-hold:disabled { opacity: .42; cursor: not-allowed; }
.autotune-audition-state { overflow: hidden; color: var(--at-workspace-muted); font-size: .7rem; font-weight: 720; text-align: right; text-overflow: ellipsis; white-space: nowrap; }
.autotune-main-player { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 12px; }
.autotune-main-player .wave-wrap { height: 48px; border: 1px solid #e2dade; border-radius: 10px; background: #fffafb; }
.autotune-main-player .transport { min-width: 170px; }
.autotune-main-player .transport .status-note { display: none; }
.autotune-main-player .play-btn { width: 44px; height: 44px; min-width: 44px; }

.autotune-plugin-body { display: grid; grid-template-columns: 264px minmax(0, 1fr); align-items: start; gap: 0; }
.autotune-plugin-body > .tool-panel { margin: 0; border: 0; border-radius: 0; box-shadow: none; }
.autotune-source-panel {
    position: sticky;
    top: 202px;
    align-self: start;
    min-width: 0;
    padding: 18px !important;
    border-right: 1px solid var(--at-workspace-line) !important;
    background: #fbf9fa !important;
}
.autotune-source-panel > h2 { margin-bottom: 10px !important; font-size: 1rem !important; }
.autotune-source-panel .pill-note { padding: 10px; font-size: .72rem; line-height: 1.45; }
.autotune-source-panel .row { margin-block: 10px !important; }
.autotune-source-panel .row button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 44px; padding-inline: 10px; font-size: .76rem; }
.autotune-source-panel .dropzone { min-height: 176px; padding: 18px 12px; border-radius: 15px; }
.autotune-source-panel .dropzone .dz-icon { font-size: 1.6rem; }
.autotune-source-panel .dropzone .dz-title { font-size: .9rem; }
.autotune-source-panel .dropzone .dz-hint, .autotune-source-panel .dropzone .dz-privacy { font-size: .7rem; line-height: 1.4; }
.autotune-source-panel .dz-demo { width: 100%; min-height: 44px; font-size: .73rem; }
.autotune-source-player { display: none !important; }

.autotune-console.autotune-stage-panel { min-width: 0; background: #fff !important; }
.autotune-stage-panel > h2 { padding: 20px 22px 10px; font-size: 1.18rem; }
.autotune-workspace-nav { margin: 0 22px 14px; grid-template-columns: repeat(2,minmax(0,1fr)) repeat(2,minmax(0,.72fr)); }
.autotune-workspace-tab { min-height: 54px; }
.autotune-workspace-tab.is-secondary-mode { color: #675f6b; background: #f5f3f4; }
.autotune-workspace-tab.is-secondary-mode strong { font-size: .82rem; }
.autotune-workspace-tab[aria-selected="true"] { border-color: #e4c0c6; color: var(--at-workspace-pink-dark); box-shadow: 0 9px 22px -18px rgba(89,24,37,.68); }
.autotune-workspace-tab.is-primary-mode[aria-selected="true"] { box-shadow: inset 0 -3px 0 var(--at-workspace-pink), 0 9px 22px -18px rgba(89,24,37,.68); }

.autotune-auto-studio { display: grid; grid-template-columns: minmax(0,1fr) 286px; gap: 14px; padding: 0 22px 12px; }
.autotune-auto-stage { min-width: 0; }
.autotune-setup-strip { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
.autotune-setup-strip .autotune-control-card { padding: 12px; }
.autotune-setup-strip .status-note { min-height: 0; margin-top: 6px !important; font-size: .68rem; }
.autotune-tuner-display { margin: 12px 0 0; border-radius: 16px; }
.autotune-tuner-display > div { padding: 14px 16px; }
.autotune-tuner-display strong { font-size: clamp(1.28rem,2.4vw,1.75rem); }

.autotune-pitch-lane { margin-top: 10px; padding: 14px; border: 1px solid #e4d9dd; border-radius: 16px; background: linear-gradient(180deg,#fff,#fff9fa); }
.autotune-pitch-lane-head { display: grid; grid-template-columns: auto 1fr auto; align-items: baseline; gap: 12px; }
.autotune-pitch-lane-head span, .autotune-pitch-lane-head small { color: var(--at-workspace-muted); font-size: .66rem; font-weight: 760; }
.autotune-pitch-lane-head strong { color: var(--at-workspace-ink); font-size: .8rem; text-align: center; }
.autotune-note-rail { display: grid; grid-template-columns: repeat(12,minmax(0,1fr)); gap: 3px; margin-top: 12px; }
.autotune-note-rail span { display: grid; place-items: center; min-width: 0; min-height: 38px; border: 1px solid #e7e1e3; border-radius: 7px; color: #766f79; background: #f4f2f3; font-size: .66rem; font-weight: 800; }
.autotune-note-rail span.is-allowed { border-color: #e3c0c6; color: #73212c; background: #fff1f3; }
.autotune-note-rail span.is-root::after { content: ''; width: 4px; height: 4px; margin-top: -5px; border-radius: 50%; background: currentColor; }
.autotune-note-rail span.is-detected { outline: 2px solid var(--at-workspace-blue); outline-offset: 1px; }
.autotune-note-rail span.is-target { color: #fff; background: var(--at-workspace-pink); border-color: var(--at-workspace-pink); }
.autotune-cent-meter { display: grid; grid-template-columns: 26px 1fr 26px; align-items: center; gap: 8px; margin-top: 10px; color: var(--at-workspace-muted); font-size: .62rem; font-variant-numeric: tabular-nums; }
.autotune-cent-meter i { position: relative; height: 5px; border-radius: 99px; background: linear-gradient(90deg,#d9e1ef,#e9ced3 50%,#d9e1ef); }
.autotune-cent-meter b { position: absolute; top: 50%; left: 50%; width: 10px; height: 16px; border: 2px solid #fff; border-radius: 5px; background: var(--at-workspace-ink); box-shadow: 0 2px 8px rgba(0,0,0,.2); transform: translate(-50%,-50%); transition: left .18s ease; }

.autotune-section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin: 14px 0 8px; }
.autotune-section-head h3 { margin: 0 !important; font-size: .92rem; }
.autotune-section-head p { max-width: 36ch; margin: 0; color: var(--at-workspace-muted); font-size: .68rem; line-height: 1.45; }
.autotune-macro-deck { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 9px; }
.autotune-macro-card { min-height: 138px; padding: 14px !important; border-color: #e2d5d8; background: linear-gradient(155deg,#fff,#fff7f8); }
.autotune-macro-card .autotune-control-head { align-items: center; }
.autotune-macro-card .autotune-control-label { font-size: .82rem; }
.autotune-macro-card output { font-size: 1.14rem; }
.autotune-macro-card input[type="range"] { min-height: 28px; margin-top: 16px; }
.autotune-macro-card .status-note { min-height: 0; font-size: .67rem; line-height: 1.42; }

.autotune-advanced-inspector { align-self: start; overflow: hidden; border: 1px solid #ded7da; border-radius: 16px; background: #faf8f9; }
.autotune-advanced-inspector > summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 56px; padding: 10px 12px; color: var(--at-workspace-ink); cursor: pointer; list-style: none; }
.autotune-advanced-inspector > summary::-webkit-details-marker { display: none; }
.autotune-advanced-inspector > summary span:first-child b, .autotune-advanced-inspector > summary span:first-child small { display: block; }
.autotune-advanced-inspector > summary b { font-size: .8rem; }
.autotune-advanced-inspector > summary small { margin-top: 2px; color: var(--at-workspace-muted); font-size: .62rem; line-height: 1.35; }
.autotune-advanced-count { flex: 0 0 auto; padding: 5px 7px; border-radius: 7px; color: var(--at-workspace-pink-dark); background: #feecef; font-size: .61rem; font-weight: 820; }
.autotune-advanced-inspector[open] { max-height: 720px; overflow: auto; }
.autotune-advanced-inspector[open] > summary { position: sticky; z-index: 2; top: 0; border-bottom: 1px solid #e5dde0; background: rgba(250,248,249,.97); }
.autotune-advanced-inspector .autotune-controls-grid { grid-template-columns: 1fr; gap: 8px; padding: 10px; }
.autotune-advanced-inspector .autotune-control-card { padding: 11px; background: #fff; }
.autotune-advanced-inspector .autotune-control-card .status-note { min-height: 0; font-size: .66rem; }
.autotune-advanced-inspector > .autotune-custom-scale,
.autotune-advanced-inspector > .autotune-key-suggest,
.autotune-advanced-inspector > .autotune-midi-panel,
.autotune-advanced-inspector > .status-note { margin: 10px; }
.autotune-advanced-inspector > .autotune-custom-scale,
.autotune-advanced-inspector > .autotune-midi-panel { grid-template-columns: 1fr; gap: 12px; padding: 12px; }
.autotune-advanced-inspector > .autotune-key-suggest { grid-template-columns: 1fr; }
.autotune-advanced-inspector > .autotune-key-suggest button,
.autotune-advanced-inspector .autotune-midi-actions button { width: 100%; }

.autotune-custom-scale, .autotune-key-suggest, .autotune-midi-panel, .autotune-live-panel, .autotune-workspace > .status-note { margin-inline: 22px; }
.autotune-graph-editor { grid-template-columns: minmax(220px,.62fr) minmax(0,1.6fr); margin-inline: 22px; }
.autotune-pitch-map { margin-inline: 22px; border-color: #ded7da; background: #fbfafb; }
.autotune-pitch-canvas-wrap { border-color: #ddd5da; background-color: #fff; background-image: linear-gradient(#f0ecee 1px,transparent 1px),linear-gradient(90deg,#f5f1f2 1px,transparent 1px); background-size: 100% 24px,48px 100%; }
.autotune-pitch-canvas-wrap canvas { width: 100%; min-height: 300px; }
.autotune-graph-inspector { box-shadow: 0 18px 34px -32px rgba(35,20,25,.68); }
.autotune-harmony-grid { margin-inline: 22px; }
.autotune-harmony-master { margin-inline: 22px; }
.autotune-live-panel { min-height: 260px; }

.autotune-stage-panel > .row { position: sticky; z-index: 4; bottom: 0; margin: 14px 0 0 !important; padding: 12px 22px !important; border-top: 1px solid var(--at-workspace-line); background: rgba(255,255,255,.96); backdrop-filter: blur(10px); }
.autotune-stage-panel > .row button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; }
.autotune-stage-panel > #autotune-progress-wrap { margin: 0 !important; padding: 0 22px 12px; }
.autotune-stage-panel > .status-line, .autotune-stage-panel > .status { margin-inline: 22px; }
.autotune-output-panel { margin: 0 !important; padding: 22px !important; border: 0 !important; border-top: 1px solid var(--at-workspace-line) !important; border-radius: 0 !important; background: #fff !important; box-shadow: none !important; }
.autotune-output-panel > h2 { font-size: 1.1rem !important; }

.autotune-page button, .autotune-page summary, .autotune-page input[type="range"], .autotune-page select { touch-action: manipulation; }
.autotune-page button:disabled, .autotune-page select:disabled, .autotune-page input:disabled { cursor: not-allowed; }
.autotune-page .autotune-plugin-frame button:focus-visible, .autotune-page .autotune-plugin-frame summary:focus-visible, .autotune-page .autotune-plugin-frame input:focus-visible, .autotune-page .autotune-plugin-frame select:focus-visible { outline: 3px solid rgba(214,56,70,.3); outline-offset: 2px; }

@media (max-width: 1024px) {
    .autotune-plugin-body { grid-template-columns: 228px minmax(0,1fr); }
    .autotune-auto-studio { grid-template-columns: 1fr; }
    .autotune-advanced-inspector[open] { max-height: none; }
    .autotune-advanced-inspector .autotune-controls-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .autotune-macro-deck { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 760px) {
    .autotune-plugin-frame { overflow: visible; border-radius: 20px; }
    .autotune-plugin-header { grid-template-columns: 1fr auto; }
    .autotune-plugin-trust { display: none; }
    .autotune-plugin-state { max-width: 136px; }
    .autotune-plugin-frame > .autotune-preset-strip { align-items: flex-start; flex-direction: column; }
    .autotune-plugin-frame > .autotune-preset-strip .autotune-preset-buttons { width: 100%; justify-content: flex-start; }
    .autotune-audition-dock { position: relative; top: auto; padding-inline: 14px; }
    .autotune-audition-head { grid-template-columns: 1fr 1fr; }
    .autotune-audition-head > div:first-child { display: none; }
    .autotune-ab-switch { min-width: 0; }
    .autotune-bypass-hold { width: 100%; }
    .autotune-audition-state { grid-column: 1 / -1; text-align: left; }
    .autotune-main-player { grid-template-columns: 1fr; }
    .autotune-main-player .transport { min-width: 0; }
    .autotune-plugin-body { grid-template-columns: 1fr; }
    .autotune-source-panel { position: relative; top: auto; border-right: 0 !important; border-bottom: 1px solid var(--at-workspace-line) !important; }
    .autotune-source-panel .dropzone { min-height: 150px; }
    .autotune-workspace-nav { grid-template-columns: 1fr 1fr; margin-inline: 14px; }
    .autotune-auto-studio { padding-inline: 14px; }
    .autotune-setup-strip { grid-template-columns: 1fr; }
    .autotune-tuner-display { grid-template-columns: 1fr 1fr; }
    .autotune-tuner-scale { grid-column: 1 / -1; }
    .autotune-note-rail { grid-template-columns: repeat(6,minmax(0,1fr)); }
    .autotune-section-head { align-items: flex-start; flex-direction: column; }
    .autotune-section-head p { max-width: none; }
    .autotune-advanced-inspector .autotune-controls-grid { grid-template-columns: 1fr; }
    .autotune-custom-scale, .autotune-key-suggest, .autotune-midi-panel, .autotune-live-panel, .autotune-workspace > .status-note, .autotune-graph-editor, .autotune-pitch-map, .autotune-harmony-grid, .autotune-harmony-master { margin-inline: 14px; }
    .autotune-stage-panel > .row { position: relative; padding-inline: 14px !important; }
    .autotune-stage-panel > .row button { width: 100%; }
}

@media (max-width: 430px) {
    .autotune-plugin-header { min-height: 68px; padding: 11px 13px; }
    .autotune-plugin-mark { flex-basis: 40px; width: 40px; height: 40px; }
    .autotune-plugin-state { max-width: 104px; }
    .autotune-plugin-state span { font-size: .61rem; }
    .autotune-plugin-frame > .autotune-preset-strip { padding-inline: 13px; }
    .autotune-plugin-frame > .autotune-preset-strip .autotune-preset-buttons { grid-template-columns: 1fr 1fr; }
    .autotune-macro-deck { grid-template-columns: 1fr 1fr; }
    .autotune-macro-card { min-height: 148px; }
    .autotune-pitch-lane-head { grid-template-columns: 1fr auto; }
    .autotune-pitch-lane-head strong { text-align: left; }
    .autotune-pitch-lane-head small { grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: reduce) {
    .autotune-cent-meter b { transition: none; }
}

/* ===========================================================================
   Pitch Workstation v5 — AudioWrench dark plugin console on the light page
   ========================================================================== */
.autotune-plugin-console {
    --at-console-0: #090d13;
    --at-console-1: #0e141d;
    --at-console-2: #141c28;
    --at-console-3: #1b2533;
    --at-console-line: #303b4b;
    --at-console-line-soft: #252f3d;
    --at-console-text: #f6f8fb;
    --at-console-muted: #b6c0ce;
    --at-console-subtle: #8d99aa;
    --at-console-accent: #ff4f6d;
    --at-console-accent-strong: #ff6d85;
    --at-console-teal: #70e5d7;
    --at-console-blue: #82aaff;
    color: var(--at-console-text);
    scroll-margin-top: 84px;
    border-color: #2d3747;
    border-radius: 18px;
    background: var(--at-console-0);
    box-shadow: 0 42px 100px -52px rgba(5, 9, 16, .9), 0 0 0 1px rgba(255,255,255,.035) inset;
}
.autotune-plugin-console::before {
    position: absolute;
    z-index: 0;
    inset: 0;
    pointer-events: none;
    content: '';
    background: radial-gradient(circle at 78% 18%, rgba(255,79,109,.07), transparent 30%), linear-gradient(110deg, rgba(112,229,215,.025), transparent 38%);
}
.autotune-plugin-console > * { position: relative; z-index: 1; }

.autotune-plugin-console .autotune-plugin-header {
    min-height: 62px;
    padding: 10px 16px;
    border-color: var(--at-console-line);
    background: linear-gradient(180deg, #151d28, #0e141d);
    box-shadow: 0 1px 0 rgba(255,255,255,.04) inset;
}
.autotune-plugin-console .autotune-plugin-mark {
    flex-basis: 38px;
    width: 38px;
    height: 38px;
    border-radius: 9px;
    color: #fff;
    background: linear-gradient(145deg, #ff506e, #a91634);
    box-shadow: 0 0 22px rgba(255,79,109,.2);
}
.autotune-plugin-console .autotune-plugin-identity strong,
.autotune-plugin-console .autotune-plugin-state b { color: var(--at-console-text); }
.autotune-plugin-console .autotune-plugin-identity small,
.autotune-plugin-console .autotune-plugin-state span { color: var(--at-console-muted); }
.autotune-plugin-console .autotune-plugin-trust span {
    min-height: 32px;
    border-color: #31524e;
    color: #bff6ee;
    background: #112522;
}
.autotune-plugin-console .autotune-plugin-trust i { background: var(--at-console-teal); box-shadow: 0 0 10px rgba(112,229,215,.8); }

.autotune-plugin-console > .autotune-preset-strip {
    min-height: 56px;
    padding: 7px 16px;
    border-color: var(--at-console-line);
    background: #101722;
}
.autotune-plugin-console > .autotune-preset-strip h3,
.autotune-plugin-console .autotune-console-eyebrow { color: var(--at-console-muted); }
.autotune-plugin-console .autotune-console-eyebrow { letter-spacing: .14em; }
.autotune-plugin-console .autotune-preset {
    min-height: 44px;
    border-color: #374253;
    color: #dce3ed;
    background: #192231;
    box-shadow: 0 1px 0 rgba(255,255,255,.04) inset;
}
.autotune-plugin-console .autotune-preset:hover { border-color: #667388; color: #fff; background: #202b3a; }
.autotune-plugin-console .autotune-preset[aria-pressed="true"] {
    border-color: var(--at-console-accent);
    color: #fff;
    background: linear-gradient(180deg, #d72f50, #a91837);
    box-shadow: 0 0 0 1px rgba(255,79,109,.18), 0 7px 18px -12px rgba(255,79,109,.8);
}

.autotune-plugin-console .autotune-audition-dock {
    position: sticky;
    top: 62px;
    padding: 7px 16px 9px;
    border-color: var(--at-console-line);
    background: rgba(10,15,22,.97);
    box-shadow: 0 16px 30px -24px #000;
}
.autotune-plugin-console .autotune-audition-head > div:first-child strong,
.autotune-plugin-console .autotune-audition-state { color: var(--at-console-muted); }
.autotune-plugin-console .autotune-ab-switch { border-color: #3a4557; background: #111925; }
.autotune-plugin-console .autotune-ab-switch button,
.autotune-plugin-console .autotune-bypass-hold { color: #c2cad6; }
.autotune-plugin-console .autotune-ab-switch button[aria-pressed="true"] { color: #fff; background: #313b4b; }
.autotune-plugin-console .autotune-audition-dock.is-tuned .autotune-ab-switch button[aria-pressed="true"] { background: #c32645; }
.autotune-plugin-console .autotune-bypass-hold { border-color: #465164; background: #192230; }
.autotune-plugin-console .autotune-bypass-hold[aria-pressed="true"] { border-color: var(--at-console-accent); background: #b51e3d; }
.autotune-plugin-console .autotune-main-player .wave-wrap { height: 38px; border-color: #354052; background: #121a26; }
.autotune-plugin-console .autotune-main-player .play-btn { color: #fff; background: var(--at-console-accent); }
.autotune-plugin-console .autotune-main-player .time { color: var(--at-console-muted); }

.autotune-plugin-console .autotune-plugin-body { grid-template-columns: 224px minmax(0,1fr); background: var(--at-console-0); }
.autotune-plugin-console .autotune-plugin-body > .tool-panel { color: var(--at-console-text); }
.autotune-plugin-console .autotune-source-panel {
    top: 174px;
    padding: 14px !important;
    border-color: var(--at-console-line) !important;
    background: #0c121a !important;
}
.autotune-plugin-console .autotune-source-panel > h2,
.autotune-plugin-console .autotune-stage-panel > h2,
.autotune-plugin-console .autotune-output-panel > h2 { color: var(--at-console-text); }
.autotune-plugin-console .autotune-source-panel .pill-note {
    border-color: #57303b;
    color: #ffc1cd;
    background: #26141c;
}
.autotune-plugin-console .autotune-source-panel .btn-secondary,
.autotune-plugin-console .autotune-source-panel .dz-demo { border-color: #424e60; color: #edf2f8; background: #161f2b; }
.autotune-plugin-console .autotune-source-panel .btn-secondary:hover,
.autotune-plugin-console .autotune-source-panel .dz-demo:hover { border-color: var(--at-console-accent); background: #202a38; }
.autotune-plugin-console .autotune-source-panel .dropzone {
    min-height: 142px;
    border-color: #3b4758;
    color: var(--at-console-text);
    background: linear-gradient(155deg,#121b27,#0e151f);
}
.autotune-plugin-console .autotune-source-panel .dropzone:hover { border-color: var(--at-console-accent); background: #151f2c; }
.autotune-plugin-console .dropzone .dz-icon { display: grid; place-items: center; width: 42px; height: 42px; margin-inline: auto; font-size: 0; }
.autotune-plugin-console .dropzone .dz-icon svg { width: 36px; height: 36px; fill: none; stroke: var(--at-console-accent-strong); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 8px rgba(255,79,109,.28)); }
.autotune-plugin-console .dropzone .dz-title { color: #fff; }
.autotune-plugin-console .dropzone .dz-hint,
.autotune-plugin-console .dropzone .dz-privacy,
.autotune-plugin-console .autotune-source-panel .status-note { color: var(--at-console-muted); }
.autotune-plugin-console .autotune-source-panel button svg { flex: 0 0 18px; width: 18px; height: 18px; }

.autotune-plugin-console .autotune-console.autotune-stage-panel { background: #0e141d !important; }
.autotune-plugin-console .autotune-stage-panel > h2 { margin: 0 !important; padding: 14px 18px 8px; font-size: 1rem; }
.autotune-plugin-console .autotune-workspace-nav {
    gap: 3px;
    margin: 0 18px 10px;
    padding: 3px;
    border: 1px solid var(--at-console-line);
    border-radius: 10px;
    background: #0a1018;
}
.autotune-plugin-console .autotune-workspace-tab,
.autotune-plugin-console .autotune-workspace-tab.is-secondary-mode {
    min-height: 46px;
    border: 0;
    color: #aab5c4;
    background: transparent;
}
.autotune-plugin-console .autotune-workspace-tab span { color: #8995a7; }
.autotune-plugin-console .autotune-workspace-tab:hover { color: #fff; background: #182230; }
.autotune-plugin-console .autotune-workspace-tab[aria-selected="true"],
.autotune-plugin-console .autotune-workspace-tab.is-primary-mode[aria-selected="true"] {
    color: #fff;
    border-color: transparent;
    background: linear-gradient(180deg,#293444,#202a38);
    box-shadow: inset 0 -2px 0 var(--at-console-accent), 0 4px 12px rgba(0,0,0,.24);
}
.autotune-plugin-console .autotune-workspace-tab[aria-selected="true"] span { color: #c8d0dc; }

.autotune-plugin-console .autotune-auto-studio { grid-template-columns: minmax(0,1fr) 218px; gap: 10px; padding: 0 18px 10px; }
.autotune-plugin-console .autotune-auto-stage { display: grid; grid-template-areas: 'parameters' 'monitor' 'keyboard' 'macros'; min-width: 0; }
.autotune-plugin-console .autotune-parameter-strip {
    grid-area: parameters;
    grid-template-columns: repeat(3,minmax(0,1fr));
    gap: 1px;
    overflow: hidden;
    border: 1px solid var(--at-console-line);
    border-radius: 10px;
    background: var(--at-console-line);
}
.autotune-plugin-console .autotune-parameter-strip .autotune-control-card { padding: 8px 10px; border: 0; border-radius: 0; background: #141c27; }
.autotune-plugin-console .autotune-parameter-strip .autotune-control-label { color: #9faabc; font-size: .65rem; letter-spacing: .08em; text-transform: uppercase; }
.autotune-plugin-console .autotune-parameter-strip select {
    min-height: 38px;
    margin-top: 4px;
    border-color: #3a4658;
    color: #fff;
    background: #0c121b;
}
.autotune-plugin-console .autotune-parameter-strip .status-note { display: none; }

.autotune-plugin-console .autotune-tuner-display {
    grid-area: monitor;
    margin-top: 8px;
    border: 1px solid #343f50;
    border-radius: 12px;
    background: radial-gradient(circle at 50% 0, rgba(112,229,215,.09), transparent 55%), #0a1018;
    box-shadow: 0 10px 24px rgba(0,0,0,.23) inset;
}
.autotune-plugin-console .autotune-tuner-display > div { min-height: 104px; padding: 14px; border-color: #2d3746; background: transparent; }
.autotune-plugin-console .autotune-tuner-display span { color: #8794a6; letter-spacing: .12em; }
.autotune-plugin-console .autotune-tuner-display strong {
    color: #fff;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: clamp(1.75rem,4vw,2.8rem);
    font-variant-numeric: tabular-nums;
    text-shadow: 0 0 22px rgba(112,229,215,.12);
}
.autotune-plugin-console .autotune-tuner-target strong { color: var(--at-console-accent-strong); text-shadow: 0 0 18px rgba(255,79,109,.2); }
.autotune-plugin-console .autotune-tuner-display small { color: var(--at-console-muted); }

.autotune-plugin-console .autotune-pitch-display {
    grid-area: keyboard;
    margin-top: 8px;
    padding: 10px 12px 12px;
    border-color: #354052;
    border-radius: 12px;
    background: #111923;
}
.autotune-plugin-console .autotune-pitch-lane-head span,
.autotune-plugin-console .autotune-pitch-lane-head small { color: var(--at-console-muted); }
.autotune-plugin-console .autotune-pitch-lane-head strong { color: #f4f7fb; }
.autotune-plugin-console .autotune-chromatic-keyboard {
    position: relative;
    display: grid;
    grid-template-columns: repeat(14,minmax(0,1fr));
    grid-template-rows: 82px;
    gap: 0;
    overflow: hidden;
    margin-top: 9px;
    border: 1px solid #465163;
    border-radius: 8px;
    background: #080c12;
}
.autotune-plugin-console .autotune-chromatic-keyboard span {
    align-items: end;
    min-height: 82px;
    padding-bottom: 8px;
    border: 0;
    border-right: 1px solid #9199a4;
    border-radius: 0;
    color: #313946;
    background: linear-gradient(180deg,#eef1f5,#cdd3dc);
    font-size: .62rem;
}
.autotune-plugin-console .autotune-chromatic-keyboard span:nth-child(1) { grid-column: 1 / 3; grid-row: 1; }
.autotune-plugin-console .autotune-chromatic-keyboard span:nth-child(3) { grid-column: 3 / 5; grid-row: 1; }
.autotune-plugin-console .autotune-chromatic-keyboard span:nth-child(5) { grid-column: 5 / 7; grid-row: 1; }
.autotune-plugin-console .autotune-chromatic-keyboard span:nth-child(6) { grid-column: 7 / 9; grid-row: 1; }
.autotune-plugin-console .autotune-chromatic-keyboard span:nth-child(8) { grid-column: 9 / 11; grid-row: 1; }
.autotune-plugin-console .autotune-chromatic-keyboard span:nth-child(10) { grid-column: 11 / 13; grid-row: 1; }
.autotune-plugin-console .autotune-chromatic-keyboard span:nth-child(12) { grid-column: 13 / 15; grid-row: 1; }
.autotune-plugin-console .autotune-chromatic-keyboard .is-black-key {
    z-index: 2;
    align-self: start;
    min-height: 52px;
    margin-inline: -42%;
    padding-bottom: 6px;
    border: 1px solid #020305;
    border-radius: 0 0 6px 6px;
    color: #cbd3df;
    background: linear-gradient(180deg,#252d3a,#080b10);
    box-shadow: 0 5px 7px rgba(0,0,0,.55);
}
.autotune-plugin-console .autotune-chromatic-keyboard span:nth-child(2) { grid-column: 2 / 4; grid-row: 1; }
.autotune-plugin-console .autotune-chromatic-keyboard span:nth-child(4) { grid-column: 4 / 6; grid-row: 1; }
.autotune-plugin-console .autotune-chromatic-keyboard span:nth-child(7) { grid-column: 8 / 10; grid-row: 1; }
.autotune-plugin-console .autotune-chromatic-keyboard span:nth-child(9) { grid-column: 10 / 12; grid-row: 1; }
.autotune-plugin-console .autotune-chromatic-keyboard span:nth-child(11) { grid-column: 12 / 14; grid-row: 1; }
.autotune-plugin-console .autotune-chromatic-keyboard span.is-allowed { color: #7a2637; background-color: #ffe7ec; }
.autotune-plugin-console .autotune-chromatic-keyboard .is-black-key.is-allowed { color: #ffd0d9; background: linear-gradient(180deg,#692237,#180d14); }
.autotune-plugin-console .autotune-chromatic-keyboard span.is-detected { outline: 3px solid var(--at-console-teal); outline-offset: -3px; }
.autotune-plugin-console .autotune-chromatic-keyboard span.is-target { color: #fff; background: linear-gradient(180deg,#ff607b,#bd2544); }
.autotune-plugin-console .autotune-cent-meter { color: var(--at-console-muted); }
.autotune-plugin-console .autotune-cent-meter i { height: 6px; background: linear-gradient(90deg,#30445a,#70e5d7 50%,#62313e); }
.autotune-plugin-console .autotune-cent-meter b { border-color: #fff; background: var(--at-console-accent); box-shadow: 0 0 12px rgba(255,79,109,.55); }

.autotune-plugin-console .autotune-macro-section { grid-area: macros; }
.autotune-plugin-console .autotune-section-head { margin: 10px 0 6px; }
.autotune-plugin-console .autotune-section-head h3 { color: #fff; }
.autotune-plugin-console .autotune-section-head p { color: var(--at-console-muted); }
.autotune-plugin-console .autotune-macro-deck { gap: 6px; }
.autotune-plugin-console .autotune-macro-card {
    display: grid;
    grid-template-rows: auto 74px auto;
    justify-items: center;
    min-height: 146px;
    padding: 9px !important;
    border-color: #343f50;
    border-radius: 10px;
    background: linear-gradient(155deg,#1a2431,#111822);
    box-shadow: 0 1px 0 rgba(255,255,255,.04) inset;
}
.autotune-plugin-console .autotune-macro-card .autotune-control-head { width: 100%; }
.autotune-plugin-console .autotune-macro-card .autotune-control-label { color: #cbd3de; font-size: .69rem; letter-spacing: .08em; text-transform: uppercase; }
.autotune-plugin-console .autotune-macro-card output { color: #fff; font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: .82rem; }
.autotune-plugin-console .autotune-knob-shell { position: relative; display: grid; place-items: center; width: 74px; height: 74px; }
.autotune-plugin-console .autotune-knob-face {
    --knob-angle: -135deg;
    --knob-stop: 0deg;
    position: relative;
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: conic-gradient(from 225deg, var(--at-console-accent) 0deg var(--knob-stop), #364152 var(--knob-stop) 270deg, transparent 270deg 360deg);
    filter: drop-shadow(0 7px 7px rgba(0,0,0,.42));
}
.autotune-plugin-console .autotune-knob-face::before {
    position: absolute;
    inset: 6px;
    border: 1px solid #4c586a;
    border-radius: 50%;
    content: '';
    background: radial-gradient(circle at 35% 28%,#455164,#1b2431 48%,#0c1118 100%);
    box-shadow: 0 2px 5px rgba(0,0,0,.7), 0 1px 1px rgba(255,255,255,.1) inset;
}
.autotune-plugin-console .autotune-knob-face i {
    position: absolute;
    z-index: 1;
    width: 2px;
    height: 22px;
    border-radius: 3px;
    background: var(--at-console-teal);
    box-shadow: 0 0 6px rgba(112,229,215,.7);
    transform: rotate(var(--knob-angle)) translateY(-14px);
    transform-origin: 50% 36px;
}
.autotune-plugin-console .autotune-knob-face b { position: absolute; z-index: 2; width: 7px; height: 7px; border-radius: 50%; background: #0a0f16; }
.autotune-plugin-console .autotune-knob-input {
    position: absolute;
    z-index: 3;
    inset: 0;
    width: 74px !important;
    height: 74px;
    min-height: 74px !important;
    margin: 0 !important;
    opacity: 0;
    cursor: ew-resize;
}
.autotune-plugin-console .autotune-knob-shell:focus-within { border-radius: 50%; box-shadow: 0 0 0 3px rgba(112,229,215,.7); }
.autotune-plugin-console .autotune-macro-card .status-note { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }

.autotune-plugin-console .autotune-advanced-inspector { border-color: #374254; border-radius: 10px; background: #111923; }
.autotune-plugin-console .autotune-advanced-inspector > summary { color: #f3f6fa; background: #151e2a; }
.autotune-plugin-console .autotune-advanced-inspector > summary small { color: var(--at-console-muted); }
.autotune-plugin-console .autotune-advanced-count { color: #ffd5dd; background: #4a1b28; }
.autotune-plugin-console .autotune-advanced-inspector[open] > summary { border-color: var(--at-console-line); background: rgba(19,27,38,.98); }
.autotune-plugin-console .autotune-advanced-inspector .autotune-control-card,
.autotune-plugin-console .autotune-custom-scale,
.autotune-plugin-console .autotune-key-suggest,
.autotune-plugin-console .autotune-midi-panel { border-color: #334052; color: var(--at-console-text); background: #151e2a; }
.autotune-plugin-console .autotune-advanced-inspector .autotune-control-label,
.autotune-plugin-console .autotune-advanced-inspector h3 { color: #f2f5f9; }
.autotune-plugin-console .autotune-advanced-inspector .status-note,
.autotune-plugin-console .autotune-advanced-inspector p { color: var(--at-console-muted); }
.autotune-plugin-console .autotune-advanced-inspector select { border-color: #435064; color: #fff; background: #0c121a; }

.autotune-plugin-console .autotune-workspace-intro h3,
.autotune-plugin-console .autotune-pitch-map h3,
.autotune-plugin-console .autotune-graph-inspector strong,
.autotune-plugin-console .autotune-harmony-voice,
.autotune-plugin-console .autotune-live-panel h3 { color: var(--at-console-text); }
.autotune-plugin-console .autotune-workspace-intro p,
.autotune-plugin-console .autotune-pitch-map > .status-note,
.autotune-plugin-console .autotune-graph-inspector small,
.autotune-plugin-console .autotune-empty-inspector,
.autotune-plugin-console .autotune-live-panel p { color: var(--at-console-muted); }
.autotune-plugin-console .autotune-pitch-map {
    border-color: #354153;
    background: #0c121a;
}
.autotune-plugin-console .autotune-pitch-legend { color: var(--at-console-muted); }
.autotune-plugin-console .autotune-pitch-legend i { background: var(--at-console-teal); }
.autotune-plugin-console .autotune-pitch-legend i.target { background: var(--at-console-accent); }
.autotune-plugin-console .autotune-pitch-legend i.skipped { background: #7e8999; }
.autotune-plugin-console .autotune-pitch-canvas-wrap {
    border-color: #344052;
    background-color: #101722;
    background-image: linear-gradient(rgba(184,196,212,.075) 1px,transparent 1px),linear-gradient(90deg,rgba(184,196,212,.055) 1px,transparent 1px);
}
.autotune-plugin-console .autotune-graph-events,
.autotune-plugin-console .autotune-graph-inspector,
.autotune-plugin-console .autotune-live-panel,
.autotune-plugin-console .autotune-harmony-voice,
.autotune-plugin-console .autotune-harmony-master { border-color: #354153; background: #121a25; }
.autotune-plugin-console .autotune-graph-event { border-color: #374456; color: #e8edf4; background: #17212e; }
.autotune-plugin-console .autotune-graph-event[aria-selected="true"] { border-color: var(--at-console-accent); background: #301620; }
.autotune-plugin-console .autotune-graph-controls label { border-color: #354153; color: #dfe5ed; background: #111923; }
.autotune-plugin-console .autotune-graph-controls select { border-color: #435064; color: #fff; background: #0b1119; }
.autotune-plugin-console .autotune-graph-actions .autotune-switch span { color: #e4e9f0; }

.autotune-plugin-console .autotune-stage-panel > .row {
    border-color: var(--at-console-line);
    background: rgba(10,15,22,.97);
}
.autotune-plugin-console .autotune-stage-panel > .row .btn-primary { color: #fff; background: linear-gradient(180deg,#ef3d60,#b61f3e); }
.autotune-plugin-console .autotune-stage-panel > .status-line,
.autotune-plugin-console .autotune-stage-panel > .status { color: var(--at-console-muted); }
.autotune-plugin-console .autotune-output-panel {
    border-color: var(--at-console-line) !important;
    color: var(--at-console-text);
    background: #0d131c !important;
}
.autotune-plugin-console .autotune-output-panel .tool-fact { border-color: #354052; background: #141d29; }
.autotune-plugin-console .autotune-output-panel .tool-fact dt { color: #f5f7fa; }
.autotune-plugin-console .autotune-output-panel .tool-fact dd,
.autotune-plugin-console .autotune-output-panel .status-note,
.autotune-plugin-console .autotune-output-panel td { color: var(--at-console-muted); }
.autotune-plugin-console .autotune-output-panel th { color: #f1f4f8; }
.autotune-plugin-console .autotune-output-panel h3 { color: #f1f4f8; }

.autotune-page .autotune-plugin-console button:focus-visible,
.autotune-page .autotune-plugin-console summary:focus-visible,
.autotune-page .autotune-plugin-console input:focus-visible,
.autotune-page .autotune-plugin-console select:focus-visible { outline-color: var(--at-console-teal); }

@media (max-width: 1024px) {
    .autotune-plugin-console .autotune-plugin-body { grid-template-columns: 204px minmax(0,1fr); }
    .autotune-plugin-console .autotune-auto-studio { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
    .autotune-plugin-console { border-radius: 14px; }
    .autotune-plugin-console .autotune-plugin-body { grid-template-columns: 1fr; }
    .autotune-plugin-console .autotune-source-panel { top: auto; }
    .autotune-plugin-console .autotune-audition-dock { top: auto; }
    .autotune-plugin-console .autotune-auto-studio { padding-inline: 12px; }
    .autotune-plugin-console .autotune-parameter-strip { grid-template-columns: 1fr 1fr 1fr; }
    .autotune-plugin-console .autotune-parameter-strip .autotune-control-card { padding: 7px; }
    .autotune-plugin-console .autotune-parameter-strip .autotune-control-label { font-size: .58rem; }
    .autotune-plugin-console .autotune-parameter-strip select { min-width: 0; padding-inline: 7px 22px; font-size: .72rem; }
    .autotune-plugin-console .autotune-chromatic-keyboard { grid-template-rows: 72px; }
    .autotune-plugin-console .autotune-chromatic-keyboard span { min-height: 72px; }
    .autotune-plugin-console .autotune-chromatic-keyboard .is-black-key { min-height: 46px; }
}

@media (max-width: 430px) {
    .autotune-plugin-console .autotune-plugin-header { min-height: 60px; }
    .autotune-plugin-console .autotune-plugin-state { max-width: 112px; }
    .autotune-plugin-console .autotune-workspace-nav { margin-inline: 12px; }
    .autotune-plugin-console .autotune-macro-card { min-height: 138px; }
    .autotune-plugin-console .autotune-knob-shell { width: 68px; height: 68px; }
    .autotune-plugin-console .autotune-knob-face { width: 58px; height: 58px; }
    .autotune-plugin-console .autotune-knob-input { width: 68px !important; height: 68px; min-height: 68px !important; }
}

@media (prefers-reduced-motion: reduce) {
    .autotune-plugin-console *, .autotune-plugin-console *::before, .autotune-plugin-console *::after { scroll-behavior: auto !important; transition-duration: .001ms !important; animation-duration: .001ms !important; animation-iteration-count: 1 !important; }
}

/* ===========================================================================
   Pitch Workstation v6 — a real one-screen instrument
   The indexed guide remains below the app. Studio mode pins only the runtime
   to the viewport; secondary work opens in bounded drawers instead of making
   musicians scroll through a long web form.
   ========================================================================== */
.autotune-plugin-console {
    --at-head-h: 52px;
    --at-preset-h: 46px;
    --at-transport-h: 66px;
    display: grid;
    grid-template-rows: var(--at-head-h) var(--at-preset-h) var(--at-transport-h) minmax(0, 1fr);
    width: 100%;
    height: min(760px, 100dvh);
    max-height: 100dvh;
    min-height: 600px;
    overflow: hidden;
    overscroll-behavior: contain;
}
body.autotune-studio-mode { overflow: hidden; }
body.autotune-studio-mode .autotune-plugin-console {
    position: fixed;
    z-index: 10050;
    inset: 0;
    width: 100vw;
    max-width: none;
    height: 100dvh;
    max-height: none;
    min-height: 0;
    margin: 0 !important;
    border: 0;
    border-radius: 0;
}
.autotune-plugin-console .autotune-plugin-header {
    grid-row: 1;
    grid-template-columns: minmax(190px, 1fr) auto auto auto;
    min-height: 0;
    height: var(--at-head-h);
    padding: 6px 10px;
    gap: 10px;
}
.autotune-plugin-console .autotune-plugin-mark { flex-basis: 34px; width: 34px; height: 34px; }
.autotune-plugin-console .autotune-plugin-identity small { margin-top: 0; font-size: .62rem; }
.autotune-plugin-console .autotune-plugin-state span { margin-top: 0; }
.autotune-plugin-actions { display: flex; align-items: center; gap: 6px; }
.autotune-plugin-actions button,
.autotune-drawer-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 44px;
    min-height: 44px;
    padding: 6px 10px;
    border: 1px solid #3d495b;
    border-radius: 8px;
    color: #dce3ed;
    background: #17212e;
    font: inherit;
    font-size: .68rem;
    font-weight: 820;
    cursor: pointer;
    touch-action: manipulation;
    transition: color .18s ease, border-color .18s ease, background .18s ease;
}
.autotune-plugin-actions button:hover,
.autotune-drawer-close:hover { border-color: var(--at-console-accent); color: #fff; background: #202b39; }
.autotune-plugin-actions button:disabled { opacity: .4; cursor: not-allowed; }
.autotune-plugin-actions svg,
.autotune-drawer-close svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

.autotune-plugin-console > .autotune-preset-strip {
    grid-row: 2;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    height: var(--at-preset-h);
    min-height: 0;
    padding: 3px 10px;
    gap: 10px;
}
.autotune-plugin-console > .autotune-preset-strip > div:first-child { white-space: nowrap; }
.autotune-plugin-console > .autotune-preset-strip .autotune-console-eyebrow { display: none; }
.autotune-plugin-console > .autotune-preset-strip h3 { margin: 0; font-size: .7rem; }
.autotune-plugin-console > .autotune-preset-strip .autotune-preset-buttons { display: flex; justify-content: flex-end; gap: 5px; min-width: 0; }
.autotune-plugin-console .autotune-preset { min-height: 38px; padding: 5px 11px; font-size: .67rem; }

.autotune-plugin-console .autotune-audition-dock {
    position: relative;
    grid-row: 3;
    top: auto;
    display: grid;
    grid-template-columns: minmax(330px, 430px) minmax(0, 1fr);
    align-items: center;
    height: var(--at-transport-h);
    min-height: 0;
    padding: 6px 10px;
    gap: 10px;
}
.autotune-plugin-console .autotune-audition-head {
    grid-template-columns: auto auto minmax(0, 1fr);
    gap: 6px;
}
.autotune-plugin-console .autotune-audition-head > div:first-child { display: none; }
.autotune-plugin-console .autotune-audition-state { min-width: 0; font-size: .62rem; }
.autotune-plugin-console .autotune-ab-switch { min-width: 150px; }
.autotune-plugin-console .autotune-ab-switch button,
.autotune-plugin-console .autotune-bypass-hold { min-height: 44px; }
.autotune-plugin-console .autotune-main-player { grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.autotune-plugin-console .autotune-main-player .wave-wrap { height: 34px; }
.autotune-plugin-console .autotune-main-player .transport { min-width: 150px; }

.autotune-plugin-console .autotune-plugin-body {
    position: relative;
    grid-row: 4;
    display: block;
    min-height: 0;
    overflow: hidden;
}
.autotune-plugin-console .autotune-stage-panel {
    display: grid;
    grid-template-rows: 46px minmax(0, 1fr) 54px auto auto;
    width: 100%;
    height: 100%;
    min-height: 0;
    overflow: hidden;
}
.autotune-plugin-console .autotune-stage-panel > h2 { display: none; }
.autotune-plugin-console .autotune-workspace-nav {
    grid-row: 1;
    height: 42px;
    margin: 3px 10px 1px;
}
.autotune-plugin-console .autotune-workspace-tab,
.autotune-plugin-console .autotune-workspace-tab.is-secondary-mode { min-height: 34px; padding-block: 3px; }
.autotune-plugin-console .autotune-workspace-tab strong { font-size: .72rem; }
.autotune-plugin-console .autotune-workspace-tab span { font-size: .55rem; }
.autotune-plugin-console .autotune-workspace {
    grid-row: 2;
    min-height: 0;
    height: 100%;
    overflow: hidden;
}
.autotune-plugin-console .autotune-workspace[hidden] { display: none !important; }
.autotune-plugin-console .autotune-auto-studio {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    padding: 5px 10px 7px;
}
.autotune-plugin-console .autotune-auto-stage {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr);
    grid-template-rows: 52px 104px minmax(0, 1fr);
    grid-template-areas:
        'parameters parameters'
        'monitor advanced'
        'keyboard macros';
    gap: 7px 9px;
    width: 100%;
    height: 100%;
    min-height: 0;
}
.autotune-plugin-console .autotune-parameter-strip { grid-area: parameters; }
.autotune-plugin-console .autotune-parameter-strip .autotune-control-card { padding: 4px 8px; }
.autotune-plugin-console .autotune-parameter-strip select { min-height: 34px; height: 34px; margin-top: 2px; padding-block: 3px; }
.autotune-plugin-console .autotune-tuner-display {
    grid-area: monitor;
    height: 100%;
    margin: 0;
}
.autotune-plugin-console .autotune-tuner-display > div { min-height: 0; height: 100%; padding: 9px 12px; }
.autotune-plugin-console .autotune-tuner-display strong { font-size: clamp(1.5rem, 3.2vw, 2.45rem); }
.autotune-plugin-console .autotune-pitch-display {
    grid-area: keyboard;
    min-height: 0;
    height: 100%;
    margin: 0;
    padding: 7px 9px;
    overflow: hidden;
}
.autotune-plugin-console .autotune-pitch-lane-head { min-height: 18px; }
.autotune-plugin-console .autotune-chromatic-keyboard {
    grid-template-rows: minmax(54px, 1fr);
    height: calc(100% - 42px);
    min-height: 54px;
    margin-top: 4px;
}
.autotune-plugin-console .autotune-chromatic-keyboard span { min-height: 54px; padding-bottom: 4px; }
.autotune-plugin-console .autotune-chromatic-keyboard .is-black-key { min-height: 38px; }
.autotune-plugin-console .autotune-cent-meter { margin-top: 4px; }

.autotune-plugin-console .autotune-macro-section {
    grid-area: macros;
    display: grid;
    grid-template-rows: 26px minmax(0, 1fr);
    min-height: 0;
}
.autotune-plugin-console .autotune-section-head { min-height: 24px; margin: 0 0 3px; }
.autotune-plugin-console .autotune-section-head .autotune-console-eyebrow,
.autotune-plugin-console .autotune-section-head p { display: none; }
.autotune-plugin-console .autotune-section-head h3 { font-size: .75rem; }
.autotune-plugin-console .autotune-macro-deck {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    min-height: 0;
    gap: 5px;
}
.autotune-plugin-console .autotune-macro-card {
    grid-template-rows: auto minmax(46px, 1fr);
    min-height: 0;
    height: 100%;
    padding: 5px !important;
}
.autotune-plugin-console .autotune-macro-card .autotune-control-label { font-size: .58rem; }
.autotune-plugin-console .autotune-macro-card output { font-size: .68rem; }
.autotune-plugin-console .autotune-knob-shell { width: 56px; height: 56px; }
.autotune-plugin-console .autotune-knob-face { width: 48px; height: 48px; }
.autotune-plugin-console .autotune-knob-face i { height: 16px; transform: rotate(var(--knob-angle)) translateY(-10px); transform-origin: 50% 28px; }
.autotune-plugin-console .autotune-knob-input { width: 56px !important; height: 56px; min-height: 56px !important; }

.autotune-plugin-console .autotune-advanced-inspector {
    grid-area: advanced;
    position: relative;
    align-self: stretch;
    min-height: 0;
    overflow: visible;
}
.autotune-plugin-console .autotune-advanced-inspector > summary { height: 100%; min-height: 44px; padding: 7px 9px; }
.autotune-plugin-console .autotune-advanced-inspector[open] {
    position: absolute;
    z-index: 45;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(390px, 100%);
    max-height: none;
    overflow: auto;
    box-shadow: -16px 0 44px rgba(0,0,0,.55);
}
.autotune-plugin-console .autotune-advanced-inspector[open] > summary { position: sticky; top: 0; height: 52px; }

.autotune-plugin-console .autotune-stage-panel > .row {
    position: relative;
    grid-row: 3;
    bottom: auto;
    min-height: 54px;
    margin: 0 !important;
    padding: 5px 10px !important;
}
.autotune-plugin-console .autotune-stage-panel > .row button { min-height: 44px; }
.autotune-plugin-console .autotune-stage-panel > #autotune-progress-wrap {
    position: absolute;
    z-index: 48;
    right: 180px;
    bottom: 8px;
    width: min(360px, 42%);
    margin: 0 !important;
    padding: 0;
}
.autotune-plugin-console .autotune-stage-panel > .status-line,
.autotune-plugin-console .autotune-stage-panel > .status,
.autotune-plugin-console .autotune-stage-panel > .row.status-note {
    position: absolute;
    z-index: 12;
    left: 225px;
    right: 10px;
    bottom: 10px;
    overflow: hidden;
    margin: 0;
    color: var(--at-console-muted);
    font-size: .62rem;
    text-overflow: ellipsis;
    white-space: nowrap;
    pointer-events: none;
}

.autotune-plugin-console .autotune-workspace-intro { display: none; }
.autotune-plugin-console #autotune-workspace-graph {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(330px, .75fr);
    grid-template-rows: minmax(0, 1fr);
    gap: 8px;
    padding: 5px 10px 7px;
}
.autotune-plugin-console #autotune-workspace-graph[hidden] { display: none !important; }
.autotune-plugin-console #autotune-workspace-graph .autotune-pitch-map {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    min-height: 0;
    height: 100%;
    margin: 0;
    padding: 10px;
}
.autotune-plugin-console .autotune-pitch-canvas-wrap { min-height: 0; height: 100%; }
.autotune-plugin-console .autotune-pitch-canvas-wrap canvas { min-height: 0; height: 100%; }
.autotune-plugin-console #autotune-workspace-graph .autotune-graph-editor {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    min-height: 0;
    height: 100%;
    margin: 0;
    overflow: hidden;
}
.autotune-plugin-console .autotune-graph-events,
.autotune-plugin-console .autotune-graph-inspector { min-height: 0; overflow: auto; }
.autotune-plugin-console #autotune-workspace-live,
.autotune-plugin-console #autotune-workspace-harmony { height: 100%; overflow: auto; padding-block: 5px 7px; }

.autotune-plugin-console .autotune-source-panel,
.autotune-plugin-console .autotune-output-panel {
    position: absolute;
    z-index: 80;
    top: var(--at-head-h);
    right: 0;
    bottom: 0;
    left: auto;
    display: none;
    width: min(440px, 100%);
    max-height: none;
    margin: 0 !important;
    padding: 14px !important;
    overflow: auto;
    border: 0 !important;
    border-left: 1px solid var(--at-console-line) !important;
    border-radius: 0 !important;
    box-shadow: -24px 0 54px rgba(0,0,0,.58) !important;
}
.autotune-plugin-console .autotune-output-panel { width: min(920px, 100%); }
.autotune-plugin-console .autotune-source-panel.is-open,
.autotune-plugin-console .autotune-output-panel.is-open { display: block !important; }
.autotune-plugin-console .autotune-drawer-close {
    position: sticky;
    z-index: 4;
    top: 0;
    float: right;
    width: 44px;
    height: 44px;
    padding: 0;
}
.autotune-plugin-console .autotune-source-panel > h2,
.autotune-plugin-console .autotune-output-panel > h2 { min-height: 44px; margin: 0 52px 8px 0 !important; padding: 7px 0 !important; }
.autotune-plugin-console .autotune-output-panel .tool-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.autotune-plugin-console .autotune-output-panel .tool-fact { padding: 9px; }
.autotune-plugin-console .autotune-output-panel #autotune-note-summary,
.autotune-plugin-console .autotune-output-panel #autotune-receipt { margin-top: 10px !important; }

@media (max-width: 760px) {
    .autotune-plugin-console {
        --at-head-h: calc(50px + env(safe-area-inset-top, 0px));
        --at-preset-h: 46px;
        --at-transport-h: 92px;
        min-height: 0;
    }
    .autotune-plugin-console .autotune-plugin-header { padding-top: env(safe-area-inset-top, 0px); grid-template-columns: minmax(132px, 1fr) auto; }
    .autotune-plugin-console .autotune-plugin-identity small,
    .autotune-plugin-console .autotune-plugin-trust,
    .autotune-plugin-console .autotune-plugin-state { display: none; }
    .autotune-plugin-actions { gap: 3px; }
    .autotune-plugin-actions button { padding-inline: 7px; }
    .autotune-plugin-actions button span { display: none; }
    .autotune-plugin-console > .autotune-preset-strip { grid-template-columns: minmax(0, 1fr); padding-inline: 6px; }
    .autotune-plugin-console > .autotune-preset-strip > div:first-child { display: none; }
    .autotune-plugin-console > .autotune-preset-strip .autotune-preset-buttons { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 3px; }
    .autotune-plugin-console .autotune-preset { min-height: 44px; padding-inline: 3px; font-size: .58rem; }
    .autotune-plugin-console .autotune-audition-dock { grid-template-columns: 1fr; grid-template-rows: 44px 38px; padding: 4px 6px; gap: 2px; }
    .autotune-plugin-console .autotune-audition-head { grid-template-columns: auto auto minmax(0, 1fr); }
    .autotune-plugin-console .autotune-ab-switch { min-width: 128px; }
    .autotune-plugin-console .autotune-ab-switch button,
    .autotune-plugin-console .autotune-bypass-hold { min-height: 44px; }
    .autotune-plugin-console .autotune-bypass-hold { min-width: 94px; }
    .autotune-plugin-console .autotune-audition-state { font-size: .55rem; text-align: right; }
    .autotune-plugin-console .autotune-main-player { grid-template-columns: minmax(0, 1fr) auto; }
    .autotune-plugin-console .autotune-main-player .wave-wrap { height: 28px; }
    .autotune-plugin-console .autotune-main-player .transport { min-width: 104px; }
    .autotune-plugin-console .autotune-main-player .play-btn { width: 44px; height: 44px; min-width: 44px; }
    .autotune-plugin-console .autotune-stage-panel { grid-template-rows: 46px minmax(0, 1fr) calc(52px + env(safe-area-inset-bottom, 0px)) auto auto; }
    .autotune-plugin-console .autotune-workspace-nav { height: 42px; margin: 2px 5px; }
    .autotune-plugin-console .autotune-workspace-nav { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .autotune-plugin-console .autotune-workspace-tab,
    .autotune-plugin-console .autotune-workspace-tab.is-secondary-mode { min-height: 44px; }
    .autotune-plugin-console .autotune-workspace-tab span { display: none; }
    .autotune-plugin-console .autotune-auto-studio { padding: 3px 5px 4px; }
    .autotune-plugin-console .autotune-auto-stage {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: 52px 72px minmax(76px, 1fr) 104px 44px;
        grid-template-areas: 'parameters' 'monitor' 'keyboard' 'macros' 'advanced';
        gap: 3px;
    }
    .autotune-plugin-console .autotune-parameter-strip .autotune-control-card { padding: 2px 4px; }
    .autotune-plugin-console .autotune-parameter-strip .autotune-control-label { font-size: .5rem; }
    .autotune-plugin-console .autotune-parameter-strip select { height: 44px; min-height: 44px; margin-top: 0; padding: 10px 17px 2px 4px; font-size: .63rem; }
    .autotune-plugin-console .autotune-parameter-strip .autotune-control-label { position: absolute; z-index: 2; top: 3px; left: 5px; pointer-events: none; }
    .autotune-plugin-console .autotune-parameter-strip .autotune-control-card { position: relative; }
    .autotune-plugin-console .autotune-tuner-display > div { padding: 5px 7px; }
    .autotune-plugin-console .autotune-tuner-display { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .autotune-plugin-console .autotune-tuner-scale { grid-column: auto; }
    .autotune-plugin-console .autotune-tuner-display span { font-size: .5rem; }
    .autotune-plugin-console .autotune-tuner-display strong { font-size: 1.28rem; }
    .autotune-plugin-console .autotune-tuner-display small { font-size: .52rem; }
    .autotune-plugin-console .autotune-pitch-display { padding: 4px 6px; }
    .autotune-plugin-console .autotune-pitch-lane-head { display: none; }
    .autotune-plugin-console .autotune-chromatic-keyboard { height: calc(100% - 16px); min-height: 54px; margin-top: 0; }
    .autotune-plugin-console .autotune-cent-meter { height: 14px; margin-top: 1px; }
    .autotune-plugin-console .autotune-macro-section { grid-template-rows: minmax(0, 1fr); }
    .autotune-plugin-console .autotune-section-head { display: none; }
    .autotune-plugin-console .autotune-macro-deck { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: 1fr; gap: 3px; }
    .autotune-plugin-console .autotune-macro-card { grid-template-rows: 20px minmax(0, 1fr); padding: 3px !important; }
    .autotune-plugin-console .autotune-macro-card .autotune-control-head { align-items: center; display: grid; justify-items: center; gap: 0; }
    .autotune-plugin-console .autotune-macro-card .autotune-control-label { font-size: .48rem; }
    .autotune-plugin-console .autotune-macro-card output { font-size: .55rem; }
    .autotune-plugin-console .autotune-knob-shell { width: 54px; height: 54px; }
    .autotune-plugin-console .autotune-knob-face { width: 46px; height: 46px; }
    .autotune-plugin-console .autotune-knob-input { width: 54px !important; height: 54px; min-height: 54px !important; }
    .autotune-plugin-console .autotune-advanced-inspector > summary { height: 44px; min-height: 44px; }
    .autotune-plugin-console .autotune-advanced-inspector > summary small { display: none; }
    .autotune-plugin-console .autotune-advanced-inspector[open] { position: absolute; inset: 0; width: 100%; }
    .autotune-plugin-console .autotune-stage-panel > .row { min-height: calc(50px + env(safe-area-inset-bottom, 0px)); padding: 3px 6px env(safe-area-inset-bottom, 0px) !important; }
    .autotune-plugin-console .autotune-stage-panel > .row button { min-height: 44px; }
    .autotune-plugin-console .autotune-stage-panel > .status-line,
    .autotune-plugin-console .autotune-stage-panel > .status,
    .autotune-plugin-console .autotune-stage-panel > .row.status-note { display: none; }
    .autotune-plugin-console #autotune-workspace-graph { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr); padding: 3px 5px; }
    .autotune-plugin-console #autotune-workspace-graph .autotune-pitch-map { padding: 6px; }
    .autotune-plugin-console #autotune-workspace-graph .autotune-pitch-map-head { display: none; }
    .autotune-plugin-console #autotune-workspace-graph .autotune-pitch-map > .status-note { display: none; }
    .autotune-plugin-console #autotune-workspace-graph .autotune-graph-editor { position: absolute; z-index: 8; right: 5px; bottom: 5px; left: 5px; height: 42%; grid-template-columns: 86px minmax(0, 1fr); }
    .autotune-plugin-console .autotune-output-panel .tool-facts { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 380px) {
    .autotune-plugin-console { --at-preset-h: 46px; --at-transport-h: 92px; }
    .autotune-plugin-console .autotune-plugin-identity small,
    .autotune-plugin-console .autotune-audition-state { display: none; }
    .autotune-plugin-console > .autotune-preset-strip .autotune-preset-buttons { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .autotune-plugin-console .autotune-audition-dock { grid-template-rows: 44px 38px; }
    .autotune-plugin-console .autotune-auto-stage { grid-template-rows: 52px 62px minmax(58px, 1fr) 92px 44px; }
    .autotune-plugin-console .autotune-chromatic-keyboard span { min-height: 44px; }
    .autotune-plugin-console .autotune-chromatic-keyboard .is-black-key { min-height: 30px; }
    .autotune-plugin-console .autotune-knob-shell { width: 48px; height: 48px; }
    .autotune-plugin-console .autotune-knob-face { width: 42px; height: 42px; }
    .autotune-plugin-console .autotune-knob-input { width: 48px !important; height: 48px; min-height: 48px !important; }
}

@media (max-height: 500px) and (orientation: landscape) {
    .autotune-plugin-console { --at-head-h: 48px; --at-preset-h: 0px; --at-transport-h: 54px; }
    .autotune-plugin-console > .autotune-preset-strip { display: none; }
    .autotune-plugin-console .autotune-audition-dock { grid-template-columns: 340px minmax(0,1fr); grid-template-rows: 44px; padding: 4px 8px; }
    .autotune-plugin-console .autotune-stage-panel { grid-template-rows: 44px minmax(0,1fr) 48px auto auto; }
    .autotune-plugin-console .autotune-workspace-nav { height: 40px; }
    .autotune-plugin-console .autotune-auto-stage {
        grid-template-columns: minmax(250px,1fr) minmax(220px,.85fr) minmax(200px,.75fr);
        grid-template-rows: 44px minmax(0,1fr);
        grid-template-areas: 'parameters parameters advanced' 'monitor keyboard macros';
        gap: 4px;
    }
    .autotune-plugin-console .autotune-parameter-strip .autotune-control-card { position: relative; padding: 0 4px; }
    .autotune-plugin-console .autotune-parameter-strip .autotune-control-label { position: absolute; z-index: 2; top: 3px; left: 7px; font-size: .48rem; pointer-events: none; }
    .autotune-plugin-console .autotune-parameter-strip select { height: 44px; min-height: 44px; margin: 0; padding: 11px 18px 2px 5px; font-size: .67rem; }
    .autotune-plugin-console .autotune-tuner-display strong { font-size: 1.25rem; }
    .autotune-plugin-console .autotune-tuner-display > div { padding: 4px 6px; }
    .autotune-plugin-console .autotune-pitch-lane-head,
    .autotune-plugin-console .autotune-section-head { display: none; }
    .autotune-plugin-console .autotune-chromatic-keyboard { height: calc(100% - 16px); margin-top: 0; }
    .autotune-plugin-console .autotune-macro-section { grid-template-rows: minmax(0,1fr); }
    .autotune-plugin-console .autotune-macro-deck { grid-template-columns: repeat(4,minmax(0,1fr)); grid-template-rows: 1fr; }
    .autotune-plugin-console .autotune-macro-card { grid-template-rows: 18px minmax(0,1fr); }
    .autotune-plugin-console .autotune-knob-shell { width: 48px; height: 48px; }
    .autotune-plugin-console .autotune-knob-face { width: 42px; height: 42px; }
    .autotune-plugin-console .autotune-knob-input { width: 48px !important; height: 48px; min-height: 48px !important; }
    .autotune-plugin-console .autotune-advanced-inspector > summary small { display: none; }
}

/* Pitch Workstation v6 — the dense plugin workflow in AudioWrench's light UI. */
.autotune-plugin-console[data-surface="light-console"] {
    --at-console-0: #f8f5f6;
    --at-console-1: #ffffff;
    --at-console-2: #fbf8f9;
    --at-console-3: #f2edef;
    --at-console-line: #e1d8db;
    --at-console-line-soft: #eee7e9;
    --at-console-text: #17151a;
    --at-console-muted: #645d68;
    --at-console-subtle: #837a86;
    --at-console-accent: #d63846;
    --at-console-accent-strong: #b42334;
    --at-console-teal: #0f8f87;
    --at-console-blue: #3157a4;
    color: var(--at-console-text);
    border-color: var(--at-console-line);
    background: var(--at-console-0);
    box-shadow: 0 34px 90px -58px rgba(68, 24, 34, .38), 0 1px 0 #fff inset;
}
.autotune-plugin-console[data-surface="light-console"]::before {
    background: radial-gradient(circle at 78% 18%, rgba(214,56,70,.055), transparent 31%), linear-gradient(110deg, rgba(15,143,135,.025), transparent 38%);
}
.autotune-plugin-console[data-surface="light-console"] .autotune-plugin-header { border-color: var(--at-console-line); background: linear-gradient(180deg,#fff,#fbf8f9); }
.autotune-plugin-console[data-surface="light-console"] .autotune-plugin-identity strong,
.autotune-plugin-console[data-surface="light-console"] .autotune-plugin-state b,
.autotune-plugin-console[data-surface="light-console"] .autotune-source-panel > h2,
.autotune-plugin-console[data-surface="light-console"] .autotune-stage-panel > h2,
.autotune-plugin-console[data-surface="light-console"] .autotune-output-panel > h2,
.autotune-plugin-console[data-surface="light-console"] .autotune-section-head h3,
.autotune-plugin-console[data-surface="light-console"] .autotune-workspace-intro h3,
.autotune-plugin-console[data-surface="light-console"] .autotune-pitch-map h3,
.autotune-plugin-console[data-surface="light-console"] .autotune-graph-inspector strong,
.autotune-plugin-console[data-surface="light-console"] .autotune-harmony-voice,
.autotune-plugin-console[data-surface="light-console"] .autotune-live-panel h3 { color: var(--at-console-text); }
.autotune-plugin-console[data-surface="light-console"] .autotune-plugin-trust span { border-color:#cfe7e3; color:#176b66; background:#f0faf8; }
.autotune-plugin-console[data-surface="light-console"] > .autotune-preset-strip { border-color:var(--at-console-line); background:#fff; }
.autotune-plugin-console[data-surface="light-console"] .autotune-preset { border-color:#ddd4d7; color:#4c454f; background:#fff; box-shadow:none; }
.autotune-plugin-console[data-surface="light-console"] .autotune-preset:hover { border-color:#d8949c; color:#8e1f2b; background:#fff7f8; }
.autotune-plugin-console[data-surface="light-console"] .autotune-preset[aria-pressed="true"] { border-color:#d63846; color:#fff; background:linear-gradient(180deg,#df4655,#b42334); }
.autotune-plugin-console[data-surface="light-console"] .autotune-audition-dock { border-color:var(--at-console-line); background:rgba(255,255,255,.97); box-shadow:0 14px 28px -26px rgba(72,30,39,.55); }
.autotune-plugin-console[data-surface="light-console"] .autotune-ab-switch { border-color:#ddd4d7; background:#f3eef0; }
.autotune-plugin-console[data-surface="light-console"] .autotune-ab-switch button,
.autotune-plugin-console[data-surface="light-console"] .autotune-bypass-hold { color:#4d4650; }
.autotune-plugin-console[data-surface="light-console"] .autotune-ab-switch button[aria-pressed="true"] { color:#fff; background:#242029; }
.autotune-plugin-console[data-surface="light-console"] .autotune-audition-dock.is-tuned .autotune-ab-switch button[aria-pressed="true"] { background:#b42334; }
.autotune-plugin-console[data-surface="light-console"] .autotune-bypass-hold { border-color:#ddd4d7; background:#fff; }
.autotune-plugin-console[data-surface="light-console"] .autotune-main-player .wave-wrap { border-color:#e5dcdf; background:#fffafb; }
.autotune-plugin-console[data-surface="light-console"] .autotune-plugin-body,
.autotune-plugin-console[data-surface="light-console"] .autotune-console.autotune-stage-panel { background:#fbf8f9 !important; }
.autotune-plugin-console[data-surface="light-console"] .autotune-source-panel { border-color:var(--at-console-line)!important; background:#fff!important; }
.autotune-plugin-console[data-surface="light-console"] .autotune-source-panel .pill-note { border-color:#f0ccd1; color:#7f2632; background:#fff5f6; }
.autotune-plugin-console[data-surface="light-console"] .autotune-source-panel .btn-secondary,
.autotune-plugin-console[data-surface="light-console"] .autotune-source-panel .dz-demo { border-color:#ddd4d7; color:#302a32; background:#fff; }
.autotune-plugin-console[data-surface="light-console"] .autotune-source-panel .dropzone { border-color:#e2dadd; color:#2d2830; background:linear-gradient(155deg,#fff,#fdf8f9); }
.autotune-plugin-console[data-surface="light-console"] .autotune-source-panel .dropzone:hover { border-color:#d63846; background:#fff6f7; }
.autotune-plugin-console[data-surface="light-console"] .dropzone .dz-title { color:#252027; }
.autotune-plugin-console[data-surface="light-console"] .autotune-workspace-nav { border-color:#e2d9dc; background:#f2edef; }
.autotune-plugin-console[data-surface="light-console"] .autotune-workspace-tab,
.autotune-plugin-console[data-surface="light-console"] .autotune-workspace-tab.is-secondary-mode { color:#615965; background:transparent; }
.autotune-plugin-console[data-surface="light-console"] .autotune-workspace-tab span { color:#847a86; }
.autotune-plugin-console[data-surface="light-console"] .autotune-workspace-tab:hover { color:#201b22; background:#fff; }
.autotune-plugin-console[data-surface="light-console"] .autotune-workspace-tab[aria-selected="true"],
.autotune-plugin-console[data-surface="light-console"] .autotune-workspace-tab.is-primary-mode[aria-selected="true"] { color:#8e1f2b; background:#fff; box-shadow:inset 0 -2px 0 #d63846,0 4px 12px rgba(64,26,34,.08); }
.autotune-plugin-console[data-surface="light-console"] .autotune-workspace-tab[aria-selected="true"] span { color:#6a626d; }
.autotune-plugin-console[data-surface="light-console"] .autotune-parameter-strip { border-color:#e1d8db; background:#e1d8db; }
.autotune-plugin-console[data-surface="light-console"] .autotune-parameter-strip .autotune-control-card { background:#fff; }
.autotune-plugin-console[data-surface="light-console"] .autotune-parameter-strip .autotune-control-label { color:#706873; }
.autotune-plugin-console[data-surface="light-console"] .autotune-parameter-strip select { border-color:#ddd4d7; color:#201b22; background:#fff; }
.autotune-plugin-console[data-surface="light-console"] .autotune-tuner-display { border-color:#e0d7da; background:radial-gradient(circle at 50% 0,rgba(15,143,135,.08),transparent 58%),#fff; box-shadow:0 10px 24px rgba(61,29,36,.06) inset; }
.autotune-plugin-console[data-surface="light-console"] .autotune-tuner-display > div { border-color:#ebe3e6; }
.autotune-plugin-console[data-surface="light-console"] .autotune-tuner-display strong { color:#19151b; text-shadow:none; }
.autotune-plugin-console[data-surface="light-console"] .autotune-pitch-display { border-color:#e0d7da; background:#fff; }
.autotune-plugin-console[data-surface="light-console"] .autotune-pitch-lane-head strong { color:#252027; }
.autotune-plugin-console[data-surface="light-console"] .autotune-chromatic-keyboard { border-color:#a9a0a5; background:#ddd7da; }
.autotune-plugin-console[data-surface="light-console"] .autotune-chromatic-keyboard .is-black-key { color:#f6f1f3; background:linear-gradient(180deg,#4f4852,#1b181d); box-shadow:0 4px 7px rgba(31,25,30,.28); }
.autotune-plugin-console[data-surface="light-console"] .autotune-chromatic-keyboard .is-black-key.is-allowed { color:#fff0f3; background:linear-gradient(180deg,#8e3041,#36151d); }
.autotune-plugin-console[data-surface="light-console"] .autotune-section-head h3 { color:#272129; }
.autotune-plugin-console[data-surface="light-console"] .autotune-macro-card { border-color:#e0d7da; background:linear-gradient(155deg,#fff,#f8f3f5); box-shadow:0 1px 0 #fff inset; }
.autotune-plugin-console[data-surface="light-console"] .autotune-macro-card .autotune-control-label { color:#5c555f; }
.autotune-plugin-console[data-surface="light-console"] .autotune-macro-card output { color:#8e1f2b; }
.autotune-plugin-console[data-surface="light-console"] .autotune-knob-face { background:conic-gradient(from 225deg,#d63846 0deg var(--knob-stop),#eadfe2 var(--knob-stop) 270deg,transparent 270deg 360deg); filter:drop-shadow(0 5px 6px rgba(65,28,36,.18)); }
.autotune-plugin-console[data-surface="light-console"] .autotune-knob-face::before { border-color:#d9cfd3; background:radial-gradient(circle at 35% 28%,#fff,#eee7ea 55%,#dcd2d6); box-shadow:0 2px 5px rgba(60,31,37,.16),0 1px 1px #fff inset; }
.autotune-plugin-console[data-surface="light-console"] .autotune-knob-face b { background:#504850; }
.autotune-plugin-console[data-surface="light-console"] .autotune-advanced-inspector,
.autotune-plugin-console[data-surface="light-console"] .autotune-advanced-inspector > summary { border-color:#e0d7da; color:#2b252d; background:#fff; }
.autotune-plugin-console[data-surface="light-console"] .autotune-advanced-inspector[open] > summary { background:rgba(255,255,255,.98); }
.autotune-plugin-console[data-surface="light-console"] .autotune-advanced-inspector .autotune-control-card,
.autotune-plugin-console[data-surface="light-console"] .autotune-custom-scale,
.autotune-plugin-console[data-surface="light-console"] .autotune-key-suggest,
.autotune-plugin-console[data-surface="light-console"] .autotune-midi-panel { border-color:#e2d9dc; color:#282229; background:#fff; }
.autotune-plugin-console[data-surface="light-console"] .autotune-advanced-inspector .autotune-control-label,
.autotune-plugin-console[data-surface="light-console"] .autotune-advanced-inspector h3 { color:#29232b; }
.autotune-plugin-console[data-surface="light-console"] .autotune-advanced-inspector select { border-color:#ddd4d7; color:#201b22; background:#fff; }
.autotune-plugin-console[data-surface="light-console"] .autotune-pitch-map { border-color:#e3dade; background:#fff; }
.autotune-plugin-console[data-surface="light-console"] .autotune-pitch-canvas-wrap { border-color:#e6dde0; background-color:#fffafa; background-image:linear-gradient(rgba(99,77,84,.07) 1px,transparent 1px),linear-gradient(90deg,rgba(99,77,84,.05) 1px,transparent 1px); }
.autotune-plugin-console[data-surface="light-console"] .autotune-graph-events,
.autotune-plugin-console[data-surface="light-console"] .autotune-graph-inspector,
.autotune-plugin-console[data-surface="light-console"] .autotune-live-panel,
.autotune-plugin-console[data-surface="light-console"] .autotune-harmony-voice,
.autotune-plugin-console[data-surface="light-console"] .autotune-harmony-master { border-color:#e1d8db; background:#fff; }
.autotune-plugin-console[data-surface="light-console"] .autotune-graph-event { border-color:#e6dde0; color:#4e4651; background:#fbf8f9; }
.autotune-plugin-console[data-surface="light-console"] .autotune-graph-event[aria-selected="true"] { border-color:#d63846; color:#2b242c; background:#fff3f5; }
.autotune-plugin-console[data-surface="light-console"] .autotune-graph-controls label { border-color:#e2d9dc; color:#332d35; background:#fbf8f9; }
.autotune-plugin-console[data-surface="light-console"] .autotune-graph-controls select { border-color:#ddd4d7; color:#211c23; background:#fff; }
.autotune-plugin-console[data-surface="light-console"] .autotune-graph-actions .autotune-switch span { color:#332d35; }
.autotune-plugin-console[data-surface="light-console"] .autotune-stage-panel > .row { border-color:#e1d8db; background:rgba(255,255,255,.98); }
.autotune-plugin-console[data-surface="light-console"] .autotune-output-panel { border-color:#e1d8db!important; color:#252027; background:#fff!important; }
.autotune-plugin-console[data-surface="light-console"] .autotune-output-panel .tool-fact { border-color:#e2d9dc; background:#fbf8f9; }
.autotune-plugin-console[data-surface="light-console"] .autotune-output-panel .tool-fact dt,
.autotune-plugin-console[data-surface="light-console"] .autotune-output-panel th,
.autotune-plugin-console[data-surface="light-console"] .autotune-output-panel h3 { color:#252027; }
.autotune-plugin-console[data-surface="light-console"] .autotune-plugin-actions button,
.autotune-plugin-console[data-surface="light-console"] .autotune-chain-handoff,
.autotune-plugin-console[data-surface="light-console"] .autotune-drawer-close { min-width:44px; min-height:44px; border:1px solid #ddd4d7; border-radius:8px; color:#3f3842; background:#fff; text-decoration:none; }
.autotune-plugin-console[data-surface="light-console"] .autotune-plugin-actions button:hover,
.autotune-plugin-console[data-surface="light-console"] .autotune-chain-handoff:hover,
.autotune-plugin-console[data-surface="light-console"] .autotune-drawer-close:hover { border-color:#d63846; color:#8e1f2b; background:#fff5f6; }
.autotune-chain-handoff { display:inline-flex; align-items:center; justify-content:center; gap:6px; padding:6px 10px; font-size:.68rem; font-weight:820; touch-action:manipulation; }
.autotune-chain-handoff svg { width:17px; height:17px; fill:none; stroke:currentColor; stroke-width:1.9; stroke-linecap:round; stroke-linejoin:round; }
.autotune-harmony-lanes { display:none; }

@media (max-width:760px) {
    .autotune-plugin-console .autotune-chain-handoff { padding-inline:7px; }
    .autotune-plugin-console .autotune-chain-handoff span { display:none; }
    .autotune-plugin-console #autotune-workspace-harmony {
        display:grid;
        grid-template-rows:48px minmax(0,1fr) 50px;
        gap:4px;
        height:100%;
        min-height:0;
        padding:3px 5px 5px;
        overflow:hidden;
    }
    .autotune-plugin-console #autotune-workspace-harmony[hidden] { display:none!important; }
    .autotune-plugin-console .autotune-harmony-lanes { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:3px; min-height:0; }
    .autotune-plugin-console .autotune-harmony-lanes button { display:grid; grid-template-columns:auto 1fr; align-items:center; gap:4px; min-width:0; min-height:44px; padding:4px 6px; border:1px solid #e0d7da; border-radius:8px; color:#5d555f; background:#fff; font:inherit; }
    .autotune-plugin-console .autotune-harmony-lanes button b { font-size:.65rem; }
    .autotune-plugin-console .autotune-harmony-lanes button span { overflow:hidden; font-size:.55rem; text-overflow:ellipsis; white-space:nowrap; }
    .autotune-plugin-console .autotune-harmony-lanes button[aria-selected="true"] { border-color:#d63846; color:#8e1f2b; background:#fff3f5; box-shadow:inset 0 -2px 0 #d63846; }
    .autotune-plugin-console .autotune-harmony-grid { display:block; min-height:0; margin:0; overflow:hidden; }
    .autotune-plugin-console .autotune-harmony-voice { display:none; height:100%; min-height:0; padding:7px 9px; }
    .autotune-plugin-console .autotune-harmony-voice.is-selected { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); grid-template-rows:38px minmax(0,1fr); gap:4px 7px; }
    .autotune-plugin-console .autotune-harmony-head { grid-column:1/-1; min-height:38px; padding:0 0 4px; }
    .autotune-plugin-console .autotune-harmony-voice > label { display:grid; grid-template-columns:1fr; align-content:center; gap:3px; min-width:0; margin:0; font-size:.6rem; text-align:center; }
    .autotune-plugin-console .autotune-harmony-voice > label output { order:2; font-size:.58rem; }
    .autotune-plugin-console .autotune-harmony-voice > label input { order:3; min-height:44px; margin:0; }
    .autotune-plugin-console .autotune-harmony-master { min-height:0; margin:0; padding:4px 8px; }
    .autotune-plugin-console .autotune-harmony-master > label { grid-template-columns:auto minmax(0,1fr) auto; align-items:center; gap:6px; margin:0; font-size:.62rem; }
    .autotune-plugin-console .autotune-harmony-master input { grid-column:2; min-height:44px; }
    .autotune-plugin-console .autotune-harmony-master output { grid-column:3; grid-row:1; }
    .autotune-plugin-console .autotune-harmony-master .status-note { display:none; }
    .autotune-plugin-console #autotune-workspace-live { display:grid; place-items:center; height:100%; min-height:0; padding:5px; overflow:hidden; }
    .autotune-plugin-console #autotune-workspace-live[hidden] { display:none!important; }
    .autotune-plugin-console #autotune-workspace-live .autotune-live-panel { grid-template-columns:minmax(0,1fr) minmax(150px,.7fr); align-items:center; width:100%; min-height:0; max-height:100%; margin:0; padding:10px; overflow:hidden; }
}

@media (max-height:500px) and (orientation:landscape) {
    .autotune-plugin-console #autotune-workspace-harmony { grid-template-rows:44px minmax(0,1fr) 44px; }
    .autotune-plugin-console .autotune-harmony-voice.is-selected { grid-template-rows:34px minmax(0,1fr); }
    .autotune-plugin-console .autotune-harmony-head { min-height:34px; }
    .autotune-plugin-console #autotune-workspace-live .autotune-live-panel { grid-template-columns:1fr 1fr; padding:6px 10px; }
}

@media (min-width:761px) {
    .autotune-plugin-console .autotune-auto-stage {
        grid-template-columns:minmax(0,1.4fr) minmax(340px,.6fr);
        grid-template-rows:52px minmax(250px,1fr) 156px;
        grid-template-areas:
            'parameters parameters'
            'monitor macros'
            'keyboard advanced';
        gap:8px 10px;
    }
    .autotune-plugin-console .autotune-tuner-display {
        display:grid;
        grid-template-columns:repeat(3,minmax(0,1fr));
        height:100%;
        min-height:0;
        overflow:hidden;
    }
    .autotune-plugin-console .autotune-tuner-display > div {
        display:grid;
        align-content:center;
        justify-items:center;
        min-height:0;
        height:100%;
        padding:18px;
        text-align:center;
    }
    .autotune-plugin-console .autotune-tuner-display > div + div { border-left:1px solid var(--at-console-line-soft); }
    .autotune-plugin-console .autotune-tuner-display span { font-size:.66rem; }
    .autotune-plugin-console .autotune-tuner-display strong { margin:.14em 0; font-size:clamp(2.5rem,5.2vw,5.6rem); line-height:.95; letter-spacing:-.06em; }
    .autotune-plugin-console .autotune-tuner-scale strong { font-size:clamp(2rem,3.7vw,4.2rem); }
    .autotune-plugin-console .autotune-pitch-display { height:156px; min-height:0; }
    .autotune-plugin-console .autotune-chromatic-keyboard { height:104px; min-height:0; grid-template-rows:104px; }
    .autotune-plugin-console .autotune-chromatic-keyboard span { min-height:104px; }
    .autotune-plugin-console .autotune-chromatic-keyboard .is-black-key { min-height:65px; }
    .autotune-plugin-console .autotune-macro-section { display:grid; grid-template-rows:28px minmax(0,1fr); min-height:0; }
    .autotune-plugin-console .autotune-macro-deck { grid-template-columns:1fr 1fr; grid-template-rows:repeat(2,minmax(118px,148px)); align-content:center; min-height:0; gap:8px; }
    .autotune-plugin-console .autotune-macro-card { grid-template-rows:24px minmax(68px,1fr); min-height:118px; height:auto; padding:8px!important; }
    .autotune-plugin-console .autotune-macro-card .autotune-control-label { font-size:.68rem; }
    .autotune-plugin-console .autotune-macro-card output { font-size:.78rem; }
    .autotune-plugin-console .autotune-knob-shell { width:78px; height:78px; }
    .autotune-plugin-console .autotune-knob-face { width:70px; height:70px; }
    .autotune-plugin-console .autotune-knob-input { width:78px!important; height:78px; min-height:78px!important; }
    .autotune-plugin-console .autotune-advanced-inspector { grid-area:advanced; align-self:stretch; }
    .autotune-plugin-console .autotune-advanced-inspector > summary { height:100%; min-height:44px; }
    .autotune-plugin-console .autotune-advanced-inspector[open] { position:absolute; z-index:45; inset:0 0 0 auto; width:min(430px,100%); height:100%; max-height:none; }
    .autotune-plugin-console .autotune-advanced-inspector[open] > summary { height:52px; }
}
