/* ============ 全站通用组件（下载站 / 活动页共用） ============
 * 职责边界：本文件只放「全站通用」的组件样式（按钮 .btn/.btn-primary/.btn-secondary、
 *   弹窗 .dl-overlay、公告卡 .notice-card、toast 等）。后台专属样式一律放 activity.css。
 * 新增通用组件请写在这里；不要在 activity.css 里重复定义本已存在的全站类，
 *   后台如需微调（如 toast 置顶）用「覆盖规则」而非整段复制。
 * ========================================================================== */

/* 顶部紫色光晕（限制在视口内，避免移动端横向溢出） */
.fluid-glow {
    position: absolute;
    width: 600px;
    max-width: 100vw;
    height: 600px;
    background: radial-gradient(circle, var(--glow-violet-soft) 0%, transparent 70%);
    border-radius: 50%;
    top: -200px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 0;
    pointer-events: none;
    filter: blur(60px);
}

/* 白→灰渐变标题 */
.wonder-gradient-text {
    background: linear-gradient(to right, var(--text-gradient-from), var(--text-gradient-to));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* 玻璃卡片 */
.wonder-card {
    background: var(--translate-card);
    border: 1px solid var(--border-faint);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.4s var(--ease);
}

.wonder-card:hover {
    background: var(--translate-card-hover);
    border-color: var(--border-subtle);
}

/* 白色主按钮 */
.wonder-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--cta-inverse-bg);
    color: var(--cta-inverse-fg);
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    transition: all 0.3s ease;
    cursor: pointer;
}

.wonder-button:hover {
    background: var(--cta-inverse-bg-hover);
    transform: scale(1.02);
    color: var(--cta-inverse-fg);
}

/* 幽灵副按钮 */
.wonder-button-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--surface-glass-soft);
    color: var(--text);
    border: 1px solid var(--border-subtle);
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    transition: all 0.3s ease;
    cursor: pointer;
}

.wonder-button-secondary:hover {
    background: var(--surface-glass-strong);
    border-color: var(--border-glass-strong);
    color: var(--text);
}

/* ============ Hero ============ */

.hero-section {
    text-align: center;
    /* 顶部间距统一走 --page-top-gap（v=34）：0/1/2 条横幅、桌面/手机都是同一个距离，
       详见 css/base.css 的令牌说明与 css/layout.css 的 .main 让位。 */
    padding-top: var(--page-top-gap);
    padding-bottom: 80px;
}

@media (min-width: 768px) {
    .hero-section {
        /* 只放大下留白：上留白由令牌统一（原来是 96px，比其它页面远一大截） */
        padding-bottom: 96px;
    }
}

.hero-inner {
    max-width: 56rem;
    margin: 0 auto;
}

/* 版本徽标 */
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border-subtle);
    background: var(--badge-surface);
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.05em;
    margin-bottom: 24px;
}

.badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary);
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.35; }
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(1.85rem, 5vw, 3.8rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin-bottom: 24px;
}

.hero-subtitle {
    max-width: 42rem;
    margin: 0 auto;
    color: var(--text-muted);
    font-size: clamp(1rem, 2.2vw, 1.25rem);
    font-weight: 300;
    line-height: 1.75;
}

/* 公告卡 */
.notice-card {
    max-width: 42rem;
    margin: 40px auto 0;
    padding: 24px;
    border-radius: var(--radius);
    background: var(--surface-glass-soft);
    border: 1px solid var(--border-subtle);
    display: flex;
    gap: 16px;
    text-align: left;
    align-items: flex-start;
}

/* 修复：后台「关闭公告」时 JS 设置 card.hidden=true，但 .notice-card 的
   display:flex 会覆盖 UA 的 [hidden]{display:none}，导致整张卡（含静态兜底公告）
   仍显示。显式让 hidden 生效，与 .dl-overlay[hidden] / .dl-qr[hidden] 保持一致。 */
.notice-card[hidden] { display: none; }

/* ⚠ 首帧占位（2026-10-11 修「刷新时内容被推下去」）
   症状（逐帧实测首页）：公告卡在 HTML 里是 hidden 的，等 /api/lottery/announcement
   回来才整卡插入 —— 结果 398ms 插进来 133px、470ms 又长到 218px，
   下面的「立即下载 / 查阅文档」按钮被从 y=387 一路推到 y=672（两次跳变），
   观感就是"刷新时闪一下、很卡"。
   做法：记住上次刷新到底有没有公告（site-notice.js 写 bt-notice-has）——
     · 上次有 → <html> 上带 .notice-reserve（由 head 里的 asset-fallback.js 同步加上），
       首帧就按骨架屏占好位，接口回来后原地替换，**整页零位移**；
     · 上次没有 → 保持 hidden，也不会出现"先闪一张卡再消失"。
   没有 JS 时不会加这个类 ⇒ 卡片照旧隐藏，与改造前一致。 */
html.notice-reserve .notice-card[hidden] { display: flex; }

/* 卡片最小高度：实测真实卡 218px、骨架只有 133px —— 两者不一致时替换那一刻还会再跳一次
   （那 85px 正是第二次跳变）。把最小高度钉在卡上（而不是只给骨架）有两个好处：
     · 骨架态与真实态同高 ⇒ 替换时零位移；
     · 后台写一条很短的公告时，卡片也不会突然缩成一小条、把下面的内容整体吸上去。
   代价：极短的公告会在卡里留一点空白（属于可接受的取舍）。 */
.notice-card { min-height: 218px; }

.notice-icon {
    color: var(--primary);
    flex: 0 0 auto;
}

.notice-body h4 {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
}

