/* ==========================================================================
   Muse Invite — 主样式表
   纯 CSS，无框架；移动优先 + 自适应 PC / H5
   ========================================================================== */

/* ---------- 设计变量 ---------- */
:root {
    --brand-500: #4f46e5;
    --brand-600: #4338ca;
    --brand-400: #6366f1;
    --brand-050: #eef2ff;

    --ok-500: #16a34a;
    --ok-050: #ecfdf5;
    --no-500: #dc2626;
    --no-050: #fef2f2;

    --bg: #f6f7fb;
    --bg-alt: #ffffff;
    --surface: #ffffff;
    --surface-2: #f9fafb;
    --border: #e5e7eb;
    --border-strong: #d1d5db;

    --text: #111827;
    --text-muted: #5b6472;
    --text-soft: #8b93a1;

    --radius-sm: 10px;
    --radius: 16px;
    --radius-lg: 22px;

    --shadow-sm: 0 1px 2px rgba(17, 24, 39, .06);
    --shadow: 0 4px 16px rgba(17, 24, 39, .07);
    --shadow-lg: 0 18px 48px rgba(17, 24, 39, .12);

    --maxw: 1120px;
    --header-h: 64px;

    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
            "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", Arial, sans-serif;
    --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0b0d13;
        --bg-alt: #12141c;
        --surface: #161923;
        --surface-2: #1c202c;
        --border: #262b39;
        --border-strong: #333a4d;

        --text: #eef1f7;
        --text-muted: #a4adbe;
        --text-soft: #7d8698;

        --brand-050: #1e1b4b88;
        --ok-050: #052e1c;
        --no-050: #2a0f10;

        --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
        --shadow: 0 4px 16px rgba(0, 0, 0, .45);
        --shadow-lg: 0 18px 48px rgba(0, 0, 0, .55);
    }
}

/* ---------- 基础 ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
    margin: 0;
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.65;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

h1, h2, h3, h4 { margin: 0; line-height: 1.25; font-weight: 700; letter-spacing: -.015em; }
p { margin: 0; }
img, svg { max-width: 100%; }
a { color: var(--brand-500); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
    width: 100%;
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 20px;
}
.container--narrow { max-width: 780px; }

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--brand-500);
    color: #fff;
    padding: 10px 16px;
    border-radius: 0 0 var(--radius-sm) 0;
    z-index: 999;
}
.skip-link:focus { left: 0; }

:focus-visible {
    outline: 2px solid var(--brand-500);
    outline-offset: 2px;
    border-radius: 6px;
}

/* ---------- 按钮 ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 20px;
    border-radius: 999px;
    border: 1px solid transparent;
    font: inherit;
    font-weight: 600;
    font-size: 15px;
    line-height: 1.2;
    cursor: pointer;
    text-decoration: none !important;
    transition: transform .12s ease, box-shadow .18s ease, background .18s ease, color .18s ease, border-color .18s ease;
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: translateY(1px) scale(.995); }
.btn[disabled], .btn.is-busy { opacity: .6; pointer-events: none; }

.btn-primary {
    background: linear-gradient(135deg, var(--brand-400), var(--brand-600));
    color: #fff;
    box-shadow: 0 6px 18px rgba(79, 70, 229, .28);
}
.btn-primary:hover { box-shadow: 0 10px 26px rgba(79, 70, 229, .36); text-decoration: none; }

.btn-outline {
    background: var(--surface);
    color: var(--text);
    border-color: var(--border-strong);
}
.btn-outline:hover { border-color: var(--brand-400); color: var(--brand-600); }

.btn-ok {
    background: var(--ok-050);
    color: var(--ok-500);
    border-color: transparent;
}
.btn-ok:hover { background: var(--ok-500); color: #fff; }

.btn-no {
    background: var(--no-050);
    color: var(--no-500);
    border-color: transparent;
}
.btn-no:hover { background: var(--no-500); color: #fff; }

.btn-lg { padding: 14px 26px; font-size: 16px; }

/* ---------- 头部 ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg);
    background: color-mix(in srgb, var(--bg) 82%, transparent);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid transparent;
    transition: border-color .2s ease, background .2s ease;
}
.site-header.is-stuck { border-bottom-color: var(--border); }

.header-inner {
    height: var(--header-h);
    display: flex;
    align-items: center;
    gap: 16px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: var(--text);
    font-weight: 800;
    font-size: 17px;
    letter-spacing: -.02em;
    text-decoration: none !important;
    flex-shrink: 0;
}
.brand-mark {
    width: 32px; height: 32px;
    display: grid; place-items: center;
    border-radius: 9px;
    background: linear-gradient(135deg, var(--brand-400), var(--brand-600));
    color: #fff;
    box-shadow: 0 4px 12px rgba(79, 70, 229, .3);
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
}
.site-nav a {
    padding: 6px 12px;
    border-radius: 999px;
    color: var(--text-muted);
    font-size: 13.5px;
    font-weight: 500;
    text-decoration: none;
    transition: color .15s, background .15s;
}
.site-nav a:hover { color: var(--text); background: var(--surface); text-decoration: none; }
.site-nav a[aria-current="page"] { color: var(--brand-600); background: var(--brand-050); }

.lang-switch { position: relative; margin-left: auto; }
.site-nav + .lang-switch { margin-left: 8px; }
.lang-switch > summary {
    list-style: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border-radius: 999px;
    color: var(--text-muted);
    font-size: 13.5px;
    font-weight: 500;
    user-select: none;
    transition: color .15s, background .15s;
}
.lang-switch > summary::-webkit-details-marker { display: none; }
.lang-switch > summary:hover { color: var(--text); background: var(--surface); }
.lang-switch[open] > summary { color: var(--brand-600); background: var(--brand-050); }
.lang-switch .chev { transition: transform .18s ease; }
.lang-switch[open] .chev { transform: rotate(180deg); }

.lang-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    min-width: 190px;
    margin: 0;
    padding: 6px;
    list-style: none;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
}
.lang-menu a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 12px;
    border-radius: 10px;
    color: var(--text);
    font-size: 15px;
    text-decoration: none;
}
.lang-menu a:hover { background: var(--surface-2); text-decoration: none; }
.lang-menu a[aria-current="true"] { background: var(--brand-050); color: var(--brand-600); font-weight: 700; }
.lang-code { font-size: 11px; font-weight: 700; color: var(--text-soft); letter-spacing: .06em; }

.nav-toggle {
    display: none;
    width: 36px; height: 36px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: var(--surface);
    padding: 9px;
    cursor: pointer;
    flex-direction: column;
    justify-content: space-between;
}
.nav-toggle span { display: block; height: 2px; background: var(--text); border-radius: 2px; }

/* 移动端：导航项少，直接平铺展示，去掉汉堡菜单 */
@media (max-width: 760px) {
    .nav-toggle { display: none; }
    .site-nav { display: flex; }
}

