:root {
  /* 常规风格：暖米底 + 酒红主色（邻友群「时尚版」设计语言） */
  --outer: #e9e2dd;
  --bg: #f8f4f0;
  --card: #ffffff;
  --soft: #f6efe9;
  --soft2: #efe5dd;
  --btn: #f3ebe5;
  --primary: #a81742;
  --primary-d: #8a1538;
  --primary-soft: #fceef2;
  --text: #1d1417;
  --muted: #96705c;
  --line: #efe6e0;
  --line3: #e4d6cc;
  --ok: #2f7d55;
  --warn: #9a6a1e;
  --danger: #b4283c;
  --danger-soft: #fcecef;
  --symbol: #a81742;
  --accent-soft: #fceef2;
  --accent-line: #f0cdd8;
  --grad: linear-gradient(135deg, #c22a55, #8a1538);
  --shadow: 0 6px 18px rgba(60,32,30,.07);
  --radius: 18px;
  --pill: 999px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.5;
  padding-bottom: 94px; transition: background-color .25s ease;
}
header {
  position: sticky; top: 0; z-index: 5; background: var(--primary);
  color: #fff; padding: 14px 16px; font-size: 18px; font-weight: 600;
  display: flex; align-items: center; gap: 8px; box-shadow: 0 2px 8px rgba(0,0,0,.08);
  transition: background-color .25s ease;
}
header .nav-back {
  position: relative; z-index: 1; flex: 0 0 auto; background: transparent; color: #fff;
  font-size: 26px; line-height: 1; padding: 0 2px; border-radius: 8px; min-width: 26px;
  height: 28px; display: flex; align-items: center; justify-content: center;
}
header .nav-back:hover { filter: brightness(1.12); }
header .app-title { position: absolute; left: 0; right: 0; text-align: center; pointer-events: none; }
header .me { position: relative; z-index: 1; margin-left: auto; font-size: 13px; font-weight: 400; opacity: .9; }
main { padding: 14px; max-width: 640px; margin: 0 auto; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 16px; margin-bottom: 14px; box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
h2 { font-size: 16px; margin: 0 0 10px; }
h3 { font-size: 14px; margin: 16px 0 8px; color: var(--primary-d); }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.muted { color: var(--muted); font-size: 13px; }
.big-symbol { font-size: 22px; color: var(--symbol); letter-spacing: 2px; }
.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; background: var(--primary-soft, #ffe3ec); color: var(--primary-d); }
.pill.ok { background: #dff3e8; color: var(--ok); }
.pill.warn { background: #fdf0d8; color: var(--warn); }
button {
  font: inherit; border: none; border-radius: 10px; padding: 10px 14px; cursor: pointer;
  background: var(--primary); color: #fff; font-weight: 600; transition: filter .15s, background-color .25s ease;
}
button:hover { filter: brightness(1.05); }
button:active { filter: brightness(.95); }
button.ghost { background: var(--card); color: var(--primary-d); border: 1px solid var(--line); font-weight: 500; }
button.block { width: 100%; }
button:disabled { opacity: .5; cursor: not-allowed; }
input, select, textarea {
  font: inherit; width: 100%; padding: 10px; border: 1px solid var(--line);
  border-radius: 10px; background: var(--card); color: var(--text); margin-top: 6px;
}
textarea { resize: vertical; min-height: 64px; word-break: break-all; }
label { font-size: 13px; color: var(--muted); }
.token-box { margin-top: 8px; background: #fff8fa; border: 1px dashed var(--line); border-radius: 10px; padding: 10px; }
.token-box textarea { background: #fff; font-size: 12px; }
.qr { margin: 10px auto; width: 184px; height: 184px; display: flex; align-items: center; justify-content: center; }
.friend { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.friend:last-child { border-bottom: none; }
.friend .name { font-weight: 600; }
.friend .meta { color: var(--muted); font-size: 12px; }
.spacer { flex: 1; }
.msg { margin-top: 10px; font-size: 13px; padding: 8px 10px; border-radius: 8px; }
.msg.ok { background: #eafaf1; color: var(--ok); }
.msg.err { background: #fdeaea; color: #c0392b; }
nav {
  position: fixed; bottom: 22px; left: 0; right: 0; z-index: 10;
  display: flex; background: #fff; border-top: 1px solid var(--line);
  max-width: 640px; margin: 0 auto;
}
/* 网站备案公示条（首页底部常驻） */
#siteBeian {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 15;
  height: 22px; display: flex; align-items: center; justify-content: center; gap: 10px;
  background: rgba(255,255,255,.95); border-top: 1px solid var(--line);
  font-size: 11px; color: var(--muted); text-align: center; line-height: 22px;
  max-width: 640px; margin: 0 auto;
}
#siteBeian a { color: var(--muted); text-decoration: none; }
#siteBeian a:hover { color: var(--primary); }
#siteBeian .beian-sep { color: #d9d2d7; }
/* 名片页「声明与条款」下方的 隐私政策 / 用户协议 / 备案信息 */
.legal-links { margin-top: 10px; font-size: 12px; }
.legal-links a { color: var(--primary); text-decoration: none; }
.legal-links a:hover { text-decoration: underline; }
.legal-links .beian-sep { color: #d9d2d7; margin: 0 6px; }
.legal-beian { margin-top: 8px; font-size: 11px; color: var(--muted); line-height: 1.9; display: flex; flex-wrap: wrap; gap: 4px 12px; }
.legal-beian a { color: var(--muted); text-decoration: none; }
.legal-beian a:hover { color: var(--primary); }
.beian-sep { color: #d9d2d7; }
/* 落地首页（入口页） */
#home {
  position: fixed; inset: 0; z-index: 99990; overflow-y: auto;
  display: flex; flex-direction: column; align-items: center;
  background: #fff;
  padding: 34px 16px 14px;
}
#home.hidden { display: none !important; }

/* 应用市场审核红线：App 壳内绝不出现「下载安卓版/iOS版」引导。
   index.html 在 <head> 早期判定壳并给 <html> 打 app-shell；此处用 CSS 硬隔离，
   不依赖 documentStart / JS proxy 注入时机，也不依赖 cloud-sync.js 是否已加载。 */
html.app-shell #home,
html.app-shell .home-dl,
html.app-shell .dl-btn { display: none !important; }
.home-wrap {
  width: min(440px, 94vw); display: flex; flex-direction: column; flex: 1 1 auto; min-height: 100%;
}

/* 顶部 app 简介大区块 */
.home-intro {
  background: #fff; border: 1px solid var(--line); border-radius: 18px;
  padding: 22px 20px; text-align: center; box-shadow: 0 6px 22px rgba(231,84,128,.08);
}
.home-logo { font-size: 46px; line-height: 1; }
.home-title { margin: 8px 0 8px; font-size: 22px; color: var(--primary); }
.home-intro-txt { margin: 0; font-size: 13px; color: #7a7a86; line-height: 1.7; text-align: left; }

/* 中部网页版入口 */
.home-enter {
  width: 100%; height: 50px; margin-top: 18px; border: 2px solid var(--primary); border-radius: 12px;
  background: #fff; color: var(--primary); font-size: 16px; font-weight: 600; cursor: pointer;
  transition: background-color .2s ease, color .2s ease;
}
.home-enter:hover { background: var(--primary); color: #fff; }
.home-enter:active { background: var(--primary-d); border-color: var(--primary-d); }
/* 本地使用：作为主按钮（粉底），与「网页版入口」形成主次区分 */
.home-local { background: var(--primary); color: #fff; margin-top: 10px; }
.home-local:hover { background: var(--primary-d); }
.home-local:active { background: var(--primary-d); }

/* 下载区 2×2 网格 */
.home-dl { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 18px; }
.dl-btn {
  display: flex; align-items: center; gap: 10px; text-align: left;
  padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: #fff;
  color: var(--text); text-decoration: none; cursor: pointer; box-shadow: 0 4px 14px rgba(0,0,0,.05);
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.dl-btn:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.dl-btn:hover .dl-txt b, .dl-btn:hover .dl-txt i { color: #fff; }
.dl-btn:active { background: var(--primary-d); border-color: var(--primary-d); }
.dl-android { border-color: #bfe6c9; }
.dl-ios, .dl-harmony { opacity: .6; transition: opacity .2s ease, background-color .2s ease, color .2s ease, border-color .2s ease; }
.dl-ios:hover, .dl-harmony:hover { opacity: 1; }
.dl-ico { font-size: 28px; line-height: 1; }
.dl-txt b { display: block; font-size: 15px; font-weight: 600; }
.dl-txt i { display: block; font-size: 11px; font-style: normal; color: var(--muted); margin-top: 2px; }

/* 底部公安联网认证等信息 */
.home-foot {
  margin-top: auto; padding-top: 18px; font-size: 11px; color: #b0a8ad;
  text-align: right; line-height: 1.6;
}
.home-foot a { color: #b0a8ad; text-decoration: none; }
.home-foot a:hover { color: var(--primary); }
nav button {
  flex: 1; background: none; color: var(--muted); border-radius: 0; padding: 8px 0;
  display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; font-weight: 500;
}
nav button.active { color: var(--primary); }
nav .ico { font-size: 20px; }
.modal-bg {
  position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 20;
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal { background: #fff; border-radius: 16px; padding: 22px; width: 100%; max-width: 360px; }
.modal h2 { margin-top: 0; }
.hidden { display: none !important; }
.empty { text-align: center; color: var(--muted); padding: 24px 0; }

/* 扫码弹窗里的视频预览 */
#scanVideo { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; background: #000; border-radius: 10px; margin-top: 8px; }

/* 图片灯箱 */
#lightbox { background: rgba(0,0,0,.92); padding: 0; }
#lightboxImg { max-width: 100%; max-height: 100%; object-fit: contain; }

/* 日记图片 */
.diary-imgs { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.diary-imgs img { width: 76px; height: 76px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); cursor: pointer; }
.img-preview { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.img-preview .thumb { position: relative; }
.img-preview img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.img-preview .del { position: absolute; top: -7px; right: -7px; width: 20px; height: 20px; border-radius: 50%; background: #c0392b; color: #fff; font-size: 12px; line-height: 20px; text-align: center; cursor: pointer; box-shadow: 0 1px 3px rgba(0,0,0,.3); }

/* 一键体验 Demo 入口 */
.card.demo-hint { border: 2px dashed var(--primary); background: #fff6f9; }
.card.demo-hint button { margin-top: 10px; }
.demo-inline { margin-top: 12px; }

/* 好友列表头部 + 右上角加好友按钮 */
.friends-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.add-friend-btn { background: var(--primary); color: #fff; padding: 6px 14px; font-size: 13px; border-radius: 999px; font-weight: 600; white-space: nowrap; transition: filter .15s, background-color .25s ease; }
.add-friend-btn:hover { filter: brightness(1.05); }
.add-friend-btn:active { filter: brightness(.95); }

/* 加好友弹窗（三种模式） */
.add-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.add-close { padding: 4px 12px; font-size: 16px; line-height: 1; border-radius: 10px; }
.add-tabs { display: flex; gap: 6px; margin-bottom: 12px; }
.add-tab { flex: 1; background: var(--card); color: var(--primary-d); border: 1px solid var(--line); padding: 8px 4px; font-size: 13px; border-radius: 10px; font-weight: 500; transition: background-color .15s, color .15s; }
.add-tab.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.add-body .qr { width: 200px; height: 200px; }
.add-body .token-box { margin-top: 10px; }


/* ---------- 偶像栏目 ---------- */
.idol-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.idol-head button { background: var(--primary); color: #fff; padding: 6px 14px; font-size: 13px; border-radius: 999px; font-weight: 600; white-space: nowrap; transition: filter .15s, background-color .25s ease; }
.idol-head button:active { filter: brightness(.95); }
.idol-grid { display: flex; flex-wrap: wrap; gap: 12px; }
.idol-card { width: calc(50% - 6px); background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px; box-shadow: 0 1px 3px rgba(0,0,0,.04); cursor: pointer; }
.idol-photo { box-sizing: border-box; width: 100%; aspect-ratio: 1 / 1; border-radius: 10px; overflow: hidden; background: #f3f3f5; display: flex; align-items: center; justify-content: center; }
.idol-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.idol-photo.empty { color: var(--muted); font-size: 12px; }
.idol-photo.lg { width: 160px; height: 160px; margin: 0 auto; cursor: pointer; }
.idol-photo-wrap { text-align: center; }
.idol-name { font-weight: 600; margin-top: 8px; }
/* 装饰框（免费版仅 1 个；会员多框为预留） */
.frame-pink    { border: 4px solid #ff9ec4; }
.frame-gold    { border: 4px solid #d4af37; box-shadow: 0 0 0 2px #fff inset; }
.frame-heart   { border: 4px dashed #ff5b8d; }
.frame-star    { border: 4px solid #7c5cff; }
.frame-polaroid{ border: 8px solid #fff; box-shadow: 0 2px 8px rgba(0,0,0,.18); background: #fff; }
.locked-slot { margin-top: 10px; padding: 10px; border: 1px dashed var(--line); border-radius: 10px; color: var(--muted); font-size: 12px; text-align: center; background: #fafafa; }
.frame-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.frame-opt { background: var(--card); color: var(--primary-d); border: 1px solid var(--line); padding: 8px 12px; font-size: 13px; border-radius: 10px; font-weight: 500; transition: background-color .15s, color .15s; }
.frame-opt.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.act-item { border-top: 1px solid var(--line); padding: 10px 0; }
.act-item:first-of-type { border-top: none; }
.act-top { display: flex; align-items: center; justify-content: space-between; }
.act-date { font-weight: 600; font-size: 13px; }
.act-title { margin-top: 4px; font-weight: 500; }
.act-detail { margin-top: 4px; color: var(--muted); white-space: pre-wrap; }
.act-item .del { background: var(--card); color: var(--muted); border: 1px solid var(--line); padding: 2px 8px; font-size: 12px; border-radius: 8px; }
#idolModal .row button { flex: 1; }

/* ---------- 界面风格（名片页切换，body[data-style] 驱动）---------- */
/* ===== 少女风（原「常规」淡粉风格）=====
   仅在没有自定义颜色主题时恢复原令牌；选了颜色主题时仍以用户所选颜色为准。 */
body[data-style="girly"]:not([data-theme-custom]) {
  --bg: #fff5f7;
  --card: #ffffff;
  --soft: #faf5f7;
  --soft2: #f7eef2;
  --btn: #ffffff;
  --primary: #e75480;
  --primary-d: #c83e66;
  --primary-soft: #ffe3ec;
  --text: #2b2b33;
  --muted: #8a8a96;
  --line: #f0d9e0;
  --line3: #e3d9de;
  --ok: #2e9e6b;
  --warn: #d98a00;
  --symbol: #b48ead;
  --accent-soft: #ffe3ec;
  --accent-line: #f0cdd8;
  --grad: linear-gradient(135deg, #ff9ec4, #e75480);
  --shadow: 0 1px 3px rgba(0,0,0,.04);
  --radius: 14px;
}

/* ===== 常规（新默认：邻友群时尚版）=====
   只改视觉层，按钮文案、data-tab、业务流程完全不变。 */
body[data-style="normal"] { background: var(--bg); color: var(--text); padding-bottom: 78px; }
body[data-style="normal"] header {
  background: var(--bg); color: var(--text); border-bottom: 1px solid var(--line3);
  border-radius: 0 0 18px 18px; box-shadow: none;
  padding: 12px 16px 11px; font-size: 17px; font-weight: 800; letter-spacing: .3px;
}
body[data-style="normal"] header .app-title { color: var(--text); }
body[data-style="normal"] header .me { color: var(--muted); opacity: 1; font-weight: 600; }
body[data-style="normal"] header .nav-back {
  background: var(--accent-soft); color: var(--primary); border-radius: 12px;
  min-width: 30px; height: 30px; font-size: 22px;
}
body[data-style="normal"] main { padding: 14px 13px; }
body[data-style="normal"] .card,
body[data-style="normal"] .modal {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 16px; margin-bottom: 12px;
}
body[data-style="normal"] .card.demo-hint {
  border: 2px dashed var(--accent-line); background: var(--accent-soft); box-shadow: none;
}
body[data-style="normal"] .modal { margin-bottom: 0; padding: 22px; border-radius: 22px; }
body[data-style="normal"] h2 {
  font-size: 15px; font-weight: 800; display: flex; align-items: center; gap: 8px;
}
body[data-style="normal"] h2::before {
  content: ""; flex: 0 0 3px; width: 3px; height: 15px; border-radius: 2px; background: var(--primary);
}
body[data-style="normal"] h3 { color: var(--primary-d); font-weight: 700; }
body[data-style="normal"] .muted { color: var(--muted); font-size: 12.5px; }
body[data-style="normal"] button,
body[data-style="normal"] .cg-btn {
  background: var(--grad); color: #fff; border: 0; border-radius: var(--pill);
  padding: 9px 16px; font-weight: 700; box-shadow: 0 4px 10px rgba(168,23,66,.18);
}
body[data-style="normal"] button:hover { filter: brightness(1.06); }
body[data-style="normal"] button:active { filter: brightness(.96); transform: translateY(1px); }
body[data-style="normal"] button.ghost,
body[data-style="normal"] .add-tab,
body[data-style="normal"] .frame-opt,
body[data-style="normal"] .lang-btn {
  background: var(--btn); color: var(--text); border: 1px solid var(--line3);
  box-shadow: none; font-weight: 600;
}
body[data-style="normal"] button.ghost:hover,
body[data-style="normal"] .add-tab:hover,
body[data-style="normal"] .frame-opt:hover { border-color: var(--primary); color: var(--primary-d); }
body[data-style="normal"] .add-tab.active,
body[data-style="normal"] .frame-opt.active,
body[data-style="normal"] .lang-btn.active {
  background: var(--primary); color: #fff; border-color: var(--primary); box-shadow: none;
}
body[data-style="normal"] button.danger,
body[data-style="normal"] .cloud-menu button.danger {
  background: var(--danger-soft); color: var(--danger); box-shadow: none;
}
body[data-style="normal"] button.ghost.danger-text { background: var(--btn); color: var(--danger); border-color: var(--accent-line); }
body[data-style="normal"] input,
body[data-style="normal"] select,
body[data-style="normal"] textarea,
body[data-style="normal"] .row-col input[type=text],
body[data-style="normal"] .row-col input[type=date] {
  border: 1px solid var(--line3); border-radius: 12px; background: #fff; color: var(--text);
}
body[data-style="normal"] .pill { background: var(--accent-soft); color: var(--primary-d); border-radius: var(--pill); }
body[data-style="normal"] .pill.ok { background: #e8f4ec; color: var(--ok); }
body[data-style="normal"] .pill.warn { background: #fbf1dd; color: var(--warn); }
body[data-style="normal"] .token-box { background: var(--soft); border: 1px dashed var(--accent-line); border-radius: 12px; }
body[data-style="normal"] .token-box textarea { background: #fff; }
body[data-style="normal"] .msg.ok { background: #e8f4ec; color: var(--ok); }
body[data-style="normal"] .msg.err { background: var(--danger-soft); color: var(--danger); }

/* 底部栏：白底、圆角顶、线性 SVG 图标（文案与 data-tab 不变） */
body[data-style="normal"] nav {
  bottom: 0; background: #fff; border-top: 1px solid var(--line);
  border-radius: 18px 18px 0 0; box-shadow: 0 -6px 18px rgba(60,32,30,.06);
  padding-bottom: env(safe-area-inset-bottom, 0);
}
body[data-style="normal"] nav button {
  color: var(--muted); font-size: 10px; font-weight: 600; gap: 3px; padding: 8px 0 6px;
  background: transparent; border: 0; border-radius: 0; box-shadow: none;
  --nav-icon: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='1.8'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M10%2013a5%205%200%201%200%200-10%205%205%200%200%200%200%2010zM14%2017l6%206'/%3E%3C/svg%3E");
}
body[data-style="normal"] nav button:active { transform: none; filter: none; }
body[data-style="normal"] nav button.active { background: transparent; box-shadow: none; }
body[data-style="normal"] nav button[data-tab="msg"] { --nav-icon: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='1.8'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M21%2011.5a8%208%200%200%201-8%208H7l-4%203v-6.5a8%208%200%201%201%2018-4.5z'/%3E%3C/svg%3E"); }
body[data-style="normal"] nav button[data-tab="diary"] { --nav-icon: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='1.8'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M4%205h7a3%203%200%200%201%203%203v12a3%203%200%200%200-3-3H4zM20%205h-3a3%203%200%200%200-3%203v12a3%203%200%200%201%203-3h3z'/%3E%3C/svg%3E"); }
body[data-style="normal"] nav button[data-tab="friends"] { --nav-icon: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='1.8'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M16%2021v-2a4%204%200%200%200-4-4H6a4%204%200%200%200-4%204v2M22%2021v-2a4%204%200%200%200-3-3.87M16%203.13a4%204%200%200%201%200%207.75'/%3E%3Ccircle%20cx='9'%20cy='7'%20r='4'/%3E%3C/svg%3E"); }
body[data-style="normal"] nav button[data-tab="lover"] { --nav-icon: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='1.8'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M12%2020s-8-4.6-8-10a4.5%204.5%200%200%201%208-2.8A4.5%204.5%200%200%201%2020%2010c0%205.4-8%2010-8%2010z'/%3E%3C/svg%3E"); }
body[data-style="normal"] nav button[data-tab="idols"] { --nav-icon: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='1.8'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='m12%203%202.8%205.7%206.2.9-4.5%204.4%201%206.2-5.5-2.9-5.5%202.9%201-6.2L3%209.6l6.2-.9z'/%3E%3C/svg%3E"); }
body[data-style="normal"] nav button[data-tab="share"] { --nav-icon: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='1.8'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M6%209a6%206%200%200%201%2012%200c0%207%203%207%203%209H3c0-2%203-2%203-9zM10%2021h4'/%3E%3C/svg%3E"); }
body[data-style="normal"] nav button[data-tab="auth"] { --nav-icon: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='1.8'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M12%203%204%206v6c0%205%203.5%208%208%209%204.5-1%208-4%208-9V6zM9%2012l2%202%204-4'/%3E%3C/svg%3E"); }
body[data-style="normal"] nav button[data-tab="profile"] { --nav-icon: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='1.8'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Crect%20x='3'%20y='5'%20width='18'%20height='14'%20rx='3'/%3E%3Ccircle%20cx='9'%20cy='11'%20r='2'/%3E%3Cpath%20d='M6.5%2016c.5-1.5%201.5-2%202.5-2s2%20.5%202.5%202M14%2010h4M14%2014h4'/%3E%3C/svg%3E"); }
body[data-style="normal"] nav button .ico {
  display: block; width: 19px; height: 19px; font-size: 0; line-height: 0;
  background: currentColor;
  -webkit-mask: var(--nav-icon) center / 19px 19px no-repeat;
  mask: var(--nav-icon) center / 19px 19px no-repeat;
}
body[data-style="normal"] nav button.active { color: var(--primary); font-weight: 800; }
body[data-style="normal"] nav button.active .ico { background: var(--primary); }
/* 共享栏带子栏目时自动生成的「▾」在缩略图里不存在，隐藏但保留点击展开行为 */
body[data-style="normal"] nav button .chev { display: none; }
body[data-style="normal"] .nav-badge,
body[data-style="normal"] .conv-badge { background: #d5244c; }
body[data-style="normal"] #siteBeian {
  background: rgba(248,244,240,.96); border-top: 1px solid var(--line); color: var(--muted);
}
body[data-style="normal"] #siteBeian a { color: var(--muted); }

/* 落地首页 */
body[data-style="normal"] #home { background: var(--bg); padding-top: 30px; }
body[data-style="normal"] .home-intro {
  background: var(--card); border: 1px solid var(--line); border-radius: 22px;
  padding: 22px 20px; box-shadow: var(--shadow);
}
body[data-style="normal"] .home-title { color: var(--primary); font-weight: 800; }
body[data-style="normal"] .home-intro-txt { color: var(--text); }
body[data-style="normal"] .home-enter {
  border: 2px solid var(--primary); border-radius: var(--pill); background: var(--card);
  color: var(--primary); font-weight: 800; height: 48px;
}
body[data-style="normal"] .home-enter:hover { background: var(--grad); color: #fff; }
body[data-style="normal"] .home-local { background: var(--grad); color: #fff; }
body[data-style="normal"] .home-local:hover { background: var(--primary-d); }
body[data-style="normal"] .dl-btn {
  border: 1px solid var(--line3); border-radius: 18px; background: var(--card); box-shadow: var(--shadow);
}
body[data-style="normal"] .dl-btn:hover { background: var(--grad); color: #fff; border-color: var(--primary); }
body[data-style="normal"] .dl-btn:hover .dl-txt b,
body[data-style="normal"] .dl-btn:hover .dl-txt i { color: #fff; }
body[data-style="normal"] .dl-android { border-color: var(--accent-line); }
body[data-style="normal"] .home-foot { color: var(--muted); }
body[data-style="normal"] .home-foot a { color: var(--muted); }

/* 云端登录卡 / 账号菜单（index.html 内联样式在此以更高优先级覆盖） */
body[data-style="normal"] .cloud-card {
  background: var(--card); color: var(--text); border: 1px solid var(--line);
  border-radius: 22px; padding: 26px 22px; box-shadow: 0 18px 60px rgba(60,32,30,.22);
}
body[data-style="normal"] .cloud-card h2 { justify-content: center; color: var(--text); }
body[data-style="normal"] .cloud-card h2::before { display: none; }
body[data-style="normal"] .cloud-sub { color: var(--muted); }
body[data-style="normal"] .cloud-card label { color: var(--text); font-weight: 600; }
body[data-style="normal"] .cg-row { border: 1px solid var(--line3); border-radius: 12px; overflow: hidden; }
body[data-style="normal"] .cg-prefix { background: var(--soft); color: var(--muted); border-right: 1px solid var(--line); }
body[data-style="normal"] .cg-row input { background: #fff; color: var(--text); }
body[data-style="normal"] .cg-btn {
  background: var(--grad); color: #fff; border-radius: var(--pill); height: 46px;
  font-weight: 800; box-shadow: 0 4px 10px rgba(168,23,66,.18);
}
body[data-style="normal"] .cg-link { color: var(--primary-d); }
body[data-style="normal"] .cg-msg.err { color: var(--danger); }
body[data-style="normal"] .cg-msg.ok { color: var(--ok); }
body[data-style="normal"] .cg-tabs { background: var(--soft); border-radius: var(--pill); }
body[data-style="normal"] .cg-tab { color: var(--muted); border-radius: var(--pill); font-weight: 600; }
body[data-style="normal"] .cg-tab.active { background: var(--card); color: var(--primary-d); box-shadow: 0 2px 6px rgba(60,32,30,.08); }
body[data-style="normal"] .cg-tip { color: var(--muted); }
body[data-style="normal"] .cloud-legal { color: var(--muted); }
body[data-style="normal"] #cloudAccountBtn {
  background: var(--grad); color: #fff; border-radius: 50%;
  box-shadow: 0 6px 16px rgba(168,23,66,.32);
}
body[data-style="normal"] .cloud-menu {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: 0 8px 30px rgba(60,32,30,.16); color: var(--text);
}
body[data-style="normal"] .cm-phone { color: var(--muted); border-bottom: 1px solid var(--line); }
body[data-style="normal"] .cloud-menu button { color: var(--text); border-radius: 10px; }
body[data-style="normal"] .cloud-menu button:hover { background: var(--soft); }

/* 好友 / 会话 / 聊天（缩略图样式） */
body[data-style="normal"] .friend,
body[data-style="normal"] .conv,
body[data-style="normal"] .ol-item,
body[data-style="normal"] .share-row,
body[data-style="normal"] .recv-item { border-bottom: 1px solid var(--line); }

/* 会话列表：整块白卡 + 浅米头像 + 细分隔线，删除回归小字按钮 */
body[data-style="normal"] .msg-inbox {
  background: var(--card); border: 1px solid var(--line); border-radius: 18px;
  padding: 14px 14px 4px; box-shadow: var(--shadow);
}
body[data-style="normal"] .msg-inbox::before {
  content: "最近会话"; display: block;
  font-size: 14px; font-weight: 800; color: var(--text); margin-bottom: 6px;
  border-left: 3px solid var(--primary); padding-left: 8px; line-height: 15px;
}
body[data-style="normal"] .conv { gap: 10px; padding: 10px 2px; }
body[data-style="normal"] .conv:last-child { border-bottom: 0; }
body[data-style="normal"] .conv:active { background: var(--soft); border-radius: 10px; }
body[data-style="normal"] .conv-ava {
  width: 40px; height: 40px; flex: 0 0 40px; border-radius: 50%;
  background: var(--soft); color: var(--primary-d); font-size: 17px; font-weight: 700;
  box-shadow: none;
}
body[data-style="normal"] .conv-top b { font-size: 13px; font-weight: 800; }
body[data-style="normal"] .conv-tid,
body[data-style="normal"] .conv-time,
body[data-style="normal"] .conv-prev { color: var(--muted); font-size: 11px; }
body[data-style="normal"] .conv-prev { margin-top: 2px; }
body[data-style="normal"] .conv-badge {
  right: 4px; bottom: 10px; min-width: 16px; height: 16px; font-size: 9px;
  background: #d5244c; box-shadow: none;
}
body[data-style="normal"] .conv-del,
body[data-style="normal"] .chat-clear,
body[data-style="normal"] .bubble-del,
body[data-style="normal"] .bubble-flag,
body[data-style="normal"] .modal-x,
body[data-style="normal"] .add-close {
  background: transparent; color: var(--muted); border: 0; box-shadow: none;
}
body[data-style="normal"] .conv-del {
  margin-left: 6px; padding: 2px 8px; border: 1px solid var(--accent-line);
  border-radius: 999px; background: var(--accent-soft); color: var(--primary-d);
  font-size: 11px; flex: 0 0 auto;
}
body[data-style="normal"] .conv-del:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

/* 聊天页：浅色顶栏、白/酒红气泡、胶囊输入栏 */
body[data-style="normal"] .chat-head {
  background: var(--bg); border-bottom: 1px solid var(--line); border-radius: 0;
  padding: 10px 6px; box-shadow: none;
}
body[data-style="normal"] .chat-head b { font-size: 15px; font-weight: 800; }
body[data-style="normal"] .chat-back { color: var(--primary); background: transparent; border: 0; box-shadow: none; font-size: 24px; }
body[data-style="normal"] .chat-clear {
  margin-left: auto; border: 1px solid var(--accent-line); background: var(--accent-soft);
  color: var(--primary-d); border-radius: 999px; padding: 3px 10px; font-size: 11px;
}
body[data-style="normal"] .chat-list { gap: 9px; padding: 12px; }
body[data-style="normal"] .bubble-txt {
  padding: 9px 12px; border-radius: 14px; font-size: 14px; box-shadow: none;
}
body[data-style="normal"] .bubble-me .bubble-txt { background: var(--grad); color: #fff; border: 0; }
body[data-style="normal"] .bubble-them .bubble-txt { background: #fff; color: var(--text); border: 1px solid var(--line); }
body[data-style="normal"] .bubble-time { font-size: 10px; color: var(--muted); }
body[data-style="normal"] .bubble-del,
body[data-style="normal"] .bubble-flag {
  width: 18px; height: 18px; line-height: 16px; border: 1px solid var(--accent-line);
  border-radius: 50%; background: #fff; color: var(--primary-d); font-size: 11px;
}
body[data-style="normal"] .bubble.picked .bubble-txt { box-shadow: inset 0 0 0 2px var(--primary); }
body[data-style="normal"] .bubble.picked .bubble-flag { background: var(--primary); color: #fff; border-color: var(--primary); }
body[data-style="normal"] .chat-report,
body[data-style="normal"] .chat-report-always,
body[data-style="normal"] .msg-report-btn,
body[data-style="normal"] .chat-report-hint button {
  color: var(--primary-d); border: 1px solid var(--accent-line); background: var(--accent-soft);
  box-shadow: none; padding: 4px 10px; font-size: 12px; font-weight: 600; border-radius: 999px;
}
body[data-style="normal"] .chat-report-hint { background: var(--accent-soft); color: var(--primary-d); border: 1px solid var(--accent-line); }
body[data-style="normal"] .chat-input { background: #fff; border-top: 1px solid var(--line); padding: 8px 10px; }
body[data-style="normal"] .chat-input input { background: var(--soft); border-radius: var(--pill); border: 1px solid var(--line); }
body[data-style="normal"] .chat-input .cg-btn { border-radius: var(--pill); box-shadow: none; }
body[data-style="normal"] .report-msgs,
body[data-style="normal"] .report-reason,
body[data-style="normal"] .report-select { border-color: var(--line3); border-radius: 12px; }
body[data-style="normal"] .recv-item .tag { background: var(--accent-soft); color: var(--primary-d); }
body[data-style="normal"] .share-row .seg button { background: var(--soft); color: var(--muted); border-color: var(--line); border-radius: 9px; }
body[data-style="normal"] .share-row .seg button.on { background: var(--primary); color: #fff; border-color: var(--primary); }
body[data-style="normal"] .shared-diary { background: var(--soft); border-radius: 12px; }

/* 偶像栏目 / 开关 / 协议 */
body[data-style="normal"] .idol-card { border-radius: 18px; box-shadow: var(--shadow); }
body[data-style="normal"] .idol-photo { background: var(--soft); border-radius: 12px; }
body[data-style="normal"] .locked-slot { background: var(--soft); border-color: var(--accent-line); border-radius: 12px; }
body[data-style="normal"] .act-item { border-top-color: var(--line); }
body[data-style="normal"] .act-item .del { background: var(--btn); color: var(--muted); border-color: var(--line3); }
body[data-style="normal"] .switch .slider { background: var(--line3); }
body[data-style="normal"] .switch input:checked + .slider { background: var(--primary); }
body[data-style="normal"] .legal-note { color: var(--muted); }
body[data-style="normal"] .legal-links a { color: var(--primary-d); }
body[data-style="normal"] .legal-beian a { color: var(--muted); }
body[data-style="normal"] .reg-docs .link,
body[data-style="normal"] .agree-row .link-inline,
body[data-style="normal"] .link-inline { color: var(--primary-d); }
body[data-style="normal"] .modal-x:hover { background: var(--soft); }
body[data-style="normal"] .sub-nav-item { border-radius: 14px; box-shadow: var(--shadow); }
body[data-style="normal"] .sub-back { color: var(--primary-d); border-color: var(--line3); background: var(--card); }

/* ===== 赛博朋克 ===== */
body[data-style="cyberpunk"] {
  --bg: #07070f;
  --card: #0f0f1c;
  --primary: #00e5ff;
  --primary-d: #00b3cc;
  --primary-soft: #0a2a33;
  --text: #d7e6ff;
  --muted: #6f7aa8;
  --line: #243049;
  --symbol: #ff2bd6;
  --ok: #39ff14;
  --warn: #ffd400;
  font-family: ui-monospace, "SFMono-Regular", "Cascadia Code", "Courier New", monospace;
  background-image:
    linear-gradient(rgba(0,229,255,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,229,255,.045) 1px, transparent 1px);
  background-size: 26px 26px;
}
body[data-style="cyberpunk"] header {
  background: linear-gradient(90deg, #07070f 0%, #0c1b2e 55%, #1a0b2e 100%);
  color: #00e5ff; text-shadow: 0 0 8px rgba(0,229,255,.7);
  border-bottom: 1px solid rgba(0,229,255,.35);
  box-shadow: 0 0 16px rgba(0,229,255,.35);
  letter-spacing: 1px;
}
body[data-style="cyberpunk"] .card,
body[data-style="cyberpunk"] .modal {
  background: var(--card); border: 1px solid #243049; border-radius: 6px;
  box-shadow: 0 0 12px rgba(0,229,255,.10), inset 0 0 18px rgba(0,229,255,.04);
}
body[data-style="cyberpunk"] h3 { color: #00e5ff; }
body[data-style="cyberpunk"] button {
  background: transparent; color: #00e5ff; border: 1px solid #00e5ff; border-radius: 4px;
  box-shadow: 0 0 8px rgba(0,229,255,.35);
}
body[data-style="cyberpunk"] button:hover { background: rgba(0,229,255,.12); }
body[data-style="cyberpunk"] button.ghost {
  background: transparent; color: #ff2bd6; border: 1px solid #ff2bd6;
  box-shadow: 0 0 8px rgba(255,43,214,.3);
}
body[data-style="cyberpunk"] input,
body[data-style="cyberpunk"] select,
body[data-style="cyberpunk"] textarea {
  background: #0a0a16; color: #d7e6ff; border: 1px solid #243049; border-radius: 4px;
}
body[data-style="cyberpunk"] .pill { background: #0a2a33; color: #00e5ff; }
body[data-style="cyberpunk"] .pill.ok { background: #0a2a14; color: #39ff14; }
body[data-style="cyberpunk"] .pill.warn { background: #2a260a; color: #ffd400; }
body[data-style="cyberpunk"] nav {
  background: #0a0a16; border-top: 1px solid rgba(0,229,255,.35);
  box-shadow: 0 -2px 16px rgba(0,229,255,.2);
}
body[data-style="cyberpunk"] nav button { color: #6f7aa8; }
body[data-style="cyberpunk"] nav button.active {
  color: #00e5ff; text-shadow: 0 0 8px rgba(0,229,255,.7);
}
body[data-style="cyberpunk"] .friend { border-bottom: 1px solid #1c2438; }
body[data-style="cyberpunk"] .friend .name { color: #d7e6ff; }
body[data-style="cyberpunk"] .idol-card { background: var(--card); border: 1px solid #243049; border-radius: 6px; box-shadow: 0 0 10px rgba(0,229,255,.10); }
body[data-style="cyberpunk"] .token-box { background: #0a0a16; border: 1px dashed #243049; }
body[data-style="cyberpunk"] .frame-opt { color: #00e5ff; border: 1px solid #243049; }
body[data-style="cyberpunk"] .frame-opt.active { background: #00e5ff; color: #07070f; }
body[data-style="cyberpunk"] .add-friend-btn,
body[data-style="cyberpunk"] .idol-head button { background: transparent; color: #00e5ff; border: 1px solid #00e5ff; box-shadow: 0 0 8px rgba(0,229,255,.35); }

/* ===== 浪漫漫画 ===== */
body[data-style="romance"] {
  --bg: #fff0f6;
  --card: #ffffff;
  --primary: #ff6f91;
  --primary-d: #e84d72;
  --primary-soft: #ffe3ec;
  --text: #4a3340;
  --muted: #b08a9a;
  --line: #ffd0e0;
  --symbol: #ff9ec4;
  --ok: #2e9e6b;
  --warn: #e89b00;
  font-family: "Yuanti SC", "PingFang SC", "Microsoft YaHei", "Comic Sans MS", cursive, sans-serif;
  background-image:
    radial-gradient(circle at 12% 18%, #ffe3ee 0, transparent 42%),
    radial-gradient(circle at 88% 8%, #ffe9f3 0, transparent 38%);
}
body[data-style="romance"] header {
  background: linear-gradient(90deg, #ff9ec4 0%, #ffc2d8 100%);
  color: #fff; text-shadow: 0 1px 2px rgba(232,77,114,.4);
  border-bottom: 3px solid #ffd0e0; border-radius: 0 0 18px 18px;
  box-shadow: 0 4px 14px rgba(255,111,145,.25);
}
body[data-style="romance"] .card,
body[data-style="romance"] .modal {
  background: #fff; border: 2px solid #ff9ec4; border-radius: 20px;
  box-shadow: 3px 3px 0 #ffd0e0;
}
body[data-style="romance"] h3 { color: #e84d72; }
body[data-style="romance"] button {
  background: linear-gradient(180deg, #ff85a8, #ff6f91); color: #fff;
  border: 2px solid #ff9ec4; border-radius: 999px; box-shadow: 0 3px 0 #e84d72; font-weight: 700;
}
body[data-style="romance"] button:active { box-shadow: 0 1px 0 #e84d72; transform: translateY(2px); }
body[data-style="romance"] button.ghost {
  background: #fff; color: #e84d72; border: 2px solid #ff9ec4; box-shadow: 2px 2px 0 #ffd0e0;
}
body[data-style="romance"] input,
body[data-style="romance"] select,
body[data-style="romance"] textarea {
  background: #fff7fb; color: #4a3340; border: 2px solid #ffd0e0; border-radius: 14px;
}
body[data-style="romance"] .pill { background: #ffe3ec; color: #e84d72; border-radius: 999px; }
body[data-style="romance"] nav {
  background: #fff; border-top: 3px solid #ffd0e0;
  box-shadow: 0 -4px 14px rgba(255,111,145,.15); border-radius: 18px 18px 0 0;
}
body[data-style="romance"] nav button { color: #b08a9a; border-radius: 14px; }
body[data-style="romance"] nav button.active {
  color: #fff; background: linear-gradient(180deg, #ff85a8, #ff6f91);
  box-shadow: 0 2px 0 #e84d72;
}
body[data-style="romance"] .friend { border-bottom: 2px dashed #ffd0e0; }
body[data-style="romance"] .idol-card {
  background: #fff; border: 2px solid #ff9ec4; border-radius: 20px; box-shadow: 3px 3px 0 #ffd0e0;
}
body[data-style="romance"] .token-box { background: #fff7fb; border: 2px dashed #ff9ec4; border-radius: 14px; }
body[data-style="romance"] .frame-opt { color: #e84d72; border: 2px solid #ffd0e0; }
body[data-style="romance"] .frame-opt.active { background: #ff6f91; color: #fff; border-color: #ff6f91; }
body[data-style="romance"] .add-friend-btn,
body[data-style="romance"] .idol-head button {
  background: linear-gradient(180deg, #ff85a8, #ff6f91); color: #fff;
  border: 2px solid #ff9ec4; box-shadow: 0 3px 0 #e84d72;
}

/* ---------- 声明与条款（注册页 / 名片页底部）---------- */
.legal-note {
  font-size: 11px; line-height: 1.65; color: var(--muted);
  margin-top: 14px; text-align: justify;
}
#nickModal .legal-note { margin-top: 12px; }
.legal-footer {
  background: transparent; border: none; box-shadow: none;
  padding: 18px 4px 4px;
}
.legal-footer h2 {
  font-size: 13px; color: var(--muted); font-weight: 600; margin-bottom: 6px;
}
body[data-style="cyberpunk"] .legal-footer { background: transparent; border: none; box-shadow: none; }
body[data-style="romance"] .legal-footer { background: transparent; border: none; box-shadow: none; }

/* ---------- 注册同意 / 文档查看 ---------- */
.reg-docs { display: flex; gap: 10px; align-items: center; margin-top: 12px; }
.reg-docs .link { background: none; color: var(--primary-d); border: none; padding: 0; font-size: 13px; font-weight: 500; text-decoration: underline; cursor: pointer; }
.reg-docs .reg-sep { color: var(--muted); }
.agree-row { display: flex; align-items: flex-start; gap: 8px; margin-top: 12px; font-size: 13px; color: var(--text); line-height: 1.5; }
.agree-row input[type=checkbox] { width: auto; margin: 3px 0 0; flex: 0 0 auto; }
.agree-row .link-inline { background: none; border: none; padding: 0; color: var(--primary-d); font-size: 13px; text-decoration: underline; cursor: pointer; font-weight: 500; }
button.danger { background: #c0392b; color: #fff; }
button.danger:hover { filter: brightness(1.05); }
button.ghost.danger-text { color: #c0392b; border-color: #f0c4c4; }
#loginNick { color: var(--primary-d); }
#loginPwWrap[style*="none"] { display: none; }
/* 文档弹窗 */
.doc-modal { max-width: 420px; max-height: 82vh; display: flex; flex-direction: column; }
.doc-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.doc-lang { display: flex; gap: 6px; margin-bottom: 10px; }
.lang-btn { flex: 0 0 auto; background: var(--card); color: var(--primary-d); border: 1px solid var(--line); padding: 6px 14px; font-size: 13px; border-radius: 999px; }
.lang-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.doc-content { overflow-y: auto; font-size: 13.5px; line-height: 1.7; text-align: left; }
.doc-content h2 { font-size: 17px; margin: 0 0 10px; text-align: left; }
.doc-content h3 { font-size: 14px; margin: 16px 0 6px; color: var(--primary-d); text-align: left; }
.doc-content p { margin: 6px 0; text-align: left; }
.doc-content ul, .doc-content ol { margin: 6px 0; padding-left: 20px; text-align: left; }
.doc-content li { margin: 4px 0; }
.doc-content .doc-meta { color: var(--muted); font-size: 12px; margin: -4px 0 8px; text-align: left; }

/* 滑动开关（本机登录密码） */
.switch { position: relative; display: inline-block; width: 50px; height: 28px; flex: 0 0 auto; }
.switch input { opacity: 0; width: 0; height: 0; margin: 0; }
.switch .slider {
  position: absolute; cursor: pointer; inset: 0;
  background: var(--line); border-radius: 999px; transition: background-color .2s ease;
}
.switch .slider::before {
  content: ""; position: absolute; height: 22px; width: 22px; left: 3px; top: 3px;
  background: #fff; border-radius: 50%; transition: transform .2s ease; box-shadow: 0 1px 3px rgba(0,0,0,.25);
}
.switch input:checked + .slider { background: var(--primary); }
.switch input:checked + .slider::before { transform: translateX(22px); }
.switch input:focus-visible + .slider { outline: 2px solid var(--primary-d); outline-offset: 2px; }
.pw-switch-row { display: flex; align-items: center; justify-content: space-between; }
.pw-switch-row .pw-switch-label { font-size: 14px; font-weight: 500; }

/* 在线加好友：搜索结果项 / 申请收件箱 */
.online-search { margin-bottom: 4px; }
.ol-item {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 2px; border-bottom: 1px solid var(--line);
}
.ol-item:last-child { border-bottom: none; }
.ol-item .name { font-weight: 600; font-size: 15px; }
.ol-item .meta { color: var(--muted); font-size: 13px; margin-top: 2px; }
.ol-item .block, .ol-item .ghost { margin-top: 0; flex: 0 0 auto; }
.ol-item .pill { flex: 0 0 auto; }
.online-search #olResults { margin-top: 10px; text-align: left; }

/* ==================== 实时共享（共享栏）==================== */
.share-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 2px; border-bottom: 1px solid var(--line);
}
.share-row:last-child { border-bottom: none; }
.share-row .sn { font-weight: 600; font-size: 15px; }
.share-row .seg { display: flex; gap: 4px; flex: 0 0 auto; }
.share-row .seg button {
  border: 1px solid var(--line); background: var(--bg); color: var(--muted);
  border-radius: 9px; padding: 6px 9px; font-size: 12px; cursor: pointer; white-space: nowrap;
}
.share-row .seg button.on { background: var(--primary); color: #fff; border-color: var(--primary); font-weight: 600; }
.recv-item { padding: 10px 2px; border-bottom: 1px solid var(--line); text-align: left; }
.recv-item:last-child { border-bottom: none; }
.recv-item .tag {
  font-size: 11px; padding: 2px 8px; border-radius: 999px; background: #fdeaf1; color: var(--primary); font-weight: 600;
}
.recv-item .tag-card { background: #eef2f7; color: #4a6fa5; }
.shared-diary { margin-top: 8px; padding: 8px 10px; background: var(--bg); border-radius: 10px; text-align: left; }
.shared-diary .sd-entry { padding: 6px 0; border-bottom: 1px dashed var(--line); }
.shared-diary .sd-entry:last-child { border-bottom: none; }
.shared-diary .muted { font-size: 12px; }

/* ===== 好友私聊（消息 tab / 会话 / 气泡）===== */
.msg-inbox { display: flex; flex-direction: column; }
.conv {
  display: flex; align-items: center; gap: 12px; padding: 12px 6px;
  border-bottom: 1px solid var(--line); cursor: pointer; position: relative;
}
.conv:active { background: var(--bg); }
.conv-ava {
  width: 46px; height: 46px; border-radius: 50%; flex: 0 0 auto;
  background: linear-gradient(135deg, #ff9ec4, #e75480); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 700;
}
.conv-main { flex: 1 1 auto; min-width: 0; }
.conv-top { display: flex; align-items: baseline; gap: 8px; }
.conv-top b { font-size: 15px; }
.conv-tid { font-size: 12px; }
.conv-time { margin-left: auto; font-size: 12px; color: var(--muted); flex: 0 0 auto; }
.conv-prev {
  margin-top: 3px; font-size: 13px; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%;
}
.conv-badge {
  position: absolute; right: 6px; bottom: 12px; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 999px; background: #ff3b5c; color: #fff; font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
/* 单会话 */
.chat-head {
  display: flex; align-items: center; gap: 8px; padding: 12px 8px;
  border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--card); z-index: 2;
}
.chat-head b { font-size: 16px; }
.chat-back {
  border: none; background: transparent; color: var(--primary); font-size: 26px; line-height: 1;
  cursor: pointer; padding: 0 6px;
}
.chat-list {
  flex: 1 1 auto; overflow-y: auto; padding: 14px 12px; display: flex; flex-direction: column; gap: 10px;
}
.bubble { max-width: 78%; display: flex; flex-direction: column; position: relative; }
.bubble-me { align-self: flex-end; align-items: flex-end; }
.bubble-them { align-self: flex-start; align-items: flex-start; }
.bubble-txt {
  padding: 9px 13px; border-radius: 16px; font-size: 15px; line-height: 1.45; white-space: pre-wrap;
  word-break: break-word; text-align: left;
}
.bubble-me .bubble-txt { background: var(--primary); color: #fff; border-bottom-right-radius: 4px; }
.bubble-them .bubble-txt { background: var(--bg); color: var(--text); border-bottom-left-radius: 4px; }
.bubble-time { font-size: 10px; color: var(--muted); margin-top: 3px; padding: 0 4px; }
/* 删除单条消息：气泡右上角的小 ×（触屏设备常显，桌面悬停显示） */
.bubble-del {
  position: absolute; top: -7px; right: -7px; width: 18px; height: 18px; line-height: 16px;
  text-align: center; border-radius: 50%; background: #fff; border: 1px solid #e6d3dc;
  color: #b07f92; font-size: 13px; cursor: pointer; z-index: 2; user-select: none;
  opacity: 0; transition: opacity .15s;
}
.bubble-them .bubble-del { right: auto; left: -7px; }
.bubble:hover .bubble-del { opacity: 1; }
@media (hover: none) { .bubble-del { opacity: .75; } }
/* 聊天页右上角「清空」 */
.chat-clear {
  margin-left: auto; border: 1px solid var(--line); background: transparent; color: var(--muted);
  font-size: 12px; padding: 4px 10px; border-radius: 999px; cursor: pointer;
}
.chat-clear:active { background: var(--bg); }
/* 举报：气泡上的旗标 + 选中态 + 头部「举报选中」按钮 */
.bubble-flag {
  position: absolute; top: -7px; right: -7px; width: 18px; height: 18px; line-height: 16px;
  text-align: center; border-radius: 50%; background: #fff; border: 1px solid #e6d3dc;
  color: #b07f92; font-size: 11px; cursor: pointer; z-index: 2; user-select: none;
  opacity: 0; transition: opacity .15s;
}
.bubble:hover .bubble-flag { opacity: 1; }
@media (hover: none) { .bubble-flag { opacity: .75; } }
.bubble.picked .bubble-txt { box-shadow: inset 0 0 0 2px #e5484d; }
.bubble.picked .bubble-flag { opacity: 1; background: #e5484d; color: #fff; border-color: #e5484d; }
.chat-report {
  border: 1px solid #e5484d; background: transparent; color: #e5484d;
  font-size: 12px; padding: 4px 10px; border-radius: 999px; cursor: pointer;
}
.chat-report:active { background: #e5484d; color: #fff; }
/* 审核整改：聊天页与消息列表的常显举报入口，无需先勾选消息即可打开并举报用户 */
.chat-report-always {
  border: 1px solid #e5484d; background: transparent; color: #e5484d;
  font-size: 12px; padding: 4px 10px; border-radius: 999px; cursor: pointer; flex: 0 0 auto;
}
.chat-report-always:active { background: #e5484d; color: #fff; }
.msg-report-bar { display: flex; justify-content: flex-end; margin: 0 0 8px; }
.msg-report-btn {
  border: 1px solid #e5484d; background: transparent; color: #e5484d;
  font-size: 12px; padding: 5px 12px; border-radius: 999px; cursor: pointer;
}
.msg-report-btn:active { background: #e5484d; color: #fff; }
/* 举报弹窗内消息列表 */
.report-msgs { max-height: 220px; overflow-y: auto; border: 1px solid var(--line); border-radius: 10px; margin: 10px 0; }
.report-msg { display: flex; gap: 8px; align-items: flex-start; padding: 8px 10px; border-bottom: 1px solid var(--line); font-size: 13px; cursor: pointer; }
.report-msg:last-child { border-bottom: none; }
.report-msg input { margin-top: 2px; flex: 0 0 auto; }
.report-msg .rm-txt { white-space: pre-wrap; word-break: break-word; flex: 1 1 auto; }
.report-msg .rm-time { color: var(--muted); font-size: 11px; flex: 0 0 auto; }
.report-reason { width: 100%; box-sizing: border-box; min-height: 76px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--text); font-size: 14px; resize: vertical; }
.report-select {
  width: 100%; box-sizing: border-box; height: 40px; padding: 0 10px; border: 1px solid var(--line);
  border-radius: 10px; background: var(--card); color: var(--text); font-size: 14px;
}
.chat-report-hint {
  display: flex; align-items: center; gap: 8px; justify-content: space-between;
  padding: 8px 12px; margin: 6px 0; border-radius: 10px;
  background: #fff3f4; color: #c23b45; font-size: 12px; line-height: 1.5;
}
.chat-report-hint button {
  flex: 0 0 auto; border: 1px solid #e5484d; background: transparent; color: #e5484d;
  border-radius: 999px; padding: 3px 9px; font-size: 12px; cursor: pointer;
}
/* 会话列表每行的「删除」 */
.conv-del {
  border: 0; background: none; color: #b08a9b; font-size: 12px; padding: 2px 4px;
  cursor: pointer; flex: 0 0 auto; margin-left: 4px;
}
.conv-del:active { color: #e5484d; }
/* 发送失败的消息：内容保留，时间行标红说明原因 */
.bubble-fail .bubble-txt { opacity: .72; box-shadow: inset 0 0 0 1px #e5484d; }
.bubble-fail .bubble-time { color: #e5484d; }
/* 扫码框必须盖在「加好友」等弹窗之上，否则打开摄像头时会被挡住 */
#scanModal { z-index: 60; }
.chat-input {
  display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line);
  background: var(--card); position: sticky; bottom: 0;
}
.chat-input input {
  flex: 1 1 auto; border: 1px solid var(--line); border-radius: 20px; padding: 10px 14px;
  font-size: 15px; background: var(--bg); color: var(--text); outline: none;
}
/* 导航红点 */
.nav-badge {
  position: absolute; top: 4px; right: 8px; min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 999px; background: #ff3b5c; color: #fff; font-size: 10px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}

/* 主按钮（聊天 / 发送共用） */
.cg-btn {
  background: var(--primary); color: #fff; border: none; border-radius: 10px;
  padding: 10px 16px; font-weight: 600; cursor: pointer; font-size: 15px;
}
.cg-btn:hover { filter: brightness(1.05); }

/* 好友名片：右上角关闭按钮 */
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.modal-head h2 { margin: 0; }
.modal-x {
  background: transparent; border: none; font-size: 26px; line-height: 1; cursor: pointer;
  color: var(--muted); padding: 0 6px; border-radius: 6px;
}
.modal-x:hover { color: var(--primary); background: rgba(0,0,0,0.05); }

/* 子栏目 hub 内的子项 */
.sub-nav-item {
  display: flex; align-items: center; gap: 8px; width: 100%; text-align: left;
  margin-top: 10px; padding: 14px; font-size: 16px;
  background: var(--card); color: var(--text); border: 1px solid var(--line); border-radius: 10px; cursor: pointer;
}
.sub-nav-item:hover { border-color: var(--primary); }
.sub-nav-item .ico { font-size: 18px; }
/* 子栏目 / 子页面左上角「返回上一级」按钮 */
.sub-back {
  display: inline-flex; align-items: center; gap: 2px;
  margin-bottom: 12px; padding: 6px 12px; font-size: 14px;
  background: var(--card); color: var(--primary-d); border: 1px solid var(--line);
  border-radius: 999px; cursor: pointer; font-weight: 600;
}
.sub-back:hover { border-color: var(--primary); }
/* 父级栏目带子栏目时的小箭头 */
.chev { font-size: 11px; margin-left: 4px; opacity: 0.6; }

/* 纪念日表单（竖排字段） */
.row-col { display: flex; flex-direction: column; gap: 6px; margin: 10px 0; }
.row-col label { font-size: 13px; color: var(--muted); margin-top: 6px; }
.row-col input[type=text], .row-col input[type=date], .row-col textarea {
  width: 100%; box-sizing: border-box; padding: 9px 10px; font-size: 14px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--text);
  font-family: inherit;
}
.row-col textarea { resize: vertical; }

/* 纪念日记录卡片 */
.memory-card .memory-date { font-size: 12px; color: var(--muted); margin-top: 8px; }
.memory-card .memory-title { font-size: 16px; margin: 2px 0 4px; }
.memory-card .memory-content { font-size: 14px; color: var(--text); white-space: pre-wrap; line-height: 1.5; }

/* ===== 首次启动隐私政策确认（上架合规）===== */
.privacy-gate { z-index: 100000; }   /* 必须盖过落地首页(99990)与登录门禁(99999) */
/* 从弹窗内点开协议时，文档层必须盖在最上层 */
#docModal { z-index: 100001; }
.privacy-gate .modal { max-height: 86vh; overflow-y: auto; }
.gate-list { margin: 10px 0 4px; padding-left: 20px; }
.gate-list li { margin: 7px 0; font-size: 14px; line-height: 1.65; }
.gate-links { margin-top: 12px; display: flex; gap: 4px; flex-wrap: wrap; }
