@font-face {
    font-family: 'ZQKNNY';
    src: url('../ZQKNNY-Medium-2.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

/* 帖子灯箱（完整内容弹窗） */
.post-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .22s ease, visibility .22s ease;
}
.post-lightbox.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}
.post-lightbox-dialog {
    width: min(920px, 100%);
    max-height: min(82vh, 820px);
    overflow: hidden;
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,0.14);
    background: rgba(20, 20, 24, 0.82);
    box-shadow: 0 18px 50px rgba(0,0,0,0.45);
    transform: translateY(14px) scale(.98);
    opacity: 0;
    transition: transform .22s ease, opacity .22s ease;
}
.post-lightbox.show .post-lightbox-dialog {
    transform: translateY(0) scale(1);
    opacity: 1;
}
.post-lightbox-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding: 16px 16px 10px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.10);
}
.post-lightbox-title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: .2px;
    color: rgba(255,255,255,0.95);
}
.post-lightbox-subtitle {
    margin: 6px 0 0 0;
    font-size: 13px;
    line-height: 1.4;
    color: rgba(255,255,255,0.66);
}
.post-lightbox-close {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.14);
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.9);
    cursor: pointer;
    transition: transform .15s ease, background .15s ease;
}
.post-lightbox-close:hover { background: rgba(255,255,255,0.12); }
.post-lightbox-close:active { transform: scale(.98); }
.post-lightbox-body {
    padding: 14px 16px 18px 16px;
    overflow: auto;
    max-height: calc(min(82vh, 820px) - 60px);
}
.post-lightbox-cover {
    width: 100%;
    height: auto;
    border-radius: 14px;
    display: none;
    margin: 0 0 12px 0;
    border: 1px solid rgba(255,255,255,0.10);
}
.post-lightbox-content {
    color: rgba(255,255,255,0.86);
    font-size: 14px;
    line-height: 1.8;
    word-break: break-word;
}
.post-lightbox-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
}
.post-lightbox-content a { color: rgba(160, 220, 255, 0.95); }

/* 帖子卡片副标题 */
.post-subtitle {
    margin: 8px 0 0 0;
    font-size: 13px;
    line-height: 1.35;
    color: rgba(255,255,255,0.68);
    display: -webkit-box;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
    .post-lightbox, .post-lightbox-dialog, .post-lightbox-close {
        transition: none !important;
    }
}

/* ========== 赞助侧边栏按钮 ========== */
.sponsor-tab {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 14px 10px;
    background: rgba(20, 20, 24, 0.82);
    border: 1px solid rgba(255,255,255,0.14);
    border-right: none;
    border-radius: 14px 0 0 14px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    cursor: pointer;
    color: rgba(255,255,255,0.85);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: .3px;
    box-shadow: -4px 0 20px rgba(0,0,0,0.25);
    transition: background .18s ease, transform .18s ease, box-shadow .18s ease;
    user-select: none;
    writing-mode: vertical-rl;
    text-orientation: mixed;
}
.sponsor-tab:hover {
    background: rgba(30, 30, 36, 0.92);
    transform: translateY(-50%) translateX(-3px);
    box-shadow: -6px 0 24px rgba(0,0,0,0.35);
}
.sponsor-tab:active {
    transform: translateY(-50%) translateX(-1px);
}
.sponsor-tab svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    stroke: rgba(255, 120, 120, 0.9);
    writing-mode: horizontal-tb;
}
.sponsor-tab span {
    writing-mode: vertical-rl;
    text-orientation: mixed;
}

/* ========== 赞助弹窗遮罩 ========== */
.sponsor-overlay {
    position: fixed;
    inset: 0;
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .22s ease, visibility .22s ease;
}
.sponsor-overlay.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* ========== 赞助弹窗主体 ========== */
.sponsor-dialog {
    width: min(480px, 100%);
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,0.14);
    background: rgba(20, 20, 24, 0.88);
    box-shadow: 0 18px 50px rgba(0,0,0,0.45);
    transform: translateY(14px) scale(.98);
    opacity: 0;
    transition: transform .22s ease, opacity .22s ease;
    overflow: hidden;
}
.sponsor-overlay.show .sponsor-dialog {
    transform: translateY(0) scale(1);
    opacity: 1;
}
.sponsor-dialog-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding: 18px 18px 12px 18px;
    border-bottom: 1px solid rgba(255,255,255,0.10);
}
.sponsor-dialog-title {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: .2px;
    color: rgba(255,255,255,0.95);
}
.sponsor-dialog-subtitle {
    margin: 5px 0 0 0;
    font-size: 13px;
    line-height: 1.4;
    color: rgba(255,255,255,0.60);
}
.sponsor-dialog-close {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.14);
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.9);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform .15s ease, background .15s ease;
}
.sponsor-dialog-close svg { width: 16px; height: 16px; }
.sponsor-dialog-close:hover { background: rgba(255,255,255,0.12); }
.sponsor-dialog-close:active { transform: scale(.95); }

