/* ============================================================
   校园论坛 · 样式表
   默认浅色，可切换深色（data-theme="dark"）
   ============================================================ */

:root {
  --font: -apple-system, BlinkMacSystemFont, "SF Pro SC", "PingFang SC",
          "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif,
          "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji";

  --bg: #f4f4f7;
  --page-bg: #ffffff;
  --bg-soft: #ececf2;
  --card: #ffffff;
  --card-2: #f7f7fa;
  --chip-strong: #ffffff;

  --text: #14131a;
  --text-2: #55545f;
  --muted: #9796a3;
  --muted-2: #b6b5c1;

  --line: rgba(17, 16, 24, .07);
  --line-strong: rgba(17, 16, 24, .12);

  --accent: #ff3554;
  --accent-2: #ff6b4a;
  --accent-soft: rgba(255, 53, 84, .10);
  --accent-line: rgba(255, 53, 84, .22);
  --me-bubble-bg: #ffe7eb;
  --me-bubble-text: #d91f3d;

  --green: #12a06a;
  --green-soft: #e6f8ef;
  --amber: #e08a1e;
  --amber-soft: #fdf3e3;
  --blue: #2b78f6;
  --blue-soft: #eaf2ff;
  --purple: #6b4de6;
  --purple-soft: #f0ecff;

  --nav-bg: rgba(255, 255, 255, .86);
  --seg-bg: #f1f1f6;
  --seg-active: #ffffff;
  --shadow: 0 6px 20px rgba(20, 20, 40, .05);
  --shadow-lg: 0 18px 50px rgba(20, 20, 40, .12);
  --radius: 20px;

  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}

[data-theme="dark"] {
  --bg: #08080a;
  --page-bg: #08080a;
  --bg-soft: #101014;
  --card: #141318;
  --card-2: #1b1a20;
  --chip-strong: #232229;

  --text: #f4f3f7;
  --text-2: #bcbac5;
  --muted: #83818d;
  --muted-2: #5f5d68;

  --line: rgba(255, 255, 255, .07);
  --line-strong: rgba(255, 255, 255, .14);

  --accent: #ff4059;
  --accent-2: #ff7a52;
  --accent-soft: rgba(255, 64, 89, .14);
  --accent-line: rgba(255, 64, 89, .26);
  --me-bubble-bg: rgba(255, 64, 89, .16);
  --me-bubble-text: #ff8a99;

  --green: #2fbf8b;
  --green-soft: rgba(47, 191, 139, .14);
  --amber: #e9a13c;
  --amber-soft: rgba(233, 161, 60, .14);
  --blue: #5b9bff;
  --blue-soft: rgba(91, 155, 255, .14);
  --purple: #a48bff;
  --purple-soft: rgba(164, 139, 255, .16);

  --nav-bg: rgba(10, 10, 13, .9);
  --seg-bg: #141318;
  --seg-active: #26252d;
  --shadow: 0 8px 24px rgba(0, 0, 0, .45);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, .6);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body { margin: 0; padding: 0; }

body {
  font-family: var(--font);
  background: var(--page-bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  transition: background .28s ease, color .28s ease;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; font-size: 15px; color: var(--text); }
h1, h2, h3, h4, p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
.grow { flex: 1; }
.ic { flex: none; display: inline-block; vertical-align: middle; }
::selection { background: var(--accent-soft); }

/* 滚动条 */
::-webkit-scrollbar { width: 0; height: 0; }

.app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--page-bg);
  padding-bottom: calc(78px + var(--safe-b));
  position: relative;
  overflow-x: hidden;
}

@media (min-width: 560px) {
  body {
    background: var(--bg-soft);
  }
  .app {
    box-shadow: 0 0 0 1px var(--line), 0 30px 80px rgba(20, 20, 40, .1);
  }
  [data-theme="dark"] body {
    background: #040405;
  }
}

/* ============================ 顶部栏 ============================ */

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 10px;
  height: calc(58px + var(--safe-t));
  padding: var(--safe-t) 12px 0 10px;
  background: rgba(255, 255, 255, .72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
}
[data-theme="dark"] .topbar { background: rgba(10, 10, 13, .72); }

.topbar-title {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -.2px;
}

.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 6px; }

.topbar-slim { height: calc(52px + var(--safe-t)); padding-top: var(--safe-t); }

.searchbar {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
  min-width: 0;
}
.searchbar input {
  border: 0;
  background: none;
  outline: none;
  flex: 1;
  min-width: 0;
  font-size: 14.5px;
}
.searchbar input::placeholder { color: var(--muted); }

.top-search { padding: 10px 18px 0; }
.top-search .searchbar { width: 100%; }

#searchModal .modal-mask { background: transparent; backdrop-filter: none; }
#searchModal .modal-card { background: transparent; box-shadow: none; }

.icon-btn {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: var(--card);
  color: var(--text);
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  transition: transform .16s ease, background .2s ease;
}
.icon-btn:active { transform: scale(.92); }
.icon-btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.icon-btn.ghost:hover { color: var(--text); background: var(--card-2); }
.icon-btn.solid { background: var(--accent); color: #fff; border-color: transparent; }
.icon-btn.round { box-shadow: var(--shadow); }

/* ============================ 标签 ============================ */

.tabs {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 2px 18px 8px;
  overflow-x: auto;
}
.tabs a {
  position: relative;
  font-size: 15.5px;
  color: var(--muted);
  padding: 6px 0 8px;
  font-weight: 500;
  white-space: nowrap;
  transition: color .2s;
}
.tabs a.on { color: var(--text); font-weight: 800; }
.tabs a.on::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 20px;
  height: 3px;
  border-radius: 3px;
  background: var(--accent);
}

/* 胶囊式标签（消息页） */
.pills {
  display: flex;
  gap: 5px;
  margin: 12px 16px 12px;
  padding: 5px;
  border-radius: 16px;
  background: var(--card-2);
  border: 1px solid var(--line);
  box-shadow: inset 0 1px 2px rgba(20, 20, 40, .03);
}
.pills a {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  text-align: center;
  font-size: 13.5px;
  color: var(--muted);
  padding: 8px 0;
  border-radius: 11px;
  font-weight: 500;
  transition: background .2s, color .2s, box-shadow .2s, transform .2s;
}
.pills a:active { background: var(--card-2); }
.pills a.on {
  background: linear-gradient(165deg, var(--card) 0%, var(--card-2) 130%);
  color: var(--text);
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(20, 20, 40, .07), 0 6px 16px rgba(20, 20, 40, .10);
}

/* 分段控件（后台用户页） */
.seg {
  display: flex;
  gap: 4px;
  padding: 4px;
  margin: 0 16px 12px;
  border-radius: 16px;
  background: var(--seg-bg);
  border: 1px solid var(--line);
}
.seg a {
  flex: 1;
  text-align: center;
  padding: 10px 0;
  border-radius: 12px;
  font-size: 13.5px;
  color: var(--muted);
  font-weight: 500;
  transition: all .18s;
}
.seg a.on {
  background: var(--seg-active);
  color: var(--text);
  font-weight: 800;
  box-shadow: 0 2px 10px rgba(20, 20, 40, .1);
}

/* ============================ 轮播 ============================ */

.banners {
  display: flex;
  gap: 12px;
  padding: 4px 16px 0;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.banner {
  position: relative;
  flex: 0 0 88%;
  height: 176px;
  border-radius: 22px;
  overflow: hidden;
  scroll-snap-align: center;
  background: #1a1026;
  box-shadow: var(--shadow);
  isolation: isolate;
}
.banner img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}
.banner::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(0, 0, 0, .05) 20%, rgba(0, 0, 0, .68) 100%);
}
.banner-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 11.5px;
  color: #fff;
  background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .22);
  backdrop-filter: blur(8px);
}
.banner-body {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 26px;
  color: #fff;
}
.banner-title {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -.3px;
  text-shadow: 0 2px 16px rgba(0, 0, 0, .35);
}
.banner-sub {
  margin-top: 4px;
  font-size: 12.5px;
  color: rgba(255, 255, 255, .78);
}
.dots {
  display: flex;
  justify-content: center;
  gap: 5px;
  padding: 9px 0 4px;
}
.dots i {
  width: 5px;
  height: 5px;
  border-radius: 99px;
  background: var(--muted-2);
  transition: all .25s;
}
.dots i.on { width: 16px; background: var(--accent); }

/* ============================ 帖子卡片 ============================ */

.feed { padding: 8px 0 4px; }

.post {
  margin: 0 16px 10px;
  padding: 14px 16px 6px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  animation: rise .42s cubic-bezier(.22, .8, .3, 1) both;
}
.post:nth-child(1) { animation-delay: .02s; }
.post:nth-child(2) { animation-delay: .06s; }
.post:nth-child(3) { animation-delay: .1s; }
.post:nth-child(4) { animation-delay: .14s; }

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

.post-wall {
  background:
    radial-gradient(120% 90% at 100% 0%, var(--accent-soft), transparent 55%),
    var(--card);
  border-color: var(--accent-line);
}

.post-head {
  display: flex;
  align-items: center;
  gap: 10px;
}
.post-who {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}
.post-who-text { min-width: 0; display: block; }
.pname {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 15.5px;
  font-weight: 700;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pmeta {
  display: block;
  margin-top: 2px;
  font-size: 11.5px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wall-flag, .pin-flag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10.5px;
  padding: 4px 8px;
  border-radius: 999px;
  white-space: nowrap;
}
.wall-flag { color: var(--accent); background: var(--accent-soft); }
.pin-flag { color: var(--amber); background: var(--amber-soft); }

.post-main { display: block; }
.post-title {
  margin: 8px 0 4px;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.4;
  letter-spacing: -.25px;
}
.post-text {
  margin: 6px 0 0;
  font-size: 15.5px;
  font-weight: 500;
  line-height: 1.6;
  color: var(--text);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow-wrap: anywhere;
}

.post-imgs {
  display: grid;
  gap: 5px;
  margin-top: 8px;
  border-radius: 16px;
  overflow: hidden;
}
.post-imgs img { width: 100%; height: 100%; object-fit: cover; background: var(--card-2); }
.imgs-1 { grid-template-columns: 1fr; }
.imgs-1 img { height: 188px; }
.imgs-2 { grid-template-columns: 1fr 1fr; }
.imgs-2 img { height: 132px; }
.imgs-3 { grid-template-columns: 1fr 1fr; grid-template-rows: 128px 64px; }
.imgs-3 img:first-child { grid-column: 1 / -1; }

.post-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  margin: 8px -8px 0;
}
.act {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 8px;
  border: 0;
  border-radius: 12px;
  background: none;
  color: var(--muted);
  font-size: 13px;
  transition: background .18s, color .18s, transform .18s;
}
.act:hover { background: var(--card-2); color: var(--text); }
.act:active { transform: scale(.94); }
.act.on { color: var(--accent); }
.act.on svg { fill: currentColor; }
.act.star.on { color: #f2a71b; }
.act.like.on { color: #ff2d55; }
.act.like.on svg { fill: currentColor; }
.act.star.on svg { fill: currentColor; }
.act.danger:hover { color: #e5484d; }
.act.danger { margin-right: 4px; }

/* ============================ 底部导航 ============================ */

.tabbar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  height: calc(64px + var(--safe-b));
  padding-bottom: var(--safe-b);
  display: flex;
  align-items: stretch;
  background: var(--nav-bg);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-top: 1px solid var(--line);
  z-index: 40;
}
.tab {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 10.5px;
  color: var(--muted);
  padding-top: 6px;
  transition: color .2s;
}
.tab.on { color: var(--accent); font-weight: 700; }
.tab.on svg { filter: drop-shadow(0 4px 10px rgba(255, 53, 84, .28)); }
.tab-dot {
  position: absolute;
  top: 12px;
  left: 56%;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
.tab-plus { flex: 1; }
.plus-btn {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  margin-top: -24px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(140deg, #ff5b6e, #ff2748);
  box-shadow: 0 10px 24px rgba(255, 53, 84, .42), 0 0 0 4px var(--bg);
  transition: transform .18s ease;
}
.plus-btn:active { transform: scale(.94); }

/* ============================ 抽屉 ============================ */

.drawer {
  position: fixed;
  inset: 0;
  z-index: 80;
  visibility: hidden;
}
.drawer.open { visibility: visible; }
.drawer-mask {
  position: absolute;
  inset: 0;
  background: rgba(8, 8, 12, .45);
  backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity .3s ease;
}
.drawer.open .drawer-mask { opacity: 1; }

.drawer-panel {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 85%;
  max-width: 344px;
  padding: calc(14px + var(--safe-t)) 18px calc(24px + var(--safe-b));
  overflow-y: auto;
  background:
    radial-gradient(120% 42% at 0% 0%, var(--accent-soft), transparent 62%),
    var(--bg);
  border-right: 1px solid var(--line);
  transform: translateX(-102%);
  transition: transform .34s cubic-bezier(.22, .82, .28, 1);
  box-shadow: 24px 0 60px rgba(0, 0, 0, .18);
}
.drawer.open .drawer-panel { transform: none; }

.drawer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0 14px;
}
.drawer-brand { font-size: 20px; font-weight: 800; letter-spacing: -.4px; }

.drawer-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 18px;
  background: var(--card);
  border: 1px solid var(--accent-line);
  box-shadow: var(--shadow);
}
.drawer-profile.guest { border-color: var(--line); }
.dp-name { font-size: 17px; font-weight: 800; }
.dp-meta { margin-top: 3px; font-size: 12px; color: var(--muted); }
.dp-info { min-width: 0; }

.drawer-section {
  margin: 22px 0 8px;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: .4px;
}
.drawer-menu { display: grid; }
.drawer-menu a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 4px;
  font-size: 15px;
  color: var(--text-2);
  border-radius: 12px;
  transition: color .18s, background .18s;
}
.drawer-menu a:hover { color: var(--text); background: var(--card); }
.drawer-menu svg { color: var(--muted); }

.drawer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 4px;
  font-size: 15px;
  color: var(--text-2);
}
.dr-label { display: flex; align-items: center; gap: 14px; }
.dr-label svg { color: var(--muted); }

.switch {
  width: 46px;
  height: 27px;
  border-radius: 999px;
  border: 0;
  padding: 3px;
  background: var(--line-strong);
  position: relative;
  transition: background .24s;
}
.switch i {
  display: block;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .22);
  transition: transform .24s cubic-bezier(.3, .9, .3, 1.1);
}
.switch.on { background: linear-gradient(135deg, #ff5b6e, #ff2748); }
.switch.on i { transform: translateX(19px); }

.drawer-foot {
  margin-top: 26px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 4px;
}
.drawer-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 4px;
  font-size: 14px;
  color: var(--muted);
}
.drawer-link.danger { color: var(--accent); }

/* ============================ 通用组件 ============================ */

.avatar {
  border-radius: 50%;
  object-fit: cover;
  flex: none;
  background: var(--card-2);
}
.avatar-letter {
  display: inline-grid;
  place-items: center;
  color: #fff;
  font-weight: 700;
  letter-spacing: 0;
  overflow: hidden;
  user-select: none;
}
/* 匿名头像 */
.avatar-anon {
  display: inline-grid;
  place-items: center;
  flex: none;
  color: #fff;
  background: linear-gradient(135deg, #9aa3af, #6b7280);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 10.5px;
  font-style: normal;
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
}
.role-admin { background: var(--purple-soft); color: var(--purple); }
.chip.role-admin{height:15px;padding:0 5px;margin-left:4px;border-radius:5px;font-size:9.5px;font-weight:800;letter-spacing:.4px;line-height:1;vertical-align:2px}
.chip.group-owner{height:15px;padding:0 5px;margin-left:4px;border-radius:5px;font-size:9.5px;font-weight:800;letter-spacing:.4px;line-height:1;vertical-align:2px;background:var(--amber-soft);color:var(--amber)}
.role-teacher { background: var(--blue-soft); color: var(--blue); }
.role-student { background: var(--card-2); color: var(--muted); }
.chip-lv { background: var(--amber-soft); color: var(--amber); font-weight: 700; }
.chip-anon { background: #eef0f4; color: #6b7280; font-weight: 600; }
.chip-anon .ic { stroke-width: 2; }

.badge-normal { background: var(--green-soft); color: var(--green); }
.badge-frozen { background: rgba(229, 72, 77, .12); color: #e5484d; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 44px;
  padding: 0 18px;
  border-radius: 14px;
  border: 1px solid transparent;
  font-size: 14.5px;
  font-weight: 700;
  background: var(--card-2);
  color: var(--text);
  transition: transform .16s, filter .2s, background .2s;
}
.btn:active { transform: scale(.97); }
.btn-primary {
  background: linear-gradient(135deg, #ff5b6e, #ff2748);
  color: #fff;
  box-shadow: 0 6px 16px rgba(255, 53, 84, .24);
}
.btn-soft { background: var(--accent-soft); color: var(--accent); }
.btn-plain { background: var(--card); border-color: var(--line); }
.btn-sm { height: 36px; padding: 0 13px; font-size: 13px; border-radius: 11px; }
.btn-block { width: 100%; }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--text-2); }
.btn[disabled] { opacity: .5; pointer-events: none; }

.link { color: var(--accent); font-weight: 600; }

.field {
  display: block;
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border-radius: 13px;
  border: 1px solid var(--line);
  background: var(--card);
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.field:focus { border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-soft); }
textarea.field { height: auto; padding: 12px 14px; line-height: 1.65; resize: vertical; }

.field-search {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 46px;
  padding: 0 14px;
  margin: 0 16px;
  border-radius: 14px;
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--muted);
}
.field-search input {
  flex: 1;
  border: 0;
  background: none;
  outline: none;
  font-size: 14.5px;
}
.field-search input::placeholder { color: var(--muted); }

.empty {
  padding: 60px 24px;
  text-align: center;
  color: var(--muted);
}
.empty-ic {
  width: 62px;
  height: 62px;
  margin: 0 auto 14px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--muted-2);
}
.empty-title { font-size: 15px; font-weight: 600; color: var(--text-2); }
.empty-desc { margin-top: 6px; font-size: 12.5px; }

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 18px 8px;
}
.section-title { font-size: 16px; font-weight: 800; letter-spacing: -.2px; }
.section-more { font-size: 12.5px; color: var(--muted); display: inline-flex; align-items: center; gap: 2px; }

