﻿/* 唯一里 WE1 · 设计系统
   深海蓝/靛青主色 + 青紫渐变点缀 · 轻拟态玻璃 · 浅色/深色/系统自动
   ------------------------------------------------------------ */

:root {
  --brand-900: #070d22;
  --brand-800: #0b1533;
  --brand-700: #101d47;
  --brand-600: #1a2a63;
  --ink-0: #ffffff;
  --ink-1: #eef1fc;
  --ink-2: #c8d0ea;
  --ink-3: #97a2c6;
  --accent-a: #9aaaff;
  --accent-b: #c2a5ff;
  --accent-c: #6ee7d7;
  --danger: #ff6b81;
  --warn: #ffc46b;
  --ok: #5ee2a0;

  /* 文字用色：深色底用亮色，浅色底会覆盖成深色（见 [data-theme='light']） */
  --tone-accent: #b3c0ff;
  --tone-teal: #7ff0e2;
  --tone-ok: #5ee2a0;
  --tone-warn: #ffc46b;
  --tone-danger: #ff6b81;
  --on-accent: #0b1533;

  --bg: #070d22;
  --bg-grad-1: rgba(89, 107, 189, 0.55);
  --bg-grad-2: rgba(140, 106, 210, 0.35);
  --surface: rgba(255, 255, 255, 0.055);
  --surface-strong: rgba(255, 255, 255, 0.1);
  --surface-solid: #121b3c;
  --border: rgba(255, 255, 255, 0.14);
  --border-strong: rgba(255, 255, 255, 0.28);
  --text: #eef1fc;
  --text-dim: #c3cbe8;
  --text-mute: #b0bad9;
  --shadow: 0 18px 50px rgba(3, 7, 20, 0.55);
  --shadow-soft: 0 8px 24px rgba(3, 7, 20, 0.35);
  --radius-lg: 22px;
  --radius: 14px;
  --radius-sm: 10px;
  --nav-w: 248px;
  --maxw: 1120px;
  --ease: cubic-bezier(0.22, 0.68, 0.35, 1);
}

[data-theme='light'] {
  --bg: #eef1fb;
  --bg-grad-1: rgba(154, 170, 255, 0.55);
  --bg-grad-2: rgba(194, 165, 255, 0.4);
  --surface: rgba(255, 255, 255, 0.72);
  --surface-strong: rgba(255, 255, 255, 0.9);
  --surface-solid: #ffffff;
  --border: rgba(16, 29, 71, 0.1);
  --border-strong: rgba(16, 29, 71, 0.2);
  --text: #101d47;
  --text-dim: #3b476f;
  --text-mute: #5a6390;
  --shadow: 0 18px 44px rgba(60, 80, 160, 0.16);
  --shadow-soft: 0 6px 20px rgba(60, 80, 160, 0.12);

  /* 浅色底上的文字用色：加深，保证 WCAG AA（≥4.5:1） */
  --tone-accent: #3f4fc4;
  --tone-teal: #0d6f63;
  --tone-ok: #0f6b45;
  --tone-warn: #7a5200;
  --tone-danger: #b0122c;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: 'PingFang SC', 'Microsoft YaHei', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 12%, var(--bg-grad-1), transparent 42%),
    radial-gradient(circle at 82% 8%, var(--bg-grad-2), transparent 46%),
    radial-gradient(circle at 50% 110%, rgba(110, 231, 215, 0.16), transparent 50%),
    var(--bg);
  background-attachment: fixed;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
::selection { background: rgba(154, 170, 255, 0.35); }

/* 滚动条 */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }

/* ===== 布局 ===== */
#root { width: 100%; min-height: 100vh; }
.app { display: flex; min-height: 100vh; width: 100%; align-items: stretch; }

.sidebar {
  width: var(--nav-w);
  flex: 0 0 var(--nav-w);
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 18px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-right: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02));
  backdrop-filter: blur(18px);
  overflow: hidden;               /* 侧栏自身不产生滚动，交给 nav 区 */
}

.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 10px; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 12px;
  background: linear-gradient(135deg, var(--accent-a), var(--accent-b));
  display: grid; place-items: center;
  font-weight: 800; color: var(--on-accent, #0b1533); letter-spacing: -1px; font-size: 15px;
  box-shadow: 0 8px 20px rgba(154, 170, 255, 0.4);
}
.brand-name { font-weight: 700; font-size: 16px; letter-spacing: 0.5px; }
.brand-sub { font-size: 11px; color: var(--text-mute); }

