/* ==================================================================
   春晚轻量应用 —— 全站样式
   结构：变量 / 基础 / 页头 / 按钮 / 导航 / 轮播 / 卡片 / 表单提示 / 响应式
   ================================================================== */

:root {
    --primary-red: #c81623;
    --dark-red: #b71c1c;
    --bg-gradient: linear-gradient(135deg, #3b0a0a 0%, #7a0c0c 100%);
    --glass-bg: rgba(255, 255, 255, 0.15);
    --glass-border: rgba(255, 255, 255, 0.2);
    --text-light: #ffffff;
    --text-muted: rgba(255, 255, 255, 0.8);

    /* 金色点缀（Logo / 按钮 / 输入框聚焦 / 链接） */
    --gold-1: #ffeaa7;
    --gold-2: #f6d365;
    --gold-3: #c9982e;
    /* 金色按钮渐变两端（--gold-btn-1 浅 → --gold-btn-2 深） */
    --gold-btn-1: #f9e08a;
    --gold-btn-2: #f6d365;
    --gold-btn-3: #c9982e;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: var(--bg-gradient);
    min-height: 100vh;
    color: var(--text-light);
    -webkit-font-smoothing: antialiased;
}

body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.6) 100%);
    pointer-events: none;
    z-index: -1;
}

code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.92em;
    padding: 1px 5px;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.3);
}

.hidden {
    display: none !important;
}

/* ---------------- 页头 ---------------- */

.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 100;
}

/* Logo：点击返回首页（用 a 元素承载，保持原来的 flex 布局） */
.logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    border-radius: 6px;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.2s, filter 0.2s;
}

.logo:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
}

.logo:active {
    transform: translateY(0);
}

.logo:focus-visible {
    outline: 2px solid rgba(246, 211, 101, 0.7);
    outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
    .logo {
        transition: none;
    }
}

.logo-svg {
    display: block;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.35));
}

.logo-placeholder {
    width: 80px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-red), var(--dark-red));
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    letter-spacing: 1px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

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

.user-info {
    font-size: 13px;
    color: var(--text-muted);
    max-width: 8em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 页头「欢迎，xxx」现在是通往个人主页的链接 */
a.user-info {
    text-decoration: none;
    transition: color 0.2s;
}

a.user-info:hover,
a.user-info:focus-visible {
    color: var(--gold-2);
    outline: none;
}

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

.btn {
    display: inline-block;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.4;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    color: #fff;
    font-family: inherit;
}

/* 主按钮：金色实心（深红字），与红色 Logo 形成主次，避免「红撞红」 */
.btn-primary {
    background: linear-gradient(180deg, var(--gold-btn-1) 0%, var(--gold-btn-2) 55%, var(--gold-btn-3) 100%);
    color: #5c070b;
    font-weight: 700;
    box-shadow: 0 2px 10px rgba(230, 189, 82, 0.42);
}

.btn-primary:hover {
    background: linear-gradient(180deg, #ffeaa7 0%, var(--gold-btn-1) 55%, #e0b74a 100%);
    box-shadow: 0 4px 16px rgba(230, 189, 82, 0.6);
}

.btn-primary:active {
    box-shadow: 0 1px 5px rgba(230, 189, 82, 0.45);
    transform: translateY(1px);
}

/* 次按钮：金色描边 */
.btn-outline {
    background: transparent;
    border: 1px solid rgba(230, 183, 74, 0.8);
    color: var(--gold-btn-2);
}

.btn-outline:hover {
    background: rgba(246, 211, 101, 0.14);
    border-color: var(--gold-btn-1);
    color: var(--gold-1);
}

.btn-danger {
    background: rgba(200, 22, 35, 0.75);
    border: 1px solid rgba(255, 120, 120, 0.5);
}

.btn-danger:hover {
    background: rgba(200, 22, 35, 0.95);
}

.btn-sm {
    padding: 5px 12px;
    font-size: 12px;
}

.btn:disabled,
.btn[disabled] {
    opacity: 0.55;
    cursor: not-allowed;
    box-shadow: none;
}

/* ---------------- 标签导航 ---------------- */

.tab-nav {
    display: flex;
    background: rgba(0, 0, 0, 0.4);
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 64px;
    z-index: 99;
}

.tab-btn {
    flex: 1;
    padding: 12px 0;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
    border-bottom: 2px solid transparent;
}

.tab-btn.active {
    color: #fff;
    border-bottom-color: var(--primary-red);
    font-weight: bold;
}

/* ---------------- 主体 ---------------- */

.main-content {
    padding: 16px;
}

.banner-container {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    margin-bottom: 20px;
}

.banner-slider {
    display: flex;
    transition: transform 0.5s ease;
    height: 200px;
    /* 支持鼠标拖拽 / 触摸滑动切换 */
    cursor: grab;
    touch-action: pan-y;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.banner-slider:focus-visible {
    outline: 2px solid rgba(246, 211, 101, 0.7);
    outline-offset: -2px;
}

.banner-slider.grabbing {
    cursor: grabbing;
}

.banner-slide {
    min-width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
}

.banner-placeholder {
    font-size: 24px;
    font-weight: bold;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    letter-spacing: 2px;
    padding: 0 12px;
    text-align: center;
}

/* 轮播文案（内容来自 activities 表） */
.banner-text {
    padding: 0 56px;
    text-align: center;
    color: #fff;
}

.banner-title {
    font-size: 24px;
    font-weight: bold;
    letter-spacing: 2px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.banner-desc {
    margin-top: 8px;
    font-size: 14px;
    opacity: 0.9;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
}

.banner-time {
    margin-top: 10px;
    font-size: 12px;
    letter-spacing: 1px;
    opacity: 0.85;
}

/* ---------------- 活动卡片 ---------------- */

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

.activity-card .activity-head h3 {
    margin: 0;
}

.activity-card .activity-time {
    flex: none;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.65);
    white-space: nowrap;
}

/* 轮播指示点：绝对定位于轮播图底部居中 */
.banner-dots {
    position: absolute;
    bottom: 10px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 6px;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s;
}

.dot.active {
    background: #fff;
    width: 20px;
    border-radius: 4px;
}

/* 左右箭头按钮 */
.banner-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    width: 38px;
    height: 38px;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    line-height: 1;
    color: #fff;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.25);
    cursor: pointer;
    opacity: 0.85;
    transition: opacity 0.25s, background 0.25s, transform 0.15s;
    -webkit-tap-highlight-color: transparent;
}

.banner-arrow:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.6);
}

