/* ============================================
   势逐七浪 — 复古贴吧/博客风格主题
   支持：浅雾蓝 / 浅绯红 / 米白色
   字体：系统原生字体（移除Google Fonts依赖）
   ============================================ */

/* ---------- 默认主题：浅雾蓝：清新蓝色调 ---------- */
:root {
  color-scheme: light;
  --bg: #f4f8ff;
  --bg-rgb: 244, 248, 255;
  --panel: rgba(255, 255, 255, 0.96);
  --panel-strong: #eaf2ff;
  --ink: #0f1a2e;
  --muted: #4a5568;
  --dim: #6b7a8f;
  --line: #c8d8ee;
  --accent: #5b83b7;
  --accent-strong: #2e5d98;
  --accent-soft: rgba(91, 131, 183, 0.15);
  --accent-glow: rgba(91, 131, 183, 0.25);
  --accent-gradient: linear-gradient(135deg, #5b83b7 0%, #2e5d98 100%);
  --green: #4e8a60;
  --red: #b75f5f;
  --shadow: 0 8px 26px rgba(55, 85, 120, 0.12);
  --glass-bg: rgba(255, 255, 255, 0.38);
  --glass-border: rgba(255, 255, 255, 0.18);
  --glass-highlight: rgba(255, 255, 255, 0.45);
  --on-accent: #ffffff;
  --surface: rgba(255, 255, 255, 0.38);
  --surface-strong: rgba(255, 255, 255, 0.6);
  --surface-soft: rgba(255, 255, 255, 0.18);
  --surface-line: rgba(0, 0, 0, 0.08);
  --radius-xl: 32px;
  --radius-lg: 28px;
  --radius: 24px;
  --radius-md: 20px;
  --radius-sm: 18px;
  --radius-xs: 16px;
  --radius-2xs: 12px;
  --radius-3xs: 8px;
  --radius-full: 999px;
  --font-display: "Songti SC", "STSong", "SimSun", "Noto Serif CJK SC", "Source Han Serif SC", serif;
  --font-body: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", "Heiti SC", "STHeiti", sans-serif;
}

/* ---------- 浅绯红：温暖红色调 ---------- */
[data-theme="red"] {
  color-scheme: light;
  --bg: #fff5f3;
  --bg-rgb: 255, 245, 243;
  --panel: rgba(255, 255, 255, 0.96);
  --panel-strong: #ffe5e0;
  --ink: #3d1f1c;
  --muted: #8a5f58;
  --dim: #b08078;
  --line: #f0c8c0;
  --accent: #d46a60;
  --accent-strong: #b84840;
  --accent-soft: rgba(212, 106, 96, 0.18);
  --accent-glow: rgba(212, 106, 96, 0.32);
  --accent-gradient: linear-gradient(135deg, #d46a60 0%, #b84840 100%);
  --green: #6a9a5a;
  --red: #d46060;
  --glass-bg: rgba(255, 245, 243, 0.42);
  --glass-border: rgba(255, 200, 190, 0.28);
  --glass-highlight: rgba(255, 255, 255, 0.48);
  --on-accent: #ffffff;
  --surface: rgba(255, 255, 255, 0.42);
  --surface-strong: rgba(255, 255, 255, 0.6);
  --surface-soft: rgba(255, 255, 255, 0.18);
  --surface-line: rgba(120, 50, 40, 0.12);
}

/* ---------- 米白色：典雅暖色调 ---------- */
[data-theme="cream"] {
  color-scheme: light;
  --bg: #faf6ed;
  --bg-rgb: 250, 246, 237;
  --panel: rgba(255, 252, 245, 0.94);
  --panel-strong: #f0e8d8;
  --ink: #2c2418;
  --muted: #6a5d4a;
  --dim: #9a8a70;
  --line: rgba(140, 120, 80, 0.18);
  --accent: #d4a040;
  --accent-strong: #b08020;
  --accent-soft: rgba(212, 160, 64, 0.18);
  --accent-glow: rgba(212, 160, 64, 0.35);
  --accent-gradient: linear-gradient(135deg, #d4a040 0%, #b08020 100%);
  --green: #5a9a4a;
  --red: #c45a3a;
  --glass-bg: rgba(250, 246, 237, 0.42);
  --glass-border: rgba(180, 160, 120, 0.22);
  --glass-highlight: rgba(255, 255, 255, 0.45);
  --on-accent: #2c2418;
  --surface: rgba(255, 252, 245, 0.45);
  --surface-strong: rgba(255, 250, 240, 0.65);
  --surface-soft: rgba(255, 250, 240, 0.22);
  --surface-line: rgba(120, 90, 40, 0.12);
}

/* ---------- 灰夜色：深沉冷色调 ---------- */
[data-theme="gray"] {
  color-scheme: dark;
  --bg: #1c1d20;
  --bg-rgb: 28, 29, 32;
  --panel: rgba(40, 42, 48, 0.94);
  --panel-strong: #2c2e34;
  --ink: #e8e9ec;
  --muted: #c0c4cc;
  --dim: #a0a4ae;
  --line: rgba(255, 255, 255, 0.12);
  --accent: #8a9bb8;
  --accent-strong: #a8b8d0;
  --accent-soft: rgba(138, 155, 184, 0.18);
  --accent-glow: rgba(138, 155, 184, 0.32);
  --accent-gradient: linear-gradient(135deg, #8a9bb8 0%, #5a6b88 100%);
  --green: #7aaa7a;
  --red: #c47a7a;
  --glass-bg: rgba(40, 42, 48, 0.48);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-highlight: rgba(255, 255, 255, 0.08);
  --shadow: 0 8px 26px rgba(0, 0, 0, 0.4);
  --on-accent: #1c1d20;
  --surface: rgba(255, 255, 255, 0.08);
  --surface-strong: rgba(255, 255, 255, 0.15);
  --surface-soft: rgba(255, 255, 255, 0.05);
  --surface-line: rgba(255, 255, 255, 0.12);
}

/* ---------- 粉白色：柔粉少女色调 ---------- */
[data-theme="pink"] {
  color-scheme: light;
  --bg: #fdf5f8;
  --bg-rgb: 253, 245, 248;
  --panel: rgba(255, 255, 255, 0.96);
  --panel-strong: #ffe9f2;
  --ink: #3d1f2e;
  --muted: #8a5f78;
  --dim: #b08098;
  --line: #f0c0d8;
  --accent: #e08ab0;
  --accent-strong: #c45a88;
  --accent-soft: rgba(224, 138, 176, 0.18);
  --accent-glow: rgba(224, 138, 176, 0.32);
  --accent-gradient: linear-gradient(135deg, #e08ab0 0%, #c45a88 100%);
  --green: #6a9a5a;
  --red: #c45a5a;
  --glass-bg: rgba(253, 245, 248, 0.42);
  --glass-border: rgba(255, 200, 220, 0.28);
  --glass-highlight: rgba(255, 255, 255, 0.48);
  --on-accent: #ffffff;
  --surface: rgba(255, 255, 255, 0.42);
  --surface-strong: rgba(255, 255, 255, 0.6);
  --surface-soft: rgba(255, 255, 255, 0.18);
  --surface-line: rgba(160, 60, 110, 0.12);
}

/* ---------- 黑金色：奢华暗金调 ---------- */
[data-theme="gold"] {
  color-scheme: dark;
  --bg: #0f0e0a;
  --bg-rgb: 15, 14, 10;
  --panel: rgba(28, 26, 20, 0.94);
  --panel-strong: #2c2920;
  --ink: #f0e6c8;
  --muted: #d4c8a8;
  --dim: #a89870;
  --line: rgba(212, 175, 55, 0.18);
  --accent: #d4af37;
  --accent-strong: #f0c850;
  --accent-soft: rgba(212, 175, 55, 0.18);
  --accent-glow: rgba(212, 175, 55, 0.32);
  --accent-gradient: linear-gradient(135deg, #d4af37 0%, #8a6f25 100%);
  --green: #8aaa6a;
  --red: #c47a5a;
  --glass-bg: rgba(28, 26, 20, 0.48);
  --glass-border: rgba(212, 175, 55, 0.18);
  --glass-highlight: rgba(255, 215, 100, 0.08);
  --shadow: 0 8px 26px rgba(0, 0, 0, 0.5);
  --on-accent: #0f0e0a;
  --surface: rgba(255, 215, 100, 0.08);
  --surface-strong: rgba(255, 215, 100, 0.15);
  --surface-soft: rgba(255, 215, 100, 0.05);
  --surface-line: rgba(212, 175, 55, 0.22);
}

/* ============================================================
   深色主题（灰夜色 / 黑金色）首页元素适配
   解决硬编码白色背景在深色背景下变成"浅底浅字"的问题
   每个背景都重新映射到对应强度的 --surface 变量
   ============================================================ */

/* 深色主题元素适配：主表面背景 */
:is([data-theme="gray"],[data-theme="gold"]) :is(.topbar,.nav,.user-badge,.retro-bar,.block,.toolbar,.hero-copy,.hero-panel,.side-card,.retro-section,.ghost-button,.secondary-button,.text-button,.chip,.tag,.board-tools,.small-button,.filter-group) {
  background: var(--surface);
  border-color: var(--surface-line);
}
/* 次表面背景 */
:is([data-theme="gray"],[data-theme="gold"]) :is(.search-box,.mini-grid div,.retro-box,.retro-box h3,.type-stat-item,.member) {
  background: var(--surface-soft);
  border-color: var(--surface-line);
}
/* hover */
:is([data-theme="gray"],[data-theme="gold"]) :is(.nav-tab,.ghost-button,.secondary-button,.text-button,.chip,.tag,.small-button,.retro-box,.user-badge,.toolbar,.block,.type-stat-item):hover {
  background: var(--surface-strong);
  border-color: var(--surface-line);
}
/* 导航激活标签 */
:is([data-theme="gray"],[data-theme="gold"]) .nav-tab.active {
  background: var(--accent-gradient);
  color: var(--on-accent);
  border: 0;
  font-weight: 700;
  box-shadow: 0 4px 14px var(--accent-glow);
}
/* 输入框 */
:is([data-theme="gray"],[data-theme="gold"]) :is(.search-box input,.publish-form input,.publish-form select,.publish-form textarea,.dialog input,.comment-form input) {
  background: var(--surface-soft);
  border-color: var(--surface-line);
  color: var(--ink);
}
:is([data-theme="gray"],[data-theme="gold"]) :is(.search-box input,.publish-form input,.publish-form select,.publish-form textarea,.dialog input,.comment-form input):focus {
  background: var(--surface-strong);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
/* 卡片边缘内发光减弱 */
:is([data-theme="gray"],[data-theme="gold"]) :is(.block,.toolbar,.hero-copy,.hero-panel,.side-card)::after {
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08), inset 0 0 60px rgba(255,255,255,.04);
}
/* filter-group 分隔线 */
:is([data-theme="gray"],[data-theme="gold"]) .filter-group-label {
  border-right-color: rgba(255, 255, 255, 0.15);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: transparent;
  font-family: var(--font-body);
  overflow-x: hidden;
  transition: color 0.4s ease;
}
/* ============================================
   氛围场景系统 — 3 层叠加
   天气(w) × 时段(t) × 自然(n) = 独立组合
   
   天气: rainy / snowy / sunny / cloudy / foggy / thunder
   时段: dawn / morning / noon / sunset / dusk / night
   自然: forest / ocean / cherry / autumn / (none)
   ============================================ */

/* ── 基础容器 ── */
.atmosphere {
  position: fixed; inset: 0; z-index: -4;
  pointer-events: none; overflow: hidden;
  transition: background 2s ease;
}
/* 暗化叠加（保证文字可读，置于效果层之下） */
.atmosphere::after {
  content: ""; position: absolute; inset: 0; z-index: 0;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 55%, rgba(0,0,0,0.25) 100%), rgba(0,0,0,0.08);
}
.atmosphere.off { display: none; }

/* ── 效果层基础 ── */
.atm-fx {
  position: absolute; inset: 0; pointer-events: none;
  display: none; z-index: 5;
  will-change: transform, opacity;
}

/* ── 天气画布（WeatherFX 引擎）──
   位于天空背景之上、可读性遮罩(::after)与 CSS 效果层之下，
   天气粒子被遮罩轻微压暗，正文始终保持清晰 */
.atm-canvas {
  position: absolute; inset: 0; z-index: 0;
  width: 100%; height: 100%;
  pointer-events: none;
}

/* ============================================================
   ☔ 雨层 — CSS动态雨丝粒子 (双层景深 + 随机参数 + blur柔化)
   使用说明: WeatherFX Canvas 接管时 (.fx-canvas) 自动隐藏此层
   ============================================================ */
.atm-rain {
  /* 背景层：不做显式背景图，纯靠子元素生成粒子 */
  z-index: -1 !important;  /* 确保在所有内容之下 */
}
/* 每根雨丝列：定位 + 公共属性 */
.atm-rain .rc {
  position: absolute;
  top: -120px;
  display: block;
  pointer-events: none;
  /* 形状由CSS变量驱动: --w宽度, --h高度 */
  width: calc(var(--w) * 1px);
  height: calc(var(--h) * 1px);
  /* 雨丝渐变：顶端透明 → 淡蓝 → 底端微透明 */
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(185, 215, 240, 0.55) 15%,
    rgba(175, 208, 238, 0.7) 50%,
    rgba(165, 200, 235, 0.3) 100%
  );
  border-radius: 1px;
  /* blur柔化硬边 */
  filter: blur(0.45px);
  /* 旋转角度 + 水平定位 来自CSS变量 */
  transform: rotate(calc(var(--a) * -1deg));
  left: calc(var(--x) * 1%);
  /* 下落动画：不同速度+延迟 */
  animation: rc-fall var(--sd, 1.1s) linear infinite;
  animation-delay: var(--dd, -0.1s);
  /* 多滴效果：box-shadow在下层复制3-5个雨丝 */
  box-shadow:
    0   calc(var(--h) * 1.3px) 0 0 rgba(180, 212, 238, 0.45),
    0   calc(var(--h) * 2.6px) 0 0 rgba(180, 212, 238, 0.38),
    0   calc(var(--h) * 3.9px) 0 0 rgba(180, 212, 238, 0.28),
    0   calc(var(--h) * 5.2px) 0 0 rgba(180, 212, 238, 0.18);
}

/* 近景雨层：略粗、更长、更快、更不透明 */
.atm-rain .rc.near {
  z-index: 2;
  opacity: 0.7;
}
/* 远景雨层：细、短、慢、更透明 */
.atm-rain .rc.far {
  z-index: 1;
  opacity: 0.35;
  filter: blur(0.6px);
  box-shadow:
    0   calc(var(--h) * 1.4px) 0 0 rgba(170, 205, 230, 0.4),
    0   calc(var(--h) * 2.8px) 0 0 rgba(170, 205, 230, 0.3),
    0   calc(var(--h) * 4.2px) 0 0 rgba(170, 205, 230, 0.18);
}

/* 底部水雾 — 保留 */
.atm-rain::after {
  content: ""; position: absolute; bottom: 0; left: 0; right: 0;
  height: 18vh; z-index: 3;
  background: linear-gradient(to top,
    rgba(160, 195, 218, 0.22) 0%,
    rgba(175, 205, 225, 0.1) 35%,
    rgba(190, 212, 228, 0.03) 65%,
    transparent 100%);
  animation: r-mist 5s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes rc-fall {
  0%   { transform: rotate(calc(var(--a) * -1deg)) translateY(-120px); }
  100% { transform: rotate(calc(var(--a) * -1deg)) translateY(calc(100vh + 240px)); }
}
@keyframes r-mist {
  from { opacity: 0.4; transform: scaleY(1); }
  to   { opacity: 1; transform: scaleY(1.5); }
}

/* ============================================================
   ❄️ 雪层 — 由 WeatherFX Canvas 引擎接管（weather-fx.js）
   旧 CSS 静态雪花已移除，仅保留地面雪雾渐变
   ============================================================ */
.atm-snow { pointer-events: none; }
/* 地面雪雾 — 冬日朦胧感 */
.atm-snow::after {
  content: ""; position: absolute; bottom: 0; left: 0; right: 0;
  height: 14vh;
  background: linear-gradient(to top,
    rgba(230,240,250,0.15) 0%,
    rgba(235,242,248,0.05) 45%,
    transparent 100%);
  animation: r-mist 5s ease-in-out infinite alternate;
}

/* ============================================================
   ☁️ DOM 云层 — 多层径向渐变 + blur 程序化云朵
   远景层（大、低透明度、慢速） + 近景层（偏小、适中透明度、快速）
   云朵分布在屏幕顶部、左右边角，中间可视区留空
   z-index: -1 严格置于全部 DOM 底层
   ============================================================ */
.dom-clouds {
  position: absolute; inset: 0; z-index: -1;
  pointer-events: none; overflow: hidden;
}
.dom-cloud {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  will-change: transform;
}
/* 远景层：大尺寸、低不透明度、强模糊、慢速漂移 */
.cloud-far {
  background:
    radial-gradient(ellipse at 38% 42%, rgba(230,238,248,0.38) 0%, rgba(210,224,240,0.18) 35%, rgba(190,208,228,0.04) 65%, transparent 100%);
  filter: blur(calc(var(--cblur, 16px) * 1.2));
  opacity: 0.45;
}
/* 近景层：偏小尺寸、适中不透明度、弱模糊、快速漂移 */
.cloud-near {
  background:
    radial-gradient(ellipse at 35% 40%, rgba(240,245,252,0.52) 0%, rgba(225,235,248,0.28) 30%, rgba(210,225,242,0.08) 60%, transparent 100%);
  filter: blur(var(--cblur, 8px));
  opacity: 0.55;
}
/* 远景漂移动画：慢速、小幅度 */
@keyframes cloud-drift-far {
  from { transform: translateX(calc(var(--cdx, -20px) * -1)); }
  to   { transform: translateX(var(--cdx, 20px)); }
}
/* 近景漂移动画：快速、大幅度 */
@keyframes cloud-drift-near {
  from { transform: translateX(calc(var(--cdn, -45px) * -1)); }
  to   { transform: translateX(var(--cdn, 45px)); }
}

/* ============================================================
   ☀️ 太阳层 — 弥散暖金色光晕（无实体太阳轮廓）
   多层径向渐变 + 大半径 blur 模糊，仅提供氛围不刺眼
   ============================================================ */
.atm-sun {
  /* 三层径向渐变叠加：内→外越来越淡、越大，角落定位无明确边界 */
  background:
    radial-gradient(circle 140px at 88% 10%, rgba(255,238,190,0.32) 0%, rgba(255,222,148,0.14) 38%, transparent 72%),
    radial-gradient(circle 320px at 88% 10%, rgba(255,228,165,0.16) 0%, rgba(255,212,130,0.05) 48%, transparent 82%),
    radial-gradient(circle 580px at 88% 10%, rgba(255,218,150,0.07) 0%, transparent 78%);
  animation: s-glow 8s ease-in-out infinite alternate;
}
/* 中层柔光：blur(45px) 产生物理弥散 */
.atm-sun::before {
  content: ""; position: absolute;
  top: -130px; right: -90px;
  width: 560px; height: 460px;
  background: radial-gradient(ellipse at 80% 28%,
    rgba(255,225,160,0.24) 0%, rgba(255,205,120,0.08) 38%, transparent 68%);
  filter: blur(45px);
  animation: s-glow 8s ease-in-out infinite alternate;
}
/* 外层大范围环境光：blur(70px) 极低透明度 */
.atm-sun::after {
  content: ""; position: absolute;
  top: -220px; right: -130px;
  width: 820px; height: 680px;
  background: radial-gradient(ellipse at 75% 32%,
    rgba(255,215,145,0.12) 0%, rgba(255,195,105,0.035) 42%, transparent 72%);
  filter: blur(70px);
  animation: s-glow 10s ease-in-out infinite alternate;
}
@keyframes s-glow {
  from { opacity: 0.78; }
  to   { opacity: 1; }
}
@keyframes s-breath {
  from { opacity: 0.9; }
  to   { opacity: 1; }
}

/* ============================================================
   🌙 月亮层 — 弯月 + 星芒
   ============================================================ */
.atm-moon {
  background:
    radial-gradient(circle at 78% 8%,
      rgba(255,255,240,0.84) 0%, rgba(255,253,235,0.62) 1.8%,
      rgba(240,240,220,0.2) 4.5%, transparent 10%);
  animation: s-breath 8s ease-in-out infinite alternate;
}
.atm-moon::before {
  content: ""; position: absolute; top: 3.5%; right: 17.5%;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: #fffde8;
  box-shadow:
    0 0 20px rgba(255,252,230,0.7),
    0 0 50px rgba(255,252,230,0.35),
    0 0 90px rgba(255,250,220,0.18),
    inset 6px -4px 0 rgba(240,235,210,0.7);
  filter: blur(0.5px);
}

/* ============================================================
   ⭐ 星空层 — 银河带 + 60+ 星 + 流星
   ============================================================ */
.atm-stars {
  background:
    /* 银河主带（蓝紫星云） */
    radial-gradient(ellipse 130% 22% at 38% 58%,
      rgba(70,95,170,0.22) 0%, rgba(90,110,180,0.12) 22%,
      rgba(55,80,140,0.06) 44%, transparent 68%),
    /* 银河次带 */
    radial-gradient(ellipse 75% 15% at 62% 28%,
      rgba(130,75,115,0.15) 0%, rgba(95,55,130,0.08) 28%, transparent 58%),
    /* 散落星云 */
    radial-gradient(ellipse 40% 10% at 22% 78%,
      rgba(45,70,130,0.12) 0%, transparent 58%),
    /* 60+ 颗星星 */
    radial-gradient(1.4px 1.4px at 3% 5%, #fff 100%, transparent),
    radial-gradient(1px 1px at 8% 12%, #e8f0ff 100%, transparent),
    radial-gradient(1.7px 1.7px at 14% 3%, #fff 100%, transparent),
    radial-gradient(1.1px 1.1px at 19% 18%, #ffe8d0 100%, transparent),
    radial-gradient(1px 1px at 23% 7%, #fff 100%, transparent),
    radial-gradient(1.5px 1.5px at 28% 22%, #d0e0ff 100%, transparent),
    radial-gradient(1px 1px at 33% 10%, #fff 100%, transparent),
    radial-gradient(1.8px 1.8px at 37% 16%, #fff 100%, transparent),
    radial-gradient(1px 1px at 41% 25%, #ffe0d0 100%, transparent),
    radial-gradient(1.3px 1.3px at 46% 6%, #e8f0ff 100%, transparent),
    radial-gradient(1px 1px at 50% 20%, #fff 100%, transparent),
    radial-gradient(1.2px 1.2px at 54% 14%, #fff 100%, transparent),
    radial-gradient(1px 1px at 58% 28%, #ffd8c0 100%, transparent),
    radial-gradient(1.6px 1.6px at 62% 8%, #fff 100%, transparent),
    radial-gradient(1px 1px at 66% 18%, #d0e0ff 100%, transparent),
    radial-gradient(1.4px 1.4px at 70% 24%, #fff 100%, transparent),
    radial-gradient(1px 1px at 74% 5%, #e8f0ff 100%, transparent),
    radial-gradient(1.7px 1.7px at 78% 15%, #fff 100%, transparent),
    radial-gradient(1.1px 1.1px at 82% 28%, #ffe8d0 100%, transparent),
    radial-gradient(1px 1px at 86% 10%, #fff 100%, transparent),
    radial-gradient(1.3px 1.3px at 90% 22%, #fff 100%, transparent),
    radial-gradient(1.5px 1.5px at 94% 8%, #e0e8ff 100%, transparent),
    radial-gradient(1px 1px at 96% 20%, #fff 100%, transparent),
    radial-gradient(1px 1px at 5% 35%, #fff 100%, transparent),
    radial-gradient(1.2px 1.2px at 12% 48%, #fff 100%, transparent),
    radial-gradient(1.4px 1.4px at 18% 55%, #ffe8d0 100%, transparent),
    radial-gradient(1px 1px at 25% 42%, #d0e0ff 100%, transparent),
    radial-gradient(1.6px 1.6px at 32% 60%, #fff 100%, transparent),
    radial-gradient(1px 1px at 38% 50%, #fff 100%, transparent),
    radial-gradient(1.3px 1.3px at 44% 68%, #e8f0ff 100%, transparent),
    radial-gradient(1.1px 1.1px at 48% 45%, #ffe0d0 100%, transparent),
    radial-gradient(1px 1px at 52% 62%, #fff 100%, transparent),
    radial-gradient(1.5px 1.5px at 56% 38%, #fff 100%, transparent),
    radial-gradient(1px 1px at 60% 55%, #d0e0ff 100%, transparent),
    radial-gradient(1.2px 1.2px at 64% 70%, #fff 100%, transparent),
    radial-gradient(1.7px 1.7px at 68% 48%, #ffd8c0 100%, transparent),
    radial-gradient(1px 1px at 72% 65%, #fff 100%, transparent),
    radial-gradient(1.4px 1.4px at 76% 42%, #e8f0ff 100%, transparent),
    radial-gradient(1px 1px at 80% 58%, #fff 100%, transparent),
    radial-gradient(1.3px 1.3px at 84% 72%, #fff 100%, transparent),
    radial-gradient(1px 1px at 88% 52%, #ffe8d0 100%, transparent),
    radial-gradient(1.6px 1.6px at 92% 65%, #fff 100%, transparent),
    radial-gradient(1px 1px at 96% 48%, #e0e8ff 100%, transparent),
    radial-gradient(1px 1px at 2% 62%, #fff 100%, transparent),
    radial-gradient(1.2px 1.2px at 10% 78%, #d0e0ff 100%, transparent),
    radial-gradient(1px 1px at 20% 85%, #fff 100%, transparent),
    radial-gradient(1.5px 1.5px at 35% 88%, #fff 100%, transparent),
    radial-gradient(1px 1px at 50% 90%, #ffe0d0 100%, transparent),
    radial-gradient(1.3px 1.3px at 65% 88%, #fff 100%, transparent),
    radial-gradient(1px 1px at 80% 90%, #e8f0ff 100%, transparent),
    radial-gradient(1.4px 1.4px at 95% 88%, #fff 100%, transparent),
    radial-gradient(1px 1px at 7% 92%, #fff 100%, transparent),
    radial-gradient(1.1px 1.1px at 28% 95%, #ffd8c0 100%, transparent),
    radial-gradient(1px 1px at 55% 93%, #fff 100%, transparent),
    radial-gradient(1.5px 1.5px at 75% 95%, #e0e8ff 100%, transparent),
    radial-gradient(1px 1px at 90% 93%, #fff 100%, transparent);
  background-size: 100% 100%;
  animation: st-twinkle 6s ease-in-out infinite alternate;
}
/* 流星 */
.atm-stars::after {
  content: ""; position: absolute; top: 0; left: 0;
  width: 100px; height: 100px;
  background: linear-gradient(225deg,
    rgba(255,255,255,0.95) 0%, rgba(200,225,255,0.5) 18%,
    rgba(150,180,240,0.15) 35%, transparent 55%);
  filter: blur(1.5px); opacity: 0; transform: rotate(-38deg);
  animation: st-meteor 15s linear infinite;
  transform-origin: top left;
}
@keyframes st-twinkle { 0%,100%{opacity:.65} 50%{opacity:1} }
@keyframes st-meteor {
  0%, 86%, 100% { transform: translate(-5vw,-5vh) rotate(-38deg); opacity: 0; }
  87% { opacity: 0.7; }
  93% { transform: translate(55vw,42vh) rotate(-38deg); opacity: 0; }
}

/* ============================================================
   ⚡ 闪电层 — 蛇形分支 + 白闪
   ============================================================ */
.atm-lightning {
  background: rgba(225,238,255,0.82); opacity: 0;
  animation: l-flash 10s ease-in-out infinite;
}
/* 主闪电（蛇形路径） */
.atm-lightning::before {
  content: ""; position: absolute; top: -25px; left: 22%;
  width: 180px; height: 75vh;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='750' viewBox='0 0 180 750' preserveAspectRatio='none'><path d='M95 0 L82 90 L95 92 L65 230 L85 232 L55 370 L75 372 L40 540 L65 542 L20 750 L115 310 L95 312 L120 200 L100 202 L130 70 L110 72 L135 0 Z' fill='white' opacity='0.96'/></svg>") no-repeat center top / contain;
  opacity: 0; animation: l-bolt 10s ease-in-out infinite;
  filter: drop-shadow(0 0 18px rgba(215,230,255,1)) drop-shadow(0 0 35px rgba(175,200,255,0.55));
}
/* 右侧次闪电 */
.atm-lightning::after {
  content: ""; position: absolute; top: -15px; right: 18%;
  width: 140px; height: 55vh;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='550' viewBox='0 0 140 550' preserveAspectRatio='none'><path d='M75 0 L62 80 L78 82 L48 200 L68 202 L38 340 L60 342 L22 550 L90 240 L72 242 L98 130 L80 132 L105 35 Z' fill='white' opacity='0.9'/></svg>") no-repeat center top / contain;
  opacity: 0; animation: l-bolt 10s ease-in-out infinite;
  animation-delay: .22s;
  filter: drop-shadow(0 0 14px rgba(200,220,255,0.85));
}
@keyframes l-flash {
  0%, 78%, 100% { opacity: 0; }
  79% { opacity: .55; }
  80% { opacity: .04; }
  81% { opacity: .88; }
  82% { opacity: .08; }
  86% { opacity: .65; }
  87% { opacity: 0; }
}
@keyframes l-bolt {
  0%, 78%, 100% { opacity: 0; }
  79% { opacity: .55; }
  80% { opacity: 0; }
  81% { opacity: 1; }
  82% { opacity: .15; }
  83% { opacity: .9; }
  84% { opacity: .25; }
  86% { opacity: .7; }
  87% { opacity: 0; }
}

/* ============================================================
   🌸 樱花层 — 5 瓣小花瓣 + 旋转飘落
   ============================================================ */
.atm-petals {
  background-image:
    /* 浅粉樱花 */
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'><g fill='rgba(255,200,210,0.85)'><circle cx='6' cy='2' r='2.2'/><circle cx='2.2' cy='4.2' r='2.2'/><circle cx='9.8' cy='4.2' r='2.2'/><circle cx='2.9' cy='8.5' r='2.2'/><circle cx='9.1' cy='8.5' r='2.2'/></g><circle cx='6' cy='6' r='1' fill='rgba(255,150,170,0.75)'/></svg>"),
    /* 中粉樱花 */
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'><g fill='rgba(255,190,200,0.82)'><circle cx='5' cy='1.6' r='1.8'/><circle cx='1.8' cy='3.5' r='1.8'/><circle cx='8.2' cy='3.5' r='1.8'/><circle cx='2.4' cy='7.1' r='1.8'/><circle cx='7.6' cy='7.1' r='1.8'/></g><circle cx='5' cy='5' r='0.8' fill='rgba(255,140,160,0.7)'/></svg>"),
    /* 纯白樱花瓣 */
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'><g fill='rgba(255,225,235,0.78)'><circle cx='4' cy='1.3' r='1.4'/><circle cx='1.5' cy='2.8' r='1.4'/><circle cx='6.5' cy='2.8' r='1.4'/><circle cx='1.9' cy='5.6' r='1.4'/><circle cx='6.1' cy='5.6' r='1.4'/></g></svg>");
  background-position: 10% -12%, 35% -8%, 70% -5%;
  background-size: 380px 380px, 300px 300px, 240px 240px;
  background-repeat: repeat;
  animation: p-drift 18s linear infinite;
}
@keyframes p-drift {
  0%   { background-position: 10% -12%, 35% -8%, 70% -5%; transform: rotate(0deg); }
  100% { background-position: 18% 112vh, 32% 112vh, 66% 112vh; transform: rotate(22deg); }
}

/* ============================================================
   🍂 秋叶层 — 枫叶形状 + 旋转飘落
   ============================================================ */
.atm-leaves {
  background-image:
    /* 橙色枫叶 */
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'><path d='M8 0 L10 6 L16 8 L10 10 L8 16 L6 10 L0 8 L6 6 Z' fill='rgba(220,120,45,0.85)'/><circle cx='8' cy='8' r='1.5' fill='rgba(180,80,30,0.7)'/></svg>"),
    /* 深红叶 */
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'><path d='M7 0 L8.8 5.2 L14 7 L8.8 8.8 L7 14 L5.2 8.8 L0 7 L5.2 5.2 Z' fill='rgba(185,70,40,0.8)'/><circle cx='7' cy='7' r='1.2' fill='rgba(140,40,20,0.65)'/></svg>"),
    /* 黄叶 */
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'><path d='M6 0 L7.5 4.5 L12 6 L7.5 7.5 L6 12 L4.5 7.5 L0 6 L4.5 4.5 Z' fill='rgba(230,170,70,0.8)'/><circle cx='6' cy='6' r='1' fill='rgba(190,120,40,0.6)'/></svg>");
  background-position: 12% -10%, 45% -6%, 80% -8%;
  background-size: 400px 400px, 340px 340px, 280px 280px;
  background-repeat: repeat;
  animation: lf-drift 20s linear infinite;
}
@keyframes lf-drift {
  0%   { background-position: 12% -10%, 45% -6%, 80% -8%; transform: rotate(0deg); }
  100% { background-position: 20% 112vh, 42% 112vh, 76% 112vh; transform: rotate(30deg); }
}

/* ============================================================
   🌫️ 独立雾层 — z-index:-1 底层容器，绝不覆盖UI
   多层径向渐变 + filter:blur() 生成雾霭
   下浓上淡景深 + 低速横向漂移
   ============================================================ */
.fog-layer {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  display: none;
  overflow: hidden;
  /* 冷调灰‑青天空渐变底色 */
  background: linear-gradient(180deg, #a8b8c4 0%, #b4c4cf 30%, #c0cdd6 55%, #ccd6dd 78%, #d5dde2 100%);
}
/* 多雾团层：下半区浓度更高，向上递减，模拟真实雾景景深 */
.fog-layer::before {
  content: "";
  position: absolute;
  inset: 0;
  /* 5层径向渐变雾团，位置偏中下区域；白雾 vs 灰‑青底，对比明显 */
  background:
    /* 底部厚雾 — 最大不透明度，大面积近白 */
    radial-gradient(ellipse 85% 60% at 48% 95%, rgba(242,245,249,0.92) 0%, transparent 72%),
    /* 中下部雾团 */
    radial-gradient(ellipse 70% 48% at 28% 75%, rgba(238,242,247,0.78) 0%, transparent 68%),
    /* 中部雾区 */
    radial-gradient(ellipse 62% 42% at 72% 56%, rgba(235,240,245,0.60) 0%, transparent 65%),
    /* 中上部薄雾 */
    radial-gradient(ellipse 55% 34% at 38% 38%, rgba(232,237,243,0.38) 0%, transparent 68%),
    /* 顶部极淡雾 */
    radial-gradient(ellipse 48% 28% at 62% 18%, rgba(228,234,241,0.20) 0%, transparent 70%);
  filter: blur(40px);
  animation: fog-drift 20s ease-in-out infinite alternate;
}
/* 次要雾层：错位叠加，增强空间层次 */
.fog-layer::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 75% 52% at 55% 90%, rgba(240,244,248,0.85) 0%, transparent 70%),
    radial-gradient(ellipse 58% 42% at 22% 66%, rgba(236,241,246,0.68) 0%, transparent 65%),
    radial-gradient(ellipse 52% 36% at 78% 44%, rgba(233,238,244,0.45) 0%, transparent 66%),
    radial-gradient(ellipse 44% 30% at 32% 24%, rgba(230,236,242,0.24) 0%, transparent 68%);
  filter: blur(50px);
  animation: fog-drift 24s ease-in-out infinite alternate-reverse;
  animation-delay: -8s;
}
@keyframes fog-drift {
  from { transform: translate3d(-18px, -4px, 0); }
  to   { transform: translate3d(18px, 6px, 0); }
}

/* ============================================================
   🌲 森林光斑 — 透过树叶的光影
   ============================================================ */
.atm-forest-light {
  background:
    radial-gradient(ellipse 120px 200px at 15% 40%, rgba(180,210,150,0.18) 0%, transparent 50%),
    radial-gradient(ellipse 100px 180px at 38% 55%, rgba(170,200,140,0.14) 0%, transparent 50%),
    radial-gradient(ellipse 130px 190px at 58% 42%, rgba(185,215,155,0.16) 0%, transparent 50%),
    radial-gradient(ellipse 110px 170px at 78% 60%, rgba(175,205,145,0.13) 0%, transparent 50%);
  animation: s-breath 7s ease-in-out infinite alternate;
}

/* ============================================================
   🌊 海面 — 波浪反光
   ============================================================ */
.atm-ocean-light {
  background:
    linear-gradient(0deg,
      rgba(90,180,210,0.2) 0%, rgba(100,190,220,0.1) 25%,
      transparent 40%);
  animation: oc-wave 15s ease-in-out infinite alternate;
}
@keyframes oc-wave {
  from { transform: scaleY(1.05); opacity: .8; }
  to   { transform: scaleY(1); opacity: 1; }
}

/* ============================================================
   天气 .w-* — 天空背景 + 天气效果
   ============================================================ */

/* 雨天 — 深灰蓝暗沉天空 (仿雷雨天氛围，稍亮) */
.w-rainy {
  background: 
    linear-gradient(180deg, #1f2838 0%, #2d3a4a 30%, #445566 60%, #5a6d7e 100%);
  position: relative;
}
/* 飘雪 — 乳白天空 */
.w-snowy {
  background: linear-gradient(180deg, #b0bdcc 0%, #cdd5e0 50%, #e5eaf0 100%);
}
/* 晴天 — 淡天蓝→极淡暖金 平滑过渡（纯净柔和，无刺眼高光） */
.w-sunny {
  background: 
    linear-gradient(180deg, #add8f0 0%, #c4e2f5 30%, #dcecf8 60%, #f4efdd 85%, #faf3e0 100%);
}
/* 多云 — 柔和灰蓝色天空底色 */
.w-cloudy {
  background: linear-gradient(180deg, #8eaaba 0%, #9cb2c0 28%, #b1c2ce 58%, #c6d2db 82%, #d4dce3 100%);
}
/* 雾天 — 冷调灰‑青天空渐变 */
.w-foggy {
  background: linear-gradient(180deg, #a0b0bd 0%, #b0c0cb 30%, #bcc9d2 55%, #c8d2d9 78%, #d2d9df 100%);
}
/* 雷雨 — 深黑暗紫天空 */
.w-thunder {
  background: linear-gradient(180deg, #252840 0%, #181a30 50%, #0d0f20 100%);
}

/* ============================================================
   时段 .t-* — 氛围色调 + 太阳/月亮位置
   ============================================================ */

/* 破晓 — 深紫→玫瑰→金色 太阳在地平线 */
.t-dawn {
  --sx: 50%; --sy: 85%;
  background: linear-gradient(180deg, #1e285a 0%, #543a62 35%, #c47570 62%, #e8b070 82%, #f5d890 100%);
}
/* 晨光 — 淡蓝 太阳在左上方 */
.t-morning {
  --sx: 25%; --sy: 22%;
  background: linear-gradient(180deg, #7aafe8 0%, #a8ccea 50%, #dceaf5 100%);
}
/* 正午 — 深蓝 太阳在正上方 */
.t-noon {
  --sx: 50%; --sy: 6%;
  background: linear-gradient(180deg, #3e88e0 0%, #68abf0 40%, #b8dcf8 100%);
}
/* 黄昏 — 深紫→橙色→金色 太阳在地平线 */
.t-sunset {
  --sx: 72%; --sy: 75%;
  background: linear-gradient(180deg, #2a1760 0%, #553a65 28%, #b85848 55%, #e89842 78%, #fad080 100%);
}
/* 暮色 — 深蓝紫 出现星星 */
.t-dusk {
  --sx: 82%; --sy: 88%;
  background: linear-gradient(180deg, #1a1c3a 0%, #342c52 42%, #543c58 72%, #7a4d58 100%);
}
/* 深夜 — 深黑蓝 满星+月亮 */
.t-night {
  --sx: 50%; --sy: -20%;
  background: radial-gradient(ellipse at 50% 100%, #11142a 0%, #07081a 55%, #020410 100%);
}

/* ============================================================
   自然 .n-* — 自然场景叠加效果
   ============================================================ */

/* 森林 — 绿色氛围 + 光斑 */
.n-forest {
  background:
    radial-gradient(ellipse at 50% 75%, rgba(75,135,75,0.35) 0%, transparent 45%),
    radial-gradient(ellipse at 30% 60%, rgba(90,150,85,0.2) 0%, transparent 40%),
    linear-gradient(180deg, #5c7e52 0%, #7e9e6e 38%, #a5be90 100%);
}
/* 海洋 — 深蓝 + 下方反光 */
.n-ocean {
  background:
    linear-gradient(180deg,
      #3e80c8 0%, #5e9fd8 32%, #48b0d2 58%, #3a9cc8 100%);
}
/* 樱花 — 粉色调天空 */
.n-cherry {
  background:
    linear-gradient(180deg, #f2cdda 0%, #ebafc2 48%, #e890a6 100%);
}
/* 秋天 — 橙棕色调 */
.n-autumn {
  background:
    linear-gradient(180deg, #c87838 0%, #d8944e 38%, #e8b878 100%);
}

/* ============================================================
   效果层激活规则
   天气效果:
   ============================================================ */

/* 雨 + 底部水雾 — rainy 和 thunder */
.w-rainy .atm-rain,
.w-thunder .atm-rain { display: block; }

/* 雪 — 由 WeatherFX Canvas 引擎接管；降级时显示地面雪雾 */
.w-snowy .atm-snow { display: block; }

/* 阳光 — sunny + 所有时段 */
:is(.w-sunny,.t-dawn,.t-morning,.t-noon,.t-sunset) .atm-sun { display: block; }

/* 晴天时太阳光晕固定在右上角 */
.w-sunny .atm-sun { --sx: 85%; --sy: 8%; }

/* 晴天稀薄高空云絮（极低透明度，无厚重云朵） */
.w-sunny .atm-clouds {
  display: block;
  opacity: 0.15;
  background-image:
    radial-gradient(ellipse 650px 22px at 18% 10%, rgba(255,255,255,0.22) 0%, transparent 78%),
    radial-gradient(ellipse 520px 18px at 55% 7%, rgba(255,255,255,0.18) 0%, transparent 78%),
    radial-gradient(ellipse 480px 20px at 82% 13%, rgba(255,255,255,0.2) 0%, transparent 78%);
  animation: c-settle 100s ease-in-out infinite alternate;
}
.w-sunny .atm-clouds::before,
.w-sunny .atm-clouds::after {
  display: none;
}

/* 月亮 + 星 — night */
.t-night .atm-moon,
.t-night .atm-stars,
.t-dusk .atm-stars { display: block; }

/* 闪电 — thunder */
.w-thunder .atm-lightning { display: block; }

/* 云 — 大部分天气都有云层 */
:is(.w-cloudy,.w-snowy,.w-thunder,.n-ocean,.t-dawn,.t-morning,.t-dusk) .atm-clouds { display: block; }
.w-snowy .atm-clouds { opacity: 0.65; }
.w-thunder .atm-clouds { opacity: 0.35; }
.t-dawn .atm-clouds { opacity: 0.3; }
.t-dusk .atm-clouds { opacity: 0.25; }

/* 雾 — w-foggy / n-forest 激活 */
:is(.w-foggy,.n-forest) .fog-layer { display: block; }
/* 雾天互斥：隐藏所有其他天气粒子 */
.w-foggy :is(.atm-sun,.atm-clouds,.atm-rain,.atm-snow,.atm-lightning,.atm-stars) { display: none !important; }
/* 樱花/秋叶/森林光斑/海洋波光 */
.n-cherry .atm-petals { display: block; }
.n-autumn .atm-leaves { display: block; }
.n-forest .atm-forest-light { display: block; }
.n-ocean .atm-ocean-light { display: block; }

/* WeatherFX 画布接管 — 隐藏被替代的旧 CSS 天气层 */
.atmosphere.fx-canvas:is(.w-rainy,.w-thunder) .atm-rain,
.atmosphere.fx-canvas.w-snowy .atm-snow,
.atmosphere.fx-canvas.w-thunder .atm-lightning,
.atmosphere.fx-canvas.w-sunny .atm-sun,
.atmosphere.fx-canvas:is(.w-rainy,.w-snowy,.w-cloudy,.w-thunder) .atm-clouds { display: none; }
/* 非晴天天气 + Canvas 活跃 → 隐藏太阳光晕层（避免 z-index:5 覆盖 Canvas 渲染） */
.atmosphere.fx-canvas:is(.w-rainy,.w-thunder,.w-snowy,.w-cloudy,.w-foggy) .atm-sun { display: none !important; }

/* 背景纹理 */
body::before {
  position: fixed;
  inset: 0;
  z-index: -3;
  content: "";
  opacity: 0.06;
  background-image:
    linear-gradient(rgba(128, 128, 128, 0.3) 1px, transparent 1px),
    linear-gradient(90deg, rgba(128, 128, 128, 0.3) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, black, transparent 78%);
}

/* 环境光晕 */
.ambient {
  position: fixed;
  z-index: -2;
  width: 24rem;
  height: 24rem;
  border-radius: 999px;
  filter: blur(90px);
  opacity: 0.28;
  animation: drift 16s ease-in-out infinite alternate;
}
.ambient-one {
  top: 6%;
  left: -8rem;
  background: var(--accent);
}
.ambient-two {
  right: -10rem;
  bottom: 8%;
  background: var(--accent);
  animation-delay: -5s;
  opacity: 0.18;
}
@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(2rem, -1.5rem, 0) scale(1.1); }
}

a { color: inherit; text-decoration: none; }

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

/* ---------- 顶部导航 ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem clamp(1rem, 4vw, 3rem);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.50);
  backdrop-filter: blur(24px) saturate(1.4);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.20) inset,
    0 2px 16px rgba(0, 0, 0, 0.12),
    0 -1px 0 rgba(0, 0, 0, 0.04) inset;
  transition: border-color 0.3s ease;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
}

.brand-mark {
  display: block;
  width: 2.6rem;
  height: 2.6rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  object-fit: cover;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  transition: transform 0.2s ease;
}
.brand:hover .brand-mark { transform: rotate(-6deg) scale(1.05); }

.brand strong, .brand small { display: block; }
.brand small {
  color: var(--muted);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
}

.nav {
  display: flex;
  gap: 0.3rem;
  padding: 0.3rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.44);
  backdrop-filter: blur(8px);
}
.nav-tab {
  padding: 0.5rem 0.8rem;
  border-radius: var(--radius-xs);
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 500;
  border: 0;
  background: transparent;
  cursor: pointer;
  transition: 0.2s ease;
}
.nav-tab:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.18);
}
.nav-tab.active {
  color: #0f1a2e;
  background: rgba(255, 255, 255, 0.9);
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.user-badge {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.8rem 0.35rem 0.35rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.44);
  backdrop-filter: blur(8px);
  font-size: 0.88rem;
  cursor: pointer;
  transition: 0.2s ease;
}
.user-badge:hover {
  border-color: rgba(255, 255, 255, 0.14);
}
.user-badge .avatar {
  margin: 0;
  width: 1.8rem;
  height: 1.8rem;
  font-size: 0.85rem;
  border-radius: 50%;
}

/* ---------- 主内容 ---------- */
main {
  width: min(1100px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2.5rem 0 4rem;
}

/* ---------- 公告条 ---------- */
.retro-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: 0.55rem 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.44);
  backdrop-filter: blur(12px);
  font-size: 0.85rem;
  color: var(--ink);
}
.retro-bar span:first-child {
  flex-shrink: 0;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-xs);
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 900;
  font-size: 0.75rem;
}
.retro-bar marquee {
  flex: 1;
  color: var(--ink);
}

/* ---------- Hero ---------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.5fr);
  gap: 1rem;
  align-items: center;
  min-height: 280px;
}

.home-minimal {
  display: flex;
  justify-content: center;
  min-height: 170px;
}

.home-minimal .hero-panel {
  width: 100%;
}

.hero-copy,
.hero-panel,
.block,
.side-card,
.toolbar {
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: calc(var(--radius) * 1.2);
  background: rgba(255, 255, 255, 0.38);
  backdrop-filter: blur(22px) saturate(1.8);
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.16),
    0 4px 16px rgba(0, 0, 0, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    inset 0 -1px 0 rgba(0, 0, 0, 0.08),
    0 0 0 1px rgba(255, 255, 255, 0.05);
  transition: all 0.4s cubic-bezier(0.215, 0.61, 0.355, 1);
  overflow: hidden;
}

/* 多层玻璃质感：主折射光 */
.hero-copy::before,
.hero-panel::before,
.block::before,
.side-card::before,
.toolbar::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.00) 0%,
    rgba(255, 255, 255, 0.02) 20%,
    rgba(255, 255, 255, 0.08) 50%,
    rgba(255, 255, 255, 0.02) 80%,
    rgba(255, 255, 255, 0.00) 100%
  );
  pointer-events: none;
  z-index: 0;
  transform: rotate(-15deg);
  opacity: 0.6;
}

/* 边缘内发光 */
.hero-copy::after,
.hero-panel::after,
.block::after,
.side-card::after,
.toolbar::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: 
    inset 0 0 0 1px rgba(255, 255, 255, 0.2),
    inset 0 0 40px rgba(255, 255, 255, 0.05);
  pointer-events: none;
  z-index: 1;
}

.hero-copy:hover,
.hero-panel:hover,
.block:hover,
.side-card:hover,
.toolbar:hover {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.42);
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.22),
    0 6px 24px rgba(0, 0, 0, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.45),
    inset 0 -1px 0 rgba(0, 0, 0, 0.06),
    0 0 0 1px rgba(255, 255, 255, 0.08);
  transform: translateY(-2px);
}

.hero-copy > *,
.hero-panel > *,
.block > *,
.side-card > *,
.toolbar > * {
  position: relative;
  z-index: 2;
}

.hero-copy {
  position: relative;
  padding: clamp(1.8rem, 4vw, 3rem);
  overflow: hidden;
}

.eyebrow {
  margin: 0 0 0.7rem;
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

h1, h2, h3, p { margin-top: 0; }

h1 {
  max-width: 600px;
  margin-bottom: 1rem;
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 4vw, 3.6rem);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.04em;
}

h2 {
  margin-bottom: 0;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 2.5vw, 2.4rem);
  font-weight: 400;
}

h3 { margin-bottom: 0.6rem; font-size: 1.05rem; }

.hero-desc {
  max-width: 520px;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.8;
}

.hero-actions,
.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.4rem;
}

/* ---------- 按钮 ---------- */
.primary-button,
.secondary-button,
.ghost-button,
.text-button {
  cursor: pointer;
  border: 0;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.6rem;
  padding: 0.7rem 1.1rem;
  border: 1px solid var(--accent-strong);
  border-radius: var(--radius-sm);
  color: var(--on-accent);
  background: linear-gradient(var(--accent), var(--accent-strong));
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.25), 0 6px 18px var(--accent-glow);
  font-weight: 900;
}
.primary-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px var(--accent-glow);
}

.secondary-button,
.ghost-button,
.text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.6rem;
  padding: 0.7rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.44);
  backdrop-filter: blur(6px);
}

.text-button {
  min-height: 2.2rem;
  color: var(--accent);
  background: rgba(255, 255, 255, 0.42);
  border-color: rgba(255, 255, 255, 0.15);
}

.secondary-button:hover,
.ghost-button:hover,
.text-button:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.35);
}

/* ---------- Hero 面板 ---------- */
.hero-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.8rem;
  padding: 1rem;
}

.mini-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.6rem;
}
.mini-grid div {
  padding: 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.38);
  backdrop-filter: blur(8px);
  text-align: center;
}
.mini-grid strong,
.mini-grid span { display: block; }
.mini-grid strong {
  font-size: 1.5rem;
  color: var(--accent);
}
.mini-grid span {
  color: var(--muted);
  font-size: 0.78rem;
}

/* ---------- 工具栏 ---------- */
.toolbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1rem 0;
  padding: 0.85rem;
}

.search-box {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 0.6rem;
  min-width: 200px;
  padding: 0 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.38);
  backdrop-filter: blur(8px);
}
.search-box input,
.publish-form input,
.publish-form select,
.publish-form textarea,
.dialog input {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.38);
  outline: none;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.search-box input {
  min-height: 2.6rem;
  border: 0;
  background: transparent;
}
.search-box input:focus,
.publish-form input:focus,
.publish-form select:focus,
.publish-form textarea:focus,
.dialog input:focus {
  border-color: rgba(255, 255, 255, 0.18);
}

/* ---------- 标签 ---------- */
.chip-row,
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.chip,
.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.4rem 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-xs);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.44);
  backdrop-filter: blur(6px);
  font-size: 0.8rem;
  transition: 0.2s ease;
}
.chip { cursor: pointer; }
.chip:hover,
.tag:hover {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.1);
}
.chip.active {
  color: var(--on-accent);
  background: var(--accent);
  border-color: rgba(255, 255, 255, 0.18);
}

/* ---------- 内容网格 ---------- */
.section-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 1rem;
  align-items: start;
}

.section-grid.single {
  grid-template-columns: 1fr;
}

/* ---------- 信息页网格 ---------- */
.info-layout {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: auto auto auto;
  gap: 1rem;
}

.info-stats-wide {
  grid-column: 1 / -1;
}
.info-stats-wide .mini-grid {
  grid-template-columns: repeat(4, 1fr);
}

.info-tools {
  grid-column: 1 / 3;
}

.info-about {
  grid-column: 3 / 4;
}

.info-tags {
  grid-column: 1 / 2;
}

.info-members {
  grid-column: 2 / 4;
}

.portal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 280px;
  gap: 1rem;
  margin-top: 1rem;
}

.retro-box,
.retro-section {
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: calc(var(--radius) * 1.2);
  background: rgba(255, 255, 255, 0.36);
  backdrop-filter: blur(20px) saturate(1.6);
  box-shadow:
    0 14px 48px rgba(0, 0, 0, 0.14),
    0 6px 20px rgba(0, 0, 0, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.32),
    inset 0 -1px 0 rgba(0, 0, 0, 0.06),
    0 0 0 1px rgba(255, 255, 255, 0.06);
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.215, 0.61, 0.355, 1);
}

/* 更细腻的玻璃折射光 */
.retro-section::before,
.retro-box::before {
  content: "";
  position: absolute;
  top: -60%;
  left: -40%;
  width: 180%;
  height: 220%;
  background: 
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.15) 0%, transparent 60%),
    linear-gradient(
      125deg,
      rgba(255, 255, 255, 0.00) 0%,
      rgba(255, 255, 255, 0.04) 25%,
      rgba(255, 255, 255, 0.10) 50%,
      rgba(255, 255, 255, 0.04) 75%,
      rgba(255, 255, 255, 0.00) 100%
    );
  pointer-events: none;
  z-index: 0;
  transform: rotate(-12deg);
  opacity: 0.5;
}

/* 边缘内发光增强 */
.retro-section::after,
.retro-box::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: 
    inset 0 0 0 1px rgba(255, 255, 255, 0.25),
    inset 0 0 60px rgba(255, 255, 255, 0.08);
  pointer-events: none;
  z-index: 1;
}

.retro-section > *,
.retro-box > * {
  position: relative;
  z-index: 2;
}

.retro-section:hover,
.retro-box:hover {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.42);
  box-shadow:
    0 22px 64px rgba(0, 0, 0, 0.22),
    0 8px 28px rgba(0, 0, 0, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    inset 0 -1px 0 rgba(0, 0, 0, 0.08),
    0 0 0 1px rgba(255, 255, 255, 0.1);
  transform: translateY(-3px);
}

.retro-box {
  padding: 1rem;
}

.retro-box h3 {
  margin: -1rem -1rem 0.8rem;
  padding: 0.55rem 0.8rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.42);
  color: var(--ink);
}

.latest-list {
  display: grid;
  gap: 0.45rem;
}

.latest-item {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.42rem 0;
  border-bottom: 1px dotted rgba(255, 255, 255, 0.1);
  color: var(--muted);
  font-size: 0.88rem;
}

.latest-item strong {
  color: var(--ink);
  font-weight: 700;
}

.button-wall {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.board-tools {
  margin-bottom: 0.9rem;
  padding: 0.6rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.38);
  backdrop-filter: blur(8px);
}

.content-column,
.sidebar {
  display: grid;
  gap: 1rem;
}

.block,
.side-card {
  padding: clamp(1rem, 2vw, 1.4rem);
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.card-list,
.forum-board {
  display: grid;
  gap: 0.8rem;
}

/* ---------- 卡片 ---------- */
.content-card,
.post-card {
  position: relative;
  overflow: hidden;
  padding: 1.4rem;
  border: 1px solid var(--glass-border);
  border-radius: calc(var(--radius-sm) * 1.4);
  background: var(--glass-bg);
  backdrop-filter: blur(16px) saturate(1.8);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.12),
    0 4px 16px rgba(0, 0, 0, 0.08),
    inset 0 1px 0 var(--glass-highlight),
    inset 0 -1px 0 rgba(0, 0, 0, 0.06),
    0 0 0 1px var(--glass-border);
  transition: all 0.3s cubic-bezier(0.215, 0.61, 0.355, 1);
  cursor: pointer;
}

/* 卡片内容层 */
.content-card > *,
.post-card > * {
  position: relative;
  z-index: 2;
}

.content-card:hover,
.post-card:hover {
  border-color: var(--glass-border);
  background: var(--glass-bg);
  box-shadow:
    0 24px 72px rgba(0, 0, 0, 0.28),
    0 12px 40px rgba(0, 0, 0, 0.18),
    inset 0 1px 0 var(--glass-highlight),
    inset 0 -1px 0 rgba(0, 0, 0, 0.08),
    0 0 0 1px var(--glass-border);
  transform: translateY(-4px) scale(1.02);
}

/* 点击按住时的玻璃特效 */
.content-card:active,
.post-card:active {
  border-color: var(--glass-border);
  background: var(--glass-bg);
  box-shadow:
    0 32px 96px rgba(0, 0, 0, 0.36),
    0 16px 48px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 var(--glass-highlight),
    inset 0 -1px 0 rgba(0, 0, 0, 0.1),
    0 0 0 1px var(--glass-border),
    0 0 30px var(--accent-glow);
  transform: translateY(-2px) scale(0.98);
}

@keyframes glassPulse {
  0% {
    box-shadow:
      0 20px 64px rgba(0, 0, 0, 0.24),
      0 8px 32px rgba(0, 0, 0, 0.16),
      inset 0 1px 0 rgba(255, 255, 255, 0.4),
      inset 0 -1px 0 rgba(0, 0, 0, 0.08),
      0 0 0 1px rgba(255, 255, 255, 0.15);
  }
  50% {
    box-shadow:
      0 28px 80px rgba(0, 0, 0, 0.32),
      0 12px 40px rgba(0, 0, 0, 0.2),
      inset 0 1px 0 rgba(255, 255, 255, 0.5),
      inset 0 -1px 0 rgba(0, 0, 0, 0.1),
      0 0 0 1px rgba(255, 255, 255, 0.2),
      0 0 20px var(--accent-glow);
  }
  100% {
    box-shadow:
      0 24px 72px rgba(0, 0, 0, 0.28),
      0 12px 40px rgba(0, 0, 0, 0.18),
      inset 0 1px 0 rgba(255, 255, 255, 0.45),
      inset 0 -1px 0 rgba(0, 0, 0, 0.08),
      0 0 0 1px rgba(255, 255, 255, 0.2);
  }
}

@keyframes glassPress {
  0% {
    transform: translateY(-4px) scale(1.02);
  }
  100% {
    transform: translateY(-2px) scale(0.98);
  }
}

.content-card.featured::before,
.content-card.pinned::before,
.post-card.pinned::before {
  position: absolute;
  top: 0;
  right: 1rem;
  padding: 0.3rem 0.5rem;
  border-radius: 0 0 var(--radius-xs) var(--radius-xs);
  color: var(--on-accent);
  background: var(--accent);
  font-size: 0.72rem;
  font-weight: 900;
  content: "精华";
}
.content-card.pinned::before,
.post-card.pinned::before { content: "置顶"; }

/* 卡片动态光点（玻璃水珠感） */
.content-card .glass-dot {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.6) 0%, rgba(255,255,255,0.15) 50%, transparent 70%);
  pointer-events: none;
  animation: glassFloat 8s ease-in-out infinite;
  opacity: 0;
}
.content-card:nth-child(3n+1) .glass-dot {
  top: 8%;
  right: 12%;
  animation-delay: 0s;
}
.content-card:nth-child(3n+2) .glass-dot {
  top: 5%;
  right: 25%;
  animation-delay: 2.5s;
  width: 10px;
  height: 10px;
}
.content-card:nth-child(3n+3) .glass-dot {
  top: 10%;
  right: 18%;
  animation-delay: 5s;
  width: 14px;
  height: 14px;
}

@keyframes glassFloat {
  0%, 100% { opacity: 0; transform: translateY(0) scale(0.8); }
  20% { opacity: 0.8; transform: translateY(-2px) scale(1); }
  50% { opacity: 0.4; transform: translateY(4px) scale(0.9); }
  80% { opacity: 0; transform: translateY(8px) scale(0.7); }
}

.article-card .comments {
  background: rgba(255, 255, 255, 0.44);
  margin-inline: -0.35rem;
  padding-inline: 0.35rem;
  border-radius: var(--radius-sm);
}

.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.6rem;
}

.card-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
}

.meta {
  color: var(--dim);
  font-size: 0.8rem;
}

.excerpt {
  color: var(--muted);
  line-height: 1.75;
  font-size: 0.95rem;
}

.card-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-top: 0.8rem;
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.small-button {
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-xs);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.44);
  backdrop-filter: blur(6px);
  padding: 0.4rem 0.65rem;
  font-size: 0.82rem;
  transition: 0.2s ease;
}
.small-button:hover {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.38);
}
.small-button.active {
  border-color: rgba(255, 255, 255, 0.18);
  color: var(--on-accent);
  background: var(--accent);
  font-weight: 600;
}
.small-button.danger:hover {
  color: #fff;
  border-color: rgba(231, 76, 60, 0.5);
  background: rgba(231, 76, 60, 0.15);
}

/* ---------- 评论 ---------- */
.comments {
  display: grid;
  gap: 0.5rem;
  margin-top: 0.8rem;
  padding-top: 0.8rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.comment {
  color: var(--muted);
  font-size: 0.88rem;
}
.comment strong { color: var(--ink); }
.comment-author-link {
  color: var(--ink);
  transition: color 0.15s ease, text-decoration 0.15s ease;
}
.comment-author-link:hover {
  color: var(--primary, #818cf8);
  text-decoration: underline;
}

.comment-form {
  display: flex;
  gap: 0.4rem;
  margin-top: 0.6rem;
}
.comment-form input {
  flex: 1;
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.38);
  padding: 0.55rem 0.8rem;
  outline: none;
}
.comment-form input:focus { border-color: rgba(255, 255, 255, 0.14); }

/* ── 评论操作按钮 ── */
.comment-actions {
  display: inline-flex;
  gap: 3px;
  align-items: center;
  vertical-align: middle;
  opacity: 0;
  transition: opacity 0.15s ease;
}
.comment:hover .comment-actions {
  opacity: 1;
}
.comment-action-btn {
  padding: 0.15rem 0.45rem;
  border: none;
  border-radius: 0.3rem;
  background: rgba(255,255,255,0.08);
  color: var(--muted);
  font-size: 0.72rem;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  line-height: 1.4;
}
.comment-action-btn:hover {
  background: var(--primary, rgba(99,102,241,0.3));
  color: #fff;
}
.comment-action-btn.danger:hover {
  background: rgba(239,68,68,0.4);
}

/* ── 子回复列表 ── */
.reply-list {
  margin-left: 1.2rem;
  padding-left: 0.6rem;
  border-left: 2px solid rgba(255,255,255,0.08);
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.comment.reply {
  font-size: 0.83rem;
  padding: 0.3rem 0;
}

/* ── 内联编辑表单 ── */
.comment-edit-form {
  display: inline-flex;
  gap: 0.3rem;
  align-items: center;
  flex: 1;
  min-width: 0;
}
.comment-edit-form input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--primary, rgba(99,102,241,0.4));
  border-radius: 0.3rem;
  background: rgba(255,255,255,0.1);
  color: var(--ink);
  padding: 0.25rem 0.5rem;
  font-size: 0.82rem;
  font-family: inherit;
  outline: none;
}
.comment-edit-form input:focus {
  border-color: var(--primary, #6366f1);
  box-shadow: 0 0 0 2px rgba(99,102,241,0.15);
}

/* ---------- 侧边栏 ---------- */
.side-card p {
  color: var(--ink);
  line-height: 1.7;
  font-size: 0.92rem;
}

.member {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.member:last-child { border-bottom: 0; }

.avatar {
  display: inline-grid;
  width: 2rem;
  height: 2rem;
  margin-right: 0.45rem;
  place-items: center;
  border-radius: var(--radius-sm);
  color: var(--on-accent);
  background: var(--accent);
  font-weight: 900;
  font-size: 0.85rem;
}

.role {
  color: var(--green);
  font-size: 0.78rem;
}

/* ---------- 发布 ---------- */
.publish { margin-top: 1rem; }

.draft-indicator {
  color: var(--muted);
  font-size: 0.82rem;
}

.publish-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.publish-form label,
.dialog label {
  display: grid;
  gap: 0.4rem;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 600;
}

.publish-form input,
.publish-form select,
.publish-form textarea,
.dialog input {
  min-height: 2.6rem;
  padding: 0.7rem 0.9rem;
  border-radius: var(--radius-sm);
}

.publish-form textarea {
  resize: vertical;
  line-height: 1.7;
}

.wide { grid-column: 1 / -1; }

/* ---------- 对话框 ---------- */
.dialog {
  width: min(640px, calc(100% - 2rem));
  border: 0;
  border-radius: calc(var(--radius) * 1.5);
  color: var(--ink);
  background: transparent;
}
.dialog::backdrop {
  background: rgba(0, 0, 0, 0.48);
  backdrop-filter: blur(12px) saturate(1.4);
}

/* ============================================
   文章详情弹窗 · 玻璃拟态面板
   ============================================ */
#articleDetailDialog {
  width: 100vw;
  max-width: 100vw;
  height: 100vh;
  max-height: 100vh;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  z-index: 100;
}
/* 底层遮罩：灰色弱化后方页面，与首页色调一致 */
#articleDetailDialog::backdrop {
  background: rgba(28, 29, 32, 0.35);
  backdrop-filter: blur(4px) saturate(0.8);
}
/* 滚动容器：灰色底，与首页色调一致 */
#articleDetailDialog .dialog-card {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  max-width: none;
  max-height: 100vh;
  height: 100vh;
  margin: 0;
  padding: 2rem 1rem 3rem;
  overflow-y: auto;
  border: none;
  border-radius: 0;
  background: var(--bg);
  backdrop-filter: none;
  box-shadow: none;
  gap: normal;
}
#articleDetailDialog .dialog-card::before,
#articleDetailDialog .dialog-card::after {
  display: none !important;
}
/* ── 玻璃拟态内容面板：复用首页 content-card 材质 ── */
#articleDetailDialog .dialog-card .detail-panel {
  position: relative;
  width: 100%;
  max-width: 720px;
  padding: 2rem 2.2rem;
  border: 1px solid var(--glass-border);
  border-radius: calc(var(--radius-sm) * 1.4);
  background: var(--glass-bg);
  backdrop-filter: blur(16px) saturate(1.8);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.12),
    0 4px 16px rgba(0, 0, 0, 0.08),
    inset 0 1px 0 var(--glass-highlight),
    inset 0 -1px 0 rgba(0, 0, 0, 0.06);
  color: var(--ink);
  z-index: auto;
}
#articleDetailDialog .dialog-card .detail-panel > * {
  position: relative;
  z-index: 2;
}
/* 面板内文字回退到主题默认 */
#articleDetailDialog .dialog-card .detail-panel h2 {
  color: var(--ink);
  margin-bottom: 0.6rem;
}
#articleDetailDialog .dialog-card .detail-panel .meta {
  color: var(--dim);
  margin-bottom: 1rem;
}
#articleDetailDialog .dialog-card .detail-panel .dialog-body {
  color: var(--ink);
  white-space: pre-wrap;
  line-height: 1.85;
  font-size: 0.95rem;
}
#articleDetailDialog .dialog-card .detail-panel .dialog-body strong {
  color: var(--ink);
}
#articleDetailDialog .dialog-card .detail-panel .dialog-body em {
  color: var(--dim);
}
#articleDetailDialog .dialog-card .detail-panel .eyebrow {
  color: var(--accent);
  margin-bottom: 0.4rem;
}
#articleDetailDialog .dialog-card .detail-panel hr {
  border: none;
  border-top: 1px solid var(--surface-line);
  margin: 1.2rem 0;
}
#articleDetailDialog .dialog-card .detail-panel .tag {
  color: var(--accent);
  background: var(--surface-soft);
  border: 1px solid var(--surface-line);
}
/* ── 关闭按钮：固定于视口右上角，不随内容滚动 ── */
#articleDetailDialog .dialog-close {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 110;
  width: 2.4rem;
  height: 2.4rem;
  background: var(--surface);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 50%;
  color: var(--ink);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all 0.2s ease;
}
#articleDetailDialog .dialog-close:hover {
  background: var(--surface-strong);
  color: var(--ink);
  border-color: var(--accent);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  transform: scale(1.08);
}
/* ── 文章详情弹窗内按钮：白色底 + 黑色字 ── */
#articleDetailDialog .detail-panel .small-button {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(0, 0, 0, 0.1);
  color: #1a1a1a;
  font-weight: 500;
}
#articleDetailDialog .detail-panel .small-button:hover {
  background: rgba(255, 255, 255, 1);
  border-color: rgba(0, 0, 0, 0.18);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
#articleDetailDialog .detail-panel .small-button.danger {
  color: #c0392b;
}
#articleDetailDialog .detail-panel .small-button.danger:hover {
  background: rgba(255, 240, 240, 1);
  border-color: rgba(192, 57, 43, 0.3);
}
/* ── 文章详情弹窗内灰色框文字：提高对比度 ── */
#articleDetailDialog .detail-panel .tag {
  color: var(--ink);
  background: var(--surface-strong);
  border: 1px solid var(--surface-line);
  font-weight: 500;
}
#articleDetailDialog .detail-panel .meta {
  color: var(--muted);
  font-weight: 500;
}
#articleDetailDialog .detail-panel .comment {
  background: var(--surface-soft);
  border-radius: var(--radius-xs);
  padding: 0.5rem 0.7rem;
  margin-bottom: 0.4rem;
}
#articleDetailDialog .detail-panel .comment strong {
  color: var(--ink);
}

.dialog-card {
  position: relative;
  display: grid;
  gap: 1.2rem;
  padding: 1.8rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: calc(var(--radius) * 1.4);
  background: rgba(255, 255, 255, 0.52);
  backdrop-filter: blur(32px) saturate(1.8);
  box-shadow:
    0 24px 72px rgba(0, 0, 0, 0.32),
    0 8px 24px rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    inset 0 -1px 0 rgba(0, 0, 0, 0.12),
    0 0 0 1px rgba(255, 255, 255, 0.12);
  overflow: hidden;
  transition: all 0.3s ease;
}

/* 弹窗高级玻璃折射 */
.dialog-card::before {
  content: "";
  position: absolute;
  top: -60%;
  left: -60%;
  width: 220%;
  height: 220%;
  background: 
    radial-gradient(circle at 25% 25%, rgba(255, 255, 255, 0.2) 0%, transparent 50%),
    linear-gradient(
      145deg,
      rgba(255, 255, 255, 0.00) 0%,
      rgba(255, 255, 255, 0.05) 20%,
      rgba(255, 255, 255, 0.12) 40%,
      rgba(255, 255, 255, 0.18) 50%,
      rgba(255, 255, 255, 0.05) 80%,
      rgba(255, 255, 255, 0.00) 100%
    );
  pointer-events: none;
  z-index: 0;
  transform: rotate(-18deg);
  opacity: 0.6;
}

.dialog-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: 
    inset 0 0 0 1px rgba(255, 255, 255, 0.35),
    inset 0 0 80px rgba(255, 255, 255, 0.15);
  pointer-events: none;
  z-index: 1;
}

.dialog-card > * {
  position: relative;
  z-index: 2;
}

.dialog-card:hover {
  background: rgba(255, 255, 255, 0.58);
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow:
    0 32px 96px rgba(0, 0, 0, 0.38),
    0 12px 36px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.45),
    inset 0 -1px 0 rgba(0, 0, 0, 0.15),
    0 0 0 1px rgba(255, 255, 255, 0.18);
}

.dialog-body {
  color: var(--muted);
  line-height: 1.8;
  font-size: 0.92rem;
}
.dialog-body p { margin: 0.5rem 0; }
.dialog-body ul, .dialog-body ol {
  padding-left: 1.5rem;
  margin: 0.5rem 0;
}
.dialog-body li { margin: 0.3rem 0; }
.dialog-body strong { color: var(--ink); }
.dialog-body em { color: var(--dim); }

.preview-card .content-card {
  background: rgba(255, 255, 255, 0.42);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  padding: 1rem;
}
.preview-card .card-title {
  margin: 0 0 0.4rem 0;
  font-size: 1.1rem;
}
.preview-card .meta {
  color: var(--dim);
  font-size: 0.82rem;
}
.preview-card .excerpt {
  color: var(--muted);
  line-height: 1.8;
  margin: 0.8rem 0;
  white-space: pre-wrap;
  word-break: break-word;
}
.preview-card .card-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.6rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.preview-card .tag {
  color: var(--accent);
  font-size: 0.8rem;
  background: rgba(255, 255, 255, 0.42);
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
}
.preview-card .chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.dialog-close {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(8px);
  width: 2.2rem;
  height: 2.2rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  transition: all 0.25s ease;
}
.dialog-close:hover {
  background: rgba(255, 255, 255, 0.5);
  border-color: rgba(255, 255, 255, 0.35);
  color: var(--ink);
  transform: scale(1.08);
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}
.dialog-close:active {
  transform: scale(0.95);
}

/* ============================================
   黑金玻璃·登录注册 — 完整设计稿集成
   基于 auth-design-preview.html
   所有样式作用域限定在 #authDialog 内
   ============================================ */

/* ========== Auth 设计令牌（黑金体系 · 金属金 #D4AF37 系）========== */
#authDialog {
  --ad-ink: #FFF8E7;
  --ad-muted: #E8D9A0;
  --ad-dim: #B8A570;
  --ad-accent: #D4AF37;
  --ad-accent-strong: #C9A227;
  --ad-gold-light: #E6C547;
  --ad-gold-mid: #D4AF37;
  --ad-gold-deep: #B8860B;
  --ad-gold-shadow: #8B6914;
  --ad-green: #9ACD32;
  --ad-teal: #20B2AA;
  --ad-danger: #DC143C;
  --ad-warn: #FFA500;
  --ad-glass-bg: rgba(15,12,8,0.55);
  --ad-glass-bg-strong: rgba(15,12,8,0.7);
  --ad-glass-bg-soft: rgba(15,12,8,0.4);
  --ad-glass-border: rgba(212,175,55,0.4);
  --ad-glass-border-soft: rgba(212,175,55,0.22);
  --ad-field-bg: rgba(20,16,10,0.6);
  --ad-field-bg-focus: rgba(25,20,12,0.75);
  --ad-shadow-soft: 0 8px 24px rgba(0,0,0,0.5);
  --ad-shadow-card: 0 24px 70px rgba(0,0,0,0.6), 0 8px 28px rgba(0,0,0,0.4);
  --ad-shadow-inner: inset 0 1px 1px rgba(212,175,55,0.22), inset 0 -1px 1px rgba(0,0,0,0.4);
  --ad-r-lg: 28px;
  --ad-r-md: 18px;
  --ad-r-sm: 12px;
}

/* ========== Auth 弹窗外层 ========== */
#authDialog.dialog {
  padding: 0;
  border: 0;
  background: transparent;
  overflow: visible;
  width: min(520px, calc(100% - 2rem));
  max-width: 560px;
}
#authDialog::backdrop {
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(10px);
}
#authDialog .auth-dialog-close {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  z-index: 10;
  width: 2.2rem;
  height: 2.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: rgba(212,175,55,0.15);
  color: var(--ad-muted);
  font-size: 1.3rem;
  cursor: pointer;
  transition: all 0.25s ease;
}
#authDialog .auth-dialog-close:hover {
  background: rgba(212,175,55,0.3);
  color: var(--ad-ink);
  transform: rotate(90deg);
}

/* ========== 玻璃卡片容器（从设计稿搬运）========== */
#authDialog .card-wrap {
  position: relative;
  padding: 4px;
}
#authDialog .card-wrap::before {
  content: "";
  position: absolute;
  bottom: 20px;
  left: 20px;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212,175,55,0.12) 0%, transparent 70%);
  pointer-events: none;
  filter: blur(12px);
  z-index: 0;
}
#authDialog .card-deco {
  position: absolute;
  inset: 0;
  border-radius: calc(var(--ad-r-lg) + 4px);
  z-index: 1;
  background: linear-gradient(135deg, rgba(212,175,55,0.5), rgba(230,197,71,0) 40%, rgba(184,134,11,0.35) 80%, rgba(212,175,55,0.4));
  -webkit-mask: linear-gradient(#000,#000) content-box, linear-gradient(#000,#000);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  padding: 1px;
  pointer-events: none;
  opacity: 0.85;
}
#authDialog .card {
  position: relative;
  z-index: 2;
  background: var(--ad-glass-bg);
  backdrop-filter: blur(60px) saturate(200%) brightness(1.1);
  border: 1px solid var(--ad-glass-border);
  border-radius: var(--ad-r-lg);
  box-shadow: var(--ad-shadow-card), var(--ad-shadow-inner), inset 0 1px 2px rgba(212,175,55,0.25);
  padding: clamp(28px, 3.4vw, 40px) clamp(26px, 3vw, 36px);
  overflow-y: auto;
  overflow-x: hidden;
  max-height: 90vh;
}
#authDialog .card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(180deg, rgba(212,175,55,0.12) 0%, rgba(230,197,71,0.06) 30%, transparent 100%);
  pointer-events: none;
  border-radius: var(--ad-r-lg) var(--ad-r-lg) 0 0;
}
#authDialog .card::after {
  content: "";
  position: absolute;
  top: 10px;
  right: 10px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(230,197,71,0.3) 0%, rgba(212,175,55,0.15) 30%, transparent 70%);
  pointer-events: none;
  filter: blur(8px);
}