/* ========== 赞助弹窗内容区 ========== */
.sponsor-dialog-body {
    padding: 20px 18px 22px 18px;
}
.sponsor-qr-list {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}
.sponsor-qr-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}
.sponsor-qr-img-wrap {
    width: 150px;
    height: 150px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.06);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.sponsor-qr-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 12px;
}
.sponsor-qr-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: rgba(255,255,255,0.35);
    font-size: 12px;
}
.sponsor-qr-placeholder svg {
    width: 36px;
    height: 36px;
    stroke: rgba(255,255,255,0.25);
}
.sponsor-qr-label {
    font-size: 13px;
    font-weight: 500;
    color: rgba(255,255,255,0.75);
    letter-spacing: .2px;
}
.sponsor-empty {
    text-align: center;
    color: rgba(255,255,255,0.4);
    font-size: 14px;
    padding: 20px 0;
}

@media (prefers-reduced-motion: reduce) {
    .sponsor-overlay, .sponsor-dialog, .sponsor-tab {
        transition: none !important;
    }
}
@media (max-width: 600px) {
    .sponsor-tab {
        padding: 10px 8px;
        font-size: 11px;
    }
    .sponsor-tab svg { width: 17px; height: 17px; }
    .sponsor-qr-img-wrap { width: 130px; height: 130px; }
}

/* ===== 网站余额（页脚展示） ===== */
.balance-card {
    max-width: 900px;
}

.balance-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.balance-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    opacity: 0.9;
}

.balance-value {
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    font-size: 22px;
    letter-spacing: 0.5px;
    color: #6bcb77;
    transition: color 0.3s ease;
}

/* 余额为负：大红字标出 */
.balance-value.is-negative {
    color: #ff4d4d;
    font-size: 28px;
    text-shadow: 0 0 18px rgba(255, 77, 77, 0.35);
    animation: balancePulse 2.2s ease-in-out infinite;
}

@keyframes balancePulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.72; }
}

@media (prefers-reduced-motion: reduce) {
    .balance-value.is-negative { animation: none; }
}

.balance-updated {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.45);
}

/* ===== 卡片统一垂直间距 =====
   两个页面容器内的相邻元素统一拉开间距，避免各板块自带的
   margin 不一致导致看起来挤。相邻兄弟 margin 会折叠，取较大值，
   所以这里保证的是「至少」这个间距。 */
.main-page > * + *,
.main-content > * + * {
    margin-top: 28px;
}

@media (max-width: 768px) {
    .main-page > * + *,
    .main-content > * + * {
        margin-top: 20px;
    }
}

/* ===== 轻提示（权限不足等即时反馈）=====
   星历板块的报名/投票/投稿对普通用户不可用时，在页面顶部弹一条提示。
   样式沿用站点的玻璃拟态与主题变量，深浅色主题都能自适应。
   连续触发会多条从上往下叠放（top 由 JS 逐条累加计算），
   所以 top 也纳入过渡：某一条消失时，剩下的会平滑上移而不是瞬移。 */
.mg-notice {
    position: fixed;
    left: 50%;
    top: 24px;
    transform: translate(-50%, -16px);
    z-index: 10050;
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: min(88vw, 460px);
    padding: 12px 18px;
    border-radius: 14px;
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-primary, rgba(255, 255, 255, 0.94));
    background: var(--glass-bg-strong, rgba(255, 255, 255, 0.12));
    border: 1px solid var(--glass-border, rgba(255, 255, 255, 0.20));
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease, transform 0.22s ease, top 0.22s ease;
}
.mg-notice.show {
    opacity: 1;
    transform: translate(-50%, 0);
}
.mg-notice::before {
    content: "ⓘ";
    flex: 0 0 auto;
    font-size: 16px;
    opacity: 0.85;
}
@media (max-width: 768px) {
    .mg-notice {
        top: 14px;
        font-size: 13px;
        padding: 10px 14px;
    }
}