.banner-arrow:active {
    transform: translateY(-50%) scale(0.92);
}

.banner-arrow-prev {
    left: 10px;
    padding-right: 3px;
}

.banner-arrow-next {
    right: 10px;
    padding-left: 3px;
}

/* ---------------- 玻璃卡片 ---------------- */

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s;
}

.glass-card:hover {
    transform: translateY(-2px);
}

.glass-card h3 {
    margin: 0 0 6px;
    font-size: 17px;
    color: var(--text-light);
}

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

.glass-card small {
    display: inline-block;
    margin-top: 8px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
}

.activity-list,
.notice-list {
    display: block;
}

/* ---------------- 首屏占位：预留高度，防 CLS（布局抖动） ----------------
   index.html 的活动 / 公告 / 节目单 / 聊天室都是「先占位、后异步填充」。占位块若比
   真实内容矮，数据到达时区块被撑高，就会把下方元素整体顶下去。解决办法是给容器预留
   min-height（约等于一条真实内容的高度），让「加载中」和「加载完成」两态高度一致：
   内容到达时只做原地替换，下方元素不动，CLS 趋近 0。
   数值随断点变化（卡片内边距、聊天记录区高度在移动端更小），故用变量统一维护，
   移动端在下方 @media (max-width: 767px) 里覆盖。
   注意：预留高度只在「内容不超过它」时才算无抖动；列表条数由数据决定，这里按
   「一条卡片 + 可能出现的『查看全部』按钮」取值。条数更多时列表会在末尾向下增长，
   但那不会把首屏已有的元素顶出视口。 */
:root {
    --reserve-list: 132px;      /* 活动 / 节目单：约一条 .glass-card */
    --reserve-list-more: 160px; /* 公告 / 节目单：一条卡片 + 「查看全部」按钮 */
    --reserve-chat: 460px;      /* 聊天室：头部 + 消息区 + 输入区 */
}

/* 活动列表 / 节目单：容器先撑住高度，占位卡被替换时下方元素不移动 */
#activity-list {
    min-height: var(--reserve-list);
}

#notice-list,
#program-list {
    min-height: var(--reserve-list-more);
}

/* 聊天室：占位块（#chat-holder 里的 .glass-card）与真实骨架（.chat-card）共用
   同一份预留高度，替换时高度不变 */
#chat-holder,
.chat-card {
    min-height: var(--reserve-chat);
}

#chat-holder {
    margin-top: 20px; /* 与 .chat-card 的 margin-top 对齐，替换时不留空档 */
}

.section-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 12px;
    padding-left: 8px;
    border-left: 4px solid var(--primary-red);
}

/* ---------------- 聊天室 ---------------- */

.chat-card {
    position: relative;
    margin-top: 20px;
    padding: 14px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid var(--glass-border);
}

.chat-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.chat-head .section-title {
    margin-bottom: 0;
}

.chat-head-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: var(--text-muted);
}

.chat-state {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border-radius: 999px;
    border: 1px solid var(--glass-border);
    background: rgba(0, 0, 0, 0.25);
}

.chat-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #9e9e9e;
}

.chat-state[data-state="online"] .chat-dot {
    background: #5ddc8b;
}

.chat-state[data-state="connecting"] .chat-dot {
    background: var(--gold-2);
    animation: chat-pulse 1s ease-in-out infinite;
}

.chat-state[data-state="offline"] .chat-dot,
.chat-state[data-state="error"] .chat-dot {
    background: #ff7b7b;
}

@keyframes chat-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.chat-messages {
    display: flex;
    flex-direction: column;
    gap: 10px;
    height: 320px;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 10px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.08);
    scroll-behavior: smooth;
}

.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.22);
    border-radius: 999px;
}

.chat-item {
    display: flex;
    gap: 8px;
    align-items: flex-start;
}

.chat-item.mine {
    flex-direction: row-reverse;
}

.chat-av {
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    background: hsl(var(--av-h, 0), 45%, 34%);
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.chat-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    max-width: calc(100% - 48px);
    /* 气泡按内容收缩：不被上方「昵称 + 角色 + 时间」撑宽，短消息不留空白 */
    align-items: flex-start;
}

.chat-item.mine .chat-body {
    align-items: flex-end;
}

.chat-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-muted);
}

.chat-item.mine .chat-meta {
    flex-direction: row-reverse;
}

.chat-name {
    font-weight: 600;
    color: var(--text-light);
}

.chat-role {
    font-size: 11px;
    padding: 1px 6px;
    border-radius: 999px;
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
}

.role-admin {
    color: var(--gold-1);
    border-color: rgba(246, 211, 101, 0.55);
    background: rgba(246, 211, 101, 0.12);
}

.role-planner {
    color: #ffd0d0;
    border-color: rgba(216, 66, 66, 0.6);
    background: rgba(216, 66, 66, 0.18);
}

.role-guest {
    border-style: dashed;
}

.chat-time {
    font-size: 11px;
    opacity: 0.75;
}

.chat-text {
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.55;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-light);
    word-break: break-word;
    white-space: pre-wrap;
    /* 气泡宽度跟随文字内容，短消息不会拖出长长的空白（像是多了空格） */
    align-self: flex-start;
    width: fit-content;
    max-width: 100%;
}

.chat-item.mine .chat-text {
    background: rgba(246, 211, 101, 0.18);
    align-self: flex-end;
    border-color: rgba(246, 211, 101, 0.45);
}

.chat-item.system {
    justify-content: center;
}

.chat-item.system .chat-text {
    max-width: 92%;
    text-align: center;
    font-size: 12.5px;
    color: var(--text-muted);
    background: rgba(0, 0, 0, 0.28);
    border-style: dashed;
}

.chat-item.system.warn .chat-text {
    color: #ffd7d7;
    border-color: rgba(255, 120, 120, 0.5);
}

.chat-empty {
    margin: auto;
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
}

/* ---------------- 撤回 ---------------- */

/* 撤回提示（由 recall 帧生成） */
.chat-item.system.recall .chat-text {
    color: #ffe6a8;
    border-color: rgba(246, 211, 101, 0.35);
    background: rgba(0, 0, 0, 0.3);
}

/* 长按选中的消息给一点反馈，让用户知道菜单是从哪条消息弹出来的 */
.chat-item.menu-open .chat-text {
    border-color: rgba(246, 211, 101, 0.7);
    background: rgba(246, 211, 101, 0.22);
}