/* ========== 卡片头部 ========== */
#authDialog .card-head {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 30px;
}
#authDialog .card-title {
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-weight: 700;
  font-size: 26px;
  letter-spacing: 0.04em;
  color: var(--ad-ink);
  margin: 0;
}
#authDialog .card-title .accent {
  color: var(--ad-accent);
}
#authDialog .card-sub {
  font-family: "Noto Sans SC", "PingFang SC", sans-serif;
  font-size: 13px;
  color: var(--ad-dim);
  margin-top: 4px;
  letter-spacing: 0.06em;
  font-weight: 300;
}

/* ========== 状态切换 Tab ========== */
#authDialog .tabs {
  position: relative;
  z-index: 2;
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  background: rgba(15,12,8,0.5);
  border: 1px solid var(--ad-glass-border-soft);
  border-radius: 14px;
  box-shadow: var(--ad-shadow-inner);
}
#authDialog .tab {
  border: none;
  background: transparent;
  cursor: pointer;
  font-family: "Noto Sans SC", "PingFang SC", sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: var(--ad-dim);
  padding: 8px 16px;
  border-radius: 10px;
  transition: all .35s cubic-bezier(.2,.7,.2,1);
  letter-spacing: 0.08em;
}
#authDialog .tab.active {
  background: linear-gradient(135deg, rgba(212,175,55,0.22), rgba(230,197,71,0.12));
  color: var(--ad-accent);
  text-shadow: 0 0 8px rgba(212,175,55,0.4);
  box-shadow: 0 4px 12px rgba(212,175,55,0.25), inset 0 1px 1px rgba(230,197,71,0.25);
}

