/* downloader.css */


.dl-shell {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: none;
    margin: 0 auto;
}

/* === Empty / input stage === */
.dl-audio-options {
    grid-column: span 3;
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
}

.dl-form {
    position: relative;
}

.dl-input-wrap {
    border: 1px solid rgba(var(--overlay-rgb), 0.10);
    border-radius: 18px;
    backdrop-filter: blur(12px);
    transition: border-color 0.2s ease, box-shadow 0.25s ease;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.9);
}

.dl-input-wrap:focus-within {
    border-color: rgba(var(--overlay-rgb), 0.28);
    box-shadow: 0 0 0 4px rgba(var(--overlay-rgb), 0.05), 0 12px 36px rgba(0, 0, 0, 0.4);
}

.dl-form textarea {
    width: 100%;
    padding: 18px 20px 10px;
    background: transparent;
    color: var(--text-main);
    border: none;
    border-radius: 18px 18px 0 0;
    font: 0.95rem/1.5 var(--mono);
    outline: none;
    resize: none;
    min-height: 72px;
    box-sizing: border-box;
    display: block;
}

.dl-form textarea::placeholder {
    color: var(--text-dim);
    font-family: var(--mono);
    letter-spacing: 0;
}

.dl-input-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: flex-end;
    padding: 10px 14px 14px;
    justify-content: space-between;
}

.dl-paste-btn svg {
    width: 16px;
    height: 16px;
}

.dl-paste-btn:active {
    transform: scale(0.985);
}

.dl-paste-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.dl-paste-btn:focus-visible {
    outline: 3px solid rgba(255, 168, 77, 0.42);
    outline-offset: 3px;
}

.dl-paste-btn,
.dl-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 10px 20px;
    min-height: 40px;
    border: 1px solid rgba(var(--overlay-rgb), 0.12);
    border-radius: 999px;
    background: #fafafa;
    color: #09090b;
    font-weight: 700;
    font-size: 0.88rem;
    font-family: inherit;
    cursor: pointer;
    letter-spacing: 0.01em;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
    transition: transform 0.12s ease, box-shadow 0.2s ease, background 0.15s ease;
}

