.redesignv1 .audiofxQuickMenu {
    position: relative;
    z-index: 30;
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
}

/* No-jump on expand. The card visibly shrinks ~5px when .audiofx-quick-expanded
   flips .onetrack to overflow:visible. Root cause: an empty legacy
   <div class="dwdWrap shared_result"> (height 0, margin-top:5px) sits at the bottom
   of .onetrack. While .onetrack is overflow:hidden it's a BFC that CONTAINS that 5px
   margin (card +5px); expanding drops the BFC so the phantom margin collapses out
   → card 5px shorter. Fix: keep .onetrack overflow:visible in BOTH states so the BFC
   never toggles → height constant. Collapsed corners stay rounded because
   .result-sample still clips (its own overflow:hidden); expanded corners handled below. */
.redesignv1 .result-sample > .onetrack {
    overflow: visible;
}

.redesignv1 .result-sample.audiofx-quick-expanded {
    position: relative;
    z-index: 20;
    overflow: visible;
}

.redesignv1 .result-sample.audiofx-quick-expanded > .onetrack {
    overflow: visible;
    /* .result-sample normally clips its opaque .onetrack bg to the 10px rounded card
       via overflow:hidden. Expanding sets overflow:visible (so the panel escapes),
       which un-clips the corners → square bottom. Re-round onetrack to match (10px card
       − 1px border = 9px inner radius). */
    border-radius: 9px;
}

.redesignv1 .audiofxQuickMenu.is-open {
    z-index: 1200;
}

.redesignv1 .audiofxQuickDebug {
    position: relative;
    z-index: 40;
    order: 20;
    flex: 1 0 100%;
    margin: 0;
    font-family: "JetBrains Mono", monospace;
}

.redesignv1 .result-actions-wrapper:has(> .audiofxQuickDebug) {
    flex-wrap: wrap;
    row-gap: 8px;
}

.redesignv1 .audiofxQuickDebug summary {
    display: inline-flex;
    min-height: 32px;
    box-sizing: border-box;
    align-items: center;
    gap: 7px;
    padding: 6px 10px;
    border: 1px solid #fdba74;
    border-radius: 8px;
    background: #fff7ed;
    color: #9a3412;
    font-size: 9px;
    line-height: 1;
    cursor: pointer;
    list-style: none;
}

.redesignv1 .audiofxQuickDebug summary::-webkit-details-marker {
    display: none;
}

.redesignv1 .audiofxQuickDebug summary span {
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.redesignv1 .audiofxQuickDebug summary strong {
    font-weight: 600;
    color: #c2410c;
}

.redesignv1 .audiofxQuickDebugBody {
    position: absolute;
    right: 0;
    bottom: calc(100% + 8px);
    width: min(430px, calc(100vw - 32px));
    box-sizing: border-box;
    padding: 12px;
    border: 1px solid #fed7aa;
    border-radius: 10px;
    background: #fff;
    color: #7c2d12;
    box-shadow: 0 16px 38px rgba(124, 45, 18, .16);
    font-family: "JetBrains Mono", monospace;
    font-size: 11px;
    line-height: 1.45;
}

.redesignv1 .audiofxQuickDebugBody p {
    margin: 0 0 8px;
}

.redesignv1 .audiofxQuickDebugBody code,
.redesignv1 .audiofxQuickDebugBody small {
    display: block;
    overflow-wrap: anywhere;
}

.redesignv1 .audiofxQuickDebugBody code {
    padding: 8px;
    border-radius: 6px;
    background: #fff7ed;
    color: #9a3412;
}

.redesignv1 .audiofxQuickDebugBody small {
    margin-top: 8px;
    color: #9a3412;
    opacity: .72;
}

/* trigger button — 1:1 with the canon .result-action-button (Save neutral) */
.redesignv1 .audiofxQuickBtn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 5px 9px;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    background: transparent;
    color: #475569;
    font-family: "JetBrains Mono", monospace;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .1em;
    line-height: 1.5;
    text-transform: uppercase;
    cursor: pointer;
    transition: all .15s ease;
}

.redesignv1 .audiofxQuickBtn:hover,
.redesignv1 .audiofxQuickBtn:focus-visible,
.redesignv1 .audiofxQuickMenu.is-open .audiofxQuickBtn {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #0f172a;
    outline: none;
}

.redesignv1 .audiofxQuickBtnIcon {
    width: 12px;
    height: 12px;
    flex: 0 0 auto;
}