/* ========== 表单容器 ========== */
#authDialog .forms {
  position: relative;
  z-index: 2;
  min-height: 280px;
}
#authDialog .form {
  display: grid;
  gap: 18px;
  grid-template-columns: 1fr 1fr;
}
#authDialog .form-state {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateY(14px);
  pointer-events: none;
  transition: opacity .45s ease, transform .45s cubic-bezier(.2,.7,.2,1);
}
#authDialog .form-state.active {
  position: relative;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* ========== 字段 ========== */
#authDialog .field {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
#authDialog .field.col-2 {
  grid-column: 1 / -1;
}
#authDialog .field-label {
  font-family: "Noto Sans SC", "PingFang SC", sans-serif;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ad-muted);
  letter-spacing: 0.1em;
  display: flex;
  align-items: center;
  gap: 6px;
}
#authDialog .field-label .req {
  color: var(--ad-accent);
  font-size: 10px;
}

/* ========== 输入框玻璃感 + 金色聚焦光晕 ========== */
#authDialog .input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--ad-field-bg);
  border: 1px solid var(--ad-glass-border-soft);
  border-radius: var(--ad-r-sm);
  backdrop-filter: blur(20px) saturate(150%);
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.3);
  transition: all .3s cubic-bezier(.2,.7,.2,1);
}
#authDialog .input-wrap:hover {
  border-color: rgba(212,175,55,0.4);
  background: var(--ad-field-bg-focus);
}
#authDialog .input-wrap.focused {
  border-color: var(--ad-accent);
  background: var(--ad-field-bg-focus);
  box-shadow: 0 0 0 4px rgba(212,175,55,0.18), 0 0 20px rgba(212,175,55,0.25), inset 0 1px 2px rgba(0,0,0,0.3);
  transform: translateY(-1px);
}
#authDialog .input-icon {
  display: grid;
  place-items: center;
  width: 42px;
  flex-shrink: 0;
  color: var(--ad-dim);
  transition: color .3s;
}
#authDialog .input-wrap.focused .input-icon {
  color: var(--ad-accent);
}
#authDialog .input-icon svg {
  width: 18px;
  height: 18px;
}
#authDialog .input-wrap input,
#authDialog .input-wrap select {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  font-family: "Noto Sans SC", "PingFang SC", sans-serif;
  font-size: 15px;
  color: var(--ad-ink);
  padding: 13px 14px 13px 0;
  font-weight: 400;
  -webkit-appearance: none;
}
#authDialog .input-wrap input::placeholder {
  color: var(--ad-dim);
  font-weight: 300;
}
#authDialog .input-wrap select {
  cursor: pointer;
}
#authDialog .input-wrap select:invalid {
  color: var(--ad-dim);
}
#authDialog .input-wrap option {
  color: #FFF8E7;
  background: #0a0805;
}

