/* ==========================================================================
 * 下载引导 DownloadGuide（简化版）
 * 静态卡片 + 资源下载示意标注 1/2/3，无滚动 / 无镂空
 * ========================================================================== */

.dl-guide {
    position: fixed;
    inset: 0;
    z-index: 10060;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    padding-bottom: max(1rem, env(safe-area-inset-bottom));
    pointer-events: none;
}

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

.dl-guide.is-open {
    pointer-events: auto;
}

.dl-guide-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, .45);
    opacity: 0;
    transition: opacity .22s ease;
}

.dl-guide.is-open .dl-guide-backdrop {
    opacity: 1;
}

.dl-guide-card {
    position: relative;
    z-index: 2;
    width: min(100%, 22.5rem);
    max-height: min(90vh, 36rem);
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    padding: 1.1rem 1.15rem 1rem;
    border-radius: 16px;
    background: #fff;
    border: 1px solid rgba(15, 23, 42, .08);
    box-shadow: 0 22px 48px -20px rgba(15, 23, 42, .45);
    opacity: 0;
    transform: translateY(10px) scale(.98);
    transition: opacity .22s ease, transform .28s cubic-bezier(.22, .68, .48, 1.01);
}

.dl-guide.is-open .dl-guide-card {
    opacity: 1;
    transform: none;
}

.dl-guide-close {
    position: absolute;
    top: .45rem;
    right: .45rem;
    width: 2rem;
    height: 2rem;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #94a3b8;
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
}

.dl-guide-close:hover {
    background: rgba(15, 23, 42, .05);
    color: #334155;
}

.dl-guide-head {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin: 0 1.6rem .75rem 0;
}

.dl-guide-badge {
    display: inline-flex;
    align-items: center;
    min-height: 1.375rem;
    padding: 0 .5rem;
    border-radius: 6px;
    font-size: .6875rem;
    font-weight: 700;
    color: #ff522b;
    background: rgba(255, 82, 43, .1);
}

.dl-guide-title {
    margin: 0 0 .35rem;
    font-size: 1.125rem;
    font-weight: 800;
    line-height: 1.3;
    letter-spacing: -.02em;
    color: #0f172a;
}

.dl-guide-desc {
    margin: 0 0 .9rem;
    font-size: .8125rem;
    line-height: 1.55;
    color: #64748b;
}

/* —— 资源下载示意 + 标注 —— */
.dl-guide-figure {
    position: relative;
    margin: 0 0 .9rem;
    padding: .75rem;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.dl-guide-panel {
    position: relative;
    padding: .7rem .7rem .65rem;
    border-radius: 10px;
    background: #fff;
    border: 1px solid #e8edf3;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}

.dl-guide-panel-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0 0 .55rem;
    font-size: .8125rem;
    font-weight: 700;
    color: #1e293b;
}

.dl-guide-panel-title span {
    font-size: .65rem;
    font-weight: 600;
    color: #94a3b8;
}

.dl-guide-res-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .4rem;
}

.dl-guide-res {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 2.15rem;
    padding: .35rem .4rem;
    border-radius: 8px;
    font-size: .6875rem;
    font-weight: 700;
    color: #334155;
    background: #f1f5f9;
    border: 1px solid transparent;
}

.dl-guide-res.is-free {
    background: rgba(16, 185, 129, .1);
    color: #047857;
    border-color: rgba(16, 185, 129, .25);
}

.dl-guide-res.is-vip {
    background: rgba(234, 200, 107, .22);
    color: #8a6910;
    border-color: rgba(234, 200, 107, .45);
}

.dl-guide-res.is-sale {
    background: rgba(255, 82, 43, .08);
    color: #c2410c;
    border-color: rgba(255, 82, 43, .2);
}

.dl-guide-mark {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 999px;
    font-size: .6875rem;
    font-weight: 800;
    color: #fff;
    background: #ff522b;
    box-shadow: 0 2px 6px rgba(255, 82, 43, .45);
    pointer-events: none;
}

