
/* ============================================================
   杂鱼社区 — 「极光玻璃」设计系统 v6.0
   设计语言：动态玻璃拟态 · 流动渐变 · 视觉冲击 · 圆润亲和
   · 动态光斑背景（缓浮动画）· 磨砂玻璃卡片（backdrop-filter）
   · 大圆角（卡片 20px / 控件 12px）· 渐变主色 紫→粉
   · 入场 stagger 动画 · 悬浮上浮微交互 · 按钮渐变流动
   适配：手机 / 平板 / 电脑 三端，支持深色模式
   ============================================================ */
:root {
  /* 主色调 — 电紫 */
  --primary: #6d5df6;
  --primary-dark: #5a49e8;
  --primary-deeper: #4a38d8;
  --primary-light: rgba(109, 93, 246, 0.12);
  --primary-soft: rgba(109, 93, 246, 0.20);
  --primary-glow: rgba(109, 93, 246, 0.35);
  /* 强调色 — 桃粉 */
  --accent: #ff5e7d;
  --accent-dark: #f0446a;
  --accent-light: rgba(255, 94, 125, 0.12);
  --accent-glow: rgba(255, 94, 125, 0.30);
  /* 点缀色 */
  --teal: #14c9c9;
  --pink: #ff5e9d;
  /* 渐变体系 — 视觉冲击核心 */
  --grad-primary: linear-gradient(120deg, #6d5df6, #a855f7 50%, #ff5e7d);
  --grad-primary-soft: linear-gradient(120deg, rgba(109,93,246,.75), rgba(255,94,125,.75));
  --grad-warm: linear-gradient(120deg, #ff5e7d, #ff9a5e);
  --grad-cool: linear-gradient(120deg, #14c9c9, #6d5df6);
  /* 背景体系 — 幻紫底 + 光斑 */
  --bg: #eef0fb;
  --bg-soft: #e6e9f8;
  --card: rgba(255, 255, 255, 0.62);
  --card-hover: rgba(255, 255, 255, 0.78);
  --card-border: rgba(255, 255, 255, 0.85);
  --card-line: rgba(109, 93, 246, 0.10);
  --glass-blur: 22px;
  --input-bg: rgba(255, 255, 255, 0.75);
  --input-border: rgba(109, 93, 246, 0.22);
  --header-bg: rgba(255, 255, 255, 0.65);
  /* 文字体系 */
  --text-primary: #241d4d;
  --text-secondary: #4e4776;
  --text-muted: #8c86ab;
  --text-placeholder: #b6b1d4;
  /* 功能色 */
  --danger: #f43f5e;
  --danger-bg: rgba(244, 63, 94, 0.10);
  --success: #10b981;
  --success-bg: rgba(16, 185, 129, 0.12);
  --warn: #f59e0b;
  --warn-bg: rgba(245, 158, 11, 0.12);
  --info-bg: rgba(109, 93, 246, 0.10);
  /* 阴影层次 — 彩色柔光 */
  --shadow-sm: 0 2px 10px rgba(109, 93, 246, 0.07);
  --shadow: 0 8px 28px rgba(109, 93, 246, 0.13);
  --shadow-lg: 0 16px 44px rgba(109, 93, 246, 0.18);
  --shadow-xl: 0 24px 64px rgba(109, 93, 246, 0.24);
  --shadow-glow: 0 8px 30px rgba(109, 93, 246, 0.40);
  --shadow-glow-pink: 0 8px 30px rgba(255, 94, 125, 0.40);
  --ring: 0 0 0 4px rgba(109, 93, 246, 0.18);
  /* 圆角 — 圆润 */
  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-full: 999px;
  /* 间距 */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  /* 顶栏高度 */
  --topbar-h: 34px;
  --header-h: 66px;
  /* 动效曲线 */
  --ease-spring: cubic-bezier(.34, 1.4, .64, 1);
  --ease-soft: cubic-bezier(.4, 0, .2, 1);
}

/* ===== 深色模式（跟随系统 / 手动切换） ===== */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --primary: #9b8cff;
    --primary-dark: #b3a5ff;
    --primary-deeper: #c7bcff;
    --primary-light: rgba(155, 140, 255, 0.14);
    --primary-soft: rgba(155, 140, 255, 0.24);
    --accent: #ff7d97;
    --accent-dark: #ff9db0;
    --accent-light: rgba(255, 125, 151, 0.14);
    --bg: #131022;
    --bg-soft: #1a1731;
    --card: rgba(36, 32, 62, 0.62);
    --card-hover: rgba(44, 40, 74, 0.78);
    --card-border: rgba(255, 255, 255, 0.10);
    --card-line: rgba(155, 140, 255, 0.14);
    --input-bg: rgba(30, 27, 52, 0.70);
    --input-border: rgba(155, 140, 255, 0.22);
    --header-bg: rgba(22, 19, 40, 0.72);
    --text-primary: #f0eefa;
    --text-secondary: #c0bade;
    --text-muted: #8d87ad;
    --text-placeholder: #6b658c;
    --danger-bg: rgba(244, 63, 94, 0.14);
    --success-bg: rgba(16, 185, 129, 0.14);
    --warn-bg: rgba(245, 158, 11, 0.14);
    --info-bg: rgba(155, 140, 255, 0.12);
    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.30);
    --shadow: 0 8px 28px rgba(0, 0, 0, 0.38);
    --shadow-lg: 0 16px 44px rgba(0, 0, 0, 0.44);
    --shadow-xl: 0 24px 64px rgba(0, 0, 0, 0.52);
  }
}
:root[data-theme="dark"] {
  --primary: #9b8cff;
  --primary-dark: #b3a5ff;
  --primary-deeper: #c7bcff;
  --primary-light: rgba(155, 140, 255, 0.14);
  --primary-soft: rgba(155, 140, 255, 0.24);
  --accent: #ff7d97;
  --accent-dark: #ff9db0;
  --accent-light: rgba(255, 125, 151, 0.14);
  --bg: #131022;
  --bg-soft: #1a1731;
  --card: rgba(36, 32, 62, 0.62);
  --card-hover: rgba(44, 40, 74, 0.78);
  --card-border: rgba(255, 255, 255, 0.10);
  --card-line: rgba(155, 140, 255, 0.14);
  --input-bg: rgba(30, 27, 52, 0.70);
  --input-border: rgba(155, 140, 255, 0.22);
  --header-bg: rgba(22, 19, 40, 0.72);
  --text-primary: #f0eefa;
  --text-secondary: #c0bade;
  --text-muted: #8d87ad;
  --text-placeholder: #6b658c;
  --danger-bg: rgba(244, 63, 94, 0.14);
  --success-bg: rgba(16, 185, 129, 0.14);
  --warn-bg: rgba(245, 158, 11, 0.14);
  --info-bg: rgba(155, 140, 255, 0.12);
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.30);
  --shadow: 0 8px 28px rgba(0, 0, 0, 0.38);
  --shadow-lg: 0 16px 44px rgba(0, 0, 0, 0.44);
  --shadow-xl: 0 24px 64px rgba(0, 0, 0, 0.52);
}
/* 深色模式下的图片与地图防刺眼 */
:root[data-theme="dark"] img { opacity: 0.92; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) img { opacity: 0.92; }
}

* { margin: 0; padding: 0; box-sizing: border-box; }
*::selection { background: rgba(109, 93, 246, 0.25); color: var(--text-primary); }

html { scroll-behavior: smooth; }
html, body { overflow-x: hidden; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  -webkit-tap-highlight-color: transparent;
  overflow-wrap: break-word;
}

/* ============================================================
   动态光斑背景 — 缓浮的三色极光 blob（视觉冲击核心）
   ============================================================ */
.bg-decor {
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(168, 85, 247, 0.10) 0%, transparent 60%),
    var(--bg);
}
.bg-decor::before,
.bg-decor::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  will-change: transform;
}
.bg-decor::before {
  width: 55vw; height: 55vw; max-width: 720px; max-height: 720px;
  left: -12vw; top: -16vw;
  background: radial-gradient(circle, rgba(109, 93, 246, 0.32) 0%, rgba(168, 85, 247, 0.16) 45%, transparent 70%);
  animation: blobFloat1 22s var(--ease-soft) infinite alternate;
}
.bg-decor::after {
  width: 48vw; height: 48vw; max-width: 640px; max-height: 640px;
  right: -10vw; top: 8vh;
  background: radial-gradient(circle, rgba(255, 94, 125, 0.26) 0%, rgba(255, 154, 94, 0.12) 50%, transparent 72%);
  animation: blobFloat2 26s var(--ease-soft) infinite alternate;
}
@keyframes blobFloat1 {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(9vw, 7vh) scale(1.12); }
  100% { transform: translate(3vw, 16vh) scale(0.94); }
}
@keyframes blobFloat2 {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(-8vw, 10vh) scale(1.15); }
  100% { transform: translate(-2vw, 20vh) scale(0.92); }
}
/* 第三色 blob（青色）挂在 html 伪元素上 */
body::before {
  content: '';
  position: fixed; z-index: -2; pointer-events: none;
  width: 42vw; height: 42vw; max-width: 560px; max-height: 560px;
  left: 30vw; bottom: -14vw;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(20, 201, 201, 0.18) 0%, transparent 68%);
  filter: blur(80px);
  animation: blobFloat3 30s var(--ease-soft) infinite alternate;
}
@keyframes blobFloat3 {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-10vw, -8vh) scale(1.18); }
}

a { color: var(--primary); text-decoration: none; transition: color .2s; }
a:hover { text-decoration: none; color: var(--primary-dark); }
img { max-width: 100%; }
.muted { color: var(--text-muted); }
.small { font-size: 12px; }
.required { color: var(--danger); }

.alert {
  padding: 13px 18px; border-radius: var(--radius); margin-bottom: 18px;
  font-size: 14px; line-height: 1.5; display: flex; align-items: flex-start; gap: 10px;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid transparent;
}
.alert::before { font-size: 16px; flex-shrink: 0; margin-top: 1px; }
.alert-danger { background: var(--danger-bg); color: var(--danger); border-color: rgba(244, 63, 94, 0.30); }
.alert-danger::before { content: '⚠'; }
.alert-success { background: var(--success-bg); color: var(--success); border-color: rgba(16, 185, 129, 0.30); }
.alert-success::before { content: '✓'; }
.alert-info { background: var(--info-bg); color: var(--primary); border-color: rgba(109, 93, 246, 0.28); }
.alert-info::before { content: 'ℹ'; }
.alert-error { background: var(--danger-bg); color: var(--danger); border-color: rgba(244, 63, 94, 0.30); }
.alert-error::before { content: '⚠'; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ============================================================
   输入控件基线 v7.1「无边框软填充」
   ------------------------------------------------------------
   全站不再使用「白底 + 1.5px 硬边框」的输入框：
   平时只靠一层浅色填充表明可输入区，聚焦时才浮出主色描边。
   这样输入框和它所在的卡片 / 页面背景是同一个材质，不会像贴了张白纸。

   特异性说明：这里全是元素级 + 属性选择器（0,1,1），
   .form-group input[type=text]（0,2,1）、.conv-input input（0,2,1）等
   组件自身样式写在后面且更高，能正常覆盖；.search-box input 等同级样式
   也因为在后面而胜出。
   ============================================================ */
input[type="text"], input[type="search"], input[type="password"],
input[type="email"], input[type="number"], input[type="url"],
input[type="tel"], input:not([type]), textarea {
  background: var(--bg-soft);
  border: 1px solid transparent;
  border-radius: var(--radius);
  color: var(--text-primary);
  padding: 11px 15px;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.5;
  transition: background .2s ease, border-color .2s ease, box-shadow .2s ease;
}
select {
  background: var(--bg-soft);
  border: 1px solid transparent;
  border-radius: var(--radius);
  color: var(--text-primary);
  padding: 11px 12px;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.5;
  transition: background .2s ease, border-color .2s ease, box-shadow .2s ease;
}
input[type="text"]::placeholder, input[type="search"]::placeholder,
input[type="password"]::placeholder, input[type="email"]::placeholder,
input[type="number"]::placeholder, input:not([type])::placeholder,
textarea::placeholder { color: var(--text-placeholder); }

input[type="text"]:focus, input[type="search"]:focus, input[type="password"]:focus,
input[type="email"]:focus, input[type="number"]:focus, input[type="url"]:focus,
input[type="tel"]:focus, input:not([type]):focus, textarea:focus, select:focus {
  outline: none;
  background: var(--card-hover);
  border-color: var(--primary-soft);
  box-shadow: var(--ring);
}
/* 禁用态 */
input[type="text"]:disabled, input[type="email"]:disabled, textarea:disabled {
  background: var(--bg-soft); color: var(--text-muted); opacity: .75; cursor: not-allowed;
}
/* 文件选择框：默认的「选择文件」原生控件在各浏览器里都很难看，
   统一成软填充容器 + 主色胶囊按钮 */
input[type="file"] {
  display: block;
  width: 100%;
  padding: 7px;
  font-size: 13px;
  color: var(--text-muted);
  background: var(--bg-soft);
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color .2s ease, background .2s ease;
}
input[type="file"]:hover { border-color: var(--primary-soft); }
input[type="file"]:focus { outline: none; border-color: var(--primary-soft); box-shadow: var(--ring); }
input[type="file"]::file-selector-button {
  margin-right: 12px;
  padding: 8px 16px;
  border: none;
  border-radius: var(--radius-full);
  background: var(--primary);
  color: #fff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s ease;
}
input[type="file"]::file-selector-button:hover { background: var(--primary-dark); }
input[type="file"]::-webkit-file-upload-button {
  margin-right: 12px; padding: 8px 16px; border: none;
  border-radius: var(--radius-full); background: var(--primary); color: #fff;
  font-family: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
}

/* ============================================================
   顶部结构：渐变工具条 + 玻璃主头（双层）
   ============================================================ */
.topbar {
  background: var(--grad-primary);
  background-size: 200% 200%;
  animation: gradShift 14s ease infinite;
  color: rgba(255, 255, 255, 0.92);
  font-size: 12px;
  height: var(--topbar-h);
}
@keyframes gradShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
.topbar-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: var(--topbar-h);
}
.topbar-text { letter-spacing: 0.5px; }
.topbar-links { display: flex; align-items: center; gap: 2px; }
.topbar-links a {
  color: rgba(255, 255, 255, 0.88); padding: 0 12px; height: var(--topbar-h);
  display: inline-flex; align-items: center; transition: background .2s;
  border-left: 1px solid rgba(255, 255, 255, 0.16);
}
.topbar-links a:hover { color: #fff; background: rgba(255, 255, 255, 0.16); }
.topbar .theme-toggle {
  border-left: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 0; height: var(--topbar-h); padding: 0 12px;
  background: transparent; color: rgba(255, 255, 255, 0.88);
}
.topbar .theme-toggle:hover { color: #fff; background: rgba(255, 255, 255, 0.16); }

/* ===== 玻璃主头 ===== */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--header-bg);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid var(--card-border);
  transition: box-shadow .3s ease, background .3s ease;
}
.site-header.scrolled {
  background: var(--card-hover);
  box-shadow: 0 10px 34px rgba(109, 93, 246, 0.14);
}
.header-inner {
  display: flex; align-items: center; gap: 20px;
  height: var(--header-h);
}
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; color: var(--text-primary); }
.logo img { height: 38px; border-radius: 12px; box-shadow: 0 4px 14px rgba(109, 93, 246, 0.25); }
.logo span {
  background: var(--grad-primary);
  background-size: 200% 200%;
  animation: gradShift 10s ease infinite;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: 0.5px;
}

/* ===== 主导航 — 圆润胶囊 + 渐变选中 ===== */
.main-nav { display: flex; gap: 4px; flex: 1; }
.main-nav a {
  padding: 8px 14px; border-radius: var(--radius-full); color: var(--text-secondary);
  font-size: 14px; font-weight: 500; position: relative;
  transition: background .25s var(--ease-soft), color .2s, transform .25s var(--ease-spring), box-shadow .25s;
}
.main-nav a:hover {
  background: var(--primary-light); color: var(--primary);
  transform: translateY(-2px);
}
.main-nav a.active {
  background: var(--grad-primary);
  background-size: 160% 160%;
  color: #fff; font-weight: 600;
  box-shadow: var(--shadow-glow);
  animation: gradShift 8s ease infinite;
}
.nav-icon { font-size: 14px; line-height: 1; }
.nav-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; line-height: 1;
  background: var(--danger); color: #fff; border-radius: var(--radius-full);
  font-size: 11px; padding: 0 5px; margin-left: 4px; font-weight: 700;
  box-shadow: 0 2px 8px rgba(244, 63, 94, 0.45);
  animation: badgePulse 2s ease-in-out infinite;
}
@keyframes badgePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.12); }
}