.redesignv1 .audiofxQuickChevron {
    width: 12px;
    height: 12px;
    flex: 0 0 auto;
    transition: transform .16s ease;
}

.redesignv1 .audiofxQuickMenu.is-open .audiofxQuickChevron {
    transform: rotate(180deg);
}

.redesignv1 .audiofxQuickPanel[hidden],
.redesignv1 .audiofxQuickBackdrop {
    display: none;
}

/* panel shell — aligned to the native .quick-popover (slate-200 border,
   restrained shadow, no backdrop blur, tighter radius) */
.redesignv1 .audiofxQuickPanel {
    position: absolute;
    right: 0;
    bottom: calc(100% + 12px);
    z-index: 1202;
    width: min(390px, calc(100vw - 32px));
    box-sizing: border-box;
    padding: 10px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(15, 23, 42, .10), 0 2px 8px rgba(15, 23, 42, .06);
    animation: audiofxQuickIn .16s ease-out;
}

.redesignv1 .audiofxQuickPanel::after {
    content: "";
    position: absolute;
    right: 25px;
    bottom: -6px;
    width: 11px;
    height: 11px;
    border-right: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
    background: #fff;
    transform: rotate(45deg);
}

@keyframes audiofxQuickIn {
    from {
        opacity: 0;
        transform: translateY(5px) scale(.985);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.redesignv1 .audiofxQuickPanelHead {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 28px;
    padding: 1px 4px 8px;
    color: #64748b;
    font-family: "JetBrains Mono", monospace;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.redesignv1 .audiofxQuickClose {
    display: none;
    width: 34px;
    height: 34px;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 9px;
    background: #f1f5f9;
    color: #64748b;
    cursor: pointer;
}

.redesignv1 .audiofxQuickClose svg {
    width: 18px;
    height: 18px;
}

.redesignv1 .audiofxQuickGrid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
}

.redesignv1 .audiofxQuickEffect {
    position: relative;
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 14px;
    min-width: 0;
    min-height: 54px;
    align-items: center;
    gap: 9px;
    box-sizing: border-box;
    padding: 6px 8px 6px 6px;
    border: 1px solid #edf1f6;
    border-radius: 12px;
    background: #fbfdff;
    color: #1e293b;
    text-decoration: none;
    transition: border-color .16s ease, background .16s ease, color .16s ease, transform .16s ease, box-shadow .16s ease;
}

.redesignv1 .audiofxQuickEffect:hover,
.redesignv1 .audiofxQuickEffect:focus-visible {
    z-index: 1;
    border-color: #bfdbfe;
    background: #f4f8ff;
    color: #1d4ed8;
    box-shadow: 0 7px 18px rgba(37, 99, 235, .09);
    transform: translateY(-1px);
    outline: none;
}

.redesignv1 .audiofxQuickEffectIcon {
    position: relative;
    display: flex;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 10px;
    background: linear-gradient(145deg, #eff6ff, #f8fafc);
}

.redesignv1 .audiofxQuickEffectIcon img {
    display: block;
    width: 36px;
    height: 36px;
    object-fit: contain;
    transition: opacity .15s ease, transform .16s ease;
}

.redesignv1 .audiofxQuickEffect:hover .audiofxQuickEffectIcon img {
    transform: scale(1.05);
}

.redesignv1 .audiofxQuickEffectTitle {
    min-width: 0;
    overflow: hidden;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.redesignv1 .audiofxQuickEffectArrow {
    width: 14px;
    height: 14px;
    color: #94a3b8;
    transition: color .16s ease, transform .16s ease;
}

.redesignv1 .audiofxQuickEffect:hover .audiofxQuickEffectArrow {
    color: #2563eb;
    transform: translateX(2px);
}

.redesignv1 .audiofxQuickAll {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) 16px;
    align-items: center;
    gap: 9px;
    min-height: 40px;
    margin-top: 8px;
    padding: 4px 9px;
    border-radius: 10px;
    background: #f1f5f9;
    color: #334155;
    font-size: 12px;
    font-weight: 750;
    text-decoration: none;
    transition: background .16s ease, color .16s ease;
}

.redesignv1 .audiofxQuickAll:hover,
.redesignv1 .audiofxQuickAll:focus-visible {
    background: #e8f0ff;
    color: #1d4ed8;
    outline: none;
}

.redesignv1 .audiofxQuickAllIcon {
    display: inline-flex;
    width: 28px;
    height: 28px;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #fff;
    color: #2563eb;
}

.redesignv1 .audiofxQuickAllIcon svg,
.redesignv1 .audiofxQuickAllArrow {
    width: 16px;
    height: 16px;
}

.redesignv1 .audiofxQuickAllArrow {
    color: #94a3b8;
}

.redesignv1 .audiofxQuickEffect.is-loading,
.redesignv1 .audiofxQuickAll.is-loading {
    pointer-events: none;
    opacity: .72;
}

.redesignv1 .audiofxQuickEffect.is-loading .audiofxQuickEffectIcon img {
    opacity: 0;
}

.redesignv1 .audiofxQuickEffect.is-loading .audiofxQuickEffectIcon::after,
.redesignv1 .audiofxQuickAll.is-loading .audiofxQuickAllIcon::after {
    content: "";
    position: absolute;
    width: 15px;
    height: 15px;
    box-sizing: border-box;
    border: 2px solid #bfdbfe;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: audiofxQuickSpin .65s linear infinite;
}

.redesignv1 .audiofxQuickAllIcon {
    position: relative;
}

@keyframes audiofxQuickSpin {
    to {
        transform: rotate(360deg);
    }
}

[dir="rtl"] .redesignv1 .audiofxQuickPanel {
    right: auto;
    left: 0;
}

[dir="rtl"] .redesignv1 .audiofxQuickPanel::after {
    right: auto;
    left: 25px;
}

[dir="rtl"] .redesignv1 .audiofxQuickEffectArrow,
[dir="rtl"] .redesignv1 .audiofxQuickAllArrow {
    transform: rotate(180deg);
}

[dir="rtl"] .redesignv1 .audiofxQuickEffect:hover .audiofxQuickEffectArrow {
    transform: rotate(180deg) translateX(2px);
}

@media (max-width: 760px) {
    .redesignv1 .result-description {
        padding-right: .25rem;
    }

    .redesignv1 .audiofxQuickBtnLabel,
    .redesignv1 .audiofxQuickChevron {
        display: none;
    }

    .redesignv1 .audiofxQuickBtn {
        width: 26px;
        height: 26px;
        padding: 0;
    }
}

@media (max-width: 640px) {
    body.audiofx-quick-open {
        overflow: hidden;
    }

    .redesignv1 .audiofxQuickMenu.is-open .audiofxQuickBackdrop {
        position: fixed;
        inset: 0;
        z-index: 1200;
        display: block;
        background: rgba(15, 23, 42, .42);
        backdrop-filter: blur(2px);
    }

    .redesignv1 .audiofxQuickPanel {
        position: fixed;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 1201;
        width: 100%;
        max-height: min(78vh, 540px);
        overflow-y: auto;
        padding: 12px 14px max(18px, env(safe-area-inset-bottom));
        border: 0;
        border-radius: 20px 20px 0 0;
        box-shadow: 0 -18px 55px rgba(15, 23, 42, .22);
        animation: audiofxQuickSheetIn .2s ease-out;
        -webkit-overflow-scrolling: touch;
    }

    .redesignv1 .audiofxQuickPanel::after {
        display: none;
    }

    .redesignv1 .audiofxQuickPanelHead {
        min-height: 38px;
        padding: 0 2px 10px 4px;
        color: #334155;
        font-size: 11px;
    }

    .redesignv1 .audiofxQuickClose {
        display: inline-flex;
    }

    .redesignv1 .audiofxQuickGrid {
        gap: 8px;
    }

    .redesignv1 .audiofxQuickEffect {
        grid-template-columns: 42px minmax(0, 1fr) 12px;
        min-height: 56px;
    }

    .redesignv1 .audiofxQuickEffectIcon {
        width: 42px;
        height: 42px;
    }

    .redesignv1 .audiofxQuickEffectTitle {
        font-size: 12px;
    }

    .redesignv1 .audiofxQuickAll {
        min-height: 44px;
    }
}

@keyframes audiofxQuickSheetIn {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

@media (max-width: 390px) {
    .redesignv1 .audiofxQuickPanel {
        padding-right: 10px;
        padding-left: 10px;
    }

    .redesignv1 .audiofxQuickGrid {
        grid-template-columns: 1fr;
    }

    .redesignv1 .audiofxQuickEffect {
        min-height: 52px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .redesignv1 .audiofxQuickPanel,
    .redesignv1 .audiofxQuickEffect,
    .redesignv1 .audiofxQuickBtn,
    .redesignv1 .audiofxQuickChevron {
        animation: none;
        transition: none;
    }
}