/* 小屏：紧凑头部，站点名缩小而非隐藏，语言按钮只留文字 */
@media (max-width: 480px) {
    .header-inner { gap: 8px; }
    .brand { gap: 7px; font-size: 15px; }
    .brand-mark { width: 28px; height: 28px; border-radius: 8px; }
    .brand-mark svg { width: 19px; height: 19px; }
    .lang-switch > summary { padding: 6px 10px; font-size: 13px; gap: 4px; }
    .lang-switch > summary svg[width="15"] { display: none; }
    .site-nav a { padding: 6px 8px; font-size: 12.5px; }
}

/* ---------- Hero ---------- */
.hero {
    padding: 56px 0 40px;
    background:
        radial-gradient(900px 420px at 50% -160px, rgba(99, 102, 241, .16), transparent 70%),
        var(--bg);
    text-align: center;
}
.hero-inner { display: flex; flex-direction: column; align-items: center; gap: 18px; }

.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 999px;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
    box-shadow: var(--shadow-sm);
}
.badge-dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: var(--ok-500);
    box-shadow: 0 0 0 4px rgba(22, 163, 74, .16);
}

.hero-title {
    font-size: clamp(30px, 6.4vw, 54px);
    max-width: 16em;
    letter-spacing: -.03em;
    text-wrap: balance;
}
.hero-subtitle {
    max-width: 40em;
    color: var(--text-muted);
    font-size: clamp(15px, 2.4vw, 18px);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 4px; }
.hero-note {
    display: inline-flex; align-items: center; gap: 7px;
    color: var(--text-soft); font-size: 14px; margin-top: 2px;
}
.hero-note svg { color: var(--ok-500); }