/* 提示条 */
.notice-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 16px 10px;
  padding: 10px 13px;
  border-radius: 13px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12.5px;
  line-height: 1.5;
}
.announce-bar {
  margin: 10px 16px 10px;
  padding: 11px 14px;
  border-radius: 16px;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  color: var(--text-2);
  font-size: 13px;
  line-height: 1.5;
}
.announce-bar .announce-icon {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-soft);
  color: var(--accent);
}
.announce-bar .announce-text { flex: 1; min-width: 0; }
@media (min-width: 1024px) {
  .announce-bar { margin-left: 36px; margin-right: 36px; }
}

/* Toast */
.toast-wrap {
  position: fixed;
  left: 50%;
  bottom: calc(96px + var(--safe-b));
  transform: translateX(-50%);
  z-index: 200;
  display: grid;
  gap: 8px;
  width: max-content;
  max-width: 86vw;
  pointer-events: none;
}
.toast {
  padding: 11px 18px;
  border-radius: 999px;
  background: rgba(20, 19, 26, .92);
  color: #fff;
  font-size: 13.5px;
  text-align: center;
  animation: toastIn .26s ease both;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .3);
}
[data-theme="dark"] .toast { background: rgba(240, 240, 245, .94); color: #14131a; }
.toast.out { animation: toastOut .24s ease both; }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px) scale(.96); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(6px) scale(.97); } }

/* 图片查看 */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(0, 0, 0, .92);
  display: none;
  place-items: center;
  padding: 20px;
}
.lightbox.open { display: grid; }
.lightbox img { max-width: 100%; max-height: 86vh; border-radius: 12px; object-fit: contain; }

/* 弹层 */
.modal {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: none;
  align-items: flex-end;
  justify-content: center;
}
.modal.open { display: flex; }
.modal-mask {
  position: absolute;
  inset: 0;
  background: rgba(8, 8, 12, .48);
  backdrop-filter: blur(3px);
}
.modal-card {
  position: relative;
  width: 100%;
  max-width: 480px;
  background: var(--bg);
  border-radius: 24px 24px 0 0;
  padding: 20px 18px calc(20px + var(--safe-b));
  animation: sheetUp .3s cubic-bezier(.22, .85, .3, 1) both;
  max-height: 88vh;
  overflow-y: auto;
}
@keyframes sheetUp { from { transform: translateY(100%); } }
.modal.top { align-items: flex-start; }
.modal.top .modal-card {
  width: 100%;
  margin: 0;
  padding: calc(10px + var(--safe-t)) 16px 14px;
  border-radius: 0 0 18px 18px;
  background: var(--card);
  box-shadow: 0 12px 30px rgba(20, 20, 40, .12);
  animation: sheetDown .3s cubic-bezier(.22, .85, .3, 1) both;
}
.modal.top .modal-title { display: none; }
.modal.top .modal-form { display: flex; align-items: center; gap: 10px; }
.modal.top .field-search { flex: 1; margin: 0; height: 40px; border-radius: 12px; }
.modal.top .btn-primary { width: auto; height: 40px; padding: 0 16px; border-radius: 12px; box-shadow: none; }
@keyframes sheetDown { from { transform: translateY(-100%); } }
.modal-title { font-size: 18px; font-weight: 800; margin-bottom: 14px; }
.modal-form { display: grid; gap: 12px; }
.form-row > label { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }

/* ============================ 板块 ============================ */

.board-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 8px 16px 4px;
}
.board-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 14px 14px 12px;
  border-radius: 18px;
  background:
    radial-gradient(85% 75% at 10% 8%, color-mix(in srgb, var(--bc, var(--accent)) 10%, transparent), transparent 62%),
    radial-gradient(75% 65% at 94% 16%, color-mix(in srgb, var(--bc, var(--accent)) 7%, transparent), transparent 60%),
    var(--card);
  border: 1px solid var(--line);
  box-shadow: 0 1px 2px rgba(20, 20, 40, .04), 0 10px 26px rgba(20, 20, 40, .07);
  overflow: hidden;
  transition: transform .25s cubic-bezier(.22, .8, .3, 1), box-shadow .25s, border-color .25s;
}
.board-card:active {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  box-shadow: 0 2px 6px rgba(20, 20, 40, .06), 0 16px 38px rgba(20, 20, 40, .12);
}
.board-ic {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(150deg, color-mix(in srgb, var(--bc, var(--accent)) 86%, #fff 14%), var(--bc, var(--accent)));
  margin-bottom: 10px;
  box-shadow: 0 8px 18px color-mix(in srgb, var(--bc, #ff3554) 26%, transparent), inset 0 1px 0 rgba(255, 255, 255, .18);
}
.board-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 16px 12px;
  padding: 16px;
  border-radius: 20px;
  background:
    radial-gradient(90% 90% at 8% 10%, color-mix(in srgb, var(--bc, var(--accent)) 10%, transparent), transparent 60%),
    radial-gradient(80% 80% at 96% 20%, color-mix(in srgb, var(--bc, var(--accent)) 6%, transparent), transparent 60%),
    var(--card);
  border: 1px solid var(--line);
  box-shadow: 0 1px 2px rgba(20, 20, 40, .04), 0 10px 26px rgba(20, 20, 40, .07);
}
.board-head-ic { width: 46px; height: 46px; border-radius: 14px; margin: 0; flex: none; }
.board-head-text { min-width: 0; }
.board-head-name { font-size: 17px; font-weight: 800; }
.board-head-desc { margin-top: 2px; font-size: 12px; color: var(--muted); }
.board-name { font-size: 15.5px; font-weight: 800; }
.board-desc {
  margin-top: 2px;
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.board-meta { position: absolute; top: 12px; right: 12px; display: flex; align-items: center; color: var(--muted-2); }

/* ============================ 消息 ============================ */

.msg-list {
  padding: 2px 16px 8px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.msg-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 18px;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: 0 1px 2px rgba(20, 20, 40, .04), 0 10px 26px rgba(20, 20, 40, .07);
  transition: transform .25s cubic-bezier(.22, .8, .3, 1), box-shadow .25s, border-color .25s, background .18s;
}
.msg-item:active {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  background: var(--card-2);
  box-shadow: 0 2px 6px rgba(20, 20, 40, .06), 0 16px 38px rgba(20, 20, 40, .12);
}
.msg-av { position: relative; }
.msg-av .avatar,
.msg-av-img { box-shadow: 0 4px 12px rgba(20, 20, 40, .10); }
.msg-main { flex: 1; min-width: 0; }
.msg-top { display: flex; align-items: center; gap: 6px; }
.msg-name { font-size: 15.5px; font-weight: 700; }
.msg-time { margin-left: auto; font-size: 11px; color: var(--muted-2); }
.msg-preview {
  display: block;
  margin-top: 3px;
  font-size: 13.5px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.msg-pin {
  font-size: 10px;
  font-weight: 700;
  color: var(--amber);
  background: var(--amber-soft);
  border: 1px solid transparent;
  padding: 1px 6px;
  border-radius: 6px;
}
.msg-list .empty-ic {
  background: var(--accent-soft);
  border-color: transparent;
  color: var(--accent);
  box-shadow: 0 10px 24px color-mix(in srgb, var(--accent) 12%, transparent);
}
.unread-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  margin-left: 6px;
}

/* 聊天 */
.chat-page .app { padding-bottom: 0; }
.chat-scroll {
  padding: 12px 16px 100px;
  display: grid;
  gap: 14px;
}
.bubble-row { display: flex; gap: 8px; align-items: flex-end; }
.bubble-row.me { flex-direction: row-reverse; }
.bubble-row > div {
  min-width: 0;
  max-width: 76%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.bubble-row.me > div { align-items: flex-end; }
.bubble {
  display: inline-block;
  width: fit-content;
  max-width: 100%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 14.5px;
  line-height: 1.55;
  background: var(--card-2);
  border: 1px solid var(--line);
  border-bottom-left-radius: 5px;
  word-break: break-word;
}
.bubble-row.me .bubble {
  border-bottom-left-radius: 16px;
  border-bottom-right-radius: 5px;
}
.bubble-time { text-align: center; font-size: 11px; color: var(--muted-2); }
.chat-input {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  display: flex;
  gap: 8px;
  padding: 10px 14px calc(10px + var(--safe-b));
  background: var(--nav-bg);
  backdrop-filter: blur(18px);
  border-top: 1px solid var(--line);
  z-index: 40;
}
.chat-input input {
  flex: 1;
  height: 42px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  padding: 0 16px;
  outline: none;
}

/* ============================ 个人中心 ============================ */

.profile-cover {
  height: 130px;
  background-image: url('../img/me-default-cover.jpg');
  background-size: cover;
  background-position: center bottom;
  background-repeat: no-repeat;
  background-color: #dfeef0;
  position: relative;
}
.profile-cover.has-cover {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.profile-card {
  margin: -46px 16px 0;
  position: relative;
  padding: 16px;
  border-radius: 22px;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.profile-top { display: flex; align-items: center; gap: 12px; }
.profile-top .avatar { border: 3px solid var(--card); margin-top: -42px; }
.profile-top .av-pd { margin-top: -42px; }
.profile-top .av-pd .avatar { margin-top: 0; }
.profile-name { font-size: 20px; font-weight: 800; letter-spacing: -.3px; }
.profile-meta { margin-top: 3px; font-size: 12px; color: var(--muted); }
.profile-bio { margin-top: 10px; font-size: 13.5px; color: var(--text-2); line-height: 1.6; }
.profile-stats {
  display: flex;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.pstat { flex: 1; text-align: center; }
.pstat b { display: block; font-size: 18px; font-weight: 800; }
.pstat span { font-size: 11.5px; color: var(--muted); }

.menu-card {
  margin: 12px 16px;
  border-radius: 18px;
  background: var(--card);
  border: 1px solid var(--line);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  font-size: 14.5px;
  border-bottom: 1px solid var(--line);
}
.menu-item:last-child { border-bottom: 0; }
.menu-item .mi-ic { color: var(--muted); display: grid; place-items: center; }
.menu-item .mi-sub { margin-left: auto; font-size: 12px; color: var(--muted); }
.menu-item > svg:last-child { margin-left: 8px; color: var(--muted-2); flex: none; }
.menu-item:not(:has(.mi-sub)) > svg:last-child { margin-left: auto; }
.menu-item.accent { color: var(--text); }

/* ============================ 登录 ============================ */

.auth-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 40px 26px calc(30px + var(--safe-b));
  background:
    radial-gradient(70% 40% at 20% 0%, rgba(255, 53, 84, .22), transparent 62%),
    radial-gradient(60% 36% at 95% 8%, rgba(110, 80, 255, .18), transparent 60%),
    var(--bg);
  max-width: 480px;
  margin: 0 auto;
}
.auth-logo {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 19px;
  font-weight: 800;
  background: linear-gradient(140deg, #ff6a4d, #ff2748);
  box-shadow: 0 10px 22px rgba(255, 53, 84, .28);
  margin-bottom: 18px;
}
.auth-brand { font-size: 15px; font-weight: 700; color: var(--muted); letter-spacing: 3px; text-transform: uppercase; }

.role-pick {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 46px;
  border-radius: 13px;
  border: 1px solid var(--line);
  background: var(--card);
  font-size: 14px;
  color: var(--muted);
  cursor: pointer;
  transition: all .2s;
}
.role-pick input {
  appearance: none;
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  margin: 0;
  border-radius: 50%;
  border: 1.5px solid var(--line-strong);
  position: relative;
  background: transparent;
}
.role-pick input:checked { border-color: var(--accent); }
.role-pick input:checked::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--accent);
}
.role-pick:has(input:checked) {
  border-color: var(--accent-line);
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
}
.auth-title { margin-top: 26px; font-size: 32px; font-weight: 800; letter-spacing: -1.2px; line-height: 1.2; }
.auth-sub { margin-top: 8px; font-size: 13.5px; color: var(--muted); }
.auth-form { margin-top: 32px; display: grid; gap: 12px; }
.auth-field {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 52px;
  padding: 0 16px;
  border-radius: 16px;
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--muted);
  transition: border-color .2s, box-shadow .2s;
}
.auth-field:focus-within { border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-soft); }
.auth-field input { flex: 1; border: 0; outline: none; background: none; font-size: 15px; }
.auth-field input::placeholder { color: var(--muted-2); }
.auth-foot { margin-top: auto; padding-top: 30px; text-align: center; font-size: 13px; color: var(--muted); }
.auth-alert {
  margin-top: 18px;
  padding: 11px 14px;
  border-radius: 12px;
  font-size: 13px;
  background: rgba(229, 72, 77, .1);
  color: #e5484d;
  line-height: 1.5;
}

/* ============================ 发布页 ============================ */

.compose { padding: 10px 16px calc(96px + var(--safe-b)); }
.compose-board { display: flex; flex-wrap: wrap; gap: 8px; padding: 6px 0 14px; }
.board-pill {
  flex: none;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
  color: var(--muted);
  background: var(--card);
  border: 1px solid var(--line);
}
.board-pill { transition: .16s; }
.board-pill.on {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: var(--accent-line);
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(255, 53, 84, .10);
}
.compose-editor {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 15px 15px 12px;
  box-shadow: 0 1px 2px rgba(20, 20, 40, .04), 0 8px 22px rgba(20, 20, 40, .05);
  margin-bottom: 14px;
}
.title-card {
  margin: 0 0 14px;
  padding: 14px;
  border-radius: 16px;
  background: var(--card);
  border: 1px solid var(--line);
}
.title-card .switch-row { padding: 0; border-bottom: 0; }
.title-card.is-locked { border-color: var(--accent-line); background: var(--accent-soft); }
.title-card.is-locked .switch-row { cursor: not-allowed; }
.compose-title {
  width: 100%;
  border: 0;
  background: none;
  outline: none;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.5;
  padding: 0 0 10px;
  margin-bottom: 10px;
  color: var(--text);
  border-bottom: 1px solid var(--line);
}
.compose-title::placeholder { color: var(--muted); font-weight: 400; }
.compose-text {
  width: 100%;
  height: 112px;
  min-height: 112px;
  border: 0;
  background: none;
  outline: none;
  font-size: 15.5px;
  font-weight: 400;
  line-height: 1.75;
  resize: none;
  padding: 0;
  color: var(--text);
}
.compose-text::placeholder { color: var(--muted); }
.compose-imgs { display: flex; flex-wrap: wrap; gap: 8px; padding: 8px 0; }
.compose-imgs .thumb { position: relative; width: 92px; height: 92px; border-radius: 13px; overflow: hidden; }
.compose-imgs .thumb img { width: 100%; height: 100%; object-fit: cover; }
.upload-tile {
  width: 92px;
  height: 92px;
  border-radius: 13px;
  border: 1px dashed var(--line-strong);
  display: grid;
  place-items: center;
  color: var(--muted);
  background: var(--card);
}
.compose-bar {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: 100%;
  max-width: 480px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px calc(12px + var(--safe-b));
  background: var(--nav-bg);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-top: 1px solid var(--line);
  z-index: 30;
}
.tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 12px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text-2);
  font-size: 13px;
}
.tool-btn.on { color: var(--accent); border-color: var(--accent-line); background: var(--accent-soft); }

/* ============================ 帖子详情 ============================ */

.detail {
  padding: 14px 18px 10px;
}
.detail-title { font-size: 22px; font-weight: 800; line-height: 1.4; letter-spacing: -.4px; }
.detail-text { margin-top: 10px; font-size: 15.5px; line-height: 1.78; color: var(--text); overflow-wrap: anywhere; }
.detail-meta { margin-top: 12px; font-size: 12px; color: var(--muted); display: flex; gap: 10px; align-items: center; }
.detail-imgs { display: grid; gap: 8px; margin-top: 16px; border-radius: 16px; overflow: hidden; }
.detail-imgs img { width: 100%; border-radius: 16px; }
.detail-actions {
  display: flex;
  gap: 10px;
  padding: 14px 18px 16px;
  border-top: 1px solid var(--line);
  margin-top: 18px;
}
.detail-actions .act-like,
.detail-actions .act-comment,
.detail-actions .act-fav {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card-2);
  color: var(--text-2);
  font-size: 13.5px;
  font-weight: 700;
  text-decoration: none;
  transition: background .18s, color .18s, border-color .18s, transform .16s;
}
.detail-actions .act-like:active,
.detail-actions .act-comment:active,
.detail-actions .act-fav:active { transform: scale(.96); }
.detail-actions .act-like.on {
  color: #ff2d55;
  background: var(--accent-soft);
  border-color: rgba(255, 53, 84, .18);
}
.detail-actions .act-like.on svg { fill: currentColor; }
.detail-actions .act-fav.on {
  color: #f2a71b;
  background: var(--amber-soft);
  border-color: rgba(224, 138, 30, .2);
}
.detail-actions .act-fav.on svg { fill: currentColor; }
.comment-section { padding: 8px 18px 20px; }
.comment-title { font-size: 15px; font-weight: 800; margin-bottom: 12px; }
.comment { display: flex; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.comment:last-child { border-bottom: 0; }
.comment:has(+ .reply-list) { border-bottom: 0; }
.comment-body { flex: 1; min-width: 0; }
.comment-name { font-size: 13.5px; font-weight: 700; }
.comment-time { font-size: 11.5px; color: var(--muted-2); font-weight: 400; }
.comment-text { margin-top: 4px; font-size: 14px; color: var(--text-2); line-height: 1.65; overflow-wrap: anywhere; }
.comment-foot { display: flex; align-items: center; gap: 12px; margin-top: 6px; font-size: 12px; color: var(--muted); }
.comment-foot .reply-btn { cursor: pointer; color: var(--muted); }
.foot-right { margin-left: auto; display: inline-flex; align-items: center; gap: 14px; }
.del-btn { color: var(--muted); cursor: pointer; }
.clike-btn { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); background: none; border: 0; cursor: pointer; font-size: 12px; padding: 0; }
.clike-btn.on { color: var(--accent, #f43f5e); }
.clike-btn span { min-width: 12px; }
.comment-reply { padding: 8px 0 8px 44px; border-bottom: 0; }
.comment-reply .comment-name { font-size: 13px; }
.reply-list.folded .comment-reply { display: none; }
.reply-toggle {
  display: inline-flex; align-items: center; gap: 6px; margin: 4px 0 2px 44px;
  font-size: 12.5px; font-weight: 500; color: var(--muted);
  background: none; border: 0; padding: 0; cursor: pointer;
}
.reply-toggle::before { content: ''; width: 14px; height: 1px; background: var(--line); }
.reply-toggle .arrow { transition: transform .2s; display: inline-flex; }
.reply-list:not(.folded) .reply-toggle .arrow { transform: rotate(180deg); }
.reply-to { color: var(--muted-2); font-weight: 400; }
.reply-meta {
  position: absolute; top: -19px; left: 14px; display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--muted); background: var(--card); border: 1px solid var(--line);
  border-radius: 999px; padding: 2px 10px 2px 12px; z-index: 2;
}
.reply-meta b { color: var(--text-2); font-weight: 600; }
.reply-meta button { display: inline-flex; align-items: center; color: var(--muted); cursor: pointer; padding: 0; background: none; border: 0; }

.comment-bar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  display: flex;
  gap: 9px;
  align-items: center;
  padding: 10px 14px calc(10px + var(--safe-b));
  background: var(--nav-bg);
  backdrop-filter: blur(18px);
  border-top: 1px solid var(--line);
  z-index: 30;
}
.comment-field { position: relative; flex: 1; min-width: 0; display: flex; }
.comment-bar > input,
.comment-field input[type="text"] {
  flex: 1;
  width: 100%;
  height: 42px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  padding: 0 16px;
  outline: none;
}
.comment-field input[type="text"].has-anon { padding-right: 78px; }
.comment-bar > input:focus,
.comment-field input[type="text"]:focus { border-color: var(--accent-line); }

/* 匿名开关 */
.anon-toggle {
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  height: 30px;
  padding: 0 10px 0 8px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--muted);
  background: #f1f2f5;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: background .16s, color .16s;
}
.anon-toggle input { position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none; }
.anon-toggle .ic { stroke-width: 1.9; }
.anon-toggle.on { background: rgba(255, 45, 85, .1); color: var(--accent); }
.anon-toggle.on .ic { stroke-width: 2.1; }