.notice-body p {
    margin-top: 8px;
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.7;
}

.notice-links {
    margin-top: 12px;
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.notice-links a {
    font-size: 13px;
    font-weight: 500;
    color: var(--primary);
}

.notice-links a:hover {
    color: var(--primary-container);
}

/* 整卡骨架屏：作为 .notice-card 的直接子项（与 .notice-icon / .notice-body 同级、同一 flex 容器），
   加载态真实图标与正文被整体隐藏后，骨架是唯一可见子项，呈现为「整卡皆灰」的占位效果：
   左侧图标占位 + 右侧标题/正文行，复用 .skeleton 基类（微光扫过），
   数据到达后原地替换为真实内容，避免整卡闪出与高度跳变。 */
.notice-skeleton {
    display: flex;
    gap: 16px;              /* 对齐 .notice-card 的子项间距，使骨架布局与真实卡一致 */
    align-items: flex-start;
    width: 100%;
}
/* 修复：.notice-skeleton 的 display:flex 会覆盖 UA 默认的 [hidden]{display:none}，
   导致数据加载完成后骨架仍残留（与真实内容并存）。显式让 hidden 生效。 */
.notice-skeleton[hidden] { display: none; }
.notice-skeleton .notice-sk-icon {
    flex: 0 0 auto;
    width: 24px;
    height: 24px;
    border-radius: 6px;    /* 对齐左侧 info 图标的占位尺寸 */
}
.notice-skeleton .notice-sk-body {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 2px;
}
.notice-skeleton .notice-sk-title {
    height: 14px;
    width: 42%;
    margin-bottom: 4px;   /* 对齐 h4 标题与正文之间的间距 */
}
.notice-skeleton .notice-sk-line {
    height: 13px;
    width: 100%;
}
.notice-skeleton .notice-sk-line.short { width: 62%; }

/* 防御：加载态隐藏真实图标与正文容器（.notice-body 包裹标题/兜底/Markdown 正文）时，
   确保 [hidden] 一定生效。二者当前无 display 规则（UA 默认已隐藏），此处兜底防回归。 */
.notice-card .notice-icon[hidden],
.notice-card .notice-body[hidden] { display: none; }

/* Hero 操作按钮 */
.hero-actions {
    margin-top: 40px;
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.hero-actions .wonder-button,
.hero-actions .wonder-button-secondary {
    padding: 12px 32px;
    border-radius: var(--radius-pill);
    font-weight: 500;
}

/* 展示图：双图对比滑动分割（左下 → 右上对角线，可拖动）
   图片由用户手动放入 assets/showcase/（left.png 左下侧 / right.png 右上侧），
   未放图时回退为渐变 + 像素网格 + Logo 光晕背景。 */
.showcase {
    position: relative;
    margin-top: 128px;
    max-width: 72rem;
    margin-left: auto;
    margin-right: auto;
    aspect-ratio: 21 / 9;
    border: 1px solid var(--border-faint);
    border-radius: var(--radius);
    overflow: hidden;
    touch-action: none;
    user-select: none;
    cursor: ew-resize;
}

/* 背景兜底层（无图时可见） */
.showcase-bg {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(800px 400px at 50% -20%, var(--glow-violet), transparent 70%),
        linear-gradient(160deg, var(--surface-low) 0%, var(--surface) 55%, var(--surface-container) 100%);
}

.showcase-pattern {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(var(--grid-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(70% 90% at 50% 50%, #000 30%, transparent 100%);
    -webkit-mask-image: radial-gradient(70% 90% at 50% 50%, #000 30%, transparent 100%);
    pointer-events: none;
}

.showcase-glow {
    position: absolute;
    width: 420px;
    height: 420px;
    background: radial-gradient(circle, var(--accent-violet-line) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(60px);
    pointer-events: none;
}

.showcase-logo {
    position: relative;
    width: 120px;
    height: 120px;
    opacity: 0.9;
    filter: drop-shadow(0 0 40px var(--accent-violet-strong));
    transition: opacity 0.7s ease;
}

@media (min-width: 768px) {
    .showcase-logo {
        width: 160px;
        height: 160px;
    }
}

/* 两张对比图：铺满容器，右上图按竖直分割线裁切；整体轻微压暗增强层次 */
.showcase-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
    filter: brightness(0.8);
}

.showcase-img-a {
    z-index: 1;
}

.showcase-img-b {
    z-index: 2;
    clip-path: polygon(50% 0, 100% 0, 100% 100%, 50% 100%);
}

/* 竖直分割线（随手柄左右滑动） */
.showcase-divider {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    z-index: 3;
    width: 2px;
    background: var(--on-media-divider);
    box-shadow:
        0 0 0 1px var(--shadow-ring),
        0 0 14px var(--shadow-medium);
    transform: translateX(-50%);
    pointer-events: none;
}

/* 拖动手柄 */
.showcase-handle {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 4;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--cta-inverse-bg);
    color: var(--handle-fg);
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translate(-50%, -50%);
    cursor: ew-resize;
    box-shadow:
        0 0 0 3px var(--ring-soft),
        0 4px 14px var(--shadow-color);
    transition: transform 0.15s var(--ease);
}

.showcase-handle .material-symbols-outlined {
    font-size: 18px;
}

.showcase-handle:hover {
    transform: translate(-50%, -50%) scale(1.06);
}

.showcase.dragging .showcase-handle {
    transform: translate(-50%, -50%) scale(1.1);
}

/* 无图片时隐藏分割控件 */
.showcase:not(.has-imgs) .showcase-divider,
.showcase:not(.has-imgs) .showcase-handle {
    display: none;
}

/* ============ 区块标题（模板：居中） ============ */

.section-heading {
    text-align: center;
    margin-top: 96px;
    margin-bottom: 96px;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(1.875rem, 4vw, 2.25rem);
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.02em;
    margin-bottom: 16px;
}

.section-subtitle {
    color: var(--text-muted);
    font-weight: 300;
}

.docs-more {
    display: inline-block;
    margin-top: 16px;
    color: var(--primary);
    font-size: 14px;
    font-weight: 500;
}

.docs-more:hover {
    color: var(--primary-container);
}

/* ============ 平台卡（选择您的平台） ============ */

.dl-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
    max-width: 64rem;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .dl-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.dl-card {
    position: relative;
    padding: 40px;
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* 背景水印图标 */
.dl-card-watermark {
    position: absolute;
    right: -40px;
    top: -40px;
    opacity: 0.05;
    transition: opacity 0.5s ease;
    font-size: 200px;
    line-height: 1;
    pointer-events: none;
}

.dl-card:hover .dl-card-watermark {
    opacity: 0.1;
}

.dl-card-inner {
    position: relative;
    z-index: 1;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.dl-card-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius);
    background: var(--surface-glass-soft);
    border: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 32px;
}

.dl-card-icon .material-symbols-outlined {
    font-size: 24px;
    color: var(--text);
}

.dl-card h3 {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 12px;
}

.dl-card-desc {
    color: var(--text-muted);
    font-weight: 300;
    line-height: 1.7;
}

/* 规格行 */
.dl-card-specs {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--border-faint);
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.dl-card-specs > div {
    display: flex;
    flex-direction: column;
}

.dl-card-specs span {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.dl-card-specs strong {
    font-family: var(--font-mono);
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
}

/* 下载按钮 */
.dl-card-actions {
    margin-top: auto;
    padding-top: 40px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dl-btn-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

/* 按钮文字后的二维码小图标（assets/icons/qr-icon.svg，用户手动放置） */
.qr-badge {
    width: 14px;
    height: 14px;
    flex: 0 0 auto;
    opacity: 0.85;
    margin-left: 2px;
}

.dl-card-btn {
    width: 100%;
    border-radius: var(--radius);
    padding: 16px 24px;
    justify-content: space-between;
}

.dl-card-btn-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.dl-card h3 .badge {
    margin-left: 8px;
    vertical-align: middle;
}

.dl-card-btn .btn-ext {
    font-family: var(--font-mono);
    font-size: 12px;
    opacity: 0.6;
}

.dl-card-btn-sub {
    width: 100%;
    border-radius: var(--radius);
    padding: 12px 24px;
    justify-content: space-between;
}

/* ============ 推荐启动器（特性瓦片） ============ */

.launcher-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 48px;
    max-width: 72rem;
    margin: 0 auto;
}

@media (min-width: 640px) {
    .launcher-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .launcher-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.feature-tile {
    display: flex;
    flex-direction: column;
    gap: 24px;
    align-items: flex-start;
}

.feature-tile-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius);
    background: var(--surface-glass-soft);
    border: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 8px;
}

.feature-tile-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.feature-tile h4 {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 600;
    color: var(--text);
}

.feature-tile-platform {
    margin-top: -18px;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-muted);
}

.feature-tile p {
    color: var(--text-muted);
    font-weight: 300;
    line-height: 1.7;
    font-size: 15px;
}

.feature-tile-link {
    margin-top: auto;
    padding-top: 8px;
    color: var(--primary);
    font-size: 14px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.feature-tile-link:hover {
    color: var(--primary-container);
}

/* ============ 模组列表 ============ */

.mods-card {
    max-width: 72rem;
    margin: 0 auto;
    border-radius: var(--radius);
}

.mod-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 24px;
    border-bottom: 1px solid var(--border-faint);
    transition: background-color var(--transition-fast);
}

.mod-row:last-child {
    border-bottom: 0;
}

.mod-row:first-child {
    border-top-left-radius: var(--radius);
    border-top-right-radius: var(--radius);
}

.mod-row:last-child {
    border-bottom-left-radius: var(--radius);
    border-bottom-right-radius: var(--radius);
}

.mod-row:hover {
    background: var(--surface-glass-faint);
}

.mod-main {
    min-width: 0;
}

.mod-name {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
}

.mod-chips {
    margin-top: 10px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.mod-tip {
    margin-top: 10px;
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.7;
    max-width: 62ch;
}

.mod-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-shrink: 0;
}

.mod-actions .qr-wrapper {
    width: 100%;
}

/* 模组按钮：等宽通栏适配 */
.mod-actions .wonder-button,
.mod-actions .wonder-button-secondary {
    width: 100%;
    justify-content: center;
    padding: 10px 20px;
    border-radius: var(--radius-pill);
    min-height: 38px;
}

/* 标签 */
.chip {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-pill);
    background: var(--surface-glass);
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: var(--text-muted);
    white-space: nowrap;
}

.chip.fabric {
    color: var(--primary);
    border-color: var(--primary-edge-strong);
    background: var(--primary-soft);
}

.chip.forge {
    color: var(--accent-peach);
    border-color: var(--accent-peach-line);
    background: var(--accent-peach-bg);
}

/* 徽标（推荐 / 已停服） */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    border-radius: var(--radius-pill);
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.badge.recommend {
    background: var(--primary-bg);
    border: 1px solid var(--primary-edge-strongest);
    color: var(--primary);
}

.badge.archived {
    background: var(--status-danger-bg);
    border: 1px solid var(--status-danger-border);
    color: var(--status-danger);
}

/* ============ 文档 ============ */

.docs-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
    max-width: 72rem;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .docs-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.docs-card {
    padding: 32px;
    border-radius: var(--radius);
}

.docs-card h3 {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 600;
    color: var(--text);
}

.docs-card > p {
    margin-top: 8px;
    color: var(--text-muted);
    font-weight: 300;
    font-size: 14px;
}

.docs-links {
    margin-top: 20px;
    list-style: none;
}

.docs-links li {
    border-top: 1px solid var(--border-faint);
}

.docs-links li:first-child {
    border-top: 0;
}

.docs-links a {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: var(--text);
    font-size: 14px;
    font-weight: 500;
    transition: color var(--transition-fast);
}

.docs-links a:hover {
    color: var(--primary);
}

.docs-links a::after {
    content: "›";
    font-family: var(--font-mono);
    color: var(--text-muted);
    font-size: 16px;
    transition: transform var(--transition-fast), color var(--transition-fast);
}

.docs-links a:hover::after {
    color: var(--primary);
    transform: translateX(3px);
}

/* ============ FAQ（圆角卡片手风琴，v=35） ============
   用户：「常见问题里面的圆角怎么没了」—— 这一块原来是**发丝分隔**样式（.faq-item 只有 border-bottom、
   border-radius: 0，从初始化提交起就没变过），按用户选择改成**圆角卡片**：每项一张卡、卡间留缝、
   展开态用略深的底 + 更清楚的描边。卡片外观与站点其它卡片（--radius-sm + --border-faint +
   --surface-glass-faint）同一套 token，明暗两套自动跟随。 */

.faq-section {
    max-width: 48rem;
    margin: 0 auto;
    /* 卡片之间靠 gap 分隔，不再用发丝线；顶部也不留分隔线（原来那条 border-top 已去掉） */
    display: grid;
    gap: 10px;
}

.faq-item {
    border: 1px solid var(--border-faint);
    border-radius: var(--radius);
    background: var(--surface-glass-faint);
    /* 展开时内容是圆角内的直角色块，裁一下才不会从圆角处溢出来 */
    overflow: hidden;
    transition: background-color var(--transition-fast), border-color var(--transition-fast);
}

.faq-item:hover {
    border-color: var(--border-subtle);
}

.faq-item.active {
    background: var(--surface-glass-soft);
    border-color: var(--border-subtle);
}

.faq-question {
    width: 100%;
    min-height: 60px;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    color: var(--text);
    font-size: 15px;
    font-weight: 500;
    text-align: left;
    transition: color var(--transition-fast);
}

.faq-question:hover {
    color: var(--primary);
}

.faq-question::after {
    content: "+";
    width: 28px;
    height: 28px;
    display: inline-flex;
    flex: 0 0 28px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-pill);
    color: var(--primary);
    font-family: var(--font-mono);
    font-size: 16px;
    font-weight: 500;
    /* 背景/字色与旋转统一 300ms 同步过渡：若使用 fast(150ms)，
       变色先于旋转完成，收缩/展开瞬间会插值出"深紫底"的中间脏色 */
    transition: transform var(--transition), background-color var(--transition), color var(--transition);
}

.faq-item.active .faq-question::after {
    background: var(--primary);
    color: var(--on-accent);
    transform: rotate(45deg);
}

/* 答案内容层：由 Utils.toggleFaq 量取真实高度后做精确的 max-height 动画
   （收起 = 0；展开 = 实际高度 px，动画结束后解除限制避免内容被裁剪）。
   注意：active 状态不再设置 max-height: none —— none 与 px 不可插值，
   若在动画期间出现会跳过/短路过渡（先瞬间全显再停顿）；展开高度全程由
   JS 内联 px 值控制，none 仅在动画结束（360ms）后由 JS 写入。
   曲线用 easeOutCubic（起步即刻可见地动）而非全局 --ease(0.4,0,0.2,1)：
   后者起步速度为 0，展开会先 "停顿" ~80ms 再加速，观感像卡一步。
   padding-bottom 与 max-height 同曲线过渡：收起后不残留 20px 空隙。 */
.faq-body {
    max-height: 0;
    overflow: hidden;
    padding: 0 16px 0;
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.75;
    transition: max-height 300ms cubic-bezier(0.215, 0.61, 0.355, 1),
                padding-bottom 300ms cubic-bezier(0.215, 0.61, 0.355, 1);
}

.faq-item.active .faq-body {
    padding-bottom: 20px;
}

/* FAQ 答案中的命令代码 */
.faq-answer code {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--primary);
    background: var(--primary-soft);
    border: 1px solid var(--primary-edge);
    padding: 1px 6px;
    border-radius: 4px;
    white-space: nowrap;
}

/* FAQ 答案中的链接（如站内锚点「必要模组」） */
.faq-answer a {
    color: var(--primary);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: var(--primary-edge-strong);
    transition: text-decoration-color var(--transition-fast), color var(--transition-fast);
}

.faq-answer a:hover {
    color: var(--text);
    text-decoration-color: var(--primary);
}

/* FAQ 答案：密码重置布局（自助重置流程 / 邮件模板块） */
.faq-answer .faq-flow > p {
    margin: 4px 0 6px;
}

.faq-answer .faq-flow-title {
    margin: 14px 0 6px;
    color: var(--text);
    font-weight: 600;
}

.faq-answer .faq-flow-title:first-child {
    margin-top: 0;
}

.faq-answer ol.faq-steps {
    margin: 6px 0 8px;
    padding-left: 22px;
    list-style: decimal;
}

.faq-answer ol.faq-steps li {
    margin: 2px 0;
}

.faq-answer ol.faq-steps li::marker {
    color: var(--primary);
    font-weight: 600;
}

.faq-answer .faq-fields {
    margin: 6px 0 8px;
    padding: 10px 12px;
    border: 1px solid var(--primary-edge-soft);
    border-radius: var(--radius-sm);
    background: var(--primary-faint);
    font-size: 13px;
    line-height: 1.7;
}

.faq-answer .faq-fields p {
    margin: 2px 0;
}

.faq-answer .faq-fields .faq-field-label {
    color: var(--text);
    font-weight: 600;
}

/* 重置流程中的长命令允许换行，避免小屏溢出 */
.faq-answer .faq-flow code {
    white-space: normal;
    overflow-wrap: anywhere;
}

/* ============ 社区 CTA ============ */

.cta-section {
    max-width: 64rem;
    margin: 64px auto;
}

.cta-card {
    position: relative;
    border-radius: 3rem;
    padding: 64px;
    overflow: hidden;
    text-align: center;
}

.cta-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, var(--surface-glass-soft), transparent);
    pointer-events: none;
}