/* ---------- 统计 ---------- */
.stats { padding: 8px 0 12px; }
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 18px;
    box-shadow: var(--shadow-sm);
}
.stat { text-align: center; padding: 6px 4px; }
.stat-value {
    display: block;
    font-size: clamp(22px, 4vw, 30px);
    font-weight: 800;
    letter-spacing: -.03em;
    font-variant-numeric: tabular-nums;
    color: var(--brand-600);
}
.stat-value--sm { font-size: 15px; font-weight: 700; color: var(--text-muted); }
.stat-label { display: block; font-size: 12.5px; color: var(--text-soft); margin-top: 4px; }

@media (min-width: 641px) {
    .stats-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ---------- 区块 ---------- */
.section { padding: 56px 0; }
.section--alt { background: var(--bg-alt); border-block: 1px solid var(--border); }

.section-head { text-align: center; margin-bottom: 30px; }
.section-head--left { text-align: left; }
.section-title { font-size: clamp(23px, 4vw, 33px); letter-spacing: -.025em; }
.section-subtitle { color: var(--text-muted); margin-top: 10px; font-size: 16px; }

/* ---------- 邀请码池（统计头 + 标签页 + 码卡列表） ---------- */
.container--pool { max-width: 780px; }
.pool { padding: 10px 0 6px; }

.pool-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-soft);
    display: inline-block;
    flex-shrink: 0;
}
.pool-dot--ok {
    background: var(--ok-500);
    box-shadow: 0 0 0 3px rgba(22, 163, 74, .14);
}

/* 统计头卡 */
.pool-hero {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 22px 24px 20px;
    box-shadow: var(--shadow-sm);
}
.pool-hero-label { font-size: 14px; color: var(--text-muted); }
.pool-hero-value {
    font-size: clamp(38px, 9vw, 54px);
    font-weight: 800;
    letter-spacing: -.03em;
    line-height: 1.15;
    font-variant-numeric: tabular-nums;
    color: var(--text);
}
.pool-hero-sub {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 7px;
    font-size: 13.5px;
    color: var(--text-soft);
    margin-top: 4px;
}
.pool-hero-sub b { color: var(--text-muted); font-weight: 700; font-variant-numeric: tabular-nums; }

/* 标签栏 */
.pool-tabs {
    display: flex;
    gap: 4px;
    margin: 18px 0 14px;
    padding: 5px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}
.pool-tab {
    flex: 1;
    padding: 9px 10px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--text-muted);
    font: inherit;
    font-size: 14.5px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background .16s, color .16s;
    -webkit-tap-highlight-color: transparent;
}
.pool-tab:hover { color: var(--text); }
.pool-tab[aria-selected="true"] {
    background: var(--brand-050);
    color: var(--brand-600);
}

/* 每人随机批次说明 */
.pool-batch-note {
    margin: -6px 2px 0;
    color: var(--text-muted);
    font-size: 12.5px;
}

/* 码卡列表 */
.pool-list { display: grid; gap: 12px; }

.pool-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 18px 20px;
    box-shadow: var(--shadow-sm);
    transition: border-color .16s, box-shadow .16s;
}
.pool-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow); }
.pool-card.is-dead { opacity: .55; }

.pool-card-top {
    display: flex;
    align-items: center;
    gap: 6px 12px;
    flex-wrap: wrap;
}
.pool-code {
    font-family: var(--mono);
    font-size: clamp(24px, 6.4vw, 30px);
    font-weight: 800;
    letter-spacing: .12em;
    line-height: 1.25;
    color: var(--text);
    background: none;
    border: 0;
    padding: 0;
    cursor: copy;
    transition: color .16s;
}
.pool-code:hover { color: var(--brand-600); }

.pool-copy {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 999px;
    border: 1px solid var(--border-strong);
    background: var(--surface);
    color: var(--text-muted);
    font: inherit;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    transition: color .16s, border-color .16s, background .16s;
    -webkit-tap-highlight-color: transparent;
}
.pool-copy:hover { border-color: var(--brand-400); color: var(--brand-600); }
.pool-copy.is-copied { border-color: var(--ok-500); color: var(--ok-500); background: var(--ok-050); }

.pool-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    font-size: 13.5px;
    color: var(--text-soft);
    line-height: 1.5;
}