/* ========== 密码可见切换 ========== */
#authDialog .toggle-eye {
  border: none;
  background: transparent;
  cursor: pointer;
  width: 40px;
  height: 100%;
  display: grid;
  place-items: center;
  color: var(--ad-dim);
  transition: color .3s;
}
#authDialog .toggle-eye:hover {
  color: var(--ad-accent);
}
#authDialog .toggle-eye svg {
  width: 18px;
  height: 18px;
}

/* ========== 密码强度条（金色系） ========== */
#authDialog .strength {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
#authDialog .strength-bar {
  display: flex;
  gap: 6px;
}
#authDialog .strength-seg {
  flex: 1;
  height: 5px;
  border-radius: 3px;
  background: rgba(212,175,55,0.12);
  overflow: hidden;
  position: relative;
  transition: background .4s;
}
#authDialog .strength-seg.on::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, currentColor, color-mix(in srgb, currentColor 60%, #E6C547));
  box-shadow: 0 0 10px currentColor;
}
#authDialog .strength-seg.weak { color: var(--ad-danger); }
#authDialog .strength-seg.med  { color: var(--ad-warn); }
#authDialog .strength-seg.strong { color: #D4AF37; }
#authDialog .strength-label {
  font-family: "Noto Sans SC", "PingFang SC", sans-serif;
  font-size: 11.5px;
  color: var(--ad-dim);
  letter-spacing: 0.1em;
  display: flex;
  justify-content: space-between;
}
#authDialog .strength-label .lvl {
  font-weight: 600;
  transition: color .3s;
}
#authDialog .strength-label .lvl.weak { color: var(--ad-danger); }
#authDialog .strength-label .lvl.med  { color: var(--ad-warn); }
#authDialog .strength-label .lvl.strong { color: #D4AF37; }

