/* 机器助手 · 界面样式（参照微信布局与色值，FR-10.9；图标自绘） */

:root {
  --brand: #07C160;
  --brand-press: #06AD56;
  --bg: #EDEDED;
  --surface: #FFFFFF;
  --surface-2: #F7F7F7;
  --bar: #F7F7F7;
  --bubble-me: #95EC69;
  --bubble-me-text: #191919;
  --bubble-other: #FFFFFF;
  --text: #191919;
  --text-2: #7F7F7F;
  --text-3: #B2B2B2;
  --link: #576B95;
  --line: rgba(0, 0, 0, 0.1);
  --danger: #FA5151;
  --press: rgba(0, 0, 0, 0.05);
  --code-bg: rgba(0, 0, 0, 0.04);
  --mask: rgba(0, 0, 0, 0.5);
  --menu: #4C4C4C;
  --quote-bg: rgba(0, 0, 0, 0.05);
  --pin-bg: #F2F2F2;
  --mark: rgba(7, 193, 96, 0.25);
  --nav-h: 48px;
  --tab-h: 56px;
  --font: 16px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111111; --surface: #191919; --surface-2: #202020; --bar: #1E1E1E;
    --bubble-me: #3EB575; --bubble-me-text: #0D0D0D; --bubble-other: #2C2C2C;
    --text: #D5D5D5; --text-2: #8A8A8A; --text-3: #5A5A5A; --link: #7D90A9;
    --line: rgba(255, 255, 255, 0.08); --press: rgba(255, 255, 255, 0.06); --code-bg: rgba(255, 255, 255, 0.05);
    --mask: rgba(0, 0, 0, 0.7); --menu: #3A3A3A; --quote-bg: rgba(255, 255, 255, 0.06); --pin-bg: #232323;
  }
}
:root[data-theme="dark"] {
  --bg: #111111; --surface: #191919; --surface-2: #202020; --bar: #1E1E1E;
  --bubble-me: #3EB575; --bubble-me-text: #0D0D0D; --bubble-other: #2C2C2C;
  --text: #D5D5D5; --text-2: #8A8A8A; --text-3: #5A5A5A; --link: #7D90A9;
  --line: rgba(255, 255, 255, 0.08); --press: rgba(255, 255, 255, 0.06); --code-bg: rgba(255, 255, 255, 0.05);
  --mask: rgba(0, 0, 0, 0.7); --menu: #3A3A3A; --quote-bg: rgba(255, 255, 255, 0.06); --pin-bg: #232323;
}
:root[data-font="large"] { --font: 18px; }

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
/* 隐藏滚动条（和手机一致），仍可滚动 */
* { scrollbar-width: none; }
*::-webkit-scrollbar { display: none; width: 0; height: 0; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg); color: var(--text);
  font: 16px/1.4 -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased; overflow: hidden;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
svg { display: block; flex: none; }
img { display: block; }
mark { background: none; color: var(--brand); }