/* ===== 用户菜单 ===== */
.user-menu { position: relative; }
.user-chip {
  display: flex; align-items: center; gap: 8px; padding: 5px 12px;
  border-radius: var(--radius-full); cursor: pointer;
  transition: background .25s, box-shadow .25s, transform .25s var(--ease-spring);
  border: 1px solid transparent;
}
.user-chip:hover {
  background: var(--primary-light); border-color: var(--card-line);
  box-shadow: var(--shadow-sm); transform: translateY(-1px);
}
.user-chip-name { font-size: 14px; font-weight: 600; color: var(--text-primary); max-width: 96px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-dropdown {
  display: none; position: absolute; right: 0; top: calc(100% + 10px);
  background: var(--card-hover); border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  min-width: 170px; padding: 6px;
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
}
.user-menu:hover .user-dropdown, .user-menu:focus-within .user-dropdown { display: block; animation: dropIn .28s var(--ease-spring); }
@keyframes dropIn { from { opacity: 0; transform: translateY(-8px) scale(.97); } to { opacity: 1; transform: translateY(0) scale(1); } }
.user-dropdown a { display: block; padding: 10px 16px; border-radius: 10px; color: var(--text-secondary); font-size: 14px; transition: all .18s; }
.user-dropdown a:hover { background: var(--primary-light); color: var(--primary); transform: translateX(3px); }
.user-dropdown a.danger { color: var(--danger); }
.user-dropdown a.danger:hover { background: var(--danger-bg); }
.user-dropdown small { color: var(--text-muted); margin-left: 4px; }

/* ===== 头像 ===== */
.mini-avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0;
  background: var(--grad-primary);
  color: #fff; font-weight: 700; overflow: hidden; font-size: 15px;
  box-shadow: 0 3px 12px rgba(109, 93, 246, 0.28);
}
.mini-avatar img { width: 100%; height: 100%; object-fit: cover; }
.mini-avatar.sm { width: 34px; height: 34px; font-size: 13px; }
.mini-avatar.lg { width: 58px; height: 58px; font-size: 20px; box-shadow: 0 5px 18px rgba(109, 93, 246, 0.32); }
.mini-avatar.xl { width: 84px; height: 84px; font-size: 28px; box-shadow: 0 8px 26px rgba(109, 93, 246, 0.35); }

.artist-tag {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--grad-primary); color: #fff; font-size: 11px; padding: 3px 11px;
  border-radius: var(--radius-full); font-weight: 600; margin-left: 4px;
  box-shadow: 0 2px 10px rgba(109, 93, 246, 0.30);
}
.artist-tag.sm { font-size: 10px; padding: 2px 8px; }

/* ============================================================
   卡片 — 磨砂玻璃 · 圆润 · 悬浮上浮
   ============================================================ */
.card {
  background: var(--card);
  backdrop-filter: blur(var(--glass-blur)) saturate(170%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(170%);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  padding: 22px; margin-bottom: 20px;
  transition: transform .3s var(--ease-spring), box-shadow .3s ease, border-color .3s ease, background .3s ease;
}
.card:hover {
  background: var(--card-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: var(--primary-soft);
}
.card-title {
  font-size: 16px; font-weight: 800; margin-bottom: 14px; color: var(--text-primary);
  display: flex; align-items: center; gap: 9px;
}
.card-title::before {
  content: '';
  width: 22px; height: 22px; flex-shrink: 0;
  background: var(--grad-primary);
  border-radius: 7px;
  box-shadow: 0 3px 10px rgba(109, 93, 246, 0.30);
  transform: rotate(45deg) scale(.62);
}
.card-link {
  display: inline-flex; align-items: center; gap: 4px; margin-top: 12px;
  font-size: 13px; color: var(--primary); font-weight: 600;
  transition: gap .25s var(--ease-spring), color .2s;
}
.card-link:hover { gap: 10px; color: var(--accent); }
.card.empty { text-align: center; padding: 48px 24px; }
.card.empty p { margin-bottom: 14px; color: var(--text-muted); font-size: 15px; }

/* ============================================================
   按钮 — 渐变流动 · 圆润胶囊 · 按压回弹
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 22px; border-radius: var(--radius-full); border: none;
  font-size: 14px; cursor: pointer; font-weight: 600;
  text-align: center; user-select: none; white-space: nowrap;
  transition: transform .25s var(--ease-spring), box-shadow .25s, background-position .4s, filter .2s;
}
.btn:active { transform: scale(.96); }
.btn-primary {
  background: var(--grad-primary);
  background-size: 180% 180%;
  color: #fff;
  box-shadow: var(--shadow-glow);
}
.btn-primary:hover {
  background-position: 100% 50%;
  transform: translateY(-2px);
  box-shadow: 0 12px 36px rgba(109, 93, 246, 0.48);
}
.btn-primary:active { transform: translateY(0) scale(.97); }
.btn-outline {
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--primary);
  border: 1.5px solid var(--primary-soft);
}
.btn-outline:hover {
  background: var(--primary-light); border-color: var(--primary);
  transform: translateY(-2px); box-shadow: var(--shadow-sm);
}
.btn-danger-ghost { background: var(--danger-bg); color: var(--danger); border: 1.5px solid rgba(244, 63, 94, 0.30); }
.btn-danger-ghost:hover { background: rgba(244, 63, 94, 0.18); border-color: var(--danger); transform: translateY(-1px); }
.btn-like { background: rgba(255, 255, 255, 0.4); color: var(--accent); border: 1.5px solid rgba(255, 94, 125, 0.35); transition: all .3s; }
.btn-like:hover { background: var(--accent-light); transform: scale(1.06); }
.btn-like.liked { background: var(--grad-warm); color: #fff; border-color: transparent; box-shadow: var(--shadow-glow-pink); animation: likePop .35s ease; }
@keyframes likePop { 0% { transform: scale(1); } 40% { transform: scale(1.25); } 100% { transform: scale(1); } }
.btn-block { display: flex; width: 100%; }
.btn.sm { padding: 6px 14px; font-size: 12.5px; }
.btn.lg { padding: 13px 30px; font-size: 16px; }
.btn-sm { padding: 6px 14px; font-size: 12.5px; }
.btn-error { background: linear-gradient(120deg, #f43f5e, #ff5e7d); background-size: 180% 180%; color: #fff; box-shadow: 0 6px 20px rgba(244, 63, 94, 0.35); }
.btn-error:hover { background-position: 100% 50%; transform: translateY(-2px); }
.btn-success { background: linear-gradient(120deg, #10b981, #14c9c9); background-size: 180% 180%; color: #fff; box-shadow: 0 6px 20px rgba(16, 185, 129, 0.35); }
.btn-success:hover { background-position: 100% 50%; transform: translateY(-2px); }

/* ============================================================
   表单 — 玻璃输入框 · 圆润
   ============================================================ */
.form-card { max-width: 720px; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 7px; font-weight: 600; font-size: 14px; color: var(--text-secondary); }
.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="email"],
.form-group input[type="number"],
.form-group input[type="url"],
.form-group input[type="search"],
.form-group textarea,
.form-group select {
  width: 100%; padding: 12px 15px;
  border: 1px solid transparent;      /* v7.1：不再是硬边框，聚焦才描边 */
  border-radius: var(--radius); font-size: 14px;
  background: var(--bg-soft);
  color: var(--text-primary);
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
  font-family: inherit;
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
  outline: none;
  border-color: var(--primary-soft);
  box-shadow: var(--ring);
  background: var(--card-hover);
}
.form-group input::placeholder, .form-group textarea::placeholder { color: var(--text-placeholder); }
.form-group textarea { resize: vertical; min-height: 110px; line-height: 1.7; }
.form-group input[disabled], .form-group textarea[disabled] { background: var(--bg-soft); color: var(--text-muted); cursor: not-allowed; opacity: .75; }
.hint { font-size: 12px; color: var(--text-muted); margin-top: 5px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-control {
  width: 100%; padding: 12px 15px;
  border: 1px solid transparent;
  border-radius: var(--radius); font-size: 14px; background: var(--bg-soft);
  color: var(--text-primary);
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.form-control:focus { outline: none; border-color: var(--primary-soft); box-shadow: var(--ring); background: var(--card-hover); }

.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap input { padding-right: 44px; }
.pw-toggle {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; padding: 8px 10px;
  color: var(--text-muted); font-size: 15px; border-radius: 8px;
  transition: color .2s, background .2s;
}
.pw-toggle:hover { color: var(--primary); background: var(--primary-light); }

.checkbox { display: flex; align-items: flex-start; gap: 8px; font-size: 13.5px; color: var(--text-secondary); cursor: pointer; }
.checkbox input { margin-top: 4px; accent-color: var(--primary); }

/* 开关 */
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--card-line); }
.switch-row:last-child { border-bottom: none; }
.switch-label { font-weight: 600; font-size: 14px; color: var(--text-primary); }
.switch-desc { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.switch { position: relative; display: inline-block; width: 46px; height: 26px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
  position: absolute; cursor: pointer; inset: 0;
  background: rgba(109, 93, 246, 0.18); border-radius: var(--radius-full);
  transition: background .3s;
}
.slider::before {
  content: ''; position: absolute; height: 20px; width: 20px; left: 3px; bottom: 3px;
  background: #ffffff; border-radius: 50%;
  box-shadow: 0 2px 6px rgba(109, 93, 246, 0.3);
  transition: transform .3s var(--ease-spring);
}
.switch input:checked + .slider { background: var(--grad-primary); }
.switch input:checked + .slider::before { transform: translateX(20px); }

/* 登录/注册 — 玻璃卡 */
.auth-body { min-height: 100vh; display: flex; flex-direction: column; }
.auth-wrap {
  flex: 1; display: flex; align-items: center; justify-content: center;
  padding: 40px 20px;
}
.auth-card {
  width: 100%; max-width: 430px;
  background: var(--card);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border: 1px solid var(--card-border);
  border-radius: 28px;
  padding: 40px 36px;
  box-shadow: var(--shadow-lg);
  animation: cardIn .5s var(--ease-spring);
}
@keyframes cardIn { from { opacity: 0; transform: translateY(22px) scale(.97); } to { opacity: 1; transform: translateY(0) scale(1); } }
.auth-logo {
  font-size: 18px; font-weight: 800; margin-bottom: 20px;
  background: var(--grad-primary); background-size: 200% 200%;
  animation: gradShift 10s ease infinite;
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.auth-card h1 { font-size: 22px; margin-bottom: 6px; font-weight: 800; color: var(--text-primary); }
.auth-sub { color: var(--text-muted); font-size: 13.5px; margin-bottom: 24px; }
.auth-form .btn-block { margin-top: 6px; }
.auth-links { margin-top: 20px; text-align: center; font-size: 13.5px; }
.auth-links a { color: var(--primary); font-weight: 600; }
.auth-links a:hover { text-decoration: underline; }

/* ============================================================
   主内容区（三栏栅格 260 / flex / 280）
   ============================================================ */
.main-content { padding-top: 24px; min-height: calc(100vh - 260px); }
.home-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr) 280px; gap: 20px; align-items: start; }
.side-col { position: sticky; top: calc(var(--header-h) + 20px); display: flex; flex-direction: column; }
.main-col { min-width: 0; display: flex; flex-direction: column; }

/* 首页栏目标题栏 — 渐变文字 + 底部渐变线 */
.section-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 4px 12px; margin-bottom: 14px;
  position: relative;
}
.section-head::after {
  content: '';
  position: absolute; left: 0; bottom: 0; height: 3px; width: 100%;
  background: var(--grad-primary);
  border-radius: var(--radius-full);
  opacity: .85;
}
.section-head h2 {
  font-size: 17px; font-weight: 800; color: var(--text-primary);
  display: flex; align-items: center; gap: 10px;
}
.section-head h2::before {
  content: '';
  width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0;
  background: var(--grad-primary);
  box-shadow: 0 2px 8px rgba(109, 93, 246, 0.4);
  transform: rotate(45deg);
}
.section-more {
  font-size: 13px; color: var(--text-muted); font-weight: 600;
  padding: 5px 14px; border-radius: var(--radius-full);
  transition: all .25s var(--ease-spring);
}
.section-more:hover {
  color: #fff;
  background: var(--grad-primary);
  box-shadow: var(--shadow-glow);
  transform: translateX(2px);
}