/* ========== 复选框（选中态金色金属感） ========== */
#authDialog .check {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-family: "Noto Sans SC", "PingFang SC", sans-serif;
  font-size: 13px;
  color: var(--ad-muted);
  user-select: none;
}
#authDialog .check input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
#authDialog .check .box {
  width: 18px;
  height: 18px;
  border-radius: 6px;
  flex-shrink: 0;
  border: 1.5px solid var(--ad-glass-border-soft);
  background: rgba(20,16,10,0.6);
  display: grid;
  place-items: center;
  transition: all .3s;
}
#authDialog .check .box svg {
  width: 11px;
  height: 11px;
  color: #fff;
  opacity: 0;
  transform: scale(0.5);
  transition: all .25s;
}
#authDialog .check input:checked + .box {
  background: linear-gradient(135deg, #B8860B, #D4AF37, #E6C547);
  border-color: var(--ad-accent);
  box-shadow: 0 3px 8px rgba(212,175,55,0.4), inset 0 1px 1px rgba(255,255,255,0.4);
}
#authDialog .check input:checked + .box svg {
  opacity: 1;
  transform: scale(1);
}
#authDialog .check a {
  color: var(--ad-accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(212,175,55,0.25);
  transition: border-color .3s;
}
#authDialog .check a:hover {
  border-color: var(--ad-accent);
}

/* ========== 行内flex ========== */
#authDialog .row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  grid-column: 1 / -1;
}
#authDialog .link-btn {
  border: none;
  background: transparent;
  cursor: pointer;
  font-family: "Noto Sans SC", "PingFang SC", sans-serif;
  font-size: 13px;
  color: var(--ad-accent);
  padding: 4px 0;
  transition: color .3s;
  letter-spacing: 0.04em;
}
#authDialog .link-btn:hover {
  color: var(--ad-gold-light);
}

/* ========== 错误提示 ========== */
#authDialog .auth-error {
  grid-column: 1 / -1;
  padding: 0.7rem 1rem;
  border-radius: 10px;
  background: rgba(220,20,60,0.15);
  border: 1px solid rgba(220,20,60,0.35);
  color: #ff6b6b;
  font-size: 0.85rem;
  text-align: center;
}

/* ========== 主按钮（金灿灿金属金子感 · 三层金属渐变 + 扫光） ========== */
#authDialog .btn-primary {
  grid-column: 1 / -1;
  position: relative;
  border: none;
  cursor: pointer;
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.3em;
  color: #1a140f;
  padding: 15px 24px;
  border-radius: var(--ad-r-sm);
  background: linear-gradient(135deg, #8B6914 0%, #B8860B 20%, #D4AF37 50%, #B8860B 80%, #8B6914 100%);
  background-size: 200% 200%;
  box-shadow: 0 10px 28px rgba(212,175,55,0.4), inset 0 1px 2px rgba(255,255,255,0.5), inset 0 -1px 2px rgba(139,105,20,0.6);
  overflow: hidden;
  transition: all .35s cubic-bezier(.2,.7,.2,1);
  margin-top: 6px;
  text-shadow: 0 1px 1px rgba(230,197,71,0.4);
}
#authDialog .btn-primary::before {
  content: "";
  position: absolute;
  top: 0;
  left: -60%;
  width: 50%;
  height: 100%;
  background: linear-gradient(110deg, transparent, rgba(255,255,255,0.7), transparent);
  transform: skewX(-20deg);
  transition: left .7s;
}
#authDialog .btn-primary:hover {
  transform: translateY(-2px);
  background-position: 100% 100%;
  box-shadow: 0 16px 40px rgba(212,175,55,0.5), inset 0 1px 2px rgba(255,255,255,0.6), inset 0 -1px 2px rgba(139,105,20,0.7);
}
#authDialog .btn-primary:hover::before {
  left: 130%;
}
#authDialog .btn-primary:active {
  transform: translateY(0) scale(0.985);
}
#authDialog .btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* ========== 忘记密码步骤提示 ========== */
#authDialog .step-hint {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: "Noto Sans SC", "PingFang SC", sans-serif;
  font-size: 12px;
  color: var(--ad-dim);
  letter-spacing: 0.12em;
  padding: 10px 14px;
  border-radius: var(--ad-r-sm);
  background: rgba(212,175,55,0.08);
  border: 1px dashed rgba(212,175,55,0.35);
}
#authDialog .step-hint .num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  flex-shrink: 0;
  background: linear-gradient(135deg, #B8860B, #D4AF37, #E6C547);
  color: #fff;
  display: grid;
  place-items: center;
  font-family: "Noto Serif SC", serif;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 0 12px rgba(212,175,55,0.35);
}
#authDialog .step-hint .num.done {
  background: linear-gradient(135deg, var(--ad-green), #b6d44a);
}
#authDialog .question-display {
  grid-column: 1 / -1;
  padding: 14px 16px;
  border-radius: var(--ad-r-sm);
  background: linear-gradient(135deg, rgba(212,175,55,0.1), rgba(230,197,71,0.05));
  border: 1px solid rgba(212,175,55,0.28);
  font-family: "Noto Serif SC", serif;
  font-size: 14.5px;
  color: var(--ad-ink);
  line-height: 1.6;
}
#authDialog .question-display .q-label {
  display: block;
  font-family: "Noto Sans SC", "PingFang SC", sans-serif;
  font-size: 11px;
  color: var(--ad-accent);
  letter-spacing: 0.2em;
  margin-bottom: 6px;
  font-weight: 500;
}
#authDialog .back-link {
  grid-column: 1 / -1;
  text-align: center;
  font-family: "Noto Sans SC", "PingFang SC", sans-serif;
  font-size: 13px;
  color: var(--ad-dim);
}
#authDialog .back-link a {
  color: var(--ad-accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(212,175,55,0.25);
  transition: border-color .3s;
}
#authDialog .back-link a:hover {
  border-color: var(--ad-accent);
}