.dl-paste-btn:hover,
.dl-btn-primary:hover {
    background: #fff;
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

.dl-btn-primary:active {
    transform: scale(0.985);
}

.dl-btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.dl-btn-primary .ic {
    width: 16px;
    height: 16px;
}

.dl-submit-spinner {
    display: none;
    width: 15px;
    height: 15px;
    box-sizing: border-box;
    border: 2px solid rgba(9, 9, 11, 0.28);
    border-top-color: currentColor;
    border-radius: 50%;
    animation: dl-submit-spin 0.7s linear infinite;
}

.dl-btn-primary.is-loading:disabled {
    opacity: 1;
    cursor: progress;
}

.dl-btn-primary.is-loading .ic {
    display: none;
}

.dl-btn-primary.is-loading .dl-submit-spinner {
    display: inline-block;
}

.dl-form.is-loading .dl-input-wrap {
    border-color: rgba(255, 168, 77, 0.42);
    box-shadow: 0 0 0 4px rgba(255, 168, 77, 0.08), 0 12px 36px rgba(0, 0, 0, 0.36);
}

@keyframes dl-submit-spin {
    to {
        transform: rotate(360deg);
    }
}

.dl-submit-label-compact {
    display: none;
}


.dl-form-hint {
    margin: 12px 0 0;
    font-size: 0.78rem;
    color: var(--text-dim);
    letter-spacing: 0.01em;
}


.dl-form-hint:empty {
    display: none;
}

.dl-form-hint.err {
    color: var(--danger-text);
}

.dl-form-hint.ok {
    color: var(--success-text);
}

.tool-example {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 7px 10px;
    margin-top: 12px;
    color: var(--text-dim);
    font-size: 0.76rem;
}

.tool-example a {
    color: var(--text-muted);
    font-family: var(--mono);
    text-decoration: none;
    overflow-wrap: anywhere;
}

.tool-example a:hover {
    color: var(--heading);
    text-decoration: underline;
    text-underline-offset: 3px;
}


/* === Song hero card === */
.song-hero {
    --cover-url: none;
    position: relative;
    margin: 28px 0 18px;
    padding: 28px;
    border-radius: 22px;
    border: 10px solid rgba(var(--overlay-rgb), 0.08);
    /* background: linear-gradient(180deg, rgba(133, 245, 239, 0.85), rgba(144, 229, 240, 0.92)); */
    overflow: hidden;
    isolation: isolate;
    scroll-margin-top: calc(var(--nav-h) + 16px);
    animation: heroIn 0.45s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

@keyframes heroIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.song-hero::before {
    content: "";
    position: absolute;
    inset: -20%;
    background-image: var(--cover-url);
    background-size: cover;
    background-position: center;
    filter: blur(46px) saturate(1.4) brightness(0.85);
    opacity: 0.32;
    z-index: -2;
}

.song-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    /* background: linear-gradient(180deg, rgba(10, 10, 12, 0.28) 0%, rgba(10, 10, 12, 0.88) 88%); */
    z-index: -1;
}

.song-hero-top {
    display: grid;
    grid-template-columns: 168px 1fr;
    gap: 24px;
    align-items: center;
}

@media (max-width: 560px) {
    .song-hero {
        margin: 16px 0 14px;
        padding: 15px;
        border-radius: 18px;
    }

    .song-hero-top {
        grid-template-columns: 64px minmax(0, 1fr);
        gap: 12px;
        align-items: start;
        text-align: left;
    }
}

.song-hero-cover {
    width: 168px;
    height: 168px;
    border: 5px dotted blue;
    border-radius: 10px;
    object-fit: cover;
    background: rgba(0, 0, 0, 0.35);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(var(--overlay-rgb), 0.06);
}

@media (max-width: 560px) {
    .song-hero-cover {
        width: 64px;
        height: 64px;
        max-width: none;
        aspect-ratio: auto;
        margin: 0;
        border-radius: 12px;
        box-shadow: 0 10px 22px rgba(15, 20, 28, 0.18), 0 0 0 1px rgba(var(--overlay-rgb), 0.08);
    }
}

@media (max-width: 560px) {

    /* Keep the title and toggle together; let the expanded details breathe across the card. */
    .song-hero-body {
        min-width: 0;
    }

    .song-hero-title {
        margin: 1px 0 0;
        font-size: 1.08rem;
        line-height: 1.2;
        text-wrap: pretty;
    }

    .song-hero-details-toggle {
        align-self: start;
    }

    .song-hero-details {
        width: calc(100% + 76px);
        margin-left: -76px;
        min-width: 0;
        padding-top: 13px;
        border-top: 1px solid rgba(var(--overlay-rgb), 0.12);
    }

    .song-hero-artist {
        margin: 0 0 10px;
        font-size: 0.82rem;
    }

    .song-hero-meta {
        justify-content: flex-start;
        gap: 8px 16px;
        margin-bottom: 12px;
        font-size: 0.78rem;
    }

    .song-hero-tags {
        justify-content: flex-start;
        align-items: flex-start;
        gap: 5px;
    }

    .song-hero-tags:empty {
        display: none;
    }

    .song-hero-tags::before {
        content: "Tags";
        flex: 0 0 100%;
        margin: 1px 0 1px;
        color: var(--text-dim);
        font: 700 0.64rem/1 var(--mono);
        letter-spacing: 0.10em;
        text-transform: uppercase;
    }
}

.song-hero-title {
    margin: 0 0 6px;
    font-size: 1.55rem;
    letter-spacing: -0.025em;
    line-height: 1.15;
    color: var(--heading);
}

.song-hero-artist {
    margin: 0 0 14px;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.song-hero-artist strong {
    color: var(--text-main);
    font-weight: 600;
}

.song-hero-meta {
    list-style: none;
    padding: 0;
    margin: 0 0 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 14px 20px;
    font-size: 0.84rem;
    color: var(--text-muted);
}

@media (max-width: 560px) {
    .song-hero-meta {
        justify-content: flex-start;
    }
}

.song-hero-meta li {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.song-hero-meta svg {
    width: 14px;
    height: 14px;
    color: var(--text-dim);
    flex-shrink: 0;
}

.song-hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

@media (max-width: 560px) {
    .song-hero-tags {
        justify-content: flex-start;
    }
}

.song-hero-tag {
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.74rem;
    color: black;
    background: rgba(var(--overlay-rgb), 0.05);
    border: 1px solid rgba(var(--overlay-rgb), 0.12);
    font-family: var(--mono);
}

@media (max-width: 560px) {
    .song-hero-tags {
        gap: 5px;
    }

    .song-hero-tag {
        max-width: 100%;
        padding: 6px 10px 6px 11px;
        border-radius: 8px;
        font-family: var(--font);
        font-size: 0.72rem;
        font-weight: 500;
        line-height: 1.35;
        overflow-wrap: anywhere;
        color: var(--text-muted);
        background: rgba(var(--overlay-rgb), 0.028);
        border-color: rgba(var(--overlay-rgb), 0.08);
        border-left: 2px solid rgba(126, 229, 151, 0.34);
        box-shadow: none;
    }

}

.song-hero-details-disclosure {
    min-width: 0;
}

.song-hero-details-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: max-content;
    max-width: 100%;
    margin: 2px auto 0;
    padding: 6px 10px;
    border: 1px solid rgba(var(--overlay-rgb), 0.12);
    border-radius: 999px;
    background: rgba(var(--overlay-rgb), 0.04);
    color: var(--text-muted);
    font: 600 0.72rem/1 var(--font);
    cursor: pointer;
    transition: color 0.16s ease, border-color 0.16s ease, background 0.16s ease, transform 0.12s ease;
}

.song-hero-details-toggle:hover {
    color: var(--heading);
    border-color: rgba(var(--overlay-rgb), 0.24);
    background: rgba(var(--overlay-rgb), 0.08);
}

.song-hero-details-toggle:active {
    transform: scale(0.97);
}

.song-hero-details-toggle:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

.song-hero-details-toggle svg {
    width: 13px;
    height: 13px;
    transition: transform 0.18s ease;
}

.song-hero-details-disclosure.is-expanded .song-hero-details-toggle svg {
    transform: rotate(180deg);
}

@media (max-width: 560px) {
    .song-hero-details-disclosure:not(.is-expanded) .song-hero-details {
        display: none;
    }

    .song-hero-details-toggle {
        display: inline-flex;
        justify-content: flex-start;
        margin: 6px 0 0;
        padding: 5px 0;
        border: 0;
        border-radius: 6px;
        background: transparent;
        color: var(--success-text);
        font-size: 0.72rem;
    }

    .song-hero-details-toggle:hover {
        background: rgba(var(--overlay-rgb), 0.05);
        color: var(--heading);
    }

    .song-hero-details-disclosure.is-loading .song-hero-details-toggle {
        display: none;
    }

    .song-hero-details-disclosure.is-expanded .song-hero-details {
        margin-top: 10px;
    }
}

@media (prefers-reduced-motion: reduce) {

    .song-hero-details-toggle,
    .song-hero-details-toggle svg {
        transition: none;
    }
}

.song-hero-actions {
    position: absolute;
    top: 16px;
    right: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.song-hero-suno {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border-radius: 999px;
    background: #b89797;
    border: 1px solid rgba(var(--overlay-rgb), 0.1);
    color: var(--text-muted);
    font-size: 0.74rem;
    text-decoration: none;
    backdrop-filter: blur(8px);
    transition: color 0.15s ease, border-color 0.15s ease;
}

.song-hero-suno:hover {
    color: var(--heading);
    border-color: red;
}

.song-hero-suno svg {
    width: 12px;
    height: 12px;
}


@media (max-width: 560px) {
    .song-hero-actions {
        position: static;
        justify-content: flex-end;
        gap: 7px;
        margin: -1px 0 13px;
        padding-bottom: 11px;
        border-bottom: 1px solid rgba(var(--overlay-rgb), 0.09);
    }

    .song-hero-suno {
        min-height: 28px;
        padding: 5px 9px;
        border-radius: 9px;
        font-size: 0.68rem;
        box-shadow: none;
    }
}

.dl-toast {
    position: fixed;
    left: 50%;
    bottom: max(24px, env(safe-area-inset-bottom));
    z-index: 1400;
    width: max-content;
    max-width: min(92vw, 520px);
    box-sizing: border-box;
    padding: 11px 16px;
    border: 1px solid rgba(126, 229, 151, 0.34);
    border-radius: 999px;
    background: rgba(13, 18, 16, 0.94);
    color: #eaf5ec;
    box-shadow: 0 16px 44px rgba(2, 6, 4, 0.42);
    font: 700 0.72rem/1.25 var(--font);
    text-align: center;
    overflow-wrap: anywhere;
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, 12px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.dl-toast.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

.dl-toast.is-error {
    border-color: rgba(239, 145, 133, 0.46);
    color: #ffd5ce;
}

@media (max-width: 560px) {
    .dl-toast {
        bottom: max(16px, env(safe-area-inset-bottom));
        max-width: calc(100vw - 32px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .dl-toast {
        transition: none;
    }
}

.song-hero.is-loading .song-hero-title,
.song-hero.is-loading .song-hero-artist,
.song-hero.is-loading .song-hero-meta li,
.song-hero.is-loading .song-hero-tag {
    background: linear-gradient(90deg, rgba(var(--overlay-rgb), 0.05), rgba(var(--overlay-rgb), 0.10), rgba(var(--overlay-rgb), 0.05));
    background-size: 200% 100%;
    animation: skelShimmer 1.4s ease-in-out infinite;
    color: transparent !important;
}

.song-hero.is-loading .song-hero-title {
    height: 30px;
    border-radius: 8px;
}

.song-hero.is-loading .song-hero-artist {
    height: 18px;
    width: 60%;
    border-radius: 6px;
}

.song-hero.is-loading .song-hero-meta li {
    height: 14px;
    width: 70px;
    border-radius: 6px;
}

.song-hero.is-loading .song-hero-tag {
    height: 22px;
    width: 56px;
    border-radius: 999px;
}

@keyframes skelShimmer {
    0% {
        background-position: 100% 0;
    }

    100% {
        background-position: -100% 0;
    }
}

/* === Section label (Preview / Download) === */

.dl-section-label {
    margin: 0 4px 10px;
    font-size: 1rem;
    letter-spacing: 0.14em;
    font-weight: 700;
}

/* === Preview (inline audio + optional video) === */
.dl-preview-stack {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dl-audio-wrap {
    padding: 10px 12px;
    background: rgba(var(--overlay-rgb), 0.02);
    border: 1px solid rgba(var(--overlay-rgb), 0.08);
    border-radius: 12px;
}

.dl-audio-wrap audio {
    width: 100%;
    height: 38px;
    display: block;
    color-scheme: dark;
}

.dl-video-wrap {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
    border: 1px solid rgba(var(--overlay-rgb), 0.08);
}

.dl-video-wrap video {
    width: 100%;
    max-height: 320px;
    display: block;
    background: #000;
}

.dl-preview-miss {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    font-size: 0.82rem;
    line-height: 1.5;
    color: var(--text-muted);
    background: rgba(var(--overlay-rgb), 0.02);
    border: 1px dashed rgba(var(--overlay-rgb), 0.12);
    border-radius: 12px;
}

.dl-preview-miss svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin-top: 1px;
    color: var(--text-dim);
}

.dl-preview-miss strong {
    color: var(--text-main);
    font-weight: 600;
}

.dl-chip.is-checking {
    opacity: 0.72;
    cursor: wait;
}

.dl-chip.is-checking .dl-chip-arrow {
    display: none;
}

.dl-chip.is-checking .dl-chip-sub {
    text-transform: none;
    letter-spacing: 0;
}

.dl-chip.is-unavailable {
    opacity: 0.88;
    cursor: default;
    border-style: dashed;
    border-color: rgba(var(--overlay-rgb), 0.1);
    background: rgba(var(--overlay-rgb), 0.01);
}

.dl-chip.is-unavailable:hover {
    transform: none;
    border-color: rgba(var(--overlay-rgb), 0.1);
    background: rgba(var(--overlay-rgb), 0.01);
}

.dl-chip.is-unavailable .dl-chip-ic {
    color: var(--text-dim);
}

.dl-chip.is-unavailable .dl-chip-sub {
    text-transform: none;
    letter-spacing: 0;
    color: var(--text-muted);
    font-size: 0.74rem;
}

.dl-chip.is-unavailable .dl-chip-arrow {
    display: none;
}

.dl-chip.is-unavailable .dl-chip-hint {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    color: var(--text-dim);
}

.dl-chip .dl-chip-hint {
    display: none;
}


.dl-chip {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 12px;
    text-align: left;
    background: rgba(var(--overlay-rgb), 0.02);
    border: 1px solid rgba(var(--overlay-rgb), 0.08);
    border-radius: 14px;
    color: var(--text-main);
    cursor: pointer;
    font-family: inherit;
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.15s ease;
}

.dl-chip:hover:not([disabled]) {
    border-color: rgba(var(--overlay-rgb), 0.22);
    background: rgba(var(--overlay-rgb), 0.04);
    transform: translateY(-1px);
}

.dl-chip[disabled] {
    opacity: 0.55;
    cursor: not-allowed;
}

.dl-chip.is-saved {
    border-color: rgba(0, 230, 118, 0.4);
    background: rgba(0, 230, 118, 0.06);
}

.dl-chip-ic {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    border-radius: 10px;
    background: rgba(var(--overlay-rgb), 0.05);
    display: grid;
    place-items: center;
    color: var(--text-muted);
}

.dl-chip.is-saved .dl-chip-ic {
    color: var(--success-text);
    background: rgba(0, 230, 118, 0.08);
}

.dl-chip-ic svg {
    width: 18px;
    height: 18px;
}

.dl-chip-body {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
    min-width: 0;
    flex: 1;
}

.dl-chip-kind {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-main);
    white-space: nowrap;
}

.dl-chip-sub {
    font-size: 0.72rem;
    color: var(--text-dim);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-top: 2px;
}

.dl-chip-arrow {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    color: var(--text-dim);
    transition: transform 0.2s ease, color 0.2s ease;
}

.dl-chip:hover:not([disabled]) .dl-chip-arrow {
    color: var(--heading);
    transform: translateY(2px);
}

.dl-chip.is-saved .dl-chip-arrow {
    color: var(--success-text);
}

/* Keep touch feedback intentional instead of letting mobile browsers paint a full blue tap highlight. */


.dl-chip:focus:not(:focus-visible) {
    outline: none;
}

.dl-chip:focus-visible {
    outline: 3px solid var(--focus-ring);
    /* outline: 3px solid blue; */
    outline-offset: 3px;
}

.dl-chip:active:not([disabled]) {
    transform: scale(0.985);
    background: rgba(var(--overlay-rgb), 0.055);
}

@media (hover: none) {
    .dl-chip:hover:not([disabled]) {
        border-color: rgba(var(--overlay-rgb), 0.08);
        background: rgba(var(--overlay-rgb), 0.02);
        transform: none;
    }

    .dl-chip:hover:not([disabled]) .dl-chip-arrow {
        color: var(--text-dim);
        transform: none;
    }

}

.dl-help-arrow {
    transition: transform 0.2s ease;
}

button[aria-expanded="true"] .dl-help-arrow {
    transform: rotate(180deg);
}

.dl-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: center;
    padding: 18px;
}

.dl-modal::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(8, 8, 11, 0.68);
    backdrop-filter: blur(8px);
}

.dl-modal-card {
    position: relative;
    padding: 28px;
    border: 1px solid rgba(255, 168, 77, 0.45);
    border-radius: 20px;
    background: var(--card-bg);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
    transform: translateY(0) scale(1);
    opacity: 1;
    transition: transform 180ms cubic-bezier(0.23, 1, 0.32, 1), opacity 180ms ease;
}


.dl-modal-kicker {
    margin: 0 0 10px;
    color: var(--warning-text);
    font: 700 0.7rem/1.4 var(--mono);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.dl-modal-card h2 {
    font-weight: 900;
    margin: 0 34px 10px 0;
    color: var(--heading);
    font-size: clamp(1.35rem, 4vw, 1.75rem);
    letter-spacing: -0.03em;
    line-height: 1.12;
}

.dl-modal-card p:not(.dl-modal-kicker) {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.92rem;
    line-height: 1.65;
}

.dl-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border: 1px solid rgba(var(--overlay-rgb), 0.14);
    border-radius: 50%;
    background: rgba(var(--overlay-rgb), 0.04);
    color: var(--text-muted);
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    transition: background-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.dl-modal-close:hover {
    background: rgba(var(--overlay-rgb), 0.1);
    color: var(--text-main);
}

.dl-modal-close:active {
    transform: scale(0.97);
}

.dl-modal-close:focus-visible,
.dl-btn-secondary:focus-visible,
.dl-modal-card .dl-btn-primary:focus-visible {
    outline: 3px solid rgba(255, 168, 77, 0.42);
    outline-offset: 3px;
}

.dl-modal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.dl-modal-actions .dl-btn-primary,
.dl-btn-secondary {
    min-height: 42px;
    text-decoration: none;
}

/* .dl-audio-format-options {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 22px;
} */

.dl-audio-format-choice {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    color: var(--text-main);
    text-align: left;
    cursor: pointer;
    transition: transform 160ms ease, border-color 160ms ease, background-color 160ms ease;
}

.dl-audio-format-choice:hover {
    background: rgba(255, 168, 77, 0.07);
}

.dl-audio-format-choice:focus-visible {
    outline-offset: 3px;
}


.dl-audio-format-choice span {
    color: var(--text-muted);
    font-size: 0.78rem;
    line-height: 1.5;
}


.dl-audio-options .dl-audio-format-choice {
    width: 100%;
    min-width: 0;

    display: grid;
    /* grid-template-columns: 1fr 1.5fr auto; */
    align-items: center;
    /* gap: 16px; */

    text-align: left;
}



/* Format title */
.dl-audio-options .dl-audio-format-choice strong {
    color: red;
    font-weight: 900;
}


/* Description */
.dl-audio-options .dl-audio-format-choice>span.small {
    font-size: 13px;
    line-height: 1.5;
    color: green;
}

/* Download status */
.dl-audio-options .dl-audio-format-choice .dl-chip-sub {
    white-space: nowrap;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--bs-primary, #0d6efd);
    padding: 0.15rem 0.5rem;
    border-radius: 0.35rem;
    margin-top: 0.2rem;
}

.dl-btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    border: 1px solid rgba(var(--overlay-rgb), 0.14);
    border-radius: 999px;
    background: transparent;
    color: var(--text-main);
    font: 700 0.86rem/1 var(--font);
    cursor: pointer;
    transition: background-color 160ms ease, transform 160ms ease;
}

.dl-btn-secondary:hover {
    background: rgba(var(--overlay-rgb), 0.07);
}

.dl-btn-secondary:active {
    transform: scale(0.985);
}

body.dl-modal-open {
    overflow: hidden;
}

#dl-next-steps-modal {
    z-index: 2450;
    padding-bottom: max(18px, env(safe-area-inset-bottom));
}

#dl-next-steps-modal .dl-modal-card {
    max-height: calc(100vh - 36px);
    max-height: calc(100dvh - 36px);
    overflow-y: auto;
    overscroll-behavior: contain;
    border-color: rgba(126, 229, 151, 0.3);
    background: var(--control-bg);
    scrollbar-width: thin;
}

#dl-next-steps-modal .dl-modal-kicker {
    color: var(--success-text);
}