.nav-group { display: flex; flex-direction: column; gap: 2px; overflow-y: auto; overscroll-behavior: contain; flex: 1 1 auto; min-height: 0; padding-right: 2px; }
.nav-group::-webkit-scrollbar { width: 6px; }
.nav-title { font-size: 11px; color: var(--text-mute); padding: 10px 10px 4px; letter-spacing: 1px; flex: none; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 11px; border-radius: var(--radius-sm);
  color: var(--text-dim); font-size: 13.5px; cursor: pointer;
  border: 1px solid transparent; transition: all 0.18s var(--ease);
  background: none; text-align: left; width: 100%; flex: none;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.nav-item:hover { background: var(--surface); color: var(--text); }
.nav-item.active {
  background: linear-gradient(100deg, rgba(154, 170, 255, 0.22), rgba(194, 165, 255, 0.12));
  border-color: rgba(154, 170, 255, 0.38);
  color: var(--text); font-weight: 600;
}
.nav-icon { width: 18px; flex: 0 0 18px; text-align: center; opacity: 0.9; font-size: 14px; }
.nav-label { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }

.sidebar-foot {
  margin-top: auto; flex: none;
  display: flex; flex-direction: column; gap: 2px;
  padding-top: 10px; border-top: 1px solid var(--border);
}
.side-user {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 6px 2px; min-width: 0;
}
.side-user-meta { flex: 1 1 auto; min-width: 0; }
.side-user-name {
  display: block; font-size: 13px; font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.side-user-meta .small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-login { width: 100%; justify-content: center; margin-top: 6px; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 12px;
  padding: 12px 24px;
  border-bottom: 1px solid var(--border);
  background: rgba(10, 16, 38, 0.55);
  backdrop-filter: blur(20px);
}
[data-theme='light'] .topbar { background: rgba(255, 255, 255, 0.7); }
.topbar h1 { font-size: 16px; margin: 0; font-weight: 650; letter-spacing: 0.3px; }
.topbar .grow { flex: 1; }

.content { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 22px 24px 96px; }

/* ===== 通用组件 ===== */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow-soft);
}
.card + .card { margin-top: 14px; }
.card-title { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font-size: 15px; font-weight: 650; }
.card-title .more { margin-left: auto; font-size: 12px; color: var(--text-mute); cursor: pointer; }
.card-title .more:hover { color: var(--tone-accent); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 16px; border-radius: var(--radius-sm); cursor: pointer;
  border: 1px solid var(--border-strong);
  background: var(--surface-strong); color: var(--text);
  font-size: 14px; transition: all 0.18s var(--ease); white-space: nowrap;
}
.btn:hover { background: rgba(154, 170, 255, 0.18); border-color: rgba(154, 170, 255, 0.5); }
.btn:active { transform: translateY(1px); }
.btn.primary {
  background: linear-gradient(100deg, var(--accent-a), var(--accent-b));
  color: var(--on-accent, #0b1533); border-color: transparent; font-weight: 650;
  box-shadow: 0 10px 24px rgba(154, 170, 255, 0.3);
}
.btn.primary:hover { filter: brightness(1.06); }
.btn.ghost { background: transparent; }
.btn.danger { border-color: rgba(255, 107, 129, 0.5); color: #ffb3bd; }
[data-theme='light'] .btn.danger { color: #b0122c; border-color: rgba(214, 48, 74, 0.42); }
.btn.small { padding: 6px 10px; font-size: 12.5px; border-radius: 8px; }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }

.chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: 999px; font-size: 12px;
  border: 1px solid var(--border); background: var(--surface);
  color: var(--text-dim);
}
.chip.accent { border-color: rgba(154, 170, 255, 0.5); color: var(--tone-accent); }
.chip.ok { border-color: rgba(94, 226, 160, 0.45); color: var(--tone-ok); }
.chip.warn { border-color: rgba(255, 196, 107, 0.5); color: var(--tone-warn); }
.chip.danger { border-color: rgba(255, 107, 129, 0.5); color: var(--tone-danger); }
.chip.ghost { background: transparent; }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 13px; color: var(--text-dim); }
.field input, .field textarea, .field select {
  padding: 11px 13px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background-color: rgba(11, 21, 51, 0.35);
  outline: none; transition: border-color 0.16s var(--ease), box-shadow 0.16s var(--ease);
  width: 100%; resize: vertical;
}
[data-theme='light'] .field input,
[data-theme='light'] .field textarea,
[data-theme='light'] .field select { background-color: rgba(255, 255, 255, 0.9); }
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: rgba(154, 170, 255, 0.65);
  box-shadow: 0 0 0 3px rgba(154, 170, 255, 0.16);
}
.field .hint { font-size: 12px; color: var(--text-mute); line-height: 1.6; }