/* ============================ 后台 ============================ */

.admin-body {
  background: var(--bg);
  min-height: 100vh;
}
.admin-app {
  max-width: 1080px;
  margin: 0 auto;
  min-height: 100vh;
  padding-bottom: 110px;
  position: relative;
}
.admin-app::before {
  content: "";
  position: fixed;
  inset: 0 auto auto 0;
  width: 100%;
  height: 320px;
  z-index: -1;
  background:
    radial-gradient(50% 100% at 12% 0%, rgba(133, 96, 255, .13), transparent 68%),
    radial-gradient(46% 100% at 88% 0%, rgba(255, 53, 84, .12), transparent 66%);
  pointer-events: none;
}

.admin-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 26px 18px 8px;
}
.admin-title {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -.8px;
}
.admin-sub { margin-top: 5px; font-size: 12.5px; color: var(--muted); }
.admin-actions { display: flex; gap: 9px; padding-top: 4px; }
.super-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(120deg, #8a63ff, #6b4de6);
  box-shadow: 0 6px 14px rgba(107, 77, 230, .28);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 12px 16px 4px;
}
.stat {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 13px;
  border-radius: 16px;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  min-width: 0;
}
.stat-ic {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  flex: none;
  display: grid;
  place-items: center;
  color: #fff;
  box-shadow: 0 6px 14px color-mix(in srgb, var(--sc, #6b4de6) 30%, transparent);
  background: linear-gradient(140deg, color-mix(in srgb, var(--sc, #6b4de6) 82%, #fff), var(--sc, #6b4de6));
}
.stat-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.15;
}
.stat-value { font-size: 23px; font-weight: 800; letter-spacing: -.8px; }
.stat-label { margin-top: 2px; font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.ulist { display: grid; gap: 10px; padding: 4px 16px; grid-template-columns: minmax(0, 1fr); }
.ucard {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  border-radius: 18px;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  transition: transform .16s, box-shadow .2s;
}
.ucard:hover { box-shadow: var(--shadow-lg); }
.ucard-main { flex: 1; min-width: 0; }
.ucard-name { display: flex; align-items: center; gap: 6px; font-size: 16px; font-weight: 700; }
.ucard-meta { margin-top: 4px; font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ucard-status { flex: none; }
.ucard-tools { display: flex; gap: 6px; margin-top: 0; }

.admin-count-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 18px 8px;
}
.admin-count { font-size: 12.5px; color: var(--muted); }
.admin-count b { color: var(--text); font-weight: 700; }

.admin-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 1080px;
  height: calc(62px + var(--safe-b));
  padding-bottom: var(--safe-b);
  display: flex;
  background: var(--nav-bg);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--line);
  z-index: 40;
}
.anav {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 10px;
  color: var(--muted);
}
.anav.on { color: var(--accent); font-weight: 700; }

.admin-card {
  margin: 12px 16px;
  border-radius: 20px;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.admin-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 16px 10px;
}
.admin-card-title { font-size: 15px; font-weight: 800; }

.list-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  border-top: 1px solid var(--line);
}
.list-row:first-child { border-top: 0; }
.list-row-main { flex: 1; min-width: 0; display: block; }
.list-row-title { display: block; font-size: 14.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-row-meta { display: block; margin-top: 3px; font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.admin-search { margin: 0 16px 4px; }

.admin-toolbar {
  display: flex;
  gap: 8px;
  padding: 8px 16px;
  overflow-x: auto;
}
.admin-toolbar .btn { flex: none; }

/* 后台登录提示 */
.lock-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.lock-card {
  max-width: 360px;
  width: 100%;
  padding: 28px;
  border-radius: 24px;
  background: var(--card);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--line);
  text-align: center;
}

/* ============================ 响应式 ============================ */

@media (min-width: 760px) {
  .admin-app { padding-bottom: 120px; }
  .admin-head { padding: 34px 26px 10px; }
  .stat-grid { grid-template-columns: repeat(3, 1fr); gap: 14px; padding: 14px 24px 6px; }
  .ulist { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); padding: 4px 24px; }
  .admin-search, .seg, .admin-toolbar { margin-left: 24px; margin-right: 24px; }
  .admin-count-row { padding: 16px 26px 8px; }
  .admin-card { margin: 12px 24px; }
  .admin-nav {
    width: auto;
    max-width: none;
    height: auto;
    bottom: 20px;
    padding: 7px;
    border-radius: 999px;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-lg);
    gap: 2px;
  }
  .anav {
    flex: none;
    flex-direction: row;
    gap: 7px;
    padding: 10px 16px;
    border-radius: 999px;
    font-size: 12.5px;
  }
  .anav.on { background: var(--accent-soft); }
  .topbar-slim { max-width: 480px; margin: 0 auto; }
}

@media (max-width: 360px) {
  .post { margin-left: 12px; margin-right: 12px; }
  .admin-title { font-size: 23px; }
  .stat-value { font-size: 26px; }
}

/* 减少动效 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* ============================================================
   V2 改造：抽屉收窄 / 单图轮播 / 九宫格 / 聊天媒体 / 后台侧栏 / 双端自适应
   ============================================================ */

:root { --side-w: 0px; --content-w: 480px; }

[hidden] { display: none !important; }

/* ---------------- 侧边抽屉（收窄一半） ---------------- */
.drawer-panel {
  width: 62%;
  max-width: 268px;
  padding: 12px 14px calc(20px + var(--safe-b));
}
.drawer-top { padding: 2px 0 12px; }
.drawer-brand { font-size: 16px; }
.drawer-profile { padding: 10px; gap: 10px; border-radius: 15px; }
.dp-name { font-size: 15px; }
.dp-meta { font-size: 11px; margin-top: 2px; }
.drawer-section { margin: 16px 0 4px; font-size: 11px; }
.drawer-menu a { padding: 9px 2px; font-size: 13.5px; gap: 10px; }
.drawer-menu a svg { width: 18px; height: 18px; }
.drawer-row { padding: 9px 2px; font-size: 13.5px; }
.dr-label { gap: 10px; }
.drawer-row .switch { width: 40px; height: 24px; padding: 2px; }
.drawer-row .switch i { width: 20px; height: 20px; }
.drawer-row .switch.on i { transform: translateX(16px); }
.drawer-foot { margin-top: 16px; padding-top: 10px; }
.drawer-link { font-size: 12.5px; padding: 10px 2px; }

/* ---------------- 轮播（单张可见 + 3 秒自动切换） ---------------- */
.carousel { position: relative; padding: 4px 16px 0; }
.banners {
  display: flex;
  gap: 0;
  padding: 0;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
}
.carousel .dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 10px;
  display: flex;
  justify-content: center;
  gap: 5px;
  padding: 0;
  z-index: 4;
}
.banners::-webkit-scrollbar { display: none; }
.banner { flex: 0 0 100%; scroll-snap-align: start; }
.banner:active { transform: none; }
.dots { cursor: pointer; }
.dots i { cursor: pointer; background: rgba(255, 255, 255, .55); box-shadow: 0 1px 4px rgba(0, 0, 0, .25); }
.dots i.on { width: 16px; background: var(--accent); }

/* ---------------- 九宫格图片 ---------------- */
.imgs-grid { display: grid; gap: 5px; margin-top: 10px; border-radius: 14px; overflow: hidden; }
.imgs-grid img { width: 100%; height: 100%; object-fit: cover; background: var(--card-2); display: block; }
.imgs-n1 { grid-template-columns: 1fr; }
.post-imgs.imgs-n1 img { height: 150px; aspect-ratio: auto; }
.imgs-n2 { grid-template-columns: 1fr 1fr; }
.imgs-n2 img { height: 140px; }
.imgs-n3, .imgs-n5, .imgs-n6, .imgs-n7, .imgs-n8, .imgs-n9 { grid-template-columns: repeat(3, 1fr); }
.imgs-n3 img, .imgs-n5 img, .imgs-n6 img, .imgs-n7 img, .imgs-n8 img, .imgs-n9 img { aspect-ratio: 1 / 1; height: auto; }
.imgs-n4 { grid-template-columns: 1fr 1fr; }
.imgs-n4 img { aspect-ratio: 1 / 1; height: auto; }

.detail-imgs.imgs-grid { gap: 6px; }
.detail-imgs.imgs-grid img { height: auto; border-radius: 0; }
.detail-imgs.imgs-n1 img { border-radius: 16px; }
.detail-video {
  width: 100%;
  margin-top: 14px;
  border-radius: 16px;
  background: #000;
  max-height: 70vh;
}

.post-video {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 12px 14px;
  border-radius: 13px;
  background: linear-gradient(135deg, rgba(255, 53, 84, .1), rgba(124, 92, 255, .12));
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
}
.post-pending { border-style: dashed; opacity: .92; }

/* ---------------- 发布页 ---------------- */
.compose-media {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px 14px 12px;
  margin-bottom: 14px;
  box-shadow: 0 1px 2px rgba(20, 20, 40, .04), 0 8px 22px rgba(20, 20, 40, .05);
}
.compose-imgs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 0;
  margin-top: 10px;
}
.compose-imgs .thumb,
.compose-imgs .upload-tile {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  overflow: hidden;
}
.compose-imgs .thumb img { width: 100%; height: 100%; object-fit: cover; }
.attach-row { display: flex; gap: 8px; margin-top: 12px; }
.attach-tile {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 13px 14px;
  border: 1.5px dashed var(--line-strong);
  border-radius: 13px;
  background: var(--card);
  color: var(--muted);
  font-size: 13px;
}
.attach-tile svg { flex: none; }
.attach-txt { display: flex; flex-direction: column; gap: 2px; color: var(--text-2); font-weight: 600; }
.attach-txt em { font-size: 10.5px; color: var(--muted); font-style: normal; font-weight: 400; }
.upload-tile {
  border: 1px dashed var(--line-strong);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--muted);
  background: var(--card);
  font-size: 11px;
}
.upload-tile .upload-hint { font-size: 10.5px; }
.thumb-size {
  position: absolute;
  left: 5px;
  bottom: 5px;
  padding: 1px 5px;
  border-radius: 6px;
  background: rgba(0, 0, 0, .55);
  color: #fff;
  font-size: 9.5px;
  font-style: normal;
}
.thumb-del {
  position: absolute;
  right: 4px;
  top: 4px;
  width: 20px;
  height: 20px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, .55);
  color: #fff;
  font-size: 14px;
  line-height: 1;
  display: grid;
  place-items: center;
}
.compose-tip { margin-top: 8px; font-size: 11.5px; color: var(--muted); }
.compose-video { margin-top: 14px; }
.video-tile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px;
  border-radius: 16px;
  border: 1.5px dashed var(--line-strong);
  background: var(--card);
  color: var(--text-2);
  font-size: 13.5px;
}
.video-tile em { margin-left: auto; font-size: 11px; color: var(--muted); font-style: normal; }
.video-preview { position: relative; margin-top: 10px; }
.video-preview video { width: 100%; border-radius: 14px; background: #000; max-height: 320px; }
.video-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  font-size: 11.5px;
  color: var(--muted);
}
.video-meta b { font-weight: 600; color: var(--text-2); max-width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.video-meta .thumb-del { position: static; margin-left: auto; }
.compose-count { font-size: 12px; color: var(--muted); }

/* ---------------- 个人中心 ---------------- */
.pstat { flex: 1; display: block; text-align: center; color: inherit; border-radius: 12px; padding: 6px 0; transition: background .15s; }
.pstat:active { background: var(--card-2); }
.pstat.on { background: var(--card-2); }
.pstat.on b { color: var(--accent); }
.pstat.on span { color: var(--accent); }

.me-subhead {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 14px 16px 4px;
}
.me-subhead b { font-size: 16.5px; font-weight: 800; letter-spacing: -.2px; }
.me-subback {
  width: 30px;
  height: 30px;
  flex: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--text-2);
}
.me-subback:active { background: var(--card-2); }
.me-subcount { margin-left: auto; font-size: 12px; color: var(--muted); }
.me-tabs {
  display: flex;
  gap: 4px;
  margin: 12px 16px 4px;
  padding: 4px;
  border-radius: 14px;
  background: var(--seg-bg);
  border: 1px solid var(--line);
  overflow-x: auto;
  scrollbar-width: none;
}
.me-tabs::-webkit-scrollbar { display: none; }
.me-tabs a {
  flex: none;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 13px;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}
.me-tabs a.on { background: var(--seg-active); color: var(--text); font-weight: 700; box-shadow: 0 2px 10px rgba(20, 20, 40, .1); }
.me-tabs a i { font-style: normal; font-size: 10.5px; color: var(--muted-2); }

