/* ==========================================================================
   词曲效果分享论坛 · v2 全站样式
   设计参考：GitHub discourse/discourse-air（现代扁平、圆角卡片、浅色 + 深色）
   全部本地化，无外部 CDN，无外链字体与图片
   ========================================================================== */

:root {
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", "Source Han Sans SC", sans-serif;
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 20px;
  --max: 1180px;
  --speed: .18s;
}

html[data-theme="light"] {
  --bg: #f4f5f7;
  --bg-soft: #eceef2;
  --surface: #ffffff;
  --surface-2: #f8f9fb;
  --surface-3: #eef0f4;
  --border: #e3e6ec;
  --border-strong: #d3d7e0;
  --text: #1c2029;
  --text-2: #495064;
  --muted: #7b8397;
  --accent: #4f46e5;
  --accent-2: #6366f1;
  --accent-soft: #ecebff;
  --accent-text: #4338ca;
  --ok: #1a9e6f;
  --ok-soft: #e3f7ef;
  --warn: #b7791f;
  --warn-soft: #fdf5e3;
  --danger: #dc2f45;
  --danger-soft: #fdeaed;
  --coin: #c08a17;
  --coin-soft: #fdf3d9;
  --shadow-sm: 0 1px 2px rgba(23, 28, 40, .05);
  --shadow: 0 4px 16px rgba(23, 28, 40, .07);
  --shadow-lg: 0 18px 48px rgba(23, 28, 40, .12);
  --header-bg: rgba(255, 255, 255, .88);
  color-scheme: light;
}

html[data-theme="dark"] {
  --bg: #0e1015;
  --bg-soft: #12151c;
  --surface: #171b23;
  --surface-2: #1c212b;
  --surface-3: #232936;
  --border: #272d3a;
  --border-strong: #333b4b;
  --text: #e7eaf1;
  --text-2: #b3bacb;
  --muted: #8892a6;
  --accent: #7c7cf6;
  --accent-2: #8b8bfa;
  --accent-soft: #232a48;
  --accent-text: #b3b6ff;
  --ok: #35c08c;
  --ok-soft: #16302a;
  --warn: #e0ab54;
  --warn-soft: #33291a;
  --danger: #f2607a;
  --danger-soft: #371f27;
  --coin: #e0b556;
  --coin-soft: #33291a;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow: 0 6px 20px rgba(0, 0, 0, .45);
  --shadow-lg: 0 22px 54px rgba(0, 0, 0, .55);
  --header-bg: rgba(20, 24, 31, .88);
  color-scheme: dark;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent-text); text-decoration: none; transition: color var(--speed); }
