/* ================= 设计基调 =================
   高级简洁浅色系：暖白底 + 墨黑主色 + 香槟金星能点缀
   ================================================== */
:root {
  --bg: #F6F5F2;
  --card: #FFFFFF;
  --line: #EBE9E3;
  --ink: #1B1A17;
  --ink-2: #6F6C63;
  --ink-3: #A5A29A;
  --gold: #C8A15E;
  --gold-soft: #F4EBDA;
  --green: #3E7C5B;
  --red: #C75B5B;
  --radius: 18px;
  --shadow: 0 2px 12px rgba(27, 26, 23, 0.05);
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  font-family: -apple-system, "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.5;
}

#app { max-width: 480px; margin: 0 auto; min-height: 100vh; position: relative; background: var(--bg); }

/* ================= 页面 ================= */
.page { display: none; min-height: 100vh; padding-bottom: 130px; }
.page.active { display: block; animation: pageIn .25s ease; }
@keyframes pageIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ================= 顶部 ================= */
.header {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px 12px;
  background: rgba(246, 245, 242, 0.88);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
}
.header-logo { font-size: 21px; font-weight: 800; letter-spacing: 1px; }
.header-title { font-size: 17px; font-weight: 700; }
.header-btn { width: 36px; height: 36px; border: none; background: var(--card); border-radius: 12px; font-size: 20px; color: var(--ink); cursor: pointer; box-shadow: var(--shadow); }
.header-energy { font-size: 13px; font-weight: 700; color: var(--gold); background: var(--gold-soft); padding: 5px 12px; border-radius: 99px; }

.header-search {
  display: flex; align-items: center; gap: 7px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 99px; padding: 9px 16px; width: 62%; cursor: pointer;
}
.header-search svg { width: 15px; height: 15px; color: var(--ink-3); flex-shrink: 0; }
.header-search-placeholder { color: var(--ink-3); font-size: 13px; }

/* ================= 搜索面板 ================= */
.search-panel {
  position: fixed; inset: 0; z-index: 200; background: var(--bg);
  display: none; flex-direction: column; padding: 16px 18px; overflow-y: auto;
}
.search-panel.open { display: flex; animation: pageIn .2s ease; }
.search-box { display: flex; align-items: center; gap: 10px; }
.search-box svg { width: 17px; height: 17px; color: var(--ink-3); flex-shrink: 0; }
.search-box input { flex: 1; border: none; background: var(--card); border: 1px solid var(--line); border-radius: 99px; padding: 11px 16px; font-size: 14px; outline: none; color: var(--ink); }
.search-cancel { color: var(--ink-2); font-size: 14px; cursor: pointer; flex-shrink: 0; }

/* 推荐角色 */
.reco-head { margin: 26px 0 4px; font-size: 13px; color: var(--ink-3); letter-spacing: 2px; font-weight: 600; }
.reco-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 10px; }
.reco-item { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 8px; text-align: center; cursor: pointer; transition: transform .15s ease; }
.reco-item:active { transform: scale(.96); }
.reco-item img, .reco-item .reco-emoji { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; display: flex; align-items: center; justify-content: center; margin: 0 auto 8px; font-size: 24px; }
.reco-item b { display: block; font-size: 13px; }
.reco-item span { font-size: 11px; color: var(--ink-3); }

