/* ============ 活动中心页（与下载站 wonder.design 风格一致） ============ */

/* 弹窗（dl-overlay z-index 1000）会盖住 toast：活动页 toast 提到最顶层 */
.toast {
    z-index: 1200;
}

/* [hidden] 必须强制隐藏（防止个别 UA/组合规则下 hidden 失效导致登录页与后台同屏） */
[hidden] {
    display: none !important;
}

/* 后台页面（activity-admin.html）：应用式布局（顶栏 + 侧栏 + 独立滚动内容区），
   完整样式位于本文件底部「管理台」区块 */

.activity-main {
    padding-top: 140px;
}

/* Hero */
.activity-hero {
    max-width: 60rem;
    margin: 0 auto;
    text-align: center;
    padding-top: 16px;
}

.activity-hero-title {
    font-family: var(--font-display);
    font-size: 2.6rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.activity-hero-sub {
    margin-top: 14px;
    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.8;
    max-width: 44rem;
    margin-left: auto;
    margin-right: auto;
}

.activity-hero-note {
    margin-top: 16px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border: 1px solid rgba(221, 183, 255, 0.25);
    border-radius: var(--radius-pill);
    background: rgba(221, 183, 255, 0.06);
    color: var(--primary);
    font-size: 13px;
}

/* 活动卡片网格：列宽受限 + 居中（单活动时不再左靠一角显得空） */
.activity-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 380px));
    gap: 20px;
    justify-content: center;
    max-width: 84rem;
    margin: 0 auto;
}

.activity-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 24px;
    border-radius: var(--radius);
    background: rgba(25, 25, 25, 0.4);
    border: 1px solid var(--border-faint);
    transition: border-color var(--transition-fast), transform var(--transition);
}

.activity-card:hover {
    border-color: var(--border-subtle);
    transform: translateY(-4px);
}

.activity-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.activity-card-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.4;
    min-height: 2.8em; /* 固定两行高：多卡片同行时顶部对齐 */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.activity-badge {
    flex: 0 0 auto;
    margin-top: 2px; /* 与标题第一行文字对齐 */
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    font-size: 12px;
    font-weight: 500;
}

.activity-badge.open { background: rgba(221, 183, 255, 0.12); color: var(--primary); border: 1px solid rgba(221, 183, 255, 0.3); }
.activity-badge.open::before { content: "● "; font-size: 10px; }
.activity-badge.done { background: rgba(74, 222, 128, 0.12); color: #4ade80; border: 1px solid rgba(74, 222, 128, 0.3); }
.activity-badge.upcoming { background: rgba(255, 255, 255, 0.06); color: var(--text-muted); border: 1px solid var(--border-subtle); }
.activity-badge.closed { background: rgba(255, 255, 255, 0.04); color: var(--text-faint); border: 1px solid var(--border-faint); }

.activity-card-desc {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.7;
    min-height: 3.4em; /* 固定两行高：多卡片同行时各区块水平对齐 */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.activity-card-info {
    display: grid;
    grid-template-columns: 64px 1fr;
    column-gap: 10px;
    row-gap: 7px;
    align-items: baseline;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-faint);
    border-radius: 10px;
}

.aci-label {
    color: var(--text-faint);
    font-size: 12.5px;
    white-space: nowrap;
}

.aci-value {
    color: var(--text);
    font-size: 13px;
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.aci-prize { color: var(--primary); font-weight: 600; }

.activity-card-countdown {
    display: flex;
    align-items: baseline;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-muted);
}

.activity-card-countdown .cd-num {
    font-size: 17px;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 0.5px;
}

.activity-card-foot {
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 10px;
}

.activity-card-foot .wonder-button,
.activity-card-foot .wonder-button-secondary {
    padding: 10px 18px;
    border-radius: 10px;
    font-size: 14px;
}

.activity-card-foot .wonder-button-secondary {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid var(--border-subtle);
}

/* 查询 */
.query-card {
    max-width: 40rem;
    margin: 0 auto;
    padding: 24px;
    border-radius: var(--radius);
}

.query-row {
    display: flex;
    align-items: stretch;
    gap: 10px;
}

.query-input {
    flex: 1 1 auto;
    min-width: 0;
    box-sizing: border-box;
    width: 100%;
    height: 46px;
    padding: 0 14px;
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    font-family: var(--font-mono);
    font-size: 15px;
}

.query-input:focus {
    outline: none;
    border-color: var(--primary);
}

.query-btn {
    height: 46px;
    border-radius: 10px;
    padding: 0 22px;
}

.query-result {
    margin-top: 16px;
    padding: 14px 16px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-faint);
    font-size: 14px;
    line-height: 1.8;
    color: var(--text-on-surface);
}

.query-result .qr-winner { color: #4ade80; font-weight: 600; }
.query-result .qr-miss { color: var(--text-muted); }

/* 验证说明 */
.verify-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    max-width: var(--container-max);
    margin: 0 auto;
}

.verify-card {
    padding: 24px;
    border-radius: var(--radius);
}

.verify-card .material-symbols-outlined {
    font-size: 28px;
    color: var(--primary);
}

