.page-download .main-wrapper {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding-top: 80px; /* Espacio para la navbar */
    padding-bottom: calc(40px + env(safe-area-inset-bottom, 0px));
}

.download-shell {
    width: min(560px, calc(100% - 32px));
    margin: 0 auto;
    text-align: center;
}

.download-header {
    margin-bottom: 34px;
}

.download-header h1 {
    font-size: clamp(2rem, 5vw, 2.5rem);
    line-height: 1.05;
    letter-spacing: -0.03em;
    margin-bottom: 12px;
}

.download-header p {
    color: var(--text-muted);
    max-width: 34ch;
    margin: 0 auto;
    line-height: 1.7;
}

.download-panel {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.92));
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 28px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.08);
    padding: 30px 24px 24px;
}

.download-context-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 24px;
    justify-content: center;
}

.download-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.06);
    color: var(--text-main);
    font-size: 13px;
    font-weight: 600;
}

.download-chip--soft {
    color: var(--text-muted);
}

.download-actions {
    display: flex;
    flex-direction: column;
    gap: 14px;
    align-items: center;
    margin-bottom: 16px;
}

.download-btn {
    width: min(100%, 340px);
    min-height: 68px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-decoration: none;
    transition: transform 0.18s cubic-bezier(0.175, 0.885, 0.32, 1.275), background 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0 18px;
    font-family: inherit;
    cursor: pointer;
    background: #000;
    color: #fff;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.12);
}

@media (hover: hover) {
    .download-btn:hover {
        transform: scale(1.02);
        background: #111;
    }
}

.download-btn .icon {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.download-btn .icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

.download-btn .text {
    text-align: left;
    line-height: 1.06;
}

.download-btn .text span {
    display: block;
    font-size: 0.68rem;
    font-weight: 400;
    opacity: 0.84;
}

.download-btn .text strong {
    display: block;
    font-size: 1.06rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.download-note {
    min-height: 22px;
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.55;
    max-width: 34ch;
    margin: 0 auto;
}

.download-mini-guide {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid rgba(0, 0, 0, 0.07);
    max-width: 36ch;
    margin-inline: auto;
}

.download-mini-guide h2 {
    font-size: 1rem;
    margin-bottom: 10px;
}

.download-mini-guide ol {
    list-style: none;
    counter-reset: steps-counter;
    padding-left: 0;
    display: grid;
    gap: 16px;
    text-align: left;
}

.download-mini-guide li {
    counter-increment: steps-counter;
    position: relative;
    padding-left: 38px;
    margin-bottom: 16px;
    font-size: 0.94rem;
    color: var(--text-muted);
    line-height: 1.6;
    text-align: left;
    transition: transform 0.2s ease;
}

.download-mini-guide li::before {
    content: counter(steps-counter);
    position: absolute;
    left: 0;
    top: 2px;
    width: 24px;
    height: 24px;
    background: #000;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
}

[data-theme="dark"] .download-mini-guide li::before {
    background: #fff;
    color: #000;
}

@media (hover: hover) {
    .download-mini-guide li:hover {
        transform: translateX(4px);
        color: var(--text-main);
    }
}

.download-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 24px;
}

.download-footer-links {
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--text-muted);
    font-size: 14px;
}

.download-copyright {
    color: var(--text-muted);
    font-size: 12px;
    opacity: 0.6;
    margin-top: 10px;
    letter-spacing: 0.02em;
}

.download-link-inline {
    color: inherit;
    font-weight: 500;
    transition: color 0.2s ease;
}

@media (hover: hover) {
    .download-link-inline:hover {
        color: var(--text-main);
    }
}

.download-footer-separator {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.45;
}

[data-theme="dark"] .download-panel {
    background: linear-gradient(180deg, rgba(20, 20, 20, 0.96), rgba(20, 20, 20, 0.9));
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
}

[data-theme="dark"] .download-chip {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.12);
}

[data-theme="dark"] .download-btn {
    background: #f0f0f0;
    color: #111;
    border-color: rgba(255, 255, 255, 0.15);
}

@media (hover: hover) {
    [data-theme="dark"] .download-btn:hover {
        background: #fff;
    }
}

[data-theme="dark"] .download-mini-guide {
    border-top-color: rgba(255, 255, 255, 0.08);
}

@media (max-width: 899px), (orientation: portrait) {
    .page-download .main-wrapper {
        align-items: flex-start;
        padding-top: 22px;
    }

    .download-shell {
        width: calc(100% - 28px);
    }

    .download-header {
        margin-bottom: 24px;
    }

    .download-panel {
        padding: 22px 18px 20px;
        border-radius: 24px;
    }

    .download-btn {
        width: 100%;
    }
}

.step-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 6px;
    margin: 0 3px;
    color: var(--text-main);
    vertical-align: middle;
    line-height: 1;
    width: 24px;
    height: 24px;
    min-width: 24px;
    padding: 3px;
    transform: translateY(-2px);
    box-sizing: border-box;
}

.step-icon svg {
    width: 100%;
    height: 100%;
    display: block;
    flex-shrink: 0;
}

/* iOS share icon uses Apple's signature blue */
.step-icon--ios-share {
    background: rgba(0, 122, 255, 0.10);
    border-color: rgba(0, 122, 255, 0.30);
    color: #007AFF;
}

/* iOS add icon (azul iOS sobre fondo blanco como el nativo) */
.step-icon--ios-add {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.15);
    color: #1c1c1e;
}

/* Texto unicode estilo (⋮ ⋯) para los menús cuando se usen */
.step-icon--text {
    font-size: 0.95rem;
    font-weight: 700;
    padding: 0;
}

[data-theme="dark"] .step-icon {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.15);
}

[data-theme="dark"] .step-icon--ios-share {
    background: rgba(10, 132, 255, 0.18);
    border-color: rgba(10, 132, 255, 0.45);
    color: #0a84ff;
}

[data-theme="dark"] .step-icon--ios-add {
    background: rgba(255, 255, 255, 0.92);
    border-color: rgba(255, 255, 255, 0.4);
    color: #1c1c1e;
}

/* ============================================
   Aviso de modo incógnito / navegación privada
   ============================================ */
.download-incognito-alert {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    text-align: left;
    background: linear-gradient(180deg, rgba(255, 196, 0, 0.16), rgba(255, 152, 0, 0.10));
    border: 1px solid rgba(255, 152, 0, 0.35);
    border-radius: 16px;
    padding: 14px 16px;
    margin-bottom: 20px;
    color: var(--text-main);
}

.download-incognito-alert__icon {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 152, 0, 0.20);
    color: #b25e00;
    border-radius: 50%;
}

.download-incognito-alert__icon svg {
    width: 18px;
    height: 18px;
    display: block;
}

.download-incognito-alert__body {
    flex: 1;
    min-width: 0;
}

.download-incognito-alert__title {
    font-size: 0.92rem;
    font-weight: 700;
    margin: 0 0 4px;
    line-height: 1.3;
    color: var(--text-main);
}

.download-incognito-alert__text {
    font-size: 0.84rem;
    line-height: 1.5;
    color: var(--text-muted);
    margin: 0;
}

[data-theme="dark"] .download-incognito-alert {
    background: linear-gradient(180deg, rgba(255, 196, 0, 0.10), rgba(255, 152, 0, 0.06));
    border-color: rgba(255, 196, 0, 0.30);
}

[data-theme="dark"] .download-incognito-alert__icon {
    background: rgba(255, 196, 0, 0.18);
    color: #ffb74d;
}