.cta-inner {
    position: relative;
    z-index: 1;
}

.cta-inner h2 {
    font-family: var(--font-display);
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.02em;
}

.cta-inner p {
    max-width: 32rem;
    margin: 16px auto 0;
    color: var(--text-muted);
    font-weight: 300;
    font-size: 18px;
    line-height: 1.7;
}

.cta-actions {
    margin-top: 32px;
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
}

.cta-actions .wonder-button,
.cta-actions .wonder-button-secondary {
    padding: 16px 32px;
    border-radius: var(--radius-pill);
}

/* ============ 广告位（无广告时自动隐藏） ============ */

.ad-container {
    min-height: 110px;
    margin-top: 48px;
    margin-bottom: 48px;
    padding: 28px 16px 12px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--translate-card);
    border: 1px solid var(--border-faint);
    border-radius: var(--radius);
}

.ad-container::before {
    content: "广告 Advertisement";
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-faint);
}

/* 未填充时隐藏占位样式（容器保留保证 AdSense 渲染，由 Ads.js 最终整块隐藏） */
.ad-container:not(:has(.adsbygoogle[data-ad-status="filled"])) {
    border: none;
    background: transparent;
}

.ad-container:not(:has(.adsbygoogle[data-ad-status="filled"]))::before {
    content: none;
}

