/* ==========================================================================
   ZhiNanBBS — Design System
   暖白画布 + 白色悬浮卡片：柔和描边、微阴影、大留白、精致排版
   （v1.5 视觉焕新，参考 mylt.net 的克制卡片风）
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. 设计令牌 / Design tokens
   -------------------------------------------------------------------------- */
:root {
    /* 字号阶梯（论坛以信息密度优先，略放大约束） */
    --text-xs:   0.75rem;   /* 12px */
    --text-sm:   0.8125rem; /* 13px */
    --text-base: 0.875rem;  /* 14px */
    --text-md:   0.9375rem; /* 15px */
    --text-lg:   1.0625rem; /* 17px */
    --text-xl:   1.25rem;   /* 20px */
    --text-2xl:  1.5rem;    /* 24px */
    --text-3xl:  1.875rem;  /* 30px */

    /* 间距（4px 基准） */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;

    /* 圆角（v1.5：放大为柔和圆角） */
    --radius-sm: 6px;
    --radius:    8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 9999px;

    /* 布局 */
    --container: 1200px;
    --header-height: 60px;
    --sidebar-width: 300px;
    --sidebar-left: 208px;

    /* 动效 */
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
    --transition: 150ms var(--ease);
    --transition-slow: 260ms var(--ease);

    /* 字体：中英文混排优先系统字体，避免加载外部字体 */
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
                 "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB",
                 "Microsoft YaHei UI", "Microsoft YaHei", "Source Han Sans SC",
                 "Noto Sans CJK SC", sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
                 "Liberation Mono", "Courier New", monospace;

    /* 强调色简写别名（随 data-accent 自动解析） */
    --accent: var(--accent-500);
    --accent-fg: #ffffff;
}

/* 主题强调色（由后台设置切换 data-accent） */
:root,
[data-accent="blue"] {
    --accent-50:  #eff5ff;
    --accent-100: #dbe8fe;
    --accent-200: #bfd6fd;
    --accent-300: #93b8f8;
    --accent-400: #5b8def;
    --accent-500: #2b6cb0;
    --accent-600: #1f5591;
    --accent-700: #17416f;
}
[data-accent="indigo"] {
    --accent-50:  #eef2ff;
    --accent-100: #e0e7ff;
    --accent-200: #c7d2fe;
    --accent-300: #a5b4fc;
    --accent-400: #818cf8;
    --accent-500: #6366f1;
    --accent-600: #4f46e5;
    --accent-700: #4338ca;
}
[data-accent="teal"] {
    --accent-50:  #effcf9;
    --accent-100: #d3f5ec;
    --accent-200: #a8ebda;
    --accent-300: #6fdcc3;
    --accent-400: #2bb59a;
    --accent-500: #0f8f78;
    --accent-600: #0b7260;
    --accent-700: #08574a;
}
[data-accent="green"] {
    --accent-50:  #f0faf1;
    --accent-100: #d9f2dd;
    --accent-200: #b3e5bb;
    --accent-300: #7fd08d;
    --accent-400: #34a853;
    --accent-500: #1e8e3e;
    --accent-600: #16732f;
    --accent-700: #105724;
}
[data-accent="rose"] {
    --accent-50:  #fff1f2;
    --accent-100: #ffe4e6;
    --accent-200: #fecdd3;
    --accent-300: #fda4af;
    --accent-400: #fb7185;
    --accent-500: #e11d48;
    --accent-600: #be123c;
    --accent-700: #9f1239;
}
[data-accent="emerald"] {
    --accent-50:  #ecfdf5;
    --accent-100: #d1fae5;
    --accent-200: #a7f3d0;
    --accent-300: #6ee7b7;
    --accent-400: #34d399;
    --accent-500: #059669;
    --accent-600: #047857;
    --accent-700: #065f46;
}
[data-accent="amber"] {
    --accent-50:  #fffbeb;
    --accent-100: #fef3c7;
    --accent-200: #fde68a;
    --accent-300: #fcd34d;
    --accent-400: #f59e0b;
    --accent-500: #b45309;
    --accent-600: #92400e;
    --accent-700: #78350f;
}
[data-accent="slate"] {
    --accent-50:  #f8fafc;
    --accent-100: #f1f5f9;
    --accent-200: #e2e8f0;
    --accent-300: #cbd5e1;
    --accent-400: #94a3b8;
    --accent-500: #475569;
    --accent-600: #334155;
    --accent-700: #1e293b;
}

/* 浅色主题（暖白画布 + 纯白卡片） */
:root,
[data-theme="light"] {
    color-scheme: light;
    --bg:            #f6f4f1;
    --bg-elevated:   #ffffff;
    --bg-subtle:     #faf9f7;
    --bg-inset:      #f1efeb;
    --bg-hover:      #f3f1ed;
    --surface-2:     #faf9f7;
    --surface-3:     #f0eeea;
    --border:        #e8e5df;
    --border-strong: #d8d4cb;

    --text:          #23262b;
    --text-secondary:#565b63;
    --text-muted:    #8b8f97;
    --text-tertiary: #a2a6ad;
    --text-inverse:  #ffffff;

    /* 卡片悬浮感：柔和双层阴影 */
    --shadow-xs: 0 1px 2px rgba(28, 25, 20, 0.04);
    --shadow-sm: 0 1px 3px rgba(28, 25, 20, 0.06);
    --shadow:    0 2px 8px rgba(28, 25, 20, 0.07);
    --shadow-md: 0 8px 24px -6px rgba(28, 25, 20, 0.10);
    --shadow-lg: 0 18px 44px -8px rgba(28, 25, 20, 0.16);
    --shadow-card: 0 1px 2px rgba(28, 25, 20, 0.04), 0 4px 14px -8px rgba(28, 25, 20, 0.12);

    --success-bg: #eefaf3; --success-fg: #047857; --success-border: #a7e3c6;
    --warn-bg:    #fdf7e8; --warn-fg:    #92600a; --warn-border:    #f0d99a;
    --warning-fg: #b45309;
    --danger-bg:  #fdf1f2; --danger-fg:  #b3182f; --danger-border:  #f2c2c9;
    --info-bg:    #eef4fd; --info-fg:    #1d4ed8; --info-border:    #c2d6f5;

    --code-bg:    #f5f3ef;
    --mark-bg:    #fde68a;
    --mark-fg:    #6b3b0a;
    --overlay:    rgba(28, 25, 20, 0.44);
}

/* 深色主题（暖中性灰阶） */
[data-theme="dark"] {
    color-scheme: dark;
    --bg:            #17181b;
    --bg-elevated:   #1f2125;
    --bg-subtle:     #24262b;
    --bg-inset:      #1a1c20;
    --bg-hover:      #2a2d33;
    --surface-2:     #24262b;
    --surface-3:     #2c2f35;
    --border:        #2f3238;
    --border-strong: #3f434b;

    --text:          #e7e8ea;
    --text-secondary:#a9adb5;
    --text-muted:    #787d86;
    --text-tertiary: #646973;
    --text-inverse:  #17181b;

    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.36);
    --shadow:    0 2px 10px rgba(0, 0, 0, 0.42);
    --shadow-md: 0 8px 22px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 20px 48px rgba(0, 0, 0, 0.6);
    --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.3), 0 6px 18px -10px rgba(0, 0, 0, 0.5);

    --success-bg: rgba(16, 185, 129, 0.12); --success-fg: #6ee7b7; --success-border: rgba(16, 185, 129, 0.28);
    --warn-bg:    rgba(245, 158, 11, 0.12); --warn-fg:    #fcd34d; --warn-border:    rgba(245, 158, 11, 0.28);
    --warning-fg: #fcd34d;
    --danger-bg:  rgba(244, 63, 94, 0.12);  --danger-fg:  #fda4af; --danger-border:  rgba(244, 63, 94, 0.28);
    --info-bg:    rgba(59, 130, 246, 0.12); --info-fg:    #93c5fd; --info-border:    rgba(59, 130, 246, 0.28);

    --code-bg:    #14161a;
    --mark-bg:    #a16207;
    --mark-fg:    #fef9c3;
    --overlay:    rgba(0, 0, 0, 0.65);
}

/* --------------------------------------------------------------------------
   2. 重置 / Reset
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font-sans);
    font-size: var(--text-base);
    line-height: 1.65;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-feature-settings: "kern" 1;
    overflow-wrap: break-word;
}

h1, h2, h3, h4, h5, h6 {
    margin: 0;
    font-weight: 650;
    line-height: 1.35;
    letter-spacing: -0.011em;
}

p { margin: 0; }

a {
    color: var(--accent-600);
    text-decoration: none;
    transition: color var(--transition);
}
a:hover { color: var(--accent-700); }
[data-theme="dark"] a { color: var(--accent-400); }
[data-theme="dark"] a:hover { color: var(--accent-200); }

img, svg, video { max-width: 100%; height: auto; display: block; }

button, input, select, textarea {
    font: inherit;
    color: inherit;
}

button { cursor: pointer; }

ul, ol { margin: 0; padding: 0; }

hr {
    border: 0;
    border-top: 1px solid var(--border);
    margin: var(--space-6) 0;
}

::selection {
    background: var(--accent-200);
    color: var(--text);
}
[data-theme="dark"] ::selection { background: var(--accent-700); color: #fff; }

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

/* 滚动条 */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: var(--border-strong);
    border-radius: var(--radius-full);
    border: 3px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* 可访问性：仅屏幕阅读器可见 */
.sr-only {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    left: var(--space-4);
    top: -100px;
    z-index: 200;
    padding: var(--space-3) var(--space-5);
    background: var(--accent-600);
    color: #fff;
    border-radius: var(--radius);
    transition: top var(--transition);
}
.skip-link:focus { top: var(--space-4); color: #fff; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* --------------------------------------------------------------------------
   3. 布局 / Layout
   -------------------------------------------------------------------------- */
.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 var(--space-5);
}

.site { display: flex; flex-direction: column; min-height: 100vh; }
.site-main { flex: 1; padding: var(--space-8) 0 var(--space-16); }

.layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) var(--sidebar-width);
    gap: var(--space-5);
    align-items: start;
}

.layout--wide { grid-template-columns: minmax(0, 1fr); }

/* 三栏：左版块导航（较窄） + 中间内容 + 右侧信息 */
.layout--forum {
    grid-template-columns: var(--sidebar-left) minmax(0, 1fr) var(--sidebar-width);
}
.layout__aside { position: sticky; top: calc(var(--header-height) + var(--space-5)); display: grid; gap: var(--space-4); }
.layout__side { position: sticky; top: calc(var(--header-height) + var(--space-5)); display: grid; gap: var(--space-4); }

@media (max-width: 1180px) {
    .layout--forum { grid-template-columns: var(--sidebar-left) minmax(0, 1fr); }
    .layout--forum .layout__aside { display: none; }
}
@media (max-width: 1024px) {
    .layout,
    .layout--forum { grid-template-columns: minmax(0, 1fr); }
    .layout__aside,
    .layout__side { position: static; }
    /* 窄屏下内容优先：主题流排到版块导航之前 */
    .layout--forum .layout__main { order: -1; }
}

/* 首页左栏版块导航（树形折叠） */
.forum-nav { font-size: var(--text-sm); }
.forum-nav__group + .forum-nav__group { border-top: 1px solid var(--border); }
.forum-nav__toggle {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    width: 100%;
    padding: var(--space-2) var(--space-3);
    background: transparent;
    border: 0;
    text-align: left;
    font-weight: 620;
    font-size: var(--text-sm);
    color: var(--text);
}
.forum-nav__toggle:hover { background: var(--bg-hover); }
.forum-nav__toggle .icon { color: var(--text-muted); transition: transform var(--transition); flex-shrink: 0; }
.forum-nav__group.is-collapsed .forum-nav__toggle .icon { transform: rotate(-90deg); }
.forum-nav__dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.forum-nav__label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.forum-nav__body { padding-bottom: var(--space-1); }
.forum-nav__group.is-collapsed .forum-nav__body { display: none; }
.forum-nav__item {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3) var(--space-2) var(--space-5);
    color: var(--text-secondary);
    border-left: 2px solid transparent;
    font-size: var(--text-sm);
}
.forum-nav__item:hover { background: var(--bg-hover); color: var(--text); }
.forum-nav__item.is-active { color: var(--accent-600); border-left-color: var(--accent-500); background: var(--accent-50); }
[data-theme="dark"] .forum-nav__item.is-active { background: color-mix(in srgb, var(--accent-500) 12%, transparent); color: var(--accent-400); }
.forum-nav__name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.forum-nav__count { font-size: 10px; color: var(--text-muted); font-variant-numeric: tabular-nums; }

