/* ================= 栖语 · 设计变量 ================= */
@font-face {
  font-family: 'SoulScript';
  src: url('../assets/dancing-script.woff2') format('woff2');
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --bg: #FBF1EC;
  --bg-page: #F3E3DE;
  --bg-panel: #F9EDE8;
  --card: #FFFFFF;
  --ink: #4C2B3A;
  --ink-soft: #8A6B77;
  --muted: #C2ABA9;
  --line: #F0DED8;
  --pink: #E78FA2;
  --pink-deep: #DE7A92;
  --pink-faint: #FBE3E3;
  --bubble-me: #EFA3B1;
  --bubble-me-ink: #642B3D;
  --gold: #E2AC4E;
  --gold-deep: #D89A34;
  --danger: #E05656;
  --serif: 'Songti SC', 'STSong', 'Noto Serif SC', 'SimSun', serif;
  --script: 'SoulScript', 'Snell Roundhand', 'Savoye LET', cursive;
  --shadow-soft: 0 6px 24px rgba(120, 60, 80, .08);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
  background: var(--bg-page);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}
button { font-family: inherit; border: 0; background: none; color: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
input { font-family: inherit; }

#app {
  max-width: 520px;
  margin: 0 auto;
  height: 100dvh;
  background: var(--bg);
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 40px rgba(120, 60, 80, .10);
}

.view { position: absolute; inset: 0; display: flex; flex-direction: column; }
.view[hidden] { display: none; }

/* 页面切换动效（storyboard #1：420ms ease-out） */
.view.enter { animation: view-in 420ms ease-out; }
@keyframes view-in {
  from { opacity: 0; transform: scale(1.02); }
  to   { opacity: 1; transform: none; }
}

/* ================= 入口页 ================= */
#view-entry { background: linear-gradient(180deg, #FBEFEA 0%, #FAE7E4 55%, #F7DCDA 100%); }