/* ---------------- 聊天：表情 / 语音 / 图片 / 视频 ---------------- */
.chat-page .app { padding-bottom: 0; }
.chat-scroll { padding-bottom: 120px; }
.chat-input.chat-input-rich {
  align-items: flex-end;
  gap: 6px;
  padding: 8px 10px calc(8px + var(--safe-b));
}
.chat-tools { display: flex; align-items: center; gap: 2px; }
.tool-ic {
  width: 34px;
  height: 40px;
  border: 0;
  background: none;
  color: var(--muted);
  display: grid;
  place-items: center;
  border-radius: 10px;
  transition: color .18s, background .18s;
}
.tool-ic:hover { color: var(--text); background: var(--card-2); }
.tool-ic.rec { color: var(--accent); animation: micPulse 1s ease-in-out infinite; }
@keyframes micPulse { 50% { opacity: .45; } }
.chat-input-wrap { flex: 1; position: relative; min-width: 0; }
.chat-input-wrap > input,
.chat-input-rich input[type="text"] {
  width: 100%;
  height: 42px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  padding: 0 16px;
  outline: none;
  flex: none;
}
.chat-input-wrap > input:focus { border-color: var(--accent-line); }
.voice-tip {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  gap: 7px;
  padding-left: 16px;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  color: var(--accent);
  font-size: 13px;
}
.voice-tip i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  animation: micPulse .8s ease-in-out infinite;
}
.chat-send { width: 42px; height: 42px; flex: none; }

.emoji-panel {
  position: fixed;
  left: 50%;
  bottom: calc(70px + var(--safe-b));
  transform: translateX(-50%);
  width: min(calc(100% - 24px), var(--content-w));
  max-height: 210px;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 2px;
  padding: 10px;
  border-radius: 18px;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  z-index: 70;
}
.emoji-panel .emoji {
  border: 0;
  background: none;
  font-size: 21px;
  line-height: 1;
  padding: 6px 0;
  border-radius: 9px;
}
.emoji-panel .emoji:hover { background: var(--card-2); }

.bubble-media { padding: 0; border: 0; background: none; overflow: hidden; border-radius: 14px; }
.bubble-media img { max-width: 210px; max-height: 260px; object-fit: cover; border-radius: 14px; cursor: zoom-in; }
.bubble-video { padding: 0; border: 0; background: none; }
.bubble-video video { max-width: 250px; max-height: 300px; border-radius: 14px; display: block; background: #000; }
.bubble-voice {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  min-width: 150px;
}
.bubble-voice audio { height: 30px; width: 170px; }
.bubble-voice em { font-style: normal; font-size: 11px; opacity: .75; }
.bubble-cap { font-size: 10.5px; color: var(--muted-2); margin: 3px 4px 0; }

.chat-flash {
  position: fixed;
  top: 68px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 90;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(229, 72, 77, .94);
  color: #fff;
  font-size: 12.5px;
  box-shadow: var(--shadow-lg);
  max-width: 90vw;
}
.upload-mask {
  position: fixed;
  inset: 0;
  z-index: 210;
  display: grid;
  place-items: center;
  background: rgba(8, 8, 12, .42);
  backdrop-filter: blur(3px);
}
.upload-box {
  display: grid;
  grid-template-columns: auto auto 1fr;
  align-items: center;
  gap: 6px 10px;
  padding: 15px 20px 14px;
  width: min(260px, 76vw);
  border-radius: 16px;
  background: var(--card);
  color: var(--text);
  font-size: 13.5px;
  box-shadow: var(--shadow-lg);
}
.upload-box .up-label { font-weight: 600; }
.upload-box .up-num {
  margin-left: auto;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
}
.upload-box .up-track {
  grid-column: 1 / -1;
  display: block;
  height: 4px;
  margin-top: 4px;
  border-radius: 99px;
  background: var(--line-strong);
  overflow: hidden;
}
.upload-box .up-track em {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 99px;
  background: var(--accent);
  transition: width .16s linear;
}
.spinner {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--line-strong);
  border-top-color: var(--accent);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------- 桌面侧边导航 ---------------- */
.shell { display: block; }
.sidenav { display: none; }

@media (min-width: 1024px) {
  :root { --side-w: 236px; --content-w: 100%; }

  body.has-chrome { background: var(--bg-soft); }
  .shell { padding-left: var(--side-w); }
  .shell-plain { padding-left: var(--side-w); }
  .shell-plain .app { border-left: 0; border-right: 0; }
  .app {
    max-width: none;
    width: 100%;
    margin: 0;
    min-height: 100vh;
    background: var(--page-bg);
    border-left: 0;
    border-right: 0;
    box-shadow: none;
  }
  .tabbar { display: none; }
  .app { padding-bottom: 40px; }

  .sidenav {
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: var(--side-w);
    padding: 20px 14px;
    background: var(--card);
    border-right: 1px solid var(--line);
    z-index: 50;
    gap: 6px;
  }
  .sn-brand { display: flex; align-items: center; gap: 10px; padding: 0 6px 16px; }
  .sn-logo {
    width: 38px; height: 38px; border-radius: 12px;
    display: grid; place-items: center;
    color: #fff; font-weight: 800; font-size: 16px;
    background: linear-gradient(140deg, #ff6a4d, #ff2748);
    box-shadow: 0 8px 18px rgba(255, 53, 84, .28);
  }
  .sn-brand-text { font-size: 15.5px; font-weight: 800; letter-spacing: -.2px; }
  .sn-nav { display: grid; gap: 2px; }
  .sn-label { margin: 16px 8px 6px; font-size: 11px; color: var(--muted-2); letter-spacing: .5px; }
  .sn-item {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 12px;
    border-radius: 12px;
    font-size: 14px;
    color: var(--text-2);
    border: 0;
    background: none;
    width: 100%;
    text-align: left;
    transition: background .16s, color .16s;
  }
  .sn-item:hover { background: var(--card-2); color: var(--text); }
  .sn-item.on { background: var(--accent-soft); color: var(--accent); font-weight: 700; }
  .sn-item.on svg { color: var(--accent); }
  .sn-dot {
    margin-left: auto;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 99px;
    background: var(--accent);
    color: #fff;
    font-size: 10.5px;
    font-style: normal;
    display: grid;
    place-items: center;
  }
  .sn-publish { margin: 12px 0 2px; }
  .sn-foot { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); display: grid; gap: 2px; }
  .sn-theme .switch { margin-left: auto; }
  .sn-user { display: flex; align-items: center; gap: 10px; padding: 10px 8px; border-radius: 12px; margin-top: 6px; }
  .sn-user:hover { background: var(--card-2); }
  .sn-user-main { display: grid; min-width: 0; }
  .sn-user-main b { font-size: 13.5px; }
  .sn-user-main em { font-style: normal; font-size: 10.5px; color: var(--muted); }
  .sn-badge {
    margin-left: auto;
    background: var(--accent);
    color: #fff;
    font-size: 10px;
    font-style: normal;
    padding: 1px 5px;
    border-radius: 99px;
  }

  /* 固定条跟随内容列 */
  .compose-bar, .chat-input, .comment-bar {
    left: var(--side-w);
    right: 0;
    max-width: none;
    transform: none;
  }
  .toast-wrap { left: calc(var(--side-w) + (100vw - var(--side-w)) / 2); }
  .emoji-panel { left: var(--side-w); right: 12px; max-width: none; transform: none; width: auto; }
  .chat-flash { left: calc(var(--side-w) + (100vw - var(--side-w)) / 2); }
  .tabbar { left: var(--side-w); }

  .board-grid { grid-template-columns: repeat(3, 1fr); padding: 8px 24px; }
  .board-grid > a[style*="grid-column"] { grid-column: 1 / -1 !important; }
  .modal-card { border-radius: 22px; margin-bottom: 12vh; max-width: 560px; }
  .modal { align-items: center; }
  .modal.top { align-items: flex-start; }
  .modal.top .modal-card { border-radius: 0 0 18px 18px; margin: 0; max-width: 480px; }
  @keyframes sheetUp { from { transform: translateY(14px); opacity: 0; } }
  .post-title { font-size: 16px; }
  .detail { padding: 18px 26px; }
  .comment-section { padding: 8px 26px 24px; }
  .profile-cover { height: 150px; }
  .me-tabs, .feed { padding-left: 20px; padding-right: 20px; }
  .carousel { padding: 6px 20px 0; }
  .tabs { padding: 6px 24px 10px; gap: 30px; }
  .section-head { padding: 18px 24px 8px; }
  .pills { margin: 12px 24px 12px; }
  .msg-item { padding: 14px 24px; }
  .me-tabs { margin: 14px 20px 4px; }
  .menu-card { margin: 12px 20px; }

  /* 登录 / 注册页：电脑端背景铺满，表单卡片居中放宽 */
  body:has(.auth-page) {
    min-height: 100vh;
    background:
      radial-gradient(70% 40% at 20% 0%, rgba(255, 53, 84, .22), transparent 62%),
      radial-gradient(60% 36% at 95% 8%, rgba(110, 80, 255, .18), transparent 60%),
      var(--bg-soft);
  }
  .auth-page {
    max-width: 520px;
    min-height: auto;
    margin: 56px auto;
    background: var(--page-bg);
    border: 1px solid var(--line);
    border-radius: 24px;
    box-shadow: 0 30px 80px rgba(20, 20, 40, .10);
    padding: 44px 44px calc(30px + var(--safe-b));
  }
}

/* ---------------- 后台：左侧可收纳侧栏 ---------------- */
.admin-body { background: var(--bg-soft); }
.admin-shell { display: flex; min-height: 100vh; }
.admin-side {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: 244px;
  display: flex;
  flex-direction: column;
  padding: calc(16px + var(--safe-t)) 12px;
  background: var(--card);
  border-right: 1px solid var(--line);
  z-index: 120;
  overflow-y: auto;
  transform: translateX(-100%);
  transition: transform .28s cubic-bezier(.22, .82, .28, 1), width .2s;
}
.admin-side.open { transform: none; box-shadow: 24px 0 60px rgba(0, 0, 0, .18); }
.as-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 4px 14px; }
.as-brand { display: flex; align-items: center; gap: 9px; min-width: 0; }
.as-logo {
  width: 34px; height: 34px; border-radius: 11px; flex: none;
  display: grid; place-items: center;
  color: #fff; font-weight: 800; font-size: 15px;
  background: linear-gradient(140deg, #8a63ff, #6b4de6);
}
.as-brand-text { display: grid; font-size: 13.5px; font-weight: 800; line-height: 1.25; min-width: 0; }
.as-brand-text em { font-style: normal; font-size: 10.5px; font-weight: 500; color: var(--muted); }
.as-collapse {
  width: 32px; height: 32px; flex: none;
  border-radius: 9px; border: 1px solid var(--line);
  background: var(--card); color: var(--muted);
  display: grid; place-items: center;
}
.as-collapse:hover { color: var(--text); background: var(--card-2); }
.as-nav { display: grid; gap: 2px; }
.as-group { margin: 14px 8px 4px; font-size: 10.5px; color: var(--muted-2); letter-spacing: .6px; }
.as-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border-radius: 11px;
  font-size: 13.5px;
  color: var(--text-2);
  border: 0;
  background: none;
  width: 100%;
  text-align: left;
}
.as-item:hover { background: var(--card-2); color: var(--text); }
.as-item.on { background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.as-badge {
  margin-left: auto;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-style: normal;
  padding: 1px 6px;
  border-radius: 99px;
}
.as-foot { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); display: grid; gap: 2px; }
.as-user { display: flex; align-items: center; gap: 9px; padding: 9px 8px; border-radius: 11px; margin-top: 4px; }
.as-user:hover { background: var(--card-2); }
.as-user-main { display: grid; min-width: 0; }
.as-user-main b { font-size: 12.5px; }
.as-user-main em { font-style: normal; font-size: 10px; color: var(--muted); }
.admin-main { flex: 1; min-width: 0; padding-bottom: 40px; }
.admin-mask { display: none; position: fixed; inset: 0; background: rgba(8, 8, 12, .45); z-index: 110; }
.admin-mask.open { display: block; }
.admin-burger { display: inline-grid; }

.admin-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 20px 16px 8px;
  max-width: 1180px;
  margin: 0 auto;
}
.admin-title { display: flex; align-items: center; gap: 8px; font-size: 21px; font-weight: 800; letter-spacing: -.5px; }
.admin-sub { margin-top: 3px; font-size: 12px; color: var(--muted); }
.admin-actions { display: flex; gap: 8px; padding-top: 2px; margin-left: auto; }

.admin-cols { display: grid; gap: 0; grid-template-columns: minmax(0, 1fr); }
.admin-cols > div { min-width: 0; }
.stat { color: inherit; transition: transform .16s, box-shadow .2s; }
.stat:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }

.switch-list { padding: 0 16px 8px; display: grid; }
.switch-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.switch-row:last-child { border-bottom: 0; }
.sr-main { flex: 1; min-width: 0; }
.sr-main b { display: block; font-size: 14px; font-weight: 600; }
.sr-main em { display: block; margin-top: 2px; font-size: 11.5px; color: var(--muted); font-style: normal; line-height: 1.5; }
.switch-row .switch { flex: none; display: inline-block; }
.switch-row input:checked + .switch { background: linear-gradient(135deg, #ff5b6e, #ff2748); }
.switch-row input:checked + .switch i { transform: translateX(19px); }

.review-imgs { display: flex; gap: 6px; flex-wrap: wrap; }
.review-imgs img { width: 72px; height: 72px; object-fit: cover; border-radius: 10px; }
.review-video { max-width: 320px; border-radius: 12px; background: #000; }

@media (max-width: 1023px) {
  .admin-side { width: 250px; }
  .admin-burger { display: inline-grid; }
  .admin-head { padding: 16px 14px 6px; }
  .admin-title { font-size: 19px; }
  .admin-cols { grid-template-columns: 1fr; }
  .stat-grid { padding: 10px 12px 2px; }
  .admin-card { margin: 10px 12px; }
  .ulist { padding: 4px 12px; }
}

@media (min-width: 1024px) {
  .admin-side { transform: none; width: 244px; }
  .admin-mask { display: none; }
  .admin-main { margin-left: 244px; }
  .admin-burger { display: none; }
  .admin-head { padding: 26px 24px 8px; max-width: none; margin: 0; }
  .admin-cols { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 12px; padding: 0 20px; }
  .admin-cols > div > .admin-card { margin-left: 0; margin-right: 0; }
  .stat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding: 14px 20px 6px; max-width: none; margin: 0; }
  .stat-grid:has(.stat-cell) { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .stat { padding: 14px 16px; border-radius: 18px; }
  .stat-ic { width: 42px; height: 42px; border-radius: 13px; }
  .stat-value { font-size: 26px; }
  .ulist { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); padding: 4px 20px; max-width: none; margin: 0; }
  .admin-card { max-width: none; margin: 12px 20px; }
  .admin-cols .admin-card { max-width: none; }
  .admin-count-row, .seg, .admin-search, .admin-toolbar { max-width: none; margin-left: 20px; margin-right: 20px; padding-left: 0; padding-right: 0; }
  .admin-card .list-row { padding-left: 18px; padding-right: 18px; }
  .admin-savebar { margin-left: 20px; margin-right: 20px; }

  html.admin-collapsed .admin-side { width: 72px; }
  html.admin-collapsed .admin-main { margin-left: 72px; }
  html.admin-collapsed .as-brand-text,
  html.admin-collapsed .as-item span,
  html.admin-collapsed .as-group,
  html.admin-collapsed .as-user-main,
  html.admin-collapsed .as-badge { display: none; }
  html.admin-collapsed .as-head { flex-direction: column; gap: 10px; }
  html.admin-collapsed .as-item { justify-content: center; padding: 10px 0; }
  html.admin-collapsed .as-user { justify-content: center; }
  html.admin-collapsed .as-collapse { transform: scaleX(-1); }
}

/* ---------- 后台保存条 ---------- */
.admin-savebar {
  position: sticky;
  bottom: 0;
  z-index: 20;
  margin: 4px 0 8px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 -6px 24px rgba(20, 20, 30, .06);
}
.admin-savebar .asb-hint {
  font-size: 12.5px;
  color: var(--muted);
}
.admin-savebar .btn { height: 40px; padding: 0 22px; }
@media (max-width: 720px) {
  .admin-savebar {
    padding: 10px 12px;
    border-radius: 14px;
    flex-direction: column-reverse;
    align-items: stretch;
  }
  .admin-savebar .asb-hint { text-align: center; }
  .admin-savebar .btn { width: 100%; }

  /* 手机端文本输入控件字号统一 16px，避免 iOS 聚焦输入框时自动放大页面 */
  input[type="text"], input[type="password"], input[type="email"],
  input[type="search"], input[type="number"], input[type="tel"],
  textarea, select,
  .auth-field input, .field-search input, .pick-search input,
  .comment-field input[type="text"], .chat-composer input[type="text"],
  .chat-input-rich input[type="text"], .chat-input input,
  .searchbar input, .gsearch input, .pay-price input, .money-input input {
    font-size: 16px;
  }
}

/* 我的页标签：窄屏收敛，避免横向裁切 */
@media (max-width: 430px) {
  .me-tabs { gap: 2px; }
  .me-tabs a { flex: 1 1 0; justify-content: center; padding: 8px 4px; font-size: 12.5px; }
  .me-tabs a i { display: none; }
}

/* ---------------- 「我的」更多功能面板 ---------------- */
.sheet-handle {
  width: 38px;
  height: 4px;
  border-radius: 999px;
  background: var(--line-strong);
  margin: -6px auto 14px;
}
.more-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
.more-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 12px 2px;
  border-radius: 14px;
  color: var(--text);
  transition: background .16s;
}
.more-item:active { background: var(--card-2); }
.more-ic {
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: 0 2px 8px rgba(20, 20, 40, .05);
}
.more-label { font-size: 11.5px; color: var(--text-2); white-space: nowrap; }
.more-item em {
  position: absolute;
  top: -5px;
  right: -6px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  display: grid;
  place-items: center;
  font-style: normal;
  font-size: 9.5px;
  line-height: 1;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 0 2px var(--bg);
}
@media (min-width: 1024px) {
  .more-grid { grid-template-columns: repeat(5, 1fr); }
}

/* 我的页空状态收紧，避免列表与上方内容隔太远 */
.me-empty { padding: 26px 0 18px !important; }
.me-empty .empty-ic { width: 52px; height: 52px; margin-bottom: 10px; }

/* ---------------- 首页触底加载 ---------------- */
.feed-more {
  height: 1px;
  margin-top: -1px;
  overflow: hidden;
  font-size: 12.5px;
  color: var(--muted);
  text-align: center;
}
.feed-more.on { opacity: 0; }
.feed-more.feed-more-error {
  height: auto;
  margin: 10px 0 20px;
  overflow: visible;
}
.feed-more .spinner {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 2px solid var(--line-strong);
  border-top-color: var(--accent);
  animation: spin .8s linear infinite;
  opacity: .5;
}
.feed-more.on .spinner { opacity: 1; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------- 聊天页：三段式布局（头 / 滚动区 / 输入区） ---------------- */
html:has(body.chat-page),
body.chat-page {
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  background: var(--page-bg);
}
body.chat-page .shell { height: 100%; overflow: hidden; }
.chat-page .app {
  display: flex;
  flex-direction: column;
  /* 三层兜底：JS 量出来的真实可视高度（--app-h）> svh > vh。
     部分国产浏览器算 dvh 偏大，会把输入框顶到浏览器底栏下面（发送键被切掉）。 */
  height: 100vh;
  height: 100svh;
  height: var(--app-h, 100svh);
  min-height: 0;
  overflow: hidden;
  background: var(--page-bg);
}
.chat-page .chat-topbar {
  position: relative;
  top: auto;
  left: auto;
  flex: 0 0 auto;
  height: auto;
  min-height: 58px;
  gap: 6px;
  padding: calc(8px + env(safe-area-inset-top)) 10px 8px;
  background: var(--card);
  border-bottom: 1px solid var(--line);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.chat-back { flex: none; }
.chat-who {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  padding: 2px 0;
}
.chat-who:active { opacity: .85; }
.chat-av {
  width: 38px;
  height: 38px;
  border-radius: 13px;
  flex: none;
  object-fit: cover;
}
.chat-av-img { width: 38px; height: 38px; flex: none; }
.chat-av-txt {
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 800;
  font-size: 15px;
}
.chat-title { flex: 1; min-width: 0; text-align: left; }
.chat-title-main {
  display: block;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chat-title-sub {
  display: block;
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 群公告条 */
.chat-notice {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--amber);
  background: var(--amber-soft);
  border-bottom: 1px solid var(--line);
}
.chat-notice span {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chat-notice a { color: var(--accent); font-weight: 600; flex: none; }

.chat-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 12px 14px 16px;
  overscroll-behavior: contain;
}
#chatList { display: grid; gap: 12px; }
.bubble-row { align-items: flex-start; }
.bubble-av { display: inline-flex; flex: none; }
.bubble-av .avatar { box-shadow: 0 1px 4px rgba(0,0,0,.18); }
.bubble-row.me .bubble-name { text-align: right; }
.bubble-row.pending .pending-spin { align-self: flex-end; padding-bottom: 2px; }
.bubble-pending { background: var(--line-strong); color: var(--muted-2); border: 0; opacity: .85; }
.bubble-name { font-size: 11px; color: var(--muted); margin: 0 0 4px 4px; }

.chat-gate { gap: 7px; font-size: 12.5px; border-bottom: 1px solid var(--line); }
.chat-gate.tip { color: var(--muted); background: var(--card-2); }
.chat-gate.warn { color: var(--amber); background: var(--amber-soft); }
.chat-gate .btn { flex: none; }
.composer.locked .cbtn, .composer.locked .chat-send { opacity: .45; pointer-events: none; }

/* 输入区 */
.chat-composer {
  flex: 0 0 auto;
  border-top: 1px solid var(--line);
  background: var(--card);
  padding: 8px 10px calc(13px + var(--safe-b) + var(--kb-h, 0px));
}
.composer {
  display: flex;
  align-items: flex-end;
  gap: 6px;
}
.cbtn {
  width: 36px;
  height: 40px;
  flex: none;
  border: 0;
  background: none;
  color: var(--muted);
  display: grid;
  place-items: center;
  border-radius: 12px;
  transition: color .15s, background .15s;
}
.cbtn.on { color: var(--accent); background: var(--accent-soft); }
.cbtn:active { background: var(--card-2); }
.chat-input-wrap { flex: 1; min-width: 0; position: relative; }
.chat-input-wrap > input,
.chat-composer input[type="text"] {
  width: 100%;
  height: 40px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: var(--card-2);
  padding: 0 15px;
  font-size: 14.5px;
  color: var(--text);
  outline: none;
}
.chat-input-wrap > input:focus { border-color: var(--accent-line); background: var(--card); }
.chat-send { width: 40px; height: 40px; flex: none; }

/* 工具面板 */
.composer-panel {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 10px 4px 12px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 6px;
}
.panel-tool {
  border: 0;
  background: none;
  display: grid;
  justify-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--text-2);
  padding: 4px 0;
}
.panel-tool i {
  width: 52px;
  height: 52px;
  border-radius: 17px;
  background: var(--card-2);
  display: grid;
  place-items: center;
  color: var(--text);
  border: 1px solid var(--line);
}
.panel-tool:active i { background: var(--accent-soft); color: var(--accent); border-color: var(--accent-line); }
.panel-empty { grid-column: 1 / -1; text-align: center; font-size: 12.5px; color: var(--muted); padding: 14px 0; }

/* 表情面板改为随输入区展开 */
.chat-composer .emoji-panel {
  position: static;
  left: auto;
  bottom: auto;
  transform: none;
  width: auto;
  max-height: 200px;
  margin: 0 -2px 6px;
  padding: 8px;
  border-radius: 14px;
  grid-template-columns: repeat(9, 1fr);
  background: var(--card-2);
  border: 1px solid var(--line);
  box-shadow: none;
}

.chat-empty { padding: 46px 0; text-align: center; color: var(--muted); }
.chat-empty .empty-ic {
  width: 56px; height: 56px; margin: 0 auto 12px;
  border-radius: 18px; display: grid; place-items: center;
  background: var(--card); border: 1px solid var(--line); color: var(--muted-2);
}
.chat-empty .empty-title { font-size: 14.5px; font-weight: 700; color: var(--text-2); }
.chat-empty .empty-desc { font-size: 12.5px; color: var(--muted); margin-top: 4px; }

/* 录音条 */
.rec-bar {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 6px 0 4px;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
}
.rec-mid {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  color: var(--accent);
}
.rec-dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--accent);
  animation: micPulse .9s ease-in-out infinite;
}
.rec-btn {
  border: 0;
  height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  background: transparent;
  color: var(--muted);
}
.rec-stop { background: var(--accent); color: #fff; }
.rec-stop:active { opacity: .86; }

/* 图片/视频气泡保持圆角，不被「我的」气泡小圆角覆盖 */
.bubble-row.me .bubble.bubble-media,
.bubble-row.me .bubble.bubble-video { border-radius: 14px; }

/* 录音时让录音条占满整行 */
.chat-composer.recording .cbtn,
.chat-composer.recording .chat-send { display: none; }
.chat-composer.recording .chat-input-wrap { flex: 1 1 100%; min-height: 40px; }

/* ---------------- 底部弹出面板（会话操作） ---------------- */
.modal.sheet { align-items: flex-end; padding: 0; }
.modal.sheet .modal-card,
.sheet-card {
  position: relative;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  background: var(--bg);
  border-radius: 22px 22px 0 0;
  padding: 8px 12px calc(14px + var(--safe-b));
  box-shadow: 0 -12px 40px rgba(0, 0, 0, .16);
  animation: sheetUpSoft .22s ease-out;
  max-height: 86vh;
  overflow-y: auto;
}
@keyframes sheetUpSoft { from { transform: translateY(18px); opacity: .7; } to { transform: none; opacity: 1; } }
.sheet-handle {
  width: 38px; height: 4px; border-radius: 99px;
  background: var(--line-strong);
  margin: 4px auto 10px;
}
.sheet-title {
  font-size: 14px; font-weight: 800; text-align: center;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sheet-sub {
  font-size: 11.5px; color: var(--muted); text-align: center;
  margin: 2px 0 12px;
}
.sheet-list {
  background: var(--card);
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 10px;
  border: 1px solid var(--line);
}
.sheet-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  border: 0;
  background: none;
  text-align: left;
  color: var(--text);
  font-size: 14.5px;
  border-bottom: 1px solid var(--line);
}
.sheet-list > *:last-child .sheet-item,
.sheet-list > .sheet-item:last-child { border-bottom: 0; }
.sheet-item:active { background: var(--card-2); }
.sheet-item .si-ic {
  width: 34px; height: 34px; flex: none;
  border-radius: 11px;
  display: grid; place-items: center;
  background: var(--card-2);
  color: var(--text-2);
}
.sheet-item .si-main { flex: 1; min-width: 0; display: block; }
.sheet-item .si-main b { display: block; font-size: 14.5px; font-weight: 600; }
.sheet-item .si-main em {
  display: block;
  font-style: normal;
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sheet-item.danger { color: #e5484d; }
.sheet-item.danger .si-ic { background: rgba(229, 72, 77, .1); color: #e5484d; }

/* ---------------- 群聊操作条 ---------------- */
.group-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 2px 16px 10px;
  flex-wrap: wrap;
}
.group-bar .btn { height: 34px; padding: 0 14px; font-size: 13px; }
.group-bar-tip { font-size: 11.5px; color: var(--muted); margin-left: auto; }

.pick-list {
  max-height: 210px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 6px;
  display: grid;
  gap: 2px;
  background: var(--card);
}
.pick-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 10px;
  cursor: pointer;
}
.pick-item:active { background: var(--card-2); }
.pick-item input { accent-color: var(--accent); width: 16px; height: 16px; }
.pick-name { font-size: 13.5px; font-weight: 600; }
.pick-uid { font-size: 11px; color: var(--muted); margin-left: auto; }

/* ---------------- 后台：轮播图列表 ---------------- */
.banner-row { align-items: flex-start; }
.banner-row.is-off { opacity: .62; }
.banner-thumb {
  flex: none;
  width: 96px;
  height: 54px;
  border-radius: 12px;
  overflow: hidden;
  background: var(--card-2);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
}
.banner-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.banner-thumb-empty { color: var(--muted-2); }
.banner-tools { display: flex; align-items: center; gap: 2px; }
.banner-preview {
  margin-top: 8px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  max-width: 260px;
}
.banner-preview img { width: 100%; display: block; }
@media (max-width: 560px) {
  .banner-thumb { width: 76px; height: 44px; }
  .banner-tools { flex-wrap: wrap; justify-content: flex-end; }
}

/* ---------------- 后台：垃圾清理 ---------------- */
.clean-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-top: 1px solid var(--line);
  cursor: pointer;
}
.clean-row:first-of-type { border-top: 0; }
.clean-row input { margin-top: 3px; accent-color: var(--accent); width: 17px; height: 17px; flex: none; }
.clean-main { flex: 1; min-width: 0; }
.clean-main b { display: block; font-size: 14px; font-weight: 600; }
.clean-main em { display: block; margin-top: 3px; font-size: 11.5px; color: var(--muted); font-style: normal; line-height: 1.6; }
.clean-num { flex: none; font-size: 13px; font-weight: 700; color: var(--muted); }

/* ---------------- 上传进度胶囊 ---------------- */
.up-pill {
  position: fixed;
  left: 50%;
  bottom: calc(84px + var(--safe-b));
  transform: translate(-50%, 10px);
  z-index: 320;
  width: min(300px, 76vw);
  padding: 10px 14px 11px;
  border-radius: 14px;
  background: rgba(22, 22, 28, .88);
  backdrop-filter: blur(10px);
  color: #fff;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s, transform .18s;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .22);
}
.up-pill.on { opacity: 1; transform: translate(-50%, 0); }
.up-pill-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  letter-spacing: .2px;
}
.up-pill-row b {
  margin-left: auto;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}
.up-pill-bar {
  display: block;
  height: 4px;
  margin-top: 8px;
  border-radius: 99px;
  background: rgba(255, 255, 255, .24);
  overflow: hidden;
}
.up-pill-bar em {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 99px;
  background: #fff;
  transition: width .18s linear;
}

/* ---------------- 消息页：群聊工具条 / 未读 / 邀请卡片 ---------------- */
.group-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 2px 16px 10px;
}
.gsearch {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding: 0 6px 0 12px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.gsearch-ic { flex: none; display: grid; place-items: center; color: var(--muted); }
.gsearch input {
  flex: 1;
  min-width: 0;
  height: 38px;
  border: 0;
  background: none;
  outline: none;
  font-size: 13.5px;
  color: var(--text);
}
.gsearch button {
  flex: none;
  height: 30px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 12.5px;
  font-weight: 600;
}
.gnew {
  flex: none;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(150deg, var(--accent-2), var(--accent));
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 8px 18px rgba(255, 53, 84, .30), inset 0 1px 0 rgba(255, 255, 255, .18);
}
.gnew:active { transform: scale(.94); }

.msg-av-img { width: 44px; height: 44px; border-radius: 15px; object-fit: cover; flex: none; }
.msg-unread {
  flex: none;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: 10px;
  background: linear-gradient(150deg, var(--accent-2), var(--accent));
  box-shadow: 0 4px 10px rgba(255, 53, 84, .30);
  color: #fff;
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
  display: grid;
  place-items: center;
  margin-left: 8px;
}
.pill-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-block;
  margin-left: 4px;
  vertical-align: 4px;
}

.invite-card {
  padding: 16px;
  border-radius: 18px;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: 0 1px 2px rgba(20, 20, 40, .04), 0 10px 26px rgba(20, 20, 40, .07);
}
.invite-top { display: flex; align-items: center; gap: 12px; }
.invite-av {
  flex: none;
  width: 48px; height: 48px;
  border-radius: 16px;
  overflow: hidden;
}
.invite-av img { width: 100%; height: 100%; object-fit: cover; }
.invite-av span {
  display: grid; place-items: center;
  width: 100%; height: 100%;
  color: #fff; font-weight: 800; font-size: 19px;
}
.invite-info { flex: 1; min-width: 0; }
.invite-title { font-size: 15px; font-weight: 700; }
.invite-desc {
  font-size: 12px; color: var(--muted); margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.invite-time { font-size: 11px; color: var(--muted-2); margin-top: 3px; }
.invite-acts { display: flex; gap: 8px; justify-content: flex-end; margin-top: 12px; }
.invite-acts form { margin: 0; }
.invite-acts .btn { height: 34px; padding: 0 18px; font-size: 13px; }

/* ---------------- 群资料页 ---------------- */
.group-hero {
  padding: 22px 18px 18px;
  text-align: center;
  background: linear-gradient(180deg, var(--accent-soft), transparent 82%);
}
.gh-av {
  width: 74px; height: 74px;
  margin: 0 auto 12px;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(20, 20, 40, .12);
}
.gh-av img { width: 100%; height: 100%; object-fit: cover; }
.gh-av span {
  display: grid; place-items: center;
  width: 100%; height: 100%;
  color: #fff; font-weight: 800; font-size: 30px;
}
.gh-name { font-size: 19px; font-weight: 800; letter-spacing: .2px; }
.gh-meta { font-size: 12px; color: var(--muted); margin-top: 5px; }
.gh-actions {
  display: flex; flex-wrap: wrap; gap: 8px;
  justify-content: center; margin-top: 14px;
}
.gh-actions .btn { height: 36px; padding: 0 15px; font-size: 13px; }
.gh-actions form { margin: 0; }

.group-card {
  margin: 0 16px 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
}
.gc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 15px 8px;
}
.gc-title {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 700; color: var(--text);
}
.gc-title em {
  font-style: normal;
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
}
.gc-edit {
  border: 0; background: none;
  color: var(--accent); font-size: 12.5px; font-weight: 600;
  padding: 2px 4px;
}
.gc-text {
  padding: 0 15px 15px;
  font-size: 13.5px;
  color: var(--text-2);
  line-height: 1.75;
}
.member-list { padding: 0 8px 8px; }
.member-row { display: flex; align-items: center; gap: 6px; padding: 4px 0; }
.member-main {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border-radius: 12px;
  color: inherit;
}
.member-main:active { background: var(--card-2); }
.member-info { min-width: 0; flex: 1; }
.member-name {
  display: block;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.me-tag {
  font-style: normal;
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent);
  vertical-align: 2px;
}
.member-uid { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; }
.role-chip {
  flex: none;
  font-style: normal;
  font-size: 10.5px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--card-2);
  color: var(--muted);
}
.role-chip.owner { background: var(--amber-soft); color: var(--amber); }
.member-acts { display: flex; gap: 4px; flex: none; }
.member-acts form { margin: 0; }
.mini-btn {
  border: 1px solid var(--line);
  background: var(--card-2);
  color: var(--text-2);
  font-size: 11.5px;
  height: 28px;
  padding: 0 9px;
  border-radius: 8px;
}
.mini-btn.danger { color: #e5484d; border-color: rgba(229, 72, 77, .22); background: rgba(229, 72, 77, .06); }
.gc-actions { padding: 0 8px 8px; }
.gc-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 10px;
  border: 0;
  background: none;
  border-radius: 12px;
  color: var(--text);
  font-size: 14px;
}
.gc-btn span { flex: 1; text-align: left; }
.gc-btn.danger { color: #e5484d; }
.gc-actions form { margin: 0; }
.pick-item.is-off { opacity: .5; }

/* ---------------- 发布页：附件模式 / 付费阅读 ---------------- */
.mp-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 12px;
  margin-bottom: 0;
}
.mp-hint { font-size: 11.5px; color: var(--muted-2); }
.mp-hint.warn { color: var(--amber); }
.upload-tile.is-off,
.attach-tile.is-off,
.video-tile.is-off {
  opacity: .42;
  pointer-events: none;
  filter: grayscale(.5);
}

