/* 符清露笔记 · 全站公共样式（参照广告帮：浅色清爽 / 支持暗色切换） */
:root {
  --bg: #f4f5fa;
  --bg-deep: #e9ecf4;
  --surface: #ffffff;
  --surface-2: #f8f9fd;
  --surface-3: #eef0f7;
  --border: #e7e9f1;
  --border-strong: #d6d9e6;
  --text: #202338;
  --text-2: #5b6076;
  --text-dim: #969bab;
  --accent: #6c6cff;
  --accent-2: #8b7bff;
  --accent-soft: #eef0ff;
  --pink: #ff6f91;
  --pink-soft: #fff0f4;
  --teal: #12b8a6;
  --teal-soft: #e5faf6;
  --amber: #f5a623;
  --amber-soft: #fff6e5;
  --red: #e5484d;
  --red-soft: #ffeff0;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 4px 18px rgba(30, 36, 80, .06);
  --shadow-lg: 0 14px 40px rgba(30, 36, 80, .14);
  /* 底部导航黑红切换 */
  --nav-off: #1a1a24;   /* 未选中：黑 */
  --nav-on: #e5484d;    /* 选中：红 */
}
[data-theme="dark"] {
  --bg: #12121f;
  --bg-deep: #0b0b14;
  --surface: #1c1c2e;
  --surface-2: #232338;
  --surface-3: #2a2a42;
  --border: #2e2e46;
  --border-strong: #3b3b58;
  --text: #e9e9f4;
  --text-2: #b2b3c8;
  --text-dim: #83849b;
  --accent: #8080ff;
  --accent-2: #9d8cff;
  --accent-soft: rgba(108, 108, 255, .18);
  --pink: #ff86a3;
  --pink-soft: rgba(255, 111, 145, .16);
  --teal: #35d0bd;
  --teal-soft: rgba(38, 198, 185, .16);
  --amber: #f8b84e;
  --amber-soft: rgba(245, 166, 35, .14);
  --red: #ff6b70;
  --red-soft: rgba(229, 72, 77, .16);
  --shadow: 0 4px 18px rgba(0, 0, 0, .28);
  --shadow-lg: 0 14px 40px rgba(0, 0, 0, .45);
  --nav-off: #c9cad8;  /* 暗色下未选中：浅灰（近似黑系反色） */
  --nav-on: #ff5a5f;
}
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg-deep); color: var(--text); line-height: 1.5; min-height: 100vh; font-size: 14px;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }
img { max-width: 100%; display: block; }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 10px; }

/* 手机框架 */
.phone { max-width: 480px; margin: 0 auto; min-height: 100vh; background: var(--bg); position: relative; padding-bottom: calc(74px + env(safe-area-inset-bottom)); box-shadow: 0 0 60px rgba(20,24,60,.08); }
@media (min-width: 520px) { .phone { border-left: 1px solid var(--border); border-right: 1px solid var(--border); } }

/* 顶栏 */
.topbar { position: sticky; top: 0; z-index: 60; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(14px); border-bottom: 1px solid var(--border); }
.topbar-inner { padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.brand { display: flex; align-items: center; gap: 8px; font-size: 18px; font-weight: 800; letter-spacing: -.3px; }
.brand .logo { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: linear-gradient(135deg, var(--accent), var(--pink)); color: #fff; font-size: 19px; }
.brand small { display: block; font-size: 10px; color: var(--text-dim); font-weight: 500; letter-spacing: 0; }
.topbar-actions { display: flex; align-items: center; gap: 6px; }
.icon-btn { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--border); font-size: 17px; transition: .15s; }
.icon-btn:hover { border-color: var(--accent); transform: translateY(-1px); }

/* 按钮 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 999px; padding: 9px 16px; font-size: 13px; font-weight: 600; transition: .15s; white-space: nowrap; }
.btn:hover { border-color: var(--accent); color: var(--accent); }
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 4px 12px rgba(108,108,255,.25); }
.btn-primary:hover { background: var(--accent-2); border-color: var(--accent-2); color: #fff; }
.btn-pink { background: var(--pink); border-color: var(--pink); color: #fff; }
.btn-pink:hover { opacity: .9; }
.btn-danger { background: var(--red-soft); border-color: transparent; color: var(--red); }
.btn-danger:hover { background: var(--red); color: #fff; border-color: var(--red); }
.btn-sm { padding: 5px 11px; font-size: 12px; }
.btn-lg { padding: 13px 24px; font-size: 15px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }

/* 标签 / 胶囊 */
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 600; background: var(--surface-3); color: var(--text-2); white-space: nowrap; }
.chip-accent { background: var(--accent-soft); color: var(--accent); }
.chip-pink { background: var(--pink-soft); color: var(--pink); }
.chip-teal { background: var(--teal-soft); color: var(--teal); }
.chip-amber { background: var(--amber-soft); color: var(--amber); }
.chip-red { background: var(--red-soft); color: var(--red); }