/* 最新注册会员（首页右栏） */
.new-members { display: grid; gap: 2px; }
.new-member {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-2);
    border-radius: var(--radius);
    color: var(--text);
}
.new-member:hover { background: var(--bg-hover); }
.new-member__main { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.new-member__name {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    font-size: var(--text-sm);
    font-weight: 550;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.new-member__meta {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 1px;
}

/* --------------------------------------------------------------------------
   4. 顶部导航 / Header
   -------------------------------------------------------------------------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: color-mix(in srgb, var(--bg-elevated) 88%, transparent);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    height: var(--header-height);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    font-weight: 700;
    font-size: var(--text-md);
    color: var(--text);
    letter-spacing: -0.02em;
    flex-shrink: 0;
}
.brand:hover { color: var(--text); }

.brand__mark {
    width: 28px; height: 28px;
    display: grid; place-items: center;
    border-radius: var(--radius);
    background: var(--accent-600);
    color: #fff;
    font-size: var(--text-sm);
    font-weight: 700;
    flex-shrink: 0;
}
.brand__logo { height: 30px; width: auto; border-radius: 8px; }
.brand__name { white-space: nowrap; }

@media (max-width: 560px) {
    .brand__name { display: none; }
}

.nav {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    flex: 1;
    min-width: 0;
}

.nav__link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius);
    color: var(--text-secondary);
    font-size: var(--text-sm);
    font-weight: 500;
    white-space: nowrap;
    transition: background var(--transition), color var(--transition);
}
.nav__link:hover { background: var(--bg-hover); color: var(--text); }
.nav__link.is-active { color: var(--accent-600); background: var(--accent-50); }
[data-theme="dark"] .nav__link.is-active { color: var(--accent-400); background: color-mix(in srgb, var(--accent-500) 14%, transparent); }

.header-actions {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-left: auto;
    flex-shrink: 0;
}

/* 搜索框（头部） */
.header-search {
    position: relative;
    display: flex;
    align-items: center;
    width: 200px;
    transition: width var(--transition-slow);
}
.header-search:focus-within { width: 280px; }
.header-search input {
    width: 100%;
    padding: 7px var(--space-3) 7px 34px;
    font-size: var(--text-sm);
    background: var(--surface-3);
    border: 1px solid transparent;
    border-radius: var(--radius-full);
    transition: background var(--transition), border-color var(--transition);
}
.header-search input:focus {
    outline: none;
    background: var(--bg-elevated);
    border-color: var(--accent-400);
    box-shadow: var(--shadow-xs);
}
.header-search .icon {
    position: absolute;
    left: 11px;
    color: var(--text-muted);
    pointer-events: none;
}

@media (max-width: 860px) {
    .header-search { display: none; }
}

/* 图标按钮 */
.icon-btn {
    display: inline-grid;
    place-items: center;
    width: 36px; height: 36px;
    border: 1px solid transparent;
    border-radius: var(--radius);
    background: transparent;
    color: var(--text-secondary);
    position: relative;
    transition: background var(--transition), color var(--transition);
}
.icon-btn:hover { background: var(--bg-hover); color: var(--text); }

.icon-btn__badge {
    position: absolute;
    top: 2px; right: 1px;
    min-width: 16px; height: 16px;
    padding: 0 4px;
    display: grid; place-items: center;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    color: #fff;
    background: #ef4444;
    border-radius: var(--radius-full);
    border: 2px solid var(--bg-elevated);
}

/* 用户菜单 */
.user-menu { position: relative; }

.user-trigger {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: 3px var(--space-2) 3px 3px;
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    background: transparent;
    transition: border-color var(--transition), background var(--transition);
}
.user-trigger:hover { border-color: var(--border-strong); background: var(--bg-hover); }
.user-trigger__name {
    font-size: var(--text-sm);
    font-weight: 500;
    max-width: 90px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
@media (max-width: 640px) {
    .user-trigger__name { display: none; }
    .user-trigger { padding: 2px; border-color: transparent; }
}

.dropdown {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    min-width: 220px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: var(--space-2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px) scale(0.98);
    transform-origin: top right;
    transition: opacity var(--transition), transform var(--transition), visibility var(--transition);
    z-index: 120;
}
.dropdown.is-open { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }

.dropdown__header {
    padding: var(--space-3);
    border-bottom: 1px solid var(--border);
    margin-bottom: var(--space-2);
}
.dropdown__name { font-weight: 600; }
.dropdown__meta { font-size: var(--text-xs); color: var(--text-muted); }

.dropdown__item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius);
    font-size: var(--text-sm);
    color: var(--text-secondary);
    width: 100%;
    border: 0;
    background: transparent;
    text-align: left;
    transition: background var(--transition), color var(--transition);
}
.dropdown__item:hover { background: var(--bg-hover); color: var(--text); }
.dropdown__item--danger { color: var(--danger-fg); }
.dropdown__item--danger:hover { background: var(--danger-bg); }
.dropdown__divider { height: 1px; background: var(--border); margin: var(--space-2) 0; }

/* 移动端导航 */
.mobile-nav {
    display: none;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    z-index: 100;
    background: color-mix(in srgb, var(--bg-elevated) 92%, transparent);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid var(--border);
    padding-bottom: env(safe-area-inset-bottom, 0);
}
.mobile-nav__inner { display: flex; }
.mobile-nav__item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: var(--space-2) 0 var(--space-3);
    font-size: 10px;
    color: var(--text-muted);
    position: relative;
}
.mobile-nav__item.is-active { color: var(--accent-600); }
[data-theme="dark"] .mobile-nav__item.is-active { color: var(--accent-400); }
.mobile-nav__item .icon-btn__badge { top: -2px; right: 50%; margin-right: -18px; }

@media (max-width: 720px) {
    .mobile-nav { display: block; }
    .site-main { padding-bottom: 76px; }
    .site-footer { padding-bottom: 72px; }
    .nav { display: none; }
}

/* 移动端底栏：当前项着色条 */
.mobile-nav__item.is-active::before {
    content: "";
    position: absolute;
    top: 0; left: 50%;
    width: 22px; height: 2px;
    margin-left: -11px;
    border-radius: 0 0 2px 2px;
    background: currentColor;
}
.mobile-nav__item:active { background: var(--bg-hover); }

/* 移动菜单面板 */
.mobile-drawer {
    position: fixed;
    inset: 0;
    z-index: 150;
    display: none;
}
.mobile-drawer.is-open { display: block; }
.mobile-drawer__backdrop {
    position: absolute; inset: 0;
    background: var(--overlay);
    animation: fade-in 180ms var(--ease);
}
.mobile-drawer__panel {
    position: absolute;
    top: 0; bottom: 0; right: 0;
    width: min(320px, 86vw);
    background: var(--bg-elevated);
    border-left: 1px solid var(--border);
    padding: var(--space-5);
    overflow-y: auto;
    animation: slide-in-right 220ms var(--ease);
}
@keyframes slide-in-right { from { transform: translateX(100%); } to { transform: translateX(0); } }

/* --------------------------------------------------------------------------
   5. 按钮 / Buttons
   -------------------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-4);
    min-height: 38px;
    font-size: var(--text-sm);
    font-weight: 550;
    line-height: 1.2;
    border-radius: var(--radius);
    border: 1px solid transparent;
    background: var(--bg-subtle);
    color: var(--text);
    white-space: nowrap;
    transition: background var(--transition), border-color var(--transition),
                color var(--transition), box-shadow var(--transition), transform var(--transition);
}
.btn:hover { background: var(--bg-hover); }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn.is-disabled { opacity: 0.55; pointer-events: none; }

.btn--primary {
    background: var(--accent-600);
    color: #fff;
    box-shadow: var(--shadow-xs);
}
.btn--primary:hover { background: var(--accent-700); color: #fff; }

.btn--outline {
    background: transparent;
    border-color: var(--border-strong);
    color: var(--text-secondary);
}
.btn--outline:hover { border-color: var(--accent-400); color: var(--accent-600); background: transparent; }

.btn--ghost { background: transparent; color: var(--text-secondary); }
.btn--ghost:hover { background: var(--bg-hover); color: var(--text); }

.btn--danger { background: var(--danger-bg); color: var(--danger-fg); border-color: var(--danger-border); }
.btn--danger:hover { background: var(--danger-fg); color: #fff; }

.btn--sm { min-height: 30px; padding: var(--space-1) var(--space-3); font-size: var(--text-xs); }
.btn--lg { min-height: 46px; padding: var(--space-3) var(--space-6); font-size: var(--text-md); }
.btn--block { width: 100%; }
.btn--icon { padding: var(--space-2); min-width: 38px; }

/* --------------------------------------------------------------------------
   6. 卡片 / Cards
   -------------------------------------------------------------------------- */
.card {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    overflow: hidden;
}
.card--flat { box-shadow: none; }
.card--raised { box-shadow: var(--shadow-md); }

.card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    padding: var(--space-4) var(--space-5);
    border-bottom: 1px solid var(--border);
    background: transparent;
}
.card__title {
    font-size: var(--text-base);
    font-weight: 650;
    letter-spacing: -0.01em;
    display: flex;
    align-items: center;
    gap: var(--space-2);
}
.card__title .icon { color: var(--text-muted); }
.card__body { padding: var(--space-5); }
.card__footer {
    padding: var(--space-3) var(--space-5);
    border-top: 1px solid var(--border);
    background: var(--bg-subtle);
    font-size: var(--text-sm);
    color: var(--text-muted);
}
.card__link { font-size: var(--text-sm); color: var(--text-muted); }
.card__link:hover { color: var(--accent-600); }

/* 页面标题 */
.page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: var(--space-4);
    flex-wrap: wrap;
    margin-bottom: var(--space-5);
}
.page-head__title { font-size: var(--text-2xl); letter-spacing: -0.02em; }
.page-head__desc { color: var(--text-muted); font-size: var(--text-sm); margin-top: var(--space-1); }
.page-head__actions { display: flex; gap: var(--space-2); flex-wrap: wrap; }

/* 面包屑 */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-sm);
    color: var(--text-muted);
    margin-bottom: var(--space-4);
    flex-wrap: wrap;
}
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--accent-600); }
.breadcrumb__sep { opacity: 0.5; }

/* --------------------------------------------------------------------------
   7. 头像 / Avatars
   -------------------------------------------------------------------------- */