.verify-card h3 {
    margin: 12px 0 8px;
    font-size: 16px;
    color: var(--text);
}

.verify-card p {
    font-size: 14px;
    line-height: 1.75;
    color: var(--text-muted);
    margin: 0 0 12px;
}

.verify-card p:last-child {
    margin-bottom: 0;
}

/* 兑换指南中的步骤小标题（Steam / Minecraft 等）独立成块，提升扫描效率 */
.verify-card p b.rg-step {
    display: block;
    color: var(--text);
    font-weight: 700;
    margin-bottom: 4px;
}

/* 行内强调（如「查询码 + 报名邮箱 + 玩家昵称」） */
.verify-card p b:not(.rg-step) {
    color: var(--text);
    font-weight: 600;
}

/* 兑换指南中的链接：完整 URL + 主色 + 下划线 + 链接图标 */
.verify-card p a {
    color: var(--primary);
    text-decoration: underline;
    text-underline-offset: 2px;
    word-break: break-all;
}

.verify-card p a:hover {
    color: var(--primary-container);
    text-decoration-thickness: 2px;
}

/* 链接后的「打开」图标：与主色一致、缩小、不继承下划线 */
.verify-card .material-symbols-outlined.rg-link-icon {
    font-size: 14px;
    line-height: 1;
    vertical-align: middle;
    color: var(--primary);
    margin-left: 3px;
    text-decoration: none;
}

/* ============ 兑换指南：左侧 Tab 栏 + 右侧 Panel（左右布局） ============ */

/* 整体节段间距 */
#redeem-guide .section-heading {
    margin-bottom: 56px;
}

/* 左右两列布局容器 */
.rg-layout {
    display: grid;
    grid-template-columns: 232px minmax(0, 1fr);
    gap: 48px;
    max-width: 1120px;
    margin: 0 auto;
    align-items: start;
}

/* --- 左侧 Tab 栏：垂直列表，滚动时吸附在导航栏下方 --- */
.rg-tabs {
    display: flex;
    flex-direction: column;
    gap: 6px;
    position: sticky;
    top: 80px;
    max-height: calc(100vh - 96px);
    overflow-y: auto;
}

.rg-tab {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 14px 18px;
    border-radius: 10px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    transition: all var(--transition-fast);
    -webkit-tap-highlight-color: transparent;
}

.rg-tab .material-symbols-outlined {
    font-size: 20px;
    color: var(--text-faint);
    transition: color var(--transition-fast);
    flex: 0 0 auto;
}

.rg-tab:hover {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
}

.rg-tab:hover .material-symbols-outlined {
    color: var(--text-muted);
}

.rg-tab.is-active {
    background: rgba(221, 183, 255, 0.10);
    border-color: rgba(221, 183, 255, 0.22);
    color: #ffffff;
    border-radius: 999px;
}

.rg-tab.is-active .material-symbols-outlined {
    color: var(--primary);
}

/* --- 右侧 Panels 容器 --- */
.rg-panels {
    min-width: 0;
}

.rg-panel {
    /* 内容直接落在页面背景上：无边框、无背景、无滚动包裹层，页面随内容自然撑高 */
    padding: 0;
    margin: 0;
    background: transparent;
    border: none;
    max-height: none;
    overflow: visible;
}

/* --- 面板头部：图标徽章 + 标题 --- */
.rg-panel-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 auto 24px;
    max-width: 960px;
}

.rg-panel-header .material-symbols-outlined {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(221, 183, 255, 0.12);
    border: 1px solid rgba(221, 183, 255, 0.18);
    font-size: 18px;
    color: var(--primary);
}

.rg-panel-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
    letter-spacing: -0.01em;
}

/* --- 引言：与图文区同宽 --- */
.rg-intro {
    max-width: 960px;
    margin: 0 auto 32px;
    font-size: 15px;
    line-height: 1.8;
    color: var(--text-muted);
    text-align: left;
}

