:root {
  --primary: #F9556C;
  --primary-2: #FF8E7A;
  --grad: linear-gradient(135deg, #FF8E7A 0%, #F9556C 100%);
  --bg: #FFF6F4;
  --card: #ffffff;
  --text: #2B2F3A;
  --text-2: #7A8095;
  --text-3: #A9AFC2;
  --border: #FBE9E5;
  --danger: #F9556C;
  --success: #2BC48A;
  --warning: #FF9F43;
  --radius: 16px;
  --shadow: 0 6px 20px rgba(249, 85, 108, 0.08);
  --tab-h: 56px;
  --header-h: 52px;
}
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
  overflow: hidden;
}
#app { height: 100vh; height: 100dvh; overflow: hidden; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea, select { font-family: inherit; font-size: 15px; outline: none; border: none; background: none; }
::-webkit-scrollbar { width: 0; height: 0; }

/* ===== 通用 ===== */
.page { position: absolute; inset: 0; display: flex; flex-direction: column; background: var(--bg); }
.header {
  height: var(--header-h); flex: none; display: flex; align-items: center; gap: 10px;
  padding: 0 16px; background: var(--card); position: sticky; top: 0; z-index: 20;
  box-shadow: 0 1px 0 var(--border);
}
.header .title { font-size: 18px; font-weight: 800; flex: 1; }
.header .back { width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; border-radius: 10px; background: var(--bg); font-size: 18px; color: var(--text-2); }
.del-btn { width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 600; color: var(--danger); flex: none; }
.scroll { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.section-title { font-size: 16px; font-weight: 800; padding: 16px 16px 10px; display: flex; align-items: center; justify-content: space-between; }
.section-title .more { font-size: 13px; color: var(--text-3); font-weight: 400; }
.empty { text-align: center; color: var(--text-3); padding: 60px 20px; font-size: 14px; }
.empty .ic { font-size: 46px; display: block; margin-bottom: 12px; }
.load-tip { text-align: center; color: var(--text-3); font-size: 13px; padding: 14px; }
.avatar { border-radius: 50%; background: var(--grad); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; overflow: hidden; flex: none; }
.badge { font-size: 11px; padding: 2px 8px; border-radius: 20px; white-space: nowrap; }
.badge.pending { background: #FFF4E0; color: #E08A00; }
.badge.approved { background: #E3F8EF; color: #17A673; }
.badge.rejected { background: #FFEBEE; color: #E0455A; }
.badge.online { background: #E3F8EF; color: #17A673; }
.badge.offline { background: #F0F1F5; color: #8B91A3; }
.badge.red { background: var(--grad); color: #fff; }

/* ===== 按钮 ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 44px; padding: 0 18px; border-radius: 22px; font-weight: 700; font-size: 15px;
  transition: transform .1s, opacity .2s;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 8px 20px rgba(249, 85, 108, .3); }
.btn-block { width: 100%; }
.btn-ghost { background: #FFF0ED; color: var(--primary); }
.btn-danger { background: #FFEBEE; color: var(--danger); }
.btn-sm { height: 32px; padding: 0 14px; font-size: 13px; border-radius: 16px; }
.btn[disabled] { opacity: .5; pointer-events: none; }

/* ===== 底部导航（小程序样式） ===== */
.tabbar {
  position: absolute; left: 0; right: 0; bottom: 0; height: calc(var(--tab-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: rgba(255, 255, 255, .96); backdrop-filter: blur(14px);
  display: flex; align-items: stretch; border-top: 1px solid var(--border); z-index: 30;
}
.tab { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--text-3); font-size: 10px; }
.tab.active { color: var(--primary); font-weight: 700; }
.tab .ti { font-size: 21px; line-height: 1; }
.tab .tdot { display: none; position: absolute; margin-left: 26px; margin-top: -34px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 9px; background: var(--primary); color: #fff; font-size: 10px; font-weight: 700; align-items: center; justify-content: center; border: 2px solid #fff; }

/* ===== 首屏 loading ===== */
#bootLoading { position: fixed; inset: 0; z-index: 9999; background: var(--bg); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; }
#bootLoading .bl-logo { font-size: 30px; font-weight: 900; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
#bootLoading .bl-bar { width: 120px; height: 4px; border-radius: 2px; background: #FFE3DC; overflow: hidden; }
#bootLoading .bl-bar::after { content: ''; display: block; width: 40%; height: 100%; border-radius: 2px; background: var(--grad); animation: blSlide 1s ease-in-out infinite; }
@keyframes blSlide { from { transform: translateX(-100%); } to { transform: translateX(300%); } }
.tab-publish { flex: none; width: 64px; display: flex; align-items: center; justify-content: center; }
.tab-publish .plus {
  width: 48px; height: 48px; border-radius: 16px; background: var(--grad); color: #fff; font-size: 26px; font-weight: 300;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 18px rgba(249, 85, 108, .42); border: 3px solid #fff;
}

/* ===== 首页头部 ===== */
.home-hero {
  background: linear-gradient(180deg, #FFDCD4 0%, rgba(255, 246, 244, 0) 100%);
  padding: 18px 16px 6px;
}
.hero-row { display: flex; align-items: center; justify-content: center; position: relative; }
.hero-title { font-size: 23px; font-weight: 900; display: flex; align-items: center; gap: 8px; }
.hero-badge { font-size: 10px; font-weight: 600; background: var(--grad); color: #fff; padding: 3px 8px; border-radius: 10px 10px 10px 2px; }
.hero-bell { position: absolute; right: 0; top: 50%; transform: translateY(-50%); margin-left: 0; width: 36px; height: 36px; border-radius: 50%; background: #fff; display: flex; align-items: center; justify-content: center; font-size: 17px; box-shadow: var(--shadow); }
.hero-search {
  margin-top: 14px; background: #fff; border-radius: 21px; height: 42px;
  display: flex; align-items: center; padding: 0 16px; color: var(--text-3); font-size: 14px; box-shadow: var(--shadow);
}
.school-banner {
  margin-top: 14px; background: #fff; border-radius: 18px; padding: 16px;
  display: flex; align-items: center; gap: 12px; box-shadow: var(--shadow);
  position: relative; overflow: hidden;
}
.school-banner::after { content: ''; position: absolute; right: -24px; top: -30px; width: 110px; height: 110px; border-radius: 50%; background: linear-gradient(135deg, #FFE3DC, #FFD2CB); opacity: .7; }
.sb-left { flex: 1; min-width: 0; position: relative; z-index: 1; }
.sb-name { font-size: 18px; font-weight: 800; display: flex; align-items: center; gap: 6px; }
.sb-badge { font-size: 10px; background: #FFF0ED; color: var(--primary); padding: 2px 7px; border-radius: 8px; font-weight: 600; }
.sb-meta { font-size: 12px; color: var(--text-3); margin-top: 5px; }
.sb-right { font-size: 13px; color: var(--primary); font-weight: 600; position: relative; z-index: 1; background: #FFF0ED; padding: 7px 12px; border-radius: 18px; }

/* ===== 分类九宫格 ===== */
.cat-card { background: var(--card); border-radius: 18px; margin: 14px 14px 0; padding: 6px 0 12px; box-shadow: var(--shadow); }
.cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px 4px; padding: 12px 6px 0; }
.cat-tile { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.cat-tile .ci { width: 48px; height: 48px; border-radius: 16px; display: flex; align-items: center; justify-content: center; font-size: 24px; }
.cat-tile .cl { font-size: 12px; color: var(--text); font-weight: 600; }
.cat-tile .cc { font-size: 10px; color: var(--text-3); margin-top: -4px; }

/* ===== 今日热榜横条 ===== */
.hot-strip { display: flex; align-items: stretch; gap: 10px; margin: 14px 0 0; }
.hs-label {
  flex: none; background: var(--grad); color: #fff; font-weight: 900; font-size: 13px; line-height: 1.25;
  padding: 8px 11px; border-radius: 12px; display: flex; align-items: center; text-align: center;
  box-shadow: 0 6px 14px rgba(249, 85, 108, .32); cursor: pointer;
}
.hs-body {
  flex: 1; min-width: 0; background: var(--card); border-radius: 12px;
  display: flex; align-items: center; gap: 10px; padding: 8px 10px;
  box-shadow: var(--shadow); cursor: pointer;
}
.hs-rank {
  flex: none; width: 22px; height: 22px; border-radius: 6px;
  background: linear-gradient(135deg, #FF9F43, #FF6B6B); color: #fff;
  font-weight: 800; font-size: 12px; display: flex; align-items: center; justify-content: center;
}
.hs-title { flex: 1; min-width: 0; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hs-thumb { flex: none; width: 56px; height: 42px; border-radius: 8px; object-fit: cover; background: #F5F0EE; }
.hs-thumb-txt { display: flex; align-items: center; justify-content: center; font-size: 18px; }

/* ===== 今日热榜榜单页 ===== */
.hot-hero { background: var(--grad); padding: 28px 16px 44px; display: flex; justify-content: center; }
.hh-badge {
  background: linear-gradient(135deg, #FFD54A, #FFB300); color: #7A3E00;
  font-weight: 900; font-size: 21px; letter-spacing: 8px; text-indent: 8px;
  padding: 12px 26px; border-radius: 14px; border: 3px solid #FFF3C4;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .18);
}
.hot-list-card { background: var(--card); border-radius: 18px; margin: -26px 14px 0; padding: 2px 0; box-shadow: var(--shadow); position: relative; }
.hr-item { display: flex; gap: 10px; padding: 15px 14px; border-bottom: 1px solid var(--border); }
.hr-item:last-child { border-bottom: none; }
.hr-rank { flex: none; width: 36px; display: flex; flex-direction: column; align-items: center; padding-top: 2px; }
.hr-rank .crown { font-size: 14px; line-height: 1.1; }
.hr-rank .num { font-size: 15px; font-weight: 900; color: #C3C8D8; }
.hr-rank.r1 .num { color: #FFA726; }
.hr-rank.r2 .num { color: #B0B7C9; }
.hr-rank.r3 .num { color: #D98E5F; }
.hr-main { flex: 1; min-width: 0; }
.hr-head { display: flex; align-items: center; gap: 8px; }
.hr-head .hr-name { flex: 1; min-width: 0; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hr-head .hr-time { font-size: 12px; color: var(--text-3); flex: none; }
.hr-text { font-size: 15px; margin-top: 8px; line-height: 1.55; word-break: break-word; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.hr-imgs { display: flex; gap: 6px; margin-top: 8px; }
.hr-imgs img { width: 92px; height: 70px; border-radius: 8px; object-fit: cover; background: #F5F0EE; }
.hr-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; }
.hr-nums { font-size: 12px; color: var(--text-3); }

/* ===== 封禁提示 ===== */
.ban-banner { margin: 12px 14px; background: linear-gradient(135deg, #FFEBEE, #FFF5F5); border: 1px solid #FFC9D2; border-radius: 16px; padding: 14px; display: flex; align-items: center; gap: 10px; cursor: pointer; }

/* ===== 分段选项卡 ===== */
.seg { display: flex; background: var(--card); border-radius: 12px; margin: 14px 14px 4px; padding: 4px; gap: 4px; box-shadow: var(--shadow); }
.seg span { flex: 1; text-align: center; padding: 8px 0; border-radius: 9px; color: var(--text-2); font-size: 14px; }
.seg span.active { background: #FFECE9; color: var(--primary); font-weight: 800; }

/* ===== 帖子列表（简洁通栏式） ===== */
.post-item { background: var(--card); padding: 14px 16px; border-bottom: 1px solid var(--border); }
.pi-head { display: flex; align-items: center; gap: 10px; }
.pi-name { font-size: 14px; font-weight: 600; flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; }
.pi-time { font-size: 12px; color: var(--text-3); flex: none; }
.pi-text { font-size: 16px; margin-top: 9px; line-height: 1.55; word-break: break-word; }
.pi-sub { font-size: 14px; color: var(--text-2); margin-top: 4px; line-height: 1.5; word-break: break-word; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pi-foot { display: flex; align-items: center; gap: 8px; margin-top: 11px; }
.pi-cat { font-size: 12px; background: #F5F2F0; color: var(--text-2); padding: 4px 11px; border-radius: 15px; }
.pi-heat { font-size: 12px; color: var(--text-3); }
.pi-acts { margin-left: auto; display: flex; gap: 20px; color: var(--text-2); font-size: 13px; align-items: center; }
.pi-acts .act { display: flex; align-items: center; gap: 4px; }
.pi-acts .act.liked { color: var(--primary); font-weight: 700; }

/* ===== 帖子卡片 ===== */
.post-card { background: var(--card); margin: 10px 14px; border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); }
.post-card .pc-top { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.post-card .pc-info { flex: 1; min-width: 0; }
.post-card .pc-name { font-size: 14px; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.post-card .pc-meta { font-size: 12px; color: var(--text-3); }
.post-card .pc-title { font-size: 16px; font-weight: 800; margin-bottom: 6px; }
.post-card .pc-content { font-size: 14px; color: var(--text-2); white-space: pre-wrap; word-break: break-word; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.post-card .pc-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; }
.post-card .pc-tags .tag { font-size: 12px; color: var(--primary); background: #FFF0ED; padding: 3px 10px; border-radius: 20px; font-weight: 500; }
.post-card .pc-imgs { display: grid; gap: 6px; margin: 10px 0 0; }
.post-card .pc-imgs.g1 { grid-template-columns: 1fr; }
.post-card .pc-imgs.g2, .pc-imgs.g3 { grid-template-columns: repeat(3, 1fr); }
.post-card .pc-imgs img { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; background: #F5F0EE; }
.post-card .pc-imgs.g1 img { max-height: 240px; }
.post-card .pc-imgs.g2 img, .pc-imgs.g3 img { aspect-ratio: 1; }
.post-card .pc-bottom { display: flex; align-items: center; gap: 22px; margin-top: 12px; color: var(--text-3); font-size: 13px; }
.post-card .pc-bottom .act { display: flex; align-items: center; gap: 4px; }
.post-card .pc-bottom .act.liked { color: var(--primary); font-weight: 700; }
.pin-tag { font-size: 10px; background: var(--grad); color: #fff; padding: 1px 7px; border-radius: 4px; margin-right: 4px; }
.cat-chip { font-size: 10px; color: #fff; padding: 2px 8px; border-radius: 10px 10px 10px 2px; font-weight: 600; }

/* ===== 热门榜 ===== */
.hot-rank { display: flex; align-items: center; gap: 12px; margin: 8px 14px; background: var(--card); border-radius: 14px; padding: 12px 14px; box-shadow: var(--shadow); }
.hot-rank .rk { width: 28px; height: 28px; border-radius: 9px; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 14px; color: #fff; background: #D9DCE7; flex: none; }
.hot-rank .rk.top { background: var(--grad); }
.hot-rank .rk.silver { background: #FFB74D; }
.hot-rank .rk.bronze { background: #FF8A65; }
.hot-rank .hr-info { flex: 1; min-width: 0; }
.hot-rank .hr-title { font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hot-rank .hr-meta { font-size: 12px; color: var(--text-3); }
.follow-btn { background: var(--grad); color: #fff; font-size: 12px; font-weight: 700; padding: 6px 16px; border-radius: 16px; }
.follow-btn.done { background: #FFF0ED; color: var(--text-3); }

/* ===== 认证/登录 ===== */
.auth-wrap { position: absolute; inset: 0; background: linear-gradient(160deg, #FF8E7A 0%, #F9556C 60%, #F43F5E 100%); display: flex; flex-direction: column; padding: 24px; }
.auth-head { color: #fff; margin-top: 10vh; }
.auth-head h1 { font-size: 32px; font-weight: 900; }
.auth-head p { opacity: .9; margin-top: 6px; font-size: 14px; }
.auth-card { background: #fff; border-radius: 24px; padding: 24px; margin-top: 26px; box-shadow: 0 20px 50px rgba(0, 0, 0, .18); }
.auth-tabs { display: flex; gap: 20px; margin-bottom: 20px; }
.auth-tabs .at { font-size: 17px; font-weight: 800; color: var(--text-3); padding-bottom: 8px; }
.auth-tabs .at.active { color: var(--text); border-bottom: 3px solid var(--primary); border-radius: 2px; }
.field { display: flex; align-items: center; gap: 10px; background: #FFF6F4; border-radius: 14px; padding: 0 14px; height: 48px; margin-bottom: 14px; }
.field .fi { color: var(--text-3); font-size: 17px; }
.field input { flex: 1; height: 100%; }
.auth-foot { text-align: center; color: #fff; margin-top: auto; font-size: 12px; opacity: .85; }

/* ===== 学校选择 ===== */
.prov-tabs { display: flex; gap: 8px; padding: 10px 14px; overflow-x: auto; flex: none; }
.prov-tabs .pt { flex: none; padding: 6px 14px; border-radius: 20px; background: var(--card); color: var(--text-2); font-size: 13px; }
.prov-tabs .pt.active { background: var(--grad); color: #fff; font-weight: 600; }
.school-item { display: flex; align-items: center; gap: 12px; background: var(--card); margin: 8px 14px; padding: 14px; border-radius: 16px; box-shadow: var(--shadow); }
.school-item .si-logo { width: 46px; height: 46px; border-radius: 14px; background: var(--grad); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 19px; font-weight: 800; }
.school-item .si-info { flex: 1; min-width: 0; }
.school-item .si-name { font-weight: 700; }
.school-item .si-sub { font-size: 12px; color: var(--text-3); }
.school-item .si-tag { font-size: 11px; color: var(--primary); background: #FFF0ED; padding: 2px 8px; border-radius: 10px; }

/* ===== 发布 ===== */
.pub-card { background: var(--card); border-radius: 18px; margin: 12px 14px; padding: 14px; box-shadow: var(--shadow); }
.pub-card textarea { width: 100%; min-height: 110px; resize: none; font-size: 15px; line-height: 1.6; }
.pub-card input.t { width: 100%; font-size: 17px; font-weight: 800; padding: 8px 0; border-bottom: 1px solid var(--border); }
.counter { text-align: right; font-size: 12px; color: var(--text-3); }
.pub-cats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; padding: 4px 0 2px; }
.pub-cat { border: 2px solid transparent; border-radius: 14px; background: #FFF9F8; padding: 10px 2px 8px; display: flex; flex-direction: column; align-items: center; gap: 3px; position: relative; }
.pub-cat .ci { width: 36px; height: 36px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 19px; }
.pub-cat .cl { font-size: 11px; color: var(--text-2); font-weight: 600; }
.pub-cat.sel { border-color: var(--primary); background: #FFF1EF; }
.pub-cat.sel .cl { color: var(--primary); }
.pub-cat.sel::after {
  content: '✓'; position: absolute; top: -7px; right: -7px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--primary); color: #fff; font-size: 11px; display: flex; align-items: center; justify-content: center;
}
.pub-imgs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 12px; }
.pub-imgs .pi { aspect-ratio: 1; border-radius: 12px; overflow: hidden; position: relative; background: #FFF3F0; }
.pub-imgs .pi img { width: 100%; height: 100%; object-fit: cover; }
.pub-imgs .pi .del { position: absolute; top: 4px; right: 4px; width: 20px; height: 20px; border-radius: 50%; background: rgba(0, 0, 0, .55); color: #fff; font-size: 12px; display: flex; align-items: center; justify-content: center; }
.pub-imgs .add { display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 4px; color: var(--text-3); font-size: 11px; border: 1.5px dashed #F0CFC8; border-radius: 12px; }
.pub-imgs .add .ic { font-size: 24px; color: var(--primary); }
.form-row { display: flex; align-items: center; gap: 10px; padding: 13px 2px; border-bottom: 1px solid var(--border); font-size: 14px; }
.form-row:last-child { border-bottom: none; }
.form-row .fr-ic { font-size: 16px; }
.form-row .fr-label { color: var(--text); font-weight: 500; flex: none; }
.form-row .fr-val { margin-left: auto; color: var(--text-3); font-size: 13px; display: flex; align-items: center; gap: 4px; }
.form-row input { flex: 1; text-align: right; color: var(--text); }
.switch-row { display: flex; align-items: center; justify-content: space-between; padding: 13px 2px; border-bottom: 1px solid var(--border); }
.switch-row:last-child { border-bottom: none; }
.switch-row .sr-l { font-weight: 600; font-size: 14px; }
.switch-row .sr-r { font-size: 12px; color: var(--text-3); }
.switch { width: 46px; height: 26px; border-radius: 13px; background: #EDE4E2; position: relative; transition: .2s; flex: none; }
.switch.on { background: var(--primary); }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: .2s; }
.switch.on::after { left: 23px; }
.tip-banner {
  margin: 12px 14px; background: linear-gradient(135deg, #FFF4E0, #FFF9F0);
  border: 1px solid #FFE3B8; border-radius: 14px; padding: 12px 14px;
  font-size: 12px; color: #A66A00; line-height: 1.7;
}
.pub-btns { display: flex; gap: 12px; padding: 16px 14px calc(20px + env(safe-area-inset-bottom)); }
.pub-btns .btn { flex: 1; }

/* ===== 详情页（简洁式） ===== */
.pi-meta { font-size: 12px; color: var(--text-3); font-weight: 400; }
.detail-flat .pi-text { font-size: 17px; font-weight: 600; line-height: 1.6; }
.detail-acts { display: flex; align-items: center; gap: 22px; margin-top: 16px; color: var(--text-2); font-size: 13px; }
.detail-acts span { display: flex; align-items: center; gap: 4px; }
.detail-acts .da-like { margin-left: auto; color: var(--text-2); }
.detail-acts .da-like.liked { color: var(--primary); font-weight: 700; }
.cmt-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 10px; margin-top: 10px; border-top: 1px solid var(--border); background: var(--card); }
.cmt-head .ch-t { font-size: 16px; font-weight: 800; }
.cmt-sort { display: flex; background: #F5F2F0; border-radius: 16px; padding: 3px; }
.cmt-sort span { font-size: 12px; padding: 4px 14px; border-radius: 13px; color: var(--text-2); }
.cmt-sort span.active { background: #fff; color: var(--text); font-weight: 700; box-shadow: 0 1px 4px rgba(0, 0, 0, .08); }

/* ===== 详情/评论 ===== */
.detail-card { background: var(--card); margin: 10px 14px; border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.detail-title { font-size: 19px; font-weight: 800; margin: 10px 0; }
.detail-content { font-size: 15px; color: var(--text); white-space: pre-wrap; word-break: break-word; }
.detail-imgs img { border-radius: 12px; margin-top: 10px; }
.comment-item { display: flex; gap: 10px; padding: 13px 16px; background: var(--card); border-bottom: 1px solid var(--border); align-items: flex-start; }
.comment-item .ci-body { flex: 1; min-width: 0; }
.comment-item .ci-name { font-size: 13px; font-weight: 600; color: var(--text-2); }
.comment-item .ci-text { font-size: 15px; color: var(--text); margin-top: 3px; word-break: break-word; line-height: 1.5; }
.comment-item .ci-time { font-size: 12px; color: var(--text-3); margin-top: 6px; display: flex; gap: 12px; align-items: center; }
.comment-item .ci-reply { color: var(--text-2); font-weight: 500; }
.comment-item .ci-like { flex: none; display: flex; flex-direction: column; align-items: center; gap: 1px; color: var(--text-3); padding-top: 4px; }
.comment-item .ci-like.liked { color: var(--primary); }
.comment-input-bar { position: absolute; left: 0; right: 0; bottom: 0; background: var(--card); padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); display: flex; gap: 10px; align-items: center; border-top: 1px solid var(--border); z-index: 25; }
.comment-input-bar input { flex: 1; height: 40px; background: #FFF6F4; border-radius: 20px; padding: 0 16px; }
.comment-input-bar .send { height: 40px; padding: 0 18px; border-radius: 20px; background: var(--grad); color: #fff; font-weight: 700; }

/* ===== 聊天 ===== */
.chat-body { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.bubble { max-width: 76%; padding: 10px 14px; border-radius: 16px; font-size: 14px; word-break: break-word; white-space: pre-wrap; }
.bubble.me { align-self: flex-end; background: var(--grad); color: #fff; border-bottom-right-radius: 4px; }
.bubble.other { align-self: flex-start; background: var(--card); border-bottom-left-radius: 4px; box-shadow: var(--shadow); }
.chat-input { display: flex; gap: 10px; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); background: var(--card); border-top: 1px solid var(--border); align-items: center; }
.chat-input input { flex: 1; height: 40px; background: #FFF6F4; border-radius: 20px; padding: 0 16px; }
.chat-input .send { width: 40px; height: 40px; border-radius: 50%; background: var(--grad); color: #fff; font-size: 18px; display: flex; align-items: center; justify-content: center; }

/* ===== 消息 ===== */
.msg-banner { margin: 12px 14px; background: linear-gradient(135deg, #FF8E7A, #F9556C); border-radius: 16px; padding: 14px 16px; color: #fff; display: flex; align-items: center; gap: 10px; box-shadow: 0 8px 20px rgba(249, 85, 108, .28); }
.msg-banner .mb-t { font-weight: 800; font-size: 14px; }
.msg-banner .mb-s { font-size: 12px; opacity: .9; }
.svc-row { display: flex; gap: 10px; margin: 12px 14px 0; }
.svc-card { flex: 1; background: var(--card); border-radius: 16px; padding: 13px; display: flex; align-items: center; gap: 10px; box-shadow: var(--shadow); }
.svc-card .si { width: 38px; height: 38px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 19px; }
.svc-card .st { font-size: 13px; font-weight: 700; }
.svc-card .ss { font-size: 11px; color: var(--text-3); }
.msg-tabs { display: flex; background: var(--card); padding: 0 8px; margin-top: 12px; border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 5; }
.msg-tabs span { flex: 1; text-align: center; padding: 12px 0 10px; font-size: 14px; color: var(--text-2); position: relative; }
.msg-tabs span.active { color: var(--text); font-weight: 800; }
.msg-tabs span.active::after { content: ''; position: absolute; left: 50%; transform: translateX(-50%); bottom: 0; width: 22px; height: 3px; border-radius: 2px; background: var(--primary); }
.nt-item { display: flex; gap: 10px; padding: 13px 16px; background: var(--card); border-bottom: 1px solid var(--border); align-items: flex-start; }
.nt-item .nt-body { flex: 1; min-width: 0; }
.nt-item .nt-t { font-size: 14px; }
.nt-item .nt-t b { font-weight: 700; }
.nt-item .nt-s { font-size: 12px; color: var(--text-3); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ===== 个人中心 ===== */
.me-hero { background: linear-gradient(160deg, #FF8E7A 0%, #F9556C 100%); padding: 26px 20px 50px; color: #fff; position: relative; overflow: hidden; }
.me-hero::before { content: ''; position: absolute; right: -30px; top: -40px; width: 160px; height: 160px; border-radius: 50%; background: rgba(255, 255, 255, .12); }
.me-hero::after { content: ''; position: absolute; right: 60px; bottom: -50px; width: 110px; height: 110px; border-radius: 50%; background: rgba(255, 255, 255, .08); }
.me-hero .ph-row { display: flex; align-items: center; gap: 14px; position: relative; z-index: 1; }
.me-hero .avatar { width: 62px; height: 62px; font-size: 24px; border: 3px solid rgba(255, 255, 255, .45); background: rgba(255, 255, 255, .25); }
.me-hero .ph-name { font-size: 20px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.me-hero .ph-bio { font-size: 13px; opacity: .9; margin-top: 3px; }
.me-hero .ph-school { display: inline-flex; align-items: center; gap: 4px; margin-top: 8px; font-size: 12px; background: rgba(255, 255, 255, .22); padding: 4px 11px; border-radius: 20px; }
.me-stats { display: flex; background: var(--card); border-radius: 18px; margin: -30px 14px 0; padding: 15px 0; box-shadow: var(--shadow); position: relative; z-index: 2; }
.me-stats .ms { flex: 1; text-align: center; }
.me-stats .ms + .ms { border-left: 1px solid var(--border); }
.me-stats .mv { font-weight: 800; font-size: 18px; }
.me-stats .ml { font-size: 11px; color: var(--text-3); }
.me-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; padding: 14px; }
.me-tile { background: var(--card); border-radius: 16px; padding: 13px 4px; display: flex; flex-direction: column; align-items: center; gap: 7px; font-size: 11px; color: var(--text-2); font-weight: 500; box-shadow: var(--shadow); }
.me-tile .ti { width: 40px; height: 40px; border-radius: 13px; display: flex; align-items: center; justify-content: center; font-size: 20px; }
.menu-card { background: var(--card); border-radius: 18px; margin: 0 14px 12px; padding: 4px 0; box-shadow: var(--shadow); }
.menu-item { display: flex; align-items: center; gap: 12px; padding: 15px 16px; }
.menu-item + .menu-item { border-top: 1px solid var(--border); }
.menu-item .mi-ic { width: 36px; height: 36px; border-radius: 11px; display: flex; align-items: center; justify-content: center; font-size: 18px; }
.menu-item .mi-l { flex: 1; font-size: 15px; font-weight: 600; }
.menu-item .mi-r { color: var(--text-3); font-size: 13px; }
.menu-item .arrow { color: var(--text-3); }
.cert-banner { margin: 12px 14px; background: linear-gradient(135deg, #FFF4E0, #FFF9F0); border: 1px solid #FFE3B8; border-radius: 16px; padding: 14px; display: flex; align-items: center; gap: 10px; }

/* ===== 轮播 ===== */
.banner-swipe { display: flex; gap: 10px; overflow-x: auto; padding: 12px 14px 4px; scroll-snap-type: x mandatory; }
.banner { flex: none; width: 82%; min-height: 104px; border-radius: 16px; padding: 18px; color: #fff; scroll-snap-align: center; position: relative; overflow: hidden; }
.banner .b-title { font-size: 18px; font-weight: 800; }
.banner .b-sub { font-size: 13px; opacity: .92; margin-top: 6px; }
.banner::after { content: ''; position: absolute; right: -20px; bottom: -30px; width: 110px; height: 110px; border-radius: 50%; background: rgba(255, 255, 255, .16); }

/* ===== 搜索框 ===== */
.search-bar { display: flex; align-items: center; gap: 10px; padding: 8px 14px; background: var(--card); }
.search-bar .sb { flex: 1; display: flex; align-items: center; gap: 8px; background: #FFF6F4; border-radius: 20px; padding: 0 14px; height: 38px; color: var(--text-3); }
.search-bar .sb input { flex: 1; height: 100%; color: var(--text); }
.search-bar .cancel { color: var(--text-2); font-size: 14px; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; padding: 4px 14px 12px; }
.chip { font-size: 12px; background: var(--card); color: var(--text-2); padding: 6px 13px; border-radius: 20px; box-shadow: var(--shadow); }
.chip.blue { color: var(--primary); background: #FFF0ED; }

/* ===== 举报理由 ===== */
.rp-reasons { display: flex; flex-wrap: wrap; gap: 10px; }
.rp-reason { flex: 1 1 44%; background: #FFF6F4; border: 1px solid var(--border); border-radius: 12px; padding: 13px 8px; text-align: center; font-size: 14px; font-weight: 500; }
.rp-reason:active { background: #FFECE9; border-color: var(--primary); color: var(--primary); }

/* ===== 弹窗/提示 ===== */
#toast { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(.9); background: rgba(30, 32, 45, .88); color: #fff; padding: 12px 20px; border-radius: 12px; font-size: 14px; z-index: 999; opacity: 0; pointer-events: none; transition: .25s; max-width: 80%; text-align: center; }
#toast.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }
#modal { position: fixed; inset: 0; background: rgba(0, 0, 0, .45); z-index: 100; display: none; align-items: flex-end; justify-content: center; }
#modal.show { display: flex; }
.modal-sheet { background: #fff; border-radius: 20px 20px 0 0; width: 100%; max-width: 520px; padding: 20px 16px calc(20px + env(safe-area-inset-bottom)); animation: sheetUp .25s; }
@keyframes sheetUp { from { transform: translateY(40px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.modal-sheet .ms-title { text-align: center; font-weight: 800; font-size: 17px; margin-bottom: 16px; }

/* ===== 图片查看器 ===== */
#viewer { position: fixed; inset: 0; background: rgba(0, 0, 0, .93); z-index: 300; display: none; align-items: center; justify-content: center; }
#viewer.show { display: flex; }
#viewer img { max-width: 100%; max-height: 100%; object-fit: contain; }
#viewer .vw-tip { position: absolute; bottom: 32px; left: 50%; transform: translateX(-50%); color: rgba(255, 255, 255, .6); font-size: 12px; }

/* ===== 首页置顶公告栏 ===== */
.notice-bar { display: flex; align-items: center; gap: 10px; margin: 12px 14px 0; background: var(--card); border-radius: 14px; padding: 11px 14px; box-shadow: var(--shadow); }
.notice-bar .nb-ic { font-size: 18px; flex: none; }
.notice-bar .nb-text { flex: 1; min-width: 0; font-size: 13px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.notice-bar .nb-text b { color: var(--text); }
.notice-bar .nb-arrow { color: var(--text-3); flex: none; }

/* ===== 投稿须知 / 用户协议 ===== */
.rules-list { font-size: 13px; color: var(--text-2); line-height: 2; text-align: left; margin-bottom: 18px; }
.agree-p { font-size: 13px; color: var(--text-2); line-height: 1.9; margin-bottom: 4px; }

/* ===== 驳回理由 ===== */
.reject-reason { margin-top: 8px; font-size: 12px; color: #E0455A; background: #FFEBEE; border-radius: 10px; padding: 8px 10px; line-height: 1.6; }

/* ===== 收藏高亮 ===== */
.detail-acts .fav-on { color: #E08A00; font-weight: 700; }

/* ===== 九宫格（朋友圈式 3 列网格） ===== */
.nine-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin-top: 10px; }
.nine-grid img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; background: #F5F0EE; }
.pi-contact { margin-top: 8px; font-size: 12px; color: var(--primary); background: #FFF0ED; border-radius: 8px; padding: 6px 10px; display: inline-block; }

/* ===== 发布形式切换（主贴 / 朋友圈） ===== */
.pub-type { display: flex; gap: 10px; }
.pub-type .pt-item { flex: 1; text-align: center; padding: 10px 0; border-radius: 12px; background: #FFF6F4; color: var(--text-2); font-size: 14px; font-weight: 600; border: 1px solid var(--border); }
.pub-type .pt-item.sel { background: var(--grad); color: #fff; border-color: transparent; font-weight: 800; }

/* ===== 朋友圈入口 ===== */
.moment-entry { margin: 12px 14px 0; background: linear-gradient(135deg, #FFF0ED, #FFE3DC); border: 1px solid #FFD8D0; border-radius: 16px; padding: 14px 16px; display: flex; align-items: center; gap: 12px; box-shadow: var(--shadow); }
.moment-entry .me-ic { width: 46px; height: 46px; border-radius: 14px; background: var(--grad); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 24px; flex: none; }
.moment-entry .me-txt { flex: 1; min-width: 0; }
.moment-entry .me-t { font-size: 16px; font-weight: 800; color: var(--text); }
.moment-entry .me-s { font-size: 12px; color: var(--text-2); margin-top: 2px; }
.moment-entry .me-arrow { color: var(--primary); font-size: 18px; }

/* ===== 响应式布局：手机优先，桌面端居中展示 ===== */
@media (min-width: 768px) {
  #app { display: flex; justify-content: center; }
  .page { position: relative; width: 480px; max-width: 100%; height: 100%; box-shadow: 0 0 0 1px var(--border); }
  .tabbar { position: absolute; left: 0; right: 0; }
  .auth-wrap { position: absolute; inset: 0; }
  .auth-card { max-width: 420px; }
}

/* ===== 搭讪电话聊天滴滴 ===== */
/* 首页入口卡片（最显眼位置） */
.call-entry {
  margin: 12px 16px 0; padding: 14px 16px; border-radius: var(--radius);
  background: linear-gradient(135deg, #6C5CE7 0%, #5B6BF0 50%, #4D96FF 100%);
  color: #fff; display: flex; align-items: center; justify-content: space-between;
  box-shadow: 0 8px 22px rgba(91, 107, 240, .35); cursor: pointer;
  animation: callEntryGlow 2s ease-in-out infinite;
}
@keyframes callEntryGlow {
  0%, 100% { box-shadow: 0 8px 22px rgba(91, 107, 240, .35); }
  50% { box-shadow: 0 8px 30px rgba(91, 107, 240, .6); }
}
.call-entry .ce-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.call-entry .ce-icon { width: 44px; height: 44px; border-radius: 50%; background: rgba(255,255,255,.2); display: flex; align-items: center; justify-content: center; font-size: 22px; flex: none; }
.call-entry .ce-info { min-width: 0; }
.call-entry .ce-title { font-size: 17px; font-weight: 800; letter-spacing: .5px; }
.call-entry .ce-sub { font-size: 12px; opacity: .85; margin-top: 2px; }
.call-entry .ce-right { font-size: 13px; font-weight: 700; opacity: .95; flex: none; }

/* 通话页 - 设置阶段 */
.call-page { background: var(--bg); }
.call-scroll { padding: 8px 16px 24px; }
.call-hero {
  margin-top: 12px; padding: 20px 18px; border-radius: var(--radius);
  background: linear-gradient(135deg, #6C5CE7 0%, #5B6BF0 60%, #4D96FF 100%);
  color: #fff; box-shadow: 0 8px 22px rgba(91, 107, 240, .3);
}
.call-hero .ch-title { font-size: 21px; font-weight: 800; }
.call-hero .ch-sub { font-size: 12px; opacity: .85; margin-top: 6px; }
.call-quota {
  margin: 14px 0; padding: 14px 18px; border-radius: var(--radius);
  background: var(--card); display: flex; align-items: center; justify-content: space-between;
  box-shadow: var(--shadow);
}
.call-quota .cq-label { font-size: 14px; color: var(--text-2); }
.call-quota .cq-num { font-size: 26px; font-weight: 800; color: var(--primary); }
.call-quota .cq-num em { font-size: 13px; font-style: normal; font-weight: 500; color: var(--text-3); }
.call-prefs { display: flex; gap: 10px; margin: 6px 0 16px; }
.call-pref {
  flex: 1; padding: 16px 8px; border-radius: var(--radius); background: var(--card);
  text-align: center; cursor: pointer; border: 2px solid transparent;
  box-shadow: var(--shadow); transition: all .15s;
}
.call-pref.active { border-color: var(--primary); background: #FFF0ED; }
.call-pref .cp-icon { font-size: 28px; }
.call-pref .cp-label { font-size: 15px; font-weight: 800; margin-top: 6px; }
.call-pref .cp-desc { font-size: 11px; color: var(--text-3); margin-top: 3px; }
.call-start { height: 50px; font-size: 16px; margin-top: 6px; }
.call-tip { font-size: 12px; color: var(--text-3); text-align: center; margin-top: 16px; line-height: 1.6; }

/* 通话页 - 匹配等待（QQ 拨号风格深色） */
.call-dial { background: linear-gradient(180deg, #23262F 0%, #16181F 100%); color: #fff; }
.dial-top { display: flex; align-items: center; padding: 14px 16px; gap: 12px; flex: none; }
.dt-back { width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,.12); display: flex; align-items: center; justify-content: center; font-size: 15px; cursor: pointer; flex: none; }
.dt-title { flex: 1; font-size: 15px; font-weight: 600; color: rgba(255,255,255,.9); text-align: center; }
.dt-right { width: 34px; text-align: center; opacity: .6; flex: none; }
.dt-title-center { flex: 1; text-align: center; font-size: 12px; color: rgba(255,255,255,.55); }
.dial-body { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.dial-avatar { position: relative; width: 170px; height: 170px; display: flex; align-items: center; justify-content: center; }
.da-ring { position: absolute; inset: 0; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.25); animation: daRipple 2.2s ease-out infinite; }
.da-ring.r2 { animation-delay: 1.1s; }
@keyframes daRipple { 0% { transform: scale(.55); opacity: .9; } 100% { transform: scale(1.35); opacity: 0; } }
.da-core {
  width: 104px; height: 104px; border-radius: 50%;
  background: linear-gradient(135deg, #6C5CE7, #4D96FF);
  display: flex; align-items: center; justify-content: center; font-size: 44px;
  box-shadow: 0 14px 40px rgba(76, 110, 245, .45);
  animation: daFloat 1.6s ease-in-out infinite;
}
@keyframes daFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.dial-text { font-size: 19px; font-weight: 700; margin-top: 34px; }
.dial-sub { font-size: 13px; color: rgba(255,255,255,.5); margin-top: 10px; text-align: center; }
.dial-foot { padding: 0 0 54px; display: flex; justify-content: center; flex: none; }
.dial-cancel { padding: 12px 44px; border-radius: 26px; background: rgba(255,255,255,.12); font-size: 15px; font-weight: 600; cursor: pointer; }
.dial-cancel:active { background: rgba(255,255,255,.22); }

/* 通话页 - 通话中（QQ 电话风格） */
.call-live .dial-body { justify-content: flex-start; padding-top: 6vh; }
.call-live .live-avatar {
  width: 110px; height: 110px; border-radius: 50%;
  background: linear-gradient(135deg, #FF8E7A, #F9556C);
  display: flex; align-items: center; justify-content: center;
  font-size: 46px; font-weight: 800; overflow: hidden;
  box-shadow: 0 14px 44px rgba(0,0,0,.45);
}
.call-live .live-avatar img { width: 100%; height: 100%; object-fit: cover; }
.call-live .live-name { font-size: 22px; font-weight: 800; margin-top: 22px; }
.call-live .live-timer { font-size: 34px; font-weight: 300; margin-top: 10px; font-variant-numeric: tabular-nums; letter-spacing: 2px; color: rgba(255,255,255,.85); }
.call-live .live-status { font-size: 12px; color: rgba(255,255,255,.45); margin-top: 6px; }
.live-ctrls { display: flex; align-items: flex-end; justify-content: center; gap: 30px; padding-bottom: 52px; flex: none; }
.ctrl-btn { display: flex; flex-direction: column; align-items: center; gap: 8px; cursor: pointer; }
.ctrl-btn .cb-icon {
  width: 60px; height: 60px; border-radius: 50%; background: rgba(255,255,255,.14);
  display: flex; align-items: center; justify-content: center; font-size: 25px;
  transition: all .15s;
}
.ctrl-btn:active .cb-icon { transform: scale(.9); }
.ctrl-btn .cb-label { font-size: 11px; color: rgba(255,255,255,.55); }
.ctrl-btn.active .cb-icon { background: #fff; }
.ctrl-btn.active .cb-label { color: rgba(255,255,255,.85); }
.ctrl-btn.hangup .cb-icon {
  width: 66px; height: 66px; background: #E0455A;
  box-shadow: 0 10px 26px rgba(224, 69, 90, .5); transform: rotate(135deg);
}
.ctrl-btn.hangup:active .cb-icon { transform: rotate(135deg) scale(.9); }
.ctrl-btn.hangup .cb-label { color: rgba(255,255,255,.75); }