/* ---------------- 消息审核状态（举报 / 待审核 / 已处理） ---------------- */

/* 状态徽章：跟在「昵称 + 角色」之后、时间之前，用颜色区分严重程度 */
.chat-badge {
    flex: none;
    font-size: 10.5px;
    line-height: 1.5;
    padding: 0 6px;
    border-radius: 999px;
    border: 1px solid var(--glass-border);
    white-space: nowrap;
}

.chat-badge.reported {
    color: #ffd7a1;
    border-color: rgba(246, 211, 101, 0.55);
    background: rgba(246, 211, 101, 0.14);
}

.chat-badge.pending {
    color: #ffe0a3;
    border-color: rgba(246, 211, 101, 0.45);
    background: rgba(246, 211, 101, 0.1);
}

.chat-badge.handled {
    color: #b7f7c8;
    border-color: rgba(120, 220, 150, 0.5);
    background: rgba(60, 160, 90, 0.2);
}

.chat-badge.recalled {
    color: #e0e0e0;
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.08);
}

/* 被举报 / 待审核：淡黄描边提示，但不遮挡正文（避免影响他人阅读） */
.chat-item.reported .chat-text,
.chat-item.pending .chat-text {
    border-color: rgba(246, 211, 101, 0.5);
    box-shadow: 0 0 0 1px rgba(246, 211, 101, 0.18);
}

/* 管理员已判定违规：绿色描边表示「已处理」 */
.chat-item.handled .chat-text {
    border-color: rgba(120, 220, 150, 0.5);
}

/* 被撤回（含后台管理员撤回）：整条淡化并划掉正文 */
.chat-item.recalled {
    opacity: 0.62;
}

.chat-item.recalled .chat-text {
    text-decoration: line-through;
    text-decoration-color: rgba(255, 255, 255, 0.55);
    border-style: dashed;
}

/* 举报按钮用暖黄强调，与「撤回」的红色区分开 */
.chat-menu-btn.chat-menu-report {
    color: var(--gold-1);
}

.chat-menu-btn.chat-menu-report:hover,
.chat-menu-btn.chat-menu-report:focus-visible {
    background: rgba(246, 211, 101, 0.22);
    color: #fff;
}

/* ---------------- 回复 ---------------- */

/* 气泡里的引用块：被回复者的昵称 + 内容摘要（快照，不随原消息变化） */
.chat-quote {
    display: block;
    margin-bottom: 6px;
    padding: 4px 8px;
    border-left: 3px solid rgba(246, 211, 101, 0.65);
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.24);
    font-size: 12.5px;
    line-height: 1.5;
    color: var(--text-muted);
    cursor: pointer;
    /* 长引用最多显示两行，避免把气泡撑得过高 */
    max-height: 3.2em;
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
}

.chat-quote:hover,
.chat-quote:focus-visible {
    background: rgba(0, 0, 0, 0.36);
    outline: none;
}

.chat-quote-name {
    margin-right: 6px;
    color: var(--gold-2);
    font-weight: 600;
}

.chat-quote-text {
    opacity: 0.85;
}
/* 点引用块跳到原消息时：金圈 + 脉冲强调，并**持续保留**高亮，
   让用户在长列表里一眼认出被引用的到底是哪一条 */
.chat-item.quote-target .chat-text {
    border-color: rgba(246, 211, 101, 0.9);
    box-shadow: 0 0 0 3px rgba(246, 211, 101, 0.28), 0 0 18px rgba(246, 211, 101, 0.4);
    animation: quote-hit 1.1s ease-in-out 2;
}

@keyframes quote-hit {
    0%, 100% {
        box-shadow: 0 0 0 3px rgba(246, 211, 101, 0.28), 0 0 18px rgba(246, 211, 101, 0.4);
    }
    50% {
        border-color: #ffe4a0;
        box-shadow: 0 0 0 7px rgba(246, 211, 101, 0.14), 0 0 28px rgba(246, 211, 101, 0.7);
    }
}

/* 「回到引用处」时，让原引用条闪一下，形成往返呼应 */
.chat-quote.quote-return {
    background: rgba(246, 211, 101, 0.32);
    box-shadow: 0 0 0 2px rgba(246, 211, 101, 0.5);
}

/* 跳走之后右下角浮出的「回到引用处」按钮（定位基准是 .chat-card） */
.chat-back-quote {
    position: absolute;
    right: 22px;
    bottom: 82px;
    z-index: 5;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid rgba(246, 211, 101, 0.5);
    background: rgba(38, 10, 10, 0.92);
    color: var(--gold-1);
    font-family: inherit;
    font-size: 12px;
    line-height: 1.4;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
    animation: chat-menu-in 0.16s ease-out;
    -webkit-tap-highlight-color: transparent;
}

.chat-back-quote[hidden] {
    display: none;
}

.chat-back-quote:hover,
.chat-back-quote:focus-visible {
    background: rgba(200, 22, 35, 0.62);
    color: #fff;
    outline: none;
}

@media (prefers-reduced-motion: reduce) {
    .chat-item.quote-target .chat-text {
        animation: none;
    }
    .chat-back-quote {
        animation: none;
    }
}

/* 输入框上方的「正在回复」引用条（未回复时带 hidden，不占位） */
.chat-reply-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 10px 2px 0;
    padding: 6px 10px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.26);
    border: 1px solid rgba(246, 211, 101, 0.28);
    font-size: 12.5px;
    color: var(--text-muted);
}

/* hidden 的优先级要压过 display:flex */
.chat-reply-bar[hidden] {
    display: none;
}

.chat-reply-info {
    display: flex;
    align-items: baseline;
    gap: 6px;
    flex: 1;
    min-width: 0;
}

.chat-reply-label {
    flex: none;
}

.chat-reply-label strong {
    color: var(--gold-2);
    font-weight: 600;
}

.chat-reply-preview {
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    opacity: 0.85;
}