.pay-card {
  margin: 14px 0 8px;
  padding: 14px;
  border-radius: 16px;
  background: var(--card);
  border: 1px solid var(--line);
}
.pay-card .switch-row { padding: 0; border-bottom: 0; }
.pay-price {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  padding: 8px 14px;
  border-radius: 12px;
  background: var(--card-2);
  border: 1px solid var(--line);
}
.pp-cur { font-size: 16px; font-weight: 800; color: var(--accent); }
.pay-price input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: none;
  outline: none;
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  padding: 2px 0;
}
.pp-unit { flex: none; font-size: 12px; color: var(--muted); }

/* ---------------- 付费内容 ---------------- */
.pay-flag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--amber-soft);
  color: var(--amber);
  font-size: 11px;
  font-weight: 700;
}
.pay-lock {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 8px;
  padding: 8px 12px;
  border-radius: 11px;
  background: var(--amber-soft);
  color: var(--amber);
  font-size: 12.5px;
  font-weight: 600;
}
.pay-lock em { font-style: normal; font-size: 11.5px; opacity: .78; font-weight: 500; }
.pay-preview { color: var(--text-2); -webkit-line-clamp: 2; }

.paywall {
  position: relative;
  margin-top: 14px;
  padding: 16px;
  border-radius: 18px;
  background: var(--card);
  border: 1px solid var(--line);
  overflow: hidden;
}
.pw-top { display: flex; align-items: center; justify-content: space-between; }
.pw-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--amber-soft);
  color: var(--amber);
  font-size: 12px;
  font-weight: 700;
}
.pw-price { font-size: 22px; font-weight: 800; color: var(--accent); letter-spacing: -.4px; }
.pw-text {
  margin-top: 12px;
  font-size: 14.5px;
  line-height: 1.85;
  color: var(--text-2);
  filter: blur(1.1px);
  user-select: none;
  -webkit-user-select: none;
}
.pw-fade {
  position: relative;
  height: 36px;
  margin-top: -36px;
  background: linear-gradient(180deg, transparent, var(--card) 78%);
}
.pw-media {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  font-size: 12px;
  color: var(--muted);
}
.pw-foot { margin-top: 14px; }
.pw-tip { margin-top: 9px; text-align: center; font-size: 11.5px; color: var(--muted); }
.pw-tip a { color: var(--accent); font-weight: 600; }
.paid-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  padding: 7px 12px;
  border-radius: 10px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 12px;
  font-weight: 600;
}