.ad-container ins {
    display: block;
    width: 100%;
    max-width: 100% !important;
    margin: 0 auto;
    text-align: center;
}

.ad-container ins,
.ad-container ins * {
    max-width: 100% !important;
}

.ad-container[hidden] {
    display: none !important;
}

/* ============ 站点轮播广告（横幅下方，js/site-promos-config.js + js/modules/site-promos.js） ============
   与横幅（.bt-banners）同宽（满宽）、紧跟横幅下方；多张轮播，高度按固定横幅比例自适应。
   广告内容国内外都能显示（自托管图片，不依赖 Google 网络）。 */
.bt-ad-carousel {
    position: relative;
    z-index: 40;                 /* 与 .bt-banners 同层，不抢 .main(45)/导航栏(70) */
    width: 100%;
    margin: 0;
    background: var(--surface-low);   /* 跟随明暗主题的底色（亮 #f2f2f4 / 暗 #1c1b1b） */
    border-bottom: 1px solid var(--border-faint);
}

.bt-ad-viewport {
    position: relative;
    width: 100%;
    aspect-ratio: 1200 / 200;    /* 扁横幅比例（6:1）：高 = 宽 / 6，随宽度自适应且不占屏 */
    overflow: hidden;
}

.bt-ad-track {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform .5s cubic-bezier(.4, 0, .2, 1);
}

