﻿:root {
    --bg: #0d1117;
    --bg-card: #161b22;
    --bg-hover: #1f2630;
    --border: #2d333b;
    --text: #e6edf3;
    --text-dim: #8b949e;
    --accent: #58a6ff;
    --accent-soft: rgba(88, 166, 255, .12);
    --up: #f85149;
    --down: #3fb950;
    --neutral: #8b949e;
    --gold: #d29922;
    --radius: 12px;
    --shadow: 0 8px 24px rgba(0, 0, 0, .35);
    --transition: .2s cubic-bezier(.4, 0, .2, 1);
    --bar-mask: rgba(13, 17, 23, .85);
    --sidebar-bg: rgba(13, 17, 23, .6);
}
html.light { --bar-mask: rgba(255, 255, 255, .88); --sidebar-bg: rgba(255, 255, 255, .72); }

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

/* ---------- 亮色主题（html.light 由切换按钮挂载，覆盖变量即可全局生效） ---------- */
html.light {
    --bg: #f6f8fa;
    --bg-card: #ffffff;
    --bg-hover: #eef1f5;
    --border: #d8dee4;
    --text: #1f2328;
    --text-dim: #59636e;
    --accent: #0969da;
    --accent-soft: rgba(9, 105, 218, .1);
    --up: #cf222e;
    --down: #1a7f37;
    --neutral: #59636e;
    --gold: #9a6700;
    --shadow: 0 8px 24px rgba(31, 35, 40, .12);
}
html.light body::before { opacity: .5; background: radial-gradient(circle, rgba(9, 105, 218, .1), transparent 65%); }
html.light body::after { opacity: .4; background: radial-gradient(circle, rgba(207, 34, 46, .06), transparent 65%); }
html.light ::-webkit-scrollbar-thumb { background: #c4cdd5; border: 2px solid var(--bg); }
html.light .tag-bull { background: rgba(207, 34, 46, .1); }
html.light .tag-bear { background: rgba(26, 127, 55, .1); }
html.light .tag-neutral { background: rgba(89, 99, 110, .12); }
html.light .tag-source { background: rgba(9, 105, 218, .1); }
html.light .tag-gold { background: rgba(154, 103, 0, .12); }
html.light .btn-primary { background: #1f883d; }
html.light .btn-primary:hover { background: #1a7f37; }

/* 主题切换过渡 */
body, .card, .sidebar, .badge, .modal, .toast { transition: background-color .25s ease, border-color .25s ease, color .25s ease; }

/* ---------- 滚动条 ---------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #2d333b; border-radius: 6px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #3d444d; }

::selection { background: rgba(88, 166, 255, .3); }

body {
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* 背景装饰光晕：营造深度感 */
body::before,
body::after {
    content: ""; position: fixed; z-index: -1; pointer-events: none;
    border-radius: 50%; filter: blur(120px); opacity: .35;
}
body::before {
    width: 600px; height: 600px; top: -250px; right: -150px;
    background: radial-gradient(circle, rgba(88, 166, 255, .14), transparent 65%);
}
body::after {
    width: 500px; height: 500px; bottom: -200px; left: -150px;
    background: radial-gradient(circle, rgba(248, 81, 73, .08), transparent 65%);
}

a { color: var(--accent); text-decoration: none; transition: color var(--transition); }

/* ---------- 布局 ---------- */
.layout { display: flex; min-height: 100vh; }
.sidebar {
    width: 220px; border-right: 1px solid var(--border);
    padding: 20px 12px; position: sticky; top: 0; height: 100vh;
    display: flex; flex-direction: column; gap: 4px; flex-shrink: 0;
    background: var(--sidebar-bg); backdrop-filter: blur(12px);
}
/* 品牌行：logo 并入首行导航（原独立 brand 块已移除）——
   导航项本身保留 .sidebar a 的 hover/active 行为，仅加强字重与配色 */
.sidebar a.nav-brand { color: var(--text); font-weight: 700; font-size: 16px; }
.nav-logo {
    width: 22px; height: 22px; border-radius: 6px; object-fit: cover; flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .25);
    transition: transform var(--transition);
}
.sidebar a.nav-brand:hover .nav-logo { transform: scale(1.1); }
/* logo 双主题：白天（html.light）用浅色版，夜晚用深色版；成对渲染仅显示其一 */
img.logo-day { display: none; }
html.light img.logo-day { display: inline-block; }
html.light img.logo-night { display: none; }
.page-logo {
    width: 30px; height: 30px; border-radius: 8px; object-fit: cover;
    vertical-align: -6px; margin-right: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .3);
    transition: transform var(--transition), box-shadow var(--transition);
}
.page-title:hover .page-logo { transform: scale(1.08) rotate(-3deg); box-shadow: 0 4px 14px rgba(0, 0, 0, .4); }
@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: .55; transform: scale(.9); }
}

.sidebar a {
    color: var(--text-dim); padding: 10px 12px; border-radius: 8px;
    display: flex; align-items: center; gap: 10px; position: relative;
    transition: background var(--transition), color var(--transition), transform var(--transition);
    -webkit-tap-highlight-color: transparent; user-select: none;
}
.sidebar a:hover { background: var(--bg-hover); color: var(--text); }
.sidebar a:active { background: var(--bg-hover); color: var(--text); transform: scale(.97); }
.sidebar a.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.sidebar a.active:active { transform: scale(.97); }
/* 激活项左侧渐变指示条 */
.sidebar a.active::before {
    content: ""; position: absolute; left: 0; top: 20%; bottom: 20%; width: 3px;
    border-radius: 2px; background: linear-gradient(180deg, var(--accent), #a371f7);
}
.sidebar .spacer { flex: 1; }
.user-box { border-top: 1px solid var(--border); padding-top: 12px; }
.user-box .name { color: var(--text); font-weight: 600; }
.user-box small { color: var(--text-dim); }

.main { flex: 1; max-width: 780px; margin: 0 auto; padding: 20px 16px 80px; width: 100%; }

/* 游客免费体验横幅：sticky 悬浮于内容区顶部（滚动时贴顶，不遮左侧导航），醒目状态区分 */
.trial-banner {
    position: sticky; top: 0; z-index: 500;
    margin: -20px -16px 16px;
    padding: 10px 16px;
    font-size: 14px; font-weight: 600; line-height: 1.6; text-align: center;
    color: #fff; border-bottom: 1px solid rgba(255, 255, 255, .2);
    box-shadow: 0 2px 10px rgba(0, 0, 0, .15);
}
.trial-banner.on { background: linear-gradient(90deg, #16a34a, #15803d); }
.trial-banner.off { background: linear-gradient(90deg, #f59e0b, #d97706); }
.trial-banner a { color: #fff; text-decoration: underline; font-weight: 700; }
.trial-banner.hide { display: none; }

/* 右下角悬浮收纳组：毛玻璃卡片 + 渐亮圆钮，展开为「安卓App 下载」+「回到顶部」；
   圆钮可沿右侧垂直拖动（touch-action:none 允许触摸拖动），长按 3 秒隐藏（.fd-hidden） */
#float-dock {
    position: fixed; right: 20px; bottom: 48px; z-index: 150;
    display: flex; flex-direction: column; align-items: flex-end; gap: 12px;
    touch-action: none; -webkit-user-select: none; user-select: none;
}
#float-dock.fd-hidden { display: none; }
.fd-panel {
    display: flex; flex-direction: column; padding: 6px; min-width: 172px;
    border-radius: 14px;
    background: var(--sidebar-bg); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    box-shadow: 0 12px 32px rgba(0, 0, 0, .35);
    transform-origin: 100% 100%;
    transition: transform .24s cubic-bezier(.34, 1.56, .64, 1), opacity .18s ease;
    transform: translateY(10px) scale(.9); opacity: 0; pointer-events: none;
}
#float-dock.open .fd-panel { transform: none; opacity: 1; pointer-events: auto; }
.fd-row {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 10px; border-radius: 10px;
    color: var(--text); font-size: 13px; font-weight: 600;
    text-decoration: none; cursor: pointer; border: none; background: none;
    font-family: inherit; width: 100%; text-align: left;
    transition: background var(--transition), opacity var(--transition);
    opacity: 0; transform: translateY(6px);
}
#float-dock.open .fd-row { animation: fd-row-in .3s cubic-bezier(.34, 1.56, .64, 1) forwards; }
#float-dock.open .fd-row:nth-child(2) { animation-delay: .05s; }
@keyframes fd-row-in { to { opacity: 1; transform: none; } }
.fd-row:hover { background: var(--bg-hover); }
.fd-row:active { transform: scale(.98); }
.fd-chip {
    flex: none; display: grid; place-items: center;
    width: 30px; height: 30px; border-radius: 8px;
    background: var(--accent-soft); color: var(--accent);
}
.fd-chip svg { width: 16px; height: 16px; }
.fd-hint { margin-left: auto; color: var(--text-dim); font-size: 11px; font-weight: 500; }
#back-top.disabled { opacity: .4; pointer-events: none; }
#float-dock.open .fd-row:nth-child(3) { animation-delay: .1s; }
/* 新消息浮条：WebSocket 推新但用户正在下方阅读时，不打断滚动、不重置列表 */
.new-msg-pill {
    position: fixed; top: 14px; left: 50%; transform: translateX(-50%);
    z-index: 600; padding: 9px 18px; border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--sidebar-bg);
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    color: var(--text); font-size: 13px; font-weight: 600; font-family: inherit;
    cursor: pointer; box-shadow: 0 10px 28px rgba(0, 0, 0, .35);
    animation: pill-in .28s cubic-bezier(.34, 1.56, .64, 1);
}
.new-msg-pill:active { transform: translateX(-50%) scale(.96); }
@keyframes pill-in { from { opacity: 0; transform: translateX(-50%) translateY(-12px); } }
#fd-fab {
    position: relative; width: 46px; height: 46px; border-radius: 50%;
    border: none; background: var(--accent); color: #fff; cursor: pointer;
    box-shadow: 0 6px 18px rgba(56, 139, 253, .35), 0 2px 6px rgba(0, 0, 0, .35);
    transition: transform .2s ease;
}
#fd-fab:hover { transform: translateY(-2px); }
#fd-fab:active { transform: scale(.95); }
#fd-fab svg {
    position: absolute; inset: 0; margin: auto; width: 20px; height: 20px;
    transition: opacity .18s ease, transform .28s cubic-bezier(.34, 1.56, .64, 1);
}
#fd-fab .ic-x { opacity: 0; transform: rotate(-90deg) scale(.4); }
#float-dock.open #fd-fab .ic-phone { opacity: 0; transform: rotate(90deg) scale(.4); }
#float-dock.open #fd-fab .ic-x { opacity: 1; transform: none; }

/* 隐藏后的恢复小圆点：半透明，悬停放大；点击恢复悬浮组 */
#fd-restore {
    position: fixed; right: 12px; top: 50%; transform: translateY(-50%); z-index: 149;
    width: 14px; height: 14px; border-radius: 50%;
    border: none; padding: 0; cursor: pointer;
    background: var(--text-dim); opacity: .45;
    transition: opacity var(--transition), width .2s ease, height .2s ease;
}
#fd-restore:hover { opacity: .8; width: 20px; height: 20px; }
#fd-restore.fd-hidden { display: none; }

/* 悬浮组 toast 文字提示（长按说明 / 已隐藏 / 已恢复） */
.fd-toast {
    position: fixed; left: 50%; bottom: 110px; transform: translateX(-50%) translateY(8px);
    z-index: 200; max-width: 86vw;
    padding: 9px 16px; border-radius: 999px;
    background: var(--sidebar-bg); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border); color: var(--text);
    font-size: 13px; font-weight: 600; text-align: center;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .4);
    opacity: 0; pointer-events: none;
    transition: opacity .25s ease, transform .25s ease;
}
.fd-toast.show { opacity: 1; transform: translateX(-50%); }
@media (max-width: 720px) {
    .fd-toast { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); font-size: 12.5px; }
}
@media (max-width: 720px) {
    #float-dock { right: 14px; bottom: calc(72px + env(safe-area-inset-bottom, 0px)); }
    #fd-fab { width: 44px; height: 44px; }
    .fd-panel { min-width: 160px; }
    .fd-row { font-size: 12.5px; }
}