.row { display: flex; gap: 12px; flex-wrap: wrap; }
.row > * { flex: 1; min-width: 0; }
.row.tight { gap: 8px; }
.space { height: 12px; }

.avatar {
  width: 38px; height: 38px; border-radius: 12px; flex: 0 0 38px;
  background: linear-gradient(135deg, var(--accent-a), var(--accent-b));
  display: grid; place-items: center; font-weight: 700; color: var(--on-accent, #0b1533); font-size: 14px;
  overflow: hidden;
}
.avatar.sm { width: 28px; height: 28px; flex-basis: 28px; border-radius: 9px; font-size: 12px; }
.avatar.lg { width: 62px; height: 62px; flex-basis: 62px; border-radius: 18px; font-size: 22px; }

.anon-avatar {
  /* 不透明底纹：保证「匿」字在深浅两种主题下都读得清 */
  background: repeating-linear-gradient(45deg, var(--accent-a) 0 4px, var(--accent-b) 4px 8px);
  color: var(--on-accent, #0b1533);
}

.muted { color: var(--text-mute); }
.small { font-size: 12.5px; }
.dim { color: var(--text-dim); }
.grow { flex: 1; }
.center { text-align: center; }
.flex { display: flex; align-items: center; gap: 10px; }
.flex.wrap { flex-wrap: wrap; }
.hidden { display: none !important; }

/* ===== 帖子卡片 ===== */
.post-list { display: flex; flex-direction: column; gap: 10px; }
.post-card {
  display: block; padding: 15px 16px; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--surface);
  transition: all 0.18s var(--ease); cursor: pointer;
}
.post-card:hover {
  border-color: rgba(154, 170, 255, 0.45);
  background: var(--surface-strong);
  transform: translateY(-1px);
}
.post-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.post-title { font-size: 15px; font-weight: 600; margin: 0 0 6px; line-height: 1.45; }
.post-excerpt { font-size: 13px; color: var(--text-dim); line-height: 1.65; margin: 0 0 10px; }
.post-meta { display: flex; align-items: center; gap: 12px; font-size: 12px; color: var(--text-mute); flex-wrap: wrap; }
.post-meta .spacer { flex: 1; }

.tag { font-size: 11.5px; padding: 2px 8px; border-radius: 999px; background: rgba(154, 170, 255, 0.14); color: var(--tone-accent); }
.badge-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent-c); display: inline-block; }