.avatar {
    display: inline-grid;
    place-items: center;
    flex-shrink: 0;
    width: 40px; height: 40px;
    border-radius: var(--radius-full);
    background: var(--accent-500);
    color: #fff;
    font-weight: 650;
    font-size: var(--text-sm);
    overflow: hidden;
    user-select: none;
    object-fit: cover;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar--xs { width: 24px; height: 24px; font-size: 10px; }
.avatar--sm { width: 32px; height: 32px; font-size: var(--text-xs); }
.avatar--lg { width: 64px; height: 64px; font-size: var(--text-xl); }
.avatar--xl { width: 96px; height: 96px; font-size: var(--text-2xl); }

.avatar-stack { display: flex; }
.avatar-stack .avatar { border: 2px solid var(--bg-elevated); margin-left: -8px; }
.avatar-stack .avatar:first-child { margin-left: 0; }

/* --------------------------------------------------------------------------
   8. 徽章 / 标签 / Badges
   -------------------------------------------------------------------------- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 1px var(--space-2);
    font-size: var(--text-xs);
    font-weight: 550;
    line-height: 1.6;
    border-radius: var(--radius-sm);
    background: var(--surface-2);
    color: var(--text-secondary);
    white-space: nowrap;
}
.badge--accent { background: var(--accent-50); color: var(--accent-700); }
[data-theme="dark"] .badge--accent { background: color-mix(in srgb, var(--accent-500) 16%, transparent); color: var(--accent-200); }
.badge--success { background: var(--success-bg); color: var(--success-fg); }
.badge--warn    { background: var(--warn-bg);    color: var(--warn-fg); }
.badge--danger  { background: var(--danger-bg);  color: var(--danger-fg); }
.badge--info    { background: var(--info-bg);    color: var(--info-fg); }
.badge--solid   { background: var(--accent-600); color: #fff; }
.badge--sticky  { background: #ef4444; color: #fff; }
.badge--digest  { background: #f59e0b; color: #fff; }
.badge--locked  { background: var(--bg-inset); color: var(--text-muted); }
.badge--role-admin     { background: #ef4444; color: #fff; }
.badge--role-moderator { background: #0ea5e9; color: #fff; }

/* 帖子类型 / 状态徽章（浅底深字，v1.5 统一） */
.badge--question { background: color-mix(in srgb, #0ea5e9 15%, transparent); color: #0369a1; }
.badge--bounty   { background: color-mix(in srgb, #f59e0b 18%, transparent); color: #b45309; }
.badge--lottery  { background: color-mix(in srgb, #a855f7 15%, transparent); color: #7e22ce; }
.badge--solved   { background: color-mix(in srgb, #10b981 15%, transparent); color: #047857; }
.badge--featured { background: color-mix(in srgb, #f43f5e 15%, transparent); color: #be123c; }
.badge--muted    { background: var(--surface-3); color: var(--text-tertiary); }
[data-theme="dark"] .badge--question { color: #7dd3fc; }
[data-theme="dark"] .badge--bounty   { color: #fcd34d; }
[data-theme="dark"] .badge--lottery  { color: #d8b4fe; }
[data-theme="dark"] .badge--solved   { color: #6ee7b7; }
[data-theme="dark"] .badge--featured { color: #fda4af; }

/* 标签胶囊 */
.tag {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 1px var(--space-2);
    font-size: var(--text-xs);
    border-radius: var(--radius-sm);
    background: var(--surface-2);
    color: var(--text-secondary);
    border: 1px solid var(--border);
    transition: all var(--transition);
}
.tag:hover { border-color: currentColor; background: var(--bg-hover); }

.tag-list { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.tag-cloud { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; }

/* --------------------------------------------------------------------------
   9. 表单 / Forms
   -------------------------------------------------------------------------- */
.form-row { margin-bottom: var(--space-4); }
.form-row:last-child { margin-bottom: 0; }

/* 设置页分区（同卡片内的语义分组） */
.form-section + .form-section {
    margin-top: var(--space-6);
    padding-top: var(--space-6);
    border-top: 1px solid var(--border);
}
.form-section__title {
    font-size: var(--text-sm);
    font-weight: 650;
    color: var(--text);
    margin-bottom: var(--space-4);
}
.form-section__title .icon { color: var(--text-muted); vertical-align: -2px; margin-right: 4px; }
.form-section__hint { font-size: var(--text-xs); color: var(--text-muted); margin-top: var(--space-1); }

/* 头像设置行 */
.avatar-setting {
    display: flex;
    gap: var(--space-5);
    align-items: flex-start;
    flex-wrap: wrap;
}
.avatar-setting__main { flex: 1; min-width: 240px; }
.avatar-setting__actions { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.avatar-setting__actions .btn { cursor: pointer; }
.form-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-4);
}
@media (max-width: 560px) {
    .form-grid-2 { grid-template-columns: 1fr; }
}

/* 设置页窄列（改密表单等） */
.settings-narrow { max-width: 460px; }

.form-label {
    display: block;
    font-size: var(--text-sm);
    font-weight: 560;
    margin-bottom: var(--space-2);
    color: var(--text);
}
.form-label__hint {
    font-weight: 400;
    color: var(--text-muted);
    font-size: var(--text-xs);
    margin-left: var(--space-2);
}
.form-label .required { color: var(--danger-fg); margin-left: 2px; }

.input, .textarea, .select {
    width: 100%;
    padding: var(--space-2) var(--space-3);
    min-height: 40px;
    font-size: var(--text-base);
    color: var(--text);
    background: var(--bg-elevated);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}
.input::placeholder, .textarea::placeholder { color: var(--text-muted); }
.input:focus, .textarea:focus, .select:focus {
    outline: none;
    border-color: var(--accent-500);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-500) 16%, transparent);
}
.input.is-invalid, .textarea.is-invalid { border-color: var(--danger-fg); }

.textarea { resize: vertical; min-height: 120px; line-height: 1.7; }

.select {
    appearance: none;
    padding-right: var(--space-8);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%237c8494' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right var(--space-3) center;
}

.form-hint { font-size: var(--text-xs); color: var(--text-muted); margin-top: var(--space-2); }
.form-error {
    font-size: var(--text-xs);
    color: var(--danger-fg);
    margin-top: var(--space-2);
    display: flex;
    align-items: flex-start;
    gap: 4px;
}

.input-group { display: flex; gap: var(--space-2); align-items: flex-start; }
.input-group .input { flex: 1; }

/* 复选框 / 单选 */
.checkbox, .radio {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-sm);
    cursor: pointer;
    user-select: none;
}
.checkbox input, .radio input {
    width: 16px; height: 16px;
    accent-color: var(--accent-600);
    cursor: pointer;
    flex-shrink: 0;
}

/* 开关 */
.switch { display: inline-flex; align-items: center; gap: var(--space-3); cursor: pointer; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch__track {
    width: 40px; height: 22px;
    background: var(--border-strong);
    border-radius: var(--radius-full);
    position: relative;
    transition: background var(--transition);
    flex-shrink: 0;
}
.switch__track::after {
    content: "";
    position: absolute;
    top: 2px; left: 2px;
    width: 18px; height: 18px;
    background: #fff;
    border-radius: 50%;
    box-shadow: var(--shadow-xs);
    transition: transform var(--transition);
}
.switch input:checked + .switch__track { background: var(--accent-600); }
.switch input:checked + .switch__track::after { transform: translateX(18px); }
.switch input:focus-visible + .switch__track { outline: 2px solid var(--accent-500); outline-offset: 2px; }

/* 验证码 */
.captcha-box { display: flex; align-items: center; gap: var(--space-2); }
.captcha-box img {
    height: 44px;
    width: auto;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    cursor: pointer;
    background: var(--bg-subtle);
}

/* --------------------------------------------------------------------------
   10. 提示条 / Alerts
   -------------------------------------------------------------------------- */
.alert {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius);
    border: 1px solid transparent;
    font-size: var(--text-sm);
    margin-bottom: var(--space-4);
}
.alert__icon { flex-shrink: 0; margin-top: 1px; }
.alert--success { background: var(--success-bg); color: var(--success-fg); border-color: var(--success-border); }
.alert--error   { background: var(--danger-bg);  color: var(--danger-fg);  border-color: var(--danger-border); }
.alert--warn    { background: var(--warn-bg);    color: var(--warn-fg);    border-color: var(--warn-border); }
.alert--info    { background: var(--info-bg);    color: var(--info-fg);    border-color: var(--info-border); }

/* 公告条 */
.announcement {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    margin-bottom: var(--space-5);
    background: var(--accent-50);
    border: 1px solid var(--accent-100);
    border-left: 3px solid var(--accent-500);
    border-radius: var(--radius);
    font-size: var(--text-sm);
    color: var(--accent-700);
}
[data-theme="dark"] .announcement {
    background: color-mix(in srgb, var(--accent-500) 12%, transparent);
    border-color: color-mix(in srgb, var(--accent-500) 24%, transparent);
    border-left-color: var(--accent-500);
    color: var(--accent-200);
}

/* --------------------------------------------------------------------------
   11. 主题列表 / Thread list
   -------------------------------------------------------------------------- */
.thread-list { display: flex; flex-direction: column; }

.thread-item {
    display: flex;
    gap: var(--space-4);
    padding: var(--space-4) var(--space-5);
    border-bottom: 1px solid var(--border);
    transition: background var(--transition);
    position: relative;
}
.thread-item:last-child { border-bottom: 0; }
.thread-item:hover { background: var(--bg-hover); }
.thread-item.is-pinned { background: color-mix(in srgb, var(--accent-500) 4%, transparent); }

.thread-item__avatar { flex-shrink: 0; }

.thread-item__main { flex: 1; min-width: 0; }

.thread-item__title {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    flex-wrap: wrap;
    font-size: var(--text-md);
    font-weight: 620;
    line-height: 1.45;
    margin-bottom: var(--space-2);
}
.thread-item__title a { color: var(--text); }
.thread-item__title a:hover { color: var(--accent-600); }
.thread-item__title .icon { color: var(--text-muted); flex-shrink: 0; }

.thread-item__meta {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    flex-wrap: wrap;
    font-size: var(--text-xs);
    color: var(--text-muted);
}
.thread-item__meta .sep { opacity: 0.4; }
.thread-item__meta a { color: var(--text-muted); }
.thread-item__meta a:hover { color: var(--accent-600); }
.thread-item__forum { display: inline-flex; align-items: center; gap: 5px; }
.thread-item__dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; flex-shrink: 0; }

.thread-item__stats {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    flex-shrink: 0;
    align-self: center;
    font-size: var(--text-xs);
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}
.thread-item__stat {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-width: 3.2em;
    justify-content: flex-end;
}
.thread-item__stat .icon { opacity: .65; flex-shrink: 0; }
.thread-item:hover .thread-item__stat { color: var(--text-secondary); }
/* 旧样式保留（其他位置仍可能引用） */
.stat-pill {
    min-width: 52px;
    padding: var(--space-1) var(--space-2);
    text-align: center;
    background: var(--bg-subtle);
    border-radius: var(--radius);
    line-height: 1.3;
}
.stat-pill__value { font-size: var(--text-sm); font-weight: 620; color: var(--text); }
.stat-pill__label { font-size: 10px; color: var(--text-muted); }
.stat-pill--accent .stat-pill__value { color: var(--accent-600); }

@media (max-width: 720px) {
    .thread-item { gap: var(--space-3); padding: var(--space-4); }
    .thread-item__stats { gap: var(--space-2); }
    .thread-item__stat { min-width: 0; }
    .thread-item__meta { gap: var(--space-2); }
}

/* 未读/新帖指示 */
.thread-item__dot {
    position: absolute;
    left: 0; top: 50%;
    width: 3px; height: 22px;
    margin-top: -11px;
    background: var(--accent-500);
    border-radius: 0 3px 3px 0;
}

/* --------------------------------------------------------------------------
   12. 版块 / Forum list
   -------------------------------------------------------------------------- */
.forum-group { margin-bottom: var(--space-6); }

.forum-group__head {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    border-bottom: 0;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}
.forum-group__name { font-size: var(--text-base); font-weight: 650; }
.forum-group__count { font-size: var(--text-xs); color: var(--text-muted); margin-left: auto; }

.forum-group__body {
    border: 1px solid var(--border);
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    background: var(--bg-elevated);
    overflow: hidden;
}

.forum-row {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    border-bottom: 1px solid var(--border);
    transition: background var(--transition);
}
.forum-row:last-child { border-bottom: 0; }
.forum-row:hover { background: var(--bg-hover); }

.forum-row__icon {
    width: 36px; height: 36px;
    display: grid; place-items: center;
    border-radius: var(--radius);
    flex-shrink: 0;
    font-size: var(--text-md);
}
.forum-row__main { flex: 1; min-width: 0; }
.forum-row__name {
    font-size: var(--text-base);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: var(--space-2);
    flex-wrap: wrap;
}
.forum-row__name a { color: var(--text); }
.forum-row__name a:hover { color: var(--accent-600); }
.forum-row__desc {
    font-size: var(--text-xs);
    color: var(--text-muted);
    margin-top: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
}
.forum-row__latest {
    width: 240px;
    flex-shrink: 0;
    font-size: var(--text-xs);
    color: var(--text-muted);
    min-width: 0;
}
.forum-row__latest-title {
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
}
.forum-row__stats {
    display: flex;
    gap: var(--space-4);
    flex-shrink: 0;
    text-align: center;
}
.forum-row__stat { min-width: 44px; }
.forum-row__stat b { display: block; font-size: var(--text-sm); }
.forum-row__stat span { font-size: 10px; color: var(--text-muted); }

@media (max-width: 900px) {
    .forum-row__latest { display: none; }
}
@media (max-width: 640px) {
    .forum-row__stats { display: none; }
    .forum-row { padding: var(--space-3) var(--space-4); }
}

/* 子版块 */
.subforum-list { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.subforum-chip {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-1) var(--space-3);
    font-size: var(--text-xs);
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    color: var(--text-secondary);
}
.subforum-chip:hover { border-color: var(--accent-400); color: var(--accent-600); }
.subforum-chip__dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }

/* --------------------------------------------------------------------------
   13. 帖子 / Post（v1.2：作者信息在上，操作居中）
   -------------------------------------------------------------------------- */
.post {
    display: block;
    border-bottom: 1px solid var(--border);
    scroll-margin-top: calc(var(--header-height) + var(--space-4));
}
.post:last-child { border-bottom: 0; }
.post.is-highlight { animation: highlight-flash 2.4s var(--ease); }
@keyframes highlight-flash {
    0%, 30% { background: color-mix(in srgb, var(--accent-500) 12%, transparent); }
    100% { background: transparent; }
}

/* 作者信息条 */
.post__bar {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    padding: var(--space-4) var(--space-5);
    background: var(--bg-subtle);
    border-bottom: 1px solid var(--border);
}
.post--first .post__bar { background: transparent; padding-bottom: var(--space-3); }
.post__bar-avatar { flex-shrink: 0; line-height: 0; }
.post__bar-main { flex: 1; min-width: 0; }
.post__bar-top {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    flex-wrap: wrap;
    min-height: 22px;
}
.post__bar-name {
    font-weight: 650;
    font-size: var(--text-base);
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 24ch;
}
.post__bar-name:hover { color: var(--accent-600); }
.post__bar-title { font-size: var(--text-xs); color: var(--text-muted); }
.post__bar-meta {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-top: 4px;
    font-size: var(--text-xs);
    color: var(--text-muted);
    flex-wrap: wrap;
}
.post__bar-stat { font-variant-numeric: tabular-nums; }
.post__floor { font-weight: 600; color: var(--text-muted); font-size: var(--text-xs); }
.post__bar-time {
    margin-left: auto;
    font-size: var(--text-xs);
    color: var(--text-muted);
    white-space: nowrap;
    flex-shrink: 0;
    padding-top: 1px;
}
.post__bar-time:hover { color: var(--text-secondary); }
.post__edited { opacity: .8; }

.post__content {
    padding: var(--space-5);
    font-size: var(--text-md);
    line-height: 1.8;
    min-width: 0;
}
.post__content > *:first-child { margin-top: 0; }
.post__content > *:last-child { margin-bottom: 0; }

/* 操作条：居中、图标+文字的小按钮 */
.post__footer {
    display: flex;
    justify-content: center;
    padding: var(--space-2) var(--space-5) var(--space-4);
}
.post__actions { display: flex; align-items: center; gap: var(--space-1); flex-wrap: wrap; justify-content: center; }
.post__actions .inline { display: inline-flex; }

.act-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px var(--space-3);
    font-size: var(--text-xs);
    font-weight: 550;
    color: var(--text-muted);
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-full);
    transition: background var(--transition), color var(--transition), border-color var(--transition);
    line-height: 1.4;
}
.act-btn:hover { background: var(--bg-hover); color: var(--text); }
.act-btn.is-active { color: var(--danger-fg); background: var(--danger-bg); border-color: var(--danger-border); }
.act-btn.is-active .icon { fill: currentColor; }
.act-btn--danger:hover { color: var(--danger-fg); }
.act-btn:active { transform: scale(0.96); }
.act-btn .icon { flex-shrink: 0; }

.post__signature {
    margin: 0 var(--space-5) var(--space-3);
    padding-top: var(--space-3);
    border-top: 1px dashed var(--border);
    font-size: var(--text-xs);
    color: var(--text-muted);
}

/* 引用块 */
.post__quote {
    margin-bottom: var(--space-3);
    padding: var(--space-2) var(--space-3);
    background: var(--bg-subtle);
    border-left: 3px solid var(--accent-400);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-size: var(--text-sm);
    color: var(--text-secondary);
}
.post__quote-author {
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: 550;
    color: var(--text-secondary);
    font-size: var(--text-xs);
}

/* 兼容旧样式：点赞按钮 */
.like-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: var(--space-1) var(--space-3);
    font-size: var(--text-xs);
    font-weight: 550;
    color: var(--text-muted);
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    transition: all var(--transition);
}
.like-btn:hover { border-color: var(--danger-border); color: var(--danger-fg); }
.like-btn.is-liked {
    background: var(--danger-bg);
    border-color: var(--danger-border);
    color: var(--danger-fg);
}
.like-btn.is-liked .icon { fill: currentColor; }
.like-btn:active { transform: scale(0.95); }

@media (max-width: 800px) {
    .post__bar { padding: var(--space-3) var(--space-4); gap: var(--space-2); }
    .post__content { padding: var(--space-4); }
    .post__footer { padding: var(--space-1) var(--space-4) var(--space-3); }
    .post__bar-name { max-width: 14ch; }
    .post__signature { margin-left: var(--space-4); margin-right: var(--space-4); }
}

/* --------------------------------------------------------------------------
   14. Markdown 内容排版
   -------------------------------------------------------------------------- */
.md h1, .md h2, .md h3, .md h4 { margin: var(--space-6) 0 var(--space-3); }
.md h1 { font-size: var(--text-2xl); }
.md h2 { font-size: var(--text-xl); padding-bottom: var(--space-2); border-bottom: 1px solid var(--border); }
.md h3 { font-size: var(--text-lg); }
.md h4 { font-size: var(--text-md); }
.md p { margin: 0 0 var(--space-4); }
.md ul, .md ol { margin: 0 0 var(--space-4); padding-left: 1.5em; }
.md ul { list-style: disc; }
.md ol { list-style: decimal; }
.md li { margin-bottom: var(--space-1); }
.md li > ul, .md li > ol { margin-top: var(--space-1); margin-bottom: var(--space-1); }

.md blockquote {
    margin: 0 0 var(--space-4);
    padding: var(--space-3) var(--space-4);
    background: var(--bg-subtle);
    border-left: 3px solid var(--accent-400);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    color: var(--text-secondary);
}
.md blockquote > *:last-child { margin-bottom: 0; }

.md code {
    padding: 2px 5px;
    font-family: var(--font-mono);
    font-size: 0.875em;
    background: var(--code-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    word-break: break-word;
}

.md .code-block { position: relative; margin: 0 0 var(--space-4); }
.md .code-block pre {
    margin: 0;
    padding: var(--space-4);
    padding-top: var(--space-8);
    background: var(--code-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow-x: auto;
    font-size: var(--text-sm);
    line-height: 1.65;
}
.md .code-block code {
    padding: 0;
    background: none;
    border: 0;
    font-size: inherit;
}
.md .code-lang {
    position: absolute;
    top: var(--space-2); left: var(--space-3);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    font-family: var(--font-mono);
}
.md .code-copy {
    position: absolute;
    top: var(--space-2); right: var(--space-2);
    padding: 3px var(--space-2);
    font-size: 10px;
    color: var(--text-muted);
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    opacity: 0;
    transition: opacity var(--transition);
}
.md .code-block:hover .code-copy { opacity: 1; }
.md .code-copy:hover { color: var(--text); }

.md a { text-decoration: underline; text-underline-offset: 2px; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); }
.md a:hover { text-decoration-color: currentColor; }

.md img.md-image {
    max-width: 100%;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    margin: var(--space-2) 0;
    cursor: zoom-in;
}

.md hr { margin: var(--space-6) 0; }

.md del { color: var(--text-muted); }
.md mark { background: var(--mark-bg); color: var(--mark-fg); padding: 0 3px; border-radius: 3px; }

.md .mention {
    color: var(--accent-600);
    background: var(--accent-50);
    padding: 0 4px;
    border-radius: var(--radius-sm);
    font-weight: 500;
}
[data-theme="dark"] .md .mention { background: color-mix(in srgb, var(--accent-500) 18%, transparent); color: var(--accent-200); }

.md .table-wrap { overflow-x: auto; margin: 0 0 var(--space-4); }
.md table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }
.md th, .md td { padding: var(--space-2) var(--space-3); border: 1px solid var(--border); text-align: left; }
.md th { background: var(--bg-subtle); font-weight: 600; }
.md tr:nth-child(even) td { background: color-mix(in srgb, var(--bg-subtle) 45%, transparent); }

/* --------------------------------------------------------------------------
   15. 编辑器 / Editor
   -------------------------------------------------------------------------- */
.editor { border: 1px solid var(--border-strong); border-radius: var(--radius); overflow: hidden; background: var(--bg-elevated); }
.editor:focus-within { border-color: var(--accent-500); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-500) 16%, transparent); }

.editor__toolbar {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: var(--space-2);
    background: var(--bg-subtle);
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
}
.editor__tool {
    display: grid;
    place-items: center;
    width: 30px; height: 30px;
    border: 0;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-secondary);
    transition: background var(--transition), color var(--transition);
}
.editor__tool:hover { background: var(--bg-elevated); color: var(--text); }
.editor__tool.is-active { background: var(--accent-100); color: var(--accent-700); }
[data-theme="dark"] .editor__tool.is-active { background: color-mix(in srgb, var(--accent-500) 22%, transparent); color: var(--accent-200); }
.editor__divider { width: 1px; height: 18px; background: var(--border); margin: 0 var(--space-1); }
.editor__spacer { flex: 1; }

.editor__textarea {
    width: 100%;
    min-height: 220px;
    padding: var(--space-4);
    border: 0;
    background: transparent;
    resize: vertical;
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    line-height: 1.75;
}
.editor__textarea:focus { outline: none; }

.editor__preview {
    padding: var(--space-4);
    min-height: 220px;
    display: none;
}
.editor.is-preview .editor__textarea { display: none; }
.editor.is-preview .editor__preview { display: block; }

.editor__footer {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-2) var(--space-3);
    border-top: 1px solid var(--border);
    background: var(--bg-subtle);
    font-size: var(--text-xs);
    color: var(--text-muted);
    flex-wrap: wrap;
}

/* 表情选择器 */
.emoji-panel {
    position: absolute;
    z-index: 60;
    width: 288px;
    padding: var(--space-3);
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    display: none;
}
.emoji-panel.is-open { display: block; }
.emoji-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; max-height: 200px; overflow-y: auto; }
.emoji-grid button {
    border: 0;
    background: transparent;
    font-size: 19px;
    line-height: 1;
    padding: 4px 0;
    border-radius: var(--radius-sm);
    transition: background var(--transition);
}
.emoji-grid button:hover { background: var(--bg-hover); }

/* 标签输入 */
.tag-input { position: relative; }
.tag-input__chips { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-bottom: var(--space-2); }
.tag-chip {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: 2px var(--space-2);
    font-size: var(--text-xs);
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}
.tag-chip button { border: 0; background: none; color: var(--text-muted); line-height: 1; padding: 0 2px; }
.tag-chip button:hover { color: var(--danger-fg); }

/* --------------------------------------------------------------------------
   16. 分页 / Pagination
   -------------------------------------------------------------------------- */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-1);
    margin-top: var(--space-6);
    flex-wrap: wrap;
}
.pagination__item {
    display: grid;
    place-items: center;
    min-width: 34px; height: 34px;
    padding: 0 var(--space-2);
    font-size: var(--text-sm);
    color: var(--text-secondary);
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: all var(--transition);
}
.pagination__item:hover { border-color: var(--accent-400); color: var(--accent-600); }
.pagination__item.is-active {
    background: var(--accent-600);
    border-color: var(--accent-600);
    color: #fff;
    font-weight: 600;
}
.pagination__item.is-disabled { opacity: 0.4; pointer-events: none; }
.pagination__dots { color: var(--text-muted); padding: 0 var(--space-1); }
.pagination__info { font-size: var(--text-xs); color: var(--text-muted); text-align: center; width: 100%; margin-top: var(--space-2); }

/* --------------------------------------------------------------------------
   17. 侧边栏组件
   -------------------------------------------------------------------------- */
.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-3); }
.stat-card {
    padding: var(--space-4);
    background: var(--bg-subtle);
    border-radius: var(--radius);
    text-align: center;
}
.stat-card__value { font-size: var(--text-xl); font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; }
.stat-card__label { font-size: var(--text-xs); color: var(--text-muted); margin-top: 2px; }

