/* ════════════════════════════════════════════════════════════════
   VPS玩具 (vpstoy.com) —— 全站样式
   亮色为基准，暗色通过 html[data-theme=dark] 覆盖；未手动切换时跟随系统。
   ════════════════════════════════════════════════════════════════ */

/* ── 主题变量 ─────────────────────────────────────────────── */
:root {
  --bg:          #f4f6fa;
  --bg-soft:     #eaeef5;
  --card:        #ffffff;
  --card-hover:  #fafbfe;
  --text:        #161a22;
  --text-soft:   #485062;
  --muted:       #8b93a5;
  --border:      #e2e7f0;
  --border-soft: #eef1f7;
  --accent:      #4a7fe0;
  --accent-h:    #3a6ecf;
  --accent-soft: #eaf1ff;
  --accent-text: #2f61c4;
  --tip:         #e8912e;
  --tip-soft:    #fdf3e4;
  --ok:          #1f9d5b;
  --err:         #d94a4a;
  --warn:        #c9861a;
  --shadow-sm:   0 1px 2px rgba(22,26,34,.05);
  --shadow:      0 2px 10px rgba(22,26,34,.06);
  --shadow-lg:   0 12px 34px rgba(22,26,34,.12);
  --radius:      12px;
  --radius-sm:   8px;
  --header-h:    60px;
  --wrap:        1220px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
          "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", sans-serif;
  --mono: "JetBrains Mono", "Cascadia Code", Menlo, Consolas, "Courier New", monospace;
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) {
    --bg:          #12141a;
    --bg-soft:     #171a21;
    --card:        #1b1e26;
    --card-hover:  #20242d;
    --text:        #e7eaf0;
    --text-soft:   #aeb6c6;
    --muted:       #78808f;
    --border:      #2a2f3a;
    --border-soft: #23272f;
    --accent:      #6a9bf5;
    --accent-h:    #86aeff;
    --accent-soft: #1c2739;
    --accent-text: #8db3ff;
    --tip:         #e5a352;
    --tip-soft:    #2b2317;
    --ok:          #48bd7d;
    --err:         #e87070;
    --warn:        #d9a13f;
    --shadow-sm:   0 1px 2px rgba(0,0,0,.3);
    --shadow:      0 2px 12px rgba(0,0,0,.35);
    --shadow-lg:   0 14px 40px rgba(0,0,0,.5);
  }
}

html[data-theme="dark"] {
  --bg:          #12141a;
  --bg-soft:     #171a21;
  --card:        #1b1e26;
  --card-hover:  #20242d;
  --text:        #e7eaf0;
  --text-soft:   #aeb6c6;
  --muted:       #78808f;
  --border:      #2a2f3a;
  --border-soft: #23272f;
  --accent:      #6a9bf5;
  --accent-h:    #86aeff;
  --accent-soft: #1c2739;
  --accent-text: #8db3ff;
  --tip:         #e5a352;
  --tip-soft:    #2b2317;
  --ok:          #48bd7d;
  --err:         #e87070;
  --warn:        #d9a13f;
  --shadow-sm:   0 1px 2px rgba(0,0,0,.3);
  --shadow:      0 2px 12px rgba(0,0,0,.35);
  --shadow-lg:   0 14px 40px rgba(0,0,0,.5);
}