/* ===== 登录/注册 ===== */
.auth-wrap {
  min-height: 100vh; display: grid; place-items: center; padding: 24px;
}
.auth-card {
  width: min(94vw, 460px); padding: 30px;
  border-radius: 26px; border: 1px solid var(--border-strong);
  background: var(--surface); backdrop-filter: blur(24px);
  box-shadow: var(--shadow);
}
.auth-card h1 { margin: 0 0 4px; font-size: 24px; letter-spacing: 0.5px; }
.auth-card .slogan { color: var(--text-dim); font-size: 13px; margin-bottom: 22px; }
.tabs { display: flex; gap: 8px; margin: 0 0 18px; }
.tabs button {
  flex: 1; padding: 10px; border-radius: var(--radius-sm); cursor: pointer;
  border: 1px solid var(--border); background: transparent; color: var(--text-dim);
}
.tabs button.active {
  background: linear-gradient(100deg, var(--accent-a), var(--accent-b));
  color: var(--on-accent, #0b1533); border-color: transparent; font-weight: 650;
}

/* ===== 首页 ===== */
.hero {
  position: relative; overflow: hidden; border-radius: 26px; padding: 26px;
  border: 1px solid var(--border-strong);
  background: linear-gradient(130deg, rgba(154, 170, 255, 0.18), rgba(194, 165, 255, 0.1) 45%, rgba(110, 231, 215, 0.08));
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}
.hero h2 { margin: 0 0 6px; font-size: 22px; letter-spacing: 0.4px; }
.hero p { margin: 0; color: var(--text-dim); font-size: 13.5px; }
.hero-grid { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 18px; }
.hero-stat { min-width: 84px; }
.hero-stat b { display: block; font-size: 20px; }
.hero-stat span { font-size: 11.5px; color: var(--text-mute); }
.countdown {
  margin-left: auto; text-align: right; font-variant-numeric: tabular-nums;
}
.countdown b { font-size: 26px; letter-spacing: 1px; background: linear-gradient(100deg, var(--accent-a), var(--accent-c)); -webkit-background-clip: text; background-clip: text; color: transparent; }
/* 浅色底上换深色渐变，避免大字发虚 */
[data-theme='light'] .countdown b { background: linear-gradient(100deg, #3f4fc4, #0d6f63); -webkit-background-clip: text; background-clip: text; }

.board-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 10px; }
.board-tile {
  padding: 13px; border-radius: var(--radius); border: 1px solid var(--border);
  background: var(--surface); cursor: pointer; transition: all 0.18s var(--ease);
}
.board-tile:hover { border-color: rgba(154, 170, 255, 0.5); background: var(--surface-strong); transform: translateY(-1px); }
.board-tile b { display: block; font-size: 14px; margin-bottom: 3px; }
.board-tile span { font-size: 11.5px; color: var(--text-mute); }

/* ===== 帖子详情 ===== */
.post-detail-title { font-size: 22px; line-height: 1.4; margin: 4px 0 10px; }
.post-body { font-size: 14.5px; line-height: 1.85; color: var(--text); white-space: pre-wrap; word-break: break-word; }
.post-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.action-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px;
  border-radius: 999px; border: 1px solid var(--border); background: transparent;
  cursor: pointer; font-size: 13px; color: var(--text-dim); transition: all 0.16s var(--ease);
}
.action-btn:hover { border-color: rgba(154, 170, 255, 0.5); color: var(--text); }
.action-btn.on { border-color: rgba(154, 170, 255, 0.7); color: var(--tone-accent); background: rgba(154, 170, 255, 0.12); }

.comment {
  padding: 12px 0; border-bottom: 1px solid var(--border);
}
.comment:last-child { border-bottom: none; }
.comment-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.comment-body { font-size: 13.5px; line-height: 1.7; white-space: pre-wrap; word-break: break-word; }
.replies { margin: 10px 0 0 18px; padding-left: 12px; border-left: 1px solid var(--border); display: flex; flex-direction: column; gap: 10px; }
.reply { font-size: 13px; }
.comment-actions { display: flex; gap: 10px; margin-top: 6px; font-size: 12px; color: var(--text-mute); }
.comment-actions span { cursor: pointer; }
.comment-actions span:hover { color: var(--tone-accent); }

/* ===== 表格 / 后台 ===== */
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th, .table td { padding: 9px 10px; text-align: left; border-bottom: 1px solid var(--border); }
.table th { color: var(--text-mute); font-weight: 500; font-size: 12px; }
.table tr:hover td { background: var(--surface); }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.stat {
  padding: 14px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface);
}
.stat b { display: block; font-size: 22px; font-variant-numeric: tabular-nums; }
.stat span { font-size: 12px; color: var(--text-mute); }

.bar { height: 6px; border-radius: 999px; background: rgba(154, 170, 255, 0.16); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--accent-a), var(--accent-b)); }

/* ===== 徽章（设计集 SVG） ===== */
.badge-group { margin-bottom: 22px; }
.badge-group-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--text-dim); margin: 0 0 10px;
  padding-bottom: 6px; border-bottom: 1px solid var(--border);
}
.badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.badge-grid.compact { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }

.badge-card {
  position: relative; padding: 12px 10px 10px; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--surface);
  text-align: center; cursor: pointer; overflow: hidden;
  transition: transform .18s var(--ease), border-color .18s var(--ease), background .18s var(--ease);
}
.badge-card:hover { transform: translateY(-2px); border-color: rgba(154, 170, 255, 0.5); background: var(--surface-strong); }
.badge-card.owned { border-color: rgba(154, 170, 255, 0.42); background: rgba(154, 170, 255, 0.08); }
.badge-card.locked .badge-art img { filter: grayscale(1) opacity(.42); }
.badge-card.locked .badge-name { color: var(--text-mute); }

.badge-art { position: relative; width: 100%; aspect-ratio: 1; display: grid; place-items: center; margin-bottom: 8px; }
.badge-art img { width: 100%; height: 100%; object-fit: contain; display: block; }
.badge-art-fallback { font-size: 34px; }
.badge-art.lg { width: 104px; height: 104px; aspect-ratio: auto; margin: 0; flex: 0 0 104px; }
.badge-lock {
  position: absolute; right: 2px; bottom: 2px;
  width: 20px; height: 20px; border-radius: 50%;
  display: grid; place-items: center; font-size: 10px;
  background: rgba(7, 13, 34, 0.82); color: #eef1fc; border: 1px solid var(--border);
}
.badge-name { font-size: 12.5px; font-weight: 600; line-height: 1.35; margin-bottom: 5px; }
.badge-meta { display: flex; gap: 4px; justify-content: center; flex-wrap: wrap; }
.badge-cond { font-size: 10.5px; color: var(--text-mute); margin-top: 5px; line-height: 1.4; }