/* 迷你主题条目 */
.mini-thread {
    display: block;
    padding: var(--space-3) var(--space-5);
    border-bottom: 1px solid var(--border);
    transition: background var(--transition);
}
.mini-thread:last-child { border-bottom: 0; }
.mini-thread:hover { background: var(--bg-hover); }
.mini-thread__title {
    font-size: var(--text-sm);
    color: var(--text);
    font-weight: 500;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.mini-thread:hover .mini-thread__title { color: var(--accent-600); }
.mini-thread__meta {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-top: var(--space-2);
    font-size: var(--text-xs);
    color: var(--text-muted);
}

/* 用户卡片（成员页） */
.user-card {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-4);
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition: border-color var(--transition), box-shadow var(--transition);
}
.user-card:hover { border-color: var(--accent-400); box-shadow: var(--shadow-xs); }
.user-card__main { min-width: 0; flex: 1; }
.user-card__name {
    font-weight: 600;
    font-size: var(--text-sm);
    display: flex;
    align-items: center;
    gap: var(--space-2);
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.user-card__meta { font-size: var(--text-xs); color: var(--text-muted); margin-top: 2px; }

.user-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: var(--space-4); }

/* --------------------------------------------------------------------------
   18. 空状态 / 骨架屏
   -------------------------------------------------------------------------- */
.empty {
    padding: var(--space-12) var(--space-6);
    text-align: center;
    color: var(--text-muted);
}
.empty__icon {
    width: 56px; height: 56px;
    margin: 0 auto var(--space-4);
    display: grid; place-items: center;
    background: var(--bg-subtle);
    border-radius: var(--radius-lg);
    color: var(--text-muted);
}
.empty__title { font-size: var(--text-base); font-weight: 600; color: var(--text-secondary); }
.empty__desc { font-size: var(--text-sm); margin-top: var(--space-2); }

.skeleton {
    background: linear-gradient(90deg, var(--bg-subtle) 25%, var(--bg-inset) 37%, var(--bg-subtle) 63%);
    background-size: 400% 100%;
    animation: skeleton 1.4s ease infinite;
    border-radius: var(--radius-sm);
}
@keyframes skeleton { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* --------------------------------------------------------------------------
   19. 模态框 / Modal
   -------------------------------------------------------------------------- */
.modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: none;
    align-items: center;
    justify-content: center;
    padding: var(--space-4);
}
.modal.is-open { display: flex; }
.modal__backdrop {
    position: absolute; inset: 0;
    background: var(--overlay);
    animation: fade-in 160ms var(--ease);
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.modal__panel {
    position: relative;
    width: 100%;
    max-width: 480px;
    max-height: 86vh;
    overflow-y: auto;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    animation: modal-in 200ms var(--ease);
}
@keyframes modal-in { from { opacity: 0; transform: translateY(10px) scale(0.98); } to { opacity: 1; transform: none; } }
.modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-4) var(--space-5);
    border-bottom: 1px solid var(--border);
}
.modal__title { font-size: var(--text-md); font-weight: 620; }
.modal__body { padding: var(--space-5); }
.modal__footer {
    display: flex;
    justify-content: flex-end;
    gap: var(--space-2);
    padding: var(--space-4) var(--space-5);
    border-top: 1px solid var(--border);
}

/* Toast 通知 */
.toast-container {
    position: fixed;
    top: calc(var(--header-height) + var(--space-4));
    right: var(--space-5);
    z-index: 300;
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    pointer-events: none;
}
.toast {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    min-width: 240px;
    max-width: 380px;
    padding: var(--space-3) var(--space-4);
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent-500);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    font-size: var(--text-sm);
    pointer-events: auto;
    animation: toast-in 240ms var(--ease);
}
.toast.is-leaving { animation: toast-out 200ms var(--ease) forwards; }
.toast--success { border-left-color: var(--success-fg); }
.toast--error { border-left-color: var(--danger-fg); }
.toast--warn { border-left-color: var(--warn-fg); }
@keyframes toast-in { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateX(24px); } }

@media (max-width: 560px) {
    .toast-container { left: var(--space-4); right: var(--space-4); top: auto; bottom: 84px; }
    .toast { max-width: none; }
}

/* --------------------------------------------------------------------------
   20. 表格（后台）
   -------------------------------------------------------------------------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }
.table th {
    text-align: left;
    padding: var(--space-3) var(--space-4);
    font-size: var(--text-xs);
    font-weight: 620;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    background: var(--bg-subtle);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}
.table td {
    padding: var(--space-3) var(--space-4);
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--bg-hover); }
.table__actions { display: flex; gap: var(--space-1); justify-content: flex-end; }
.table .cell-main { font-weight: 550; color: var(--text); }
.table .cell-sub { font-size: var(--text-xs); color: var(--text-muted); }

/* --------------------------------------------------------------------------
   21. 后台布局
   -------------------------------------------------------------------------- */
.admin { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100vh; }

.admin-sidebar {
    background: var(--bg-elevated);
    border-right: 1px solid var(--border);
    padding: var(--space-5) var(--space-3);
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}
.admin-sidebar__brand {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: 0 var(--space-3) var(--space-5);
    font-weight: 700;
    font-size: var(--text-base);
    color: var(--text);
}
.admin-sidebar__group { margin-bottom: var(--space-4); }
.admin-sidebar__label {
    padding: 0 var(--space-3) var(--space-2);
    font-size: 10px;
    font-weight: 650;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}
.admin-nav-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius);
    font-size: var(--text-sm);
    color: var(--text-secondary);
    margin-bottom: 2px;
    transition: background var(--transition), color var(--transition);
}
.admin-nav-item:hover { background: var(--bg-hover); color: var(--text); }
.admin-nav-item.is-active {
    background: var(--accent-600);
    color: #fff;
    font-weight: 550;
}
.admin-nav-item .badge { margin-left: auto; }

.admin-main { min-width: 0; display: flex; flex-direction: column; }

.admin-topbar {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-4) var(--space-6);
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 50;
}
.admin-topbar__title { font-size: var(--text-lg); font-weight: 650; }

.admin-content { padding: var(--space-6); flex: 1; min-width: 0; }

.admin-grid { display: grid; gap: var(--space-5); }
.admin-grid--2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.admin-grid--4 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

.admin-kpi {
    padding: var(--space-5);
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}
.admin-kpi__label {
    font-size: var(--text-xs);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: var(--space-2);
}
.admin-kpi__value {
    font-size: var(--text-2xl);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-top: var(--space-2);
    line-height: 1.1;
}
.admin-kpi__delta { font-size: var(--text-xs); color: var(--text-muted); margin-top: var(--space-1); }

/* 迷你柱状图 */
.chart { display: flex; align-items: flex-end; gap: 6px; height: 140px; padding-top: var(--space-4); }
.chart__col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: var(--space-2); min-width: 0; }
.chart__bars { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 2px; }
.chart__bar { width: 45%; max-width: 14px; border-radius: 3px 3px 0 0; min-height: 2px; transition: opacity var(--transition); }
.chart__bar--a { background: var(--accent-500); }
.chart__bar--b { background: var(--accent-200); }
[data-theme="dark"] .chart__bar--b { background: color-mix(in srgb, var(--accent-500) 42%, transparent); }
.chart__col:hover .chart__bar { opacity: 0.75; }
.chart__label { font-size: 9px; color: var(--text-muted); white-space: nowrap; }

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