/* --- 步骤：序号徽章 + 内容（与图片左右配对） --- */
.rg-step {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.rg-step-badge {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    margin-top: 2px;
    border-radius: 50%;
    background: rgba(221, 183, 255, 0.14);
    border: 1px solid rgba(221, 183, 255, 0.2);
    color: var(--primary);
    font-size: 18px;
    line-height: 1;
}

.rg-step-badge svg {
    width: 20px;
    height: 20px;
    display: block;
}

.rg-step-content {
    flex: 1;
    min-width: 0;
}

.rg-step-content > b {
    display: block;
    color: var(--text);
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
}

.rg-step-content p {
    margin: 0 0 8px;
    font-size: 14px;
    line-height: 1.75;
    color: var(--text-muted);
}

.rg-step-content p:last-child {
    margin-bottom: 0;
}

.rg-step-content p b {
    color: var(--text);
    font-weight: 600;
}

.rg-step-content a {
    color: var(--primary);
    text-decoration: underline;
    text-underline-offset: 2px;
    word-break: break-all;
}

.rg-step-content a:hover {
    color: var(--primary-container);
    text-decoration-thickness: 2px;
}

.rg-step-content .material-symbols-outlined.rg-link-icon {
    font-size: 14px;
    line-height: 1;
    vertical-align: middle;
    color: var(--primary);
    margin-left: 3px;
    text-decoration: none;
}

/* --- 收尾提示条：图标与文字垂直水平对齐 --- */
.rg-note {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    max-width: 960px;
    margin: 36px auto 0;
    padding: 14px 18px;
    border-radius: 14px;
    background: rgba(221, 183, 255, 0.07);
    border: 1px solid rgba(221, 183, 255, 0.16);
    color: var(--text);
    font-size: 13px;
    line-height: 1.6;
    text-align: left;
}

.rg-note::before {
    content: 'lightbulb';
    font-family: 'Material Symbols Outlined';
    font-size: 18px;
    color: var(--primary);
    flex: 0 0 auto;
    line-height: 1;
}

/* --- 示例模板卡片（如实物核验消息模板） --- */
.rg-example {
    max-width: 960px;
    margin: 36px auto;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(221, 183, 255, 0.16);
    background: rgba(255, 255, 255, 0.03);
}

.rg-example-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 18px;
    background: rgba(221, 183, 255, 0.08);
    border-bottom: 1px solid rgba(221, 183, 255, 0.12);
    font-size: 13px;
    color: var(--text);
}

.rg-example-head .material-symbols-outlined {
    font-size: 16px;
    color: var(--primary);
    flex: 0 0 auto;
}

.rg-example-body {
    padding: 16px 18px;
    font-family: var(--font-mono);
    font-size: 13px;
    line-height: 1.9;
    color: var(--text-muted);
}

/* --- 安全提醒条 --- */
.rg-warn {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    max-width: 960px;
    margin: 36px auto;
    padding: 14px 18px;
    border-radius: 14px;
    background: rgba(255, 179, 71, 0.08);
    border: 1px solid rgba(255, 179, 71, 0.22);
    color: #f5c97b;
    font-size: 13px;
    line-height: 1.7;
    text-align: left;
}

.rg-warn::before {
    content: 'warning';
    font-family: 'Material Symbols Outlined';
    font-size: 18px;
    color: #f5c97b;
    flex: 0 0 auto;
    line-height: 1;
    margin-top: 1px;
}

/* --- 图文教程：步骤在上、配图在下（文章式），图片居中限宽 --- */
.rg-tutorial {
    display: flex;
    flex-direction: column;
    gap: 40px;
    max-width: 960px;
    margin: 0 auto;
}

.rg-tutorial-row {
    display: flex;
    flex-direction: column;
    gap: 22px;
    align-items: stretch;
}

.rg-figure {
    margin: 0 auto;
    min-width: 0;
    width: 100%;
    max-width: 740px;
}

.rg-figure img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 16px;
    border: 1px solid var(--border-subtle);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}

.rg-figure figcaption {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
    font-size: 13px;
    color: var(--text-faint);
    line-height: 1.6;
    text-align: center;
}

.rg-figure figcaption::before {
    content: 'info';
    font-family: 'Material Symbols Outlined';
    font-size: 15px;
    color: var(--primary);
    flex: 0 0 auto;
    opacity: 0.85;
}

/* 窄屏：Tab 栏回退到顶部横排 */
@media (max-width: 800px) {
    .rg-layout {
        grid-template-columns: 1fr;
        gap: 28px;
    }
    .rg-tabs {
        position: static;
        max-height: none;
        overflow: visible;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 10px;
    }
    .rg-tab {
        width: auto;
        padding: 0 16px;
        height: 44px;
        border-radius: 999px;
        border-color: var(--border-faint);
        background: rgba(255, 255, 255, 0.04);
    }
    .rg-tab.is-active {
        border-color: rgba(221, 183, 255, 0.35);
    }
    .rg-note { margin-top: 28px; }
}

@media (max-width: 640px) {
    .rg-tabs { gap: 8px; }
    .rg-tab { height: 40px; padding: 0 14px; font-size: 13px; }
    .rg-tutorial { gap: 28px; }
}

/* 参与弹窗 */
.join-activity-name {
    color: var(--primary);
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 12px;
}

.join-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.join-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 13px;
    color: var(--text-muted);
}

.join-field input {
    height: 42px;
    padding: 0 12px;
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    font-size: 14px;
}

.join-field input:focus {
    outline: none;
    border-color: var(--primary);
}

.join-code-row {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

.join-code-row .join-field { flex: 1; min-width: 0; }

.join-send {
    height: 42px;
    padding: 0 14px;
    border-radius: 10px;
    font-size: 13px;
    white-space: nowrap;
    flex: 0 0 auto;
}

.join-send:disabled,
#join-submit:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

/* 参与须知：逐行小条目，避免挤成一段 */
.join-hint {
    margin: 2px 0 4px;
    padding: 0 0 0 16px;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 3px;
    font-size: 12px;
    color: var(--text-faint);
    line-height: 1.6;
}

.join-hint li {
    position: relative;
}

.join-hint li::before {
    content: "";
    position: absolute;
    left: -12px;
    top: 7px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--text-faint);
    opacity: 0.6;
}

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

