/* ===== SafeChat 基础样式：变量 / 重置 / 通用组件 ===== */
:root {
  --bg-deep: #0b1218;
  --bg-rail: #0e1621;
  --bg-list: #17212b;
  --bg-chat: #0e1621;
  --bg-head: #17212b;
  --bg-hover: #202b36;
  --bg-active: #2b5278;
  --bg-input: #242f3d;
  --bubble-in: #182533;
  --bubble-out: #2b5278;
  --txt: #e9eef4;
  --txt-2: #8b9bab;
  --txt-3: #63707d;
  --accent: #3390ec;
  --accent-2: #4fc3f7;
  --danger: #ef5350;
  --ok: #4caf50;
  --warn: #ffb300;
  --line: rgba(255, 255, 255, .07);
  --line-strong: rgba(255, 255, 255, .12);
  --bg-elevated: #1a2430;
  --hover-soft: rgba(255, 255, 255, .06);
  --sep-bg: rgba(14, 22, 33, .72);
  --thumb-bg: rgba(0, 0, 0, .18);
  --toast-bg: rgba(30, 42, 54, .96);
  --auth-card: rgba(23, 33, 43, .92);
  --link: #4fc3f7;
  --online: #64d2a0;
  --accent-dark: #2b82d8;
  --radius: 12px;
  --radius-lg: 16px;
  --shadow: 0 12px 40px rgba(0, 0, 0, .45);
  --rail-w: 68px;
  --list-w: 348px;
  --ease: cubic-bezier(.22, .61, .36, 1);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}