.badge-card.is-legendary::after {
  content: ''; position: absolute; inset: -50%; pointer-events: none;
  background: conic-gradient(from 0deg, transparent, rgba(255, 226, 168, 0.22), transparent 38%);
  animation: badge-shine 7s linear infinite;
}
@keyframes badge-shine { to { transform: rotate(360deg); } }

.badge-detail { display: flex; gap: 16px; align-items: flex-start; }
.badge-detail-meta { flex: 1; min-width: 0; }

/* ===== 商城（设计集 SVG） ===== */
.shop-group { margin-bottom: 22px; }
.shop-group-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--text-dim); margin: 0 0 10px;
  padding-bottom: 6px; border-bottom: 1px solid var(--border);
}
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: 10px; }
.shop-card {
  position: relative; padding: 12px; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--surface);
  cursor: pointer; transition: transform .18s var(--ease), border-color .18s var(--ease), background .18s var(--ease);
}
.shop-card:hover { transform: translateY(-2px); border-color: rgba(154, 170, 255, 0.5); background: var(--surface-strong); }
.shop-card.owned { border-color: rgba(94, 226, 160, 0.36); }

.shop-art {
  width: 100%; aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden;
  display: grid; place-items: center; margin-bottom: 10px;
  background: radial-gradient(circle at 50% 45%, rgba(154, 170, 255, 0.14), transparent 70%);
}
.shop-art img { width: 100%; height: 100%; object-fit: contain; display: block; }
.shop-art.is-frame { background: radial-gradient(circle at 50% 50%, rgba(194, 165, 255, 0.16), transparent 65%); }
.shop-art.lg { width: 152px; height: 152px; aspect-ratio: auto; flex: 0 0 152px; margin: 0; }
.shop-art-fallback { font-size: 34px; }

.shop-name { font-size: 13px; font-weight: 600; margin-bottom: 6px; line-height: 1.4; }
.shop-meta { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-bottom: 8px; }
.shop-price { color: var(--tone-teal); font-size: 12.5px; font-weight: 650; }
.shop-buy { width: 100%; }
.shop-owned { margin-top: 2px; }

.shop-detail { display: flex; gap: 16px; align-items: flex-start; }
.shop-detail-meta { flex: 1; min-width: 0; }

.swatches { display: flex; gap: 6px; margin-top: 4px; }
.swatch { width: 22px; height: 22px; border-radius: 7px; border: 1px solid var(--border-strong); }
.sticker-row { display: flex; gap: 6px; margin-top: 10px; }
.sticker-row img { width: 42px; height: 42px; object-fit: contain; border-radius: 8px; background: var(--surface); }

/* 装扮生效后的头像框（把 SVG 叠在头像上） */
.avatar { position: relative; overflow: hidden; }
.avatar-editor { display: flex; align-items: center; gap: 14px; }
.avatar-editor-actions { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.avatar .avatar-img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center; display: block; border-radius: inherit;
}
.avatar .avatar-frame-img {
  position: absolute; inset: -12%; width: 124%; height: 124%;
  object-fit: contain; pointer-events: none;
}