.pool-votes {
    display: flex;
    gap: 10px;
    margin-top: 14px;
}
.pool-vote {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--text-muted);
    font: inherit;
    font-size: 14.5px;
    font-weight: 600;
    cursor: pointer;
    transition: color .16s, border-color .16s, background .16s;
    -webkit-tap-highlight-color: transparent;
}
.pool-vote b { font-weight: 800; font-variant-numeric: tabular-nums; color: var(--text); }
.pool-vote svg { flex-shrink: 0; }
.pool-vote--ok:hover:not(.is-locked) { background: var(--ok-050); border-color: var(--ok-500); color: var(--ok-500); }
.pool-vote--no:hover:not(.is-locked) { background: var(--no-050); border-color: var(--no-500); color: var(--no-500); }
.pool-vote.is-locked { opacity: .55; cursor: default; pointer-events: none; }
.pool-vote.is-picked { border-color: var(--brand-400); background: var(--brand-050); color: var(--brand-600); }
.pool-vote.is-picked b { color: inherit; }
.pool-vote.is-busy { opacity: .6; pointer-events: none; }

/* 未复制邀请码前：投票按钮置灰等待 */
.pool-vote.is-wait { opacity: .45; }
.pool-vote.is-wait b { opacity: .75; }

/* 引导复制：复制按钮脉冲高亮 */
.pool-code.is-nudge,
.pool-copy.is-nudge { border-color: var(--brand-400); animation: muse-nudge .45s ease 3; }

@keyframes muse-nudge {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.06); }
}

@media (prefers-reduced-motion: reduce) {
    .pool-code.is-nudge,
    .pool-copy.is-nudge { animation: none; border-color: var(--brand-600); }
}

.pool-empty {
    text-align: center;
    padding: 30px 0;
    color: var(--text-muted);
    font-size: 15px;
}
.pool-empty a { font-weight: 600; }

/* 动态面板内的列表卡 */
.pool-panel .activity-card { box-shadow: none; }

/* ---------- 步骤 ---------- */
.steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 16px;
    grid-template-columns: 1fr;
}
@media (min-width: 721px) { .steps { grid-template-columns: repeat(3, 1fr); } }

.step {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px 22px;
    box-shadow: var(--shadow-sm);
    position: relative;
}
.step-num {
    display: inline-grid;
    place-items: center;
    width: 34px; height: 34px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--brand-400), var(--brand-600));
    color: #fff;
    font-weight: 800;
    font-size: 15px;
    margin-bottom: 14px;
}
.step-title { font-size: 17px; margin-bottom: 8px; }
.step-text { color: var(--text-muted); font-size: 15px; }

/* ---------- 分享邀请码（醒目 CTA） ---------- */
.pool-share { padding: 36px 0 12px; }

.share-cta {
    background: linear-gradient(135deg, var(--brand-400), var(--brand-600));
    border-radius: var(--radius-lg);
    padding: 32px 26px 26px;
    color: #fff;
    box-shadow: 0 16px 40px rgba(79, 70, 229, .28);
    text-align: center;
}
.share-cta-head h2 { color: #fff; font-size: clamp(21px, 3.6vw, 27px); }
.share-cta-head p { margin-top: 6px; opacity: .92; font-size: 15px; }

.share-cta-row {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 560px;
    margin: 20px auto 0;
}
@media (min-width: 561px) { .share-cta-row { flex-direction: row; } }

.share-cta-input {
    flex: 1;
    min-width: 0;
    padding: 14px 18px;
    border: 2px solid transparent;
    border-radius: 999px;
    background: #fff;
    color: var(--text);
    font-family: var(--mono);
    font-size: 19px;
    font-weight: 700;
    letter-spacing: .2em;
    text-indent: .2em;
    text-transform: uppercase;
    text-align: center;
    transition: box-shadow .16s;
}
.share-cta-input::placeholder { color: #9aa1b2; font-weight: 500; letter-spacing: .12em; }
.share-cta-input:focus { outline: none; box-shadow: 0 0 0 4px rgba(255, 255, 255, .35); }
.share-cta-input.is-invalid { box-shadow: 0 0 0 4px rgba(253, 164, 175, .85); }

.share-cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    border: 0;
    border-radius: 999px;
    background: #fff;
    color: var(--brand-600);
    font: inherit;
    font-size: 15.5px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: 0 6px 18px rgba(17, 24, 39, .18);
    transition: transform .12s, box-shadow .18s;
    -webkit-tap-highlight-color: transparent;
}
.share-cta-btn:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(17, 24, 39, .24); }
.share-cta-btn:active { transform: translateY(1px) scale(.99); }
.share-cta-btn.is-busy { opacity: .7; pointer-events: none; }
.share-cta-btn svg { flex-shrink: 0; }