.bt-ad-slide {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    display: block;
    margin: 0;
}

.bt-ad-slide img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;           /* 填满 + 裁剪边缘，任何尺寸的图都铺成统一横幅 */
}

/* 无图占位块：全部走主题变量（明暗自适应），无任何描边 */
.bt-ad-placeholder {
    display: flex;               /* 覆盖 .bt-ad-slide 的 display:block */
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: var(--surface-glass-soft);
    color: var(--text-muted);
    cursor: default;
}

.bt-ad-ph-title {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-muted);
}

.bt-ad-ph-sub {
    font-size: 12.5px;
    color: var(--text-faint);
}

/* 切换点：整条全宽贴底，点与点之外的空白也是「安全区」——
   点击落在 dots 容器上（它不是链接），绝不会穿透到下面的广告链接造成误触跳转 */
.bt-ad-dots {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 12px 0;
    z-index: 2;
}

.bt-ad-dot {
    width: 8px;
    height: 8px;
    padding: 0;
    border: none;
    border-radius: 999px;
    background: rgba(255, 255, 255, .4);
    cursor: pointer;
    transition: background .2s ease, transform .2s ease;
}

.bt-ad-dot.is-active {
    background: #fff;
    transform: scale(1.25);
}

/* 页面末尾 AdSense 位（国际站，index.html 的 #ad-footer-slot）：
   复用 .section 的内容区宽度（max-width + 左右内边距），广告与正文对齐、两侧留空隙；
   自身不加背景色（透出页面底色），明暗主题天然一致。 */
.ad-slot-footer {
    display: flex;
    align-items: center;
    min-height: 90px;
}

.ad-slot-footer ins {
    width: 100%;
    max-width: 100%;
}

.ad-slot-footer[hidden] {
    display: none !important;
}