/* ========== staggered 入场动画 ========== */
#authDialog .form-state.active .field,
#authDialog .form-state.active .strength,
#authDialog .form-state.active .check,
#authDialog .form-state.active .row-between,
#authDialog .form-state.active .btn-primary,
#authDialog .form-state.active .step-hint,
#authDialog .form-state.active .question-display,
#authDialog .form-state.active .back-link {
  animation: authFadeUp .6s cubic-bezier(.2,.7,.2,1) backwards;
}
#authDialog .form-state.active > *:nth-child(1)  { animation-delay: .05s; }
#authDialog .form-state.active > *:nth-child(2)  { animation-delay: .12s; }
#authDialog .form-state.active > *:nth-child(3)  { animation-delay: .19s; }
#authDialog .form-state.active > *:nth-child(4)  { animation-delay: .26s; }
#authDialog .form-state.active > *:nth-child(5)  { animation-delay: .33s; }
#authDialog .form-state.active > *:nth-child(6)  { animation-delay: .4s; }
#authDialog .form-state.active > *:nth-child(7)  { animation-delay: .47s; }
#authDialog .form-state.active > *:nth-child(8)  { animation-delay: .54s; }
#authDialog .form-state.active > *:nth-child(9)  { animation-delay: .61s; }
#authDialog .form-state.active > *:nth-child(10) { animation-delay: .68s; }

@keyframes authFadeUp {
  0%   { opacity: 0; transform: translateY(16px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* ========== Toast（玻璃金边） ========== */
.toast {
  position: fixed;
  top: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(-30px);
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(30px);
  color: #FFF8E7;
  font-family: "Noto Sans SC", "PingFang SC", sans-serif;
  font-size: 13.5px;
  padding: 12px 22px;
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.5), 0 0 20px rgba(212,175,55,0.15);
  opacity: 0;
  pointer-events: none;
  z-index: 10000;
  transition: all .4s cubic-bezier(.2,.7,.2,1);
  letter-spacing: 0.06em;
  border: 1px solid rgba(212,175,55,0.35);
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.toast.success {
  background: linear-gradient(135deg, rgba(154,205,50,0.95), rgba(32,178,170,0.92));
  border-color: rgba(154,205,50,0.6);
  box-shadow: 0 12px 32px rgba(0,0,0,0.5), 0 0 20px rgba(154,205,50,0.3);
}
.toast.error {
  background: linear-gradient(135deg, rgba(220,20,60,0.95), rgba(160,30,50,0.95));
  border-color: rgba(220,20,60,0.6);
  box-shadow: 0 12px 32px rgba(0,0,0,0.5), 0 0 20px rgba(220,20,60,0.3);
}

/* ========== Modal 弹窗（社区准则 / 创作公约）—— 玻璃金边强化 ========== */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s ease, visibility .3s ease;
}
.modal-overlay.show {
  opacity: 1;
  visibility: visible;
}
.modal-card {
  position: relative;
  width: min(560px, 92vw);
  max-height: 86vh;
  display: flex;
  flex-direction: column;
  padding: 32px 30px 26px;
  border-radius: 28px;
  background: rgba(15,12,8,0.7);
  backdrop-filter: blur(50px) saturate(200%);
  border: 1px solid rgba(212,175,55,0.35);
  box-shadow: 0 30px 80px rgba(0,0,0,0.6), 0 10px 30px rgba(0,0,0,0.4), inset 0 1px 2px rgba(212,175,55,0.25), inset 0 -1px 1px rgba(0,0,0,0.4);
  overflow: hidden;
  transform: translateY(18px) scale(.97);
  transition: transform .35s cubic-bezier(.2,.7,.3,1);
}
.modal-overlay.show .modal-card {
  transform: translateY(0) scale(1);
}
.modal-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(230,197,71,0.15), transparent 40%, transparent 60%, rgba(212,175,55,0.08));
}
.modal-card > * {
  position: relative;
  z-index: 1;
}
.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: rgba(212,175,55,0.12);
  color: #E8D9A0;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: .2s;
}
.modal-close:hover {
  background: rgba(212,175,55,0.28);
  color: #FFF8E7;
  transform: rotate(90deg);
}
.modal-head {
  text-align: center;
  margin-bottom: 18px;
}
.modal-eyebrow {
  font-size: 11px;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: #D4AF37;
  font-weight: 700;
  margin: 0 0 6px;
}
.modal-title {
  font-family: "Noto Serif SC", serif;
  font-weight: 900;
  font-size: 26px;
  color: #FFF8E7;
  margin: 0 0 6px;
  letter-spacing: .04em;
}
.modal-sub {
  font-size: 13px;
  color: #E8D9A0;
  margin: 0;
}
.modal-body {
  overflow-y: auto;
  padding: 4px 6px;
  margin: 0 -6px;
  flex: 1;
}
.modal-body::-webkit-scrollbar {
  width: 6px;
}
.modal-body::-webkit-scrollbar-thumb {
  background: rgba(212,175,55,0.3);
  border-radius: 3px;
}
.pact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: pact;
}
.pact-list li {
  position: relative;
  padding: 12px 12px 12px 46px;
  margin-bottom: 8px;
  border-radius: 14px;
  background: rgba(20,16,10,0.6);
  border: 1px solid rgba(212,175,55,0.22);
  font-size: 14px;
  line-height: 1.6;
  color: #FFF8E7;
  counter-increment: pact;
}
.pact-list li::before {
  content: counter(pact, decimal-leading-zero);
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-family: "Noto Serif SC", serif;
  font-weight: 900;
  font-size: 11px;
  color: #D4AF37;
  background: rgba(212,175,55,0.14);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pact-list li b {
  color: #C9A227;
  font-weight: 700;
  margin-right: 4px;
}
.modal-ok {
  margin-top: 18px;
  width: 100%;
}
body.modal-lock {
  overflow: hidden;
}

/* ========== 头像裁剪弹窗 ========== */
.crop-card {
  width: min(480px, 92vw);
  padding: 24px 20px 20px;
}
.crop-container {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  max-height: 55vh;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: rgba(0,0,0,0.35);
  cursor: grab;
  margin: 8px 0 12px;
}
.crop-container:active { cursor: grabbing; }
.crop-container canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.crop-frame {
  position: absolute;
  inset: 0;
  border: 2px solid rgba(212,175,55,0.7);
  border-radius: inherit;
  pointer-events: none;
  transition: border-color .3s;
}
.crop-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}
.crop-zoom-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--muted);
}
.crop-zoom-label input[type="range"] {
  width: 120px;
  accent-color: #D4AF37;
}
.crop-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}
.crop-actions .btn-secondary {
  padding: 10px 22px;
  border-radius: var(--radius-xs);
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  color: var(--muted);
  cursor: pointer;
  font-size: 0.9rem;
  transition: all .2s;
}
.crop-actions .btn-secondary:hover {
  background: rgba(255,255,255,0.14);
  color: var(--ink);
}
/* ========== 响应式 Auth ========== */
@media (max-width: 520px) {
  #authDialog .card {
    padding: 24px 20px;
    border-radius: 22px;
  }
  #authDialog .form {
    grid-template-columns: 1fr;
  }
  #authDialog .card-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }
  #authDialog .tabs {
    width: 100%;
    justify-content: space-between;
  }
  #authDialog .tab {
    flex: 1;
    text-align: center;
    padding: 8px 8px;
    font-size: 12px;
  }
  #authDialog .card-title {
    font-size: 22px;
  }
  #authDialog .input-wrap input,
  #authDialog .input-wrap select {
    font-size: 14px;
    padding: 12px 12px 12px 0;
  }
  #authDialog .btn-primary {
    font-size: 15px;
    padding: 14px 20px;
    letter-spacing: 0.2em;
  }
  #authDialog .row-between {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }
  .modal-card {
    padding: 26px 18px 20px;
    border-radius: 22px;
  }
  .modal-title {
    font-size: 22px;
  }
  .pact-list li {
    font-size: 13px;
    padding: 11px 10px 11px 42px;
  }
}

@media (prefers-reduced-motion: reduce) {
  #authDialog *,
  .toast,
  .modal-overlay {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================
   移动端响应式适配
   级联顺序：大断点在前 → 小断点在后 → 触摸设备
   ============================================ */

/* ---------- 触摸设备：关闭 hover 位移，避免点击后残留悬浮 ---------- */
@media (hover: none) {
  .retro-section:hover,
  .retro-box:hover,
  .content-card:hover,
  .post-card:hover,
  .hero-copy:hover,
  .hero-panel:hover,
  .block:hover,
  .side-card:hover,
  .toolbar:hover,
  .dialog-card:hover,
  .brand:hover .brand-mark,
  .nav-tab:hover,
  .small-button:hover,
  .chip:hover,
  .secondary-button:hover,
  .ghost-button:hover,
  .text-button:hover,
  .user-badge:hover {
    transform: none;
  }
  .nav-tab,
  .small-button,
  .set-tab,
  .set-scene-card,
  .ghost-button,
  .primary-button,
  .secondary-button {
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.05);
  }
}

/* ---------- 平板（≤768px）：中等屏微调 ---------- */
@media (max-width: 768px) {
  main {
    width: min(100% - 1.5rem, 1100px);
    padding: 1.8rem 0 3rem;
  }
  .content-card,
  .post-card {
    padding: 1.2rem;
  }
  .card-title {
    font-size: 1.05rem;
  }
  .button-wall {
    gap: 0.35rem;
  }
  .board-tools {
    padding: 0.5rem;
  }
  .type-stats-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
  }
}

/* ---------- 手机/小平板（≤640px）：nav 换行 + 紧凑文字风格，单列布局 ---------- */
@media (max-width: 640px) {
  .topbar {
    flex-wrap: wrap;
    gap: 0.4rem;
    padding: 0.5rem 0.7rem;
  }
  .brand {
    gap: 0.5rem;
    flex-shrink: 0;
  }
  .brand strong { font-size: 0.95rem; }
  .brand small { display: none; }
  .brand-mark { width: 1.8rem; height: 1.8rem; }

  /* nav 换行到下一行，保持纯文字按钮风格 */
  .nav {
    order: 3;
    flex: 1 0 100%;
    justify-content: space-between;
    gap: 0.2rem;
    padding: 0.12rem;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.44);
    backdrop-filter: blur(8px);
  }
  .nav-tab {
    flex: 1;
    padding: 0.4rem 0.3rem;
    font-size: 0.82rem;
    text-align: center;
    white-space: nowrap;
  }
  .nav-tab.active {
    color: var(--on-accent);
    background: var(--accent);
    font-weight: 700;
    box-shadow: 0 2px 8px var(--accent-glow);
    border: 0;
  }

  .topbar-right {
    gap: 0.3rem;
    flex-shrink: 0;
  }
  .ghost-button {
    min-height: 2rem;
    padding: 0.45rem 0.65rem;
    font-size: 0.76rem;
  }
  .user-badge {
    padding: 0.25rem 0.6rem 0.25rem 0.25rem;
    font-size: 0.8rem;
  }
  .user-badge .avatar {
    width: 1.5rem;
    height: 1.5rem;
    font-size: 0.72rem;
  }

  main {
    width: 100%;
    margin: 0;
    padding: 1rem 0.8rem 3rem;
  }

  .retro-bar {
    padding: 0.4rem 0.6rem;
    font-size: 0.78rem;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .home-minimal { min-height: 120px; }
  h1 { font-size: 1.8rem; }
  h2 { font-size: 1.4rem; }
  .hero-copy { padding: 1.4rem; }
  .hero-desc { font-size: 0.9rem; line-height: 1.7; }

  .toolbar {
    padding: 0.7rem;
  }
  .search-box input {
    min-height: 2.4rem;
    font-size: 0.9rem;
  }
  .filter-group {
    flex-wrap: wrap;
    gap: 0.3rem;
  }
  .filter-group-label { font-size: 0.72rem; }
  .small-button {
    padding: 0.35rem 0.6rem;
    font-size: 0.78rem;
  }

  .section-grid.single,
  .section-grid {
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }
  .info-layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    gap: 0.7rem;
  }
  /* 重置所有 info-layout 子元素的列跨度，避免越界解析冲突 */
  .info-stats-wide,
  .info-type-stats,
  .info-tools,
  .info-about,
  .info-tags,
  .info-members {
    grid-column: auto;
    grid-row: auto;
  }
  .info-stats-wide .mini-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }
  .block, .hero-copy, .hero-panel, .side-card, .toolbar {
    padding: 1rem;
    border-radius: var(--radius-md);
  }
  .section-title {
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  .card-list { gap: 0.7rem; }

  .publish-form { gap: 0.7rem; }
  .publish-form label { font-size: 0.85rem; }
  .publish-form input,
  .publish-form select,
  .publish-form textarea {
    min-height: 2.4rem;
    font-size: 0.9rem;
  }
  .form-actions { flex-direction: column; }
  .form-actions .primary-button,
  .form-actions .secondary-button {
    width: 100%;
  }
  .button-wall {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.4rem;
  }
  .button-wall .small-button {
    padding: 0.5rem 0.4rem;
    text-align: center;
  }

  .mini-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }
  .mini-grid > div { padding: 0.7rem 0.4rem; }
  .mini-grid strong { font-size: 1.4rem; }
  .mini-grid span { font-size: 0.72rem; }

  /* 设置弹窗全屏 */
  .set-overlay { padding: 0; }
  .set-window {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
    width: 100vw;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
    border: 0;
  }
  .set-sidebar {
    flex-direction: row;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.6rem;
    border-right: 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }
  .set-brand {
    display: none !important;
  }
  .set-nav {
    flex-direction: row;
    gap: 0.2rem;
    flex: 1;
  }
  .set-tab {
    flex-shrink: 0;
    padding: 0.4rem 0.7rem;
    font-size: 0.78rem;
    border-radius: var(--radius-2xs);
  }
  .set-tab-icon { width: auto; margin-right: 0.2rem; }
  .set-pane-head { padding: 0.9rem 1rem 0.7rem; }
  .set-pane-head h3 { font-size: 1.05rem; }
  .set-pane-head p { font-size: 0.78rem; }
  .set-pane-body {
    padding: 0.9rem 1rem 1.4rem;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .set-close {
    top: 0.55rem;
    right: 0.55rem;
    width: 2.2rem;
    height: 2.2rem;
    font-size: 1.2rem;
    background: rgba(0, 0, 0, 0.06);
    color: var(--muted);
    border-radius: 50%;
    border: 0;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .set-scene-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }
  .set-scene-preview { height: 48px; }
  .set-scene-label { font-size: 0.75rem; }
  .set-form-grid { grid-template-columns: 1fr; }
  .set-field input,
  .set-field select { min-height: 2.4rem; font-size: 0.9rem; }
  .set-toggle-row { padding: 0.7rem 0.6rem; }
  .set-toggle-info strong { font-size: 0.88rem; }
  .set-toggle-info small { font-size: 0.72rem; }

  /* 登录注册弹窗全屏 */
  #authDialog .card {
    width: 100%;
    border-radius: 0;
  }
  #authDialog .tabs { gap: 0.3rem; }
  #authDialog .tab { flex: 1; padding: 0.6rem 0.4rem; font-size: 0.85rem; }

  .primary-button,
  .secondary-button,
  .ghost-button {
    min-height: 2.4rem;
  }
}

/* ---------- 手机（≤520px）：更紧凑的卡片/表单 ---------- */
@media (max-width: 520px) {
  .brand-mark { width: 1.6rem; height: 1.6rem; }
  .brand strong { font-size: 0.85rem; }
  .ghost-button { padding: 0.4rem 0.55rem; font-size: 0.74rem; min-height: 1.9rem; }

  .retro-bar span:first-child { padding: 0.15rem 0.4rem; font-size: 0.68rem; }

  .toolbar { padding: 0.6rem; gap: 0.55rem; }
  .search-box { min-width: 0; padding: 0 0.7rem; }
  .search-box input { min-height: 2.5rem; font-size: 0.9rem; }
  .board-tools { padding: 0.45rem; gap: 0.3rem; }
  .board-tools .small-button { padding: 0.4rem 0.6rem; font-size: 0.76rem; }

  .content-card,
  .post-card {
    padding: 0.85rem;
    border-radius: calc(var(--radius-sm) * 1.1);
  }
  .card-head { gap: 0.5rem; margin-bottom: 0.4rem; }
  .card-title { font-size: 0.95rem; }
  .meta { font-size: 0.74rem; }
  .excerpt { font-size: 0.86rem; line-height: 1.6; }
  .card-footer { flex-direction: column; align-items: stretch; gap: 0.5rem; margin-top: 0.6rem; }
  .card-actions { gap: 0.3rem; display: flex; flex-wrap: wrap; }
  .card-actions .small-button { padding: 0.35rem 0.5rem; font-size: 0.74rem; flex: 1 1 auto; min-width: 44px; text-align: center; }

  .small-button, .chip, .text-button { min-height: 36px; }

  .comments { margin-top: 0.5rem; padding-top: 0.5rem; }
  .comment { font-size: 0.82rem; }
  .comment-form { gap: 0.3rem; margin-top: 0.5rem; }
  .comment-form input { padding: 0.45rem 0.6rem; font-size: 0.84rem; min-height: 2.3rem; }
  .comment-form .small-button { padding: 0.45rem 0.6rem; white-space: nowrap; }

  .publish-form { grid-template-columns: 1fr; }
  .publish-form .wide { grid-column: 1; }
  .publish-form input,
  .publish-form select,
  .publish-form textarea { min-height: 2.3rem; font-size: 0.88rem; padding: 0.55rem 0.7rem; }
  .publish-form textarea { min-height: 8rem; }
  .form-actions .primary-button,
  .form-actions .secondary-button { flex: 1; min-height: 2.5rem; }

  #articleDetailDialog .dialog-close { top: 0.6rem; right: 0.6rem; width: 2rem; height: 2rem; }
  #articleDetailDialog .dialog-card .detail-panel { padding: 1.2rem 1rem; max-width: 100%; border-radius: calc(var(--radius-sm) * 1); }

  .dialog { width: min(100% - 0.8rem, 560px); }
  .dialog-card { padding: 1rem; border-radius: calc(var(--radius) * 1); }
  .preview-card .content-card { padding: 0.7rem; }

  .toast { top: auto; bottom: 1.5rem; }
  .toast.show { transform: translateX(-50%) translateY(0); }
  .notification { bottom: 1rem !important; left: 50% !important; right: auto !important; transform: translateX(-50%) !important; max-width: calc(100% - 2rem); }
}