.dl-next-step {
    display: grid;
    min-height: 58px;
    box-sizing: border-box;
    align-content: center;
    gap: 3px;
    padding: 11px 14px;
    border: 1px solid rgba(var(--overlay-rgb), 0.13);
    border-radius: 14px;
    background: rgba(var(--overlay-rgb), 0.035);
    color: var(--text-main);
    font-family: var(--font);
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.dl-next-step[hidden] {
    display: none;
}

.dl-next-step:hover {
    border-color: rgba(126, 229, 151, 0.35);
    background: rgba(126, 229, 151, 0.065);
}

.dl-next-step.dl-next-step--lyric-mv {
    width: 100%;
    min-width: 0;
    min-height: 0;
    max-width: 100%;
    height: auto;
    padding: 0;
    overflow: visible;
    border-radius: 0;
    aspect-ratio: 640 / 140;
    border-color: transparent;
    background-color: transparent;
    background-image: url("/images/mv/lyrics-mv-cta-button.png?v=20260908-rect");
    background-position: center;
    background-repeat: no-repeat;
    background-size: 100% 100%;
    box-shadow: none;
}

.dl-next-step.dl-next-step--lyric-mv:hover {
    border-color: transparent;
    background-color: transparent;
    box-shadow: none;
}

.dl-next-step.dl-next-step--lyric-mv>* {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

.dl-next-step:active {
    transform: translateY(1px);
}

.dl-next-step:focus-visible,
.dl-next-steps-dismiss:focus-visible {
    outline: 3px solid rgba(126, 229, 151, 0.34);
    outline-offset: 3px;
}

.dl-next-step strong {
    color: var(--heading);
    font-size: 0.9rem;
    line-height: 1.25;
}

.dl-next-step span {
    color: var(--text-dim);
    font-size: 0.72rem;
    line-height: 1.35;
}

.dl-next-steps-dismiss {
    display: block;
    min-height: 44px;
    margin: 10px auto 0;
    padding: 8px 14px;
    border: 0;
    background: transparent;
    color: var(--text-muted);
    font: 700 0.78rem/1 var(--font);
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.dl-next-steps-dismiss:hover {
    color: var(--text-main);
}

@media (max-width: 560px) {
    .dl-modal-card {
        padding: 24px 20px 20px;
    }

    .dl-modal-actions {
        flex-direction: column;
    }

    .dl-modal-actions .dl-btn-primary,
    .dl-btn-secondary {
        width: 100%;
        box-sizing: border-box;
    }

    #dl-next-steps-modal {
        align-items: end;
        padding: 8px 8px max(8px, env(safe-area-inset-bottom));
    }

    #dl-next-steps-modal .dl-modal-card {
        max-height: calc(100vh - 16px);
        max-height: calc(100dvh - 16px);
        padding: 20px 16px 12px;
        border-radius: 20px;
    }

    #dl-next-steps-modal .dl-modal-card h2 {
        font-size: 1.35rem;
    }

    .dl-next-step {
        min-height: 56px;
        padding: 10px 13px;
    }

    .dl-next-step--lyric-mv {
        display: none;
    }

}