.dl-guide-mark-1 {
    top: -.35rem;
    left: -.2rem;
}

.dl-guide-mark-2 {
    top: -.35rem;
    right: -.2rem;
}

.dl-guide-mark-3 {
    bottom: -.35rem;
    right: 28%;
}

.dl-guide-legend {
    margin: 0;
    padding: 0;
    list-style: none;
}

.dl-guide-legend li {
    display: flex;
    align-items: flex-start;
    gap: .55rem;
    margin: 0 0 .55rem;
    font-size: .8125rem;
    line-height: 1.45;
    color: #475569;
}

.dl-guide-legend li:last-child {
    margin-bottom: 0;
}

.dl-guide-legend-num {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    height: 1.25rem;
    margin-top: .05rem;
    border-radius: 999px;
    font-size: .6875rem;
    font-weight: 800;
    color: #fff;
    background: #ff522b;
}

.dl-guide-legend b {
    color: #0f172a;
    font-weight: 700;
}

.dl-guide-actions {
    display: flex;
    gap: .5rem;
    justify-content: flex-end;
    margin-top: 1rem;
}

.dl-guide-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.35rem;
    padding: 0 1.05rem;
    border-radius: 8px;
    border: 0;
    font-size: .8125rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform .15s, filter .15s, background .15s;
}

.dl-guide-btn:active {
    transform: scale(.98);
}

.dl-guide-btn-ghost {
    background: transparent;
    color: #94a3b8;
}

.dl-guide-btn-ghost:hover {
    color: #475569;
    background: #f1f5f9;
}

.dl-guide-btn-primary {
    background: #ff522b;
    color: #fff;
    box-shadow: 0 6px 14px -8px rgba(255, 82, 43, .95);
}

.dl-guide-btn-primary:hover {
    filter: brightness(1.05);
}

/* 首页示意：下载按钮 */
.dl-guide-home-shot {
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    min-height: 7.5rem;
    margin: 0 0 .9rem;
    padding: .75rem;
    border-radius: 12px;
    background:
        linear-gradient(180deg, rgba(15, 23, 42, .15), rgba(15, 23, 42, .45)),
        #94a3b8;
    background-size: cover;
    background-position: center;
    overflow: hidden;
}

.dl-guide-home-shot .dl-guide-fake-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    min-height: 2.25rem;
    padding: 0 .9rem;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 700;
    color: #fff;
    background: #ff522b;
    box-shadow: 0 6px 16px rgba(0, 0, 0, .25);
}

.dl-guide-home-shot .dl-guide-mark {
    top: -.4rem;
    left: -.35rem;
}

body.has-dl-guide {
    overflow: hidden;
}

.footer-widget-links .js-dl-guide-open,
a.js-dl-guide-open {
    cursor: pointer;
}

.footer-dl-guide {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
}

.footer-dl-guide::before {
    content: '';
    width: .375rem;
    height: .375rem;
    border-radius: 50%;
    background: #ff522b;
    box-shadow: 0 0 0 3px rgba(255, 82, 43, .2);
}

.dock-dl-jump {
    color: inherit;
    text-decoration: none !important;
}

.dock-dl-jump .iconfont {
    color: var(--primary, #ff522b);
}

.dl-guide-pulse {
    animation: dlGuidePulse 1.4s ease 2;
}

@keyframes dlGuidePulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 82, 43, .4); }
    50% { box-shadow: 0 0 0 8px rgba(255, 82, 43, 0); }
}

@media (max-width: 767.98px) {
    .dl-guide {
        align-items: flex-end;
        padding: .75rem;
        padding-bottom: max(.75rem, env(safe-area-inset-bottom));
    }

    .dl-guide-card {
        width: 100%;
        max-height: min(88vh, 34rem);
        border-radius: 16px 16px 14px 14px;
    }

    .dl-guide-title {
        font-size: 1.05rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .dl-guide-backdrop,
    .dl-guide-card {
        transition: none;
    }

    .dl-guide-pulse {
        animation: none;
    }
}