@media (max-width: 900px) {
    .admin { grid-template-columns: minmax(0, 1fr); }
    .admin-sidebar {
        position: fixed;
        top: 0; bottom: 0; left: 0;
        z-index: 160;
        width: 232px;
        height: 100vh;
        transform: translateX(-100%);
        transition: transform var(--transition);
        box-shadow: var(--shadow-lg);
    }
    .admin-sidebar.is-open { transform: none; }
    .admin-sidebar-toggle { display: inline-grid; }
    .admin-content { padding: var(--space-4); }
}

/* 后台工具栏 */
.toolbar {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    flex-wrap: wrap;
    margin-bottom: var(--space-5);
}
.toolbar__search { flex: 1; min-width: 200px; max-width: 340px; }
.toolbar__spacer { flex: 1; }

/* 标签页 */
.tabs {
    display: flex;
    gap: var(--space-1);
    padding: var(--space-1);
    background: var(--surface-3);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: var(--space-5);
    overflow-x: auto;
}
.tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: var(--space-2) var(--space-4);
    font-size: var(--text-sm);
    font-weight: 550;
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    white-space: nowrap;
    transition: color var(--transition), background var(--transition);
}
.tab:hover { color: var(--text); }
.tab.is-active {
    color: var(--accent-700);
    background: var(--bg-elevated);
    box-shadow: var(--shadow-xs);
}
[data-theme="dark"] .tab.is-active { color: var(--accent-200); }

/* --------------------------------------------------------------------------
   22. 认证页
   -------------------------------------------------------------------------- */
.auth-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: var(--space-6) var(--space-4);
    background: var(--bg-subtle);
}
.auth-card {
    width: 100%;
    max-width: 400px;
    padding: var(--space-8);
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}
.auth-card__head { text-align: center; margin-bottom: var(--space-6); }
.auth-card__title { font-size: var(--text-xl); margin-top: var(--space-4); }
.auth-card__desc { font-size: var(--text-sm); color: var(--text-muted); margin-top: var(--space-2); }
.auth-card__footer {
    text-align: center;
    margin-top: var(--space-5);
    padding-top: var(--space-5);
    border-top: 1px solid var(--border);
    font-size: var(--text-sm);
    color: var(--text-muted);
}
.auth-card .brand__mark { margin: 0 auto; width: 40px; height: 40px; font-size: var(--text-md); border-radius: var(--radius-md); }

/* --------------------------------------------------------------------------
   23. 主题详情页
   -------------------------------------------------------------------------- */
.thread-header {
    padding: var(--space-6) var(--space-5) var(--space-4);
    border-bottom: 1px solid var(--border);
}
.thread-header__title {
    font-size: var(--text-2xl);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.35;
    display: flex;
    align-items: flex-start;
    gap: var(--space-2);
    flex-wrap: wrap;
    word-break: break-word;
}
.thread-header__badges {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    flex-wrap: wrap;
    margin-bottom: var(--space-3);
}
.thread-header__meta {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    flex-wrap: wrap;
    margin-top: var(--space-3);
    font-size: var(--text-sm);
    color: var(--text-muted);
}
.thread-header__meta > * + *::before {
    content: "·";
    margin-right: var(--space-2);
    opacity: 0.55;
}
.thread-header__forum { display: inline-flex; align-items: center; gap: 5px; color: var(--text-secondary); }
.thread-header__forum:hover { color: var(--accent-600); }
.thread-header__dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.thread-header__stat { display: inline-flex; align-items: center; gap: 4px; }
.thread-header__stat .icon { opacity: .7; }

/* 主题头部工具条：左关注、右管理 */
.thread-header__tools {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-top: var(--space-4);
    padding-top: var(--space-4);
    border-top: 1px solid var(--border);
    flex-wrap: wrap;
}
.thread-header__tools-right { display: flex; align-items: center; gap: var(--space-1); margin-left: auto; flex-wrap: wrap; }

/* 主题内统一区块（悬赏 / 抽奖 / 投票 / 附件） */
.thread-section {
    padding: var(--space-4) var(--space-5);
    border-bottom: 1px solid var(--border);
    background: var(--bg-subtle);
}
.thread-section--plain { background: transparent; }
.thread-section__title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: var(--text-sm);
    font-weight: 650;
    color: var(--text-secondary);
    margin-bottom: var(--space-3);
}
.thread-section__title .icon { color: var(--text-muted); }

.chip-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px var(--space-3);
    font-size: var(--text-xs);
    font-weight: 550;
    color: var(--text-secondary);
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    transition: all var(--transition);
    line-height: 1.4;
}
.chip-btn:hover { border-color: var(--accent-300); color: var(--accent-600); background: var(--bg-hover); }
.chip-btn.is-active { background: var(--accent-50); border-color: var(--accent-200); color: var(--accent-600); }
[data-theme="dark"] .chip-btn.is-active { background: color-mix(in srgb, var(--accent-500) 18%, transparent); color: var(--accent-400); }
.chip-btn--danger:hover { border-color: var(--danger-border); color: var(--danger-fg); background: var(--danger-bg); }
.chip-btn:active { transform: scale(0.96); }
.chip-btn.is-following { background: var(--bg-subtle); }

/* 版主下拉容器（替代内联 position:relative） */
.dropdown-wrap { position: relative; }

.thread-actions {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    flex-wrap: wrap;
    margin-top: var(--space-4);
}
/* 主题级操作条：居中，按钮更宽 */
.thread-actions--center {
    justify-content: center;
    gap: var(--space-3);
    padding: var(--space-4) var(--space-5);
    border-bottom: 1px solid var(--border);
    margin-top: 0;
    background: var(--bg-subtle);
}
.act-btn--wide { padding: 7px var(--space-4); font-size: var(--text-sm); border-color: var(--border); background: var(--bg-elevated); }
.act-btn--wide:hover { border-color: var(--accent-300); color: var(--accent-600); }
.act-btn--tip { color: var(--accent-600); border-color: var(--accent-200); }
.act-btn--tip:hover { background: var(--accent-50); }
[data-theme="dark"] .act-btn--tip { color: var(--accent-400); border-color: color-mix(in srgb, var(--accent-500) 32%, transparent); }
.tip-total { font-size: var(--text-xs); color: var(--text-muted); align-self: center; }

/* 投票/点赞统计条 */
.likers {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-5);
    border-top: 1px solid var(--border);
    font-size: var(--text-xs);
    color: var(--text-muted);
    flex-wrap: wrap;
}

/* 回复编辑器 */
.reply-box { padding: var(--space-5); }
.reply-box__head {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-4);
}
.reply-box__title { font-size: var(--text-base); font-weight: 650; }

/* 加载更多 */
.thread-load-more {
    padding: var(--space-5);
    text-align: center;
    border-top: 1px solid var(--border);
}

/* 投票结果态（行内不可点） */
.poll__option--result { cursor: default; }

.quote-notice__cancel { margin-left: auto; }

.quote-notice {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3);
    margin-bottom: var(--space-3);
    background: var(--accent-50);
    border: 1px solid var(--accent-100);
    border-radius: var(--radius);
    font-size: var(--text-xs);
    color: var(--accent-700);
}
[data-theme="dark"] .quote-notice {
    background: color-mix(in srgb, var(--accent-500) 14%, transparent);
    border-color: color-mix(in srgb, var(--accent-500) 24%, transparent);
    color: var(--accent-200);
}

/* 上一篇 / 下一篇 */
.thread-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3);
    margin-top: var(--space-5);
}
.thread-nav__item {
    padding: var(--space-3) var(--space-4);
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: var(--text-sm);
    min-width: 0;
    transition: border-color var(--transition);
}
.thread-nav__item:hover { border-color: var(--accent-400); }
.thread-nav__item--next { text-align: right; }
.thread-nav__label { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.thread-nav__title {
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
    margin-top: 2px;
}
@media (max-width: 640px) {
    .thread-nav { grid-template-columns: 1fr; }
    .thread-nav__item--next { text-align: left; }
}

/* 灯箱 */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 400;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.92);
    padding: var(--space-6);
    cursor: zoom-out;
}
.lightbox.is-open { display: flex; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: var(--radius); }

/* --------------------------------------------------------------------------
   24. 通知列表
   -------------------------------------------------------------------------- */
.notification-item {
    display: flex;
    gap: var(--space-4);
    padding: var(--space-4) var(--space-5);
    border-bottom: 1px solid var(--border);
    transition: background var(--transition);
}
.notification-item:last-child { border-bottom: 0; }
.notification-item:hover { background: var(--bg-hover); }
.notification-item.is-unread { background: color-mix(in srgb, var(--accent-500) 5%, transparent); }
.notification-item__icon {
    width: 34px; height: 34px;
    display: grid; place-items: center;
    border-radius: var(--radius-full);
    flex-shrink: 0;
}
.notification-item__icon--reply   { background: var(--info-bg); color: var(--info-fg); }
.notification-item__icon--quote   { background: var(--accent-50); color: var(--accent-700); }
.notification-item__icon--mention { background: var(--warn-bg); color: var(--warn-fg); }
.notification-item__icon--like    { background: var(--danger-bg); color: var(--danger-fg); }
.notification-item__icon--system  { background: var(--bg-subtle); color: var(--text-muted); }
.notification-item__icon--moderate{ background: var(--success-bg); color: var(--success-fg); }
.notification-item__main { flex: 1; min-width: 0; }
.notification-item__text { font-size: var(--text-sm); line-height: 1.6; }
.notification-item__text b { font-weight: 600; }
.notification-item__time { font-size: var(--text-xs); color: var(--text-muted); margin-top: var(--space-1); }
.notification-item__subject {
    font-size: var(--text-xs);
    color: var(--text-secondary);
    margin-top: var(--space-2);
    padding: var(--space-2) var(--space-3);
    background: var(--bg-subtle);
    border-radius: var(--radius-sm);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* --------------------------------------------------------------------------
   25. 用户主页
   -------------------------------------------------------------------------- */
.profile-header {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: var(--space-4);
}
.profile-header__cover {
    height: 88px;
    background:
        radial-gradient(120% 140% at 12% 0%, color-mix(in srgb, var(--accent-500) 30%, transparent), transparent 62%),
        linear-gradient(135deg, var(--accent-50), var(--bg-subtle));
}
[data-theme="dark"] .profile-header__cover {
    background:
        radial-gradient(120% 140% at 12% 0%, color-mix(in srgb, var(--accent-500) 34%, transparent), transparent 62%),
        linear-gradient(135deg, color-mix(in srgb, var(--accent-500) 10%, transparent), var(--bg-subtle));
}
.profile-header__body {
    display: flex;
    gap: var(--space-5);
    padding: 0 var(--space-6) var(--space-5);
    margin-top: -38px;
    flex-wrap: wrap;
}
.profile-header__avatar { flex-shrink: 0; }
.profile-header__avatar .avatar {
    border: 3px solid var(--bg-elevated);
    box-shadow: var(--shadow-sm, 0 1px 3px rgba(0,0,0,.1));
}
.profile-header__info { flex: 1; min-width: 220px; padding-top: var(--space-6); }
.profile-header__name {
    font-size: var(--text-xl);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: var(--space-2);
    flex-wrap: wrap;
    letter-spacing: -0.01em;
    line-height: 1.3;
}
.profile-header__name-text { word-break: break-word; }
.profile-header__sub {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    flex-wrap: wrap;
    margin-top: var(--space-2);
    font-size: var(--text-xs);
    color: var(--text-muted);
}
.profile-header__meta-item { display: inline-flex; align-items: center; gap: 4px; }
.profile-header__bio {
    margin-top: var(--space-3);
    font-size: var(--text-sm);
    color: var(--text-secondary);
    line-height: 1.7;
    max-width: 60em;
}
.profile-header__title { font-weight: 600; color: var(--text); margin-bottom: 2px; }
.profile-header__links {
    display: flex;
    gap: var(--space-4);
    flex-wrap: wrap;
    margin-top: var(--space-2);
    font-size: var(--text-xs);
    color: var(--text-muted);
}
.profile-header__links a { color: var(--accent-600); }
.profile-header__actions {
    display: flex;
    gap: var(--space-2);
    flex-wrap: wrap;
    margin-top: var(--space-4);
}
.profile-header__stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(88px, 1fr));
    border-top: 1px solid var(--border);
}
.profile-stat {
    padding: var(--space-3) var(--space-2);
    text-align: center;
    color: var(--text);
    border-right: 1px solid var(--border);
    transition: background var(--transition);
}
.profile-stat:last-child { border-right: 0; }
a.profile-stat:hover { background: var(--bg-hover); }
.profile-stat b { display: block; font-size: var(--text-lg); font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.profile-stat span { font-size: var(--text-xs); color: var(--text-muted); }

.profile-progress { display: flex; align-items: center; gap: var(--space-3); }
.profile-progress .progress { flex: 1; }
.profile-dl {
    display: grid;
    grid-template-columns: minmax(80px, auto) 1fr;
    gap: var(--space-3) var(--space-5);
    font-size: var(--text-sm);
    margin: 0;
}
.profile-dl dt { color: var(--text-muted); }
.profile-dl dd { margin: 0; min-width: 0; word-break: break-word; }
.profile-bio { margin-top: var(--space-5); padding-top: var(--space-5); border-top: 1px solid var(--border); }

@media (max-width: 640px) {
    .profile-header__body { padding: 0 var(--space-4) var(--space-4); gap: var(--space-3); }
    .profile-header__info { padding-top: var(--space-4); }
    .profile-header__stats { grid-template-columns: repeat(3, 1fr); }
    .profile-stat { border-right: 0; border-bottom: 1px solid var(--border); }
}

/* --------------------------------------------------------------------------
   26. 页脚
   -------------------------------------------------------------------------- */
.site-footer {
    border-top: 1px solid var(--border);
    background: var(--bg-elevated);
    padding: var(--space-8) 0 var(--space-6);
    font-size: var(--text-sm);
    color: var(--text-muted);
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.6fr repeat(3, 1fr);
    gap: var(--space-6);
    margin-bottom: var(--space-6);
}
@media (max-width: 800px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
    .footer-grid { grid-template-columns: 1fr; }
}
.footer-col__title {
    font-size: var(--text-xs);
    font-weight: 650;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-secondary);
    margin-bottom: var(--space-3);
}
.footer-links { display: flex; flex-direction: column; gap: var(--space-2); }
.footer-links a { color: var(--text-muted); font-size: var(--text-sm); }
.footer-links a:hover { color: var(--accent-600); }
.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    padding-top: var(--space-5);
    border-top: 1px solid var(--border);
    flex-wrap: wrap;
    font-size: var(--text-xs);
}
.footer-stats { display: flex; gap: var(--space-5); }
.footer-stats b { color: var(--text-secondary); font-weight: 600; }
.footer-about { max-width: 34em; }
.welcome__title { font-size: var(--text-lg); }
.avatar-stack--tight { gap: 4px; }
.online-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--success-fg);
    display: inline-block;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--success-fg) 18%, transparent);
}