[data-theme="light"] {
  --bg-deep: #eaeff5;
  --bg-rail: #ffffff;
  --bg-list: #ffffff;
  --bg-chat: #e8eef4;
  --bg-head: #ffffff;
  --bg-hover: #eff4f9;
  --bg-active: #d9ebff;
  --bg-input: #f1f4f8;
  --bubble-in: #ffffff;
  --bubble-out: #d3e8ff;
  --txt: #17222e;
  --txt-2: #5f7183;
  --txt-3: #93a3b3;
  --line: rgba(16, 32, 48, .09);
  --line-strong: rgba(16, 32, 48, .16);
  --shadow: 0 12px 40px rgba(20, 40, 70, .16);
  --bg-elevated: #ffffff;
  --hover-soft: rgba(16, 32, 48, .055);
  --sep-bg: rgba(255, 255, 255, .9);
  --thumb-bg: rgba(16, 32, 48, .06);
  --toast-bg: rgba(255, 255, 255, .98);
  --auth-card: rgba(255, 255, 255, .94);
  --link: #1f7ad4;
  --online: #128a5c;
  --accent-dark: #2b82d8;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; margin: 0; }
body {
  font: 14px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Roboto", sans-serif;
  background: var(--bg-deep);
  color: var(--txt);
  overflow: hidden;
  overscroll-behavior: none;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, p { margin: 0; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
input, textarea { outline: none; border: 0; background: none; }
.hidden { display: none !important; }
::selection { background: rgba(51, 144, 236, .35); }

/* 滚动条 */
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-thumb { background: rgba(140, 160, 180, .28); border-radius: 8px; }
*::-webkit-scrollbar-thumb:hover { background: rgba(140, 160, 180, .45); }
*::-webkit-scrollbar-track { background: transparent; }

/* ---------- 通用按钮 ---------- */
.btn {
  border-radius: 10px; padding: 9px 16px; font-weight: 600; font-size: 14px;
  background: var(--bg-input); color: var(--txt); transition: filter .15s, background .15s, transform .08s;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap;
}
.btn:hover { filter: brightness(1.12); }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-dark); }
.btn.ghost { background: transparent; border: 1px solid var(--line-strong); }
.btn.danger { background: var(--danger); color: #fff; }
.btn.big { width: 100%; padding: 12px; font-size: 15px; border-radius: 12px; }
.btn:disabled { opacity: .5; cursor: default; transform: none; }

.icon-btn {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  color: var(--txt-2); transition: background .15s, color .15s;
}
.icon-btn svg { width: 22px; height: 22px; }
.icon-btn:hover { background: var(--bg-hover); color: var(--txt); }
.icon-btn.active { color: var(--accent); background: rgba(51, 144, 236, .12); }

/* ---------- 头像 ---------- */
.avatar {
  width: 46px; height: 46px; border-radius: 50%; flex: 0 0 auto; overflow: hidden;
  display: grid; place-items: center; font-weight: 600; color: #fff; font-size: 17px;
  background: #3a5f7d; user-select: none; position: relative;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.sm { width: 34px; height: 34px; font-size: 13px; }
.avatar.lg { width: 72px; height: 72px; font-size: 26px; }
.avatar.xl { width: 108px; height: 108px; font-size: 38px; }
.avatar.group { border-radius: 50%; }
.avatar .online-dot {
  position: absolute; right: 1px; bottom: 1px; width: 12px; height: 12px; border-radius: 50%;
  background: var(--ok); border: 2.5px solid var(--bg-list);
}
.avatar.sm .online-dot { width: 9px; height: 9px; border-width: 2px; }

/* ---------- 输入 ---------- */
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: 12px; color: var(--txt-2); margin-bottom: 6px; font-weight: 600; letter-spacing: .3px; }
.field input, .field textarea {
  width: 100%; background: var(--bg-input); border: 1px solid transparent; border-radius: 10px;
  padding: 12px 14px; font-size: 14.5px; transition: border-color .15s, background .15s;
}
.field input:focus, .field textarea:focus { border-color: var(--accent); background: rgba(51, 144, 236, .08); }
.field input::placeholder, .field textarea::placeholder { color: var(--txt-3); }
.checkbox { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--txt-2); margin: 4px 0 12px; cursor: pointer; }
.checkbox input { width: 16px; height: 16px; accent-color: var(--accent); }
.auth-error { color: var(--danger); font-size: 13px; min-height: 18px; margin: 2px 0 8px; }

/* ---------- 登录页 ---------- */
.auth {
  position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 24px; z-index: 50; overflow: auto;
}
.auth-bg {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(1000px 600px at 15% 10%, rgba(51, 144, 236, .28), transparent 60%),
    radial-gradient(900px 700px at 85% 90%, rgba(79, 195, 247, .18), transparent 60%),
    linear-gradient(160deg, #0a1016, #101a24 50%, #0a1016);
}
.auth-card {
  width: 100%; max-width: 400px; background: var(--auth-card); border: 1px solid var(--line);
  border-radius: 20px; padding: 26px 24px 20px; box-shadow: var(--shadow); backdrop-filter: blur(18px);
}
.auth-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.brand-logo { width: 52px; height: 52px; display: grid; place-items: center; background: rgba(51, 144, 236, .12); border-radius: 15px; }
.auth-brand h1 { font-size: 21px; letter-spacing: .4px; }
.auth-brand p { font-size: 12px; color: var(--txt-2); margin-top: 3px; }
.auth-tabs { display: flex; background: var(--bg-input); border-radius: 11px; padding: 4px; margin-bottom: 20px; }
.auth-tab { flex: 1; padding: 9px; border-radius: 8px; font-weight: 600; color: var(--txt-2); transition: .15s; }
.auth-tab.active { background: var(--accent); color: #fff; box-shadow: 0 4px 14px rgba(51, 144, 236, .35); }
.auth-hint { font-size: 11.5px; color: var(--txt-3); line-height: 1.6; margin-top: 12px; text-align: center; }
.auth-foot { margin-top: 18px; font-size: 11.5px; color: var(--txt-3); }
.pw-meter { display: flex; gap: 5px; margin: -6px 0 12px; }
.pw-meter i { height: 3px; flex: 1; background: var(--bg-input); border-radius: 3px; transition: background .2s; }
.pw-meter.s1 i:nth-child(1) { background: var(--danger); }
.pw-meter.s2 i:nth-child(-n+2) { background: var(--warn); }
.pw-meter.s3 i:nth-child(-n+3) { background: #8bc34a; }
.pw-meter.s4 i { background: var(--ok); }

/* ---------- 消息气泡 ---------- */
.msg-row { display: flex; gap: 8px; padding: 1px 14px; margin-bottom: 3px; align-items: flex-end; animation: msgIn .18s var(--ease); }
@keyframes msgIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.msg-row.out { flex-direction: row-reverse; }
.msg-row .avatar { width: 32px; height: 32px; font-size: 13px; margin-bottom: 2px; }
.msg-row.out .avatar { display: none; }
.msg-col { max-width: min(600px, 74%); display: flex; flex-direction: column; }
.msg-row.out .msg-col { align-items: flex-end; }
.msg-sender { font-size: 12px; font-weight: 600; color: var(--link); margin: 2px 6px 3px; }
.bubble {
  position: relative; padding: 7px 11px 6px; border-radius: 12px; background: var(--bubble-in);
  font-size: 14.5px; line-height: 1.42; word-break: break-word; white-space: pre-wrap; max-width: 100%;
  box-shadow: 0 1px 1px rgba(0, 0, 0, .12);
}
.msg-row.out .bubble { background: var(--bubble-out); border-bottom-right-radius: 4px; }
.msg-row.in .bubble { border-bottom-left-radius: 4px; }
.bubble a { color: var(--link); text-decoration: none; }
.bubble a:hover { text-decoration: underline; }
.msg-meta { font-size: 11px; color: var(--txt-3); margin: 3px 4px 0; display: flex; align-items: center; gap: 4px; white-space: nowrap; }
.msg-row.out .msg-meta { justify-content: flex-end; }
.msg-meta .ticks { display: inline-flex; letter-spacing: -1px; }
.msg-meta .ticks.read { color: var(--accent-2); }
.msg-meta .pending { opacity: .6; }
.msg-meta .failed { color: var(--danger); font-weight: 700; }
.msg-sep { text-align: center; margin: 14px 0 10px; }
.msg-sep span { font-size: 11.5px; color: var(--txt-2); background: var(--sep-bg); padding: 3px 12px; border-radius: 20px; backdrop-filter: blur(6px); }
.msg-system { text-align: center; margin: 6px 0; }
.msg-system span { font-size: 12px; color: var(--txt-2); background: var(--sep-bg); padding: 4px 12px; border-radius: 20px; }
.msg-deleted { font-style: italic; opacity: .6; }
.bubble.file-card { padding: 0; overflow: hidden; min-width: 220px; }
.file-row { display: flex; align-items: center; gap: 11px; padding: 10px 12px; }
.file-ico { width: 40px; height: 40px; border-radius: 9px; background: var(--accent); color: #fff; display: grid; place-items: center; font-size: 16px; flex: 0 0 auto; }
.file-name { font-size: 13.5px; font-weight: 600; word-break: break-all; }
.file-size { font-size: 11.5px; color: var(--txt-2); margin-top: 2px; }
.file-dl { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: var(--txt-2); }
.file-dl:hover { background: var(--hover-soft); color: var(--txt); }

/* 图片消息 */
.bubble.media { padding: 3px; background: var(--bubble-in); overflow: hidden; width: fit-content; max-width: 100%; }
.msg-row.out .bubble.media { background: var(--bubble-out); }
.img-single { display: block; border-radius: 10px; overflow: hidden; position: relative; max-width: 320px; background: var(--thumb-bg); cursor: zoom-in; }
.img-single img { display: block; width: 100%; height: auto; max-height: 420px; object-fit: cover; }
.img-single .img-ph, .album-cell .img-ph {
  width: 220px; height: 150px; display: grid; place-items: center; color: var(--txt-3); font-size: 12px;
  background: repeating-linear-gradient(45deg, rgba(255,255,255,.03) 0 10px, rgba(255,255,255,.06) 10px 20px);
}
.album {
  display: grid; gap: 3px; border-radius: 10px; overflow: hidden; width: 100%; min-width: 236px; max-width: 306px;
}
.album.c1 { grid-template-columns: 1fr; }
.album.c2 { grid-template-columns: 1fr 1fr; }
.album.c3 { grid-template-columns: 1fr 1fr 1fr; }
.album-cell { position: relative; overflow: hidden; background: var(--thumb-bg); cursor: zoom-in; aspect-ratio: 1; }
.album-cell img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.album-cell:hover img { transform: scale(1.03); }
.album-cell .img-ph { width: 100%; height: 100%; }
.album-more { position: absolute; inset: 0; background: rgba(0, 0, 0, .55); display: grid; place-items: center; font-size: 20px; font-weight: 600; }
.bubble-caption { padding: 7px 9px 3px; font-size: 14px; }
.media-meta { display: flex; justify-content: flex-end; gap: 4px; padding: 2px 7px 4px; font-size: 11px; color: rgba(255, 255, 255, .62); }
[data-theme="light"] .media-meta { color: var(--txt-3); }

/* ---------- 弹层 ---------- */
.modal-host { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .6); backdrop-filter: blur(3px); animation: fade .16s; }
@keyframes fade { from { opacity: 0; } }
.modal {
  position: relative; width: min(520px, calc(100vw - 32px)); max-height: min(84vh, 760px); overflow: auto;
  background: var(--bg-list); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow);
  animation: pop .18s var(--ease); padding: 0;
}
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.98); } }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--bg-list); z-index: 2; }
.modal-head h3 { font-size: 16.5px; }
.modal-body { padding: 16px 18px 20px; }
.modal-foot { padding: 14px 18px; border-top: 1px solid var(--line); display: flex; gap: 10px; justify-content: flex-end; }
.modal .row { display: flex; align-items: center; gap: 12px; padding: 11px 4px; border-bottom: 1px solid var(--line); }
.modal .row:last-child { border-bottom: 0; }
.modal .row-title { font-size: 14px; }
.modal .row-sub { font-size: 12px; color: var(--txt-2); margin-top: 2px; }
.modal .row-click { cursor: pointer; border-radius: 8px; }
.modal .row-click:hover { background: var(--bg-hover); }