/* 卡片 / 区块 */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.pad { padding: 16px; }
.section { padding: 16px; }
.section-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.section-title h2 { font-size: 17px; font-weight: 800; letter-spacing: -.2px; display: flex; align-items: center; gap: 7px; }
.section-title .more { font-size: 12px; color: var(--text-dim); display: flex; align-items: center; gap: 3px; }
.muted { color: var(--text-dim); }
.dim { color: var(--text-2); }
.tiny { font-size: 11px; }
.small { font-size: 12px; }
.bold { font-weight: 700; }
.center { text-align: center; }
.row { display: flex; align-items: center; gap: 10px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; } .mt24 { margin-top: 24px; }
.divider { height: 1px; background: var(--border); margin: 12px 0; }

/* 搜索栏 */
.searchbar { display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 9px 14px; }
.searchbar input { flex: 1; border: none; outline: none; background: transparent; min-width: 0; }
.searchbar .ico { font-size: 16px; }

/* 分类横向滚动 */
.cat-scroll { display: flex; gap: 8px; overflow-x: auto; padding: 12px 16px 4px; scrollbar-width: none; }
.cat-scroll::-webkit-scrollbar { display: none; }
.cat-item { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 5px; min-width: 62px; padding: 10px 8px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); transition: .18s; }
.cat-item:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.cat-item.active { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 6px 16px rgba(108,108,255,.28); }
.cat-item .ico { font-size: 22px; line-height: 1; }
.cat-item .name { font-size: 11px; font-weight: 600; white-space: nowrap; }