/* --------------------------------------------------------------------------
   27. 工具类
   -------------------------------------------------------------------------- */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1; min-width: 0; }
.gap-1 { gap: var(--space-1); }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-5 { gap: var(--space-5); }

.mt-1 { margin-top: var(--space-1); }
.mt-2 { margin-top: var(--space-2); }
.mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }
.mt-5 { margin-top: var(--space-5); }
.mt-6 { margin-top: var(--space-6); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-3 { margin-bottom: var(--space-3); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-5 { margin-bottom: var(--space-5); }

.text-xs { font-size: var(--text-xs); }
.text-sm { font-size: var(--text-sm); }
.text-lg { font-size: var(--text-lg); }
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-accent { color: var(--accent-600); }
.text-danger { color: var(--danger-fg); }
.text-success { color: var(--success-fg); }
.text-warn { color: var(--warn-fg); }
.font-medium { font-weight: 550; }
.font-semibold { font-weight: 620; }
.font-mono { font-family: var(--font-mono); }
.text-center { text-align: center; }
.text-right { text-align: right; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clamp-2 { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.clamp-3 { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.break-all { word-break: break-all; }
.hidden { display: none !important; }
.w-full { width: 100%; }
.nowrap { white-space: nowrap; }

@media (max-width: 640px) {
    .hide-sm { display: none !important; }
}
@media (min-width: 641px) {
    .show-sm { display: none !important; }
}
@media (max-width: 480px) {
    .hide-xs { display: none !important; }
}
@media (min-width: 481px) {
    .show-xs { display: none !important; }
}

/* 打印 */
@media print {
    .site-header, .site-footer, .mobile-nav, .layout__aside, .reply-box, .post__actions { display: none !important; }
    body { background: #fff; color: #000; }
    .card, .post { border-color: #ddd; box-shadow: none; }
}

/* --------------------------------------------------------------------------
   28. 移动端整体优化
   -------------------------------------------------------------------------- */

/* 平板/大屏手机：容器与内容区收窄内边距 */
@media (max-width: 860px) {
    .container { padding: 0 var(--space-4); }
    .card__header { padding: var(--space-3) var(--space-4); }
    .card__body { padding: var(--space-4); }
    .thread-header { padding: var(--space-4); }
    .site-main { padding-top: var(--space-6); }
}

/* 手机：字号与信息密度调整，避免拥挤 */
@media (max-width: 640px) {
    /* 略微缩小根字号，整体更紧凑 */
    html { font-size: 15px; }
    .container { padding: 0 var(--space-3); }
    .site-main { padding: var(--space-4) 0 var(--space-16); }

    .page-head { flex-direction: column; align-items: flex-start; gap: var(--space-3); }
    .page-head__title { font-size: var(--text-lg); }
    .page-head__desc { font-size: var(--text-xs); }

    .card__header { padding: var(--space-3) var(--space-3); flex-wrap: wrap; }
    .card__body { padding: var(--space-3); }
    .card__title { font-size: var(--text-sm); }

    .thread-item { padding: var(--space-3); gap: var(--space-2); }
    .thread-item__title { font-size: var(--text-sm); }
    .thread-item__avatar { display: none; }

    .thread-header { padding: var(--space-3); }
    .thread-header__title { font-size: var(--text-lg); }
    .thread-header__tools-right { margin-left: 0; }

    .post__content { padding: var(--space-3) var(--space-3) var(--space-4); line-height: 1.72; }
    .post__footer { padding: 0 var(--space-3) var(--space-3); }

    .mini-thread { padding: var(--space-3) var(--space-4); }
    .stat-grid { gap: var(--space-2); }
    .stat-card { padding: var(--space-3) var(--space-2); }

    .form-hint { font-size: var(--text-xs); }
    .table { font-size: var(--text-xs); }
    .table th, .table td { padding: var(--space-2); }

    /* 弹层在手机上接近全宽 */
    .modal__panel { width: calc(100% - var(--space-4)); margin: var(--space-2); max-height: 88vh; }
}

/* 极窄屏：进一步压缩 */
@media (max-width: 420px) {
    html { font-size: 14.5px; }
    .container { padding: 0 var(--space-2); }
    .brand__mark { width: 26px; height: 26px; }
    .header-search { max-width: 120px; }
    .thread-item__meta { font-size: 11px; }
    .post__bar-name { max-width: 10ch; }
    .post__bar-meta { gap: 4px; }
    .btn { padding: var(--space-2) var(--space-3); }
    .btn--sm { padding: 4px var(--space-2); }
}

/* 触屏设备：加大可点击区域，取消依赖 hover 的观感 */
@media (hover: none) and (pointer: coarse) {
    .mobile-nav__item { padding: var(--space-2) 0 var(--space-3); }
    .chip-btn, .act-btn, .btn--sm { min-height: 32px; }
    .forum-nav__item { padding-top: var(--space-3); padding-bottom: var(--space-3); }
    .dropdown__item { padding-top: var(--space-3); padding-bottom: var(--space-3); }
}

/* 横屏手机 */
@media (max-width: 900px) and (orientation: landscape) {
    .dm-panel { height: auto; min-height: 300px; }
    .dm-panel__scroll { max-height: 60vh; }
}

/* --------------------------------------------------------------------------
   29. v1.1 组件：等级 / 积分 / 列表行 / 进度 / 私信 / 标签页
   -------------------------------------------------------------------------- */

/* 等级徽章 */
.level-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 1px 7px;
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: 600;
    line-height: 1.7;
    background: var(--bg-inset);
    color: var(--text-secondary);
    border: 1px solid var(--border);
    white-space: nowrap;
}
.level-badge__num { font-family: var(--font-mono); }
.level-badge__title { font-weight: 550; }
.level-badge--1, .level-badge--2 { color: #64748b; }
.level-badge--3, .level-badge--4 { color: #0f8f78; border-color: #a8ebda; background: #effcf9; }
.level-badge--5, .level-badge--6 { color: #1f5591; border-color: #bfd6fd; background: #eff5ff; }
.level-badge--7, .level-badge--8 { color: #b45309; border-color: #fde68a; background: #fffbeb; }
.level-badge--9 { color: #9f1239; border-color: #fecdd3; background: #fff1f2; }
[data-theme="dark"] .level-badge { background: var(--bg-subtle); border-color: var(--border-strong); }
[data-theme="dark"] .level-badge--3, [data-theme="dark"] .level-badge--4 { background: rgba(15,143,120,.14); border-color: rgba(15,143,120,.3); color: #6ee7b7; }
[data-theme="dark"] .level-badge--5, [data-theme="dark"] .level-badge--6 { background: rgba(43,108,176,.16); border-color: rgba(43,108,176,.32); color: #93c5fd; }
[data-theme="dark"] .level-badge--7, [data-theme="dark"] .level-badge--8 { background: rgba(245,158,11,.14); border-color: rgba(245,158,11,.3); color: #fcd34d; }
[data-theme="dark"] .level-badge--9 { background: rgba(225,29,72,.16); border-color: rgba(225,29,72,.32); color: #fda4af; }

/* 积分概览 */
.points-hero { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); flex-wrap: wrap; }
.points-hero__value { font-size: var(--text-3xl); font-weight: 750; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.points-hero__label { font-size: var(--text-xs); color: var(--text-muted); margin-top: 2px; }
.points-hero__level { flex-shrink: 0; }

/* 进度条 */
.progress { height: 6px; background: var(--bg-inset); border-radius: var(--radius-full); overflow: hidden; }
.progress__bar { height: 100%; background: var(--accent-500); border-radius: var(--radius-full); transition: width var(--transition-slow); }

/* 通用列表行 */
.list-row {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    border-bottom: 1px solid var(--border);
    color: var(--text);
    transition: background var(--transition);
}
.list-row:last-child { border-bottom: 0; }
.list-row:hover { background: var(--bg-hover); color: var(--text); }
.list-row__main { flex: 1; min-width: 0; }
.list-row__title { font-weight: 560; display: flex; align-items: center; gap: var(--space-2); }
.list-row__meta { font-size: var(--text-xs); color: var(--text-muted); margin-top: 2px; display: flex; align-items: center; gap: 6px; }

/* 用户卡片（补充徽章与按钮布局） */
.user-card__badges { margin-top: 4px; display: flex; gap: 4px; flex-wrap: wrap; }

/* 已关注状态的按钮（次级外观） */
.btn.is-following { background: var(--bg-subtle); color: var(--text-secondary); border-color: var(--border); }
.btn.is-following:hover { background: var(--bg-hover); color: var(--text); }

/* 标签页（.tabs__item 为 .tab 的别名，见第 21 节） */
.tabs__item {
    display: inline-flex;
    align-items: center;
    padding: var(--space-2) var(--space-4);
    font-size: var(--text-sm);
    font-weight: 550;
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    white-space: nowrap;
    transition: color var(--transition), background var(--transition);
}
.tabs__item:hover { color: var(--text); }
.tabs__item.is-active {
    color: var(--accent-700);
    background: var(--bg-elevated);
    box-shadow: var(--shadow-xs);
}
[data-theme="dark"] .tabs__item.is-active { color: var(--accent-200); }
.tabs__count { font-size: var(--text-xs); color: var(--text-muted); margin-left: 4px; }

/* 私信气泡 */
.dm-thread { display: flex; flex-direction: column; gap: var(--space-4); max-height: 60vh; overflow-y: auto; }
.dm-bubble { display: flex; gap: var(--space-3); align-items: flex-start; }
.dm-bubble--mine { flex-direction: row-reverse; }
.dm-bubble__body { max-width: 72%; }
.dm-bubble--mine .dm-bubble__body { text-align: right; }
.dm-bubble__content {
    display: inline-block;
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-md);
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    font-size: var(--text-sm);
    line-height: 1.6;
    text-align: left;
    word-break: break-word;
}
.dm-bubble--mine .dm-bubble__content { background: var(--accent-50); border-color: var(--accent-100); }
[data-theme="dark"] .dm-bubble--mine .dm-bubble__content { background: color-mix(in srgb, var(--accent-500) 14%, transparent); border-color: color-mix(in srgb, var(--accent-500) 26%, transparent); }
.dm-bubble__time { font-size: 10px; color: var(--text-muted); margin-top: 3px; }

/* 小尺寸表单控件（后台行内编辑） */
.input--sm, .select--sm { min-height: 30px; padding: 2px 8px; font-size: var(--text-xs); }

/* 投票 */
.poll { padding: var(--space-4); border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--bg-subtle); }
.poll__question { font-weight: 620; margin-bottom: var(--space-3); }
.poll__option { position: relative; display: block; margin-bottom: var(--space-2); cursor: pointer; }
.poll__option-bar { position: absolute; inset: 0; background: var(--accent-100); border-radius: var(--radius); width: 0; transition: width var(--transition-slow); }
[data-theme="dark"] .poll__option-bar { background: color-mix(in srgb, var(--accent-500) 20%, transparent); }
.poll__option-label { position: relative; display: flex; align-items: center; gap: var(--space-2); padding: var(--space-2) var(--space-3); }
.poll__option-votes { margin-left: auto; font-size: var(--text-xs); color: var(--text-muted); font-variant-numeric: tabular-nums; }
.poll__meta { font-size: var(--text-xs); color: var(--text-muted); margin-top: var(--space-3); }

/* 附件列表 */
.attachment-list { display: flex; flex-direction: column; gap: var(--space-2); margin-top: var(--space-3); }
.attachment-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-2) var(--space-3);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-subtle);
    font-size: var(--text-sm);
}
.attachment-item__name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attachment-item__size { font-size: var(--text-xs); color: var(--text-muted); }

/* --------------------------------------------------------------------------
   30. v1.2 新组件：用户号 / 认证标识 / 打赏 / 认证申请
   -------------------------------------------------------------------------- */

/* 用户号 */
.uid-chip {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 0 6px;
    height: 18px;
    font-size: 11px;
    font-family: var(--font-mono);
    color: var(--text-muted);
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    line-height: 1;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.uid-chip--copy { cursor: pointer; transition: all var(--transition); }
.uid-chip--copy:hover { color: var(--accent-600); border-color: var(--accent-300); }
.uid-chip .icon { opacity: .7; }

/* 认证标识 */
.verify-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 0 6px;
    height: 18px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
    color: var(--verify-color, #0ea5e9);
    background: color-mix(in srgb, var(--verify-color, #0ea5e9) 12%, transparent);
    border: 1px solid color-mix(in srgb, var(--verify-color, #0ea5e9) 34%, transparent);
    border-radius: var(--radius-full);
    white-space: nowrap;
    vertical-align: middle;
}
.verify-badge__icon { flex-shrink: 0; }
.verify-badge__label { max-width: 8em; overflow: hidden; text-overflow: ellipsis; }

/* 认证中心 */
.verify-hero {
    display: flex;
    align-items: center;
    gap: var(--space-5);
    padding: var(--space-6);
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    position: relative;
    overflow: hidden;
}
.verify-hero.is-verified {
    border-color: color-mix(in srgb, var(--success-fg) 40%, var(--border));
    background: linear-gradient(120deg, color-mix(in srgb, var(--success-fg) 7%, transparent), var(--bg-elevated));
}
.verify-hero__icon {
    width: 56px; height: 56px;
    display: grid; place-items: center;
    border-radius: var(--radius-md);
    background: var(--accent-50);
    color: var(--accent-600);
    flex-shrink: 0;
}
[data-theme="dark"] .verify-hero__icon { background: color-mix(in srgb, var(--accent-500) 18%, transparent); color: var(--accent-400); }
.verify-hero.is-verified .verify-hero__icon { background: var(--success-bg); color: var(--success-fg); }
.verify-hero__main { flex: 1; min-width: 0; }
.verify-hero__title { font-size: var(--text-lg); font-weight: 650; margin-bottom: var(--space-1); }
.verify-hero__badge { margin-bottom: var(--space-2); }
.verify-hero__desc { font-size: var(--text-sm); color: var(--text-secondary); line-height: 1.7; }

.verify-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 var(--space-5); }
.verify-color-row { display: flex; align-items: center; gap: var(--space-3); }
.verify-color-input {
    width: 56px; height: 34px;
    padding: 2px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    background: var(--bg-elevated);
    cursor: pointer;
}
.verify-icon-grid { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.verify-icon-option { cursor: pointer; }
.verify-icon-option input { position: absolute; opacity: 0; width: 0; height: 0; }
.verify-icon-option__box {
    width: 42px; height: 42px;
    display: grid; place-items: center;
    color: var(--text-secondary);
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: all var(--transition);
}
.verify-icon-option:hover .verify-icon-option__box { border-color: var(--accent-400); color: var(--accent-600); }
.verify-icon-option input:checked + .verify-icon-option__box {
    color: var(--accent-600);
    background: var(--accent-50);
    border-color: var(--accent-500);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent-500) 22%, transparent);
}
[data-theme="dark"] .verify-icon-option input:checked + .verify-icon-option__box { background: color-mix(in srgb, var(--accent-500) 18%, transparent); color: var(--accent-400); }

.verify-notice { margin: 0; padding-left: 1.2em; font-size: var(--text-sm); color: var(--text-secondary); line-height: 1.95; }
.verify-notice li { margin-bottom: var(--space-1); }

.verify-timeline { display: grid; gap: var(--space-4); }
.verify-timeline__item { display: flex; gap: var(--space-3); }
.verify-timeline__dot {
    width: 9px; height: 9px;
    border-radius: 50%;
    margin-top: 5px;
    flex-shrink: 0;
    background: var(--text-muted);
}
.verify-timeline__dot--0 { background: var(--warn-fg, #f59e0b); }
.verify-timeline__dot--1 { background: var(--success-fg); }
.verify-timeline__dot--2 { background: var(--danger-fg); }
.verify-timeline__body { flex: 1; min-width: 0; }
.verify-timeline__reply {
    margin-top: var(--space-2);
    padding: var(--space-2) var(--space-3);
    background: var(--bg-subtle);
    border-radius: var(--radius);
    font-size: var(--text-sm);
    color: var(--text-secondary);
}
.verify-detail {
    display: grid;
    grid-template-columns: minmax(80px, auto) 1fr;
    gap: var(--space-2) var(--space-4);
    margin: 0;
    font-size: var(--text-sm);
}
.verify-detail dt { color: var(--text-muted); }
.verify-detail dd { margin: 0; min-width: 0; word-break: break-word; }

/* 打赏列表 */
.tip-list { display: grid; gap: var(--space-2); }
.tip-row { display: flex; align-items: center; gap: var(--space-2); font-size: var(--text-sm); }
.tip-row__name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tip-row__amount { font-weight: 620; color: var(--accent-600); font-variant-numeric: tabular-nums; }
[data-theme="dark"] .tip-row__amount { color: var(--accent-400); }

/* 打赏中心 */
.tip-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-3);
    margin-bottom: var(--space-4);
}
.tip-summary__item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: var(--space-4);
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}
.tip-summary__label { font-size: var(--text-xs); color: var(--text-muted); }
.tip-summary__value { font-size: var(--text-2xl); font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.tip-summary__sub { font-size: var(--text-xs); color: var(--text-muted); }
.tip-summary__sub a { color: var(--accent-600); }

.tip-entry {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-5);
    border-bottom: 1px solid var(--border);
}
.tip-entry:last-child { border-bottom: 0; }
.tip-entry__avatar { flex-shrink: 0; line-height: 0; }
.tip-entry__main { flex: 1; min-width: 0; font-size: var(--text-sm); }
.tip-entry__line { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.tip-entry__line a { color: var(--text); }
.tip-entry__line a:hover { color: var(--accent-600); }
.tip-entry__msg {
    margin-top: var(--space-1);
    padding: var(--space-2) var(--space-3);
    background: var(--bg-subtle);
    border-radius: var(--radius);
    font-size: var(--text-xs);
    color: var(--text-secondary);
    word-break: break-word;
}
.tip-entry__time { font-size: 10px; color: var(--text-muted); margin-top: 3px; }
.tip-entry__amount { font-weight: 700; font-size: var(--text-md); font-variant-numeric: tabular-nums; flex-shrink: 0; }
.tip-entry__amount.is-in { color: var(--success-fg); }
.tip-entry__amount.is-out { color: var(--text-muted); }

/* 打赏弹层：快捷金额 */
.tip-amounts { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-bottom: var(--space-3); }
.tip-amount-option {
    padding: 6px var(--space-3);
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--transition);
    font-variant-numeric: tabular-nums;
}
.tip-amount-option:hover { border-color: var(--accent-400); color: var(--accent-600); }
.tip-amount-option.is-active { background: var(--accent-50); border-color: var(--accent-500); color: var(--accent-600); }
[data-theme="dark"] .tip-amount-option.is-active { background: color-mix(in srgb, var(--accent-500) 20%, transparent); color: var(--accent-400); }
.tip-balance {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-2) var(--space-3);
    background: var(--bg-subtle);
    border-radius: var(--radius);
    font-size: var(--text-xs);
    color: var(--text-muted);
    margin-bottom: var(--space-4);
}
.tip-balance b { color: var(--text); font-size: var(--text-sm); font-variant-numeric: tabular-nums; }

/* 通用小卡片修饰 */
.progress--slim { height: 6px; }

/* 用户卡片：UID 行 */
.user-card__uid { margin-top: 2px; }
.mini-thread.is-self { background: var(--accent-50); }
[data-theme="dark"] .mini-thread.is-self { background: color-mix(in srgb, var(--accent-500) 12%, transparent); }

/* 积分中心概览 */
.points-hero-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--space-5);
    margin-bottom: var(--space-4);
}
.points-hero-card__main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    flex-wrap: wrap;
}
.points-hero-card__balance { display: flex; align-items: baseline; gap: var(--space-2); }
.points-hero-card__value {
    font-size: var(--text-3xl);
    font-weight: 700;
    letter-spacing: -0.03em;
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
}
.points-hero-card__unit { font-size: var(--text-sm); color: var(--text-muted); }
.points-hero-card__progress { margin-top: var(--space-4); }
.points-hero-card__stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-2);
    margin-top: var(--space-4);
    padding-top: var(--space-4);
    border-top: 1px solid var(--border);
}
.points-mini { display: flex; flex-direction: column; gap: 2px; text-align: center; }
.points-mini__label { font-size: 10px; color: var(--text-muted); }
.points-mini__value { font-size: var(--text-md); font-weight: 650; font-variant-numeric: tabular-nums; }

.points-rules { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: var(--space-2); }
.points-rule {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    padding: var(--space-2) var(--space-3);
    background: var(--bg-subtle);
    border-radius: var(--radius);
    font-size: var(--text-sm);
}
.points-rule.is-off { opacity: .5; }
.points-rule__value { font-weight: 650; color: var(--success-fg); font-variant-numeric: tabular-nums; }
.points-rule.is-off .points-rule__value { color: var(--text-muted); }

@media (max-width: 640px) {
    .points-hero-card__stats { grid-template-columns: repeat(2, 1fr); }
    .points-hero-card__value { font-size: var(--text-2xl); }
    .tip-summary { grid-template-columns: 1fr 1fr; }
    .tip-summary__item:last-child { grid-column: 1 / -1; }
}

/* --------------------------------------------------------------------------
   31. 私信：会话与输入框同框
   -------------------------------------------------------------------------- */
.dm-panel {
    display: flex;
    flex-direction: column;
    height: min(72vh, 720px);
    min-height: 420px;
}
.dm-panel__head {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}
.dm-panel__head-main { flex: 1; min-width: 0; }
.dm-panel__name { font-weight: 620; font-size: var(--text-sm); display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; }
.dm-panel__scroll {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: var(--space-4);
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    overscroll-behavior: contain;
}
.dm-panel__empty { margin: auto; text-align: center; color: var(--text-muted); font-size: var(--text-sm); }
.dm-panel__form {
    flex-shrink: 0;
    border-top: 1px solid var(--border);
    padding: var(--space-3);
    background: var(--bg-subtle);
}
.dm-panel__form textarea {
    width: 100%;
    min-height: 62px;
    max-height: 180px;
    resize: vertical;
}
.dm-panel__form-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    margin-top: var(--space-2);
}

/* --------------------------------------------------------------------------
   32. v1.1 组件自适应
   -------------------------------------------------------------------------- */

/* 平板：私信气泡收窄、积分概览换行 */
@media (max-width: 860px) {
    .dm-bubble__body { max-width: 82%; }
    .dm-thread { max-height: none; }
    .verify-form-grid { grid-template-columns: 1fr; }
}

/* 手机：列表行 / 附件 / 投票 / 标签页收紧间距 */
@media (max-width: 640px) {
    .list-row,
    .attachment-item { padding: var(--space-2) var(--space-3); }
    .list-row__meta { flex-wrap: wrap; }
    .attachment-item__size { display: none; }
    .points-hero__value { font-size: var(--text-2xl); }
    .tabs { margin-bottom: var(--space-3); }
    .tabs__item,
    .tab { padding: var(--space-2) var(--space-3); }
    .dm-bubble__body { max-width: 88%; }
    .dm-bubble__content { padding: var(--space-2) var(--space-3); }
    .poll { padding: var(--space-3); }
    .verify-hero { padding: var(--space-4); gap: var(--space-3); flex-direction: column; align-items: flex-start; }
    .verify-detail { grid-template-columns: 1fr; gap: 2px var(--space-3); }
    .verify-detail dt { margin-top: var(--space-2); }
    .dm-panel { height: calc(100dvh - var(--header-height) - 120px); min-height: 320px; }
    .thread-actions--center { padding: var(--space-3) var(--space-3); gap: var(--space-1); }
    .act-btn--wide { padding: 5px var(--space-3); font-size: var(--text-xs); }
}

/* 极窄屏：附件名允许折行 */
@media (max-width: 420px) {
    .attachment-item { flex-wrap: wrap; }
    .attachment-item__name { white-space: normal; word-break: break-all; }
    .level-badge { padding: 1px 5px; font-size: 10px; }
    .verify-badge__label { display: none; }
    .verify-badge { padding: 0 4px; }
}

/* 触屏：不依赖 hover 才能看清交互元素 */
@media (hover: none) {
    .list-row:hover,
    .forum-nav__item:hover { background: transparent; }
    .forum-nav__item:active { background: var(--bg-hover); }
    .act-btn { padding: 6px var(--space-3); }
}

/* --------------------------------------------------------------------------
   33. v1.3 组件：签到 / 勋章 / 任务 / 收藏夹
   -------------------------------------------------------------------------- */

/* ---- 签到 ---- */
.checkin-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    padding: var(--space-5);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, color-mix(in srgb, var(--accent-600) 10%, var(--bg-elevated)), var(--bg-elevated));
    flex-wrap: wrap;
}
.checkin-hero.is-done {
    background: linear-gradient(135deg, color-mix(in srgb, var(--success-fg) 10%, var(--bg-elevated)), var(--bg-elevated));
}
.checkin-hero__left { display: flex; align-items: center; gap: var(--space-4); }
.checkin-hero__icon {
    width: 60px; height: 60px;
    display: grid; place-items: center;
    border-radius: var(--radius-md);
    background: color-mix(in srgb, var(--accent-600) 14%, transparent);
    color: var(--accent-600);
    flex-shrink: 0;
}
.checkin-hero.is-done .checkin-hero__icon {
    background: color-mix(in srgb, var(--success-fg) 14%, transparent);
    color: var(--success-fg);
}
.checkin-hero__streak { display: flex; align-items: baseline; gap: 4px; }
.checkin-hero__num { font-size: var(--text-2xl); font-weight: 700; font-variant-numeric: tabular-nums; }
.checkin-hero__unit { font-size: var(--text-sm); color: var(--text-muted); }
.checkin-hero__label { font-size: var(--text-xs); color: var(--text-muted); margin-top: 2px; }

.checkin-legend { display: flex; gap: var(--space-3); font-size: var(--text-xs); color: var(--text-muted); }
.checkin-legend__item { display: inline-flex; align-items: center; gap: 5px; }
.checkin-dot {
    width: 10px; height: 10px;
    border-radius: 3px;
    background: var(--bg-inset);
    border: 1px solid var(--border);
    display: inline-block;
}
.checkin-dot.is-checked { background: var(--accent-600); border-color: var(--accent-600); }
.checkin-dot.is-makeup { background: var(--warning-fg, #d97706); border-color: var(--warning-fg, #d97706); }

.checkin-grid {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 6px;
}
.checkin-cell {
    position: relative;
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    background: var(--bg-inset);
    border: 1px solid var(--border);
    font-size: 11px;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}
.checkin-cell.is-checked {
    background: color-mix(in srgb, var(--accent-600) 16%, transparent);
    border-color: color-mix(in srgb, var(--accent-600) 40%, transparent);
    color: var(--accent-600);
}
.checkin-cell.is-makeup {
    background: color-mix(in srgb, #d97706 16%, transparent);
    border-color: color-mix(in srgb, #d97706 40%, transparent);
    color: #d97706;
}
.checkin-cell.is-today { outline: 2px solid var(--accent-400); outline-offset: 1px; }
.checkin-cell__mark { position: absolute; bottom: 2px; opacity: .8; }

.checkin-makeup {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    flex-wrap: wrap;
    padding-top: var(--space-4);
    border-top: 1px dashed var(--border);
}
.checkin-makeup__text { font-size: var(--text-xs); color: var(--text-muted); }
.checkin-makeup__form { display: flex; gap: var(--space-2); align-items: center; }
.checkin-makeup__form .input { max-width: 170px; }

.notice-list { margin: 0; padding-left: 1.2em; color: var(--text-secondary); font-size: var(--text-sm); line-height: 1.9; }

/* ---- 勋章 ---- */
.badge-wall {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: var(--space-4);
}
.badge-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--space-2);
    padding: var(--space-5) var(--space-4);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-elevated);
    transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}
.badge-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); border-color: var(--border-strong); }
.badge-card.is-owned { border-color: color-mix(in srgb, var(--badge-color, var(--accent-600)) 45%, var(--border)); }
.badge-card.is-locked { opacity: .58; }
.badge-card.is-locked .badge-card__medal { filter: grayscale(1); }
.badge-card__medal {
    width: 62px; height: 62px;
    display: grid; place-items: center;
    border-radius: 50%;
    background: color-mix(in srgb, var(--badge-color, var(--accent-600)) 16%, transparent);
    color: var(--badge-color, var(--accent-600));
    margin-bottom: var(--space-1);
}
.badge-card__name { font-weight: 620; font-size: var(--text-sm); }
.badge-card__desc { font-size: var(--text-xs); color: var(--text-muted); line-height: 1.6; }
.badge-card__meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: auto;
    padding-top: var(--space-2);
    font-size: var(--text-xs);
    color: var(--text-muted);
}
.badge-card__state { display: inline-flex; align-items: center; justify-content: center; gap: 4px; }
.badge-card__state.is-owned { color: var(--badge-color, var(--accent-600)); font-weight: 600; }

.badge-detail {
    display: flex;
    gap: var(--space-5);
    padding: var(--space-5);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-elevated);
    flex-wrap: wrap;
}
.badge-detail__medal {
    width: 88px; height: 88px;
    display: grid; place-items: center;
    border-radius: 50%;
    background: color-mix(in srgb, var(--badge-color, var(--accent-600)) 16%, transparent);
    color: var(--badge-color, var(--accent-600));
    flex-shrink: 0;
}
.badge-detail__info { flex: 1; min-width: 220px; }
.badge-detail__name { font-size: var(--text-lg); font-weight: 650; margin: 0 0 var(--space-2); }
.badge-detail__desc { color: var(--text-secondary); font-size: var(--text-sm); margin: 0 0 var(--space-3); }
.badge-detail__rows { display: flex; flex-direction: column; gap: var(--space-1); font-size: var(--text-sm); }
.badge-detail__row { display: flex; gap: var(--space-3); }
.badge-detail__row > span:first-child { min-width: 5em; }
.badge-detail__actions { margin-top: var(--space-4); }