/* ---------------- 钱包 / 提现 ---------------- */
.wallet-card{
  margin: 4px 16px 12px;
  border-radius: 22px;
  display: flex;
  overflow: hidden;
  box-shadow: 0 16px 38px rgba(255, 39, 72, .16);
  border: 0;
}
.wc-col{ flex: 1; min-width: 0; padding: 18px 16px; color: #fff; }
.wc-coin{ background: linear-gradient(135deg, #ff6b7d 0%, #ff2f50 55%, #e81e3f 100%); }
.wc-balance{ background: linear-gradient(135deg, #f7b955 0%, #eda014 55%, #d98300 100%); }
.wc-divider{ width: 1px; background: rgba(255, 255, 255, .25); margin: 16px 0; }
.wc-label{ display: flex; align-items: center; gap: 5px; font-size: 12px; color: rgba(255, 255, 255, .92); }
.wc-label svg{ flex: none; color: #fff; }
.wc-amount{ display: flex; align-items: baseline; gap: 3px; margin-top: 8px; font-weight: 800; letter-spacing: -.5px; color: #fff; }
.wc-amount em{ font-style: normal; font-size: 17px; color: rgba(255, 255, 255, .9); }
.wc-amount b{ font-size: 28px; line-height: 1.1; color: #fff; }
.wc-actions{ display: flex; gap: 7px; margin-top: 14px; flex-wrap: wrap; }
.wc-btn{
  display: inline-flex; align-items: center; gap: 4px;
  height: 32px; padding: 0 12px; font-size: 12px; border-radius: 10px;
  background: rgba(255, 255, 255, .18); color: #fff; border: 1px solid rgba(255, 255, 255, .3); cursor: pointer;
}
.wc-btn.primary{ background: #fff; color: #ff2748; border-color: #fff; font-weight: 700; }
.wc-balance .wc-btn.primary{ color: #d98300; }
.wc-tip{ margin: 0 18px 12px; font-size: 11.5px; color: var(--muted); line-height: 1.6; }
.ex-back-divider { margin: 16px 0 10px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); text-align: center; }

.wallet-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0 16px 12px;
}
.ws-item {
  padding: 12px 10px;
  border-radius: 14px;
  background: var(--card);
  border: 1px solid var(--line);
  text-align: center;
}
.ws-item b { display: block; font-size: 15px; font-weight: 800; }
.ws-item span { display: block; margin-top: 3px; font-size: 11px; color: var(--muted); }

.ledger-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}
.ledger-row:last-child { border-bottom: 0; }
.lr-ic {
  width: 34px; height: 34px;
  flex: none;
  border-radius: 11px;
  display: grid; place-items: center;
}
.lr-ic.in { background: var(--green-soft); color: var(--green); }
.lr-ic.out { background: var(--accent-soft); color: var(--accent); }
.lr-main { flex: 1; min-width: 0; }
.lr-title {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.lr-meta { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; line-height: 1.5; }
.lr-amount { flex: none; font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; }
.lr-amount.in { color: var(--green); }
.lr-amount.out { color: var(--text); }

.status-chip {
  flex: none;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: var(--card-2);
  color: var(--muted);
}
.status-chip.ok { background: var(--green-soft); color: var(--green); }
.status-chip.wait { background: var(--amber-soft); color: var(--amber); }
.status-chip.off { background: rgba(229, 72, 77, .1); color: #e5484d; }

.money-input {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  border-radius: 14px;
  background: var(--card-2);
  border: 1px solid var(--line);
}
.money-input span { font-size: 16px; font-weight: 800; color: var(--muted); }
.money-input input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: none;
  outline: none;
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.quick-money { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.quick-money .qm {
  border: 1px solid var(--line);
  background: var(--card-2);
  color: var(--text-2);
  height: 32px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
}
.quick-money .qm.on,
.quick-money .qm:active { background: var(--accent-soft); color: var(--accent); border-color: var(--accent-line); }

.pay-types { display: flex; gap: 10px; }
.pay-type {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 13px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--card-2);
  cursor: pointer;
}
.pay-type input { position: absolute; opacity: 0; pointer-events: none; }
.pay-type:has(input:checked) {
  border-color: var(--accent-line);
  background: var(--accent-soft);
}
.pt-ic {
  width: 30px; height: 30px;
  border-radius: 9px;
  display: grid; place-items: center;
  color: #fff;
  flex: none;
}
.pt-ic.alipay { background: #1677ff; }
.pt-ic.wxpay { background: #07c160; }
.pt-name { font-size: 13.5px; font-weight: 600; }

.fee-preview {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin: 4px 0 12px;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--card-2);
  font-size: 12.5px;
  color: var(--muted);
}
.fee-preview b { color: var(--text); font-weight: 700; }

.qr-upload { display: flex; align-items: center; gap: 10px; }
.qr-upload img {
  width: 64px; height: 64px;
  flex: none;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid var(--line);
}

/* ---------------- 我的：余额条 ---------------- */
.notice-tools { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px 6px; }
.notice-title { font-size: 14px; font-weight: 700; color: var(--text); }
.notice-clear { display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 4px; border: 0; background: none; color: var(--muted); font-size: 12.5px; cursor: pointer; }
.notice-clear:active { color: var(--accent); }
.notice-del { flex: none; display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 0; background: none; color: var(--muted-2); cursor: pointer; }
.notice-del:active { color: var(--accent); }

/* ---------------- 后台：财务模块 ---------------- */
/* 只作用于财务类数字块，别影响仪表盘的统计卡 */
.stat-grid:has(.stat-cell) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stat-cell {
  padding: 14px 12px;
  border-radius: 14px;
  background: var(--card-2);
  text-align: center;
}
.stat-cell b { display: block; font-size: 17px; font-weight: 800; letter-spacing: -.3px; }
.stat-cell span { display: block; margin-top: 3px; font-size: 11px; color: var(--muted); }

.check-row { display: flex; flex-wrap: wrap; gap: 8px; }
.check-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--card-2);
  font-size: 13px;
  cursor: pointer;
}
.check-item input { accent-color: var(--accent); width: 15px; height: 15px; }

.copy-line {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px 8px 12px;
  border-radius: 10px;
  background: var(--card-2);
  border: 1px solid var(--line);
}
.copy-line code {
  flex: 1;
  min-width: 0;
  font-size: 11.5px;
  color: var(--text-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.seg-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 0; }
.seg-tabs .seg {
  flex: none;
  margin: 0;
  padding: 6px 13px;
  border-radius: 999px;
  background: var(--card-2);
  border: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--muted);
}
.seg-tabs .seg.on {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: var(--accent-line);
  font-weight: 700;
  box-shadow: none;
}

.wd-row { padding: 14px 16px; border-bottom: 1px solid var(--line); }
.wd-row:last-child { border-bottom: 0; }
.wd-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.wd-who { flex: 1; min-width: 120px; }
.wd-who b { display: block; font-size: 14px; font-weight: 700; }
.wd-who em { display: block; font-style: normal; font-size: 11px; color: var(--muted); margin-top: 2px; }
.wd-amount { text-align: right; }
.wd-amount b { display: block; font-size: 17px; font-weight: 800; letter-spacing: -.3px; }
.wd-amount em { display: block; font-style: normal; font-size: 11px; color: var(--muted); margin-top: 2px; }
.wd-body { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.wd-tag { padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.wd-tag.ali { background: rgba(22, 119, 255, .1); color: #1677ff; }
.wd-tag.wx { background: rgba(7, 193, 96, .12); color: #07c160; }
.wd-acc { font-size: 13px; font-weight: 600; word-break: break-all; }
.wd-qr { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--accent); }
.wd-qr img { width: 38px; height: 38px; border-radius: 8px; object-fit: cover; border: 1px solid var(--line); }
.wd-noqr { font-size: 11.5px; color: var(--amber); }
.wd-remark { width: 100%; font-size: 11.5px; color: var(--muted); }
.wd-acts { display: flex; align-items: center; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.wd-acts form { margin: 0; }
.wd-reject { display: flex; gap: 8px; flex: 1; min-width: 240px; }
.wd-reject .field { flex: 1; height: 34px; padding: 0 12px; font-size: 12.5px; }

/* 提现表单段间距 */
.wd-form .form-row + .form-row { margin-top: 14px; }

/* ============================================================
   3.0 会员 / 签到 / 通知详情 / 用户搜索 / 未读角标
   ============================================================ */

/* --- 站点 Logo（后台可换） --- */
.site-logo { display: inline-grid; place-items: center; border-radius: 14px; object-fit: cover; flex: none; }
.site-logo-txt { background: linear-gradient(140deg, #ff6a4d, #ff2748); color: #fff; font-weight: 800; box-shadow: 0 8px 18px rgba(255, 53, 84, .26); }
img.site-logo { background: var(--card-2); box-shadow: 0 6px 16px rgba(20, 20, 40, .10); }
.auth-logo.site-logo { border-radius: 16px; }

/* --- VIP / SVIP 名称与角标 --- */
.is-vip { color: #ff2d55 !important; font-weight: 800; }
.is-svip { color: #c8860a !important; font-weight: 800; }
.vip-tag.svip {
  background: linear-gradient(135deg, #ffd76a, #f5a623 55%, #d98300);
  box-shadow: 0 2px 6px rgba(217,154,6,.32);
}
.vip-tag.official {
  background: linear-gradient(135deg, #6c5ce7, #5b3ff0);
  box-shadow: 0 2px 6px rgba(91,63,240,.28);
}
.dm-tag.svip { background: #fff3d6; color: #d98300; font-weight: 800; }
.vip-tag {
  display: inline-flex;
  align-items: center;
  height: 15px;
  padding: 0 5px;
  margin-left: 4px;
  border-radius: 5px;
  background: linear-gradient(135deg, #ff6a4d, #ff2d55);
  color: #fff !important;
  font-size: 9.5px;
  font-style: normal;
  font-weight: 800;
  letter-spacing: .4px;
  vertical-align: 2px;
  box-shadow: 0 2px 6px rgba(255, 45, 85, .28);
}

/* --- 底部 Tab 未读数字 --- */
.tab-dot.num {
  width: auto;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 99px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 10px;
  font-style: normal;
  font-weight: 700;
  line-height: 1;
  top: 6px;
  left: calc(50% + 3px);
  box-shadow: 0 0 0 2px var(--nav-bg);
}

/* --- 我的页：会员条 --- */
.me-vip {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 16px 0;
  padding: 12px 14px;
  border-radius: 16px;
  background: linear-gradient(150deg, #fdf8ee 0%, #fbeed8 100%);
  border: 1px solid #ecd9ad;
  box-shadow: 0 4px 14px rgba(224, 168, 60, .14);
}
.me-vip.on {
  background: linear-gradient(150deg, #fdf8ee 0%, #fbeed8 100%);
  border-color: #ecd9ad;
  box-shadow: 0 4px 14px rgba(224, 168, 60, .14);
}
.mv-main { flex: 1; display: flex; align-items: center; gap: 10px; min-width: 0; color: inherit; }
.mv-badge {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  flex: none;
  color: #fff;
  background: linear-gradient(150deg, #ffd76a 0%, #f5a623 46%, #d98300 100%);
  box-shadow: 0 3px 9px rgba(217,154,6,.36), inset 0 1px 0 rgba(255,255,255,.6);
}
.me-vip .mv-badge {
  background: linear-gradient(150deg, #f9cf55 0%, #eda82c 52%, #d98b16 100%);
  box-shadow: 0 3px 10px rgba(214, 158, 34, .32), inset 0 1px 0 rgba(255, 255, 255, .55);
}
.mv-text { flex: 1 1 auto; display: flex; flex-direction: column; min-width: 0; }
.mv-text b { font-size: 13.5px; font-weight: 700; }
.mv-text em { font-size: 11.5px; color: var(--muted); font-style: normal; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-vip .mv-text b { color: #8a5a12; }
.me-vip .mv-text em { color: #a98f63; }
.mv-go { color: var(--muted); display: flex; align-items: center; }
.me-vip .mv-go { color: #c89a3a; }
.me-vip .mv-side { color: #b57e1c; }
.mv-side { flex: none; font-size: 11.5px; color: var(--muted); text-align: right; white-space: nowrap; }
.mv-side.go { color: #b57e1c; font-weight: 700; }
.me-vip.on.is-svip {
  background: linear-gradient(150deg, #fdf8ee 0%, #fbeed8 100%);
  border-color: #ecd9ad;
}
.me-vip.on.is-svip .mv-badge {
  background: linear-gradient(150deg, #f9cf55 0%, #eda82c 52%, #d98b16 100%);
  box-shadow: 0 3px 10px rgba(214, 158, 34, .32), inset 0 1px 0 rgba(255, 255, 255, .55);
}

/* 深色模式：黑金会员卡（方案三） */
[data-theme="dark"] .me-vip.on {
  background: linear-gradient(150deg, #1d1710 0%, #12100c 100%);
  border-color: rgba(214, 170, 80, .32);
  box-shadow: 0 4px 16px rgba(0, 0, 0, .42), inset 0 1px 0 rgba(255, 210, 120, .06);
}
[data-theme="dark"] .me-vip.on .mv-badge {
  background: linear-gradient(150deg, #f7c948 0%, #d99a1f 52%, #b87912 100%);
  box-shadow: 0 3px 10px rgba(0, 0, 0, .4), inset 0 1px 0 rgba(255, 255, 255, .35);
}
[data-theme="dark"] .me-vip.on .mv-text b { color: #f3c86a; }
[data-theme="dark"] .me-vip.on .mv-text em { color: #b79f78; }
[data-theme="dark"] .me-vip.on .mv-side { color: #e3b95f; }
[data-theme="dark"] .me-vip.on .mv-go { color: #d9a94a; }
[data-theme="dark"] .me-vip.on.is-svip {
  background: linear-gradient(150deg, #1d1710 0%, #12100c 100%);
  border-color: rgba(214, 170, 80, .32);
}

/* --- 抽屉：小标签 --- */
.dm-tag {
  margin-left: auto;
  font-size: 10px;
  font-style: normal;
  padding: 2px 7px;
  border-radius: 99px;
  background: var(--card-2);
  color: var(--muted);
}
.dm-tag.vip { background: #ffe6ec; color: #ff2d55; font-weight: 800; }

/* --- 消息：搜索用户弹层 --- */
.pick-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 13px;
  background: var(--card-2);
  margin: 2px 0 10px;
}
.pick-search svg { color: var(--muted-2); flex: none; }
.pick-search input { flex: 1; min-width: 0; border: 0; background: none; font-size: 14px; color: var(--text); outline: none; }
.pick-search button {
  border: 0;
  border-radius: 9px;
  padding: 6px 12px;
  background: var(--accent);
  color: #fff;
  font-size: 12.5px;
  font-weight: 700;
}
.pick-tip { margin: 0 0 6px; font-size: 11.5px; color: var(--muted-2); }
.chat-pick { display: flex; align-items: center; gap: 10px; padding: 8px 2px; border-bottom: 1px solid var(--line); }
.chat-pick:last-child { border-bottom: 0; }
.cp-main { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; color: inherit; }
.cp-text { display: flex; flex-direction: column; min-width: 0; }
.cp-text b { font-size: 14.5px; display: flex; align-items: center; }
.cp-text em { font-size: 11.5px; color: var(--muted); font-style: normal; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cp-followed { font-size: 11.5px; color: var(--muted-2); flex: none; }

/* --- 通知详情 --- */
.msg-item.as-btn {
  display: flex;
  align-items: center;
  width: 100%;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
}
.msg-item.as-btn > svg { flex: none; color: var(--muted-2); }
.msg-item.as-btn .msg-top { min-width: 0; }
.msg-item.as-btn .msg-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg-item.as-btn .msg-time { flex: none; white-space: nowrap; margin-left: 8px; }
.msg-item.as-btn .unread-dot { flex: none; }
.msg-item.as-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.nd-time { font-size: 11.5px; color: var(--muted-2); margin: -4px 0 10px; }
.nd-body { font-size: 14px; line-height: 1.85; color: var(--text-2); white-space: pre-wrap; word-break: break-word; max-height: 50vh; overflow: auto; }

/* --- 我的：未读小徽标 --- */
.mi-badge { color: #fff !important; background: var(--accent); border-radius: 99px; padding: 2px 8px; font-size: 10.5px; font-weight: 700; }

/* --- 付费帖额度提示 --- */
.hint { font-size: 12.5px; line-height: 1.7; color: var(--muted); }
.hint.vip-hint { color: #ff2d55; display: flex; align-items: center; gap: 4px; }
.hint.svip-hint { color: #d99a06; display: flex; align-items: center; gap: 4px; }
.hint.warn { color: #c9821d; }
.hint a { color: var(--accent); font-weight: 700; }

/* --- 聊天：消息从顶部开始排列，消息多了再自动滚到底 --- */
.chat-scroll { display: flex; flex-direction: column; }
#chatList { flex: 0 0 auto; }
.chat-scroll > .bubble-time { margin-bottom: 2px; }
.chat-empty { margin: auto 0; }

/* --- 文件选择：把原生「选择文件」按钮也做统一 --- */
input[type="file"] { font-size: 12.5px; color: var(--muted); }
input[type="file"]::file-selector-button {
  margin-right: 8px;
  padding: 6px 12px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--card-2);
  color: var(--text);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}
input[type="file"]::file-selector-button:hover { border-color: var(--accent-line); }

/* --- 后台：通用表单卡片 --- */
.admin-form-pad { padding: 0 16px 16px; display: grid; gap: 12px; }
.admin-note { padding: 0 16px 16px; font-size: 12.5px; color: var(--muted); line-height: 1.9; }
.logo-row { display: flex; gap: 12px; align-items: center; }
.logo-acts { flex: 1; min-width: 0; display: grid; gap: 6px; }
.logo-acts .field { padding: 9px 12px; font-size: 12.5px; }
.logo-clear { font-size: 11.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.logo-preview { border-radius: 15px; }

/* --- 后台：余额面板 --- */
.bal-box {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-radius: 14px; margin-bottom: 12px;
  background: linear-gradient(135deg, #ff6a4d, #ff2748); color: #fff;
}
.bal-box span { font-size: 12.5px; opacity: .9; }
.bal-box b { font-size: 24px; font-weight: 800; }
.bal-quick { display: flex; gap: 8px; margin: -2px 0 4px; }
.bal-quick .btn { flex: 1; }

/* --- 后台：会员套餐编辑 --- */
.plan-edit-head, .plan-edit-row {
  display: grid;
  grid-template-columns: 1.3fr 0.8fr 0.6fr 0.8fr 56px;
  gap: 8px;
  align-items: center;
  padding: 8px 16px;
}
.plan-edit-head { font-size: 11.5px; color: var(--muted); border-bottom: 1px solid var(--line); }
.plan-edit-row { border-bottom: 1px dashed var(--line); position: relative; }
.plan-edit-row .field { padding: 9px 10px; font-size: 13px; }
.plan-on { display: grid; place-items: center; }
.plan-on input { width: 17px; height: 17px; accent-color: var(--accent); }
.plan-forever {
  position: absolute; right: 6px; top: -7px;
  font-size: 9.5px; font-style: normal; font-weight: 800;
  color: #c9821d; background: #fdf1dd; border-radius: 5px; padding: 1px 5px;
}

/* --- 首页顶栏签到入口 --- */
.top-signin {
  display: inline-flex; align-items: center; gap: 5px;
  height: 34px; padding: 0 12px; border-radius: 999px;
  font-size: 12.5px; font-weight: 600; line-height: 1;
  color: var(--accent); background: var(--accent-soft);
}
.top-signin.done { color: var(--muted); background: var(--card-2); }

/* --- 后台快捷入口 --- */
.admin-quick {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px; margin: 2px 16px 6px;
}
.admin-quick a {
  display: grid; grid-template-columns: 30px minmax(0, 1fr);
  column-gap: 9px; align-items: center;
  padding: 10px 12px; border-radius: 14px;
  min-height: 58px;
  background: var(--card); border: 1px solid var(--line);
  color: var(--text); text-decoration: none;
  transition: border-color .16s, transform .16s;
}
.admin-quick a:hover { border-color: var(--accent); transform: translateY(-1px); }
.admin-quick .aq-ic {
  grid-row: 1 / span 2;
  width: 30px; height: 30px; border-radius: 10px;
  display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent);
}
.admin-quick b { font-size: 13px; font-weight: 700; line-height: 1.3; }
.admin-quick em {
  font-size: 11px; font-style: normal; color: var(--muted); line-height: 1.4;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
@media (min-width: 720px) {
  .admin-quick { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 2px 20px 8px; }
}

/* --- 首页签到提醒条 --- */
.signin-bar { color: #a8580c; background: linear-gradient(90deg, #fff4e2, #fff9f1); border: 1px solid #ffe2bc; }
.signin-bar svg { flex: 0 0 auto; }
.signin-bar span { flex: 1 1 auto; min-width: 0; }
.signin-bar b { font-weight: 800; }
.signin-bar .sb-go {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 1px;
  font-weight: 700; color: #b9610d;
}

/* ================= 聊天红包 ================= */
.panel-rp i {
  color: #fff;
  background: linear-gradient(140deg, #ff8a63, #ea4636);
  border-color: transparent;
  box-shadow: 0 6px 14px rgba(234, 70, 54, .28);
}
.panel-rp:active i { background: linear-gradient(140deg, #ff8a63, #ea4636); color: #fff; }

/* 聊天里的红包气泡 */
.bubble.rp-card,
.bubble-row.me .bubble.rp-card {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 244px;
  max-width: 100%;
  padding: 12px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, #ff8158, #f0503f 60%, #e3402f);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(227, 64, 47, .26);
  transition: transform .14s ease;
}
.bubble.rp-card:active { transform: scale(.985); }
.rp-card .rp-ic {
  width: 34px; height: 34px; flex: none;
  border-radius: 10px; display: grid; place-items: center;
  background: rgba(255, 255, 255, .95);
  color: #e8402f;
}
.rp-card .rp-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.rp-card b {
  font-size: 13.5px; font-weight: 700; line-height: 1.3;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.rp-card em {
  font-style: normal; font-size: 11px; opacity: .86;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.rp-card .rp-arrow { flex: none; opacity: .7; }
.rp-card.rp-done { filter: saturate(.72); }
.rp-card.rp-dead { filter: grayscale(.5) opacity(.82); }

/* 发红包弹层 */
.rp-send-head { display: flex; align-items: center; gap: 11px; padding: 2px 4px 14px; }
.rp-send-ic {
  width: 40px; height: 40px; flex: none;
  border-radius: 13px; display: grid; place-items: center; color: #fff;
  background: linear-gradient(140deg, #ff8a63, #e8402f);
  box-shadow: 0 6px 14px rgba(232, 64, 47, .3);
}
.rp-send-head b { display: block; font-size: 16px; font-weight: 700; }
.rp-send-head em { display: block; margin-top: 2px; font-style: normal; font-size: 11.5px; color: var(--muted); line-height: 1.5; }

.rp-tabs { display: flex; gap: 8px; padding: 0 4px 8px; }
.rp-tab {
  flex: 1; height: 38px; border-radius: 11px;
  border: 1px solid var(--line); background: var(--card);
  font-size: 13.5px; font-weight: 600; color: var(--muted);
  transition: .16s;
}
.rp-tab.on { background: #fff2ee; border-color: #ffcfc3; color: #e8402f; }

.rp-hint { padding: 0 4px 10px; font-size: 11.5px; color: var(--muted); line-height: 1.5; }

.rp-cur { display: flex; gap: 8px; padding: 0 4px 10px; }
.rp-cur-opt {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 5px;
  height: 38px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--card);
  font-size: 13px; font-weight: 700; color: var(--muted); cursor: pointer; transition: .16s;
}
.rp-cur-opt input { position: absolute; opacity: 0; pointer-events: none; }
.rp-cur-opt.on { background: #fff2ee; border-color: #ffcfc3; color: #e8402f; }
.rp-bal-coin { margin-left: 6px; }
.rp-balance b.dim { color: var(--muted); font-weight: 600; }

.rp-form { display: grid; gap: 10px; padding: 0 4px; }
.rp-form.two { grid-template-columns: 1.3fr 1fr; }
.rp-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.rp-field.full { grid-column: 1 / -1; }
.rp-field > span { font-size: 12px; color: var(--muted); }
.rp-input {
  display: flex; align-items: center; gap: 6px;
  height: 46px; padding: 0 12px;
  border-radius: 12px; border: 1px solid var(--line); background: var(--card-2);
}
.rp-input em { flex: none; font-style: normal; font-size: 13px; color: var(--muted); white-space: nowrap; }
.rp-input input {
  flex: 1; min-width: 0; border: 0; background: none; outline: none;
  font-size: 17px; font-weight: 700; color: var(--text);
  -webkit-appearance: none;
  -moz-appearance: textfield;
  appearance: textfield;
}
.rp-input input::-webkit-outer-spin-button,
.rp-input input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  appearance: none;
  display: none;
  margin: 0;
}
.rp-form .rp-field > input {
  height: 46px; padding: 0 12px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--card-2);
  font-size: 14px; color: var(--text); outline: none;
}
.rp-form .rp-field > input:focus,
.rp-input:focus-within { border-color: var(--accent-line); }

.rp-balance { padding: 12px 4px 0; font-size: 12px; color: var(--muted); }
.rp-balance b { color: var(--text); }
.rp-balance a { color: var(--accent); }

.rp-submit {
  width: 100%; margin-top: 14px; height: 50px;
  border: 0; border-radius: 14px; color: #fff;
  background: linear-gradient(135deg, #ff8158, #e8402f);
  box-shadow: 0 8px 18px rgba(232, 64, 47, .3);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
}
.rp-submit:disabled { opacity: .6; }
.rp-submit-main { font-size: 15px; font-weight: 700; }
.rp-submit-sub { font-size: 11px; opacity: .85; }

/* 红包详情 */
.rp-sheet-body { padding: 2px 2px 2px; }
.rp-head { display: flex; align-items: center; gap: 11px; padding: 4px 4px 14px; border-bottom: 1px solid var(--line); }
.rp-head-main { min-width: 0; }
.rp-head-main b { display: block; font-size: 15px; font-weight: 700; }
.rp-head-main em {
  display: block; margin-top: 2px; font-style: normal; font-size: 12.5px; color: var(--muted);
  line-height: 1.5; word-break: break-word;
}
.rp-amount { text-align: center; padding: 24px 0 16px; }
.rp-amount span { font-size: 17px; font-weight: 700; }
.rp-amount b { font-size: 38px; font-weight: 800; letter-spacing: -1.4px; margin-left: 2px; }
.rp-amount em { display: block; margin-top: 7px; font-style: normal; font-size: 12px; color: var(--muted); }
.rp-amount.waiting b { font-size: 32px; letter-spacing: -1px; }
.rp-amount.ghost b { font-size: 23px; letter-spacing: 0; }

.rp-open-btn {
  display: grid; place-items: center;
  width: 82px; height: 82px; margin: 0 auto 18px;
  border: 0; border-radius: 50%;
  background: radial-gradient(circle at 34% 28%, #ff9a72, #e63f2e 72%);
  color: #fff;
  box-shadow: 0 12px 26px rgba(227, 58, 43, .34), inset 0 2px 0 rgba(255, 255, 255, .34);
  transition: transform .14s ease;
}
.rp-open-btn span { font-size: 31px; font-weight: 700; line-height: 1; transform: translateY(-1px); }
.rp-open-btn:active { transform: scale(.93); }

.rp-meta {
  display: flex; justify-content: space-between;
  padding: 10px 4px; font-size: 11.5px; color: var(--muted);
}
.rp-list { max-height: 258px; overflow: auto; -webkit-overflow-scrolling: touch; }
.rp-row {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 4px; border-bottom: 1px solid var(--line);
}
.rp-row:last-child { border-bottom: 0; }
.rp-name {
  flex: 1; min-width: 0; font-size: 13.5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.rp-row.me .rp-name { font-weight: 700; }
.rp-got { flex: none; font-size: 13.5px; font-weight: 700; color: #e8402f; }
.rp-empty { padding: 18px 0; text-align: center; font-size: 12.5px; color: var(--muted); }
.rp-tip { padding: 4px 0 14px; text-align: center; font-size: 12.5px; color: var(--muted); }

@media (max-width: 340px) {
  .rp-form.two { grid-template-columns: 1fr; }
}


/* ===== 个性商城 ===== */
.mall-wrap { padding: 16px 16px 96px; display: flex; flex-direction: column; gap: 14px; }
.mall-vip { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 18px; background: linear-gradient(135deg, var(--accent-soft), transparent); border: 1px solid var(--accent-line); }
.mall-vip.is-svip { background: linear-gradient(135deg, rgba(255,193,7,.16), transparent); border-color: rgba(255,193,7,.35); }
.mv-badge { width: 42px; height: 42px; border-radius: 14px; display: flex; align-items: center; justify-content: center; background: var(--accent); color: #fff; flex: none; }
.mall-vip.is-svip .mv-badge { background: linear-gradient(135deg, #f5b53f, #e8960c); }
.mv-text { flex: 1; min-width: 0; }
.mv-text b { font-size: 15px; }
.mv-text em { display: block; font-style: normal; font-size: 12px; color: var(--text-2); margin-top: 2px; line-height: 1.45; }
.mall-module { padding: 16px; }
.mall-module-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.mall-module-title { font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.mall-module-sub { font-size: 12px; color: var(--muted); margin-top: 3px; }
.lock-chip { flex: none; font-size: 11px; padding: 3px 10px; border-radius: 999px; background: var(--card-2); color: var(--text-2); border: 1px solid var(--line); }
.lock-chip.vip { background: var(--accent-soft); color: var(--accent); border-color: var(--accent-line); }
.lock-chip.svip { background: rgba(255,176,36,.16); color: #d99a06; border-color: rgba(255,176,36,.42); }
.mall-body.is-locked { opacity: .5; pointer-events: none; filter: grayscale(.4); }
.color-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.color-row input[type=color] { width: 52px; height: 36px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); padding: 2px; cursor: pointer; }
.color-hex { font-size: 13px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.swatch-row { display: flex; flex-wrap: wrap; gap: 12px; }
.swatch { width: 30px; height: 30px; border-radius: 10px; border: 2px solid transparent; cursor: pointer; position: relative; padding: 0; }
.swatch.on { border-color: var(--text); box-shadow: 0 0 0 3px var(--accent-soft); }
.swatch[disabled] { cursor: not-allowed; }
.swatch-borders, .swatch-pendants { gap: 14px; }
.swatch-border, .swatch-pendant { display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: pointer; }
.swatch-border input, .swatch-pendant input { position: absolute; opacity: 0; pointer-events: none; }
.sb-box { width: 44px; height: 34px; border-radius: 10px; background: var(--card-2); border: 1.5px solid var(--line); }
.sb-box.bp-thin { border-width: 1px; border-color: var(--text-2); }
.sb-box.bp-double { border: 3px double var(--text-2); }
.sb-box.bp-color { border-color: var(--accent); border-width: 2px; }
.sb-box.bp-dashed { border-style: dashed; border-color: var(--text-2); }
.sc-label { font-size: 11.5px; color: var(--text-2); }
.swatch-border.on .sb-box, .swatch-pendant.on .sp-avatar { outline: 2px solid var(--accent); outline-offset: 2px; }
.sp-avatar { position: relative; width: 44px; height: 44px; border-radius: 50%; background: linear-gradient(135deg, #c7c2d6, #8d87a3); display: flex; align-items: center; justify-content: center; }
.sp-face { width: 26px; height: 26px; border-radius: 50%; background: rgba(255,255,255,.85); }
.sp-emoji { position: absolute; top: -4px; right: -4px; font-size: 16px; line-height: 1; }
.mall-actions { margin-top: 2px; }
.mall-reset { margin-top: 2px; }

/* 头像挂件叠加层 */
.av-pd { position: relative; display: inline-flex; flex: none; }
.av-pd-in { display: inline-flex; }
.av-pendant { position: absolute; top: -3px; right: -3px; font-size: 15px; line-height: 1; filter: drop-shadow(0 1px 2px rgba(0,0,0,.25)); }
.bubble-av .av-pendant { font-size: 9px; }

/* 名片边框预设 */
.me-card.bp-thin, .profile-card.bp-thin, .mp-card.bp-thin { border: 1px solid var(--text-2); }
.me-card.bp-double, .profile-card.bp-double, .mp-card.bp-double { border: 3px double var(--text-2); }
.me-card.bp-color, .profile-card.bp-color, .mp-card.bp-color {
  position: relative;
  border: 2px solid transparent;
}
.me-card.bp-color::before, .profile-card.bp-color::before, .mp-card.bp-color::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 2px;
  pointer-events: none;
  background: linear-gradient(135deg, #ff5b6e, #ffc24b, #4ecb8d, #4aa8ff, #9b7bff, #ff5b6e);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}
.me-card.bp-dashed, .profile-card.bp-dashed, .mp-card.bp-dashed { border: 1.5px dashed var(--text-2); }
.me-card.bp-dotted, .profile-card.bp-dotted, .mp-card.bp-dotted { border: 1.5px dotted var(--text-2); }


/* ===== 头像边框环 ===== */
.av-pd { position: relative; display: inline-flex; flex: none; }
.av-pd-in { display: inline-flex; border-radius: 50%; overflow: hidden; }
.av-pd-in .avatar { display: block; }
.af-gold .av-pd-in { box-shadow: 0 0 0 2px #f5b53f; }
.af-red .av-pd-in { box-shadow: 0 0 0 2px #ff3554; }
.af-blue .av-pd-in { box-shadow: 0 0 0 2px #4aa8ff; }
.af-purple .av-pd-in { box-shadow: 0 0 0 2px #9b7bff; }
.af-rainbow { border-radius: 50%; padding: 2px; background: conic-gradient(#ff5b6e, #ffc24b, #4ecb8d, #4aa8ff, #9b7bff, #ff5b6e); }
.af-rainbow .av-pd-in { box-shadow: none; }

/* 挂件角标 */
.av-pendant {
  position: absolute; top: -3px; right: -3px;
  width: 19px; height: 19px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; line-height: 1;
  background: #fff; border: 1px solid var(--line);
  box-shadow: 0 1px 3px rgba(0,0,0,.22);
}
.bubble-av .av-pendant { width: 14px; height: 14px; font-size: 9px; top: -4px; right: -5px; }

/* 商城：头像边框预览 */
.swatch-frames { gap: 14px; }
.swatch-frame { display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: pointer; }
.swatch-frame input { position: absolute; opacity: 0; pointer-events: none; }
.sf-avatar { position: relative; width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.sf-avatar .sp-face { width: 30px; height: 30px; border-radius: 50%; background: linear-gradient(135deg, #c7c2d6, #8d87a3); }
.sf-avatar.af-gold { box-shadow: 0 0 0 2px #f5b53f; }
.sf-avatar.af-red { box-shadow: 0 0 0 2px #ff3554; }
.sf-avatar.af-blue { box-shadow: 0 0 0 2px #4aa8ff; }
.sf-avatar.af-purple { box-shadow: 0 0 0 2px #9b7bff; }
.sf-avatar.af-rainbow { padding: 2px; background: conic-gradient(#ff5b6e, #ffc24b, #4ecb8d, #4aa8ff, #9b7bff, #ff5b6e); }
.sf-avatar.af-rainbow .sp-face { width: 28px; height: 28px; }
.swatch-frame.on .sf-avatar { outline: 2px solid var(--accent); outline-offset: 2px; }

/* 名片默认色板 */
.swatch-none { display: flex; align-items: center; justify-content: center; font-size: 10px; color: var(--text-2); background: var(--card-2); border: 1.5px dashed var(--line); }


/* ===== 商城分类标签（同会员页档位切换） ===== */
.cat-tabs { display: flex; gap: 8px; margin-bottom: 14px; }
.cat-chip {
  flex: 1; height: 40px; border-radius: 12px; border: 1.5px solid var(--line);
  background: var(--card); font-size: 13px; font-weight: 700; color: var(--muted);
  cursor: pointer; transition: .16s; padding: 0 4px; white-space: nowrap;
}
.cat-chip.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.swatch-colors { gap: 12px; }

/* 商城：头像边框 / 挂件 / 名片边框 选项均分网格 */
.swatch-frames, .swatch-pendants {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  justify-items: center;
  gap: 14px 10px;
}
.swatch-borders {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(78px, 1fr));
  justify-items: center;
  gap: 14px 10px;
}

/* 头像边框环 · 新增纯色 */
.af-green .av-pd-in { box-shadow: 0 0 0 2px #12a06a; }
.af-pink .av-pd-in { box-shadow: 0 0 0 2px #ff7eb0; }
.af-sunset { border-radius: 50%; padding: 2px; background: linear-gradient(135deg, #ffb03a, #ff5b6e, #e8739a); }
.af-sunset .av-pd-in { box-shadow: none; }
.af-ocean { border-radius: 50%; padding: 2px; background: linear-gradient(135deg, #38bdf8, #2dd4bf, #4aa8ff); }
.af-ocean .av-pd-in { box-shadow: none; }
.af-dotted .av-pd-in { box-shadow: none; border: 2px dotted var(--text-2); }
.af-dashed .av-pd-in { box-shadow: none; border: 2px dashed var(--text-2); }
.af-double .av-pd-in { box-shadow: none; border: 3px double var(--text-2); }

/* 边框预览 · 新增 */
.sb-box.bp-dotted { border-style: dotted; border-color: var(--text-2); }

/* 边框预览环 · 新增色 */
.sf-avatar.af-green { box-shadow: 0 0 0 2px #12a06a; }
.sf-avatar.af-pink { box-shadow: 0 0 0 2px #ff7eb0; }
.sf-avatar.af-sunset { padding: 2px; background: linear-gradient(135deg, #ffb03a, #ff5b6e, #e8739a); }
.sf-avatar.af-ocean { padding: 2px; background: linear-gradient(135deg, #38bdf8, #2dd4bf, #4aa8ff); }
.sf-avatar.af-dotted { box-shadow: none; border: 2px dotted var(--text-2); }
.sf-avatar.af-dashed { box-shadow: none; border: 2px dashed var(--text-2); }
.sf-avatar.af-double { box-shadow: none; border: 3px double var(--text-2); }


/* ===== 商城三大类分段切换（同会员页档位按钮） ===== */
.mall-cats { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.mc-btn {
  flex: 1 1 calc(33.333% - 6px); height: 42px; border-radius: 13px; border: 1.5px solid var(--line);
  background: var(--card); font-size: 13px; font-weight: 700; color: var(--muted);
  cursor: pointer; transition: .16s; display: flex; align-items: center; justify-content: center; gap: 5px;
  white-space: nowrap;
}
.mc-btn.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.mall-panel { display: flex; flex-direction: column; gap: 14px; }

/* 新增纯色边框环 */
.af-black .av-pd-in { box-shadow: 0 0 0 2px #14131a; }
.af-gray .av-pd-in { box-shadow: 0 0 0 2px #8d99ae; }
.af-orange .av-pd-in { box-shadow: 0 0 0 2px #ff8a3d; }
.af-brown .av-pd-in { box-shadow: 0 0 0 2px #a9714b; }
.af-cyan .av-pd-in { box-shadow: 0 0 0 2px #2dd4bf; }
.sf-avatar.af-black { box-shadow: 0 0 0 2px #14131a; }
.sf-avatar.af-gray { box-shadow: 0 0 0 2px #8d99ae; }
.sf-avatar.af-orange { box-shadow: 0 0 0 2px #ff8a3d; }
.sf-avatar.af-brown { box-shadow: 0 0 0 2px #a9714b; }
.sf-avatar.af-cyan { box-shadow: 0 0 0 2px #2dd4bf; }

/* 补充纯色边框环 */
.af-navy .av-pd-in { box-shadow: 0 0 0 2px #1e3a8a; }
.af-olive .av-pd-in { box-shadow: 0 0 0 2px #6b8e23; }
.af-wine .av-pd-in { box-shadow: 0 0 0 2px #9f1239; }
.af-lime .av-pd-in { box-shadow: 0 0 0 2px #84cc16; }
.sf-avatar.af-navy { box-shadow: 0 0 0 2px #1e3a8a; }
.sf-avatar.af-olive { box-shadow: 0 0 0 2px #6b8e23; }
.sf-avatar.af-wine { box-shadow: 0 0 0 2px #9f1239; }
.sf-avatar.af-lime { box-shadow: 0 0 0 2px #84cc16; }

/* 商城预览：气泡 + 名片（并排，紧凑） */
.mall-preview-card { padding: 16px; }
.mp-row { display: flex; gap: 12px; align-items: flex-start; }
.mp-block { flex: 1; min-width: 0; }
.mp-label { font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.mp-bubble-wrap { display: flex; }
.mp-bubble { max-width: 100%; font-size: 13px; padding: 8px 12px; }
.mp-card-block .profile-card { margin: 0; box-shadow: none; padding: 8px 10px; border-radius: 14px; }
.mp-card-block .profile-top { gap: 8px; align-items: center; }
.mp-card-block #pvAvatar { display: inline-flex; align-items: center; height: 34px; flex: none; }
.mp-card-block .profile-top .av-pd,
.mp-card-block .profile-top .avatar { margin-top: 0; }
.mp-card-block .av-pd, .mp-card-block .av-pd-in, .mp-card-block .avatar { width: 34px; height: 34px; flex: none; }
.mp-card-block .profile-name { display: flex; align-items: center; gap: 4px; font-size: 12.5px; line-height: 1.2; }
.mp-card-block .profile-name .vip-tag,
.mp-card-block .profile-name .vip-tag.svip,
.mp-card-block .profile-name .chip { height: auto; font-size: 9.5px; line-height: 1.2; padding: 1px 5px; }
.mp-card-block .profile-meta { font-size: 9.5px; margin-top: 1px; line-height: 1.2; }
.mp-card-block .profile-bio { font-size: 10.5px; margin-top: 5px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mp-card-block .profile-stats { margin-top: 6px; padding-top: 6px; }
.mp-card-block .pstat { display: flex; flex-direction: column; align-items: center; line-height: 1; padding: 0; }
.mp-card-block .pstat b { font-size: 12.5px; line-height: 1; }
.mp-card-block .pstat span { font-size: 9px; line-height: 1; margin-top: 1px; }

@media (max-width: 640px) {
  .mp-row { flex-direction: column; gap: 10px; }
  .mp-card-block .profile-card { padding: 10px 12px; }
  .mp-card-block .av-pd, .mp-card-block .av-pd-in, .mp-card-block .avatar { width: 36px; height: 36px; }
}

/* ---------------- 添加到桌面引导 ---------------- */
.drawer-home { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.drawer-menu .drawer-action,
.drawer-home .drawer-action {
  display: flex; align-items: center; gap: 14px; width: 100%;
  padding: 13px 4px; font-size: 15px; color: var(--text-2);
  background: none; border: 0; cursor: pointer; font-family: inherit; text-align: left;
}
.drawer-menu .drawer-action svg,
.drawer-home .drawer-action svg { color: var(--muted); }
.home-sub { font-size: 13px; color: var(--muted); margin: -6px 0 16px; line-height: 1.5; }
.home-steps { display: grid; gap: 14px; margin-bottom: 18px; }
.home-step { display: flex; align-items: flex-start; gap: 12px; font-size: 14.5px; color: var(--text-2); line-height: 1.5; }
.home-num { flex: 0 0 22px; height: 22px; border-radius: 50%; background: var(--card-2); color: var(--text-2); font-size: 12.5px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.home-tip { margin: 4px 0 0; font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.home-preview { display: flex; align-items: center; gap: 14px; padding: 4px 2px 18px; }
.home-preview-img { width: 60px; height: 60px; border-radius: 16px; box-shadow: 0 4px 14px rgba(255, 39, 72, .22); }
.home-preview-info { display: grid; gap: 4px; min-width: 0; }
.home-preview-info b { font-size: 16px; font-weight: 800; color: var(--text); }
.home-preview-info span { font-size: 12.5px; color: var(--muted); }
.home-install { margin: 2px 0 18px; }
.home-brand-note { margin: 2px 0 12px; font-size: 13px; font-weight: 600; color: var(--accent); }
.home-steps-list { display: grid; gap: 14px; margin-bottom: 18px; }
.home-state { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px; background: var(--card-2); font-size: 14px; color: var(--text-2); }
.home-state.on { color: var(--accent); font-weight: 700; }
.home-state-dot { flex: 0 0 22px; height: 22px; border-radius: 50%; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 13px; }
.sn-home-btn { font-family: inherit; cursor: pointer; }
@media (max-width: 640px) {
  .drawer-menu .drawer-action,
  .drawer-home .drawer-action { padding: 9px 2px; font-size: 13.5px; gap: 10px; }
  .drawer-menu .drawer-action svg,
  .drawer-home .drawer-action svg { width: 18px; height: 18px; }
}

/* 主页：关注 / 私信按钮；窄屏在信息右侧上下竖排，不横向挤压名字 */
.profile-actions { display: flex; flex-direction: column; gap: 8px; align-items: stretch; flex: 0 0 auto; width: 82px; }
.profile-actions .btn { flex: 1 1 auto; width: 100%; min-width: 0; justify-content: center; line-height: 1; white-space: nowrap; }
.profile-actions .btn svg { flex: none; }

/* 宽屏（桌面）恢复头像 / 信息 / 按钮横排等大并排 */
@media (min-width: 1024px) {
  .profile-actions { flex-direction: row; width: auto; }
  .profile-actions .btn { flex: 1 1 0; min-width: 86px; }
}

/* 正文 / 聊天气泡内可点击链接 */
.lnk { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; word-break: break-all; }
.bubble .lnk { color: inherit; }

/* ---------------- 按压反馈与切换过渡（仅廉价属性，不改尺寸/配色） ---------------- */
.menu-item { transition: background-color .18s ease, color .18s ease; }
.menu-item:active { background: var(--card-2); }
.drawer-menu a:active { background: var(--card-2); opacity: .9; }
.tab { transition: color .2s, opacity .18s ease; }
.tab:active { opacity: .7; }
.sn-item:active { background: var(--card-2); }
.ucard:active { transform: scale(.985); }
#msgPane > * { animation: rise .22s cubic-bezier(.22,.85,.3,1); }


/* ---------------- 全局点击按压手感补齐（仅过渡/透明度/背景，不改布局与配色） ---------------- */
.chat-who { transition: opacity .16s ease; }
.panel-tool i { transition: background .16s ease, color .16s ease, border-color .16s ease; }
.sheet-item { transition: background .16s ease; }
.pick-item { transition: background .16s ease; }
.gnew { transition: transform .16s ease, box-shadow .2s ease; }
.member-main { transition: background .16s ease; }
.rec-btn { transition: opacity .16s ease, background .16s ease; }
.rec-btn:active { opacity: .8; }
.rp-tab:active { opacity: .85; }
.rp-submit { transition: transform .16s ease, opacity .2s ease; }
.rp-submit:active { transform: scale(.97); }
.post-who { transition: opacity .16s ease; }
.post-who:active { opacity: .85; }
.section-more { transition: opacity .16s ease; }
.section-more:active { opacity: .7; }
.notice-bar { transition: opacity .16s ease; }
.notice-bar:active { opacity: .85; }
.emoji-panel .emoji { transition: background .16s ease; }
.emoji-panel .emoji:active { background: var(--card-2); }
.mv-main, .cp-main { transition: opacity .16s ease; }
.mv-main:active, .cp-main:active { opacity: .85; }
.post-main { transition: opacity .16s ease; }
.post-main:active { opacity: .82; }

a, button, .act, .cbtn, .sn-item, .msg-item, .ucard, .board-card, .sheet-item, .pick-item, .menu-item, .more-item, .post, .pstat, .rp-tab, .gnew, .tab, .pills a, .member-main, .cp-main, .mv-main, .post-who { touch-action: manipulation; }
