/* 免费资源角标（独立样式，避免 .badge 被主题染红） */
.post-item .tips-badge-free {
    pointer-events: none;
}

.free-corner-label {
    display: inline-block;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.02em;
    padding: 6px 10px;
    color: #fff !important;
    background-color: #0cbc87;
    border: 2px solid #fff;
    border-radius: 0.375rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    white-space: nowrap;
}

.free-corner-label--inline {
    font-size: 12px;
    padding: 4px 8px;
    vertical-align: middle;
}

@media (min-width: 768px) {
    .post-item .tips-badge-free .free-corner-label {
        font-size: 15px;
        padding: 7px 12px;
    }

    .free-corner-label--inline {
        font-size: 13px;
        padding: 5px 10px;
    }
}

/* 全站页脚贴底（内容不足一屏时 footer 仍贴视口底部） */
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

body > main {
    flex: 1 0 auto;
}

/* PC 下载扫码临时页（嵌入主题头尾，适配亮/暗色） */
body.download-scan-page main {
    display: flex;
    flex-direction: column;
}

body.download-scan-page .download-scan-shell {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.download-scan-card {
    width: 100%;
    max-width: 480px;
    padding: 2rem 1.75rem;
    color: var(--ri-body-color, #595d69);
    background: var(--ri-secondary-bg, #fff);
    border: 1px solid var(--ri-border-color, #f0f1f3);
    border-radius: 1rem;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    text-align: center;
}

.download-scan-badge {
    display: inline-block;
    margin-bottom: 0.75rem;
    padding: 0.35rem 0.85rem;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--ri-success-text, #0cbc87);
    background: var(--ri-success-bg-subtle, rgba(12, 188, 135, 0.12));
    border-radius: 999px;
}

.download-scan-title {
    margin: 0 0 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--ri-heading-color, #191a1f);
}

.download-scan-resource {
    margin: 0 0 1.25rem;
    font-size: 0.95rem;
    color: var(--ri-secondary-text, #595d69);
    line-height: 1.5;
}

.download-scan-steps {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    margin-bottom: 1.25rem;
    padding: 0.85rem 1rem;
    font-size: 0.875rem;
    color: var(--ri-body-color, #29292e);
    text-align: left;
    background: var(--ri-tertiary-bg, #f7f8f9);
    border: 1px solid var(--ri-border-color, transparent);
    border-radius: 0.75rem;
}

.download-scan-qr-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.85rem;
    width: 100%;
    margin-bottom: 1.25rem;
}

.download-scan-frame {
    display: block;
    flex-shrink: 0;
    padding: 0.75rem;
    background: #fff;
    border: 1px solid var(--ri-border-color, #f0f1f3);
    border-radius: 0.85rem;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.06);
}

.download-scan-qrcode {
    width: 220px;
    height: 220px;
    display: block;
}

.download-scan-pwd {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--ri-tertiary-bg, #f7f8f9);
    border: 1px dashed var(--ri-border-color, #dfe0e5);
    border-radius: 999px;
}

.download-scan-pwd-label {
    font-size: 0.8rem;
    color: var(--ri-secondary-text, #a1a1a8);
}

.download-scan-pwd-code {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--ri-primary-text, #2163e8);
}

.download-scan-notice {
    display: flex;
    gap: 0.75rem;
    margin: 0 0 1.25rem;
    padding: 0.9rem 1rem;
    text-align: left;
    background: var(--ri-tertiary-bg, #f7f8f9);
    border: 1px solid var(--ri-border-color, #f0f1f3);
    border-radius: 0.75rem;
}

.download-scan-notice-icon {
    flex-shrink: 0;
    width: 1.35rem;
    margin-top: 0.1rem;
    font-size: 1rem;
    line-height: 1;
    color: var(--ri-info-text, #3d8bfd);
}

.download-scan-notice-body {
    flex: 1;
    min-width: 0;
}

.download-scan-notice-title {
    margin-bottom: 0.35rem;
    font-size: 0.875rem;
    font-weight: 700;
    line-height: 1.4;
    color: var(--ri-heading-color, #191a1f);
}

.download-scan-notice-list {
    margin: 0;
    padding-left: 1.1rem;
    font-size: 0.8125rem;
    line-height: 1.65;
    color: var(--ri-secondary-text, #595d69);
}

.download-scan-notice-list li + li {
    margin-top: 0.2rem;
}

.download-scan-notice-foot {
    margin: 0.45rem 0 0;
    font-size: 0.75rem;
    line-height: 1.5;
    color: var(--ri-secondary-text, #a1a1a8);
}

.download-scan-back {
    display: inline-block;
    padding: 0.55rem 1.25rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--ri-primary-text, #2163e8);
    text-decoration: none;
    border: 1px solid var(--ri-primary-border-subtle, rgba(33, 99, 232, 0.25));
    border-radius: 999px;
    transition: background 0.2s ease, color 0.2s ease;
}

.download-scan-back:hover {
    color: var(--ri-primary-text, #1a4fba);
    background: var(--ri-primary-bg-subtle, rgba(33, 99, 232, 0.06));
}