.join-done-title {
    color: #4ade80;
    font-weight: 700;
    font-size: 20px;
}

.join-done p { margin: 8px 0; color: var(--text-muted); font-size: 14px; }

.join-ticket {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border: 1px dashed rgba(221, 183, 255, 0.4);
    border-radius: 10px;
    background: rgba(221, 183, 255, 0.05);
    margin: 10px 0 4px;
}

.join-ticket code {
    flex: 1;
    font-family: var(--font-mono);
    font-size: 15px;
    color: var(--primary);
    word-break: break-all;
}

.join-copy {
    flex: 0 0 auto;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
}

/* 详情弹窗 */
.dl-dialog-wide {
    max-width: 560px;
}

.detail-body {
    font-size: 14px;
    line-height: 1.8;
    color: var(--text-on-surface);
    overflow-wrap: anywhere;
}

.dl-sec { margin-top: 14px; }

.dl-sec-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-faint);
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.dl-sec-hint { color: var(--text-faint); font-size: 12px; margin-top: 6px; }

.dl-rows { display: flex; flex-direction: column; gap: 6px; }

.dl-row { display: flex; gap: 10px; font-size: 13.5px; line-height: 1.7; }

.dl-label { flex: 0 0 5.4em; color: var(--text-faint); white-space: nowrap; }
.dl-value { color: var(--text-on-surface); overflow-wrap: anywhere; }

.dl-label-full { margin-top: 10px; color: var(--text-faint); font-size: 12.5px; }

.seed-hex {
    margin-top: 4px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-faint);
    border-radius: 8px;
    padding: 10px 12px;
    font-family: var(--font-mono);
    font-size: 12px;
    line-height: 1.6;
    color: var(--text-muted);
    word-break: break-all;
    overflow-wrap: anywhere;
}

/* 中奖名单（公开公示，邮箱打码） */
.winners-box { margin-top: 2px; }.winners-pending { color: var(--text-faint); font-size: 13px; }

.winner-row {
    display: grid;
    grid-template-columns: 36px 1fr auto;
    gap: 10px;
    align-items: baseline;
    padding: 7px 10px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-faint);
    margin-top: 4px;
    font-size: 13px;
}

.w-rank { color: var(--primary); font-weight: 700; font-family: var(--font-mono); }
.w-name { color: var(--text); overflow-wrap: anywhere; }
.w-mail { color: var(--text-faint); font-family: var(--font-mono); font-size: 12px; white-space: nowrap; }

/* 公示/参与弹窗：高度自适应屏幕，内容区内部滚动（底部按钮始终可见可点） */
#detail-overlay .dl-dialog,
#join-overlay .dl-dialog {
    max-height: calc(100vh - 40px);
    max-height: calc(100dvh - 40px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#detail-overlay .detail-body {
    overflow-y: auto;
    min-height: 0;
    -webkit-overflow-scrolling: touch;
}

#join-overlay .dl-dialog {
    overflow-y: auto;
}

@media (max-width: 640px) {
    #detail-overlay, #join-overlay { padding: 12px; }
    #detail-overlay .dl-dialog, #join-overlay .dl-dialog {
        max-height: calc(100dvh - 24px);
        padding: 18px 16px;
        border-radius: 14px;
    }
}

/* 加载态 */
.activity-loading {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--text-muted);
    padding: 40px 0;
}

/* 骨架屏：活动卡片占位 —— 复用真实 .activity-card 的 flex/gap/padding 布局，
   各占位块的高度精确对齐真实内容（标题两行 / 描述两行 / info 四行 / 倒计时单行 / 按钮），
   避免数据到达后卡片高度跳变。 */
.activity-card-skeleton {
    pointer-events: none;
    user-select: none;
}
.activity-card-skeleton .sk-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}
.activity-card-skeleton .sk-title {
    font-size: 18px;          /* 对齐 .activity-card-title */
    height: 2.8em;            /* min-height: 2.8em（固定两行高） */
    width: 72%;
}
.activity-card-skeleton .sk-badge {
    flex: 0 0 auto;
    width: 62px;
    height: 24px;
    border-radius: var(--radius-pill);
}
.activity-card-skeleton .sk-desc {
    font-size: 14px;          /* 对齐 .activity-card-desc */
    height: 3.4em;            /* min-height: 3.4em（固定两行高） */
    width: 100%;
}
.activity-card-skeleton .sk-info {
    height: 127px;            /* 对齐 .activity-card-info 四行 + padding + border */
    border-radius: 10px;
}
.activity-card-skeleton .sk-count {
    width: 46%;               /* 对齐 .activity-card-countdown 单行 */
    height: 20px;
}
.activity-card-skeleton .sk-btn {
    width: 96px;
    height: 40px;             /* 对齐 .wonder-button padding 10px + 14px 文字 */
    border-radius: 10px;
}
.activity-card-skeleton .sk-btn.ghost { opacity: 0.55; }