/* 快捷入口宫格 — 玻璃磁贴 */
.quick-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 24px;
}
.quick-item {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  background: var(--card);
  backdrop-filter: blur(var(--glass-blur)) saturate(170%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(170%);
  border: 1px solid var(--card-border); border-radius: var(--radius-xl);
  padding: 20px 10px 16px; color: var(--text-secondary); font-size: 13px; font-weight: 600;
  box-shadow: var(--shadow-sm);
  transition: transform .3s var(--ease-spring), box-shadow .3s, border-color .3s, color .2s;
}
.quick-item:hover {
  transform: translateY(-6px);
  border-color: var(--primary-soft);
  box-shadow: var(--shadow);
  color: var(--primary);
}
.quick-item .qicon {
  width: 46px; height: 46px; display: flex; align-items: center; justify-content: center;
  background: var(--grad-primary);
  color: #fff; border-radius: 16px;
  font-size: 21px;
  box-shadow: 0 5px 16px rgba(109, 93, 246, 0.32);
  transition: transform .35s var(--ease-spring), box-shadow .3s;
}
.quick-item:hover .qicon {
  transform: scale(1.12) rotate(-6deg);
  box-shadow: 0 8px 24px rgba(109, 93, 246, 0.45);
}

.profile-mini { text-align: center; }
.profile-mini .mini-avatar { margin: 0 auto 12px; }
.profile-mini-info strong { font-size: 16px; display: block; }
.profile-mini-info .muted { font-size: 12px; margin-top: 4px; }
.profile-stats { display: flex; justify-content: center; gap: 28px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--card-line); }
.profile-stats div { text-align: center; transition: transform .25s var(--ease-spring); }
.profile-stats div:hover { transform: scale(1.08); }
.profile-stats b {
  display: block; font-size: 20px; font-weight: 800;
  background: var(--grad-primary); background-size: 200% 200%;
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.profile-stats span { font-size: 12px; color: var(--text-muted); }

.channel-nav { list-style: none; }
.channel-nav li { margin-bottom: 2px; }
.channel-nav a {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px;
  border-radius: var(--radius); color: var(--text-secondary); font-size: 14px;
  transition: background .2s, color .2s, transform .25s var(--ease-spring), box-shadow .2s;
}
.channel-nav a:hover {
  background: var(--primary-light); color: var(--primary);
  transform: translateX(4px);
  box-shadow: var(--shadow-sm);
}
.ch-icon { font-size: 17px; }

.artist-rail { display: flex; flex-wrap: wrap; gap: 10px; }
.artist-mini { display: block; transition: transform .25s var(--ease-spring); }
.artist-mini:hover { transform: translateY(-3px) scale(1.06); }
.artist-mini .mini-avatar { border: 2.5px solid rgba(255,255,255,.9); transition: box-shadow .25s; }
.artist-mini:hover .mini-avatar { box-shadow: 0 6px 20px rgba(109, 93, 246, 0.4); }

/* ============================================================
   发布条 v7.1「无缝发布带」
   ------------------------------------------------------------
   之前是「大白卡片里再套一个硬边框输入框」，两层盒子叠在一起，
   输入框那圈深色描边尤其扎眼。现在改成：
   · 不再是一张独立卡片 —— 背景是从上方标题栏渐隐下来的淡主色带，
     上沿贴住「社区动态」的渐变分割线，视觉上和顶部连成一体
   · 内部只有一条无边框胶囊输入框 + 渐变发布按钮，
     聚焦时高亮的是胶囊本身，而不是跳出一圈黑边
   ============================================================ */
.post-box {
  background: linear-gradient(180deg,
              var(--primary-light) 0%,
              rgba(109, 93, 246, 0.05) 55%,
              transparent 100%);
  border: none;
  border-bottom: 1px solid var(--card-line);   /* 收口：到底为止，不再悬空 */
  border-radius: 0 0 20px 20px;
  box-shadow: none;
  padding: 13px 13px 15px;
  /* 抵消标题栏的下外边距（桌面 14px / 移动端 12px，见 mobile.css），
     让这条带子真的从分割线下面长出来 */
  margin: -14px 0 18px;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.post-box:hover { transform: none; box-shadow: none; }
.post-box-row { display: flex; align-items: center; gap: 10px; }
.post-box-row:focus-within .post-box-input { box-shadow: var(--shadow), var(--ring); }

input.post-box-input {
  flex: 1; min-width: 0;
  padding: 10px 20px;
  background: var(--card-hover);
  border: 1px solid transparent;
  border-radius: var(--radius-full);
  font-size: 14px;
  box-shadow: var(--shadow-sm);
  transition: background .2s ease, box-shadow .25s ease;
}
input.post-box-input:focus {
  background: var(--card);
  border-color: transparent;
  box-shadow: var(--shadow), var(--ring);
}
input.post-box-input::placeholder { color: var(--text-muted); }

/* ===== 帖子流 ===== */
.feed-post { padding: 20px 24px; }
.feed-post:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: var(--primary-soft);
}
.post-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.post-head-info { flex: 1; min-width: 0; }
.post-user { font-weight: 700; color: var(--text-primary); font-size: 15px; transition: color .2s; }
.post-user:hover { color: var(--primary); }
.post-meta { font-size: 12px; color: var(--text-muted); display: block; margin-top: 2px; }
.ch-tag {
  color: var(--primary); font-weight: 600;
  background: var(--primary-light);
  padding: 2px 10px; border-radius: var(--radius-full); font-size: 11.5px;
  transition: all .2s;
}
.ch-tag:hover { background: var(--primary-soft); box-shadow: var(--shadow-sm); }
.top-tag {
  background: var(--grad-warm); color: #fff;
  font-size: 11.5px; padding: 3px 12px; border-radius: var(--radius-full);
  font-weight: 700; box-shadow: 0 3px 12px rgba(255, 120, 80, 0.35);
}
.post-title { font-size: 18px; margin-bottom: 8px; font-weight: 800; line-height: 1.5; }
.post-title a { color: var(--text-primary); transition: color .2s; }
.post-title a:hover { color: var(--primary); }
.post-content { color: var(--text-secondary); font-size: 14px; white-space: pre-line; line-height: 1.75; }
.post-content.full { font-size: 16px; line-height: 1.9; }
.post-imgs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.post-imgs img {
  width: 100%; height: 170px; object-fit: cover; border-radius: var(--radius);
  border: 1px solid var(--card-border);
  transition: transform .3s var(--ease-spring), box-shadow .3s;
}
.post-imgs img:hover { transform: scale(1.03); box-shadow: var(--shadow); }
.post-imgs.full { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.post-imgs.full img { height: 240px; }
.post-foot {
  margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--card-line);
  font-size: 13px; color: var(--text-muted); display: flex; justify-content: space-between;
}
.post-foot a { color: var(--text-muted); transition: color .2s, gap .2s; }
.post-foot a:hover { color: var(--primary); }
.detail-title { font-size: 22px; font-weight: 800; line-height: 1.5; }

/* ===== 评论 ===== */
.comment-form { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 18px; }
.comment-form textarea { flex: 1; }
.comment-list { margin-top: 8px; }
.comment-item { display: flex; gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--card-line); transition: background .2s; }
.comment-item:last-child { border-bottom: none; }
.comment-main { flex: 1; }
.comment-head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.comment-user { font-weight: 600; font-size: 13px; color: var(--text-primary); }
.comment-del { font-size: 12px; color: var(--text-muted); margin-left: auto; transition: color .2s; }
.comment-del:hover { color: var(--danger); }
.comment-main p { font-size: 14px; color: var(--text-secondary); line-height: 1.6; }
.comment-input-wrap { flex: 1; }
.comment-toolbar { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.reply-list { margin-top: 10px; padding-left: 12px; border-left: 2px solid var(--primary-soft); }
.reply-item { padding: 10px 0; }
.reply-main p { font-size: 13.5px; }
.reply-btn { font-size: 12px; color: var(--text-muted); background: none; border: none; cursor: pointer; transition: color .2s; }
.reply-btn:hover { color: var(--primary); }
.reply-form { margin-top: 10px; }
.reply-form-actions { display: flex; gap: 8px; margin-top: 8px; }
.cancel-reply { font-size: 12px; background: none; border: none; color: var(--text-muted); cursor: pointer; }
.cancel-reply:hover { color: var(--primary); }

/* ===== 页面头部 ===== */
.page-head {
  display: flex; align-items: center; gap: 16px; margin-bottom: 24px;
  padding-bottom: 14px; position: relative;
}
.page-head::after {
  content: '';
  position: absolute; left: 0; bottom: 0; height: 3px; width: 72px;
  background: var(--grad-primary); border-radius: var(--radius-full);
}
.page-head h1 { font-size: 26px; font-weight: 800; }
.page-head p { margin: 0; }
.page-head .btn { margin-left: auto; }

.channel-head {
  background: var(--card);
  backdrop-filter: blur(var(--glass-blur)) saturate(170%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(170%);
  border: 1px solid var(--card-border); border-radius: var(--radius-xl);
  padding: 24px 28px; margin-bottom: 18px; box-shadow: var(--shadow-sm);
}
.channel-head-icon { font-size: 48px; }
.channel-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.channel-card {
  display: flex; gap: 20px; align-items: flex-start; padding: 22px;
  transition: transform .3s var(--ease-spring), box-shadow .3s, border-color .3s;
}
.channel-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-soft);
}
.channel-icon { font-size: 42px; transition: transform .35s var(--ease-spring); }
.channel-card:hover .channel-icon { transform: scale(1.15) rotate(-8deg); }
.channel-info h3 { font-size: 18px; margin-bottom: 6px; font-weight: 800; }
.channel-info p { font-size: 14px; }
.channel-count { font-size: 13px; color: var(--text-muted); margin-top: 4px; }
.channel-card-new {
  border-style: dashed; border-color: var(--primary-soft);
  justify-content: center; text-align: center;
  background: rgba(109, 93, 246, 0.05);
}
.channel-card-new:hover { background: var(--primary-light); }

/* ===== 工具栏 & 画廊 ===== */
.toolbar {
  display: flex; justify-content: space-between; align-items: center;
  gap: 14px; margin-bottom: 20px; flex-wrap: wrap;
}
.filter-tabs {
  display: flex; gap: 4px;
  background: var(--card);
  backdrop-filter: blur(var(--glass-blur)) saturate(170%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(170%);
  padding: 5px; border-radius: var(--radius-full);
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow-sm);
}
.filter-tabs a {
  padding: 8px 18px; border-radius: var(--radius-full); font-size: 14px;
  color: var(--text-secondary); font-weight: 500;
  transition: all .25s var(--ease-spring);
}
.filter-tabs a:hover { color: var(--primary); background: var(--primary-light); transform: translateY(-1px); }
.filter-tabs a.active {
  background: var(--grad-primary); color: #fff; font-weight: 600;
  box-shadow: var(--shadow-glow);
}
.search-box { display: flex; gap: 8px; align-items: center; }
.search-box input {
  /* 表单里输入框要吃掉剩余宽度，否则会被按钮挤成一小截 */
  flex: 1 1 auto;
  min-width: 0;
  padding: 10px 20px;
  border: 1px solid transparent;      /* v7.1：胶囊保留，描边去掉 */
  border-radius: var(--radius-full);
  font-size: 14px;
  background: var(--card);
  box-shadow: var(--shadow-sm);
  transition: background .2s ease, box-shadow .25s ease, width .25s ease;
}
.search-box .btn { flex: 0 0 auto; white-space: nowrap; }
.search-box input:focus {
  outline: none;
  background: var(--card-hover);
  border-color: var(--primary-soft);
  box-shadow: var(--shadow), var(--ring);
  width: 260px;
}

.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 20px; }
.art-card { padding: 0; overflow: hidden; }
.art-card-img { position: relative; display: block; aspect-ratio: 1; overflow: hidden; }
.art-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s var(--ease-spring); }
.art-card:hover .art-card-img img { transform: scale(1.08); }
.art-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); border-color: var(--primary-soft); }
.art-card-info { padding: 14px 16px 16px; }
.art-card-info h3 {
  font-size: 15px; margin-bottom: 8px; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; font-weight: 700;
}
.art-card-info h3 a { color: var(--text-primary); transition: color .2s; }
.art-card-info h3 a:hover { color: var(--primary); }
.art-card-meta { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.art-owner {
  color: var(--text-secondary); flex: 1; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; font-weight: 600; transition: color .2s;
}
.art-owner:hover { color: var(--primary); }
.like-count { color: var(--text-muted); font-size: 12px; }

.art-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.art-thumb {
  position: relative; display: block; border-radius: var(--radius-lg); overflow: hidden;
  aspect-ratio: 1; border: 1px solid var(--card-border);
}
.art-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s var(--ease-spring); }
.art-thumb:hover img { transform: scale(1.07); }
.art-thumb:hover { box-shadow: var(--shadow); border-color: var(--primary-soft); }
.art-thumb-overlay { position: absolute; top: 10px; right: 10px; display: flex; gap: 6px; }
.sale-tag, .sold-tag {
  padding: 4px 13px; border-radius: var(--radius-full); font-size: 13px; font-weight: 700; color: #fff;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.sale-tag { background: var(--grad-warm); box-shadow: 0 3px 12px rgba(255, 120, 80, 0.4); }
/* 价格标签固定在右下角，避免被左上角的「在售」徽章盖住 */
.art-card-img .sale-tag {
  position: absolute; right: 10px; bottom: 10px;
  font-size: 12px; padding: 4px 11px;
  box-shadow: 0 3px 12px rgba(255, 120, 80, .35);
}
.sale-tag.lg { font-size: 15px; padding: 6px 16px; }
.sold-tag { background: rgba(60, 55, 95, 0.75); }
.sold-tag.lg { font-size: 15px; padding: 6px 16px; }
.sale-badge {
  position: absolute; left: 10px; top: 10px; background: var(--grad-warm); color: #fff;
  font-size: 11px; padding: 4px 11px; border-radius: var(--radius-full); font-weight: 600;
  box-shadow: 0 3px 12px rgba(255, 120, 80, 0.4);
}

/* ===== 画作详情 ===== */
.art-detail-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 22px; align-items: start; }
.art-detail-img img {
  width: 100%; border-radius: var(--radius-xl);
  border: 1px solid var(--card-border); box-shadow: var(--shadow);
}
.art-detail-side .card { position: sticky; top: calc(var(--header-h) + 20px); }
.art-title { font-size: 20px; font-weight: 800; margin-bottom: 10px; line-height: 1.5; }
.art-desc { color: var(--text-secondary); font-size: 14px; line-height: 1.8; white-space: pre-line; }
.art-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.owner-row { display: flex; align-items: center; gap: 12px; }
.owner-name { font-weight: 700; font-size: 15px; color: var(--text-primary); }

/* ===== 好友/用户 ===== */
/* 好友页两栏：主区（好友列表）宽、侧栏（搜索）窄。
   显式落到 grid-area，不依赖 DOM 顺序 —— 曾出现「DOM 里 main 在前，
   却只分到 220px，side 拿到 920px」的错位。 */
.friend-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 20px;
  align-items: start;
}
.friend-main { grid-column: 1; grid-row: 1; }
.friend-side { grid-column: 2; grid-row: 1; }
.friend-main, .friend-side { min-width: 0; }
.user-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.user-card {
  background: var(--card);
  backdrop-filter: blur(var(--glass-blur)) saturate(170%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(170%);
  border: 1px solid var(--card-border); border-radius: var(--radius-xl);
  padding: 18px; display: flex; gap: 14px; align-items: flex-start;
  transition: transform .3s var(--ease-spring), box-shadow .3s, border-color .3s;
}
.user-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--primary-soft); }
.user-card-info { flex: 1; min-width: 0; }
.user-name {
  font-weight: 700; font-size: 14.5px; color: var(--text-primary); display: block;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* 可点击的用户名：撑到最小触控高度，手指才好点（视觉上仍是文字高度） */
a.user-name { padding: 6px 0; margin: -6px 0; }
.user-card-info .muted { font-size: 12px; }
.user-card-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.online-dot, .offline-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; }
.online-dot { background: var(--success); box-shadow: 0 0 8px rgba(16, 185, 129, 0.6); }
.offline-dot { background: var(--text-muted); }

/* ===== 私信 ===== */
.msg-layout {
  display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 0;
  height: calc(100vh - 170px); min-height: 460px;
  background: var(--card);
  backdrop-filter: blur(var(--glass-blur)) saturate(170%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(170%);
  border: 1px solid var(--card-border); border-radius: var(--radius-xl);
  overflow: hidden; box-shadow: var(--shadow-sm);
}
.conv-list { border-right: 1px solid var(--card-line); overflow-y: auto; }
.conv-item {
  display: flex; gap: 11px; padding: 13px 15px; cursor: pointer;
  border-bottom: 1px solid var(--card-line); transition: background .2s, transform .2s;
}
.conv-item:hover { background: var(--primary-light); }
.conv-item.active {
  background: var(--primary-light);
  box-shadow: inset 3px 0 0 var(--primary);
}
.conv-info { flex: 1; min-width: 0; }
.conv-info strong { font-size: 13.5px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-primary); }
.conv-preview { font-size: 12px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px; }
.conv-time { font-size: 11px; color: var(--text-muted); flex-shrink: 0; }
.conv-empty { padding: 40px 20px; text-align: center; color: var(--text-muted); font-size: 13.5px; }
.conv-main { display: flex; flex-direction: column; background: var(--bg-soft); min-width: 0; }
.conv-head {
  display: flex; align-items: center; gap: 12px; padding: 13px 18px;
  background: var(--card); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--card-line); flex-shrink: 0;
}
.conv-body { flex: 1; overflow-y: auto; padding: 18px; }
.msg { display: flex; margin-bottom: 14px; gap: 10px; align-items: flex-start; }
.msg.mine { flex-direction: row-reverse; }
.msg .mini-avatar { width: 36px; height: 36px; font-size: 13px; }
.bubble {
  max-width: 62%; padding: 11px 16px; border-radius: 18px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--card-border);
  font-size: 14px; line-height: 1.6; color: var(--text-primary);
  word-break: break-word; box-shadow: var(--shadow-sm);
}
.msg.mine .bubble {
  background: var(--grad-primary); border-color: transparent; color: #fff;
  border-bottom-right-radius: 6px;
  box-shadow: var(--shadow-glow);
}
.msg:not(.mine) .bubble { border-bottom-left-radius: 6px; }
/* 消息列容器：气泡在上、时间在下（时间绝不能塞进气泡里，否则会跟文字粘连）
   flex: 1 让它吃掉头像之外的剩余宽度，气泡的 62% 才有正确基准；
   否则 align-items 会把列容器压成内容宽度，气泡被挤窄、长句被迫折行。 */