/* ========== 竖版图文卡片（高4:宽3，即 aspect-ratio 3/4） ========== */
.photo-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 12px 16px; }
.note-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 12px 16px; }
.media-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: .2s; cursor: pointer; display: flex; flex-direction: column; }
.media-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--accent); }
.media-cover { aspect-ratio: 3 / 4; width: 100%; position: relative; display: grid; place-items: center; overflow: hidden; background-size: cover; background-position: center; }
.media-cover::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(0,0,0,.10)); }
.media-cover .emoji { font-size: 60px; filter: drop-shadow(0 6px 8px rgba(0,0,0,.12)); z-index: 1; }
.media-cover .badge { position: absolute; top: 8px; left: 8px; z-index: 2; background: rgba(255,255,255,.92); color: var(--accent); font-size: 10px; font-weight: 800; padding: 3px 8px; border-radius: 999px; }
.media-cover .views { position: absolute; top: 8px; right: 8px; z-index: 2; background: rgba(0,0,0,.4); color: #fff; font-size: 10px; padding: 3px 7px; border-radius: 999px; }
.media-cover .cat-chip { position: absolute; top: 8px; right: 8px; z-index: 2; color: #fff; font-size: 10px; font-weight: 700; text-shadow: 0 1px 4px rgba(0,0,0,.7), 0 0 2px rgba(0,0,0,.5); max-width: 82px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.media-body { padding: 9px 10px 10px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.media-title { font-size: 13px; font-weight: 800; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.media-desc { font-size: 11px; color: var(--text-dim); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.media-meta { display: flex; flex-direction: column; align-items: stretch; gap: 4px; font-size: 11px; color: var(--text-2); margin-top: auto; padding-top: 4px; }
.media-meta .meta-line { display: flex; align-items: center; justify-content: space-between; gap: 6px; white-space: nowrap; }
.media-meta .meta-line .meta-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.media-meta .type-tag { flex: 0 0 auto; font-size: 10px; line-height: 1.5; color: var(--accent); background: var(--surface-3); padding: 1px 6px; border-radius: 5px; }
.media-meta .stat-line { display: flex; align-items: center; justify-content: flex-end; gap: 9px; }
.media-meta .stat { display: inline-flex; align-items: center; gap: 3px; }
.media-meta .stat.red { color: var(--nav-on); }

/* 底部导航：黑红切换 */
.bottom-nav { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: min(480px, 100%); height: calc(64px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: color-mix(in srgb, var(--surface) 96%, transparent); backdrop-filter: blur(14px); border-top: 1px solid var(--border); z-index: 70; display: flex; }
.nav-item { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--nav-off); font-size: 10px; font-weight: 600; transition: color .18s; }
.nav-item .ico { width: 23px; height: 23px; display: grid; place-items: center; }
.nav-item .ico svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; transition: stroke .18s; }
.nav-item.active { color: var(--nav-on); font-weight: 800; }
.nav-item.active .ico svg { stroke-width: 2.3; filter: drop-shadow(0 3px 6px rgba(229,72,77,.35)); }
.nav-item:active { transform: scale(.93); }

/* 表单 */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12px; font-weight: 700; color: var(--text-2); margin-bottom: 6px; }
.field input, .field select, .field textarea { width: 100%; border: 1px solid var(--border-strong); background: var(--surface); border-radius: var(--radius-sm); padding: 10px 12px; outline: none; transition: .15s; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field textarea { min-height: 80px; resize: vertical; }
.field-hint { font-size: 11px; color: var(--text-dim); margin-top: 5px; }
.inline-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* 空状态 / 加载 */
.empty { padding: 60px 20px; text-align: center; color: var(--text-dim); }
.empty .ico { font-size: 46px; opacity: .55; margin-bottom: 10px; }
.loading { padding: 48px; text-align: center; color: var(--text-dim); }
.spinner { width: 26px; height: 26px; border: 3px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; margin: 0 auto 10px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Toast */
#toastBox { position: fixed; top: 20px; left: 50%; transform: translateX(-50%); z-index: 9999; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: rgba(30, 32, 50, .94); color: #fff; padding: 10px 18px; border-radius: 999px; font-size: 13px; font-weight: 600; box-shadow: var(--shadow-lg); animation: toastIn .25s ease; max-width: 86vw; text-align: center; }
.toast.success { background: var(--teal); }
.toast.error { background: var(--red); }
@keyframes toastIn { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: none; } }

/* 模态框 */
.modal-mask { position: fixed; inset: 0; background: rgba(12, 14, 30, .5); backdrop-filter: blur(3px); z-index: 500; display: grid; place-items: center; padding: 20px; animation: fadeIn .18s; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; width: min(420px, 100%); max-height: 86vh; overflow: auto; box-shadow: var(--shadow-lg); animation: modalIn .22s; }
@keyframes modalIn { from { transform: translateY(18px) scale(.97); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-head { padding: 16px 18px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.modal-head h3 { font-size: 16px; font-weight: 800; }
.modal-body { padding: 18px; }
.modal-foot { padding: 14px 18px; border-top: 1px solid var(--border); display: flex; gap: 8px; justify-content: flex-end; }

/* 详情页 */
.detail-hero { min-height: 220px; position: relative; background-size: cover; background-position: center; display: grid; place-items: center; overflow: hidden; }
.detail-hero .emoji { font-size: 96px; filter: drop-shadow(0 10px 14px rgba(0,0,0,.2)); }
.detail-hero .back { position: absolute; top: 12px; left: 12px; width: 36px; height: 36px; border-radius: 50%; background: rgba(0,0,0,.4); color: #fff; display: grid; place-items: center; font-size: 18px; z-index: 3; }
/* 正文下方图片区：封面图在前、相册在后 */
.detail-gallery { display: grid; gap: 8px; margin-top: 14px; }
.detail-gallery img { width: 100%; display: block; border-radius: 12px; }
/* 详情页顶部品牌栏（与首页一致，左侧返回） */
.detail-topbar-left { display: flex; align-items: center; gap: 8px; min-width: 0; }
.detail-topbar .brand { font-size: 16px; min-width: 0; }
.detail-topbar .brand > div { min-width: 0; }
.detail-topbar .brand > div > span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.detail-back { flex: 0 0 auto; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--border); font-size: 22px; line-height: 1; cursor: pointer; }
.detail-body { padding: 16px; }
.detail-title { font-size: 20px; font-weight: 800; line-height: 1.4; }
.detail-content { font-size: 14px; line-height: 1.9; color: var(--text-2); white-space: pre-wrap; margin-top: 14px; }
.detail-imgs { display: grid; gap: 8px; margin-top: 14px; }
.detail-imgs img { width: 100%; border-radius: 12px; }
.action-bar { display: flex; align-items: center; gap: 16px; padding: 14px 16px; border-top: 1px solid var(--border); }
.action-btn { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: var(--text-2); transition: .15s; }
.action-btn.liked { color: var(--nav-on); }
.action-btn:active { transform: scale(.94); }

/* 评论区 */
.comment-item { display: flex; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.comment-item:last-child { border-bottom: none; }
.cmt-avatar { width: 36px; height: 36px; border-radius: 50%; flex: 0 0 auto; display: grid; place-items: center; font-size: 19px; background: var(--surface-3); overflow: hidden; }
.cmt-avatar-chat { cursor: pointer; transition: .12s; }
.cmt-avatar-chat:hover { box-shadow: 0 0 0 2px var(--accent); }
.cmt-chat-btn { font-size: 10px; color: var(--accent); cursor: pointer; margin-left: 6px; font-weight: 700; }
.cmt-chat-btn:hover { text-decoration: underline; }
.cmt-body { flex: 1; min-width: 0; }
.cmt-name { font-size: 12px; font-weight: 800; }
.cmt-time { font-size: 10px; color: var(--text-dim); margin-left: 6px; font-weight: 400; }
.cmt-text { font-size: 13px; margin-top: 3px; line-height: 1.5; word-break: break-word; }
.comment-input-row { display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--border); position: sticky; bottom: calc(64px + env(safe-area-inset-bottom)); background: var(--surface); z-index: 60; }
.comment-input-row input { flex: 1; border: 1px solid var(--border-strong); background: var(--surface); border-radius: 999px; padding: 9px 14px; outline: none; }
.comment-input-row input:focus { border-color: var(--accent); }

/* 登录页 / 我的 */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: radial-gradient(circle at 20% 10%, var(--accent-soft), transparent 45%), var(--bg-deep); }
.login-box { width: min(400px, 100%); background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 28px; box-shadow: var(--shadow-lg); }
.login-box .brand { justify-content: center; font-size: 22px; margin-bottom: 6px; }
.login-box .sub { text-align: center; color: var(--text-dim); font-size: 12px; margin-bottom: 24px; }
.seg { display: flex; background: var(--surface-3); border-radius: 10px; padding: 3px; margin-bottom: 18px; }
.seg button { flex: 1; padding: 8px; border-radius: 8px; font-size: 13px; font-weight: 700; color: var(--text-2); }
.seg button.on { background: var(--surface); color: var(--accent); box-shadow: var(--shadow); }
.profile-hero { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: var(--surface); border-bottom: 1px solid var(--border); }
.profile-avatar { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; font-size: 38px; background: linear-gradient(135deg, var(--accent-soft), var(--pink-soft)); margin: 0 auto 12px; border: 3px solid var(--surface); box-shadow: var(--shadow); overflow: hidden; }
.profile-hero .profile-avatar { width: 62px; height: 62px; font-size: 32px; margin: 0; flex: 0 0 auto; border-width: 2px; cursor: pointer; }
.profile-avatar img { display: block; }
.profile-meta { flex: 1; min-width: 0; }
.profile-title { display: flex; align-items: center; gap: 7px; min-width: 0; }
.profile-hero .profile-name { font-size: 16px; line-height: 1.2; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-role { flex: 0 0 auto; font-size: 10px; font-weight: 700; color: var(--accent); background: var(--accent-soft); padding: 2px 7px; border-radius: 999px; }
.profile-lines { display: flex; align-items: center; gap: 6px; margin-top: 5px; font-size: 11px; color: var(--text-dim); min-width: 0; }
.profile-lines > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-lines .sep { flex: 0 0 auto; color: var(--border-strong); }
.profile-edit-btn { flex: 0 0 auto; padding: 6px 10px; font-size: 11px; border-radius: 999px; }
.emoji-picker { display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; }
.emoji-opt { display: grid; place-items: center; aspect-ratio: 1; font-size: 20px; border-radius: 8px; cursor: pointer; border: 2px solid transparent; transition: .12s; }
.emoji-opt:hover { background: var(--surface-2); }
.emoji-opt.on { border-color: var(--accent); background: var(--accent-soft); }
/* 后台图标选择器（弹窗式） */
.icon-input-row { display: flex; align-items: stretch; gap: 6px; }
.icon-input-row input { flex: 1; min-width: 0; text-align: center; font-size: 15px; }
.icon-pick-btn { flex: 0 0 auto; padding: 6px 10px; font-size: 12px; }
.icon-dialog { width: min(480px, 100%); }
.icon-dialog .modal-body { padding: 14px; }
.icon-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.icon-tab { font-size: 12px; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text-dim); cursor: pointer; transition: .12s; }
.icon-tab.on { color: #fff; background: var(--accent); border-color: var(--accent); font-weight: 700; }
.icon-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.icon-opt { display: grid; place-items: center; aspect-ratio: 1; font-size: 22px; border-radius: 10px; cursor: pointer; border: 2px solid transparent; transition: .12s; }
.icon-opt:hover { background: var(--surface-2); }
.icon-opt.on { border-color: var(--accent); background: var(--accent-soft); }
/* 资料编辑弹窗 */
.profile-edit-modal .field { margin-bottom: 10px; }
.profile-name { font-size: 18px; font-weight: 800; }
.menu-list { padding: 0 16px; }
.menu-item { display: flex; align-items: center; gap: 12px; padding: 14px 4px; border-bottom: 1px solid var(--border); font-size: 14px; }
.menu-item:last-child { border-bottom: none; }
.menu-item .mi-ico { font-size: 20px; width: 28px; text-align: center; }
.menu-item .mi-arrow { margin-left: auto; color: var(--text-dim); }
.menu-item { cursor: pointer; transition: .12s; }
.menu-item:active { background: var(--surface-2); }
.unread-badge { background: var(--nav-on); color: #fff; font-size: 10px; font-weight: 800; min-width: 18px; height: 18px; line-height: 18px; text-align: center; border-radius: 9px; padding: 0 5px; margin-left: 6px; }

/* ===== 会员子视图：我的评论 / 私信消息 ===== */
.subview { min-height: 100%; }
.subview-head { display: flex; align-items: center; gap: 6px; padding: 12px 14px; border-bottom: 1px solid var(--border); background: var(--surface); position: sticky; top: 0; z-index: 5; }
.subview-head h2 { font-size: 15px; font-weight: 800; display: flex; align-items: center; gap: 6px; }
.subview-head .back-btn { border: none; background: none; font-size: 26px; color: var(--text); cursor: pointer; line-height: 1; padding: 0 4px; }
.subview-body { padding: 12px 14px; }
/* 我的评论卡 */
.my-cmt-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px; margin-bottom: 10px; box-shadow: var(--shadow); }
.my-cmt-target { display: flex; align-items: center; gap: 7px; cursor: pointer; padding-bottom: 8px; border-bottom: 1px dashed var(--border); }
.my-cmt-target .target-tag { font-size: 10px; font-weight: 700; color: var(--accent); background: var(--accent-soft); padding: 2px 7px; border-radius: 999px; flex: 0 0 auto; }
.my-cmt-target .target-title { font-size: 12px; font-weight: 700; color: var(--text-2); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.my-cmt-target .target-go { color: var(--text-dim); font-size: 18px; }
.my-cmt-content { font-size: 13px; line-height: 1.6; margin: 9px 0 6px; word-break: break-word; }
.my-cmt-time { font-size: 10px; color: var(--text-dim); }
/* 会话列表 */
.conv-item { display: flex; align-items: center; gap: 11px; padding: 12px 4px; border-bottom: 1px solid var(--border); cursor: pointer; }
.conv-item:active { background: var(--surface-2); }
.conv-avatar { width: 44px; height: 44px; border-radius: 50%; flex: 0 0 auto; display: grid; place-items: center; font-size: 24px; background: var(--surface-3); overflow: hidden; }
.conv-main { flex: 1; min-width: 0; }
.conv-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.conv-name { font-size: 13px; font-weight: 800; }
.conv-time { font-size: 10px; color: var(--text-dim); flex: 0 0 auto; }
.conv-last { font-size: 12px; color: var(--text-2); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* 聊天 */
.chat-view { min-height: 100%; }
.chat-body { padding: 14px; overflow-y: auto; }
.chat-row { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 14px; }
.chat-row.mine { flex-direction: row-reverse; }
.chat-author { flex: 0 0 auto; width: 44px; display: flex; flex-direction: column; align-items: center; gap: 3px; }
.chat-avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-size: 20px; background: var(--surface-3); overflow: hidden; border: 1px solid var(--border); }
.chat-name { max-width: 44px; font-size: 10px; color: var(--text-dim); text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-bubble { max-width: 72%; padding: 9px 12px; border-radius: 14px 14px 14px 4px; background: var(--surface); border: 1px solid var(--border); font-size: 13px; line-height: 1.55; word-break: break-word; box-shadow: var(--shadow); }
.chat-row.mine .chat-bubble { background: var(--accent); color: #fff; border-color: var(--accent); border-radius: 14px 14px 4px 14px; }
.chat-input-row { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--border); background: var(--surface); position: sticky; bottom: 0; }
.chat-input-row input { flex: 1; min-width: 0; border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--text); border-radius: 999px; padding: 9px 14px; outline: none; font-size: 13px; }
.chat-input-row input:focus { border-color: var(--accent); }

/* 首页 banner */
.hero-banner { margin: 12px 16px 4px; padding: 18px; border-radius: 18px; position: relative; overflow: hidden; background: linear-gradient(120deg, #6c6cff, #9b7bff 55%, #ff8fb1); color: #fff; box-shadow: 0 10px 26px rgba(108,108,255,.28); }
.hero-banner h2 { font-size: 18px; font-weight: 800; letter-spacing: -.3px; }
.hero-banner p { font-size: 11px; opacity: .92; margin-top: 6px; line-height: 1.6; }
.hero-banner .deco { position: absolute; right: 10px; bottom: -12px; font-size: 76px; opacity: .32; transform: rotate(-12deg); }
.hero-banner .mini { display: inline-block; margin-top: 12px; background: rgba(255,255,255,.22); border: 1px solid rgba(255,255,255,.35); padding: 5px 12px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.notice-strip { margin: 12px 16px 0; padding: 9px 12px; border-radius: 11px; background: var(--amber-soft); color: #000; font-size: 11px; font-weight: 600; display: flex; align-items: center; gap: 7px; }

/* ===== 后台布局 ===== */
.admin-layout { display: grid; grid-template-columns: 220px 1fr; min-height: 100vh; max-width: 1500px; margin: 0 auto; background: var(--bg); }
.sidebar { background: var(--surface); border-right: 1px solid var(--border); padding: 18px 12px; position: sticky; top: 0; height: 100vh; overflow: auto; }
.sidebar .brand { padding: 4px 8px 20px; }
.side-group { font-size: 10px; font-weight: 800; color: var(--text-dim); padding: 14px 10px 6px; letter-spacing: 1px; }
.side-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; font-size: 13px; font-weight: 600; color: var(--text-2); margin-bottom: 3px; transition: .15s; cursor: pointer; }
.side-item:hover { background: var(--surface-2); color: var(--text); }
.side-item.active { background: var(--accent-soft); color: var(--accent); font-weight: 800; }
.side-item .ico { font-size: 17px; width: 22px; text-align: center; }
.side-foot { margin-top: 24px; padding: 12px; border-top: 1px solid var(--border); font-size: 11px; color: var(--text-dim); }
.admin-main { min-width: 0; }
.admin-top { background: var(--surface); border-bottom: 1px solid var(--border); padding: 14px 24px; display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 40; }
.admin-top h1 { font-size: 18px; font-weight: 800; }
.admin-content { padding: 22px 24px 60px; }
.page { display: none; }
.page.active { display: block; animation: fadeIn .2s; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.page-head h2 { font-size: 17px; font-weight: 800; }
/* 后台消息管理双栏 */
.msg-layout { display: grid; grid-template-columns: 300px 1fr; gap: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; min-height: 560px; box-shadow: var(--shadow); }
.msg-conv-list { border-right: 1px solid var(--border); overflow-y: auto; max-height: 640px; }
.admin-conv-item { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--border); cursor: pointer; }
.admin-conv-item:hover { background: var(--surface-2); }
.admin-conv-item.on { background: var(--accent-soft); }
.msg-chat-panel { display: flex; flex-direction: column; min-width: 0; max-height: 640px; }
.msg-chat-head { padding: 12px 16px; border-bottom: 1px solid var(--border); font-size: 14px; display: flex; align-items: center; gap: 8px; }
.msg-chat-body { flex: 1; overflow-y: auto; padding: 16px; background: var(--surface-2); }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.stat-card .label { font-size: 12px; color: var(--text-dim); display: flex; align-items: center; gap: 6px; }
.stat-card .value { font-size: 25px; font-weight: 800; letter-spacing: -.5px; margin-top: 8px; }
.stat-card .hint { font-size: 11px; color: var(--text-dim); margin-top: 4px; }
.stat-card .value.accent { color: var(--accent); }
.stat-card .value.pink { color: var(--pink); }
.stat-card .value.teal { color: var(--teal); }
.stat-card .value.amber { color: var(--amber); }
.table-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
table.tb { width: 100%; border-collapse: collapse; font-size: 13px; }
table.tb th { background: var(--surface-2); text-align: left; padding: 11px 14px; font-size: 11px; font-weight: 800; color: var(--text-dim); border-bottom: 1px solid var(--border); white-space: nowrap; }
table.tb td { padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.tb tr:last-child td { border-bottom: none; }
table.tb tr:hover td { background: var(--surface-2); }
.tb-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.tile-thumb { width: 44px; height: 56px; border-radius: 8px; display: grid; place-items: center; font-size: 24px; background: var(--surface-3); background-size: cover; background-position: center; flex: 0 0 auto; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.filters input, .filters select { border: 1px solid var(--border-strong); background: var(--surface); border-radius: 9px; padding: 8px 11px; outline: none; }
.filters input:focus, .filters select:focus { border-color: var(--accent); }
.tabbar { display: flex; gap: 4px; background: var(--surface-2); padding: 4px; border-radius: 11px; margin-bottom: 14px; overflow-x: auto; }
.tabbar button { padding: 7px 14px; border-radius: 8px; font-size: 12px; font-weight: 700; color: var(--text-2); white-space: nowrap; }
.tabbar button.active { background: var(--surface); color: var(--accent); box-shadow: var(--shadow); }
.switch { position: relative; width: 42px; height: 24px; border-radius: 12px; background: var(--border-strong); transition: .2s; flex: 0 0 auto; display: inline-block; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch.on { background: var(--accent); }
.switch.on::after { transform: translateX(18px); }
.img-picker { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.img-thumb { width: 64px; height: 80px; border-radius: 8px; border: 1px solid var(--border); background-size: cover; background-position: center; position: relative; overflow: hidden; }
.img-thumb .del { position: absolute; top: 2px; right: 2px; width: 18px; height: 18px; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; font-size: 12px; display: grid; place-items: center; }
.img-add { width: 64px; height: 80px; border-radius: 8px; border: 2px dashed var(--border-strong); display: grid; place-items: center; font-size: 22px; color: var(--text-dim); cursor: pointer; }

@media (max-width: 820px) {
  .admin-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; border-right: none; border-bottom: 1px solid var(--border); padding: 12px; }
  .sidebar .brand { padding-bottom: 10px; }
  .side-nav { display: flex; gap: 6px; overflow-x: auto; }
  .side-group, .side-foot { display: none; }
  .side-item { white-space: nowrap; margin: 0; }
  .admin-content { padding: 16px 12px 40px; }
  .admin-top { padding: 12px 16px; }
}