/* 骨架屏：查询结果 / 中奖名单（小块文本行） */
.sk-query {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.sk-line { width: 100%; height: 13px; }
.sk-line.short { width: 62%; }

/* 兑换指南（查询结果区展示；保留换行，长链接自动换行，链接可点击） */
.sk-query .sk-line { height: 14px; }
.sk-query .sk-line.short { width: 46%; }

/* 移动端 */
@media (max-width: 640px) {
    .activity-main { padding-top: 116px; }
    .activity-hero-title { font-size: 2rem; }
    .activity-hero-sub { font-size: 14px; }
    .activity-grid { grid-template-columns: 1fr; }
    .query-card { padding: 20px 16px; }
    .query-row { flex-direction: column; align-items: stretch; }
    .query-input { height: 48px; font-size: 16px; }
    .query-btn { height: 48px; width: 100%; }
}

/* ============ 管理台（activity-admin.html） ============ */

/* ---------- 页面骨架：应用式布局（顶栏 + 侧栏 + 独立滚动内容区） ---------- */

.admin-page {
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
}

.admin-app {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.admin-shell {
    flex: 1;
    min-height: 0;
    display: flex;
    max-width: var(--container-max);
    width: 100%;
    margin: 0 auto;
}

/* ---------- 顶栏 ---------- */

.admin-topbar {
    flex: 0 0 auto;
    position: relative;
    z-index: 60;
    background: rgba(5, 5, 5, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.admin-topbar-inner {
    max-width: var(--container-max);
    margin: 0 auto;
    height: 60px;
    padding: 0 var(--margin-mobile);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

@media (min-width: 768px) {
    .admin-topbar-inner {
        padding: 0 32px;
    }
}

.admin-topbar-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-display);
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--text);
}

.admin-topbar-brand .brand-mark img {
    width: 30px;
    height: 30px;
}

.admin-topbar-tag {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--primary);
    background: rgba(221, 183, 255, 0.08);
    border: 1px solid rgba(221, 183, 255, 0.22);
    border-radius: 6px;
    padding: 3px 8px;
}

.admin-topbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-topbar-back {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--text-muted);
    font-size: 13px;
}

.admin-topbar-back:hover {
    color: var(--text);
}

/* 登录后：会话计时 + 用户 + 退出 */
.admin-session {
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-session-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 30px;
    padding: 0 12px;
    border: 1px solid var(--border-faint);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.03);
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
}

.admin-session-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #4ade80;
    animation: pulse-dot 2s ease-in-out infinite;
}

.admin-user-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 30px;
    padding: 0 12px;
    border: 1px solid var(--border-faint);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.03);
    font-size: 12px;
    color: var(--text);
    white-space: nowrap;
}

.admin-user-avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary), var(--primary-container));
    color: #000;
    font-size: 11px;
    font-weight: 800;
}

.admin-logout {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 30px;
    padding: 0 12px;
    border-radius: 8px;
    border: 1px solid rgba(248, 113, 113, 0.35);
    background: rgba(248, 113, 113, 0.06);
    color: #f87171;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    transition: background-color var(--transition-fast);
}

.admin-logout:hover {
    background: rgba(248, 113, 113, 0.12);
}

/* ---------- 登录页 ---------- */

.admin-login {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px 72px;
}

.admin-login-card {
    width: min(100%, 420px);
    padding: 36px 32px 28px;
    background: rgba(16, 16, 16, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 16px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
    text-align: center;
}

.admin-login-logo {
    width: 60px;
    height: 60px;
    margin: 0 auto 18px;
    padding: 10px;
    border-radius: 14px;
    border: 1px solid rgba(221, 183, 255, 0.22);
    background: rgba(221, 183, 255, 0.07);
}

.admin-login-title {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 800;
    color: var(--text);
}

.admin-login-sub {
    margin-top: 10px;
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.8;
}

.admin-login-sub b {
    color: var(--text);
    font-weight: 600;
}

.admin-key-row {
    margin-top: 22px;
    display: flex;
    gap: 10px;
    text-align: left;
}

.admin-key-row .admin-input {
    flex: 1;
    min-width: 0;
    height: 44px;
}

.admin-key-row .btn-solid {
    flex: 0 0 auto;
    height: 44px;
}

.admin-login-error {
    margin-top: 12px;
    display: none;
    padding: 10px 12px;
    border-radius: 8px;
    background: rgba(248, 113, 113, 0.08);
    border: 1px solid rgba(248, 113, 113, 0.3);
    color: #f87171;
    font-size: 13px;
    line-height: 1.6;
    text-align: left;
}

.admin-login-error:not([hidden]) {
    display: block;
}

.admin-login-note {
    margin-top: 16px;
    font-size: 12px;
    color: var(--text-faint);
    line-height: 1.7;
    text-align: left;
}

/* ---------- 侧边栏 ---------- */

.admin-sidebar {
    flex: 0 0 232px;
    display: flex;
    flex-direction: column;
    padding: 20px 12px 18px;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(8, 8, 8, 0.55);
    overflow-y: auto;
}

.admin-sidebar-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 2px 8px 16px;
    border-bottom: 1px solid var(--border-faint);
    margin-bottom: 14px;
}