/* ============ Cookie / 本地存储同意条（国际站首次访问时出现一次） ============
   为什么长这样：它必须"看得见但不挡路" —— 固定在底部、不遮内容、两个按钮一屏可选完。
   只在**国际站且用户还没做过选择**时出现（见 js/modules/cookie-consent.js）；国内镜像不加载广告，
   所以永远不会弹。 */
.bt-consent {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 900;
    display: flex;
    justify-content: center;
    pointer-events: none;
}

.bt-consent[hidden] { display: none; }

.bt-consent-in {
    pointer-events: auto;
    width: min(100%, 880px);
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    padding: 14px 16px;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius);
    background: var(--surface-container);
    box-shadow: 0 10px 30px var(--shadow-soft, rgba(0, 0, 0, .28));
    animation: bt-consent-in 220ms var(--ease-out, ease-out);
}

@keyframes bt-consent-in {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: none; }
}

.bt-consent-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1 1 380px;
    min-width: 0;
    font-size: 13px;
    line-height: 1.7;
    color: var(--text-muted);
}

.bt-consent-text b {
    font-size: 14px;
    color: var(--text);
}

.bt-consent-link {
    color: var(--primary);
    font-size: 12.5px;
    text-decoration: none;
}

.bt-consent-link:hover { text-decoration: underline; }

.bt-consent-acts {
    display: flex;
    gap: 8px;
    flex: 0 0 auto;
    margin-left: auto;
}

.bt-consent-btn {
    padding: 8px 16px;
    border: 1px solid var(--border-visible);
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text);
    font-family: inherit;
    font-size: 13.5px;
    cursor: pointer;
    white-space: nowrap;
}

.bt-consent-btn:hover { background: var(--surface-glass-hover); }

.bt-consent-btn.is-primary {
    border-color: transparent;
    background: var(--surface-inverse, var(--primary));
    color: var(--accent-ink, #fff);
    font-weight: 600;
}

@media (max-width: 560px) {
    .bt-consent-acts { width: 100%; margin-left: 0; }
    .bt-consent-btn { flex: 1 1 0; text-align: center; }
}

/* ============ 下载 / 打开确认弹窗 ============ */

.dl-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: var(--scrim-strong);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

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

.dl-dialog {
    width: min(100%, 460px);
    padding: 24px;
    background: var(--surface-container);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius);
    box-shadow: 0 24px 64px var(--shadow-strong);
    animation: dl-in 180ms var(--ease-out);
}

@keyframes dl-in {
    from { opacity: 0; transform: translateY(10px) scale(0.98); }
    to { opacity: 1; transform: none; }
}

.dl-head {
    display: flex;
    align-items: center;
    gap: 12px;
}

.dl-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    background: var(--primary-bg);
    color: var(--primary);
    font-size: 18px;
}

.dl-icon .material-symbols-outlined {
    font-size: 20px;
}

.dl-title {
    font-family: var(--font-display);
    font-size: 17px;
    font-weight: 600;
    color: var(--text);
}

.dl-desc {
    margin-top: 14px;
    color: var(--text-muted);
    font-size: 14px;
}

.dl-url {
    margin-top: 12px;
    padding: 10px 14px;
    background: var(--surface);
    border: 1px solid var(--border-faint);
    border-radius: var(--radius-sm);
}

.dl-url code {
    font-family: var(--font-mono);
    font-size: 12px;
    line-height: 1.5;
    color: var(--text-muted);
    word-break: break-all;
    user-select: all;
}