.chat-reply-cancel {
    flex: none;
    width: 22px;
    height: 22px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: inherit;
    font-size: 15px;
    line-height: 1;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.chat-reply-cancel:hover,
.chat-reply-cancel:focus-visible {
    background: rgba(200, 22, 35, 0.55);
    color: #fff;
    outline: none;
}

/* 撤回菜单：fixed 定位，坐标由 chat.js 按消息位置算好 */
.chat-menu {
    position: fixed;
    z-index: 1200;
    min-width: 96px;
    padding: 4px;
    border-radius: 10px;
    background: rgba(38, 10, 10, 0.96);
    border: 1px solid rgba(246, 211, 101, 0.35);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
    animation: chat-menu-in 0.14s ease-out;
}

.chat-menu-btn {
    display: block;
    width: 100%;
    padding: 8px 14px;
    border: none;
    border-radius: 7px;
    background: transparent;
    color: #ffd7d7;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.4;
    text-align: left;
    cursor: pointer;
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
}

.chat-menu-btn:hover,
.chat-menu-btn:focus-visible {
    background: rgba(200, 22, 35, 0.38);
    color: #fff;
    outline: none;
}

@keyframes chat-menu-in {
    from {
        opacity: 0;
        transform: translateY(4px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (prefers-reduced-motion: reduce) {
    .chat-menu {
        animation: none;
    }
}

/* 触屏设备关掉长按选取/系统菜单，把长按完整让给「撤回」（桌面端仍可正常选中复制） */
@media (pointer: coarse) {
    .chat-item {
        -webkit-user-select: none;
        user-select: none;
        -webkit-touch-callout: none;
    }
}
.chat-form {
    display: flex;
    flex: 1;
    min-width: 0;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    color: var(--text-light);
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--glass-border);
}

.chat-input:focus {
    outline: none;
    border-color: rgba(246, 211, 101, 0.6);
}

.chat-send {
    flex: 0 0 auto;
}

.chat-hint {
    margin-top: 8px;
    font-size: 12px;
    color: var(--text-muted);
}

.chat-hint a {
    color: var(--gold-2);
}

/* 被禁言时替代输入区的提示条（输入框仍保留，只是禁用） */
.chat-mute-tip {
    margin-top: 8px;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13px;
    color: #ffd9d9;
    background: rgba(200, 22, 35, 0.28);
    border: 1px solid rgba(255, 120, 120, 0.5);
}

.chat-mute-tip[hidden] {
    display: none;
} 

/* ---------------- 聊天室全屏 ---------------- */

/* 头部右侧的「全屏 / 退出全屏」切换按钮 */
.chat-fs-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 999px;
    border: 1px solid var(--glass-border);
    background: rgba(0, 0, 0, 0.25);
    color: var(--text-muted);
    font-size: 12px;
    font-family: inherit;
    line-height: 1.5;
    cursor: pointer;
    white-space: nowrap;
    transition: color 0.2s, border-color 0.2s, background 0.2s;
    -webkit-tap-highlight-color: transparent;
}

.chat-fs-btn:hover {
    color: var(--gold-1);
    border-color: rgba(246, 211, 101, 0.55);
    background: rgba(246, 211, 101, 0.12);
}

.chat-fs-btn:focus-visible {
    outline: 2px solid rgba(246, 211, 101, 0.6);
    outline-offset: 2px;
}

/* 全屏布局：原生全屏（:fullscreen）与降级模式（.chat-fullscreen）共用同一套样式 */
.chat-card:fullscreen,
.chat-card:-webkit-full-screen,
.chat-card.chat-fullscreen {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    height: 100vh;
    height: 100dvh;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 14px 16px calc(14px + env(safe-area-inset-bottom, 0px));
    border: none;
    border-radius: 0;
    background: linear-gradient(135deg, #3b0a0a 0%, #7a0c0c 100%);
    overflow: hidden;
    min-height: 0; /* 全屏时高度由 100vh 决定，别被首页的预留高度顶住 */
}

/* 全屏时内容限宽居中：宽屏下不至于把气泡拉成「一条长线」 */
.chat-card:fullscreen .chat-head,
.chat-card:-webkit-full-screen .chat-head,
.chat-card.chat-fullscreen .chat-head,
.chat-card:fullscreen .chat-messages,
.chat-card:-webkit-full-screen .chat-messages,
.chat-card.chat-fullscreen .chat-messages,
.chat-card:fullscreen .chat-form,
.chat-card:-webkit-full-screen .chat-form,
.chat-card.chat-fullscreen .chat-form,
.chat-card:fullscreen .chat-hint,
.chat-card:-webkit-full-screen .chat-hint,
.chat-card.chat-fullscreen .chat-hint,
.chat-card:fullscreen .chat-reply-bar,
.chat-card:-webkit-full-screen .chat-reply-bar,
.chat-card.chat-fullscreen .chat-reply-bar {
    width: 100%;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.chat-card:fullscreen .chat-head,
.chat-card:-webkit-full-screen .chat-head,
.chat-card.chat-fullscreen .chat-head {
    flex: none;
}

/* 消息区撑满剩余高度，输入框始终固定在底部 */
.chat-card:fullscreen .chat-messages,
.chat-card:-webkit-full-screen .chat-messages,
.chat-card.chat-fullscreen .chat-messages {
    flex: 1 1 auto;
    height: auto;
    min-height: 0;
}

.chat-card:fullscreen .chat-form,
.chat-card:-webkit-full-screen .chat-form,
.chat-card.chat-fullscreen .chat-form,
.chat-card:fullscreen .chat-hint,
.chat-card:-webkit-full-screen .chat-hint,
.chat-card.chat-fullscreen .chat-hint,
.chat-card:fullscreen .chat-reply-bar,
.chat-card:-webkit-full-screen .chat-reply-bar,
.chat-card.chat-fullscreen .chat-reply-bar {
    flex: none;
}

/* 降级全屏（不支持的浏览器）时锁住页面滚动 */
body.chat-fs-lock {
    overflow: hidden;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

/* ---------------- 提示 / 徽标 / 标签 ---------------- */

.flash {
    border-radius: 8px;
    padding: 10px 14px;
    margin-bottom: 12px;
    font-size: 14px;
}

.flash-error {
    background: rgba(200, 22, 35, 0.28);
    border: 1px solid rgba(255, 120, 120, 0.5);
}

.flash-ok {
    background: rgba(60, 160, 90, 0.25);
    border: 1px solid rgba(120, 220, 150, 0.5);
}

.flash ul {
    margin: 0;
    padding-left: 18px;
}

.status-badge {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 999px;
    border: 1px solid var(--glass-border);
}

.status-badge.published {
    color: #b7f7c8;
    border-color: rgba(120, 220, 150, 0.5);
    background: rgba(60, 160, 90, 0.22);
}

.status-badge.draft {
    color: #ffe0a3;
    border-color: rgba(246, 211, 101, 0.5);
    background: rgba(246, 211, 101, 0.12);
}

.status-badge.archived {
    color: #d8d8d8;
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.08);
}

.perm-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin: 8px 0 16px;
}

.perm-tag {
    font-size: 12px;
    padding: 3px 10px;
    border-radius: 999px;
    border: 1px solid var(--glass-border);
    background: rgba(0, 0, 0, 0.2);
    color: var(--text-muted);
}

.perm-tag.on {
    color: var(--gold-1);
    border-color: rgba(246, 211, 101, 0.55);
    background: rgba(246, 211, 101, 0.12);
}

.empty-tip {
    color: var(--text-muted);
    font-size: 14px;
    padding: 8px 0;
}

/* ---------------- 全局轻提示（toast） ---------------- */

.toast {
    position: fixed;
    top: 18px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 999;
    max-width: calc(100% - 32px);
    padding: 10px 18px;
    border-radius: 999px;
    font-size: 14px;
    line-height: 1.4;
    color: #fff;
    background: rgba(60, 160, 90, 0.92);
    border: 1px solid rgba(120, 220, 150, 0.6);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    pointer-events: none;
    animation: toast-in 0.32s ease-out backwards;
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.toast.hide {
    opacity: 0;
    transform: translateX(-50%) translateY(-12px);
}

@keyframes toast-in {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-14px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .toast {
        animation: none;
        transition: none;
    }
}

/* ---------------- 响应式 ---------------- */

@media (min-width: 768px) {
    .tab-nav {
        display: none;
    }
    .tab-panel {
        display: block !important;
    }
    .main-content {
        display: grid;
        grid-template-columns: 3fr 2fr;
        gap: 20px;
    }
    .banner-container {
        grid-column: 1 / -1;
        height: 300px;
    }
    .banner-slider {
        height: 300px;
    }
    #panel-activity {
        grid-column: 1;
    }
    #panel-notice {
        grid-column: 2;
    }
    /* 聊天室横跨两列，放在活动/公告之下；占位块 #chat-holder 也要横跨，
       否则加载态它只占第 1 列、加载完才变成整行，同样是一次跳变 */
    .chat-card,
    #chat-holder {
        grid-column: 1 / -1;
    }
}

@media (max-width: 767px) {
    .header {
        padding: 10px 12px;
    }
    .logo-svg {
        width: 60px;
        height: 30px;
    }
    .logo-placeholder {
        width: 60px;
        height: 32px;
        font-size: 12px;
    }
    .btn {
        padding: 6px 12px;
        font-size: 12px;
    }
    .user-info {
        display: none;
    }
    .banner-slider {
        height: 160px;
    }
    .banner-placeholder {
        font-size: 18px;
    }
    .banner-arrow {
        width: 30px;
        height: 30px;
        font-size: 19px;
    }
    .banner-arrow-prev {
        left: 6px;
    }
    .banner-arrow-next {
        right: 6px;
    }
    .glass-card {
        padding: 12px;
    }
    .chat-card {
        padding: 12px;
    }
    .chat-messages {
        height: 240px;
    }
    /* 移动端卡片更矮、聊天记录区更短，预留高度同步收窄（配合「首屏占位」小节） */
    :root {
        --reserve-list: 118px;
        --reserve-list-more: 146px;
        --reserve-chat: 396px;
    }
    .chat-body {
        max-width: calc(100% - 44px);
    }
}

/* ---------------- 个人主页 ---------------- */

.profile-main {
    max-width: 980px;
    margin: 0 auto;
    padding: 16px;
}

.profile-empty {
    margin-top: 24px;
    text-align: center;
    padding: 32px 16px;
}

.profile-flash {
    padding: 10px 14px;
    border-radius: 8px;
    margin-bottom: 12px;
    font-size: 14px;
    border: 1px solid var(--glass-border);
    background: var(--glass-bg);
    color: var(--text-light);
}
.profile-flash.ok {
    border-color: rgba(120, 220, 150, 0.5);
    background: rgba(60, 160, 90, 0.22);
}
.profile-flash.error {
    border-color: rgba(255, 150, 150, 0.5);
    background: rgba(180, 50, 50, 0.28);
}

/* 头部资料卡 */
.profile-hero {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 20px;
    margin-bottom: 14px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(142, 15, 20, 0.55), rgba(107, 10, 14, 0.35));
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}