.admin-sidebar-logo {
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary), var(--primary-container));
    color: #000;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 17px;
}

.admin-sidebar-meta {
    min-width: 0;
}

.admin-sidebar-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
}

.admin-sidebar-env {
    font-size: 11px;
    color: var(--text-faint);
    white-space: nowrap;
}

.admin-menu {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.admin-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    height: 40px;
    padding: 0 12px;
    border-radius: 10px;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
    text-align: left;
    transition: background-color var(--transition-fast), color var(--transition-fast);
}

.admin-menu-item .material-symbols-outlined {
    color: var(--text-faint);
    transition: color var(--transition-fast);
}

.admin-menu-item:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.05);
}

.admin-menu-item.is-active {
    color: #ffffff;
    background: rgba(221, 183, 255, 0.1);
}

.admin-menu-item.is-active .material-symbols-outlined {
    color: var(--primary);
}

.admin-sidebar-foot {
    margin-top: auto;
    padding: 16px 8px 0;
    border-top: 1px solid var(--border-faint);
}

.admin-user {
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-user .admin-user-avatar {
    width: 32px;
    height: 32px;
    font-size: 13px;
}

.admin-user-info {
    min-width: 0;
}

.admin-user-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
}

.admin-user-exp {
    margin-top: 2px;
    font-size: 11px;
    color: var(--text-faint);
    font-family: var(--font-mono);
}

/* ---------- 内容区 ---------- */

.admin-content {
    flex: 1;
    min-width: 0;
    overflow-y: auto;
    padding: 28px 32px 80px;
}

.admin-bar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

.admin-bar-title h1 {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text);
}

.admin-bar-sub {
    margin-top: 4px;
    font-size: 13px;
    color: var(--text-faint);
}

.admin-bar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ---------- 卡片 ---------- */

.admin-panel {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 20px;   /* 统一所有卡片间距，避免各卡片 margin 不一致导致疏密不均 */
}

.admin-card {
    padding: 20px 22px;
    margin-bottom: 0;
    background: rgba(15, 15, 15, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
}

.admin-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.admin-card-head h2 {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.01em;
}

.admin-card-head h2 .material-symbols-outlined {
    font-size: 18px;
    color: var(--primary);
}

.admin-card-head-right {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.admin-card-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.admin-hint {
    font-size: 12px;
    color: var(--text-faint);
    line-height: 1.6;
}

.admin-count {
    display: inline-flex;
    align-items: center;
    padding: 1px 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-faint);
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
}

/* ---------- 按钮 ---------- */

.btn-solid {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 38px;
    padding: 0 16px;
    border-radius: 10px;
    background: #ffffff;
    color: #000000;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    transition: background-color var(--transition-fast);
}

.btn-solid:hover {
    background: #e7e7e7;
}

/* 当前页高亮态：已在「发布新活动」面板时，顶栏「新建活动」按钮禁用置灰 */
.btn-solid:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.btn-solid:disabled:hover {
    background: #ffffff;
}

/* 管理端操作按钮（btn-ghost / btn-xs）disabled 置灰 */
.btn-ghost:disabled,
.btn-ghost.btn-xs:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 38px;
    padding: 0 16px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.13);
    background: rgba(255, 255, 255, 0.035);
    color: var(--text);
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    transition: background-color var(--transition-fast), border-color var(--transition-fast);
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-danger {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-color: rgba(248, 113, 113, 0.35);
    color: #f87171;
    background: rgba(248, 113, 113, 0.05);
}

.btn-danger:hover {
    background: rgba(248, 113, 113, 0.1);
    border-color: #f87171;
}

.btn-sm {
    height: 32px;
    padding: 0 12px;
    font-size: 12px;
    border-radius: 8px;
}

.btn-xs {
    height: 26px;
    padding: 0 8px;
    font-size: 12px;
    border-radius: 6px;
    gap: 4px;
}

.btn-solid .material-symbols-outlined,
.btn-ghost .material-symbols-outlined {
    font-size: 16px;
}

/* ---------- 表单 ---------- */

.admin-input {
    width: 100%;
    height: 40px;
    padding: 0 12px;
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    font-size: 14px;
    color-scheme: dark;
}

.admin-input:focus,
.admin-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(221, 183, 255, 0.1);
}

.admin-input::placeholder,
.admin-textarea::placeholder {
    color: var(--text-faint);
    opacity: 0.75;
}

.admin-textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    font-family: var(--font-mono);
    font-size: 13px;
    line-height: 1.7;
    resize: vertical;
    color-scheme: dark;
}

.admin-select {
    height: 40px;
    color-scheme: dark;
}

/* 原生下拉弹层：显式指定 option 背景/文字色，
   避免「白字 + 浅色面板」导致选项看不见（各浏览器/系统主题下行为不一） */
select.admin-input option,
select.admin-select option {
    background: #1e1e1e;
    color: #f2f2f2;
}

.admin-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 12px 16px;
}

.admin-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 12.5px;
    color: var(--text-muted);
}

.admin-field-full {
    grid-column: 1 / -1;
}