/* 全站免责声明（main 底部）：公开信息交流定位，不构成投资建议 */
.site-disclaimer { margin-top: 32px; padding: 12px 4px 0; border-top: 1px solid var(--border); color: var(--text-dim); font-size: 12px; line-height: 1.7; text-align: center; }

/* 移动端：底部导航 */
@media (max-width: 720px) {
    .layout { flex-direction: column; }
    .sidebar {
        position: fixed; bottom: 0; left: 0; right: 0; top: auto; height: auto;
        width: 100%; flex-direction: row; border-right: none;
        border-top: 1px solid var(--border);
        background: var(--bg-card);
        box-shadow: 0 -2px 12px rgba(0, 0, 0, .18);
        padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px)); z-index: 100;
    }
    .sidebar .spacer, .user-box { display: none; }
    .sidebar a { flex: 1; justify-content: center; font-size: 13px; padding: 8px 2px; flex-direction: column; gap: 2px; }
    .sidebar a .nav-label { display: block; font-size: 12px; }
    .sidebar a .nav-logo { width: 24px; height: 24px; border-radius: 6px; }
    .sidebar a.active::before { left: 50%; top: 0; bottom: auto; transform: translateX(-50%); width: 20px; height: 2px; }
    .main { padding: 16px 12px 90px; }
    .trial-banner { margin: -16px -12px 14px; padding: 9px 12px; font-size: 13px; }
    /* 移动视口字体均衡：页头与正文比例收敛，避免菜单过小/标题过大 */
    .page-title { font-size: 20px; margin-bottom: 12px; padding-bottom: 8px; }
    .page-sub { font-size: 13px; }
}

/* ---------- 页头 ---------- */
.page-title {
    font-size: 24px; font-weight: 700; margin-bottom: 16px; position: relative; padding-bottom: 12px;
    background: linear-gradient(135deg, var(--text), #b6c2cf);
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
    width: fit-content;
    -webkit-tap-highlight-color: transparent;
}
.page-title::after {
    content: ""; position: absolute; left: 0; bottom: 0; width: 42px; height: 3px;
    border-radius: 2px; background: linear-gradient(90deg, var(--accent), #a371f7);
}
.page-sub { color: var(--text-dim); margin-bottom: 20px; }
/* 详情页返回上层（置于页头标题上方，胶囊按钮，悬停左移示意回退） */
.page-back {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 13px; font-weight: 500; color: var(--text);
    background: var(--bg-hover); border: 1px solid var(--border);
    border-radius: 999px; padding: 6px 14px; margin-bottom: 12px;
    text-decoration: none; -webkit-tap-highlight-color: transparent;
    transition: color var(--transition), transform var(--transition), border-color var(--transition), background-color var(--transition);
}
.page-back:hover { color: var(--accent); border-color: var(--accent); transform: translateX(-2px); }
.page-back .pb-arrow { font-size: 15px; line-height: 1; }

/* ---------- 卡片与标签 ---------- */
.card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 16px; margin-bottom: 14px;
    transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
    animation: cardIn .35s ease both;
}
@keyframes cardIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) { .card { animation: none; } }
.card:hover { border-color: #3d444d; transform: translateY(-2px); box-shadow: var(--shadow); }

/* WebSocket 新消息高亮 */
.card.fresh { animation: freshGlow 2.4s ease both; }
@keyframes freshGlow {
    0% { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft), var(--shadow); transform: translateY(-2px); }
    60% { border-color: var(--accent); }
    100% { border-color: var(--border); box-shadow: none; transform: none; }
}

.tag { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; letter-spacing: .3px; }
.tag-bull { background: rgba(248, 81, 73, .15); color: var(--up); }
.tag-bear { background: rgba(63, 185, 80, .15); color: var(--down); }
.tag-neutral { background: rgba(139, 148, 158, .15); color: var(--neutral); }
.tag-source { background: rgba(88, 166, 255, .12); color: var(--accent); }
.tag-gold { background: rgba(210, 153, 34, .15); color: var(--gold); }