.profile-av {
    flex: 0 0 72px;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    font-weight: 800;
    color: #fff;
    background: hsl(var(--av-h, 0), 45%, 34%);
    border: 2px solid rgba(255, 255, 255, 0.35);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    text-transform: uppercase;
}

.profile-hero-info {
    flex: 1 1 auto;
    min-width: 0;
}

.profile-name-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.profile-name {
    margin: 0;
    font-size: 22px;
    color: var(--text-light);
    line-height: 1.3;
}

.profile-sub {
    margin: 8px 0 0;
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    font-size: 13px;
    color: var(--text-muted);
}

.profile-mute-reason {
    margin: 6px 0 0;
    font-size: 13px;
    color: #ffd6d6;
}

.profile-hero-actions {
    flex: 0 0 auto;
}

.profile-muted {
    color: var(--text-muted);
    font-size: 14px;
}
.ok-text {
    color: #8ce8a8;
}

/* 身份 / 状态徽标 */
.role-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
}
.role-badge.role-admin {
    background: linear-gradient(180deg, var(--gold-btn-1), var(--gold-btn-3));
    color: #5a1010;
    border-color: rgba(255, 255, 255, 0.5);
}
.role-badge.role-planner {
    background: rgba(90, 140, 220, 0.45);
}
.role-badge.role-user {
    background: rgba(255, 255, 255, 0.18);
}
.self-tag {
    font-size: 12px;
    color: var(--gold-1);
    border: 1px dashed var(--gold-3);
    border-radius: 999px;
    padding: 1px 8px;
}
.mute-badge {
    display: inline-block;
    font-size: 12px;
    padding: 2px 10px;
    border-radius: 999px;
    color: #ffd9d9;
    background: rgba(180, 50, 50, 0.35);
    border: 1px solid rgba(255, 150, 150, 0.45);
}

/* 统计 */
.profile-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
    margin-bottom: 14px;
}
.stat-box {
    text-align: center;
    padding: 16px 10px;
    border-radius: 10px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
.stat-num {
    font-size: 26px;
    font-weight: 800;
    color: var(--gold-2);
    line-height: 1.1;
}
.stat-label {
    margin-top: 6px;
    font-size: 13px;
    color: var(--text-muted);
}

/* 内容区：单列铺满（标签页本身承担分区，不再用左右分栏） */
.profile-panel {
    min-width: 0;
}

/* 「资料」标签页：基本资料 / 修改邮箱 / 修改密码 自适应排布 */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 14px;
    align-items: start;
}
.info-grid .glass-card {
    margin-bottom: 0;
}
.info-grid .glass-card:hover {
    transform: none;
}