a:hover { color: var(--accent); }
img { max-width: 100%; height: auto; }
h1, h2, h3, h4, h5 { margin: 0 0 .5em; line-height: 1.3; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
small { font-size: .82rem; }
hr { border: 0; border-top: 1px solid var(--border); margin: 1.4em 0; }
code, pre { font-family: ui-monospace, SFMono-Regular, Consolas, "Courier New", monospace; }
::selection { background: var(--accent); color: #fff; }

.skip-link {
  position: absolute; left: -9999px; top: 0; padding: 10px 16px;
  background: var(--accent); color: #fff; border-radius: 0 0 var(--radius-sm) 0; z-index: 999;
}
.skip-link:focus { left: 0; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }

.muted { color: var(--muted); }
.muted-light { color: var(--muted); }
.small { font-size: .84rem; }
.nowrap { white-space: nowrap; }
.center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.flex { display: flex; }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.gap-8 { gap: 8px; }
.wrap { flex-wrap: wrap; }

/* --------------------------------------------------------------------------
   图标
   -------------------------------------------------------------------------- */
.ico { width: 20px; height: 20px; flex: 0 0 auto; display: inline-block; vertical-align: -.18em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ico-sm { width: 17px; height: 17px; stroke-width: 1.9; }
.ico-xs { width: 14px; height: 14px; stroke-width: 2; }
.ico-lg { width: 26px; height: 26px; }

/* --------------------------------------------------------------------------
   顶部导航
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: var(--header-bg);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; gap: 16px; height: 64px; }

.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); flex: 0 0 auto; }
.brand:hover { color: var(--text); }
.brand-mark {
  width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), #8b5cf6); color: #fff;
  box-shadow: 0 6px 16px rgba(79, 70, 229, .32);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: .98rem; letter-spacing: -.01em; }
.brand-text em { font-style: normal; font-size: .7rem; color: var(--muted); max-width: 210px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.header-search { position: relative; flex: 1 1 auto; max-width: 340px; }
.header-search input {
  width: 100%; height: 38px; padding: 0 14px 0 38px;
  border: 1px solid var(--border); border-radius: 999px;
  background: var(--surface-2); color: var(--text); font-size: .88rem;
  transition: border-color var(--speed), background var(--speed), box-shadow var(--speed);
}
.header-search input::placeholder { color: var(--muted); }
.header-search input:focus { outline: none; border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 4px var(--accent-soft); }
.search-ico { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); display: flex; }

.main-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav-link {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px;
  border-radius: var(--radius-sm); color: var(--text-2); font-size: .88rem; font-weight: 500;
  transition: background var(--speed), color var(--speed);
}
.nav-link:hover { background: var(--surface-3); color: var(--text); }
.nav-link.is-active { background: var(--accent-soft); color: var(--accent-text); font-weight: 600; }

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

.icon-btn {
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--border);
  background: var(--surface-2); color: var(--text-2); display: grid; place-items: center;
  cursor: pointer; transition: all var(--speed);
}
.icon-btn:hover { color: var(--accent-text); border-color: var(--accent); background: var(--accent-soft); }
.theme-moon { display: none; }
html[data-theme="dark"] .theme-sun { display: none; }
html[data-theme="dark"] .theme-moon { display: inline-flex; }

/* 用户菜单 */
.user-menu { position: relative; }
.user-trigger {
  display: inline-flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px;
  border: 1px solid var(--border); border-radius: 999px; background: var(--surface-2);
  color: var(--text); cursor: pointer; font-family: inherit; font-size: .86rem;
  transition: all var(--speed);
}
.user-trigger:hover { border-color: var(--accent); background: var(--accent-soft); }
.user-trigger-name { max-width: 96px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.user-dropdown {
  position: absolute; right: 0; top: calc(100% + 10px); min-width: 236px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); padding: 8px; display: none; z-index: 80;
}
.user-menu.is-open .user-dropdown { display: block; animation: pop .16s ease-out; }
@keyframes pop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.user-dropdown a {
  display: flex; align-items: center; gap: 9px; padding: 9px 10px; border-radius: var(--radius-xs);
  color: var(--text-2); font-size: .88rem;
}
.user-dropdown a:hover { background: var(--surface-3); color: var(--text); }
.user-dropdown a.danger { color: var(--danger); }
.user-dropdown a.danger:hover { background: var(--danger-soft); }
.dropdown-head { display: flex; align-items: center; gap: 10px; padding: 8px 10px 12px; border-bottom: 1px solid var(--border); margin-bottom: 6px; }
.dropdown-head strong { display: block; font-size: .92rem; }
.dropdown-meta { display: flex; flex-wrap: wrap; gap: 4px; }

/* 按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 40px; padding: 0 18px; border-radius: var(--radius-sm);
  border: 1px solid transparent; background: var(--surface-3); color: var(--text);
  font-family: inherit; font-size: .9rem; font-weight: 600; cursor: pointer;
  transition: all var(--speed); text-decoration: none; white-space: nowrap;
}
.btn:hover { color: var(--text); transform: translateY(-1px); }
.btn:active { transform: none; }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn-primary { background: linear-gradient(135deg, var(--accent), #7c5cf6); color: #fff; box-shadow: 0 6px 16px rgba(79, 70, 229, .28); }
.btn-primary:hover { color: #fff; box-shadow: 0 10px 24px rgba(79, 70, 229, .36); }
.btn-ghost { background: var(--surface); border-color: var(--border-strong); color: var(--text-2); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-text); background: var(--accent-soft); }
.btn-soft { background: var(--accent-soft); color: var(--accent-text); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { color: #fff; filter: brightness(1.06); }
.btn-sm { height: 34px; padding: 0 13px; font-size: .84rem; border-radius: 9px; }
.btn-xs { height: 28px; padding: 0 10px; font-size: .78rem; border-radius: 8px; }
.btn-block { width: 100%; }
.btn-lg { height: 46px; padding: 0 24px; font-size: .96rem; }

/* Flash */
.flash-wrap { margin-top: 18px; }
.flash {
  display: flex; align-items: center; gap: 10px; padding: 12px 16px;
  border-radius: var(--radius-sm); font-size: .9rem; border: 1px solid transparent;
}
.flash-success { background: var(--ok-soft); color: var(--ok); border-color: rgba(26, 158, 111, .25); }
.flash-error { background: var(--danger-soft); color: var(--danger); border-color: rgba(220, 47, 69, .25); }
.flash-info { background: var(--accent-soft); color: var(--accent-text); border-color: rgba(79, 70, 229, .25); }

/* --------------------------------------------------------------------------
   页面主体 / 通用卡片
   -------------------------------------------------------------------------- */
.site-main { display: block; padding: 26px 0 56px; min-height: 60vh; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head h1 { margin: 0; font-size: 1.5rem; }
.page-head .sub { color: var(--muted); font-size: .88rem; margin-top: 4px; }

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); overflow: hidden;
}
.card + .card { margin-top: 18px; }
.card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 20px; border-bottom: 1px solid var(--border); background: var(--surface-2);
}
.card-head h2, .card-head h3 { margin: 0; font-size: 1rem; }
.card-body { padding: 20px; }
.card-foot { padding: 14px 20px; border-top: 1px solid var(--border); background: var(--surface-2); }

.layout-2col { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
.side-stack { display: flex; flex-direction: column; gap: 18px; position: sticky; top: 84px; }

/* Hero */
.hero {
  position: relative; overflow: hidden; border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #4f46e5 0%, #6d5cf6 45%, #9b5cf6 100%);
  color: #fff; padding: 32px 34px; margin-bottom: 22px;
  box-shadow: 0 18px 44px rgba(79, 70, 229, .28);
}
.hero::after {
  content: ""; position: absolute; right: -80px; top: -80px; width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(255,255,255,.22), transparent 62%); border-radius: 50%;
}
.hero h1 { font-size: 1.85rem; margin-bottom: 8px; color: #fff; }
.hero p { color: rgba(255, 255, 255, .86); max-width: 640px; margin-bottom: 18px; font-size: .94rem; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; position: relative; z-index: 1; }
.hero .btn-primary { background: #fff; color: #4338ca; box-shadow: 0 8px 22px rgba(0, 0, 0, .18); }
.hero .btn-primary:hover { color: #4338ca; }
.hero .btn-ghost { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.4); color: #fff; }
.hero .btn-ghost:hover { background: rgba(255,255,255,.24); color: #fff; }
.hero-stats { display: flex; gap: 26px; margin-top: 22px; flex-wrap: wrap; position: relative; z-index: 1; }
.hero-stat b { display: block; font-size: 1.35rem; line-height: 1.2; }
.hero-stat span { font-size: .78rem; color: rgba(255,255,255,.78); }

/* 板块网格 */
.forum-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.forum-card {
  display: block; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px; color: var(--text);
  transition: transform var(--speed), box-shadow var(--speed), border-color var(--speed);
}
.forum-card:hover { color: var(--text); transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--accent); }
.forum-card-top { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.forum-icon {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent-text); flex: 0 0 auto;
}
.forum-card h3 { margin: 0; font-size: .98rem; }
.forum-card .forum-desc { color: var(--muted); font-size: .82rem; margin: 0 0 12px; line-height: 1.55; min-height: 2.6em; }
.forum-card-foot { display: flex; align-items: center; justify-content: space-between; font-size: .76rem; color: var(--muted); gap: 8px; flex-wrap: wrap; }
.forum-card-foot .tcount { display: inline-flex; align-items: center; gap: 5px; }

/* 主题列表 */
.thread-list { list-style: none; margin: 0; padding: 0; }
.thread-item {
  display: flex; gap: 14px; padding: 16px 20px; border-bottom: 1px solid var(--border);
  transition: background var(--speed);
}
.thread-item:last-child { border-bottom: 0; }
.thread-item:hover { background: var(--surface-2); }
.thread-avatar { flex: 0 0 auto; }
.thread-main { min-width: 0; flex: 1 1 auto; }
.thread-title { font-size: .98rem; font-weight: 650; margin: 0 0 6px; line-height: 1.4; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.thread-title a { color: var(--text); }
.thread-title a:hover { color: var(--accent); }
.thread-excerpt { color: var(--muted); font-size: .84rem; margin: 0 0 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.thread-meta { display: flex; align-items: center; gap: 14px; font-size: .76rem; color: var(--muted); flex-wrap: wrap; }
.thread-meta span { display: inline-flex; align-items: center; gap: 4px; }
.thread-cover { width: 84px; height: 62px; border-radius: 10px; object-fit: cover; border: 1px solid var(--border); flex: 0 0 auto; }

/* 标签 / 徽章 */
.pill {
  display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 9px;
  border-radius: 999px; font-size: .72rem; font-weight: 600; white-space: nowrap;
}
.pill-sticky { background: var(--warn-soft); color: var(--warn); }
.pill-digest { background: var(--ok-soft); color: var(--ok); }
.pill-coin { background: var(--coin-soft); color: var(--coin); }
.pill-reply { background: var(--accent-soft); color: var(--accent-text); }
.pill-public { background: var(--surface-3); color: var(--text-2); }
.pill-hot { background: var(--danger-soft); color: var(--danger); }

.chip {
  display: inline-flex; align-items: center; gap: 3px; height: 21px; padding: 0 8px;
  border-radius: 999px; font-size: .72rem; font-weight: 600; white-space: nowrap;
  background: var(--surface-3); color: var(--text-2); border: 1px solid transparent;
}
.chip-level { background: var(--accent-soft); color: var(--accent-text); }
.chip .ico { opacity: .85; }
.lv-0 { background: var(--surface-3); color: var(--muted); }
.lv-1 { background: #eef1f6; color: #5b6579; }
.lv-2 { background: #e6f0ff; color: #2563eb; }
.lv-3 { background: #e6fbf3; color: #0f9d68; }
.lv-4 { background: #eefbe6; color: #4d9d15; }
.lv-5 { background: #fdf8e3; color: #b98900; }
.lv-6 { background: #fdeee0; color: #c2620b; }
.lv-7 { background: #fde8ef; color: #c81e5b; }
.lv-8 { background: #f3e8ff; color: #7c3aed; }
.lv-9 { background: linear-gradient(135deg, #4f46e5, #a855f7); color: #fff; }
html[data-theme="dark"] .lv-1 { background: #262d3a; color: #b3bacb; }
html[data-theme="dark"] .lv-2 { background: #1d2c46; color: #8ab4ff; }
html[data-theme="dark"] .lv-3 { background: #12342b; color: #5edbb0; }
html[data-theme="dark"] .lv-4 { background: #1f3520; color: #9ad46a; }
html[data-theme="dark"] .lv-5 { background: #362d17; color: #e5c368; }
html[data-theme="dark"] .lv-6 { background: #382518; color: #f0a465; }
html[data-theme="dark"] .lv-7 { background: #3a1d29; color: #ff8fb1; }
html[data-theme="dark"] .lv-8 { background: #2f2144; color: #c9a8ff; }

/* 独立 ID / 靓号 */
.idchip {
  display: inline-flex; align-items: center; gap: 3px; height: 20px; padding: 0 7px;
  border-radius: 6px; font-size: .72rem; font-family: ui-monospace, Consolas, monospace;
  background: var(--surface-3); color: var(--text-2); border: 1px solid var(--border);
}
.idchip b { font-weight: 700; letter-spacing: .02em; }
.pretty-tag { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 6px; font-size: .7rem; font-weight: 700; margin-left: 3px; color: #fff; }
.tone-gold { background: linear-gradient(135deg, #f6b73c, #e08c0b); }
.tone-red { background: linear-gradient(135deg, #ff6b6b, #d92d3c); }
.tone-violet { background: linear-gradient(135deg, #8b5cf6, #6366f1); }
.tone-blue { background: linear-gradient(135deg, #38bdf8, #2563eb); }
.tone-green { background: linear-gradient(135deg, #34d399, #059669); }
.tone-pink { background: linear-gradient(135deg, #f472b6, #db2777); }

/* VIP 图标 */
.vipmark { display: inline-flex; align-items: center; flex: 0 0 auto; line-height: 1; margin-left: 3px; vertical-align: middle; }
.vipmark svg { display: block; flex: 0 0 auto; height: var(--vs, 18px); width: auto; max-width: none; }
.vip-svip svg { filter: drop-shadow(0 2px 6px rgba(255, 61, 127, .35)); }
.vip-normal svg { filter: drop-shadow(0 2px 5px rgba(255, 84, 104, .28)); }

/* 标识牌（紫蓝渐变椭圆，仿参考图） */
.plate {
  display: inline-flex; align-items: center; gap: 6px; max-width: 100%;
  height: 26px; padding: 0 12px 0 5px; border-radius: 999px;
  background: linear-gradient(90deg, #6d28d9 0%, #5b21b6 42%, #4338ca 100%);
  border: 1px solid rgba(255, 255, 255, .28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 4px 14px rgba(91, 33, 182, .38);
  color: #fff; font-size: .74rem; font-weight: 600; line-height: 1;
  overflow: hidden;
}
.plate-badge {
  width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(135deg, #c4b5fd, #8b5cf6); color: #3b0f8f;
  box-shadow: 0 0 0 1px rgba(255,255,255,.4);
  flex: 0 0 auto;
}
.plate-text { display: inline-flex; align-items: baseline; gap: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.plate-text em { font-style: normal; font-weight: 700; letter-spacing: .02em; }
/* 动态铭牌标识（TT语音 Lottie 素材） */
.plate[data-badge-lottie] { position: relative; }
.plate-lottie { position: absolute; inset: -6px -10px; z-index: 0; pointer-events: none; opacity: .9; }
.plate-lottie svg { width: 100% !important; height: 100% !important; }
.plate[data-badge-lottie] .plate-badge, .plate[data-badge-lottie] .plate-text { position: relative; z-index: 1; }
.plate-violet { background: linear-gradient(90deg, #6d28d9, #4f46e5); }
.plate-blue { background: linear-gradient(90deg, #1d4ed8, #4338ca); }
.plate-official { background: linear-gradient(90deg, #7c3aed 0%, #4f46e5 55%, #2563eb 100%); }
.plate-gold { background: linear-gradient(90deg, #b45309, #d97706); border-color: rgba(255,255,255,.4); }

/* 头像 */
.avatar {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; flex: 0 0 auto; background: var(--surface-3);
}
.avatar-round { border-radius: 50%; }
.avatar-core { width: 100%; height: 100%; border-radius: 50%; overflow: hidden; display: grid; place-items: center; }
.avatar-core img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
.avatar-letter {
  width: 100%; height: 100%; display: grid; place-items: center; border-radius: 50%;
  background: linear-gradient(135deg, hsl(var(--hue, 240) 72% 62%), hsl(calc(var(--hue, 240) + 36) 74% 54%));
  color: #fff; font-weight: 700; font-size: .9em;
}
.avatar-framed { padding: 0; }
.avatar-frame {
  position: absolute; inset: -4px; border-radius: 50%; z-index: 1;
  box-shadow: 0 0 0 2px var(--surface), 0 4px 12px rgba(0, 0, 0, .16);
  pointer-events: none;
}
.avatar-framed .avatar-core { position: relative; z-index: 2; box-shadow: 0 0 0 2px var(--surface); }
/* 动态 Lottie 头像框（TT语音素材） */
.avatar[data-lottie] { overflow: visible; }
.avatar-lottie { position: absolute; inset: -18%; z-index: 3; pointer-events: none; }
.avatar-lottie svg { width: 100% !important; height: 100% !important; }
.avatar-frame-text {
  position: absolute; left: 50%; bottom: -22%; transform: translateX(-50%);
  z-index: 4; white-space: nowrap; pointer-events: none;
  font-size: max(9px, .6em); font-weight: 800; letter-spacing: .04em;
  padding: 1px 8px; border-radius: 999px; color: #fff;
  background: linear-gradient(90deg, #ff3d7f, #ff8a3c, #ffd76a, #ff8a3c, #ff3d7f);
  background-size: 200% 100%; animation: frameTextFlow 3s linear infinite;
  box-shadow: 0 2px 8px rgba(255, 61, 127, .45); text-shadow: 0 1px 2px rgba(0,0,0,.35);
}
@keyframes frameTextFlow { to { background-position: -200% 0; } }

/* --------------------------------------------------------------------------
   表单
   -------------------------------------------------------------------------- */
.form-row { margin-bottom: 16px; }
.form-label { display: block; font-size: .84rem; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }
.form-hint { font-size: .76rem; color: var(--muted); margin-top: 5px; }
.input-group { display: flex; gap: 8px; align-items: stretch; }
.input-group .input { flex: 1 1 auto; min-width: 0; }
.input-group .btn { flex: 0 0 auto; white-space: nowrap; }
.input, .textarea, .select {
  width: 100%; padding: 10px 13px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text); font-family: inherit; font-size: .9rem;
  transition: border-color var(--speed), box-shadow var(--speed);
}
.input:focus, .textarea:focus, .select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.textarea { min-height: 120px; resize: vertical; line-height: 1.7; }
.textarea-tall { min-height: 220px; }
.input-sm { height: 34px; padding: 0 10px; font-size: .84rem; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.form-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.checkbox { display: inline-flex; align-items: center; gap: 7px; font-size: .86rem; color: var(--text-2); cursor: pointer; }
.checkbox input { width: 16px; height: 16px; accent-color: var(--accent); }
.radio-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.radio-card {
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm); padding: 13px 15px;
  cursor: pointer; background: var(--surface-2); transition: all var(--speed);
}
.radio-card input { margin-right: 6px; accent-color: var(--accent); }
.radio-card strong { font-size: .88rem; }
.radio-card p { margin: 4px 0 0; font-size: .76rem; color: var(--muted); }
.radio-card:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }

/* 文件上传 */
.file-drop {
  border: 1.5px dashed var(--border-strong); border-radius: var(--radius); padding: 22px;
  text-align: center; color: var(--muted); background: var(--surface-2); font-size: .84rem;
  transition: all var(--speed);
}
.file-drop:hover { border-color: var(--accent); color: var(--accent-text); background: var(--accent-soft); }
.file-drop input[type="file"] { display: block; margin: 10px auto 0; font-size: .82rem; color: var(--text-2); }

/* --------------------------------------------------------------------------
   帖子详情
   -------------------------------------------------------------------------- */
.thread-head { padding: 24px; border-bottom: 1px solid var(--border); }
.thread-head h1 { font-size: 1.42rem; margin-bottom: 12px; }
.thread-head .meta-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: .82rem; color: var(--muted); }
.thread-body { padding: 24px; font-size: .95rem; line-height: 1.85; word-break: break-word; }
.thread-body img { border-radius: var(--radius-sm); margin: 10px 0; }
.thread-body p { margin: 0 0 .9em; }

.resource-box {
  margin: 22px 0 0; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface-2); overflow: hidden;
}
.resource-box-head {
  display: flex; align-items: center; gap: 8px; padding: 12px 16px;
  background: linear-gradient(90deg, var(--coin-soft), var(--surface-2));
  border-bottom: 1px solid var(--border); font-size: .86rem; font-weight: 650; color: var(--coin);
}
.resource-box-body { padding: 16px; }
.audio-player { width: 100%; margin-top: 10px; }
/* 隐藏文字内容 */
.hidden-content-box .resource-box-head { background: linear-gradient(90deg, var(--accent-soft), var(--surface-2)); color: var(--accent-text); }
.hidden-content-box .post-content { white-space: normal; }
/* 通用附件列表 */
.attach-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.attach-card { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); text-decoration: none; color: var(--text); transition: border-color .15s, transform .15s; }
.attach-card:hover { border-color: var(--accent); transform: translateY(-1px); }
.attach-ext { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; min-width: 42px; height: 34px; padding: 0 6px; border-radius: 6px; background: var(--accent-soft); color: var(--accent-text); font-size: .66rem; font-weight: 750; letter-spacing: .02em; }
.attach-ext.ext-zip, .attach-ext.ext-rar, .attach-ext.ext-7z { background: #fff3e0; color: #e65100; }
.attach-ext.ext-pdf { background: #ffebee; color: #c62828; }
.attach-ext.ext-doc, .attach-ext.ext-docx { background: #e3f2fd; color: #1565c0; }
.attach-ext.ext-xls, .attach-ext.ext-xlsx { background: #e8f5e9; color: #2e7d32; }
.attach-ext.ext-mp3, .attach-ext.ext-wav, .attach-ext.ext-flac, .attach-ext.ext-ogg, .attach-ext.ext-m4a, .attach-ext.ext-aac { background: #f3e5f5; color: #6a1b9a; }
.attach-meta { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.attach-meta b { font-size: .84rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attach-meta small { font-size: .72rem; color: var(--muted); }
.attach-dl { flex: 0 0 auto; color: var(--accent); }

/* 资源门槛卡片 */
.gate {
  margin-top: 20px; padding: 22px; border-radius: var(--radius);
  border: 1px dashed var(--border-strong); background: var(--surface-2); text-align: center;
}
.gate-head { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: .96rem; margin-bottom: 8px; }
.gate-coin .gate-head { color: var(--coin); }
.gate-reply .gate-head { color: var(--accent-text); }
.gate-desc { color: var(--muted); font-size: .86rem; margin-bottom: 14px; }
.gate-desc .coin-num { color: var(--coin); font-size: 1.1rem; }
.gate-form { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; }

/* 楼层 */
.post-item { display: flex; gap: 14px; padding: 20px 24px; border-bottom: 1px solid var(--border); }
.post-item:last-child { border-bottom: 0; }
.post-side { width: 132px; flex: 0 0 auto; text-align: center; }
.post-side .uname-wrap { margin-top: 8px; font-size: .82rem; word-break: break-all; }
.post-side .plate { margin-top: 6px; }
.post-main { flex: 1 1 auto; min-width: 0; }
.post-meta { display: flex; align-items: center; gap: 10px; font-size: .76rem; color: var(--muted); margin-bottom: 8px; flex-wrap: wrap; }
.post-content { font-size: .93rem; line-height: 1.8; word-break: break-word; }
.post-actions { display: flex; align-items: center; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.floor-num { font-family: ui-monospace, Consolas, monospace; color: var(--muted); font-size: .76rem; }

/* --------------------------------------------------------------------------
   个人中心 / 资料
   -------------------------------------------------------------------------- */
.profile-hero {
  position: relative; padding: 26px; border-radius: var(--radius-lg);
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm);
  display: flex; gap: 22px; align-items: center; flex-wrap: wrap;
}
.profile-avatar { flex: 0 0 auto; }
.profile-info { flex: 1 1 260px; min-width: 0; }
.profile-name { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 1.3rem; font-weight: 750; margin-bottom: 6px; }
.profile-sub { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.profile-sign { color: var(--text-2); font-size: .88rem; margin: 0 0 12px; }
.profile-badges { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; margin-bottom: 12px; }
.profile-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(108px, 1fr)); gap: 12px; margin-top: 18px; }
.stat-box {
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 14px; text-align: center;
}
.stat-box b { display: block; font-size: 1.2rem; line-height: 1.2; }
.stat-box span { font-size: .76rem; color: var(--muted); }

.wallet-row { display: flex; gap: 10px; flex-wrap: wrap; }
.wallet-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--border); font-size: .82rem; font-weight: 600;
}
.wallet-chip .ico { color: var(--coin); }
.wallet-chip.points .ico { color: var(--accent); }

.tabs { display: flex; gap: 6px; padding: 0 20px; border-bottom: 1px solid var(--border); background: var(--surface-2); overflow-x: auto; }
.tab {
  padding: 12px 14px; font-size: .88rem; font-weight: 600; color: var(--muted);
  border-bottom: 2px solid transparent; white-space: nowrap;
}
.tab:hover { color: var(--text); }
.tab.is-active { color: var(--accent-text); border-bottom-color: var(--accent); }

.empty { padding: 44px 20px; text-align: center; color: var(--muted); font-size: .88rem; }
.empty .ico { width: 34px; height: 34px; opacity: .5; margin-bottom: 10px; }

/* 等级进度 */
.level-progress { margin-top: 14px; }
.level-progress-bar { height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.level-progress-bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--accent), #a855f7); }
.level-progress-text { display: flex; justify-content: space-between; font-size: .74rem; color: var(--muted); margin-top: 5px; }

/* --------------------------------------------------------------------------
   聊天室
   -------------------------------------------------------------------------- */
.chat-shell { display: flex; flex-direction: column; height: calc(100vh - 260px); min-height: 420px; }
.chat-body { flex: 1 1 auto; overflow-y: auto; padding: 18px 20px; background: var(--surface-2); }
.chat-msg { display: flex; gap: 10px; margin-bottom: 16px; }
.chat-msg-body { min-width: 0; }
.chat-msg-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: .76rem; margin-bottom: 4px; }
.chat-msg-head time { color: var(--muted); font-size: .72rem; }
.chat-bubble {
  display: inline-block; padding: 9px 13px; border-radius: 4px 12px 12px 12px;
  background: var(--surface); border: 1px solid var(--border); font-size: .88rem;
  max-width: 100%; word-break: break-word;
}
.chat-msg.is-me .chat-bubble { background: var(--accent-soft); border-color: transparent; color: var(--accent-text); }
.chat-form { display: flex; gap: 10px; padding: 14px 16px; border-top: 1px solid var(--border); background: var(--surface); }
.chat-form .input { flex: 1 1 auto; }
.chat-note { font-size: .74rem; color: var(--muted); padding: 8px 16px; border-top: 1px solid var(--border); background: var(--surface-2); }

/* --------------------------------------------------------------------------
   表格
   -------------------------------------------------------------------------- */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: .86rem; }
table.table th, table.table td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.table th { background: var(--surface-2); font-weight: 650; color: var(--text-2); font-size: .8rem; white-space: nowrap; }
table.table tbody tr:hover { background: var(--surface-2); }
table.table td.num { font-family: ui-monospace, Consolas, monospace; }

/* 分页 */
.pagination { display: flex; gap: 6px; flex-wrap: wrap; padding: 16px 20px; }
.pagination a, .pagination span {
  min-width: 34px; height: 34px; padding: 0 10px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 9px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); font-size: .84rem;
}
.pagination a:hover { border-color: var(--accent); color: var(--accent-text); background: var(--accent-soft); }
.pagination .is-current { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 700; }
.pagination .disabled { opacity: .45; pointer-events: none; }

/* 侧栏列表 */
.side-list { list-style: none; margin: 0; padding: 0; }
.side-list li { padding: 11px 20px; border-bottom: 1px solid var(--border); font-size: .85rem; }
.side-list li:last-child { border-bottom: 0; }
.side-list a { color: var(--text); }
.side-list a:hover { color: var(--accent); }
.side-list .num-badge { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 6px; background: var(--surface-3); color: var(--muted); font-size: .72rem; font-weight: 700; margin-right: 8px; }
.side-list li:nth-child(1) .num-badge { background: #fde8ef; color: #c81e5b; }
.side-list li:nth-child(2) .num-badge { background: #fdf3d9; color: #b98900; }
.side-list li:nth-child(3) .num-badge { background: var(--accent-soft); color: var(--accent-text); }

/* --------------------------------------------------------------------------
   页脚
   -------------------------------------------------------------------------- */
.site-footer { background: var(--surface); border-top: 1px solid var(--border); margin-top: 20px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr .8fr 1.5fr; gap: 32px; padding: 40px 20px 30px; }
.footer-brand .brand { margin-bottom: 12px; }
.footer-brand .brand-text em { max-width: 320px; }
.footer-desc { color: var(--muted); font-size: .82rem; line-height: 1.7; margin: 0 0 10px; max-width: 360px; }
.footer-mail { display: inline-flex; align-items: center; gap: 6px; font-size: .82rem; color: var(--muted); margin: 0; }
.footer-mail a { font-weight: 600; }
.footer-links { display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.footer-links h4, .footer-stats h4 { flex: 0 0 100%; font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 2px; font-weight: 700; }
.footer-links a { color: var(--text-2); font-size: .85rem; padding: 3px 8px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); line-height: 1.4; white-space: nowrap; }
.footer-links a:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.footer-stats .stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.stat-card { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 8px; text-align: center; }
.stat-num { display: block; font-size: 1.15rem; font-weight: 750; line-height: 1.25; font-variant-numeric: tabular-nums; }
/* 通用统计网格（个人主页 5 项统计）——不影响页脚 .footer-stats .stat-grid 的 4 列定义 */
/* 通用 5 列：页脚 .footer-stats .stat-grid（4 列）优先级更高，不受影响 */
.stat-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.stat-value { display: block; font-size: 1.1rem; font-weight: 750; line-height: 1.3; font-variant-numeric: tabular-nums; }
@media (max-width: 900px) { .stat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) { .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.stat-label { display: inline-flex; align-items: center; gap: 3px; font-size: .7rem; color: var(--muted); }
.ban-list { border-top: 1px dashed var(--border); padding-top: 10px; }
.ban-title { display: inline-flex; align-items: center; gap: 5px; font-size: .76rem; color: var(--muted); margin-bottom: 6px; }
.ban-chips { display: flex; flex-wrap: wrap; gap: 5px; font-size: .74rem; }
.ban-chip {
  display: inline-flex; align-items: center; height: 21px; padding: 0 8px; border-radius: 6px;
  background: var(--danger-soft); color: var(--danger); font-weight: 600;
}
.footer-bottom { border-top: 1px solid var(--border); background: var(--surface-2); }
.footer-bottom-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; font-size: .78rem; color: var(--muted); flex-wrap: wrap; }
.footer-meta { display: inline-flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.footer-meta .dot { opacity: .4; }

/* --------------------------------------------------------------------------
   杂项
   -------------------------------------------------------------------------- */
.search-result { padding: 16px 20px; border-bottom: 1px solid var(--border); }
.search-result:last-child { border-bottom: 0; }
.search-result h3 { font-size: .95rem; margin-bottom: 5px; }
.search-result p { font-size: .84rem; color: var(--muted); margin: 0 0 7px; }
mark { background: var(--warn-soft); color: var(--warn); padding: 0 3px; border-radius: 3px; }

.alert { padding: 13px 16px; border-radius: var(--radius-sm); font-size: .86rem; margin-bottom: 16px; border: 1px solid transparent; display: flex; gap: 9px; align-items: flex-start; }
.alert-info { background: var(--accent-soft); color: var(--accent-text); }
.alert-warn { background: var(--warn-soft); color: var(--warn); }
.alert-danger { background: var(--danger-soft); color: var(--danger); }
.alert-ok { background: var(--ok-soft); color: var(--ok); }

.auth-wrap { max-width: 460px; margin: 10px auto 0; }
.auth-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 30px; }
.auth-card h1 { font-size: 1.3rem; margin-bottom: 6px; }
.auth-card .sub { color: var(--muted); font-size: .86rem; margin-bottom: 22px; }
.auth-foot { text-align: center; margin-top: 18px; font-size: .85rem; color: var(--muted); }

.avatar-upload { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }

.frame-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; }
.frame-opt {
  border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px; text-align: center;
  background: var(--surface-2); cursor: pointer; transition: all var(--speed);
}
.frame-opt:hover { border-color: var(--accent); }
.frame-opt input { display: none; }
.frame-opt.is-active { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 3px var(--accent-soft); }
.frame-opt span.name { display: block; font-size: .78rem; color: var(--text-2); margin-top: 8px; }

.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px);
  background: var(--text); color: var(--surface); padding: 11px 20px; border-radius: 999px;
  font-size: .86rem; box-shadow: var(--shadow-lg); opacity: 0; pointer-events: none;
  transition: all .22s; z-index: 300; max-width: 88vw;
}
.toast.is-show { opacity: 1; transform: translate(-50%, 0); }

/* --------------------------------------------------------------------------
   响应式
   -------------------------------------------------------------------------- */
@media (max-width: 1080px) {
  .layout-2col { grid-template-columns: 1fr; }
  .side-stack { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-stats { grid-column: 1 / -1; }
}

@media (max-width: 900px) {
  .header-search { display: none; }
  .brand-text em { display: none; }
  .main-nav .nav-link span { display: none; }
  .nav-link { padding: 9px 10px; }
  .hero { padding: 24px 22px; }
  .hero h1 { font-size: 1.5rem; }
  .post-side { width: 100%; text-align: left; display: flex; align-items: center; gap: 10px; }
  .post-item { flex-direction: column; }
}

@media (max-width: 640px) {
  body { font-size: 14.5px; }
  .container { padding: 0 14px; }
  .header-inner { height: 58px; gap: 10px; }
  .brand-text strong { font-size: .9rem; }
  .user-trigger-name { display: none; }
  .btn span.hide-sm { display: none; }
  .site-main { padding: 18px 0 40px; }
  .card-body, .thread-head, .thread-body, .post-item { padding: 16px; }
  .thread-item { padding: 14px 16px; }
  .thread-cover { display: none; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; padding: 28px 14px 20px; }
  .footer-stats .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-bottom-inner { flex-direction: column; align-items: flex-start; }
  .hero-stats { gap: 16px; }
  .profile-hero { padding: 18px; }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .chat-shell { height: calc(100vh - 230px); }
  .form-grid { grid-template-columns: 1fr; }
  .auth-card { padding: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* 锁定正文提示（回复/金币未解锁时） */
.locked-hint{display:flex;align-items:center;gap:8px;padding:18px;border:1px dashed var(--border);border-radius:14px;background:var(--surface-2);font-size:14px}

/* ==========================================================================
   首页 · Discuz 风格论坛版式
   ========================================================================== */
.dz-banner {
  position: relative; overflow: hidden; margin: -24px -24px 22px;
  padding: 26px 28px 0; border-radius: 0 0 20px 20px;
  background: linear-gradient(120deg, #1e1b4b 0%, #4c1d95 38%, #1d4ed8 72%, #0ea5e9 100%);
  color: #fff; box-shadow: 0 12px 40px rgba(76, 29, 149, .28);
}
.dz-banner::before, .dz-banner::after {
  content: ''; position: absolute; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(255,255,255,.18), transparent 70%);
}
.dz-banner::before { width: 340px; height: 340px; top: -160px; right: 12%; }
.dz-banner::after { width: 220px; height: 220px; bottom: -120px; left: 6%; }
.dz-banner-inner { position: relative; z-index: 1; display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.dz-banner-logo { display: flex; align-items: center; gap: 12px; flex: 1 1 280px; }
.dz-logo-mark {
  width: 52px; height: 52px; display: grid; place-items: center; border-radius: 14px;
  background: linear-gradient(135deg, #fbbf24, #f97316); color: #fff;
  box-shadow: 0 8px 20px rgba(249, 115, 22, .45), inset 0 1px 0 rgba(255,255,255,.5);
}
.dz-logo-mark .ico { width: 30px; height: 30px; }
.dz-banner-logo strong { display: block; font-size: 1.5rem; font-weight: 800; letter-spacing: .02em; text-shadow: 0 2px 8px rgba(0,0,0,.25); }
.dz-banner-logo small { display: block; font-size: .78rem; opacity: .85; margin-top: 3px; }
.dz-search { display: flex; gap: 6px; flex: 1 1 320px; max-width: 460px; }
.dz-search .input { flex: 1 1 auto; background: rgba(255,255,255,.96); border-color: transparent; color: #1f2937; }
.dz-banner-user { display: flex; align-items: center; gap: 8px; }
.dz-banner-stats {
  position: relative; z-index: 1; display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
  margin-top: 20px; padding: 12px 2px; border-top: 1px solid rgba(255,255,255,.18);
  font-size: .84rem;
}
.dz-banner-stats b { font-size: 1.02rem; font-weight: 800; color: #fbbf24; margin-left: 3px; }
.dz-banner-tip { margin-left: auto; font-size: .76rem; opacity: .8; }

.dz-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; align-items: start; }
.dz-main { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.dz-forum-group { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.dz-group-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 18px; background: linear-gradient(90deg, var(--surface-2), transparent);
  border-bottom: 1px solid var(--border);
}
.dz-group-head h2 { display: flex; align-items: center; gap: 8px; font-size: 1rem; font-weight: 750; margin: 0; }
.dz-group-head h2 .ico { color: var(--accent); }
.dz-group-head span { font-size: .76rem; color: var(--muted); }
.dz-forum-list { display: flex; flex-direction: column; }
.dz-forum-row {
  display: grid; grid-template-columns: 52px minmax(0, 1fr) 62px 62px 190px;
  align-items: center; gap: 12px; padding: 12px 18px;
  border-bottom: 1px solid var(--border); transition: background .15s;
}
.dz-forum-row:last-child { border-bottom: 0; }
.dz-forum-row:hover { background: var(--surface-2); }
.dz-forum-icon {
  width: 46px; height: 46px; display: grid; place-items: center; border-radius: 12px;
  background: linear-gradient(135deg, var(--accent-soft), var(--surface-3)); color: var(--accent);
}
.dz-forum-icon .ico { width: 24px; height: 24px; }
.dz-forum-info { min-width: 0; }
.dz-forum-name { font-size: .94rem; font-weight: 700; color: var(--text); text-decoration: none; }
.dz-forum-name:hover { color: var(--accent); }
.dz-forum-desc { margin: 3px 0 0; font-size: .76rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dz-forum-count { text-align: center; }
.dz-forum-count b { display: block; font-size: .98rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.dz-forum-count span { font-size: .7rem; color: var(--muted); }
.dz-forum-last { min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: .76rem; }
.dz-forum-last a { color: var(--text-2); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dz-forum-last a:hover { color: var(--accent); }
.dz-forum-last small { color: var(--muted); font-size: .7rem; }
.dz-muted { color: var(--muted); }

.dz-side { display: flex; flex-direction: column; gap: 18px; }
.dz-tab-card { overflow: hidden; }
.dz-tabs { display: flex; border-bottom: 1px solid var(--border); }
.dz-tab {
  flex: 1 1 0; padding: 12px 8px; border: 0; background: transparent; cursor: pointer;
  font-size: .86rem; font-weight: 650; color: var(--muted); border-bottom: 2px solid transparent;
}
.dz-tab.is-active { color: var(--accent); border-bottom-color: var(--accent); }
.dz-tab-panel { max-height: 540px; overflow-y: auto; }
.dz-thread { display: block; padding: 10px 14px; border-bottom: 1px solid var(--border); text-decoration: none; color: var(--text); }
.dz-thread:last-child { border-bottom: 0; }
.dz-thread:hover { background: var(--surface-2); }
.dz-thread-title { display: block; font-size: .82rem; font-weight: 600; line-height: 1.4; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dz-thread-meta { display: block; font-size: .7rem; color: var(--muted); margin-top: 3px; }
.dz-empty { padding: 20px; text-align: center; font-size: .82rem; }
.dz-quick-card .card-body { display: flex; flex-direction: column; gap: 8px; }

@media (max-width: 1080px) {
  .dz-layout { grid-template-columns: minmax(0, 1fr); }
  .dz-side { flex-direction: row; flex-wrap: wrap; }
  .dz-side > .card { flex: 1 1 300px; }
}
@media (max-width: 720px) {
  .dz-banner { margin: -16px -16px 18px; padding: 20px 16px 0; }
  .dz-banner-logo strong { font-size: 1.2rem; }
  .dz-search { max-width: none; }
  .dz-banner-tip { display: none; }
  .dz-forum-row { grid-template-columns: 44px minmax(0, 1fr) 50px; gap: 8px; padding: 10px 12px; }
  .dz-forum-icon { width: 38px; height: 38px; }
  .dz-forum-last { display: none; }
  .dz-forum-count:nth-of-type(4) { display: none; }
}