@media (max-width: 900px) {
  .badge-grid { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
  .shop-grid { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); }
  .badge-detail, .shop-detail { flex-direction: column; align-items: center; text-align: center; }
  .badge-art.lg, .shop-art.lg { width: 118px; height: 118px; flex-basis: 118px; }
}
.rarity.common { background: rgba(148, 163, 184, 0.25); color: #cbd5e1; }
.rarity.rare { background: rgba(96, 165, 250, 0.22); color: #93c5fd; }
.rarity.epic { background: rgba(168, 85, 247, 0.24); color: #d8b4fe; }
.rarity.legendary { background: linear-gradient(100deg, rgba(255, 196, 107, 0.35), rgba(255, 107, 129, 0.3)); color: #ffd8a8; }
[data-theme='light'] .rarity.common { background: rgba(100, 116, 139, 0.16); color: #3c4a63; }
[data-theme='light'] .rarity.rare { background: rgba(37, 99, 235, 0.14); color: #1d4ed8; }
[data-theme='light'] .rarity.epic { background: rgba(126, 34, 206, 0.14); color: #6b21a8; }
[data-theme='light'] .rarity.legendary { background: linear-gradient(100deg, rgba(180, 130, 20, 0.2), rgba(190, 40, 70, 0.16)); color: #8a5200; }
.rarity { font-size: 10px; padding: 1px 7px; border-radius: 999px; white-space: nowrap; }

/* ===== 个人主页 ===== */
.pf-cover {
  height: 172px; border-radius: var(--radius-lg); overflow: hidden;
  background: linear-gradient(130deg, rgba(154, 170, 255, 0.35), rgba(194, 165, 255, 0.22) 50%, rgba(110, 231, 215, 0.18));
  background-size: cover; background-position: center;
  border: 1px solid var(--border); margin-bottom: -56px;
  position: relative;
}
/* 细噪点 + 光带：让纯配色封面也有质感，不依赖拉伸样张 */
.pf-cover::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.35) 0 0.5px, transparent 1px),
    radial-gradient(circle at 62% 74%, rgba(255, 255, 255, 0.28) 0 0.5px, transparent 1px);
  background-size: 46px 46px, 71px 71px;
  opacity: 0.5;
  mix-blend-mode: screen;
}
.pf-cover-grad { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 36%, rgba(7, 13, 34, 0.5)); }
[data-theme='light'] .pf-cover-grad { background: linear-gradient(180deg, transparent 40%, rgba(238, 241, 251, 0.75)); }

.pf-head { position: relative; padding-top: 16px; }
.pf-head-main { display: flex; align-items: flex-start; gap: 14px; flex-wrap: wrap; }
.pf-head-main .avatar.lg { box-shadow: 0 8px 24px rgba(3, 7, 20, 0.45); }
.pf-id { flex: 1; min-width: 200px; }
.pf-name-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.pf-name { font-size: 20px; font-weight: 700; }
.pf-sub { margin-bottom: 6px; }
.pf-bio { margin: 8px 0 0; font-size: 13.5px; line-height: 1.75; color: var(--text-dim); white-space: pre-wrap; }
.pf-sign { margin-top: 4px; font-style: italic; }
.pf-actions { display: flex; gap: 8px; align-items: center; }

.pf-stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(72px, 1fr));
  gap: 8px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border);
}
.pf-stat { text-align: center; }
.pf-stat b { display: block; font-size: 17px; font-variant-numeric: tabular-nums; }
.pf-stat span { font-size: 11px; color: var(--text-mute); }
.pf-follow-row { display: flex; gap: 16px; margin-top: 12px; flex-wrap: wrap; }
.pf-follow-row b { color: var(--text); }

.pf-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.pf-tab {
  padding: 6px 13px; border-radius: 999px; cursor: pointer; font-size: 13px;
  border: 1px solid var(--border); background: transparent; color: var(--text-dim);
  transition: all .16s var(--ease);
}
.pf-tab:hover { border-color: rgba(154, 170, 255, 0.5); color: var(--text); }
.pf-tab.active {
  background: linear-gradient(100deg, var(--accent-a), var(--accent-b));
  color: var(--on-accent, #0b1533); border-color: transparent; font-weight: 650;
}

@media (max-width: 900px) {
  .pf-cover { height: 120px; margin-bottom: -44px; }
  .pf-head-main { gap: 10px; }
  .pf-name { font-size: 17px; }
  .pf-actions { width: 100%; }
  .pf-stats { grid-template-columns: repeat(4, 1fr); }
}

/* ===== 我的装扮（佩戴中心） ===== */
.deco-preview {
  position: relative; overflow: hidden;
  border-radius: var(--radius-lg); border: 1px solid var(--border-strong);
  background: linear-gradient(130deg, rgba(154, 170, 255, 0.18), rgba(194, 165, 255, 0.1) 50%, rgba(110, 231, 215, 0.08));
  background-size: cover; background-position: center;
  padding: 26px; margin-bottom: 14px;
  box-shadow: var(--shadow-soft);
}
.deco-preview::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(7, 13, 34, 0.18), rgba(7, 13, 34, 0.55));
}
[data-theme='light'] .deco-preview::after {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.25), rgba(238, 241, 251, 0.7));
}
.deco-preview-inner { position: relative; z-index: 1; display: flex; align-items: center; gap: 16px; }
.deco-preview-meta { min-width: 0; }
.deco-preview-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.deco-preview-name { font-size: 19px; font-weight: 700; }
.deco-title-chip {
  font-size: 11.5px; padding: 2px 9px; border-radius: 999px;
  border: 1px solid rgba(154, 170, 255, 0.55); color: var(--tone-accent);
  background: rgba(154, 170, 255, 0.14);
}
.deco-emblem { font-size: 12px; color: var(--tone-warn); }

