/* ============================================================
 * 灵信 LingXin · 全站样式（微信级三栏布局 + 移动端 + 深色模式）
 * ============================================================ */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
:root {
  --bg: #f2f3f7; --panel: #ffffff; --panel2: #f7f7fa; --rail: #262238; --rail-ico: #9d97b8;
  --acc: #6c5ce7; --acc2: #8e7bff; --acc-soft: #efeaff; --gold: #d99a2b; --gold2: #f5b940;
  --txt: #1f1c2e; --txt2: #7a7590; --line: #eceaf3; --danger: #e05555; --ok: #12b76a;
  --bubble: #ffffff; --bubble-me: linear-gradient(135deg, #6c5ce7, #8e7bff);
  --shadow: 0 8px 30px rgba(40, 30, 90, .10);
}
body.dark {
  --bg: #14121d; --panel: #1e1b2b; --panel2: #262238; --rail: #14121d; --rail-ico: #6f6a8c;
  --acc-soft: #2c2742; --txt: #eae8f4; --txt2: #9d97b8; --line: #2b2840;
  --bubble: #262238; --shadow: 0 8px 30px rgba(0, 0, 0, .35);
}
html, body { height: 100%; }
[hidden] { display: none !important; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: var(--bg); color: var(--txt); overflow: hidden; font-size: 15px;
}
button { font-family: inherit; border: none; background: none; cursor: pointer; color: inherit; }
input, textarea { font-family: inherit; font-size: 14px; color: var(--txt); background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; outline: none; width: 100%; transition: border .15s; }
input:focus, textarea:focus { border-color: var(--acc); }
textarea { resize: none; }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-thumb { background: rgba(120, 110, 160, .3); border-radius: 3px; }