.badge-mini-grid { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.badge-mini {
    width: 34px; height: 34px;
    display: grid; place-items: center;
    border-radius: var(--radius-sm);
    background: color-mix(in srgb, var(--badge-color, var(--accent-600)) 16%, transparent);
    color: var(--badge-color, var(--accent-600));
    transition: transform var(--transition);
}
.badge-mini:hover { transform: scale(1.1); }

.badge-chip {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 1px 7px;
    border-radius: var(--radius-sm);
    background: var(--bg-inset);
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 500;
}
.badge-dot-mini {
    width: 28px; height: 28px;
    display: grid; place-items: center;
    border-radius: var(--radius-sm);
    background: color-mix(in srgb, var(--badge-color, var(--accent-600)) 16%, transparent);
    color: var(--badge-color, var(--accent-600));
    flex-shrink: 0;
}

/* ---- 任务 ---- */
.task-list { display: flex; flex-direction: column; }
.task-item {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-4);
    border-bottom: 1px solid var(--border);
}
.task-item:last-child { border-bottom: 0; }
.task-item.is-claimed { opacity: .62; }
.task-item__icon {
    width: 42px; height: 42px;
    display: grid; place-items: center;
    border-radius: var(--radius);
    background: color-mix(in srgb, var(--task-color, var(--accent-600)) 14%, transparent);
    color: var(--task-color, var(--accent-600));
    flex-shrink: 0;
}
.task-item__main { flex: 1; min-width: 0; }
.task-item__head { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; }
.task-item__name { font-weight: 600; font-size: var(--text-sm); }
.task-item__reward { display: inline-flex; align-items: center; gap: 5px; }
.task-reward { color: var(--success-fg); font-weight: 650; font-size: var(--text-xs); }
.task-item__desc { font-size: var(--text-xs); color: var(--text-muted); margin-top: 2px; }
.task-item__bar { display: flex; align-items: center; gap: var(--space-3); margin-top: var(--space-2); }
.task-item__bar .progress { flex: 1; }
.task-item__count { font-size: var(--text-xs); color: var(--text-muted); font-variant-numeric: tabular-nums; }
.task-item__action { flex-shrink: 0; }
.task-item__state { display: inline-flex; align-items: center; gap: 4px; font-size: var(--text-xs); }
.progress--sm { height: 5px; }