/* 称号铭牌：裁出设计集铭牌带（360x200 画布中铭牌约 y72..128 / x16..344），与商城展示一致 */
.deco-title-art {
  display: inline-flex; align-items: center; flex: none;
  height: 24px; aspect-ratio: 328 / 56; overflow: hidden;
  border-radius: 6px;
  filter: drop-shadow(0 1px 3px rgba(3, 7, 20, 0.24));
  vertical-align: middle;
}
.deco-title-art img {
  width: 100%; height: 100%; object-fit: cover; object-position: center;
  display: block; pointer-events: none;
}
.deco-title-art.lg { height: 38px; border-radius: 10px; }
.deco-title-art.sm { height: 20px; border-radius: 5px; }

.slot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.slot-card {
  padding: 14px; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--surface);
}
.slot-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.slot-head b { font-size: 13.5px; }
.slot-hint { margin-bottom: 10px; line-height: 1.5; }
.slot-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 8px; }
.slot-item {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 7px 5px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--border); background: transparent;
  transition: all .16s var(--ease);
}
.slot-item:hover { border-color: rgba(154, 170, 255, 0.5); background: var(--surface-strong); }
.slot-item.on {
  border-color: rgba(154, 170, 255, 0.85);
  background: rgba(154, 170, 255, 0.16);
  box-shadow: 0 0 0 2px rgba(154, 170, 255, 0.16) inset;
}
.slot-item img { width: 100%; aspect-ratio: 1; object-fit: contain; display: block; }
.slot-item-fallback { font-size: 22px; }
.slot-item-name {
  font-size: 10.5px; color: var(--text-dim); line-height: 1.3;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%;
}
.slot-item.on .slot-item-name { color: var(--tone-accent); font-weight: 600; }

@media (max-width: 900px) {
  .slot-grid { grid-template-columns: 1fr; }
  .deco-preview { padding: 18px; }
  .deco-preview-inner { flex-direction: column; align-items: flex-start; gap: 10px; }
}