.boot-loading { height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; color: var(--txt2); }
.boot-star { font-size: 42px; animation: spin 2s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ================= 布局骨架 ================= */
.shell { display: grid; grid-template-columns: 64px 320px 1fr; height: 100dvh; }
.shell[data-view="moments"], .shell[data-view="me"] { grid-template-columns: 64px 1fr; }
.shell[data-view="moments"] .main-pane, .shell[data-view="me"] .main-pane { display: none; }

.rail { background: var(--rail); display: flex; flex-direction: column; align-items: center; padding: 14px 0; gap: 6px; z-index: 5; }
.rail-logo { font-size: 26px; margin-bottom: 14px; filter: drop-shadow(0 0 8px rgba(142, 123, 255, .6)); }
.rail-btn { position: relative; width: 46px; height: 46px; border-radius: 12px; color: var(--rail-ico); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; transition: all .15s; }
.rail-btn i { font-style: normal; font-size: 20px; line-height: 1; }
.rail-btn span { font-size: 9px; }
.rail-btn:hover { color: #fff; background: rgba(255, 255, 255, .06); }
.rail-btn.on { color: #fff; background: linear-gradient(135deg, var(--acc), var(--acc2)); box-shadow: 0 4px 14px rgba(108, 92, 231, .45); }
.rail-btn .badge { position: absolute; top: 2px; right: 2px; }
.rail-me { margin-top: auto; }

.main-pane { background: var(--panel); border-right: 1px solid var(--line); display: flex; flex-direction: column; min-width: 0; }
.content-pane { background: var(--bg); display: flex; flex-direction: column; min-width: 0; overflow: hidden; }

.pane-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid var(--line); font-size: 17px; flex-shrink: 0; }
.pane-head b { font-weight: 600; }
.head-acts { display: flex; gap: 6px; }
.icon-btn { width: 34px; height: 34px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; font-size: 16px; color: var(--txt2); transition: all .15s; }
.icon-btn:hover { background: var(--acc-soft); color: var(--acc); }
.scroll-pane { flex: 1; overflow-y: auto; min-height: 0; }
.pane-tip { padding: 60px 20px; text-align: center; color: var(--txt2); font-size: 13px; line-height: 2; }

/* ================= 头像 ================= */
.avatar-box { position: relative; display: inline-block; flex-shrink: 0; }
.avatar { border-radius: 12px; display: flex; align-items: center; justify-content: center; color: #fff; }
.avatar-wrap-premium { position: relative; }
.avatar-wrap-premium .avatar { width: 100%; height: 100%; border-radius: 12px; }
.avatar-wrap-premium::after { content: '✦'; position: absolute; right: -4px; bottom: -4px; background: linear-gradient(135deg, #f5b940, #d97706); color: #fff; font-size: 10px; width: 16px; height: 16px; border-radius: 50%; display: flex; align-items: center; justify-content: center; border: 2px solid var(--panel); }
.badge { position: absolute; top: -4px; right: -6px; background: #fa5151; color: #fff; font-size: 10px; font-weight: 600; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; display: flex; align-items: center; justify-content: center; font-style: normal; }
.dot-online { position: absolute; right: 0; bottom: 0; width: 11px; height: 11px; background: var(--ok); border: 2px solid var(--panel); border-radius: 50%; }

/* ================= 会话列表 ================= */
.chat-item { display: flex; gap: 12px; padding: 12px 16px; cursor: pointer; align-items: center; border-bottom: 1px solid var(--line); transition: background .12s; }
.chat-item:hover { background: var(--panel2); }
.chat-item.on { background: var(--acc-soft); }
.chat-mid { flex: 1; min-width: 0; }
.chat-item .row1 { display: flex; justify-content: space-between; align-items: center; }
.chat-item .row1 b { font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-item .time { color: var(--txt2); font-size: 11px; flex-shrink: 0; margin-left: 8px; }
.chat-item .row2 { display: flex; justify-content: space-between; align-items: center; margin-top: 4px; }
.chat-item .row2 span { color: var(--txt2); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-badge { background: #fa5151; color: #fff; font-size: 10px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }

/* ================= 通讯录 ================= */
.sec-title { padding: 10px 18px 4px; font-size: 12px; color: var(--txt2); }
.contact-item { display: flex; align-items: center; gap: 12px; padding: 10px 18px; cursor: pointer; border-bottom: 1px solid var(--line); }
.contact-item:hover { background: var(--panel2); }
.c-mid { flex: 1; min-width: 0; }
.c-mid b { font-size: 14.5px; font-weight: 500; }
.c-mid span { display: block; color: var(--txt2); font-size: 11.5px; margin-top: 2px; }
.btn-mini { background: var(--acc-soft); color: var(--acc); border-radius: 8px; padding: 6px 12px; font-size: 12.5px; font-weight: 500; transition: all .15s; }
.btn-mini:hover { background: var(--acc); color: #fff; }
.off-tag, .bot-tag { font-style: normal; font-size: 10px; padding: 1px 5px; border-radius: 4px; vertical-align: 2px; }
.off-tag { background: var(--acc); color: #fff; }
.bot-tag { background: var(--gold2); color: #6b4b00; }

/* ================= 占位 ================= */
.placeholder { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--txt2); gap: 8px; }
.ph-ico { font-size: 56px; opacity: .5; filter: grayscale(.3); }
.placeholder .sub { font-size: 12px; }

/* ================= 聊天窗口 ================= */
.chatwin { display: flex; flex-direction: column; height: 100%; min-width: 0; }
.chat-head { display: flex; align-items: center; gap: 10px; padding: 12px 18px; background: var(--panel); border-bottom: 1px solid var(--line); flex-shrink: 0; }
.ch-mid { flex: 1; min-width: 0; }
.ch-mid b { font-size: 16px; font-weight: 600; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-mid span { font-size: 11.5px; color: var(--txt2); }
.back-btn { display: none; width: 32px; height: 32px; border-radius: 8px; font-size: 22px; color: var(--txt2); line-height: 1; }
.chat-body { flex: 1; overflow-y: auto; padding: 18px 6%; display: flex; flex-direction: column; gap: 14px; background: var(--bg); }
.chat-empty { text-align: center; color: var(--txt2); margin: auto; font-size: 13px; }
.sys-line { text-align: center; color: var(--txt2); font-size: 11.5px; background: color-mix(in srgb, var(--panel2) 80%, transparent); border-radius: 20px; padding: 4px 14px; align-self: center; max-width: 80%; }
.msg-row { display: flex; gap: 10px; align-items: flex-start; max-width: 78%; }
.msg-row.me { align-self: flex-end; flex-direction: row; }
.msg-row.me .avatar-box { order: 2; }
.msg-row.me .msg-body { order: 1; }
.msg-body { display: flex; flex-direction: column; min-width: 0; }
.bubble { background: var(--bubble); padding: 10px 14px; border-radius: 4px 14px 14px 14px; font-size: 14.5px; line-height: 1.55; word-break: break-word; box-shadow: 0 1px 3px rgba(30, 20, 60, .06); }
.msg-row.me .bubble { background: var(--bubble-me); color: #fff; border-radius: 14px 4px 14px 14px; }
.bubble.big-emoji { font-size: 34px; background: transparent !important; box-shadow: none; padding: 2px; color: initial; }
.bubble-img { padding: 4px; }
.msg-img { max-width: 240px; max-height: 320px; border-radius: 10px; display: block; cursor: zoom-in; }
.msg-status { font-size: 10px; color: var(--txt2); align-self: flex-end; margin-bottom: 2px; margin-right: 2px; order: 0; }
.msg-status.read { color: var(--acc); }
.recall-btn { font-size: 10px; color: var(--txt2); align-self: center; margin-right: 6px; padding: 3px 6px; border-radius: 6px; visibility: hidden; }
.msg-row:hover .recall-btn { visibility: visible; }
.recall-btn:hover { background: var(--panel); color: var(--danger); }
@media (hover: none) { .recall-btn { visibility: visible; opacity: .6; } }

/* ---- 灵签卡片（聊天内） ---- */
.fortune-card { background: linear-gradient(145deg, #3d2f7a, #6c5ce7 60%, #8e7bff); color: #fff; border-radius: 14px; padding: 14px 16px; min-width: 230px; max-width: 300px; box-shadow: 0 6px 20px rgba(80, 60, 180, .35); }
.fc-head { display: flex; justify-content: space-between; font-size: 12px; opacity: .9; margin-bottom: 8px; }
.fc-poem { font-size: 14px; line-height: 1.9; letter-spacing: 1px; text-align: center; font-family: "STKaiti", "KaiTi", serif; }
.fc-jie { font-size: 11.5px; opacity: .85; margin-top: 8px; text-align: center; }
.fc-stars { display: flex; gap: 14px; justify-content: center; margin-top: 8px; font-size: 11px; }
.fc-stars em { font-style: normal; color: var(--gold2); }
.fc-stars i { font-style: normal; opacity: .4; }
.fc-lucky { text-align: center; font-size: 10.5px; opacity: .8; margin-top: 8px; border-top: 1px solid rgba(255, 255, 255, .2); padding-top: 8px; }

/* ---- 红包卡片 ---- */
.rp-card { display: flex; align-items: center; gap: 10px; background: linear-gradient(135deg, #e8543e, #d93636); color: #fff; border-radius: 12px; padding: 12px 16px; min-width: 220px; cursor: pointer; box-shadow: 0 5px 16px rgba(217, 54, 54, .35); transition: transform .15s; }
.rp-card:hover { transform: translateY(-1px) scale(1.01); }
.rp-card.opened { cursor: default; opacity: .82; box-shadow: none; }
.rp-ico { font-size: 30px; }
.rp-mid b { display: block; font-size: 14px; }
.rp-mid span { font-size: 11px; opacity: .85; }
.rp-amt { margin-left: auto; font-weight: 700; color: var(--gold2); }

/* ---- 输入区 ---- */
.composer { display: flex; align-items: flex-end; gap: 8px; padding: 12px 16px; background: var(--panel); border-top: 1px solid var(--line); position: relative; flex-shrink: 0; }
.composer textarea { flex: 1; max-height: 120px; min-height: 42px; border-radius: 12px; padding: 10px 14px; line-height: 1.5; }
.btn-send { background: var(--acc); color: #fff; border-radius: 12px; padding: 10px 18px; font-size: 14px; font-weight: 500; transition: all .15s; flex-shrink: 0; }
.btn-send:hover { background: #5a4bd1; }
.rp-btn:hover { color: #d93636; }
.emoji-pop { position: absolute; bottom: 66px; left: 12px; width: 320px; max-height: 240px; overflow-y: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 10px; display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; z-index: 30; }
.emoji-pop button { font-size: 21px; padding: 5px 0; border-radius: 8px; }
.emoji-pop button:hover { background: var(--acc-soft); }

/* ================= 用户资料 ================= */
.user-profile { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; background: var(--bg); }
.up-top { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 30px; }
.up-top h2 { font-size: 22px; font-weight: 600; }
.up-sub { color: var(--txt2); font-size: 13px; }
.up-bio { color: var(--txt2); font-size: 13px; margin-top: 6px; }
.up-acts { margin-top: 16px; }

/* ================= 灵圈 ================= */
.moments-wrap { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.moments-scroll { flex: 1; overflow-y: auto; background: var(--bg); }
.moments-cover { position: relative; height: 180px; background: linear-gradient(140deg, #241d45 0%, #4a3a8f 45%, #8e7bff 100%); overflow: hidden; }
.mc-stars { position: absolute; inset: 0; background-image: radial-gradient(1.5px 1.5px at 20px 30px, #fff8 50%, transparent 51%), radial-gradient(1px 1px at 90px 130px, #fff6 50%, transparent 51%), radial-gradient(2px 2px at 160px 60px, #ffe9a8aa 50%, transparent 51%), radial-gradient(1px 1px at 240px 150px, #fff5 50%, transparent 51%), radial-gradient(1.5px 1.5px at 320px 40px, #fff7 50%, transparent 51%), radial-gradient(1px 1px at 400px 110px, #ffd9d966 50%, transparent 51%), radial-gradient(2px 2px at 460px 70px, #fff9 50%, transparent 51%); background-size: 500px 180px; }
.mc-me { position: absolute; right: 24px; bottom: -28px; display: flex; align-items: center; gap: 12px; text-shadow: 0 1px 6px rgba(0, 0, 0, .4); }
.mc-me b { color: #fff; font-size: 16px; }
.moment-composer { background: var(--panel); margin: 44px 16px 10px; border-radius: 14px; padding: 14px; box-shadow: var(--shadow); }
.moment-composer textarea { min-height: 70px; background: transparent; border: none; padding: 4px; }
.mc-imgs { display: flex; gap: 8px; margin: 8px 0; flex-wrap: wrap; }
.mc-thumb { position: relative; width: 64px; height: 64px; border-radius: 8px; overflow: hidden; }
.mc-thumb img { width: 100%; height: 100%; object-fit: cover; }
.mc-thumb button { position: absolute; top: 2px; right: 2px; background: rgba(0, 0, 0, .55); color: #fff; font-size: 10px; width: 18px; height: 18px; border-radius: 50%; }
.mc-acts { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--line); padding-top: 10px; }
.moment-card { display: flex; gap: 12px; background: var(--panel); margin: 10px 16px; border-radius: 14px; padding: 16px; box-shadow: var(--shadow); }
.mo-main { flex: 1; min-width: 0; }
.mo-name { color: #5a6dc2; font-size: 14.5px; font-weight: 600; }
.mo-text { margin-top: 6px; font-size: 14.5px; line-height: 1.6; word-break: break-word; }
.mo-imgs { display: grid; gap: 6px; margin-top: 10px; }
.mo-imgs.n1 { grid-template-columns: minmax(0, 240px); }
.mo-imgs.n2 { grid-template-columns: repeat(2, minmax(0, 180px)); }
.mo-imgs.n3 { grid-template-columns: repeat(3, minmax(0, 130px)); }
.mo-imgs img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; cursor: zoom-in; }
.mo-time { color: var(--txt2); font-size: 11px; margin-top: 10px; }
.mo-acts { display: flex; gap: 18px; margin-top: 8px; }
.mo-acts button { color: var(--txt2); font-size: 12.5px; padding: 4px 8px; border-radius: 8px; }
.mo-acts button:hover { background: var(--panel2); }
.mo-acts button.liked { color: #fa5151; }
.mo-cmts { background: var(--panel2); border-radius: 10px; padding: 10px 12px; margin-top: 10px; font-size: 13px; line-height: 1.8; }
.mo-cmt b { color: #5a6dc2; font-weight: 500; }
.mo-cmt-input { display: flex; gap: 8px; margin-top: 10px; }
.mo-cmt-input input { flex: 1; }

/* ================= 我的 ================= */
.me-wrap { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.me-scroll { flex: 1; overflow-y: auto; padding: 16px; }
.me-card { background: var(--panel); border-radius: 16px; padding: 18px; margin-bottom: 14px; box-shadow: var(--shadow); }
.profile-card { display: flex; align-items: center; gap: 16px; }
.pc-mid { flex: 1; min-width: 0; }
.pc-mid h2 { font-size: 20px; font-weight: 600; }
.pc-mid p { color: var(--txt2); font-size: 12.5px; margin-top: 5px; }
.pc-bio { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.copy-btn { color: var(--acc); font-size: 11.5px; margin-left: 6px; }
.vip-tag { font-style: normal; font-size: 10px; background: linear-gradient(135deg, #f5b940, #d97706); color: #fff; border-radius: 5px; padding: 2px 6px; vertical-align: 3px; }

/* 灵签大卡 */
.fortune-card-big { background: linear-gradient(145deg, #2c2358, #4a3a8f 55%, #7a68d9); color: #fff; position: relative; overflow: hidden; }
.fortune-cta { display: flex; flex-direction: column; align-items: center; padding: 10px 0 14px; gap: 10px; }
.fc-shake { font-size: 44px; }
.fortune-card-big.shaking .fc-shake { animation: shake .35s infinite; }
@keyframes shake { 0%,100% { transform: rotate(-12deg); } 50% { transform: rotate(12deg); } }
.fcard-head { display: flex; justify-content: space-between; margin-bottom: 12px; font-size: 12.5px; opacity: .9; }
.fcard-lv { background: rgba(255, 255, 255, .16); padding: 2px 10px; border-radius: 20px; }
.fcard-poem { font-family: "STKaiti", "KaiTi", serif; font-size: 17px; line-height: 2; text-align: center; letter-spacing: 2px; }
.fcard-jie { text-align: center; font-size: 12px; opacity: .85; margin-top: 10px; }
.fcard-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 14px; text-align: center; }
.fcard-grid span { display: block; font-size: 10.5px; opacity: .75; }
.fcard-grid em { font-style: normal; color: var(--gold2); font-size: 12px; }
.fcard-grid i { font-style: normal; opacity: .35; }
.fcard-lucky { text-align: center; font-size: 10.5px; opacity: .8; margin-top: 14px; border-top: 1px dashed rgba(255, 255, 255, .25); padding-top: 12px; }
.fc-share { text-align: center; margin-top: 12px; }
.fc-share .btn-mini { background: rgba(255, 255, 255, .18); color: #fff; }

/* 钱包 */
.wc-row { display: flex; align-items: center; gap: 14px; }
.wc-coin { font-size: 30px; }
.wc-num { font-size: 30px; font-weight: 700; color: var(--gold); margin-right: 6px; }
.wc-unit { color: var(--txt2); font-size: 13px; }
.wc-row .btn-gold { margin-left: auto; }
.wc-note { color: var(--txt2); font-size: 11px; margin-top: 12px; line-height: 1.6; }

/* 会员 */
.vip-card { background: linear-gradient(135deg, #241d45, #4a3a8f 60%, #7a68d9); color: #fff; }
.vip-row { display: flex; align-items: center; gap: 14px; }
.vip-badge { width: 56px; height: 56px; border-radius: 16px; background: linear-gradient(135deg, #f5b940, #d97706); display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 900; color: #241a05; box-shadow: 0 6px 18px rgba(245, 185, 64, .4); flex-shrink: 0; }
.vip-mid { flex: 1; min-width: 0; }
.vip-mid b { font-size: 15.5px; }
.vip-mid span { display: block; font-size: 11.5px; opacity: .8; margin: 3px 0 7px; }
.vip-bar { height: 7px; border-radius: 4px; background: rgba(255, 255, 255, .2); overflow: hidden; }
.vip-bar i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, #f5b940, #ffe9ad); transition: width .5s; }
.vip-max { font-size: 12px; opacity: .6; font-weight: 800; }
.coin-tabs { display: flex; gap: 8px; margin-bottom: 4px; }
.coin-tabs button { flex: 1; padding: 10px 8px; border-radius: 10px; border: 1.5px solid var(--line); color: var(--txt2); font-size: 13.5px; font-weight: 600; display: flex; align-items: center; justify-content: center; gap: 6px; transition: all .15s; }
.coin-tabs button.on { border-color: var(--gold); color: var(--gold); background: rgba(245, 185, 64, .1); }
.soon-tag { font-style: normal; font-size: 9px; background: var(--txt3); color: var(--panel); border-radius: 4px; padding: 1px 4px; }
.vip-banner { background: linear-gradient(135deg, #2b2410, #6b5518 60%, #a97e1f); color: #fff; display: flex; align-items: center; justify-content: space-between; cursor: pointer; transition: transform .15s; }
.tf-card { display: flex; align-items: center; gap: 10px; background: linear-gradient(135deg, #3f7ad6, #2b5cb8); color: #fff; border-radius: 12px; padding: 12px 16px; min-width: 220px; cursor: pointer; box-shadow: 0 5px 16px rgba(59, 108, 199, .35); }
.tf-card .rp-ico { font-size: 30px; }
.tf-card .rp-amt { margin-left: auto; font-weight: 700; color: #ffe9ad; }
.tf-btn:hover { color: #2b5cb8; }
.wc-btns { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.btn-line { border: 1.5px solid var(--gold); color: var(--gold); background: transparent; border-radius: 10px; padding: 9px 18px; font-size: 14px; font-weight: 700; transition: all .15s; }
.btn-line:hover { background: var(--gold); color: #fff; }
.rc-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin: 8px 0 4px; }
.rc-item { border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 4px; text-align: center; transition: all .15s; }
.rc-item b { display: block; font-size: 17px; color: var(--gold); font-weight: 800; }
.rc-item span { font-size: 10.5px; color: var(--txt2); }
.rc-item:hover { border-color: var(--gold); background: rgba(245, 185, 64, .08); transform: translateY(-2px); }
@media (max-width: 480px) { .rc-grid { grid-template-columns: repeat(3, 1fr); } }
.vip-banner:hover { transform: translateY(-1px); }
.vb-l b { font-size: 16px; }
.vb-l span { display: block; font-size: 11.5px; opacity: .8; margin-top: 4px; }
.vb-go { font-size: 13px; opacity: .9; }
.btn-gold { background: linear-gradient(135deg, #f5b940, #e0971a); color: #fff; border-radius: 10px; padding: 9px 20px; font-size: 14px; font-weight: 600; box-shadow: 0 4px 12px rgba(230, 160, 30, .35); transition: all .15s; }
.btn-gold:hover { filter: brightness(1.06); }
.btn-gold:disabled { filter: grayscale(.6); cursor: not-allowed; }

.menu-card { padding: 4px 0; }
.menu-item { display: flex; align-items: center; gap: 14px; padding: 14px 18px; cursor: pointer; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.menu-item:last-child { border-bottom: none; }
.menu-item:hover { background: var(--panel2); }
.mi-ico { width: 24px; text-align: center; }
.mi-right { margin-left: auto; color: var(--txt2); }
.arrow { font-size: 18px; }
.switch { width: 44px; height: 25px; background: #ccc; border-radius: 13px; position: relative; transition: background .18s; }
.switch i { position: absolute; top: 2.5px; left: 3px; width: 20px; height: 20px; background: #fff; border-radius: 50%; transition: left .18s; }
.switch.on { background: var(--acc); }
.switch.on i { left: 21px; }
.me-foot { text-align: center; color: var(--txt2); font-size: 11px; padding: 10px 0 24px; line-height: 1.9; }

/* 会员页 */
.pm-head { display: flex; align-items: center; gap: 10px; font-size: 17px; margin-bottom: 16px; }
.pm-hero { text-align: center; padding: 10px 0 22px; }
.pm-star { display: inline-block; font-size: 46px; color: var(--gold2); filter: drop-shadow(0 0 14px rgba(245, 185, 64, .6)); }
.pm-hero h2 { font-size: 19px; margin-top: 10px; }
.pm-hero p { color: var(--txt2); font-size: 12.5px; margin-top: 6px; }
.plan-card { display: flex; align-items: center; justify-content: space-between; background: var(--panel); border: 2px solid var(--line); border-radius: 14px; padding: 16px 18px; margin-bottom: 12px; cursor: pointer; position: relative; transition: all .15s; }
.plan-card:hover { border-color: var(--gold); transform: translateY(-1px); }
.plan-card.hot { border-color: var(--gold2); background: linear-gradient(135deg, #fffdf5, #fff8e3); }
body.dark .plan-card.hot { background: linear-gradient(135deg, #2c2612, #38300f); }
.plan-hot { position: absolute; top: -9px; right: 14px; background: linear-gradient(135deg, #f5b940, #e0971a); color: #fff; font-size: 10px; padding: 2px 8px; border-radius: 10px; }
.plan-l b { font-size: 16px; display: block; }
.plan-l span { font-size: 11.5px; color: var(--txt2); }
.plan-r { font-size: 18px; font-weight: 700; color: var(--gold); }
.pm-benefits { background: var(--panel); border-radius: 14px; padding: 18px; font-size: 13.5px; line-height: 2.1; }
.pm-benefits b { display: block; margin-bottom: 6px; font-size: 15px; }

/* ================= 登录 ================= */
.auth-wrap { height: 100dvh; display: flex; align-items: center; justify-content: center; background: linear-gradient(160deg, #1b1630 0%, #3c2f7c 50%, #6c5ce7 100%); position: relative; overflow: hidden; padding: 20px; }
.starfield { position: absolute; inset: -50%; background-image: radial-gradient(1.5px 1.5px at 30px 40px, #ffffffaa 50%, transparent 51%), radial-gradient(1px 1px at 130px 90px, #ffffff88 50%, transparent 51%), radial-gradient(2px 2px at 220px 160px, #ffe9a899 50%, transparent 51%), radial-gradient(1px 1px at 300px 60px, #ffffff77 50%, transparent 51%), radial-gradient(1.5px 1.5px at 400px 200px, #d9c7ff88 50%, transparent 51%), radial-gradient(1px 1px at 500px 120px, #ffffff66 50%, transparent 51%), radial-gradient(2px 2px at 560px 30px, #ffffffaa 50%, transparent 51%), radial-gradient(1px 1px at 620px 240px, #ffd9d955 50%, transparent 51%); background-size: 640px 300px; animation: drift 90s linear infinite; }
@keyframes drift { to { transform: translate3d(-320px, -150px, 0); } }
.auth-card { position: relative; width: 400px; max-width: 100%; background: var(--panel); border-radius: 22px; padding: 36px 34px 26px; box-shadow: 0 24px 80px rgba(10, 5, 40, .5); animation: rise .5s ease; }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } }
.auth-brand { text-align: center; margin-bottom: 24px; }
.auth-logo { width: 68px; height: 68px; margin: 0 auto 12px; border-radius: 20px; background: linear-gradient(135deg, #6c5ce7, #8e7bff); display: flex; align-items: center; justify-content: center; font-size: 34px; box-shadow: 0 10px 30px rgba(108, 92, 231, .5); }
.auth-brand h1 { font-size: 26px; letter-spacing: 8px; text-indent: 8px; }
.auth-brand p { color: var(--txt2); font-size: 12.5px; margin-top: 6px; }
.auth-tabs { display: flex; background: var(--panel2); border-radius: 12px; padding: 4px; margin-bottom: 22px; }
.auth-tabs button { flex: 1; padding: 9px; border-radius: 9px; font-size: 14px; color: var(--txt2); transition: all .15s; }
.auth-tabs button.on { background: var(--panel); color: var(--txt); font-weight: 600; box-shadow: 0 2px 8px rgba(30, 20, 60, .1); }
.auth-form label { display: block; font-size: 12.5px; color: var(--txt2); margin: 12px 0 6px; }
.btn-primary { width: 100%; background: linear-gradient(135deg, #6c5ce7, #8e7bff); color: #fff; border-radius: 12px; padding: 12px; font-size: 15px; font-weight: 600; margin-top: 22px; box-shadow: 0 6px 20px rgba(108, 92, 231, .4); transition: all .15s; }
.btn-primary:hover { filter: brightness(1.07); }
.btn-primary:disabled { filter: grayscale(.5); cursor: wait; }
.btn-sso { width: 100%; border: 1.5px dashed var(--acc); color: var(--acc); border-radius: 12px; padding: 11px; font-size: 14px; margin-top: 12px; transition: all .15s; }
.btn-sso:hover { background: var(--acc-soft); }
.auth-foot { text-align: center; color: var(--txt2); font-size: 11px; margin-top: 20px; line-height: 1.7; }
.auth-foot .warn { color: #c07a2a; }

/* ================= 弹窗 / 提示 / 灯箱 ================= */
.modal { position: fixed; inset: 0; background: rgba(15, 10, 35, .55); display: flex; align-items: center; justify-content: center; z-index: 100; opacity: 0; transition: opacity .18s; padding: 20px; backdrop-filter: blur(3px); }
.modal.show { opacity: 1; }
.modal-box { width: 420px; max-width: 100%; max-height: 82vh; display: flex; flex-direction: column; background: var(--panel); border-radius: 18px; box-shadow: 0 24px 70px rgba(5, 0, 30, .5); transform: translateY(14px) scale(.97); transition: transform .18s; }
.modal.show .modal-box { transform: none; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line); font-weight: 600; font-size: 15.5px; }
.modal-x { color: var(--txt2); font-size: 15px; width: 30px; height: 30px; border-radius: 8px; }
.modal-x:hover { background: var(--panel2); }
.modal-body { padding: 18px 20px 22px; overflow-y: auto; }
.modal-body label { display: block; font-size: 12.5px; color: var(--txt2); margin: 12px 0 6px; }
.modal-body label:first-child { margin-top: 0; }
.hint { color: var(--txt2); font-size: 11.5px; margin-top: 10px; line-height: 1.7; }
.w100 { width: 100%; margin-top: 18px; }
.gp-list { display: flex; flex-wrap: wrap; gap: 8px; max-height: 220px; overflow-y: auto; margin-top: 6px; }
.gp-list.col { flex-direction: column; max-height: 300px; }
.gp-item { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; font-size: 14px; min-width: 140px; }
.gp-item:hover { background: var(--panel2); }
.gp-item input { width: auto; }
.rp-form .hint b, .af-form .hint b { color: var(--acc); }
.rp-result { text-align: center; padding: 10px 0; }
.rp-big { font-size: 64px; animation: pop .4s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes pop { from { transform: scale(.3); } }
.rp-result h2 { font-size: 24px; color: var(--gold); margin-top: 8px; }
.rp-result p { color: var(--txt2); font-size: 12.5px; margin-top: 8px; line-height: 1.8; }
.ep-emojis { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; }
.ep-emojis button { font-size: 20px; padding: 6px 0; border-radius: 10px; border: 2px solid transparent; }
.ep-emojis button.on { border-color: var(--acc); background: var(--acc-soft); }
.ep-colors { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.ep-colors button { width: 30px; height: 30px; border-radius: 50%; border: 3px solid transparent; }
.ep-colors button.on { border-color: var(--txt); }
.about { text-align: center; line-height: 2; font-size: 13.5px; }
.about b { font-size: 16px; }

.toast { position: fixed; left: 50%; bottom: 12%; transform: translateX(-50%); background: rgba(30, 25, 50, .92); color: #fff; padding: 11px 22px; border-radius: 12px; font-size: 13.5px; z-index: 200; animation: toastIn .25s ease; box-shadow: 0 10px 30px rgba(0, 0, 0, .3); max-width: 80vw; text-align: center; }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 10px); } }
.toast.out { opacity: 0; transition: opacity .3s; }

.lightbox { position: fixed; inset: 0; background: rgba(0, 0, 0, .88); z-index: 150; display: flex; align-items: center; justify-content: center; cursor: zoom-out; }
.lightbox img { max-width: 92vw; max-height: 92vh; border-radius: 8px; }

/* ================= 移动端适配 ================= */
@media (max-width: 768px) {
  .shell, .shell[data-view="moments"], .shell[data-view="me"] { grid-template-columns: 1fr; grid-template-rows: 1fr; padding-bottom: 58px; }
  .rail { position: fixed; bottom: 0; left: 0; right: 0; flex-direction: row; justify-content: space-around; padding: 5px 8px calc(5px + env(safe-area-inset-bottom)); height: 58px; }
  .rail-logo, .rail-me { display: none; }
  .rail-btn { flex: 1; height: 100%; }
  .rail-btn span { font-size: 10px; }
  .main-pane { display: flex; border-right: none; }
  .content-pane { display: none; }
  .shell.chat-open .main-pane { display: none; }
  .shell.chat-open .content-pane { display: flex; }
  .shell.chat-open, .shell[data-view="moments"], .shell[data-view="me"] { padding-bottom: 58px; }
  .shell:not(.chat-open)[data-view="moments"] .main-pane, .shell:not(.chat-open)[data-view="me"] .main-pane { display: none; }
  .shell:not(.chat-open)[data-view="moments"] .content-pane, .shell:not(.chat-open)[data-view="me"] .content-pane { display: flex; }
  .back-btn { display: block; }
  .chat-body { padding: 14px 3%; }
  .msg-row { max-width: 88%; }
  .emoji-pop { width: calc(100vw - 40px); left: 12px; grid-template-columns: repeat(7, 1fr); }
  .mc-me { right: 16px; }
  .moment-composer { margin: 44px 12px 8px; }
  .moment-card { margin: 8px 12px; }
  .me-scroll { padding: 12px; }
  .pane-head { padding: 14px 16px; }
}

/* ---- 语音消息 v1.2 ---- */
.mic-btn:hover { color: #e05555; }
.rec-bar { flex: 1; display: flex; align-items: center; gap: 12px; padding: 6px 10px; border-radius: 12px; background: rgba(224,85,85,.1); }
.rec-dot { width: 10px; height: 10px; border-radius: 50%; background: #e05555; animation: recPulse 1s ease-in-out infinite; flex-shrink: 0; }
@keyframes recPulse { 0%,100% { opacity: .35; transform: scale(.85); } 50% { opacity: 1; transform: scale(1.15); } }
.rec-bar b { font-size: 15px; color: #e05555; font-variant-numeric: tabular-nums; min-width: 30px; }
.rec-bar span { font-size: 12.5px; color: var(--txt2); flex: 1; }
.rec-send { padding: 8px 16px; font-size: 13px; }
.voice-bubble { display: flex; align-items: center; gap: 8px; padding: 8px 10px; }
.voice-bubble audio { width: 210px; max-width: 56vw; height: 36px; display: block; }

/* ---- 站长后台 v1.3 ---- */
.ad-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 14px; }
.ad-card { background: var(--panel); border: 1px solid var(--panel-b); border-radius: 14px; padding: 14px 10px; text-align: center; box-shadow: var(--card-shadow); }
.ad-card .ad-ico { font-size: 20px; }
.ad-card b { display: block; font-size: 16px; color: var(--gold); margin: 4px 0 2px; word-break: break-all; }
.ad-card .ad-lb { font-size: 11px; color: var(--txt2); }
.ad-sec { display: block; font-size: 14.5px; margin-bottom: 10px; }
.ad-table { font-size: 12.5px; }
.ad-tr { display: grid; grid-template-columns: 1.2fr 1.2fr .5fr .7fr .7fr auto; gap: 6px; align-items: center; padding: 8px 4px; border-bottom: 1px solid var(--line); }
.ad-tr.ad-th { color: var(--txt3); font-size: 11px; }
.ad-on { color: var(--ok); }
.ad-ban { color: var(--danger); }
.ad-gold { color: var(--gold); font-weight: 700; }
.ad-loading { text-align: center; color: var(--txt2); padding: 60px 0; }
@media (max-width: 640px) { .ad-grid { grid-template-columns: repeat(2, 1fr); } .ad-tr { grid-template-columns: 1fr 1fr .5fr .6fr .6fr auto; font-size: 11.5px; } }

/* ---- 会话管理 v1.4 ---- */
.chat-menu { display: flex; flex-direction: column; gap: 8px; }
.chat-menu button { padding: 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel2); font-size: 14.5px; text-align: left; transition: all .15s; }
.chat-menu button:hover { border-color: var(--acc); color: var(--acc); }
.chat-menu button.danger { color: var(--danger); }
.chat-menu button.danger:hover { border-color: var(--danger); background: rgba(224, 85, 85, .08); }
.mini-badge.dot { min-width: 10px; width: 10px; height: 10px; padding: 0; border-radius: 50%; background: #b8b3cc; }

/* ============ v15 引用回复/拍一拍/贴纸/群管理 ============ */
.composer { flex-wrap: wrap; }
.quote-bar { width: 100%; display: flex; align-items: center; gap: 6px; padding: 7px 12px; background: rgba(142,123,255,.12); border-radius: 8px; font-size: 12px; color: var(--txt2); overflow: hidden; }
.quote-bar b { color: var(--acc, #8e7bff); flex-shrink: 0; }
.quote-bar span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; }
.quote-x { margin-left: auto; border: 0; background: transparent; color: var(--txt2); cursor: pointer; font-size: 13px; padding: 2px 6px; border-radius: 6px; }
.quote-x:hover { background: rgba(255,255,255,.08); color: #fff; }
.quote-block { border-left: 3px solid var(--acc, #8e7bff); background: rgba(142,123,255,.10); border-radius: 6px; padding: 6px 8px; margin-bottom: 5px; font-size: 12px; cursor: pointer; max-width: 420px; }
.quote-block b { color: var(--acc, #8e7bff); display: block; margin-bottom: 2px; }
.quote-block span { color: var(--txt2); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.quote-block:hover { background: rgba(142,123,255,.18); }
.bubble.quote-only { padding: 4px 8px; font-size: 12px; }
.bubble-txt { word-break: break-word; }
.sticker-bubble { background: transparent !important; font-size: 64px; line-height: 1.15; padding: 2px 4px !important; }
.mention { color: var(--acc, #8e7bff); font-weight: 600; }
.mute-bar { width: 100%; text-align: center; padding: 10px; color: #e07a5f; font-size: 13px; background: rgba(224,122,95,.1); border-radius: 8px; }
.msg-row.flash .msg-body { animation: qflash 1.2s ease; }
@keyframes qflash { 0%,100% { background: transparent; } 30% { background: rgba(142,123,255,.25); border-radius: 10px; } }
.stk-panel { display: flex; flex-direction: column; gap: 14px; }
.stk-pack { border: 1px solid var(--line, rgba(255,255,255,.08)); border-radius: 12px; padding: 10px 12px; }
.stk-pack.own { border-color: rgba(142,123,255,.45); }
.stk-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.stk-head b { font-size: 14px; }
.stk-head span { color: var(--txt2); font-size: 12px; flex: 1; }
.stk-owned { color: #00b894; font-style: normal; font-size: 12px; }
.stk-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; }
.stk-item { font-size: 26px; padding: 6px 0; background: transparent; border: 0; border-radius: 8px; cursor: pointer; transition: transform .12s; }
.stk-item:hover:not(:disabled) { transform: scale(1.18); background: rgba(142,123,255,.12); }
.stk-item:disabled { opacity: .35; cursor: not-allowed; filter: grayscale(.8); }
.ga-panel { display: flex; flex-direction: column; gap: 14px; }
.ga-sec b { display: block; margin-bottom: 8px; font-size: 14px; }
.ga-ann { background: rgba(142,123,255,.08); border-left: 3px solid var(--acc, #8e7bff); padding: 8px 10px; border-radius: 6px; font-size: 13px; line-height: 1.6; }
.ga-ann.none { color: var(--txt2); }
.ga-ann-edit { display: flex; gap: 6px; margin-top: 8px; }
.ga-ann-edit input { flex: 1; }
.ga-row { display: flex; align-items: center; gap: 10px; padding: 8px 4px; border-bottom: 1px solid var(--line, rgba(255,255,255,.06)); }
.ga-row:last-child { border-bottom: 0; }
.ga-mid { flex: 1; min-width: 0; }
.ga-mid b { font-size: 14px; display: block; }
.ga-mid span { color: var(--txt2); font-size: 11.5px; }
.ga-acts { display: flex; gap: 4px; flex-shrink: 0; }
.own-tag { font-style: normal; font-size: 10px; color: #fdcb6e; background: rgba(253,203,110,.15); border-radius: 4px; padding: 1px 4px; }
.btn-mini.danger { color: #ff7675; border-color: rgba(255,118,117,.4); }
@media (max-width: 720px) { .sticker-bubble { font-size: 56px; } }

/* ============ v17 WebRTC通话 + 撤回重编辑 ============ */
.call-ovl { position: fixed; inset: 0; z-index: 400; background: rgba(10, 8, 26, .92); backdrop-filter: blur(14px); display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity .2s; }
.call-ovl.show { opacity: 1; }
.call-vid-box { position: relative; width: min(560px, 92vw); border-radius: 20px; padding: 26px 22px; text-align: center; background: linear-gradient(160deg, rgba(108, 92, 231, .25), rgba(30, 26, 60, .9)); border: 1px solid rgba(142, 123, 255, .3); box-shadow: 0 24px 80px rgba(0, 0, 0, .5); }
.call-vid-box video#call-remote { width: 100%; border-radius: 14px; background: #0a081a; aspect-ratio: 4/3; object-fit: cover; }
.call-vid-box video#call-local { position: absolute; right: 14px; top: 14px; width: 120px; border-radius: 10px; border: 1px solid rgba(255,255,255,.25); background: #0a081a; z-index: 2; }
.call-user { margin-top: 16px; font-size: 20px; font-weight: 600; color: #fff; }
.call-status { margin-top: 6px; font-size: 13px; color: rgba(255, 255, 255, .65); letter-spacing: .5px; font-variant-numeric: tabular-nums; }
.call-acts { margin-top: 22px; display: flex; gap: 14px; justify-content: center; }
.call-btn { min-width: 108px; padding: 11px 18px; border-radius: 999px; border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.08); color: #fff; font-size: 14px; cursor: pointer; transition: all .15s; }
.call-btn:hover { background: rgba(255,255,255,.16); }
.call-btn.accept { background: #00b894; border-color: #00b894; }
.call-btn.accept:hover { background: #00a381; }
.call-btn.reject { background: #d63031; border-color: #d63031; }
.sys-line .recall-btn { visibility: visible; margin-left: 8px; font-size: 11px; color: var(--acc, #8e7bff); }
.sys-line .recall-btn:hover { text-decoration: underline; }
@media (max-width: 720px) { .call-vid-box video#call-local { width: 88px; } .call-btn { min-width: 92px; padding: 10px 12px; } }

/* 中秋限定贴纸包 */
.stk-pack.limited { border-color: rgba(253, 203, 110, .55); background: linear-gradient(135deg, rgba(253,203,110,.07), transparent); }
.stk-lim-tag { font-style: normal; font-size: 10px; color: #b8860b; background: rgba(253,203,110,.2); border-radius: 4px; padding: 1px 5px; margin-left: 4px; vertical-align: middle; }
.stk-pack.limited .btn-gold { background: linear-gradient(135deg, #f5b942, #e0930d); }

/* 消息搜索 */
.pane-head.search-head { gap: 8px; }
#search-input { flex: 1; min-width: 0; background: var(--panel2, rgba(255,255,255,.05)); border: 1px solid var(--line, rgba(255,255,255,.1)); border-radius: 8px; padding: 8px 10px; color: var(--txt, #eee); font-size: 13px; outline: none; }
#search-input:focus { border-color: var(--acc, #8e7bff); }
.search-group { margin-bottom: 10px; }
.sg-head { display: flex; align-items: center; gap: 8px; padding: 8px 14px; cursor: pointer; font-size: 13.5px; }
.sg-head:hover { background: var(--panel2, rgba(255,255,255,.04)); }
.sg-item { padding: 7px 14px 7px 40px; cursor: pointer; font-size: 12.5px; color: var(--txt2, #aaa); display: flex; gap: 6px; align-items: baseline; border-left: 2px solid transparent; }
.sg-item:hover { background: var(--acc-soft, rgba(142,123,255,.08)); border-left-color: var(--acc, #8e7bff); }
.sg-item b { color: var(--txt, #eee); flex-shrink: 0; font-weight: 500; }
.sg-item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; }
.sg-item .kw { font-style: normal; color: var(--acc, #8e7bff); font-weight: 700; }
.sg-item time { font-size: 10.5px; color: var(--txt2, #888); flex-shrink: 0; }

/* 灵圈短视频 */
.mo-video { width: 100%; max-height: 380px; border-radius: 12px; background: #000; margin-top: 8px; display: block; }
.mc-thumb video { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }

/* E2EE 端到端加密 */
.e2ee-bubble { position: relative; }
.e2ee-badge { font-style: normal; font-size: 11px; opacity: .8; margin-right: 2px; }
.bubble.e2ee-bubble { border-left: 2px solid rgba(0, 184, 148, .5); }