/* 标签页 */
.profile-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}
.profile-tab {
    padding: 7px 14px;
    border-radius: 8px 8px 0 0;
    font-size: 14px;
    color: var(--text-muted);
    text-decoration: none;
    border: 1px solid transparent;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}
.profile-tab:hover {
    color: var(--text-light);
}
.profile-tab.active {
    color: var(--text-light);
    background: var(--glass-bg);
    border-color: var(--glass-border);
    border-bottom-color: var(--primary-red);
}
.profile-tab em {
    font-style: normal;
    font-size: 12px;
    opacity: 0.7;
}

/* 时间线 */
.timeline-list {
    list-style: none;
    margin: 12px 0 0;
    padding: 0;
}
.timeline-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.12);
}
.timeline-item:last-child {
    border-bottom: none;
}
.timeline-icon {
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid var(--glass-border);
}
.timeline-body {
    min-width: 0;
    flex: 1;
}
.timeline-head {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    font-size: 12px;
    color: var(--text-muted);
}
.timeline-type {
    color: var(--gold-2);
}
.timeline-title {
    margin-top: 3px;
    font-size: 15px;
    color: var(--text-light);
}
.timeline-text {
    margin-top: 4px;
    font-size: 13px;
    color: var(--text-muted);
    word-break: break-word;
}
.timeline-extra {
    display: inline-block;
    margin-top: 6px;
    font-size: 12px;
    padding: 1px 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: var(--text-muted);
}

/* 简单列表（公告 / 活动） */
.simple-list {
    list-style: none;
    margin: 10px 0 0;
    padding: 0;
}
.simple-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.12);
}
.simple-list li:last-child {
    border-bottom: none;
}
.simple-title {
    font-size: 15px;
    color: var(--text-light);
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.simple-meta {
    flex: 0 1 auto;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 12px;
    color: var(--text-muted);
}
/* 「节目」页签里标题本身就是链接 */
a.simple-title {
    flex: 1 1 auto;
    color: var(--text-light);
    text-decoration: none;
}
a.simple-title:hover {
    color: var(--gold-1);
}
.status-pill {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 999px;
    font-size: 12px;
    border: 1px solid rgba(255, 255, 255, 0.25);
}
.status-pill.status-published {
    color: #8ce8a8;
    border-color: rgba(120, 220, 150, 0.5);
}
.status-pill.status-draft {
    color: #ffe0a0;
    border-color: rgba(255, 210, 120, 0.5);
}
.status-pill.status-archived {
    color: #d8d8d8;
}

/* 权限矩阵 */
.perm-groups {
    display: grid;
    gap: 12px;
}
.perm-group-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--gold-2);
    margin-bottom: 6px;
}
.perm-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
    font-size: 14px;
    color: var(--text-muted);
    border-bottom: 1px dashed rgba(255, 255, 255, 0.08);
}
.perm-row:last-child {
    border-bottom: none;
}
.perm-row.on {
    color: var(--text-light);
}
.perm-flags {
    display: flex;
    align-items: center;
    gap: 8px;
}
.perm-legend {
    display: inline-block;
    padding: 1px 7px;
    border-radius: 999px;
    font-size: 11px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: var(--text-muted);
}
.perm-legend.role-on {
    color: var(--gold-1);
    border-color: var(--gold-3);
}
.perm-legend.override-on {
    color: #9ad0ff;
    border-color: rgba(140, 190, 255, 0.6);
}
.perm-state {
    width: 16px;
    text-align: center;
    color: #8ce8a8;
    font-weight: 700;
}

/* 资料描述列表 */
.profile-dl {
    margin: 10px 0 0;
}
.profile-dl > div {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.12);
    font-size: 14px;
}
.profile-dl > div:last-child {
    border-bottom: none;
}
.profile-dl dt {
    color: var(--text-muted);
}
.profile-dl dd {
    margin: 0;
    color: var(--text-light);
    word-break: break-all;
    text-align: right;
}

/* 表单 */
.profile-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}
.profile-input {
    width: 100%;
    box-sizing: border-box;
    padding: 9px 12px;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
    background: rgba(0, 0, 0, 0.2);
    color: var(--text-light);
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}
.profile-input::placeholder {
    color: rgba(255, 255, 255, 0.45);
}
.profile-input:focus {
    border-color: var(--gold-3);
}

/* 移动端 */
@media (max-width: 720px) {
    .profile-hero {
        flex-wrap: wrap;
    }
    .profile-av {
        flex-basis: 56px;
        width: 56px;
        height: 56px;
        font-size: 24px;
    }
    .profile-name {
        font-size: 19px;
    }
    .profile-hero-actions {
        width: 100%;
    }
}

/* ================================================================
   详情页（公告 / 活动共用）
   —— 列表页只放摘要，完整正文在详情页展开（长公告不再撑爆卡片）。
   ================================================================ */
.detail-main {
    max-width: 860px;
    margin: 0 auto;
    padding: 16px 16px 48px;
}
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 2px 0 12px;
    font-size: 13px;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}
.back-link:hover {
    color: var(--gold-1);
}
.detail-head {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    flex-wrap: wrap;
}
.detail-title {
    flex: 1 1 240px;
    margin: 0;
    font-size: 22px;
    line-height: 1.4;
    color: var(--text-light);
    word-break: break-word;
}
.detail-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
    font-size: 12px;
    color: var(--text-muted);
}
.detail-meta a {
    color: var(--gold-2);
    text-decoration: none;
}
.detail-meta a:hover {
    text-decoration: underline;
}
.detail-body {
    margin-top: 16px;
    font-size: 15px;
    line-height: 1.9;
    color: var(--text-light);
    white-space: pre-wrap;
    word-break: break-word;
}
.detail-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px dashed rgba(255, 255, 255, 0.14);
}
.detail-actions form.inline-form {
    display: inline-flex;
    margin: 0;
}
.detail-hint {
    font-size: 12px;
    color: var(--text-muted);
}
.detail-block {
    margin-top: 16px;
}
.detail-side-list {
    list-style: none;
    margin: 8px 0 0;
    padding: 0;
}
.detail-side-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 9px 0;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
    font-size: 14px;
}
.detail-side-list li:last-child {
    border-bottom: none;
}
.detail-side-list a {
    color: var(--text-light);
    text-decoration: none;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.detail-side-list a:hover {
    color: var(--gold-1);
}
.detail-side-list .side-time {
    flex: 0 0 auto;
    font-size: 12px;
    color: var(--text-muted);
}
.detail-wide-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--glass-border);
    font-size: 14px;
    color: var(--text-light);
}
.detail-wide-info .label {
    font-size: 12px;
    color: var(--text-muted);
}