/* 弹窗内二维码：flex 居中，白底在图片上（与二维码 1:1） */
.dl-qr {
    margin-top: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.dl-qr img {
    width: 180px;
    height: 180px;
    background: var(--qr-bg);
    border-radius: var(--radius-sm);
    image-rendering: pixelated;
}

.dl-actions {
    margin-top: 20px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

body.no-scroll {
    overflow: hidden;
}

/* 弹窗内按钮（wonder-button 样式） */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 40px;
    padding: 0 16px;
    border-radius: var(--radius-pill);
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn .icon {
    width: 14px;
    height: 14px;
    flex: 0 0 auto;
}

.btn-primary {
    background: var(--primary);
    color: var(--on-accent);
}

.btn-primary:hover {
    background: var(--primary-container);
    color: var(--on-accent);
}

.btn-secondary {
    background: var(--surface-glass-soft);
    color: var(--text);
    border: 1px solid var(--border-subtle);
}

.btn-secondary:hover {
    background: var(--surface-glass-strong);
    color: var(--text);
}

.btn-sm {
    min-height: 34px;
    padding: 0 14px;
    font-size: 13px;
}

/* ============ Toast ============ */

.toast {
    position: fixed;
    top: 80px;
    right: 24px;
    z-index: 1000;
    max-width: min(360px, calc(100vw - 48px));
    padding: 12px 18px;
    border: 1px solid var(--border-subtle);
    border-left: 3px solid var(--primary);
    border-radius: var(--radius-sm);
    background: var(--surface-container);
    color: var(--text);
    box-shadow: 0 16px 48px var(--shadow-strong);
    font-size: 14px;
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
    transition: opacity var(--transition), transform var(--transition);
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

/* ============ 已停服提示 ============ */

.archived-note {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border: 1px dashed var(--border-subtle);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.04em;
}

/* ============ 服务器状态卡片 ============ */

.status-card {
    max-width: 72rem;
    margin: 0 auto;
    padding: 28px;
    border-radius: var(--radius);
    text-align: left;
}

/* 状态卡片不需要 hover 上移（覆盖 wonder-card 的悬浮效果） */
.status-card:hover {
    transform: none;
    background: var(--translate-card);
    border-color: var(--border-faint);
}

.status-loading {
    text-align: center;
    color: var(--text-muted);
    padding: 24px 0;
}

/* 骨架屏：服务器状态占位（结构对齐真实 status-head / status-meta） */
.status-skeleton {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.status-skel-badge {
    width: 110px;
    height: 30px;
    border-radius: var(--radius-pill);
}

.status-skel-meta {
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
    flex: 1 1 auto;
}

.status-skel-cell {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 90px;
}

.status-skel-cell .sk-line { height: 11px; width: 52px; }
.status-skel-cell .sk-value { height: 18px; width: 78px; }

.status-head {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    border-radius: var(--radius-pill);
    font-size: 13px;
    font-weight: 600;
    border: 1px solid transparent;
}

.status-badge .status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
    animation: status-pulse 2s ease-in-out infinite;
}

@keyframes status-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.status-badge.state-online {
    color: var(--status-ok);
    background: var(--status-ok-bg);
    border-color: var(--status-ok-border);
}

.status-badge.state-offline {
    color: var(--status-danger);
    background: var(--status-danger-bg);
    border-color: var(--status-danger-border);
}

/* 手动模式「维护中」：琥珀色 */
.status-badge.state-maintenance {
    color: var(--status-warn);
    background: var(--status-warn-bg);
    border-color: var(--status-warn-border);
}

/* 手动模式说明：占满 meta 区，正文样式（覆盖 .status-cell strong 的等宽小字） */
.status-note-cell {
    flex: 1 1 220px;
    min-width: 160px;
}

.status-cell strong.status-note-text {
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.65;
    white-space: normal;
    word-break: break-word;
    color: var(--text-on-surface);
}

.status-meta {
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
    flex: 1 1 auto;
}

.status-cell {
    display: flex;
    flex-direction: column;
}

.status-cell span {
    font-size: 11px;
    color: var(--text-low);
    margin-bottom: 3px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.status-cell strong {
    font-family: var(--font-mono);
    font-size: 15px;
    color: var(--text);
}

.status-cell .ping-good { color: var(--status-ok); }
.status-cell .ping-mid  { color: var(--status-warn); }
.status-cell .ping-bad  { color: var(--status-danger); }
.status-cell .ping-na   { color: var(--text-low); }

.status-refresh {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 3px;
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
}

.status-refresh .status-count {
    font-family: var(--font-mono);
    color: var(--primary);
    font-weight: 600;
}

.status-players {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border-faint);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
}

@media (max-width: 768px) {
    .status-players {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

.status-group h4 {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.status-group h4 .material-symbols-outlined {
    font-size: 16px;
}

.status-group.is-bots h4 {
    color: var(--accent-lilac);
}

.status-empty {
    font-size: 13px;
    color: var(--text-low);
    padding: 12px;
    border: 1px dashed var(--border-subtle);
    border-radius: var(--radius-sm);
    text-align: center;
}

/* 离线：合并成单条提示 */
.status-offline-hint {
    margin-top: 24px;
    padding: 28px 16px;
    border: 1px dashed var(--border-subtle);
    border-radius: var(--radius-sm);
    text-align: center;
    font-size: 14px;
    color: var(--text-low);
}

.player-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
    gap: 10px;
}

.player-slot {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 8px 6px 6px;
    border-radius: 10px;
    border: 1px solid var(--border-subtle);
    background: var(--surface);
    transition: border-color var(--transition-fast), transform var(--transition-fast);
}

.player-slot:hover {
    border-color: var(--border-strong);
    transform: translateY(-2px);
}

.player-slot.is-bot {
    border-color: var(--accent-alt-line);
    background: var(--accent-alt-bg);
}

.player-avatar {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid var(--border-faint);
    background:
        linear-gradient(90deg, var(--surface-glass) 25%, var(--skeleton-sheen) 50%, var(--surface-glass) 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.4s ease-in-out infinite;
}

@keyframes skeleton-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.player-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    image-rendering: pixelated;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.player-avatar img.loaded {
    opacity: 1;
}

.player-name {
    max-width: 100%;
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.player-slot.is-bot .player-name {
    color: var(--accent-lilac);
}

.status-note {
    margin-top: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    line-height: 1.6;
    color: var(--text-low);
}

.status-note .material-symbols-outlined {
    color: var(--primary);
    flex: 0 0 auto;
}

/* ============ 滚动显现（js/modules/effects.js 控制） ============
   ⚠ 极性：默认全部可见 —— 这里没有任何「无条件隐藏」的规则。
   待入场态必须同时满足两个由 JS 制造的条件：
     · html.js-reveal —— effects.js 在首帧前给 <html> 加上的总开关（没有 JS / JS 失败 /
       prefers-reduced-motion: reduce 时都不存在，所以内容一律正常显示）；
     · .reveal       —— effects.js 只加给「首帧时整体位于视口下方」的元素。
   首屏元素（以及刷新时视口上方的元素）永远不带 .reveal，
   因此从第 0 帧起 opacity 就是 1、transform 就是 none。 */
html.js-reveal .reveal {
    will-change: opacity, transform;
}

html.js-reveal .reveal:not(.in) {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.5s ease, transform 0.6s var(--ease-out);
}

html.js-reveal .reveal.in {
    opacity: 1;
    transform: none;
}

/* ============ 回到顶部 ============ */

.to-top {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 900;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-subtle);
    border-radius: 50%;
    background: var(--surface-float);
    color: var(--text-muted);
    box-shadow: 0 8px 24px var(--shadow-color);
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
    transition: opacity var(--transition), transform var(--transition), color var(--transition-fast), border-color var(--transition-fast);
}

.to-top.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.to-top:hover {
    color: var(--primary);
    border-color: var(--primary-container);
}

/* ============================================================
   首页公告（后台 Markdown 渲染结果）
   ============================================================ */
.site-notice-md {
    margin-top: 8px;
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.7;
    word-break: break-word;
}

.site-notice-md > *:first-child { margin-top: 0; }
.site-notice-md > *:last-child { margin-bottom: 0; }

.site-notice-md h1,
.site-notice-md h2,
.site-notice-md h3,
.site-notice-md h4,
.site-notice-md h5,
.site-notice-md h6 {
    margin: 18px 0 8px;
    color: var(--text);
    font-weight: 700;
    line-height: 1.4;
}

.site-notice-md h1 { font-size: 20px; }
.site-notice-md h2 { font-size: 18px; }
.site-notice-md h3 { font-size: 16px; }
.site-notice-md h4 { font-size: 15px; }
.site-notice-md h5 { font-size: 14px; }
.site-notice-md h6 { font-size: 13px; }

.site-notice-md p {
    margin: 10px 0;
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.7;
}

.site-notice-md strong { color: var(--text); font-weight: 700; }
.site-notice-md em { font-style: italic; }
.site-notice-md del { opacity: 0.65; }

.site-notice-md a {
    color: var(--primary);
    text-decoration: none;
    border-bottom: 1px solid var(--accent-violet-line);
}

.site-notice-md a:hover { color: var(--primary-container); }

.site-notice-md ul,
.site-notice-md ol {
    margin: 10px 0;
    padding-left: 22px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.site-notice-md ul { list-style: disc; }
.site-notice-md ol { list-style: decimal; }

.site-notice-md li {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.7;
}

.site-notice-md blockquote {
    margin: 12px 0;
    padding: 8px 14px;
    border-left: 3px solid var(--primary);
    background: var(--accent-violet-bg);
    border-radius: 0 8px 8px 0;
}

.site-notice-md blockquote p { margin: 4px 0; }

.site-notice-md hr {
    margin: 18px 0;
    border: 0;
    border-top: 1px solid var(--border-subtle);
}

.site-notice-md code {
    padding: 2px 6px;
    border-radius: 5px;
    background: var(--surface-code);
    font-family: var(--font-mono);
    font-size: 12.5px;
    color: var(--primary);
}

.site-notice-md pre {
    margin: 12px 0;
    padding: 12px 14px;
    border-radius: 8px;
    background: var(--surface-sunken);
    border: 1px solid var(--border-subtle);
    overflow-x: auto;
}

.site-notice-md pre code {
    padding: 0;
    background: transparent;
    color: var(--text);
    font-size: 12.5px;
    line-height: 1.65;
}

.site-notice-md img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 10px 0;
}

/* 后台把整合包全部下架（维护中）或尚未发布时显示 —— 明确告知，而不是留白让人以为页面坏了 */
.dl-empty {
    grid-column: 1 / -1;
    margin: 8px 0; padding: 40px 20px;
    text-align: center;
    font-size: 14px; line-height: 1.8;
    color: var(--text-muted);
    border: 1px dashed var(--border-faint);
    border-radius: 14px;
    background: var(--surface-glass-faint);
}

/* 下载区骨架屏：数据落定前的占位，避免静态内容闪一下再被替换（FOUC）。
   尺寸刻意贴近真实卡片，替换时不会跳高度。 */
.dl-card-skeleton { pointer-events: none; }
.dl-skel-icon { width: 48px; height: 48px; border-radius: 12px; margin-bottom: 14px; }
.dl-skel-title { width: 45%; height: 20px; border-radius: 6px; margin-bottom: 14px; }
.dl-skel-line { width: 100%; height: 12px; border-radius: 6px; margin-bottom: 8px; }
.dl-skel-line.short { width: 65%; }
.dl-skel-btn { width: 140px; height: 40px; border-radius: 10px; margin-top: 16px; }
/* ============ 亮色主题：二维码徽标 + 首屏 Logo（Phase 4，只在亮色生效） ============
   ② 二维码徽标（.qr-badge）选型必须跟着**按钮底色**走，而底色本身跟着主题反转：
      亮色下 --cta-inverse-bg = #14141a（.wonder-button 变深底）、--surface-glass-soft = rgba(20,20,26,.05)
      （.wonder-button-secondary 变浅底）→ 深色版图标（qr-icon-dark.svg，#2c2c2c）在深底上、白色版
      （qr-icon-light.svg）在浅底上都等于看不见 ✗。
      这里用 filter 而不是换 src，两个理由：
        · index.html / activity.html 的社区 CTA 里各有一枚**写死在 HTML 里**的徽标（renderers.js 管不到）；
        · 主题切换时 CSS 立即生效 —— 不需要监听 theme-change、不需要重渲染（徽标是插入一次就固定的）。
      brightness(0) = 纯黑，brightness(0) invert(1) = 纯白：图标本身是单色剪影，压色不会丢细节。
   ③ 首屏展示区的大 Logo（.showcase-logo）也写死在 index.html 里，亮色下换成浅色版：
      与 nav 的两张 <img> 用同一张 logo-light.png，box 由 CSS 固定（120/160px）→ 切换无布局跳动。 */
:root[data-theme="light"] .wonder-button .qr-badge {
    filter: brightness(0) invert(1);
}

:root[data-theme="light"] .wonder-button-secondary .qr-badge {
    filter: brightness(0);
}

:root[data-theme="light"] .showcase-logo {
    content: url("../assets/logo-light.png");
}