/* ===== 星历活动（往期活动档案）=====
   三级钻取：活动卡片网格 → 期数纵向列表 → 期数详情（视频/人类名单/备注）。
   沿用站点玻璃拟态与主题变量；深浅色主题自适应。 */
.past-acts-sub {
    margin: 0 0 16px;
    font-size: 13px;
    line-height: 1.7;
    color: var(--text-secondary, rgba(255, 255, 255, 0.55));
}

.past-acts-body {
    min-height: 120px;
}

/* ---------- 加载态 / 空态：与帖子卡片同一套 spinner 与空态排版 ---------- */
.past-acts-loading,
.past-acts-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 40px;
    color: rgba(255, 255, 255, 0.5);
}
.past-acts-empty {
    color: rgba(255, 255, 255, 0.4);
}
.past-acts-spinner {
    width: 32px;
    height: 32px;
    animation: pa-spin 1s linear infinite;
}
@keyframes pa-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ---------- 面包屑 + 返回 ---------- */
.past-acts-crumb {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 16px;
    font-size: 13px;
    color: var(--text-secondary, rgba(255, 255, 255, 0.55));
}
.past-acts-crumb-item {
    background: none;
    border: 0;
    padding: 0;
    font-size: 13px;
    color: var(--accent, #7aa5ff);
    cursor: pointer;
}
.past-acts-crumb-item:hover { text-decoration: underline; }
.past-acts-crumb-item[aria-disabled="true"] {
    color: var(--text-secondary, rgba(255, 255, 255, 0.55));
    cursor: default;
    pointer-events: none;
}
.past-acts-crumb-sep { opacity: 0.5; }

.past-acts-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 16px;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 13px;
    color: var(--text, rgba(255, 255, 255, 0.94));
    background: var(--glass-bg-subtle, rgba(255, 255, 255, 0.06));
    border: 1px solid var(--glass-border-subtle, rgba(255, 255, 255, 0.10));
    cursor: pointer;
    transition: background 0.25s ease, border-color 0.25s ease;
}
.past-acts-back:hover {
    background: var(--glass-bg-strong, rgba(255, 255, 255, 0.12));
    border-color: var(--glass-border, rgba(255, 255, 255, 0.20));
}

/* ---------- 第一级：活动卡片网格 ---------- */
.past-acts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 14px;
}
.past-acts-act {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px;
    text-align: left;
    border-radius: 16px;
    color: inherit;
    font: inherit;
    cursor: pointer;
    background: rgba(var(--accent-rgb, 120, 160, 255), 0.06);
    border: 1px solid rgba(var(--accent-rgb, 120, 160, 255), 0.12);
    transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}
.past-acts-act:hover,
.past-acts-act:focus-visible {
    background: rgba(var(--accent-rgb, 120, 160, 255), 0.1);
    border-color: rgba(var(--accent-rgb, 120, 160, 255), 0.24);
    transform: translateY(-2px);
    outline: none;
}
.past-acts-act-name {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.5;
}
.past-acts-act-intro {
    font-size: 12.5px;
    line-height: 1.7;
    color: var(--text-secondary, rgba(255, 255, 255, 0.55));
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.past-acts-act-foot {
    margin-top: auto;
    padding-top: 4px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 12px;
    color: var(--text-secondary, rgba(255, 255, 255, 0.55));
}
.past-acts-act-count {
    flex: 0 0 auto;
    padding: 2px 9px;
    border-radius: 999px;
    font-size: 11.5px;
    color: var(--accent, #7aa5ff);
    background: rgba(var(--accent-rgb, 120, 160, 255), 0.14);
}

/* ---------- 第二级：活动头部 + 期数纵向列表 ---------- */
.past-acts-act-head {
    margin-bottom: 18px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--glass-border-subtle, rgba(255, 255, 255, 0.10));
}
.past-acts-act-title {
    margin: 0 0 8px;
    font-size: 19px;
    font-weight: 700;
    line-height: 1.5;
}
.past-acts-act-meta {
    margin: 0 0 10px;
    font-size: 13px;
    color: var(--text-secondary, rgba(255, 255, 255, 0.55));
}
.past-acts-act-desc {
    margin: 0;
    font-size: 13.5px;
    line-height: 1.8;
    white-space: pre-wrap;
    word-break: break-word;
}

.past-acts-rounds {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.past-acts-round {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 14px 16px;
    text-align: left;
    border-radius: 14px;
    color: inherit;
    font: inherit;
    cursor: pointer;
    background: rgba(var(--accent-rgb, 120, 160, 255), 0.06);
    border: 1px solid rgba(var(--accent-rgb, 120, 160, 255), 0.12);
    transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}
.past-acts-round:hover,
.past-acts-round:focus-visible {
    background: rgba(var(--accent-rgb, 120, 160, 255), 0.1);
    border-color: rgba(var(--accent-rgb, 120, 160, 255), 0.24);
    transform: translateY(-2px);
    outline: none;
}
.past-acts-round-no {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 13px;
    font-weight: 700;
    color: var(--accent, #7aa5ff);
    background: rgba(var(--accent-rgb, 120, 160, 255), 0.14);
}
.past-acts-round-main { flex: 1 1 auto; min-width: 0; }
.past-acts-round-title {
    font-size: 14.5px;
    font-weight: 600;
    line-height: 1.5;
    word-break: break-word;
}
.past-acts-round-meta {
    margin-top: 4px;
    font-size: 12px;
    color: var(--text-secondary, rgba(255, 255, 255, 0.55));
}
.past-acts-round-go {
    flex: 0 0 auto;
    opacity: 0.5;
}

/* ---------- 第三级：期数详情 ---------- */
.past-acts-detail-head {
    margin-bottom: 18px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--glass-border-subtle, rgba(255, 255, 255, 0.10));
}
.past-acts-detail-title {
    margin: 0 0 6px;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.5;
}
.past-acts-detail-act {
    font-size: 13px;
    color: var(--text-secondary, rgba(255, 255, 255, 0.55));
}
.past-acts-section-label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 12px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary, rgba(255, 255, 255, 0.55));
}
.past-acts-block { margin-bottom: 22px; }
.past-acts-block:last-child { margin-bottom: 0; }