/* ================= 免费领星能卡片 ================= */
.free-energy-banner {
  display: flex; align-items: center; justify-content: space-between;
  margin: 6px 18px 4px; padding: 16px 18px;
  background: linear-gradient(120deg, #201F1B 0%, #3B382F 100%);
  border-radius: var(--radius); cursor: pointer;
  box-shadow: 0 6px 20px rgba(27, 26, 23, 0.18);
  position: relative; overflow: hidden;
}
.free-energy-banner::after {
  content: ""; position: absolute; right: -30px; top: -40px;
  width: 130px; height: 130px; border-radius: 50%;
  background: radial-gradient(circle, rgba(200, 161, 94, 0.35), transparent 70%);
}
.feb-left { display: flex; align-items: center; gap: 13px; position: relative; z-index: 1; }
.feb-icon {
  width: 42px; height: 42px; border-radius: 50%;
  background: linear-gradient(135deg, #E5C489, #C8A15E);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 19px; font-style: normal;
}
.feb-title { color: #FFF; font-size: 15px; font-weight: 700; letter-spacing: .5px; }
.feb-sub { color: rgba(255, 255, 255, 0.55); font-size: 11px; margin-top: 2px; }
.feb-btn { color: #201F1B; background: linear-gradient(135deg, #EAD9B0, #C8A15E); font-size: 12px; font-weight: 700; padding: 8px 14px; border-radius: 99px; position: relative; z-index: 1; }
.me-banner { margin: 14px 18px 0; }

/* ================= 顶部Tab / 分类 / 排序 ================= */
.top-tabs { display: flex; gap: 22px; padding: 16px 18px 6px; }
.top-tab { border: none; background: none; font-size: 16px; color: var(--ink-3); font-weight: 600; cursor: pointer; padding: 2px 0; position: relative; }
.top-tab.active { color: var(--ink); font-weight: 800; font-size: 17px; }
.top-tab.active::after { content: ""; position: absolute; left: 50%; transform: translateX(-50%); bottom: -7px; width: 18px; height: 3px; border-radius: 3px; background: var(--ink); }

.category-bar { display: flex; gap: 8px; overflow-x: auto; padding: 10px 18px; scrollbar-width: none; }
.category-bar::-webkit-scrollbar { display: none; }
.cat-tag { flex-shrink: 0; border: 1px solid var(--line); background: var(--card); color: var(--ink-2); font-size: 13px; padding: 6px 15px; border-radius: 99px; cursor: pointer; transition: all .18s ease; }
.cat-tag.active { background: var(--ink); color: #fff; border-color: var(--ink); font-weight: 600; }

.sort-bar { display: flex; align-items: center; gap: 6px; padding: 4px 18px 8px; }
.sort-tag { border: none; background: none; color: var(--ink-3); font-size: 13px; cursor: pointer; padding: 4px 8px; border-radius: 8px; display: flex; align-items: center; gap: 4px; }
.sort-tag.active { color: var(--ink); font-weight: 700; background: rgba(27, 26, 23, 0.06); }

/* ================= 角色卡片网格 ================= */
.char-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; padding: 6px 18px 20px; }
.grid-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; cursor: pointer; box-shadow: var(--shadow); transition: transform .18s ease; animation: pageIn .3s ease; }
.grid-card:active { transform: scale(.97); }
.grid-cover { position: relative; aspect-ratio: 1/1.05; display: flex; align-items: center; justify-content: center; font-size: 52px; overflow: hidden; }
.grid-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.grid-heat { position: absolute; top: 10px; left: 10px; background: rgba(20, 19, 16, 0.55); backdrop-filter: blur(6px); color: #fff; font-size: 11px; padding: 3px 9px; border-radius: 99px; z-index: 2; }
.grid-rank { position: absolute; top: 10px; right: 10px; width: 24px; height: 24px; border-radius: 8px; background: var(--ink); color: #EAD9B0; font-size: 12px; font-weight: 800; display: flex; align-items: center; justify-content: center; z-index: 2; }
.grid-new { position: absolute; top: 10px; right: 10px; background: var(--gold); color: #fff; font-size: 10px; font-weight: 700; padding: 3px 8px; border-radius: 99px; z-index: 2; letter-spacing: 1px; }
.grid-body { padding: 11px 13px 13px; }
.grid-name { font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.grid-badge { font-size: 10px; color: var(--gold); border: 1px solid var(--gold); padding: 1px 6px; border-radius: 6px; font-weight: 600; }
.grid-intro { font-size: 12px; color: var(--ink-2); margin: 4px 0 9px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.grid-msg-btn { width: 100%; border: none; background: var(--bg); color: var(--ink); font-size: 13px; font-weight: 600; padding: 8px 0; border-radius: 10px; cursor: pointer; transition: all .18s ease; }
.grid-msg-btn:active { background: var(--ink); color: #fff; }

.feedback-link { text-align: center; font-size: 12px; color: var(--ink-3); padding: 6px 0 10px; }

/* 悬浮问题反馈 */
.float-feedback {
  position: fixed; right: 16px; bottom: 130px; z-index: 90;
  display: flex; align-items: center; gap: 6px;
  background: rgba(255, 255, 255, 0.9); backdrop-filter: blur(10px);
  border: 1px solid var(--line); border-radius: 99px;
  padding: 8px 14px; font-size: 12px; color: var(--ink-2); cursor: pointer;
  box-shadow: var(--shadow);
}
.float-feedback svg { width: 14px; height: 14px; }

/* ================= 消息页 ================= */
.wechat-card {
  margin: 8px 18px; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px 16px; cursor: pointer; box-shadow: var(--shadow);
}
.wechat-card > b { font-size: 14px; }
.wechat-main { display: flex; align-items: center; gap: 12px; margin-top: 11px; }
.wechat-logo {
  width: 42px; height: 42px; border-radius: 12px; flex-shrink: 0;
  background: #07C160; color: #fff; font-size: 15px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.wechat-main p { flex: 1; display: flex; flex-direction: column; }
.wechat-main strong { font-size: 14px; }
.wechat-main small { font-size: 11px; color: var(--ink-3); }
.wechat-mark { font-size: 11px; color: var(--ink-3); background: var(--bg); padding: 4px 10px; border-radius: 99px; flex-shrink: 0; }
.wechat-mark.on { color: var(--green); background: rgba(62, 124, 91, 0.1); }

.msg-search { display: flex; align-items: center; gap: 8px; margin: 12px 18px 4px; background: var(--card); border: 1px solid var(--line); border-radius: 99px; padding: 10px 16px; }
.msg-search svg { width: 15px; height: 15px; color: var(--ink-3); flex-shrink: 0; }
.msg-search input { flex: 1; border: none; background: none; outline: none; font-size: 13px; color: var(--ink); }

.msg-session-list { padding: 8px 18px; }
.session-card {
  display: flex; align-items: center; gap: 13px;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 13px 14px; margin-bottom: 10px; cursor: pointer; box-shadow: var(--shadow);
}
.session-avatar { width: 48px; height: 48px; border-radius: 50%; flex-shrink: 0; overflow: hidden; display: flex; align-items: center; justify-content: center; font-size: 21px; color: #fff; }
.session-avatar img { width: 100%; height: 100%; object-fit: cover; }
.session-info { flex: 1; min-width: 0; }
.session-name { font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.pin-mark { font-size: 10px; color: var(--gold); border: 1px solid var(--gold); padding: 0 5px; border-radius: 5px; flex-shrink: 0; }
.session-preview { font-size: 12px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px; }
.session-side { display: flex; flex-direction: column; align-items: flex-end; gap: 7px; flex-shrink: 0; }
.session-time { font-size: 11px; color: var(--ink-3); }
.session-more { border: none; background: var(--bg); color: var(--ink-2); font-size: 13px; width: 26px; height: 22px; border-radius: 7px; cursor: pointer; }
.session-actions { display: flex; gap: 8px; margin: -4px 0 10px; }
.session-actions button { border: none; font-size: 12px; padding: 7px 16px; border-radius: 99px; cursor: pointer; }
.sa-pin { background: var(--gold-soft); color: var(--gold); font-weight: 600; }
.sa-del { background: rgba(199, 91, 91, 0.1); color: var(--red); font-weight: 600; }

.empty-state { text-align: center; color: var(--ink-3); font-size: 13px; padding: 46px 20px; line-height: 2; grid-column: 1/-1; }
.empty-icon { font-size: 34px; margin-bottom: 4px; }

/* ================= 成长页 ================= */
.growth-wrap { padding: 8px 18px; }
.mini-growth-hero {
  position: relative; overflow: hidden;
  background: linear-gradient(125deg, #201F1B, #3B382F);
  border-radius: 22px; padding: 26px 22px; min-height: 130px;
  display: flex; align-items: center; color: #fff;
}
.mini-growth-copy strong { font-size: 12px; color: #EAD9B0; letter-spacing: 3px; }
.mini-growth-copy h1 { font-size: 26px; font-weight: 800; margin: 4px 0 6px; }
.mini-growth-copy p { font-size: 12px; color: rgba(255, 255, 255, 0.55); }
.mini-growth-hero > em { position: absolute; right: 26px; top: 20px; color: #EAD9B0; font-size: 26px; font-style: normal; opacity: .9; }
.mini-planet { position: relative; width: 74px; height: 74px; margin-left: auto; margin-right: 10px; }
.mini-planet i, .mini-planet b, .mini-planet span { position: absolute; border-radius: 50%; }
.mini-planet i { inset: 8px; background: radial-gradient(circle at 35% 30%, #EAD9B0, #C8A15E); box-shadow: 0 0 26px rgba(200, 161, 94, 0.55); }
.mini-planet b { inset: 0; border: 1px solid rgba(234, 217, 176, 0.45); animation: orbitSpin 7s linear infinite; }
.mini-planet span { width: 12px; height: 12px; background: #EAD9B0; top: -2px; left: 31px; box-shadow: 0 0 10px rgba(234, 217, 176, 0.8); }
@keyframes orbitSpin { to { transform: rotate(360deg); } }

.mini-balance-card {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 17px 20px; margin-top: 14px;
  cursor: pointer; box-shadow: var(--shadow);
}
.mini-balance-card strong { font-size: 14px; }
.mini-balance-card span { display: flex; align-items: baseline; gap: 4px; font-size: 22px; font-weight: 800; }
.mini-balance-card i { color: var(--gold); font-style: normal; font-size: 17px; }

.growth-ops { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 6px 18px; margin-top: 14px; box-shadow: var(--shadow); }
.growth-ops h2 { font-size: 15px; font-weight: 700; padding: 12px 0 4px; }
.growth-op { display: flex; align-items: center; gap: 14px; padding: 15px 0; cursor: pointer; }
.growth-op-icon { width: 44px; height: 44px; border-radius: 50%; background: var(--gold-soft); color: var(--gold); display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; font-style: normal; }
.growth-op-icon.second { background: #EAE6DC; color: var(--ink-2); }
.growth-op > div { flex: 1; }
.growth-op strong { font-size: 14px; display: block; }
.growth-op p { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.growth-op button { border: 1px solid var(--ink); background: none; color: var(--ink); font-size: 12px; font-weight: 600; padding: 7px 16px; border-radius: 99px; cursor: pointer; }
.growth-ops hr { border: none; border-top: 1px solid var(--line); }

/* 成长页底部弹层 */
.growth-sheet-mask { position: fixed; inset: 0; z-index: 300; background: rgba(20, 19, 16, 0.5); display: none; align-items: flex-end; justify-content: center; }
.growth-sheet-mask.open { display: flex; }
.growth-sheet {
  width: 100%; max-width: 480px; background: var(--card);
  border-radius: 24px 24px 0 0; padding: 26px 22px 40px;
  position: relative; animation: sheetUp .28s ease;
}
@keyframes sheetUp { from { transform: translateY(60px); opacity: 0; } to { transform: none; opacity: 1; } }
.growth-sheet-close { position: absolute; top: 14px; right: 16px; border: none; background: var(--bg); width: 30px; height: 30px; border-radius: 50%; font-size: 16px; color: var(--ink-2); cursor: pointer; }
.growth-sheet h2 { font-size: 17px; font-weight: 800; }
.growth-sheet > div > p { font-size: 12px; color: var(--ink-3); margin: 7px 0 16px; }
.growth-sheet input {
  width: 100%; border: 1px solid var(--line); background: var(--bg);
  border-radius: 13px; padding: 13px 16px; font-size: 14px; margin-bottom: 12px;
  outline: none; color: var(--ink);
}
.growth-submit { width: 100%; border: none; background: var(--ink); color: #fff; font-size: 15px; font-weight: 700; padding: 14px 0; border-radius: 14px; cursor: pointer; margin-top: 4px; }
.sheet-tip { font-size: 12px; margin-top: 10px; min-height: 16px; }
.sheet-upload { display: flex; align-items: center; justify-content: center; border: 1.5px dashed var(--ink-3); border-radius: 13px; padding: 14px; margin-bottom: 12px; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.sheet-upload.filled { border-style: solid; border-color: var(--gold); color: var(--gold); background: var(--gold-soft); }

/* ================= 我的页 ================= */
.me-wrap { padding: 8px 18px; }
.mini-profile-card { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 18px; box-shadow: var(--shadow); }
.mini-profile-main { display: flex; align-items: center; gap: 14px; }
.mini-avatar {
  width: 58px; height: 58px; border-radius: 50%; flex-shrink: 0; overflow: hidden;
  background: linear-gradient(135deg, #E5C489, #C8A15E); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 23px; font-weight: 700;
}
.mini-avatar img { width: 100%; height: 100%; object-fit: cover; }
.mini-profile-copy { flex: 1; }
.mini-profile-copy strong { font-size: 17px; display: block; }
.mini-profile-copy span { font-size: 11px; color: var(--ink-3); }
.mini-profile-edit { border: 1px solid var(--line); background: var(--bg); font-size: 12px; color: var(--ink); padding: 7px 15px; border-radius: 99px; cursor: pointer; }

.mini-account-row { display: flex; margin-top: 16px; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.mini-account-row > div { flex: 1; display: flex; align-items: center; gap: 6px; padding: 13px 14px; cursor: pointer; }
.mini-account-row > div:first-child { border-right: 1px solid var(--line); }
.mini-account-row span { font-size: 12px; color: var(--ink-2); }
.mini-account-row b { font-size: 13px; flex: 1; text-align: right; }
.mini-account-row i { font-style: normal; color: var(--ink-3); font-size: 12px; }

.mini-membership-row {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 12px; padding: 14px 16px;
  background: linear-gradient(120deg, #F7F1E3, #EFE4CC);
  border-radius: 14px; cursor: pointer;
}
.mini-membership-row strong { font-size: 14px; color: #8A6A2E; }
.mini-membership-row span { font-size: 12px; color: #A8894E; }
.mini-membership-row i { font-style: normal; }

.mini-services-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-top: 14px; box-shadow: var(--shadow); }
.mini-services-card h2 { font-size: 15px; font-weight: 700; margin-bottom: 14px; }
.mini-services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.mini-services-grid article {
  display: flex; flex-direction: column; align-items: center; gap: 9px;
  background: var(--bg); border-radius: 14px; padding: 16px 6px; cursor: pointer;
  transition: transform .15s ease;
}
.mini-services-grid article:active { transform: scale(.95); }
.mini-services-grid i {
  font-style: normal; width: 40px; height: 40px; border-radius: 12px;
  background: var(--card); border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-2);
}
.mini-services-grid i svg { width: 20px; height: 20px; }
.mini-services-grid .customer-icon { color: var(--ink); }
.mini-services-grid span { font-size: 12px; color: var(--ink-2); }

.mini-partner-head { display: flex; align-items: center; justify-content: space-between; margin: 20px 2px 12px; }
.mini-partner-head h2 { font-size: 16px; font-weight: 800; }
.mini-partner-actions { display: flex; gap: 8px; }
.mini-partner-actions button { border: 1px solid var(--line); background: var(--card); font-size: 12px; color: var(--ink-2); padding: 7px 16px; border-radius: 99px; cursor: pointer; }
.mini-partner-actions .pp-delete.on { background: var(--red); border-color: var(--red); color: #fff; }

.mini-companion-grid { display: flex; gap: 12px; overflow-x: auto; padding: 2px 2px 8px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.mini-companion-grid::-webkit-scrollbar { display: none; }
.companion-card { position: relative; flex: 0 0 74px; height: 74px; border-radius: 16px; overflow: hidden; cursor: pointer; background: var(--card); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; font-size: 26px; }
.companion-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.companion-shade { position: absolute; inset: 0; background: linear-gradient(to top, rgba(20, 19, 16, 0.72), transparent 60%); }
.companion-card strong { position: absolute; bottom: 6px; left: 0; right: 0; text-align: center; color: #fff; font-size: 11px; font-weight: 700; z-index: 2; padding: 0 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.companion-select { position: absolute; top: 6px; right: 6px; width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid rgba(255, 255, 255, 0.8); background: rgba(20, 19, 16, 0.3); color: #fff; font-size: 10px; display: flex; align-items: center; justify-content: center; z-index: 2; }
.companion-select.checked { background: var(--gold); border-color: var(--gold); }
.companion-create { border: 1.5px dashed var(--ink-3); background: none; flex-direction: column; gap: 2px; color: var(--ink-3); font-size: 11px; }
.companion-create b { font-size: 22px; font-weight: 300; line-height: 1; }

/* ================= 钱包页 ================= */
.wallet-quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.wallet-quick button {
  border: 1px solid var(--line); background: var(--card); border-radius: 15px;
  padding: 13px 8px; cursor: pointer; text-align: left;
  display: flex; flex-direction: column; gap: 3px; box-shadow: var(--shadow);
}
.wallet-quick button span { font-size: 11px; color: var(--ink-3); }
.wallet-quick button strong { font-size: 14px; color: var(--ink); }
.wallet-quick button.social { grid-column: 1/-1; flex-direction: row; align-items: center; gap: 8px; background: linear-gradient(120deg, #F7F1E3, #EFE4CC); border-color: #EFE4CC; }
.wallet-quick button.social em { font-style: normal; font-size: 10px; color: #fff; background: var(--gold); padding: 2px 8px; border-radius: 99px; }
.wallet-quick button.social strong { color: #8A6A2E; }

.wallet-tabs { display: flex; gap: 22px; margin: 20px 2px 14px; }
.wallet-tabs button { border: none; background: none; font-size: 15px; color: var(--ink-3); cursor: pointer; font-weight: 600; position: relative; padding: 2px 0; }
.wallet-tabs button.on { color: var(--ink); font-weight: 800; }
.wallet-tabs button.on::after { content: ""; position: absolute; left: 50%; transform: translateX(-50%); bottom: -7px; width: 16px; height: 3px; border-radius: 3px; background: var(--ink); }

.wallet-subnav { display: flex; background: var(--card); border: 1px solid var(--line); border-radius: 99px; padding: 4px; margin-bottom: 14px; }
.wallet-subnav button { flex: 1; border: none; background: none; font-size: 13px; color: var(--ink-2); padding: 9px 0; border-radius: 99px; cursor: pointer; }
.wallet-subnav button.on { background: var(--ink); color: #fff; font-weight: 700; }

.plan-card { width: 100%; display: flex; align-items: center; justify-content: space-between; background: var(--card); border: 1.5px solid var(--line); border-radius: 15px; padding: 15px 16px; margin-bottom: 10px; cursor: pointer; }
.plan-card.on { border-color: var(--ink); }
.plan-card .plan-info { display: flex; flex-direction: column; gap: 3px; text-align: left; }
.plan-card strong { font-size: 15px; display: flex; align-items: center; gap: 6px; }
.plan-card small { font-size: 11px; color: var(--ink-3); }
.plan-card b { font-size: 16px; }
.plan-badge { font-size: 10px; font-style: normal; padding: 1px 7px; border-radius: 6px; font-weight: 700; }
.plan-badge.hot { background: var(--ink); color: #EAD9B0; }
.plan-badge.first { background: var(--gold-soft); color: var(--gold); }
.plan-badge.small { background: #EAF2FE; color: #2E6BD6; }
.plan-badge.best { background: #FDF0E7; color: #C2622A; }
.plan-group-label { font-size: 12px; font-weight: 700; color: var(--ink-2); margin: 14px 2px 8px; display: flex; align-items: center; gap: 6px; }
.plan-group-label::before { content: ""; width: 3px; height: 12px; border-radius: 2px; background: var(--ink-3); }
.plan-group-label.gold { color: #8A6A2E; margin-top: 2px; }
.plan-group-label.gold::before { background: var(--gold); }
.plan-card.highlight { border: 1.5px solid var(--gold); background: linear-gradient(135deg, #FFFDF6, #FBF4E4); position: relative; }
.plan-card.highlight b { color: #8A6A2E; }
.plan-card.frame-small { border: 1.5px solid #8FB4EE; background: linear-gradient(135deg, #F7FAFF, #EEF5FE); }
.plan-card.frame-small b { color: #2E6BD6; }
.plan-card.frame-best { border: 1.5px solid #EEB68C; background: linear-gradient(135deg, #FFFBF7, #FDF2E9); }
.plan-card.frame-best b { color: #C2622A; }

.wallet-pay { width: 100%; border: none; background: var(--ink); color: #fff; font-size: 15px; font-weight: 700; padding: 15px 0; border-radius: 15px; cursor: pointer; margin-top: 6px; }
.wallet-agreement { text-align: center; font-size: 11px; color: var(--ink-3); margin-top: 10px; }

.redeem-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-top: 18px; }
.redeem-card h2 { font-size: 14px; font-weight: 700; }
.redeem-card > p { font-size: 12px; color: var(--ink-3); margin: 5px 0 12px; }
.redeem-card > div { display: flex; gap: 10px; }
.redeem-card input { flex: 1; border: 1px solid var(--line); background: var(--bg); border-radius: 12px; padding: 12px 14px; font-size: 14px; outline: none; }
.redeem-card button { border: none; background: var(--ink); color: #fff; font-size: 13px; font-weight: 600; padding: 0 22px; border-radius: 12px; cursor: pointer; }

.detail-item { display: flex; align-items: center; gap: 13px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px 15px; margin-bottom: 9px; }
.detail-item i { width: 34px; height: 34px; border-radius: 50%; font-style: normal; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; flex-shrink: 0; }
.detail-item i.plus { background: rgba(62, 124, 91, 0.12); color: var(--green); }
.detail-item i.minus { background: rgba(199, 91, 91, 0.1); color: var(--red); }
.detail-item span { flex: 1; }
.detail-item strong { font-size: 13px; display: block; }
.detail-item small { font-size: 11px; color: var(--ink-3); }
.detail-item b { font-size: 13px; }
.detail-item b.plus { color: var(--green); }

.wallet-active-tip { text-align: center; font-size: 12px; color: var(--gold); margin-top: 12px; }

/* ================= 子页通用 ================= */
.subpage-wrap { padding: 12px 18px 30px; }
.social-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 14px; box-shadow: var(--shadow); }
.social-card h2 { font-size: 15px; font-weight: 700; margin-bottom: 13px; }
.social-note { font-size: 12px; color: var(--ink-3); line-height: 1.7; }

.claim-section-title { font-size: 16px; font-weight: 800; margin: 18px 2px 10px; }
.claim-tips { font-size: 11px; color: var(--ink-3); line-height: 1.7; margin: 0 2px 14px; }

/* 种草 */
.social-platforms { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; }
.sp-item { display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-2); background: var(--bg); border-radius: 13px; padding: 13px 4px; }
.sp-logo { width: 36px; height: 36px; border-radius: 50%; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 15px; overflow: hidden; }
.sp-logo img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
.social-step { display: flex; gap: 8px; font-size: 13px; color: var(--ink-2); margin-bottom: 10px; line-height: 1.6; }
.social-step b { flex-shrink: 0; color: var(--ink); }
.social-step strong { color: var(--gold); }
.mini-copy-btn { border: none; background: var(--ink); color: #fff; font-size: 11px; padding: 3px 10px; border-radius: 99px; margin-left: 8px; cursor: pointer; }
.social-input { width: 100%; border: 1px solid var(--line); background: var(--bg); border-radius: 12px; padding: 12px 14px; font-size: 14px; outline: none; margin-bottom: 12px; color: var(--ink); }
.social-upload { display: flex; flex-direction: column; align-items: center; justify-content: center; border: 1.5px dashed var(--ink-3); border-radius: 13px; padding: 16px; margin-bottom: 12px; font-size: 13px; color: var(--ink-2); cursor: pointer; overflow: hidden; min-height: 80px; }
.social-upload.filled { border-style: solid; border-color: var(--gold); color: var(--gold); background: var(--gold-soft); padding: 8px; }
.social-upload img { width: 100%; max-height: 300px; object-fit: contain; border-radius: 8px; margin-bottom: 8px; }
.social-upload .su-plus { display: flex; align-items: center; justify-content: center; }
.su-plus em { font-style: normal; margin-left: 6px; }
.social-submit { width: 100%; border: none; background: var(--ink); color: #fff; font-size: 15px; font-weight: 700; padding: 14px 0; border-radius: 14px; cursor: pointer; }
.social-reward { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.social-reward:last-of-type { border-bottom: none; }
.social-reward b { color: var(--ink-3); }
.social-reward strong { font-size: 15px; color: var(--gold); width: 74px; flex-shrink: 0; }
.social-reward em { font-style: normal; color: var(--ink-2); }
.social-reward i { font-style: normal; font-weight: 700; }
.social-status { display: flex; align-items: center; justify-content: space-between; border-radius: 14px; padding: 14px 16px; margin-bottom: 14px; font-size: 13px; }
.social-status.pending { background: var(--gold-soft); color: #8A6A2E; }
.social-status.approved { background: rgba(62, 124, 91, 0.12); color: var(--green); }
.social-status.rejected { background: rgba(199, 91, 91, 0.1); color: var(--red); }

/* 任务卡 */
.task-card { display: flex; align-items: center; gap: 12px; background: var(--card); border: 1px solid var(--line); border-radius: 15px; padding: 14px 15px; margin-bottom: 10px; }
.task-info { flex: 1; min-width: 0; }
.task-name { font-size: 14px; font-weight: 700; }
.task-name small { font-weight: 400; color: var(--ink-3); font-size: 11px; margin-left: 5px; }
.task-progress { font-size: 11px; color: var(--ink-3); margin: 3px 0 5px; }
.task-bar { height: 4px; background: var(--bg); border-radius: 4px; overflow: hidden; }
.task-bar-inner { height: 100%; background: linear-gradient(90deg, #E5C489, #C8A15E); border-radius: 4px; transition: width .3s ease; }
.task-reward { font-size: 14px; font-weight: 800; color: var(--gold); flex-shrink: 0; }
.task-reward i { font-style: normal; }
.task-btn { border: 1px solid var(--ink); background: none; color: var(--ink); font-size: 12px; font-weight: 600; padding: 8px 16px; border-radius: 99px; cursor: pointer; flex-shrink: 0; }
.task-btn.go { background: var(--gold-soft); border-color: var(--gold-soft); color: #8A6A2E; }
.task-btn.done { border-color: var(--line); color: var(--ink-3); background: none; }

.pack-card { display: flex; align-items: center; justify-content: space-between; background: var(--card); border: 1px solid var(--line); border-radius: 15px; padding: 15px 16px; margin-bottom: 10px; }
.pack-card.pack-small { border: 1.5px solid #8FB4EE; background: linear-gradient(135deg, #F7FAFF, #EEF5FE); }
.pack-card.pack-best { border: 1.5px solid #EEB68C; background: linear-gradient(135deg, #FFFBF7, #FDF2E9); }
.pack-tag { font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 6px; margin-left: 8px; }
.pack-tag.small { background: #EAF2FE; color: #2E6BD6; }
.pack-tag.best { background: #FDF0E7; color: #C2622A; }
.pack-energy { display: flex; align-items: center; gap: 8px; font-size: 16px; }
.pack-energy i { color: var(--gold); font-style: normal; }
.pack-badge { font-size: 10px; color: #8A6A2E; background: var(--gold-soft); padding: 2px 8px; border-radius: 6px; }
.pack-buy { border: none; background: var(--ink); color: #fff; font-size: 12px; font-weight: 600; padding: 9px 16px; border-radius: 99px; cursor: pointer; }

/* 首购专属福利大卡片 */
.claim-pack-first { background: linear-gradient(135deg, #FFFDF6, #FBF3E0); border: 1.5px solid var(--gold); border-radius: 16px; padding: 14px 16px 16px; margin-bottom: 12px; }
.cpf-tag { display: inline-block; font-size: 10px; font-weight: 800; color: #fff; background: linear-gradient(135deg, #C8A15E, #A87E3C); padding: 3px 10px; border-radius: 99px; margin-bottom: 10px; letter-spacing: 1px; }
.cpf-main { display: flex; align-items: center; justify-content: space-between; }
.cpf-energy { display: flex; align-items: center; gap: 7px; }
.cpf-energy i { color: var(--gold); font-style: normal; font-size: 18px; }
.cpf-energy strong { font-size: 30px; font-weight: 800; color: var(--ink); }
.cpf-info { text-align: right; display: flex; flex-direction: column; gap: 3px; }
.cpf-info b { font-size: 14px; color: #8A6A2E; font-weight: 800; }
.cpf-info span { font-size: 11px; color: var(--ink-3); }
.cpf-buy { width: 100%; margin-top: 12px; border: none; background: var(--ink); color: #EAD9B0; font-size: 14px; font-weight: 700; padding: 12px; border-radius: 12px; cursor: pointer; }
.claim-pack-list .pack-card { margin-bottom: 8px; }

/* FAQ / 反馈 */
.faq-item { border-bottom: 1px solid var(--line); padding: 13px 0; cursor: pointer; }
.faq-item:last-child { border-bottom: none; }
.faq-q { font-size: 14px; font-weight: 600; display: flex; justify-content: space-between; }
.faq-q i { color: var(--ink-3); font-style: normal; }
.faq-a { font-size: 12px; color: var(--ink-2); line-height: 1.7; max-height: 0; overflow: hidden; transition: max-height .25s ease; }
.faq-item.open .faq-a { max-height: 300px; margin-top: 8px; }
.fb-types { display: flex; flex-wrap: wrap; gap: 9px; }
.fb-type { border: 1px solid var(--line); background: var(--bg); font-size: 12px; color: var(--ink-2); padding: 8px 16px; border-radius: 99px; cursor: pointer; }
.fb-type.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.fb-textarea { width: 100%; height: 120px; border: 1px solid var(--line); background: var(--bg); border-radius: 13px; padding: 13px; font-size: 14px; outline: none; resize: none; margin-bottom: 12px; color: var(--ink); font-family: inherit; }

/* ================= 设置页 ================= */
.setting-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 5px 17px; margin-bottom: 14px; box-shadow: var(--shadow); }
.setting-card h2 { font-size: 13px; color: var(--ink-3); font-weight: 600; padding: 13px 0 3px; letter-spacing: 1px; }
.setting-row { width: 100%; display: flex; align-items: center; justify-content: space-between; padding: 14px 0; border-bottom: 1px solid var(--line); background: none; border-left: none; border-right: none; border-top: none; cursor: pointer; font-family: inherit; }
.setting-row:last-child { border-bottom: none; }
.setting-row span { display: flex; flex-direction: column; gap: 2px; text-align: left; }
.setting-row b { font-size: 14px; font-weight: 600; color: var(--ink); }
.setting-row small { font-size: 11px; color: var(--ink-3); }
.setting-row i { font-style: normal; color: var(--ink-3); font-size: 15px; }
.setting-row em { font-style: normal; font-size: 12px; color: var(--gold); border: 1px solid var(--gold); padding: 4px 12px; border-radius: 99px; }

.round-switch { width: 46px; height: 27px; border-radius: 99px; background: #DEDBD3; position: relative; cursor: pointer; transition: background .2s ease; flex-shrink: 0; }
.round-switch i { position: absolute; top: 3px; left: 3px; width: 21px; height: 21px; border-radius: 50%; background: #fff; transition: left .2s ease; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2); }
.round-switch.on { background: var(--ink); }
.round-switch.on i { left: 22px; }
.round-switch.safe.on { background: var(--green); }

/* 个人资料编辑 */
.profile-avatar-row { display: flex; align-items: center; gap: 18px; padding: 14px 0; }
.profile-avatar-big { width: 72px; height: 72px; border-radius: 50%; background: linear-gradient(135deg, #E5C489, #C8A15E); color: #fff; font-size: 28px; font-weight: 700; display: flex; align-items: center; justify-content: center; cursor: pointer; overflow: hidden; flex-shrink: 0; }
.profile-avatar-big img { width: 100%; height: 100%; object-fit: cover; }
.profile-avatar-tip { font-size: 13px; color: var(--ink-2); }
.profile-avatar-tip small { font-size: 11px; color: var(--ink-3); }
.form-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.form-row:last-of-type { border-bottom: none; }
.form-row label { font-size: 14px; flex-shrink: 0; color: var(--ink-2); }
.form-row input { border: 1px solid var(--line); background: var(--bg); border-radius: 11px; padding: 10px 13px; font-size: 14px; outline: none; width: 62%; text-align: right; color: var(--ink); }
.form-row.col { flex-direction: column; align-items: stretch; }
.form-row.col label { margin-bottom: 9px; }
.form-row.col textarea, .form-row.col input { width: 100%; text-align: left; }
.code-row { display: flex; gap: 9px; width: 62%; }
.code-row input { flex: 1; width: auto; }
.code-btn { border: 1px solid var(--ink); background: none; color: var(--ink); font-size: 12px; padding: 0 13px; border-radius: 11px; cursor: pointer; white-space: nowrap; }

/* 法律文本 */
.legal-body { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 20px; font-size: 13px; color: var(--ink-2); line-height: 2; }
.legal-body h3 { font-size: 14px; color: var(--ink); margin: 14px 0 6px; }
.legal-body h3:first-child { margin-top: 0; }
.legal-dates { font-size: 11px; color: var(--ink-3); margin-bottom: 8px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.legal-intro { color: var(--ink-2); }
.legal-notice { margin-top: 14px; padding-top: 10px; border-top: 1px dashed var(--line); font-size: 11px; color: var(--ink-3); }

/* ================= 创建角色 ================= */
.create-wrap { padding: 4px 18px 30px; }
.create-hero { padding: 18px 4px 16px; }
.create-hero-title { font-size: 22px; font-weight: 800; }
.create-hero-sub { font-size: 12px; color: var(--ink-3); margin-top: 5px; }
.create-section { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 17px; margin-bottom: 14px; box-shadow: var(--shadow); }
.create-section-title { font-size: 15px; font-weight: 700; margin-bottom: 14px; }
.create-tip { font-size: 11px; color: var(--ink-3); font-weight: 400; }
.upload-row { display: flex; gap: 12px; }
.upload-box { flex: 1; aspect-ratio: 1/1; border: 1.5px dashed var(--ink-3); border-radius: 14px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; cursor: pointer; background-size: cover; background-position: center; font-size: 24px; color: var(--ink-3); }
.upload-box em { font-style: normal; font-size: 12px; color: var(--ink-2); background: rgba(255, 255, 255, 0.85); padding: 2px 8px; border-radius: 6px; }
.upload-box.filled { border-style: solid; border-color: var(--gold); }
.upload-note { font-size: 11px; color: var(--ink-3); margin-top: 10px; }
.gender-picker { display: flex; gap: 8px; width: 62%; justify-content: flex-end; flex-wrap: wrap; }
.gender-opt { border: 1px solid var(--line); background: var(--bg); font-size: 12px; color: var(--ink-2); padding: 7px 13px; border-radius: 99px; cursor: pointer; }
.gender-opt.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.form-row textarea { border: 1px solid var(--line); background: var(--bg); border-radius: 12px; padding: 12px 14px; font-size: 14px; outline: none; resize: none; font-family: inherit; }
.switch-row { border-bottom: none !important; }
.switch { width: 46px; height: 27px; border-radius: 99px; background: #DEDBD3; position: relative; cursor: pointer; transition: background .2s ease; flex-shrink: 0; }
.switch-dot { position: absolute; top: 3px; left: 3px; width: 21px; height: 21px; border-radius: 50%; background: #fff; transition: left .2s ease; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2); }
.switch.on { background: var(--ink); }
.switch.on .switch-dot { left: 22px; }
.publish-picker { display: flex; gap: 11px; }
.publish-opt { flex: 1; border: 1.5px solid var(--line); border-radius: 14px; padding: 14px; cursor: pointer; }
.publish-opt.selected { border-color: var(--ink); background: rgba(27, 26, 23, 0.03); }
.publish-name { font-size: 14px; font-weight: 700; }
.publish-desc { font-size: 11px; color: var(--ink-3); margin-top: 4px; }
.create-submit-wrap { padding: 8px 0 20px; }
.create-submit { width: 100%; border: none; background: var(--ink); color: #fff; font-size: 16px; font-weight: 700; padding: 16px 0; border-radius: 16px; cursor: pointer; }

/* ================= 详情页 ================= */
.detail-hero { text-align: center; padding: 24px 20px 10px; }
.detail-avatar { width: 92px; height: 92px; border-radius: 50%; margin: 0 auto 13px; overflow: hidden; display: flex; align-items: center; justify-content: center; font-size: 40px; }
.detail-avatar img { width: 100%; height: 100%; object-fit: cover; }
.detail-name { font-size: 21px; font-weight: 800; }
.detail-heat { font-size: 12px; color: var(--gold); margin-top: 4px; }
.detail-tags { display: flex; justify-content: center; gap: 7px; flex-wrap: wrap; margin: 11px 0 17px; }
.char-tag { font-size: 11px; color: var(--ink-2); background: var(--card); border: 1px solid var(--line); padding: 4px 12px; border-radius: 99px; }
.detail-start-btn { border: none; background: var(--ink); color: #fff; font-size: 14px; font-weight: 700; padding: 13px 44px; border-radius: 99px; cursor: pointer; }
.detail-section { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 17px; margin: 13px 18px; }
.detail-section-title { font-size: 13px; color: var(--ink-3); font-weight: 600; margin-bottom: 10px; letter-spacing: 1px; }
.detail-meta-row { display: flex; justify-content: space-between; font-size: 13px; padding: 6px 0; }
.detail-meta-row span:first-child { color: var(--ink-3); }
.detail-section-content { font-size: 13px; color: var(--ink-2); line-height: 1.8; }

/* ================= 聊天页 ================= */
.chat-page { display: none; height: 100vh; padding-bottom: 0; flex-direction: column; }
.chat-page.active { display: flex; }
.chat-messages { flex: 1; overflow-y: auto; padding: 18px 15px; }
.msg { display: flex; gap: 9px; margin-bottom: 16px; align-items: flex-start; animation: msgIn .25s ease; }
@keyframes msgIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.msg.right { flex-direction: row-reverse; }
.msg-avatar { width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0; overflow: hidden; display: flex; align-items: center; justify-content: center; font-size: 15px; color: #fff; }
.msg-avatar img { width: 100%; height: 100%; object-fit: cover; }
.msg-bubble { max-width: 72%; padding: 11px 14px; border-radius: 17px; font-size: 14px; line-height: 1.6; background: var(--card); border: 1px solid var(--line); }
.msg.right .msg-bubble { background: var(--ink); color: #fff; border-color: var(--ink); border-bottom-right-radius: 5px; }
.msg:not(.right) .msg-bubble { border-bottom-left-radius: 5px; }
.typing-dots { display: flex; gap: 4px; padding: 4px 2px; }
.typing-dots span { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-3); animation: typing 1.1s infinite; }
.typing-dots span:nth-child(2) { animation-delay: .18s; }
.typing-dots span:nth-child(3) { animation-delay: .36s; }
@keyframes typing { 0%, 60%, 100% { transform: none; opacity: .5; } 30% { transform: translateY(-4px); opacity: 1; } }

.chat-input-bar { padding: 10px 14px calc(12px + env(safe-area-inset-bottom)); background: rgba(246, 245, 242, 0.92); backdrop-filter: blur(12px); border-top: 1px solid var(--line); }
.chat-input-inner { display: flex; gap: 10px; align-items: flex-end; }
.chat-input { flex: 1; border: 1px solid var(--line); background: var(--card); border-radius: 14px; padding: 11px 15px; font-size: 14px; outline: none; resize: none; max-height: 100px; font-family: inherit; color: var(--ink); }
.chat-send-btn { width: 42px; height: 42px; border-radius: 50%; border: none; background: var(--ink); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.chat-send-btn svg { width: 17px; height: 17px; }

/* ================= 底部导航（悬浮） ================= */
.tabbar { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 480px; z-index: 100; padding: 0 14px calc(14px + env(safe-area-inset-bottom)); pointer-events: none; }
.tabbar.hide { display: none; }
.tabbar-inner {
  pointer-events: auto;
  display: flex; align-items: center; justify-content: space-around;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--line);
  border-radius: 26px; padding: 8px 6px;
  box-shadow: 0 8px 30px rgba(27, 26, 23, 0.12);
}
.tabbar-item { border: none; background: none; display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 10px; color: var(--ink-3); cursor: pointer; padding: 4px 12px; }
.tabbar-item svg { width: 21px; height: 21px; }
.tabbar-item.active { color: var(--ink); font-weight: 700; }
.tabbar-center {
  width: 50px; height: 50px; border-radius: 50%;
  background: var(--ink); color: #EAD9B0;
  display: flex; align-items: center; justify-content: center;
  margin: -26px 4px 0; cursor: pointer;
  box-shadow: 0 6px 18px rgba(27, 26, 23, 0.35);
  border: 4px solid var(--bg);
}
.tabbar-center svg { width: 21px; height: 21px; }

/* ================= Toast ================= */
#toast {
  display: none; position: fixed; top: 46%; left: 50%; transform: translateX(-50%);
  background: rgba(27, 26, 23, 0.88); color: #fff; font-size: 13px;
  padding: 13px 22px; border-radius: 14px; z-index: 500; max-width: 76%; text-align: center;
}

/* ================= 聊天页增强（参考站一比一） ================= */
.chat-header-right { display: flex; align-items: center; gap: 12px; }
.chat-more-btn { border: none; background: none; font-size: 15px; color: var(--ink); letter-spacing: 1px; cursor: pointer; padding: 4px 2px; font-weight: 700; }

/* 气泡主题：绿色 / 蓝色 / 粉色 */
.chat-page[data-theme="wechat"] .msg.right .msg-bubble { background: #95EC69; color: #143d12; border-color: #95EC69; }
.chat-page[data-theme="blue"] .msg.right .msg-bubble { background: #8FB8F0; color: #10305c; border-color: #8FB8F0; }
.chat-page[data-theme="pink"] .msg.right .msg-bubble { background: #F5B8CF; color: #5c1030; border-color: #F5B8CF; }
/* 自定义聊天背景 */
.chat-page { background-size: cover; background-position: center; background-repeat: no-repeat; }

.msg-image { max-width: 180px; max-height: 220px; border-radius: 12px; display: block; cursor: pointer; }

/* ---- 灵感区 ---- */
.chat-inspire { border-top: 1px solid var(--line); background: rgba(246,245,242,.94); padding: 10px 15px 4px; }
.ci-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.ci-head > div { display: flex; align-items: baseline; gap: 8px; }
.ci-head b { font-size: 13px; color: var(--ink); }
.ci-head span { font-size: 11px; color: var(--ink-3); }
.ci-head aside { display: flex; gap: 8px; }
.ci-head aside button { border: none; background: var(--card); border: 1px solid var(--line); border-radius: 99px; font-size: 11px; color: var(--ink-2); padding: 4px 12px; cursor: pointer; }
.ci-list { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 10px; scrollbar-width: none; }
.ci-list::-webkit-scrollbar { display: none; }
.ci-list button { flex-shrink: 0; max-width: 240px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border: 1px dashed var(--line); background: var(--card); color: var(--ink-2); font-size: 12px; padding: 7px 13px; border-radius: 99px; cursor: pointer; }
.chat-inspire.collapsed .ci-list { display: none; }

/* ---- 输入栏：语音 / 表情 / ＋ ---- */
.composer-circle { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); color: var(--ink-2); display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; }
.composer-circle svg { width: 19px; height: 19px; }
.composer-circle:active { background: var(--line); }
.h5-emoji-panel { display: none; grid-template-columns: repeat(7, 1fr); gap: 4px; padding: 10px 4px 4px; }
.h5-emoji-panel.show { display: grid; }
.h5-emoji-panel button { border: none; background: none; font-size: 24px; padding: 6px 0; cursor: pointer; border-radius: 8px; }
.h5-emoji-panel button:active { background: var(--line); }

/* ---- 更多功能面板 ---- */
.h5-more-panel { display: none; padding-top: 14px; }
.h5-more-panel.show { display: block; }
.more-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px 6px; }
.more-grid button { border: none; background: none; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 11px; color: var(--ink-2); cursor: pointer; }
.more-grid button span { width: 52px; height: 52px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; }
.more-grid button span svg { width: 22px; height: 22px; color: var(--ink-2); }
.more-grid button small { font-size: 10px; color: var(--ink-3); }
.more-grid button.enabled span { background: #e8f5ee; border-color: #b7e0c6; }
.more-grid button.enabled span svg { color: #38a169; }
.more-grid button.wechat span { background: #e8f7ec; border-color: #b7e0c6; }
.more-grid button.wechat span svg { color: #2fae5d; }

/* ---- 底部弹层（主题 / 连接微信） ---- */
.chat-sheet-mask { position: fixed; inset: 0; background: rgba(20,22,26,.45); z-index: 300; display: none; align-items: flex-end; justify-content: center; }
.chat-sheet-mask.open { display: flex; }
.chat-sheet { background: #fff; border-radius: 20px 20px 0 0; width: 100%; max-width: 480px; padding: 22px 20px calc(24px + env(safe-area-inset-bottom)); animation: sheetUp .25s ease; }
@keyframes sheetUp { from { transform: translateY(40px); opacity: .4; } to { transform: none; opacity: 1; } }
.chat-sheet h3 { font-size: 15px; margin-bottom: 16px; text-align: center; }
.theme-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.theme-item { border: 1.5px solid var(--line); background: var(--bg); border-radius: 14px; padding: 10px; display: flex; flex-direction: column; gap: 8px; cursor: pointer; }
.theme-item strong { font-size: 12px; color: var(--ink); text-align: center; }
.theme-item i { font-style: normal; font-size: 10px; color: #143d12; border-radius: 9px; padding: 8px 8px; max-width: 90%; }
.theme-item.on { border-color: var(--ink); box-shadow: 0 0 0 1.5px var(--ink); }

/* ---- 连接微信弹层 ---- */
.connect-sheet { text-align: center; }
.cs-wechat-icon { width: 56px; height: 56px; border-radius: 16px; background: #e8f7ec; color: #2fae5d; display: flex; align-items: center; justify-content: center; margin: 0 auto 12px; }
.cs-wechat-icon svg { width: 30px; height: 30px; }
.connect-sheet h2 { font-size: 17px; margin-bottom: 8px; }
.connect-sheet p { font-size: 12px; color: var(--ink-3); line-height: 1.7; margin-bottom: 12px; }
.cs-status { font-size: 12px; color: var(--ink-2); background: var(--bg); border-radius: 10px; padding: 9px 12px; margin-bottom: 14px; }
.cs-qr { display: none; margin: 0 auto 10px; border: 1px solid var(--line); border-radius: 10px; }
.cs-qr-tip { display: none; font-size: 11px !important; }
.cs-primary { width: 100%; border: none; background: #2fae5d; color: #fff; border-radius: 12px; padding: 13px; font-size: 14px; cursor: pointer; margin-top: 14px; }

/* ---- 角色档案 / 修改设定页 ---- */
.chatsetup-wrap, .chatsettings-wrap { padding-bottom: 30px; }
.cs-hero { position: relative; height: 230px; overflow: hidden; background: linear-gradient(135deg, #c8b89a, #9a8fb8); }
.cs-hero img { width: 100%; height: 100%; object-fit: cover; }
.cs-hero-shade { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.62), transparent 65%); }
.cs-follow { position: absolute; right: 14px; top: 14px; border: none; background: rgba(255,255,255,.88); border-radius: 99px; font-size: 12px; padding: 7px 14px; cursor: pointer; }
.cs-hero-info { position: absolute; left: 18px; bottom: 14px; color: #fff; }
.cs-hero-info small { font-size: 10px; letter-spacing: 2px; opacity: .85; }
.cs-hero-info h1 { font-size: 26px; margin: 4px 0 2px; }
.cs-hero-info p { font-size: 12px; opacity: .85; margin-bottom: 7px; }
.cs-hero-info div { display: flex; gap: 6px; flex-wrap: wrap; }
.cs-hero-info div span { font-size: 10px; background: rgba(255,255,255,.22); border-radius: 99px; padding: 3px 10px; }
.cs-intro { background: var(--card); margin: 12px 14px; border-radius: 14px; padding: 16px; }
.cs-intro p { font-size: 13px; color: var(--ink-2); line-height: 1.8; margin-bottom: 12px; }
.cs-intro div { display: flex; justify-content: space-around; text-align: center; }
.cs-intro span { font-size: 11px; color: var(--ink-3); }
.cs-intro b { display: block; font-size: 16px; color: var(--ink); margin-bottom: 2px; }
.cs-adjust { background: var(--card); margin: 0 14px 12px; border-radius: 14px; padding: 16px; }
.cs-adjust header small { font-size: 10px; letter-spacing: 2px; color: var(--gold); }
.cs-adjust header h2 { font-size: 17px; margin-top: 2px; }
.cs-tip { font-size: 11px; color: var(--ink-3); margin: 6px 0 14px; }
.cs-adjust label { display: block; font-size: 12px; color: var(--ink-3); margin-bottom: 14px; }
.cs-adjust input[type=text], .cs-adjust textarea, .cs-adjust input:not([type]) { width: 100%; margin-top: 6px; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: 13px; font-family: inherit; outline: none; background: var(--bg); color: var(--ink); resize: vertical; }
.cs-chips { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.cs-chips button { border: 1px solid var(--line); background: var(--bg); border-radius: 99px; font-size: 12px; color: var(--ink-2); padding: 7px 16px; cursor: pointer; }
.cs-chips button.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.cs-switch-row { display: flex; justify-content: space-between; align-items: center; }
.cs-switch-row b { font-size: 13px; color: var(--ink); display: block; }
.cs-switch-row small { font-size: 11px; color: var(--ink-3); }
.cs-switch-row input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--ink); }
.cs-actions { display: flex; gap: 10px; margin-top: 18px; }
.cs-actions button { flex: 1; border: 1px solid var(--line); background: var(--card); border-radius: 12px; padding: 13px; font-size: 14px; color: var(--ink-2); cursor: pointer; }
.cs-actions button.primary { background: var(--ink); color: #fff; border-color: var(--ink); }
.cs-about { background: var(--card); margin: 0 14px; border-radius: 14px; padding: 16px; }
.cs-about h2 { font-size: 15px; margin-bottom: 8px; }
.cs-about p { font-size: 12px; color: var(--ink-2); line-height: 1.8; }
.cs-about blockquote { font-size: 13px; color: var(--ink); background: var(--bg); border-left: 3px solid var(--gold); border-radius: 0 10px 10px 0; padding: 10px 12px; margin: 12px 0; }
.cs-about-links { display: flex; gap: 10px; }
.cs-about-links button { flex: 1; border: 1px solid var(--line); background: var(--bg); border-radius: 10px; padding: 11px; font-size: 13px; color: var(--ink-2); cursor: pointer; }

/* ---- 聊天详情（三点菜单，微信个人页式） ---- */
.cst-members { display: flex; gap: 12px; align-items: center; background: var(--card); margin: 12px 14px; border-radius: 14px; padding: 14px; }
.cst-members label { display: flex; align-items: center; gap: 12px; cursor: pointer; flex: 1; min-width: 0; }
.cst-members img { width: 54px; height: 54px; border-radius: 12px; object-fit: cover; }
.cst-members i { width: 54px; height: 54px; border-radius: 12px; display: flex; align-items: center; justify-content: center; color: #fff; font-style: normal; font-size: 20px; }
.cst-members span { font-size: 15px; font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cst-add { width: 54px; height: 54px; border-radius: 12px; border: 1px dashed var(--line); background: var(--bg); font-size: 22px; color: var(--ink-3); cursor: pointer; flex-shrink: 0; }
.cst-list { background: var(--card); margin: 0 14px; border-radius: 14px; overflow: hidden; }
.cst-list button, .cst-list label { display: flex; justify-content: space-between; align-items: center; width: 100%; padding: 15px 16px; border: none; background: none; font-size: 14px; color: var(--ink); cursor: pointer; border-bottom: 1px solid var(--line); text-align: left; }
.cst-list button:last-child { border-bottom: none; }
.cst-list b { font-size: 12px; color: var(--ink-3); font-weight: normal; }
.cst-list .wechat span, .cst-list .wechat b { color: #2fae5d; }
.cst-list .delete span { color: #d45454; }
.cst-bg-row input[type=file] { display: none; }

/* ---- 我的页登录状态条 ---- */
.login-state-bar { display: flex; align-items: center; gap: 12px; background: linear-gradient(135deg, #fff, #f4f1ea); border: 1px solid var(--line); border-radius: 14px; padding: 13px 15px; margin-bottom: 12px; cursor: pointer; }
.login-state-bar svg { width: 22px; height: 22px; color: var(--gold); flex-shrink: 0; }
.login-state-bar strong { display: block; font-size: 14px; color: var(--ink); }
.login-state-bar small { font-size: 11px; color: var(--ink-3); }
.login-state-bar i { margin-left: auto; color: var(--ink-3); font-style: normal; }
.login-state-bar.logged { border-color: #b7e0c6; background: linear-gradient(135deg, #f2fbf5, #e8f7ec); }
.login-state-bar.logged svg { color: #2fae5d; }

/* ================= 页面内通用对话框（替代原生 prompt/confirm/alert） ================= */
.xy-dialog-mask { position: fixed; inset: 0; z-index: 9000; display: none; align-items: center; justify-content: center; padding: 32px 24px; background: rgba(20,18,16,.5); backdrop-filter: blur(4px); }
.xy-dialog-mask.open { display: flex; animation: xyd-in .2s ease-out; }
@keyframes xyd-in { from { opacity: 0 } to { opacity: 1 } }
.xy-dialog { width: min(88vw, 360px); background: #fff; border-radius: 18px; padding: 22px 20px 16px; text-align: center; box-shadow: 0 24px 60px rgba(0,0,0,.25); animation: xyd-pop .24s cubic-bezier(.2,1.2,.4,1); }
@keyframes xyd-pop { from { transform: scale(.92); opacity: 0 } to { transform: scale(1); opacity: 1 } }
.xy-dialog h3 { font-size: 16px; color: #272326; margin-bottom: 10px; }
.xy-dialog .xyd-msg { font-size: 14px; color: #6b6467; line-height: 1.7; margin: 4px 0 6px; white-space: pre-line; }
.xy-dialog-body { max-height: 50vh; overflow-y: auto; text-align: left; }
.xy-dialog-body p { font-size: 13px; color: #444; line-height: 1.7; margin-bottom: 8px; word-break: break-all; }
.xyd-scroll { max-height: 46vh; overflow-y: auto; }
.xy-dialog-input { width: 100%; margin: 8px 0 4px; padding: 11px 12px; border: 1px solid #d9dde3; border-radius: 10px; font-size: 14px; outline: none; box-sizing: border-box; }
.xy-dialog-input:focus { border-color: #C8A15E; }
.xy-dialog-btns { display: flex; gap: 10px; margin-top: 14px; }
.xy-dialog-btns button { flex: 1; border: none; border-radius: 12px; padding: 12px; font-size: 15px; cursor: pointer; }
.xyd-cancel { background: #f2f0eb; color: #6b6467; }
.xyd-ok { background: #C8A15E; color: #fff; font-weight: 600; }

/* ================= 账号激活弹窗（一比一还原参考站 ActivationGate） ================= */
.activation-gate { position: fixed; inset: 0; z-index: 5000; display: none; place-items: center; padding: 22px; background: rgba(22,14,17,.68); backdrop-filter: blur(8px); }
.activation-gate.open { display: grid; animation: act-mask-in .24s ease-out; }
@keyframes act-mask-in { from { opacity: 0 } to { opacity: 1 } }
.activation-card { position: relative; width: min(88vw, 470px); max-height: calc(100dvh - 44px); overflow-y: auto; border-radius: 30px; padding: 40px 38px 32px; background: #fff; text-align: center; box-shadow: 0 24px 70px rgba(37,22,27,.32); color: #272326; animation: act-card-in .28s cubic-bezier(.2,1.2,.4,1); }
@keyframes act-card-in { from { transform: scale(.92); opacity: 0 } to { transform: scale(1); opacity: 1 } }
.activation-close { position: absolute; z-index: 3; right: 20px; top: 16px; width: 42px; height: 42px; border: 0; background: transparent; color: #918b8e; font-size: 38px; line-height: 1; cursor: pointer; }
.activation-orb { display: grid; place-items: center; width: 102px; height: 102px; margin: 0 auto 16px; border-radius: 50%; background: #c67d62; box-shadow: 0 14px 30px rgba(198,125,98,.25); animation: act-orb-in .56s .08s cubic-bezier(.2,1.35,.4,1) both; }
.activation-orb svg { width: 44px; height: 44px; }
@keyframes act-orb-in { from { transform: scale(.4); opacity: 0 } to { transform: scale(1); opacity: 1 } }
.activation-view h1 { font-size: 27px; font-weight: 900; margin: 4px 0 8px; }
.activation-view h2 { font-size: 17px; font-weight: 600; color: #5c5458; margin-bottom: 6px; }
.activation-view h2 b { color: #d4502e; }
.activation-view p { font-size: 14px; color: #8b8286; line-height: 1.7; margin: 4px 0; }
.activation-view h3 { font-size: 16px; color: #ef5c2a; font-weight: 800; margin: 6px 0 2px; }
.activation-offer-hint { display: block; font-style: normal; font-size: 13px; color: #148440; margin-top: 6px; }
.activation-gift-orb { display: grid; place-items: center; width: 92px; height: 92px; margin: 0 auto 16px; border-radius: 50%; background: linear-gradient(145deg, #ff7a00, #ef3e12 68%, #38a06b); box-shadow: 0 13px 28px rgba(226,82,27,.28); font-style: normal; font-size: 40px; animation: act-orb-in .58s .1s cubic-bezier(.2,1.35,.4,1) both; }
.activation-price-stage { max-width: 405px; margin: 12px auto 13px; padding: 13px 18px 11px; border: 1px solid rgba(226,114,63,.22); border-radius: 20px; background: rgba(255,255,255,.72); box-shadow: 0 10px 28px rgba(189,74,29,.08); }
.activation-price-row { display: flex; align-items: baseline; justify-content: center; gap: 16px; }
.activation-price-row del { font-size: 21px; color: #b3a6a0; }
.activation-price-row span { font-size: 18px; color: #c9b6ae; }
.activation-price-row b { font-size: 38px; font-weight: 900; color: #ef3c1a; }
.activation-saving { display: block; margin: 9px auto 0; padding: 7px 18px; border-radius: 999px; background: linear-gradient(90deg, #e8faed, #dff6e8); color: #148440; font-size: 18px; }
.activation-benefits { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; max-width: 390px; margin: 16px auto 4px; padding: 0; list-style: none; }
.activation-benefits li { padding: 9px 6px; border-radius: 12px; background: #f6f2ee; color: #6b5f57; font-size: 13px; font-weight: 600; }
.activation-pay { display: block; width: min(100%, 350px); min-height: 62px; margin: 18px auto 14px; border: 0; border-radius: 999px; background: #08c968; color: #fff; font-size: 23px; font-weight: 800; box-shadow: 0 12px 26px rgba(8,201,104,.25); cursor: pointer; }
.activation-membership { display: block; margin: 0 auto 4px; border: 0; background: transparent; color: #aa1237; font-size: 22px; font-weight: 800; cursor: pointer; }
.activation-membership-tip { display: block; font-style: normal; font-size: 12px; color: #a54f69; }
.activation-offer-card { border: 2px solid #ee9f7e; background: linear-gradient(160deg, #fff0e5, #fff 56%, #eefcf4); padding: 52px 34px 30px; }
.activation-offer-card .activation-pay { background: linear-gradient(135deg, #ef3c1a, #dc1827); box-shadow: 0 12px 26px rgba(220,24,39,.25); }
.activation-offer-ribbon { position: absolute; left: 0; top: 22px; padding: 12px 24px; border-radius: 0 14px 14px 0; background: linear-gradient(135deg, #ff5b22, #ff9448); color: #fff; font-size: 19px; font-weight: 900; box-shadow: 0 8px 18px rgba(235,94,37,.28); animation: act-ribbon-in .46s .16s cubic-bezier(.2,1.15,.4,1) both; }
@keyframes act-ribbon-in { from { transform: translateX(-40px); opacity: 0 } to { transform: translateX(0); opacity: 1 } }
@media (max-width: 480px) {
  .activation-card { width: calc(100vw - 32px); padding: 34px 22px 26px; border-radius: 25px; }
  .activation-price-row b { font-size: 32px; }
  .activation-price-row del { font-size: 18px; }
  .activation-saving { font-size: 16px; }
}

/* ================= 语音消息气泡 + 按住说话 ================= */
.msg-voice { display: flex; align-items: center; gap: 8px; min-width: 96px; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.msg-voice .mv-icon { width: 22px; height: 22px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.msg-voice .mv-icon svg { width: 100%; height: 100%; }
.msg-voice.mine .mv-icon { transform: scaleX(-1); }
.mv-wave { display: flex; align-items: center; gap: 2px; height: 16px; flex: 1; }
.mv-wave span { width: 3px; border-radius: 2px; background: currentColor; opacity: .85; }
.mv-wave span:nth-child(1) { height: 6px } .mv-wave span:nth-child(2) { height: 11px } .mv-wave span:nth-child(3) { height: 16px } .mv-wave span:nth-child(4) { height: 9px }
.msg-voice.playing .mv-wave span { animation: mv-bounce .6s infinite alternate; }
.msg-voice.playing .mv-wave span:nth-child(2) { animation-delay: .15s }
.msg-voice.playing .mv-wave span:nth-child(3) { animation-delay: .3s }
.msg-voice.playing .mv-wave span:nth-child(4) { animation-delay: .45s }
@keyframes mv-bounce { from { transform: scaleY(.55) } to { transform: scaleY(1.4) } }
.mv-dur { font-size: 12px; opacity: .75; flex-shrink: 0; }
.composer-circle.recording { background: #d45454 !important; color: #fff; animation: rec-pulse 1.1s infinite; }
@keyframes rec-pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(212,84,84,.4) } 50% { box-shadow: 0 0 0 8px rgba(212,84,84,0) } }
.voice-rec-tip { position: fixed; left: 50%; bottom: 150px; transform: translateX(-50%); display: none; align-items: center; gap: 8px; background: rgba(30,26,24,.88); color: #fff; border-radius: 999px; padding: 9px 18px; font-size: 13px; z-index: 3000; white-space: nowrap; }
.voice-rec-tip.show { display: flex; }
.voice-rec-tip i { width: 9px; height: 9px; border-radius: 50%; background: #ff5b4d; animation: rec-dot 1s infinite; }
@keyframes rec-dot { 0%,100% { opacity: .35 } 50% { opacity: 1 } }

/* ================= 强制登录门禁 ================= */
.login-gate { position: fixed; inset: 0; z-index: 5100; overflow-y: auto; background: linear-gradient(160deg, #F6F5F2 0%, #F1EDE6 100%); display: flex; flex-direction: column; align-items: center; animation: lg-in .3s ease; }
@keyframes lg-in { from { opacity: 0 } to { opacity: 1 } }
.lg-hero { width: 100%; max-width: 480px; padding: 64px 24px 30px; text-align: center; }
.lg-logo { display: inline-flex; width: 74px; height: 74px; align-items: center; justify-content: center; border-radius: 24px; background: linear-gradient(135deg, #E5C489, #C8A15E); color: #fff; font-size: 34px; font-style: normal; box-shadow: 0 14px 30px rgba(200, 161, 94, 0.35); animation: lg-orb .7s cubic-bezier(.2,1.2,.4,1) both; }
@keyframes lg-orb { from { transform: scale(.5); opacity: 0 } to { transform: scale(1); opacity: 1 } }
.lg-hero h1 { margin-top: 18px; font-size: 26px; letter-spacing: 6px; color: var(--ink); font-weight: 800; }
.lg-hero p { margin-top: 8px; font-size: 13px; color: var(--ink-3); letter-spacing: 1px; }
.lg-card { width: min(92%, 400px); background: var(--card); border: 1px solid var(--line); border-radius: 22px; box-shadow: 0 12px 34px rgba(27, 26, 23, 0.08); padding: 26px 22px 20px; margin-bottom: 40px; animation: lg-card .45s .1s cubic-bezier(.2,1.1,.4,1) both; }
@keyframes lg-card { from { transform: translateY(18px); opacity: 0 } to { transform: none; opacity: 1 } }
.lg-card h2 { font-size: 19px; font-weight: 800; color: var(--ink); }
.lg-tip { margin: 7px 0 18px; font-size: 12px; color: var(--ink-3); }
.lg-field { display: flex; align-items: center; gap: 10px; height: 50px; border: 1px solid var(--line); background: var(--bg); border-radius: 14px; padding: 0 14px; margin-bottom: 12px; }
.lg-field:focus-within { border-color: var(--gold); background: #fff; }
.lg-prefix { font-size: 14px; color: var(--ink-2); font-weight: 600; flex-shrink: 0; padding-right: 10px; border-right: 1px solid var(--line); }
.lg-field input { flex: 1; min-width: 0; border: none; background: transparent; outline: none; font-size: 15px; color: var(--ink); font-family: inherit; }
.lg-field input::placeholder { color: var(--ink-3); }
.lg-code-field { padding-right: 6px; }
.lg-code-btn { flex-shrink: 0; border: none; background: var(--gold-soft); color: #8A6A2E; font-size: 13px; font-weight: 700; padding: 8px 13px; border-radius: 10px; cursor: pointer; white-space: nowrap; font-family: inherit; }
.lg-code-btn:disabled { opacity: .55; cursor: default; }
.lg-submit { width: 100%; height: 50px; border: none; border-radius: 14px; background: linear-gradient(135deg, #1F1E1A, #3B382F); color: #fff; font-size: 16px; font-weight: 700; letter-spacing: 8px; cursor: pointer; margin-top: 4px; box-shadow: 0 8px 20px rgba(27,26,23,.18); }
.lg-submit:active { transform: scale(.985); }
.lg-divider { display: flex; align-items: center; gap: 12px; margin: 20px 0 14px; color: var(--ink-3); font-size: 11px; }
.lg-divider::before, .lg-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.lg-wechat { width: 100%; height: 46px; display: flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid rgba(62, 188, 102, .4); background: rgba(62, 188, 102, .08); color: #2AA855; border-radius: 14px; font-size: 15px; font-weight: 700; cursor: pointer; font-family: inherit; }
.lg-wechat svg { width: 21px; height: 21px; }
.lg-wechat:active { background: rgba(62, 188, 102, .16); }
.lg-agreement { margin-top: 16px; font-size: 11px; color: var(--ink-3); text-align: center; line-height: 1.8; }
.lg-agreement span { color: var(--gold); cursor: pointer; }
.lg-page-wrap { padding: 20px 18px 40px; }
.lg-page-card { margin: 0 auto; }

/* 注册表单：头像选择 + 性别 */
.reg-avatar-row { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.reg-avatar-pick { width: 64px; height: 64px; border-radius: 16px; border: 2px dashed var(--line); display: flex; align-items: center; justify-content: center; font-size: 24px; color: var(--ink-3); background: var(--bg); overflow: hidden; flex-shrink: 0; cursor: pointer; }
.reg-avatar-pick img { width: 100%; height: 100%; object-fit: cover; border-radius: 14px; }
.reg-avatar-tip { font-size: 13px; color: var(--ink-3); }
.reg-gender-row { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.reg-gender-row > label { font-size: 14px; color: var(--ink-2); flex-shrink: 0; }
.reg-gender-row .gender-picker { width: auto; justify-content: flex-start; flex: 1; }

/* 我的页免费领星能卡片：轻量卡片风（对齐参考站 mini-activity-card） */
.me-banner { background: var(--card) !important; border: 1px solid var(--line); box-shadow: var(--shadow); padding: 15px 16px; }
.me-banner::after { display: none; }
.me-banner .feb-icon { width: 46px; height: 46px; background: var(--gold-soft); color: var(--gold); border-radius: 15px; flex-shrink: 0; }
.me-banner .feb-icon svg { width: 24px; height: 24px; }
.me-banner .feb-title { color: var(--ink); }
.me-banner .feb-sub { color: var(--ink-3); }
.me-banner .feb-btn { color: #201F1B; background: linear-gradient(135deg, #EAD9B0, #C8A15E); }

/* 手机绑定页验证码行修正（已移除） */

/* ================= 系统通知（消息页入口 + 通知页） ================= */
.notif-entry { display: flex; align-items: center; gap: 12px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 13px 15px; margin: 12px 16px 0; box-shadow: var(--shadow); cursor: pointer; }
.notif-entry-icon { width: 42px; height: 42px; border-radius: 14px; background: var(--gold-soft); color: var(--gold); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.notif-entry-icon svg { width: 22px; height: 22px; }
.notif-entry-info { flex: 1; min-width: 0; }
.notif-entry-info strong { display: block; font-size: 15px; color: var(--ink); }
.notif-entry-info small { display: block; font-size: 12px; color: var(--ink-3); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notif-badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--red); color: #fff; font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }

.notif-item { display: flex; align-items: flex-start; gap: 12px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px 15px; margin-bottom: 10px; cursor: pointer; box-shadow: var(--shadow); }
.notif-item.unread { border-color: var(--gold); }
.notif-item-icon { width: 40px; height: 40px; border-radius: 13px; background: var(--gold-soft); color: var(--gold); font-size: 18px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.notif-item-body { flex: 1; min-width: 0; }
.notif-item-body strong { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--ink); }
.notif-item-body strong .dot { width: 7px; height: 7px; border-radius: 99px; background: var(--red); flex-shrink: 0; }
.notif-item-body small { display: block; font-size: 12.5px; color: var(--ink-2); margin-top: 3px; line-height: 1.5; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notif-item-body em { display: block; font-style: normal; font-size: 11px; color: var(--ink-3); margin-top: 4px; }
.notif-arrow { color: var(--ink-3); font-style: normal; font-size: 16px; flex-shrink: 0; align-self: center; }

.notif-detail-row { display: flex; gap: 10px; font-size: 13px; margin: 8px 0; text-align: left; }
.notif-detail-row b { color: var(--ink-2); flex-shrink: 0; min-width: 64px; font-weight: 600; }
.notif-detail-row span, .notif-detail-row a { color: var(--ink); word-break: break-all; }
.notif-detail-row a { color: var(--gold); text-decoration: underline; }
.notif-detail-time { font-size: 12px; color: var(--ink-3); margin-top: 10px; text-align: center; }

/* ================= 在线客服 / 反馈线程 ================= */
.support-chat-card h2 { margin-bottom: 6px; }
.support-chat-list { display: flex; flex-direction: column; gap: 10px; padding: 12px; background: var(--bg); border-radius: 14px; border: 1px solid var(--line); max-height: 320px; overflow-y: auto; margin-top: 10px; }
.support-chat-list .support-empty { text-align: center; color: var(--ink-3); font-size: 12.5px; padding: 18px 0; }
.sp-msg { display: flex; flex-direction: column; max-width: 82%; }
.sp-msg.mine { align-self: flex-end; align-items: flex-end; }
.sp-msg.admin { align-self: flex-start; align-items: flex-start; }
.sp-bubble { padding: 9px 13px; border-radius: 14px; font-size: 13.5px; line-height: 1.6; word-break: break-word; }
.sp-msg.mine .sp-bubble { background: linear-gradient(135deg, #EAD9B0, #C8A15E); color: #201F1B; border-bottom-right-radius: 4px; }
.sp-msg.admin .sp-bubble { background: var(--card); color: var(--ink); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.sp-msg small { font-size: 10.5px; color: var(--ink-3); margin-top: 4px; }
.support-chat-input { display: flex; gap: 10px; margin-top: 12px; }
.support-chat-input input { flex: 1; border: 1px solid var(--line); background: var(--card); border-radius: 99px; padding: 11px 16px; font-size: 14px; outline: none; color: var(--ink); }
.support-chat-input button { border: none; background: linear-gradient(135deg, #EAD9B0, #C8A15E); color: #201F1B; font-weight: 700; font-size: 14px; padding: 0 22px; border-radius: 99px; cursor: pointer; flex-shrink: 0; }

/* xyDialog 滚动区域（通知详情 / 聊天记录搜索） */
.xyd-scroll { max-height: 260px; overflow-y: auto; text-align: left; font-size: 13px; line-height: 1.8; color: var(--ink-2); }
.xyd-scroll p { margin: 4px 0; }
.xyd-scroll b { color: var(--ink); }

/* 我的邀请码卡片（成长页邀请码弹层） */
.my-invite-card { margin-top: 20px; padding: 16px; border-radius: 14px; background: linear-gradient(135deg, rgba(200,161,94,.10), rgba(234,217,176,.16)); border: 1px dashed var(--gold); text-align: center; }
.my-invite-title { font-size: 12px; color: var(--ink-3); margin: 0 0 6px; }
.my-invite-code { font-size: 24px; font-weight: 800; letter-spacing: 1px; color: var(--gold); margin: 0 0 6px; word-break: break-all; }
.my-invite-desc { font-size: 11px; color: var(--ink-3); line-height: 1.6; margin: 0 0 12px; }
.my-invite-btns { display: flex; gap: 10px; justify-content: center; }
.invite-copy-btn { flex: 1; border: none; background: linear-gradient(135deg, #EAD9B0, #C8A15E); color: #201F1B; font-weight: 700; font-size: 13px; padding: 10px 0; border-radius: 99px; cursor: pointer; }
.invite-copy-btn:active { opacity: .85; }