/* ---- 收藏夹 ---- */
.collection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: var(--space-4);
}
.collection-card {
    position: relative;
    display: flex;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-elevated);
    transition: border-color var(--transition), box-shadow var(--transition);
}
.collection-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.collection-card.is-default { border-color: color-mix(in srgb, var(--accent-600) 35%, var(--border)); }
.collection-card__main { display: flex; gap: var(--space-3); padding: var(--space-4); flex: 1; min-width: 0; }
.collection-card__icon {
    width: 42px; height: 42px;
    display: grid; place-items: center;
    border-radius: var(--radius);
    background: var(--bg-inset);
    color: var(--accent-600);
    flex-shrink: 0;
}
.collection-card__info { min-width: 0; }
.collection-card__name { font-weight: 620; font-size: var(--text-sm); display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; }
.collection-card__desc {
    font-size: var(--text-xs);
    color: var(--text-muted);
    margin-top: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.collection-card__meta { display: flex; align-items: center; gap: var(--space-2); font-size: var(--text-xs); color: var(--text-muted); margin-top: var(--space-1); }
.collection-card__del { margin-right: var(--space-2); flex-shrink: 0; }
.dot-sep { width: 3px; height: 3px; border-radius: 50%; background: var(--text-muted); display: inline-block; }

/* ---- 表单：图标 / 颜色选择器 ---- */
.icon-picker, .color-picker { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.icon-picker__item input, .color-picker__item input { position: absolute; opacity: 0; width: 0; height: 0; }
.icon-picker__box {
    width: 40px; height: 40px;
    display: grid; place-items: center;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    color: var(--text-secondary);
    cursor: pointer;
    transition: border-color var(--transition), color var(--transition), background var(--transition);
}
.icon-picker__item input:checked + .icon-picker__box {
    border-color: var(--accent-600);
    color: var(--accent-600);
    background: color-mix(in srgb, var(--accent-600) 10%, transparent);
}
.color-picker__box {
    width: 30px; height: 30px;
    border-radius: var(--radius-sm);
    display: block;
    cursor: pointer;
    border: 2px solid transparent;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12);
}
.color-picker__item input:checked + .color-picker__box {
    border-color: var(--text);
    transform: scale(1.08);
}

/* 移动端适配 */
@media (max-width: 720px) {
    .checkin-grid { grid-template-columns: repeat(7, 1fr); }
    .badge-wall { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--space-3); }
    .checkin-hero { padding: var(--space-4); }
    .checkin-hero__icon { width: 48px; height: 48px; }
}
@media (max-width: 520px) {
    .checkin-grid { grid-template-columns: repeat(6, 1fr); gap: 4px; }
    .checkin-cell { font-size: 10px; }
    .task-item { flex-wrap: wrap; gap: var(--space-3); }
    .task-item__action { width: 100%; }
    .task-item__action .btn { width: 100%; }
    .badge-detail { padding: var(--space-4); gap: var(--space-4); }
    .badge-detail__medal { width: 64px; height: 64px; }
    .collection-grid { grid-template-columns: 1fr; }
    .checkin-legend { display: none; }
}

/* ---------------------------------------------------------------------------
 * 34. v1.4 组件：帖子类型 / 匿名 / 采纳 / 悬赏 / 抽奖 / 神评
 * ------------------------------------------------------------------------- */

/* 帖子类型选择器 */
.type-picker { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.type-picker__option {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 14px; border-radius: var(--radius);
    border: 1px solid var(--border); background: var(--bg-elevated);
    color: var(--text-secondary); font-size: var(--text-sm);
    cursor: pointer; transition: all .15s ease;
}
.type-picker__option:hover { border-color: var(--accent-300); color: var(--text); }
.type-picker__option.is-active {
    border-color: var(--accent-500);
    background: var(--accent-50);
    color: var(--accent-700); font-weight: 600;
}
[data-theme="dark"] .type-picker__option.is-active {
    background: color-mix(in srgb, var(--accent-500) 16%, transparent);
    color: var(--accent-200);
}
.type-picker__option .icon { flex: none; }

/* 帖子类型 / 状态徽章：定义已统一到 §8 徽章区，此处不再重复 */

/* 匿名 */
.post--anonymous .post__bar { background: var(--surface-2); }
.post__bar-avatar--anon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; border-radius: 50%;
    background: var(--surface-3); color: var(--text-tertiary); flex: none;
}
.post__bar-name--anon { color: var(--text-secondary); font-style: italic; }
.post__bar-author-reveal { font-size: var(--text-xs); color: var(--text-tertiary); }

/* 采纳按钮 / 已采纳 */
.act-btn--accept { color: #059669; }
.act-btn--accept:hover { border-color: #059669; background: color-mix(in srgb, #059669 10%, transparent); }
.act-btn--accepted { color: #047857; font-weight: 600; cursor: default; }
.post--accepted {
    border-left: 3px solid #10b981;
    background: color-mix(in srgb, #10b981 5%, transparent);
}
.post--featured { border-left: 3px solid #f43f5e; }

/* 悬赏横幅 */
.bounty-banner {
    display: flex; align-items: center; gap: var(--space-4);
    padding: var(--space-4) var(--space-5);
    border-bottom: 1px solid var(--border);
    background: linear-gradient(90deg, color-mix(in srgb, #f59e0b 10%, transparent), transparent);
}
.bounty-banner__icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; border-radius: var(--radius-md);
    background: color-mix(in srgb, #f59e0b 18%, transparent); color: #b45309; flex: none;
}
.bounty-banner__main { flex: 1; min-width: 0; }
.bounty-banner__amount { font-size: var(--text-xl); font-weight: 700; color: #b45309; line-height: 1.2; }
.bounty-banner__amount span { font-size: var(--text-sm); font-weight: 500; }
.bounty-banner__text { font-size: var(--text-sm); color: var(--text-secondary); margin-top: 2px; }
.bounty-banner__meta { font-size: var(--text-xs); color: var(--text-tertiary); }
.bounty-banner.is-settled {
    background: linear-gradient(90deg, color-mix(in srgb, #10b981 10%, transparent), transparent);
}
.bounty-banner.is-settled .bounty-banner__icon { background: color-mix(in srgb, #10b981 18%, transparent); color: #047857; }
.bounty-banner.is-settled .bounty-banner__amount { color: #047857; }
[data-theme="dark"] .bounty-banner__amount,
[data-theme="dark"] .bounty-banner__icon { color: #fcd34d; }
[data-theme="dark"] .bounty-banner.is-settled .bounty-banner__amount,
[data-theme="dark"] .bounty-banner.is-settled .bounty-banner__icon { color: #6ee7b7; }

/* 抽奖区块 */
.lottery { padding: var(--space-4) 0; }
.lottery__head {
    display: flex; align-items: center; justify-content: space-between;
    gap: var(--space-3); flex-wrap: wrap; margin-bottom: var(--space-3);
}
.lottery__prize { display: flex; align-items: center; gap: 8px; font-size: var(--text-sm); color: var(--text-secondary); }
.lottery__prize strong { color: var(--text); font-size: var(--text-base); }
.lottery__count { font-size: var(--text-sm); color: var(--text-tertiary); }
.lottery__meta { display: flex; align-items: center; gap: var(--space-4); flex-wrap: wrap; font-size: var(--text-sm); color: var(--text-secondary); margin-bottom: var(--space-3); }
.lottery__winners { margin-bottom: var(--space-3); }
.lottery__winners-label { display: flex; align-items: center; gap: 6px; font-size: var(--text-sm); font-weight: 600; color: #b45309; margin-bottom: var(--space-2); }
.lottery__winner-grid { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.lottery__winner {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 4px 10px 4px 4px; border-radius: 999px;
    background: color-mix(in srgb, #f59e0b 12%, transparent);
    font-size: var(--text-sm); color: var(--text);
}
.lottery__actions { display: flex; gap: var(--space-2); flex-wrap: wrap; }
[data-theme="dark"] .lottery__winners-label { color: #fcd34d; }

/* 神评区块 */
.featured-block {
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: var(--space-4) var(--space-5);
    background: color-mix(in srgb, #f43f5e 4%, transparent);
}
.featured-block__head {
    display: flex; align-items: center; gap: 6px;
    font-size: var(--text-sm); font-weight: 700; color: #be123c;
    margin-bottom: var(--space-3);
}
[data-theme="dark"] .featured-block__head { color: #fda4af; }
.featured-item { padding: var(--space-3) 0; border-top: 1px dashed var(--border); }
.featured-item:first-of-type { border-top: 0; }
.featured-item__meta { display: flex; align-items: center; gap: var(--space-3); margin-bottom: 6px; font-size: var(--text-sm); }
.featured-item__author { font-weight: 600; color: var(--text); }
.featured-item__likes { display: inline-flex; align-items: center; gap: 4px; color: var(--text-tertiary); font-size: var(--text-xs); }
.featured-item__content { font-size: var(--text-sm); color: var(--text-secondary); }
.featured-item__jump { display: inline-block; margin-top: 6px; font-size: var(--text-xs); color: var(--accent); }

@media (max-width: 720px) {
    .bounty-banner { padding: var(--space-3) var(--space-4); gap: var(--space-3); }
    .bounty-banner__icon { width: 38px; height: 38px; }
    .featured-block { padding: var(--space-3) var(--space-4); }
    .type-picker__option { padding: 6px 11px; }
}