@media (prefers-reduced-motion: reduce) {

    .dl-modal-card,
    .dl-modal-close,
    .dl-btn-secondary,
    .dl-next-step,
    .dl-next-steps-dismiss,
    .dl-paste-btn {
        transition: none;
    }

    .dl-submit-spinner {
        animation: none;
    }
}

/* === Page-level MP3 progress and recoverable error === */
.dl-processing {
    position: fixed;
    inset: 0;
    z-index: 1250;
    display: grid;
    place-items: center;
    padding: 18px;
}

.dl-processing::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(8, 8, 11, 0.72);
    backdrop-filter: blur(9px);
}

.dl-processing-card {
    position: relative;
    width: min(100%, 430px);
    box-sizing: border-box;
    padding: 28px;
    border: 1px solid rgba(126, 229, 151, 0.34);
    border-radius: 22px;
    background: var(--card-bg);
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.48);
}

.dl-processing-head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
}

.dl-processing-spinner {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    box-sizing: border-box;
    border: 13px solid rgba(255, 255, 255, 0.12);
    border-top-color: var(--success-text);
    border-radius: 50%;
    animation: dlProcessingSpin 850ms linear infinite;
}




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

.dl-processing-card h2 {
    margin: 0 0 4px;
    color: var(--heading);
    font-size: 1.35rem;
    letter-spacing: -0.025em;
    line-height: 1.2;
}

