/* ?????? � ?? UI */
@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;500;600;700&display=swap");

:root {
  --bg: #f4f7f6;
  --bg-elevated: #ecf4f2;
  --surface: #ffffff;
  --ink: #0f172a;
  --ink2: #475569;
  --ink3: #94a3b8;
  --ink4: #cbd5e1;
  --line: #e2e8f0;
  --line2: #cbd5e1;
  --primary: #0d9488;
  --primary-hover: #0f766e;
  --primary-bg: #f0fdfa;
  --accent: #0d9488;
  --accent-hover: #0f766e;
  --accent-bg: #f0fdfa;
  --success: #52c41a;
  --warning: #faad14;
  --error: #ff4d4f;
  --radius: 14px;
  --radius-lg: 18px;
  --shadow: 0 8px 24px rgba(15, 23, 42, .04);
  --shadow-hover: 0 12px 28px rgba(13, 148, 136, .1);
  --font: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --header-h: 56px;
  --container: 1080px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--accent-hover); }
img { max-width: 100%; display: block; }
ul, ol { list-style: none; }
button, input, select, textarea { font-family: inherit; }
.container { width: min(var(--container), calc(100% - 32px)); margin: 0 auto; }

/* ========== Header � ???? ========== */
.site-header {
  position: sticky; top: 0; z-index: 100;
  height: var(--header-h);
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; height: var(--header-h); gap: 20px;
  position: relative;
}
.logo {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 18px; font-weight: 700; color: var(--ink); white-space: nowrap;
  flex-shrink: 0;
}
.logo:hover { color: var(--ink); }
.logo-mark {
  width: 28px; height: 28px; border-radius: 6px;
  background: var(--primary); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
}
img.logo-mark.logo-img {
  display: block;
  object-fit: contain;
  background: transparent;
  padding: 0;
  box-shadow: none;
}
.nav {
  display: flex; align-items: center; gap: 0; flex: 1; min-width: 0;
  height: 100%;
}
.nav a {
  position: relative;
  height: 100%;
  display: inline-flex; align-items: center;
  padding: 0 16px;
  color: var(--ink2); font-size: 15px; font-weight: 500; white-space: nowrap;
}
.nav a:hover { color: var(--ink); }
.nav a.active {
  color: var(--primary); font-weight: 600;
}
.nav a.active::after {
  content: "";
  position: absolute; left: 16px; right: 16px; bottom: 0;
  height: 3px; background: var(--primary); border-radius: 2px 2px 0 0;
}
.header-search {
  display: flex; align-items: center;
  height: 34px; margin-left: auto;
  background: var(--bg); border: 1px solid transparent;
  border-radius: 17px; overflow: hidden;
  width: min(200px, 24vw); flex-shrink: 1;
}
.header-search input {
  flex: 1; min-width: 0; height: 100%; border: 0; background: transparent;
  padding: 0 12px; font-size: 13px; color: var(--ink); outline: none;
}
.header-search button {
  width: 34px; height: 100%; border: 0; background: transparent;
  color: var(--ink3); cursor: pointer; font-size: 14px;
}
.header-search:focus-within { background: #fff; border-color: #99f6e4; }
.header-actions {
  display: flex; align-items: center; gap: 8px; margin-left: 4px; flex-shrink: 0;
}
.header-actions .btn-ghost,
.header-actions .btn-primary { cursor: pointer; }
.header-av {
  width: 28px; height: 28px; border-radius: 50%; object-fit: cover;
}
.user-menu {
  display: flex; align-items: center; gap: 12px;
  font-size: 13px; color: var(--ink2);
}
.user-menu a { color: var(--ink2); }
.user-menu a:hover { color: var(--primary); }
.user-name { color: var(--ink); font-weight: 500; max-width: 80px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.badge-vip {
  display: inline-block; padding: 0 6px; height: 18px; line-height: 18px;
  border-radius: 3px; background: var(--primary-bg); color: var(--primary);
  font-size: 11px; font-weight: 700;
}
.badge-novip { color: var(--primary); font-size: 13px; font-weight: 500; }
.nav-toggle {
  display: none; width: 34px; height: 34px; border: 1px solid var(--line2);
  border-radius: 6px; background: #fff; cursor: pointer;
  align-items: center; justify-content: center; font-size: 16px; color: var(--ink2);
}

/* ========== Buttons ========== */
.btn-primary, .btn-outline, .btn-ghost, .btn-block, .btn-side {
  display: inline-flex; align-items: center; justify-content: center;
  height: 36px; padding: 0 16px; border-radius: 999px;
  font-size: 14px; font-weight: 500;
  border: 1px solid transparent; cursor: pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease, transform .15s ease;
  white-space: nowrap;
}
.btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); color: #fff; }
.btn-outline { background: #fff; color: var(--ink); border-color: var(--line2); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-ghost { background: transparent; color: var(--ink2); border-color: var(--line2); }
.btn-ghost:hover { color: var(--ink); border-color: var(--ink3); }
.btn-block { width: 100%; }
.btn-lg { height: 42px; padding: 0 22px; font-size: 15px; }
.btn-side { width: 100%; height: 36px; background: var(--primary); color: #fff; margin-top: 8px; border-radius: 6px; }
.btn-side.ghost { background: #fff; color: var(--ink); border-color: var(--line2); }

/* ========== Toast 提示框 ========== */
.toast-wrap {
  position: fixed;
  top: calc(var(--header-h, 56px) + 16px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 1200;
  width: min(420px, calc(100% - 24px));
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, .08);
  box-shadow: 0 12px 40px rgba(15, 23, 42, .14);
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink);
  animation: toastIn .28s ease both;
}
.toast-icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  margin-top: 1px;
}
.toast-msg { flex: 1; min-width: 0; padding-top: 1px; }
.toast-x {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  margin: -4px -6px -4px 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink3);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.toast-x:hover { background: var(--bg); color: var(--ink); }
.toast-success .toast-icon { background: #16a34a; }
.toast-success { border-color: #bbf7d0; }
.toast-error .toast-icon { background: #dc2626; }
.toast-error { border-color: #fecaca; }
.toast-info .toast-icon { background: #0d9488; }
.toast-info { border-color: #99f6e4; }
.toast.is-out {
  animation: toastOut .25s ease both;
}
@keyframes toastIn {
  from { opacity: 0; transform: translateY(-12px) scale(.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes toastOut {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to { opacity: 0; transform: translateY(-8px) scale(.96); }
}

.main { padding: 16px 0 56px; min-height: calc(100vh - var(--header-h) - 80px); }
.alert {
  padding: 10px 14px; border-radius: var(--radius); font-size: 13px;
  background: #fffbe6; border: 1px solid #ffe58f; color: #ad6800;
}

/* ========== Layout � ?? + ?? ========== */
.home,
.page-layout,
.forum-layout,
.community-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 16px;
  align-items: start;
}
.home-main,
.page-main,
.forum-main { min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.home-side,
.page-side,
.forum-side {
  display: flex; flex-direction: column; gap: 12px; min-width: 0;
}

.panel {
  background: var(--surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid rgba(15, 23, 42, .06);
}
.panel-hd {
  display: flex; align-items: center; justify-content: space-between;
  height: 50px; padding: 0 16px;
  border-bottom: 1px solid var(--line);
}
.panel-hd h2 {
  margin: 0; font-size: 15px; font-weight: 600; color: var(--ink);
}
.panel-hd a.btn-primary,
.panel-hd button.btn-primary { height: 30px; padding: 0 12px; font-size: 13px; }

/* Tabs � ?????? */
.circle-tabs {
  display: flex; flex-wrap: nowrap; gap: 4px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  background: #fff;
}
.circle-tabs::-webkit-scrollbar { display: none; }
.circle-tabs a {
  flex-shrink: 0;
  padding: 6px 14px; font-size: 13px; color: var(--ink2);
  font-weight: 500; border-radius: 14px;
  background: transparent;
}
.circle-tabs a:hover { color: var(--ink); background: var(--bg); }
.circle-tabs a.on {
  color: #fff; background: linear-gradient(135deg, #0d9488, #0891b2); font-weight: 600;
}
.circle-tabs a.on::after { display: none; }

/* ========== Feed � ??????? ========== */
.list { background: transparent; display: flex; flex-direction: column; gap: 10px; }
.feed-panel .list { padding: 0; background: transparent; }
.feed-panel > .panel-hd,
.feed-panel > .circle-tabs { background: #fff; }
.feed-panel { background: transparent; box-shadow: none; overflow: visible; }
.feed-panel > .panel-hd {
  background: #fff; border-radius: var(--radius) var(--radius) 0 0; box-shadow: var(--shadow);
  border-bottom: none;
}
.feed-panel > .circle-tabs {
  border-radius: 0; box-shadow: var(--shadow); margin-bottom: 0;
  border-bottom: none;
}
.feed-panel > .circle-tabs + .list,
.feed-panel > .panel-hd + .list { margin-top: 10px; }

.sc-feed { display: flex; flex-direction: column; gap: 10px; }

.list-item,
.sc-post {
  display: block;
  padding: 16px 18px;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  color: inherit;
  transition: box-shadow .15s ease;
}
.list-item:hover,
.sc-post:hover {
  color: inherit;
  box-shadow: var(--shadow-hover);
}
.list-item { display: flex; gap: 12px; align-items: flex-start; border-bottom: none; }
.list-item:last-child { border-bottom: none; }

.sc-post-hd {
  display: flex; align-items: center; gap: 10px; margin-bottom: 10px;
}
.sc-post-av,
img.sc-post-av,
.list-av,
img.list-av {
  width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
  background: var(--bg); color: var(--ink2);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600; object-fit: cover;
}
.sc-post-meta { min-width: 0; flex: 1; }
.sc-post-name {
  font-size: 13px; font-weight: 600; color: var(--ink); line-height: 1.3;
}
.sc-post-time {
  font-size: 12px; color: var(--ink3); margin-top: 2px;
}
.sc-post-title,
.list-title {
  font-size: 17px; font-weight: 600; color: var(--ink); line-height: 1.45;
  margin: 0 0 8px; letter-spacing: -.01em;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.sc-post:hover .sc-post-title,
.list-item:hover .list-title { color: var(--primary); }
.sc-post-desc,
.list-desc {
  font-size: 14px; color: var(--ink2); line-height: 1.7;
  margin: 0 0 12px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.sc-post-ft,
.list-bottom {
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px;
  font-size: 12px; color: var(--ink3);
}
.list-main { flex: 1; min-width: 0; }
.list-top {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px;
  margin-bottom: 4px; font-size: 12px; color: var(--ink3);
}
.list-top .name { color: var(--ink2); font-weight: 500; }
.list-bottom .meta-name { color: var(--ink2); font-weight: 500; }
.list-item-compact { align-items: flex-start; }
.list-item-compact .list-title {
  white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}

.tag {
  display: inline-flex; align-items: center; height: 20px; padding: 0 7px;
  border-radius: 3px; font-size: 11px; line-height: 20px; font-weight: 500;
  background: var(--bg); color: var(--ink2);
}
.tag-blue { background: #e6f4ff; color: #1677ff; }
.tag-red { background: #fff2f0; color: #cf1322; }
.tag-gold { background: var(--primary-bg); color: var(--primary); }
.tag-vip { background: var(--primary-bg); color: var(--primary); padding: 0 7px; border-radius: 3px; font-size: 11px; }

.empty {
  text-align: center; padding: 64px 16px;
  color: var(--ink3); font-size: 14px;
  background: #fff; border-radius: var(--radius);
}

/* Side */
.side-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(15, 23, 42, .06);
}
.side-card h3 {
  font-size: 14px; font-weight: 600; color: var(--ink);
  margin-bottom: 12px;
}
.side-user {
  display: flex; align-items: center; gap: 10px; margin-bottom: 14px;
}
.side-user .av,
.side-user img.av {
  width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0;
  background: var(--bg); color: var(--ink2);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 600; object-fit: cover;
}
.side-user .nm { font-size: 15px; font-weight: 600; color: var(--ink); }
.side-user .st { font-size: 12px; color: var(--ink3); margin-top: 2px; }
.side-text { font-size: 13px; color: var(--ink2); line-height: 1.65; margin-bottom: 14px; }
.side-actions { display: flex; gap: 8px; }
.side-actions .btn-primary,
.side-actions .btn-outline,
.side-actions .btn-ghost { flex: 1; }
.stat-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
}
.stat-row > div {
  text-align: center; padding: 10px 0;
  background: var(--bg); border-radius: 6px;
}
.stat-row b {
  display: block; font-size: 17px; font-weight: 700; color: var(--ink);
}
.stat-row span { font-size: 11px; color: var(--ink3); }
.link-list a {
  display: flex; justify-content: space-between; align-items: center;
  padding: 9px 0; color: var(--ink2); font-size: 13px;
  border-bottom: 1px solid var(--line);
}
.link-list li:last-child a { border-bottom: none; }
.link-list a:hover { color: var(--primary); }
.link-list .cnt { color: var(--ink4); font-size: 12px; }

.vip-box-side {
  background: linear-gradient(145deg, #115e59, #0d9488);
  border-radius: var(--radius-lg); padding: 18px; color: #fff;
  box-shadow: 0 10px 28px rgba(13, 148, 136, .22);
}
.vip-box-side h3 { color: #fff; font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.vip-box-side .price { font-size: 26px; font-weight: 700; line-height: 1.2; margin-bottom: 6px; }
.vip-box-side .price small { font-size: 13px; font-weight: 400; opacity: .85; }
.vip-box-side p { font-size: 12px; opacity: .9; margin-bottom: 14px; line-height: 1.55; }
.vip-box-side a {
  display: flex; align-items: center; justify-content: center;
  height: 34px; background: #fff; color: var(--primary);
  border-radius: 6px; font-size: 14px; font-weight: 600;
}
.vip-box-side a:hover { color: var(--primary); opacity: .95; }

/* VIP gate */
.vip-gate {
  margin: 20px 16px 24px;
  padding: 36px 20px;
  text-align: center;
  background: var(--bg);
  border-radius: var(--radius);
}
.vip-gate-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 8px;
  background: var(--primary-bg); color: var(--primary); font-size: 12px; font-weight: 700;
  margin-bottom: 14px;
}
.vip-gate h3 { font-size: 17px; font-weight: 700; color: var(--ink); margin-bottom: 8px; }
.vip-gate p {
  font-size: 13px; color: var(--ink3); line-height: 1.65;
  margin: 0 auto 18px; max-width: 320px;
}
.vip-gate-stats {
  display: flex; justify-content: center; gap: 28px;
  margin: 0 auto 18px; flex-wrap: wrap;
}
.vip-gate-stat b { display: block; font-size: 20px; font-weight: 700; color: var(--ink); }
.vip-gate-stat span { font-size: 12px; color: var(--ink3); }
.vip-gate-only {
  display: inline-flex; align-items: center;
  height: 28px; padding: 0 12px; margin-bottom: 16px;
  border-radius: 999px; font-size: 13px; font-weight: 700;
  background: var(--primary-bg); color: var(--primary);
}
.vip-gate-price { display: none; }
.vip-gate-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.article .vip-gate { margin: 24px 0 0; }
.reply-divider {
  padding: 10px 16px; background: var(--bg);
  color: var(--ink3); font-size: 12px; font-weight: 500;
}
.reply-box { margin-top: 12px; }
.reply-box-body { padding: 16px; }
.topic-detail-meta { display: flex; flex-wrap: wrap; gap: 8px 14px; font-size: 13px; color: var(--ink3); }
.topic-detail-meta .meta-author { color: var(--ink2); font-weight: 500; }
.panel-desc {
  padding: 12px 16px; color: var(--ink3); font-size: 13px; line-height: 1.65;
  border-bottom: 1px solid var(--line);
}
.article-cover {
  width: 100%; max-height: 260px; object-fit: cover; margin-bottom: 16px; border-radius: 6px;
}
.side-list li {
  padding: 8px 0; border-bottom: 1px solid var(--line);
  font-size: 13px; display: flex; justify-content: space-between; gap: 8px; align-items: center;
}
.side-list li:last-child { border-bottom: none; }
.side-list a {
  color: var(--ink2); flex: 1; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.side-list a:hover { color: var(--primary); }
.side-meta { color: var(--ink3); font-size: 12px; flex-shrink: 0; }

.crumb { font-size: 13px; color: var(--ink3); margin-bottom: 0; }
.crumb a { color: var(--ink2); }
.crumb span { margin: 0 6px; color: var(--ink4); }

.forum-box, .box, .sec, .panel-box, .sq-feed {
  background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
}
.forum-box-hd, .box-hd, .sec-hd, .page-hero, .feed-head, .sq-label {
  display: flex; align-items: center; justify-content: space-between;
  height: 50px; padding: 0 16px; border-bottom: 1px solid var(--line);
  font-size: 15px; font-weight: 600;
}
.topic-row, .sq-row, .topic-item {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px 16px; border-bottom: 1px solid var(--line); color: inherit;
}
.topic-row:hover, .sq-row:hover { background: var(--bg-elevated); }
.topic-main { flex: 1; min-width: 0; }
.topic-title { font-size: 15px; font-weight: 600; color: var(--ink); }
.topic-meta { font-size: 12px; color: var(--ink3); margin-top: 6px; display: flex; gap: 12px; }
.topic-board, .mark-top, .mark-ess, .mark-vip {
  display: inline-flex; align-items: center; height: 20px; padding: 0 6px;
  border-radius: 3px; font-size: 11px; font-weight: 500;
  background: var(--bg); color: var(--ink2); margin-right: 4px;
}
.mark-top { background: #fff2f0; color: #cf1322; }
.mark-ess, .mark-vip { background: var(--primary-bg); color: var(--primary); }
.topic-board { background: #e6f4ff; color: #1677ff; }
.hero-strip, .circles, .composer, .fc-chips { display: none !important; }

.topic-detail-hd { padding: 20px 16px 16px; border-bottom: 1px solid var(--line); }
.topic-detail-hd h1 {
  font-size: 20px; font-weight: 700; line-height: 1.4; margin-bottom: 10px;
  word-break: break-word;
}
.post-item {
  display: flex; gap: 12px; padding: 18px 16px;
  border-bottom: 1px solid var(--line); background: #fff;
}
.post-user { text-align: left; min-width: 48px; flex-shrink: 0; }
.post-user .avatar, .avatar,
.post-user img.avatar, img.avatar {
  width: 40px; height: 40px; border-radius: 50%; margin: 0 0 6px;
  background: var(--bg); color: var(--ink2);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 14px; object-fit: cover;
}
.uname { font-size: 13px; font-weight: 600; }
.urole { font-size: 11px; color: var(--ink3); margin-top: 2px; }
.post-content { font-size: 15px; line-height: 1.8; color: var(--ink); flex: 1; min-width: 0; word-break: break-word; }
.post-content p { margin-bottom: 12px; }
.post-foot { margin-top: 12px; font-size: 12px; color: var(--ink3); }
.post-body { flex: 1; min-width: 0; }

.article {
  background: #fff; border-radius: var(--radius); padding: 24px 20px; box-shadow: var(--shadow);
}
.article h1 {
  font-size: 22px; font-weight: 700; margin-bottom: 10px;
  word-break: break-word; line-height: 1.35;
}
.article-meta { color: var(--ink3); font-size: 13px; margin-bottom: 20px; }
.article-body { font-size: 15px; line-height: 1.85; word-break: break-word; color: var(--ink); }
.article-body p { margin-bottom: 12px; }

/* Auth */
.auth-wrap { display: flex; justify-content: center; padding: 40px 0; }
.auth-card {
  width: min(400px, 100%); background: #fff; border-radius: var(--radius-lg);
  padding: 32px 28px; box-shadow: var(--shadow);
}
.auth-card h1 { font-size: 20px; font-weight: 700; margin-bottom: 4px; }
.auth-card .sub { color: var(--ink3); margin-bottom: 24px; font-size: 14px; }
.auth-modal {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.auth-modal[hidden] { display: none !important; }
.auth-modal-mask { position: absolute; inset: 0; background: rgba(0,0,0,.4); }
.auth-modal-panel {
  position: relative; z-index: 1;
  width: min(400px, 100%); background: #fff;
  border-radius: 12px; padding: 28px 24px 32px;
  box-shadow: 0 12px 40px rgba(0,0,0,.15);
  animation: modalIn .2s ease;
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.auth-modal-x {
  position: absolute; top: 10px; right: 10px;
  width: 32px; height: 32px; border: 0; background: transparent;
  font-size: 22px; color: var(--ink3); cursor: pointer; border-radius: 6px;
}
.auth-modal-x:hover { color: var(--ink); background: var(--bg); }
.auth-tabs {
  display: flex; gap: 20px; margin-bottom: 24px;
  border-bottom: 1px solid var(--line);
}
.auth-tab {
  position: relative; padding: 0 0 12px; border: 0; background: none;
  font-size: 16px; font-weight: 500; color: var(--ink3); cursor: pointer;
}
.auth-tab.on { color: var(--ink); font-weight: 600; }
.auth-tab.on::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px;
  height: 2px; background: var(--primary);
}
.auth-form-error {
  color: var(--error); font-size: 13px; margin-bottom: 12px;
  padding: 8px 12px; background: #fff2f0; border-radius: 6px;
}
.search-bar {
  display: flex; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--line);
}
.search-bar input {
  flex: 1; height: 36px; padding: 0 12px; border: 1px solid var(--line2);
  border-radius: 18px; font-size: 14px; background: var(--bg);
}
.search-bar input:focus { outline: none; border-color: #ffc299; background: #fff; }

/* User */
.user-page { max-width: var(--container); }
.user-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 16px; align-items: start;
}
.user-nav { padding: 0; overflow: hidden; }
.user-nav-profile {
  display: flex; align-items: center; gap: 10px;
  padding: 18px 14px; border-bottom: 1px solid var(--line);
}
.user-nav-av {
  width: 48px; height: 48px; border-radius: 50%; overflow: hidden; flex-shrink: 0;
  background: var(--bg); color: var(--ink2);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 600;
}
.user-nav-av img { width: 100%; height: 100%; object-fit: cover; }
.user-nav-name { font-size: 14px; font-weight: 600; color: var(--ink); }
.user-nav-phone { font-size: 12px; color: var(--ink3); margin: 2px 0 4px; }
.user-nav-links { padding: 8px; display: flex; flex-direction: column; gap: 2px; }
.user-nav-links a {
  display: block; padding: 9px 12px; border-radius: 6px;
  color: var(--ink2); font-size: 14px;
}
.user-nav-links a:hover { background: var(--bg); color: var(--ink); }
.user-nav-links a.active { background: var(--primary-bg); color: var(--primary); font-weight: 600; }
.user-content { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.user-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.user-stat {
  background: var(--surface); border-radius: var(--radius);
  padding: 16px 10px; text-align: center; box-shadow: var(--shadow);
}
.user-stat b { display: block; font-size: 17px; font-weight: 700; color: var(--ink); word-break: break-all; }
.user-stat span { font-size: 12px; color: var(--ink3); }
.user-panel-body { padding: 20px; }
.user-form { max-width: 420px; }
.form-ok {
  padding: 8px 12px; margin-bottom: 14px; border-radius: 6px;
  background: #f6ffed; border: 1px solid #b7eb8f; color: #389e0d; font-size: 14px;
}
.form-help { font-size: 12px; color: var(--ink3); margin-top: 6px; }
.avatar-edit { display: flex; align-items: center; gap: 14px; }
.avatar-preview {
  width: 68px; height: 68px; border-radius: 50%; overflow: hidden;
  background: var(--bg); color: var(--ink2);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 600; flex-shrink: 0;
}
.avatar-preview img { width: 100%; height: 100%; object-fit: cover; }
.avatar-upload-btn {
  display: inline-flex; cursor: pointer; height: 30px; padding: 0 12px;
  align-items: center; margin: 0;
}
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; color: var(--ink2); margin-bottom: 6px; font-weight: 500; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; height: 40px; padding: 0 12px; border-radius: 6px;
  border: 1px solid var(--line2); background: #fff; font-size: 14px; color: var(--ink);
}
.form-group textarea { height: auto; min-height: 110px; padding: 10px 12px; }
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
  outline: none; border-color: #ffc299;
}
.form-group input:disabled { background: var(--bg); color: var(--ink3); }
.form-error { color: var(--error); font-size: 14px; margin-bottom: 12px; }
.auth-foot { text-align: center; margin-top: 14px; color: var(--ink3); font-size: 14px; }

.vip-box { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.vip-panel {
  background: #fff; border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow);
}
.vip-panel h1 { font-size: 20px; font-weight: 700; margin-bottom: 6px; }
.vip-price { font-size: 32px; font-weight: 700; color: var(--primary); margin: 16px 0 6px; line-height: 1; }
.vip-price small { font-size: 14px; color: var(--ink3); font-weight: 400; }
.vip-features { margin: 14px 0; }
.vip-features li {
  padding: 10px 0; border-bottom: 1px solid var(--line);
  color: var(--ink2); font-size: 14px;
}
.vip-features li::before { content: "? "; color: var(--primary); font-weight: 700; }
.pay-types { display: flex; gap: 8px; margin: 14px 0; }
.pay-type {
  flex: 1; height: 40px; display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line2); border-radius: 6px; cursor: pointer;
  background: #fff; font-size: 14px; font-weight: 500;
}
.pay-type.active { border-color: var(--primary); color: var(--primary); background: var(--primary-bg); }
.vip-status {
  padding: 10px 12px; background: #f6ffed; border: 1px solid #b7eb8f;
  color: #389e0d; border-radius: 6px; margin-bottom: 14px; font-size: 14px;
}

.stat { background: var(--bg); border-radius: 6px; padding: 12px; text-align: center; }
.stat .n { font-size: 16px; font-weight: 600; }
.stat .l { font-size: 12px; color: var(--ink3); }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th, .table td { padding: 12px 8px; text-align: left; border-bottom: 1px solid var(--line); }
.table th { color: var(--ink3); font-weight: 500; }
.table-wrap { overflow-x: auto; }

.pagination { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 16px; }
.pagination a, .pagination span {
  min-width: 34px; height: 34px; padding: 0 8px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line2); border-radius: 6px;
  background: #fff; font-size: 13px; color: var(--ink2);
}
.pagination .current {
  background: var(--primary); border-color: var(--primary); color: #fff;
}

.filters { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: #fff; }
.filter-chip {
  height: 28px; padding: 0 12px; border-radius: 14px; border: none;
  font-size: 12px; color: var(--ink2); background: var(--bg); line-height: 28px; font-weight: 500;
}
.filter-chip.active, .filter-chip:hover {
  color: var(--primary); background: var(--primary-bg);
}

/* Footer */
.site-footer {
  background: #fff; border-top: 1px solid var(--line);
  padding: 24px 0; color: var(--ink3); font-size: 13px;
}
.footer-inner, .footer-grid {
  width: min(var(--container), calc(100% - 32px)); margin: 0 auto;
  display: flex; flex-wrap: wrap; gap: 8px 20px;
  align-items: center; justify-content: space-between;
}
.footer-brand { color: var(--ink); font-weight: 600; }
.footer-links, .footer-col { display: flex; flex-wrap: wrap; gap: 14px; }
.footer-col h4, .footer-desc { display: none; }
.footer-links a, .footer-col a { color: var(--ink3); }
.footer-links a:hover, .footer-col a:hover { color: var(--primary); }
.footer-copy { width: 100%; font-size: 12px; color: var(--ink4); }
.footer-copy a { color: var(--ink4); }

@media (max-width: 900px) {
  .home, .page-layout, .forum-layout, .community-layout { grid-template-columns: 1fr; gap: 12px; }
  .home-main, .page-main, .forum-main { order: 1; }
  .home-side, .page-side, .forum-side { order: 2; }
  .vip-box { grid-template-columns: 1fr; }
  .user-layout { grid-template-columns: 1fr; }
  .user-nav-links { flex-direction: row; flex-wrap: wrap; gap: 4px; padding: 8px 12px 12px; }
  .user-nav-links a { padding: 6px 12px; }
  .header-actions { margin-left: auto; }
  .nav {
    display: none; position: fixed; top: var(--header-h); left: 0; right: 0;
    width: 100%; background: #fff; flex-direction: column; align-items: stretch;
    padding: 8px; gap: 2px; border-bottom: 1px solid var(--line); z-index: 200;
    height: auto; flex: none;
  }
  .nav.open { display: flex; }
  .nav a { height: auto; padding: 12px 14px; }
  .nav a.active::after { display: none; }
  .nav-toggle { display: inline-flex; }
  .user-menu { display: none; }
  .header-actions .btn-ghost { display: none; }
  .header-search { width: 110px; }
}

@media (max-width: 640px) {
  .container { width: calc(100% - 20px); }
  .main { padding: 12px 0 40px; }
  .header-inner { gap: 10px; }
  .logo { font-size: 16px; }
  .panel-hd { height: 46px; padding: 0 12px; }
  .list-item, .sc-post { padding: 14px; }
  .sc-post-title, .list-title { font-size: 16px; }
  .list-av, img.list-av, .sc-post-av, img.sc-post-av { width: 32px; height: 32px; }
  .side-card { padding: 14px; }
  /* 小屏仍保留侧栏内容，仅取消粘滞 */
  .home-side, .page-side, .forum-side { position: static; }
  .topic-detail-hd { padding: 16px 14px; }
  .topic-detail-hd h1 { font-size: 18px; }
  .post-item { padding: 14px; flex-direction: column; gap: 10px; }
  .post-user { display: flex; align-items: center; gap: 10px; }
  .post-user .avatar { margin: 0; width: 32px; height: 32px; }
  .urole { display: none; }
  .article { padding: 16px 14px; }
  .article h1 { font-size: 18px; }
  .vip-gate { margin: 14px; padding: 24px 14px; }
  .user-stats { grid-template-columns: 1fr; }
  .user-panel-body { padding: 14px; }
  .auth-modal-panel { padding: 24px 18px 28px; }
  .header-search { display: none; }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 10px; }
}