.share-cta .form-msg { color: #fff; }

.share-cta-hint {
    margin-top: 12px;
    font-size: 12.5px;
    line-height: 1.6;
    opacity: .85;
}
.share-cta-privacy { display: block; opacity: .8; }

/* ---------- 浮动分享条（固定在页面底部，随时可分享） ---------- */
.share-float {
    position: fixed;
    left: 50%;
    bottom: calc(14px + env(safe-area-inset-bottom, 0px));
    z-index: 60;
    width: min(560px, calc(100vw - 20px));
    background: linear-gradient(135deg, var(--brand-400), var(--brand-600));
    border-radius: 999px;
    padding: 8px 8px 8px 10px;
    box-shadow: 0 16px 40px rgba(79, 70, 229, .38);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translate(-50%, calc(100% + 24px));
    transition: transform .24s ease, opacity .24s ease, visibility .24s;
}
.share-float.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate(-50%, 0);
}

.share-float-form {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
}

/* 提交结果提示：悬浮在浮动条上方 */
.share-float .form-msg {
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: calc(100% + 10px);
    margin: 0;
    min-height: 0;
    text-align: center;
    color: #fff;
    font-size: 13.5px;
    text-shadow: 0 1px 6px rgba(17, 24, 39, .45);
}

.share-float .share-cta-input {
    padding: 11px 16px;
    font-size: 16px;
    border-radius: 999px;
}
.share-float .share-cta-input:focus { box-shadow: 0 0 0 4px rgba(255, 255, 255, .35); }

.share-float .share-cta-btn {
    padding: 11px 18px;
    font-size: 14.5px;
    box-shadow: none;
}
.share-float .share-cta-btn:hover { box-shadow: 0 4px 12px rgba(17, 24, 39, .2); }

.share-float-close {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .16);
    color: #fff;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: background .16s;
}
.share-float-close:hover { background: rgba(255, 255, 255, .3); }

/* 浮动条激活时给页面底部留出空间，避免遮挡页脚内容 */
body.has-share-float { padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }

@media (max-width: 480px) {
    .share-float { padding: 6px 6px 6px 8px; }
    .share-float .share-cta-input { padding: 10px 12px; letter-spacing: .14em; }
    .share-float .share-cta-btn { padding: 10px 14px; font-size: 14px; }
    .share-float-close { width: 32px; height: 32px; }
    body.has-share-float { padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
}

.visually-hidden {
    position: absolute;
    width: 1px; height: 1px;
    margin: -1px; padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.form-msg {
    margin-top: 12px;
    font-size: 14px;
    font-weight: 600;
    min-height: 20px;
}
.form-msg.is-success { color: var(--ok-500); }
.form-msg.is-error { color: var(--no-500); }

.activity-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 6px 22px;
    box-shadow: var(--shadow-sm);
}
.activity-list { list-style: none; margin: 0; padding: 0; }
.activity-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px dashed var(--border);
}
.activity-item:last-child { border-bottom: 0; }
.activity-icon {
    width: 30px;
    height: 30px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    border-radius: 9px;
}
.activity-item--share .activity-icon { background: var(--brand-050); color: var(--brand-600); }
.activity-item--claim .activity-icon { background: var(--ok-050); color: var(--ok-500); }
.activity-text {
    flex: 1;
    min-width: 0;
    margin: 0;
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.5;
}
.activity-text b,
.activity-code {
    color: var(--text);
    font-family: var(--mono);
    font-weight: 700;
    letter-spacing: .04em;
}
.activity-time {
    flex-shrink: 0;
    font-size: 12px;
    color: var(--text-soft);
    font-variant-numeric: tabular-nums;
}
.activity-empty {
    margin: 0;
    padding: 16px 0;
    text-align: center;
    font-size: 14px;
    color: var(--text-soft);
}
.activity-item.is-new { animation: muse-pop .24s ease-out; }

/* 宽屏下动态列表排两列，避免每行过长 */
@media (min-width: 761px) {
    .activity-list {
        display: grid;
        grid-template-columns: 1fr 1fr;
        column-gap: 40px;
    }
}

/* ---------- FAQ ---------- */
.faq-list { display: grid; gap: 10px; }
.faq-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: border-color .18s, box-shadow .18s;
}
.faq-item[open] { border-color: var(--brand-400); box-shadow: var(--shadow); }
.faq-item summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 18px;
    font-weight: 600;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary h2,