/* 从列表 / 个人主页跳进来时闪一下高亮，让人一眼看到目标 */
.hl-once {
    animation: detail-hit 1.8s ease-out 1;
}
@keyframes detail-hit {
    0% {
        outline: 3px solid rgba(246, 211, 101, 0.95);
        outline-offset: 2px;
    }
    100% {
        outline: 3px solid rgba(246, 211, 101, 0);
        outline-offset: 12px;
    }
}

/* 轮播图右下角「查看详情」提示（点击整张轮播图进活动详情） */
.banner-more {
    position: absolute;
    right: 14px;
    bottom: 12px;
    font-size: 12px;
    color: var(--gold-1);
    background: rgba(0, 0, 0, 0.28);
    border: 1px solid rgba(246, 211, 101, 0.45);
    border-radius: 999px;
    padding: 3px 10px;
    pointer-events: none;
}
.banner-slide {
    position: relative;
    cursor: pointer;
}

/* 卡片底部的「时间 / 发布者 + 查看详情」一行 */
.activity-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 10px;
    font-size: 13px;
}
.activity-foot .card-more {
    margin-top: 0;
}

/* 列表 / 卡片里的「查看详情」入口 */
.card-more {
    display: inline-block;
    margin-top: 10px;
    font-size: 13px;
    color: var(--gold-2);
    text-decoration: none;
}
.card-more:hover {
    color: var(--gold-1);
    text-decoration: underline;
}
.notice-card h3 a,
.activity-card h3 a {
    color: var(--text-light);
    text-decoration: none;
}
.notice-card h3 a:hover,
.activity-card h3 a:hover {
    color: var(--gold-1);
}

/* 个人主页时间线：整条可见内容变成可点击入口 */
.timeline-hit {
    display: block;
    color: inherit;
    text-decoration: none;
}
.timeline-hit:hover .timeline-title {
    color: var(--gold-1);
}
.timeline-hit .timeline-go {
    display: inline-block;
    margin-left: 6px;
    font-size: 12px;
    color: var(--gold-3);
    opacity: 0;
    transition: opacity 0.2s;
}
.timeline-hit:hover .timeline-go {
    opacity: 1;
}
.simple-title a {
    color: var(--text-light);
    text-decoration: none;
}
.simple-title a:hover {
    color: var(--gold-1);
}

/* 正文里的链接：服务端 chat_linkify() 与前端 linkifyText() 输出的 <a class="chat-link"> */
.chat-link {
    color: var(--gold-2);
    text-decoration: underline;
    text-underline-offset: 2px;
    word-break: break-all;
}

.chat-link:hover,
.chat-link:focus-visible {
    color: var(--gold-1);
    outline: none;
}

/* 系统播报里带业务编号（#N）时整条可点，进入公告 / 活动详情 */
.chat-item.system.linkable {
    cursor: pointer;
}

.chat-item.system.linkable .chat-text:hover {
    border-color: rgba(246, 211, 101, 0.55);
    background: rgba(246, 211, 101, 0.1);
    color: #fff2d0;
}

.chat-item.system.linkable:focus-visible {
    outline: 2px solid rgba(246, 211, 101, 0.6);
    outline-offset: 2px;
    border-radius: 10px;
}

/* 列表 / 卡片里的摘要（详情页看全文，卡片只留两行） */
.notice-card .notice-excerpt,
.activity-card .activity-excerpt {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 聊天室：深链（?msg=N）定位到的那条消息 */
.chat-item.chat-focus .chat-text {
    border-color: rgba(246, 211, 101, 0.9);
    box-shadow: 0 0 0 3px rgba(246, 211, 101, 0.28), 0 0 18px rgba(246, 211, 101, 0.4);
    animation: quote-hit 1.1s ease-in-out 3;
}
.chat-focus-tip {
    margin: 0 0 8px;
    padding: 6px 10px;
    border-radius: 10px;
    font-size: 12px;
    color: var(--gold-1);
    background: rgba(246, 211, 101, 0.12);
    border: 1px solid rgba(246, 211, 101, 0.35);
}

@media (max-width: 720px) {
    .detail-title {
        font-size: 19px;
    }
    .detail-body {
        font-size: 14px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hl-once,
    .chat-item.chat-focus .chat-text {
        animation: none;
    }
}

/* ================================================================
   文件直传 OSS（oss_upload.php）
   —— 头像（简单上传）+ 大文件（分片上传 / 断点续传）
   ================================================================ */
.oss-logo-text {
    display: flex;
    align-items: center;
    height: 40px;
    padding: 0 14px;
    border-radius: 6px;
    background: linear-gradient(135deg, var(--primary-red), var(--dark-red));
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 2px;
    color: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.28);
}

.oss-main {
    max-width: 900px;
    margin: 0 auto;
    padding: 16px 16px 48px;
}

.oss-head {
    margin-bottom: 14px;
}

.oss-head h1 {
    margin: 0;
    font-size: 24px;
    line-height: 1.35;
    color: var(--text-light);
}

.oss-sub {
    margin: 8px 0 0;
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-muted);
}

.oss-sub-dim {
    font-size: 13px;
}

.oss-sub strong {
    color: var(--text-light);
}

.oss-badge {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 9px;
    border-radius: 999px;
    font-size: 12px;
    color: var(--gold-1);
    border: 1px solid rgba(246, 211, 101, 0.5);
    background: rgba(246, 211, 101, 0.12);
}

/* 卡片：整块统一底色，鼠标悬停不再整体上浮（内容多，晃动会晕） */
.oss-card {
    margin-bottom: 14px;
}

.oss-card:hover {
    transform: none;
}

.oss-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.oss-card-head h3 {
    margin: 0;
}

.oss-tag {
    flex: none;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 12px;
    color: var(--text-muted);
    border: 1px solid var(--glass-border);
    background: rgba(0, 0, 0, 0.25);
}