/* NewsNow 实时快讯卡片（穿插消息流） */
.tag-news { background: rgba(163, 113, 247, .16); color: #a371f7; }
html.light .tag-news { background: rgba(124, 58, 237, .1); color: #6f42c1; }
.news-card { border-left: 3px solid #a371f7; }
html.light .news-card { border-left-color: #6f42c1; }
.news-title { display: block; color: var(--text); line-height: 1.7; margin-top: 8px; font-size: 15px; cursor: default; }
.news-title.clickable { cursor: pointer; }
.news-title.clickable:hover { color: var(--accent); }
/* 有正文的快讯：标题后带"点击查看全文"提示，与纯标题快讯视觉区分 */
.news-readmore {
    display: inline-block; font-size: 12px; color: var(--text-dim);
    margin-top: 6px; margin-left: 2px;
}
.news-readmore::after { content: " ›"; }
.news-modal { max-width: 640px; width: 92%; }
.news-modal-title { font-size: 18px; font-weight: 600; line-height: 1.8; margin-top: 12px; color: var(--text); }
.news-modal-content {
    font-size: 15px; line-height: 1.9; margin-top: 14px; color: var(--text);
    background: var(--bg-hover); border: 1px solid var(--border);
    border-radius: 10px; padding: 12px 16px; word-break: break-word; white-space: pre-wrap;
}
.news-modal-hint {
    font-size: 13px; color: var(--text-dim); margin-top: 14px;
    background: var(--bg-hover); border: 1px dashed var(--border);
    border-radius: 10px; padding: 10px 14px;
}
.news-modal-foot {
    display: flex; align-items: center; gap: 6px;
    font-size: 12px; color: var(--text-dim); margin-top: 16px;
    padding-right: 36px; /* 给右上角 × 留位 */
}
/* 外链用浏览器原生链接色，不做站点强调色（不引流） */
.text-link { color: #3b82f6; text-decoration: none; }
.text-link:visited { color: #8b5cf6; }
.text-link:hover { text-decoration: underline; }

/* （社区交流功能已砍除：视图切换/聊天室/板块样式 2026-08-31 删除） */

.comment.reply { margin-left: 20px; border-left: 2px solid var(--border); padding-left: 10px; }
.reply-btn {
    background: none; border: none; color: var(--text-dim); font-size: 12px;
    cursor: pointer; padding: 2px 6px; margin-top: 2px;
}
.reply-btn:hover { color: var(--accent); }
.replying-to { font-size: 12px; color: var(--gold); }

.chip {
    display: inline-block; padding: 3px 12px; border-radius: 999px;
    background: var(--bg-hover); color: var(--text); font-size: 13px; margin: 2px 4px 2px 0;
    border: 1px solid var(--border); max-width: 100%; box-sizing: border-box; line-height: 1.5;
    transition: border-color var(--transition), background var(--transition), transform var(--transition);
}
.chip:hover { border-color: var(--accent); background: var(--accent-soft); transform: translateY(-1px); }

/* ---------- 消息卡片 ---------- */
.msg-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.msg-head time { color: var(--text-dim); font-size: 12px; margin-left: auto; }
.msg-text { white-space: pre-wrap; word-break: break-word; color: var(--text); display: block; }
.msg-text:hover { color: var(--accent); }

/* 长文本 3 行折叠：默认收起，超 3 行时显示展开按钮 */
.msg-text.clamped {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.msg-text.expanded { display: block; overflow: visible; }
.expand-btn {
    background: none; border: none; color: var(--accent); cursor: pointer;
    padding: 2px 0; font-size: 13px; margin-top: 2px;
    display: inline-flex; align-items: center; gap: 4px;
}
.expand-btn:hover { text-decoration: underline; }
.expand-btn .arrow { display: inline-block; transition: transform var(--transition); font-size: 10px; }
.expand-btn.expanded .arrow { transform: rotate(180deg); }

.msg-images { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.msg-images img {
    max-width: 240px; max-height: 240px; border-radius: 8px; border: 1px solid var(--border);
    cursor: zoom-in; object-fit: cover;
    transition: transform var(--transition), border-color var(--transition);
}
.msg-images img:hover { transform: scale(1.02); border-color: var(--accent); }

.msg-foot { display: flex; gap: 6px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.act-btn {
    background: none; border: none; color: var(--text-dim); cursor: pointer;
    padding: 4px 12px; border-radius: 6px; font-size: 13px;
    display: inline-flex; align-items: center; gap: 6px;
    transition: background var(--transition), color var(--transition);
}
.act-btn:hover { background: var(--bg-hover); color: var(--text); }
.act-btn.liked { color: var(--up); }
.act-btn:hover .icon { transform: scale(1.15); }
.act-btn .icon { display: inline-block; transition: transform .15s; }
/* 管理员信息流快捷操作（卡片底部，仅管理员渲染；服务端 require_admin 二次校验） */
.adm-acts { margin-left: auto; display: inline-flex; gap: 6px; align-items: center; }
.adm-btn {
    background: none; border: 1px dashed var(--border); color: var(--text-dim); cursor: pointer;
    padding: 2px 10px; border-radius: 6px; font-size: 12px; line-height: 1.7;
    transition: color var(--transition), border-color var(--transition);
}
.adm-btn:hover { color: var(--accent); border-color: var(--accent); }
.adm-btn.danger:hover { color: var(--up); border-color: var(--up); }
.icon { display: inline-block; transition: transform .15s; }
/* 点赞心跳 */
.act-btn.liked .icon { animation: heartbeat .35s ease; }
@keyframes heartbeat {
    0% { transform: scale(1); }
    40% { transform: scale(1.35); }
    100% { transform: scale(1); }
}

.stock-block {
    margin-top: 10px; padding: 10px 12px; background: var(--bg); border-radius: 8px;
    font-size: 13px; border: 1px solid transparent;
    transition: border-color var(--transition);
}
.card:hover .stock-block { border-color: var(--border); }
.stock-block .label { color: var(--text-dim); }
.stock-block .expect { margin-top: 6px; color: var(--gold); line-height: 1.6; }
/* 预期尾部风险提示（弱化展示） */
.risk-note { color: var(--text-dim); font-size: 12px; margin-left: 8px; opacity: .75; }
/* 个股详情页：机构预期聚焦块（金色左边强调） */
.stock-block.ex-block { border-left: 3px solid var(--gold); }
.stock-block.ex-block .label { color: var(--gold); font-weight: 700; }

/* 个股详情页：当天/近7天/累计 紧凑单行统计，最近推荐日随行右置 */
.stock-stats {
    display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap;
    font-size: 13px; color: var(--text-dim); line-height: 1.4;
}
.ss-item { white-space: nowrap; }
.ss-item .num {
    color: var(--up); font-weight: 700; font-size: 17px;
    font-variant-numeric: tabular-nums; margin-right: 3px;
}
.ss-tail { margin-left: auto; white-space: nowrap; }
.ss-tail b { color: var(--text); font-weight: 600; }

/* 关联个股：默认单行截断，溢出显示独立展开按钮（与消息正文展开互不影响） */
.sb-row { display: flex; align-items: center; gap: 10px; }
.sb-toggle {
    background: none; border: none; color: var(--accent); cursor: pointer;
    padding: 2px 0; font-size: 12px; display: inline-flex; align-items: center; gap: 4px;
}
.sb-toggle:hover { text-decoration: underline; }
.sb-toggle .arrow { display: inline-block; transition: transform var(--transition); font-size: 10px; }
.sb-toggle.expanded .arrow { transform: rotate(180deg); }
.sb-chips { display: flex; flex-wrap: nowrap; overflow: hidden; margin-top: 6px; }
.sb-chips .chip { flex: 0 0 auto; }
.sb-chips.open { flex-wrap: wrap; overflow: visible; }

/* ---------- 顶部风险提示跑马灯 ---------- */
.risk-marquee {
    display: flex; align-items: center; gap: 10px;
    margin-bottom: 14px; padding: 8px 12px;
    border: 1px solid rgba(210, 153, 34, .45); border-radius: 8px;
    background: rgba(210, 153, 34, .07);
}
html.light .risk-marquee { border-color: rgba(154, 103, 0, .4); background: rgba(154, 103, 0, .05); }
.risk-marquee .rm-icon { flex: 0 0 auto; font-size: 15px; }
.risk-marquee .rm-viewport { flex: 1 1 auto; overflow: hidden; }
.rm-track { display: flex; width: max-content; animation: rm-scroll 32s linear infinite; }
.rm-text { white-space: nowrap; color: var(--gold); font-size: 13px; padding-right: 72px; }
.risk-marquee:hover .rm-track { animation-play-state: paused; }
@keyframes rm-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .rm-track { animation: none; } }

/* ---------- 筛选栏 ---------- */
.anon-notice {
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
    font-size: 13px; color: var(--text-dim);
    background: var(--bg-card); border: 1px dashed var(--border);
    border-radius: 8px; padding: 8px 12px; margin-bottom: 14px;
}
.anon-notice a { color: var(--accent); }
.filter-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.filter-bar select, .filter-bar button, .ms-btn {
    background: var(--bg-card); color: var(--text); border: 1px solid var(--border);
    border-radius: 8px; padding: 6px 12px; cursor: pointer; font-size: 13px;
    transition: border-color var(--transition), box-shadow var(--transition);
}
.filter-bar select:hover, .filter-bar button:hover, .ms-btn:hover { border-color: var(--accent); }
.filter-bar select:focus, .filter-bar button:focus, .ms-btn:focus {
    outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft);
}
.filter-bar .active-opt { border-color: var(--accent); color: var(--accent); }
/* 右侧操作组：仅会员/发布/展开收拢为同一 flex 项，整组右对齐且不拆散，
   即使空间不足也整体折行，避免「展开」单独落一行被推边后再也不换行 */
.filter-bar .filter-ops { display: flex; gap: 8px; margin-left: auto; flex: none; }
/* 管理员发布按钮：复用筛选控件基础尺寸（同 padding/字号），仅虚线描边+主题色区分 */
.filter-bar .adm-publish { color: var(--accent); border-color: var(--accent); border-style: dashed; }
/* 小屏筛选栏：来源/立场/仅会员/发布/展开 —— 五控件强制同一行（用户强需求，勿改回整行撑开）。
   要点：①下拉不再 flex:1 撑满整行（否则把操作组挤到下一行）；②操作组去掉 margin-left:auto，
   紧跟立场之后而非被推到行尾；③整体收紧内边距/字号/箭头留白与间距，实测 393px 屏可容五控件；
   ④来源按钮可收缩并省略号兜底，320px 极窄屏也不掉行。
   来源多选面板改底部浮层（fixed 悬于底部导航上方），任何屏宽都不会下坠盖住按钮 */
@media (max-width: 720px) {
    .filter-bar { gap: 6px; }
    .filter-bar select, .filter-bar button, .ms-btn { padding: 6px 7px; font-size: 12px; }
    /* 五控件（来源/立场/仅会员/发布/展开）按内容比例分配剩余宽度，整行撑满、右侧不留白 */
    .filter-bar > select,
    .filter-bar .ms-select,
    .filter-bar .filter-ops { flex: 1 1 auto; min-width: 0; }
    /* 下拉箭头留白收窄（全局为 30px，小屏过占宽） */
    .filter-bar select, .filter-bar .ms-select .ms-btn {
        background-position: calc(100% - 14px) 55%, calc(100% - 9px) 55%;
        padding-right: 22px;
    }
    .filter-bar .ms-select .ms-btn { width: 100%; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
    .filter-bar .filter-ops { margin-left: 0; gap: 6px; }
    /* 操作组内三按钮同样按比例撑满该组宽度，组内也不留白 */
    .filter-bar .filter-ops > button { flex: 1 1 auto; min-width: 0; }
    .filter-bar .adm-publish, .filter-bar #toggle-all, .filter-bar .vip-only-btn { white-space: nowrap; }
    .filter-bar .ms-panel {
        position: fixed; left: 12px; right: 12px; top: auto;
        bottom: calc(76px + env(safe-area-inset-bottom, 0px));
        min-width: 0; max-height: 46vh; overflow-y: auto; z-index: 130;
        box-shadow: 0 -6px 24px rgba(0, 0, 0, .35);
    }
}

/* ---------- 首页搜索栏（标题/内容 + 个股） ---------- */
.feed-search {
    display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
    margin-bottom: 12px;
}
.feed-search .fs-field { flex: 1 1 180px; min-width: 0; }
.feed-search input {
    width: 100%; background: var(--bg-card); color: var(--text);
    border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px;
    font-size: 13px; transition: border-color var(--transition), box-shadow var(--transition);
}
.feed-search input::placeholder { color: var(--text-dim); }
.feed-search input:focus {
    outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft);
}
.feed-search .btn-ghost {
    background: var(--bg-card); color: var(--accent); border: 1px solid var(--border);
    border-radius: 8px; padding: 8px 16px; cursor: pointer; font-size: 13px; font-weight: 500;
    transition: border-color var(--transition), background var(--transition);
}
.feed-search .btn-ghost:hover { border-color: var(--accent); background: var(--accent-soft); }
.feed-search .fs-clear {
    display: inline-flex; align-items: center; justify-content: center;
    width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--border);
    background: var(--bg-card); color: var(--text-dim); cursor: pointer; font-size: 13px;
    transition: color var(--transition), border-color var(--transition);
}
.feed-search .fs-clear:hover { color: var(--up); border-color: var(--up); }
/* 小屏：两输入框可收缩（basis 归零按剩余空间均分），搜索/清除按钮不收缩，
   三个控件 + placeholder 精简后稳定同行 */
@media (max-width: 720px) {
    .feed-search .fs-field { flex: 1 1 0; min-width: 0; }
    .feed-search .btn-ghost { flex: none; white-space: nowrap; padding: 8px 10px; }
    .feed-search .fs-clear { flex: none; }
}

/* ---------- 来源多选下拉 ---------- */
.ms-select { position: relative; }
.ms-btn { text-align: left; white-space: nowrap; }
.ms-panel {
    display: none; position: absolute; top: calc(100% + 6px); left: 0; z-index: 60;
    background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px;
    padding: 6px; min-width: 148px; box-shadow: var(--shadow);
}
.ms-select.open .ms-panel { display: block; }
.ms-opt {
    display: flex; align-items: center; gap: 8px; padding: 7px 10px;
    border-radius: 6px; cursor: pointer; font-size: 13px; color: var(--text);
    white-space: nowrap; user-select: none;
}
.ms-opt:hover { background: var(--bg-hover); }
.ms-opt input { accent-color: var(--accent); width: 15px; height: 15px; margin: 0; cursor: pointer; }
.ms-foot {
    display: flex; flex-direction: column; gap: 6px;
    padding: 8px 10px 4px; margin-top: 4px; border-top: 1px solid var(--border);
}
.ms-remember {
    display: flex; align-items: center; gap: 6px; font-size: 12px;
    color: var(--text-dim); cursor: pointer; user-select: none; white-space: nowrap;
}
.ms-remember:hover { color: var(--text); }
.ms-remember input { accent-color: var(--accent); width: 14px; height: 14px; margin: 0; cursor: pointer; }
.ms-actions { display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.ms-clear { background: none; border: none; color: var(--accent); font-size: 12px; cursor: pointer; padding: 0; }
.ms-clear:hover { text-decoration: underline; }
.ms-ok {
    background: var(--accent); border: none; color: #fff; font-size: 12px; font-weight: 600;
    padding: 4px 14px; border-radius: 6px; cursor: pointer;
}
.ms-ok:hover { filter: brightness(1.1); }
.ms-hint { font-size: 12px; color: var(--text-dim); }

/* ---------- 分段视图切换（共振推荐榜 / 机构预期榜）：无外框，按钮自带胶囊样式 ---------- */
.seg-tabs { display: inline-flex; gap: 4px; margin-bottom: 16px; }
.seg-btn {
    border: none; background: transparent;
    color: var(--text-dim); font-size: 13px; font-weight: 600;
    padding: 7px 20px; border-radius: 999px; cursor: pointer;
    transition: background var(--transition), color var(--transition);
}
.seg-btn:hover { background: var(--bg-hover); color: var(--text); }
.seg-btn.active { background: var(--accent); color: #fff; }
.seg-btn.active:hover { background: var(--accent); color: #fff; }

/* ---------- 表单 ---------- */
.form-card { max-width: 380px; margin: 60px auto; }
.form-card h2 { margin-bottom: 20px; text-align: center; }
.field { margin-bottom: 14px; }
.field label { display: block; color: var(--text-dim); font-size: 13px; margin-bottom: 4px; }
.field input, .field textarea, .field select {
    width: 100%; background: var(--bg); color: var(--text);
    border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; font-size: 14px;
    transition: border-color var(--transition), box-shadow var(--transition);
}
.field input:focus, .field textarea:focus, .field select:focus {
    outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft);
}
.field textarea { min-height: 100px; resize: vertical; }

/* 统一 select 下拉箭头：原生箭头各浏览器渲染不一，全部替换为 CSS 双线三角；
   仅作用于 select 与多选触发按钮，普通按钮不带箭头。
   必须置于 .filter-bar/.field 基础规则之后：它们的 background 简写会隐式清掉 background-image */
.filter-bar select, .field select, .ms-select .ms-btn {
    appearance: none; -webkit-appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, var(--text-dim) 50%), linear-gradient(135deg, var(--text-dim) 50%, transparent 50%);
    background-position: calc(100% - 16px) 55%, calc(100% - 11px) 55%;
    background-size: 5px 5px; background-repeat: no-repeat;
    padding-right: 30px;
}
select option { background: var(--bg-card); color: var(--text); }
.btn-primary {
    width: 100%; background: #238636; color: #fff; border: none; border-radius: 8px;
    padding: 10px; font-size: 15px; font-weight: 600; cursor: pointer;
    transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
}
.btn-primary:hover { background: #2ea043; box-shadow: 0 4px 14px rgba(46, 160, 67, .3); }
.btn-primary:active { transform: scale(.98); }
.btn-primary:disabled { opacity: .6; cursor: not-allowed; transform: none; box-shadow: none; }
.form-foot { text-align: center; margin-top: 14px; color: var(--text-dim); font-size: 13px; }

/* 注册页邮箱验证码行：输入框与发码按钮同行。按钮 flex:none + nowrap 防 CJK 内部断行，
   空间不足时整体换行（与发布弹窗按钮断行修复同模式） */
.f-code-row { display: flex; flex-wrap: wrap; gap: 8px; }
.f-code-row input { flex: 1 1 0; min-width: 0; }
.btn-code {
    flex: none; white-space: nowrap;
    background: transparent; color: var(--accent);
    border: 1px solid var(--accent); border-radius: 8px;
    padding: 0 14px; font-size: 13px; cursor: pointer;
    transition: background var(--transition), opacity var(--transition);
}
.btn-code:hover { background: var(--accent-soft); }
.btn-code:disabled { opacity: .55; cursor: not-allowed; background: transparent; }

/* ---------- 评论 ---------- */
.comment-list { margin-top: 12px; }
.comment { padding: 8px 0; border-bottom: 1px dashed var(--border); font-size: 13px; animation: cardIn .25s ease both; }
.comment .meta { color: var(--text-dim); font-size: 12px; margin-left: 6px; }
.comment .author { color: var(--accent); font-weight: 600; }
.comment-input { display: flex; gap: 8px; margin-top: 10px; }
.comment-input input {
    flex: 1; background: var(--bg); color: var(--text); border: 1px solid var(--border);
    border-radius: 8px; padding: 8px 12px; font-size: 13px;
    transition: border-color var(--transition), box-shadow var(--transition);
}
.comment-input input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

/* ---------- 排行榜 ---------- */
.rank-row {
    display: flex; align-items: center; gap: 12px; padding: 12px; border-bottom: 1px solid var(--border);
    transition: background var(--transition); border-radius: 8px; color: var(--text);
}
.rank-row:hover { background: var(--bg-hover); }
.rank-row:last-child { border-bottom: none; }
.rank-row .f-arrow { color: var(--text-dim); align-self: center; flex-shrink: 0; transition: color var(--transition), transform var(--transition); }
.rank-row:hover .f-arrow { color: var(--accent); transform: translateX(2px); }
.rank-no {
    width: 28px; height: 28px; border-radius: 50%; background: var(--bg-hover); color: var(--text-dim);
    display: flex; align-items: center; justify-content: center; font-weight: 700; flex-shrink: 0;
    font-variant-numeric: tabular-nums;
}
.rank-no.top1 { background: linear-gradient(135deg, #d29922, #e3b341); color: #1b1f24; box-shadow: 0 0 10px rgba(210, 153, 34, .35); }
.rank-no.top2 { background: linear-gradient(135deg, #6e7681, #98a1ab); color: #1b1f24; }
.rank-no.top3 { background: linear-gradient(135deg, #9d6a44, #b8835a); color: #1b1f24; }
.rank-main { flex: 1; min-width: 0; }
.rank-main .name { font-weight: 600; }
.rank-main .sub { color: var(--text-dim); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-count { text-align: right; flex-shrink: 0; }
.rank-count .num { color: var(--up); font-weight: 700; font-variant-numeric: tabular-nums; }
.rank-count .lbl { color: var(--text-dim); font-size: 11px; }

/* ---------- 机构历史推荐明细 ---------- */
.inst-detail { background: var(--bg); border-radius: 0 0 8px 8px; }
.inst-msg {
    display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px;
    border-bottom: 1px dashed var(--border); color: var(--text);
    transition: background var(--transition); border-radius: 6px;
}
.inst-msg:last-child { border-bottom: none; }
.inst-msg:hover { background: var(--bg-hover); }
.inst-msg .tag { flex-shrink: 0; margin-top: 2px; }
.inst-msg-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.inst-msg-date { color: var(--text-dim); font-size: 12px; }
.inst-msg-view { color: var(--gold); font-size: 13px; }
.inst-msg-brief {
    color: var(--text-dim); font-size: 12px; overflow: hidden; text-overflow: ellipsis;
    display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical;
}
.inst-msg .f-arrow { color: var(--text-dim); align-self: center; flex-shrink: 0; }

/* ---------- 成就 ---------- */
.badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.badge {
    background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 16px 12px; text-align: center; position: relative; overflow: hidden;
    transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}
.badge:hover { transform: translateY(-3px); border-color: #3d444d; box-shadow: var(--shadow); }
.badge.locked { opacity: .45; filter: grayscale(.8); }
.badge.locked:hover { transform: none; box-shadow: none; }
.badge .emoji { font-size: 30px; display: inline-block; transition: transform var(--transition); }
.badge:hover .emoji { transform: scale(1.15); }
.badge .bname { font-weight: 700; margin-top: 6px; }
.badge .bdesc { font-size: 12px; color: var(--text-dim); margin-top: 2px; }
.badge .btime { font-size: 11px; color: var(--gold); margin-top: 4px; }
.badge.unlocked::after {
    content: "已解锁"; position: absolute; top: 8px; right: -26px; transform: rotate(45deg);
    background: var(--gold); color: var(--bg); font-size: 10px; padding: 1px 30px; font-weight: 700;
}

/* ---------- toast / modal ---------- */
#toast-box { position: fixed; top: 68px; right: 20px; z-index: 999; display: flex; flex-direction: column; gap: 8px; }
.toast {
    background: var(--bg-card); border: 1px solid var(--accent); border-radius: 8px;
    padding: 12px 16px; box-shadow: 0 4px 20px rgba(0,0,0,.5); animation: slidein .3s ease;
    max-width: 300px; backdrop-filter: blur(12px);
}
.toast.achv { border-color: var(--gold); box-shadow: 0 4px 20px rgba(210, 153, 34, .25); }
.toast .t-title { font-weight: 700; }
.toast .t-sub { font-size: 12px; color: var(--text-dim); margin-top: 2px; word-break: break-all; }
@keyframes slidein { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }

.modal-mask {
    position: fixed; inset: 0; background: rgba(0,0,0,.75); z-index: 998;
    display: none; align-items: center; justify-content: center; padding: 20px;
    backdrop-filter: blur(4px);
}
.modal-mask.show { display: flex; animation: fadeIn .2s ease; }
/* 弹层打开时锁背景滚动（body.modal-open 由 app.js 的 MutationObserver 同步） */
body.modal-open { overflow: hidden; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
    position: relative;
    background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
    max-width: 560px; width: 100%; max-height: 80vh; overflow: auto; padding: 20px;
    animation: modalIn .25s cubic-bezier(.4, 0, .2, 1);
    overscroll-behavior: contain; /* 弹层内滚到头不再链式带动背景 */
}
@keyframes modalIn { from { opacity: 0; transform: scale(.95); } to { opacity: 1; transform: none; } }
.modal img { max-width: 100%; border-radius: 8px; }
/* 绝对定位贴右上角（原 float 会与正文首行基线对不齐，各弹层表现不一致） */
.modal .close-x {
    position: absolute; top: 10px; right: 10px;
    background: none; border: none; color: var(--text-dim); font-size: 20px; cursor: pointer;
    width: 32px; height: 32px; border-radius: 50%; line-height: 1;
    transition: background var(--transition), color var(--transition);
}
.modal .close-x:hover { background: var(--bg-hover); color: var(--text); }
.modal.img-modal { padding: 12px; }
.modal.img-modal .close-x { top: 6px; right: 6px; }
/* 弹层首行（标签/时间行）给右上角 × 留位，避免重叠 */
.modal .msg-head { padding-right: 36px; }

/* ---------- 分享页 ---------- */
.share-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 16px; }
.share-card { max-width: 520px; width: 100%; }
.share-card .share-meta { color: var(--text-dim); margin-bottom: 10px; text-align: center; }
.share-card .btn-primary { margin-top: 16px; display: block; text-align: center; width: auto; padding: 10px 24px; }

/* ---------- 主题切换按钮（固定右上角，网页/移动端通用） ---------- */
.theme-toggle {
    position: fixed; top: 16px; right: 16px; z-index: 200;
    width: 40px; height: 40px; border-radius: 50%;
    background: var(--bg-card); border: 1px solid var(--border);
    color: var(--text); font-size: 18px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .2);
    transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
    -webkit-tap-highlight-color: transparent; user-select: none;
}
.theme-toggle:hover { transform: rotate(20deg) scale(1.08); border-color: var(--accent); }
.theme-toggle:active { transform: scale(.92); }
@media (max-width: 720px) { .theme-toggle { top: 10px; right: 10px; width: 36px; height: 36px; font-size: 16px; } }

/* ---------- 成就进阶阶梯 ---------- */
/* 页头退出登录：文字链接形态，避免占一整行 */
.logout-link {
    background: none; border: none; color: var(--text-dim); font-size: 13px;
    cursor: pointer; padding: 0; margin-left: 12px;
    text-decoration: underline; text-underline-offset: 3px;
}
.logout-link:hover { color: #f85149; }

/* 总览摘要：单行紧凑展示，替代原大块统计格 */
.achv-summary {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    color: var(--text-dim); font-size: 13px; margin-bottom: 14px;
    padding: 8px 14px; background: var(--bg-card);
    border: 1px solid var(--border); border-radius: 10px;
}
.achv-summary b { color: var(--accent); font-weight: 600; font-variant-numeric: tabular-nums; }
.achv-summary .sep { opacity: .5; }

.achv-cat {
    background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 16px; margin-bottom: 14px; animation: cardIn .35s ease both;
}
.achv-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.achv-head .cat-emoji { font-size: 22px; }
.achv-head .cat-name { font-weight: 700; font-size: 16px; }
.achv-head .cur-level { color: var(--accent); font-size: 13px; font-weight: 600; }
.achv-head .cat-count { margin-left: auto; color: var(--text-dim); font-size: 13px; font-variant-numeric: tabular-nums; }

/* 进度条 */
.achv-progress { height: 8px; background: var(--bg-hover); border-radius: 999px; overflow: hidden; margin-bottom: 4px; }
.achv-progress .bar {
    height: 100%; border-radius: 999px; width: 0;
    background: linear-gradient(90deg, var(--accent), #a371f7);
    transition: width .6s cubic-bezier(.4, 0, .2, 1);
}
.achv-progress-hint { font-size: 12px; color: var(--text-dim); margin-bottom: 14px; }
.achv-progress-hint b { color: var(--accent); font-weight: 600; }

/* 等级阶梯：4 列节点 */
.achv-ladder {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
    position: relative; margin-top: 6px;
}
.achv-level {
    text-align: center; padding: 12px 4px 10px; border-radius: 10px;
    border: 1px solid var(--border); background: var(--bg);
    position: relative; transition: transform var(--transition), border-color var(--transition);
}
.achv-level:hover { transform: translateY(-2px); }
.achv-level .lv-badge {
    width: 34px; height: 34px; margin: 0 auto 6px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 13px; color: var(--text-dim);
    background: var(--bg-hover); border: 1px solid var(--border);
}
.achv-level .lv-name { font-size: 13px; font-weight: 600; }
.achv-level .lv-th { font-size: 11px; color: var(--text-dim); margin-top: 1px; }
.achv-level .lv-time { font-size: 10px; color: var(--gold); margin-top: 3px; }

/* 等级配色：解锁后按 tier 渐次升级（铜→银→金→钻石） */
.achv-level.on { border-color: currentColor; }
.achv-level.on .lv-badge { color: #fff; border: none; }
.achv-level.tier1.on { color: #b8835a; }  .achv-level.tier1.on .lv-badge { background: linear-gradient(135deg, #9d6a44, #c9986f); }
.achv-level.tier2.on { color: #8b949e; }  .achv-level.tier2.on .lv-badge { background: linear-gradient(135deg, #6e7681, #a7b1bb); }
.achv-level.tier3.on { color: var(--gold); } .achv-level.tier3.on .lv-badge { background: linear-gradient(135deg, #d29922, #e3b341); }
.achv-level.tier4.on { color: #a371f7; } .achv-level.tier4.on .lv-badge { background: linear-gradient(135deg, #7c3aed, #b98cf7); box-shadow: 0 0 12px rgba(163, 113, 247, .4); }
.achv-level:not(.on) { opacity: .55; }
.achv-level:not(.on) .lv-name { color: var(--text-dim); }
.achv-level.locked-next { opacity: .85; border-style: dashed; }
@media (max-width: 480px) {
    .achv-ladder { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- 杂项 ---------- */
.load-more {
    display: block; width: 100%; margin: 16px 0; background: var(--bg-card); color: var(--text-dim);
    border: 1px solid var(--border); border-radius: 8px; padding: 10px; cursor: pointer;
    transition: color var(--transition), border-color var(--transition), background var(--transition);
}
.load-more:hover { color: var(--text); border-color: var(--accent); background: var(--accent-soft); }
.load-more:disabled { cursor: default; opacity: .65; background: var(--bg); }
.load-more:disabled:hover { color: var(--text-dim); border-color: var(--border); background: var(--bg); }
.empty { text-align: center; color: var(--text-dim); padding: 40px 0; }
.mt16 { margin-top: 16px; }
.text-dim { color: var(--text-dim); }

/* ---------- 我的（枢纽页） ---------- */
.hub-user { display: flex; align-items: center; gap: 16px; padding: 20px; margin-bottom: 16px; }
.hub-avatar {
    width: 52px; height: 52px; border-radius: 50%; flex: none;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; font-weight: 700; color: #fff;
    background: linear-gradient(135deg, var(--accent), #6f42c1);
}
.hub-user-info { flex: 1; min-width: 0; }
.hub-username { font-size: 17px; font-weight: 700; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.vip-badge {
    font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 20px; line-height: 1.4;
}
.vip-badge.on { color: var(--gold); background: rgba(210, 153, 34, .14); border: 1px solid rgba(210, 153, 34, .4); }
.vip-badge.off { color: var(--text-dim); background: var(--bg-hover); border: 1px solid var(--border); }
.hub-vip-sub { font-size: 13px; color: var(--text-dim); margin-top: 4px; }

/* 会员中心显眼入口（我的页状态大卡）：生效中金色、过期/未开通警示并高亮 CTA */
.hub-vip-card {
    display: flex; align-items: center; gap: 14px; padding: 18px 20px; margin-bottom: 16px;
    text-decoration: none; transition: border-color var(--transition), transform var(--transition);
}
.hub-vip-card:hover { transform: translateY(-1px); }
.hub-vip-card.on {
    border: 1px solid rgba(210, 153, 34, .45);
    background: linear-gradient(135deg, rgba(210, 153, 34, .14), rgba(210, 153, 34, .04));
}
.hub-vip-card.off {
    border: 1px solid var(--border);
    background: linear-gradient(135deg, rgba(88, 166, 255, .1), transparent);
}
.hvc-main { flex: 1; min-width: 0; }
.hvc-title { font-size: 15px; font-weight: 700; color: var(--text); }
.hub-vip-card.on .hvc-title { color: var(--gold); }
.hvc-sub { font-size: 12.5px; color: var(--text-dim); margin-top: 4px; line-height: 1.5; }
.hvc-btn {
    flex: none; font-size: 13px; font-weight: 700; padding: 8px 16px; border-radius: 20px; line-height: 1.4;
}
.hvc-btn.ghost { color: var(--gold); background: rgba(210, 153, 34, .14); border: 1px solid rgba(210, 153, 34, .45); }
.hvc-btn.hot { color: #fff; background: linear-gradient(135deg, var(--gold), #b8860b); }

.hub-cells { padding: 4px 0; }
.hub-cell {
    display: flex; align-items: center; gap: 14px; padding: 15px 20px;
    color: var(--text); text-decoration: none;
    border-bottom: 1px solid var(--border);
    transition: background-color var(--transition);
}
.hub-cell:last-child { border-bottom: none; }
.hub-cell:hover { background: var(--bg-hover); }
.hub-ic { font-size: 22px; flex: none; width: 30px; text-align: center; }
.hub-cell-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.hub-cell-main b { font-size: 15px; }
.hub-cell-main small { font-size: 12px; color: var(--text-dim); }
.hub-arrow { color: var(--text-dim); font-size: 20px; flex: none; }

/* ---------- 会员中心 ---------- */
.vip-hero { padding: 26px 24px; margin-bottom: 16px; border-left: 3px solid var(--gold); }
.vip-hero.off { border-left-color: var(--border); }
.vip-hero-label { font-size: 16px; font-weight: 700; color: var(--gold); }
.vip-hero.off .vip-hero-label { color: var(--text-dim); }
.vip-hero-date { font-size: 14px; color: var(--text); margin-top: 8px; }
.vip-hero-note { font-size: 12px; color: var(--text-dim); margin-top: 6px; }
.vip-section { padding: 20px 24px; margin-bottom: 16px; }
.vip-section h2 { font-size: 15px; margin-bottom: 14px; }
.vip-redeem { display: flex; gap: 10px; flex-wrap: wrap; }
.vip-redeem input {
    flex: 1; min-width: 200px; background: var(--bg); color: var(--text);
    border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; font-size: 14px;
}
.vip-redeem input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.vip-redeem .btn-primary { width: auto; padding: 10px 24px; }
.vip-pay { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.vip-qr { text-align: center; }
/* 高度固定、宽度按图片原始比例自适应——收款码为竖版图，固定方形会拉伸变形导致无法识别 */
.vip-qr img {
    height: 150px; width: auto; border-radius: 10px;
    border: 1px solid var(--border); background: #fff;
}
.vip-qr-cap { font-size: 14px; font-weight: 600; margin-top: 8px; }
.vip-qr-note { font-size: 12px; color: var(--text-dim); margin-top: 2px; line-height: 1.5; }
.vip-pay-text { flex: 1; min-width: 180px; font-size: 14px; line-height: 1.9; }
.vip-pay-text .text-dim { font-size: 13px; margin-top: 8px; line-height: 1.7; }

/* ---------- 会员到期倒计时横幅（首页，剩余<=7天） ---------- */
.vip-countdown { display: block; padding: 10px 14px; margin-bottom: 14px; border-radius: 10px; font-size: 13px; color: var(--text); text-decoration: none; background: rgba(210, 153, 34, .07); border: 1px solid rgba(210, 153, 34, .45); transition: transform .15s ease, border-color .15s ease; }
.vip-countdown:hover { transform: translateY(-1px); border-color: var(--gold); }
.vip-countdown.warn { background: rgba(214, 69, 65, .06); border-color: rgba(214, 69, 65, .4); }
.vip-countdown.urgent { background: rgba(214, 69, 65, .1); border-color: rgba(214, 69, 65, .6); color: var(--up); font-weight: 600; }

/* ---------- 未付费用户 3 天限时折扣营销横幅 ---------- */
.promo-countdown {
    display: block; padding: 12px 14px; margin-bottom: 14px; border-radius: 10px;
    font-size: 13.5px; line-height: 1.6; color: var(--text); text-decoration: none;
    background: linear-gradient(90deg, rgba(214, 69, 65, .12), rgba(210, 153, 34, .10));
    border: 1px solid rgba(214, 69, 65, .5); transition: transform .15s ease, border-color .15s ease;
}
.promo-countdown b { color: var(--up); }
.promo-countdown s { color: var(--text-dim); opacity: .75; }
.promo-countdown:hover { transform: translateY(-1px); border-color: var(--gold); }
.promo-countdown.warn { background: rgba(214, 69, 65, .09); border-color: rgba(214, 69, 65, .55); }
.promo-countdown.urgent { background: rgba(214, 69, 65, .14); border-color: rgba(214, 69, 65, .75); color: var(--up); font-weight: 600; }

/* ---------- vip 挽回转化卡（过期用户）：损失厌恶 + 价格锚定 ---------- */
.vip-winback { padding: 22px 24px; margin-bottom: 16px; border-left: 3px solid var(--up); }
.vw-title { font-size: 17px; font-weight: 700; color: var(--up); }
.vw-sub { font-size: 13px; color: var(--text-dim); margin-top: 6px; line-height: 1.7; }
.vw-anchor { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 16px; }
.vw-anchor-item { text-align: center; padding: 10px 18px; border: 1px solid var(--border); border-radius: 10px; }
.va-price { font-size: 22px; font-weight: 700; color: var(--gold); }
.va-price small { font-size: 12px; font-weight: 400; color: var(--text-dim); }
.va-name { font-size: 12px; color: var(--text-dim); margin-top: 2px; }
.vw-anchor-sep { font-size: 13px; color: var(--text-dim); font-weight: 600; }
.vw-anchor-note { font-size: 12px; color: var(--gold); width: 100%; margin-top: 4px; }
.vw-action { margin-top: 16px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.vw-action .btn-primary { width: auto; padding: 10px 22px; }
.vw-action-note { font-size: 13px; color: var(--text-dim); }
.vip-hero-nudge { color: var(--gold); }

/* ---------- admin 行为分析 ---------- */
.an-metrics { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 14px; }
.an-metric { padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg); }
.an-num { font-size: 22px; font-weight: 700; color: var(--accent); }
.an-num.hot { color: var(--up); }
.an-name { font-size: 12px; color: var(--text-dim); margin-top: 2px; }
.an-chart { margin-top: 6px; }
.an-chart svg { width: 100%; height: auto; display: block; }
.an-hint { font-size: 12px; color: var(--text-dim); margin-top: 8px; line-height: 1.7; }

/* ---------- admin 响应式（.admin-page 覆盖全部管理页） ---------- */
/* 管理页表单卡：占满主区域自适应（不固定 px 宽度），标题左对齐 */
.admin-page .form-card { max-width: 100%; margin: 0 0 20px; }
.admin-page .form-card h2 { text-align: left; }
.admin-page .form-card .tier-hint { text-align: left; }
/* 管理页内联表单：按钮与字段同行，不占满整行 */
.admin-page .form-card form .btn-primary { width: auto; padding: 10px 22px; }
/* 用户表操作列：按钮横向紧凑排布（不换行），避免垂直堆叠成多行 */
.admin-user-table td:last-child { white-space: nowrap; }
.admin-user-table td:last-child .text-link { font-size: 12px; }

/* ---------- 在线状态圆点（用户表）：在线绿色呼吸光圈，离线灰色 ---------- */
.online-cell { white-space: nowrap; }
.online-dot {
    display: inline-block; width: 8px; height: 8px; border-radius: 50%;
    background: #9aa3af; margin-right: 6px; vertical-align: middle;
}
.online-dot.on { background: #22c55e; animation: online-pulse 2s infinite; }
@keyframes online-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(34, 197, 94, .45); }
    70%  { box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
    100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}
@media (prefers-reduced-motion: reduce) {
    .online-dot.on { animation: none; }
}

@media (max-width: 720px) {
    .admin-page .form-card { margin: 0 0 16px; }
    /* 覆盖表单字段内联 min-width，小屏全宽堆叠 */
    .admin-page .field { flex: 1 1 100% !important; min-width: 0 !important; }
    .admin-page .form-card form .btn-primary { width: 100%; }
    .admin-user-table { font-size: 12px; }
    .admin-user-table th, .admin-user-table td { padding: 5px 8px; }
    .an-metrics { grid-template-columns: repeat(2, 1fr); }
    .an-num { font-size: 18px; }
    .an-metric { padding: 10px 12px; }
}

/* 会员档位价格表（会员中心充值区，客户可见） */
.vip-price-row { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.vip-price-cell {
    flex: 1; min-width: 100px; text-align: center; padding: 14px 8px 12px;
    border: 1px solid var(--border); border-radius: 10px;
    background: var(--bg); transition: border-color var(--transition);
}
.vip-price-cell:hover { border-color: var(--gold); }
.vp-name { font-size: 13px; color: var(--text-dim); }
.vp-price { font-size: 20px; font-weight: 700; color: var(--gold); margin-top: 4px; }
.vp-note { font-size: 11px; color: var(--text-dim); margin-top: 2px; }

/* 管理页档位提示（仅管理员可见的计费提醒） */
.tier-hint { font-size: 12.5px; color: var(--text-dim); margin-top: 10px; line-height: 1.6; }
.admin-hint { padding: 8px 12px; background: var(--bg-hover); border-radius: 8px; }

/* 永久会员徽章 */
.vip-badge.forever {
    color: #fff; background: linear-gradient(135deg, var(--gold), #b8860b);
    border: 1px solid transparent;
}

/* ---------- 深度研享付费墙 ---------- */
.paywall { padding: 44px 24px; text-align: center; }
.paywall .pw-icon { font-size: 42px; }
.paywall h2 { font-size: 18px; margin: 12px 0 8px; }
.pw-desc { font-size: 14px; color: var(--text-dim); }
.pw-list { list-style: none; margin: 18px auto 0; max-width: 380px; text-align: left; }
.pw-list li { padding: 8px 0; font-size: 14px; border-bottom: 1px dashed var(--border); }
.pw-list li:last-child { border-bottom: none; }
.pw-btn { display: inline-block; margin-top: 22px; width: auto; padding: 10px 32px; text-decoration: none; white-space: nowrap; }

/* ---------- 会员锁定卡（免费用户首页可见） ---------- */
.tag-lock {
    display: inline-block; font-size: 11px; line-height: 1; padding: 3px 7px;
    border-radius: 6px; background: rgba(210, 153, 34, .15); color: var(--gold);
    border: 1px solid rgba(210, 153, 34, .35); font-weight: 600;
}
.locked-card { border-color: rgba(210, 153, 34, .28); background: linear-gradient(180deg, var(--bg-card), rgba(13, 17, 23, .35)); cursor: pointer; }
.locked-card:hover { border-color: rgba(210, 153, 34, .55); }
/* 锁定卡标题不模糊（露出标题可读），仅预览正文模糊 */
.locked-title {
    color: var(--text); font-weight: 600; display: block;
}
.locked-title.clickable:hover { color: var(--accent); }
.locked-preview {
    margin-top: 8px; font-size: 13.5px; color: var(--text-dim); line-height: 1.7;
    filter: blur(4.5px); user-select: none;
    -webkit-user-select: none; overflow: hidden; max-height: 2.4em;
}
.locked-cta {
    display: inline-block; margin-top: 10px; font-size: 13px; font-weight: 600;
    color: var(--gold); text-decoration: none; cursor: pointer;
}
.locked-cta:hover { text-decoration: underline; }

/* 深度研享免费用户：标题（股票名/机构名）清晰，付费内容（板块/机构列表/预期）视觉模糊 */
.advisor-locked-row { cursor: pointer; position: relative; }
.locked-mask { filter: blur(4px); user-select: none; -webkit-user-select: none; }
.advisor-free-hint { margin-top: 18px; }
.advisor-free-login { margin-top: 12px; font-size: 13px; }

/* ---------- 解锁浮层 ---------- */
.unlock-modal { max-width: 400px; text-align: center; padding: 26px 24px 20px; }
.unlock-head { font-size: 17px; }
.unlock-points { font-size: 13.5px; color: var(--text-dim); margin: 10px 0 14px; line-height: 1.7; }
.unlock-tiers { display: flex; gap: 10px; margin-bottom: 14px; }
.unlock-tier {
    flex: 1; border: 1px solid var(--border); border-radius: 10px; padding: 10px 6px;
    background: var(--bg); display: flex; flex-direction: column; gap: 4px;
}
.unlock-tier .ut-name { font-size: 12.5px; color: var(--text-dim); }
.unlock-tier .ut-price { font-size: 17px; font-weight: 700; color: var(--gold); }
.unlock-btn { display: block; text-decoration: none; margin-bottom: 16px; }
/* 双码区：收款码 + 加好友码并排（窄屏换行） */
.unlock-codes {
    display: flex; gap: 12px; justify-content: center; flex-wrap: wrap;
    border-top: 1px dashed var(--border); padding-top: 16px;
}
.unlock-code {
    flex: 1; min-width: 130px; max-width: 180px; text-align: center;
    border: 1px solid var(--border); border-radius: 10px; padding: 12px 10px;
    background: var(--bg);
}
.unlock-code img {
    height: 108px; width: auto; border-radius: 8px;
    border: 1px solid var(--border); background: #fff;
}
.unlock-code .uc-name { font-size: 13.5px; font-weight: 700; margin-top: 8px; }
.unlock-code .uc-note { font-size: 11.5px; color: var(--text-dim); margin-top: 4px; line-height: 1.6; }
.unlock-code .uc-note b { color: var(--gold); }
.unlock-login { margin-top: 14px; font-size: 13px; }
.unlock-login-link { font-weight: 600; }

/* ---------- 整站分享浮层 ---------- */
.site-share-modal .share-qr {
    display: flex; flex-direction: column; align-items: center; gap: 8px;
    margin: 4px 0 14px;
}
.site-share-modal .share-qr img {
    width: 170px; height: 170px; background: #fff;
    border: 1px solid var(--border); border-radius: 10px; padding: 8px;
}
.share-url-row {
    display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap;
    border-top: 1px dashed var(--border); padding-top: 14px;
}
.share-url { font-size: 13.5px; color: var(--accent); word-break: break-all; }
.share-copy-btn { width: auto; flex: none; padding: 7px 14px; font-size: 13px; cursor: pointer; }

/* ---------- 消息分享海报弹窗 ---------- */
.share-image-modal { max-width: 440px; text-align: center; padding: 24px 20px 20px; }
.share-image-modal .poster-scroll {
    max-height: 60vh; overflow-y: auto; border-radius: 12px;
}
.share-image-modal .poster-img {
    display: block; width: auto; max-width: 100%; margin: 0 auto;
    border-radius: 12px; box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
}
.share-image-modal .share-dl {
    display: block; margin: 16px 0 2px; width: 100%; text-decoration: none;
    box-sizing: border-box;
}



/* ---------- 学院（版块入口 → 栏目列表 → 文章详情） ---------- */
/* 版块入口页（四栏各一卡，点击进入栏目） */
.acd-hub { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; align-items: stretch; }
.acd-hub-card {
    display: flex; flex-direction: column; overflow: hidden;
    background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px;
    text-decoration: none; color: var(--text);
    transition: border-color .2s ease, transform .2s ease;
}
.acd-hub-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.acd-hub-cover { height: 132px; background: var(--bg-hover); flex: none; }
.acd-hub-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.acd-hub-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 8px; min-height: 0; }
.acd-hub-head { display: flex; align-items: center; gap: 8px; }
.acd-hub-head .acd-ico { font-size: 20px; line-height: 1; }
.acd-hub-head h2 { font-size: 16px; margin: 0; }
.acd-hub-desc { font-size: 12.5px; color: var(--text-dim); margin: 0; line-height: 1.6; }
.acd-hub-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.acd-chip {
    font-size: 11.5px; color: var(--text-dim); white-space: nowrap;
    background: var(--bg-hover); border: 1px solid var(--border); border-radius: 999px;
    padding: 2px 9px;
}
.acd-hub-meta { display: flex; align-items: center; gap: 8px; margin-top: auto; }
.acd-hub-count { margin-left: auto; font-size: 12.5px; color: var(--accent); font-weight: 600; white-space: nowrap; }

/* 栏目页（封面横幅 + 子模块分组列表） */
.acd-cat-hero {
    position: relative; border-radius: 12px; overflow: hidden;
    margin-bottom: 18px; background: var(--bg-hover);
}
.acd-cat-hero img { width: 100%; height: 170px; object-fit: cover; display: block; }
.acd-cat-hero-body {
    position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center;
    gap: 6px; padding: 0 22px;
    background: linear-gradient(90deg, rgba(8,12,20,.85) 0%, rgba(8,12,20,.55) 55%, rgba(8,12,20,.1) 100%);
}
.acd-cat-hero-ico { font-size: 20px; line-height: 1; }
.acd-cat-hero h1 { color: #fff; font-size: 20px; margin: 0; }
.acd-cat-hero p { color: rgba(255,255,255,.82); font-size: 12.5px; margin: 0; }
.acd-cat-hero-meta { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.acd-sec {
    font-size: 13.5px; color: var(--text-dim); font-weight: 600;
    margin: 16px 2px 10px; padding-left: 8px;
    border-left: 3px solid var(--accent);
}
.acd-card {
    display: flex; gap: 12px; padding: 11px 13px; margin-bottom: 9px;
    background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px;
    text-decoration: none; color: var(--text);
    transition: border-color .2s ease, transform .2s ease;
}
.acd-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.acd-thumb {
    flex: none; width: 92px; height: 92px; align-self: flex-start;
    border-radius: 8px; overflow: hidden; background: var(--bg-hover);
}
.acd-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.acd-card-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.acd-card-top { display: flex; align-items: flex-start; gap: 8px; }
.acd-title {
    flex: 1 1 auto; min-width: 0;
    font-size: 14px; font-weight: 600; line-height: 1.5;
}
.acd-card:hover .acd-title { color: var(--accent); }
.acd-card-top .tag { flex: none; white-space: nowrap; margin-top: 2px; }
.acd-summary {
    font-size: 12.5px; color: var(--text-dim); line-height: 1.6; margin: 6px 0 8px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.acd-meta { display: flex; gap: 12px; font-size: 12px; color: var(--text-dim); margin-top: auto; }
.acd-note { font-size: 12px; color: var(--text-dim); margin-top: 18px; text-align: center; }
@media (max-width: 720px) {
    .acd-hub { grid-template-columns: 1fr; }
    .acd-hub-cover { height: 110px; }
    .acd-cat-hero img { height: 120px; }
    .acd-thumb { width: 76px; height: 76px; }
}

/* ---------- 学院文章详情 ---------- */
.acd-article { max-width: 760px; margin: 0 auto; }
.acd-back {
    display: inline-block; font-size: 13px; color: var(--text-dim);
    text-decoration: none; margin-bottom: 14px;
}
.acd-back:hover { color: var(--accent); }
.acd-head { margin-bottom: 6px; }
.acd-head h1 { font-size: 20px; line-height: 1.5; margin: 8px 0; }
.acd-head-meta { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12.5px; color: var(--text-dim); margin-bottom: 20px; }
.acd-cat-link { color: var(--text-dim); text-decoration: none; }
.acd-cat-link:hover { color: var(--accent); }
.acd-hero { margin: 0 0 18px; border-radius: 12px; overflow: hidden; background: var(--bg-hover); }
/* 题图完整显示（不裁切，保留图上文字）；图本身深色底，与容器融为一体 */
.acd-hero img { width: 100%; height: auto; display: block; }
.acd-body { font-size: 15px; line-height: 1.9; }
.acd-body h3 { font-size: 16px; margin: 26px 0 10px; }
.acd-body p { margin: 0 0 14px; }
.acd-body ul.acd-list { margin: 0 0 14px; padding-left: 20px; }
.acd-body ul.acd-list li { margin: 6px 0; line-height: 1.75; }
.acd-body strong { color: var(--text); }
.acd-lockbox {
    position: relative; margin: 6px 0 4px; padding: 4px 0 26px;
}
.acd-lockbox .acd-body { filter: blur(5px); user-select: none; -webkit-user-select: none; }
.acd-lockmask {
    position: absolute; left: 0; right: 0; bottom: 0; height: 110px;
    background: linear-gradient(180deg, transparent, var(--bg-card));
}
.acd-related { margin-top: 26px; }
.acd-related h4 { font-size: 14px; margin-bottom: 10px; color: var(--text-dim); }
.acd-rel-card {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 12px; margin-bottom: 8px;
    background: var(--bg-hover); border: 1px solid var(--border); border-radius: 8px;
    color: var(--text); text-decoration: none;
}
.acd-rel-card:hover { border-color: var(--accent); }
.acd-rel-thumb {
    flex: none; width: 52px; height: 52px;
    border-radius: 6px; overflow: hidden; background: var(--bg-card);
}
.acd-rel-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.acd-rel-info { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.acd-rel-title { font-size: 13.5px; font-weight: 500; line-height: 1.45; }
.acd-rel-info .r-meta { font-size: 12px; color: var(--text-dim); white-space: nowrap; }

/* ---------- 首页加载态：首屏骨架屏 + 底部加载动画 ---------- */
.skeleton-card { padding: 14px 15px; display: flex; flex-direction: column; gap: 10px; }
.sk-line {
    height: 12px; border-radius: 6px;
    background: linear-gradient(90deg, var(--bg-hover) 25%, var(--border) 50%, var(--bg-hover) 75%);
    background-size: 200% 100%;
    animation: sk-shimmer 1.2s ease-in-out infinite;
}
.sk-w40 { width: 40%; } .sk-w95 { width: 95%; } .sk-w70 { width: 70%; } .sk-w52 { width: 52%; }
@keyframes sk-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

.feed-loading {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    padding: 16px 0; color: var(--text-dim); font-size: 13px;
}
.feed-loading[hidden] { display: none; }
.spinner {
    width: 16px; height: 16px; flex: none;
    border: 2px solid var(--border); border-top-color: var(--accent);
    border-radius: 50%; animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 移动端滑动优化：卡片内图片/文本不抢占触摸手势 ----------
   图片默认可被系统拖拽，手指落图滑动时 WebView 会先"拖图"导致页面滚动不跟手。
   这里禁掉 feed 内图片原生拖拽/选中，并把 #feed 手势限定为纵向滚动。 */
#feed img,
#feed .skeleton-card {
    -webkit-user-drag: none;
    -webkit-touch-callout: none;
    user-select: none;
}
#feed { touch-action: manipulation; }
body { overscroll-behavior-y: contain; }