.past-acts-video {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 11px 18px;
    border-radius: 12px;
    font-size: 13.5px;
    text-decoration: none;
    color: var(--accent, #7aa5ff);
    background: rgba(var(--accent-rgb, 120, 160, 255), 0.10);
    border: 1px solid rgba(var(--accent-rgb, 120, 160, 255), 0.20);
    transition: background 0.25s ease, border-color 0.25s ease;
    /* 超长视频链接（B 站那种带一堆跟踪参数的）必须能收缩，
       否则 flex 子项的自动最小尺寸会把整张卡片顶宽 */
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
}
.past-acts-video:hover {
    background: rgba(var(--accent-rgb, 120, 160, 255), 0.18);
    border-color: rgba(var(--accent-rgb, 120, 160, 255), 0.34);
}
.past-acts-video-text {
    /* min-width:0 是关键：flex 子项默认 min-width:auto = 内容宽度，
       不给 0 的话 nowrap 的长 URL 拒绝收缩，省略号也不会生效 */
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.past-acts-none {
    font-size: 13px;
    color: var(--text-secondary, rgba(255, 255, 255, 0.55));
}

/* 人类名单：复用团队成员卡的视觉（圆角胶囊，无头像时退化为姓名片） */
.past-acts-members {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.past-acts-member {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px 7px 8px;
    border-radius: 999px;
    font-size: 13px;
    background: rgba(var(--accent-rgb, 120, 160, 255), 0.08);
    border: 1px solid rgba(var(--accent-rgb, 120, 160, 255), 0.14);
}
.past-acts-member-ava {
    flex: 0 0 auto;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 700;
    color: var(--accent, #7aa5ff);
    background: rgba(var(--accent-rgb, 120, 160, 255), 0.16);
}

.past-acts-note {
    margin: 0;
    font-size: 13.5px;
    line-height: 1.8;
    white-space: pre-wrap;
    word-break: break-word;
}

@media (max-width: 768px) {
    .past-acts-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
    .past-acts-round { padding: 12px 14px; gap: 11px; }
    .past-acts-detail-title { font-size: 16.5px; }
    .past-acts-act-title { font-size: 17px; }
}

/* ===== 星历活动：封面与人员头像（第二轮增强）=====
   活动封面 / 期数视频封面 / 提出人头像 / 人类名单头像。
   图片地址由后端限定在 data/ 与 avatars/ 下，这里仍再做一次前缀白名单校验。 */
.past-acts-act-cover,
.past-acts-act-cover-lg,
.past-acts-round-thumb,
.past-acts-video-cover {
    overflow: hidden;
    background: rgba(var(--accent-rgb, 120, 160, 255), 0.08);
    border: 1px solid rgba(var(--accent-rgb, 120, 160, 255), 0.14);
}
.past-acts-act-cover img,
.past-acts-act-cover-lg img,
.past-acts-round-thumb img,
.past-acts-video-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* 第一级卡片封面：16:9，贴在卡片顶部 */
.past-acts-act-cover {
    margin: -16px -16px 12px;
    aspect-ratio: 16 / 9;
    border-left: 0;
    border-right: 0;
    border-top: 0;
    border-radius: 16px 16px 0 0;
}
/* 无封面的卡片不需要负边距 */
.past-acts-act:not(:has(.past-acts-act-cover)) { padding-top: 16px; }

/* 第二级活动头部大封面 */
.past-acts-act-cover-lg {
    margin-bottom: 14px;
    aspect-ratio: 16 / 9;
    border-radius: 14px;
}

/* 期数列表里的视频封面缩略图 */
.past-acts-round-thumb {
    flex: 0 0 auto;
    width: 78px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    font-size: 11px;
    color: var(--text-secondary, rgba(255, 255, 255, 0.55));
}

/* 第三级视频封面 */
.past-acts-video-cover {
    margin-bottom: 12px;
    aspect-ratio: 16 / 9;
    max-width: 460px;
    border-radius: 12px;
}

/* 提出人行：标签 + 人员胶囊 */
.past-acts-proposers {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}
.past-acts-proposers-label {
    flex: 0 0 auto;
    font-size: 12px;
    color: var(--text-secondary, rgba(255, 255, 255, 0.55));
}
/* 人员头像：有图时铺满，无图时显示名字首字 */
.past-acts-member-ava {
    flex: 0 0 auto;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 700;
    color: var(--accent, #7aa5ff);
    background: rgba(var(--accent-rgb, 120, 160, 255), 0.16);
}
.past-acts-member-ava img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

@media (max-width: 768px) {
    .past-acts-act-cover { margin: -14px -14px 10px; }
    .past-acts-round-thumb { width: 62px; height: 36px; }
    .past-acts-video-cover { max-width: 100%; }
}

/* ===== 星历活动：收缩保护（防止长内容把卡片顶宽）=====
   flex/grid 子项默认 min-width:auto = 内容最小宽度，遇到撑不缩的长内容
   （超长视频链接、长昵称、长简介）会把整张卡片乃至页面顶宽，100% 缩放下
   卡片右侧被裁出可视区。这里统一给 0，让内容在卡片内部省略/换行。 */
.main-page,
.past-acts-card,
#pastActsBody,
.past-acts-block,
.past-acts-grid,
.past-acts-rounds,
.past-acts-act,
.past-acts-round,
.past-acts-round-main,
.past-acts-act-foot,
.past-acts-member,
.past-acts-proposers {
    min-width: 0;
}

/* 卡片封面用负边距贴到卡片边缘，需确认不会溢出卡片圆角 */
.past-acts-card { overflow: hidden; }

/* 期数摘要与活动名：长串英文/链接也能断行 */
.past-acts-round-meta,
.past-acts-act-name {
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* 人员名字：长昵称也要能收缩断行，不能把胶囊撑宽 */
.past-acts-member-name {
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* 面包屑里的活动名/期数名可能很长，允许收缩断行 */
.past-acts-crumb-item {
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
    text-align: left;
}

/* ============================================================
   余额去向弹窗（点击前台「网站余额」卡片打开）
   去向文本在后台「站点设置 → 网站余额」里填写。
   ============================================================ */
.balance-note-overlay {
    position: fixed;
    inset: 0;
    z-index: 10012;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(0, 0, 0, .55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
.balance-note-overlay.show { display: flex; }

.balance-note-dialog {
    width: 100%;
    max-width: 460px;
    max-height: 80vh;
    overflow: auto;
    background: rgba(23, 31, 48, .96);
    color: #e8edf6;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 14px;
    padding: 18px 20px;
    box-shadow: 0 18px 60px rgba(0, 0, 0, .5);
}
.balance-note-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}
.balance-note-head h3 {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}
.balance-note-close {
    background: none;
    border: 0;
    font-size: 22px;
    line-height: 1;
    color: rgba(255, 255, 255, .6);
    cursor: pointer;
}
.balance-note-close:hover { color: #fff; }

.balance-note-body {
    font-size: 13.5px;
    line-height: 1.8;
    color: #cfd8e6;
    white-space: pre-wrap;
    word-break: break-word;
    overflow-wrap: anywhere;
}

/* 有去向时余额卡片可点击 */
.balance-card.has-note { cursor: pointer; }
.balance-card.has-note:hover .balance-label { color: #8fc0ff; }

@media (max-width: 768px) {
    .balance-note-dialog { padding: 15px 16px; }
}

/* ============================================================
   教程视频（B 站式网格 + 站内播放）
   入口卡复用 act-submit-card；此处是弹窗网格与播放器。
   ============================================================ */
.tut-overlay {
    position: fixed;
    inset: 0;
    z-index: 10010;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(0, 0, 0, .62);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
.tut-overlay.show { display: flex; }
.tut-player-overlay { z-index: 10012; background: rgba(0, 0, 0, .72); }

.tut-dialog {
    width: 100%;
    max-width: 1080px;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    background: rgba(23, 31, 48, .97);
    color: #e8edf6;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 16px;
    padding: 18px 20px;
    box-shadow: 0 18px 60px rgba(0, 0, 0, .5);
}
.tut-player-dialog { max-width: 860px; }

.tut-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}
.tut-head h3 {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 0;
    font-size: 17px;
    font-weight: 600;
    flex: 1 1 auto;
    min-width: 0;
    overflow-wrap: anywhere;
}
.tut-count { font-size: 12px; color: rgba(255, 255, 255, .5); white-space: nowrap; }
.tut-close {
    background: none;
    border: 0;
    font-size: 24px;
    line-height: 1;
    color: rgba(255, 255, 255, .6);
    cursor: pointer;
}
.tut-close:hover { color: #fff; }

.tut-back {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 11px;
    border-radius: 999px;
    font-size: 12px;
    color: rgba(255, 255, 255, .78);
    background: rgba(255, 255, 255, .07);
    border: 1px solid rgba(255, 255, 255, .12);
    cursor: pointer;
    flex: 0 0 auto;
}
.tut-back:hover { background: rgba(255, 255, 255, .13); }

.tut-body { overflow: auto; }

/* ---- B 站式网格 ---- */
.tut-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}
.tut-card {
    display: flex;
    flex-direction: column;
    padding: 0;
    text-align: left;
    font: inherit;
    color: inherit;
    background: rgba(255, 255, 255, .05);
    border: 1px solid rgba(255, 255, 255, .09);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.tut-card:hover,
.tut-card:focus-visible {
    transform: translateY(-3px);
    border-color: rgba(106, 161, 255, .5);
    box-shadow: 0 10px 28px rgba(0, 0, 0, .35);
    outline: none;
}

.tut-thumb {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    background: #141a24;
    overflow: hidden;
}
.tut-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.tut-thumb-ph {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, .35);
    background: linear-gradient(135deg, rgba(106,161,255,.18), rgba(80,60,180,.22));
}
.tut-thumb-play {
    position: absolute;
    right: 8px;
    bottom: 8px;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #fff;
    background: rgba(0, 0, 0, .55);
    opacity: .85;
    transition: opacity .2s ease, transform .2s ease;
}
.tut-card:hover .tut-thumb-play { opacity: 1; transform: scale(1.1); }

.tut-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 10px 12px 12px;
}
.tut-card-title {
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.45;
    color: #e8edf6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.tut-card-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 11.5px;
    color: rgba(255, 255, 255, .45);
}

.tut-empty {
    grid-column: 1 / -1;
    padding: 46px 14px;
    text-align: center;
    font-size: 13px;
    color: rgba(255, 255, 255, .5);
}

/* ---- 播放器 ---- */
.tut-player-wrap {
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 16 / 9;
}
.tut-player-wrap video {
    width: 100%;
    height: 100%;
    display: block;
    background: #000;
}
.tut-player-meta {
    margin: 10px 2px 0;
    font-size: 12px;
    color: rgba(255, 255, 255, .5);
}

@media (max-width: 768px) {
    .tut-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
    .tut-dialog { padding: 14px; max-height: 92vh; }
}

/* 教程播放器：提示文字 + 跳转原地址按钮 */
.tut-player-hint {
    margin: 10px 2px 0;
    font-size: 12.5px;
    color: rgba(255, 201, 120, .9);
}
.tut-player-ext { margin: 8px 2px 0; }
.tut-ext-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    color: #eaf1ff;
    background: rgba(106, 161, 255, .22);
    border: 1px solid rgba(106, 161, 255, .46);
    text-decoration: none;
    transition: background .2s ease, border-color .2s ease;
}
.tut-ext-btn:hover { background: rgba(106, 161, 255, .36); border-color: rgba(106, 161, 255, .64); }