/* ===== 模态框 / 提示 ===== */
.modal-mask {
  position: fixed; inset: 0; background: rgba(4, 8, 20, 0.62); backdrop-filter: blur(6px);
  display: grid; place-items: center; z-index: 100; padding: 20px;
  animation: fade 0.18s var(--ease);
}
.modal {
  width: min(94vw, 520px); max-height: 86vh; overflow: auto;
  border-radius: 22px; border: 1px solid var(--border-strong);
  background: var(--surface-solid); color: var(--text);
  box-shadow: var(--shadow); padding: 22px;
}
[data-theme='dark'] .modal { background: #101a3a; }
.modal h3 { margin: 0 0 12px; font-size: 17px; }
.modal-foot { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; }

@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.toast-wrap {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; gap: 8px; z-index: 200; align-items: center;
}
.toast {
  padding: 10px 18px; border-radius: 999px; font-size: 13.5px;
  background: rgba(16, 26, 58, 0.94); color: #eef1fc;
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-soft); animation: slideUp 0.2s var(--ease);
  max-width: min(90vw, 520px); text-align: center;
}
[data-theme='light'] .toast {
  background: rgba(255, 255, 255, 0.97);
  color: #101d47;
  border-color: rgba(16, 29, 71, 0.16);
  box-shadow: 0 12px 30px rgba(60, 80, 160, 0.18);
}
.toast.err { border-color: rgba(255, 107, 129, 0.6); color: #ffc2cb; }
[data-theme='light'] .toast.err { color: #b0122c; border-color: rgba(224, 62, 86, 0.45); }
.toast.ok { border-color: rgba(94, 226, 160, 0.5); color: #c6ffe4; }
[data-theme='light'] .toast.ok { color: #0a6b45; border-color: rgba(36, 160, 106, 0.45); }

/* ===== 通知角标 ===== */
.dot-badge {
  min-width: 16px; height: 16px; padding: 0 5px; border-radius: 999px;
  background: var(--danger); color: #fff; font-size: 10px;
  display: inline-grid; place-items: center; font-weight: 700;
}

/* ===== 移动端 ===== */
.mobile-nav { display: none; }
.mobile-top { display: none; }

@media (max-width: 900px) {
  .sidebar { display: none; }
  .topbar { padding: 10px 14px; }
  .content { padding: 14px 14px 92px; }
  .mobile-nav {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 60;
    padding: 8px 6px calc(8px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--border);
    background: rgba(10, 16, 38, 0.92); backdrop-filter: blur(20px);
  }
  [data-theme='light'] .mobile-nav { background: rgba(255, 255, 255, 0.94); }
  .mobile-nav button {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
    background: none; border: 0; color: var(--text-mute); font-size: 10.5px; padding: 5px 0; cursor: pointer;
  }
  .mobile-nav button.active { color: var(--tone-accent); }
  .mobile-nav .nav-icon { font-size: 17px; }
  .mobile-top { display: flex; }
  .hero { padding: 20px; }
  .countdown { width: 100%; text-align: left; margin: 12px 0 0; }
  .post-detail-title { font-size: 18px; }
  .row { flex-direction: column; }
  .row > * { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
[data-motion='reduce'] * { animation: none !important; transition: none !important; }

/* 加载骨架 */
.skeleton {
  border-radius: var(--radius); background: linear-gradient(90deg, var(--surface), var(--surface-strong), var(--surface));
  background-size: 200% 100%; animation: shimmer 1.2s infinite;
}
@keyframes shimmer { to { background-position: -200% 0; } }

.login-hero { display: flex; flex-direction: column; gap: 4px; margin-bottom: 20px; }
.login-hero .mark { font-size: 12px; letter-spacing: 2px; color: var(--tone-accent); }

/* ===== 内容审核 ===== */
.review-item {
  padding: 14px; border-radius: var(--radius); border: 1px solid var(--border);
  background: var(--surface); margin-bottom: 10px;
}
.review-body {
  font-size: 13.5px; line-height: 1.8; color: var(--text-dim);
  white-space: pre-wrap; word-break: break-word;
  max-height: 180px; overflow: auto;
  padding: 10px 12px; border-radius: 10px;
  background: rgba(0, 0, 0, 0.12);
}
[data-theme='light'] .review-body { background: rgba(16, 29, 71, 0.04); }
/* ===== 导航图标（设计集 WE1-navigation-icons） ===== */
.we1-icon {
  display: inline-block; width: 20px; height: 20px; flex: none;
  vertical-align: middle; color: inherit;
  transition: color .18s var(--ease), transform .18s var(--ease);
}
.we1-icon.sm { width: 18px; height: 18px; }
.we1-icon.xs { width: 16px; height: 16px; }
.we1-icon.lg { width: 22px; height: 22px; }
.nav-item .we1-icon { color: var(--text-mute); }
.nav-item:hover .we1-icon { color: var(--text-dim); }
.nav-item.active .we1-icon { color: var(--tone-accent); }
.mobile-nav button .we1-icon { color: var(--text-mute); }
.mobile-nav button.active .we1-icon { color: var(--tone-accent); }
.card-title .we1-icon { color: var(--text-dim); margin-right: 2px; }
.btn .we1-icon { color: currentColor; }
/* ===== 邀请好友 ===== */
.invite-hero .card-title { margin-bottom: 10px; }
.invite-code-row {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 12px; border-radius: var(--radius); border: 1px solid var(--border);
  background: var(--surface); margin-bottom: 8px;
}
.invite-code-main { flex: 1 1 auto; min-width: 160px; }
.invite-code {
  display: inline-block; font-size: 15px; font-weight: 700; letter-spacing: 1px;
  padding: 3px 10px; border-radius: 8px; margin-bottom: 4px;
  background: rgba(154, 170, 255, 0.16); color: var(--tone-accent);
}
.invite-code-actions { display: flex; gap: 6px; flex-wrap: wrap; }
/* ===== 下拉框：统一外观，自绘箭头 ===== */
select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 34px;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' fill='none' stroke='%236b7694' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 11px 8px;
}
[data-theme='dark'] select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' fill='none' stroke='%23aab6d6' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
select option { background: #131c33; color: var(--text); }
[data-theme='light'] select option { background: #ffffff; color: #1a2340; }
select:hover { border-color: rgba(154, 170, 255, 0.45); }

/* 表格里的紧凑下拉 */
.select-mini {
  width: auto; min-width: 104px;
  padding: 5px 26px 5px 9px;
  font-size: 12px; line-height: 1.6;
  border-radius: 9px;
  border: 1px solid var(--border);
  background-color: rgba(154, 170, 255, 0.10);
  color: var(--text);
  background-position: right 8px center;
  background-size: 10px 7px;
}
[data-theme='light'] .select-mini { background-color: rgba(16, 29, 71, 0.05); }
.select-mini:focus {
  outline: none;
  border-color: rgba(154, 170, 255, 0.65);
  box-shadow: 0 0 0 3px rgba(154, 170, 255, 0.16);
}