/* ---------- 小屏手机（≤380px）：进一步压缩 ---------- */
@media (max-width: 380px) {
  main { padding: 0.8rem 0.6rem 2rem; }
  .topbar {
    padding: 0.4rem 0.5rem;
    gap: 0.3rem;
  }
  .brand-mark {
    width: 1.6rem;
    height: 1.6rem;
  }
  .brand strong { font-size: 0.8rem; }
  .ghost-button {
    padding: 0.35rem 0.5rem;
    font-size: 0.72rem;
    min-height: 1.9rem;
  }
  #loginBtn {
    font-size: 0;
    padding: 0.35rem 0.55rem;
  }
  #loginBtn::before {
    content: "登录";
    font-size: 0.72rem;
  }
  .hero-copy { padding: 1.1rem; }
  h1 { font-size: 1.55rem; }
  .content-card,
  .post-card {
    padding: 0.85rem;
  }
  .card-title { font-size: 0.95rem; }
  .excerpt { font-size: 0.86rem; }
  .card-actions .small-button {
    padding: 0.35rem 0.5rem;
    font-size: 0.72rem;
  }
  .button-wall { grid-template-columns: 1fr; }
  .type-stats-grid { grid-template-columns: repeat(2, 1fr); }
  .set-scene-grid { grid-template-columns: 1fr; }
  .set-tab span:not(.set-tab-icon) { display: none; }
  .set-tab-icon { margin-right: 0; }
  .nav-tab { font-size: 0.7rem; padding: 0.35rem 0.15rem; }
}

/* ---------- 横屏手机：降低顶部导航高度 ---------- */
@media (max-width: 900px) and (orientation: landscape) and (max-height: 480px) {
  .topbar { padding: 0.3rem 0.6rem; }
  .nav { padding: 0.08rem; }
  .nav-tab {
    padding: 0.25rem 0.2rem;
    font-size: 0.74rem;
  }
  .set-window {
    grid-template-rows: auto 1fr;
    height: 100vh;
  }
  .set-pane-body { padding: 0.7rem 1rem 1rem; }
}

/* ============================================================
   内容类型扩展样式（v14 新增）
   ============================================================ */

/* ---------- 首页筛选分组 ---------- */
.filter-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.7rem;
  padding: 0.5rem 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.32);
  backdrop-filter: blur(8px);
}

.filter-group-label {
  flex: 0 0 auto;
  color: var(--dim);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding-right: 0.3rem;
  border-right: 1px solid rgba(0, 0, 0, 0.08);
  margin-right: 0.2rem;
}

.filter-group .small-button {
  padding: 0.32rem 0.6rem;
  font-size: 0.78rem;
}

/* ---------- 卡片类型差异化 ---------- */
.content-card.type-note {
  padding: 1rem 1.2rem;
}

.content-card.type-note .excerpt {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--ink);
}

.content-card.type-question .card-title {
  color: var(--accent);
}

.content-card.type-vote,
.content-card.type-link,
.content-card.type-image {
  padding-bottom: 1.1rem;
}

/* ---------- 链接卡片 ---------- */
.card-link-preview {
  display: grid;
  gap: 0.6rem;
  margin: 0.3rem 0 0.6rem;
}

.link-card {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(6px);
  color: var(--ink);
  text-decoration: none;
  transition: all 0.2s ease;
}

.link-card:hover {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.66);
  transform: translateX(2px);
}

.link-card .link-icon {
  flex: 0 0 auto;
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(var(--accent-rgb, 21, 101, 192), 0.12);
  font-size: 1rem;
}

.link-card .link-text {
  flex: 1 1 auto;
  display: grid;
  gap: 0.15rem;
  min-width: 0;
}

.link-card .link-text strong {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.link-card .link-text small {
  font-size: 0.74rem;
  color: var(--dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.link-card .link-arrow {
  flex: 0 0 auto;
  color: var(--accent);
  font-weight: 700;
  font-size: 1rem;
}

.detail-link-card {
  margin: 0.5rem 0 0.8rem;
}

/* ---------- 图片预览 ---------- */
.card-image-preview {
  display: grid;
  gap: 0.55rem;
  margin: 0.3rem 0 0.6rem;
}

.card-image {
  width: 100%;
  max-height: 320px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(0, 0, 0, 0.04);
  cursor: zoom-in;
  transition: transform 0.25s ease;
}

.card-image:hover {
  transform: scale(1.01);
}

.detail-image {
  width: 100%;
  max-height: 480px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  margin: 0.5rem 0;
  background: rgba(0, 0, 0, 0.04);
}

/* ---------- 投票选项 ---------- */
.card-vote-preview {
  display: grid;
  gap: 0.55rem;
  margin: 0.3rem 0 0.6rem;
}

.vote-options {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.4rem;
}

.vote-option {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.42);
  backdrop-filter: blur(4px);
  cursor: pointer;
  transition: all 0.2s ease;
}

.vote-option:hover {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.62);
  transform: translateX(2px);
}

.vote-option-index {
  flex: 0 0 auto;
  width: 1.5rem;
  height: 1.5rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 0.74rem;
  font-weight: 700;
}

.vote-option-text {
  flex: 1 1 auto;
  font-size: 0.92rem;
  color: var(--ink);
  word-break: break-word;
}

.vote-hint {
  margin: 0;
  color: var(--dim);
  font-size: 0.78rem;
  font-style: italic;
}

.detail-vote-options {
  margin: 0.5rem 0;
}

/* ---------- 发布表单：动态字段 ---------- */
.publish-form label.wide[hidden],
.publish-form label[hidden] {
  display: none !important;
}

#voteOptionsInput {
  font-family: inherit;
  line-height: 1.7;
}

#bodyLabelText {
  font-weight: 600;
}

/* ---------- 信息页：内容类型分布 ---------- */
.info-type-stats .type-stats-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.5rem;
}

.type-stat-item {
  display: grid;
  justify-items: center;
  gap: 0.25rem;
  padding: 0.7rem 0.4rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.42);
  backdrop-filter: blur(6px);
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.type-stat-item:hover {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.62);
  transform: translateY(-2px);
}

.type-stat-icon {
  font-size: 1.2rem;
}

.type-stat-item strong {
  font-size: 1.2rem;
  color: var(--ink);
  font-weight: 800;
}

.type-stat-item span:last-child {
  font-size: 0.74rem;
  color: var(--dim);
}

@media (max-width: 720px) {
  .info-type-stats .type-stats-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* ---------- 发布工具栏图标按钮间距 ---------- */
#publishToolbar .small-button {
  font-size: 0.8rem;
}

#publishToolbar .small-button.active {
  font-weight: 700;
}

/* ---------- 短文卡片紧凑显示 ---------- */
.content-card.type-note .card-head {
  margin-bottom: 0.4rem;
}

.content-card.type-note .card-footer {
  margin-top: 0.4rem;
}

/* ============================================
   设置中心 · 新版侧边栏 Tab 布局
   玻璃拟态 · 响应式 · macOS 风格
   ============================================ */

/* ---------- 外层遮罩 ---------- */
#settingsDialog {
  padding: 0;
  background: transparent;
  border: 0;
  width: 100vw;
  height: 100vh;
  max-width: 100vw;
  max-height: 100vh;
  margin: 0;
  inset: 0;
}
#settingsDialog::backdrop {
  background: rgba(15, 26, 46, 0.35);
  backdrop-filter: blur(8px);
}

.set-overlay {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 2rem;
  box-sizing: border-box;
}

/* ---------- 主窗口 ---------- */
.set-window {
  position: relative;
  display: grid;
  grid-template-columns: 220px 1fr;
  grid-template-rows: minmax(0, 1fr);
  width: min(94vw, 760px);
  height: min(88vh, 680px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(40px) saturate(1.8);
  box-shadow:
    0 32px 96px rgba(0, 0, 0, 0.28),
    0 12px 40px rgba(0, 0, 0, 0.16),
    inset 0 1px 0 var(--glass-highlight),
    0 0 0 1px rgba(255, 255, 255, 0.14);
  overflow: hidden;
}

:is([data-theme="gray"],[data-theme="gold"]) .set-window { background: rgba(40,42,48,0.82); }
[data-theme="gold"] .set-window { background: rgba(28,26,20,0.86); }

/* ---------- 关闭按钮 ---------- */
.set-close {
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  z-index: 10;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(8px);
  color: var(--ink);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  transition: 0.2s ease;
}
.set-close:hover {
  background: rgba(255, 90, 90, 0.85);
  color: #fff;
  transform: rotate(90deg);
}

/* ---------- 侧边栏 ---------- */
.set-sidebar {
  display: flex;
  flex-direction: column;
  padding: 1.5rem 0.8rem 1rem;
  border-right: 1px solid rgba(0, 0, 0, 0.06);
  background: rgba(255, 255, 255, 0.25);
  overflow-y: auto;
}
:is([data-theme="gray"],[data-theme="gold"]) .set-sidebar { border-right-color: rgba(255,255,255,.08); background: rgba(255,255,255,.04); }

.set-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0 0.6rem 1rem;
  margin-bottom: 0.6rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.set-brand-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: var(--radius-sm);
  background: var(--accent-gradient);
  color: var(--on-accent);
  font-size: 1.2rem;
  font-weight: 900;
}
.set-brand strong {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink);
}
.set-brand small {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--muted);
  text-transform: uppercase;
}

/* ---------- 侧边栏导航 ---------- */
.set-nav {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  overflow-y: auto;
}
.set-tab {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0.8rem;
  border: 0;
  border-radius: var(--radius-xs);
  background: transparent;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: 0.2s ease;
}
.set-tab:hover {
  background: rgba(255, 255, 255, 0.4);
  color: var(--ink);
}
.set-tab.active {
  background: var(--accent-gradient);
  color: var(--on-accent);
  font-weight: 700;
  box-shadow: 0 4px 14px var(--accent-glow);
}
.set-tab-icon {
  flex-shrink: 0;
  width: 1.4rem;
  text-align: center;
  font-size: 1rem;
}

/* ---------- 内容区 ---------- */
.set-content {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.set-pane {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
.set-pane.hidden { display: none; }

.set-pane-head {
  flex-shrink: 0;
  padding: 1.5rem 1.8rem 1rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.set-pane-head h3 {
  margin: 0 0 0.3rem;
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--ink);
}
.set-pane-head p {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
}

.set-pane-body {
  flex: 1;
  min-height: 0;
  padding: 1.2rem 1.8rem 1.5rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

/* ---------- 个人资料 ---------- */
.set-profile-hero {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.5rem 0 0.8rem;
}
.set-avatar {
  flex-shrink: 0;
  width: 4.2rem;
  height: 4.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--glass-border);
  border-radius: 50%;
  background: var(--accent-gradient);
  color: var(--on-accent);
  font-size: 1.6rem;
  font-weight: 700;
  overflow: hidden;
  box-shadow: 0 6px 20px var(--accent-glow);
}
.set-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.set-avatar-actions {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.set-avatar-actions small {
  font-size: 0.75rem;
  color: var(--dim);
}

/* ---------- 表单字段 ---------- */
.set-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.set-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.02em;
}
.set-field input,
.set-field select {
  padding: 0.6rem 0.8rem;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: var(--radius-xs);
  background: rgba(255, 255, 255, 0.6);
  color: var(--ink);
  font-size: 0.9rem;
  transition: 0.2s ease;
}
:is([data-theme="gray"],[data-theme="gold"]) :is(.set-field input,.set-field select) { border-color: rgba(255,255,255,.12); background: rgba(255,255,255,.06); }
.set-field input:focus,
.set-field select:focus {
  outline: 0;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
  background: rgba(255, 255, 255, 0.85);
}

.set-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem;
}

/* ---------- 主题选择 ---------- */
.set-theme-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 0.8rem;
}
.set-theme-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 0.9rem 0.6rem;
  border: 2px solid rgba(0, 0, 0, 0.08);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: 0.2s ease;
}
.set-theme-card:hover {
  border-color: rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}
.set-theme-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.set-theme-color {
  width: 2.8rem;
  height: 2.8rem;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}