.faq-item summary h3 { font-size: 16px; font-weight: 600; margin: 0; }
.faq-icon {
    position: relative;
    flex-shrink: 0;
    width: 22px; height: 22px;
    border-radius: 50%;
    background: var(--brand-050);
}
.faq-icon::before,
.faq-icon::after {
    content: "";
    position: absolute;
    left: 50%; top: 50%;
    width: 10px; height: 2px;
    border-radius: 2px;
    background: var(--brand-600);
    transform: translate(-50%, -50%);
    transition: transform .2s ease;
}
.faq-icon::after { transform: translate(-50%, -50%) rotate(90deg); }
.faq-item[open] .faq-icon::after { transform: translate(-50%, -50%) rotate(0deg); }

.faq-answer { padding: 0 18px 18px; }
.faq-answer p { color: var(--text-muted); font-size: 15px; }

.faq-more { text-align: center; margin-top: 26px; }
.faq-list--full .faq-item summary h2 { font-size: 17px; }

/* ---------- 面包屑 ---------- */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
    color: var(--text-soft);
    margin-bottom: 18px;
}
.breadcrumb a { color: var(--text-muted); }
.breadcrumb span[aria-hidden] { color: var(--text-soft); }

/* ---------- CTA 面板 ---------- */
.cta-panel {
    margin-top: 34px;
    padding: 30px 24px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, var(--brand-400), var(--brand-600));
    color: #fff;
    text-align: center;
    box-shadow: 0 16px 40px rgba(79, 70, 229, .28);
}
.cta-panel h2 { font-size: clamp(20px, 3.6vw, 26px); }
.cta-panel p { margin-top: 8px; opacity: .92; }
.cta-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 20px; }
.cta-panel .btn-primary { background: #fff; color: var(--brand-600); box-shadow: none; }
.cta-panel .btn-outline { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .55); }
.cta-panel .btn-outline:hover { background: rgba(255, 255, 255, .12); color: #fff; }

/* ---------- 页脚 ---------- */
.site-footer {
    background: var(--bg-alt);
    border-top: 1px solid var(--border);
    padding: 46px 0 26px;
    margin-top: 8px;
}
.footer-grid {
    display: grid;
    gap: 30px;
    grid-template-columns: 1fr;
}
@media (min-width: 761px) {
    .footer-grid { grid-template-columns: 1.7fr 1fr 1fr; gap: 40px; }
}
.brand--footer { margin-bottom: 12px; font-size: 16px; }
.footer-heading { font-size: 14px; font-weight: 700; margin-bottom: 12px; letter-spacing: -.01em; }
.footer-text { color: var(--text-muted); font-size: 14px; max-width: 42em; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.footer-links a { color: var(--text-muted); font-size: 14px; }
.footer-links a:hover { color: var(--brand-600); }

.footer-bottom {
    margin-top: 34px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    justify-content: space-between;
    align-items: center;
}
.footer-note, .footer-copy { font-size: 12.5px; color: var(--text-soft); }

/* 本地预览模式提示（仅 demo_mode 打开时出现） */
.footer-demo {
    margin-top: 12px;
    font-size: 12.5px;
    line-height: 1.6;
    color: var(--text-muted);
    display: inline-block;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    border: 1px dashed var(--border-strong);
    background: var(--surface-2);
}

/* ---------- 动效与工具类 ---------- */
.is-loading { position: relative; color: transparent !important; }
.is-loading::after {
    content: "";
    position: absolute;
    left: 50%; top: 50%;
    width: 16px; height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid currentColor;
    border-color: rgba(255, 255, 255, .45);
    border-top-color: #fff;
    border-radius: 50%;
    animation: muse-spin .7s linear infinite;
}
@keyframes muse-spin { to { transform: rotate(360deg); } }

@keyframes muse-pop {
    0%   { transform: scale(.94); opacity: 0; }
    100% { transform: scale(1);   opacity: 1; }
}
.is-animate { animation: muse-pop .24s ease-out; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* 小屏微调 */
@media (max-width: 480px) {
    .hero { padding: 38px 0 28px; }
    .section { padding: 42px 0; }
    .pool-hero { padding: 18px 18px 16px; }
    .pool-card { padding: 16px 16px; }
    .pool-vote { padding: 11px 8px; }
    .pool-tab { font-size: 13.5px; padding: 9px 6px; }
    .share-cta { padding: 26px 18px 22px; }
    .activity-card { padding: 4px 14px; }
    .activity-time { font-size: 11.5px; }
}