.dl-processing-stage {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.86rem;
    line-height: 1.5;
}

.dl-processing-track {
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    margin-top: 14px;
    margin-bottom: 8px;
}

.dl-processing-bar {
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: var(--success-text);
    transition: width 160ms linear;
}

.dl-processing.is-indeterminate .dl-processing-bar {
    width: 42%;
    animation: dlProcessingIndeterminate 1.15s ease-in-out infinite;
}

@keyframes dlProcessingIndeterminate {
    from {
        transform: translateX(-115%);
    }

    to {
        transform: translateX(340%);
    }
}

.dl-processing-detail {
    min-height: 1.4em;
    margin: 9px 0 0;
    color: #9ca3af;
    font: 600 0.74rem/1.4 var(--mono, monospace);
    text-align: right;
}

.dl-processing-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.dl-processing-actions .dl-btn-primary,
.dl-processing-actions .dl-btn-secondary {
    min-height: 44px;
}

.dl-processing-error-copy {
    display: none;
    margin: 0;
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

.dl-processing.is-error .dl-processing-card {
    border-color: rgba(239, 145, 133, 0.46);
}

.dl-processing.is-error .dl-processing-spinner {
    display: grid;
    place-items: center;
    border: 1px solid rgba(239, 145, 133, 0.36);
    background: rgba(239, 145, 133, 0.08);
    color: var(--danger-text);
    animation: none;
}

.dl-processing.is-error .dl-processing-spinner::before {
    content: "!";
    font: 800 1.15rem/1 var(--font);
}

.dl-processing.is-error .dl-processing-track,
.dl-processing.is-error .dl-processing-detail,
.dl-processing.is-error .dl-processing-stage {
    display: none;
}

.dl-processing.is-error .dl-processing-error-copy {
    display: block;
}

@media (max-width: 560px) {
    .dl-processing {
        align-items: end;
        padding: 12px;
    }

    .dl-processing-card {
        width: 100%;
        padding: 24px 20px max(20px, env(safe-area-inset-bottom));
        border-radius: 22px;
    }

    .dl-processing-actions {
        flex-direction: column;
    }

    .dl-processing-actions .dl-btn-primary,
    .dl-processing-actions .dl-btn-secondary {
        width: 100%;
        box-sizing: border-box;
    }
}

@media (prefers-reduced-motion: reduce) {

    .dl-processing-spinner,
    .dl-processing.is-indeterminate .dl-processing-bar {
        animation: none;
    }

    .dl-processing-bar {
        transition: none;
    }
}

.dl-hidden {
    display: none !important;
}