/* ================= 基础 ================= */
*, *::before, *::after { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
:root {
  --red: #ff2442;
  --red-soft: #ffeef1;
  --text: #222;
  --sub: #8f8f8f;
  --line: #f0f0f0;
  --bg: #ffffff;
  --page: #f4f5f7;
  --radius: 12px;
  --nav-h: 56px;
}
html { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 15px;
  color: var(--text);
  background: var(--bg);
  max-width: 560px;
  margin: 0 auto;
  min-height: 100%;
  position: relative;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; border: 0; background: none; padding: 0; cursor: pointer; color: inherit; }
input, textarea, select { font-family: inherit; font-size: 15px; color: var(--text); outline: none; }
img { -webkit-user-drag: none; }
.ic { width: 22px; height: 22px; display: inline-block; vertical-align: middle; }
.ic-lg { width: 26px; height: 26px; }
.ic-sm { width: 17px; height: 17px; }

/* ================= 通用组件 ================= */
.btn { display: inline-flex; align-items: center; justify-content: center; height: 42px; padding: 0 20px; border-radius: 21px; font-size: 15px; font-weight: 600; background: #f3f3f3; color: #333; }
.btn-primary { background: var(--red); color: #fff; }
.btn-outline { background: #fff; border: 1px solid var(--red); color: var(--red); }
.btn-sm { height: 30px; padding: 0 14px; font-size: 13px; border-radius: 15px; }
.btn-block { width: 100%; }
.btn:active { opacity: .85; }
.chip { display: inline-flex; align-items: center; height: 30px; padding: 0 13px; border-radius: 15px; background: #f5f5f5; color: #555; font-size: 13px; }
.chip.active { background: var(--red-soft); color: var(--red); font-weight: 600; }
.tag { display: inline-block; padding: 2px 8px; border-radius: 6px; background: #f3f3f3; color: #666; font-size: 12px; }
.dot-sep { color: #ccc; margin: 0 5px; }
.text-sub { color: var(--sub); }
.text-red { color: var(--red); }
.center { text-align: center; }
.empty { padding: 60px 20px; text-align: center; color: #bbb; font-size: 14px; }
.empty .ic { width: 44px; height: 44px; opacity: .35; display: block; margin: 0 auto 12px; }
.loading-tip { text-align: center; color: #bbb; font-size: 13px; padding: 18px 0 8px; }
.toast { position: fixed; left: 50%; top: 46%; transform: translate(-50%, -50%) scale(.95); background: rgba(0,0,0,.78); color: #fff; font-size: 14px; padding: 10px 18px; border-radius: 10px; max-width: 80%; text-align: center; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 999; line-height: 1.5; }
.toast.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.flash { margin: 10px 14px; padding: 12px 14px; border-radius: 10px; font-size: 13px; line-height: 1.5; }
.flash-success { background: #eaf9f0; color: #128048; }
.flash-error { background: #fff1f0; color: #cf1322; }
.avatar { border-radius: 50%; object-fit: cover; background: #f0f0f0; }
.avatar-24 { width: 24px; height: 24px; }
.avatar-32 { width: 32px; height: 32px; }
.avatar-44 { width: 44px; height: 44px; }

/* ================= 顶部导航 ================= */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center;
  height: 52px; padding: 0 4px;
  background: rgba(255,255,255,.96);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid #f5f5f5;
}
.topbar .icon-btn { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; color: #333; flex: 0 0 auto; }
.topbar .icon-btn .ic { width: 23px; height: 23px; }
.cat-tabs {
  flex: 1; min-width: 0; display: flex; align-items: center; height: 100%;
  overflow-x: auto; overflow-y: hidden;
  scrollbar-width: none; -ms-overflow-style: none;
  padding: 0 2px;
}
.cat-tabs::-webkit-scrollbar { display: none; }
.cat-tab {
  position: relative; flex: 0 0 auto; padding: 0 11px; height: 100%;
display: flex; align-items: center; font-size: 15px; color: #6b6b6b;
}
.cat-tab.active { color: #111; font-weight: 700; font-size: 16px; }
.cat-tab.active::after { content: ""; position: absolute; left: 50%; bottom: 6px; width: 20px; height: 3px; margin-left: -10px; border-radius: 3px; background: var(--red); }

/* ================= 瀑布流 ================= */
.feed { padding: 8px 8px calc(var(--nav-h) + 24px); column-count: 2; column-gap: 8px; }
.note-card { break-inside: avoid; -webkit-column-break-inside: avoid; margin: 0 0 10px; border-radius: 10px; overflow: hidden; }
.note-thumb { position: relative; width: 100%; border-radius: 10px; overflow: hidden; background: #f2f2f2; }
.note-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.note-thumb .play-badge {
  position: absolute; right: 6px; top: 6px; width: 22px; height: 22px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.42); border-radius: 50%; color: #fff;
}
.note-thumb .play-badge .ic { width: 14px; height: 14px; }
.note-thumb .type-label {
  position: absolute; left: 6px; top: 6px; padding: 2px 7px;
  background: rgba(0,0,0,.4); color: #fff; font-size: 11px; border-radius: 5px;
}
.note-title { font-size: 13.5px; line-height: 1.45; color: #222; padding: 6px 2px 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.note-meta { display: flex; align-items: center; padding: 0 2px 4px; font-size: 11.5px; color: #999; }
.note-meta .avatar { width: 17px; height: 17px; margin-right: 4px; }
.note-meta .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #777; }
.note-meta .likes { display: inline-flex; align-items: center; gap: 2px; color: #9a9a9a; }
.note-meta .likes .ic { width: 13px; height: 13px; }

/* ================= 底部导航 ================= */
.bottom-nav {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: 0; width: 100%; max-width: 560px; z-index: 40;
  height: calc(var(--nav-h) + env(safe-area-inset-bottom));
padding-bottom: env(safe-area-inset-bottom);
  display: flex; align-items: center;
  background: rgba(255,255,255,.97);
  border-top: 1px solid #f0f0f0;
  backdrop-filter: blur(10px);
}
.nav-item { flex: 1; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: #3a3a3a; position: relative; }
.nav-item .ic { width: 22px; height: 22px; }
.nav-label { font-size: 11.5px; line-height: 1; color: #666; }
.nav-item.active { color: #111; }
.nav-item.active .nav-label { color: #111; font-weight: 600; }
.nav-icon-wrap { position: relative; display: flex; }
.nav-dot {
  position: absolute; top: -6px; right: -10px; min-width: 16px; height: 16px; padding: 0 4px;
  background: var(--red); color: #fff; border-radius: 8px; font-size: 10px; font-style: normal;
  display: flex; align-items: center; justify-content: center;
}
.nav-plus .plus-circle {
  width: 42px; height: 32px; border-radius: 9px;
  background: linear-gradient(135deg, #ff3f5e, #ff1e3c 70%);
color: #fff; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 3px 10px rgba(255,36,66,.35);
}
.nav-plus .plus-circle .ic { width: 22px; height: 22px; stroke-width: 2; }
.nav-plus .nav-label { font-size: 10.5px; color: #999; }
.nav-plus.active .plus-circle { transform: translateY(-1px); }

/* ================= 详情页 ================= */
.detail-page { position: fixed; inset: 0; max-width: 560px; margin: 0 auto; background: #000; overflow: hidden; display: flex; flex-direction: column; }
.detail-page:fullscreen, .detail-page:-webkit-full-screen { max-width: none; }
.detail-media { position: absolute; inset: 0; background: #000; }
.detail-media video { width: 100%; height: 100%; object-fit: contain; background: #000; display: block; }
.detail-page.video-page .detail-media video { height: 100%; object-fit: cover; }
.detail-page.video-page.video-landscape .detail-media video { object-fit: contain; }
.video-play-toggle {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 12;
width: 74px; height: 74px; border: 0; background: transparent; padding: 0;
  color: rgba(255,255,255,.78);
}
.video-play-toggle .ic { width: 74px; height: 74px; fill: currentColor; stroke: none; filter: drop-shadow(0 3px 10px rgba(0,0,0,.4)); }
.video-play-toggle.hide { display: none; }
.detail-page.video-page .detail-body { bottom: 0; padding-bottom: calc(8px + env(safe-area-inset-bottom)); background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0) 42%, rgba(0,0,0,.38) 100%); }
.gallery { display: flex; height: 100%; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scrollbar-width: none; }
.gallery::-webkit-scrollbar { display: none; }
.gallery-item { flex: 0 0 100%; width: 100%; height: 100%; scroll-snap-align: start; display: flex; align-items: center; justify-content: center; }
.gallery-item img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.gallery-counter {
  position: absolute; right: 14px; top: 58px; z-index: 12;
  background: rgba(0,0,0,.45); color: #fff; font-size: 13px; padding: 3px 10px; border-radius: 12px;
backdrop-filter: blur(6px);
}
.detail-top {
  position: absolute; left: 0; right: 0; top: 0; z-index: 15;
  display: flex; align-items: center; gap: 8px;
  padding: calc(8px + env(safe-area-inset-top)) 10px 8px;
  background: linear-gradient(180deg, rgba(0,0,0,.45), rgba(0,0,0,0));
  color: #fff;
}
.round-btn {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; background: rgba(0,0,0,.28);
}
.round-btn .ic { width: 21px; height: 21px; }
.detail-top .spacer { flex: 1; }
.detail-body {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 15;
  padding: 4px 14px calc(4px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(0,0,0,0), rgba(0,0,0,.68) 30%, rgba(0,0,0,.9));
  color: #fff;
  max-height: 56%;
  display: flex; flex-direction: column; justify-content: flex-end;
}
.d-title-line { font-size: 14.5px; line-height: 1.5; color: #fff; margin: 0 0 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 1px 5px rgba(0,0,0,.55); }
.d-progress { padding: 0 0 8px; }
#videoProgress {
  --p: 0%; -webkit-appearance: none; appearance: none; display: block;
  width: 100%; height: 16px; margin: 0; background: transparent; touch-action: none; outline: none;
}
#videoProgress::-webkit-slider-runnable-track {
  height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, #fff 0 var(--p), rgba(255,255,255,.32) var(--p) 100%);
}
#videoProgress::-webkit-slider-thumb {
  -webkit-appearance: none; width: 9px; height: 9px; margin-top: -3.5px;
  border-radius: 50%; background: #fff; box-shadow: 0 0 5px rgba(0,0,0,.45);
}
#videoProgress::-moz-range-track { height: 2px; border-radius: 2px; background: rgba(255,255,255,.32); }
#videoProgress::-moz-range-progress { height: 2px; border-radius: 2px; background: #fff; }
#videoProgress::-moz-range-thumb { width: 9px; height: 9px; border: 0; border-radius: 50%; background: #fff; }
.d-author { display: flex; align-items: center; gap: 9px; margin-bottom: 5px; }
.d-author .avatar { width: 34px; height: 34px; border: 1px solid rgba(255,255,255,.45); }
.d-author .name { font-size: 14px; font-weight: 600; color: #fff; }
.d-author .spacer { flex: 1; }
.d-follow {
  height: 28px; padding: 0 13px; border-radius: 14px;
  border: 0; background: var(--red); color: #fff; font-size: 12.5px; font-weight: 600;
  display: inline-flex; align-items: center; gap: 2px;
}
.d-follow.following { background: rgba(255,255,255,.22); color: rgba(255,255,255,.85); }
.d-desc-row { display: flex; align-items: flex-end; gap: 8px; margin-bottom: 5px; }
.d-desc { flex: 1; min-width: 0; font-size: 14.5px; line-height: 1.55; color: #fff; white-space: pre-wrap; word-break: break-word; text-shadow: 0 1px 4px rgba(0,0,0,.35); display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.d-desc.expanded { display: block; -webkit-line-clamp: unset; max-height: 38vh; overflow-y: auto; }
.d-expand { flex: 0 0 auto; border: 0; background: transparent; color: rgba(255,255,255,.9); font-size: 12.5px; padding: 0 0 2px; text-shadow: 0 1px 4px rgba(0,0,0,.5); }
.d-desc .d-title { font-weight: 600; display: inline; margin-right: 4px; }
.d-desc .topic { color: #ffd9df; }
.d-actions { display: flex; align-items: center; gap: 14px; }
.d-comment-entry {
  flex: 1; min-width: 0; height: 34px; border-radius: 17px;
  background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.12);
  color: rgba(255,255,255,.72); font-size: 13px; padding: 0 14px; text-align: left;
  display: flex; align-items: center;
}
.d-action { display: inline-flex; flex-direction: column; align-items: center; gap: 1px; color: #fff; font-size: 11.5px; min-width: 28px; }
.d-action .ic { width: 26px; height: 26px; }
.d-action.liked { color: #ff5b74; }
.d-action.liked .ic { fill: #ff2442; stroke: #ff2442; }
.d-action.liked .cnt { color: #ff8fa1; }
.d-action:active { opacity: .7; }
.d-author .avatar { cursor: pointer; }
.download-toast-link { color: #fff; text-decoration: underline; word-break: break-all; }

/* 评论抽屉 */
.sheet-mask { position: fixed; inset: 0; background: rgba(0,0,0,.5); opacity: 0; pointer-events: none; transition: opacity .22s; z-index: 60; }
.sheet-mask.show { opacity: 1; pointer-events: auto; }
.sheet {
  position: fixed; left: 50%; transform: translate(-50%, 100%);
  bottom: 0; width: 100%; max-width: 560px; max-height: 72vh;
  background: #fff; border-radius: 18px 18px 0 0; z-index: 61;
  transition: transform .26s cubic-bezier(.3,.9,.4,1);
  display: flex; flex-direction: column;
  padding-bottom: env(safe-area-inset-bottom);
}
.sheet.show { transform: translate(-50%, 0); }
.sheet-head { position: relative; padding: 16px 0 10px; text-align: center; font-size: 14px; font-weight: 600; border-bottom: 1px solid var(--line); }
.sheet-head .sheet-close { position: absolute; right: 12px; top: 10px; width: 30px; height: 30px; color: #999; }
.sheet-body { flex: 1; overflow-y: auto; padding: 6px 14px 10px; }
.comment-item { display: flex; gap: 9px; padding: 10px 0; border-bottom: 1px solid #fafafa; }
.comment-item .avatar { width: 32px; height: 32px; flex: 0 0 auto; }
.comment-item .c-main { flex: 1; min-width: 0; }
.comment-item .c-name { font-size: 12.5px; color: #999; margin-bottom: 3px; }
.comment-item .c-text { font-size: 14px; line-height: 1.5; word-break: break-word; }
.comment-item .c-time { font-size: 11.5px; color: #bbb; margin-top: 3px; }
.sheet-foot { border-top: 1px solid var(--line); padding: 8px 12px 10px; display: flex; gap: 8px; align-items: flex-end; }
.sheet-foot textarea {
  flex: 1; resize: none; height: 40px; max-height: 100px; border: 0; background: #f5f5f5; border-radius: 18px;
  padding: 10px 14px; line-height: 20px;
}
.sheet-foot .send-btn { height: 36px; padding: 0 16px; border-radius: 18px; background: var(--red); color: #fff; font-size: 13.5px; font-weight: 600; }
.guest-tip { padding: 40px 0; text-align: center; color: #999; }

/* 未登录遮罩 */
.lock-overlay { position: absolute; inset: 0; z-index: 10; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #fff; background: rgba(0,0,0,.45); backdrop-filter: blur(14px); gap: 14px; }
.lock-overlay .lock-icon { width: 54px; height: 54px; border-radius: 50%; background: rgba(255,255,255,.18); display: flex; align-items: center; justify-content: center; }
.lock-overlay .lock-icon .ic { width: 26px; height: 26px; }
.lock-overlay p { margin: 0; font-size: 14px; color: rgba(255,255,255,.85); }
.lock-overlay .btn { background: var(--red); color: #fff; }

/* ================= 个人主页 ================= */
.profile-hero { position: relative; color: #fff; padding: calc(56px + env(safe-area-inset-top)) 18px 18px; overflow: hidden; background: #444; }
.profile-hero .hero-bg { position: absolute; inset: 0; background-size: cover; background-position: center; filter: brightness(.62); transform: scale(1.04); }
.profile-hero.own .hero-bg { filter: brightness(.8) saturate(.7) blur(2px); }
.profile-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.18), rgba(0,0,0,.42)); }
.profile-hero .hero-inner { position: relative; z-index: 2; }
.hero-topline { position: absolute; left: 8px; right: 8px; top: calc(8px + env(safe-area-inset-top)); display: flex; align-items: center; z-index: 12; color: #fff; }
.hero-topline .spacer { flex: 1; }
.hero-topline .round-btn { background: rgba(0,0,0,.22); }
.hero-topline .top-edit { height: 32px; padding: 0 14px; border-radius: 16px; background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.35); color: #fff; font-size: 12.5px; display: inline-flex; align-items: center; }
.hero-user { display: flex; align-items: center; gap: 14px; }
.hero-follow { flex: 0 0 auto; height: 32px; padding: 0 18px; border-radius: 16px; border: 0; background: var(--red); color: #fff; font-size: 13px; font-weight: 600; }
.hero-follow.following { background: rgba(255,255,255,.2); border: 1px solid rgba(255,255,255,.3); color: rgba(255,255,255,.85); }
.hero-avatar { width: 76px; height: 76px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.6); object-fit: cover; background: #ddd; }
.hero-avatar-edit { position: relative; }
.hero-avatar-edit .cam { position: absolute; right: -2px; bottom: -2px; width: 24px; height: 24px; border-radius: 50%; background: rgba(0,0,0,.5); display: flex; align-items: center; justify-content: center; }
.hero-avatar-edit .cam .ic { width: 13px; height: 13px; }
.hero-name { font-size: 22px; font-weight: 700; letter-spacing: .3px; margin-bottom: 4px; text-shadow: 0 1px 6px rgba(0,0,0,.2); }
.hero-sub { font-size: 12px; color: rgba(255,255,255,.82); line-height: 1.7; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.hero-sub .ic { width: 13px; height: 13px; }
.hero-stats { display: flex; gap: 26px; margin: 16px 0 12px; font-size: 12px; color: rgba(255,255,255,.75); }
.hero-stats b { font-size: 19px; color: #fff; font-weight: 700; margin-right: 3px; }
.hero-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.hero-tags .tag { background: rgba(255,255,255,.2); color: #fff; border: 1px solid rgba(255,255,255,.18); border-radius: 12px; padding: 3px 10px; font-size: 11.5px; }
.hero-bio { font-size: 13px; color: rgba(255,255,255,.85); line-height: 1.6; margin-bottom: 4px; white-space: pre-wrap; word-break: break-word; }
.hero-actions { display: flex; gap: 10px; }
.hero-actions .btn { height: 36px; font-size: 14px; border-radius: 18px; flex: 1; }
.hero-actions .btn-follow { background: var(--red); color: #fff; }
.hero-actions .btn-follow.following { background: rgba(255,255,255,.2); color: rgba(255,255,255,.85); border: 1px solid rgba(255,255,255,.25); }
.hero-actions .btn-msg { background: rgba(255,255,255,.16); color: #fff; border: 1px solid rgba(255,255,255,.25); }
.hero-actions .btn-edit { background: rgba(255,255,255,.2); color: #fff; border: 1px solid rgba(255,255,255,.3); }
.hero-actions .btn-square { flex: 0 0 36px; padding: 0; }
.profile-cards { display: flex; gap: 8px; padding: 12px 12px 0; }
.p-card { flex: 1; background: linear-gradient(160deg, #fbfbfb, #f4f4f6); border-radius: 12px; padding: 10px 12px; display: flex; align-items: center; gap: 8px; border: 1px solid #f3f3f3; }
.p-card .ic { width: 20px; height: 20px; color: #666; }
.p-card .p-t { font-size: 12.5px; font-weight: 600; color: #333; line-height: 1.3; }
.p-card .p-s { font-size: 10.5px; color: #a5a5a5; }
.profile-tabs { display: flex; align-items: center; padding: 4px 12px 0; border-bottom: 1px solid #f5f5f5; }
.profile-tab { position: relative; padding: 12px 16px; font-size: 15px; color: #777; display: flex; align-items: center; gap: 4px; }
.profile-tab.active { color: #111; font-weight: 700; }
.profile-tab.active::after { content: ""; position: absolute; left: 50%; margin-left: -9px; bottom: 2px; width: 18px; height: 3px; border-radius: 2px; background: var(--red); }
.profile-tab .ic { width: 14px; height: 14px; }
.profile-tabs .spacer { flex: 1; }
.profile-tabs .tab-action { padding: 10px; color: #666; }
.profile-grid { padding: 8px 8px calc(var(--nav-h) + 24px); column-count: 2; column-gap: 8px; }
.profile-grid .note-card { position: relative; }
.badge-status { position: absolute; left: 6px; top: 6px; z-index: 2; padding: 2px 7px; border-radius: 5px; font-size: 11px; color: #fff; background: rgba(0,0,0,.45); }
.badge-status.auditing { background: rgba(255,152,0,.85); }
.badge-status.rejected { background: rgba(230,55,55,.85); }
/* ================= 表单 / 登录 ================= */
.page { padding-bottom: calc(var(--nav-h) + 24px); }
.page-pad { padding: 16px; }
.form-card { padding: 6px 16px 20px; }
.field { margin-top: 16px; }
.field label { display: block; font-size: 13px; color: #888; margin-bottom: 7px; }
.field input[type=text], .field input[type=password], .field input[type=number], .field textarea, .field select {
  width: 100%; border: 0; border-radius: 10px; background: #f6f7f8; padding: 12px 14px; font-size: 15px;
}
.field textarea { min-height: 88px; resize: vertical; line-height: 1.5; }
.field .hint { font-size: 12px; color: #b0b0b0; margin-top: 6px; line-height: 1.5; }
.form-actions { margin-top: 24px; }
.auth-wrap { min-height: 100vh; padding: 0 28px; display: flex; flex-direction: column; }
.auth-top { padding: 64px 0 30px; }
.auth-top h1 { font-size: 26px; margin: 0 0 8px; }
.auth-top p { margin: 0; color: #999; font-size: 13px; }
.auth-card { background: #fff; border-radius: 16px; padding: 6px 18px 24px; box-shadow: 0 8px 30px rgba(0,0,0,.06); }
.auth-card .field label { color: #555; }
.auth-card .field input { background: #f6f7f8; }
.auth-switch { text-align: center; font-size: 13px; color: #999; padding: 22px 0; }
.auth-switch a { color: var(--red); font-weight: 600; }

/* ================= 发布页 ================= */
.upload-type-tabs { display: flex; gap: 8px; padding: 14px 16px 0; }
.upload-type-tab { flex: 1; height: 44px; border-radius: 10px; background: #f5f5f5; color: #666; font-size: 15px; font-weight: 600; display: flex; align-items: center; justify-content: center; gap: 6px; }
.upload-type-tab.active { background: var(--red-soft); color: var(--red); }
.cat-picker { display: flex; flex-wrap: wrap; gap: 8px; padding: 4px 0 2px; }
.cat-picker .chip { height: 32px; }
.pick-box { margin-top: 10px; border: 1px dashed #ddd; border-radius: 12px; background: #fafafa; min-height: 120px; display: flex; align-items: center; justify-content: center; color: #aaa; font-size: 13px; text-align: center; padding: 14px; position: relative; flex-direction: column; gap: 8px; }
.pick-box .ic { width: 32px; height: 32px; color: #ccd; }
.pick-box input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.previews { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.previews .pv { position: relative; border-radius: 8px; overflow: hidden; background: #eee; aspect-ratio: 1; }
.previews .pv img { width: 100%; height: 100%; object-fit: cover; }
.previews .pv .del { position: absolute; right: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 12px; }
.video-preview { margin-top: 10px; border-radius: 10px; overflow: hidden; background: #000; position: relative; }
.video-preview video { width: 100%; display: block; max-height: 320px; }
.file-meta { font-size: 12px; color: #999; margin-top: 8px; }
.progress { height: 6px; background: #eee; border-radius: 3px; overflow: hidden; margin-top: 12px; display: none; }
.progress.show { display: block; }
.progress i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #ff5f76, #ff2442); transition: width .2s; }
.upload-rules { font-size: 12px; color: #a0a0a0; line-height: 1.7; padding: 12px 16px 0; }

/* ================= 消息 ================= */
.msg-list { padding: 4px 0; }
.msg-item { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid #fafafa; }
.msg-item .avatar { width: 46px; height: 46px; }
.msg-item .m-main { flex: 1; min-width: 0; }
.msg-item .m-name { font-size: 14.5px; font-weight: 600; margin-bottom: 3px; }
.msg-item .m-preview { font-size: 12.5px; color: #999; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg-item .m-right { text-align: right; font-size: 11px; color: #bbb; }
.msg-item .unread { display: inline-block; min-width: 17px; height: 17px; line-height: 17px; padding: 0 5px; background: var(--red); color: #fff; border-radius: 9px; font-size: 10.5px; margin-top: 5px; }
.chat-page { min-height: 100vh; display: flex; flex-direction: column; background: #f7f7f8; padding-bottom: 78px; }
.chat-top { position: sticky; top: 0; z-index: 10; height: 50px; display: flex; align-items: center; justify-content: center; background: #fff; border-bottom: 1px solid #f0f0f0; font-weight: 600; font-size: 15px; }
.chat-top .back { position: absolute; left: 6px; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; }
.chat-body { flex: 1; padding: 14px 12px; }
.chat-bubble { display: flex; gap: 8px; margin-bottom: 14px; align-items: flex-start; }
.chat-bubble .avatar { width: 34px; height: 34px; }
.chat-bubble .bubble { max-width: 72%; background: #fff; padding: 9px 12px; border-radius: 4px 12px 12px 12px; font-size: 14px; line-height: 1.5; word-break: break-word; }
.chat-bubble.mine { flex-direction: row-reverse; }
.chat-bubble.mine .bubble { background: var(--red); color: #fff; border-radius: 12px 4px 12px 12px; }
.chat-input-bar { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 560px; background: #fff; border-top: 1px solid #eee; display: flex; gap: 8px; padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); align-items: center; }
.chat-input-bar input { flex: 1; height: 38px; border-radius: 19px; border: 0; background: #f4f4f5; padding: 0 14px; }
.chat-input-bar button { height: 36px; padding: 0 16px; border-radius: 18px; background: var(--red); color: #fff; font-weight: 600; font-size: 14px; }

/* ================= 公告 / 搜索 / 侧边栏 ================= */
.announce-list { padding: 10px 16px calc(var(--nav-h) + 20px); }
.announce-item { padding: 16px 0; border-bottom: 1px solid #f4f4f4; }
.announce-item h3 { font-size: 15.5px; margin: 0 0 7px; display: flex; align-items: center; gap: 7px; }
.announce-item h3 .ic { color: var(--red); width: 16px; height: 16px; }
.announce-item .a-time { font-size: 11.5px; color: #bbb; margin-bottom: 8px; }
.announce-item .a-content { font-size: 13.5px; color: #555; line-height: 1.75; white-space: pre-wrap; word-break: break-word; }
.help-box { margin: 8px 16px 20px; background: #fff8f9; border: 1px solid #ffe4e9; border-radius: 12px; padding: 14px 16px; }
.help-box h3 { margin: 0 0 8px; font-size: 14.5px; color: var(--red); }
.help-box .h-content { font-size: 13px; color: #555; line-height: 1.8; white-space: pre-wrap; }
.search-bar { display: flex; align-items: center; gap: 8px; padding: 10px 12px; }
.search-bar .s-input { flex: 1; display: flex; align-items: center; background: #f5f5f5; border-radius: 18px; padding: 0 12px; height: 38px; }
.search-bar .s-input .ic { width: 17px; height: 17px; color: #999; margin-right: 6px; }
.search-bar input { flex: 1; border: 0; background: none; height: 100%; font-size: 14px; }
.search-bar .s-cancel { font-size: 14px; color: #666; padding: 6px; flex: 0 0 auto; }
.search-results { padding: 0 8px calc(var(--nav-h) + 24px); }
.drawer-mask { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 80; opacity: 0; pointer-events: none; transition: opacity .2s; }
.drawer-mask.show { opacity: 1; pointer-events: auto; }
.drawer { position: fixed; top: 0; bottom: 0; left: 0; width: 76%; max-width: 340px; background: #fff; z-index: 81; transform: translateX(-100%); transition: transform .25s ease; display: flex; flex-direction: column; padding: calc(20px + env(safe-area-inset-top)) 0 20px; }
.drawer.show { transform: translateX(0); }
.drawer-user { display: flex; align-items: center; gap: 12px; padding: 6px 20px 18px; border-bottom: 1px solid #f4f4f4; }
.drawer-user .avatar { width: 52px; height: 52px; }
.drawer-user .d-name { font-size: 17px; font-weight: 700; margin-bottom: 3px; }
.drawer-user .d-sub { font-size: 12px; color: #999; }
.drawer-links { flex: 1; overflow-y: auto; padding: 8px 0; }
.drawer-link { display: flex; align-items: center; gap: 12px; padding: 14px 20px; font-size: 15px; color: #333; }
.drawer-link .ic { width: 20px; height: 20px; color: #777; }
.drawer-link:active { background: #fafafa; }
.drawer-foot { padding: 12px 20px 0; font-size: 12px; color: #bbb; line-height: 1.6; }

/* ================= 后台入口链接 ================= */
.admin-tip { margin: 12px 16px; padding: 12px 14px; background: #f7f8fa; border-radius: 10px; font-size: 12.5px; color: #888; }

/* 移动适配 */
@media (max-width: 360px) {
  .hero-name { font-size: 19px; }
  .hero-avatar { width: 66px; height: 66px; }
  .d-actions { gap: 12px; }
}
@media (min-width: 561px) {
  body { box-shadow: 0 0 40px rgba(0,0,0,.08); }
  .detail-page { box-shadow: 0 0 40px rgba(0,0,0,.25); }
}
@supports (padding: max(0px)) {
  .detail-top { padding-top: max(8px, env(safe-area-inset-top)); }
}