/* ── 基础 ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }   /* 防止组件 display 覆盖 hidden 属性 */
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
img { max-width: 100%; height: auto; }
button { font: inherit; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 650; line-height: 1.35; }
p { margin: 0 0 .8em; }
code, pre, kbd { font-family: var(--mono); }
::selection { background: var(--accent); color: #fff; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 18px; }
.faint { color: var(--muted); }
.small { font-size: 12.5px; }
.dot { display:inline-block; width:7px; height:7px; border-radius:50%; background:var(--err); }

/* ── 图标（用 mask 跟随 currentColor）─────────────────────── */
i[class^="i-"], i[class*=" i-"] {
  display: inline-block; width: 15px; height: 15px; flex: none;
  background-color: currentColor; vertical-align: -2px;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: center;  mask-position: center;
  -webkit-mask-size: contain;     mask-size: contain;
}
.i-reply { -webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20 2H4a2 2 0 0 0-2 2v18l4-4h14a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2z'/%3E%3C/svg%3E"); mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20 2H4a2 2 0 0 0-2 2v18l4-4h14a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2z'/%3E%3C/svg%3E"); }
.i-view { -webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 5C6 5 2 12 2 12s4 7 10 7 10-7 10-7-4-7-10-7zm0 11a4 4 0 1 1 0-8 4 4 0 0 1 0 8z'/%3E%3C/svg%3E"); mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 5C6 5 2 12 2 12s4 7 10 7 10-7 10-7-4-7-10-7zm0 11a4 4 0 1 1 0-8 4 4 0 0 1 0 8z'/%3E%3C/svg%3E"); }
.i-tip { -webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zm1 15h-2v-1.1c-1.3-.2-2.3-.9-2.5-2.1h2c.1.5.7.9 1.5.9.9 0 1.5-.4 1.5-1s-.6-.9-1.7-1.1c-1.5-.3-3.1-.9-3.1-2.6 0-1.2 1-2 2.3-2.2V6h2v1.1c1.3.2 2.2.9 2.4 2.1h-2c-.1-.5-.6-.9-1.4-.9-.8 0-1.4.4-1.4 1s.6.8 1.7 1c1.5.3 3.1.8 3.1 2.6 0 1.2-1 2.1-2.4 2.3V17z'/%3E%3C/svg%3E"); mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zm1 15h-2v-1.1c-1.3-.2-2.3-.9-2.5-2.1h2c.1.5.7.9 1.5.9.9 0 1.5-.4 1.5-1s-.6-.9-1.7-1.1c-1.5-.3-3.1-.9-3.1-2.6 0-1.2 1-2 2.3-2.2V6h2v1.1c1.3.2 2.2.9 2.4 2.1h-2c-.1-.5-.6-.9-1.4-.9-.8 0-1.4.4-1.4 1s.6.8 1.7 1c1.5.3 3.1.8 3.1 2.6 0 1.2-1 2.1-2.4 2.3V17z'/%3E%3C/svg%3E"); }
.i-up { -webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M2 21h3V9H2zM21 9h-6l1-5a2 2 0 0 0-3.4-1.8L7 9v12h11a2 2 0 0 0 2-1.6l2-8A1 1 0 0 0 21 9z'/%3E%3C/svg%3E"); mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M2 21h3V9H2zM21 9h-6l1-5a2 2 0 0 0-3.4-1.8L7 9v12h11a2 2 0 0 0 2-1.6l2-8A1 1 0 0 0 21 9z'/%3E%3C/svg%3E"); }
.i-down { -webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M2 21h3V9H2zM21 9h-6l1-5a2 2 0 0 0-3.4-1.8L7 9v12h11a2 2 0 0 0 2-1.6l2-8A1 1 0 0 0 21 9z'/%3E%3C/svg%3E"); mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M2 21h3V9H2zM21 9h-6l1-5a2 2 0 0 0-3.4-1.8L7 9v12h11a2 2 0 0 0 2-1.6l2-8A1 1 0 0 0 21 9z'/%3E%3C/svg%3E"); transform: rotate(180deg); }
.i-star { -webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m12 2 3 6.6 7 .9-5 4.9 1.2 7L12 18l-6.2 3.4L7 14.4 2 9.5l7-.9z'/%3E%3C/svg%3E"); mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m12 2 3 6.6 7 .9-5 4.9 1.2 7L12 18l-6.2 3.4L7 14.4 2 9.5l7-.9z'/%3E%3C/svg%3E"); }
.i-search { -webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M15.5 14h-.8l-.3-.3a6.5 6.5 0 1 0-.7.7l.3.3v.8l5 5 1.5-1.5-5-5zm-6 0a4.5 4.5 0 1 1 0-9 4.5 4.5 0 0 1 0 9z'/%3E%3C/svg%3E"); mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M15.5 14h-.8l-.3-.3a6.5 6.5 0 1 0-.7.7l.3.3v.8l5 5 1.5-1.5-5-5zm-6 0a4.5 4.5 0 1 1 0-9 4.5 4.5 0 0 1 0 9z'/%3E%3C/svg%3E"); }
.i-sun { -webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 7a5 5 0 1 0 0 10 5 5 0 0 0 0-10zM11 1h2v3.5h-2zM11 19.5h2V23h-2zM1 11h3.5v2H1zM19.5 11H23v2h-3.5zM4.2 5.6l1.4-1.4 2.5 2.5-1.4 1.4zM15.9 17.3l1.4-1.4 2.5 2.5-1.4 1.4zM5.6 19.8l-1.4-1.4 2.5-2.5 1.4 1.4zM17.3 8.1l-1.4-1.4 2.5-2.5 1.4 1.4z'/%3E%3C/svg%3E"); mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 7a5 5 0 1 0 0 10 5 5 0 0 0 0-10zM11 1h2v3.5h-2zM11 19.5h2V23h-2zM1 11h3.5v2H1zM19.5 11H23v2h-3.5zM4.2 5.6l1.4-1.4 2.5 2.5-1.4 1.4zM15.9 17.3l1.4-1.4 2.5 2.5-1.4 1.4zM5.6 19.8l-1.4-1.4 2.5-2.5 1.4 1.4zM17.3 8.1l-1.4-1.4 2.5-2.5 1.4 1.4z'/%3E%3C/svg%3E"); }
.i-moon { -webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12.3 2a10 10 0 1 0 8.7 15.3A9 9 0 0 1 12.3 2z'/%3E%3C/svg%3E"); mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12.3 2a10 10 0 1 0 8.7 15.3A9 9 0 0 1 12.3 2z'/%3E%3C/svg%3E"); }
.i-plus { -webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M11 5h2v6h6v2h-6v6h-2v-6H5v-2h6z'/%3E%3C/svg%3E"); mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M11 5h2v6h6v2h-6v6h-2v-6H5v-2h6z'/%3E%3C/svg%3E"); }
.i-mail { -webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20 4H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2zm0 4-8 5-8-5V6l8 5 8-5z'/%3E%3C/svg%3E"); mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20 4H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2zm0 4-8 5-8-5V6l8 5 8-5z'/%3E%3C/svg%3E"); }
.i-home { -webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 3 2 12h3v9h6v-6h2v6h6v-9h3z'/%3E%3C/svg%3E"); mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 3 2 12h3v9h6v-6h2v6h6v-9h3z'/%3E%3C/svg%3E"); }
.i-grid { -webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 3h8v8H3zM13 3h8v8h-8zM3 13h8v8H3zM13 13h8v8h-8z'/%3E%3C/svg%3E"); mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 3h8v8H3zM13 3h8v8h-8zM3 13h8v8H3zM13 13h8v8h-8z'/%3E%3C/svg%3E"); }
.i-bell { -webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 22a2 2 0 0 0 2-2h-4a2 2 0 0 0 2 2zm6-6V11a6 6 0 0 0-5-5.9V4a1 1 0 1 0-2 0v1.1A6 6 0 0 0 6 11v5l-2 2h16z'/%3E%3C/svg%3E"); mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 22a2 2 0 0 0 2-2h-4a2 2 0 0 0 2 2zm6-6V11a6 6 0 0 0-5-5.9V4a1 1 0 1 0-2 0v1.1A6 6 0 0 0 6 11v5l-2 2h16z'/%3E%3C/svg%3E"); }
.i-user { -webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 12a5 5 0 1 0 0-10 5 5 0 0 0 0 10zm0 2c-4 0-8 2-8 5v2h16v-2c0-3-4-5-8-5z'/%3E%3C/svg%3E"); mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 12a5 5 0 1 0 0-10 5 5 0 0 0 0 10zm0 2c-4 0-8 2-8 5v2h16v-2c0-3-4-5-8-5z'/%3E%3C/svg%3E"); }

/* ── 页头 ─────────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: color-mix(in srgb, var(--card) 88%, transparent);
  backdrop-filter: saturate(150%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; gap: 14px; height: var(--header-h); }
.burger { display: none; width: 32px; height: 32px; padding: 6px; border: 0; background: none; border-radius: 7px; }
.burger span { display: block; height: 2px; border-radius: 2px; background: var(--text-soft); }
.burger span + span { margin-top: 4px; }
.burger:hover { background: var(--bg-soft); }

.logo { display: flex; align-items: center; gap: 9px; flex: none; }
.logo:hover { color: inherit; }
.logo-mark {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(135deg, #4a7fe0, #7c66f0); color: #fff;
  font-size: 13px; font-weight: 700; letter-spacing: .5px;
}
.logo-text { display: flex; flex-direction: column; line-height: 1.15; font-weight: 700; font-size: 16px; }
.logo-text small { font-size: 9.5px; font-weight: 500; color: var(--muted); letter-spacing: 1.2px; }

.main-nav { display: flex; gap: 2px; margin-left: 6px; }
.main-nav a {
  padding: 6px 12px; border-radius: 8px; font-size: 14px; font-weight: 500; color: var(--text-soft);
  transition: background .15s, color .15s;
}
.main-nav a:hover { background: var(--bg-soft); color: var(--text); }
.main-nav a.is-active { background: var(--accent-soft); color: var(--accent-text); font-weight: 600; }

.header-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.search-mini { display: flex; align-items: center; background: var(--bg-soft); border: 1px solid transparent; border-radius: 9px; padding: 0 4px 0 10px; height: 34px; }
.search-mini:focus-within { border-color: var(--accent); background: var(--card); }
.search-mini input { width: 150px; border: 0; background: none; outline: none; font-size: 13px; }
.search-mini button { border: 0; background: none; color: var(--muted); padding: 6px; border-radius: 6px; display: grid; place-items: center; }
.search-mini button:hover { color: var(--accent); background: var(--bg-soft); }

.icon-btn { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; border: 1px solid transparent; background: var(--bg-soft); color: var(--text-soft); }
.icon-btn:hover { background: var(--accent-soft); color: var(--accent-text); }
.theme-btn .i-moon, .theme-btn .i-sun { display: none; }
html[data-theme="dark"] .theme-btn .i-sun { display: block; }
html[data-theme="dark"] .theme-btn .i-moon { display: none; }
html:not([data-theme="dark"]) .theme-btn .i-moon { display: block; }
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .theme-btn .i-moon { display: none; }
  html:not([data-theme="light"]) .theme-btn .i-sun { display: block; }
}

.user-menu { position: relative; }
/* 私信图标按钮 + 未读角标 */
.msg-btn { position: relative; }
.msg-btn.has-unread { color: var(--accent-text); background: var(--accent-soft); }
.icon-badge {
  position: absolute; top: -5px; right: -5px; min-width: 16px; height: 16px; padding: 0 4px;
  display: grid; place-items: center; border-radius: 8px; background: var(--err); color: #fff;
  font-size: 10.5px; font-weight: 700; line-height: 1; border: 1.5px solid var(--card);
}
/* 发帖按钮：图标 + 文字，一眼可辨 */
.new-post-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px;
  border-radius: 9px; background: var(--accent); color: #fff; font-size: 13.5px; font-weight: 600;
  white-space: nowrap; flex: none;
}
.new-post-btn:hover { background: var(--accent-text); color: #fff; }
.new-post-btn .i-plus { width: 14px; height: 14px; }
/* 用户菜单触发器：头像 + 用户名 + 下拉箭头 */
.um-trigger {
  position: relative; display: inline-flex; align-items: center; gap: 7px;
  height: 34px; padding: 0 10px 0 3px; border: 1px solid var(--border); background: var(--bg-soft);
  border-radius: 17px; font-size: 13px; color: var(--text-soft);
}
.um-trigger:hover { background: var(--accent-soft); color: var(--accent-text); }
.um-trigger .avatar { width: 28px; height: 28px; font-size: 13px; flex: none; }
.um-name { max-width: 96px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.um-caret {
  width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent;
  border-top: 5px solid currentColor; opacity: .55; flex: none;
}
.user-menu.is-open .um-caret { transform: rotate(180deg); }
.um-trigger .dot { position: absolute; top: -2px; right: -2px; border: 1.5px solid var(--card); }
.um-panel {
  position: absolute; right: 0; top: calc(100% + 10px); width: 230px; padding: 8px;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); display: none;
}
.user-menu.is-open .um-panel { display: block; }
.um-head { display: flex; gap: 10px; align-items: center; padding: 8px; border-radius: var(--radius-sm); }
.um-head:hover { background: var(--bg-soft); }
.um-head b { font-size: 14px; }
.um-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; margin: 6px 0; }
.um-grid a { padding: 7px 10px; border-radius: 7px; font-size: 13px; color: var(--text-soft); }
.um-grid a:hover { background: var(--bg-soft); color: var(--text); }
.um-grid .badge { background: var(--err); color: #fff; border-radius: 9px; padding: 0 5px; font-size: 11px; }
.um-admin, .um-logout {
  display: block; width: 100%; text-align: left; padding: 8px 10px; border-radius: 7px;
  font-size: 13px; color: var(--text-soft); border: 0; background: none;
}
.um-admin { border-top: 1px solid var(--border-soft); margin-top: 4px; padding-top: 10px; }
.um-admin:hover, .um-logout:hover { background: var(--bg-soft); color: var(--text); }
.um-panel form { margin: 0; }
.um-logout { color: var(--err); }
.guest-actions { display: flex; gap: 6px; }

/* 版块导航条 */
.nav-strip { border-top: 1px solid var(--border-soft); background: var(--card); overflow-x: auto; scrollbar-width: none; }
.nav-strip::-webkit-scrollbar { display: none; }
.cat-nav { display: flex; gap: 4px; height: 42px; align-items: center; white-space: nowrap; }
.cat-nav a {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 8px;
  font-size: 13.5px; color: var(--text-soft); font-weight: 500;
}
.cat-nav a:hover { background: var(--bg-soft); color: var(--text); }
.cat-nav a em { font-style: normal; font-size: 11px; color: var(--muted); }
.cf-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--c, var(--accent)); flex: none; }
.cat-nav-all { margin-left: auto; color: var(--accent-text) !important; }

/* ── 主体布局 ─────────────────────────────────────────────── */
.main-grid { display: grid; grid-template-columns: minmax(0, 1fr) 316px; gap: 20px; padding-top: 20px; padding-bottom: 40px; align-items: start; }
.main-wide { padding-top: 26px; padding-bottom: 48px; max-width: 860px; }
.main-col { min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.list-card { padding: 8px 4px 4px; }

/* ── 按钮 ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 16px; border-radius: 9px; border: 1px solid transparent;
  font-size: 14px; font-weight: 550; cursor: pointer; white-space: nowrap;
  transition: background .15s, color .15s, border-color .15s, transform .1s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-h); color: #fff; }
.btn-ghost { background: var(--bg-soft); color: var(--text-soft); border-color: var(--border); }
.btn-ghost:hover { background: var(--accent-soft); color: var(--accent-text); border-color: transparent; }
.btn-sm { padding: 5px 12px; font-size: 13px; }
.btn-lg { padding: 11px 24px; font-size: 15px; }
.btn-block { width: 100%; }

/* ── 表单 ─────────────────────────────────────────────────── */
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: 13px; font-weight: 600; color: var(--text-soft); margin-bottom: 6px; }
.field input[type="text"], .field input[type="password"], .field input[type="email"],
.field input[type="search"], .field select, .field textarea, .form-stack input, .form-stack textarea {
  width: 100%; padding: 9px 12px; border: 1px solid var(--border); border-radius: 9px;
  background: var(--bg); outline: none; transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field select:focus, .field textarea:focus, .form-stack input:focus, .form-stack textarea:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); background: var(--card);
}
.field input:disabled { background: var(--bg-soft); color: var(--muted); cursor: not-allowed; }
.field textarea { resize: vertical; min-height: 84px; }
.hint { display: block; font-size: 12px; color: var(--muted); margin-top: 5px; font-style: normal; }
.hint-inline { font-size: 11.5px; color: var(--muted); font-weight: 400; font-style: normal; margin-left: 6px; }
.opt { font-size: 11px; color: var(--muted); font-weight: 400; margin-left: 4px; font-style: normal; }
.form-stack { display: flex; flex-direction: column; align-items: stretch; }
.form-stack .btn { align-self: flex-start; margin-top: 6px; }
.inline-form { display: inline-flex; gap: 6px; align-items: center; }
.inline-form input { padding: 6px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); outline: none; font-size: 13px; }
.inline-form input:focus { border-color: var(--accent); }

/* ── 提示条 ───────────────────────────────────────────────── */
.flash { padding: 10px 14px; border-radius: 10px; font-size: 13.5px; margin-bottom: 14px; border: 1px solid transparent; }
.main-grid > .flash { grid-column: 1 / -1; }
.flash-info    { background: var(--accent-soft); color: var(--accent-text); border-color: var(--border); }
.flash-success { background: color-mix(in srgb, var(--ok) 12%, var(--card)); color: var(--ok); }
.flash-error   { background: color-mix(in srgb, var(--err) 12%, var(--card)); color: var(--err); }
.flash-warn    { background: color-mix(in srgb, var(--warn) 14%, var(--card)); color: var(--warn); }

/* ── 列表工具栏 / 分段控件 ────────────────────────────────── */
.list-toolbar { display: flex; align-items: center; gap: 12px; padding: 10px 14px 12px; flex-wrap: wrap; }
.list-title { font-size: 17px; font-weight: 700; }
.toolbar-count { margin-left: auto; font-size: 12.5px; color: var(--muted); }
.toolbar-count b { color: var(--text-soft); }
.seg { display: inline-flex; gap: 2px; padding: 3px; background: var(--bg-soft); border-radius: 9px; }
.seg a { padding: 4px 13px; border-radius: 7px; font-size: 13px; font-weight: 500; color: var(--muted); }
.seg a:hover { color: var(--text); }
.seg a.is-active { background: var(--card); color: var(--accent-text); font-weight: 600; box-shadow: var(--shadow-sm); }

/* ── 帖子列表 ─────────────────────────────────────────────── */
.post-list { display: flex; flex-direction: column; }
.post-item {
  display: flex; gap: 12px; padding: 14px; border-top: 1px solid var(--border-soft);
  transition: background .12s;
}
.post-item:first-child { border-top: 0; }
.post-item:hover { background: var(--card-hover); }
.post-face { flex: none; }
.post-main { min-width: 0; flex: 1; }
.post-title { font-size: 15.5px; font-weight: 600; line-height: 1.45; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.post-title a { color: var(--text); }
.post-title a:hover { color: var(--accent); }
.post-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 6px; font-size: 12.5px; color: var(--muted); }
.cat-pill {
  padding: 1.5px 9px; border-radius: 20px; font-size: 12px; font-weight: 600; flex: none;
  color: var(--c); background: color-mix(in srgb, var(--c) 13%, transparent);
}
.cat-pill:hover { color: var(--c); background: color-mix(in srgb, var(--c) 22%, transparent); }
.post-author { color: var(--text-soft); }
.pill { padding: 1px 7px; border-radius: 5px; font-size: 11px; font-weight: 600; background: var(--bg-soft); color: var(--muted); }
.pill-pinned { background: color-mix(in srgb, var(--err) 14%, transparent); color: var(--err); }
.pill-featured { background: var(--tip-soft); color: var(--tip); }
.pill-admin { background: var(--accent-soft); color: var(--accent-text); }
.pill-banned { background: color-mix(in srgb, var(--err) 14%, transparent); color: var(--err); }
.pill-ok { background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok); }
.mini-tag { padding: 1px 7px; border-radius: 5px; font-size: 11.5px; background: var(--bg-soft); color: var(--muted); }
.mini-tag:hover { background: var(--accent-soft); color: var(--accent-text); }
.post-stats { display: flex; flex-direction: column; align-items: flex-end; justify-content: center; gap: 3px; flex: none; min-width: 62px; font-size: 12.5px; color: var(--muted); }
.post-stats .st { display: inline-flex; align-items: center; gap: 5px; }
.st-tip { color: var(--tip); }

/* ── 头像 / 等级 ──────────────────────────────────────────── */
.avatar {
  display: inline-grid; place-items: center; flex: none;
  width: var(--size, 40px); height: var(--size, 40px); border-radius: 50%;
  background: hsl(var(--hue, 210) 58% 52%); color: #fff;
  font-size: calc(var(--size, 40px) * .42); font-weight: 600; line-height: 1;
  user-select: none;
}
/* 上传头像：替换元素需要 object-fit 才能不变形 */
img.avatar {
  display: inline-block; object-fit: cover; background: var(--bg-soft);
  border: 1px solid var(--border);
}
.lv { display: inline-block; padding: 0 6px; border-radius: 5px; font-size: 11px; font-weight: 600;
      color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); }
.lv-bar { display: inline-block; width: 60px; height: 4px; border-radius: 3px; background: var(--bg-soft); overflow: hidden; vertical-align: middle; }
.lv-bar i { display: block; height: 100%; border-radius: 3px; }

/* ── 分页 ─────────────────────────────────────────────────── */
.pager { display: flex; align-items: center; gap: 8px; padding: 16px 14px 18px; flex-wrap: wrap; }
.pg-btn { padding: 6px 13px; border-radius: 8px; border: 1px solid var(--border); font-size: 13px; color: var(--text-soft); }
.pg-btn:hover { border-color: var(--accent); color: var(--accent-text); }
.pg-btn.is-disabled { opacity: .45; pointer-events: none; }
.pg-nums { display: flex; gap: 4px; flex-wrap: wrap; }
.pg-num { min-width: 32px; height: 32px; display: grid; place-items: center; padding: 0 6px; border-radius: 8px;
          font-size: 13px; color: var(--text-soft); border: 1px solid transparent; }
.pg-num:hover { background: var(--bg-soft); }
.pg-num.is-active { background: var(--accent); color: #fff; font-weight: 600; }
.pg-gap { padding: 0 4px; color: var(--muted); align-self: center; }
.pg-info { margin-left: auto; font-size: 12.5px; color: var(--muted); }

/* ── 空状态 ───────────────────────────────────────────────── */
.empty { text-align: center; padding: 54px 20px; color: var(--muted); }
.empty-icon { font-size: 34px; margin-bottom: 10px; opacity: .8; }
.empty p { margin-bottom: 14px; }
.empty-sm { padding: 26px 16px; }

/* ── 侧栏 ─────────────────────────────────────────────────── */
.sidebar { display: flex; flex-direction: column; gap: 16px; position: sticky; top: calc(var(--header-h) + 60px); }
.sidebar .card { padding: 14px; }
.side-title { font-size: 13.5px; font-weight: 700; margin-bottom: 10px; display: flex; align-items: center; color: var(--text-soft); }
.side-more { margin-left: auto; font-size: 12px; font-weight: 500; color: var(--muted); }
.side-more:hover { color: var(--accent); }
.side-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.side-list li { display: flex; gap: 8px; align-items: flex-start; font-size: 13.5px; line-height: 1.5; }
.side-list a { color: var(--text-soft); }
.side-list a:hover { color: var(--accent); }
.dot-mark { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); margin-top: 7.5px; flex: none; opacity: .6; }
/* ── 侧栏：同行社区 ── */
.site-list { display: flex; flex-direction: column; gap: 3px; }
.site-item { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 9px;
             font-size: 13.5px; color: var(--text-soft); transition: background .15s; }
.site-item:hover { background: var(--bg-soft); color: var(--accent); }
.site-chip { width: 26px; height: 26px; border-radius: 8px; display: flex; align-items: center; justify-content: center;
             font-weight: 700; font-size: 12.5px; flex: none; }
.site-name { font-weight: 500; }
.site-host { flex: 1; min-width: 0; font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site-item:hover .site-host { color: var(--accent); opacity: .75; }
.site-ext { font-style: normal; font-size: 12px; color: var(--muted);
            opacity: 0; transform: translate(-3px, 3px); transition: opacity .15s, transform .15s; flex: none; }
.site-item:hover .site-ext { opacity: 1; transform: translate(0, 0); }
.side-note { display: flex; align-items: center; justify-content: center; gap: 4px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border-soft); font-size: 12.5px; color: var(--muted); }
.side-note b { color: var(--text-soft); }

.side-user .su-top { display: flex; gap: 11px; align-items: center; padding-bottom: 12px; border-bottom: 1px solid var(--border-soft); }
.side-user .su-top b { font-size: 15px; }
.su-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; text-align: center; padding: 12px 0; }
.su-grid > div { display: flex; flex-direction: column; }
.su-grid b { font-size: 15px; font-weight: 700; }
.su-grid span { font-size: 11.5px; color: var(--muted); }
.su-links { display: flex; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border-soft); }
.su-links a { flex: 1; text-align: center; padding: 6px; border-radius: 7px; font-size: 13px; color: var(--text-soft); position: relative; }
.su-links a:hover { background: var(--bg-soft); color: var(--text); }
.su-links .dot { position: absolute; top: 6px; right: 12px; }
.side-join h3 { font-size: 15px; margin-bottom: 4px; }
.side-join .btn { margin-top: 8px; }
.side-join p { font-size: 13px; }

.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.stat-grid > div { display: flex; flex-direction: column; align-items: center; gap: 1px;
                   padding: 10px 6px 9px; background: var(--bg-soft); border-radius: 9px; text-align: center; }
.stat-grid b { font-size: 17px; font-weight: 700; line-height: 1.2; font-variant-numeric: tabular-nums; }
.stat-grid span { font-size: 11.5px; color: var(--muted); white-space: nowrap; }

.rank-list, .hot-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.rank-list li, .hot-list li { display: flex; align-items: center; gap: 8px; font-size: 13.5px; }
.rk { width: 18px; text-align: center; font-size: 12px; font-weight: 700; color: var(--muted); flex: none; }
.rk-top { color: var(--tip); }
.rk-name { color: var(--text-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rk-val { margin-left: auto; color: var(--tip); font-size: 12.5px; font-weight: 600; }
.hot-list li { align-items: flex-start; line-height: 1.5; }
.hot-list a { color: var(--text-soft); }
.hot-list a:hover { color: var(--accent); }

.tag-cloud { display: flex; flex-wrap: wrap; gap: 5px; }
.tag-cloud a { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 7px;
               background: var(--bg-soft); color: var(--text-soft); font-size: 12.5px; }
.tag-cloud a:hover { background: var(--accent-soft); color: var(--accent-text); }
.tag-cloud a i { font-style: normal; font-size: 11px; color: var(--muted); }
.tag-cloud-lg { gap: 10px; padding: 18px 14px 24px; }
.tag-cloud-lg a { padding: 6px 14px; border-radius: 9px; }

/* ── 首页 Hero ────────────────────────────────────────────── */
.hero { display: flex; align-items: center; gap: 20px; padding: 22px 24px; border-radius: var(--radius);
        background: linear-gradient(120deg, color-mix(in srgb, var(--accent) 12%, var(--card)),
                                            color-mix(in srgb, #7c66f0 10%, var(--card)));
        border: 1px solid var(--border); }
.hero-main h1 { font-size: 22px; margin-bottom: 4px; }
.hero-main > p { color: var(--text-soft); margin-bottom: 12px; }
.hero-stats { display: flex; gap: 20px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.hero-stats b { color: var(--text); font-size: 15px; margin-right: 3px; }
.hero-act { margin-left: auto; display: flex; flex-direction: column; gap: 8px; flex: none; }

/* ── 版块 ─────────────────────────────────────────────────── */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; padding: 4px 14px 18px; }
.cat-card { display: block; padding: 14px 15px; border: 1px solid var(--border); border-radius: var(--radius); transition: border-color .15s, transform .12s; }
.cat-card:hover { border-color: var(--c); color: inherit; transform: translateY(-2px); }
.cc-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.cc-head b { font-size: 15px; }
.cc-count { margin-left: auto; font-size: 12px; color: var(--muted); }
.cc-desc { font-size: 13px; color: var(--muted); margin: 0 0 10px; min-height: 36px; }
.cc-latest { display: flex; align-items: center; gap: 8px; padding-top: 9px; border-top: 1px solid var(--border-soft); font-size: 12.5px; }
.cc-latest > span { color: var(--muted); flex: none; }
.cc-latest a { color: var(--text-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cc-latest time { margin-left: auto; color: var(--muted); flex: none; }
.cat-head { display: flex; align-items: center; gap: 16px; padding: 18px 20px; border-radius: var(--radius);
            background: color-mix(in srgb, var(--c) 9%, var(--card)); border: 1px solid var(--border); }
.ch-main h1 { font-size: 19px; display: flex; align-items: center; gap: 8px; }
.ch-main p { margin: 4px 0 0; font-size: 13.5px; color: var(--text-soft); }
.ch-meta { margin-left: auto; text-align: center; flex: none; }
.ch-meta b { display: block; font-size: 20px; }
.ch-meta span { font-size: 12px; color: var(--muted); }

/* ── 帖子详情 ─────────────────────────────────────────────── */
.crumbs { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--muted); padding: 0 2px; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--accent); }
.crumbs i { font-style: normal; opacity: .5; }
.post-detail { padding: 22px 24px; }
.pd-badges { display: flex; gap: 6px; align-items: center; margin-bottom: 10px; }
.pd-title { font-size: 23px; line-height: 1.4; margin-bottom: 16px; }
.pd-meta { display: flex; align-items: center; gap: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--border-soft); flex-wrap: wrap; }
.pd-author { display: flex; gap: 10px; align-items: center; }
.pda-text { display: flex; flex-direction: column; line-height: 1.4; }
.pda-text b { font-size: 14px; display: flex; align-items: center; gap: 6px; }
.pda-text small { font-size: 12px; color: var(--muted); }
.pd-stats { margin-left: auto; display: flex; gap: 14px; font-size: 12.5px; color: var(--muted); flex-wrap: wrap; }
.pd-stats span { display: inline-flex; align-items: center; gap: 4px; }
.pd-stats .st-tip { color: var(--tip); }
.pd-body { padding: 18px 0 4px; }
.pd-tags { display: flex; gap: 6px; flex-wrap: wrap; padding: 8px 0 14px; }
.pd-actions { display: flex; gap: 8px; align-items: center; padding-top: 14px; border-top: 1px solid var(--border-soft); flex-wrap: wrap; }
.act { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 9px;
       border: 1px solid var(--border); background: var(--card); color: var(--text-soft); font-size: 13.5px; font-weight: 500; }
.act:hover { border-color: var(--accent); color: var(--accent-text); }
.act b { font-weight: 600; font-size: 13px; }
.act-like.is-on { background: var(--accent); border-color: var(--accent); color: #fff; }
.act-dislike.is-on { background: var(--muted); border-color: var(--muted); color: #fff; }
.act-fav.is-on { background: var(--tip-soft); border-color: var(--tip); color: var(--tip); }
.act-tip { border-color: color-mix(in srgb, var(--tip) 40%, var(--border)); color: var(--tip); }
.act-tip.is-done { opacity: .6; pointer-events: none; }
.act-del:hover { border-color: var(--err); color: var(--err); }
.pd-more { margin-left: auto; display: flex; gap: 8px; }

.rel-list { display: flex; flex-direction: column; gap: 2px; }
.rel-item { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px;
            border: 1px solid transparent; transition: background .15s, border-color .15s; }
.rel-item:hover { background: var(--bg-soft); border-color: var(--border-soft); }
.rel-item .avatar { flex: none; }
.rel-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.rel-title { font-size: 13.5px; line-height: 1.45; color: var(--text);
             display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rel-item:hover .rel-title { color: var(--accent); }
.rel-meta { font-size: 11.5px; color: var(--muted); }
.rel-count { flex: none; font-size: 11px; color: var(--muted); background: var(--bg-soft);
             padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.rel-item:hover .rel-count { background: var(--accent-soft); color: var(--accent); }

/* ── 评论 ─────────────────────────────────────────────────── */
.comments { padding: 18px 22px; }
.cm-header { display: flex; align-items: center; margin-bottom: 16px; }
.cm-header h2 { font-size: 16px; }
.cm-header h2 b { color: var(--accent-text); }
.cm-sort { margin-left: auto; display: flex; gap: 4px; }
.cm-sort a { padding: 3px 11px; border-radius: 7px; font-size: 12.5px; color: var(--muted); }
.cm-sort a.is-active { background: var(--accent-soft); color: var(--accent-text); font-weight: 600; }
.cm-form { margin-bottom: 22px; }
.cm-form-row { display: flex; gap: 12px; align-items: flex-start; }
.cm-form-row .cm-face { flex: none; padding-top: 2px; }
.cm-form-main { flex: 1; min-width: 0; }
.cm-form textarea { width: 100%; padding: 11px 13px; border: 1px solid var(--border); border-radius: 10px;
                    background: var(--bg); outline: none; resize: vertical; line-height: 1.6; font-size: 14px; }
.cm-form textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); background: var(--card); }
.cm-form-foot { display: flex; align-items: center; gap: 12px; margin-top: 10px; flex-wrap: wrap; }
.cm-form-foot .btn { margin-left: auto; }
.cm-form-note { font-size: 12px; color: var(--warn); background: var(--tip-soft);
                padding: 4px 10px; border-radius: 7px; }
.cm-form-reply { display: flex; align-items: center; gap: 8px; padding: 7px 12px; margin: 0 0 8px 48px;
                 background: var(--accent-soft); border-radius: 8px; font-size: 13px; color: var(--accent-text); }
.cm-form-reply button { border: 0; background: none; color: var(--muted); font-size: 12px; text-decoration: underline; }
.cm-login-tip { padding: 16px; text-align: center; background: var(--bg-soft); border-radius: 10px; font-size: 13.5px; color: var(--muted); margin-bottom: 18px; }
.cm-login-tip a { color: var(--accent-text); font-weight: 600; }

.comment-list { display: flex; flex-direction: column; }
.comment { display: flex; gap: 11px; padding: 13px 0; border-top: 1px solid var(--border-soft); }
.comment:first-child { border-top: 0; }
.cm-face { flex: none; }
.cm-body { min-width: 0; flex: 1; }
.cm-head { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-bottom: 5px; }
.cm-name { font-size: 13.5px; font-weight: 600; }
.cm-floor { font-size: 11.5px; color: var(--muted); }
.cm-pending { font-size: 11px; font-weight: 600; color: var(--warn); background: var(--tip-soft);
              padding: 1px 8px; border-radius: 20px; }
.cm-reply-to { font-size: 12px; color: var(--muted); }
.cm-reply-to a { color: var(--accent-text); }
.cm-content { font-size: 14px; }
.cm-tools { display: flex; gap: 4px; margin-top: 7px; flex-wrap: wrap; }
.cm-btn { border: 0; background: none; color: var(--muted); font-size: 12.5px; padding: 3px 8px; border-radius: 6px; display: inline-flex; align-items: center; gap: 4px; }
.cm-btn:hover { background: var(--bg-soft); color: var(--text-soft); }
.cm-danger:hover { color: var(--err); }
.cm-replies { margin-top: 10px; padding-left: 12px; border-left: 2px solid var(--border); display: flex; flex-direction: column; gap: 8px; }
.cm-replies .comment { padding: 9px 0; border-top: 0; }
.cm-replies .avatar { --size: 30px !important; }

/* ── 用户 ─────────────────────────────────────────────────── */
.user-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; padding: 4px 14px 18px; }
.user-card { position: relative; display: flex; gap: 11px; padding: 13px; border: 1px solid var(--border); border-radius: var(--radius); transition: border-color .15s; }
.user-card:hover { border-color: var(--accent); color: inherit; }
.uc-rank { position: absolute; top: 8px; right: 10px; font-size: 12px; font-weight: 800; color: var(--tip); }
.uc-main { min-width: 0; }
.uc-main b { font-size: 14.5px; }
.uc-main p { margin: 3px 0 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.uc-stats { margin-left: auto; display: flex; flex-direction: column; gap: 2px; text-align: right; font-size: 11.5px; color: var(--muted); flex: none; }
.uc-stats b { color: var(--text-soft); font-size: 13px; }

.profile { display: flex; gap: 18px; padding: 22px; align-items: flex-start; position: relative; flex-wrap: wrap; }
.pf-main { flex: 1; min-width: 220px; }
.pf-name { display: flex; align-items: center; gap: 9px; margin-bottom: 6px; }
.pf-name h1 { font-size: 21px; }
.pf-bio { color: var(--text-soft); font-size: 13.5px; margin-bottom: 10px; }
.pf-meta { display: flex; gap: 14px; font-size: 12.5px; color: var(--muted); flex-wrap: wrap; margin-bottom: 12px; }
.pf-progress { height: 5px; border-radius: 3px; background: var(--bg-soft); overflow: hidden; max-width: 380px; }
.pf-progress i { display: block; height: 100%; border-radius: 3px; transition: width .4s; }
.pf-progress-text { font-size: 12px; color: var(--muted); margin-top: 5px; }
.pf-stats { display: grid; grid-template-columns: repeat(4, auto); gap: 2px 22px; flex: none; margin-left: auto; align-self: flex-start; }
.pf-stats > div { display: flex; flex-direction: column; align-items: center; }
.pf-stats b { font-size: 17px; }
.pf-stats span { font-size: 11.5px; color: var(--muted); }
.pf-edit { position: absolute; right: 22px; bottom: 20px; }

.uc-comment-list { padding: 0 14px 12px; }
.uc-comment { padding: 13px 0; border-top: 1px solid var(--border-soft); }
.uc-comment:first-child { border-top: 0; }
.ucc-head { display: flex; align-items: center; gap: 9px; margin-bottom: 6px; flex-wrap: wrap; }
.ucc-post { font-size: 13.5px; font-weight: 600; color: var(--text-soft); }
.ucc-head time { margin-left: auto; font-size: 12px; }
.ucc-body { font-size: 13.5px; color: var(--text-soft); }

/* ── 签到 ─────────────────────────────────────────────────── */
.checkin-hero { display: flex; gap: 20px; padding: 24px; align-items: center; flex-wrap: wrap;
  background: linear-gradient(120deg, color-mix(in srgb, var(--tip) 12%, var(--card)), var(--card)); }
.ck-left { flex: 1; min-width: 240px; }
.ck-left h1 { font-size: 21px; margin-bottom: 6px; }
.ck-left > p { color: var(--text-soft); font-size: 13.5px; margin-bottom: 16px; }
.ck-left b { color: var(--tip); font-size: 15px; }
.ck-right { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 22px; flex: none; }
.ck-stat { display: flex; flex-direction: column; align-items: center; }
.ck-stat b { font-size: 20px; }
.ck-stat span { font-size: 11.5px; color: var(--muted); }
.ck-done { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: color-mix(in srgb, var(--ok) 12%, var(--card));
           border-radius: 10px; color: var(--ok); }
.ck-done-icon { width: 30px; height: 30px; border-radius: 50%; background: var(--ok); color: #fff; display: grid; place-items: center; font-weight: 700; }
.ck-done b { display: block; font-size: 14px; }
.ck-done span { font-size: 12.5px; opacity: .85; }
.ck-rank { list-style: none; margin: 0; padding: 0 14px 16px; display: flex; flex-direction: column; }
.ck-rank li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--border-soft); font-size: 13.5px; }
.ck-rank li:first-child { border-top: 0; }
.ck-name { font-weight: 600; }
.ck-streak { font-size: 12px; color: var(--muted); }
.ck-amount { margin-left: auto; color: var(--tip); font-weight: 600; }
.ck-history { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 9px; padding: 2px 14px 18px; }
.ck-day { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 6px 9px;
          background: var(--bg-soft); border: 1px solid transparent; border-radius: 10px; transition: background .15s, border-color .15s; }
.ck-day:hover { background: color-mix(in srgb, var(--tip) 8%, var(--card)); }
.ck-day .ck-dd { display: flex; align-items: baseline; gap: 4px; font-size: 12.5px; font-weight: 600; color: var(--text-soft); font-variant-numeric: tabular-nums; }
.ck-day .ck-dd i { font-style: normal; font-size: 11px; font-weight: 400; color: var(--muted); }
.ck-day b { font-size: 16px; line-height: 1.2; color: var(--tip); font-variant-numeric: tabular-nums; }
.ck-day em { font-style: normal; font-size: 11px; color: var(--muted); }
.ck-day.ck-today { background: color-mix(in srgb, var(--tip) 10%, var(--card)); border-color: color-mix(in srgb, var(--tip) 35%, transparent); }
.ck-day.ck-today .ck-dd i { color: var(--tip); font-weight: 600; }

/* ── 认证页 ───────────────────────────────────────────────── */
.auth-wrap { max-width: 420px; margin: 20px auto 40px; }
.auth-card { padding: 28px 26px; }
.auth-title { font-size: 20px; margin-bottom: 4px; }
.auth-sub { color: var(--muted); font-size: 13px; margin-bottom: 20px; }
.auth-form .btn { margin-top: 6px; }
.cap-row { display: flex; gap: 10px; align-items: center; }
.cap-row input { flex: 1; }
.cap-img { border-radius: 9px; border: 1px solid var(--border); cursor: pointer; flex: none; background: #f7f9fc; }
.auth-foot { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border-soft); font-size: 13px; color: var(--muted); text-align: center; }
.auth-foot a { color: var(--accent-text); font-weight: 600; }
.auth-agree { font-size: 12px; text-align: center; margin: 10px 0 0; }
.auth-agree a { color: var(--accent-text); }

/* ── 编辑器 ───────────────────────────────────────────────── */
.editor-wrap { max-width: 1000px; margin: 0 auto; }
.editor-wrap .card { padding: 8px 20px 20px; }
.ed-top { display: flex; gap: 14px; align-items: flex-end; flex-wrap: wrap; margin-top: 12px; }
.ed-top .field { margin-bottom: 14px; }
.ed-top .field:first-child { width: 170px; flex: none; }
.field-grow { flex: 1; min-width: 240px; }
.ed-toolbar { display: flex; gap: 3px; align-items: center; padding: 6px; background: var(--bg-soft); border-radius: 9px 9px 0 0; border: 1px solid var(--border); border-bottom: 0; flex-wrap: wrap; }
.ed-toolbar button { min-width: 32px; height: 30px; padding: 0 9px; border: 0; background: none; border-radius: 7px;
                     color: var(--text-soft); font-size: 13px; display: inline-flex; align-items: center; justify-content: center; }
.ed-toolbar button:hover { background: var(--card); color: var(--accent-text); }
.ed-toolbar-sp { flex: 1; }
.ed-split { display: grid; grid-template-columns: 1fr; gap: 0; border: 1px solid var(--border); border-radius: 0 0 9px 9px; overflow: hidden; }
.ed-split.ed-with-preview { grid-template-columns: 1fr 1fr; }
.ed-split textarea { border: 0 !important; border-radius: 0 !important; min-height: 420px; font-family: var(--mono); font-size: 13.5px; line-height: 1.7;
                     box-shadow: none !important; padding: 14px; background: var(--bg); }
.ed-preview { padding: 14px 16px; border-left: 1px solid var(--border); background: var(--card); overflow-y: auto; max-height: 620px; min-height: 420px; }
.ed-preview-empty { text-align: center; padding-top: 120px; }
.ed-foot { display: flex; align-items: center; gap: 14px; margin-top: 16px; flex-wrap: wrap; }
.ed-foot-btns { margin-left: auto; display: flex; gap: 10px; }
.ed-foot code { background: var(--bg-soft); padding: 1px 5px; border-radius: 4px; font-size: 12px; }

/* ── 通知 ─────────────────────────────────────────────────── */
.notif-list { padding: 0 14px 12px; }
.notif { display: flex; gap: 11px; padding: 13px 0; border-top: 1px solid var(--border-soft); }
.notif:first-child { border-top: 0; }
.notif.is-unread { position: relative; }
.notif.is-unread::before { content: ""; position: absolute; left: -8px; top: 20px; width: 4px; height: 4px; border-radius: 50%; background: var(--accent); }
.nf-main { min-width: 0; flex: 1; }
.nf-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13.5px; }
.nf-name { font-weight: 600; }
.nf-type { color: var(--text-soft); }
.nf-head time { margin-left: auto; font-size: 12px; }
.nf-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--err); }
.nf-content { margin-top: 5px; font-size: 13px; color: var(--muted); background: var(--bg-soft); padding: 7px 11px; border-radius: 8px; }
.nf-link { display: inline-block; margin-top: 6px; font-size: 12.5px; color: var(--accent-text); }

/* ── 头像上传 ─────────────────────────────────────────────── */
.av-edit { display: flex; align-items: flex-start; gap: 22px; padding: 6px 14px 18px; flex-wrap: wrap; }
.av-preview { flex: none; display: grid; place-items: center; padding: 10px; border-radius: 14px; background: var(--bg-soft); }
.av-preview img, .av-preview span { transition: opacity .2s; }
.av-preview.is-dirty::after { content: '待上传'; display: block; margin-top: 6px; font-size: 11.5px; color: var(--accent-text); }
.av-side { flex: 1; min-width: 260px; display: flex; flex-direction: column; gap: 10px; }
.av-form { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.av-file { font-size: 13px; color: var(--text-soft); max-width: 100%; }
.av-file::file-selector-button {
  margin-right: 10px; padding: 8px 14px; border-radius: 9px; cursor: pointer;
  border: 1px solid var(--border); background: var(--bg-soft); color: var(--text-soft);
  font: inherit; font-size: 13px;
}
.av-file::file-selector-button:hover { border-color: var(--accent); color: var(--accent-text); }
.av-form .hint, .av-side > .hint { margin: 0; }
.av-reset { margin: 0; }

/* ── 设置 / 后台 ──────────────────────────────────────────── */
.settings-head { display: flex; align-items: center; gap: 16px; padding: 22px 24px; }
.settings-head h1 { font-size: 19px; }
.settings-head .btn { margin-left: auto; }

/* 账号设置分区卡片：统一内边距 + 分区标题 */
.set-card { padding: 20px 24px 24px; }
.set-card > .list-title {
  display: flex; align-items: center; gap: 9px;
  font-size: 15.5px; font-weight: 700;
  margin-bottom: 18px; padding-bottom: 12px;
  border-bottom: 1px solid var(--border-soft);
}
.set-card > .list-title::before {
  content: ''; flex: none; width: 4px; height: 16px; border-radius: 2px;
  background: var(--accent);
}
.list-sub { margin-left: auto; font-size: 12px; font-weight: 400; color: var(--muted); }
.set-card .field { max-width: 480px; }
.set-card .form-stack .btn { margin-top: 10px; }
.set-card .av-edit { padding: 0; }
.set-card .av-form .btn { margin-top: 10px; }
.set-card > .hint { margin-top: 12px; }
.admin-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 14px; margin-top: 14px; }
.admin-stats > div { display: flex; flex-direction: column; align-items: center; padding: 12px; background: var(--bg-soft); border-radius: 10px; }
.admin-stats b { font-size: 20px; }
.admin-stats span { font-size: 12px; color: var(--muted); }
.admin-table-wrap { overflow-x: auto; padding: 0 14px 16px; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin-table th { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--border); color: var(--muted); font-weight: 600; font-size: 12.5px; white-space: nowrap; }
.admin-table td { padding: 9px 10px; border-bottom: 1px solid var(--border-soft); vertical-align: middle; }
.admin-table tr:hover td { background: var(--bg-soft); }
.admin-table .num { color: var(--muted); font-variant-numeric: tabular-nums; }
.admin-table .title-cell { max-width: 380px; }
.admin-table .title-cell a { font-weight: 550; }
.admin-table .ops { white-space: nowrap; }
.admin-table .ops button { border: 1px solid var(--border); background: var(--card); border-radius: 7px; padding: 3px 9px; font-size: 12px; color: var(--text-soft); margin-right: 4px; }
.admin-table .ops button:hover { border-color: var(--accent); color: var(--accent-text); }
.admin-table .ops button.danger:hover { border-color: var(--err); color: var(--err); }
.mod-table .mod-content { max-width: 420px; word-break: break-word; }

/* 后台标签导航 */
.admin-tabs { grid-column: 1 / -1; display: flex; gap: 4px; margin-bottom: 14px; padding: 4px; background: var(--card);
              border: 1px solid var(--border); border-radius: var(--radius); overflow-x: auto; }
.admin-tabs a { padding: 8px 18px; border-radius: 9px; font-size: 14px; font-weight: 500; color: var(--text-soft); white-space: nowrap; }
.admin-tabs a:hover { background: var(--bg-soft); color: var(--text); }
.admin-tabs a.is-active { background: var(--accent); color: #fff; }
.admin-tabs .badge { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 10px;
                     background: var(--err); color: #fff; font-size: 11px; line-height: 18px; text-align: center; margin-left: 2px; }
.admin-tabs a.is-active .badge { background: rgba(255,255,255,.25); }
.admin-tabs .admin-tab-right { margin-left: auto; padding: 8px 14px; border-radius: 9px;
                              font-size: 13px; color: var(--text-soft); white-space: nowrap; }
.admin-tabs .admin-tab-right:hover { background: var(--bg-soft); color: var(--text); }

/* 概览 */
.ov-alert { margin-top: 14px; padding: 10px 14px; border-radius: 9px;
            background: color-mix(in srgb, var(--warn) 12%, var(--card)); color: var(--warn); font-size: 13.5px; }
.ov-alert a { font-weight: 600; text-decoration: underline; }
.sys-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; padding: 2px 14px 18px; }
.sys-item { display: flex; flex-direction: column; gap: 3px; padding: 11px 14px; background: var(--bg-soft); border-radius: 9px; font-size: 12.5px; }
.sys-item span { color: var(--muted); }
.sys-item b { font-size: 13.5px; font-variant-numeric: tabular-nums; word-break: break-all; }
.ok-text { color: var(--ok); } .err-text { color: var(--err); } .warn-text { color: var(--warn); }

/* SEO 表单 */
.admin-form { padding: 4px 14px 20px; }
.admin-form .field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }
.admin-form .field > span { font-size: 13px; font-weight: 550; color: var(--text-soft); }
.admin-form input[type="text"], .admin-form textarea {
  width: 100%; padding: 9px 12px; border: 1px solid var(--border); border-radius: 9px;
  background: var(--bg); outline: none; font-size: 13.5px; line-height: 1.6; }
.admin-form input:focus, .admin-form textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.af-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.af-sub { font-size: 14.5px; margin: 20px 0 4px; padding-top: 14px; border-top: 1px solid var(--border-soft); }
.af-hint { margin: 0 0 12px; }
.af-mono { font-family: var(--mono); font-size: 12.5px; }
.af-check { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; font-size: 13.5px; cursor: pointer; }
.af-check input { width: 16px; height: 16px; }
.af-foot { margin-top: 6px; }
@media (max-width: 720px) { .af-grid { grid-template-columns: 1fr; } }

/* ── 友情链接 ─────────────────────────────────────────────── */
.page-lead { padding: 0 14px 16px; margin: 0; font-size: 13.5px; line-height: 1.75; color: var(--muted); }
.link-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; padding: 2px 14px 18px; }
.link-card { display: flex; gap: 11px; align-items: center; padding: 12px 13px; border: 1px solid var(--border-soft);
             border-radius: 10px; background: var(--bg-soft); transition: .15s; }
.link-card:hover { border-color: var(--accent); background: var(--card); transform: translateY(-1px); }
.lk-logo { width: 38px; height: 38px; border-radius: 9px; object-fit: contain; flex: none; background: var(--card); }
.lk-logo-txt { display: flex; align-items: center; justify-content: center; font-size: 17px; font-weight: 700;
               color: var(--accent-text); background: var(--accent-soft); }
.lk-main { min-width: 0; }
.lk-head { display: flex; align-items: baseline; gap: 7px; }
.lk-head b { font-size: 14px; }
.lk-host { font-size: 11.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lk-desc { margin: 3px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--muted);
           display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.link-gate { padding: 4px 14px 20px; }
.link-gate p { margin: 0 0 12px; font-size: 13.5px; color: var(--muted); }
.af-hint-inline { margin-left: 12px; }
.op-link { display: inline-block; padding: 3px 9px; margin-right: 4px; border: 1px solid var(--border);
           border-radius: 7px; font-size: 12px; color: var(--text-soft); }
.op-link:hover { border-color: var(--accent); color: var(--accent-text); }
.pill-pending { background: color-mix(in srgb, var(--warn) 16%, var(--card)); color: var(--warn); }

/* 后台筛选条（主题管理 / 用户管理共用） */
.admin-filter { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 14px; }
.admin-filter a { padding: 5px 14px; border-radius: 999px; font-size: 13px; color: var(--text-soft);
                  background: var(--bg-soft); border: 1px solid transparent; }
.admin-filter a b { font-variant-numeric: tabular-nums; }
.admin-filter a:hover { border-color: var(--border); color: var(--text); }
.admin-filter a.is-active { background: var(--accent-soft); color: var(--accent-text); border-color: var(--accent); font-weight: 600; }

/* 已删除帖子行 */
.admin-table .row-del td { opacity: .62; }
.admin-table .row-del .title-cell a { text-decoration: line-through; }

/* 用户编辑元信息行 */
.user-meta-row { display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 0 14px 14px; font-size: 12.5px; color: var(--muted); }
.user-meta-row span { white-space: nowrap; }

/* 页脚友情链接条 */
.f-links { display: flex; gap: 10px; align-items: baseline; padding-bottom: 14px; font-size: 12.5px; }
.fl-title { flex: none; font-size: 12.5px; color: var(--text-soft); }
.fl-body { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: baseline; }
.fl-body a { color: var(--muted); }
.fl-body a:hover { color: var(--accent-text); }
.fl-apply { color: var(--accent-text) !important; font-weight: 600; }

/* ── 搜索 ─────────────────────────────────────────────────── */
.search-big { display: flex; gap: 10px; padding: 12px 14px 0; }
.search-big input { flex: 1; padding: 10px 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg); outline: none; font-size: 14.5px; }
.search-big input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); background: var(--card); }

/* ── 静态页 ───────────────────────────────────────────────── */
.prose { padding: 26px 30px 34px; font-size: 15px; line-height: 1.85; }
.prose h1 { font-size: 24px; margin: 0 0 10px; }
.prose h2 { font-size: 18px; margin: 28px 0 10px; padding-top: 18px; border-top: 1px solid var(--border-soft); }
.prose h2:first-of-type { border-top: 0; padding-top: 0; }
.prose h3 { font-size: 15.5px; margin: 20px 0 8px; }
.prose .lead { font-size: 15px; color: var(--text-soft); margin-bottom: 20px; }
.prose ul, .prose ol { padding-left: 22px; margin: 0 0 16px; }
.prose li { margin-bottom: 6px; }
.prose code { background: var(--bg-soft); padding: 2px 6px; border-radius: 5px; font-size: 13px; }
.prose-table { overflow-x: auto; margin: 12px 0 20px; }
.prose table { width: 100%; border-collapse: collapse; font-size: 14px; }
.prose th, .prose td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--border-soft); }
.prose th { background: var(--bg-soft); font-size: 13px; color: var(--text-soft); }

/* ── 404 ──────────────────────────────────────────────────── */
.notfound { padding: 60px 30px; text-align: center; }
.nf-code { font-size: 68px; font-weight: 800; line-height: 1; letter-spacing: -2px;
           background: linear-gradient(135deg, var(--accent), #7c66f0); -webkit-background-clip: text; background-clip: text; color: transparent; }
.notfound h1 { font-size: 21px; margin: 14px 0 8px; }
.nf-actions { display: flex; gap: 10px; justify-content: center; margin-top: 22px; flex-wrap: wrap; }

/* ── Markdown 正文 ────────────────────────────────────────── */
.md { font-size: 15px; line-height: 1.8; word-wrap: break-word; overflow-wrap: break-word; }
.md > *:first-child { margin-top: 0; }
.md > *:last-child { margin-bottom: 0; }
.md-p { margin: 0 0 14px; }
.md-h { margin: 24px 0 12px; font-weight: 700; line-height: 1.4; }
.md-h:first-child { margin-top: 0; }
h2.md-h { font-size: 19px; } h3.md-h { font-size: 16.5px; } h4.md-h, h5.md-h, h6.md-h { font-size: 15px; }
.md-link { color: var(--accent-text); border-bottom: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); }
.md-link:hover { border-bottom-color: var(--accent); }
.md-mention { color: var(--accent-text); font-weight: 600; }
.md-img { display: block; max-width: 100%; border-radius: 10px; margin: 12px 0; border: 1px solid var(--border); }
.md-inline { background: var(--bg-soft); padding: 1.5px 6px; border-radius: 5px; font-size: .88em; font-family: var(--mono); color: var(--accent-text); }
.md-code { position: relative; background: var(--bg-soft); border: 1px solid var(--border); border-radius: 10px;
           padding: 14px 16px; overflow-x: auto; margin: 14px 0; font-size: 13px; line-height: 1.7; }
.md-code code { font-family: var(--mono); color: var(--text); background: none; padding: 0; }
.md-code[data-lang]:not([data-lang=""])::before {
  content: attr(data-lang); position: absolute; top: 0; right: 0; padding: 2px 10px;
  font-size: 11px; color: var(--muted); background: var(--card); border-left: 1px solid var(--border);
  border-bottom: 1px solid var(--border); border-radius: 0 10px 0 8px;
}
.md-quote { margin: 14px 0; padding: 10px 16px; border-left: 3px solid var(--accent);
            background: var(--bg-soft); border-radius: 0 8px 8px 0; color: var(--text-soft); }
.md-ul, .md-ol { margin: 0 0 14px; padding-left: 24px; }
.md-ul li, .md-ol li { margin-bottom: 5px; }
.md-task { list-style: none; display: flex; gap: 8px; align-items: flex-start; margin-left: -20px; }
.md-check { width: 16px; height: 16px; border-radius: 4px; border: 1.5px solid var(--border);
            display: inline-grid; place-items: center; flex: none; margin-top: 5px; font-size: 11px; color: #fff; }
.md-check.is-done { background: var(--ok); border-color: var(--ok); }
.md-hr { border: 0; border-top: 1px solid var(--border); margin: 22px 0; }
.md-table-wrap { overflow-x: auto; margin: 14px 0; border: 1px solid var(--border); border-radius: 10px; }
.md-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.md-table th, .md-table td { padding: 9px 13px; text-align: left; border-bottom: 1px solid var(--border-soft); }
.md-table th { background: var(--bg-soft); font-weight: 600; font-size: 13px; color: var(--text-soft); white-space: nowrap; }
.md-table tr:last-child td { border-bottom: 0; }

/* ::: tabs 扩展语法 */
.md-tabs { margin: 16px 0; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.md-tab-radio { position: absolute; opacity: 0; pointer-events: none; width: 0; height: 0; }
.md-tab-nav { display: flex; gap: 4px; padding: 6px; background: var(--bg-soft); border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.md-tab-label { padding: 6px 15px; border-radius: 8px; font-size: 13px; font-weight: 550; color: var(--muted); cursor: pointer; transition: background .15s, color .15s; }
.md-tab-label:hover { color: var(--text-soft); }
.md-tab-panels { padding: 14px 16px; }
.md-tab-panel { display: none; }
.md-tab-panel > *:last-child { margin-bottom: 0; }
.md-tab-radio.i-0:checked ~ .md-tab-nav .md-tab-label.i-0,
.md-tab-radio.i-1:checked ~ .md-tab-nav .md-tab-label.i-1,
.md-tab-radio.i-2:checked ~ .md-tab-nav .md-tab-label.i-2,
.md-tab-radio.i-3:checked ~ .md-tab-nav .md-tab-label.i-3,
.md-tab-radio.i-4:checked ~ .md-tab-nav .md-tab-label.i-4,
.md-tab-radio.i-5:checked ~ .md-tab-nav .md-tab-label.i-5 { background: var(--card); color: var(--accent-text); box-shadow: var(--shadow-sm); }
.md-tab-radio.i-0:checked ~ .md-tab-panels .md-tab-panel.i-0,
.md-tab-radio.i-1:checked ~ .md-tab-panels .md-tab-panel.i-1,
.md-tab-radio.i-2:checked ~ .md-tab-panels .md-tab-panel.i-2,
.md-tab-radio.i-3:checked ~ .md-tab-panels .md-tab-panel.i-3,
.md-tab-radio.i-4:checked ~ .md-tab-panels .md-tab-panel.i-4,
.md-tab-radio.i-5:checked ~ .md-tab-panels .md-tab-panel.i-5 { display: block; }

/* ── 页脚 ─────────────────────────────────────────────────── */
.site-footer { border-top: 1px solid var(--border); background: var(--card); margin-top: 20px; }
.footer-inner { display: flex; gap: 40px; padding: 30px 18px 22px; flex-wrap: wrap; }
.f-brand b { font-size: 16px; }
.f-brand p { font-size: 13px; margin-top: 4px; max-width: 260px; }
.f-cols { display: flex; gap: 56px; margin-left: auto; flex-wrap: wrap; }
.f-cols h4 { font-size: 13px; color: var(--text-soft); margin-bottom: 10px; }
.f-cols a { display: block; font-size: 13px; color: var(--muted); padding: 3px 0; }
.f-cols a:hover { color: var(--accent); }
.footer-bar { display: flex; gap: 16px; align-items: center; padding: 14px 18px 20px; border-top: 1px solid var(--border-soft);
              font-size: 12.5px; color: var(--muted); flex-wrap: wrap; }
.f-icp { color: var(--muted); }

/* ── 移动端底栏 ───────────────────────────────────────────── */
.mobile-nav { display: none; }
.mobile-nav a { display: flex; flex-direction: column; align-items: center; gap: 2px; flex: 1;
                font-size: 10.5px; color: var(--muted); padding: 4px 0; }
.mobile-nav a.is-active { color: var(--accent); }
.mn-fab { flex: none !important; width: 44px; height: 44px; margin-top: -14px; border-radius: 50%;
          background: var(--accent) !important; color: #fff !important; box-shadow: var(--shadow); display: grid !important; place-items: center; }
.mn-fab i { width: 20px; height: 20px; }

/* ── Toast ────────────────────────────────────────────────── */
.toast-host { position: fixed; left: 50%; bottom: 30px; transform: translateX(-50%); z-index: 200;
              display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { padding: 10px 20px; border-radius: 10px; background: var(--text); color: var(--bg);
         font-size: 13.5px; box-shadow: var(--shadow-lg); animation: toastIn .22s ease; max-width: 88vw; }
.toast-error { background: var(--err); color: #fff; }
.toast-success { background: var(--ok); color: #fff; }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* ── 响应式 ───────────────────────────────────────────────── */
@media (max-width: 1080px) {
  .main-grid { grid-template-columns: minmax(0, 1fr) 290px; gap: 16px; }
  .sidebar { position: static; }
  .search-mini input { width: 110px; }
}
@media (max-width: 900px) {
  .main-grid { grid-template-columns: minmax(0, 1fr); }
  .main-nav { display: none; }
  .burger { display: block; }
  body.nav-open .main-nav {
    display: flex; flex-direction: column; gap: 2px;
    position: fixed; left: 0; right: 0; top: var(--header-h);
    background: var(--card); border-bottom: 1px solid var(--border);
    padding: 10px 12px; z-index: 59; box-shadow: var(--shadow);
  }
  body.nav-open .main-nav a { padding: 11px 14px; font-size: 15px; }
  .ed-split, .ed-split.ed-with-preview { grid-template-columns: 1fr; }
  .ed-preview { border-left: 0; border-top: 1px solid var(--border); min-height: 160px; }
  .ed-preview-empty { padding-top: 40px; }
  .footer-inner { gap: 24px; }
  .f-cols { margin-left: 0; gap: 32px; }
}
@media (max-width: 720px) {
  body { font-size: 14.5px; }
  .wrap { padding: 0 12px; }
  .main-grid { padding-top: 12px; padding-bottom: 84px; gap: 12px; }
  .main-wide { padding-bottom: 84px; }
  .search-mini { display: none; }
  .um-name { display: none; }
  .um-trigger { padding-right: 8px; }
  .header-actions { gap: 6px; }
  .new-post-btn { height: 32px; padding: 0 10px; font-size: 13px; gap: 4px; }
  .header-actions .btn.btn-sm { padding: 0 10px; }
  /* 窄屏放不下登录+注册两个按钮：隐藏登录（底部导航「我的」可进登录页） */
  @media (max-width: 420px) {
    .header-actions .btn.btn-ghost.btn-sm { display: none; }
  }
  .logo-text small { display: none; }
  .hero { flex-direction: column; align-items: flex-start; padding: 18px; }
  .hero-act { margin-left: 0; flex-direction: row; width: 100%; }
  .hero-act .btn { flex: 1; }
  .post-stats { min-width: 46px; font-size: 11.5px; }
  .post-item { padding: 12px 10px; gap: 9px; }
  .post-title { font-size: 15px; }
  .post-face .avatar { --size: 34px !important; }
  .pd-title { font-size: 19px; }
  .post-detail, .comments, .prose { padding: 16px 15px; }
  .pd-meta { gap: 10px; }
  .pd-stats { margin-left: 0; width: 100%; }
  .pd-actions .act span { display: none; }
  .pd-actions .act { padding: 7px 12px; }
  .cat-grid, .user-grid { grid-template-columns: 1fr; padding-left: 10px; padding-right: 10px; }
  .profile { padding: 16px; }
  .pf-edit { position: static; margin-top: 10px; }
  .pf-stats { grid-template-columns: repeat(4, 1fr); width: 100%; }
  .checkin-hero { flex-direction: column; align-items: stretch; }
  .ck-right { grid-template-columns: repeat(4, 1fr); }
  .ck-right .ck-stat b { font-size: 16px; }
  .site-footer { margin-bottom: 0; }
  .mobile-nav {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
    background: color-mix(in srgb, var(--card) 94%, transparent);
    backdrop-filter: saturate(150%) blur(12px);
    border-top: 1px solid var(--border);
    padding: 6px 0 calc(6px + env(safe-area-inset-bottom));
    align-items: center;
  }
  .toast-host { bottom: 88px; }
  .pg-info { display: none; }
  .admin-table .title-cell { max-width: 200px; }
  .notif .nf-head time { margin-left: 0; width: 100%; }
  .footer-bar { flex-direction: column; align-items: flex-start; gap: 6px; }
}
@media (max-width: 420px) {
  .seg a { padding: 4px 10px; font-size: 12.5px; }
  .toolbar-count { width: 100%; margin-left: 0; }
}

/* ── 私信（会话列表 + 对话）────────────────────────────────── */
.msg-unread-num {
  display: inline-block; min-width: 20px; padding: 0 6px; margin-left: 6px; border-radius: 10px;
  background: var(--err); color: #fff; font-size: 12px; font-weight: 700; line-height: 19px; text-align: center;
}
.msg-new { display: flex; gap: 8px; padding: 0 16px 14px; }
.msg-new input {
  flex: 1; height: 34px; padding: 0 12px; border: 1px solid var(--border); border-radius: 9px;
  background: var(--bg); font-size: 13.5px; outline: none;
}
.msg-new input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); background: var(--card); }
.pf-pm { display: inline-flex; align-items: center; gap: 6px; }

.conv-list { border-top: 1px solid var(--border); }
.conv {
  display: flex; align-items: center; gap: 11px; padding: 11px 16px;
  border-bottom: 1px solid var(--border); color: inherit;
}
.conv:last-child { border-bottom: 0; }
.conv:hover { background: var(--bg-soft); }
.conv.is-unread { background: color-mix(in srgb, var(--accent-soft) 45%, transparent); }
.conv-main { flex: 1; min-width: 0; }
.conv-head { display: flex; align-items: center; gap: 7px; }
.conv-head b { font-size: 14px; }
.conv-head time { margin-left: auto; font-size: 12px; }
.conv-preview {
  margin-top: 3px; font-size: 13px; color: var(--muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.conv-me { color: var(--muted); opacity: .85; }
.conv-badge {
  flex: none; min-width: 20px; height: 20px; padding: 0 6px; display: grid; place-items: center;
  border-radius: 10px; background: var(--err); color: #fff; font-size: 11.5px; font-weight: 700;
}

/* 对话页头部 */
.msg-head-card { margin-bottom: 12px; }
.msg-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; }
.msg-head-face { flex: none; }
.msg-head-main { flex: 1; min-width: 0; }
.msg-head-name { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; }
.msg-head-name a { color: inherit; }

/* 气泡列表：同侧连续消息合成一组（组内紧凑，组间宽松） */
.msg-card { padding-bottom: 16px; }
/* 分页条：查看更早消息 / 回到最新 */
.msg-pager { display: flex; align-items: center; justify-content: center; gap: 14px; }
.msg-pager span { font-variant-numeric: tabular-nums; }
.msg-list { display: flex; flex-direction: column; padding: 18px 16px 6px; }
.msg-row { display: flex; align-items: flex-start; gap: 9px; margin-top: 20px; }
.msg-row.same { margin-top: 7px; }
.msg-row.mine { flex-direction: row-reverse; }
/* 组内续行隐藏重复头像，但保留占位让气泡对齐 */
.msg-row.same .msg-face { visibility: hidden; }
/* 组内贴合圆角 */
.msg-row.mine.same .msg-bubble { border-top-right-radius: 5px; }
.msg-row:not(.mine).same .msg-bubble { border-top-left-radius: 5px; }
/* 组内中间消息隐藏时间行，悬停该行时浮现在气泡下方（不推挤布局） */
.msg-row.same:not(.tail) .msg-body { position: relative; }
.msg-row.same:not(.tail) .msg-meta { display: none; }
.msg-row.same:not(.tail):hover .msg-meta {
  display: flex; position: absolute; top: calc(100% + 2px); z-index: 2;
  white-space: nowrap; padding: 2px 8px; border-radius: 7px; background: var(--card);
  box-shadow: var(--shadow-sm); border: 1px solid var(--border);
}
.msg-row.mine.same:not(.tail):hover .msg-meta { right: 0; }
.msg-face { flex: none; }
.msg-body { max-width: min(78%, 620px); }
.msg-row.mine .msg-body { display: flex; flex-direction: column; align-items: flex-end; }
.msg-bubble {
  padding: 10px 14px; border-radius: 14px; background: var(--bg-soft); font-size: 14px;
  line-height: 1.65; word-break: break-word; white-space: normal;
}
.msg-row.mine .msg-bubble { background: var(--accent); color: #fff; }
.msg-row.mine .msg-bubble .md-link { color: #fff; border-bottom-color: rgba(255,255,255,.55); }
.msg-row.mine .msg-bubble a { text-decoration: underline; }
.msg-meta { display: flex; align-items: center; gap: 9px; margin-top: 4px; font-size: 11.5px; color: var(--muted); }
.msg-state { color: var(--accent-text); }
.msg-del {
  border: 0; background: none; padding: 0; font-size: 11.5px; color: var(--muted);
  cursor: pointer; opacity: 0; transition: opacity .15s;
}
.msg-row:hover .msg-del { opacity: 1; }
.msg-del:hover { color: var(--err); }

/* 发送表单 */
.msg-form { margin: 12px 16px 0; padding-top: 14px; border-top: 1px solid var(--border); }
.msg-form textarea {
  width: 100%; padding: 11px 13px; border: 1px solid var(--border); border-radius: 10px;
  background: var(--bg); outline: none; resize: vertical; line-height: 1.6; font-size: 14px;
  font-family: inherit; color: var(--text);
}
.msg-form textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); background: var(--card); }
.msg-form-foot { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.msg-form-foot .btn { margin-left: auto; }

/* 工具栏（表情 / 图片） */
.msg-toolbar { display: flex; align-items: center; gap: 8px; margin-top: 9px; }
.msg-tool {
  display: inline-flex; align-items: center; gap: 4px; padding: 4px 11px;
  border: 1px solid var(--border); border-radius: 999px; background: var(--card);
  font-size: 12.5px; color: var(--text-soft); cursor: pointer; transition: all .15s;
}
.msg-tool:hover, .msg-tool.is-active { border-color: var(--accent); color: var(--accent-text); background: var(--accent-soft); }
.msg-tool:disabled { opacity: .55; cursor: wait; }
.msg-tool-hint { margin-left: auto; }

/* 表情面板 */
.emoji-panel {
  display: grid; grid-template-columns: repeat(10, 1fr); gap: 2px;
  margin-top: 9px; padding: 8px; border: 1px solid var(--border);
  border-radius: 10px; background: var(--bg-soft);
}
.emoji-panel[hidden] { display: none; }
.emoji-item {
  border: 0; background: none; font-size: 19px; line-height: 1;
  padding: 5px 0; border-radius: 7px; cursor: pointer;
}
.emoji-item:hover { background: var(--accent-soft); transform: scale(1.18); }

/* 私信图片 */
.msg-img {
  display: block; max-width: min(320px, 100%); max-height: 280px;
  border-radius: 9px; margin: 4px 0 2px; cursor: zoom-in; background: var(--bg);
}

@media (max-width: 720px) {
  .msg-list { padding: 14px 12px 4px; }
  .msg-body { max-width: 84%; }
  .msg-form { margin: 12px 12px 0; }
  .msg-del { opacity: 1; }
  .msg-head .btn { display: none; }
  .emoji-panel { grid-template-columns: repeat(8, 1fr); }
  .msg-tool-hint { display: none; }
}

/* 打印 */
@media print {
  .site-header, .site-footer, .mobile-nav, .sidebar, .pd-actions, .cm-form, .toast-host { display: none !important; }
  .main-grid { grid-template-columns: 1fr; }
  .card { border: 0; box-shadow: none; }
}

/* 减少动效偏好 */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
}