/* ---------------- 目录 / 文件列表 ---------------- */

.oss-dirs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.oss-dir-tab {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.oss-dir-tab-on {
    color: #3b0a0a;
    border-color: transparent;
    background: linear-gradient(135deg, var(--gold-btn-3), var(--gold-btn-1));
}

.oss-crumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 2px;
    margin-top: 10px;
    font-size: 13px;
    color: var(--text-muted);
}

.oss-crumb-item {
    padding: 2px 6px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--gold-1);
    font-size: 13px;
    cursor: pointer;
}

.oss-crumb-item:hover {
    background: rgba(246, 211, 101, 0.14);
}

.oss-crumb-last {
    color: var(--text-light);
    font-weight: 600;
    cursor: default;
}

.oss-crumb-last:hover {
    background: transparent;
}

.oss-crumb-sep {
    color: rgba(255, 255, 255, 0.35);
}

.oss-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.oss-newfolder {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.oss-newfolder[hidden] {
    display: none;
}

.oss-input {
    flex: 1 1 200px;
    min-width: 0;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
    background: rgba(0, 0, 0, 0.3);
    color: var(--text-light);
    font-size: 14px;
}

.oss-input:focus {
    outline: none;
    border-color: var(--gold-2);
}

.oss-drop-title {
    font-size: 13px;
}

.oss-filelist {
    list-style: none;
    margin: 14px 0 0;
    padding: 0;
}

.oss-file {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    margin-bottom: 8px;
    border-radius: 10px;
    border: 1px solid var(--glass-border);
    background: rgba(0, 0, 0, 0.22);
}

.oss-file:last-child {
    margin-bottom: 0;
}

.oss-file-dir {
    cursor: pointer;
    border-color: rgba(246, 211, 101, 0.35);
}

.oss-file-dir:hover {
    background: rgba(246, 211, 101, 0.12);
}

.oss-file-icon {
    flex: 0 0 auto;
    font-size: 18px;
}

.oss-file-main {
    flex: 1 1 auto;
    min-width: 0;
}

.oss-file-name {
    display: block;
    font-size: 14px;
    color: var(--text-light);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.oss-file-meta {
    display: block;
    margin-top: 3px;
    font-size: 12px;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}

.oss-file-actions {
    flex: 0 0 auto;
    display: flex;
    gap: 6px;
}

.oss-empty {
    padding: 16px;
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
    border-radius: 10px;
    border: 1px dashed var(--glass-border);
}

/* ---------------- 进度条 ---------------- */

.oss-bar {
    margin-top: 12px;
}

.oss-bar[hidden] {
    display: none;
}

.oss-bar-track {
    height: 8px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

.oss-bar-fill {
    width: 0;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--gold-btn-3), var(--gold-btn-1));
    box-shadow: 0 0 10px rgba(246, 211, 101, 0.5);
    transition: width 0.18s ease-out;
}

.oss-bar-meta {
    margin-top: 6px;
    font-size: 12.5px;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}

/* 结果提示 */
.oss-msg {
    margin-top: 10px;
    font-size: 13px;
    line-height: 1.6;
}

.oss-msg:empty {
    display: none;
}

.oss-msg-ok {
    color: #a9f3c0;
}

.oss-msg-warn {
    color: #ffe0a3;
}

.oss-msg-error {
    color: #ffb3b3;
}

/* ---------------- 拖拽区 ---------------- */

.oss-drop {
    position: relative;
    margin-top: 14px;
    padding: 22px 16px;
    text-align: center;
    border-radius: 12px;
    border: 2px dashed rgba(246, 211, 101, 0.45);
    background: rgba(0, 0, 0, 0.18);
    transition: border-color 0.2s, background 0.2s;
}

.oss-drop p {
    margin: 0;
    font-size: 14px;
    color: var(--text-light);
}

.oss-drop p + p {
    margin-top: 8px;
}

.oss-drop-hot {
    border-color: var(--gold-1);
    background: rgba(246, 211, 101, 0.14);
}

.oss-drop-icon {
    font-size: 26px;
    line-height: 1.2;
    color: var(--gold-2);
    margin-bottom: 6px;
}

.oss-drop .btn {
    vertical-align: middle;
}

/* ---------------- 任务卡 ---------------- */

.oss-tasks {
    list-style: none;
    margin: 14px 0 0;
    padding: 0;
}

.oss-task {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    margin-bottom: 10px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid var(--glass-border);
}

.oss-task:last-child {
    margin-bottom: 0;
}

.oss-task-main {
    flex: 1 1 auto;
    min-width: 0;
}

.oss-task-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-light);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.oss-task-sub {
    margin-top: 3px;
    font-size: 12px;
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.oss-task .oss-bar {
    margin-top: 8px;
}

.oss-task-actions {
    flex: 0 0 auto;
    display: flex;
    gap: 6px;
}

/* ---------------- 断点列表 ---------------- */

.oss-resume {
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: 10px;
    background: rgba(246, 211, 101, 0.1);
    border: 1px solid rgba(246, 211, 101, 0.32);
}

.oss-resume[hidden] {
    display: none;
}

.oss-resume-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 14px;
    color: var(--gold-1);
}

.oss-resume-list {
    list-style: none;
    margin: 8px 0;
    padding: 0;
}

.oss-resume-item {
    display: flex;
    align-items: baseline;
    gap: 10px;
    padding: 6px 0;
    font-size: 12.5px;
    color: var(--text-muted);
    border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
}

.oss-resume-item:last-child {
    border-bottom: none;
}

.oss-resume-item code {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.oss-resume-item span {
    flex: 0 0 auto;
    margin-left: auto;
}

/* ---------------- 日志 ---------------- */

.oss-log {
    margin: 10px 0 0;
    max-height: 220px;
    overflow: auto;
    padding: 12px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.38);
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 12px;
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.82);
    white-space: pre-wrap;
    word-break: break-all;
}

.oss-log:empty::before {
    content: "暂无日志";
    color: rgba(255, 255, 255, 0.4);
}

@media (max-width: 720px) {
    .oss-main {
        padding: 12px 12px 40px;
    }
    .oss-head h1 {
        font-size: 20px;
    }
    .oss-file {
        flex-wrap: wrap;
    }
    .oss-file-actions {
        width: 100%;
        justify-content: flex-end;
    }
    .oss-task {
        flex-wrap: wrap;
    }
    .oss-task-actions {
        width: 100%;
        justify-content: flex-end;
    }
}