.msg-col { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.msg.mine .msg-col { align-items: flex-end; }
.msg:not(.mine) .msg-col { align-items: flex-start; }
.msg-time { font-size: 11px; color: var(--text-muted); margin-top: 4px; line-height: 1.4; }
.msg.mine .msg-time { text-align: right; }
.conv-input {
  display: flex; gap: 10px; padding: 13px 16px;
  background: var(--card); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--card-line); flex-shrink: 0;
}
.conv-input input[type="text"] {
  flex: 1; padding: 11px 18px;
  border: 1px solid transparent;
  border-radius: var(--radius-full); font-size: 14px; background: var(--bg-soft);
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.conv-input input[type="text"]:focus { outline: none; border-color: var(--primary-soft); box-shadow: var(--ring); background: var(--card-hover); }

/* ===== 资料页 ===== */
.profile-wrap { max-width: 1000px; margin: 0 auto; }
.profile-banner {
  height: 220px; border-radius: var(--radius-xl);
  background: var(--grad-primary);
  background-size: 200% 200%;
  animation: gradShift 16s ease infinite;
  position: relative; overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.profile-banner::after {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 60% 80% at 80% 20%, rgba(255,255,255,.18) 0%, transparent 60%);
}
.profile-banner img { width: 100%; height: 100%; object-fit: cover; }
.profile-head {
  display: flex; align-items: flex-end; gap: 18px;
  padding: 0 26px; margin-top: -42px; position: relative; z-index: 1;
}
.profile-head .mini-avatar { border: 4px solid var(--card-hover); }
.profile-head-left { flex: 1; min-width: 0; padding-bottom: 6px; }
.profile-head-actions { display: flex; gap: 10px; padding-bottom: 6px; flex-wrap: wrap; }
.profile-body {
  display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 20px;
  margin-top: 18px; align-items: start;
}
.profile-main, .profile-side { min-width: 0; }
.profile-fursona { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 13.5px; color: var(--text-secondary); margin: 10px 0; }
.action-row { display: flex; gap: 10px; flex-wrap: wrap; }
.mini-post { padding: 13px 0; border-bottom: 1px solid var(--card-line); transition: transform .2s; }
.mini-post:last-child { border-bottom: none; }
.mini-post a { font-weight: 600; font-size: 14.5px; color: var(--text-primary); transition: color .2s; }
.mini-post a:hover { color: var(--primary); }

/* 设置 */
.settings-layout { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 20px; align-items: start; }
.settings-side {
  background: var(--card);
  backdrop-filter: blur(var(--glass-blur)) saturate(170%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(170%);
  border: 1px solid var(--card-border); border-radius: var(--radius-xl);
  padding: 10px; position: sticky; top: calc(var(--header-h) + 20px);
  box-shadow: var(--shadow-sm);
}
.avatar-upload-row { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.pf-link-box {
  display: flex; align-items: center; gap: 10px;
  border: 1.5px dashed var(--primary-soft); border-radius: var(--radius);
  padding: 11px 14px; margin-top: 10px; background: var(--primary-light);
}
.pf-copy-btn { flex-shrink: 0; }
.pf-file-row {
  display: flex; align-items: center; gap: 12px; padding: 11px 0;
  border-bottom: 1px solid var(--card-line);
}
.pf-file-row:last-child { border-bottom: none; }
.pf-file-icon { font-size: 22px; flex-shrink: 0; }
.pf-file-info { flex: 1; min-width: 0; }
.pf-file-name { font-size: 13.5px; font-weight: 600; color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-file-meta { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.pf-file-actions { display: flex; gap: 8px; flex-shrink: 0; }
.pf-icon { font-size: 18px; }
.pf-upload-area {
  border: 2px dashed var(--primary-soft); border-radius: var(--radius-lg); padding: 20px;
  text-align: center; font-size: 13px; color: var(--text-muted);
  background: var(--primary-light); transition: all .25s;
}
.pf-upload-area.dragover { border-color: var(--primary); background: var(--primary-soft); transform: scale(1.01); }

/* ============================================================
   页脚 — 渐变收尾
   ============================================================ */
.site-footer {
  background: linear-gradient(160deg, #241d4d 0%, #3d2a6e 55%, #55307a 100%);
  color: rgba(255, 255, 255, 0.72);
  margin-top: 44px; padding: 40px 0 0;
  font-size: 13px;
  position: relative;
  overflow: hidden;
}
.site-footer::before {
  content: '';
  position: absolute; top: -80px; left: 50%; transform: translateX(-50%);
  width: 60%; height: 160px;
  background: radial-gradient(ellipse, rgba(168, 85, 247, 0.30) 0%, transparent 70%);
  filter: blur(40px);
  pointer-events: none;
}
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1.2fr; gap: 28px;
  padding-bottom: 28px; position: relative;
}
.footer-brand .fname {
  font-size: 18px; font-weight: 800; color: #fff; margin-bottom: 10px; letter-spacing: 0.5px;
}
.footer-brand p { line-height: 1.8; max-width: 320px; }
.footer-col h4 {
  font-size: 14px; color: #fff; font-weight: 700; margin-bottom: 12px;
  padding-bottom: 8px; border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}
.footer-col a {
  display: block; color: rgba(255, 255, 255, 0.72); padding: 4px 0; font-size: 13px;
  transition: color .2s, transform .2s;
}
.footer-col a:hover { color: #fff; transform: translateX(3px); }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 15px 0; text-align: center; font-size: 12px;
  color: rgba(255, 255, 255, 0.55); position: relative;
}
.footer-sub { margin-top: 3px; color: rgba(255, 255, 255, 0.45); font-size: 12px; }
.site-footer .footer-links-inline { display: inline-flex; gap: 14px; margin: 0 8px; }
.site-footer .footer-links-inline a { color: rgba(255, 255, 255, 0.6); display: inline; padding: 0; }
.site-footer .footer-links-inline a:hover { color: #fff; }

/* ===== 通知页 ===== */
.notification-list { display: flex; flex-direction: column; }
.notification-item {
  display: flex; gap: 14px; padding: 16px 8px;
  border-bottom: 1px solid var(--card-line); border-radius: var(--radius);
  transition: background .2s, transform .2s;
}
.notification-item:last-child { border-bottom: none; }
.notification-item:hover { background: var(--primary-light); transform: translateX(2px); }
.notification-item.unread { background: var(--primary-light); }
.notification-icon {
  width: 42px; height: 42px; flex-shrink: 0; border-radius: 14px;
  background: var(--grad-primary); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 18px;
  box-shadow: 0 3px 12px rgba(109, 93, 246, 0.28);
}
.notification-item.unread .notification-icon { box-shadow: 0 4px 16px rgba(109, 93, 246, 0.45); }
.notification-content { flex: 1; min-width: 0; }
.notification-title { font-weight: 700; font-size: 14px; color: var(--text-primary); }
.notification-desc { font-size: 13px; color: var(--text-secondary); margin-top: 3px; line-height: 1.6; }
.notification-time { font-size: 12px; color: var(--text-muted); margin-top: 5px; }
.notification-mark {
  width: 9px; height: 9px; border-radius: 50%; background: var(--grad-primary);
  flex-shrink: 0; margin-top: 8px;
  box-shadow: 0 0 8px rgba(109, 93, 246, 0.6);
  animation: badgePulse 2s ease-in-out infinite;
}

/* ===== 附近的人 ===== */
.nearby-wrap { display: flex; flex-direction: column; gap: 16px; }
.nearby-hero {
  background: var(--card);
  backdrop-filter: blur(var(--glass-blur)) saturate(170%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(170%);
  border: 1px solid var(--card-border); border-radius: var(--radius-xl);
  padding: 22px 24px; display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  box-shadow: var(--shadow-sm);
}
.nearby-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.nearby-card {
  background: var(--card);
  backdrop-filter: blur(var(--glass-blur)) saturate(170%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(170%);
  border: 1px solid var(--card-border); border-radius: var(--radius-xl);
  /* 修正：此处误用 flex row，导致「标题 / 位置框 / 提示」被排成一行，
     窄屏下标题被压成竖排单字。卡片容器必须是块级。 */
  padding: 16px;
  transition: transform .3s var(--ease-spring), box-shadow .3s, border-color .3s;
}
.nearby-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--primary-soft); }
.nearby-card-title { font-weight: 700; font-size: 14.5px; color: var(--text-primary); }
.nearby-info { flex: 1; min-width: 0; }
.nearby-name { font-weight: 700; color: var(--text-primary); font-size: 14.5px; transition: color .2s; }
.nearby-name:hover { color: var(--primary); }
.nearby-meta { font-size: 12px; color: var(--text-muted); margin-top: 3px; }
.nearby-addr { font-size: 12px; color: var(--text-secondary); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nearby-sign { font-size: 12.5px; color: var(--text-secondary); margin-top: 5px; line-height: 1.55; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.nearby-actions { display: flex; gap: 8px; margin-top: 10px; }
.empty-nearby { text-align: center; padding: 44px 20px; color: var(--text-muted); }
.loading-nearby { text-align: center; padding: 32px; color: var(--text-muted); font-size: 13.5px; }

/* 地图 */
.map-note {
  background: var(--primary-light); border: 1px solid var(--primary-soft); color: var(--primary);
  padding: 10px 15px; border-radius: var(--radius); font-size: 12.5px; margin-bottom: 12px;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.map-fullscreen-btn, .map-exit-btn {
  background: var(--card); border: 1.5px solid var(--input-border); color: var(--text-secondary);
  padding: 7px 15px; border-radius: var(--radius-full); cursor: pointer; font-size: 13px;
  transition: all .25s;
}
.map-fullscreen-btn:hover, .map-exit-btn:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.location-box {
  background: var(--card);
  backdrop-filter: blur(var(--glass-blur)) saturate(170%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(170%);
  border: 1px solid var(--card-border); border-radius: var(--radius-lg);
  padding: 16px; box-shadow: var(--shadow-sm);
}
.location-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.location-addr { font-size: 13.5px; color: var(--text-primary); margin-top: 8px; }
.location-meta { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.manual-addr { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.manual-addr input {
  flex: 1; min-width: 180px; padding: 10px 14px; border: 1.5px solid var(--input-border);
  border-radius: var(--radius); font-size: 13.5px; background: var(--input-bg);
}
.manual-addr input:focus { outline: none; border-color: var(--primary); box-shadow: var(--ring); }
.radius-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.radius-tab {
  padding: 6px 18px; border: 1.5px solid var(--input-border); border-radius: var(--radius-full);
  background: var(--input-bg); color: var(--text-secondary); font-size: 13px; cursor: pointer;
  transition: all .25s var(--ease-spring);
}
.radius-tab:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-1px); }
.radius-tab.active {
  background: var(--grad-primary); border-color: transparent; color: #fff;
  box-shadow: var(--shadow-glow);
}
.radius-select { padding: 8px 14px; border: 1.5px solid var(--input-border); border-radius: var(--radius); }

/* ===== 摇一摇 ===== */
.shake-main { text-align: center; padding: 30px 16px; }
/* 摇一摇中心图标
   原来是 inline-block + font-size:68px，SVG 会被行高撑到 ~112px 高，
   导致视觉重心上移、和三个雷达圈不同心（实测 dy=-54）。
   改为绝对定位 + flex 居中，尺寸完全由图标本身决定。 */
.shake-icon {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  display: flex; align-items: center; justify-content: center;
  width: 56px; height: 56px;
  margin: 0;
  filter: drop-shadow(0 6px 16px rgba(109, 93, 246, 0.35));
  z-index: 2;
}
.shake-icon .icon-svg { display: block; width: 46px; height: 46px; }
/* 摇动动画叠加到居中变换上，避免覆盖 translate */
.shake-icon.shaking { animation: shakeIconAnim .55s ease-in-out infinite; }
@keyframes shakeIconAnim {
  0%, 100% { transform: translate(-50%, -50%) translateX(0) rotate(0); }
  20%      { transform: translate(-50%, -50%) translateX(-7px) rotate(-6deg); }
  40%      { transform: translate(-50%, -50%) translateX(7px) rotate(6deg); }
  60%      { transform: translate(-50%, -50%) translateX(-5px) rotate(-4deg); }
  80%      { transform: translate(-50%, -50%) translateX(5px) rotate(4deg); }
}
.shake-tip { color: var(--text-muted); font-size: 13.5px; margin: 10px 0 20px; }
.shake-status { font-size: 15px; color: var(--text-secondary); margin-bottom: 16px; }
.shake-result { margin-top: 26px; }
.reshake-btn { margin-top: 16px; }
@keyframes shakeAnim {
  0%, 100% { transform: translateX(0) rotate(0); }
  20% { transform: translateX(-10px) rotate(-6deg); }
  40% { transform: translateX(10px) rotate(6deg); }
  60% { transform: translateX(-8px) rotate(-4deg); }
  80% { transform: translateX(8px) rotate(4deg); }
}
.shaking { animation: shakeAnim .55s ease-in-out infinite; }
.stealth-tip {
  background: var(--warn-bg); border: 1px solid rgba(245, 158, 11, 0.30); color: var(--warn);
  padding: 10px 15px; border-radius: var(--radius); font-size: 12.5px; margin-top: 14px;
  text-align: left; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}

/* 结果列表 */
.result-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; flex-wrap: wrap; gap: 10px; }
.result-title { font-size: 16px; font-weight: 800; color: var(--text-primary); }
.result-count { font-size: 13px; color: var(--text-muted); }
.result-list { display: flex; flex-direction: column; gap: 10px; }
.result-item {
  display: flex; gap: 13px; align-items: center; padding: 14px 16px;
  background: var(--card);
  backdrop-filter: blur(var(--glass-blur)) saturate(170%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(170%);
  border: 1px solid var(--card-border); border-radius: var(--radius-lg);
  transition: transform .3s var(--ease-spring), box-shadow .3s, border-color .3s;
}
.result-item:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--primary-soft); }
.result-info { flex: 1; min-width: 0; }
.result-name { font-weight: 700; font-size: 14px; color: var(--text-primary); }
.result-sign { font-size: 12px; color: var(--text-muted); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.result-distance { font-size: 12px; color: var(--teal); font-weight: 700; flex-shrink: 0; }
.result-actions { display: flex; gap: 8px; flex-shrink: 0; }
.result-back { margin-top: 14px; }
.empty-result { text-align: center; padding: 36px; color: var(--text-muted); }

/* 雷达 */
.radar-container { position: relative; width: 220px; height: 220px; margin: 18px auto; }
.radar-scan {
  position: absolute; inset: 0; border-radius: 50%;
  border: 2px solid var(--primary-soft);
  animation: radarPulse 2.4s ease-out infinite;
}
.radar-ring {
  position: absolute; inset: 20%; border-radius: 50%;
  border: 1.5px solid var(--primary-soft);
  animation: radarPulse 2.4s ease-out infinite .4s;
}
.radar-ring:nth-child(3) { inset: 40%; animation-delay: .8s; }
@keyframes radarPulse {
  0% { transform: scale(.92); opacity: 1; }
  100% { transform: scale(1.06); opacity: .45; }
}

/* ===== 扫码加好友 / 配对码 ===== */
.qr-panel {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--card-border); border-radius: var(--radius-xl);
  padding: 22px; text-align: center;
  box-shadow: var(--shadow-sm);
}
:root[data-theme="dark"] .qr-panel { background: rgba(30, 27, 52, 0.8); }
.qr-panel canvas, .qr-panel img { margin: 0 auto; display: block; }
.pair-code {
  font-size: 34px; font-weight: 800; letter-spacing: 10px;
  color: var(--primary);
  text-shadow: 0 2px 14px rgba(109, 93, 246, 0.35);
  font-family: "Consolas", "SF Mono", monospace;
  background: var(--primary-light);
  border: 1.5px dashed var(--primary-soft);
  border-radius: var(--radius-lg);
  padding: 14px 10px 14px 20px; margin: 12px 0;
}
.pair-input-row { display: flex; gap: 10px; margin-top: 12px; }
.pair-input-row input {
  flex: 1; padding: 12px 14px; border: 1.5px solid var(--input-border);
  border-radius: var(--radius); font-size: 16px; letter-spacing: 6px; text-align: center;
  background: var(--input-bg);
  transition: border-color .25s, box-shadow .25s;
}
.pair-input-row input:focus { outline: none; border-color: var(--primary); box-shadow: var(--ring); }

/* ===== 表情包管理 ===== */
.sticker-panel {
  background: var(--card);
  backdrop-filter: blur(var(--glass-blur)) saturate(170%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(170%);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg); margin-bottom: 12px; overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.sticker-panel-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 16px; background: var(--primary-light);
  font-weight: 700; font-size: 14px; color: var(--text-primary);
}
.sticker-panel-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 10px; padding: 14px; max-height: 260px; overflow-y: auto;
}
.sticker-panel-item {
  width: 100%; height: 72px; object-fit: contain; border-radius: var(--radius);
  cursor: pointer; background: rgba(255, 255, 255, 0.5); padding: 6px;
  transition: all .25s var(--ease-spring); border: 1px solid transparent;
}
.sticker-panel-item:hover {
  transform: scale(1.12); background: var(--primary-light);
  border-color: var(--primary-soft);
}
:root[data-theme="dark"] .sticker-panel-item { background: rgba(255,255,255,.08); }
.sticker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 12px; }
.sticker-item { text-align: center; }
.sticker-thumb {
  width: 100%; aspect-ratio: 1; object-fit: contain; background: rgba(255, 255, 255, 0.5);
  border: 1px solid var(--card-border); border-radius: var(--radius); padding: 8px;
  transition: transform .25s var(--ease-spring);
}
.sticker-thumb:hover { transform: scale(1.06); }
.sticker-name { font-size: 12px; color: var(--text-muted); margin-top: 5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sticker-close {
  position: absolute; top: 4px; right: 4px; width: 20px; height: 20px;
  background: var(--danger); color: #fff; border: none; border-radius: 50%;
  font-size: 11px; cursor: pointer; line-height: 1;
}
.sticker-toggle { background: none; border: none; cursor: pointer; font-size: 18px; padding: 6px; }

/* 帖子视频 / 提及 */
.post-video, .art-video {
  width: 100%; max-height: 500px; border-radius: var(--radius-lg);
  background: #000; display: block; box-shadow: var(--shadow);
}
.post-video-tag {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 10px; padding: 8px 18px;
  background: var(--primary-light); color: var(--primary);
  border-radius: var(--radius-full); font-size: 13px; font-weight: 600;
  border: 1px solid var(--primary-soft);
  transition: all .25s var(--ease-spring);
}
.post-video-tag:hover { background: var(--grad-primary); color: #fff; transform: translateY(-2px); box-shadow: var(--shadow-glow); }
.mention {
  color: var(--primary); font-weight: 700; background: var(--primary-light);
  padding: 1px 6px; border-radius: 6px;
}

/* ===== 客服联系 ===== */
.contact-page { max-width: 700px; margin: 0 auto; }
.contact-card {
  background: var(--card);
  backdrop-filter: blur(var(--glass-blur)) saturate(170%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(170%);
  border: 1px solid var(--card-border); padding: 22px 24px;
  border-radius: var(--radius-xl); margin-bottom: 14px;
  display: flex; align-items: center; gap: 20px;
  transition: transform .3s var(--ease-spring), box-shadow .3s;
}
.contact-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.contact-card-icon {
  font-size: 40px; width: 72px; height: 72px; display: flex; align-items: center;
  justify-content: center; background: var(--grad-primary); border-radius: 22px; flex-shrink: 0;
  box-shadow: 0 5px 18px rgba(109, 93, 246, 0.30);
}
.contact-card-info { flex: 1; min-width: 0; }
.contact-card-name { font-size: 17px; font-weight: 800; color: var(--text-primary); margin-bottom: 5px; }
.contact-card-value { font-size: 15px; color: var(--primary); font-weight: 700; margin-bottom: 5px; word-break: break-all; }
.contact-card-desc { font-size: 12.5px; color: var(--text-muted); }
.contact-card-qrcode { width: 108px; height: 108px; border-radius: var(--radius); object-fit: cover; flex-shrink: 0; border: 1px solid var(--card-border); }
.contact-list { display: flex; flex-direction: column; gap: 10px; }
.contact-item {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  background: var(--primary-light); border-radius: var(--radius); font-size: 14px;
  border: 1px solid var(--primary-soft);
}
.contact-icon { font-size: 18px; flex-shrink: 0; }
.contact-label { color: var(--text-muted); width: 44px; flex-shrink: 0; font-weight: 600; }
.contact-value { color: var(--text-primary); font-weight: 600; word-break: break-all; }
@media (max-width: 600px) {
  .contact-card { flex-direction: column; text-align: center; padding: 20px; }
  .contact-card-qrcode { width: 120px; height: 120px; }
}

/* 验证码 */
.captcha-row { display: flex; align-items: center; gap: 12px; }
.captcha-question {
  background: var(--grad-primary); background-size: 180% 180%;
  color: #fff; padding: 12px 22px; border-radius: var(--radius);
  font-size: 20px; font-weight: 800; letter-spacing: 3px;
  flex-shrink: 0; user-select: none;
  box-shadow: var(--shadow-glow);
  animation: gradShift 10s ease infinite;
}

/* 图片上传按钮 */
.img-upload-btn {
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0;
  background: var(--primary-light); color: var(--primary);
  border: 1px solid var(--card-border); user-select: none;
  transition: transform .25s var(--ease-spring), background .25s, box-shadow .25s, color .25s;
}
.img-upload-btn:hover {
  background: var(--primary-soft); color: var(--primary);
  transform: translateY(-2px) scale(1.08); box-shadow: var(--shadow-glow);
}
.img-upload-btn:active { transform: scale(.92); }
.img-upload-btn svg { display: block; }

/* ============================================================
   管理端 / 数据表 / 徽章 / 杂项
   ============================================================ */
.data-table {
  width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px;
  background: var(--card);
  backdrop-filter: blur(var(--glass-blur)) saturate(170%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(170%);
  border: 1px solid var(--card-border); border-radius: var(--radius-lg);
  overflow: hidden;
}
.data-table th {
  text-align: left; padding: 12px 14px; font-weight: 700; font-size: 12.5px;
  color: var(--text-secondary); background: var(--primary-light);
  border-bottom: 1px solid var(--card-line); white-space: nowrap;
}
.data-table td {
  padding: 12px 14px; border-bottom: 1px solid var(--card-line);
  color: var(--text-primary); vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tbody tr { transition: background .2s; }
.data-table tbody tr:hover td { background: var(--primary-light); }
.data-table a { color: var(--primary); font-weight: 600; }
.admin-table { overflow-x: auto; }
.table-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.table-actions form { display: inline; }
.table-art {
  width: 48px; height: 48px; object-fit: cover;
  border: 1px solid var(--card-border); border-radius: var(--radius);
}

.stat-box {
  background: var(--card);
  backdrop-filter: blur(var(--glass-blur)) saturate(170%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(170%);
  border: 1px solid var(--card-border); border-radius: var(--radius-lg);
  padding: 18px; text-align: center;
  transition: transform .3s var(--ease-spring), box-shadow .3s;
}
.stat-box:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.stat-box b {
  font-size: 26px; display: block; font-weight: 800;
  background: var(--grad-primary); background-size: 200% 200%;
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.stat-box span { font-size: 12px; color: var(--text-muted); }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat-bars { display: flex; align-items: flex-end; gap: 6px; height: 140px; padding: 10px 0; }
.stat-bars .bar {
  flex: 1; background: var(--grad-primary); border-radius: 6px 6px 2px 2px; min-height: 4px;
  position: relative; transition: filter .2s, transform .2s;
}
.stat-bars .bar:hover { filter: brightness(1.15); transform: scaleY(1.02); transform-origin: bottom; }

/* 徽章 */
.badge {
  display: inline-flex; align-items: center; padding: 3px 11px; font-size: 11.5px;
  border-radius: var(--radius-full); font-weight: 600; border: 1px solid transparent;
}
.badge-pending { background: var(--warn-bg); color: var(--warn); border-color: rgba(245, 158, 11, 0.30); }
.badge-approved, .badge-ok, .badge-success, .badge-done {
  background: var(--success-bg); color: var(--success); border-color: rgba(16, 185, 129, 0.30);
}
.badge-rejected, .badge-error {
  background: var(--danger-bg); color: var(--danger); border-color: rgba(244, 63, 94, 0.30);
}
.badge-wait { background: var(--info-bg); color: var(--primary); border-color: rgba(109, 93, 246, 0.28); }
.badge-cancel { background: var(--bg-soft); color: var(--text-muted); border-color: var(--card-line); }

/* 杂项 */
.tag {
  display: inline-flex; align-items: center; padding: 3px 12px; font-size: 12px;
  background: var(--primary-light); color: var(--primary); border-radius: var(--radius-full); font-weight: 600;
}
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; }
.row { display: flex; align-items: center; gap: 10px; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.compact .card { padding: 15px; margin-bottom: 12px; }
.dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: var(--grad-primary); margin-right: 6px; vertical-align: middle;
}
.full { width: 100%; }
.icon { font-size: 20px; }
.bar { background: var(--primary-soft); border-radius: 4px; }
.loading-bar { width: 100%; height: 5px; background: var(--primary-light); border-radius: var(--radius-full); overflow: hidden; }
.loading-bar-inner {
  height: 100%; background: var(--grad-primary); border-radius: var(--radius-full);
  animation: loadingSlide 1.2s ease-in-out infinite;
}
@keyframes loadingSlide {
  0% { width: 8%; margin-left: 0; }
  50% { width: 55%; margin-left: 22%; }
  100% { width: 8%; margin-left: 92%; }
}
.trade-card {
  background: var(--card);
  backdrop-filter: blur(var(--glass-blur)) saturate(170%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(170%);
  border: 1px solid var(--card-border); border-radius: var(--radius-lg); padding: 16px;
  transition: transform .3s var(--ease-spring), box-shadow .3s;
}
.trade-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.top-link { color: var(--text-secondary); font-size: 13px; }
.top-link:hover { color: var(--primary); }
.price {
  color: var(--accent); font-weight: 800; font-size: 15px;
}
.sale-toggle { display: flex; align-items: center; gap: 10px; margin-top: 12px; }

/* 退出登录页 */
.logout-box {
  max-width: 430px; margin: 60px auto; text-align: center;
  background: var(--card);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border: 1px solid var(--card-border); border-radius: 28px;
  padding: 46px 36px; box-shadow: var(--shadow-lg);
  animation: cardIn .5s var(--ease-spring);
}
.logout-icon { font-size: 52px; margin-bottom: 16px; }
.logout-title { font-size: 21px; font-weight: 800; margin-bottom: 10px; color: var(--text-primary); }
.logout-desc { color: var(--text-secondary); font-size: 14px; margin-bottom: 8px; }
.logout-tip { color: var(--text-muted); font-size: 12.5px; margin-bottom: 22px; }

/* 弹窗通知 */
.app-notify-popup {
  position: fixed; top: 84px; right: 18px; z-index: 999;
  width: 300px;
  background: var(--card-hover);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--card-border);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl); padding: 15px 17px; cursor: pointer;
  animation: notifyIn .3s var(--ease-spring);
}
.app-notify-popup.hide { opacity: 0; transform: translateX(16px); transition: all .25s; }
@keyframes notifyIn {
  from { opacity: 0; transform: translateX(20px) scale(.96); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}
.app-notify-title { font-weight: 800; font-size: 14px; color: var(--text-primary); margin-bottom: 5px; }
.app-notify-content { font-size: 13px; color: var(--text-secondary); line-height: 1.6; }
.app-notify-time { font-size: 11.5px; color: var(--text-muted); margin-top: 7px; }

/* 深色模式切换按钮 */
.theme-toggle {
  background: none; border: none; cursor: pointer; font-size: 16px;
  padding: 8px 10px; border-radius: var(--radius-full);
  transition: background .25s, transform .3s var(--ease-spring);
}
.theme-toggle:hover { background: var(--primary-light); transform: rotate(20deg) scale(1.1); }

/* 认证标识 */
.blue-v {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; background: var(--grad-cool); color: #fff;
  border-radius: 50%; font-size: 11px; font-weight: bold; margin-left: 4px;
  vertical-align: middle; flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(20, 201, 201, 0.4);
}
.owner-name .blue-v,
.user-chip-name + .blue-v { width: 16px; height: 16px; font-size: 10px; }

/* 铃铛 */
.nav-bell {
  position: relative; font-size: 20px; padding: 8px 11px; text-decoration: none;
  display: flex; align-items: center; border-radius: var(--radius-full);
  transition: background .25s, transform .3s var(--ease-spring);
}
.nav-bell:hover { background: var(--primary-light); transform: rotate(12deg); }
.nav-bell .nav-badge {
  position: absolute; top: 2px; right: 0; background: var(--danger); color: #fff;
  font-size: 10px; min-width: 17px; height: 17px; border-radius: var(--radius-full);
  display: flex; align-items: center; justify-content: center;
  padding: 0 5px; font-weight: 700;
  box-shadow: 0 2px 8px rgba(244, 63, 94, 0.45);
}

/* 私信附件 */
.msg-img {
  max-width: 220px; max-height: 300px; border-radius: var(--radius); display: block;
  cursor: pointer; transition: transform .25s var(--ease-spring), box-shadow .25s;
}
.msg-img:hover { transform: scale(1.03); box-shadow: var(--shadow); }
.msg-video { max-width: 240px; max-height: 300px; border-radius: var(--radius); display: block; background: #000; }
.conv-input-row { display: flex; align-items: center; gap: 8px; width: 100%; }
.conv-input-row input[type="text"] { flex: 1; }
.original-check {
  font-size: 12px; color: var(--text-secondary); white-space: nowrap;
  display: flex; align-items: center; gap: 4px; cursor: pointer;
}
.original-check input { margin: 0; }
.msg-read-status { font-size: 11px; margin-left: 6px; font-weight: normal; }
.msg-read-status.unread { color: var(--text-muted); }
.msg-read-status.read { color: var(--success); }
.msg.mine .msg-time { display: flex; align-items: center; justify-content: flex-end; gap: 4px; }
/* 气泡宽度：列容器已扣掉头像宽度（36px+10px gap），
   所以这里要比原来的 62% 更大，才能还原「气泡占整个消息行约 62%」的观感 */
.msg-col .bubble { max-width: 78%; }

/* 管理端布局补 */
.admin-card {
  background: var(--card);
  backdrop-filter: blur(var(--glass-blur)) saturate(170%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(170%);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-xl); padding: 22px; margin-bottom: 18px;
  box-shadow: var(--shadow-sm);
}
.admin-card h3 {
  font-size: 16px; margin-bottom: 16px; font-weight: 800;
  display: flex; align-items: center; gap: 9px;
}
.admin-card h3::before {
  content: ''; width: 20px; height: 20px; flex-shrink: 0;
  background: var(--grad-primary); border-radius: 6px;
  transform: rotate(45deg) scale(.62);
  box-shadow: 0 3px 10px rgba(109, 93, 246, 0.3);
}
.admin-card form.inline { display: inline; }
.sample-imgs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.sample-imgs img {
  width: 90px; height: 90px; object-fit: cover;
  border: 1px solid var(--card-border); border-radius: var(--radius);
}
.form-group .badge { vertical-align: middle; }

/* 认证画师名片 */
.artist-profile-card {
  padding: 0; overflow: hidden; display: block; color: inherit;
  transition: transform .3s var(--ease-spring), box-shadow .3s, border-color .3s;
}
.artist-profile-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: var(--primary-soft); color: inherit; }
.apc-banner {
  height: 68px;
  background: var(--grad-primary);
  background-size: 200% 200%;
  animation: gradShift 14s ease infinite;
}
.apc-body { padding: 0 16px 16px; margin-top: -28px; }
.apc-body .mini-avatar { border: 3px solid rgba(255,255,255,.9); }
.apc-body h3 { font-size: 15.5px; margin: 8px 0 4px; font-weight: 800; }
.bio-clamp {
  font-size: 12.5px; color: var(--text-muted); line-height: 1.6; margin-top: 6px;
  overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}

/* 频道选择器 */
.channel-select { margin: 15px 0; }
.channel-select select {
  width: 100%; padding: 11px 15px; border: 1.5px solid var(--input-border);
  border-radius: var(--radius); font-size: 14px; background: var(--input-bg);
  color: var(--text-primary);
}
.channel-select select:focus { outline: none; border-color: var(--primary); box-shadow: var(--ring); }

/* 管理端侧栏 */
.admin-side {
  width: 220px; flex-shrink: 0;
  background: var(--card);
  backdrop-filter: blur(var(--glass-blur)) saturate(170%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(170%);
  border: 1px solid var(--card-border); border-radius: var(--radius-xl);
  padding: 10px; position: sticky; top: 78px;
  box-shadow: var(--shadow-sm);
}
.admin-side a {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px;
  color: var(--text-secondary); font-size: 13.5px; border-radius: var(--radius);
  transition: background .2s, color .2s, transform .2s;
}
.admin-side a:hover { background: var(--primary-light); color: var(--primary); transform: translateX(3px); }
.admin-side a.active {
  background: var(--grad-primary); color: #fff; font-weight: 600;
  box-shadow: var(--shadow-glow);
}
.admin-side a .cnt {
  margin-left: auto; background: rgba(255,255,255,.9); color: var(--danger);
  font-size: 11px; min-width: 18px; height: 18px; border-radius: var(--radius-full);
  display: flex; align-items: center; justify-content: center; padding: 0 5px; font-weight: 700;
}
.admin-side a:not(.active) .cnt { background: var(--danger); color: #fff; }
@media (max-width: 900px) {
  .admin-side { width: 100%; position: static; display: flex; flex-wrap: wrap; gap: 4px; padding: 8px; }
}

/* ============================================================
   移动端抽屉导航
   ============================================================ */
.nav-toggle {
  display: none; flex-direction: column; justify-content: center; align-items: center;
  width: 42px; height: 42px;
  background: var(--card); border: 1px solid var(--card-border);
  border-radius: var(--radius-full); cursor: pointer;
  padding: 8px; gap: 5px; z-index: 1001;
  box-shadow: var(--shadow-sm);
}
.nav-toggle span {
  display: block; width: 20px; height: 2.5px;
  background: var(--primary); border-radius: 2px;
  transition: all .3s var(--ease-spring);
}
.nav-toggle.active span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; transform: scaleX(.4); }
.nav-toggle.active span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }
.mobile-user-menu { display: none; }
.mobile-back-btn {
  display: none; width: 36px; height: 36px; border: 1px solid var(--card-border);
  background: var(--card); border-radius: 50%;
  font-size: 18px; color: var(--primary); cursor: pointer;
  align-items: center; justify-content: center; flex-shrink: 0; margin-right: 8px;
}
.mobile-back-btn:hover { box-shadow: var(--shadow-sm); }
.nav-overlay {
  position: fixed; inset: 0;
  background: rgba(30, 24, 66, 0.40);
  z-index: 90; opacity: 0; visibility: hidden;
  transition: opacity .3s ease, visibility .3s;
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
}
.nav-overlay.show { opacity: 1; visibility: visible; }

/* ============================================================
   入场动画 — stagger 依次浮现（主内容区直接子元素）
   ============================================================ */
.main-content > * {
  animation: fadeUp .5s var(--ease-spring) both;
}
.main-content > *:nth-child(2) { animation-delay: .06s; }
.main-content > *:nth-child(3) { animation-delay: .12s; }
.main-content > *:nth-child(4) { animation-delay: .18s; }
.main-content > *:nth-child(5) { animation-delay: .24s; }
.main-content > *:nth-child(6) { animation-delay: .30s; }
.main-content > *:nth-child(n+7) { animation-delay: .36s; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
.card.reveal { opacity: 0; transform: translateY(14px); }
.card.reveal.in-view {
  opacity: 1; transform: translateY(0);
  transition: opacity .45s var(--ease-spring), transform .45s var(--ease-spring);
}
.hide { display: none !important; }
.show { display: block; }
.lazy { transition: opacity .3s; }
.read { color: var(--success); }
.unread { font-weight: 600; }
.open { display: block; }
.dragover { border-color: var(--primary) !important; background: var(--primary-light) !important; }
.nearby-item { padding: 12px 0; border-bottom: 1px solid var(--card-line); }
.map-fullscreen .map-fullscreen-btn { display: none; }

/* 补齐组件 */
.nav-item { padding: 8px 14px; color: var(--text-secondary); font-size: 14px; font-weight: 500; }
.post-body { min-width: 0; }
.post-detail-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 20px; align-items: start; }

/* ============================================================
   响应式：三端适配
   ============================================================ */

/* ===== 平板断点 (≤1100px) ===== */
@media (max-width: 1100px) {
  .home-layout { grid-template-columns: 1fr; gap: 18px; }
  .main-col { order: -1; }
  .side-col {
    position: static;
    display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 14px;
  }
  .art-detail-wrap { grid-template-columns: 1fr; }
  .post-detail-wrap { grid-template-columns: 1fr; }
  .friend-layout, .settings-layout { grid-template-columns: 1fr; }
  .msg-layout { grid-template-columns: 220px 1fr; }
  .data-table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .data-table th, .data-table td { white-space: nowrap; }
  .art-detail-img img { max-height: 56vh; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .main-nav a { padding: 8px 10px; font-size: 13.5px; }
}

/* ===== 小屏/手机过渡 (≤768px) ===== */
@media (max-width: 768px) {
  .user-chip-name { display: none; }
  .form-row { grid-template-columns: 1fr; }
  .profile-head { flex-direction: column; align-items: flex-start; }
  .profile-head-actions { text-align: left; }
  .action-row { justify-content: flex-start; }
  .profile-body { grid-template-columns: 1fr; }
  .msg-layout { grid-template-columns: 1fr; height: auto; }
  .conv-list { max-height: 200px; }
  .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .profile-banner { height: 160px; margin-bottom: -46px; }
  .mini-avatar.xl { width: 64px; height: 64px; font-size: 22px; }
  .auth-card { padding: 32px 24px; }
  .page-head h1 { font-size: 22px; }
  .quick-grid { grid-template-columns: repeat(4, 1fr); gap: 9px; }
  .quick-item { padding: 14px 6px 12px; font-size: 12px; gap: 8px; }
  .quick-item .qicon { width: 38px; height: 38px; font-size: 17px; border-radius: 13px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 20px; }

  /* 私信移动端 */
  .msg-layout {
    flex-direction: column;
    height: calc(100vh - 64px);
    height: calc(100dvh - 64px);
    position: relative;
  }
  .conv-list {
    width: 100%; max-height: none; height: 100%;
    border-right: none; overflow-y: auto;
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: var(--card); z-index: 1;
  }
  .conv-main {
    display: none; width: 100%; height: 100%;
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: var(--bg-soft); z-index: 2; flex-direction: column;
  }
  .conv-main.mobile-show { display: flex; }
  .conv-list.mobile-hidden { display: none; }
  .mobile-back-btn { display: flex; }
  .conv-head {
    padding: 12px 16px; border-bottom: 1px solid var(--card-line);
    background: var(--card); flex-shrink: 0;
  }
  .conv-body { flex: 1; overflow-y: auto; padding: 16px; }
  .conv-input {
    padding: 10px 12px;
    padding-bottom: max(10px, env(safe-area-inset-bottom, 0));
    border-top: 1px solid var(--card-line);
    background: var(--card); flex-shrink: 0; gap: 8px;
  }
  .conv-input input[type="text"] { flex: 1; padding: 10px 15px; font-size: 15px; }
  .conv-input .btn { padding: 10px 18px; font-size: 14px; }
  .bubble { max-width: 78%; font-size: 14px; }
  .bubble img { max-width: 200px !important; }
  .conv-item { padding: 13px 15px; }
  .conv-item .mini-avatar { width: 44px; height: 44px; font-size: 18px; }

  .conv-input-row { flex-wrap: wrap; }
  .original-check { order: 10; }
  .sticker-panel-grid { grid-template-columns: repeat(auto-fill, minmax(60px, 1fr)); }
  .sticker-panel-item { height: 60px; }
  .msg-img { max-width: 150px; max-height: 200px; }
  .msg-video { max-width: 180px; max-height: 240px; }
}

/* ===== 手机断点 (≤900px)：抽屉导航 ===== */
@media (max-width: 900px) {
  .user-menu { display: none !important; }
  .nav-toggle { display: flex; order: 3; }

  .header-inner { flex-wrap: wrap; gap: 0; }
  .logo { order: 1; flex: 1; }
  .logo span { font-size: 18px; }

  .topbar-text { display: none; }
  .topbar-inner { justify-content: flex-end; }

  .container { padding: 0 14px; }
  /* 修正：原 padding:16px 0 会把 .container 的横向内边距清零，
     导致手机端所有页面内容贴死屏幕左右边缘（标题被裁、卡片出血）。 */
  .main-content { padding-top: 16px; padding-bottom: 16px; }

  body { font-size: 14px; }
  h1 { font-size: 22px; }
  h2 { font-size: 18px; }
  h3 { font-size: 16px; }

  .card { padding: 16px; border-radius: 20px; }
  .btn { padding: 10px 18px; font-size: 14px; }

  input[type="text"], input[type="email"], input[type="password"],
  input[type="number"], textarea, select {
    font-size: 16px;
    padding: 12px;
  }

  .post-imgs img { height: 120px; }
  .post-imgs.full img { height: 200px; }
  .channel-grid { grid-template-columns: 1fr; }
  .user-grid { grid-template-columns: 1fr; }

  /* 抽屉导航 — 玻璃侧滑 */
  .main-nav {
    position: fixed; top: 0; right: -84%; width: 80%; max-width: 330px;
    height: 100vh; height: 100dvh;
    background: var(--card-hover);
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    z-index: 95;
    flex-direction: column; gap: 4px; padding: 76px 14px 24px;
    overflow-y: auto;
    transition: right .32s var(--ease-spring);
    border-left: 1px solid var(--card-border);
    box-shadow: var(--shadow-xl);
    align-self: auto; flex: none;
  }
  .main-nav.open { right: 0; }
  .main-nav a {
    padding: 13px 18px; font-size: 15px;
    border-radius: var(--radius); width: 100%;
  }
  .main-nav a.active {
    background: var(--grad-primary); color: #fff;
    box-shadow: var(--shadow-glow); font-weight: 600;
  }
  .main-nav a:hover { background: var(--primary-light); transform: translateX(2px); }

  .mobile-user-menu {
    display: flex; flex-direction: column; gap: 3px;
    padding: 14px 4px 0; margin-top: 12px;
    border-top: 1px solid var(--card-line);
  }
  .mobile-user-item {
    display: flex; align-items: center; gap: 11px;
    padding: 12px 14px; border-radius: var(--radius);
    background: var(--primary-light);
  }
  .mui-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
  .mui-text strong { font-size: 14.5px; color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .mui-text small { font-size: 11.5px; color: var(--text-muted); }
  .mui-link {
    display: flex; align-items: center; gap: 11px;
    padding: 12px 14px; border-radius: var(--radius);
    color: var(--text-secondary); font-size: 14px;
    transition: background .2s, transform .2s;
  }
  .mui-link:hover { background: var(--primary-light); transform: translateX(3px); }
  .mui-link.danger { color: var(--danger); }
  .mui-icon { font-size: 16px; width: 20px; text-align: center; }

  .nav-bell { order: 2; margin-right: 8px; }
}

/* ===== 小屏手机 (≤480px) ===== */
@media (max-width: 480px) {
  /* 极窄屏顶栏只保留皮肤/主题按钮，避免文字链接折行撑高工具条 */
  .topbar-links a { display: none; }
  .topbar-inner { height: var(--topbar-h); }
  .logo span { font-size: 16px; }
  .logo img { height: 34px; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 10px; }
  .btn { padding: 11px 16px; font-size: 14px; }
  .card { padding: 14px; border-radius: 18px; }
  .profile-stats { gap: 20px; }
  .profile-stats b { font-size: 17px; }
  .post-imgs { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .post-imgs img { height: 90px; }
  .filter-tabs a { padding: 7px 14px; font-size: 13px; }
  .bubble { max-width: 84%; }
  .bubble img { max-width: 180px !important; }
  .quick-grid { grid-template-columns: repeat(4, 1fr); gap: 7px; }
  .quick-item { padding: 12px 4px 10px; font-size: 11px; gap: 6px; }
  .quick-item .qicon { width: 34px; height: 34px; font-size: 15px; border-radius: 12px; }
  .footer-grid { grid-template-columns: 1fr; gap: 18px; }
  .pair-code { font-size: 27px; letter-spacing: 6px; }
  .app-notify-popup { width: calc(100vw - 36px); right: 18px; }
}

/* ===== 降低动效偏好（无障碍） ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* ============================================================
   移动端底部标签栏 — 桌面端隐藏
   （mobile.css 是按 media="(max-width:1024px)" 加载的，桌面端整份文件不参与，
     所以隐藏规则必须留在始终生效的 style.css 里，否则它会退化成一条裸 nav 横排）
   ============================================================ */
.m-tabbar { display: none; }

/* ===== v6.1 SVG 图标系统 & 私聊页精修 ===== */
/* v7.0 对齐基线：统一用 middle，替代原先按 em 猜的 -0.16em
   （em 取的是图标自身字号，18px 图标 vs 14px 文字时偏移量会算错 → 看着上浮/下沉）。 */
.icon-svg {
  display: inline-block; vertical-align: middle;
  flex: 0 0 auto; line-height: 1;
}
/* 图标与文字并排、但原先仍是行内流（靠 baseline 对齐）的容器，改为 flex 居中 */
.ch-tag, .section-more, .filter-tabs a, .post-foot a, .nav-item, .top-tag {
  display: inline-flex; align-items: center; gap: 5px;
}
.nav-item, .section-more { gap: 6px; }

/* 铃铛 / 主题按钮内的图标 */
.nav-bell .icon-svg, .theme-toggle .icon-svg { display: block; }
.theme-toggle { display: inline-flex; align-items: center; justify-content: center; }
.theme-toggle .icon-svg { transition: transform .35s var(--ease-spring); }
.theme-toggle:hover .icon-svg { transform: rotate(-18deg); }

/* 蓝V 内勾图标 */
.blue-v .icon-svg { stroke-width: 3; }

/* 消息通知 / 客服等大空态图标 */
.empty-ico {
  display: inline-flex; align-items: center; justify-content: center;
  width: 86px; height: 86px; margin-bottom: 14px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow-glow);
  animation: floatY 5s ease-in-out infinite;
}
.empty-ico.ok { background: rgba(34, 197, 94, .12); color: #16a34a; }
@keyframes floatY { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

/* 快捷宫格 SVG 居中 */
.quick-item .qicon { display: flex; align-items: center; justify-content: center; }
/* 修正：qicon 底色是主色渐变，图标必须反白，否则紫图标压在紫底上完全看不见 */
.quick-item .qicon .icon-svg { color: #fff; transition: transform .3s var(--ease-spring); }
.quick-item:hover .qicon .icon-svg { transform: scale(1.15) rotate(-6deg); }

/* 侧栏频道导航 SVG */
.ch-icon { display: inline-flex; align-items: center; justify-content: center; }
.ch-icon .icon-svg { color: var(--primary); }

/* 移动菜单图标 */
.mui-icon { display: inline-flex; align-items: center; justify-content: center; }
.mui-icon .icon-svg { color: var(--primary); }
.mui-link.danger .mui-icon .icon-svg { color: var(--danger); }

/* ---- 私聊页：会话列表 ---- */
.conv-list-title {
  display: flex; align-items: center; gap: 7px;
  padding: 0 16px 12px; position: sticky; top: 0;
}
.conv-list-title::before { display: none; }
.conv-list-title .icon-svg { color: var(--primary); }
.conv-list { padding-top: 14px; }
.unread-badge {
  position: absolute; top: -5px; right: -7px;
  min-width: 19px; height: 19px; padding: 0 5px;
  border-radius: var(--radius-full);
  background: var(--grad-primary); color: #fff;
  font-size: 10.5px; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 10px rgba(109, 93, 246, 0.5);
  border: 2px solid var(--card-hover);
}
.conv-item .mini-avatar { position: relative; overflow: visible; }
.conv-item .mini-avatar img { border-radius: 50%; }
.conv-list-empty {
  display: flex; flex-direction: column; align-items: center;
  gap: 12px; padding: 44px 20px; text-align: center;
}
.conv-list-empty-ico {
  display: inline-flex; align-items: center; justify-content: center;
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--primary-light); color: var(--primary);
}
.conv-list-empty p { color: var(--text-muted); font-size: 13px; line-height: 1.7; }
.conv-list-empty p small { font-size: 11.5px; color: var(--text-muted); }
.conv-list-empty .btn-sm { padding: 8px 18px; font-size: 13px; }

/* ---- 私聊页：空状态 ---- */
.conv-empty {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 14px;
  padding: 40px 24px; text-align: center;
}
.conv-empty-ico {
  display: inline-flex; align-items: center; justify-content: center;
  width: 104px; height: 104px; border-radius: 32px;
  background: var(--grad-primary);
  color: #fff;
  box-shadow: var(--shadow-glow);
  animation: floatY 5s ease-in-out infinite;
  position: relative;
}
.conv-empty-ico::after {
  content: ''; position: absolute; inset: -14px;
  border-radius: 40px;
  border: 1.5px dashed var(--primary-soft);
  animation: spin 24s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.conv-empty h3 { font-size: 18px; font-weight: 800; color: var(--text-primary); }
.conv-empty p { color: var(--text-muted); font-size: 13.5px; line-height: 1.8; }

/* 聊天窗口内空消息提示 */
.chat-empty {
  display: flex; flex-direction: column; align-items: center;
  gap: 8px; padding: 60px 20px 40px; text-align: center;
}
.chat-empty-ico {
  display: inline-flex; align-items: center; justify-content: center;
  width: 68px; height: 68px; border-radius: 50%;
  background: var(--primary-light); color: var(--primary);
  margin-bottom: 4px;
}
.chat-empty p { color: var(--text-secondary); font-size: 14px; font-weight: 600; }
.chat-empty small { color: var(--text-muted); font-size: 12px; }

/* ---- 私聊页：输入区 ---- */
.send-btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 6px; padding: 10px 20px !important;
  border-radius: var(--radius-full) !important;
  min-width: 92px;
}
.send-btn .icon-svg { transition: transform .3s var(--ease-spring); }
.send-btn:hover .icon-svg { transform: translateX(3px); }
.send-btn:active .icon-svg { transform: translateX(6px) scale(.9); }

/* 会话条目动效 */
.conv-item { animation: cardIn .35s var(--ease-spring) backwards; }
.conv-item:nth-child(1) { animation-delay: .02s; }
.conv-item:nth-child(2) { animation-delay: .05s; }
.conv-item:nth-child(3) { animation-delay: .08s; }
.conv-item:nth-child(4) { animation-delay: .11s; }
.conv-item:nth-child(5) { animation-delay: .14s; }

/* 移动端返回按钮圆形化 */
.mobile-back-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
}

/* 附近的人卡片标题图标 */
.nearby-card-title, .switch-label, .stealth-tip, .map-note {
  display: flex; align-items: center; gap: 7px;
}
.nearby-card-title .icon-svg, .switch-label .icon-svg { color: var(--primary); }
.stealth-tip .icon-svg { color: var(--accent); flex-shrink: 0; }
.map-note { display: block; }
.map-note .icon-svg { vertical-align: middle; }

/* 通知中心类型图标 */
.notify-type-ico { display: inline-flex; color: var(--primary); }


/* ============================================================
   v7.2 「我的」聚合页 + 浏览足迹
   ------------------------------------------------------------
   参考设计语言：深色分组列表 —— 大圆角卡片、行内图标胶囊、
   标题 + 说明双行、右侧 chevron。全部走设计令牌，深浅色自动适配。
   ============================================================ */

/* ---------- 我的：容器 ---------- */
.me-wrap { max-width: 720px; margin: 0 auto; }

/* ---------- 我的：头部 ---------- */
.me-hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 18px;
  border-radius: var(--radius-xl);
  background: var(--card);
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}
/* 头像后面一团柔光，呼应液态玻璃的光感 */
.me-hero::before {
  content: '';
  position: absolute; top: -60px; left: -40px;
  width: 200px; height: 200px; border-radius: 50%;
  background: radial-gradient(circle, rgba(109, 93, 246, .22), transparent 68%);
  pointer-events: none;
}
.me-avatar {
  position: relative; z-index: 1;
  width: 64px; height: 64px; border-radius: 50%;
  overflow: hidden; flex: 0 0 auto;
  background: var(--grad-primary);
  color: #fff;
  display: grid; place-items: center;
  font-size: 24px; font-weight: 800;
  box-shadow: 0 6px 20px rgba(109, 93, 246, .32), inset 0 0 0 2.5px rgba(255,255,255,.85);
}
.me-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.me-vf {
  position: absolute; right: 0; bottom: 0;
  width: 19px; height: 19px; border-radius: 50%;
  background: #2f9cf4; color: #fff;
  display: grid; place-items: center;
  border: 2px solid var(--card);
}
.me-vf .icon-svg { width: 10px; height: 10px; stroke-width: 3; }
.me-id { min-width: 0; position: relative; z-index: 1; }
.me-id h1 {
  font-size: 19px; font-weight: 800; color: var(--text-primary);
  display: flex; align-items: center; gap: 7px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.me-handle { font-size: 12.5px; color: var(--text-muted); margin-top: 2px; }
.me-species {
  font-size: 12px; color: var(--text-secondary);
  display: inline-flex; align-items: center; gap: 5px; margin-top: 4px;
}
.me-species .icon-svg { color: var(--accent); }
.me-level { position: relative; z-index: 1; }
.me-lv {
  display: inline-block; padding: 4px 11px;
  border-radius: var(--radius-full);
  background: var(--grad-primary); color: #fff;
  font-size: 11.5px; font-weight: 800; letter-spacing: .3px;
  box-shadow: 0 4px 14px rgba(109, 93, 246, .3);
}
.me-exp { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; margin-top: 2px; }
.me-exp-bar {
  flex: 1; height: 6px; border-radius: 999px;
  background: var(--primary-light); overflow: hidden;
}
.me-exp-bar i {
  display: block; height: 100%; border-radius: 999px;
  background: var(--grad-primary);
  box-shadow: 0 0 12px rgba(109, 93, 246, .5);
  transition: width .6s var(--ease-spring);
}
.me-exp span { font-size: 11px; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.me-joined { grid-column: 1 / -1; font-size: 11.5px; color: var(--text-muted); margin-top: 2px; }

/* ---------- 我的：两张数据卡 ---------- */
.me-duo { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.me-tile {
  display: block; padding: 14px;
  border-radius: var(--radius-lg);
  background: var(--card);
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow-sm);
  color: inherit;
  transition: transform .25s var(--ease-spring), box-shadow .25s, border-color .25s;
  min-height: 96px;
}
.me-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--primary-soft); }
.me-tile-head {
  display: flex; align-items: center; gap: 7px;
  font-size: 12.5px; font-weight: 600; color: var(--text-secondary);
}
.me-tile-head .icon-svg:first-child { color: var(--primary); }
.me-tile-head .icon-svg:last-child { margin-left: auto; color: var(--text-muted); width: 14px; height: 14px; }
.me-tile-avatars { display: flex; align-items: center; gap: 6px; margin-top: 12px; }
.me-mini-av {
  width: 32px; height: 32px; border-radius: 50%; overflow: hidden;
  display: grid; place-items: center;
  background: var(--primary-light); color: var(--primary);
  font-size: 12px; font-weight: 700;
  border: 2px solid var(--card);
  box-shadow: 0 2px 8px rgba(36, 29, 77, .12);
}
.me-mini-av img { width: 100%; height: 100%; object-fit: cover; }
.me-mini-more {
  min-width: 32px; height: 32px; padding: 0 6px; border-radius: 999px;
  display: grid; place-items: center;
  background: var(--primary-light); color: var(--primary);
  font-size: 11px; font-weight: 700;
}
.me-tile-empty { font-size: 12px; color: var(--text-muted); }
.me-tile-num {
  margin-top: 10px;
  font-size: 26px; font-weight: 800; line-height: 1;
  background: var(--grad-primary);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.me-tile-num small {
  font-size: 11.5px; font-weight: 600; margin-left: 5px;
  color: var(--text-muted); -webkit-text-fill-color: var(--text-muted);
}

/* ---------- 我的：编辑资料 ---------- */
.me-edit {
  width: 100%; justify-content: center;
  margin-top: 12px; min-height: 46px;
}

/* ---------- 分组列表（我的 / 设置类页面通用） ---------- */
.ml-group {
  margin-top: 12px;
  border-radius: var(--radius-lg);
  background: var(--card);
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.ml-row {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 15px;
  color: inherit; text-decoration: none;
  cursor: pointer;
  transition: background .18s ease;
}
.ml-row + .ml-row { border-top: 1px solid var(--card-line); }
.ml-row:hover { background: var(--primary-light); }
.ml-row:active { background: var(--primary-light); }
.ml-ico {
  width: 36px; height: 36px; flex: 0 0 auto;
  border-radius: 11px;
  display: grid; place-items: center;
  background: var(--primary-light);
  color: var(--primary);
}
.ml-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ml-text strong { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.ml-text small { font-size: 11.5px; color: var(--text-muted); line-height: 1.45; }
.ml-chev { color: var(--text-muted); flex: 0 0 auto; opacity: .7; }
.ml-row.danger .ml-text strong { color: var(--danger); }
.ml-row.danger .ml-ico { background: var(--danger-bg); color: var(--danger); }

.me-footer {
  text-align: center; font-size: 11.5px; color: var(--text-muted);
  padding: 18px 0 6px;
}

/* ============================================================
   浏览足迹
   ============================================================ */
.fp-wrap { max-width: 720px; margin: 0 auto; }

.fp-head {
  display: flex; align-items: center; gap: 10px;
  padding: 2px 0 14px;
}
.fp-head h1 { font-size: 21px; font-weight: 800; color: var(--text-primary); flex: 1; }
.fp-back {
  width: 36px; height: 36px; flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--card); border: 1px solid var(--card-border);
  color: var(--text-secondary);
  transition: background .2s, color .2s;
}
.fp-back:hover { color: var(--primary); background: var(--primary-light); }
.fp-clear-form { margin: 0; }
.fp-clear {
  background: none; border: none; padding: 9px 14px;
  min-height: 36px;              /* 触控目标 ≥36px */
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--radius-full);
  font-size: 13px; font-weight: 600; font-family: inherit;
  color: var(--text-muted); cursor: pointer;
  transition: color .2s, background .2s;
}
.fp-clear:hover { color: var(--danger); background: var(--danger-bg); }

/* 分段控件：带滑动高光 */
.fp-seg {
  position: relative;
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 4px; padding: 4px;
  border-radius: var(--radius-full);
  background: var(--card);
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow-sm);
}
.fp-seg-glow {
  position: absolute; top: 4px; bottom: 4px; left: 4px;
  border-radius: 999px;
  background: var(--grad-primary);
  box-shadow: 0 4px 14px rgba(109, 93, 246, .35);
  transition: transform .45s var(--ease-spring);
  z-index: 0;
}
.fp-seg-item {
  position: relative; z-index: 1;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 10px; border-radius: 999px;
  font-size: 13.5px; font-weight: 600;
  color: var(--text-secondary);
  transition: color .25s ease;
}
.fp-seg-item.active { color: #fff; }
.fp-seg-item .icon-svg { width: 15px; height: 15px; }

/* 统计 */
.fp-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.fp-stat {
  display: flex; align-items: center; gap: 12px;
  padding: 14px;
  border-radius: var(--radius-lg);
  background: var(--card);
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow-sm);
}
.fp-stat-ico {
  width: 38px; height: 38px; border-radius: 12px;
  display: grid; place-items: center;
  background: rgba(255, 138, 76, .14); color: #ff8a4c;
}
.fp-stat-ico.alt { background: rgba(56, 189, 248, .14); color: #38bdf8; }
.fp-stat-body { display: flex; flex-direction: column; gap: 2px; }
.fp-stat-label { font-size: 11.5px; color: var(--text-muted); }
.fp-stat-body b { font-size: 22px; font-weight: 800; color: var(--text-primary); line-height: 1.1; }

/* 最常访问 */
.fp-top { margin-top: 12px; padding: 14px; border-radius: var(--radius-lg); }
.fp-top-head {
  display: flex; align-items: center; gap: 6px;
  font-size: 12.5px; font-weight: 600; color: var(--text-secondary);
}
.fp-top-head .icon-svg { color: var(--accent); }
.fp-top-list { display: flex; gap: 16px; margin-top: 12px; }
.fp-top-item { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.fp-top-avatar {
  position: relative;
  width: 52px; height: 52px; border-radius: 50%;
  /* ⚠ 这里不能 overflow:hidden —— 右上角的次数徽标是绝对定位、要溢出到圆外，
     一旦裁切就只剩一个边框月牙。圆形裁切改由内部 img 自己负责 */
  overflow: visible;
  display: grid; place-items: center;
  background: var(--grad-primary); color: #fff;
  font-size: 18px; font-weight: 700;
  box-shadow: 0 4px 14px rgba(109, 93, 246, .28);
}
.fp-top-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.fp-top-count {
  position: absolute; top: -2px; right: -2px;
  min-width: 19px; height: 19px; padding: 0 4px;
  border-radius: 999px;
  background: var(--accent); color: #fff;
  font-size: 10.5px; font-weight: 800; font-style: normal;
  line-height: 1;
  display: grid; place-items: center;
  /* 用卡片底色打一圈「镂空」，把徽标和头像分开 */
  border: 2px solid var(--card);
  box-shadow: 0 2px 6px rgba(0, 0, 0, .18);
  z-index: 2;
}
.fp-top-name {
  font-size: 11.5px; color: var(--text-secondary);
  max-width: 64px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* 时间线 */
.fp-group { margin-top: 18px; }
.fp-day {
  font-size: 12.5px; font-weight: 700; color: var(--text-muted);
  padding: 0 2px 8px;
}
.fp-cards { display: grid; gap: 10px; }
.fp-card {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 14px;
  border-radius: var(--radius-lg);
  background: var(--card);
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow-sm);
  color: inherit;
  transition: transform .25s var(--ease-spring), box-shadow .25s, border-color .25s;
}
.fp-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--primary-soft); }
.fp-card-avatar {
  width: 46px; height: 46px; flex: 0 0 auto; border-radius: 50%; overflow: hidden;
  display: grid; place-items: center;
  background: var(--grad-primary); color: #fff;
  font-size: 17px; font-weight: 700;
}
.fp-card-avatar img { width: 100%; height: 100%; object-fit: cover; }
.fp-card-info { min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 3px 8px; }
.fp-card-info strong {
  font-size: 14.5px; font-weight: 700; color: var(--text-primary);
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.fp-card-info small { font-size: 11.5px; color: var(--text-muted); width: 100%; }
.fp-card-tag {
  font-size: 10.5px; font-weight: 600;
  padding: 2px 8px; border-radius: 999px;
  background: var(--accent-light); color: var(--accent-dark);
}
.fp-card-info em {
  font-size: 11px; font-style: normal; color: var(--text-muted);
  margin-left: auto; white-space: nowrap;
}

/* 空态 */
.fp-empty {
  margin-top: 14px; padding: 38px 22px;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  text-align: center;
}
.fp-empty-ico {
  width: 66px; height: 66px; border-radius: 22px;
  display: grid; place-items: center; margin-bottom: 4px;
  background: var(--primary-light); color: var(--primary);
}
.fp-empty p { font-size: 14.5px; font-weight: 700; color: var(--text-primary); }
.fp-empty small { font-size: 12px; color: var(--text-muted); line-height: 1.6; }
.fp-empty .btn { margin-top: 8px; }

/* 顶部轻提示 */
.fp-toast {
  position: fixed; left: 50%; top: 74px; transform: translateX(-50%);
  z-index: 300;
  padding: 9px 18px; border-radius: var(--radius-full);
  background: var(--text-primary); color: var(--bg);
  font-size: 12.5px; font-weight: 600;
  box-shadow: var(--shadow-lg);
  transition: opacity .3s ease, transform .3s ease;
}
.fp-toast.hide { opacity: 0; transform: translateX(-50%) translateY(-8px); pointer-events: none; }

@media (max-width: 600px) {
  .me-duo { gap: 10px; }
  .me-tile { padding: 12px; min-height: 88px; }
  .me-tile-num { font-size: 23px; }
  .me-avatar { width: 56px; height: 56px; font-size: 21px; }
  .me-id h1 { font-size: 17px; }
  .fp-stats { gap: 10px; }
  .fp-stat { padding: 12px; }
  .fp-top-list { gap: 12px; }
}

/* ============================================================
   v7.3 「我的」设置中心：行内开关 + 推入面板（编辑资料/账号安全）
   ============================================================ */

/* ---- iOS 风格行内开关 ---- */
.me-switch {
  position: relative; flex: 0 0 auto;
  width: 50px; height: 30px; border-radius: 999px;
  background: var(--bg-soft);
  border: 1px solid var(--card-border);
  cursor: pointer; padding: 0;
  transition: background .25s ease, border-color .25s ease, box-shadow .25s ease;
  -webkit-tap-highlight-color: transparent;
}
.me-switch i {
  position: absolute; top: 2px; left: 2px;
  width: 24px; height: 24px; border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 5px rgba(24, 20, 48, .25), inset 0 1px 0 rgba(255,255,255,.9);
  transition: transform .28s cubic-bezier(.34, 1.3, .5, 1);
  pointer-events: none;
}
.me-switch.on { background: var(--grad-primary); border-color: transparent; }
html[data-theme="dark"] .me-switch.on { box-shadow: 0 0 12px rgba(109, 93, 246, .45); }
.me-switch.on i { transform: translateX(20px); }
.me-switch:disabled,
.me-switch.disabled { opacity: .45; cursor: not-allowed; }
.me-switch:focus-visible { outline: 2px solid var(--primary-soft); outline-offset: 2px; }

/* 开关行的右侧值文案 */
.ml-val {
  display: flex; align-items: center; gap: 10px;
  color: var(--text-muted); font-size: 12px; flex: 0 0 auto;
}
.ml-badge {
  min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 999px;
  background: linear-gradient(160deg, #ff5e7d, #f43f5e);
  color: #fff; font-size: 10.5px; font-weight: 800; line-height: 18px;
  text-align: center; font-style: normal;
}

/* 皮肤风格的小分段选择 */
.me-skin-seg {
  display: flex; gap: 3px; padding: 3px;
  border-radius: 999px;
  background: var(--bg-soft);
  border: 1px solid var(--card-border);
}
.me-skin-seg button {
  border: none; background: none; cursor: pointer;
  padding: 6px 12px; min-height: 30px; border-radius: 999px;
  font-size: 11.5px; font-weight: 600; font-family: inherit;
  color: var(--text-muted);
  transition: color .2s, background .25s, box-shadow .25s;
  -webkit-tap-highlight-color: transparent;
}
.me-skin-seg button.on {
  color: var(--text-primary);
  background: var(--card);
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255,255,255,.6);
}
html[data-skin="minimal"] .me-skin-seg button.on { box-shadow: var(--shadow-sm); }

/* ---- 推入面板（编辑资料 / 账号与安全）---- */
.me-panel {
  position: fixed; inset: 0; z-index: 210;
  background: var(--bg);
  transform: translateX(103%);
  visibility: hidden;
  transition: transform .42s cubic-bezier(.32, .94, .35, 1), visibility 0s .42s;
  display: flex; flex-direction: column;
  overscroll-behavior: contain;
}
.me-panel.open { transform: none; visibility: visible; transition: transform .42s cubic-bezier(.32, .94, .35, 1); }
.me-panel-head {
  flex: 0 0 auto;
  display: flex; align-items: center; gap: 8px;
  padding: 12px 14px;
  background: var(--bg);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border-bottom: 1px solid var(--card-border);
  position: relative; z-index: 2;
}
.me-panel-back {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 12px;
  background: var(--bg-soft); border: none; cursor: pointer;
  color: var(--text-primary);
  -webkit-tap-highlight-color: transparent;
  transition: transform .18s ease;
}
.me-panel-back:active { transform: scale(.92); }
.me-panel-title { font-size: 16px; font-weight: 700; color: var(--text-primary); }
.me-panel-body {
  flex: 1 1 auto; overflow-y: auto;
  padding: 16px 14px calc(26px + env(safe-area-inset-bottom, 0px));
  -webkit-overflow-scrolling: touch;
}
.me-panel-foot {
  flex: 0 0 auto;
  padding: 12px 14px calc(12px + env(safe-area-inset-bottom, 0px));
  background: var(--bg);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-top: 1px solid var(--card-border);
}
.me-panel-foot .btn { width: 100%; justify-content: center; }

/* 面板内表单分组卡 */
.me-form-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 16px 15px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 14px;
}
.me-form-title {
  display: flex; align-items: center; gap: 7px;
  font-size: 13px; font-weight: 700; color: var(--text-primary);
  margin-bottom: 14px;
}
.me-form-title .icon-svg { color: var(--primary); }
.me-form-card .form-group { margin-bottom: 14px; }
.me-form-card .form-group:last-child { margin-bottom: 0; }
.me-form-card .form-row { gap: 10px; }

/* 面板内头像编辑 */
.me-avatar-edit {
  display: flex; align-items: center; gap: 14px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.me-avatar-edit .mini-avatar.xl { position: relative; flex: 0 0 auto; }
.me-avatar-edit .me-cam {
  position: absolute; right: -3px; bottom: -3px;
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--grad-primary); color: #fff;
  display: grid; place-items: center;
  border: 2px solid var(--card);
  box-shadow: 0 2px 6px rgba(109, 93, 246, .35);
}
.me-avatar-edit .me-av-text { flex: 1; min-width: 0; }
.me-avatar-edit .me-av-text strong { display: block; font-size: 14px; color: var(--text-primary); }
.me-avatar-edit .me-av-text small { display: block; margin-top: 3px; font-size: 11.5px; color: var(--text-muted); }
.me-avatar-edit input[type=file] { display: none; }

/* 面板保存成功的小提示条 */
.me-toast {
  position: fixed; left: 50%; bottom: calc(30px + env(safe-area-inset-bottom, 0px));
  transform: translate(-50%, 16px);
  display: flex; align-items: center; gap: 8px;
  padding: 10px 18px; border-radius: 999px;
  background: var(--grad-primary); color: #fff;
  font-size: 13px; font-weight: 600;
  box-shadow: 0 10px 28px rgba(109, 93, 246, .4);
  opacity: 0; pointer-events: none;
  transition: opacity .3s ease, transform .3s var(--ease-spring);
  z-index: 300;
}
.me-toast.show { opacity: 1; transform: translate(-50%, 0); }
.me-toast.err { background: linear-gradient(160deg, #ff5e7d, #f43f5e); box-shadow: 0 10px 28px rgba(244, 63, 94, .4); }

/* 面板滑动时锁住底层滚动 */
body.panel-open { overflow: hidden; }

/* 桌面端：面板收窄成右侧抽屉 */
@media (min-width: 1025px) {
  .me-panel { left: auto; width: min(480px, 92vw); box-shadow: -24px 0 60px rgba(24, 20, 48, .18); }
  .me-panel-body, .me-panel-head, .me-panel-foot { padding-left: 20px; padding-right: 20px; }
}

/* ============================================================
   v7.4 最近登录设备（账号与安全面板内）
   ============================================================ */

.me-dev-hint {
  margin-left: auto;
  font-size: 11.5px; font-weight: 600;
  color: var(--text-muted);
  padding: 2px 8px; border-radius: 999px;
  background: var(--bg-soft);
}

/* ---- 列表 ---- */
.me-dev-list { display: flex; flex-direction: column; gap: 2px; }

.me-dev-row {
  display: flex; align-items: center; gap: 11px;
  width: 100%; text-align: left;
  padding: 10px 8px; margin: 0 -8px;
  border: none; background: none; cursor: pointer;
  border-radius: 12px;
  font-family: inherit;
  /* button 不继承父级 color，必须显式设置，否则深色模式下是纯黑字 */
  color: var(--text-primary);
  -webkit-tap-highlight-color: transparent;
  transition: background .18s ease;
}
.me-dev-row:hover { background: var(--card-hover); }
.me-dev-row:active { background: var(--card-hover); }
.me-dev-row.is-current { background: var(--primary-light); }
html[data-theme="dark"] .me-dev-row.is-current { background: rgba(109, 93, 246, .12); }

.me-dev-ico {
  flex: 0 0 auto;
  width: 38px; height: 38px; border-radius: 12px;
  display: grid; place-items: center;
  background: var(--bg-soft);
  color: var(--text-secondary);
}
.me-dev-ico.t-phone   { background: rgba(109, 93, 246, .12); color: #6d5df6; }
.me-dev-ico.t-tablet  { background: rgba(255, 94, 157, .12); color: #ff5e9d; }
.me-dev-ico.t-desktop { background: rgba(56, 189, 248, .14); color: #0ea5e9; }
.me-dev-ico.t-other   { background: rgba(148, 163, 184, .16); color: #64748b; }
html[data-theme="dark"] .me-dev-ico.t-phone   { background: rgba(109, 93, 246, .2); color: #a99cff; }
html[data-theme="dark"] .me-dev-ico.t-tablet  { background: rgba(255, 94, 157, .18); color: #ff8ab5; }
html[data-theme="dark"] .me-dev-ico.t-desktop { background: rgba(56, 189, 248, .2); color: #6cc7f5; }

.me-dev-main { flex: 1; min-width: 0; }
.me-dev-main strong {
  display: flex; align-items: center; gap: 6px;
  font-size: 13.5px; font-weight: 650; color: var(--text-primary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.me-dev-main small {
  display: block; margin-top: 3px;
  font-size: 11.5px; color: var(--text-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.me-dev-tag {
  flex: 0 0 auto;
  font-style: normal; font-size: 10px; font-weight: 700;
  padding: 1px 6px; border-radius: 999px;
  background: var(--grad-primary); color: #fff;
  letter-spacing: .2px;
}

.me-dev-right {
  flex: 0 0 auto;
  display: flex; align-items: center; gap: 4px;
  color: var(--text-muted);
}
.me-dev-right small {
  font-size: 11px; font-variant-numeric: tabular-nums;
  color: var(--text-muted); max-width: 105px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.me-dev-note {
  display: flex; align-items: flex-start; gap: 5px;
  margin: 12px 0 0;
  font-size: 11.5px; line-height: 1.5;
  color: var(--text-muted);
}
.me-dev-note .icon-svg { flex: 0 0 auto; margin-top: 1px; color: var(--accent); }

.me-dev-empty {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 22px 0 18px;
  color: var(--text-muted);
}
.me-dev-empty p { margin: 0; font-size: 12.5px; }

/* ---- 详情层：在面板内部再推一层 ---- */
.me-dev-detail {
  position: absolute; inset: 0;
  background: var(--bg);
  display: flex; flex-direction: column;
  transform: translateX(103%);
  visibility: hidden;
  transition: transform .38s cubic-bezier(.32, .94, .35, 1), visibility 0s .38s;
  z-index: 5;
}
.me-dev-detail.open {
  transform: none; visibility: visible;
  transition: transform .38s cubic-bezier(.32, .94, .35, 1);
}
.me-dev-detail-head {
  flex: 0 0 auto;
  display: flex; align-items: center; gap: 8px;
  padding: 12px 14px;
  background: var(--bg);
  border-bottom: 1px solid var(--card-border);
}
.me-dev-detail-body {
  flex: 1 1 auto; overflow-y: auto;
  /* 底部留出固定操作区的高度，避免「原始设备标识」被压住 */
  padding: 18px 14px 22px;
  -webkit-overflow-scrolling: touch;
}

.me-dev-hero {
  display: flex; flex-direction: column; align-items: center;
  text-align: center;
  padding: 6px 0 18px;
}
.me-dev-hero .me-dev-ico.xl {
  width: 68px; height: 68px; border-radius: 22px;
  margin-bottom: 12px;
  box-shadow: 0 10px 26px rgba(109, 93, 246, .16);
}
.me-dev-hero h2 {
  margin: 0; font-size: 17px; font-weight: 700; color: var(--text-primary);
  line-height: 1.35; word-break: break-word;
}
.me-dev-hero p {
  margin: 5px 0 0; font-size: 12.5px; color: var(--text-muted);
}
.me-dev-current-badge {
  margin-top: 9px;
  font-size: 11px; font-weight: 700;
  padding: 3px 10px; border-radius: 999px;
  background: var(--primary-light); color: var(--primary);
}

.me-dev-spec {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.me-dev-spec-row {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 12px 14px;
  font-size: 13px;
  border-bottom: 1px solid var(--card-line);
}
.me-dev-spec-row:last-child { border-bottom: none; }
.me-dev-spec-row span { flex: 0 0 auto; color: var(--text-muted); }
.me-dev-spec-row strong {
  flex: 1; text-align: right;
  font-weight: 600; color: var(--text-primary);
  word-break: break-word;
}
.me-dev-spec-row strong.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px; letter-spacing: -.2px;
}

.me-dev-prec {
  display: flex; align-items: flex-start; gap: 6px;
  margin-top: 12px;
  font-size: 11.5px; line-height: 1.55;
  color: var(--text-muted);
}
.me-dev-prec:empty { display: none; }
.me-dev-prec .icon-svg { flex: 0 0 auto; margin-top: 2px; }

.me-dev-ua {
  margin-top: 14px;
  background: var(--bg-soft);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 12px;
  color: var(--text-muted);
}
.me-dev-ua summary {
  cursor: pointer; font-weight: 600;
  color: var(--text-secondary);
  list-style: none;
}
.me-dev-ua summary::-webkit-details-marker { display: none; }
.me-dev-ua summary::before {
  content: '›'; display: inline-block; margin-right: 6px;
  transition: transform .2s;
}
.me-dev-ua[open] summary::before { transform: rotate(90deg); }
.me-dev-ua code {
  display: block; margin-top: 8px;
  font-size: 11px; line-height: 1.65;
  word-break: break-all;
  color: var(--text-muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.me-dev-kick {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  width: 100%; margin-top: 18px;
  padding: 12px; border-radius: var(--radius-lg);
  border: 1px solid rgba(244, 63, 94, .3);
  background: rgba(244, 63, 94, .07);
  color: #e11d48;
  font-size: 13.5px; font-weight: 650; font-family: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background .2s, transform .16s;
}
.me-dev-kick:active { transform: scale(.985); background: rgba(244, 63, 94, .13); }
html[data-theme="dark"] .me-dev-kick { color: #ff8095; border-color: rgba(244, 63, 94, .35); }

/* 手机上：面板本身要能承载绝对定位的详情层 */
@media (max-width: 1024px) {
  .me-panel { position: fixed; }
  .me-dev-detail { position: absolute; }
}

/* v7.4 补：详情规格分组标题 */
.me-dev-spec-cap {
  padding: 9px 14px 7px;
  font-size: 11px; font-weight: 700;
  letter-spacing: .4px;
  color: var(--text-muted);
  background: var(--bg-soft);
  border-bottom: 1px solid var(--card-line);
}
.me-dev-spec-cap:first-child { padding-top: 10px; border-top: none; }
.me-dev-spec-cap + .me-dev-spec-row { border-top: none; }
/* 分组标题自带底边线，紧邻它的上一行不再画分隔线（相邻选择器，避免 :has 兼容问题） */
.me-dev-spec-row + .me-dev-spec-cap { border-top: 1px solid var(--card-line); }
.me-dev-spec-row + .me-dev-spec-cap:first-child { border-top: none; }

/* 详情头图标更实，别太淡 */
.me-dev-hero .me-dev-ico.xl {
  background: linear-gradient(158deg, rgba(109,93,246,.18), rgba(109,93,246,.07));
  color: var(--primary);
}
html[data-theme="dark"] .me-dev-hero .me-dev-ico.xl {
  background: linear-gradient(158deg, rgba(109,93,246,.32), rgba(109,93,246,.12));
  color: #b0a4ff;
}
.me-dev-hero .me-dev-ico.xl.t-tablet {
  background: linear-gradient(158deg, rgba(255,94,157,.2), rgba(255,94,157,.07));
  color: #ff5e9d;
}
.me-dev-hero .me-dev-ico.xl.t-desktop {
  background: linear-gradient(158deg, rgba(56,189,248,.22), rgba(56,189,248,.07));
  color: #0ea5e9;
}
.me-dev-hero .me-dev-ico.xl.t-other {
  background: var(--bg-soft); color: var(--text-secondary);
}

/* v7.4 补：桌面抽屉里详情层内边距与面板对齐 */
@media (min-width: 1025px) {
  .me-dev-detail-head,
  .me-dev-detail-body { padding-left: 20px; padding-right: 20px; }
  .me-dev-spec-row { padding-left: 15px; padding-right: 15px; }
  .me-dev-spec-cap { padding-left: 15px; padding-right: 15px; }
}

/* v7.4 补：「在线」徽标（真实会话有效，区别于「当前」这台设备） */
.me-dev-tag.online {
  background: linear-gradient(160deg, #34d399, #10b981);
  color: #fff;
}
html[data-theme="dark"] .me-dev-tag.online {
  background: linear-gradient(160deg, #34d399, #059669);
}

/* v7.4 补：详情页底部固定操作区（退出按钮不用滚动才能看到） */
.me-dev-detail-foot {
  flex: 0 0 auto;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
  background: var(--bg);
  border-top: 1px solid var(--card-border);
}
.me-dev-detail-foot[hidden] { display: none; }
.me-dev-detail-foot .me-dev-kick { margin-top: 0; }

@media (min-width: 1025px) {
  .me-dev-detail-foot { padding-left: 20px; padding-right: 20px; }
}

/* v7.4 补：深色下退出按钮别显得发白 */
html[data-theme="dark"] .me-dev-kick {
  color: #ff8fa3;
  border-color: rgba(244, 63, 94, .42);
  background: rgba(244, 63, 94, .16);
}
html[data-theme="dark"] .me-dev-kick:active {
  background: rgba(244, 63, 94, .26);
}
html[data-theme="dark"] .me-dev-detail-foot {
  background: var(--bg);
  border-top-color: var(--card-border);
}

/* v7.5 作品卡片作者名：撑到 40px 触控高度（视觉不变） */
.art-card-meta a.art-owner {
  display: inline-flex; align-items: center;
  min-height: 40px; margin: -9px 0;
}

/* ============================================================
   好友/用户卡片：窄宽度自适应（v7.6）
   ------------------------------------------------------------
   卡片内部是「头像 + 信息 + 操作按钮」横排三块。
   一旦容器宽度只够 2~3 列（每张 250~320px），三块内容会挤在一起，
   昵称被压成竖排单字 —— 就是电脑端好友页看到的那团乱。
   解决：容器够宽时才多列横排；不够宽就单列 + 卡片内纵排。

   注：不用 @container —— 把 container-type 设在 .user-card 上，
   @container 查的是它的父容器而非自身，实测不生效。
   ============================================================ */

/* 默认（≥1100px，friend-layout 是 220px + 1fr 两列）：主区够宽，多列横排 */
.user-grid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }

/* ≤1100px：friend-layout 塌成单列，主区吃满宽度；卡片降到 2 列起步更稳 */
@media (max-width: 1100px) {
  .user-grid { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
}

/* ≤760px：每张卡片只有 ~1 个身位，卡片内改纵排，按钮均分一行 */
@media (max-width: 760px) {
  .user-grid { grid-template-columns: minmax(0, 1fr); }
  .user-grid.stack { grid-template-columns: minmax(0, 1fr); }
  .user-card {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .user-card .mini-avatar.lg { align-self: flex-start; }
  .user-card-info { width: 100%; }
  .user-card-actions { margin-top: 2px; width: 100%; }
  .user-card-actions .btn {
    flex: 1 1 auto; min-width: 0;
    justify-content: center; text-align: center;
  }
}

/* 侧栏「搜索用户」结果是竖排卡片，本来就窄，统一纵排更清楚 */
.user-grid.stack { grid-template-columns: minmax(0, 1fr); }
.user-grid.stack .user-card { flex-direction: column; align-items: stretch; gap: 10px; }
.user-grid.stack .user-card .mini-avatar.lg { align-self: flex-start; }

/* ===== 摇一摇选项行（v7.6）=====
   原来「匹配范围」和「所在频道」用内联样式，两个块级元素上下贴着、
   select 又被拉满整行，看起来像一大坨。这里统一成同一套选项行。 */
.radius-select,
.shake-opt-row {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
  margin: 0 auto 12px;
  max-width: 640px;
  padding: 12px 18px;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  background: var(--card);
  box-shadow: var(--shadow-sm);
}
.shake-opt-label {
  font-size: 13.5px;
  color: var(--text-secondary);
  font-weight: 600;
}
.radius-select label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13.5px;
  color: var(--text-secondary);
  cursor: pointer;
  min-height: 32px;
}
.radius-select input[type="radio"] { accent-color: var(--primary); }
.shake-select {
  flex: 0 1 220px;
  min-width: 0;
  padding: 8px 12px;
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  font-size: 13.5px;
  font-family: inherit;
  color: var(--text-primary);
  background: var(--bg-soft);
  cursor: pointer;
}
.shake-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}
@media (max-width: 620px) {
  .radius-select, .shake-opt-row { gap: 10px; padding: 10px 12px; }
  .shake-select { flex: 1 1 100%; }
}