.entry-bg { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.moon-glow {
  position: absolute; top: 4%; left: 50%; transform: translateX(-38%);
  width: 240px; height: 240px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 214, 190, .75) 0%, rgba(255, 224, 205, .35) 45%, transparent 70%);
}
.mountains { position: absolute; bottom: 0; left: 0; width: 100%; height: 42%; }
.spark { position: absolute; color: #E9BE7A; opacity: .8; animation: twinkle 2.8s ease-in-out infinite; }
.spark.s1 { top: 7%;  left: 18%; font-size: 13px; }
.spark.s2 { top: 13%; right: 14%; font-size: 11px; animation-delay: .9s; }
.spark.s3 { top: 26%; left: 10%; font-size: 9px;  animation-delay: 1.6s; }
.spark.s4 { top: 4%;  right: 30%; font-size: 9px; animation-delay: 2.2s; }
@keyframes twinkle { 0%, 100% { opacity: .25; } 50% { opacity: .95; } }

.entry-body {
  position: relative; z-index: 1;
  width: 100%; max-width: 340px; margin: 0 auto;
  padding: max(11dvh, 48px) 20px 0;
  display: flex; flex-direction: column;
}
.logo {
  font-family: var(--serif);
  font-size: 46px; font-weight: 600; letter-spacing: .18em;
  text-align: center; color: #56283C; position: relative;
}
.logo-heart {
  position: absolute; margin-left: 2px; margin-top: -8px;
  font-size: 14px; color: var(--gold); transform: rotate(12deg);
}
.tagline {
  margin-top: 22px; margin-bottom: 40px;
  text-align: center; font-size: 21px; font-weight: 600; color: #4E2A3C; letter-spacing: .04em;
}

.field {
  display: flex; align-items: center; gap: 10px;
  background: rgba(255, 255, 255, .68);
  border: 1.5px solid rgba(231, 143, 162, .38);
  border-radius: 16px;
  padding: 0 16px; height: 54px; margin-bottom: 16px;
  transition: border-color .2s, box-shadow .2s;
}
.field:focus-within { border-color: var(--pink); box-shadow: 0 0 0 3px rgba(231, 143, 162, .12); }
.field.error { border-color: var(--danger); }
.field-icon { width: 20px; height: 20px; color: #E4A0AE; flex: none; }
.field input {
  flex: 1; min-width: 0; border: 0; outline: 0; background: none;
  font-size: 16px; color: var(--ink); letter-spacing: .02em;
}
.field input::placeholder { color: #C9AEB2; }
.eye-btn { width: 30px; height: 30px; color: #D3A9B1; display: grid; place-items: center; flex: none; }
.eye-btn svg { width: 22px; height: 22px; }

.entry-error {
  color: var(--danger); font-size: 13px;
  margin: -8px 2px 10px;
  animation: shake 320ms ease;
}
@keyframes shake {
  0%, 100% { transform: none; } 25% { transform: translateX(-4px); }
  50% { transform: translateX(4px); } 75% { transform: translateX(-2px); }
}

.enter-btn {
  width: 100%; display: block;
  margin-top: 12px; height: 56px; border-radius: 28px;
  background: linear-gradient(180deg, #EE96A8, #E27B93);
  color: #fff; font-size: 18px; font-weight: 600; letter-spacing: .3em; text-indent: .3em;
  box-shadow: 0 10px 22px rgba(226, 123, 147, .35), inset 0 1px 0 rgba(255, 255, 255, .35);
  transition: transform .15s ease, box-shadow .3s ease, filter .3s ease;
}
.enter-btn:active { transform: scale(.97); }
.enter-btn.glow { animation: btn-glow 420ms ease-out; }
@keyframes btn-glow {
  0% { box-shadow: 0 10px 22px rgba(226, 123, 147, .35); }
  50% { box-shadow: 0 0 0 14px rgba(240, 190, 140, .28), 0 10px 30px rgba(226, 123, 147, .55); filter: brightness(1.06); }
  100% { box-shadow: 0 10px 22px rgba(226, 123, 147, .35); }
}
.enter-btn:disabled { opacity: .7; }

/* ================= 聊天页 ================= */
#view-chat { background: var(--bg); }

.chat-header {
  flex: none; height: calc(56px + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) 6px 0 2px;
  display: flex; align-items: center; gap: 4px;
  background: rgba(251, 241, 236, .92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  position: relative; z-index: 5;
}
.icon-btn {
  width: 40px; height: 40px; border-radius: 12px;
  display: grid; place-items: center; color: #6B4456; flex: none;
}
.icon-btn svg { width: 22px; height: 22px; }
.icon-btn:active { background: rgba(231, 143, 162, .12); }

.peer { display: flex; align-items: center; gap: 9px; min-width: 0; }
.avatar {
  width: 38px; height: 38px; border-radius: 50%; flex: none;
  background: linear-gradient(135deg, #F3B9C4, #E48CA0);
  color: #fff; font-size: 17px; font-weight: 600;
  display: grid; place-items: center; user-select: none;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .55);
}
.peer-meta { min-width: 0; }
.peer-name { font-size: 15.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.peer-status { display: flex; align-items: center; gap: 4px; font-size: 11.5px; color: #4CAF6E; margin-top: 1px; }
.peer-status .dot { width: 7px; height: 7px; border-radius: 50%; background: #58C47D; }
.peer-status.offline { color: #B7A2A5; }
.peer-status.offline .dot { background: #CDBBBB; }

/* Soulmate 字母 */
.soulmate {
  margin-left: auto; padding: 0 4px;
  font-family: var(--script);
  font-size: 24px; line-height: 1; user-select: none; cursor: pointer;
  white-space: nowrap;
}
.soulmate .lt {
  color: #E7DBD3;
  transition: color .4s ease, text-shadow .4s ease;
}
.soulmate .lt.lit {
  background: linear-gradient(160deg, #F2C566 15%, #E2AC4E 55%, #CE9130 90%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: 0 0 14px rgba(240, 197, 122, .45);
}
/* 点亮瞬间（storyboard #6：680ms ease-in-out） */
.soulmate .lt.ignite { animation: ignite 680ms ease-in-out; }
@keyframes ignite {
  0%   { transform: scale(1);    filter: brightness(1); }
  40%  { transform: scale(1.35); filter: brightness(1.7) drop-shadow(0 0 10px rgba(244, 202, 120, .9)); }
  100% { transform: scale(1);    filter: brightness(1); }
}
.soulmate .lt { display: inline-block; }

/* ---------- 消息列表 ---------- */
#msg-list {
  flex: 1; overflow-y: auto; overflow-x: hidden;
  padding: 14px 14px 18px;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.date-divider {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  color: #C4A96B; font-size: 12px; margin: 14px 0 16px; user-select: none;
}
.date-divider::before, .date-divider::after {
  content: ''; width: 34px; height: 1px;
  background: linear-gradient(90deg, transparent, #DBC49A);
}
.date-divider::after { transform: scaleX(-1); }
.date-divider .fx { color: #E0B96F; font-size: 10px; }

.time-chip {
  text-align: center; font-size: 11.5px; color: #C9B2AC;
  margin: 10px 0 12px; user-select: none;
}

.sysline {
  text-align: center; font-size: 12px; color: #C0A177;
  margin: 12px 24px; user-select: none;
}
.sysline::before { content: '✦  '; font-size: 10px; color: #E0B96F; }
.sysline::after  { content: '  ✦'; font-size: 10px; color: #E0B96F; }

.msg-row { display: flex; margin-bottom: 4px; align-items: flex-end; gap: 8px; }
.msg-row.peer { justify-content: flex-start; }
.msg-row.me   { justify-content: flex-end; }
.msg-row .avatar { width: 34px; height: 34px; font-size: 15px; margin-bottom: 2px; }
.msg-col { max-width: 74%; display: flex; flex-direction: column; }
.msg-row.me .msg-col { align-items: flex-end; }
.msg-row.peer .msg-col { align-items: flex-start; }

/* 消息进场（storyboard #2：220ms ease-out，上移 8px） */
.msg-row.pop, .sysline.pop { animation: msg-in 220ms ease-out; }
@keyframes msg-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

.bubble {
  padding: 10px 14px; border-radius: 18px;
  font-size: 15.5px; line-height: 1.45;
  word-break: break-word; white-space: pre-wrap;
  position: relative;
}
.msg-row.peer .bubble {
  background: var(--card); color: var(--ink);
  border-bottom-left-radius: 6px;
  box-shadow: 0 2px 10px rgba(120, 60, 80, .06);
}
.msg-row.me .bubble {
  background: var(--bubble-me); color: var(--bubble-me-ink);
  border-bottom-right-radius: 6px;
  box-shadow: 0 3px 12px rgba(226, 123, 147, .22);
}
.bubble.selected { filter: brightness(.92); }

/* 纯表情大号显示 */
.bubble.emoji-big {
  background: none !important; box-shadow: none !important;
  padding: 2px; font-size: 46px; line-height: 1.15;
}

/* 图片消息 */
.bubble.image {
  padding: 0; background: none !important; box-shadow: none !important;
  border-radius: 16px; overflow: hidden; line-height: 0;
}
.bubble.image img {
  display: block; max-width: min(230px, 60vw); max-height: 300px;
  border-radius: 16px; background: #EFE0DA;
}
.bubble.image .img-veil {
  position: absolute; inset: 0; border-radius: 16px;
  background: rgba(250, 240, 235, .55);
  display: grid; place-items: center;
  backdrop-filter: blur(2px);
  transition: opacity 240ms ease;
}
.spinner {
  width: 28px; height: 28px; border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, .8); border-top-color: var(--pink);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.retry-badge {
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(80, 40, 55, .55); color: #fff;
  display: grid; place-items: center; font-size: 18px;
}

/* 语音消息 */
.bubble.voice { display: flex; align-items: center; gap: 9px; min-height: 40px; }
.voice-play {
  width: 26px; height: 26px; border-radius: 50%; flex: none;
  border: 1.8px solid currentColor;
  display: grid; place-items: center;
}
.voice-play svg { width: 12px; height: 12px; }
.wave { display: flex; align-items: center; gap: 2.5px; height: 22px; }
.wave i {
  width: 2.5px; border-radius: 2px; background: currentColor; opacity: .85;
  height: calc(var(--h) * 1px);
}
.bubble.voice.playing .wave i { animation: wavep 900ms ease-in-out infinite; animation-delay: calc(var(--i) * 60ms); }
@keyframes wavep {
  0%, 100% { transform: scaleY(.6); } 50% { transform: scaleY(1.25); }
}
.voice-dur { font-size: 13px; flex: none; }

/* 已读 / 未读（storyboard #3：180ms 过渡） */
.msg-status {
  font-size: 11px; margin: 3px 4px 6px;
  transition: color 180ms ease-in-out, opacity 180ms ease-in-out;
}
.msg-status.unread { color: var(--pink); }
.msg-status.read   { color: #BCA9A6; }
.msg-status.sending{ color: #CDBBB8; }
.msg-status.failed { color: var(--danger); }

/* ---------- 输入区 ---------- */
.input-area {
  flex: none; position: relative; z-index: 5;
  background: rgba(251, 241, 236, .96);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.input-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 12px;
}
.voice-btn {
  width: 40px; height: 40px; border-radius: 50%; flex: none;
  border: 1.8px solid var(--pink);
  color: var(--pink); display: grid; place-items: center;
  touch-action: none;
}
.voice-btn svg { width: 20px; height: 20px; }
.voice-btn:active, .voice-btn.recording { background: var(--pink); color: #fff; }
.input-wrap { flex: 1; min-width: 0; }
#msg-input {
  width: 100%; height: 40px; border: 0; outline: 0;
  background: #fff; border-radius: 20px; padding: 0 16px;
  font-size: 15.5px; color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line);
}
#msg-input::placeholder { color: #C9AEB2; }
#msg-input:focus { box-shadow: inset 0 0 0 1.5px rgba(231, 143, 162, .55); }
.plus-btn.send-mode { color: var(--pink-deep); }

/* 底部面板（表情 / 加号） */
.bottom-panel { border-top: 1px solid var(--line); background: var(--bg-panel); animation: panel-in 200ms ease-out; }
.bottom-panel[hidden] { display: none !important; }
@keyframes panel-in { from { opacity: .4; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.emoji-tabs {
  display: flex; gap: 4px; padding: 8px 12px 0;
}
.emoji-tab {
  flex: 1; height: 36px; border-radius: 10px;
  font-size: 19px; display: grid; place-items: center;
  opacity: .55; position: relative;
}
.emoji-tab.active { opacity: 1; }
.emoji-tab.active::after {
  content: ''; position: absolute; bottom: 0; left: 30%; right: 30%;
  height: 2.5px; border-radius: 2px; background: var(--pink);
}
.emoji-grid-wrap { position: relative; height: 216px; }
.emoji-grid {
  height: 100%; overflow-y: auto; padding: 10px 12px 52px;
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px;
}
.emoji-cell {
  font-size: 27px; height: 44px; border-radius: 10px;
  display: grid; place-items: center;
}
.emoji-cell:active { background: rgba(231, 143, 162, .15); }
.emoji-backspace {
  position: absolute; right: 12px; bottom: 12px;
  width: 52px; height: 40px; border-radius: 12px;
  background: #fff; box-shadow: var(--shadow-soft);
  display: grid; place-items: center; color: var(--ink-soft);
}
.emoji-backspace svg { width: 22px; height: 22px; }

.plus-panel {
  display: flex; align-items: center; justify-content: center;
  gap: 26px; padding: 30px 10px 34px;
}
.plus-item {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  font-size: 13.5px; color: var(--ink-soft); width: 108px;
}
.plus-icon {
  width: 74px; height: 74px; border-radius: 22px;
  background: #fff; box-shadow: var(--shadow-soft);
  display: grid; place-items: center; color: var(--pink-deep);
  transition: transform .15s ease;
}
.plus-item:active .plus-icon { transform: scale(.93); }
.plus-icon svg { width: 34px; height: 34px; }
.plus-divider { width: 1px; height: 64px; background: var(--line); }

/* ---------- 录音浮层 ---------- */
.voice-overlay {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 20;
  pointer-events: none;
}
.voice-overlay[hidden] { display: none; }
.voice-cancel-hint {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  color: var(--pink-deep); font-size: 12.5px; margin-bottom: 10px;
  opacity: 0; transition: opacity .2s;
}
.voice-overlay.armed .voice-cancel-hint { opacity: 1; }
.voice-cancel-hint svg { width: 22px; height: 22px; animation: hint-up 1.2s ease-in-out infinite; }
@keyframes hint-up { 0%, 100% { transform: translateY(2px); } 50% { transform: translateY(-3px); } }

.voice-panel {
  background: linear-gradient(180deg, #FAE4E2, #F6D7D6);
  border-radius: 22px 22px 0 0;
  padding: 18px 26px calc(30px + env(safe-area-inset-bottom));
  box-shadow: 0 -8px 30px rgba(150, 80, 100, .12);
}
.voice-timer {
  text-align: center; font-size: 22px; font-weight: 600;
  color: #5C3040; font-variant-numeric: tabular-nums; margin-bottom: 14px;
}
.voice-row { display: flex; align-items: center; justify-content: space-between; }
.voice-deco {
  width: 42px; height: 42px; border-radius: 50%; background: rgba(255, 255, 255, .8);
  display: grid; place-items: center; color: #C9A6AC;
}
.voice-deco svg { width: 20px; height: 20px; }
.voice-circle {
  width: 108px; height: 108px; border-radius: 50%;
  background: radial-gradient(circle at 38% 32%, #F5B7C2, #EC93A6 70%);
  display: grid; place-items: center;
  box-shadow: 0 0 0 14px rgba(238, 150, 168, .18), 0 10px 26px rgba(226, 123, 147, .4);
  /* storyboard #4：900ms 呼吸循环 */
  animation: breathe 900ms ease-in-out infinite;
}
@keyframes breathe {
  0%, 100% { box-shadow: 0 0 0 10px rgba(238, 150, 168, .14), 0 10px 26px rgba(226, 123, 147, .4); }
  50%      { box-shadow: 0 0 0 22px rgba(238, 150, 168, .22), 0 10px 26px rgba(226, 123, 147, .4); }
}
.voice-overlay.armed .voice-circle {
  background: radial-gradient(circle at 38% 32%, #E2707F, #C94A60 72%);
}
.voice-bars { display: flex; align-items: center; gap: 3px; height: 40px; }
.voice-bars i {
  width: 3px; border-radius: 3px; background: #fff; height: 8px;
  animation: vbar 900ms ease-in-out infinite; animation-delay: calc(var(--i) * 70ms);
}
@keyframes vbar { 0%, 100% { height: 7px; } 50% { height: calc(var(--h) * 1px); } }
.voice-action { font-size: 14.5px; color: #A05A6E; width: 64px; text-align: center; }
.voice-overlay.armed .voice-action { color: #C94A60; }

/* ---------- 弹层 / 菜单 / 弹窗 ---------- */
#toast-root { position: fixed; top: 0; left: 0; right: 0; z-index: 90; pointer-events: none; }
.toast {
  margin: 14px auto 0; width: fit-content; max-width: 78vw;
  background: rgba(76, 43, 58, .92); color: #fff;
  font-size: 13.5px; padding: 10px 18px; border-radius: 20px;
  animation: toast-in .25s ease-out;
}
@keyframes toast-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.toast.out { opacity: 0; transition: opacity .3s; }

#popover-root { position: fixed; inset: 0; z-index: 60; display: none; }
#popover-root.open { display: block; }
.msg-menu {
  position: absolute; display: flex; gap: 2px;
  background: #fff; border-radius: 14px; padding: 8px 6px;
  box-shadow: 0 8px 28px rgba(90, 40, 60, .18);
  animation: menu-in .16s ease-out;
}
@keyframes menu-in { from { opacity: 0; transform: scale(.9); } to { opacity: 1; transform: none; } }
.msg-menu::after {
  content: ''; position: absolute; bottom: -6px; left: var(--arrow-x, 50%);
  transform: translateX(-50%);
  border: 7px solid transparent; border-top-color: #fff; border-bottom: 0;
}
.msg-menu.below::after { bottom: auto; top: -6px; border-top-color: transparent; border-bottom: 7px solid #fff; border-top: 0; }
.msg-menu button {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  width: 60px; padding: 6px 0; border-radius: 10px;
  font-size: 12px; color: var(--ink-soft);
}
.msg-menu button:active { background: var(--pink-faint); }
.msg-menu button svg { width: 20px; height: 20px; }

.sheet {
  position: absolute; top: calc(52px + env(safe-area-inset-top)); right: 10px;
  width: 250px; background: #fff; border-radius: 18px;
  box-shadow: 0 12px 40px rgba(90, 40, 60, .2);
  padding: 18px 18px 8px; animation: menu-in .18s ease-out;
}
.sheet .soulmate-big {
  font-family: var(--script); font-size: 31px; text-align: center; margin-bottom: 8px;
}
.sheet .progress-text { text-align: center; font-size: 12.5px; color: var(--ink-soft); line-height: 1.7; }
.sheet .progress-text b { color: var(--gold-deep); font-weight: 600; }
.sheet hr { border: 0; border-top: 1px solid var(--line); margin: 14px 0 2px; }
.sheet .sheet-item {
  width: 100%; height: 44px; border-radius: 12px;
  font-size: 14.5px; color: var(--ink-soft);
}
.sheet .sheet-item:active { background: var(--pink-faint); }

#modal-root { position: fixed; inset: 0; z-index: 80; display: none; }
#modal-root.open { display: grid; place-items: center; background: rgba(60, 30, 42, .32); }
.modal {
  width: min(80vw, 300px); background: #FDF6F2; border-radius: 22px;
  padding: 26px 22px 18px; text-align: center;
  animation: menu-in .18s ease-out;
}
.modal h3 { font-size: 17px; font-weight: 600; margin-bottom: 8px; }
.modal p { font-size: 13px; color: var(--ink-soft); margin-bottom: 20px; }
.modal .modal-input {
  width: 100%; height: 46px; border-radius: 14px;
  border: 1.5px solid var(--line); background: #fff;
  padding: 0 14px; font-size: 15px; color: var(--ink);
  outline: none; margin: -6px 0 18px; text-align: center;
}
.modal .modal-input:focus { border-color: var(--pink); }
.modal .modal-btns { display: flex; gap: 12px; }
.modal .modal-btns button {
  flex: 1; height: 46px; border-radius: 23px; font-size: 15px;
}
.modal .btn-cancel { background: #fff; color: var(--ink-soft); box-shadow: inset 0 0 0 1px var(--line); }
.modal .btn-confirm { background: linear-gradient(180deg, #EE96A8, #E27B93); color: #fff; }

.lightbox {
  position: fixed; inset: 0; z-index: 95;
  background: rgba(25, 12, 18, .92);
  display: grid; place-items: center;
}
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 96vw; max-height: 92vh; border-radius: 6px; }

/* 桌面端微调 */
@media (min-width: 560px) {
  body { padding: 0; }
  #msg-list::-webkit-scrollbar { width: 5px; }
  #msg-list::-webkit-scrollbar-thumb { background: #E3CCC6; border-radius: 3px; }
}