.set-theme-blue   { background: linear-gradient(135deg, #5b83b7, #2e5d98); }
.set-theme-red    { background: linear-gradient(135deg, #d46a60, #b84840); }
.set-theme-cream  { background: linear-gradient(135deg, #d4a040, #b08020); }
.set-theme-gray   { background: linear-gradient(135deg, #8a9bb8, #5a6b88); }
.set-theme-pink   { background: linear-gradient(135deg, #e08ab0, #c45a88); }
.set-theme-gold   { background: linear-gradient(135deg, #d4af37, #8a6f25); }
.set-theme-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink);
}
.set-theme-card:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 6px 20px var(--accent-glow);
}
.set-theme-card:has(input:checked) .set-theme-label {
  color: var(--accent-strong);
}

/* ---------- iOS 风格开关 ---------- */
.set-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 0.9rem;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  transition: 0.2s ease;
}
.set-toggle-row:hover {
  background: rgba(255, 255, 255, 0.5);
}
:is([data-theme="gray"],[data-theme="gold"]) .set-toggle-row { border-color: rgba(255,255,255,.08); background: rgba(255,255,255,.04); }
.set-toggle-info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.set-toggle-info strong {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
}
.set-toggle-info small {
  font-size: 0.76rem;
  color: var(--dim);
}

.set-switch {
  position: relative;
  flex-shrink: 0;
  width: 3rem;
  height: 1.7rem;
}
.set-switch input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
  z-index: 2;
}
.set-slider {
  position: absolute;
  inset: 0;
  border-radius: var(--radius-full);
  background: rgba(120, 130, 150, 0.35);
  transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.set-slider::before {
  content: "";
  position: absolute;
  top: 0.2rem;
  left: 0.2rem;
  width: 1.3rem;
  height: 1.3rem;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.set-switch input:checked + .set-slider {
  background: var(--accent-gradient);
}
.set-switch input:checked + .set-slider::before {
  transform: translateX(1.3rem);
}

/* ---------- 按钮 ---------- */
.set-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: var(--radius-xs);
  background: rgba(255, 255, 255, 0.5);
  color: var(--ink);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s ease;
}
.set-btn:hover {
  background: rgba(255, 255, 255, 0.7);
  transform: translateY(-1px);
}
.set-btn-primary {
  border-color: var(--accent-strong);
  background: var(--accent-gradient);
  color: var(--on-accent);
  box-shadow: 0 4px 14px var(--accent-glow);
}
.set-btn-primary:hover {
  box-shadow: 0 8px 24px var(--accent-glow);
}
.set-btn-danger {
  padding: 0.5rem 1rem;
  border: 1px solid rgba(183, 95, 95, 0.4);
  border-radius: var(--radius-xs);
  background: rgba(183, 95, 95, 0.1);
  color: #b75f5f;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s ease;
}
.set-btn-danger:hover {
  background: #b75f5f;
  color: #fff;
}

/* ---------- 账号管理 ---------- */
.set-account-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem 1rem;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.35);
}
.set-account-info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.set-account-label {
  font-size: 0.76rem;
  color: var(--dim);
}
.set-account-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink);
}

.set-divider {
  height: 1px;
  margin: 0.5rem 0;
  background: rgba(0, 0, 0, 0.06);
}
/* 深色主题设置面板适配 */
:is([data-theme="gray"],[data-theme="gold"]) .set-divider { background: rgba(255,255,255,.08); }
:is([data-theme="gray"],[data-theme="gold"]) .set-close { background: rgba(255,255,255,.08); color: var(--ink); }
:is([data-theme="gray"],[data-theme="gold"]) .set-close:hover { background: rgba(255,90,90,.85); color: #fff; }
:is([data-theme="gray"],[data-theme="gold"]) :is(.set-brand,.set-pane-head) { border-bottom-color: rgba(255,255,255,.08); }
:is([data-theme="gray"],[data-theme="gold"]) .set-tab:hover { background: rgba(255,255,255,.08); color: var(--ink); }
:is([data-theme="gray"],[data-theme="gold"]) .set-theme-card { border-color: rgba(255,255,255,.12); background: rgba(255,255,255,.04); }
:is([data-theme="gray"],[data-theme="gold"]) .set-theme-card:hover { border-color: rgba(255,255,255,.22); }
:is([data-theme="gray"],[data-theme="gold"]) .set-theme-card:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
:is([data-theme="gray"],[data-theme="gold"]) .set-toggle-row:hover { background: rgba(255,255,255,.08); }
:is([data-theme="gray"],[data-theme="gold"]) :is(.set-field input,.set-field select):focus { background: rgba(255,255,255,.1); border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
:is([data-theme="gray"],[data-theme="gold"]) .set-btn { border-color: rgba(255,255,255,.12); background: rgba(255,255,255,.06); color: var(--ink); }
:is([data-theme="gray"],[data-theme="gold"]) .set-btn:hover { background: rgba(255,255,255,.12); }
:is([data-theme="gray"],[data-theme="gold"]) .set-btn-danger { border-color: rgba(200,122,122,.4); background: rgba(200,122,122,.14); color: #e08a8a; }
:is([data-theme="gray"],[data-theme="gold"]) .set-btn-danger:hover { background: #c47a7a; color: #fff; }
:is([data-theme="gray"],[data-theme="gold"]) .set-account-bar { border-color: rgba(255,255,255,.08); background: rgba(255,255,255,.04); }
:is([data-theme="gray"],[data-theme="gold"]) .set-error { color: #e08a8a; }

.set-subsection {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}
.set-subsection h4 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink);
}

/* ---------- 错误提示 ---------- */
.set-error {
  padding: 0.6rem 0.8rem;
  border-radius: var(--radius-xs);
  background: rgba(183, 95, 95, 0.12);
  color: #b75f5f;
  font-size: 0.82rem;
  font-weight: 500;
}
.set-error.hidden { display: none; }

/* ---------- 响应式 ---------- */
@media (max-width: 640px) {
  .set-overlay { padding: 0; }
  .set-window {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
    width: 100vw;
    max-height: 100vh;
    height: 100vh;
    border-radius: 0;
    border: 0;
  }
  .set-sidebar {
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 0.8rem;
    border-right: 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    overflow-x: auto;
  }
  .set-brand {
    display: none !important;
  }
  .set-nav {
    flex-direction: row;
    gap: 0.2rem;
  }
  .set-tab {
    flex-shrink: 0;
    padding: 0.4rem 0.7rem;
    font-size: 0.8rem;
  }
  .set-tab-icon { width: auto; }
  .set-tab span:not(.set-tab-icon) { display: none; }
  .set-pane-head { padding: 1rem 1.2rem 0.8rem; }
  .set-pane-body { padding: 1rem 1.2rem 1.2rem; }
  .set-form-grid { grid-template-columns: 1fr; }
  .set-close { top: 0.5rem; right: 0.5rem; }
}

/* ============================================
   氛围场景选择器 · 卡片网格
   ============================================ */
.set-scene-section {
  margin-top: 1.2rem;
}
.set-scene-section-title {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  margin-bottom: 0.7rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.set-scene-section-title > span:first-child {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink);
}
.set-scene-section-title small {
  font-size: 0.75rem;
  color: var(--muted);
}
.set-scene-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 0.7rem;
}
.set-scene-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0.5rem;
  border: 2px solid rgba(0, 0, 0, 0.08);
  border-radius: var(--radius-xs);
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: 0.2s ease;
  overflow: hidden;
}
.set-scene-card:hover {
  border-color: rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
}
.set-scene-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.set-scene-preview {
  display: block;
  width: 100%;
  height: 56px;
  border-radius: 8px;
  background-size: cover;
  background-position: center;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}
.set-scene-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink);
  text-align: center;
}
.set-scene-card:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 6px 20px var(--accent-glow);
}
.set-scene-card:has(input:checked) .set-scene-label {
  color: var(--accent-strong);
}

/* —— 场景预览缩略图（与 WeatherFX 引擎效果对应的微缩版） —— */
/* 雨天 — 铅灰天空 + 斜织雨丝 + 近地雨雾 */
.set-scene-preview.scene-rainy {
  background:
    linear-gradient(180deg, transparent 58%, rgba(196,214,228,0.4) 92%, rgba(200,216,230,0.5)),
    repeating-linear-gradient(-73deg, transparent 0 6px, rgba(205,226,244,0.5) 6px 6.7px, transparent 6.7px 12px),
    repeating-linear-gradient(-76deg, transparent 0 9px, rgba(214,232,246,0.35) 9px 9.5px, transparent 9.5px 17px),
    radial-gradient(ellipse 90% 42% at 30% 0%, rgba(70,82,102,0.85) 0%, transparent 70%),
    linear-gradient(180deg, #46566e 0%, #5f7387 55%, #8296a8 100%);
}
/* 飘雪 — 乳白天空 + 双层雪点 */
.set-scene-preview.scene-snowy {
  background:
    radial-gradient(circle, rgba(255,255,255,0.95) 1.4px, transparent 1.9px),
    radial-gradient(circle, rgba(255,255,255,0.75) 0.9px, transparent 1.3px),
    linear-gradient(180deg, #a4b6c9 0%, #ccd7e3 55%, #e8eef5 100%);
  background-size: 13px 12px, 21px 19px, cover;
  background-position: 0 0, 6px 5px, center;
}
/* 晴天 — 淡天蓝→暖金过渡 + 右上角弥散光晕 */
.set-scene-preview.scene-sunny {
  background:
    radial-gradient(circle 22px at 78% 22%, rgba(255,238,190,0.45) 0%, rgba(255,222,148,0.18) 40%, transparent 68%),
    radial-gradient(circle 48px at 78% 22%, rgba(255,228,165,0.2) 0%, rgba(255,212,130,0.06) 50%, transparent 80%),
    linear-gradient(180deg, #add8f0 0%, #cde8f6 45%, #f4efdd 85%, #faf3e0 100%);
}
/* 多云 — 灰蓝天空 + 上亮下暗的立体云团 */
.set-scene-preview.scene-cloudy {
  background:
    radial-gradient(ellipse 30px 8px at 31% 47%, rgba(96,112,132,0.5) 0%, transparent 70%),
    radial-gradient(ellipse 34px 14px at 31% 36%, rgba(255,255,255,0.96) 0%, rgba(244,247,251,0.75) 52%, rgba(208,216,228,0.45) 72%, transparent 82%),
    radial-gradient(ellipse 22px 6px at 71% 62%, rgba(100,116,136,0.42) 0%, transparent 70%),
    radial-gradient(ellipse 25px 10px at 71% 54%, rgba(255,255,255,0.9) 0%, rgba(240,244,249,0.6) 55%, transparent 78%),
    radial-gradient(ellipse 16px 7px at 52% 20%, rgba(255,255,255,0.65) 0%, transparent 72%),
    linear-gradient(180deg, #6e8499 0%, #93a7b9 55%, #b4c1ce 100%);
}
/* 雾 — 冷调灰‑青天空 + 下浓上淡雾霭 */
.set-scene-preview.scene-foggy {
  background:
    radial-gradient(ellipse 140% 32% at 50% 92%, rgba(242,245,249,0.85) 0%, transparent 58%),
    radial-gradient(ellipse 120% 24% at 40% 60%, rgba(235,240,245,0.55) 0%, transparent 60%),
    radial-gradient(ellipse 110% 18% at 60% 35%, rgba(228,235,242,0.30) 0%, transparent 65%),
    linear-gradient(180deg, #a0b0bd 0%, #bcc9d2 55%, #c8d2d9 100%);
}
.set-scene-preview.scene-starry  { background: radial-gradient(ellipse at 50% 100%, #1a1d3a, #050614); }
/* 雷雨 — 深黑夜空 + 雨幕 + 枝状闪电 */
.set-scene-preview.scene-thunder {
  position: relative;
  overflow: hidden;
  background:
    repeating-linear-gradient(-75deg, transparent 0 7px, rgba(190,208,235,0.28) 7px 7.6px, transparent 7.6px 14px),
    radial-gradient(ellipse 95% 46% at 50% 0%, rgba(10,12,28,0.9) 0%, transparent 72%),
    linear-gradient(180deg, #262a46 0%, #191b32 55%, #0d0f20 100%);
}
.set-scene-preview.scene-thunder::after {
  content: ""; position: absolute; top: 6%; left: 54%;
  width: 15px; height: 80%;
  background: linear-gradient(180deg, #ffffff, #cdd9ff 70%, rgba(190,205,255,0.6));
  clip-path: polygon(46% 0, 74% 0, 56% 30%, 76% 33%, 40% 62%, 52% 64%, 28% 100%, 38% 66%, 22% 63%, 44% 34%, 30% 31%);
  filter: drop-shadow(0 0 3px rgba(205,220,255,0.95)) drop-shadow(0 0 7px rgba(170,195,255,0.6));
}
.set-scene-preview.scene-dawn    { background: linear-gradient(180deg, #1f2d5c, #d4837a, #f4c180); }
.set-scene-preview.scene-morning { background: linear-gradient(180deg, #87bdf0, #e4eef5); }
.set-scene-preview.scene-noon    { background: linear-gradient(180deg, #4a90e2, #c8e0f0); }
.set-scene-preview.scene-sunset  { background: linear-gradient(180deg, #2d1b69, #d4644a, #ffd789); }
.set-scene-preview.scene-dusk    { background: linear-gradient(180deg, #1a1d3a, #6e3e6a, #8a4d6a); }
.set-scene-preview.scene-night   { background: radial-gradient(ellipse at 50% 100%, #14172e, #030410); }
.set-scene-preview.scene-forest  { background: linear-gradient(180deg, #6a8b5c, #b5c89a); }
.set-scene-preview.scene-ocean   { background: linear-gradient(180deg, #4a90d9, #2d9bc8); }
.set-scene-preview.scene-cherry  { background: linear-gradient(180deg, #f8d4e0, #e89aae); }
.set-scene-preview.scene-autumn  { background: linear-gradient(180deg, #d48344, #f0c896); }

/* ============================================
   成员列表 · 在线状态点
   ============================================ */
.member-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0.7rem;
  margin-bottom: 0.4rem;
  border-radius: var(--radius-xs);
  background: rgba(0, 0, 0, 0.04);
  font-size: 0.78rem;
  color: var(--muted);
}
.member-stat {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 600;
}
.member {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.45rem 0.5rem;
  border-radius: var(--radius-xs);
  transition: background 0.2s ease;
}
.member.online {
  background: rgba(78, 138, 96, 0.08);
}
.member-meta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.dot-online {
  background: #4e8a60;
  box-shadow: 0 0 0 2px rgba(78, 138, 96, 0.18);
  animation: onlinePulse 2s ease-in-out infinite;
}
.dot-offline {
  background: #b0b5bd;
  opacity: 0.55;
}
@keyframes onlinePulse {
  0%, 100% { box-shadow: 0 0 0 2px rgba(78, 138, 96, 0.18); }
  50% { box-shadow: 0 0 0 5px rgba(78, 138, 96, 0.05); }
}
.member .avatar {
  margin: 0;
  width: 1.8rem;
  height: 1.8rem;
  font-size: 0.8rem;
  border-radius: 50%;
}
.member .role {
  font-size: 0.72rem;
  color: var(--muted);
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.06);
}

/* ============================================
   用户主页样式
   ============================================ */
/* 用户信息区域 */
.profile-hero {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0.5rem 0;
}

.profile-avatar {
  flex-shrink: 0;
  width: 5rem;
  height: 5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--glass-border);
  border-radius: 50%;
  background: var(--accent-gradient);
  color: var(--on-accent);
  font-size: 2rem;
  font-weight: 700;
  overflow: hidden;
  box-shadow: 0 8px 24px var(--accent-glow);
}
.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-info {
  flex: 1;
  min-width: 0;
}

.profile-nickname {
  margin: 0 0 0.3rem;
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--ink);
}

.profile-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 0.5rem;
}

.profile-username {
  font-size: 0.85rem;
  color: var(--dim);
  font-weight: 400;
}

.profile-gender {
  font-size: 0.82rem;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
  background: var(--surface-soft);
  color: var(--muted);
  font-weight: 500;
}
.profile-gender.gender-男 {
  background: rgba(91, 131, 183, 0.15);
  color: #2e5d98;
}
.profile-gender.gender-女 {
  background: rgba(224, 138, 176, 0.15);
  color: #c45a88;
}

.profile-online {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-full);
}
.profile-online.online {
  background: rgba(78, 138, 96, 0.15);
  color: #4e8a60;
}
.profile-online.offline {
  background: rgba(0, 0, 0, 0.06);
  color: var(--dim);
}

.profile-bio {
  margin: 0 0 0.6rem;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.6;
  font-style: italic;
}

.profile-stats {
  display: flex;
  gap: 1rem;
  font-size: 0.82rem;
  color: var(--dim);
}
.profile-stats strong {
  color: var(--accent);
  font-weight: 700;
  margin-right: 0.2rem;
}

/* 作者链接 */
.author-link {
  color: var(--accent-strong);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px dashed var(--accent);
  transition: all 0.2s ease;
  cursor: pointer;
}
.author-link:hover {
  color: var(--accent);
  border-bottom-style: solid;
}

/* 贴吧回复列表 */
.profile-comment-list {
  display: grid;
  gap: 0.6rem;
}

.profile-comment-item {
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--surface-line);
  border-radius: var(--radius-xs);
  background: var(--surface-soft);
  transition: all 0.2s ease;
}
.profile-comment-item:hover {
  background: var(--surface);
  border-color: var(--glass-border);
}

.profile-comment-body {
  margin-bottom: 0.4rem;
}

.profile-comment-text {
  font-size: 0.9rem;
  color: var(--ink);
  line-height: 1.7;
}

.profile-comment-meta {
  font-size: 0.76rem;
  color: var(--dim);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.2rem;
}

.profile-comment-link {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: all 0.2s ease;
}
.profile-comment-link:hover {
  border-bottom-color: var(--accent);
}

/* ================================
   消息通知面板
   ================================ */
.msg-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.msg-filter-group {
  display: flex;
  gap: 0.35rem;
  background: var(--panel-bg, rgba(255,255,255,0.08));
  backdrop-filter: blur(12px);
  border-radius: 2rem;
  padding: 0.2rem;
}

.mini-chip {
  padding: 0.35rem 0.9rem;
  border: none;
  border-radius: 2rem;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.82rem;
  font-family: inherit;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.mini-chip:hover {
  color: var(--text);
  background: rgba(255,255,255,0.05);
}

.mini-chip.active {
  background: var(--primary, rgba(99,102,241,0.6));
  color: #fff;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(99,102,241,0.25);
}

.msg-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.msg-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  border-radius: 0.75rem;
  background: var(--panel-bg, rgba(255,255,255,0.06));
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.06);
  cursor: pointer;
  transition: all 0.2s ease;
}

.msg-item:hover {
  background: rgba(255,255,255,0.1);
  border-color: var(--primary, rgba(99,102,241,0.3));
  transform: translateX(2px);
}

.msg-item.unread {
  border-left: 3px solid var(--primary, #6366f1);
  background: rgba(99,102,241,0.08);
  border-color: rgba(99,102,241,0.15);
}

.msg-item.unread .msg-desc {
  font-weight: 600;
}

.msg-icon {
  font-size: 1.3rem;
  flex-shrink: 0;
  margin-top: 0.15rem;
  opacity: 0.85;
}

.msg-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.msg-desc {
  font-size: 0.88rem;
  color: var(--text);
  line-height: 1.4;
}

.msg-title {
  font-size: 0.8rem;
  color: var(--primary, #818cf8);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.msg-preview {
  font-size: 0.78rem;
  color: var(--muted);
  background: rgba(255,255,255,0.05);
  padding: 0.4rem 0.6rem;
  border-radius: 0.4rem;
  line-height: 1.45;
  max-height: 2.8em;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.msg-time {
  font-size: 0.72rem;
  color: var(--muted);
  opacity: 0.7;
}

/* 导航栏消息未读徽标 */
.nav-tab[data-badge] {
  position: relative;
  overflow: visible;
}

.nav-tab[data-badge]::after {
  content: attr(data-badge);
  position: absolute;
  top: -0.35rem;
  right: -0.5rem;
  background: #ef4444;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  min-width: 1.1rem;
  height: 1.1rem;
  line-height: 1.1rem;
  text-align: center;
  border-radius: 2rem;
  padding: 0 0.3rem;
  box-shadow: 0 1px 4px rgba(239,68,68,0.4);
  animation: badge-pop 0.3s ease;
}

@keyframes badge-pop {
  0% { transform: scale(0); opacity: 0; }
  60% { transform: scale(1.3); }
  100% { transform: scale(1); opacity: 1; }
}

/* 消息面板响应式 */
@media (max-width: 600px) {
  .msg-toolbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  .msg-filter-group {
    width: 100%;
    justify-content: center;
  }
  .mini-chip {
    padding: 0.3rem 0.7rem;
    font-size: 0.76rem;
  }
  .msg-item {
    padding: 0.7rem 0.8rem;
    gap: 0.5rem;
  }
  .msg-icon {
    font-size: 1.1rem;
  }
  .msg-desc {
    font-size: 0.82rem;
  }
}

/* 响应式 */
@media (max-width: 768px) {
  .profile-hero {
    gap: 1rem;
  }
  .profile-avatar {
    width: 4.2rem;
    height: 4.2rem;
    font-size: 1.6rem;
  }
  .profile-nickname {
    font-size: 1.4rem;
  }
  .profile-comment-item {
    padding: 0.55rem 0.7rem;
  }
}

@media (max-width: 640px) {
  .profile-hero {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.8rem;
  }
  .profile-avatar {
    width: 4rem;
    height: 4rem;
    font-size: 1.5rem;
  }
  .profile-nickname {
    font-size: 1.3rem;
  }
  .profile-meta {
    justify-content: center;
  }
  .profile-stats {
    justify-content: center;
    flex-wrap: wrap;
  }
  .profile-comment-text {
    font-size: 0.85rem;
    line-height: 1.6;
  }
  .profile-comment-meta {
    font-size: 0.72rem;
  }
}

@media (max-width: 520px) {
  .profile-bio {
    font-size: 0.85rem;
  }
  .profile-stats {
    gap: 0.6rem;
    font-size: 0.76rem;
  }
  .profile-username {
    font-size: 0.8rem;
  }
  .profile-gender {
    font-size: 0.76rem;
    padding: 0.12rem 0.4rem;
  }
  .profile-online {
    font-size: 0.74rem;
  }
}

@media (max-width: 380px) {
  .profile-avatar {
    width: 3.5rem;
    height: 3.5rem;
    font-size: 1.3rem;
  }
  .profile-nickname {
    font-size: 1.15rem;
  }
  .profile-meta {
    gap: 0.4rem;
  }
  .profile-comment-item {
    padding: 0.5rem 0.6rem;
  }
  .profile-comment-text {
    font-size: 0.82rem;
  }
}