#app {
  position: relative; height: 100%; max-width: 560px; margin: 0 auto;
  background: var(--bg); display: flex; flex-direction: column; overflow: hidden;
}
@media (min-width: 600px) { #app { box-shadow: 0 0 0 1px var(--line); } }

/* ---------- 导航栏 / Tab 栏 ---------- */
.nav {
  flex: none; height: calc(var(--nav-h) + env(safe-area-inset-top)); padding-top: env(safe-area-inset-top);
  background: var(--bg); display: flex; align-items: center; position: relative; z-index: 2;
}
.nav.line { border-bottom: 0.5px solid var(--line); }
.nav.clear { background: transparent; position: absolute; left: 0; right: 0; top: 0; color: #fff; }
.nav-title {
  position: absolute; left: 88px; right: 88px; text-align: center; font-size: 17px; font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none;
}
.nav-sub { display: block; font-size: 11px; font-weight: 400; color: var(--text-2); line-height: 1; margin-top: 2px; }
.nav-btn { min-width: 44px; height: var(--nav-h); padding: 0 10px; display: flex; align-items: center; gap: 4px; color: inherit; z-index: 1; }
.nav-btn:active { opacity: .5; }
.nav-right { margin-left: auto; display: flex; }
.nav-text { font-size: 16px; }
.nav-done {
  height: 32px; padding: 0 14px; border-radius: 4px; background: var(--brand); color: #fff; font-size: 14px; margin-right: 12px; z-index: 1;
}
.nav-done:disabled { background: var(--line); color: var(--text-3); }
.back-count {
  font-size: 15px; background: var(--press); border-radius: 12px; padding: 1px 8px; margin-left: -2px; color: var(--text);
}
.nav.clear .back-count { background: rgba(0,0,0,.25); color: #fff; }

.tabbar {
  flex: none; display: flex; height: calc(var(--tab-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  background: var(--bar); border-top: 0.5px solid var(--line);
}
.tab { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 10px; position: relative; }
.tab.active { color: var(--brand); }
.tab .badge { position: absolute; top: 4px; left: calc(50% + 6px); }
.tab .dot-badge { position: absolute; top: 6px; left: calc(50% + 10px); }

.page { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; position: relative; }
.page.white { background: var(--surface); }

/* ---------- 列表 ---------- */
.list { background: var(--surface); }
.list-title { padding: 16px 16px 6px; font-size: 13px; color: var(--text-2); }
.cell {
  display: flex; align-items: center; gap: 12px; padding: 0 16px; min-height: 56px; position: relative;
  width: 100%; text-align: left; background: var(--surface); cursor: pointer;
}
.cell:active, .cell.pressed { background: var(--press); }
.cell.pinned { background: var(--pin-bg); }
.cell + .cell::before { content: ""; position: absolute; top: 0; right: 0; left: 72px; border-top: 0.5px solid var(--line); }
.cell.plain + .cell.plain::before, .cell.plain + .cell::before { left: 16px; }
.cell.compact { min-height: 52px; }
.cell-body { flex: 1; min-width: 0; padding: 12px 0; }
.cell-title { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cell-desc { font-size: 13px; color: var(--text-2); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cell-row { display: flex; align-items: baseline; gap: 8px; }
.cell-row .cell-title { flex: 1; }
.cell-time { font-size: 12px; color: var(--text-3); flex: none; }
.cell-arrow { color: var(--text-3); flex: none; }
.cell-value { color: var(--text-2); font-size: 15px; max-width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: right; }
.cell-icon { width: 24px; height: 24px; display: grid; place-items: center; flex: none; }
.cell .muted-icon { color: var(--text-3); flex: none; margin-left: 4px; }
.group { margin-top: 8px; }
.danger-text { color: var(--danger); }
.link-text { color: var(--link); }
.center-text { justify-content: center; text-align: center; }
.red-prefix { color: var(--danger); }
.tag {
  display: inline-block; font-size: 11px; line-height: 16px; padding: 0 5px; border-radius: 3px;
  background: var(--press); color: var(--text-2); margin-left: 6px; vertical-align: 2px; font-weight: 400;
}
.tag.green { background: rgba(7,193,96,.12); color: var(--brand); }
.index-bar { position: absolute; right: 2px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; font-size: 10px; color: var(--text-2); z-index: 3; }
.index-bar span { padding: 1px 4px; text-align: center; }
.section-head { padding: 6px 16px; font-size: 13px; color: var(--text-2); background: var(--bg); }

/* 左滑操作 */
.swipe { position: relative; overflow: hidden; }
.swipe-content { position: relative; z-index: 1; transition: transform .2s ease; touch-action: pan-y; }
.swipe-actions { position: absolute; right: 0; top: 0; bottom: 0; display: flex; visibility: hidden; }
.swipe.swiping .swipe-actions { visibility: visible; }
.swipe + .swipe .cell::before { content: ""; position: absolute; top: 0; right: 0; left: 72px; border-top: 0.5px solid var(--line); }
.swipe + .fold-bar, .fold-bar + .swipe .cell::before { border: 0; }
.swipe-actions button { width: 76px; color: #fff; font-size: 15px; }
.swipe-actions .unread-btn { background: #2782D7; }
.swipe-actions .del-btn { background: var(--danger); }

.fold-bar { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--pin-bg); color: var(--text-2); font-size: 15px; }
.banner { display: flex; align-items: center; gap: 12px; padding: 12px 20px; background: var(--surface); color: var(--text-2); font-size: 15px; border-bottom: 0.5px solid var(--line); }
.netbar { background: #FFE9E9; color: #C03A3A; font-size: 14px; padding: 10px 16px; display: flex; align-items: center; gap: 8px; }
.reminder-bar { background: #FFF7E6; color: #8A5A00; font-size: 14px; padding: 10px 16px; display: flex; align-items: center; gap: 8px; }

/* ---------- 头像 ---------- */
.avatar {
  position: relative; flex: none; width: 48px; height: 48px; border-radius: 6px; overflow: visible;
  display: grid; place-items: center; color: #fff; font-size: 20px; font-weight: 500; background: #ccc;
}
.avatar > img, .avatar > .grid { width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }
.avatar.sm { width: 40px; height: 40px; font-size: 17px; border-radius: 5px; }
.avatar.xs { width: 32px; height: 32px; font-size: 14px; border-radius: 4px; }
.avatar.lg { width: 64px; height: 64px; font-size: 26px; border-radius: 8px; }
.avatar.xl { width: 72px; height: 72px; font-size: 28px; border-radius: 8px; }
.avatar .dot { position: absolute; right: -2px; bottom: -2px; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--surface); background: var(--text-3); }
.avatar .dot.on { background: var(--brand); }
.avatar .badge { position: absolute; top: -6px; right: -6px; }
.avatar .dot-badge { position: absolute; top: -4px; right: -4px; }
.avatar .grid { display: grid; gap: 1px; padding: 2px; background: #DDDEE0; overflow: hidden; }
.avatar .grid > * { width: 100%; height: 100%; object-fit: cover; border-radius: 1px; display: grid; place-items: center; color: #fff; font-size: 10px; overflow: hidden; }
.grid.g2 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr; align-content: center; }
.grid.g4 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.grid.g9 { grid-template-columns: 1fr 1fr 1fr; grid-template-rows: 1fr 1fr 1fr; }
.grid.g2 > * { height: 50%; }
.self-avatar { background: var(--brand); }
.badge { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--danger); color: #fff; font-size: 11px; line-height: 18px; text-align: center; font-weight: 400; }
.dot-badge { width: 10px; height: 10px; border-radius: 50%; background: var(--danger); display: inline-block; }

.empty { padding: 96px 32px; text-align: center; color: var(--text-2); font-size: 14px; }
.empty svg { margin: 0 auto 16px; color: var(--text-3); }
.empty .btn-primary { margin-top: 24px; }
.loading { padding: 24px; text-align: center; color: var(--text-3); font-size: 13px; }

/* ---------- 按钮与表单 ---------- */
.btn-primary { display: block; width: 184px; height: 40px; margin: 0 auto; border-radius: 8px; background: var(--brand); color: #fff; font-size: 17px; font-weight: 500; }
.btn-primary:active { background: var(--brand-press); }
.btn-primary:disabled { opacity: .4; }
.btn-primary.block { width: 100%; height: 48px; }
.btn-plain { display: block; width: 100%; height: 48px; border-radius: 8px; background: var(--surface); font-size: 17px; }
.btn-danger { display: block; width: 100%; height: 48px; border-radius: 8px; background: var(--danger); color: #fff; font-size: 17px; font-weight: 500; }
.btn-row { display: flex; gap: 12px; padding: 16px; }
.btn-row > * { flex: 1; }
.text-btn { color: var(--link); font-size: 15px; }
.text-btn:disabled { color: var(--text-3); }
.switch { position: relative; width: 51px; height: 31px; flex: none; }
.switch input { opacity: 0; position: absolute; inset: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 16px; background: var(--line); transition: background .2s; }
.switch span::after { content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0,0,0,.2); transition: transform .2s; }
.switch input:checked + span { background: var(--brand); }
.switch input:checked + span::after { transform: translateX(20px); }
.check { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--text-3); flex: none; display: grid; place-items: center; }
.check.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.check.disabled { background: var(--line); border-color: transparent; }

.field { display: flex; align-items: center; gap: 12px; min-height: 56px; border-bottom: 0.5px solid var(--line); }
.field label { width: 56px; flex: none; font-size: 17px; }
.field input, .field select { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font-size: 17px; height: 56px; }
.field input::placeholder, textarea::placeholder, .search-input input::placeholder { color: var(--text-3); }
.edit-area { background: var(--surface); padding: 12px 16px; }
.edit-area input, .edit-area textarea { width: 100%; border: 0; outline: 0; background: none; font-size: 17px; resize: none; }
.edit-tip { padding: 8px 16px; font-size: 13px; color: var(--text-2); }
.counter { text-align: right; font-size: 12px; color: var(--text-3); }

.search-box { padding: 8px 12px; background: var(--bg); }
.search-input { display: flex; align-items: center; gap: 6px; height: 36px; border-radius: 6px; background: var(--surface); padding: 0 10px; color: var(--text-3); }
.search-input input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font-size: 16px; color: var(--text); }
.search-fake { justify-content: center; cursor: pointer; }
.search-top { display: flex; align-items: center; gap: 8px; padding: calc(8px + env(safe-area-inset-top)) 12px 8px; background: var(--bg); }
.search-top .search-input { flex: 1; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 4px; background: var(--press); color: var(--text); font-size: 14px; white-space: nowrap; }

/* ---------- 登录 ---------- */
.login { flex: 1; overflow-y: auto; padding: calc(56px + env(safe-area-inset-top)) 32px 32px; background: var(--surface); }
.login-logo { width: 64px; height: 64px; margin: 0 auto 24px; }
.login h1 { font-size: 22px; font-weight: 500; text-align: center; margin: 0 0 40px; }
.code-wrap { position: relative; flex: 1; min-width: 0; height: 100%; display: flex; align-items: center; }
.code-boxes { display: flex; gap: 4px; flex: 1; min-width: 0; }
.code-box { flex: 1; min-width: 0; max-width: 34px; height: 40px; border-radius: 6px; background: var(--bg); display: grid; place-items: center; font-size: 20px; font-weight: 500; border: 1px solid transparent; }
.code-box.active { border-color: var(--brand); }
.code-input { position: absolute; inset: 0; opacity: 0; width: 100%; border: 0; outline: 0; font-size: 16px; caret-color: transparent; }
.agree { display: flex; align-items: flex-start; gap: 8px; margin: 24px 0 32px; font-size: 13px; color: var(--text-2); }
.agree input { margin: 1px 0 0; accent-color: var(--brand); width: 16px; height: 16px; flex: none; }
.agree a { color: var(--link); }
.login-alt { text-align: center; margin-top: 24px; }
.dev-hint { margin-top: 24px; padding: 10px 12px; border-radius: 6px; background: var(--code-bg); font-size: 13px; color: var(--text-2); text-align: center; }

/* ---------- 聊天 ---------- */
.chat { flex: 1; display: flex; flex-direction: column; min-height: 0; position: relative; background: var(--bg); background-size: cover; background-position: center; }
.ann-bar { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; background: var(--surface); font-size: 14px; border-bottom: 0.5px solid var(--line); }
.ann-bar .ann-text { flex: 1; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-wrap; }
.msgs { flex: 1; overflow-y: auto; padding: 8px 0 16px; overscroll-behavior: contain; }
.time-sep { text-align: center; font-size: 12px; color: var(--text-3); margin: 16px 0 8px; }
.sys-msg { text-align: center; font-size: 12px; color: var(--text-3); margin: 10px 48px; line-height: 1.6; }
.sys-msg .text-btn { font-size: 12px; margin-left: 4px; }
.msg { display: flex; align-items: flex-start; gap: 10px; padding: 8px 12px; position: relative; }
.msg.me { flex-direction: row-reverse; }
.msg.selecting { padding-left: 48px; cursor: pointer; }
.msg .sel { position: absolute; left: 12px; top: 18px; }
.msg-main { max-width: calc(100% - 112px); display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }
.msg.me .msg-main { align-items: flex-end; }
.msg.noavatar .msg-main { max-width: calc(100% - 32px); }
.msg.wide .msg-main { max-width: calc(100% - 62px); }
.msg-name { font-size: 12px; color: var(--text-2); margin: 0 0 4px 2px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bubble-row { display: flex; align-items: center; gap: 8px; max-width: 100%; }
.msg.me .bubble-row { flex-direction: row-reverse; }
.bubble {
  position: relative; padding: 9px 12px; border-radius: 6px; background: var(--bubble-other); color: var(--text);
  font-size: var(--font); line-height: 1.45; word-break: break-word; white-space: pre-wrap; min-height: 40px; max-width: 100%;
  user-select: text; -webkit-user-select: text; -webkit-touch-callout: none;
}
.bubble::before { content: ""; position: absolute; top: 14px; left: -5px; border: 6px solid transparent; border-left: 0; border-right-color: var(--bubble-other); }
.msg.me .bubble { background: var(--bubble-me); color: var(--bubble-me-text); }
.msg.me .bubble::before { left: auto; right: -5px; border: 6px solid transparent; border-right: 0; border-left-color: var(--bubble-me); }
.msg.noavatar .bubble::before { display: none; }
.bubble a { color: var(--link); text-decoration: underline; }
.msg.me .bubble a { color: #1A5D1A; }
.bubble .at { color: var(--link); }
.msg.me .bubble .at { color: #1A5D1A; }
.bubble.task { white-space: normal; min-width: 140px; }
.bubble.flash, .media.flash { animation: flash 1.2s ease 2; }
@keyframes flash { 50% { filter: brightness(.8); } }
.out { margin: 0; font: 13px/1.5 ui-monospace, "SF Mono", Menlo, Consolas, monospace; white-space: pre-wrap; word-break: break-all; max-height: 360px; overflow: auto; }
.out.muted { color: var(--text-2); font-family: inherit; font-size: 15px; }
.task-cmd { font: 12px/1.4 ui-monospace, Menlo, Consolas, monospace; color: var(--text-2); margin-bottom: 6px; }
.task-foot { display: flex; align-items: center; gap: 8px; margin-top: 8px; padding-top: 6px; border-top: 0.5px solid var(--line); font-size: 12px; color: var(--text-2); }
.task-foot .st { display: flex; align-items: center; gap: 4px; }
.task-foot .st.ok { color: var(--brand); }
.task-foot .st.bad { color: var(--danger); }
.task-foot .cancel { margin-left: auto; color: var(--link); font-size: 12px; }
.spinner { width: 14px; height: 14px; border-radius: 50%; flex: none; border: 2px solid var(--text-3); border-top-color: transparent; animation: spin .8s linear infinite; }
.spinner.lg { width: 28px; height: 28px; border-width: 3px; }
@keyframes spin { to { transform: rotate(360deg); } }
.send-fail { width: 20px; height: 20px; border-radius: 50%; background: var(--danger); color: #fff; font-size: 14px; font-weight: 700; display: grid; place-items: center; flex: none; }
.quote { margin-top: 4px; padding: 6px 8px; border-radius: 4px; background: var(--quote-bg); color: var(--text-2); font-size: 13px; max-width: 100%; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; cursor: pointer; white-space: pre-wrap; word-break: break-all; }
.load-more { text-align: center; font-size: 12px; color: var(--text-3); padding: 8px; }

.media { border-radius: 6px; overflow: hidden; background: var(--code-bg); cursor: pointer; position: relative; max-width: 200px; }
.media img { max-width: 200px; max-height: 200px; min-width: 60px; min-height: 60px; object-fit: cover; }
.album { position: relative; width: 180px; height: 180px; cursor: pointer; }
.album .sheet-card { position: absolute; inset: 0; border-radius: 8px; background: var(--surface); box-shadow: 0 1px 3px rgba(0,0,0,.2); overflow: hidden; }
.album .sheet-card:nth-child(1) { transform: translate(10px, 8px) rotate(4deg); }
.album .sheet-card:nth-child(2) { transform: translate(5px, 4px) rotate(2deg); }
.album .top { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; }
.album .top img { width: 100%; height: 90px; object-fit: cover; }
.album-toggle { align-self: center; padding: 6px 14px; border-radius: 16px; background: var(--press); color: var(--text-2); font-size: 14px; }
.album-open { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; max-width: 260px; }
.album-open img { width: 84px; height: 84px; object-fit: cover; border-radius: 4px; cursor: pointer; }
.file-card { display: flex; gap: 12px; align-items: center; width: 240px; padding: 12px; border-radius: 6px; background: var(--bubble-other); cursor: pointer; }
.file-card .fc-body { flex: 1; min-width: 0; }
.file-card .fc-name { font-size: 15px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; word-break: break-all; }
.file-card .fc-size { font-size: 12px; color: var(--text-2); margin-top: 4px; }
.file-icon { width: 40px; height: 48px; border-radius: 3px; flex: none; display: grid; place-items: center; color: #fff; font-size: 11px; font-weight: 700; position: relative; }
.file-icon::after { content: ""; position: absolute; top: 0; right: 0; border: 6px solid; border-color: var(--surface) var(--surface) rgba(255,255,255,.4) rgba(255,255,255,.4); }
.card-msg { width: 240px; border-radius: 6px; background: var(--bubble-other); cursor: pointer; overflow: hidden; }
.card-msg .cm-top { display: flex; gap: 10px; align-items: center; padding: 12px; }
.card-msg .cm-foot { font-size: 12px; color: var(--text-3); padding: 6px 12px; border-top: 0.5px solid var(--line); }
.merged-msg { width: 240px; padding: 10px 12px; border-radius: 6px; background: var(--bubble-other); cursor: pointer; }
.merged-msg .mm-title { font-size: 15px; margin-bottom: 6px; }
.merged-msg .mm-line { font-size: 12px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.merged-msg .mm-foot { font-size: 12px; color: var(--text-3); margin-top: 8px; padding-top: 6px; border-top: 0.5px solid var(--line); }
.voice-bubble { display: flex; align-items: center; gap: 6px; min-width: 70px; cursor: pointer; }
.msg.me .voice-bubble { flex-direction: row-reverse; }
.voice-bubble.playing svg { animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: .3; } }
.voice-unread { width: 8px; height: 8px; border-radius: 50%; background: var(--danger); }
.voice-text { margin-top: 4px; padding: 8px 10px; border-radius: 6px; background: var(--surface); font-size: 14px; max-width: 100%; }

.float-btn {
  position: absolute; right: 12px; z-index: 3; display: flex; align-items: center; gap: 6px; padding: 8px 14px;
  border-radius: 18px; background: var(--surface); color: var(--brand); font-size: 14px; box-shadow: 0 2px 8px rgba(0,0,0,.12);
}
.float-btn.top { top: 12px; }
.float-btn.bottom { bottom: 12px; }

/* 输入栏 */
.inputbar { flex: none; display: flex; align-items: flex-end; gap: 8px; padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); background: var(--bar); border-top: 0.5px solid var(--line); }
.inputbar.with-panel { padding-bottom: 8px; }
.ib-btn { width: 32px; height: 40px; display: grid; place-items: center; flex: none; }
.ib-btn:active { opacity: .5; }
.ib-mid { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.ib-input-wrap { position: relative; display: flex; align-items: flex-end; background: var(--surface); border-radius: 4px; }
.ib-input { flex: 1; min-width: 0; min-height: 40px; max-height: 120px; resize: none; border: 0; outline: 0; background: none; padding: 9px 10px; font-size: 16px; line-height: 22px; display: block; }
.ib-mic { width: 34px; height: 40px; display: grid; place-items: center; color: var(--text-2); flex: none; }
.ib-hold { height: 40px; border-radius: 4px; background: var(--surface); font-size: 16px; font-weight: 500; user-select: none; -webkit-user-select: none; touch-action: none; }
.ib-hold.active { background: var(--line); }
.ib-send { flex: none; height: 32px; margin: 4px 0; padding: 0 12px; border-radius: 4px; background: var(--brand); color: #fff; font-size: 14px; }
.ib-disabled { flex: 1; height: 40px; display: grid; place-items: center; color: var(--text-2); font-size: 14px; background: var(--surface); border-radius: 4px; }
.quote-bar { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 4px; background: var(--surface-2); color: var(--text-2); font-size: 13px; }
.quote-bar .qb-text { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.quote-bar img { width: 32px; height: 32px; object-fit: cover; border-radius: 3px; }

.panel { flex: none; background: var(--bar); border-top: 0.5px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.emoji-tabs { display: flex; gap: 4px; padding: 6px 12px; border-bottom: 0.5px solid var(--line); }
.emoji-tabs button { width: 40px; height: 32px; border-radius: 6px; display: grid; place-items: center; }
.emoji-tabs button.active { background: var(--press); }
.emoji-scroll { height: 240px; overflow-y: auto; padding: 4px 8px 56px; position: relative; }
.emoji-label { font-size: 13px; color: var(--text-2); padding: 8px 6px 4px; }
.emoji-grid { display: grid; grid-template-columns: repeat(8, 1fr); }
.emoji-grid button { height: 44px; font-size: 28px; line-height: 44px; }
.emoji-del { position: absolute; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); width: 56px; height: 40px; border-radius: 8px; background: var(--surface); display: grid; place-items: center; box-shadow: 0 1px 4px rgba(0,0,0,.1); }
.plus-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px 0; padding: 24px 16px 32px; }
.plus-item { display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 12px; color: var(--text-2); }
.plus-item .pi-icon { width: 60px; height: 60px; border-radius: 12px; background: var(--surface); display: grid; place-items: center; color: var(--text); }

/* 长按菜单 */
.msg-menu { position: fixed; z-index: 60; background: var(--menu); border-radius: 8px; padding: 6px 4px; color: #fff; box-shadow: 0 4px 16px rgba(0,0,0,.25); animation: pop .12s ease-out; }
@keyframes pop { from { transform: scale(.92); opacity: 0; } }
.msg-menu .mm-row { display: grid; grid-template-columns: repeat(5, 56px); }
.msg-menu .mm-row + .mm-row { border-top: 0.5px solid rgba(255,255,255,.15); margin-top: 4px; padding-top: 4px; }
.msg-menu button { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 0; font-size: 12px; color: #fff; }
.msg-menu button:active { background: rgba(255,255,255,.1); border-radius: 6px; }
.msg-menu .arrow { position: absolute; width: 0; height: 0; border: 7px solid transparent; }
.msg-menu .arrow.down { bottom: -14px; border-top-color: var(--menu); }
.msg-menu .arrow.up { top: -14px; border-bottom-color: var(--menu); }
.menu-mask { position: fixed; inset: 0; z-index: 59; }

.select-bar { flex: none; display: flex; justify-content: space-around; padding: 12px 0 calc(12px + env(safe-area-inset-bottom)); background: var(--bar); border-top: 0.5px solid var(--line); }
.select-bar button { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 11px; color: var(--text-2); }
.select-bar button:disabled { opacity: .35; }

/* 按住说话 */
.voice-layer { position: fixed; inset: 0; z-index: 70; background: rgba(0,0,0,.6); display: flex; flex-direction: column; justify-content: flex-end; user-select: none; -webkit-user-select: none; touch-action: none; }
.voice-bubble-big { position: absolute; left: 50%; top: 52%; transform: translate(-50%, -50%); width: 180px; height: 88px; border-radius: 22px; background: #3EB575; display: grid; place-items: center; color: #0D3D1E; transition: all .2s cubic-bezier(.2,.8,.2,1); }
.voice-bubble-big::after { content: ""; position: absolute; bottom: -9px; left: 50%; transform: translateX(-50%); border: 10px solid transparent; border-bottom: 0; border-top-color: inherit; border-top-color: #3EB575; transition: border-color .2s; }
.voice-bubble-big.cancel { width: 90px; height: 90px; left: 22%; background: var(--danger); }
.voice-bubble-big.cancel::after { border-top-color: var(--danger); }
.voice-bubble-big.text { width: calc(100% - 40px); height: 108px; left: 50%; display: block; padding: 14px 16px; text-align: left; font-size: 17px; color: #0D0D0D; }
.voice-bubble-big .live-text { white-space: pre-wrap; max-height: 64px; overflow: hidden; }
.voice-bubble-big .live-text::after { content: "|"; color: #0D3D1E; animation: pulse 1s infinite; }
.voice-bubble-big .mini-wave { position: absolute; right: 14px; bottom: 10px; }
.wave { display: flex; align-items: center; gap: 3px; height: 32px; }
.wave i { display: block; width: 3px; border-radius: 2px; background: currentColor; height: 6px; transition: height .08s; }
.voice-count { position: absolute; left: 50%; top: calc(52% - 70px); transform: translateX(-50%); color: #fff; font-size: 14px; }
.voice-hint { position: absolute; font-size: 14px; color: rgba(255,255,255,.85); transition: opacity .2s; }
.voice-zones { position: relative; height: 260px; }
.vz { position: absolute; display: grid; place-items: center; font-size: 17px; color: rgba(255,255,255,.85); background: rgba(255,255,255,.18); transition: all .2s; }
.vz.cancel { left: -30px; bottom: 90px; width: 52%; height: 100px; border-radius: 0 60px 60px 0; transform: rotate(-6deg); }
.vz.text { right: -30px; bottom: 90px; width: 52%; height: 100px; border-radius: 60px 0 0 60px; transform: rotate(6deg); }
.vz.send { left: -10%; right: -10%; bottom: -60px; height: 160px; border-radius: 50% 50% 0 0; padding-bottom: 60px; }
.vz.on { background: #F2F2F2; color: #191919; transform: scale(1.04) rotate(var(--r, 0deg)); }
.vz.cancel.on { --r: -6deg; }
.vz.text.on { --r: 6deg; }
.voice-result { position: fixed; inset: 0; z-index: 70; background: rgba(0,0,0,.6); display: flex; flex-direction: column; justify-content: flex-end; }
.voice-result textarea { margin: 0 20px 24px; height: 120px; border-radius: 16px; border: 0; outline: 0; padding: 14px 16px; font-size: 17px; background: #3EB575; color: #0D0D0D; resize: none; }
.voice-result .vr-actions { display: flex; justify-content: space-around; padding: 16px 0 calc(32px + env(safe-area-inset-bottom)); }
.voice-result .vr-actions button { color: #fff; font-size: 15px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.voice-result .vr-actions .round { width: 64px; height: 64px; border-radius: 50%; background: rgba(255,255,255,.2); display: grid; place-items: center; }
.voice-result .vr-actions .round.ok { background: #fff; color: var(--brand); }

/* ---------- 浮层 ---------- */
.toast { position: fixed; left: 50%; top: 45%; transform: translate(-50%, -50%); max-width: 70%; padding: 12px 16px; border-radius: 8px; background: rgba(17,17,17,.8); color: #fff; font-size: 15px; text-align: center; z-index: 100; pointer-events: none; }
.sheet-mask { position: fixed; inset: 0; background: var(--mask); z-index: 50; display: flex; align-items: flex-end; justify-content: center; animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
.sheet { width: 100%; max-width: 560px; max-height: 92vh; overflow-y: auto; background: var(--bg); border-radius: 12px 12px 0 0; padding: 24px 16px calc(16px + env(safe-area-inset-bottom)); animation: up .2s ease-out; }
.sheet.full { padding: 0; height: 92vh; display: flex; flex-direction: column; }
@keyframes up { from { transform: translateY(100%); } }
.sheet h3 { margin: 0 0 8px; font-size: 17px; font-weight: 500; text-align: center; }
.sheet p { margin: 0 0 16px; font-size: 14px; color: var(--text-2); text-align: center; }
.sheet .btn-primary, .sheet .btn-plain, .sheet .btn-danger { margin-top: 8px; }
.action-sheet { padding: 0 0 env(safe-area-inset-bottom); background: var(--bg); }
.action-sheet .as-title { padding: 16px; text-align: center; font-size: 13px; color: var(--text-2); background: var(--surface); border-bottom: 0.5px solid var(--line); }
.action-sheet button { display: block; width: 100%; height: 56px; background: var(--surface); font-size: 17px; border-bottom: 0.5px solid var(--line); }
.action-sheet button.danger { color: var(--danger); }
.action-sheet button.cancel { margin-top: 8px; border: 0; }
.action-sheet button.has-desc { height: 68px; line-height: 1.3; }
.action-sheet button small { display: block; margin-top: 2px; font-size: 13px; color: var(--text-2); }
.dialog-mask { position: fixed; inset: 0; background: var(--mask); z-index: 80; display: grid; place-items: center; animation: fade .15s; }
.dialog { width: min(320px, calc(100% - 64px)); background: var(--surface); border-radius: 12px; overflow: hidden; text-align: center; }
.dialog .dg-body { padding: 32px 24px 24px; }
.dialog .dg-title { font-size: 17px; font-weight: 500; margin-bottom: 8px; }
.dialog .dg-text { font-size: 15px; color: var(--text-2); white-space: pre-wrap; }
.dialog .dg-input { width: 100%; margin-top: 16px; height: 40px; border: 0.5px solid var(--line); border-radius: 6px; padding: 0 10px; background: var(--bg); outline: 0; font-size: 16px; }
.dialog textarea.dg-input { height: 72px; padding: 8px 10px; resize: none; }
.dialog .dg-actions { display: flex; border-top: 0.5px solid var(--line); }
.dialog .dg-actions button { flex: 1; height: 56px; font-size: 17px; font-weight: 500; }
.dialog .dg-actions button + button { border-left: 0.5px solid var(--line); }
.dialog .dg-actions .ok { color: var(--brand); }
.dialog .dg-actions .ok.danger { color: var(--danger); }
.dialog .dg-preview { display: flex; gap: 10px; align-items: center; text-align: left; padding: 0 0 12px; border-bottom: 0.5px solid var(--line); margin-bottom: 12px; }
.dialog .dg-content { text-align: left; font-size: 14px; color: var(--text-2); background: var(--bg); border-radius: 6px; padding: 8px 10px; max-height: 120px; overflow: hidden; }
.join-code { font: 600 32px/1 ui-monospace, Menlo, Consolas, monospace; letter-spacing: 6px; text-align: center; padding: 16px 0; background: var(--surface); border-radius: 8px; margin-bottom: 12px; }
.cmd { font: 12px/1.6 ui-monospace, Menlo, Consolas, monospace; background: var(--surface); border-radius: 8px; padding: 12px; word-break: break-all; margin: 0 0 12px; white-space: pre-wrap; }

/* 图片查看器 */
.viewer { position: fixed; inset: 0; z-index: 90; background: #000; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; transition: background .2s; animation: vw-bg-in .22s ease-out; }
@keyframes vw-bg-in { from { background: rgba(0,0,0,0); } }
.viewer .vw-track { display: flex; height: 100%; will-change: transform; }
.viewer .vw-slide { flex: 0 0 100%; height: 100%; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.viewer .vw-slide img { max-width: 100%; max-height: 100%; object-fit: contain; -webkit-user-drag: none; transform-origin: center; }
.viewer.vw-dragging, .viewer.vw-dragging .vw-track { transition: none; }
.viewer.vw-dragging > :not(.vw-track), .viewer.vw-closing > :not(.vw-track) { opacity: 0; transition: opacity .15s; }
.viewer.vw-opening .vw-track { visibility: hidden; }
.viewer .vw-orig { position: absolute; left: 12px; bottom: calc(20px + env(safe-area-inset-bottom)); height: 36px; padding: 0 14px; border-radius: 18px; background: #3c3c3c; color: #fff; font-size: 14px; white-space: nowrap; display: flex; align-items: center; gap: 4px; overflow: hidden; cursor: pointer; transition: opacity .3s; }
.viewer .vw-orig[hidden] { display: none; }
.viewer .vw-orig span { opacity: .55; }
.viewer .vw-orig.loading { width: 96px; padding: 0 6px 0 0; justify-content: flex-end; gap: 0; }
.viewer .vw-orig.loading i { position: absolute; left: 0; top: 0; bottom: 0; background: #5a5a5a; transition: width .15s; }
.viewer .vw-orig.loading b { position: relative; font-weight: 400; font-size: 15px; flex: 1; text-align: center; padding-left: 18px; }
.viewer .vw-orig-x { position: relative; width: 28px; height: 28px; display: grid; place-items: center; color: #fff; }
.viewer .vw-orig-x svg { width: 16px; height: 16px; }
.viewer .vw-orig.done { width: 96px; justify-content: center; animation: vw-orig-out .7s ease-in forwards; }
.viewer .vw-orig.done svg { width: 20px; height: 20px; }
@keyframes vw-orig-out { 0%, 40% { opacity: 1; } 100% { opacity: 0; } }
.vw-fly { position: fixed; z-index: 91; object-fit: cover; pointer-events: none; transition: left .25s cubic-bezier(.2,.8,.2,1), top .25s cubic-bezier(.2,.8,.2,1), width .25s cubic-bezier(.2,.8,.2,1), height .25s cubic-bezier(.2,.8,.2,1), border-radius .25s; }
.text-viewer { position: fixed; inset: 0; z-index: 90; background: var(--surface); display: flex; align-items: center; justify-content: center; padding: 32px; font-size: 26px; line-height: 1.6; white-space: pre-wrap; word-break: break-word; overflow: auto; }

/* ---------- 资料卡 / 个人资料 ---------- */
.profile-head { display: flex; gap: 16px; padding: 24px 16px 28px; background: var(--surface); }
.profile-head .ph-name { font-size: 22px; font-weight: 500; display: flex; align-items: center; gap: 6px; }
.profile-head .ph-line { font-size: 14px; color: var(--text-2); margin-top: 4px; }
.gender { display: inline-grid; place-items: center; }
.gender.male { color: #4E8BEE; }
.gender.female { color: #EE6E9A; }
.photos { display: flex; gap: 6px; }
.photos img { width: 56px; height: 56px; object-fit: cover; border-radius: 2px; }
.big-btn { display: flex; align-items: center; justify-content: center; gap: 8px; height: 56px; width: 100%; background: var(--surface); color: var(--link); font-size: 17px; font-weight: 500; }
.me-head { display: flex; align-items: flex-start; gap: 16px; padding: calc(40px + env(safe-area-inset-top)) 16px 28px 20px; background: var(--surface); }
.me-head .mh-top { display: flex; align-items: center; gap: 8px; }
.me-head .mh-name { flex: 1; min-width: 0; font-size: 22px; font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-head .mh-qr { color: var(--link); padding: 6px; margin: -6px 0; display: inline-flex; }
.me-head .mh-row { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; }
.me-head .mh-id { font-size: 14px; color: var(--text-2); }
.st-pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.st-pill { display: inline-flex; align-items: center; gap: 2px; height: 24px; padding: 0 9px; border: 0.5px solid var(--text-3); border-radius: 12px; font-size: 13px; color: var(--text-2); }
.st-pill.st-round { width: 24px; padding: 0; justify-content: center; }
.st-pill svg { width: 12px; height: 12px; }
.st-pill.st-round svg { width: 13px; height: 13px; }
.st-pill .st-icon { font-size: 15px; }
.st-pill .st-avs { display: inline-flex; margin-right: 8px; }
.st-pill .st-avs .avatar { width: 16px; height: 16px; font-size: 10px; border-radius: 50%; margin-right: -6px; box-shadow: 0 0 0 1px var(--surface); }
.st-pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--danger); display: inline-block; margin-left: 4px; }
.profile-head .ph-status { display: inline-block; margin-top: 8px; padding: 2px 10px; border-radius: 12px; border: 1px solid var(--text-3); font-size: 13px; color: var(--text-2); }
.qr-card { margin: 16px; border-radius: 12px; background: var(--surface); overflow: hidden; }
.qr-card .qc-head { display: flex; align-items: center; gap: 12px; padding: 16px; font-size: 17px; cursor: pointer; }
.qr-card .qc-head .qc-title { flex: 1; }
.qr-card .qc-sub { font-size: 13px; color: var(--text-2); margin-top: 2px; }
.qr-inner { margin: 0 24px 16px; padding: 20px; border-radius: 8px; background: #fff; color: #191919; }
.qr-inner .qi-user { display: flex; gap: 12px; align-items: center; margin-bottom: 20px; }
.qr-inner canvas, .qr-inner svg.qr { display: block; margin: 0 auto; width: 220px; height: 220px; }
.qr-inner .qi-tip { text-align: center; font-size: 13px; color: #888; margin-top: 16px; }
.qr-actions { display: flex; justify-content: center; gap: 40px; padding: 4px 0 20px; }
.qr-actions button, .qr-actions a { color: var(--link); font-size: 15px; }

/* ---------- 朋友圈 ---------- */
.moments-page { flex: 1; overflow-y: auto; background: var(--surface); position: relative; }
.mo-cover { position: relative; height: 320px; background: linear-gradient(135deg, #2b5876, #4e4376); background-size: cover; background-position: center; margin-bottom: 48px; cursor: pointer; }
.mo-cover .mc-me { position: absolute; right: 16px; bottom: -28px; display: flex; align-items: flex-end; gap: 14px; }
.mo-cover .mc-name { color: #fff; font-size: 18px; font-weight: 500; text-shadow: 0 1px 3px rgba(0,0,0,.5); margin-bottom: 36px; }
.mo-cover .avatar { border: 2px solid var(--surface); box-sizing: content-box; }
.mo-notice-pill { display: flex; align-items: center; gap: 8px; margin: 0 auto 16px; width: fit-content; padding: 6px 14px 6px 6px; border-radius: 6px; background: #4C4C4C; color: #fff; font-size: 14px; cursor: pointer; }
.mo-item { display: flex; gap: 10px; padding: 16px; border-bottom: 0.5px solid var(--line); }
.mo-item .mi-body { flex: 1; min-width: 0; }
.mo-item .mi-name { color: var(--link); font-size: 16px; font-weight: 500; margin-bottom: 4px; cursor: pointer; }
.mo-item .mi-text { font-size: var(--font); line-height: 1.5; white-space: pre-wrap; word-break: break-word; }
.mo-item .mi-text.clamp { display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }
.mo-item .mi-more { color: var(--link); font-size: 15px; margin-top: 4px; }
.mo-imgs { display: grid; gap: 4px; margin-top: 8px; }
.mo-imgs.n1 { grid-template-columns: 1fr; max-width: 200px; }
.mo-imgs.n1 img { max-width: 200px; max-height: 200px; width: auto; height: auto; aspect-ratio: auto; }
.mo-imgs.n2, .mo-imgs.n4 { grid-template-columns: repeat(2, 84px); }
.mo-imgs.n3, .mo-imgs.n5, .mo-imgs.n6, .mo-imgs.n7, .mo-imgs.n8, .mo-imgs.n9 { grid-template-columns: repeat(3, 84px); }
.mo-imgs img { width: 84px; height: 84px; object-fit: cover; cursor: pointer; background: var(--code-bg); }
.mi-meta { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 13px; color: var(--text-3); position: relative; }
.mi-meta .mi-del { color: var(--link); }
.mi-meta .mi-op { margin-left: auto; width: 32px; height: 20px; border-radius: 3px; background: var(--bg); display: grid; place-items: center; color: var(--link); }
.mi-pop { position: absolute; right: 40px; top: -10px; display: flex; background: #4C4C4C; border-radius: 4px; overflow: hidden; animation: slide .15s ease-out; z-index: 2; }
@keyframes slide { from { transform: scaleX(.2); transform-origin: right; opacity: 0; } }
.mi-pop button { display: flex; align-items: center; gap: 6px; padding: 0 18px; height: 40px; color: #fff; font-size: 14px; white-space: nowrap; }
.mi-pop button + button { border-left: 0.5px solid rgba(255,255,255,.15); }
.mi-social { margin-top: 8px; background: var(--bg); border-radius: 3px; font-size: 14px; position: relative; }
.mi-social::before { content: ""; position: absolute; top: -10px; left: 12px; border: 5px solid transparent; border-bottom-color: var(--bg); }
.mi-likes { display: flex; gap: 6px; padding: 6px 10px; color: var(--link); align-items: flex-start; }
.mi-likes + .mi-comments { border-top: 0.5px solid var(--line); }
.mi-comments { padding: 4px 10px; }
.mi-comment { padding: 2px 0; line-height: 1.5; cursor: pointer; word-break: break-word; }
.mi-comment b { color: var(--link); font-weight: 500; }
.comment-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: flex; gap: 8px; padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); background: var(--bar); border-top: 0.5px solid var(--line); max-width: 560px; margin: 0 auto; }
.comment-bar input { flex: 1; height: 38px; border: 0; border-radius: 4px; padding: 0 10px; background: var(--surface); outline: 0; font-size: 16px; }
.album-row { display: flex; gap: 12px; padding: 12px 16px; cursor: pointer; }
.album-row .ar-date { width: 64px; flex: none; }
.album-row .ar-day { font-size: 26px; font-weight: 600; }
.album-row .ar-month { font-size: 12px; margin-left: 2px; }
.album-row .ar-body { flex: 1; display: flex; gap: 8px; min-width: 0; }
.album-row .ar-img { width: 72px; height: 72px; object-fit: cover; flex: none; }
.album-row .ar-text { flex: 1; font-size: 15px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.album-row .ar-textbox { flex: 1; background: var(--bg); padding: 8px; font-size: 15px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.album-year { font-size: 26px; font-weight: 600; padding: 20px 16px 8px; }
.album-today { display: flex; gap: 8px; }
.album-today button { width: 88px; height: 88px; background: var(--bg); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; font-size: 13px; color: var(--text-2); }
.compose { flex: 1; overflow-y: auto; background: var(--surface); }
.compose textarea { width: 100%; min-height: 120px; border: 0; outline: 0; padding: 16px; font-size: 17px; resize: none; background: none; }
.compose-imgs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 0 16px 16px; }
.compose-imgs > * { aspect-ratio: 1; position: relative; }
.compose-imgs img { width: 100%; height: 100%; object-fit: cover; }
.compose-imgs .ci-add { background: var(--bg); display: grid; place-items: center; color: var(--text-3); }
.compose-imgs .ci-del { position: absolute; top: 2px; right: 2px; width: 22px; height: 22px; border-radius: 50%; background: rgba(0,0,0,.5); color: #fff; display: grid; place-items: center; font-size: 14px; }
.compose-imgs .ci-progress { position: absolute; inset: 0; background: rgba(0,0,0,.4); display: grid; place-items: center; }

/* ---------- 收藏 ---------- */
.fav-tabs { display: flex; gap: 20px; padding: 10px 16px; overflow-x: auto; background: var(--bg); }
.fav-tabs button { color: var(--link); font-size: 15px; white-space: nowrap; padding: 4px 0; }
.fav-tabs button.active { color: var(--text); font-weight: 500; border-bottom: 2px solid var(--brand); }
.fav-card { margin: 8px 12px; padding: 14px 16px; border-radius: 8px; background: var(--surface); cursor: pointer; }
.fav-card .fc-text { font-size: 16px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-wrap; word-break: break-word; }
.fav-card .fc-img { max-width: 160px; max-height: 160px; border-radius: 4px; }
.fav-card .fc-meta { display: flex; justify-content: space-between; margin-top: 10px; font-size: 13px; color: var(--text-3); }
.media-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; }
.media-grid > div { aspect-ratio: 1; position: relative; cursor: pointer; }
.media-grid img { width: 100%; height: 100%; object-fit: cover; }
.media-grid .mg-check { position: absolute; top: 6px; right: 6px; width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid #fff; background: rgba(0,0,0,.15); color: #fff; display: grid; place-items: center; font-size: 13px; font-weight: 600; }
.media-grid .mg-check.on { background: var(--brand); border-color: var(--brand); }
.picker-bottom { flex: none; display: flex; align-items: center; gap: 12px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: var(--bar); border-top: 0.5px solid var(--line); }
.picker-bottom .pb-send { margin-left: auto; height: 34px; padding: 0 16px; border-radius: 4px; background: var(--brand); color: #fff; font-size: 15px; }
.picker-bottom .pb-send:disabled { opacity: .4; }
.tabs-line { display: flex; background: var(--bg); padding: 0 8px; }
.tabs-line button { flex: 1; padding: 12px 0; font-size: 16px; color: var(--text-2); }
.tabs-line button.active { color: var(--text); font-weight: 500; box-shadow: inset 0 -2px 0 var(--text); }

/* 日历 */
.cal-month { padding: 16px 16px 4px; font-size: 15px; color: var(--text-2); border-bottom: 0.5px solid var(--line); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); padding: 8px 8px 16px; }
.cal-grid .cd { height: 48px; display: grid; place-items: center; font-size: 17px; }
.cal-grid .cd.empty { color: var(--text-3); }
.cal-grid .cd.has { cursor: pointer; }
.cal-grid .cd.today span { background: var(--brand); color: #fff; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; }
.cal-week { display: grid; grid-template-columns: repeat(7, 1fr); padding: 8px; font-size: 13px; color: var(--text-2); text-align: center; background: var(--surface-2); }

/* 聊天信息 */
.member-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px 4px; padding: 16px 12px; background: var(--surface); }
.member-grid .mg-item { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; color: var(--text-2); min-width: 0; cursor: pointer; }
.member-grid .mg-item span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member-grid .mg-add { width: 48px; height: 48px; border: 1px dashed var(--text-3); border-radius: 6px; display: grid; place-items: center; color: var(--text-3); }
.role-tag { position: absolute; bottom: -4px; left: 50%; transform: translateX(-50%); font-size: 9px; line-height: 13px; padding: 0 3px; border-radius: 2px; background: #FA9D3B; color: #fff; white-space: nowrap; }
.role-tag.admin { background: #2782D7; }
.foot-version { text-align: center; padding: 32px 16px; font-size: 13px; color: var(--link); }

/* 管理后台 */
.admin-stat { display: grid; grid-template-columns: repeat(3, 1fr); background: var(--surface); }
.admin-stat div { padding: 16px; text-align: center; }
.admin-stat b { display: block; font-size: 22px; }
.admin-stat span { font-size: 12px; color: var(--text-2); }
.seg { display: flex; margin: 8px 16px; border: 1px solid var(--brand); border-radius: 6px; overflow: hidden; }
.seg button { flex: 1; height: 32px; font-size: 14px; color: var(--brand); }
.seg button.active { background: var(--brand); color: #fff; }
.audit-item { padding: 12px 16px; background: var(--surface); border-bottom: 0.5px solid var(--line); font-size: 14px; }
.audit-item .ai-meta { font-size: 12px; color: var(--text-2); margin-top: 4px; }
.audit-item pre { margin: 6px 0 0; padding: 6px 8px; background: var(--bg); border-radius: 4px; font-size: 12px; white-space: pre-wrap; word-break: break-all; }

/* AI 回复：Markdown */
.task-note { margin-top: 6px; font-size: 12px; color: var(--danger); }
.typing-dots { display: flex; gap: 4px; padding: 6px 2px; }
.typing-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--text-3); animation: blink 1.2s infinite; }
.typing-dots i:nth-child(2) { animation-delay: .2s; }
.typing-dots i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .3; } 40% { opacity: 1; } }
.md { font-size: var(--font); line-height: 1.6; white-space: normal; word-break: break-word; }
.md p { margin: 0 0 8px; }
.md p:last-child { margin-bottom: 0; }
.md .md-h { margin: 10px 0 6px; font-size: 1.05em; font-weight: 600; }
.md ul, .md ol { margin: 0 0 8px; padding-left: 1.4em; }
.md li { margin: 2px 0; }
.md code { font: 0.88em ui-monospace, Menlo, Consolas, monospace; background: var(--code-bg); padding: 1px 4px; border-radius: 3px; }
.md .md-code { margin: 6px 0; padding: 10px; background: var(--code-bg); border-radius: 6px; overflow-x: auto; white-space: pre; font: 13px/1.5 ui-monospace, Menlo, Consolas, monospace; }
.md .md-code code { background: none; padding: 0; }
.md blockquote { margin: 6px 0; padding-left: 10px; border-left: 3px solid var(--line); color: var(--text-2); }
.md hr { border: 0; border-top: 0.5px solid var(--line); margin: 10px 0; }
.md a { color: var(--link); }
.md-table { overflow-x: auto; margin: 6px -12px; padding: 0 12px; -webkit-overflow-scrolling: touch; }
.md-table table { border-collapse: collapse; min-width: 100%; white-space: nowrap; }
.md-table th { font-weight: 400; color: var(--text-2); text-align: left; padding: 8px 14px 8px 0; border-bottom: 0.5px solid var(--line); }
.md-table td { padding: 10px 16px 10px 0; border-bottom: 0.5px solid var(--line); white-space: normal; min-width: 120px; max-width: 240px; vertical-align: top; }
.md-table td:first-child, .md-table th:first-child { min-width: 64px; }
.msg.noavatar .bubble.task { max-width: 100%; }

/* 面对面建群 */
.fg-page { background: var(--bg); text-align: center; }
.fg-tip { padding: 32px 24px 24px; color: var(--text-2); font-size: 16px; line-height: 1.6; }
.fg-dots { display: flex; justify-content: center; gap: 28px; margin-bottom: 24px; }
.fg-dot { width: 28px; height: 36px; display: grid; place-items: end center; font-size: 30px; font-weight: 500; position: relative; }
.fg-dot::after { content: ""; position: absolute; bottom: 0; width: 14px; height: 14px; border-radius: 50%; background: var(--surface); box-shadow: inset 0 0 0 1px var(--brand); }
.fg-dot.on::after { display: none; }
.fg-members { background: transparent; }
.keypad { flex: none; display: grid; grid-template-columns: repeat(3, 1fr); background: var(--line); gap: 0.5px; padding-bottom: env(safe-area-inset-bottom); }
.keypad button { height: 64px; background: var(--surface); font-size: 26px; display: grid; place-items: center; }
.keypad button:active { background: var(--press); }
.keypad button:disabled { background: var(--surface); }
.af-qr { display: flex; justify-content: center; padding: 40px 0 12px; }
.af-qr svg.qr { width: 200px; height: 200px; border-radius: 12px; background: #fff; padding: 12px; }
/* 扫一扫 */
.scan-page { position: absolute; inset: 0; background: #000; overflow: hidden; }
.scan-page video { width: 100%; height: 100%; object-fit: cover; }
.scan-line { position: absolute; left: 10%; right: 10%; height: 2px; background: linear-gradient(90deg, transparent, #07C160, transparent); box-shadow: 0 0 12px #07C160; animation: scanmove 2.4s ease-in-out infinite; }
@keyframes scanmove { 0% { top: 22%; opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } 100% { top: 62%; opacity: 0; } }
.scan-close { position: absolute; top: calc(16px + env(safe-area-inset-top)); left: 16px; width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,.85); color: #191919; display: grid; place-items: center; }
.scan-tip { position: absolute; left: 0; right: 0; bottom: 150px; text-align: center; color: rgba(255,255,255,.85); font-size: 14px; padding: 0 24px; }
.scan-my { position: absolute; left: 16px; bottom: calc(40px + env(safe-area-inset-bottom)); display: flex; align-items: center; gap: 10px; padding: 10px 20px 10px 14px; border-radius: 30px; background: rgba(60,60,60,.75); color: #fff; }
.scan-my b { display: block; font-size: 16px; font-weight: 500; }
.scan-my small { display: block; font-size: 12px; color: rgba(255,255,255,.7); }
.scan-album { position: absolute; right: 16px; bottom: calc(40px + env(safe-area-inset-bottom)); width: 56px; height: 56px; border-radius: 50%; background: rgba(60,60,60,.75); color: #fff; display: grid; place-items: center; }

/* 合并展示的多图：折叠时顶部卡片为第一张图 */
.album .album-first { width: 100%; height: 100%; object-fit: cover; }
.album { width: 150px; height: 200px; }
/* 聊天记录详情 */
.mr-item { display: flex; gap: 10px; padding: 14px 16px 0; }
.mr-item.same { padding-top: 6px; }
.mr-av { width: 40px; flex: none; }
.mr-body { flex: 1; min-width: 0; padding-bottom: 14px; border-bottom: 0.5px solid var(--line); }
.mr-head { display: flex; justify-content: space-between; font-size: 14px; color: var(--text-2); margin-bottom: 6px; }
.mr-text { font-size: 16px; white-space: pre-wrap; word-break: break-word; }
.mr-body .merged-msg { margin-top: 4px; background: var(--bubble-other); }
.mr-file { display: flex; gap: 10px; align-items: center; width: 240px; padding: 12px; margin-top: 4px; border-radius: 6px; background: var(--bubble-other); color: var(--text); }
.mr-file .mrf-body { flex: 1; min-width: 0; }
.mr-file .mrf-name { font-size: 15px; word-break: break-all; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mr-file .mrf-size { font-size: 12px; color: var(--text-3); margin-top: 4px; }
.mr-file .file-icon { width: 40px; height: 48px; flex: none; }
.mr-img { min-width: 60px; min-height: 60px; object-fit: cover; background: var(--bubble-other); max-width: 160px; max-height: 220px; border-radius: 6px; display: block; margin-top: 4px; cursor: pointer; }

/* 会话列表长按菜单（按住位置弹出） */
.pop-menu { position: fixed; z-index: 60; min-width: 160px; padding: 6px 0; border-radius: 6px; background: var(--menu); box-shadow: 0 6px 24px rgba(0,0,0,.3); animation: pop .12s ease-out; }
.pop-menu button { display: block; width: 100%; text-align: left; padding: 0 24px; height: 56px; color: #fff; font-size: 17px; }
.pop-menu button:active { background: rgba(255,255,255,.08); }
/* 全屏覆盖页（查看聊天记录） */
.full-page { position: fixed; inset: 0; z-index: 55; max-width: 560px; margin: 0 auto; display: flex; flex-direction: column; background: var(--bg); animation: slidein .22s cubic-bezier(.2,.8,.2,1); }
.full-page.leaving { animation: slideout .18s ease-in forwards; }
@keyframes slidein { from { transform: translateX(40%); opacity: .4; } }
@keyframes slideout { to { transform: translateX(100%); opacity: 0; } }

/* 右上角「+」下拉菜单 */
.drop-menu { position: fixed; z-index: 60; min-width: 168px; padding: 4px 0; border-radius: 8px; background: var(--menu); box-shadow: 0 6px 24px rgba(0,0,0,.3); animation: pop .12s ease-out; transform-origin: top right; }
.drop-menu .dm-arrow { position: absolute; top: -12px; border: 6px solid transparent; border-bottom-color: var(--menu); }
.drop-menu button { display: flex; align-items: center; gap: 14px; width: 100%; height: 56px; padding: 0 22px 0 18px; color: #fff; font-size: 17px; position: relative; }
.drop-menu button + button::before { content: ""; position: absolute; top: 0; left: 56px; right: 0; border-top: 0.5px solid rgba(255,255,255,.12); }
.drop-menu button:active { background: rgba(255,255,255,.08); }
.drop-menu .dm-icon { width: 24px; display: grid; place-items: center; }

/* 长按文字：绿色选中（参照微信） */
.bubble[data-text]::selection, .bubble[data-text] *::selection { background: rgba(7, 193, 96, 0.45); color: inherit; }
.msg.me .bubble[data-text]::selection, .msg.me .bubble[data-text] *::selection { background: rgba(0, 90, 40, 0.35); }
.translated { max-width: 100%; white-space: pre-wrap; word-break: break-word; }
.translated .tr-foot { margin-top: 4px; font-size: 11px; color: var(--text-3); }

/* 拍一拍：头像抖动 + 头像上方的提示气泡 */
.avatar.shake { animation: shake .6s cubic-bezier(.36,.07,.19,.97); }
@keyframes shake {
  10%, 90% { transform: translateX(-1px) rotate(-2deg); }
  20%, 80% { transform: translateX(3px) rotate(4deg); }
  30%, 50%, 70% { transform: translateX(-5px) rotate(-6deg); }
  40%, 60% { transform: translateX(5px) rotate(6deg); }
}
.pat-tip { position: fixed; z-index: 58; display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-radius: 8px; background: var(--menu); color: #fff; font-size: 15px; white-space: nowrap; box-shadow: 0 4px 16px rgba(0,0,0,.25); animation: pop .15s ease-out; }
.pat-tip::after { content: ""; position: absolute; bottom: -12px; left: var(--ax, 20px); border: 6px solid transparent; border-top-color: var(--menu); }
.pat-tip button { color: #7D90A9; font-size: 15px; }

/* 分享面板（参照微信） */
.share-sheet { background: #2C2C2C; color: #fff; border-radius: 12px 12px 0 0; padding: 16px 0 calc(env(safe-area-inset-bottom)); }
.ss-title { font-size: 13px; color: rgba(255,255,255,.6); padding: 0 16px 12px; }
.ss-recent { display: flex; gap: 14px; overflow-x: auto; padding: 0 16px 16px; border-bottom: 0.5px solid rgba(255,255,255,.1); }
.ss-recent button { width: 56px; flex: none; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 11px; color: rgba(255,255,255,.7); }
.ss-recent button span { width: 56px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: center; }
.ss-row { display: flex; gap: 14px; overflow-x: auto; padding: 16px 16px 12px; border-bottom: 0.5px solid rgba(255,255,255,.1); }
.ss-row button { width: 60px; flex: none; display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 11px; color: rgba(255,255,255,.7); line-height: 1.3; text-align: center; }
.ss-icon { width: 52px; height: 52px; border-radius: 12px; background: #3A3A3A; display: grid; place-items: center; color: #fff; }
.ss-cancel { display: block; width: 100%; height: 56px; color: #fff; font-size: 17px; margin-top: 8px; background: #2C2C2C; }
.sent-pill { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(90px + env(safe-area-inset-bottom)); z-index: 95; width: min(340px, calc(100% - 32px)); display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-radius: 22px; background: rgba(60,60,60,.95); color: #fff; font-size: 15px; animation: pop .15s ease-out; }
.sent-pill span { display: flex; align-items: center; gap: 6px; }
.sent-pill a { color: rgba(255,255,255,.75); font-size: 14px; }
/* 图片查看器底部按钮 */
.vw-tools { position: absolute; right: 12px; bottom: calc(20px + env(safe-area-inset-bottom)); display: flex; gap: 10px; }
.vw-tools button { width: 36px; height: 36px; border-radius: 50%; background: #3c3c3c; color: #fff; display: grid; place-items: center; }
.vw-tools svg { width: 20px; height: 20px; }
/* 文件预览 */
.xl-tabs { position: sticky; top: 0; z-index: 2; display: flex; gap: 4px; padding: 0 8px; background: var(--surface); border-bottom: 0.5px solid var(--line); overflow-x: auto; }
.xl-tabs button { padding: 12px 10px; font-size: 15px; color: var(--text); white-space: nowrap; }
.xl-tabs button.active { color: var(--brand); box-shadow: inset 0 -2px 0 var(--brand); }
.xl-wrap { overflow: auto; background: #fff; }
.xl { border-collapse: collapse; font-size: 13px; color: #191919; background: #fff; }
.xl th { background: #F5F5F5; color: #888; font-weight: 400; font-size: 11px; border: 0.5px solid #E0E0E0; padding: 2px 4px; position: sticky; top: 0; z-index: 1; }
.xl th.xl-rn { position: sticky; left: 0; top: auto; min-width: 32px; }
.xl th.xl-corner { left: 0; z-index: 2; }
.xl td { border: 0.5px solid #E6E6E6; padding: 4px 6px; vertical-align: middle; white-space: pre-wrap; word-break: break-word; }
.xl td img { max-width: 100%; max-height: 160px; display: block; margin: 0 auto; }
.doc-page { padding: 20px 18px 40px; background: #fff; color: #191919; font-size: 16px; line-height: 1.7; }
.doc-page img { max-width: 100%; }
.doc-page table { border-collapse: collapse; max-width: 100%; display: block; overflow-x: auto; }
.doc-page td, .doc-page th { border: 0.5px solid #ddd; padding: 4px 8px; }
.pdf-frame { width: 100%; height: 100%; border: 0; display: block; background: #fff; }
.text-page { margin: 0; padding: 16px; font: 13px/1.6 ui-monospace, Menlo, Consolas, monospace; white-space: pre-wrap; word-break: break-all; }
/* 表格预览整页白底（参照微信，不跟随深色模式） */
.page.sheet-mode { background: #fff; }
.sheet-mode .xl-tabs { background: #fff; border-bottom-color: #E6E6E6; }
.sheet-mode .xl-tabs button { color: #191919; }
.sheet-mode .xl-tabs button.active { color: #07C160; }

/* ---------- 朋友资料 / 朋友设置 / 设置备注（对照微信） ---------- */
.btn-primary.sm { width: auto; height: 32px; padding: 0 14px; font-size: 15px; border-radius: 6px; margin: 0; }
.profile-head .ph-star { color: #F6A23B; display: inline-flex; }
.profile-head .ph-star svg { width: 18px; height: 18px; fill: currentColor; }
.friend-info { cursor: pointer; align-items: flex-start; padding-top: 14px; padding-bottom: 14px; }
.friend-info .fi-desc { white-space: normal; margin-top: 8px; line-height: 1.5; }
.fi-row { display: flex; gap: 16px; margin-top: 10px; font-size: 15px; }
.fi-row > span { flex: none; width: 40px; color: var(--text-2); }
.fi-row > div { flex: 1; min-width: 0; }
.fi-memo { white-space: pre-wrap; word-break: break-word; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.check-mark { color: var(--brand); display: inline-flex; }
.check-mark svg { width: 20px; height: 20px; }
.chip.on { background: rgba(7,193,96,.15); color: var(--brand); }
.remark-page { padding: 0 24px 40px; }
.remark-page h2 { text-align: center; font-size: 22px; font-weight: 500; margin: 16px 0 28px; }
.remark-page label { display: block; font-size: 15px; color: var(--text-2); margin: 22px 4px 8px; }
.remark-page .rm-input { outline: none; display: block; width: 100%; padding: 14px 16px; border: 0; border-radius: 8px; background: var(--surface); color: var(--text); font-size: 17px; resize: none; font-family: inherit; }
.remark-page .rm-suggest { margin: 10px 4px 0; font-size: 15px; min-height: 0; }
.remark-page .rm-box { display: flex; flex-direction: column; width: 100%; border-radius: 8px; background: var(--surface); overflow: hidden; }
.remark-page .rm-tags { flex-direction: row; align-items: center; padding: 14px 16px; font-size: 17px; gap: 8px; }
.remark-page .rm-chips { flex: 1; display: flex; flex-wrap: wrap; gap: 6px; }
.remark-page .rm-phone { display: flex; align-items: center; gap: 12px; padding: 0 16px; border-bottom: 0.5px solid var(--line); }
.remark-page .rm-phone input { outline: none; flex: 1; height: 52px; border: 0; background: transparent; color: var(--text); font-size: 17px; }
.remark-page .rm-minus { width: 22px; height: 22px; border-radius: 50%; background: var(--danger); color: #fff; font-size: 18px; line-height: 20px; flex: none; }
.remark-page .rm-add { display: flex; align-items: center; gap: 12px; height: 56px; padding: 0 16px; color: var(--link); font-size: 17px; }
.remark-page .rm-add svg { width: 26px; height: 26px; color: var(--text-2); }
.remark-page .rm-photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.remark-page .rm-photo { aspect-ratio: 1; border-radius: 8px; overflow: hidden; background: var(--surface); }
.remark-page .rm-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.remark-page .rm-photo.add { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: var(--link); font-size: 15px; }
.remark-page .rm-photo.add svg { width: 26px; height: 26px; color: var(--text-2); }
.tag-picker { flex: 1; overflow: auto; }
.tag-input { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px 16px; background: var(--surface); }
.tag-input input { outline: none; flex: 1; min-width: 120px; border: 0; background: transparent; color: var(--text); font-size: 16px; height: 28px; }
.tag-all { display: flex; flex-wrap: wrap; gap: 8px; padding: 4px 16px 16px; }
.tag-all .chip, .tag-input .chip { padding: 4px 12px; font-size: 15px; border-radius: 14px; }

/* ---------- 状态（对照微信「设个状态」） ---------- */
.status-page { background: radial-gradient(circle at 50% 50%, transparent 0 159px, var(--line) 160px, transparent 161px 269px, var(--line) 270px, transparent 271px), var(--bg); }
.st-nav { display: flex; align-items: center; height: 64px; padding: calc(env(safe-area-inset-top)) 8px 0; position: sticky; top: 0; z-index: 1; background: var(--bg); }
.st-title { flex: 1; text-align: center; font-size: 18px; font-weight: 500; margin-right: 44px; }
.st-title span { display: block; font-size: 13px; font-weight: 400; color: var(--text-2); margin-top: 2px; }
.st-body { display: flex; flex-direction: column; gap: 10px; padding: 4px 12px 32px; }
.st-card { background: var(--surface); border-radius: 10px; padding: 14px 8px 18px; }
.st-custom { display: flex; flex-direction: column; align-items: center; gap: 10px; width: 100%; padding: 36px 0; color: var(--text-2); font-size: 14px; }
.st-ring { width: 26px; height: 26px; border: 2.5px solid var(--text-2); border-radius: 50%; }
.st-group { padding: 0 8px 14px; font-size: 15px; color: var(--text-3); }
.st-grid { display: grid; grid-template-columns: repeat(5, 1fr); row-gap: 22px; }
.st-grid button { display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); }
.st-emoji { font-size: 26px; line-height: 1; filter: grayscale(1) brightness(1.2); }
.st-intro { display: flex; flex-direction: column; align-items: center; justify-content: space-between; min-height: 100%; height: 100dvh; box-sizing: border-box; padding: 28vh 0 12vh; }
.st-intro h2 { font-size: 24px; font-weight: 500; text-align: center; }
.st-intro p { margin-top: 10px; font-size: 16px; color: var(--text-2); text-align: center; }
.st-intro-ok { width: 200px; height: 44px; border-radius: 8px; background: var(--press); color: var(--text); font-size: 17px; }
.st-head { display: flex; gap: 22px; padding: 16px; }
.st-me { display: inline-flex; flex-direction: column; align-items: center; gap: 6px; font-size: 14px; color: var(--text-2); }
.st-add { width: 44px; height: 44px; border: 1px dashed var(--text-3); border-radius: 50%; display: grid; place-items: center; }
.st-me-icon { width: 44px; height: 44px; display: grid; place-items: center; font-size: 24px; border-radius: 50%; }
.st-list { min-height: 60vh; border-radius: 12px 12px 0 0; background: var(--surface); }
.st-row { display: flex; gap: 16px; padding: 18px 0 0 16px; }
.st-row-icon { width: 28px; flex: none; font-size: 22px; text-align: center; }
.st-row-body { flex: 1; min-width: 0; padding: 0 16px 16px 0; border-bottom: 0.5px solid var(--line); }
.st-row-title { margin-bottom: 12px; font-size: 17px; }
.st-users { display: flex; flex-wrap: wrap; gap: 14px; }
.st-users a, .st-users button { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 56px; font-size: 13px; color: var(--text-2); }
.st-users a span, .st-users button span { max-width: 56px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 「我」页：设了状态后头部铺状态背景 */
.me-head-wrap { background: var(--surface); }
.me-head-wrap.has-status .me-head { background: transparent; padding-bottom: 18px; }
.me-head-wrap.has-status .mh-name, .me-head-wrap.has-status .mh-qr, .me-head-wrap.has-status .cell-arrow { color: #fff; }
.me-head-wrap.has-status .mh-id { color: rgba(255,255,255,.8); }
.mh-status { margin: 0 16px 0 20px; padding: 14px 0 18px; border-top: 0.5px solid rgba(255,255,255,.35); }
.mh-note { margin-bottom: 10px; font-size: 20px; font-weight: 500; color: #fff; white-space: pre-wrap; word-break: break-word; }
.mh-srow { display: flex; align-items: center; justify-content: space-between; }
.mh-schip { display: inline-flex; align-items: center; gap: 6px; font-size: 15px; color: rgba(255,255,255,.9); }
.mh-schip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--danger); display: inline-block; }
.mh-smore { width: 40px; height: 28px; border-radius: 14px; background: rgba(255,255,255,.25); color: #fff; display: grid; place-items: center; }
.mh-smore svg { width: 18px; height: 18px; }
.st-chev { margin-left: 2px; opacity: .8; font-size: 18px; line-height: 1; }

/* 选状态页：缓慢变换的渐变背景，卡片半透明 */
.status-page.colorful { color: #fff; background: linear-gradient(-45deg, #E8A87C, #C38D9E, #8FA9C9, #A7C957, #E9C46A); background-size: 400% 400%; animation: st-hue 20s ease infinite; }
@keyframes st-hue { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }
.colorful .st-nav { position: static; background: transparent; }
.colorful .nav-btn { color: #fff; }
.colorful .st-title span { color: rgba(255,255,255,.75); }
.colorful .st-card { background: rgba(255,255,255,.14); }
.colorful .st-group { color: rgba(255,255,255,.6); }
.colorful .st-grid button, .colorful .st-custom { color: rgba(255,255,255,.92); }
.colorful .st-emoji { filter: grayscale(1) brightness(2.4); }
.colorful .st-ring { border-color: #fff; }
.st-recent { display: flex; align-items: center; gap: 18px; padding: 6px 4px; overflow-x: auto; font-size: 15px; color: rgba(255,255,255,.75); }
.st-recent button { display: inline-flex; align-items: center; gap: 6px; flex: none; font-size: 15px; color: rgba(255,255,255,.92); }
.st-recent .st-emoji { font-size: 18px; }

/* 发状态页 */
.st-compose { display: flex; flex-direction: column; height: 100dvh; padding: 0; background: #191919; }
.st-canvas { position: relative; flex: 1; display: flex; flex-direction: column; padding: calc(12px + env(safe-area-inset-top)) 24px 24px; border-radius: 0 0 18px 18px; }
.st-x { color: #fff; margin-left: -12px; }
.st-chip { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; height: 36px; margin-top: 16px; padding: 0 14px; border-radius: 18px; background: rgba(255,255,255,.25); color: #fff; font-size: 16px; font-weight: 500; }
.st-say { margin: auto 0 30%; }
.st-say textarea { width: 100%; border: 0; outline: none; resize: none; background: transparent; color: #fff; font-family: inherit; font-size: 24px; font-weight: 500; line-height: 1.4; }
.st-say textarea::placeholder { color: rgba(255,255,255,.6); }
.st-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 8px; }
.st-topic { height: 32px; padding: 0 12px; border: 1px solid rgba(255,255,255,.55); border-radius: 16px; color: #fff; font-size: 15px; }
.st-loc { display: inline-flex; align-items: center; gap: 4px; color: #fff; font-size: 14px; }
.st-loc svg, .st-d-loc svg { width: 16px; height: 16px; }
.st-bar { display: flex; align-items: center; gap: 28px; padding: 14px 24px calc(14px + env(safe-area-inset-bottom)); background: #191919; }
.st-bar button { display: flex; flex-direction: column; align-items: center; gap: 4px; color: #fff; font-size: 13px; }
.st-bar button svg { width: 26px; height: 26px; }
.st-bar .st-go { flex-direction: row; height: 40px; margin-left: auto; padding: 0 18px; border-radius: 6px; background: var(--brand); font-size: 17px; font-weight: 500; }

/* 状态详情 */
.st-detail { position: absolute; inset: 0; display: flex; flex-direction: column; padding: calc(8px + env(safe-area-inset-top)) 24px calc(28px + env(safe-area-inset-bottom)); color: #fff; }
.st-d-top { display: flex; justify-content: space-between; margin: 0 -12px; }
.st-d-top .nav-btn { color: #fff; }
.st-d-body { margin: auto 0; }
.st-d-status { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: 18px; background: rgba(255,255,255,.25); font-size: 16px; font-weight: 500; }
.st-d-note { margin-top: 20px; font-size: 26px; font-weight: 500; line-height: 1.4; white-space: pre-wrap; word-break: break-word; }
.st-d-loc { display: flex; align-items: center; gap: 4px; margin-top: 14px; font-size: 14px; opacity: .85; }
.st-d-user { display: flex; align-items: center; gap: 10px; color: #fff; font-size: 15px; }
.st-d-time { margin-left: auto; font-size: 13px; opacity: .75; }

/* 滚动指示条：滚动时出现，停下后淡出 */
.scroll-ind { position: fixed; z-index: 300; width: 3px; border-radius: 2px; background: rgba(128,128,128,.6); pointer-events: none; opacity: 0; transition: opacity .5s; }
.scroll-ind.on { opacity: 1; transition: opacity .1s; }

/* 强制更新弹框在最上层，不能点背景关闭 */
.update-mask { z-index: 1000; }