/* 提示 */
.toast-host { position: fixed; left: 50%; bottom: calc(28px + var(--safe-b)); transform: translateX(-50%); z-index: 120; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: var(--toast-bg); color: var(--txt); padding: 10px 18px; border-radius: 10px; font-size: 13.5px; box-shadow: var(--shadow); animation: toastIn .2s var(--ease); border: 1px solid var(--line); max-width: 80vw; }
.toast.err { background: rgba(198, 40, 40, .96); }
.toast.ok { background: rgba(46, 125, 50, .96); }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } }

/* 右键菜单 */
.ctx-menu { position: fixed; z-index: 130; background: var(--bg-elevated); border: 1px solid var(--line); border-radius: 10px; padding: 5px; min-width: 150px; box-shadow: var(--shadow); animation: pop .12s; }
.ctx-menu button { display: flex; width: 100%; align-items: center; gap: 9px; padding: 8px 11px; border-radius: 7px; font-size: 13.5px; text-align: left; }
.ctx-menu button:hover { background: var(--bg-hover); }
.ctx-menu button.danger { color: var(--danger); }

/* 大图查看 */
.lightbox { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; }
.lb-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .9); }
.lb-stage { position: relative; max-width: 92vw; max-height: 88vh; display: grid; place-items: center; }
.lb-stage img { max-width: 92vw; max-height: 88vh; border-radius: 8px; box-shadow: 0 20px 60px rgba(0, 0, 0, .6); }
.lb-close { position: absolute; top: 18px; right: 22px; color: #fff; font-size: 22px; opacity: .7; }
.lb-close:hover { opacity: 1; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); color: #fff; font-size: 44px; opacity: .45; padding: 10px 16px; }
.lb-nav:hover { opacity: 1; }
.lb-nav.prev { left: 8px; } .lb-nav.next { right: 8px; }

/* 空态 */
.chat-empty { flex: 1; display: grid; place-items: center; padding: 30px; text-align: center; }
.empty-inner { max-width: 360px; display: flex; flex-direction: column; align-items: center; gap: 12px; color: var(--txt-2); }
.empty-inner h3 { font-size: 17px; color: var(--txt); font-weight: 600; }
.empty-inner p { font-size: 13px; line-height: 1.65; }
.empty-inner .btn { margin-top: 6px; }

/* 通用列表项 */
.list-item { display: flex; gap: 11px; padding: 9px 12px; align-items: center; cursor: pointer; border-radius: 10px; position: relative; transition: background .12s; }
.list-item:hover { background: var(--bg-hover); }
.list-item.active { background: var(--bg-active); }
.list-item.active .li-preview, .list-item.active .li-time, .list-item.active .li-sub { color: rgba(255, 255, 255, .78); }
.li-body { flex: 1; min-width: 0; }
.li-top { display: flex; align-items: baseline; gap: 8px; }
.li-name { font-size: 14.5px; font-weight: 600; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.li-time { font-size: 11.5px; color: var(--txt-3); flex: 0 0 auto; }
.li-bot { display: flex; align-items: center; gap: 6px; margin-top: 2px; }
.li-preview { font-size: 13px; color: var(--txt-2); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.li-preview .me { color: var(--txt-3); }
.li-badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--accent); color: #fff; font-size: 11.5px; font-weight: 700; display: grid; place-items: center; }
.li-badge.muted { background: var(--txt-3); }
.li-sub { font-size: 12px; color: var(--txt-3); }
.section-label { font-size: 11.5px; font-weight: 700; color: var(--txt-3); text-transform: uppercase; letter-spacing: .8px; padding: 14px 14px 6px; }
.divider { height: 1px; background: var(--line); margin: 8px 0; }
.mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12.5px; letter-spacing: .5px; }
.pill { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; padding: 3px 9px; border-radius: 20px; background: rgba(76, 175, 80, .14); color: #7bd88f; }
.pill.warn { background: rgba(255, 179, 0, .14); color: #ffca4d; }
.pill.blue { background: rgba(51, 144, 236, .16); color: var(--accent-2); }
.spinner { width: 16px; height: 16px; border: 2px solid rgba(255, 255, 255, .25); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== 第二轮体验优化 ===== */
.msg-unread {
  display: flex; align-items: center; gap: 10px; margin: 12px 16px 8px;
  color: var(--accent-2); font-size: 11.5px; font-weight: 600;
}
.msg-unread::before, .msg-unread::after { content: ""; height: 1px; flex: 1; background: rgba(51, 144, 236, .38); }
.msg-row.hl .bubble, .msg-row.hl .bubble.media { animation: hlFlash 1.8s ease; }
@keyframes hlFlash {
  0%, 35% { box-shadow: 0 0 0 2px var(--accent); }
  100% { box-shadow: 0 1px 1px rgba(0,0,0,.12); }
}
.lb-actions { position: absolute; top: 16px; left: 20px; display: flex; gap: 8px; }
.lb-actions button {
  color: #fff; background: rgba(255,255,255,.12); border-radius: 9px; padding: 8px 12px;
  font-size: 13px; display: inline-flex; align-items: center; gap: 6px; backdrop-filter: blur(6px);
}
.lb-actions button:hover { background: rgba(255,255,255,.22); }
.att-chip .fn {
  position: absolute; inset: 0; display: grid; place-items: center; padding: 4px;
  font-size: 9.5px; color: var(--txt-2); text-align: center; word-break: break-all; line-height: 1.25;
  background: var(--bg-input);
}
.search-item { padding: 10px 12px; border-radius: 9px; cursor: pointer; }
.search-item:hover { background: var(--bg-hover); }
.search-item .st { font-size: 13.5px; }
.search-item .sm { font-size: 11.5px; color: var(--txt-2); margin-top: 3px; }
.search-item mark { background: rgba(51,144,236,.35); color: #fff; border-radius: 3px; padding: 0 2px; }
.kbd { font-size: 11px; background: var(--bg-input); border-radius: 4px; padding: 1px 5px; border: 1px solid var(--line-strong); }

/* ========================================================================
   浅色主题补丁：把仍然硬编码的深色逐项挑平（默认主题就是它）
   ======================================================================== */
[data-theme="light"] .auth-bg {
  background:
    radial-gradient(1000px 600px at 15% 10%, rgba(51, 144, 236, .18), transparent 60%),
    radial-gradient(900px 700px at 85% 90%, rgba(120, 190, 255, .24), transparent 60%),
    linear-gradient(160deg, #f8fbff, #e9f1f8 55%, #f4f8fc);
}
[data-theme="light"] .auth-brand h1 { color: #10202e; }
[data-theme="light"] .brand-logo { background: rgba(51, 144, 236, .10); }
[data-theme="light"] .auth-tabs { background: #eef3f8; }
[data-theme="light"] .auth-tab { color: var(--txt-2); }
[data-theme="light"] .auth-tab.active { color: #fff; }
[data-theme="light"] .field input,
[data-theme="light"] .field textarea { background: #f2f5f9; }
[data-theme="light"] .field input:focus,
[data-theme="light"] .field textarea:focus { background: #fff; box-shadow: inset 0 0 0 1px var(--accent); }
[data-theme="light"] .chat-panel {
  background-image:
    radial-gradient(circle at 12% 8%, rgba(51, 144, 236, .10), transparent 42%),
    radial-gradient(circle at 88% 92%, rgba(120, 190, 255, .16), transparent 45%);
}
[data-theme="light"] .composer { background: #f7fafd; }
[data-theme="light"] .composer textarea {
  background: #fff; box-shadow: 0 1px 2px rgba(16, 32, 48, .05), inset 0 0 0 1px rgba(16, 32, 48, .07);
}
[data-theme="light"] .composer textarea:focus { box-shadow: inset 0 0 0 1px rgba(51, 144, 236, .55); }
[data-theme="light"] .bubble,
[data-theme="light"] .bubble.media { box-shadow: 0 1px 3px rgba(16, 32, 48, .10); }
[data-theme="light"] .msg-row.out .bubble { color: #0b2236; }
[data-theme="light"] .msg-row.out .bubble a { color: #14589c; }
[data-theme="light"] .img-single .img-ph,
[data-theme="light"] .album-cell .img-ph {
  background: repeating-linear-gradient(45deg, rgba(16, 32, 48, .04) 0 10px, rgba(16, 32, 48, .07) 10px 20px);
  color: var(--txt-3);
}
[data-theme="light"] .media-meta { color: rgba(23, 34, 46, .5); }
[data-theme="light"] .msg-row.out .media-meta { color: rgba(11, 34, 54, .55); }
[data-theme="light"] .album-more { background: rgba(9, 20, 30, .45); color: #fff; }
[data-theme="light"] .modal-backdrop { background: rgba(16, 32, 48, .32); }
[data-theme="light"] .modal { box-shadow: 0 18px 50px rgba(20, 40, 70, .18); }
[data-theme="light"] .toast { box-shadow: 0 8px 26px rgba(20, 40, 70, .16); }
[data-theme="light"] .toast.err { background: rgba(211, 47, 47, .97); color: #fff; }
[data-theme="light"] .toast.ok { background: rgba(46, 125, 50, .97); color: #fff; }
[data-theme="light"] .scroll-down { background: #fff; box-shadow: 0 6px 18px rgba(20, 40, 70, .16); }
[data-theme="light"] .ctx-menu { background: #fff; box-shadow: 0 12px 34px rgba(20, 40, 70, .18); }
[data-theme="light"] .ctx-menu button:hover { background: #f2f6fa; }
[data-theme="light"] .rail { background: #fff; }
[data-theme="light"] .rail-btn.active { background: rgba(51, 144, 236, .10); }
[data-theme="light"] .list-item.active { background: var(--bg-active); }
[data-theme="light"] .list-item.active .li-name { color: #0d2a44; }
[data-theme="light"] .list-item.active .li-preview,
[data-theme="light"] .list-item.active .li-time { color: rgba(13, 42, 68, .62); }
[data-theme="light"] .search-wrap input { background: #f1f4f8; }
[data-theme="light"] .search-wrap input:focus { background: #fff; }
[data-theme="light"] .emoji-panel { background: #fff; box-shadow: 0 14px 40px rgba(20, 40, 70, .18); }
[data-theme="light"] .switch { background: rgba(16, 32, 48, .16); }
[data-theme="light"] .switch.on { background: var(--accent); }
[data-theme="light"] .att-chip { background: #eef3f8; }
[data-theme="light"] .reply-bar { background: rgba(51, 144, 236, .10); }
[data-theme="light"] .drop-hint { background: rgba(51, 144, 236, .10); }
[data-theme="light"] *::-webkit-scrollbar-thumb { background: rgba(60, 90, 120, .22); }
[data-theme="light"] *::-webkit-scrollbar-thumb:hover { background: rgba(60, 90, 120, .34); }
[data-theme="light"] .pill { background: rgba(18, 138, 92, .12); color: #10714c; }
[data-theme="light"] .pill.warn { background: rgba(255, 179, 0, .16); color: #9a6b00; }
[data-theme="light"] .pill.blue { background: rgba(51, 144, 236, .12); color: #1a6cbb; }
[data-theme="light"] .msg-unread { color: #1f7ad4; }
[data-theme="light"] .msg-unread::before,
[data-theme="light"] .msg-unread::after { background: rgba(31, 122, 212, .35); }
[data-theme="light"] .msg-sep span { backdrop-filter: blur(6px); }
[data-theme="light"] .search-item:hover { background: #f2f6fa; }
[data-theme="light"] .search-item mark { background: rgba(51, 144, 236, .22); color: #103a63; }
[data-theme="light"] .kbd { background: #f2f6fa; }
[data-theme="light"] .attr-chip,
[data-theme="light"] .skeleton { background: #eef3f8; }
[data-theme="light"] .profile-hero .uname { color: var(--txt-2); }
[data-theme="light"] .settings-tabs .btn.ghost { border-color: var(--line-strong); }
[data-theme="light"] .lb-close,
[data-theme="light"] .lb-nav { color: #fff; }
[data-theme="light"] .md-code { background: #f2f6fa; }