/* ---------- 关键指标 ---------- */

.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
    gap: 12px;
    margin-top: 14px;
}

.stat {
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.02);
}

.stat-label {
    display: block;
    font-size: 11px;
    letter-spacing: 0.04em;
    color: var(--text-faint);
}

.stat-value {
    display: block;
    margin-top: 6px;
    font-family: var(--font-display);
    font-size: 21px;
    font-weight: 800;
    line-height: 1.1;
    color: var(--text);
}

/* 状态胶囊 */
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 11px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid transparent;
    white-space: nowrap;
    font-family: var(--font-body);
}

.status-pill::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.status-open { color: #ddb7ff; background: rgba(221, 183, 255, 0.1); border-color: rgba(221, 183, 255, 0.3); }
.status-drawing { color: #fbbf24; background: rgba(251, 191, 36, 0.1); border-color: rgba(251, 191, 36, 0.3); }
.status-done { color: #4ade80; background: rgba(74, 222, 128, 0.1); border-color: rgba(74, 222, 128, 0.3); }
.status-closed { color: #9ca3af; background: rgba(156, 163, 175, 0.1); border-color: rgba(156, 163, 175, 0.3); }
.status-none { color: var(--text-faint); background: rgba(255, 255, 255, 0.03); border-color: var(--border-faint); }

/* ---------- 概览信息 ---------- */

.admin-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 10px;
}

.admin-meta-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.022);
}

.admin-meta-label {
    font-size: 11px;
    letter-spacing: 0.04em;
    color: var(--text-faint);
}

.admin-meta-value {
    font-size: 13px;
    color: var(--text-on-surface);
    word-break: break-all;
}

.admin-meta-value.mono {
    font-family: var(--font-mono);
    font-size: 12px;
}

.admin-meta-wide {
    grid-column: 1 / -1;
}

/* 编辑表单区 */
.admin-edit {
    margin-top: 16px;
    padding: 18px;
    border: 1px solid rgba(221, 183, 255, 0.3);
    border-radius: 12px;
    background: rgba(221, 183, 255, 0.05);
}

.admin-edit-title {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 14px;
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
}

.admin-edit-title .material-symbols-outlined {
    font-size: 16px;
    color: var(--primary);
}

/* 操作行 */
.admin-ops {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.admin-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

/* ---------- 上下堆叠（内容较多的卡片不再并排，避免显示不全） ---------- */

.admin-grid-2 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    align-items: start;
}

.admin-grid-2 .admin-card {
    margin-bottom: 0;
}

/* ---------- 统计徽章（奖励仓库状态） ---------- */

.admin-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.09);
    white-space: nowrap;
}

.admin-badge.warn {
    color: #fbbf24;
    border-color: rgba(251, 191, 36, 0.3);
    background: rgba(251, 191, 36, 0.08);
}

/* ---------- 表格 ---------- */

.admin-summary {
    font-size: 13px;
    color: var(--text-muted);
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    table-layout: fixed;
}

.admin-table th,
.admin-table td {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-table th {
    padding: 8px 12px;
    text-align: left;
    white-space: nowrap;
    border-bottom: 1px solid rgba(255, 255, 255, 0.09);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.05em;
}

.admin-table td {
    padding: 9px 12px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-on-surface);
}

/* 全部模板视图：7 列（# / 类型 / 名称 / 邮件主题 / 来源 / 状态 / 操作） */
.et-all-table th:nth-child(1),
.et-all-table td:nth-child(1) { width: 40px; }
.et-all-table th:nth-child(2),
.et-all-table td:nth-child(2) { width: 110px; }
.et-all-table th:nth-child(3),
.et-all-table td:nth-child(3) { width: 150px; }
.et-all-table th:nth-child(4),
.et-all-table td:nth-child(4) { width: auto; }
.et-all-table th:nth-child(5),
.et-all-table td:nth-child(5) { width: 90px; }
.et-all-table th:nth-child(6),
.et-all-table td:nth-child(6) { width: 90px; }
.et-all-table th:nth-child(7),
.et-all-table td:nth-child(7) { width: 150px; text-align: right; }

/* 单类型视图：6 列（# / 名称 / 邮件主题 / 来源 / 状态 / 操作） */
.et-single-table th:nth-child(1),
.et-single-table td:nth-child(1) { width: 40px; }
.et-single-table th:nth-child(2),
.et-single-table td:nth-child(2) { width: 160px; }
.et-single-table th:nth-child(3),
.et-single-table td:nth-child(3) { width: auto; }
.et-single-table th:nth-child(4),
.et-single-table td:nth-child(4) { width: 90px; }
.et-single-table th:nth-child(5),
.et-single-table td:nth-child(5) { width: 90px; }
.et-single-table th:nth-child(6),
.et-single-table td:nth-child(6) { width: 150px; text-align: right; }

/* 操作列按钮右对齐 */
.et-all-table td:nth-child(7) > *,
.et-single-table td:last-child > * {
    margin-left: 4px;
}

.admin-table tr:last-child td {
    border-bottom: 0;
}

.admin-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

.admin-table td.td-num {
    color: var(--text-faint);
    font-family: var(--font-mono);
    font-size: 12px;
}

.admin-preview {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-muted);
}

/* 自定义确认弹窗（替代原生 confirm/alert，样式与站内暗色一致） */
.cfm-text {
    margin-top: 14px;
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.8;
    white-space: pre-line;
}

.cfm-ok-danger {
    background: #e5484d !important;
    color: #fff !important;
    border-color: #e5484d !important;
}

/* 模板占位符说明 */
.nl-placeholder-help { margin-top: 10px; }
.nl-placeholder-help summary {
    cursor: pointer;
    user-select: none;
}

.nl-placeholder-table {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-faint);
    border-radius: 10px;
}

.nl-placeholder-table .nl-ph-row {
    display: flex;
    gap: 10px;
    font-size: 12.5px;
    line-height: 1.6;
    color: var(--text-muted);
}

.nl-placeholder-table code {
    flex: 0 0 auto;
    font-family: var(--font-mono);
    color: var(--primary);
    background: rgba(221, 183, 255, 0.08);
    border-radius: 6px;
    padding: 1px 6px;
    font-size: 12px;
}

.admin-empty {
    display: block;
    padding: 16px 4px;
    color: var(--text-faint);
    font-size: 13px;
}

/* 表格状态小胶囊 */
.chip-mini {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    border: 1px solid;
    white-space: nowrap;
}

.chip-mini.is-sent { color: #4ade80; background: rgba(74, 222, 128, 0.08); border-color: rgba(74, 222, 128, 0.25); }
.chip-mini.is-pending { color: #fbbf24; background: rgba(251, 191, 36, 0.08); border-color: rgba(251, 191, 36, 0.25); }
.chip-mini.is-idle { color: var(--text-muted); background: rgba(255, 255, 255, 0.04); border-color: var(--border-faint); }
.chip-mini.is-win { color: #ddb7ff; background: rgba(221, 183, 255, 0.1); border-color: rgba(221, 183, 255, 0.3); }
.chip-mini.is-type { color: #8ecbff; background: rgba(96, 165, 250, 0.1); border-color: rgba(96, 165, 250, 0.3); }

/* 报名表昵称头像 */
.avatar-sm {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    margin-right: 8px;
    border-radius: 50%;
    background: rgba(221, 183, 255, 0.12);
    color: var(--primary);
    font-size: 11px;
    font-weight: 700;
    vertical-align: middle;
}

.cell-name {
    vertical-align: middle;
}

/* ---------- 安全说明 ---------- */

.admin-help-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 13px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.admin-help-item:last-child {
    border-bottom: 0;
    padding-bottom: 2px;
}

.admin-help-item .material-symbols-outlined {
    flex: 0 0 auto;
    font-size: 20px;
    color: var(--primary);
    margin-top: 1px;
}

.admin-help-item p {
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-muted);
}

.admin-help-item b {
    color: var(--text);
    font-weight: 600;
}

.admin-help-item code {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--primary);
    background: rgba(221, 183, 255, 0.08);
    border: 1px solid rgba(221, 183, 255, 0.22);
    padding: 1px 6px;
    border-radius: 4px;
}

/* ---------- 移动端：侧栏折叠为横向菜单，页面恢复整体滚动 ---------- */

@media (max-width: 900px) {
    .admin-page {
        height: auto;
        min-height: 100vh;
        min-height: 100dvh;
        overflow: auto;
    }

    .admin-app {
        flex: none;
    }

    .admin-topbar {
        position: sticky;
        top: 0;
    }

    .admin-shell {
        flex-direction: column;
    }

    .admin-sidebar {
        flex: none;
        width: 100%;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        padding: 10px 16px;
        border-right: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
        overflow: visible;
    }

    .admin-sidebar-head {
        display: none;
    }

    .admin-sidebar-foot {
        display: none;
    }

    .admin-menu {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 6px;
    }

    .admin-menu-item {
        width: auto;
        height: 34px;
        padding: 0 12px;
        font-size: 13px;
    }

    .admin-content {
        overflow: visible;
        padding: 20px 16px 56px;
    }

    .admin-bar {
        flex-direction: column;
        align-items: flex-start;
    }

    .admin-topbar-back {
        display: none;
    }

    .admin-user-chip {
        display: none;
    }

    .admin-session-chip {
        max-width: 150px;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .admin-login {
        padding: 32px 16px 64px;
    }
}

/* ---------- 邮件订阅后台面板 ---------- */

.chip-mini.is-warn { color: #f87171; background: rgba(248, 113, 113, 0.08); border-color: rgba(248, 113, 113, 0.3); }

.nl-field-half {
    flex: 1 1 220px;
}

.nl-preview {
    margin-top: 14px;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    background: var(--surface-low);
}

.nl-preview-subject {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
}

.nl-preview-body {
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
    font-family: var(--font-mono);
    font-size: 12px;
    line-height: 1.7;
    color: var(--text-muted);
    max-height: 240px;
    overflow: auto;
}

.nl-subject-cell {
    max-width: 320px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
