/* Maurice v0.4 · 主界面样式（独立缓存） */
/* ===== base.css ===== */
/* 小手机 · Design Tokens 与通用组件
 * 8pt 栅格；字号仅 12 / 14 / 16 / 20 / 24 / 32；行高 1.6 / 1.4 / 1.2。
 */
:root {
  --sp-1: 8px;
  --sp-2: 16px;
  --sp-3: 24px;
  --sp-4: 32px;
  --sp-5: 40px;
  --sp-6: 48px;

  --fs-caption: 12px;
  --fs-body-sm: 14px;
  --fs-body: 16px;
  --fs-h3: 20px;
  --fs-h2: 24px;
  --fs-h1: 32px;

  --lh-body: 1.6;
  --lh-title: 1.2;
  --lh-sub: 1.4;

  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-full: 999px;

  --bg: #f2f2f4;
  --surface: rgba(255, 255, 255, 0.86);
  --surface-solid: #ffffff;
  --surface-2: #f7f7f8;
  --surface-3: #ececee;
  --text: #141416;
  --text-2: #5d5d63;
  --text-3: #9a9aa2;
  --line: rgba(20, 20, 22, 0.09);
  --line-strong: rgba(20, 20, 22, 0.16);
  --accent: #4a4a52;
  --accent-soft: rgba(74, 74, 82, 0.1);
  --bubble-me: #1f1f22;
  --bubble-me-text: #fafafa;
  --bubble-other: rgba(255, 255, 255, 0.94);
  --bubble-other-text: #1a1a1c;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 24px rgba(0, 0, 0, 0.06);
  --shadow-2: 0 12px 40px rgba(0, 0, 0, 0.14);
  --blur: saturate(160%) blur(18px);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", sans-serif;
}

.xsj-root.theme-ink {
  --bg: #111113;
  --surface: rgba(30, 30, 33, 0.86);
  --surface-solid: #1b1b1e;
  --surface-2: #232326;
  --surface-3: #2c2c30;
  --text: #f2f2f4;
  --text-2: #a9a9b0;
  --text-3: #75757d;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.18);
  --accent: #d9d9de;
  --accent-soft: rgba(255, 255, 255, 0.1);
  --bubble-me: #f0f0f2;
  --bubble-me-text: #17171a;
  --bubble-other: rgba(46, 46, 50, 0.96);
  --bubble-other-text: #f2f2f4;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.35);
}

.xsj-root.theme-warm {
  --bg: #f6f2ec;
  --surface: rgba(255, 253, 249, 0.88);
  --surface-solid: #fffdf9;
  --surface-2: #f7f2ea;
  --surface-3: #ede6db;
  --text: #231f1a;
  --text-2: #6b6257;
  --text-3: #a3978a;
  --line: rgba(35, 31, 26, 0.09);
  --accent: #7d6a58;
  --bubble-me: #3a322a;
  --bubble-other: #fffdf9;
}

.xsj-root.theme-cool {
  --bg: #eef1f4;
  --surface: rgba(250, 253, 255, 0.88);
  --surface-solid: #fbfdff;
  --surface-2: #eff4f8;
  --surface-3: #e2e9ef;
  --text: #182026;
  --text-2: #56636e;
  --text-3: #93a0aa;
  --line: rgba(24, 32, 38, 0.09);
  --accent: #4f6575;
  --bubble-me: #263440;
  --bubble-other: #fbfdff;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  background: #e9e9ec;
  font-family: var(--font);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}
button, input, textarea, select { font-family: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; padding: 0; }
img { display: block; max-width: 100%; }
h1, h2, h3, h4, p { margin: 0; }
h1 { font-size: var(--fs-h1); line-height: var(--lh-title); font-weight: 650; letter-spacing: -0.02em; }
h2 { font-size: var(--fs-h2); line-height: var(--lh-title); font-weight: 650; letter-spacing: -0.01em; }
h3 { font-size: var(--fs-h3); line-height: var(--lh-sub); font-weight: 600; }
small, .caption { font-size: var(--fs-caption); line-height: var(--lh-sub); color: var(--text-3); }
.meta { font-size: var(--fs-body-sm); color: var(--text-2); line-height: var(--lh-sub); }

#app, .xsj-root { height: 100%; }
.xsj-root {
  position: relative;
  width: 100%;
  height: 100dvh;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  display: flex;
  justify-content: center;
}
.xsj-stage {
  position: relative;
  width: 100%;
  max-width: 1100px;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
@media (min-width: 900px) {
  body { background: radial-gradient(120% 90% at 50% 0%, #f6f6f8 0%, #e4e4e8 60%, #dedee3 100%); }
  .xsj-stage {
    margin: 0 auto;
    border-left: 1px solid rgba(0,0,0,0.05);
    border-right: 1px solid rgba(0,0,0,0.05);
    background: var(--bg);
  }
}
/* ---------- 通用控件 ---------- */
.icon-btn {
  width: 40px; height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--r-full);
  color: var(--text);
  transition: background .18s ease, transform .18s ease, opacity .18s ease;
}
.icon-btn:hover { background: var(--accent-soft); }
.icon-btn:active { transform: scale(0.92); }
.icon-btn.sm { width: 32px; height: 32px; }
.icon-btn:disabled { opacity: .35; cursor: default; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 0 var(--sp-2);
  border-radius: var(--r-full);
  background: var(--text); color: var(--bg);
  font-size: var(--fs-body-sm); font-weight: 550;
  white-space: nowrap; flex-shrink: 0;
  transition: transform .18s ease, opacity .18s ease, background .18s ease;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: .4; }
.btn.ghost { background: var(--surface-3); color: var(--text); }
.btn.outline { background: transparent; color: var(--text); border: 1px solid var(--line-strong); }
.btn.danger { background: #8f3a3a; color: #fff; }
.btn.sm { min-height: 34px; padding: 0 12px; font-size: var(--fs-caption); }
.btn.block { width: 100%; }

.chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px; border-radius: var(--r-full);
  background: var(--surface-3); color: var(--text-2);
  font-size: var(--fs-caption);
}
.chip.active { background: var(--text); color: var(--bg); }

.field { margin-bottom: var(--sp-2); }
.field > label { display: block; font-size: var(--fs-caption); color: var(--text-2); margin-bottom: 6px; letter-spacing: .02em; }
.input, .textarea, .select {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid transparent;
  border-radius: var(--r-md);
  padding: 12px 14px;
  font-size: var(--fs-body-sm);
  line-height: var(--lh-body);
  outline: none;
  transition: border-color .18s ease, background .18s ease;
  color: var(--text);
}
.input:focus, .textarea:focus, .select:focus { border-color: var(--line-strong); background: var(--surface-solid); }
.textarea { resize: vertical; min-height: 96px; }
.select { appearance: none; -webkit-appearance: none; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.x-switch {
  width: 46px; height: 28px; border-radius: var(--r-full);
  background: var(--surface-3); position: relative; flex: none;
  transition: background .22s ease;
}
.x-switch .knob {
  position: absolute; top: 3px; left: 3px; width: 22px; height: 22px;
  background: #fff; border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  transition: transform .22s cubic-bezier(.4,0,.2,1);
}
.x-switch.on { background: #3c3c42; }
.x-switch.on .knob { transform: translateX(18px); }

.x-avatar {
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; overflow: hidden; flex: none;
  background: var(--surface-3); color: var(--text-2);
  font-size: var(--fs-body-sm); font-weight: 600;
}
.x-avatar img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- 页面骨架 ---------- */
.page {
  position: absolute; inset: 0;
  min-width: 0; min-height: 0;
  display: flex; flex-direction: column;
  background: var(--bg);
  animation: pageIn .26s cubic-bezier(.32,.72,0,1);
}
@keyframes pageIn { from { opacity: .4; transform: translateX(14px); } to { opacity: 1; transform: none; } }
.page-head {
  height: calc(60px + env(safe-area-inset-top, 0px)); flex: none;
  display: flex; align-items: center; gap: 4px;
  padding: env(safe-area-inset-top, 0px) 8px 0 6px;
  background: var(--surface);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border-bottom: 1px solid var(--line);
  position: relative; z-index: 5;
}
.page-title {
  flex: 1; text-align: center;
  font-size: var(--fs-body); font-weight: 620;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.page-actions { display: flex; align-items: center; gap: 2px; min-width: 40px; justify-content: flex-end; }
.page-body { flex: 1; min-width: 0; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }

.section { padding: var(--sp-2); }
.section + .section { padding-top: 0; }
.section-title {
  font-size: var(--fs-caption); color: var(--text-3);
  letter-spacing: .08em; text-transform: uppercase;
  padding: 6px 4px 8px;
}
.card {
  background: var(--surface-solid);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-1);
  overflow: hidden;
}
.list-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px var(--sp-2);
  background: var(--surface-solid);
  border-bottom: 1px solid var(--line);
  transition: background .16s ease;
  cursor: pointer;
  text-align: left; width: 100%;
}
.list-row:last-child { border-bottom: none; }
.list-row:active { background: var(--surface-2); }
.list-row .grow { flex: 1; min-width: 0; }
.list-row .title { font-size: var(--fs-body-sm); font-weight: 550; display: flex; align-items: center; gap: 6px; }
.list-row .sub {
  font-size: var(--fs-caption); color: var(--text-3); margin-top: 2px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.group { border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-1); background: var(--surface-solid); }

.empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; padding: var(--sp-5) var(--sp-3);
  color: var(--text-3); text-align: center;
  font-size: var(--fs-body-sm); line-height: var(--lh-body);
}
.empty .x-icon { opacity: .35; }

/* ---------- 弹层 ---------- */
.sheet-mask {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(12, 12, 14, 0.32);
  backdrop-filter: blur(4px);
  display: flex; align-items: flex-end; justify-content: center;
}
.sheet {
  width: 100%; max-width: 640px;
  max-height: 84dvh;
  background: var(--surface-solid);
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  box-shadow: var(--shadow-2);
  display: flex; flex-direction: column;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.sheet-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 14px 10px 20px;
  border-bottom: 1px solid var(--line);
}
.sheet-head strong { font-size: var(--fs-body); font-weight: 620; }
.sheet-body { padding: var(--sp-2); overflow-y: auto; }
.sheet-enter-active, .sheet-leave-active { transition: opacity .22s ease; }
.sheet-enter-active .sheet, .sheet-leave-active .sheet { transition: transform .28s cubic-bezier(.32,.72,0,1); }
.sheet-enter-from, .sheet-leave-to { opacity: 0; }
.sheet-enter-from .sheet, .sheet-leave-to .sheet { transform: translateY(40px); }

.toast-wrap {
  position: fixed; left: 50%; top: calc(66px + env(safe-area-inset-top, 0px));
  transform: translateX(-50%);
  z-index: 120; display: flex; flex-direction: column; gap: 8px; align-items: center;
  pointer-events: none; width: max-content; max-width: 86vw;
}
.toast {
  padding: 10px 16px; border-radius: var(--r-full);
  background: rgba(24,24,27,.92); color: #f7f7f8;
  font-size: var(--fs-caption); line-height: 1.5;
  box-shadow: var(--shadow-2);
  max-width: 86vw;
}
.toast.error { background: #7a2f2f; }
.toast.success { background: #2f5d43; }
.toast-enter-active, .toast-leave-active { transition: opacity .2s ease, transform .2s ease; }
.toast-enter-from, .toast-leave-to { opacity: 0; transform: translateY(-8px); }

/* ---------- 应用切换 ---------- */
.app-enter-active { transition: opacity .24s ease, transform .28s cubic-bezier(.32,.72,0,1); }
.app-leave-active { transition: opacity .18s ease, transform .22s ease; position: absolute; inset: 0; }
.app-enter-from { opacity: 0; transform: scale(.94); }
.app-leave-to { opacity: 0; transform: scale(1.03); }

/* ---------- 表单行 ---------- */
.form-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px var(--sp-2);
  border-bottom: 1px solid var(--line);
  background: var(--surface-solid);
}
.form-row:last-child { border-bottom: none; }
.form-row .label { flex: none; width: 92px; font-size: var(--fs-body-sm); color: var(--text-2); }
.form-row .value { flex: 1; font-size: var(--fs-body-sm); text-align: right; color: var(--text-3); }
.form-row .value.strong { color: var(--text); }

.file-hidden { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

.hint {
  font-size: var(--fs-caption); line-height: var(--lh-body);
  color: var(--text-3); padding: 4px 4px 0;
}
.hint.warn { color: #8a5a2b; }

.tag {
  display: inline-block; padding: 2px 8px; border-radius: var(--r-full);
  background: var(--accent-soft); color: var(--text-2);
  font-size: var(--fs-caption);
}

/* 启动与致命错误 */
.boot-screen {
  position: absolute; inset: 0; z-index: 9999;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; padding: 32px; text-align: center;
  background: var(--bg);
}
.boot-mark {
  width: 64px; height: 64px; border-radius: 20px;
  background: var(--text); color: var(--bg);
  display: flex; align-items: center; justify-content: center;
}
.boot-mark.warn { background: #8a5a2b; color: #fff; }
.boot-text { font-size: var(--fs-body-sm); color: var(--text-2); }




/* 横屏平板保持内容宽度与纵向滚动，避免把小屏布局强行拉满 */
@media (min-width: 700px) and (orientation: landscape) {
  .xsj-stage {
    max-width: 1440px;
    margin: 0 auto;
    border-left: 1px solid rgba(0,0,0,.05);
    border-right: 1px solid rgba(0,0,0,.05);
  }
  .app-view, .page, .page-body { min-width: 0; min-height: 0; }
  .page-body { overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; }
  .page-head { height: calc(54px + env(safe-area-inset-top, 0px)); }
  .page-body > .settings-body,
  .page-body > .section,
  .page-body > .char-grid,
  .page-body > .store-grid {
    width: 100%; max-width: 920px;
    margin-left: auto; margin-right: auto;
  }
  .sheet { max-height: 92dvh; }
  .sheet-body { min-height: 0; overflow-y: auto; }
}
@media (min-width: 700px) and (orientation: landscape) and (max-height: 520px) {
  .page-head { height: calc(48px + env(safe-area-inset-top, 0px)); }
  .page-body > .settings-body,
  .page-body > .section { padding-top: 12px; }
}

/* ===== desktop.css ===== */
/* 小手机 · 桌面（参照 iPad 横屏 / 手机竖屏两套布局） */
.desktop {
  --pad: 34px;
  --gap: 20px;
  --top-h: clamp(176px, 27vh, 212px);
  --dock-h: 76px;
  --zone-radius: 22px;
  --desk-fg: #20272b;
  --desk-fg-soft: rgba(32, 39, 43, .72);
  --glass-bg: rgba(255, 255, 255, .30);
  --glass-bg-strong: rgba(255, 255, 255, .46);
  --glass-border: rgba(255, 255, 255, .55);
  --glass-shadow: 0 16px 34px rgba(24, 34, 27, .16);
  --glass-text: #1c241f;
  --glass-text-2: rgba(28, 36, 31, .62);
  --tile-bg: rgba(255, 255, 255, .62);
  --tile-border: rgba(255, 255, 255, .82);
  --tile-color: #1f2621;
  --dock-bg: rgba(255, 255, 255, .32);
  --dock-border: rgba(255, 255, 255, .55);
  --dot: rgba(26, 34, 30, .2);
  --dot-active: rgba(26, 34, 30, .58);

  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  overflow: hidden;
  background-color: #cdd6ce;
  background-size: cover;
  background-position: center;
  color: var(--desk-fg);
}
.desktop.wp-forest { background-color: #cfd8d1; background-image: linear-gradient(180deg, #dfe7e1, #b9c7bd); }
.desktop.wp-mono { background-color: #f2f2f4; background-image: radial-gradient(120% 60% at 12% 0%, #fff, rgba(255,255,255,0) 60%); }
.desktop.wp-warm { background-color: #f1e7da; background-image: radial-gradient(90% 60% at 18% 0%, #fdf6ec, rgba(253,246,236,0) 70%), radial-gradient(80% 50% at 100% 100%, rgba(206,178,145,.5), transparent 70%); }
.desktop.wp-cool { background-color: #e3ebef; background-image: radial-gradient(90% 60% at 10% 0%, #f7fbfd, rgba(247,251,253,0) 65%), radial-gradient(80% 60% at 95% 100%, rgba(150,178,194,.45), transparent 70%); }
.desktop.wp-night { background-color: #15171a; background-image: radial-gradient(120% 60% at 20% 0%, rgba(74,78,86,.55), transparent 65%), radial-gradient(90% 60% at 90% 100%, rgba(30,32,38,.9), transparent 70%); }
.desktop.wp-dots { background-color: #f1f2f4; background-image: radial-gradient(rgba(0,0,0,.1) 1px, transparent 1.4px); background-size: 16px 16px; }
.desktop.wp-stripes { background-color: #f4f2ee; background-image: repeating-linear-gradient(135deg, rgba(0,0,0,.04) 0 1px, transparent 1px 14px); }
.wallpaper-veil {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, .05), rgba(18, 26, 21, .08));
}
.desktop.wp-night .wallpaper-veil { background: linear-gradient(180deg, rgba(0,0,0,.1), rgba(0,0,0,.3)); }
/* 森林壁纸：保持原有黑白质感，只做轻微提亮 */
.desktop.wp-forest .wallpaper-veil {
  background: linear-gradient(180deg, rgba(249,250,249,.6) 0%, rgba(246,248,247,.14) 45%, rgba(247,249,248,.26) 100%);
}
/* 图标文字：纯文字，无底框，白色 + 深色投影 */
.desktop.wp-forest.dt-mono .app-label,
.desktop.wp-forest.dt-warm .app-label,
.desktop.wp-forest.dt-cool .app-label {
  color: #fff;
  font-size: 10.5px;
  font-weight: 500;
  background: none;
  border: none;
  border-radius: 0;
  padding: 0 2px;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .95), 0 0 1px rgba(0, 0, 0, .9), 0 0 7px rgba(0, 0, 0, .7);
}
.desktop.wp-forest .app-panel .app-label {
  color: var(--glass-text);
  text-shadow: none;
}
.desktop.wp-forest .ls0 .app-label { font-size: 11px; }

/* 电波系图标：黑白透明磨砂玻璃 + 白色线条图标 */
.desktop.wp-forest .app-tile {
  color: #fff;
  border-radius: 30%;
  background: linear-gradient(158deg, rgba(26, 32, 40, .34), rgba(26, 32, 40, .18));
  border: 1px solid rgba(255, 255, 255, .3);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 8px 20px rgba(0, 0, 0, .18);
  backdrop-filter: blur(13px) saturate(1.05);
  -webkit-backdrop-filter: blur(13px) saturate(1.05);
}
.desktop.wp-forest .app-tile svg {
  stroke-width: 1.9;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .65));
}
.desktop.wp-forest .app-tile::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit;
  background: linear-gradient(180deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, 0) 52%);
  pointer-events: none;
}
/* 覆盖默认图标包（线性）的圆角与高光 */
.xsj-stage.iconpack-linear .desktop.wp-forest .app-tile { border-radius: 30%; }
.xsj-stage.iconpack-linear .desktop.wp-forest .app-tile::before { display: none; }
.xsj-stage.iconpack-linear .desktop.wp-forest .app-tile .x-icon { filter: none; }

/* Dock：同样的透明磨砂图标 */
.desktop.wp-forest .dock .app-tile {
  width: 52px; height: 52px; border-radius: 17px;
  color: #fff;
  background: linear-gradient(158deg, rgba(26, 32, 40, .34), rgba(26, 32, 40, .18));
  border-color: rgba(255, 255, 255, .3);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 6px 16px rgba(0, 0, 0, .16);
}
.desktop.wp-forest .dock .app-tile svg { width: 27px; height: 27px; }

/* ---------- 主题：同一套结构，仅切换变量 ---------- */
.desktop.dt-ink {
  --glass-bg: rgba(28, 31, 35, .58);
  --glass-bg-strong: rgba(28, 31, 35, .72);
  --glass-border: rgba(255, 255, 255, .14);
  --glass-shadow: 0 18px 38px rgba(0, 0, 0, .38);
  --glass-text: #f1f2f4;
  --glass-text-2: rgba(241, 242, 244, .62);
  --tile-bg: rgba(38, 41, 46, .72);
  --tile-border: rgba(255, 255, 255, .13);
  --tile-color: #eef0f3;
  --dock-bg: rgba(28, 31, 35, .5);
  --dock-border: rgba(255, 255, 255, .14);
  --desk-fg: #f4f5f7;
  --dot: rgba(255, 255, 255, .34);
  --dot-active: #ffffff;
}
.desktop.dt-warm {
  --glass-bg: rgba(255, 249, 241, .5);
  --glass-bg-strong: rgba(255, 250, 243, .64);
  --glass-border: rgba(255, 255, 255, .72);
  --glass-shadow: 0 16px 32px rgba(96, 70, 44, .16);
  --glass-text: #3a2c1e;
  --glass-text-2: rgba(58, 44, 30, .62);
  --tile-bg: rgba(255, 251, 245, .62);
  --tile-border: rgba(255, 255, 255, .8);
  --tile-color: #3a2c1e;
  --dock-bg: rgba(255, 249, 241, .46);
  --dock-border: rgba(255, 255, 255, .72);
  --desk-fg: #4a3a29;
  --dot: rgba(74, 58, 41, .28);
  --dot-active: #5b4632;
}
.desktop.dt-cool {
  --glass-bg: rgba(243, 249, 252, .46);
  --glass-bg-strong: rgba(247, 251, 253, .6);
  --glass-border: rgba(255, 255, 255, .76);
  --glass-shadow: 0 16px 34px rgba(46, 70, 86, .16);
  --glass-text: #1c2a33;
  --glass-text-2: rgba(28, 42, 51, .6);
  --tile-bg: rgba(248, 252, 254, .58);
  --tile-border: rgba(255, 255, 255, .82);
  --tile-color: #1c2a33;
  --dock-bg: rgba(243, 249, 252, .44);
  --dock-border: rgba(255, 255, 255, .78);
  --desk-fg: #24343e;
  --dot: rgba(36, 52, 62, .26);
  --dot-active: #2c4452;
}
.desktop.dt-mono {
  --glass-bg: rgba(255, 255, 255, .3);
  --glass-bg-strong: rgba(255, 255, 255, .46);
}

/* 状态栏 */
.status-bar {
  height: calc(42px + env(safe-area-inset-top, 0px));
  flex: none;
  padding: env(safe-area-inset-top, 0px) var(--pad) 0;
  display: flex; align-items: center; justify-content: space-between;
  font-size: 12px; font-weight: 600;
  letter-spacing: .03em;
  color: var(--desk-fg);
  text-shadow: 0 1px 4px rgba(0, 0, 0, .22);
  position: relative; z-index: 3;
}
.desktop.dt-warm .status-bar, .desktop.dt-cool .status-bar { text-shadow: none; }
.status-right { display: flex; align-items: center; gap: 6px; }
.status-bar .signal { display: flex; align-items: flex-end; gap: 2px; height: 11px; }
.status-bar .signal i { display: block; width: 3px; border-radius: 1px; background: currentColor; height: calc(4px + var(--i) * 2px); }
.status-bar .wifi { width: 15px; height: 11px; }
.status-bar .battery { width: 24px; height: 12px; border: 1.2px solid currentColor; border-radius: 3px; padding: 1.5px; }
.status-bar .battery span { display: block; height: 100%; width: 74%; border-radius: 1px; background: currentColor; }
.status-bar.hidden { display: none; }

/* 桌面滚动区 */
.desktop-scroll {
  position: relative; z-index: 1;
  flex: 1; min-height: 0;
  overflow-y: auto; overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  padding: 4px var(--pad) 6px;
  scrollbar-width: none;
}
.desktop-scroll::-webkit-scrollbar { display: none; }
.desk-layout { width: 100%; min-height: 100%; }
.zone { min-width: 0; min-height: 0; position: relative; }
.zone > .widget-wrap, .zone .widget, .zone .widget-wrap > .widget { width: 100%; height: 100%; }
.desk-layout:not(.custom) { display: grid; grid-template-columns: repeat(20, minmax(0, 1fr)); gap: 16px var(--gap); align-content: start; }

/* iPad 横屏 · 第一页 */
.desk-layout.ls0 {
  grid-template-rows: var(--top-h) 116px 82px;
  grid-template-areas:
    "clock clock clock clock clock clock clock clock clock music music music music music music music todo todo todo todo"
    "apps apps apps apps apps apps apps apps apps apps apps apps apps apps pc pc pc pc pc pc"
    "apps apps apps apps apps apps apps apps apps apps apps apps apps apps tv tv tv tv tv tv";
}
.ls0 .z-clock { grid-area: clock; }
.ls0 .z-music { grid-area: music; }
.ls0 .z-todo { grid-area: todo; }
.ls0 .z-apps { grid-area: apps; }
.ls0 .z-postcard { grid-area: pc; }
.ls0 .z-travel { grid-area: tv; }
.ls0 .z-extra { grid-column: 1 / -1; }

/* iPad 横屏 · 第二页 */
.desk-layout.ls1 {
  grid-template-columns: minmax(0, 11fr) minmax(0, 9fr);
  grid-template-rows: minmax(0, 1.28fr) minmax(0, .95fr);
  grid-template-areas:
    "apps quote"
    "moments polaroid";
  gap: 18px 22px;
  min-height: 0;
  height: 100%;
}
.ls1 .z-apps { grid-area: apps; }
.ls1 .z-quote { grid-area: quote; }
.ls1 .z-moments { grid-area: moments; }
.ls1 .z-polaroid { grid-area: polaroid; }
.ls1 .z-extra { grid-column: 1 / -1; }

/* 手机竖屏 */
.desk-layout.pp0, .desk-layout.pp1 {
  display: flex; flex-direction: column;
  gap: 13px;
  min-height: 100%;
  justify-content: space-between;
}
.pp0 .z-clock { height: clamp(176px, 23vh, 204px); flex: none; }
.pp0 .z-music { height: 116px; flex: none; }
.pp0 .z-apps { flex: none; }
.pp0 .z-postcard { height: 82px; flex: none; margin-top: 2px; }
.pp1 .z-quote { height: 150px; flex: none; }
.pp1 .z-apps { flex: none; }
.pp1 .z-moments { flex: 1; min-height: 176px; display: flex; }
/* 弹性行高下百分比高度不生效，用 flex 拉伸让卡片真正填满区域 */
.pp1 .z-moments > .widget-wrap { flex: 1; height: auto; min-width: 0; }
/* 竖屏额外组件区：百分比高度在 auto 高度下会失效，按组件类型给足固定高度 */
.pp0 .z-extra, .pp1 .z-extra {
  display: flex; flex-direction: column;
  gap: 13px; flex: none;
}
.pp0 .z-extra > .widget-wrap, .pp1 .z-extra > .widget-wrap { height: 172px; }
.pp0 .z-extra > .widget-wrap.wt-clock, .pp1 .z-extra > .widget-wrap.wt-clock { height: 168px; }
.pp0 .z-extra > .widget-wrap.wt-music, .pp1 .z-extra > .widget-wrap.wt-music { height: 132px; }
.pp0 .z-extra > .widget-wrap.wt-postcard, .pp1 .z-extra > .widget-wrap.wt-postcard { height: 76px; }
.pp0 .z-extra > .widget-wrap.wt-travel, .pp1 .z-extra > .widget-wrap.wt-travel { height: 68px; }
.pp0 .z-extra > .widget-wrap.wt-todo, .pp1 .z-extra > .widget-wrap.wt-todo { height: 160px; }
.pp0 .z-extra > .widget-wrap.wt-quote, .pp1 .z-extra > .widget-wrap.wt-quote { height: 150px; }
.pp0 .z-extra > .widget-wrap.wt-moments, .pp1 .z-extra > .widget-wrap.wt-moments { height: 216px; }
.pp0 .z-extra > .widget-wrap.wt-dialogue, .pp1 .z-extra > .widget-wrap.wt-dialogue { height: 134px; }
.pp0 .z-extra > .widget-wrap.wt-polaroid, .pp1 .z-extra > .widget-wrap.wt-polaroid { height: 210px; }

/* 自定义页 */
.desk-layout.custom {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  grid-auto-rows: 92px;
  gap: 14px 10px;
  align-content: start;
}
.desk-layout.custom .widget-wrap { grid-column: span 2; grid-row: span 2; }
.desk-flow-item { min-width: 0; }

/* App 网格 */
.app-grid { display: grid; gap: 12px 10px; align-content: start; }
.app-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.app-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pp0 .app-grid, .pp1 .app-grid { gap: 15px 12px; }
.ls0 .z-apps { align-self: start; }
.ls1 .z-apps.app-panel {
  border-radius: var(--zone-radius);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  padding: 16px 18px 18px;
  display: flex; flex-direction: column;
}
.ls1 .z-apps .app-grid { flex: 1; align-content: center; }
.panel-head { margin-bottom: 14px; }
.panel-title { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--glass-text); }
.panel-empty { color: var(--glass-text-2); font-size: 11px; }

.app-item {
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
  gap: 6px; position: relative;
  cursor: pointer;
  user-select: none; -webkit-user-select: none;
  touch-action: none;
}
.app-tile {
  width: 50px; height: 50px;
  border-radius: 15px;
  background: var(--tile-bg);
  border: 1px solid var(--tile-border);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .05), 0 8px 18px rgba(24, 34, 27, .13);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  display: flex; align-items: center; justify-content: center;
  color: var(--tile-color);
  transition: transform .18s cubic-bezier(.32, .72, 0, 1), box-shadow .18s ease;
  position: relative;
}
.app-item:active .app-tile { transform: scale(.93); }
.app-label {
  font-size: 12px; line-height: 1.2;
  color: var(--desk-fg);
  text-shadow: 0 1px 3px rgba(255, 255, 255, .55);
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  padding: 0 2px;
}
.desktop.dt-warm .app-label, .desktop.dt-cool .app-label { text-shadow: none; }
.desktop.dt-ink .app-label { text-shadow: 0 1px 4px rgba(0, 0, 0, .34); }
.ls1 .app-label { color: var(--glass-text); text-shadow: none; }
.ls0 .app-tile { width: 60px; height: 60px; border-radius: 19px; }
.ls0 .app-tile svg { width: 26px; height: 26px; }
.ls0 .app-grid { gap: 20px 12px; }
.pp0 .app-tile, .pp1 .app-tile { width: 58px; height: 58px; border-radius: 18px; }
.pp0 .app-tile svg, .pp1 .app-tile svg { width: 26px; height: 26px; }

.pp1 .app-tile { width: 54px; height: 54px; border-radius: 17px; }
.pp1 .app-grid { gap: 14px 12px; }

/* iPad 竖屏：按大画布重新排布，放大卡片与图标并铺满纵向空间 */
@media (min-width: 600px) and (orientation: portrait) {
  .desk-layout.pp0, .desk-layout.pp1 {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 880px;
    margin: 0 auto;
    gap: 22px;
    min-height: 100%;
    height: auto;
    justify-content: space-between;
  }

  /* 第一页：大时钟 + 音乐条 + 五列图标 + 用户卡 */
  .pp0 .z-clock { height: clamp(320px, 38vh, 520px); flex: none; }
  .pp0 .ck-body { padding: 26px 32px; }
  .pp0 .ck-time { font-size: clamp(72px, 10vw, 96px); }
  .pp0 .ck-date { font-size: 15px; }
  .pp0 .ck-text { font-size: 15px; }
  .pp0 .z-music { height: clamp(180px, 18vh, 240px); flex: none; }
  .pp0 .z-postcard { height: clamp(150px, 13vh, 180px); flex: none; margin-top: 0; }

  /* 第二页：引言 + 五列图标 + 动态卡填满剩余高度 */
  .pp1 .z-quote { height: clamp(220px, 28vh, 340px); flex: none; }
  .pp1 .z-moments { flex: 1; min-height: 240px; display: flex; }

  .pp0 .app-grid, .pp1 .app-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    width: 100%;
    gap: 30px 16px;
  }
  .pp0 .app-tile, .pp1 .app-tile { width: clamp(84px, 9vw, 100px); height: clamp(84px, 9vw, 100px); border-radius: 26px; }
  .pp0 .app-tile svg, .pp1 .app-tile svg { width: 32px; height: 32px; }
  .pp0 .app-label, .pp1 .app-label { font-size: 13px; }

  .pp0 .w-music, .pp1 .w-music { padding: 18px 22px 16px; }
  .pp0 .mu-disc, .pp1 .mu-disc { width: 58px; height: 58px; border-radius: 15px; }
  .pp0 .mu-title, .pp1 .mu-title { font-size: 15px; }
  .pp0 .mu-lrc, .pp1 .mu-lrc { display: block; }
  .pp0 .mu-time, .pp0 .mu-mode { display: flex; }

  .pp0 .z-extra, .pp1 .z-extra { flex: none; }
  .pp0 .z-extra > .widget-wrap, .pp1 .z-extra > .widget-wrap { height: 200px; }

  .dock-wrap { padding-left: 90px; padding-right: 90px; }
  .dock { width: min(520px, 100%); }
}
/* 长屏手机（iPhone 16 等）：把纵向留白用更舒展的时钟卡吸收掉 */
@media (max-width: 599px) and (orientation: portrait) {
  .pp0 .z-clock { height: clamp(200px, 27vh, 268px); }
  .pp0 .ck-time { font-size: clamp(48px, 13vw, 58px); }
}

/* 编辑模式 */
.desktop.editing .app-item, .desktop.editing .widget-wrap { animation: wiggle .42s ease-in-out infinite alternate; }
@keyframes wiggle { from { transform: rotate(-1deg); } to { transform: rotate(1deg); } }
.del-badge {
  position: absolute; top: -6px; left: calc(50% - 26px);
  width: 22px; height: 22px; border-radius: 50%;
  background: #2b2b30; color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .28);
  z-index: 6; pointer-events: auto;
}
.zone > .del-badge, .widget-wrap > .del-badge { left: -4px; top: -6px; }
.dragging-source { opacity: .28; }
.drag-ghost { position: fixed; z-index: 200; pointer-events: none; transform: translate(-50%, -50%) scale(1.06); filter: drop-shadow(0 12px 24px rgba(0, 0, 0, .28)); }
.drop-hint { outline: 2px dashed var(--line-strong); outline-offset: 3px; border-radius: 18px; }

/* 页面指示器 */
.page-dots { display: flex; align-items: center; justify-content: center; gap: 7px; height: 24px; flex: none; padding-bottom: 2px; position: relative; z-index: 3; }
.page-dots button { width: 6px; height: 6px; border-radius: 50%; background: var(--dot); transition: all .2s ease; }
.page-dots button.active { width: 18px; border-radius: 3px; background: var(--dot-active); }
.page-dots button.drop { outline: 2px solid var(--dot-active); outline-offset: 4px; }

/* Dock */
.dock-wrap { flex: none; padding: 2px 20px calc(10px + env(safe-area-inset-bottom, 0px)); position: relative; z-index: 4; }
.dock {
  width: min(440px, 100%);
  margin: 0 auto;
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  padding: 12px 16px;
  border-radius: 34px;
  background: var(--dock-bg);
  border: 1px solid var(--dock-border);
  box-shadow: 0 14px 34px rgba(22, 32, 26, .18);
  backdrop-filter: blur(22px) saturate(1.25);
  -webkit-backdrop-filter: blur(22px) saturate(1.25);
  min-height: 72px;
  align-items: center;
}
.dock .app-item { justify-content: center; gap: 0; }
.dock .app-tile {
  width: 42px; height: 42px; border-radius: 13px;
  background: transparent; border-color: transparent; box-shadow: none;
  color: var(--dock-icon, var(--tile-color));
  backdrop-filter: none; -webkit-backdrop-filter: none;
}
.dock .app-tile svg { width: 23px; height: 23px; }
.dock .app-label { display: none; }
.dock-empty { color: var(--glass-text-2); font-size: 11px; align-self: center; grid-column: 1 / -1; text-align: center; }

/* 编辑工具条 */
.edit-bar { position: absolute; left: 50%; bottom: calc(var(--dock-h) + 26px); transform: translateX(-50%); z-index: 30; }
.edit-bar .pill {
  display: flex; gap: 4px; padding: 6px;
  border-radius: 22px; background: var(--glass-bg-strong);
  border: 1px solid var(--glass-border); box-shadow: var(--glass-shadow);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
}
.edit-bar button { display: inline-flex; align-items: center; gap: 4px; padding: 8px 11px; border-radius: 15px; font-size: 11px; color: var(--glass-text); white-space: nowrap; }
.edit-bar button:active { background: rgba(255, 255, 255, .3); }
.drag-label { padding: 10px 16px; border-radius: 14px; background: var(--glass-bg-strong); color: var(--glass-text); font-size: 11px; box-shadow: var(--glass-shadow); }

/* ---------- 组件通用 ---------- */
.widget-wrap { position: relative; min-width: 0; min-height: 0; border-radius: var(--zone-radius); }
.widget {
  position: relative;
  width: 100%; height: 100%;
  border-radius: var(--zone-radius);
  overflow: hidden;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  backdrop-filter: blur(20px) saturate(1.22);
  -webkit-backdrop-filter: blur(20px) saturate(1.22);
  color: var(--glass-text);
  user-select: none; -webkit-user-select: none;
  display: flex; flex-direction: column;
}
.widget-edit {
  position: absolute; top: 8px; right: 8px; z-index: 8;
  width: 26px; height: 26px; border-radius: 50%;
  display: none; align-items: center; justify-content: center;
  background: rgba(20, 24, 21, .42); color: #fff;
}
.desktop.editing .widget-edit { display: flex; }
.widget-bg { position: absolute; inset: 0; background-size: cover; background-position: center; z-index: 0; }
.widget-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(15, 20, 16, .18), rgba(15, 20, 16, .58)); z-index: 1; }
.widget > *:not(.widget-bg):not(.widget-shade):not(.ck-bg):not(.ck-shade):not(.pc-bg):not(.pc-shade):not(.quote-art):not(.widget-edit) { position: relative; z-index: 2; }

/* 时钟 */
.w-clock { background: #3c4a42; color: #fff; border-color: rgba(255, 255, 255, .28); }
.ck-bg { position: absolute; inset: 0; background-size: cover; background-position: center 62%; z-index: 0; }
.ls0 .ck-bg { filter: brightness(1.16) saturate(.86); }
.ck-shade { position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(16, 22, 18, .16), rgba(14, 20, 16, .26) 58%, rgba(12, 18, 14, .44)); }
.ck-body { position: relative; z-index: 2; height: 100%; padding: 18px 22px; display: flex; flex-direction: column; justify-content: center; }
.ck-time { font-size: clamp(44px, 6vw, 68px); line-height: 1; font-weight: 300; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.ck-date { margin-top: 8px; font-size: 12px; letter-spacing: .08em; opacity: .94; }
.ck-text { margin-top: auto; font-size: 12px; opacity: .92; letter-spacing: .02em; }
.pp0 .ck-body { padding: 16px 20px; }
.pp0 .ck-time { font-size: 52px; }
.pp0 .ck-date { margin-top: 5px; font-size: 13px; }
/* 竖屏参考图：时钟是浅色玻璃卡，配深色文字，右侧保留树木影像 */
.pp0 .w-clock, .pp1 .w-clock { background: rgba(255, 255, 255, .32); color: #26332c; border-color: rgba(255, 255, 255, .62); }
.pp0 .ck-bg, .pp1 .ck-bg { filter: brightness(1.08) saturate(.88); background-position: center 26%; }
.pp0 .ck-shade, .pp1 .ck-shade { background: linear-gradient(90deg, rgba(255, 255, 255, .8) 0%, rgba(255, 255, 255, .48) 46%, rgba(255, 255, 255, .04) 100%); }

/* 音乐 */
.w-music { padding: 14px 16px 12px; gap: 0; color: var(--glass-text); }
.w-music.has-bg { color: #fff; }
.w-music.playing .mu-disc img { animation: spin 16s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.mu-top { display: flex; align-items: center; gap: 12px; min-width: 0; }
.mu-disc {
  width: 52px; height: 52px; border-radius: 14px; flex: none; overflow: hidden;
  background: rgba(255, 255, 255, .34); border: 1px solid var(--glass-border);
  display: flex; align-items: center; justify-content: center; color: var(--glass-text-2);
}
.w-music.has-bg .mu-disc { background: rgba(255, 255, 255, .16); border-color: rgba(255, 255, 255, .3); }
.mu-disc img { width: 100%; height: 100%; object-fit: cover; }
.mu-meta { flex: 1; min-width: 0; }
.mu-title { display: block; width: 100%; text-align: left; font-size: 14px; font-weight: 600; color: inherit; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mu-artist { margin-top: 3px; font-size: 11px; color: var(--glass-text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.w-music.has-bg .mu-artist { color: rgba(255, 255, 255, .7); }
.mu-open { width: 24px; height: 24px; flex: none; display: flex; align-items: center; justify-content: center; color: var(--glass-text-2); }
.w-music.has-bg .mu-open { color: rgba(255, 255, 255, .75); }
.mu-lrc { margin-top: 8px; font-size: 11px; color: var(--glass-text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.w-music.has-bg .mu-lrc { color: rgba(255, 255, 255, .72); }
.mu-progress { margin-top: auto; padding-top: 8px; }
.mu-seek {
  -webkit-appearance: none; appearance: none; width: 100%; height: 3px; border-radius: 2px; display: block;
  background: linear-gradient(to right, currentColor 0 var(--mu-progress, 0%), rgba(28, 36, 31, .16) var(--mu-progress, 0%) 100%);
  outline: none;
}
.w-music.has-bg .mu-seek { background: linear-gradient(to right, #fff 0 var(--mu-progress, 0%), rgba(255, 255, 255, .26) var(--mu-progress, 0%) 100%); }
.mu-seek::-webkit-slider-thumb { -webkit-appearance: none; width: 10px; height: 10px; border-radius: 50%; background: currentColor; opacity: 0; transition: opacity .15s; }
.mu-seek:hover::-webkit-slider-thumb { opacity: .8; }
.mu-time { display: flex; justify-content: space-between; margin-top: 4px; font-size: 10px; color: var(--glass-text-2); font-variant-numeric: tabular-nums; }
.w-music.has-bg .mu-time { color: rgba(255, 255, 255, .7); }
.mu-bottom { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.mu-mode { font-size: 10px; color: var(--glass-text-2); }
.w-music.has-bg .mu-mode { color: rgba(255, 255, 255, .7); }
.mu-next { width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; color: var(--glass-text-2); }
.mu-play {
  width: 34px; height: 34px; border-radius: 50%; margin-left: auto; flex: none;
  background: rgba(30, 36, 30, .86); color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.w-music.has-bg .mu-play { background: rgba(255, 255, 255, .9); color: #1c241f; }
.mu-empty { height: 100%; display: flex; flex-direction: column; justify-content: center; gap: 6px; color: var(--glass-text-2); }
.mu-empty-title { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--glass-text); }
.mu-empty p { font-size: 11px; line-height: 1.45; }
.mu-empty-action { display: inline-flex; align-items: center; gap: 2px; margin-top: 2px; font-size: 11px; color: var(--glass-text); }
/* 竖屏音乐卡：收紧纵向节奏，保证播放键不被裁掉 */
.pp0 .mu-disc, .pp1 .mu-disc { width: 50px; height: 50px; border-radius: 13px; }
.pp0 .mu-lrc, .pp1 .mu-lrc { display: none; }
.pp0 .mu-time, .pp1 .mu-time { display: none; }
.pp0 .mu-mode, .pp1 .mu-mode { display: none; }
.pp0 .w-music, .pp1 .w-music { padding: 12px 16px 10px; }
.pp0 .mu-progress, .pp1 .mu-progress { padding-top: 6px; }
.pp0 .mu-bottom, .pp1 .mu-bottom { margin-top: 2px; }
.pp0 .mu-play, .pp1 .mu-play { width: 32px; height: 32px; }

/* 待办 */
.w-todo { padding: 14px 16px 12px; gap: 7px; }
.todo-head { display: flex; align-items: center; justify-content: space-between; }
.todo-title { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; }
.todo-head small { font-size: 10px; color: var(--glass-text-2); }
.todo-list { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 7px; scrollbar-width: none; }
.todo-list::-webkit-scrollbar { display: none; }
.todo-row { display: flex; align-items: center; gap: 8px; min-height: 18px; }
.todo-check {
  width: 15px; height: 15px; border-radius: 4px; flex: none;
  border: 1px solid var(--glass-text-2); color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.todo-row.done .todo-check { background: rgba(40, 48, 42, .82); border-color: transparent; }
.todo-text { flex: 1; min-width: 0; border: 0; background: none; outline: none; font-size: 11px; color: var(--glass-text); padding: 0; }
.todo-row.done .todo-text { text-decoration: line-through; opacity: .5; }
.todo-del { opacity: 0; color: var(--glass-text-2); }
.todo-row:hover .todo-del { opacity: .7; }
.todo-empty { flex: 1; display: flex; align-items: center; font-size: 11px; color: var(--glass-text-2); }
.todo-add { display: flex; align-items: center; gap: 6px; border-top: 1px solid rgba(28, 36, 31, .1); padding-top: 7px; }
.todo-add input { flex: 1; min-width: 0; border: 0; background: none; outline: none; font-size: 11px; color: var(--glass-text); }
.todo-add input::placeholder { color: var(--glass-text-2); }
.todo-add button { width: 20px; height: 20px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: rgba(28, 36, 31, .12); color: var(--glass-text); }
.todo-add button:disabled { opacity: .4; }

/* 用户资料 */
.w-postcard { background: var(--glass-bg-strong); padding: 0 18px; justify-content: center; }
.pc-bg { position: absolute; inset: 0; background-size: cover; background-position: center; z-index: 0; }
.pc-shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(15, 20, 16, .46), rgba(15, 20, 16, .18)); z-index: 1; }
.w-postcard.has-bg .pc-body { position: relative; z-index: 2; color: #fff; }
.pc-body { display: flex; align-items: center; gap: 12px; width: 100%; position: relative; z-index: 2; }
.pc-avatar {
  width: 44px; height: 44px; border-radius: 50%; flex: none;
  background: rgba(255, 255, 255, .5);
  border: 2px solid rgba(255, 255, 255, .82);
  display: flex; align-items: center; justify-content: center;
  color: var(--glass-text-2); overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .1);
}
.w-postcard.has-bg .pc-avatar { border-color: #fff; }
.pc-text { flex: 1; min-width: 0; }
.pc-name { font-size: 14px; font-weight: 650; color: var(--glass-text); }
.pc-sign { margin-top: 3px; font-size: 11px; color: var(--glass-text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.w-postcard.has-bg .pc-name { color: #fff; }
.w-postcard.has-bg .pc-sign { color: rgba(255, 255, 255, .78); }
.pc-arrow { color: var(--glass-text-2); flex: none; }
.w-postcard.has-bg .pc-arrow { color: rgba(255, 255, 255, .8); }

/* 每日一句 */
.w-quote { padding: 18px 20px 16px; }
.quote-art {
  position: absolute; right: -6%; top: -8%; width: 60%; height: 116%;
  background-size: cover; background-position: center;
  opacity: .5; z-index: 0;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 52%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 52%);
}
.quote-label { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: var(--glass-text-2); }
.quote-text { margin-top: auto; margin-bottom: auto; max-width: 72%; font-size: clamp(16px, 1.7vw, 21px); line-height: 1.55; font-weight: 500; letter-spacing: .01em; }
.quote-author { align-self: flex-end; font-size: 11px; color: var(--glass-text-2); }
.has-bg .quote-text { color: #fff; }
.has-bg .quote-label, .has-bg .quote-author { color: rgba(255, 255, 255, .8); }
.pp1 .quote-text { font-size: 17px; }

/* 出行 */
.w-travel { flex-direction: row; align-items: center; gap: 12px; padding: 10px 14px; }
.travel-thumb { width: 48px; height: 48px; border-radius: 12px; flex: none; background-size: cover; background-position: center; }
.travel-body { flex: 1; min-width: 0; }
.travel-text { font-size: 13px; font-weight: 500; color: var(--glass-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.has-bg .travel-text { color: #fff; }
.travel-play { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--glass-text-2); display: flex; align-items: center; justify-content: center; color: var(--glass-text); flex: none; }

/* 最近动态 */
.w-moments { padding: 14px 16px; }
/* 朋友圈 App 的 .moments-head 有全局样式，这里用更高优先级还原成桌面组件头部 */
.w-moments .moments-head { height: auto; flex: none; background: none; position: static; }
.w-moments .moment-text { margin-top: 2px; font-size: 11px; line-height: 1.5; color: var(--glass-text-2); white-space: pre-wrap; word-break: break-word; }
.w-moments .moment-row { background: none; }
.moments-head { display: flex; align-items: center; justify-content: space-between; font-size: 13px; font-weight: 600; color: var(--glass-text); }
.moments-title { display: inline-flex; align-items: center; gap: 6px; }
.moments-list { margin-top: 10px; flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; scrollbar-width: none; }
.moments-list::-webkit-scrollbar { display: none; }
.moment-row { display: flex; align-items: flex-start; gap: 9px; }
.moment-main { flex: 1; min-width: 0; }
.moment-meta { display: flex; align-items: center; gap: 8px; }
.moment-meta b { font-size: 11px; font-weight: 600; color: var(--glass-text); }
.moment-meta time { font-size: 10px; color: var(--glass-text-2); }
.moment-text {
  margin-top: 2px; font-size: 11px; line-height: 1.5; color: var(--glass-text-2);
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
  overflow: hidden; overflow-wrap: anywhere; word-break: break-word; white-space: pre-wrap;
}
.moment-thumb { width: 42px; height: 42px; border-radius: 9px; flex: none; background-size: cover; background-position: center; }
.moments-empty { margin-top: 10px; flex: 1; display: flex; align-items: center; justify-content: center; font-size: 11px; color: var(--glass-text-2); }

/* 拍立得 */
.w-polaroid { background: transparent; border-color: transparent; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
.w-polaroid .po-frame {
  position: relative; width: 88%; height: 90%; margin: auto;
  background: #fff; border-radius: 5px; padding: 8px 8px 22px;
  transform: rotate(-2.4deg);
  box-shadow: 0 12px 26px rgba(18, 26, 20, .22);
  display: flex; flex-direction: column;
}
.w-polaroid .po-photo { flex: 1; border-radius: 2px; background: #e7e7ea center/cover no-repeat; display: flex; align-items: center; justify-content: center; color: #b0b0b8; }
.w-polaroid .po-cap { position: absolute; left: 0; right: 0; bottom: 5px; text-align: center; font-size: 9px; color: #7a7a80; letter-spacing: .03em; white-space: nowrap; overflow: hidden; }
/* 竖屏拍立得：固定相纸尺寸，照片区不再被压扁 */
.pp0 .w-polaroid .po-frame, .pp1 .w-polaroid .po-frame {
  width: 172px; height: 194px; max-width: 82%;
  padding: 7px 7px 22px;
  transform: rotate(-1.8deg);
}
.pp1 .w-polaroid .po-frame { transform: rotate(1.6deg); }
.pp0 .w-polaroid .po-cap, .pp1 .w-polaroid .po-cap { bottom: 5px; font-size: 10px; }

/* 对话气泡 */
.w-dialogue { padding: 14px 16px; gap: 10px; justify-content: center; }
.dg-row { display: flex; align-items: flex-end; gap: 8px; }
.dg-row.right { flex-direction: row-reverse; }
.dg-avatar { width: 26px; height: 26px; border-radius: 50%; flex: none; background: rgba(255, 255, 255, .5) center/cover; display: flex; align-items: center; justify-content: center; font-size: 10px; color: var(--glass-text-2); }
.dg-bubble { max-width: 76%; padding: 8px 11px; border-radius: 13px; background: rgba(255, 255, 255, .45); font-size: 11px; line-height: 1.45; color: var(--glass-text); }
.dg-row.right .dg-bubble { background: rgba(30, 38, 32, .78); color: #fff; }

/* ---------- 尺寸适配 ---------- */
@media (max-width: 1000px) {
  .desktop { --pad: 24px; --gap: 16px; }
  .ck-time { font-size: clamp(38px, 6vw, 54px); }
  .desk-layout.ls0 { grid-template-rows: var(--top-h) 110px 78px; }
  .app-tile { width: 48px; height: 48px; border-radius: 14px; }
}
@media (max-width: 760px) {
  .desktop { --pad: 18px; --gap: 13px; --dock-h: 72px; }
  .desk-layout.custom { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 84px; }
  .dock-wrap { padding: 2px 30px calc(10px + env(safe-area-inset-bottom, 0px)); }
  .dock { width: 100%; border-radius: 32px; min-height: 72px; padding: 10px 12px; }
  .dock .app-tile { width: 42px; height: 42px; }
  .edit-bar .pill { flex-wrap: wrap; justify-content: center; max-width: 92vw; }
}
@media (orientation: landscape) and (max-height: 520px) {
  .desktop { --top-h: 100px; --pad: 14px; --gap: 9px; }
  .desk-layout.ls0 { grid-template-rows: var(--top-h) 76px 52px; }
  .ls0 .app-tile { width: 36px; height: 36px; border-radius: 11px; }
  .ls0 .app-tile svg { width: 18px; height: 18px; }
  .ls0 .app-grid { gap: 6px 4px; }
  .ls0 .app-label { font-size: 9px; }
  .ck-time { font-size: 38px; }
  .w-clock .ck-body { padding: 10px 16px; }
  .w-clock .ck-text { display: none; }
  .w-music { padding: 9px 12px; gap: 5px; }
  .w-music .mu-lrc { display: none; }
  .status-bar { height: 30px; }
  .dock-wrap { padding: 0 24px 6px; }
  .dock { min-height: 54px; padding: 5px 10px; border-radius: 24px; }
  .dock .app-tile { width: 34px; height: 34px; }
  .dock .app-tile svg { width: 20px; height: 20px; }
  .page-dots { height: 15px; }
}
/* 短屏手机（如 iPhone SE）：压缩纵向节奏，保证 Dock 不压住内容 */
@media (max-width: 760px) and (max-height: 720px) {
  .pp0 { gap: 10px; }
  .pp0 .z-clock { height: 148px; }
  .pp0 .ck-time { font-size: 42px; }
  .pp0 .z-music { height: 96px; }
  .pp0 .w-music, .pp1 .w-music { padding: 9px 14px 8px; }
  .pp0 .mu-disc, .pp1 .mu-disc { width: 44px; height: 44px; border-radius: 12px; }
  .pp0 .mu-progress, .pp1 .mu-progress { display: none; }
  .pp0 .mu-play, .pp1 .mu-play { width: 30px; height: 30px; }
  .pp0 .app-tile, .pp1 .app-tile { width: 50px; height: 50px; border-radius: 15px; }
  .pp0 .app-tile svg, .pp1 .app-tile svg { width: 23px; height: 23px; }
  .pp0 .app-grid { gap: 10px 10px; }
  .pp0 .z-postcard { height: 70px; flex: none; }
  .pp1 .app-grid { gap: 10px 10px; }
  .pp1 .z-quote { height: 132px; flex: none; }
  .pp1 .z-moments { min-height: 96px; }
  .dock { min-height: 64px; }
}

/* iPad 横屏（≥600px 高）：让桌面真正占满纵向空间，而不是把内容堆在顶部留出大片空白 */
@media (orientation: landscape) and (min-width: 900px) and (min-height: 600px) {
  .desk-layout.ls0 {
    height: 100%;
    grid-template-rows: clamp(200px, 31vh, 300px) minmax(120px, 1.06fr) minmax(86px, .72fr);
    align-content: stretch;
  }
  .ls0 .app-tile {
    width: clamp(60px, 6.4vw, 80px);
    height: clamp(60px, 6.4vw, 80px);
    border-radius: 20px;
  }
  .ls0 .app-tile svg { width: 28px; height: 28px; }
  .ls0 .z-apps { align-self: stretch; }
  .ls0 .app-grid { gap: 24px 14px; height: 100%; align-content: center; }
  .ls0 .z-postcard .widget-wrap { height: clamp(104px, 15.5vh, 128px); }
  .ls0 .z-travel .widget-wrap { height: clamp(76px, 11.5vh, 96px); }
  .ls0 .z-postcard, .ls0 .z-travel { align-self: center; }
}

/* ===== chat.css ===== */
/* 小手机 · 聊天 App */
.chat-app { position: absolute; inset: 0; display: flex; flex-direction: column; background: var(--bg); overflow: hidden; }

/* 登录 */
.login-wrap {
  flex: 1; display: flex; flex-direction: column; justify-content: center;
  padding: var(--sp-4) var(--sp-3);
  max-width: 420px; width: 100%; margin: 0 auto;
  overflow-y: auto; position: relative;
}
.login-back { position: absolute; top: 14px; left: 14px; z-index: 2; }
.login-mark {
  width: 64px; height: 64px; border-radius: 20px;
  background: var(--text); color: var(--bg);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: var(--sp-2);
}
.login-wrap h1 { font-size: var(--fs-h2); margin-bottom: 6px; }
.login-wrap .login-sub { font-size: var(--fs-body-sm); color: var(--text-3); margin-bottom: var(--sp-3); line-height: var(--lh-body); }
.login-card { background: var(--surface-solid); border-radius: var(--r-lg); padding: var(--sp-2); box-shadow: var(--shadow-1); }
.login-switch { display: flex; gap: 6px; margin-bottom: var(--sp-2); }
.login-switch button {
  flex: 1; height: 38px; border-radius: var(--r-full);
  font-size: var(--fs-body-sm); color: var(--text-2); background: var(--surface-2);
}
.login-switch button.active { background: var(--text); color: var(--bg); font-weight: 600; }
.acc-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: var(--sp-2); }
.acc-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: var(--r-md);
  background: var(--surface-solid); box-shadow: var(--shadow-1);
}
.login-foot { margin-top: var(--sp-2); font-size: 11px; color: var(--text-3); line-height: 1.6; text-align: center; }

/* 聊天主页 */
.chat-home { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.chat-head {
  height: calc(56px + env(safe-area-inset-top, 0px)); flex: none; display: flex; align-items: center;
  padding: env(safe-area-inset-top, 0px) 12px 0 20px; gap: 4px;
  background: var(--surface); backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border-bottom: 1px solid var(--line);
  position: relative; z-index: 6;
}
.chat-head h1 { flex: 1; font-size: var(--fs-h3); font-weight: 680; letter-spacing: -0.01em; }
.chat-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; }
.tabbar {
  flex: none; display: grid; grid-template-columns: repeat(4, 1fr);
  padding: 6px 8px calc(8px + env(safe-area-inset-bottom, 0px));
  background: var(--surface); backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border-top: 1px solid var(--line);
}
.tabbar button {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 6px 0; border-radius: var(--r-md);
  color: var(--text-3); font-size: 10px;
  transition: color .18s ease;
}
.tabbar button.active { color: var(--text); }
.tabbar button .ind { width: 4px; height: 4px; border-radius: 50%; background: transparent; }
.tabbar button.active .ind { background: var(--text); }

/* 好友列表 */
.friend-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 20px; width: 100%; text-align: left;
  border-bottom: 1px solid var(--line);
  background: var(--surface-solid);
  transition: background .16s ease;
}
.friend-row:active { background: var(--surface-2); }
.fr-main { flex: 1; min-width: 0; }
.fr-top { display: flex; align-items: baseline; gap: 8px; }
.fr-name { font-size: var(--fs-body-sm); font-weight: 600; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fr-time { font-size: 11px; color: var(--text-3); flex: none; font-variant-numeric: tabular-nums; }
.fr-msg {
  font-size: var(--fs-caption); color: var(--text-3);
  margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.fr-msg .typing { color: var(--text-2); }
.unread-dot { width: 8px; height: 8px; border-radius: 50%; background: #8a8a93; flex: none; }

.list-head-title {
  padding: 14px 20px 6px; font-size: var(--fs-caption);
  color: var(--text-3); letter-spacing: .06em;
}

/* 联系人 / 我的 */
.search-box { display: flex; gap: 8px; padding: 12px 16px; }
.search-box .input { flex: 1; }
.profile-hero { display: flex; align-items: center; gap: 14px; padding: var(--sp-3) 20px var(--sp-2); }
.profile-hero .name { font-size: var(--fs-h3); font-weight: 650; }
.profile-hero .sub { font-size: var(--fs-caption); color: var(--text-3); margin-top: 3px; }

/* 聊天室 */
.chat-room { position: absolute; inset: 0; display: flex; flex-direction: column; background: var(--bg); }
.room-head {
  height: calc(56px + env(safe-area-inset-top, 0px)); flex: none; display: flex; align-items: center; gap: 2px;
  padding: env(safe-area-inset-top, 0px) 6px 0;
  background: var(--surface); backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border-bottom: 1px solid var(--line);
  position: relative; z-index: 8;
}
.room-title { flex: 1; min-width: 0; text-align: center; }
.room-title .n { font-size: var(--fs-body-sm); font-weight: 620; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.room-title .s { font-size: 10px; color: var(--text-3); margin-top: 1px; }
.room-title .typing-label { color: var(--text-2); animation: blink 1.4s ease-in-out infinite; }
@keyframes blink { 0%,100% { opacity: .45; } 50% { opacity: 1; } }

.room-scroll {
  flex: 1; overflow-y: auto; overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 14px 14px 6px;
  background-color: transparent;
  background-size: cover; background-position: center;
  position: relative;
}
.room-scroll.transparent { background-image: none !important; }
.room-inner { max-width: 720px; margin: 0 auto; }
.load-more { display: flex; justify-content: center; padding: 6px 0 12px; }
.load-more button { font-size: 11px; color: var(--text-3); background: var(--surface-3); padding: 5px 12px; border-radius: var(--r-full); }

.msg-row { display: flex; gap: 8px; margin-bottom: 12px; align-items: flex-start; }
.msg-row.me { flex-direction: row-reverse; }
.msg-side { flex: none; width: 38px; display: flex; flex-direction: column; align-items: center; gap: 3px; }
.msg-side .t { font-size: 10px; color: var(--text-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.msg-col { max-width: 72%; display: flex; flex-direction: column; gap: 4px; }
.msg-row.me .msg-col { align-items: flex-end; }
.bubble {
  position: relative;
  background: var(--bubble-other); color: var(--bubble-other-text);
  padding: 10px 13px;
  border-radius: 16px 16px 16px 5px;
  font-size: var(--fs-body-sm); line-height: 1.62;
  box-shadow: 0 1px 2px rgba(0,0,0,.05);
  word-break: break-word; white-space: pre-wrap;
  transition: transform .16s ease, box-shadow .16s ease;
  user-select: text; -webkit-user-select: text;
}
.msg-row.me .bubble {
  background: var(--bubble-me); color: var(--bubble-me-text);
  border-radius: 16px 16px 5px 16px;
}
.bubble:active { transform: scale(.985); }
.msg-status { font-size: 10px; color: var(--text-3); }

.narration {
  text-align: center; font-size: var(--fs-caption);
  color: var(--text-3); padding: 2px 28px 12px;
  line-height: 1.6; font-style: italic;
  animation: fadeIn .3s ease;
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }

.think-card {
  max-width: 78%; margin: 0 0 10px 46px;
  background: var(--surface-2);
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-md);
  overflow: hidden;
}
.think-card.me { margin-left: 0; margin-right: 46px; }
.think-head {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 12px; font-size: 11px; color: var(--text-3);
  width: 100%; text-align: left;
}
.think-body { padding: 0 12px 10px; font-size: var(--fs-caption); color: var(--text-2); line-height: 1.6; white-space: pre-wrap; }
.tool-card {
  margin: 0 0 10px 46px; max-width: 78%;
  background: var(--surface-solid); border: 1px solid var(--line);
  border-radius: var(--r-md); overflow: hidden;
  box-shadow: var(--shadow-1);
}
.tool-head { display: flex; align-items: center; gap: 6px; padding: 9px 12px; font-size: 11px; color: var(--text-2); width: 100%; text-align: left; }
.tool-body { padding: 0 12px 10px; font-size: 11px; color: var(--text-3); line-height: 1.6; white-space: pre-wrap; }

/* 输入栏 */
.composer-wrap { flex: none; background: var(--surface); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); border-top: 1px solid var(--line); padding: 8px 10px calc(8px + env(safe-area-inset-bottom, 0px)); position: relative; z-index: 7; }
.composer { display: flex; align-items: flex-end; gap: 6px; max-width: 720px; margin: 0 auto; }
.comp-btn { width: 38px; height: 38px; border-radius: 50%; flex: none; display: flex; align-items: center; justify-content: center; color: var(--text-2); background: var(--surface-2); transition: background .18s; }
.comp-btn:active { background: var(--surface-3); }
.comp-input {
  flex: 1; min-height: 38px; max-height: 132px;
  padding: 9px 13px; border-radius: 19px;
  background: var(--surface-2); border: 1px solid transparent;
  font-size: var(--fs-body-sm); line-height: 1.5;
  resize: none; outline: none; overflow-y: auto;
}
.comp-input:focus { background: var(--surface-solid); border-color: var(--line-strong); }
.send-btn {
  width: 38px; height: 38px; border-radius: 50%; flex: none;
  background: var(--text); color: var(--bg);
  display: flex; align-items: center; justify-content: center;
  transition: transform .16s ease, opacity .16s ease;
}
.send-btn:disabled { opacity: .3; }
.send-btn:active { transform: scale(.92); }

.comp-drawer {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px;
  padding: 10px 6px 2px; max-width: 720px; margin: 0 auto;
  animation: fadeIn .2s ease;
}
.comp-drawer button {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  font-size: 10px; color: var(--text-2);
  padding: 8px 4px; border-radius: var(--r-md); background: var(--surface-2);
}
.comp-drawer button.on { background: var(--text); color: var(--bg); }

/* 消息长按菜单 */
.msg-menu-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 14px 18px; font-size: var(--fs-body-sm); text-align: left;
  border-bottom: 1px solid var(--line);
}
.msg-menu-item:last-child { border-bottom: none; }
.msg-menu-item.danger { color: #9c3b3b; }
.msg-menu-meta { padding: 10px 18px 4px; font-size: 11px; color: var(--text-3); line-height: 1.6; max-height: 120px; overflow-y: auto; white-space: pre-wrap; background: var(--surface-2); }

/* 朋友圈 */
.moments-head { position: relative; height: 180px; flex: none; background: #d9d9de center/cover no-repeat; }
.moments-head .mh-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.18), rgba(0,0,0,.05)); }
.moments-head .mh-user { position: absolute; right: 16px; bottom: -20px; display: flex; align-items: flex-end; gap: 10px; color: #fff; }
.moments-head .mh-name { font-size: var(--fs-body-sm); font-weight: 600; text-shadow: 0 1px 4px rgba(0,0,0,.4); padding-bottom: 26px; }
.moments-head .mh-avatar { width: 56px; height: 56px; border-radius: 10px; border: 2px solid #fff; overflow: hidden; background: #eee; }
.moments-head .mh-avatar img { width: 100%; height: 100%; object-fit: cover; }
.moment-card { padding: 14px 20px; border-bottom: 1px solid var(--line); background: var(--surface-solid); }
.moment-top { display: flex; gap: 10px; }
.moment-main { flex: 1; min-width: 0; }
.moment-name { font-size: var(--fs-body-sm); font-weight: 600; }
.moment-text { font-size: var(--fs-body-sm); line-height: 1.6; margin-top: 4px; white-space: pre-wrap; word-break: break-word; }
.moment-img { margin-top: 8px; border-radius: var(--r-md); overflow: hidden; max-width: 220px; }
.moment-foot { display: flex; gap: 14px; margin-top: 8px; align-items: center; }
.moment-foot button { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; color: var(--text-3); }
.moment-comments { margin-top: 8px; background: var(--surface-2); border-radius: var(--r-sm); padding: 6px 10px; font-size: 11px; line-height: 1.7; color: var(--text-2); }
.moment-comment-line b { font-weight: 600; color: var(--text); }
.moment-comment-quote { display: block; margin-top: 2px; padding-left: 8px; border-left: 2px solid var(--line-strong); color: var(--text-3); font-size: 10px; opacity: .8; }
.read-receipt { font-size: 9px; color: var(--text-3); opacity: .4; margin-top: 2px; line-height: 1; text-align: right; letter-spacing: .02em; }

/* 好友设置 */
.settings-list-head { padding: 0 16px; }
.subpage { position: absolute; inset: 0; display: flex; flex-direction: column; background: var(--bg); z-index: 30; animation: pageIn .24s cubic-bezier(.32,.72,0,1); }
.css-editor { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; line-height: 1.65; min-height: 140px; }

/* 聊天卡片：位置/转账/红包/外卖/礼物/语音/邀请 */
.card-location, .card-transfer, .card-takeout, .card-gift, .card-voice, .card-invite {
  max-width: 240px; border-radius: 16px; padding: 12px 14px; cursor: pointer;
}
.card-redpacket { max-width: 220px; border-radius: 16px; padding: 12px 14px; display: flex; align-items: center; gap: 10px; cursor: pointer; background: #f3e6c8; color: #6b4a1a; }
.card-redpacket .rp-icon { width: 40px; height: 40px; border-radius: 50%; background: #d94a4a; color: #fff; display: flex; align-items: center; justify-content: center; }
.card-redpacket .rp-text { flex: 1; min-width: 0; }
.card-redpacket .rp-note { font-size: 14px; font-weight: 600; }
.card-redpacket .rp-status { font-size: 11px; opacity: .75; }
.card-location .loc-name { font-size: 15px; font-weight: 600; }
.card-location .loc-meta { font-size: 12px; opacity: .7; margin-top: 2px; }
.card-location .loc-addr { font-size: 11px; opacity: .55; margin-top: 4px; }
.card-transfer { background: #1a7f4a; color: #fff; }
.card-transfer .tf-amount { font-size: 22px; font-weight: 700; }
.card-transfer .tf-note { font-size: 12px; opacity: .9; margin-top: 4px; }
.card-transfer .tf-status { font-size: 11px; opacity: .75; margin-top: 2px; }
.card-takeout { background: #fff; border: 1px solid var(--line); }
.card-takeout .tk-shop { font-size: 14px; font-weight: 600; }
.card-takeout .tk-items { font-size: 12px; opacity: .7; margin: 4px 0; }
.card-takeout .tk-total { font-size: 13px; font-weight: 600; color: #d94a4a; }
.card-takeout .tk-status { font-size: 11px; opacity: .55; margin-top: 2px; }
.card-gift { text-align: center; background: #fafafa; }
.card-gift .gf-emoji { font-size: 32px; }
.card-gift .gf-name { font-size: 14px; font-weight: 600; margin-top: 4px; }
.card-gift .gf-note { font-size: 12px; opacity: .6; margin-top: 2px; }
.card-voice { display: flex; align-items: center; gap: 8px; min-width: 70px; justify-content: flex-start; }
.card-voice .vc-dur { font-size: 14px; }
.card-invite {
  display: flex; align-items: center; gap: 10px;
  min-width: 218px; max-width: min(300px, 76vw);
  background: var(--surface-solid, #fff); color: var(--text, #141416);
  border: 1px solid var(--line-strong, rgba(20,20,22,.16));
  box-shadow: 0 1px 0 rgba(0,0,0,.03);
}
.card-invite .inv-text { flex: 1; min-width: 0; }
.card-invite .inv-title { font-size: 13px; font-weight: 600; letter-spacing: .01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-invite .inv-artist { font-size: 11px; opacity: .55; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-invite .inv-action {
  flex: none; padding-left: 10px; border-left: 1px solid var(--line, rgba(20,20,22,.09));
  color: var(--text, #141416); font-size: 10px; font-weight: 650; letter-spacing: .1em; white-space: nowrap;
}
.card-invite.accepted { background: var(--surface-2, #f7f7f8); }
.card-invite.accepted .inv-action { opacity: .6; }
.card-invite.declined { opacity: .55; }
/* 自己发出的邀请：黑底白字；对方发来的邀请：白底黑字 */
.msg-row.me .card-invite {
  background: var(--bubble-me, #1f1f22); color: var(--bubble-me-text, #fafafa);
  border-color: var(--bubble-me, #1f1f22);
}
.msg-row.me .card-invite .inv-title { color: var(--bubble-me-text, #fafafa); }
.msg-row.me .card-invite .inv-artist { color: rgba(255,255,255,.62); opacity: 1; }
.msg-row.me .card-invite .inv-action { color: var(--bubble-me-text, #fafafa); border-left-color: rgba(255,255,255,.24); }
.msg-row.me .card-invite.accepted { background: var(--bubble-me, #1f1f22); }

/* 礼物选择网格 */
.gift-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 12px; }
.gift-btn { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 6px; border-radius: 12px; border: 1px solid var(--line); background: #fff; }
.gift-btn.on { border-color: #1a7f4a; background: #f0f7f2; }
.gift-btn .gf-emoji { font-size: 26px; }
.gift-btn .gf-name { font-size: 11px; }

/* 外卖单据 */
.receipt { background: #fff; border-radius: 8px; padding: 16px; font-size: 13px; }
.receipt .rp-shop { font-size: 16px; font-weight: 600; margin-bottom: 8px; }
.receipt .rp-line { opacity: .6; margin: 4px 0; }
.receipt .rp-items { margin: 10px 0; border-top: 1px dashed var(--line); border-bottom: 1px dashed var(--line); padding: 8px 0; }
.receipt .rp-item { display: flex; padding: 3px 0; }
.receipt .rp-item span:first-child { flex: 1; }
.receipt .rp-item span:nth-child(2) { width: 50px; text-align: center; }
.receipt .rp-item span:last-child { width: 60px; text-align: right; }
.receipt .rp-total { font-size: 16px; font-weight: 700; text-align: right; color: #d94a4a; margin: 8px 0; }
.rp-opened { text-align: center; padding: 24px 0; }
.rp-opened .rp-amount { font-size: 36px; font-weight: 700; color: #d94a4a; }
.rp-opened .rp-note { font-size: 14px; opacity: .7; margin-top: 8px; }

/* 表情消息 / 通话 / 帖子 / 情侣邀请 */
.sticker-msg { max-width: 148px; max-height: 148px; border-radius: 12px; display: block; cursor: zoom-in; background: #fff; }
.card-call { display: flex; align-items: center; gap: 10px; background: #f7f7f9; }
.card-call .call-ico { width: 34px; height: 34px; border-radius: 50%; background: #e7f3ec; color: #1a7f4a; display: flex; align-items: center; justify-content: center; flex: none; }
.card-call .call-main { flex: 1; min-width: 0; }
.card-call .call-title { font-size: 13px; font-weight: 600; }
.card-call .call-sub { font-size: 11px; opacity: .6; margin-top: 2px; }
.card-post { display: block; text-align: left; background: #fbfbfd; max-width: 250px; }
.card-post .post-tag { font-size: 10px; opacity: .55; letter-spacing: .04em; }
.card-post .post-title { font-size: 14px; font-weight: 650; margin: 4px 0; }
.card-post .post-text { font-size: 12px; opacity: .7; line-height: 1.5; }
.card-post .post-more { font-size: 11px; color: #1a7f4a; margin-top: 6px; }
.card-couple { display: flex; align-items: center; gap: 10px; background: #fff4f6; }
.card-couple .cp-icon { width: 34px; height: 34px; border-radius: 50%; background: #ffe0e6; color: #d94a6a; display: flex; align-items: center; justify-content: center; flex: none; }
.card-couple .cp-text { flex: 1; min-width: 0; text-align: left; }
.card-couple .cp-title { font-size: 13px; font-weight: 600; color: #b03a55; }
.card-couple .cp-sub { font-size: 11px; opacity: .65; margin-top: 2px; }

/* 表情托盘 */
.sticker-tray { border-top: 1px solid var(--line); background: var(--surface-solid); max-height: 300px; overflow-y: auto; }
.sticker-tray .sticker-panel { border: 0; border-radius: 0; box-shadow: none; }

/* 朋友圈点赞名单 / 评论身份 */
.moment-likes { font-size: 11px; color: #b03a55; padding: 6px 0 0 48px; line-height: 1.5; }
.moment-foot button.on { color: #d94a6a; }
.moment-name .tag { font-size: 10px; opacity: .8; }

/* 朋友圈发布身份勾选 */
.check-list { display: flex; flex-direction: column; gap: 6px; padding: 4px 0; }
.check-row { display: flex; align-items: center; gap: 8px; font-size: 13px; padding: 6px 0; }
.check-row input { width: 16px; height: 16px; }

/* 帖子详情 */
.post-detail-title { font-size: 16px; font-weight: 700; line-height: 1.4; }
.post-detail-text { font-size: 13px; line-height: 1.7; white-space: pre-wrap; opacity: .85; max-height: 320px; overflow-y: auto; }

/* ===== apps.css ===== */
/* 小手机 · 其他应用 */
.app-view { position: absolute; inset: 0; display: flex; flex-direction: column; overflow: hidden; background: var(--bg); }

/* 档案 */
.char-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; padding: var(--sp-2); }
.char-card {
  background: var(--surface-solid); border-radius: var(--r-lg);
  padding: var(--sp-2); text-align: center;
  box-shadow: var(--shadow-1);
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  transition: transform .18s ease;
}
.char-card:active { transform: scale(.97); }
.char-card .cname { font-size: var(--fs-body-sm); font-weight: 600; }
.char-card .cno { font-size: 11px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.char-card .cmeta { font-size: 11px; color: var(--text-3); }
.avatar-picker { display: flex; align-items: center; gap: 14px; padding: 4px 0 12px; }
.ref-thumb { width: 64px; height: 64px; flex: none; border-radius: var(--r-md); overflow: hidden; background: var(--surface-2); }
.ref-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* 记忆 */
.char-chips { display: flex; gap: 8px; overflow-x: auto; padding: 12px 16px 4px; }
.char-chips .chip { flex: none; }
.chip.on { background: var(--text-1); color: var(--surface-solid); border-color: var(--text-1); }
.mem-config { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 16px 12px; font-size: var(--fs-caption); color: var(--text-2); }
.mem-threshold { width: 66px; padding: 6px 8px; }
.mem-tabs { margin: 0 16px; }
.mem-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 16px; }
.mem-list { padding: 0 16px 24px; display: flex; flex-direction: column; gap: 10px; }
.mem-card { border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px; background: var(--surface); }
.mem-card.off { opacity: .55; }
.mem-head { display: flex; align-items: center; gap: 8px; }
.mem-head b { flex: 1; font-size: var(--fs-body-sm); font-weight: 600; }
.mem-text { font-size: 13px; line-height: 1.7; margin: 8px 0; color: var(--text-2); white-space: pre-wrap; }
.mem-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: 11px; background: var(--surface-2); border-radius: var(--r-full); padding: 2px 8px; color: var(--text-2); }
.mem-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.danger-text { color: #9c3b3b; }
.source-line { padding: 10px 0; border-bottom: 1px solid var(--line); }
.source-line:last-child { border-bottom: 0; }
.source-line p { font-size: 13px; line-height: 1.65; margin: 4px 0 0; }
.pick-btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-size: var(--fs-caption); color: var(--text-2);
  border: 1px dashed var(--line-strong); padding: 8px 12px;
  border-radius: var(--r-full); cursor: pointer; white-space: nowrap;
}
.pick-btn:active { background: var(--surface-2); }
.form-section { background: var(--surface-solid); border-radius: var(--r-lg); padding: var(--sp-2); margin-bottom: 12px; box-shadow: var(--shadow-1); }
.form-section h3 { font-size: var(--fs-body-sm); font-weight: 650; margin-bottom: 10px; display: flex; align-items: center; gap: 6px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-variant-numeric: tabular-nums; }
.copy-line { display: flex; align-items: center; gap: 8px; }
.copy-line .v { flex: 1; background: var(--surface-2); border-radius: var(--r-sm); padding: 8px 10px; font-size: 12px; }

/* 世界书 */
.wb-cover { display: flex; align-items: center; gap: 12px; padding: 14px var(--sp-2); background: var(--surface-solid); border-bottom: 1px solid var(--line); }
.wb-cover .ico { width: 40px; height: 40px; border-radius: 12px; background: var(--surface-3); display: flex; align-items: center; justify-content: center; color: var(--text-2); }
.entry-card { background: var(--surface-solid); border-radius: var(--r-md); padding: 12px; margin-bottom: 10px; box-shadow: var(--shadow-1); }
.entry-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.entry-head .t { flex: 1; font-size: var(--fs-body-sm); font-weight: 600; }
.entry-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.entry-text { font-size: 11px; color: var(--text-3); margin-top: 8px; line-height: 1.6; max-height: 60px; overflow: hidden; }

/* 设置 */
.tabs {
  display: flex; gap: 4px; padding: 10px 12px;
  overflow-x: auto; flex: none;
  background: var(--surface); border-bottom: 1px solid var(--line);
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tabs button {
  flex: none; padding: 7px 14px; border-radius: var(--r-full);
  font-size: var(--fs-caption); color: var(--text-2); background: var(--surface-2);
}
.tabs button.active { background: var(--text); color: var(--bg); font-weight: 600; }
.settings-body { flex: 1; overflow-y: auto; padding: var(--sp-2); }
.api-card { background: var(--surface-solid); border-radius: var(--r-md); padding: 12px 14px; margin-bottom: 10px; box-shadow: var(--shadow-1); }
.api-card .top { display: flex; align-items: center; gap: 8px; }
.api-card .nm { flex: 1; font-size: var(--fs-body-sm); font-weight: 600; }
.api-card .sub { font-size: 11px; color: var(--text-3); margin-top: 4px; word-break: break-all; }
.prompt-block {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px; background: var(--surface-solid);
  border-bottom: 1px solid var(--line);
}
.prompt-block .idx { width: 20px; font-size: 11px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.prompt-block .nm { flex: 1; font-size: var(--fs-body-sm); }
.prompt-block .state { font-size: 10px; color: var(--text-3); }
.preview-box {
  background: #17171a; color: #d7d7db;
  border-radius: var(--r-md); padding: 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px; line-height: 1.7; white-space: pre-wrap;
  max-height: 320px; overflow-y: auto;
}
.stat-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.stat-row .nm { flex: 1; font-size: var(--fs-body-sm); }
.stat-row .sz { font-size: 11px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.bar { height: 4px; border-radius: 2px; background: var(--surface-3); overflow: hidden; margin-top: 5px; }
.bar i { display: block; height: 100%; background: var(--text-2); }

/* 商店 */
.store-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: var(--sp-2); }
.store-card { background: var(--surface-solid); border-radius: var(--r-lg); padding: 14px; box-shadow: var(--shadow-1); display: flex; flex-direction: column; gap: 8px; }
.store-card .top { display: flex; align-items: center; gap: 10px; }
.store-card .tile { width: 42px; height: 42px; border-radius: 12px; background: var(--surface-3); display: flex; align-items: center; justify-content: center; color: var(--text); }
.store-card .nm { font-size: var(--fs-body-sm); font-weight: 600; }
.store-card .ds { font-size: 11px; color: var(--text-3); line-height: 1.5; flex: 1; }

/* 通知 */
.notice-item { padding: 14px var(--sp-2); background: var(--surface-solid); border-bottom: 1px solid var(--line); }
.notice-item .v { font-size: 11px; color: var(--text-3); letter-spacing: .04em; }
.notice-item .t { font-size: var(--fs-body-sm); font-weight: 600; margin: 4px 0 6px; }
.notice-item ul { margin: 0; padding-left: 18px; font-size: var(--fs-caption); color: var(--text-2); line-height: 1.75; }

/* 美化 */
.theme-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.theme-swatch { border-radius: var(--r-md); overflow: hidden; border: 2px solid transparent; }
.theme-swatch.active { border-color: var(--text); }
.theme-swatch .sw { display: block; height: 46px; }
.theme-swatch .sw.wp-forest { background: linear-gradient(180deg, #dfe7e1, #a7b6ab); }
.theme-swatch .sw.wp-night { background: radial-gradient(120% 70% at 20% 0%, #4a4e56, #15171a 70%); }
.theme-swatch .sw.wp-warm { background: radial-gradient(90% 70% at 18% 0%, #fdf6ec, #e2c7a6); }
.theme-swatch .sw.wp-cool { background: radial-gradient(90% 70% at 10% 0%, #f7fbfd, #b9cedb); }
.theme-swatch .sw.wp-mono { background: radial-gradient(120% 70% at 12% 0%, #fff, #ececef); }
.theme-swatch .sw.wp-dots { background-color: #f1f2f4; background-image: radial-gradient(rgba(0,0,0,.16) 1px, transparent 1.4px); background-size: 12px 12px; }
.theme-swatch .sw.wp-stripes { background-color: #f4f2ee; background-image: repeating-linear-gradient(135deg, rgba(0,0,0,.07) 0 1px, transparent 1px 10px); }
.theme-swatch .lb { font-size: 10px; text-align: center; padding: 4px 0; color: var(--text-2); background: var(--surface-solid); }
.font-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.font-chip { padding: 10px; border-radius: var(--r-md); background: var(--surface-solid); font-size: var(--fs-body-sm); border: 1px solid var(--line); text-align: left; }
.font-chip.active { border-color: var(--text); }
.font-chip small { display: block; color: var(--text-3); font-size: 10px; margin-top: 2px; }

/* 状态页 */
.status-hero { padding: var(--sp-4) var(--sp-3) var(--sp-2); text-align: center; }
.status-hero .ic { width: 64px; height: 64px; border-radius: 20px; background: var(--surface-3); display: inline-flex; align-items: center; justify-content: center; color: var(--text-2); margin-bottom: 12px; }
.status-hero h1 { font-size: var(--fs-h3); margin-bottom: 6px; }
.status-hero p { font-size: var(--fs-caption); color: var(--text-3); line-height: 1.7; }
.roadmap { padding: 0 var(--sp-2) var(--sp-3); }
.roadmap li { font-size: var(--fs-caption); color: var(--text-2); line-height: 1.9; }

/* 长按菜单 */
.action-sheet .msg-menu-item { border-bottom: 1px solid var(--line); }

/* 小屏适配 */
@media (max-height: 700px) {
  .desktop-grid { grid-auto-rows: 68px; gap: 10px; }
  .w-postcard { grid-row: span 2; }
  .app-tile { width: 48px; height: 48px; border-radius: 14px; }
  .dock { min-height: 78px; padding: 8px; }
  .dock .app-tile { width: 44px; height: 44px; }
}
@media (max-width: 360px) {
  .desktop-scroll { padding: 4px 12px 8px; }
  .desktop-grid { gap: 8px; }
}

/* ========== 查手机 XSpy v2 ==========
   使用 spy2 独立命名，避免与旧版后加载样式及其他应用互相影响。 */
.spy-app.spy-v2 {
  --spy2-danger: #b44c4c;
  --spy2-danger-soft: rgba(180, 76, 76, .09);
  --spy2-success: #34745a;
  --spy2-success-soft: rgba(52, 116, 90, .09);
  background: var(--bg);
}
.spy-app.spy-v2 .x-avatar { border-radius: 50%; }
.spy-app.spy-v2 em { font-style: normal; }
.spy-app.spy-v2 button { -webkit-user-select: none; user-select: none; }
.spy-app.spy-v2 button:focus-visible,
.spy-app.spy-v2 input:focus-visible { outline: 2px solid var(--text-2); outline-offset: 2px; }
.spy2-shell { width: 100%; max-width: 720px; margin: 0 auto; padding: 18px 16px 32px; }
.spy2-muted, .spy2-footnote { color: var(--text-3); font-size: var(--fs-caption); line-height: 1.65; }
.spy2-footnote { padding: 16px 6px 0; text-align: center; }
.spy2-empty { min-height: 210px; }
.spy2-section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 3px 10px; }
.spy2-section-head > span { font-size: var(--fs-body-sm); font-weight: 650; }
.spy2-section-head small { font-size: 11px; }
.spy2-row-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; min-width: 0; }
.spy2-row-top > :first-child { min-width: 0; }
.spy2-row-top time { flex: none; color: var(--text-3); font-size: 10px; font-weight: 400; line-height: 1.5; white-space: nowrap; }
.spy2-content-card { overflow: hidden; background: var(--surface-solid); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-1); }

/* 角色选择 */
.spy2-hero {
  display: flex; align-items: center; gap: 16px; padding: 22px;
  color: #f7f7fa; border-radius: 24px;
  background: radial-gradient(circle at 90% 0%, #555561 0, #2d2d34 42%, #19191e 100%);
  box-shadow: 0 14px 34px rgba(15, 15, 20, .16);
}
.spy2-hero-icon { width: 54px; height: 54px; flex: none; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.16); border-radius: 18px; background: rgba(255,255,255,.09); }
.spy2-hero h1 { font-size: 22px; line-height: 1.35; }
.spy2-hero p { margin-top: 7px; color: rgba(255,255,255,.65); font-size: var(--fs-caption); line-height: 1.65; }
.spy2-target-list { display: flex; flex-direction: column; gap: 10px; }
.spy2-target {
  display: flex; align-items: center; gap: 13px; width: 100%; padding: 15px;
  text-align: left; color: var(--text-3); background: var(--surface-solid);
  border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-1);
  transition: transform .16s ease, border-color .16s ease;
}
.spy2-target:active { transform: scale(.985); border-color: var(--line-strong); }
.spy2-target-main { flex: 1; min-width: 0; }
.spy2-target-top { display: flex; align-items: center; gap: 8px; }
.spy2-target-top b { min-width: 0; overflow: hidden; color: var(--text); font-size: var(--fs-body); text-overflow: ellipsis; white-space: nowrap; }
.spy2-target-top em { flex: none; margin-left: auto; padding: 3px 7px; color: var(--text-2); font-size: 10px; border-radius: var(--r-full); background: var(--surface-3); }
.spy2-persona, .spy2-last { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.spy2-persona { margin-top: 4px; color: var(--text-2); font-size: var(--fs-caption); }
.spy2-last { margin-top: 3px; color: var(--text-3); font-size: 11px; }

/* 锁屏与三种解锁方式 */
.spy2-owner, .spy2-unlocked-owner {
  display: flex; align-items: center; gap: 13px; padding: 14px 15px;
  background: var(--surface-solid); border: 1px solid var(--line); border-radius: var(--r-lg);
}
.spy2-owner-main, .spy2-unlocked-owner > div { flex: 1; min-width: 0; }
.spy2-owner-main b, .spy2-unlocked-owner b { display: block; overflow: hidden; font-size: var(--fs-body); text-overflow: ellipsis; white-space: nowrap; }
.spy2-owner-main span { display: block; margin-top: 4px; color: var(--text-3); font-size: var(--fs-caption); }
.spy2-lock-badge { display: inline-flex; align-items: center; gap: 4px; flex: none; padding: 5px 9px; color: var(--text-2); font-size: 11px; border-radius: var(--r-full); background: var(--surface-3); }
.spy2-api-note { display: flex; align-items: flex-start; gap: 9px; margin-top: 12px; padding: 12px 13px; color: var(--text-2); font-size: var(--fs-caption); line-height: 1.6; border: 1px dashed var(--line-strong); border-radius: var(--r-md); background: var(--surface-2); }
.spy2-api-note .x-icon { flex: none; margin-top: 1px; color: var(--spy2-danger); }
.spy2-caught { margin-top: 12px; padding: 15px; color: var(--text); border: 1px solid rgba(180,76,76,.28); border-radius: var(--r-lg); background: var(--spy2-danger-soft); }
.spy2-caught-title { display: flex; align-items: center; gap: 8px; color: var(--spy2-danger); }
.spy2-caught-title b { font-size: var(--fs-body); }
.spy2-caught > p { margin-top: 8px; color: var(--text-2); font-size: var(--fs-caption); line-height: 1.65; }
.spy2-caught > small { display: block; margin-top: 5px; font-size: 10px; }
.spy2-caught blockquote, .spy2-reply { margin: 12px 0; padding: 11px 12px; color: var(--text); font-size: var(--fs-body-sm); line-height: 1.65; white-space: pre-wrap; border-left: 3px solid currentColor; border-radius: 0 var(--r-sm) var(--r-sm) 0; background: var(--surface-solid); }
.spy2-sent { display: flex; align-items: center; gap: 5px; margin-top: 12px; color: var(--spy2-success); font-size: var(--fs-caption); }
.spy2-caught-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; margin-top: 13px; }
.spy2-caught-actions small { flex: 1 1 180px; font-size: 10px; line-height: 1.5; }
.spy2-lock-card { margin-top: 12px; padding: 24px 20px 20px; text-align: center; color: #f7f7fa; border-radius: 24px; background: linear-gradient(145deg, #1c1c21, #33333b); box-shadow: 0 12px 28px rgba(15,15,20,.13); }
.spy2-big-lock { width: 56px; height: 56px; margin: 0 auto 14px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.14); border-radius: 18px; background: rgba(255,255,255,.07); }
.spy2-lock-card h2 { font-size: var(--fs-h3); }
.spy2-lock-card > p { margin-top: 7px; color: rgba(255,255,255,.57); font-size: 11px; line-height: 1.6; }
.spy2-guess-form { display: flex; gap: 9px; max-width: 330px; margin: 20px auto 0; }
.spy2-password { min-width: 0; flex: 1; height: 48px; padding: 0 16px; text-align: center; color: #fff; caret-color: #fff; font-size: 23px; letter-spacing: .38em; border: 1px solid rgba(255,255,255,.17); border-radius: 14px; outline: none; background: rgba(255,255,255,.09); }
.spy2-password::placeholder { color: rgba(255,255,255,.35); }
.spy2-password:focus { border-color: rgba(255,255,255,.5); }
.spy2-password:disabled { opacity: .45; }
.spy2-light-btn { flex: none; min-width: 78px; padding: 0 17px; color: #202026; font-size: var(--fs-body-sm); font-weight: 650; border-radius: 14px; background: #f4f4f6; }
.spy2-light-btn:disabled { opacity: .4; }
.spy2-attempts { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 13px; color: rgba(255,255,255,.57); font-size: 11px; }
.spy2-dots { display: flex; gap: 5px; }
.spy2-dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.55); }
.spy2-dots i.used { background: #d77b7b; }
.spy2-lock-error { margin-top: 12px; color: #ffb3b3; font-size: var(--fs-caption); line-height: 1.55; }
.spy2-method-card { display: flex; align-items: flex-start; gap: 13px; margin-top: 12px; padding: 16px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface-solid); }
.spy2-method-icon { width: 42px; height: 42px; flex: none; display: grid; place-items: center; color: var(--text-2); border-radius: 14px; background: var(--surface-3); }
.spy2-method-main { flex: 1; min-width: 0; }
.spy2-method-main h3 { font-size: var(--fs-body); }
.spy2-method-main > p { margin: 6px 0 13px; color: var(--text-3); font-size: var(--fs-caption); line-height: 1.65; }
.spy2-chance { display: inline-block; margin-left: 5px; padding: 2px 7px; vertical-align: 2px; color: var(--text-2); font-size: 10px; border-radius: var(--r-full); background: var(--surface-3); }
.spy2-reply > span { display: block; margin-bottom: 5px; color: var(--text-3); font-size: 10px; }
.spy2-inline-error { display: flex; align-items: flex-start; gap: 8px; margin: 10px 0; padding: 9px 10px; color: var(--spy2-danger); font-size: 11px; line-height: 1.55; border-radius: var(--r-sm); background: var(--spy2-danger-soft); }
.spy2-inline-error span { flex: 1; min-width: 0; }
.spy2-inline-error button { flex: none; font-weight: 650; text-decoration: underline; }

/* 已解锁应用宫格 */
.spy2-unlocked-owner > div > span { display: flex; align-items: center; gap: 4px; margin-top: 4px; color: var(--spy2-success); font-size: 11px; }
.spy2-cache-count { flex: none; color: var(--text-3); font-size: 11px; }
.spy2-ai-rule { display: flex; align-items: flex-start; gap: 9px; margin-top: 12px; padding: 12px 13px; color: var(--text-2); border-radius: var(--r-md); background: var(--surface-3); }
.spy2-ai-rule .x-icon { flex: none; margin-top: 2px; }
.spy2-ai-rule p { font-size: var(--fs-caption); line-height: 1.6; }
.spy2-app-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.spy2-app-entry { min-width: 0; min-height: 154px; display: flex; flex-direction: column; align-items: center; padding: 15px 7px 11px; text-align: center; border: 1px solid var(--line); border-radius: 19px; background: var(--surface-solid); box-shadow: var(--shadow-1); transition: transform .16s ease, border-color .16s ease; }
.spy2-app-entry:active { transform: scale(.96); border-color: var(--line-strong); }
.spy2-app-icon { width: 48px; height: 48px; display: grid; place-items: center; margin-bottom: 9px; color: #34343c; border-radius: 15px; background: #ededf0; }
.spy2-app-icon.key-wechat { color: #286746; background: #e2f1e8; }
.spy2-app-icon.key-sms { color: #38658a; background: #e4eef6; }
.spy2-app-icon.key-memo, .spy2-app-icon.key-calendar { color: #85622d; background: #f4eddc; }
.spy2-app-icon.key-album { color: #82526f; background: #f2e6ee; }
.spy2-app-icon.key-wallet, .spy2-app-icon.key-food { color: #8a4e3d; background: #f5e8e2; }
.spy2-app-icon.key-browser, .spy2-app-icon.key-location { color: #3c6177; background: #e5eef2; }
.spy2-app-icon.key-mind { color: #874c56; background: #f3e5e8; }
.spy2-app-icon.key-music { color: #635184; background: #ece7f4; }
.spy2-app-entry > b { color: var(--text); font-size: var(--fs-body-sm); }
.spy2-app-desc { width: 100%; margin-top: 3px; overflow: hidden; color: var(--text-3); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.spy2-app-status { margin-top: auto; padding-top: 9px; color: var(--text-3); font-size: 9px; line-height: 1.3; }
.spy2-app-status.cached { color: var(--spy2-success); }
.spy2-app-status.pending { color: var(--text-2); }
.spy2-app-status.error { color: var(--spy2-danger); }

/* 内容页通用状态 */
.spy2-detail-page { padding-top: 12px; }
.spy2-content-head { display: flex; align-items: center; gap: 9px; margin-bottom: 12px; }
.spy2-content-app-icon { width: 38px; height: 38px; flex: none; display: grid; place-items: center; color: var(--text-2); border-radius: 12px; background: var(--surface-3); }
.spy2-content-head > div { flex: 1; min-width: 0; }
.spy2-content-head b, .spy2-content-head small { display: block; }
.spy2-content-head small { margin-top: 2px; font-size: 10px; }
.spy2-refresh { flex: none; display: inline-flex; align-items: center; gap: 4px; min-height: 34px; padding: 0 11px; color: var(--text); font-size: 11px; border: 1px solid var(--line); border-radius: var(--r-full); background: var(--surface-solid); }
.spy2-refresh:disabled { opacity: .45; }
.spy2-source { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; padding: 8px 11px; color: var(--spy2-success); font-size: 10px; border-radius: var(--r-sm); background: var(--spy2-success-soft); }
.spy2-source > span { display: inline-flex; align-items: center; gap: 5px; min-width: 0; }
.spy2-source time { flex: none; color: var(--text-3); }
.spy2-generating { display: flex; align-items: center; justify-content: center; gap: 13px; min-height: 170px; padding: 24px; text-align: left; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface-solid); }
.spy2-generating.compact { min-height: 0; justify-content: flex-start; margin-bottom: 10px; padding: 12px 14px; }
.spy2-generating b { font-size: var(--fs-body-sm); }
.spy2-generating p { margin-top: 4px; color: var(--text-3); font-size: var(--fs-caption); }
.spy2-spinner { width: 22px; height: 22px; flex: none; border: 2px solid var(--line-strong); border-top-color: var(--text); border-radius: 50%; animation: spy2-spin .75s linear infinite; }
.spy2-generating.compact .spy2-spinner { width: 17px; height: 17px; }
@keyframes spy2-spin { to { transform: rotate(360deg); } }
.spy2-error-card { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 12px; padding: 14px; color: var(--spy2-danger); border: 1px solid rgba(180,76,76,.25); border-radius: var(--r-lg); background: var(--spy2-danger-soft); }
.spy2-error-card > .x-icon { flex: none; }
.spy2-error-card > div { flex: 1; min-width: 0; }
.spy2-error-card b { font-size: var(--fs-body-sm); }
.spy2-error-card p { margin-top: 4px; font-size: var(--fs-caption); line-height: 1.55; word-break: break-word; }
.spy2-error-card small { display: block; margin-top: 5px; font-size: 10px; line-height: 1.5; }
.spy2-error-card .btn { flex: none; }
.spy2-summary { margin-bottom: 12px; padding: 12px 14px; color: var(--text-2); font-size: var(--fs-caption); line-height: 1.65; border-left: 3px solid var(--line-strong); background: var(--surface-2); }
.spy2-content-foot { padding: 16px 8px 0; text-align: center; color: var(--text-3); font-size: 10px; line-height: 1.6; }

/* 微信与短信 */
.spy2-conversation { display: flex; align-items: center; gap: 11px; width: 100%; padding: 13px 14px; text-align: left; color: var(--text-3); border-bottom: 1px solid var(--line); background: var(--surface-solid); }
.spy2-conversation:last-child { border-bottom: 0; }
.spy2-conversation:active { background: var(--surface-2); }
.spy2-conversation-main { flex: 1; min-width: 0; }
.spy2-conversation-main b { color: var(--text); font-size: var(--fs-body-sm); }
.spy2-conversation-main > small { display: block; margin-top: 2px; font-size: 10px; }
.spy2-preview { display: block; margin-top: 3px; overflow: hidden; color: var(--text-3); font-size: var(--fs-caption); text-overflow: ellipsis; white-space: nowrap; }
.spy2-thread-head { display: flex; align-items: center; gap: 8px; padding: 8px 12px 8px 5px; border-bottom: 1px solid var(--line); }
.spy2-thread-head b { flex: 1; font-size: var(--fs-body-sm); }
.spy2-thread-head small { font-size: 10px; }
.spy2-thread-body { padding: 15px 12px 8px; background: var(--surface-2); }
.spy2-thread-body .msg-col { max-width: 74%; }
.spy2-sms { display: flex; align-items: flex-start; gap: 11px; padding: 14px; border-bottom: 1px solid var(--line); }
.spy2-sms:last-child { border-bottom: 0; }
.spy2-sms.unread { box-shadow: inset 3px 0 var(--text-2); }
.spy2-sms-main { flex: 1; min-width: 0; }
.spy2-sms-main b { font-size: var(--fs-body-sm); }
.spy2-sms-main small { display: block; margin-top: 3px; font-size: 10px; }
.spy2-sms-main small em { margin-left: 7px; padding: 1px 5px; color: var(--surface-solid); border-radius: var(--r-full); background: var(--text-2); }
.spy2-sms-main p { margin-top: 8px; color: var(--text-2); font-size: var(--fs-body-sm); line-height: 1.65; white-space: pre-wrap; }

/* 备忘录、相册 */
.spy2-memo-list { display: flex; flex-direction: column; gap: 11px; }
.spy2-memo { padding: 17px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface-solid); box-shadow: var(--shadow-1); }
.spy2-memo-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.spy2-memo-head h3 { font-size: var(--fs-body); }
.spy2-memo-head span { flex: none; padding: 3px 7px; color: var(--text-2); font-size: 10px; border-radius: var(--r-full); background: var(--surface-3); }
.spy2-memo > p { margin-top: 11px; color: var(--text-2); font-size: var(--fs-body-sm); line-height: 1.8; white-space: pre-wrap; }
.spy2-memo > time { display: block; margin-top: 12px; color: var(--text-3); font-size: 10px; }
.spy2-album-notice { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; padding: 9px 11px; color: var(--text-2); font-size: 11px; line-height: 1.5; border: 1px dashed var(--line-strong); border-radius: var(--r-md); }
.spy2-album-notice .x-icon { flex: none; }
.spy2-album-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.spy2-photo-card { overflow: hidden; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface-solid); box-shadow: var(--shadow-1); }
.spy2-photo-visual { aspect-ratio: 1.25; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 9px; color: rgba(255,255,255,.9); text-shadow: 0 1px 5px rgba(0,0,0,.25); }
.spy2-photo-visual span { padding: 4px 8px; font-size: 10px; border: 1px solid rgba(255,255,255,.35); border-radius: var(--r-full); background: rgba(0,0,0,.13); }
.spy2-photo-copy { padding: 12px; }
.spy2-photo-copy h3 { font-size: var(--fs-body-sm); }
.spy2-photo-copy p { margin-top: 7px; color: var(--text-2); font-size: var(--fs-caption); line-height: 1.65; white-space: pre-wrap; }
.spy2-photo-copy time { display: block; margin-top: 9px; color: var(--text-3); font-size: 10px; }

/* 钱包与浏览器 */
.spy2-balance { margin-bottom: 11px; padding: 20px; color: #f6f6f8; border-radius: var(--r-lg); background: linear-gradient(135deg, #25252c, #44444e); }
.spy2-balance > span { color: rgba(255,255,255,.6); font-size: var(--fs-caption); }
.spy2-balance > b { display: block; margin-top: 9px; font-size: 30px; font-weight: 550; letter-spacing: .02em; }
.spy2-balance > b small { margin-right: 5px; color: inherit; font-size: 16px; }
.spy2-transaction { display: flex; align-items: flex-start; gap: 10px; padding: 13px 14px; border-bottom: 1px solid var(--line); }
.spy2-transaction:last-child { border-bottom: 0; }
.spy2-transaction-icon { width: 34px; height: 34px; flex: none; display: grid; place-items: center; color: var(--text-2); border-radius: 11px; background: var(--surface-3); }
.spy2-transaction > div { flex: 1; min-width: 0; }
.spy2-transaction > div > b { font-size: var(--fs-body-sm); }
.spy2-transaction small { display: block; margin-top: 3px; font-size: 10px; }
.spy2-transaction p { margin-top: 5px; color: var(--text-3); font-size: 11px; line-height: 1.5; }
.spy2-transaction > strong { flex: none; font-size: var(--fs-body-sm); font-variant-numeric: tabular-nums; }
.spy2-transaction > strong.income { color: var(--spy2-success); }
.spy2-transaction > strong.expense { color: var(--text); }
.spy2-history-item { display: flex; align-items: flex-start; gap: 11px; padding: 14px; border-bottom: 1px solid var(--line); }
.spy2-history-item:last-child { border-bottom: 0; }
.spy2-history-icon { width: 34px; height: 34px; flex: none; display: grid; place-items: center; color: var(--text-2); border-radius: 50%; background: var(--surface-3); }
.spy2-history-item > div { flex: 1; min-width: 0; }
.spy2-history-item h3 { font-size: var(--fs-body-sm); line-height: 1.5; }
.spy2-history-item small { display: block; margin-top: 3px; font-size: 10px; }
.spy2-history-item code { display: block; margin-top: 6px; overflow: hidden; color: var(--text-3); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.spy2-history-item p { margin-top: 7px; color: var(--text-2); font-size: var(--fs-caption); line-height: 1.6; }

/* 内心、定位 */
.spy2-mind-list { display: flex; flex-direction: column; gap: 11px; }
.spy2-mind-card { padding: 17px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface-solid); }
.spy2-mind-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.spy2-mind-meta span { padding: 3px 8px; color: var(--text-2); font-size: 10px; border-radius: var(--r-full); background: var(--surface-3); }
.spy2-mind-meta time { margin-left: auto; color: var(--text-3); font-size: 10px; }
.spy2-mind-card h3 { margin-top: 13px; font-size: var(--fs-body); }
.spy2-mind-card blockquote { margin: 10px 0 0; color: var(--text-2); font-size: var(--fs-body-sm); line-height: 1.85; white-space: pre-wrap; }
.spy2-mind-card > small { display: block; margin-top: 12px; font-size: 10px; }
.spy2-location { display: flex; gap: 12px; padding: 0 14px; }
.spy2-location:first-child { padding-top: 15px; }
.spy2-location:last-child { padding-bottom: 15px; }
.spy2-location > div:last-child { flex: 1; min-width: 0; padding-bottom: 20px; }
.spy2-location:last-child > div:last-child { padding-bottom: 0; }
.spy2-timeline { width: 12px; flex: none; display: flex; flex-direction: column; align-items: center; }
.spy2-timeline i { width: 9px; height: 9px; flex: none; margin-top: 5px; border: 2px solid var(--surface-solid); border-radius: 50%; background: var(--text-2); box-shadow: 0 0 0 1px var(--line-strong); }
.spy2-timeline span { width: 1px; flex: 1; margin-top: 4px; background: var(--line-strong); }
.spy2-location:last-child .spy2-timeline span { display: none; }
.spy2-location h3 { font-size: var(--fs-body-sm); }
.spy2-location p { margin-top: 4px; color: var(--text-3); font-size: 11px; line-height: 1.5; }
.spy2-location small { display: block; margin-top: 5px; font-size: 10px; }
.spy2-location blockquote { margin: 8px 0 0; padding: 8px 10px; color: var(--text-2); font-size: var(--fs-caption); line-height: 1.55; border-radius: var(--r-sm); background: var(--surface-2); }

/* 外卖、日历 */
.spy2-order-list, .spy2-calendar-list { display: flex; flex-direction: column; gap: 11px; }
.spy2-order { padding: 15px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface-solid); box-shadow: var(--shadow-1); }
.spy2-order-head { display: flex; align-items: center; gap: 9px; }
.spy2-shop-icon { width: 34px; height: 34px; display: grid; place-items: center; color: var(--text-2); border-radius: 11px; background: var(--surface-3); }
.spy2-order-head h3 { flex: 1; min-width: 0; font-size: var(--fs-body-sm); }
.spy2-order-head em { flex: none; color: var(--text-2); font-size: 11px; }
.spy2-order ul { margin: 13px 0 0; padding: 11px 12px 11px 27px; color: var(--text-2); font-size: var(--fs-caption); line-height: 1.75; border-radius: var(--r-sm); background: var(--surface-2); }
.spy2-order-total { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 11px; }
.spy2-order-total time { color: var(--text-3); font-size: 10px; }
.spy2-order-total b { font-size: var(--fs-body); font-variant-numeric: tabular-nums; }
.spy2-order > p { margin-top: 9px; color: var(--text-3); font-size: 11px; line-height: 1.5; }
.spy2-order > blockquote { margin: 8px 0 0; color: var(--text-2); font-size: 11px; line-height: 1.55; }
.spy2-event { display: flex; align-items: stretch; gap: 13px; padding: 15px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface-solid); }
.spy2-event-date { width: 105px; flex: none; display: flex; flex-direction: column; align-items: flex-start; gap: 5px; padding-right: 12px; color: var(--text-2); border-right: 1px solid var(--line); }
.spy2-event-date b { color: var(--text); font-size: var(--fs-caption); line-height: 1.45; }
.spy2-event-date span { font-size: 11px; line-height: 1.45; }
.spy2-event-main { flex: 1; min-width: 0; }
.spy2-event-main h3 { font-size: var(--fs-body-sm); line-height: 1.5; }
.spy2-event-main em { flex: none; padding: 2px 6px; color: var(--text-2); font-size: 9px; border-radius: var(--r-full); background: var(--surface-3); }
.spy2-event-main > small { display: block; margin-top: 5px; font-size: 10px; }
.spy2-event-main > p { margin-top: 7px; color: var(--text-2); font-size: var(--fs-caption); line-height: 1.6; white-space: pre-wrap; }

/* 音乐与通话 */
.spy2-static-note { display: flex; align-items: center; gap: 5px; padding: 9px 13px; color: var(--text-3); font-size: 10px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.spy2-track { display: flex; align-items: flex-start; gap: 10px; padding: 14px 12px; border-bottom: 1px solid var(--line); }
.spy2-track:last-child { border-bottom: 0; }
.spy2-track-index { width: 20px; flex: none; padding-top: 11px; color: var(--text-3); font-size: 10px; font-variant-numeric: tabular-nums; }
.spy2-track-icon { width: 38px; height: 38px; flex: none; display: grid; place-items: center; color: var(--text-2); border-radius: 12px; background: var(--surface-3); }
.spy2-track > div { flex: 1; min-width: 0; }
.spy2-track h3 { font-size: var(--fs-body-sm); }
.spy2-track small { display: block; margin-top: 3px; font-size: 10px; }
.spy2-track p { margin-top: 6px; color: var(--text-2); font-size: 11px; line-height: 1.55; }
.spy2-track em { display: inline-block; margin-top: 6px; padding: 2px 7px; color: var(--text-2); font-size: 9px; border-radius: var(--r-full); background: var(--surface-3); }
.spy2-call { display: flex; align-items: flex-start; gap: 10px; padding: 14px; border-bottom: 1px solid var(--line); }
.spy2-call:last-child { border-bottom: 0; }
.spy2-call-icon { width: 36px; height: 36px; flex: none; display: grid; place-items: center; color: var(--text-2); border-radius: 50%; background: var(--surface-3); }
.spy2-call.missed .spy2-call-icon, .spy2-call.missed .spy2-call-meta b { color: var(--spy2-danger); }
.spy2-call > div { flex: 1; min-width: 0; }
.spy2-call h3 { font-size: var(--fs-body-sm); }
.spy2-call > div > small { display: block; margin-top: 3px; font-size: 10px; }
.spy2-call p { margin-top: 6px; color: var(--text-2); font-size: 11px; line-height: 1.55; }
.spy2-call-meta { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; padding-left: 5px; }
.spy2-call-meta b { color: var(--text-2); font-size: 11px; font-weight: 550; }
.spy2-call-meta small { font-size: 10px; }

@media (min-width: 640px) {
  .spy2-shell { padding: 22px 22px 36px; }
  .spy2-app-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .spy2-album-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 480px) {
  .spy2-shell { padding-right: 12px; padding-left: 12px; }
  .spy2-hero { padding: 18px; }
  .spy2-hero h1 { font-size: 20px; }
  .spy2-target { padding: 12px; }
  .spy2-target .x-avatar { width: 50px !important; height: 50px !important; }
  .spy2-lock-badge { display: none; }
  .spy2-app-grid { gap: 8px; }
  .spy2-app-entry { min-height: 147px; padding-right: 5px; padding-left: 5px; }
  .spy2-error-card { flex-wrap: wrap; }
  .spy2-error-card .btn { margin-left: 31px; }
  .spy2-source { align-items: flex-start; flex-direction: column; gap: 3px; }
  .spy2-transaction { gap: 8px; padding-right: 11px; padding-left: 11px; }
  .spy2-transaction > strong { font-size: 12px; }
  .spy2-event { gap: 10px; padding: 12px; }
  .spy2-event-date { width: 90px; }
  .spy2-call-meta { max-width: 62px; }
}
@media (max-width: 350px) {
  .spy2-album-grid { grid-template-columns: 1fr; }
  .spy2-photo-visual { aspect-ratio: 1.6; }
  .spy2-method-card { gap: 10px; padding: 13px; }
  .spy2-method-icon { width: 36px; height: 36px; }
  .spy2-event { flex-direction: column; }
  .spy2-event-date { width: 100%; padding: 0 0 8px; border-right: 0; border-bottom: 1px solid var(--line); }
}
@media (prefers-reduced-motion: reduce) {
  .spy-app.spy-v2 *, .spy-app.spy-v2 *::before, .spy-app.spy-v2 *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

/* ===== games.css ===== */
/* 小手机 · 游戏 App
 * iOS 黑白灰：圆角、磨砂、线性；所有类统一 game- 前缀。
 */

/* ---------------- 通用骨架 ---------------- */
.game-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  min-width: 0;
  min-height: 100%;
  padding: 16px 16px calc(24px + env(safe-area-inset-bottom));
}

.game-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  padding: 16px;
  background: var(--surface-solid);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-1);
}

.game-section-title {
  padding: 2px 2px 0;
  font-size: var(--fs-caption);
  line-height: var(--lh-sub);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-3);
}

.game-statusbar {
  display: flex;
  flex: none;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 9px 12px;
  background: var(--surface);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--line);
  border-radius: var(--r-full);
  font-size: var(--fs-caption);
  color: var(--text-2);
}

.game-status-text {
  flex: 1 1 140px;
  min-width: 0;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.game-dot {
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 50%;
  background: var(--text-3);
}
.game-dot.black { background: var(--text); }
.game-dot.white {
  background: var(--surface-solid);
  box-shadow: inset 0 0 0 1px var(--line-strong);
}
.game-dot.idle { background: var(--text-3); opacity: .45; }

.game-badge {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
  padding: 3px 8px;
  white-space: normal;
  overflow-wrap: anywhere;
  border-radius: var(--r-full);
  background: var(--accent-soft);
  color: var(--text-2);
  font-size: 11px;
  line-height: 1.3;
}
.game-badge.local {
  background: transparent;
  border: 1px dashed var(--line-strong);
  color: var(--text-3);
}

.game-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-width: 0;
}
.game-actions .btn {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
  height: auto;
  padding-top: 8px;
  padding-bottom: 8px;
  line-height: 1.35;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
}

.game-reason {
  font-size: var(--fs-caption);
  line-height: 1.55;
  color: var(--text-3);
}
.game-hint {
  font-size: var(--fs-caption);
  line-height: 1.65;
  color: var(--text-2);
}
.game-warn {
  padding: 10px 12px;
  border-radius: var(--r-sm);
  background: var(--surface-3);
  font-size: var(--fs-caption);
  line-height: 1.6;
  color: var(--text);
}
.game-error {
  padding: 10px 12px;
  border-left: 2px solid #8f3a3a;
  border-radius: var(--r-sm);
  background: var(--surface-2);
  font-size: var(--fs-caption);
  line-height: 1.6;
  color: #8f3a3a;
}
.game-wait {
  padding: 8px 0;
  font-size: var(--fs-body-sm);
  color: var(--text-2);
  animation: gamePulse 1.7s ease-in-out infinite;
}
@keyframes gamePulse {
  0%, 100% { opacity: .45; }
  50% { opacity: 1; }
}

.game-textarea {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 64px;
  padding: 12px 14px;
  background: var(--surface-2);
  border: 1px solid transparent;
  border-radius: var(--r-md);
  font-size: var(--fs-body-sm);
  line-height: var(--lh-body);
  color: var(--text);
  outline: none;
  resize: vertical;
  transition: border-color .18s ease, background .18s ease;
}
.game-textarea:focus {
  background: var(--surface-solid);
  border-color: var(--line-strong);
}

.game-result {
  padding: 14px 16px;
  border-radius: var(--r-md);
  background: var(--surface-2);
  font-size: var(--fs-body-sm);
  font-weight: 600;
  line-height: 1.5;
  color: var(--text);
}
.game-result.win {
  background: var(--text);
  color: var(--bg);
}

.game-log {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
  border-radius: var(--r-md);
  background: var(--surface-2);
}
.game-log-line {
  font-size: var(--fs-caption);
  line-height: 1.5;
  color: var(--text-3);
}

.game-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
  border-radius: var(--r-lg);
  background: var(--surface-2);
  font-size: var(--fs-body-sm);
  line-height: 1.6;
  color: var(--text-3);
  text-align: center;
}

.game-tag {
  display: inline-flex;
  align-items: center;
  padding: 1px 7px;
  border-radius: var(--r-full);
  background: var(--surface-3);
  color: var(--text-2);
  font-size: 10px;
  font-weight: 500;
  line-height: 1.5;
  white-space: nowrap;
}
.game-tag.dead {
  background: transparent;
  border: 1px solid var(--line-strong);
  color: var(--text-3);
}

.game-local {
  flex: none;
  padding: 1px 6px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-full);
  color: var(--text-3);
  font-size: 9px;
  font-weight: 400;
  line-height: 1.5;
  white-space: nowrap;
}

/* ---------------- 首页 ---------------- */
.game-home-head { min-width: 0; padding: 10px 4px 4px; }
.game-home-title,
.game-home-sub,
.game-home-note,
.game-hint,
.game-reason,
.game-warn,
.game-error {
  min-width: 0;
  overflow-wrap: anywhere;
}
.game-home-title {
  font-size: var(--fs-h1);
  font-weight: 650;
  letter-spacing: -.02em;
  line-height: var(--lh-title);
}
.game-home-sub {
  margin-top: 6px;
  font-size: var(--fs-body-sm);
  line-height: 1.5;
  color: var(--text-2);
}
.game-home-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
  min-width: 0;
}
.game-home-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  width: 100%;
  min-width: 0;
  min-height: 118px;
  padding: 15px 14px;
  background: var(--surface-solid);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-1);
  text-align: left;
  transition: transform .18s ease, background .18s ease;
}
.game-home-card:active { transform: scale(.97); background: var(--surface-2); }
.game-home-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: var(--r-md);
  background: var(--surface-3);
  color: var(--text);
}
.game-home-name {
  width: 100%;
  min-width: 0;
  font-size: var(--fs-body-sm);
  font-weight: 600;
  line-height: 1.4;
  color: var(--text);
  overflow-wrap: anywhere;
}
.game-home-mode {
  width: 100%;
  min-width: 0;
  font-size: var(--fs-caption);
  line-height: 1.45;
  color: var(--text-3);
  overflow-wrap: anywhere;
}
.game-home-save {
  max-width: 100%;
  min-width: 0;
  margin-top: auto;
  white-space: normal;
  overflow-wrap: anywhere;
  padding: 2px 8px;
  border-radius: var(--r-full);
  background: var(--surface-3);
  color: var(--text-2);
  font-size: 10px;
  line-height: 1.5;
}
.game-home-note {
  padding: 2px 4px 8px;
  font-size: var(--fs-caption);
  line-height: 1.6;
  color: var(--text-3);
}
@media (min-width: 520px) {
  .game-home-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ---------------- 角色选择 ---------------- */
.game-select-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 4px 0;
}
.game-select-head .grow { flex: 1; min-width: 0; }
.game-select-title {
  font-size: var(--fs-h2);
  font-weight: 650;
  line-height: var(--lh-title);
  letter-spacing: -.01em;
}
.game-select-sub {
  margin-top: 4px;
  font-size: var(--fs-caption);
  line-height: 1.5;
  color: var(--text-3);
}
.game-save-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  background: var(--surface-solid);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-1);
}
.game-save-panel .btn { flex: none; }
.game-save-title {
  font-size: var(--fs-body-sm);
  font-weight: 600;
  line-height: 1.4;
}
.game-save-sub {
  margin-top: 3px;
  font-size: var(--fs-caption);
  line-height: 1.45;
  color: var(--text-3);
}
.game-char-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.game-char {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px;
  background: var(--surface-solid);
  border: 1px solid transparent;
  border-radius: var(--r-md);
  text-align: left;
  transition: border-color .16s ease, background .16s ease;
}
.game-char.on {
  background: var(--surface-2);
  border-color: var(--text);
}
.game-char-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex: none;
  overflow: hidden;
  border-radius: 50%;
  background: var(--surface-3);
  color: var(--text-2);
  font-size: var(--fs-body-sm);
  font-weight: 600;
}
.game-char-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.game-char-info {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.game-char-name {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-body-sm);
  font-weight: 600;
  line-height: 1.4;
  color: var(--text);
}
.game-char-gender {
  font-size: 10px;
  font-weight: 400;
  color: var(--text-3);
}
.game-char-persona {
  overflow: hidden;
  color: var(--text-3);
  font-size: var(--fs-caption);
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.game-char-check {
  flex: none;
  padding: 4px 10px;
  border-radius: var(--r-full);
  background: var(--surface-3);
  color: var(--text-2);
  font-size: 10px;
  line-height: 1.5;
}
.game-char.on .game-char-check {
  background: var(--text);
  color: var(--bg);
}
.game-select-foot {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
  background: var(--surface-solid);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-1);
}
.game-select-foot .btn { width: 100%; }
.game-select-count {
  font-size: var(--fs-caption);
  line-height: 1.5;
  color: var(--text-2);
}

/* ---------------- 五子棋 ---------------- */
.game-board-wrap {
  display: flex;
  justify-content: center;
  padding: 4px 0;
}
.game-gomoku {
  display: grid;
  grid-template-columns: repeat(15, minmax(0, 1fr));
  grid-template-rows: repeat(15, minmax(0, 1fr));
  gap: 1px;
  width: min(100%, 344px);
  aspect-ratio: 1 / 1;
  padding: 3px;
  background: var(--line-strong);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-1);
  overflow: hidden;
}
.game-cell {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 0;
  padding: 0;
  background: var(--surface-solid);
  border: none;
  border-radius: 0;
}
.game-cell:active { background: var(--surface-2); }
.game-cell.last { box-shadow: inset 0 0 0 1px var(--text-3); }
.game-cell.hit { background: var(--surface-3); }
.game-stone {
  display: block;
  width: 78%;
  height: 78%;
  border-radius: 50%;
  animation: gameStoneIn .14s ease;
}
.game-stone.black {
  background: #141416;
  box-shadow: 0 0 0 1px var(--line-strong), inset 0 1px 1px rgba(255, 255, 255, .18);
}
.game-stone.white {
  background: #fbfbfc;
  box-shadow: 0 0 0 1px rgba(20, 20, 22, .28), 0 1px 2px rgba(0, 0, 0, .14);
}
@keyframes gameStoneIn {
  from { transform: scale(.55); opacity: .2; }
  to { transform: scale(1); opacity: 1; }
}

/* ---------------- 大富翁 ---------------- */
.game-mono-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}
.game-mono-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-height: 66px;
  padding: 6px 5px;
  overflow: hidden;
  background: var(--surface-solid);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
}
.game-mono-tile.start {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
}
.game-mono-tile.chance {
  background: var(--surface-2);
  border-style: dashed;
}
.game-mono-tile.rest { background: var(--surface-3); }
.game-mono-tile.owned { border-color: var(--line-strong); }
.game-mono-name {
  font-size: 10px;
  font-weight: 600;
  line-height: 1.25;
  color: inherit;
}
.game-mono-price {
  font-size: 9px;
  line-height: 1.3;
  color: var(--text-3);
}
.game-mono-tile.start .game-mono-price { color: inherit; opacity: .6; }
.game-mono-owner {
  overflow: hidden;
  font-size: 9px;
  line-height: 1.3;
  color: var(--text-2);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.game-tokens {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  margin-top: auto;
}
.game-token {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  color: #fff;
  font-size: 8px;
  font-style: normal;
  font-weight: 700;
  line-height: 1;
}
.game-token.p0 { background: #1f1f22; }
.game-token.p1 { background: #5d5d63; }
.game-token.p2 { background: #9a9aa2; color: #141416; }
.game-token.p3 { background: #d5d5da; color: #141416; box-shadow: inset 0 0 0 1px rgba(20, 20, 22, .18); }

.game-player-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 8px;
}
.game-player-card {
  padding: 10px 12px;
  background: var(--surface-solid);
  border: 1px solid transparent;
  border-radius: var(--r-md);
  box-shadow: var(--shadow-1);
}
.game-player-card.me { border-color: var(--line-strong); }
.game-player-card.dead { opacity: .42; }
.game-player-name {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-caption);
  font-weight: 600;
  line-height: 1.4;
  color: var(--text);
}
.game-player-cash {
  margin-top: 4px;
  font-size: var(--fs-body-sm);
  font-weight: 650;
  line-height: 1.4;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.game-player-sub {
  font-size: 10px;
  line-height: 1.4;
  color: var(--text-3);
}

.game-dice-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 2px 0;
}
.game-die {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  flex: none;
  background: var(--surface-solid);
  border-radius: 10px;
  box-shadow: inset 0 0 0 1px var(--line), var(--shadow-1);
  font-size: var(--fs-body-sm);
  font-style: normal;
  font-weight: 650;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.game-die.blank { color: var(--text-3); }

/* ---------------- 飞行棋 ---------------- */
.game-ludo-board {
  position: relative;
  width: min(100%, 520px);
  aspect-ratio: 1;
  margin: 0 auto 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface-solid);
  box-shadow: var(--shadow-1);
  touch-action: manipulation;
}
.ludo-cell {
  position: absolute;
  width: 7.1429%;
  height: 7.1429%;
  padding: 2px;
}
.ludo-cell::after {
  content: '';
  display: block;
  width: 100%; height: 100%;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface-2);
}
.ludo-cell.start::after { background: var(--lc); border-color: var(--lc); opacity: .82; }
.ludo-base {
  position: absolute;
  width: 24%; height: 24%;
  border: 1px solid color-mix(in srgb, var(--lc) 45%, transparent);
  border-radius: 18%;
  background: color-mix(in srgb, var(--lc) 12%, var(--surface-solid));
}
.ludo-base.b0 { left: 4%; bottom: 4%; }
.ludo-base.b1 { left: 4%; top: 4%; }
.ludo-base.b2 { right: 4%; top: 4%; }
.ludo-base.b3 { right: 4%; bottom: 4%; }
.ludo-center {
  position: absolute;
  left: 50%; top: 50%;
  width: 24%; height: 24%;
  display: flex; align-items: center; justify-content: center;
  transform: translate(-50%, -50%) rotate(45deg);
  border-radius: 12%;
  background: var(--surface-3);
  color: var(--text-3);
  font-size: 10px;
}
.ludo-center span { transform: rotate(-45deg); }
.ludo-token {
  position: absolute;
  z-index: 3;
  width: 5.4%; height: 5.4%;
  padding: 0;
  border: 2px solid var(--surface-solid);
  border-radius: 50%;
  background: var(--lc);
  box-shadow: 0 2px 5px rgba(0,0,0,.25);
  transform: translate(-50%, -50%);
  transition: left .48s cubic-bezier(.2,.8,.2,1), top .48s cubic-bezier(.2,.8,.2,1), transform .18s ease;
}
.ludo-token::after {
  content: '';
  position: absolute;
  left: 24%; top: 16%;
  width: 28%; height: 22%;
  border-radius: 50%;
  background: rgba(255,255,255,.52);
}
.ludo-token.done { width: 4.4%; height: 4.4%; opacity: .88; }
.ludo-token.movable { z-index: 5; animation: ludoMovable 1s ease-in-out infinite; }
@keyframes ludoMovable {
  50% { transform: translate(-50%, -62%) scale(1.16); box-shadow: 0 0 0 4px color-mix(in srgb, var(--lc) 24%, transparent), 0 4px 8px rgba(0,0,0,.25); }
}
.game-die.pop { animation: ludoDicePop .34s cubic-bezier(.2,.9,.3,1.3); }
@keyframes ludoDicePop {
  0% { transform: rotate(-18deg) scale(.55); }
  65% { transform: rotate(8deg) scale(1.14); }
  100% { transform: none; }
}
.game-ludo-legend {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 14px;
  margin: -4px 0 12px;
  font-size: 10px; color: var(--text-3);
}
.game-ludo-legend span { display: inline-flex; align-items: center; gap: 5px; }
.game-ludo-legend i { width: 8px; height: 8px; border-radius: 50%; background: var(--lc); }
.game-ludo-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.game-ludo-row {
  padding: 12px;
  background: var(--surface-solid);
  border: 1px solid transparent;
  border-radius: var(--r-md);
  box-shadow: var(--shadow-1);
}
.game-ludo-row.me { border-color: var(--line-strong); }
.game-ludo-row.active { border-color: var(--text); }
.game-ludo-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}
.game-ludo-name {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-caption);
  font-weight: 600;
  line-height: 1.4;
  color: var(--text);
}
.game-ludo-dice {
  font-size: 10px;
  color: var(--text-3);
}
.game-ludo-lane {
  position: relative;
  height: 14px;
  margin: 20px 6px 12px;
  border-radius: 7px;
  background: var(--surface-3);
}
.game-ludo-mark {
  position: absolute;
  top: 50%;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-3);
  transform: translate(-50%, -50%);
  transition: left .25s ease;
}
.game-ludo-mark.m0 { top: 22%; }
.game-ludo-mark.m1 { top: 42%; }
.game-ludo-mark.m2 { top: 62%; }
.game-ludo-mark.m3 { top: 82%; }
.game-ludo-mark.track { background: var(--text); }
.game-ludo-mark.done {
  background: var(--text);
  box-shadow: 0 0 0 2px var(--surface-solid), 0 0 0 3px var(--text);
}
.game-ludo-mark.home { background: var(--text-3); opacity: .55; }
.game-ludo-start,
.game-ludo-end {
  position: absolute;
  top: -16px;
  font-size: 9px;
  line-height: 1.2;
  color: var(--text-3);
}
.game-ludo-start { left: 0; }
.game-ludo-end { right: 0; }
.game-ludo-pieces {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}
.game-ludo-piece {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 7px 2px;
  background: var(--surface-2);
  border: 1px solid transparent;
  border-top-width: 3px;
  border-radius: var(--r-sm);
  transition: background .16s ease, border-color .16s ease;
}
.game-ludo-piece.p0 { border-top-color: var(--text); }
.game-ludo-piece.p1 { border-top-color: var(--text-2); }
.game-ludo-piece.p2 { border-top-color: var(--text-3); }
.game-ludo-piece.p3 { border-top-color: var(--line-strong); }
.game-ludo-piece.home { opacity: .68; }
.game-ludo-piece.done { opacity: .5; }
.game-ludo-piece.movable {
  background: var(--surface-solid);
  border-color: var(--text);
  box-shadow: var(--shadow-1);
}
.game-ludo-num {
  font-size: var(--fs-caption);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
}
.game-ludo-state {
  font-size: 9px;
  line-height: 1.3;
  color: var(--text-3);
  white-space: nowrap;
}

/* ---------------- 狼人杀 ---------------- */
.game-role-banner {
  padding: 14px 16px;
  background: var(--text);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-2);
  color: var(--bg);
}
.game-role-top {
  display: flex;
  align-items: center;
  gap: 8px;
}
.game-role-name {
  flex: 1;
  min-width: 0;
  font-size: var(--fs-body-sm);
  font-weight: 650;
  line-height: 1.4;
}
.game-role-banner .game-tag {
  background: rgba(127, 127, 127, .24);
  border: 1px solid rgba(127, 127, 127, .3);
  color: inherit;
}
.game-role-desc {
  margin-top: 6px;
  font-size: var(--fs-caption);
  line-height: 1.6;
  opacity: .72;
}

.game-target-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.game-target {
  padding: 9px 14px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-full);
  font-size: var(--fs-caption);
  line-height: 1.4;
  color: var(--text);
  transition: background .16s ease, color .16s ease, border-color .16s ease;
}
.game-target.on,
.game-target:active {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
}

.game-check-result {
  padding: 12px 14px;
  background: var(--surface-2);
  border-radius: var(--r-md);
  font-size: var(--fs-body-sm);
  line-height: 1.55;
  color: var(--text);
}
.game-check-result b { font-weight: 650; }

.game-potions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.game-poison-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  background: var(--surface-2);
  border-radius: var(--r-md);
}
.game-deaths {
  padding: 12px 14px;
  background: var(--surface-2);
  border-radius: var(--r-md);
  font-size: var(--fs-body-sm);
  font-weight: 550;
  line-height: 1.55;
  color: var(--text);
}

.game-speech-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.game-speech-list.compact {
  max-height: 190px;
  padding-right: 2px;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.game-speech {
  padding: 10px 12px;
  background: var(--surface-2);
  border-radius: var(--r-md);
}
.game-speech-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
  font-size: var(--fs-caption);
  font-weight: 600;
  line-height: 1.45;
  color: var(--text);
}
.game-speech p {
  font-size: var(--fs-caption);
  line-height: 1.65;
  color: var(--text-2);
}

.game-vote-log {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  padding: 10px 12px;
  background: var(--surface-2);
  border-radius: var(--r-md);
}
.game-vote-log .game-log-line { font-size: var(--fs-caption); }

.game-reveal {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.game-reveal-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  background: var(--surface-2);
  border-radius: var(--r-sm);
  font-size: var(--fs-caption);
  line-height: 1.45;
  color: var(--text);
}
.game-reveal-row span:nth-child(2) { color: var(--text-2); }
.game-reveal-row span:nth-child(3) {
  font-size: 10px;
  color: var(--text-3);
  white-space: nowrap;
}
.game-reveal-row.dead { opacity: .5; }

.game-secret {
  padding: 10px 12px;
  background: var(--surface-2);
  border-radius: var(--r-md);
}
.game-secret p {
  font-size: var(--fs-caption);
  line-height: 1.6;
  color: var(--text-2);
}

/* ---------------- 谁是卧底 ---------------- */
.game-word-card {
  padding: 20px 16px;
  background: var(--text);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-2);
  color: var(--bg);
  text-align: center;
}
.game-word-card.spy {
  background: var(--surface-solid);
  box-shadow: inset 0 0 0 2px var(--text), var(--shadow-1);
  color: var(--text);
}
.game-word-label {
  font-size: var(--fs-caption);
  line-height: 1.4;
  letter-spacing: .06em;
  opacity: .62;
}
.game-word {
  margin: 6px 0 4px;
  font-size: var(--fs-h1);
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: .04em;
}
.game-word-sub {
  font-size: 10px;
  line-height: 1.4;
  opacity: .55;
}

/* ---------------- 真心话大冒险 ---------------- */
.game-choice-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
  min-width: 0;
}
.game-choice {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 100%;
  min-width: 0;
  min-height: 112px;
  padding: 16px;
  background: var(--surface-solid);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-1);
  text-align: left;
  transition: transform .18s ease;
}
.game-choice:active { transform: scale(.97); }
.game-choice.dark {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
}
.game-choice-title {
  min-width: 0;
  font-size: var(--fs-body);
  font-weight: 650;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.game-choice-sub {
  min-width: 0;
  font-size: var(--fs-caption);
  line-height: 1.45;
  overflow-wrap: anywhere;
  opacity: .6;
}

.game-q {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  padding: 16px;
  background: var(--surface-solid);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-1);
}
.game-q p {
  min-width: 0;
  font-size: var(--fs-body);
  font-weight: 550;
  line-height: 1.5;
  color: var(--text);
  overflow-wrap: anywhere;
}
.game-q-type {
  align-self: flex-start;
  max-width: 100%;
  min-width: 0;
  padding: 3px 9px;
  background: var(--surface-3);
  border-radius: var(--r-full);
  font-size: 10px;
  line-height: 1.5;
  letter-spacing: .08em;
  color: var(--text-2);
  white-space: normal;
  overflow-wrap: anywhere;
}

.game-roll-result {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-width: 0;
  padding: 12px 14px;
  background: var(--surface-solid);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-1);
}
.game-truth-die {
  width: 52px;
  height: 52px;
  font-size: 24px;
}
.game-roll-copy {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.game-roll-copy strong,
.game-roll-copy span {
  min-width: 0;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.game-roll-copy strong {
  font-size: var(--fs-body-sm);
  color: var(--text);
}
.game-roll-copy span {
  font-size: var(--fs-caption);
  color: var(--text-3);
}
.game-answer-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.game-answer {
  min-width: 0;
  padding: 12px;
  background: var(--surface-2);
  border-radius: var(--r-md);
  overflow-wrap: anywhere;
}
.game-answer p {
  font-size: var(--fs-caption);
  line-height: 1.65;
  color: var(--text-2);
}
.game-answer-q {
  min-width: 0;
  margin-bottom: 6px;
  font-size: var(--fs-caption);
  line-height: 1.5;
  color: var(--text-3);
  overflow-wrap: anywhere;
}
.game-answer-review {
  min-width: 0;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  font-size: var(--fs-caption);
  line-height: 1.6;
  color: var(--text);
  overflow-wrap: anywhere;
}
.game-answer-review strong { font-weight: 600; }
.game-answer-source {
  margin: -2px 0 6px;
  font-size: 10px;
  line-height: 1.5;
  color: var(--text-3);
  overflow-wrap: anywhere;
}

/* ---------------- 剧本杀 ---------------- */
.game-case-title {
  font-size: var(--fs-h3);
  font-weight: 650;
  line-height: 1.3;
  color: var(--text);
}
.game-case-title.small { font-size: var(--fs-body-sm); }
.game-case-victim {
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  font-size: var(--fs-caption);
  line-height: 1.5;
  color: var(--text-2);
}
.game-clue-list,
.game-qa-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.game-clue,
.game-qa {
  padding: 10px 12px;
  background: var(--surface-2);
  border-radius: var(--r-md);
}
.game-clue p,
.game-qa p {
  font-size: var(--fs-caption);
  line-height: 1.65;
  color: var(--text-2);
}
.game-clue-no {
  display: block;
  margin-bottom: 3px;
  font-size: 9px;
  line-height: 1.4;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-3);
}
.game-qa-q {
  margin-bottom: 4px;
  font-size: var(--fs-caption);
  font-weight: 600;
  line-height: 1.5;
  color: var(--text);
}

.game-char-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.game-chip {
  padding: 7px 14px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-full);
  font-size: var(--fs-caption);
  line-height: 1.4;
  color: var(--text-2);
  transition: background .16s ease, color .16s ease, border-color .16s ease;
}
.game-chip.on {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
}

/* ---------------- 海龟汤 ---------------- */
.game-soup {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  background: var(--surface-solid);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-1);
}
.game-soup p {
  font-size: var(--fs-body-sm);
  line-height: 1.7;
  color: var(--text);
}
.game-soup-label {
  align-self: flex-start;
  padding: 3px 9px;
  background: var(--text);
  border-radius: var(--r-full);
  color: var(--bg);
  font-size: 10px;
  line-height: 1.5;
  letter-spacing: .1em;
}
.game-soup-note {
  padding: 0 4px;
  font-size: 11px;
  line-height: 1.6;
  color: var(--text-3);
}
.game-dialog {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.game-dialog-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px;
  background: var(--surface-2);
  border-left: 2px solid var(--line-strong);
  border-radius: var(--r-sm);
}
.game-dialog-q {
  font-size: var(--fs-caption);
  line-height: 1.5;
  color: var(--text-3);
}
.game-dialog-a {
  font-size: var(--fs-caption);
  font-weight: 600;
  line-height: 1.6;
  color: var(--text);
}
.game-dialog-row.system { border-left-color: var(--text); }
.game-dialog-row.yes { border-left-color: var(--text); }
.game-dialog-row.no { border-left-color: var(--text-3); }
.game-dialog-row.irrelevant { opacity: .72; }
.game-dialog-row.hint {
  background: var(--surface-3);
  border-left-color: var(--text-2);
}
.game-dialog-row.bottom {
  background: var(--text);
  border-left-color: transparent;
  color: var(--bg);
}
.game-dialog-row.bottom .game-dialog-q { color: inherit; opacity: .6; }
.game-dialog-row.bottom .game-dialog-a { color: inherit; }

/* ---------------- 默契挑战 ---------------- */
.game-opt-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  width: 100%;
  min-width: 0;
}
.game-opt {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  width: 100%;
  min-width: 0;
  padding: 12px 14px;
  background: var(--surface-2);
  border: 1px solid transparent;
  border-radius: var(--r-md);
  font-size: var(--fs-body-sm);
  line-height: 1.45;
  color: var(--text);
  text-align: left;
  transition: background .16s ease, border-color .16s ease;
}
.game-opt-text {
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
}
.game-opt:hover { background: var(--surface-3); }
.game-opt:active { border-color: var(--text); }
.game-opt:disabled { opacity: .5; }
.game-opt-key {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  flex: none;
  background: var(--surface-solid);
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px var(--line);
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  color: var(--text-2);
}
.game-reveal-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  padding: 12px;
  background: var(--surface-2);
  border-radius: var(--r-md);
}
.game-result-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 8px;
  min-width: 0;
  align-items: center;
  padding: 8px 10px;
  background: var(--surface-solid);
  border-radius: var(--r-sm);
  box-shadow: inset 0 0 0 1px var(--line);
  font-size: var(--fs-caption);
  line-height: 1.45;
}
.game-result-name {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-width: 0;
  color: var(--text);
  overflow-wrap: anywhere;
}
.game-result-choice {
  max-width: 100%;
  min-width: 0;
  font-size: 10px;
  color: var(--text-2);
  white-space: normal;
  overflow-wrap: anywhere;
}
.game-match {
  padding: 2px 8px;
  background: var(--surface-3);
  border-radius: var(--r-full);
  font-size: 10px;
  line-height: 1.5;
  color: var(--text-3);
  white-space: nowrap;
}
.game-match.on {
  background: var(--text);
  color: var(--bg);
}
.game-big-rate {
  font-size: 48px;
  font-weight: 650;
  line-height: 1.1;
  letter-spacing: -.03em;
  color: var(--text);
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.game-big-rate span {
  margin-left: 2px;
  font-size: var(--fs-body);
  font-weight: 500;
  color: var(--text-3);
}

/* ---------------- 遇见 ---------------- */
.game-date-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.game-date-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px;
  background: var(--surface-2);
  border: 1px solid transparent;
  border-radius: var(--r-md);
  text-align: left;
  transition: background .16s ease, border-color .16s ease, transform .16s ease;
}
.game-date-card:active {
  transform: scale(.98);
  background: var(--surface-3);
  border-color: var(--text);
}
.game-date-name {
  font-size: var(--fs-body-sm);
  font-weight: 600;
  line-height: 1.4;
  color: var(--text);
}
.game-date-score {
  font-size: 10px;
  line-height: 1.4;
  color: var(--text-3);
}
.game-date-persona {
  overflow: hidden;
  font-size: 10px;
  line-height: 1.4;
  color: var(--text-3);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.game-date-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.game-scene {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px;
  background: var(--surface-2);
  border-radius: var(--r-md);
}
.game-scene p {
  font-size: var(--fs-caption);
  line-height: 1.65;
  color: var(--text-2);
}
.game-scene-place {
  align-self: flex-start;
  padding: 2px 8px;
  background: var(--surface-3);
  border-radius: var(--r-full);
  font-size: 10px;
  line-height: 1.5;
  letter-spacing: .06em;
  color: var(--text-2);
}
.game-reaction {
  min-width: 0;
  padding: 12px;
  background: var(--surface-2);
  overflow-wrap: anywhere;
  border-radius: var(--r-md);
}
.game-reaction p {
  font-size: var(--fs-caption);
  line-height: 1.65;
  color: var(--text-2);
}
.game-reaction.rival {
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--line-strong);
}
.game-reaction.rival p { color: var(--text-3); }
.game-affection-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.game-affection-row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) 34px;
  gap: 8px;
  align-items: center;
  font-size: var(--fs-caption);
  line-height: 1.4;
  color: var(--text-2);
}
.game-affection-row > span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.game-affection-row > span:last-child {
  color: var(--text-3);
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.game-affection-bar {
  display: block;
  height: 6px;
  overflow: hidden;
  background: var(--surface-3);
  border-radius: 3px;
}
.game-affection-bar i {
  display: block;
  height: 100%;
  background: var(--text);
  border-radius: 3px;
  transition: width .3s ease;
}

/* ---------------- 窄屏与横屏微调 ---------------- */
@media (max-width: 420px) {
  .game-result-row { grid-template-columns: minmax(0, 1fr) auto; }
  .game-result-choice {
    grid-column: 1 / -1;
    grid-row: 2;
    max-width: 100%;
  }
  .game-match { grid-column: 2; grid-row: 1; }
}
@media (max-width: 350px) {
  .game-body { padding-left: 12px; padding-right: 12px; }
  .game-home-grid { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .game-home-card { min-height: 104px; }
  .game-actions .btn { flex: 1 1 100%; width: 100%; }
  .game-mono-board { gap: 4px; }
  .game-mono-tile { min-height: 60px; padding: 5px 4px; }
  .game-mono-name { font-size: 9px; }
  .game-choice-2 { grid-template-columns: minmax(0, 1fr); }
  .game-choice { min-height: 84px; }
  .game-date-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (orientation: landscape) and (max-height: 500px) {
  .game-body { gap: 10px; padding-top: 12px; }
  .game-home-card { min-height: 104px; }
  .game-choice { min-height: 88px; }
}

/* ---------------- 第一人称 3D 心理沙盘 · 录像带观察室 ---------------- */
.sbx3-app {
  --sbx3-bg: #0c0e0a;
  --sbx3-panel: rgba(20, 23, 16, .94);
  --sbx3-line: rgba(197, 190, 133, .22);
  --sbx3-text: #ddd8b7;
  --sbx3-dim: #929477;
  --sbx3-green: #9cae78;
  --sbx3-red: #a65045;
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: var(--sbx3-bg);
  color: var(--sbx3-text);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", "PingFang SC", monospace;
}
.sbx3-app * { scrollbar-color: rgba(157, 165, 116, .35) transparent; }
.sbx3-topbar {
  flex: none;
  height: 50px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 10px;
  border-bottom: 1px solid var(--sbx3-line);
  background: #11140e;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .32);
  z-index: 12;
}
.sbx3-key, .sbx3-icon-key {
  min-height: 32px;
  padding: 0 11px;
  border: 1px solid rgba(190, 191, 143, .28);
  border-radius: 3px;
  background: linear-gradient(180deg, #292d20, #171a13);
  color: var(--sbx3-text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 220, .08), 0 2px 0 #070806;
  font-size: 11px;
  line-height: 1.35;
  letter-spacing: .03em;
  transition: border-color .15s ease, color .15s ease, transform .1s ease;
}
.sbx3-key:hover, .sbx3-icon-key:hover { border-color: rgba(197, 207, 145, .58); color: #f0eccd; }
.sbx3-key:active, .sbx3-icon-key:active { transform: translateY(1px); box-shadow: inset 0 1px 3px #080906; }
.sbx3-key:disabled { opacity: .35; cursor: default; }
.sbx3-key.primary { border-color: rgba(166, 80, 69, .65); background: linear-gradient(#673c32, #38231e); color: #f0d8bd; }
.sbx3-key.danger { color: #d89382; }
.sbx3-key.on { border-color: var(--sbx3-green); color: #dce9b7; background: #2a3420; }
.sbx3-icon-key { width: 34px; padding: 0; font-size: 17px; }
.sbx3-brand { min-width: 0; flex: 1; }
.sbx3-brand-title { font-size: 13px; font-weight: 650; letter-spacing: .12em; }
.sbx3-brand-sub { margin-top: 1px; color: var(--sbx3-dim); font-size: 9px; letter-spacing: .12em; }
.sbx3-rec { display: flex; align-items: center; gap: 6px; color: #c47b6a; font-size: 10px; white-space: nowrap; }
.sbx3-rec-dot { width: 7px; height: 7px; border-radius: 50%; background: #a84f42; box-shadow: 0 0 8px rgba(190, 64, 50, .72); animation: sbx3Rec 1.8s steps(1) infinite; }
@keyframes sbx3Rec { 0%, 72% { opacity: 1; } 73%, 100% { opacity: .32; } }
.sbx3-main { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.sbx3-stage {
  position: relative;
  flex: 1;
  min-height: 280px;
  overflow: hidden;
  background: radial-gradient(circle at 50% 40%, #24271a, #090b08 75%);
  isolation: isolate;
}
.sbx3-renderer { position: absolute; inset: 0; touch-action: none; cursor: crosshair; }
.sbx3-renderer canvas { display: block; width: 100%; height: 100%; filter: sepia(.13) contrast(1.07) drop-shadow(1px 0 rgba(139, 44, 33, .14)) drop-shadow(-1px 0 rgba(82, 138, 95, .12)); }
.sbx3-crt, .sbx3-noise, .sbx3-vignette { position: absolute; inset: 0; pointer-events: none; z-index: 3; }
.sbx3-crt { background: repeating-linear-gradient(0deg, rgba(3, 8, 4, .13) 0, rgba(3, 8, 4, .13) 1px, transparent 1px, transparent 4px); mix-blend-mode: multiply; }
.sbx3-noise { opacity: .11; background-image: repeating-radial-gradient(circle at 17% 32%, transparent 0, rgba(229, 230, 185, .34) .6px, transparent 1.2px, transparent 3px); background-size: 7px 9px; animation: sbx3Noise .24s steps(2) infinite; }
@keyframes sbx3Noise { 0% { transform: translate(0, 0); } 25% { transform: translate(-2px, 1px); } 50% { transform: translate(1px, -2px); } 75% { transform: translate(2px, 2px); } }
.sbx3-vignette { box-shadow: inset 0 0 95px 25px rgba(0, 0, 0, .72); z-index: 4; }
.sbx3-calm .sbx3-noise { display: none; }
.sbx3-calm .sbx3-crt { opacity: .38; }
.sbx3-calm .sbx3-renderer canvas { filter: none; }
.sbx3-calm .sbx3-rec-dot { animation: none; }
.sbx3-calm .sbx3-vignette { box-shadow: inset 0 0 65px 10px rgba(0, 0, 0, .48); }
.sbx3-stage-label { position: absolute; top: 12px; left: 12px; z-index: 7; display: flex; flex-direction: column; gap: 5px; pointer-events: none; }
.sbx3-tape-label { width: max-content; max-width: 220px; padding: 4px 8px; border: 1px solid rgba(194, 190, 138, .24); background: rgba(13, 16, 10, .72); color: #c7c59e; font-size: 10px; line-height: 1.35; letter-spacing: .06em; }
.sbx3-tape-label.red { border-left: 3px solid var(--sbx3-red); color: #c6927e; }
.sbx3-observer { position: absolute; top: 12px; right: 12px; z-index: 8; width: min(310px, 42vw); pointer-events: none; }
.sbx3-observer-head { padding: 8px 10px; border: 1px solid var(--sbx3-line); border-bottom-color: rgba(166, 80, 69, .45); background: rgba(11, 14, 9, .82); box-shadow: 0 8px 24px rgba(0, 0, 0, .25); }
.sbx3-observer-name { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: #e0ddbb; }
.sbx3-observer-name span:last-child { color: var(--sbx3-dim); font-size: 9px; }
.sbx3-observer-state { display: flex; justify-content: space-between; gap: 8px; margin-top: 4px; color: #a9ae84; font-size: 10px; }
.sbx3-whisper-head { display: flex; align-items: center; justify-content: space-between; margin-top: 7px; padding: 0 2px 4px; color: #8e9273; font-size: 9px; letter-spacing: .08em; pointer-events: auto; }
.sbx3-caption-toggle { padding: 2px 5px; border: 1px solid var(--sbx3-line); color: #bfc397; background: rgba(15, 18, 12, .82); font-size: 9px; }
.sbx3-whispers { display: flex; flex-direction: column; gap: 5px; }
.sbx3-whisper { padding: 7px 9px; border-left: 2px solid rgba(166, 80, 69, .7); background: rgba(12, 15, 10, .82); color: #d0ceb0; font-size: 11px; line-height: 1.55; animation: sbx3Whisper .3s ease both; }
.sbx3-whisper small { display: block; margin-bottom: 2px; color: #777e62; font-size: 8px; }
@keyframes sbx3Whisper { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.sbx3-selection { position: absolute; left: 12px; bottom: 12px; z-index: 9; max-width: calc(100% - 370px); padding: 7px; border: 1px solid var(--sbx3-line); background: rgba(13, 16, 10, .88); }
.sbx3-selection-name { margin: 0 2px 6px; color: #c7c79e; font-size: 10px; }
.sbx3-selection-buttons { display: flex; flex-wrap: wrap; gap: 5px; }
.sbx3-selection .sbx3-key { min-height: 27px; padding: 0 8px; font-size: 9px; }
.sbx3-stage-hint { position: absolute; left: 12px; bottom: 12px; z-index: 6; max-width: calc(100% - 380px); padding: 5px 8px; background: rgba(10, 13, 8, .64); color: rgba(207, 208, 166, .7); font-size: 9px; line-height: 1.5; pointer-events: none; }
.sbx3-speech { position: absolute; right: 12px; bottom: 12px; z-index: 10; width: 330px; padding: 8px; border: 1px solid var(--sbx3-line); background: rgba(13, 16, 10, .88); }
.sbx3-presets { display: flex; gap: 4px; margin-bottom: 6px; overflow-x: auto; scrollbar-width: none; }
.sbx3-presets::-webkit-scrollbar { display: none; }
.sbx3-preset { flex: none; padding: 3px 6px; border: 1px solid rgba(190, 191, 143, .17); color: #999d7b; background: #171b12; font-size: 8px; }
.sbx3-speech-form { display: flex; gap: 6px; }
.sbx3-speech-input { min-width: 0; flex: 1; height: 31px; padding: 0 8px; border: 1px solid rgba(190, 191, 143, .23); border-radius: 2px; outline: none; background: #0b0e09; color: #ddd8b7; font: 10px "SFMono-Regular", Consolas, "PingFang SC", monospace; }
.sbx3-speech-input:focus { border-color: #818a60; }
.sbx3-scene-error { position: absolute; inset: 0; z-index: 20; display: grid; place-items: center; padding: 30px; background: #10130d; color: #d5c3a4; text-align: center; font-size: 12px; line-height: 1.8; }
.sbx3-scene-loading { position: absolute; inset: 0; z-index: 19; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 24px; background: #10130d; color: #d5c3a4; text-align: center; font-size: 12px; letter-spacing: .08em; }
.sbx3-scene-loading small { color: #8e9275; font-size: 10px; letter-spacing: .02em; }
.sbx3-report-loading { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; min-height: 220px; border: 1px dashed rgba(193, 186, 132, .22); color: #c4c09a; text-align: center; font-size: 12px; }
.sbx3-report-loading small { color: #8e9275; font-size: 10px; }
.sbx3-control-deck { flex: none; border-top: 1px solid var(--sbx3-line); background: #11140e; }
.sbx3-tray-head { display: flex; justify-content: space-between; gap: 10px; padding: 7px 12px 5px; color: #858a6b; font-size: 9px; }
.sbx3-tray-head b { color: #c4c59d; font-weight: 500; }
.sbx3-tray { display: flex; gap: 6px; padding: 0 10px 8px; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; }
.sbx3-piece { flex: none; width: 58px; height: 55px; padding: 4px 2px; border: 1px solid rgba(190, 191, 143, .18); border-radius: 3px; background: #191d14; color: #9da27e; font-size: 9px; }
.sbx3-piece i { display: block; width: 22px; height: 22px; margin: 0 auto 3px; border: 1px solid currentColor; border-radius: 50%; color: var(--piece-color); font-size: 11px; font-style: normal; line-height: 20px; box-shadow: inset 0 0 10px rgba(0, 0, 0, .4); }
.sbx3-piece.on { border-color: #a3ae75; background: #2a3220; color: #e1e3b8; box-shadow: inset 0 0 0 1px rgba(175, 190, 115, .16); }
.sbx3-toolbar { display: flex; align-items: center; gap: 6px; padding: 7px 10px calc(7px + env(safe-area-inset-bottom)); border-top: 1px solid rgba(190, 191, 143, .12); overflow-x: auto; }
.sbx3-toolbar .sbx3-key { flex: none; }
.sbx3-toolbar-spacer { flex: 1; min-width: 2px; }
.sbx3-disclaimer { flex: none; padding: 4px 8px calc(4px + env(safe-area-inset-bottom)); border-top: 1px solid rgba(190, 191, 143, .1); background: #090b08; color: #777c64; text-align: center; font-size: 8px; line-height: 1.4; }
.sbx3-modal { position: absolute; inset: 0; z-index: 70; display: flex; align-items: center; justify-content: center; padding: 18px; background: rgba(4, 6, 4, .9); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); }
.sbx3-paper { width: min(700px, 100%); max-height: 100%; display: flex; flex-direction: column; overflow: hidden; border: 1px solid rgba(193, 186, 132, .35); border-radius: 3px; background: #171910; box-shadow: 0 25px 90px #000, inset 0 0 55px rgba(118, 107, 65, .07); }
.sbx3-paper.menu { width: min(420px, 100%); }
.sbx3-paper-head { flex: none; display: flex; align-items: flex-start; gap: 12px; padding: 13px 14px; border-bottom: 1px dashed rgba(193, 186, 132, .28); background: #1d2015; }
.sbx3-paper-heading { flex: 1; min-width: 0; }
.sbx3-paper-eyebrow { color: #8c9270; font-size: 9px; letter-spacing: .15em; }
.sbx3-paper-title { margin-top: 4px; color: #e1dbb8; font-size: 15px; line-height: 1.45; font-weight: 550; }
.sbx3-paper-sub { margin-top: 3px; color: #969a78; font-size: 9px; }
.sbx3-paper-body { flex: 1; min-height: 0; padding: 14px; overflow-y: auto; overscroll-behavior: contain; }
.sbx3-paper-foot { flex: none; display: flex; flex-wrap: wrap; gap: 7px; padding: 10px 14px; border-top: 1px dashed rgba(193, 186, 132, .25); background: #14170f; }
.sbx3-report-text { min-height: 220px; color: #d4d0ae; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 12px; line-height: 1.95; }
.sbx3-report-text.typing::after { content: '█'; color: #9da878; animation: sbx3Cursor .8s steps(1) infinite; }
@keyframes sbx3Cursor { 50% { opacity: 0; } }
.sbx3-fixed-note { margin-top: 14px; padding-top: 10px; border-top: 1px dashed rgba(193, 186, 132, .25); color: #8e9275; font-size: 9px; line-height: 1.6; }
.sbx3-history-list { display: flex; flex-direction: column; gap: 8px; }
.sbx3-history-row { display: grid; grid-template-columns: 116px minmax(0, 1fr); gap: 11px; width: 100%; padding: 8px; border: 1px solid rgba(193, 186, 132, .18); background: #12150e; color: #c8c6a3; text-align: left; }
.sbx3-history-row:hover { border-color: rgba(193, 200, 137, .43); }
.sbx3-thumb { display: block; width: 116px; height: 78px; border: 1px solid rgba(166, 80, 69, .28); background: #0d100a; }
.sbx3-history-title { color: #d9d3af; font-size: 11px; line-height: 1.45; }
.sbx3-history-meta { margin-top: 3px; color: #858a6c; font-size: 9px; }
.sbx3-history-excerpt { margin-top: 7px; color: #aaa98b; font-size: 10px; line-height: 1.5; }
.sbx3-empty { padding: 36px 12px; border: 1px dashed rgba(193, 186, 132, .2); color: #8f9474; text-align: center; font-size: 11px; line-height: 1.8; }
.sbx3-warning { margin-bottom: 10px; padding: 7px 9px; border-left: 2px solid #a65d45; background: #272016; color: #c6a283; font-size: 10px; line-height: 1.5; }
.sbx3-detail-section + .sbx3-detail-section { margin-top: 16px; }
.sbx3-detail-title { margin-bottom: 7px; color: #bfc297; font-size: 10px; letter-spacing: .08em; }
.sbx3-layout-list, .sbx3-event-list { border: 1px solid rgba(193, 186, 132, .14); background: #10130c; }
.sbx3-layout-row { display: grid; grid-template-columns: minmax(70px, 1fr) 1.4fr .7fr; gap: 7px; padding: 6px 8px; border-bottom: 1px solid rgba(193, 186, 132, .09); color: #aaa98b; font-size: 9px; line-height: 1.5; }
.sbx3-layout-row:last-child, .sbx3-event-row:last-child { border-bottom: none; }
.sbx3-event-list { max-height: 180px; overflow-y: auto; }
.sbx3-event-row { padding: 6px 8px; border-bottom: 1px solid rgba(193, 186, 132, .09); color: #999b7e; font-size: 9px; line-height: 1.55; overflow-wrap: anywhere; }
.sbx3-event-row b { color: #bdbea0; font-weight: 500; }
.sbx3-menu-list { display: flex; flex-direction: column; gap: 8px; }
.sbx3-menu-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 40px; padding: 8px 10px; border: 1px solid rgba(193, 186, 132, .16); background: #12150e; color: #c6c6a2; font-size: 11px; text-align: left; }
.sbx3-toggle { position: relative; flex: none; width: 38px; height: 21px; border: 1px solid #555c42; border-radius: 2px; background: #0b0e09; }
.sbx3-toggle::after { content: ''; position: absolute; top: 3px; left: 3px; width: 13px; height: 13px; background: #686f51; transition: transform .15s ease; }
.sbx3-toggle.on { border-color: #899765; }
.sbx3-toggle.on::after { transform: translateX(17px); background: #b4c488; }
.sbx3-help { color: #aaa98d; font-size: 10px; line-height: 1.9; }
.sbx3-help b { color: #d0cfab; font-weight: 500; }
@media (max-width: 620px) {
  .sbx3-brand-sub { display: none; }
  .sbx3-topbar { gap: 6px; }
  .sbx3-rec { font-size: 8px; }
  .sbx3-stage { min-height: 310px; }
  .sbx3-observer { width: 205px; }
  .sbx3-whisper { font-size: 9px; padding: 5px 7px; }
  .sbx3-whisper:nth-child(3) { display: none; }
  .sbx3-stage-label { max-width: 130px; }
  .sbx3-tape-label { font-size: 8px; }
  .sbx3-speech { width: calc(100% - 24px); padding: 6px; }
  .sbx3-selection { bottom: 83px; max-width: calc(100% - 24px); }
  .sbx3-stage-hint { bottom: 84px; max-width: calc(100% - 24px); }
  .sbx3-toolbar { gap: 4px; padding-left: 7px; padding-right: 7px; }
  .sbx3-toolbar .sbx3-key { padding: 0 8px; font-size: 9px; }
  .sbx3-modal { padding: 8px; }
  .sbx3-paper-body { padding: 11px; }
  .sbx3-history-row { grid-template-columns: 92px minmax(0, 1fr); }
  .sbx3-thumb { width: 92px; height: 68px; }
  .sbx3-layout-row { grid-template-columns: 1fr 1.2fr; }
  .sbx3-layout-row span:last-child { display: none; }
}
@media (max-height: 690px) {
  .sbx3-stage { min-height: 240px; }
  .sbx3-tray-head { padding-top: 4px; }
  .sbx3-piece { height: 48px; }
  .sbx3-piece i { width: 18px; height: 18px; line-height: 16px; margin-bottom: 1px; }
  .sbx3-disclaimer { padding-top: 2px; padding-bottom: calc(2px + env(safe-area-inset-bottom)); font-size: 7px; }
}

/* ---------------- 联机游戏内聊天 ---------------- */
.game-chat {
  position: absolute;
  right: 10px;
  bottom: calc(74px + env(safe-area-inset-bottom));
  z-index: 40;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  pointer-events: none;
}
.game-chat > * { pointer-events: auto; }
.game-chat-fab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 12px;
  border: none;
  border-radius: var(--r-full);
  background: var(--text);
  color: var(--bg);
  font-size: 12px;
  font-weight: 620;
  box-shadow: var(--shadow-2);
}
.game-chat-fab .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4fae72;
}
.game-chat-panel {
  display: flex;
  flex-direction: column;
  width: min(324px, 82vw);
  max-height: min(56vh, 420px);
  overflow: hidden;
  background: var(--surface-solid);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-2);
}
.game-chat-head {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 6px 8px 14px;
  border-bottom: 1px solid var(--line);
}
.game-chat-title {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 13px;
  font-weight: 620;
  line-height: 1.35;
}
.game-chat-sub {
  font-size: 10px;
  font-weight: 400;
  color: var(--text-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.game-chat-list {
  flex: 1;
  min-height: 96px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 12px;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.game-chat-msg {
  display: flex;
  align-items: flex-start;
  gap: 6px;
}
.game-chat-msg.user { flex-direction: row-reverse; }
.game-chat-avatar {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  overflow: hidden;
  border-radius: 50%;
  background: var(--surface-3);
  color: var(--text-2);
  font-size: 10px;
  font-weight: 620;
}
.game-chat-avatar img { width: 100%; height: 100%; object-fit: cover; }
.game-chat-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  max-width: 78%;
}
.game-chat-msg.user .game-chat-body { align-items: flex-end; }
.game-chat-name { padding: 0 2px; font-size: 10px; color: var(--text-3); }
.game-chat-bubble {
  padding: 7px 10px;
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--text);
  font-size: 13px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.game-chat-msg.user .game-chat-bubble {
  background: var(--bubble-me);
  color: var(--bubble-me-text);
}
.game-chat-system {
  align-self: center;
  padding: 2px 8px;
  color: var(--text-3);
  font-size: 10px;
  line-height: 1.6;
  text-align: center;
}
.game-chat-typing {
  padding: 0 2px;
  color: var(--text-3);
  font-size: 10px;
}
.game-chat-input {
  display: flex;
  gap: 8px;
  padding: 8px 10px;
  border-top: 1px solid var(--line);
  background: var(--surface-solid);
}
.game-chat-input input {
  flex: 1;
  min-width: 0;
  height: 34px;
  padding: 0 12px;
  border: none;
  border-radius: var(--r-full);
  background: var(--surface-2);
  color: var(--text);
  font-size: 13px;
  outline: none;
}
@media (max-width: 350px) {
  .game-chat-panel { width: calc(100vw - 24px); }
}

/* ===== social.css ===== */
/* ========== 论坛 · 共用 ========== */
.social-chipbar {
  display: flex; gap: 8px; overflow-x: auto;
  padding: 12px 16px 4px;
  scrollbar-width: none;
}
.social-chipbar::-webkit-scrollbar { display: none; }
.social-chip {
  flex: none; padding: 6px 13px;
  border-radius: var(--r-full);
  background: var(--surface-solid);
  border: 1px solid var(--line);
  color: var(--text-2);
  font-size: var(--fs-caption);
  white-space: nowrap;
  transition: background .16s ease, color .16s ease, border-color .16s ease;
}
.social-chip.on {
  background: var(--text); color: var(--bg);
  border-color: var(--text); font-weight: 600;
}
.social-chip.nsfw { color: #8a5a52; border-color: rgba(125, 70, 64, .28); }
.social-chip.nsfw.on {
  background: #7d4640; border-color: #7d4640; color: #fff;
}
.social-toolbar {
  display: flex; align-items: center; gap: 8px;
  flex-wrap: wrap; padding: 12px 16px 4px;
}
.social-toolbar .hint { padding: 0; flex: 1; min-width: 130px; }
.social-note {
  padding: 4px 16px 6px;
  font-size: var(--fs-caption);
  line-height: var(--lh-body);
  color: var(--text-3);
}
.social-note.warn { color: #8a5a2b; }
.social-grow { flex: 1; min-width: 0; }
.social-author { display: flex; align-items: center; gap: 6px; min-width: 0; }
.social-author .nm {
  font-size: var(--fs-body-sm); font-weight: 600; color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.social-meta { font-size: 11px; color: var(--text-3); margin-top: 2px; }
.social-badge {
  flex: none; font-size: 10px; font-weight: 500;
  color: var(--text-2); background: var(--accent-soft);
  border-radius: var(--r-full); padding: 1px 7px;
}
.social-badge.npc { color: var(--text-3); background: var(--surface-2, #f1f1f2); border: 1px solid var(--line, rgba(20,20,22,.08)); }
.social-actions { display: flex; align-items: center; gap: 18px; }
.social-act {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: var(--fs-caption); color: var(--text-3);
  min-height: 28px;
}
.social-act.on { color: #8a4a4a; }
.social-act .x-icon { pointer-events: none; }
.social-divider { height: 1px; background: var(--line); margin: 14px 0; }
.social-comment-head {
  display: flex; align-items: center; gap: 10px;
  margin: 2px 0 6px;
}
.social-comment-head b { flex: 1; font-size: var(--fs-body-sm); font-weight: 620; }
.social-comments { display: flex; flex-direction: column; }
.social-comment {
  display: flex; gap: 10px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}
.social-comment:last-child { border-bottom: none; }
.social-comment .body { flex: 1; min-width: 0; }
.social-comment .name {
  display: flex; align-items: center; gap: 6px;
  font-size: var(--fs-caption); font-weight: 600; color: var(--text-2);
  min-width: 0;
}
.social-comment .name > span:first-child {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.social-comment .ts { font-size: 10px; color: var(--text-3); margin-top: 1px; }
.social-comment .txt {
  font-size: var(--fs-body-sm); line-height: 1.65;
  margin-top: 4px; color: var(--text);
  white-space: pre-wrap; word-break: break-word;
}
.social-del {
  margin-left: auto; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: 50%;
  color: var(--text-3);
}
.social-del:active { background: var(--surface-2); }
.social-comments-empty { padding: 18px 0; }
.social-comment-bar {
  position: sticky; bottom: 0; z-index: 4;
  display: flex; align-items: center; gap: 8px;
  padding: 9px 12px calc(9px + env(safe-area-inset-bottom, 0px));
  background: var(--surface);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border-top: 1px solid var(--line);
}
.social-comment-bar .input {
  flex: 1; min-width: 0; height: 40px;
  padding: 8px 13px; border-radius: var(--r-full);
  background: var(--surface-2);
}
.social-send {
  width: 40px; height: 40px; flex: none; border-radius: 50%;
  background: var(--text); color: var(--bg);
  display: flex; align-items: center; justify-content: center;
  transition: transform .16s ease;
}
.social-send:active { transform: scale(.92); }
.social-sheet-chars {
  display: flex; flex-wrap: wrap; gap: 8px;
  padding: 4px 0 10px;
}
.social-pick-char {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 11px 6px 6px;
  border-radius: var(--r-full);
  background: var(--surface-2);
  border: 1px solid transparent;
  font-size: var(--fs-body-sm); color: var(--text-2);
  white-space: nowrap;
}
.social-pick-char.on {
  border-color: var(--text); background: var(--surface-solid);
  color: var(--text); font-weight: 600;
}
.social-pick-char.off,
.social-pick-char:disabled { opacity: .5; }
.forum-empty-actions { display: flex; gap: 8px; justify-content: center; margin-top: 6px; }

/* ========== 论坛 · 搜索与列表 ========== */
.forum-search {
  display: flex; align-items: center; gap: 8px;
  margin: 6px 16px 0;
  padding: 0 12px;
  height: 38px;
  border-radius: var(--r-full);
  background: var(--surface-2);
  border: 1px solid transparent;
  color: var(--text-3);
  transition: background .16s ease, border-color .16s ease;
}
.forum-search:focus-within {
  background: var(--surface-solid);
  border-color: var(--line-strong);
}
.forum-search-input {
  flex: 1; min-width: 0;
  border: none; outline: none; background: transparent;
  font-family: inherit; font-size: var(--fs-body-sm);
  color: var(--text);
  -webkit-appearance: none;
  appearance: none;
}
.forum-search-input::placeholder { color: var(--text-3); }
.forum-search-input::-webkit-search-cancel-button { display: none; }
.forum-search-clear {
  flex: none; width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--surface-3);
  color: var(--text-3);
  display: flex; align-items: center; justify-content: center;
}
.forum-search-clear:active { background: var(--line-strong); }

.forum-cats { padding-top: 10px; }
.forum-list {
  display: flex; flex-direction: column; gap: 10px;
  padding: 8px 16px 28px;
}
.forum-card {
  position: relative;
  background: var(--surface-solid);
  border-radius: var(--r-lg);
  padding: 14px;
  box-shadow: var(--shadow-1);
  text-align: left; width: 100%;
  cursor: pointer;
  transition: transform .16s ease;
}
.forum-card:active { transform: scale(.99); }
.forum-card.is-nsfw { box-shadow: inset 2px 0 0 #7d4640, var(--shadow-1); }
.forum-card-top { display: flex; align-items: center; gap: 10px; }
.forum-cat {
  flex: none; font-size: 11px; color: var(--text-2);
  background: var(--surface-2); border-radius: var(--r-full);
  padding: 3px 9px;
}
.forum-cat.is-nsfw {
  color: #8a4a44;
  background: rgba(125, 70, 64, .1);
}
.forum-title {
  font-size: 15px; font-weight: 620; line-height: 1.45;
  margin: 10px 0 6px;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}
.forum-text {
  font-size: 13px; line-height: 1.65; color: var(--text-2);
  display: -webkit-box; -webkit-line-clamp: 3;
  -webkit-box-orient: vertical; overflow: hidden;
  white-space: pre-wrap; word-break: break-word;
}
.forum-thumbs { display: flex; align-items: center; gap: 6px; margin-top: 10px; }
.forum-thumb {
  flex: none; width: 68px; height: 68px;
  border-radius: var(--r-sm);
  overflow: hidden;
  background: var(--surface-3);
}
.forum-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.forum-thumb-more { font-size: 11px; color: var(--text-3); }
.forum-foot { display: flex; align-items: center; gap: 16px; margin-top: 10px; }
.forum-follow {
  margin-left: auto;
  display: inline-flex; align-items: center; gap: 4px;
  flex: none;
  font-size: 11px; color: var(--text-2);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--r-full);
  padding: 3px 10px;
  min-height: 26px;
  transition: color .16s ease, border-color .16s ease, background .16s ease;
}
.forum-follow.on {
  color: #7d4640;
  border-color: rgba(125, 70, 64, .35);
  background: rgba(125, 70, 64, .08);
}
.forum-follow:active { background: var(--surface-2); }
.forum-detail { padding: 16px 16px 8px; }
.forum-detail-head { display: flex; align-items: center; gap: 10px; }
.forum-detail-title {
  font-size: var(--fs-h3); font-weight: 650;
  line-height: 1.35; margin: 14px 0 8px;
}
.forum-detail-text {
  font-size: var(--fs-body); line-height: 1.78;
  color: var(--text); white-space: pre-wrap; word-break: break-word;
}
.forum-pair {
  margin-top: 10px;
  font-size: var(--fs-caption);
  color: var(--text-3);
}
.forum-gallery {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 8px; margin-top: 14px;
}
.forum-shot {
  aspect-ratio: 4 / 3;
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--surface-3);
}
.forum-shot:only-child {
  grid-column: 1 / -1;
  aspect-ratio: 16 / 10;
}
.forum-shot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.forum-detail-actions {
  margin-top: 14px;
  flex-wrap: wrap;
  gap: 12px;
}
.forum-share {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: var(--fs-caption); color: var(--text-2);
  background: var(--surface-2);
  border-radius: var(--r-full);
  padding: 6px 12px;
}
.forum-share:active { background: var(--surface-3); }
.forum-empty .hint { padding: 0; max-width: 300px; }

/* ========== 论坛 · 发布与转发 ========== */
.forum-ident-note {
  margin-top: 6px;
  font-size: var(--fs-caption);
  line-height: 1.55;
  color: var(--text-3);
}
.forum-nsfw-note { color: #8a5a52; }
.forum-prompt-note {
  display: flex; gap: 10px; align-items: flex-start;
  margin: 2px 0 12px; padding: 10px 12px;
  border: 1px solid var(--line, rgba(20,20,22,.08));
  border-radius: var(--r-md); background: var(--surface-2, #f7f7f8);
  font-size: var(--fs-caption); line-height: 1.65; color: var(--text-2);
}
.forum-prompt-note b {
  flex: none; font-size: 10px; font-weight: 650; letter-spacing: .1em;
  color: var(--text); border-right: 1px solid var(--line, rgba(20,20,22,.1));
  padding-right: 10px; margin-top: 1px;
}
.forum-prompt-note span { white-space: pre-line; }
.forum-upload-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 8px; margin-bottom: 4px;
}
.forum-upload-item {
  position: relative; aspect-ratio: 1;
  border-radius: var(--r-md); overflow: hidden;
  background: var(--surface-2);
}
.forum-upload-item img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
}
.forum-upload-del {
  position: absolute; top: 4px; right: 4px;
  width: 24px; height: 24px; border-radius: 50%;
  background: rgba(16, 16, 18, .58); color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.forum-upload-add {
  aspect-ratio: 1;
  border-radius: var(--r-md);
  border: 1px dashed var(--line-strong);
  background: var(--surface-2);
  color: var(--text-3);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 6px;
  font-size: 11px;
}
.forum-upload-add:active { background: var(--surface-3); }
.forum-upload-add:disabled { opacity: .55; }
.forum-file { display: none; }
.forum-friend-tag {
  flex: none;
  font-size: 10px;
  color: var(--text-3);
  margin-left: 2px;
}
.forum-friend-tag.off { color: #8a5a2b; }

@media (min-width: 620px) {
  .forum-list { padding-left: 24px; padding-right: 24px; }
  .forum-detail { padding-left: 28px; padding-right: 28px; }
  .forum-search { margin-left: 24px; margin-right: 24px; }
  .forum-upload-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ===== life.css ===== */
/* 音乐与情侣空间样式 · iOS 简约黑白灰 / 低饱和 / 磨砂圆角 */

/* ============================== 音乐 ============================== */
.music-wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 14px 16px calc(28px + env(safe-area-inset-bottom, 0px));
}
.music-note {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  margin-bottom: 12px;
  background: var(--surface-solid);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-1);
}
.music-note-ic {
  width: 36px;
  height: 36px;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-md);
  background: var(--surface-3);
  color: var(--text-2);
}
.music-note b {
  display: block;
  font-size: var(--fs-body-sm);
  font-weight: 620;
  line-height: var(--lh-sub);
}
.music-note p {
  margin-top: 3px;
  font-size: var(--fs-caption);
  line-height: 1.65;
  color: var(--text-3);
}

.music-together {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  margin-bottom: 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
}
.music-together-main { flex: 1; min-width: 0; }
.music-together-main b {
  display: block;
  font-size: var(--fs-body-sm);
  font-weight: 620;
}
.music-together-main p {
  margin-top: 3px;
  font-size: var(--fs-caption);
  line-height: 1.6;
  color: var(--text-3);
}

.music-title {
  padding: 16px 4px 10px;
}
.music-empty {
  background: var(--surface);
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-lg);
}
.music-empty .hint { padding: 0; max-width: 300px; }

.music-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.music-track {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  background: var(--surface-solid);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-1);
  border: 1px solid transparent;
  transition: border-color .18s ease, transform .18s ease;
}
.music-track:active { transform: scale(.995); }
.music-track.on { border-color: var(--line-strong); }
.music-track-btn {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  text-align: left;
}
.music-track-ic {
  width: 32px;
  height: 32px;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--surface-3);
  color: var(--text-2);
  transition: background .18s ease, color .18s ease;
}
.music-track.on .music-track-ic {
  background: var(--text);
  color: var(--bg);
}
.music-track-meta { display: flex; flex-direction: column; min-width: 0; }
.music-track-meta b {
  font-size: var(--fs-body-sm);
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.music-track-meta small {
  margin-top: 2px;
  font-size: 11px;
  color: var(--text-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.music-player {
  position: sticky;
  bottom: 10px;
  margin-top: 14px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-2);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
}
.music-player-head {
  display: flex;
  align-items: center;
  gap: 10px;
}
.music-cover {
  width: 38px;
  height: 38px;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-md);
  background: var(--surface-3);
  color: var(--text-2);
  overflow: hidden;
}
.music-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.music-track-cover {
  width: 38px;
  height: 38px;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-md);
  background: var(--surface-3);
  color: var(--text-2);
  overflow: hidden;
}
.music-track-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.music-player-meta { flex: 1; min-width: 0; }
.music-player-meta b {
  display: block;
  font-size: var(--fs-body-sm);
  font-weight: 620;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.music-player-meta small {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  color: var(--text-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.music-state {
  flex: none;
  font-size: 11px;
  color: var(--text-3);
  padding: 2px 8px;
  border-radius: var(--r-full);
  background: var(--surface-2);
}
.music-seek {
  width: 100%;
  height: 4px;
  margin: 14px 0 2px;
  -webkit-appearance: none;
  appearance: none;
  border-radius: 2px;
  background: var(--surface-3);
  outline: none;
  cursor: pointer;
}
.music-seek::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--text);
  border: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .22);
}
.music-seek::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--text);
  border: none;
}
.music-seek:disabled { opacity: .5; cursor: default; }
.music-time {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}
.music-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  margin-top: 6px;
}
.music-play {
  width: 54px;
  height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--text);
  color: var(--bg);
  transition: transform .18s ease, opacity .18s ease;
}
.music-play:active { transform: scale(.94); }

.music-chips {
  padding: 0 0 4px;
  margin-bottom: 6px;
}
.music-chips .chip.on {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
}
.music-partner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  margin-top: 10px;
  background: var(--surface-solid);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-1);
}
.music-partner-main { flex: 1; min-width: 0; }
.music-partner-main b {
  display: block;
  font-size: var(--fs-body-sm);
  font-weight: 620;
}
.music-partner-main small {
  display: block;
  margin-top: 2px;
  font-size: var(--fs-caption);
  line-height: 1.55;
  color: var(--text-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.music-comment-tools {
  padding: 14px 0 4px;
}
.music-comment-tools .hint { padding-left: 0; }
.music-comments {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.music-comment {
  padding: 12px 14px;
  background: var(--surface-solid);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-1);
}
.music-comment-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  justify-content: space-between;
}
.music-comment-head b {
  font-size: var(--fs-body-sm);
  font-weight: 620;
}
.music-comment-head .caption { flex: none; }
.music-comment p {
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-2);
  white-space: pre-wrap;
}

/* 网易云歌单导入 */
.music-import {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.music-url-input {
  flex: 1;
  min-width: 0;
}

/* 歌曲行「一起听」按钮：黑白线框，跟随主题 */
.music-together-btn {
  flex: none;
  width: 30px; height: 30px;
  padding: 0;
  border: 1px solid var(--line-strong, rgba(20,20,22,.16));
  border-radius: 50%;
  background: var(--surface-solid, #fff);
  color: var(--text, #141416);
  transition: background .18s ease, color .18s ease, border-color .18s ease, transform .18s ease;
}
.music-together-btn:hover {
  background: var(--text, #141416);
  border-color: var(--text, #141416);
  color: var(--bg, #f2f2f4);
}
.music-together-btn:active { transform: scale(.9); }
.music-track.on .music-together-btn {
  color: var(--text, #141416);
  border-color: var(--text, #141416);
}
.music-detail-together {
  border: 1px solid var(--line-strong, rgba(20,20,22,.16));
  background: transparent;
  color: var(--text, #141416);
}
.music-detail-together:hover { background: var(--text, #141416); color: var(--bg, #f2f2f4); }

/* 播放器歌词 */
.music-lyric {
  margin: 10px 0 4px;
  padding: 8px 12px;
  min-height: 20px;
  font-size: 12px;
  line-height: 1.6;
  text-align: center;
  color: var(--text-2);
  background: var(--surface-2);
  border-radius: var(--r-md);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 播放模式与歌曲详情 */
.music-controls { flex-wrap: wrap; }
.music-mode-btn {
  flex: none;
  min-width: 58px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: var(--r-full);
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 10px;
  line-height: 1.2;
  cursor: pointer;
}
.music-mode-btn:active { transform: scale(.96); }
.music-detail-wrap {
  max-width: 560px;
  margin: 0 auto;
  padding: 22px 18px calc(28px + env(safe-area-inset-bottom, 0px));
}
.music-detail-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--surface-solid);
  box-shadow: var(--shadow-2);
  perspective: 1200px;
}
.music-detail-face {
  min-height: 510px;
  animation: musicFaceIn .24s ease;
}
.music-detail-front {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 30px 24px 22px;
  cursor: pointer;
}
.music-detail-cover {
  width: min(64vw, 270px);
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 26px;
  background: var(--surface-3);
  color: var(--text-3);
  box-shadow: 0 18px 42px rgba(0, 0, 0, .14);
  transition: transform .25s ease, box-shadow .25s ease;
}
.music-detail-cover.playing {
  transform: translateY(-2px);
  box-shadow: 0 22px 48px rgba(0, 0, 0, .2);
}
.music-detail-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.music-detail-meta {
  max-width: 100%;
  margin-top: 24px;
  text-align: center;
}
.music-detail-meta h3 {
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 22px;
  font-weight: 650;
  line-height: 1.35;
}
.music-detail-meta p {
  margin: 6px 0 0;
  color: var(--text-3);
  font-size: var(--fs-body-sm);
}
.music-detail-seek { margin-top: 28px; }
.music-detail-time { width: 100%; }
.music-detail-flip-hint {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 20px;
  padding: 6px 10px;
  border: 0;
  background: none;
  color: var(--text-3);
  font-size: var(--fs-caption);
  cursor: pointer;
}
.music-detail-back {
  display: flex;
  flex-direction: column;
  padding: 16px;
}
.music-lyric-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 2px 2px 12px;
  border-bottom: 1px solid var(--line);
}
.music-lyric-head > div { min-width: 0; }
.music-lyric-head b,
.music-lyric-head small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.music-lyric-head b { font-size: var(--fs-body-sm); font-weight: 650; }
.music-lyric-head small { margin-top: 3px; color: var(--text-3); font-size: 11px; }
.music-lyric-scroll {
  height: 408px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 150px 8px;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  mask-image: linear-gradient(180deg, transparent, #000 18%, #000 82%, transparent);
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 18%, #000 82%, transparent);
}
.music-lyric-line {
  display: block;
  width: 100%;
  margin: 0;
  padding: 11px 8px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--text-3);
  font-size: 14px;
  line-height: 1.65;
  text-align: center;
  white-space: pre-wrap;
  cursor: pointer;
  transition: color .2s ease, font-size .2s ease, background .2s ease, opacity .2s ease;
}
.music-lyric-line.past { opacity: .58; }
.music-lyric-line.on {
  background: var(--surface-2);
  color: var(--text);
  font-size: 17px;
  font-weight: 650;
  opacity: 1;
}
.music-lyric-empty {
  margin: 0;
  color: var(--text-3);
  font-size: var(--fs-body-sm);
  text-align: center;
}
.music-lyric-tip {
  margin: 4px 0 0;
  color: var(--text-3);
  font-size: 10px;
  line-height: 1.5;
  text-align: center;
}
.music-detail-controls { margin-top: 18px; }
.music-detail-together {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 16px auto 0;
}
@keyframes musicFaceIn {
  from { opacity: .35; transform: rotateY(8deg); }
  to { opacity: 1; transform: rotateY(0); }
}

/* 邀请角色 sheet */
.music-invite-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}
.music-invite-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 12px;
  text-align: left;
  background: var(--surface-solid);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-1);
  transition: transform .18s ease, background .18s ease;
}
.music-invite-item:active { transform: scale(.985); }
.music-invite-main { flex: 1; min-width: 0; }
.music-invite-main b {
  display: block;
  font-size: var(--fs-body-sm);
  font-weight: 620;
}
.music-invite-main small {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  color: var(--text-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ============================== 情侣空间 ============================== */
.cp-wrap {
  padding: 16px 16px calc(28px + env(safe-area-inset-bottom, 0px));
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.cp-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px;
  border-radius: var(--r-lg);
  background: var(--surface-solid);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-1);
}
.cp-note-ic {
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-3);
  color: var(--text-2);
}
.cp-note b { font-size: var(--fs-body-sm); font-weight: 650; }
.cp-note p {
  margin: 4px 0 0;
  font-size: var(--fs-caption);
  line-height: var(--lh-body);
  color: var(--text-2);
}
.cp-empty { padding: 32px 16px; }
.cp-home-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  padding: 2px 2px 0;
}
.cp-home-head b { font-size: var(--fs-body); font-weight: 650; }
.cp-home-head p {
  margin: 4px 0 0;
  font-size: var(--fs-caption);
  color: var(--text-2);
  line-height: var(--lh-body);
}
.cp-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 22px 14px;
  padding: 18px 2px 40px;
}
.cp-char-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  padding: 22px 12px 14px;
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(255, 255, 255, .96), rgba(255, 255, 255, .72) 62%, rgba(246, 246, 248, .92));
  border: 1px solid var(--line);
  border-radius: 26px;
  box-shadow: 0 10px 30px rgba(20, 20, 30, .07), inset 0 1px 0 rgba(255, 255, 255, .9);
  text-align: center;
  cursor: pointer;
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}
.cp-char-card.cp-lane-b { margin-top: 34px; }
.cp-char-card:hover { transform: translateY(-3px); box-shadow: 0 18px 40px rgba(20, 20, 30, .12); }
.cp-char-card:active { transform: scale(.985); }
.cp-char-card.is-active {
  border-color: rgba(20, 20, 22, .2);
  background:
    radial-gradient(130% 100% at 50% 0%, #ffffff, #f4f4f7 60%, #ececf1);
}
.cp-char-card.is-pending { border-style: dashed; }

.cp-diamond-wrap {
  position: relative;
  width: 128px;
  height: 128px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 10px 0 2px;
}
.cp-diamond-ring {
  position: relative;
  z-index: 2;
  width: 112px;
  height: 112px;
  display: flex;
  align-items: center;
  justify-content: center;
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
  background: linear-gradient(135deg, #f3f3f7 0%, #bfc0cb 38%, #8f909d 62%, #e6e6ee 100%);
  filter: drop-shadow(0 12px 20px rgba(25, 25, 35, .18));
  transition: transform .25s ease, filter .25s ease;
}
.cp-char-card:hover .cp-diamond-ring { transform: scale(1.035); filter: drop-shadow(0 16px 26px rgba(25, 25, 35, .24)); }
.cp-diamond-ring.is-active {
  background: linear-gradient(135deg, #2a2a30 0%, #575763 42%, #9a9aa8 68%, #ececf2 100%);
}
.cp-diamond-ring.is-pending {
  background: linear-gradient(135deg, #f5efe4 0%, #cbae86 45%, #a98b62 70%, #f1e7d6 100%);
}
.cp-diamond {
  width: calc(100% - 6px);
  height: calc(100% - 6px);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
  background: var(--surface-3);
}
.cp-diamond img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.cp-diamond-initial {
  font-size: 30px;
  font-weight: 650;
  color: var(--text-2);
  letter-spacing: .04em;
}
.cp-diamond-glow {
  position: absolute;
  inset: 4px;
  z-index: 0;
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
  background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, .9), transparent 68%);
  opacity: 0;
  transition: opacity .25s ease;
}
.cp-char-card.is-active .cp-diamond-glow { opacity: 1; }
.cp-diamond-badge {
  position: absolute;
  top: 10px;
  right: -2px;
  z-index: 3;
  padding: 2px 9px;
  border-radius: var(--r-full);
  background: var(--text);
  color: var(--bg);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: .02em;
  box-shadow: 0 6px 14px rgba(20, 20, 25, .22);
}
.cp-diamond-badge.pending { background: #b08a58; color: #fff; }
.cp-diamond-badge.none { background: var(--surface-3); color: var(--text-3); box-shadow: none; }
.cp-name-tag {
  position: absolute;
  bottom: 6px;
  z-index: 4;
  max-width: 118px;
  padding: 4px 11px;
  border-radius: 10px;
  background: rgba(22, 22, 26, .82);
  color: #fff;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 8px 18px rgba(20, 20, 25, .22);
}
.cp-name-tag.align-left { left: -6px; }
.cp-name-tag.align-right { right: -6px; }
.cp-card-status {
  min-height: 38px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  align-items: center;
  justify-content: center;
}
.cp-card-status small {
  font-size: 11px;
  color: var(--text-3);
  line-height: var(--lh-sub);
}
.cp-days {
  font-size: var(--fs-body-sm);
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}
.cp-pending {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: var(--fs-body-sm);
  font-weight: 600;
  color: #9a7344;
}
.cp-muted { font-size: var(--fs-body-sm); color: var(--text-3); }
.cp-card-action { margin-top: 2px; min-height: 36px; border-radius: 12px; }
.cp-char-card .btn { margin-top: 2px; }

.cp-sign-wall {
  padding: 14px 0 2px;
  border-top: 1px solid var(--line);
  overflow: hidden;
}
.cp-sign-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2px 10px;
}
.cp-sign-head b { font-size: var(--fs-body-sm); font-weight: 650; }
.cp-link {
  border: 0;
  background: none;
  padding: 2px 0;
  font-size: var(--fs-caption);
  color: var(--text-2);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.cp-sign-empty {
  font-size: var(--fs-caption);
  color: var(--text-3);
  padding: 10px 2px 12px;
}
.cp-sign-marquee {
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.cp-sign-track {
  display: flex;
  align-items: stretch;
  gap: 28px;
  width: max-content;
  animation: cpSignScroll 32s linear infinite;
}
.cp-sign-marquee:hover .cp-sign-track { animation-play-state: paused; }
.cp-sign-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-width: 260px;
  padding: 8px 14px;
  border-left: 2px solid var(--line-strong);
}
.cp-sign-item b {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-3);
}
.cp-sign-item span {
  font-size: 13px;
  color: var(--text-2);
  line-height: var(--lh-sub);
  white-space: nowrap;
}
.cp-access-note {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 10px 0 0;
  font-size: 11px;
  color: var(--text-3);
}
@keyframes cpSignScroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------- 内页 ---------- */
.cp-inner {
  padding: 0 16px calc(30px + env(safe-area-inset-bottom, 0px));
  max-width: 760px;
  margin: 0 auto;
}
.cp-hero {
  position: sticky;
  top: 0;
  z-index: 8;
  margin: 0 -16px;
  padding: 16px 16px 15px;
  overflow: hidden;
  color: #f7f7f9;
  text-shadow: 0 1px 4px rgba(0, 0, 0, .28);
  border-radius: 0 0 26px 26px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, .16);
  isolation: isolate;
}
.cp-hero::before,
.cp-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: -1;
}
.cp-hero-main {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 12px;
}
.cp-hero-avatar {
  width: 56px;
  height: 56px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
  background: linear-gradient(135deg, rgba(255, 255, 255, .85), rgba(255, 255, 255, .35));
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, .22));
}
.cp-hero-avatar img {
  width: calc(100% - 4px);
  height: calc(100% - 4px);
  object-fit: cover;
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
}
.cp-hero-avatar span {
  width: calc(100% - 4px);
  height: calc(100% - 4px);
  display: flex;
  align-items: center;
  justify-content: center;
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
  background: rgba(255, 255, 255, .18);
  font-size: 18px;
  font-weight: 650;
}
.cp-hero-text { min-width: 0; flex: 1; }
.cp-hero-text > b {
  font-size: var(--fs-body-sm);
  font-weight: 650;
  letter-spacing: .02em;
}
.cp-timer {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 6px;
}
.cp-timer-label { font-size: var(--fs-caption); opacity: .82; }
.cp-timer-clock {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: var(--fs-h3);
  font-weight: 650;
  letter-spacing: .04em;
  font-variant-numeric: tabular-nums;
}
.cp-hero-note {
  margin: 5px 0 0;
  font-size: 11px;
  line-height: var(--lh-sub);
  opacity: .72;
}
.cp-privacy-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-2);
  padding: 4px;
}

/* 场景：渐变 + 伪元素氛围 */
.cp-scene-starry {
  background: linear-gradient(160deg, #1b2030 0%, #2a2f45 55%, #373b58 100%);
}
.cp-scene-starry::before {
  background-image:
    radial-gradient(1.5px 1.5px at 18% 26%, rgba(255, 255, 255, .9), transparent 60%),
    radial-gradient(1.2px 1.2px at 42% 12%, rgba(255, 255, 255, .7), transparent 60%),
    radial-gradient(1.6px 1.6px at 68% 34%, rgba(255, 255, 255, .8), transparent 60%),
    radial-gradient(1.1px 1.1px at 82% 18%, rgba(255, 255, 255, .65), transparent 60%),
    radial-gradient(1.4px 1.4px at 58% 62%, rgba(255, 255, 255, .5), transparent 60%);
  opacity: .9;
}
.cp-scene-starry::after {
  background:
    radial-gradient(circle at 84% 22%, rgba(255, 255, 255, .24), transparent 34%),
    linear-gradient(180deg, transparent 55%, rgba(6, 8, 18, .36));
}
.cp-scene-sakura {
  background: linear-gradient(160deg, #f6e9ea 0%, #ecd6d9 52%, #d9bfc5 100%);
  color: #3b3034;
  text-shadow: none;
}
.cp-scene-sakura::before {
  background-image:
    radial-gradient(5px 4px at 16% 24%, rgba(255, 255, 255, .7), transparent 62%),
    radial-gradient(4px 3px at 38% 66%, rgba(255, 255, 255, .55), transparent 62%),
    radial-gradient(6px 4px at 66% 18%, rgba(255, 255, 255, .6), transparent 62%),
    radial-gradient(4px 3px at 86% 52%, rgba(255, 255, 255, .5), transparent 62%);
}
.cp-scene-sakura::after {
  background: linear-gradient(180deg, transparent 55%, rgba(160, 110, 120, .16));
}
.cp-scene-sunset {
  background: linear-gradient(165deg, #4a3f58 0%, #8d6a76 42%, #d7a189 78%, #e8c2a0 100%);
}
.cp-scene-sunset::before {
  background:
    radial-gradient(circle at 72% 38%, rgba(255, 231, 189, .75), transparent 26%),
    linear-gradient(180deg, transparent 62%, rgba(60, 40, 50, .22));
}
.cp-scene-sunset::after {
  background: linear-gradient(180deg, transparent 70%, rgba(255, 255, 255, .14) 71%, transparent 72%);
}
.cp-scene-snow {
  background: linear-gradient(165deg, #e3e7ee 0%, #c3ccd9 58%, #9ca8b8 100%);
  color: #2c313a;
  text-shadow: none;
}
.cp-scene-snow::before {
  background-image:
    radial-gradient(2px 2px at 14% 28%, rgba(255, 255, 255, .95), transparent 60%),
    radial-gradient(1.6px 1.6px at 36% 58%, rgba(255, 255, 255, .85), transparent 60%),
    radial-gradient(2.2px 2.2px at 62% 22%, rgba(255, 255, 255, .9), transparent 60%),
    radial-gradient(1.6px 1.6px at 84% 46%, rgba(255, 255, 255, .8), transparent 60%),
    radial-gradient(2px 2px at 52% 82%, rgba(255, 255, 255, .7), transparent 60%);
}
.cp-scene-snow::after {
  background: linear-gradient(180deg, transparent 62%, rgba(255, 255, 255, .35));
}
.cp-scene-rooftop {
  background: linear-gradient(170deg, #23272f 0%, #3a414d 55%, #59616e 100%);
}
.cp-scene-rooftop::before {
  background-image:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .1) 0 6px, transparent 6px 18px),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, .06) 0 4px, transparent 4px 16px);
  background-size: 100% 30%, 100% 30%;
  background-position: 0 100%, 0 100%;
  background-repeat: no-repeat;
  opacity: .8;
}
.cp-scene-rooftop::after {
  background: linear-gradient(180deg, transparent 55%, rgba(10, 12, 16, .38));
}
.cp-scene-firefly {
  background: linear-gradient(165deg, #1c2721 0%, #2e4034 55%, #445848 100%);
}
.cp-scene-firefly::before {
  background-image:
    radial-gradient(3px 3px at 22% 40%, rgba(220, 235, 160, .85), transparent 62%),
    radial-gradient(2px 2px at 44% 66%, rgba(220, 235, 160, .6), transparent 62%),
    radial-gradient(2.6px 2.6px at 66% 30%, rgba(220, 235, 160, .75), transparent 62%),
    radial-gradient(2px 2px at 84% 58%, rgba(220, 235, 160, .55), transparent 62%);
}
.cp-scene-firefly::after {
  background: radial-gradient(circle at 50% 120%, rgba(180, 210, 160, .22), transparent 60%);
}
.cp-scene-cloud {
  background: linear-gradient(165deg, #eef1f5 0%, #d6dbe4 56%, #bcc3d0 100%);
  color: #333740;
  text-shadow: none;
}
.cp-scene-cloud::before {
  background:
    radial-gradient(60% 50% at 18% 18%, rgba(255, 255, 255, .9), transparent 70%),
    radial-gradient(45% 40% at 72% 30%, rgba(255, 255, 255, .8), transparent 70%),
    radial-gradient(50% 42% at 48% 82%, rgba(255, 255, 255, .65), transparent 70%);
}
.cp-scene-cloud::after {
  background: linear-gradient(180deg, transparent 60%, rgba(120, 130, 150, .12));
}
.cp-scene-film {
  background: linear-gradient(165deg, #7b6d5c 0%, #5d5348 55%, #3f3831 100%);
  color: #f4ead7;
}
.cp-scene-film::before {
  background-image:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, .05) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(90deg, rgba(0, 0, 0, .12) 0 2px, transparent 2px 7px);
  opacity: .6;
}
.cp-scene-film::after {
  background: radial-gradient(ellipse at center, transparent 52%, rgba(20, 16, 12, .5));
}

.cp-scene-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 12px 0 6px;
  scrollbar-width: none;
}
.cp-scene-bar::-webkit-scrollbar { display: none; }
.cp-scene-chip {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: var(--r-full);
  background: var(--surface-solid);
  border: 1px solid var(--line);
  font-size: var(--fs-caption);
  color: var(--text-2);
  cursor: pointer;
  transition: background .16s ease, color .16s ease;
}
.cp-scene-chip.on {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
}
.cp-scene-dot {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  flex: none;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .06);
}
.dot-starry { background: linear-gradient(160deg, #1b2030, #4a4f72); }
.dot-sakura { background: linear-gradient(160deg, #f6e9ea, #d3aeb6); }
.dot-sunset { background: linear-gradient(160deg, #6a5064, #e8c2a0); }
.dot-snow { background: linear-gradient(160deg, #e9edf3, #9ca8b8); }
.dot-rooftop { background: linear-gradient(160deg, #23272f, #6a7280); }
.dot-firefly { background: linear-gradient(160deg, #24342a, #7d9668); }
.dot-cloud { background: linear-gradient(160deg, #f2f4f7, #bcc3d0); }
.dot-film { background: linear-gradient(160deg, #7b6d5c, #3f3831); }

.cp-tabs {
  margin: 0 -16px;
  background: var(--surface);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
}
.cp-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px 0 0;
  animation: cpPanelIn .24s ease both;
}
@keyframes cpPanelIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
.cp-note {
  background:
    radial-gradient(120% 120% at 0% 0%, rgba(255, 255, 255, .96), rgba(250, 250, 252, .84));
}
.cp-note-ic {
  background: linear-gradient(145deg, #26262b, #5b5b66);
  color: #fff;
  box-shadow: 0 8px 18px rgba(25, 25, 35, .2);
}
.cp-card,
.cp-compose {
  background:
    radial-gradient(130% 120% at 100% 0%, rgba(255, 255, 255, .98), rgba(252, 252, 253, .9));
  transition: box-shadow .2s ease, transform .2s ease;
}
.cp-card:hover { box-shadow: 0 12px 30px rgba(20, 20, 30, .08); }
.cp-tabs {
  padding-bottom: 2px;
  border-bottom: 1px solid var(--line);
}
.cp-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  border-radius: var(--r-lg);
  background: var(--surface-solid);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-1);
}
.cp-card-title { font-size: var(--fs-body-sm); font-weight: 650; }
.cp-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.cp-textarea { min-height: 84px; }
.cp-compose {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  border-radius: var(--r-lg);
  background: var(--surface-solid);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-1);
}
.cp-compose .textarea { min-height: 80px; background: var(--surface-2); }
.cp-compose-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}
.cp-inline {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.cp-inline .input { flex: 1; min-width: 130px; }
.cp-inline-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.cp-hint { font-size: var(--fs-caption); color: var(--text-2); line-height: var(--lh-body); }
.hint.warn { color: #8a6a3f; }

/* 时间轴瀑布流 */
.cp-feed {
  column-count: 2;
  column-gap: 8px;
}
.cp-feed-item {
  break-inside: avoid;
  display: inline-block;
  width: 100%;
  margin: 0 0 8px;
  padding: 10px;
  border-radius: var(--r-md);
  background: var(--surface-solid);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-1);
}
.cp-feed-item.is-photo { padding: 6px; }
.cp-feed-photo {
  display: block;
  width: 100%;
  border: 0;
  padding: 0;
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface-3);
  cursor: zoom-in;
}
.cp-feed-photo img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 280px;
  object-fit: cover;
}
.cp-feed-text {
  margin: 6px 2px 0;
  font-size: 13px;
  line-height: var(--lh-body);
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
}
.cp-feed-line {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-2);
  margin: 2px;
}
.cp-feed-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px solid var(--line);
  font-size: 10px;
  color: var(--text-3);
}
.cp-feed-item .tag { align-self: flex-start; }

/* 纪念日 */
.cp-form-card { gap: 10px; }
.cp-lunar {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-caption);
  color: var(--text-2);
  flex: none;
}
.cp-ann-list { display: flex; flex-direction: column; gap: 10px; }
.cp-ann-card {
  position: relative;
  padding: 14px;
  border-radius: var(--r-lg);
  background: var(--surface-solid);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-1);
}
.cp-ann-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.cp-ann-top b { font-size: var(--fs-body-sm); font-weight: 650; }
.cp-ann-days {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-top: 8px;
}
.cp-ann-days b {
  font-size: 32px;
  line-height: 1.1;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}
.cp-ann-days span { font-size: var(--fs-caption); color: var(--text-2); }
.cp-ann-meta {
  margin-top: 4px;
  font-size: 11px;
  color: var(--text-3);
}
.cp-ann-card .bar { margin-top: 10px; }
.cp-ann-progress {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
  font-size: 10px;
  color: var(--text-3);
}
.cp-ann-del { position: absolute; right: 14px; top: 42px; }

/* 相册 */
.cp-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.cp-toolbar-hint { flex: 1; min-width: 120px; }
.cp-photo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}
.cp-photo {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface-3);
}
.cp-photo-open {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  padding: 0;
  background: none;
  cursor: zoom-in;
}
.cp-photo-open img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cp-photo-del {
  position: absolute;
  right: 4px;
  top: 4px;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, .5);
  color: #fff;
  cursor: pointer;
}
.cp-preview {
  display: block;
  width: 100%;
  max-height: 62vh;
  object-fit: contain;
  border-radius: var(--r-md);
  background: var(--surface-2);
  margin-bottom: 10px;
}

/* 心情与日记 */
.cp-mood-row { display: flex; flex-wrap: wrap; gap: 8px; }
.cp-mood-chip {
  padding: 7px 14px;
  border-radius: var(--r-full);
  border: 1px solid var(--line);
  background: var(--surface-2);
  font-size: var(--fs-caption);
  color: var(--text-2);
  cursor: pointer;
}
.cp-mood-chip.on {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
  font-weight: 600;
}
.cp-diary-q {
  margin: 0;
  font-size: var(--fs-body-sm);
  font-weight: 600;
  line-height: var(--lh-body);
}
.cp-answer {
  padding: 10px 12px;
  border-radius: var(--r-md);
  background: var(--surface-2);
}
.cp-answer span {
  display: block;
  font-size: 11px;
  color: var(--text-3);
  margin-bottom: 3px;
}
.cp-answer p {
  margin: 0;
  font-size: 13px;
  line-height: var(--lh-body);
  white-space: pre-wrap;
  word-break: break-word;
}
.cp-mood-list { display: flex; flex-direction: column; gap: 8px; }
.cp-mood-item {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.cp-mood-item:last-child { border-bottom: 0; padding-bottom: 0; }
.cp-mood-tag {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: var(--r-full);
  background: var(--surface-3);
  color: var(--text-2);
}
.cp-mood-item p {
  margin: 0;
  width: 100%;
  font-size: 13px;
  color: var(--text-2);
  line-height: var(--lh-body);
}
.cp-diary-head {
  display: flex;
  align-items: center;
  gap: 6px;
}
.cp-diary-list { display: flex; flex-direction: column; gap: 12px; }
.cp-diary-item {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cp-diary-item:last-child { border-bottom: 0; padding-bottom: 0; }

/* 默契问答 */
.cp-quiz-q {
  margin: 0;
  padding: 14px;
  border-radius: var(--r-md);
  background: var(--surface-2);
  font-size: 15px;
  line-height: var(--lh-body);
  font-weight: 600;
}
.cp-quiz-loading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: var(--fs-caption);
  color: var(--text-2);
}

/* 悄悄话 */
.cp-signal-row { display: flex; flex-wrap: wrap; gap: 8px; }
.cp-signal {
  padding: 8px 14px;
  border-radius: var(--r-full);
  border: 1px solid var(--line);
  background: var(--surface-2);
  font-size: var(--fs-caption);
  color: var(--text-2);
  cursor: pointer;
}
.cp-signal.on {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
  font-weight: 600;
}
.cp-select { flex: 1; min-width: 140px; }
.cp-whisper-list { display: flex; flex-direction: column; gap: 10px; }
.cp-whisper-card {
  padding: 14px;
  border-radius: var(--r-lg);
  background: var(--surface-solid);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-1);
}
.cp-whisper-card.locked {
  border-style: dashed;
  border-color: var(--line-strong);
  background: var(--surface-2);
}
.cp-whisper-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.cp-whisper-head b { font-size: var(--fs-body-sm); font-weight: 650; }
.cp-whisper-text {
  margin: 6px 0 0;
  font-size: 13px;
  line-height: var(--lh-body);
  color: var(--text-2);
  white-space: pre-wrap;
  word-break: break-word;
}
.cp-whisper-hint {
  margin: 6px 0 0;
  font-size: 11px;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}
.cp-whisper-lock {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-2);
}
.cp-whisper-lock b { font-size: var(--fs-body-sm); font-weight: 600; }

/* 3D 共同空间 */
.cp-space-panel { display: flex; flex-direction: column; gap: 12px; }
.cp-tabs button { flex: none; padding: 7px 13px; white-space: nowrap; font-size: var(--fs-caption); }
.cp-space-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.cp-space-title .hint { margin-top: 4px; }
.cp-space-scenes { margin: 0; }
.cp-space3d { display: flex; flex-direction: column; gap: 9px; }
.cp-space3d-stage {
  position: relative;
  height: min(46vh, 440px);
  min-height: 320px;
  overflow: hidden;
  border-radius: var(--r-lg);
  background: #1b2032;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-1);
}
.cp-space3d-stage canvas { display: block; width: 100%; height: 100%; touch-action: none; cursor: grab; }
.cp-space3d-stage canvas:active { cursor: grabbing; }
.cp-space3d-overlay {
  position: absolute; inset: 0; z-index: 2;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 9px;
  padding: 24px; text-align: center; color: #f5f3f1;
  background: linear-gradient(145deg, #252b40, #444355);
}
.cp-space3d-overlay small { color: rgba(255,255,255,.65); }
.cp-space3d-spinner {
  width: 24px; height: 24px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.2); border-top-color: #fff;
  animation: cpSpaceSpin .8s linear infinite;
}
@keyframes cpSpaceSpin { to { transform: rotate(360deg); } }
.cp-space3d-caption { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--text-3); font-size: 11px; }
.cp-space3d-selected {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 10px 12px; border-radius: var(--r-md); background: var(--surface-2);
}
.cp-space3d-selected > div { flex: 1; min-width: 150px; display: flex; flex-direction: column; gap: 2px; }
.cp-space3d-selected small { color: var(--text-3); }
.cp-space3d-palette { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 7px; }
.cp-space3d-palette button {
  min-width: 0; min-height: 54px; padding: 7px 4px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--surface-solid); color: var(--text-2); font-size: 11px;
}
.cp-space3d-palette button.on { border-color: var(--text); color: var(--text); background: var(--accent-soft); }
.cp-space3d-swatch { width: 19px; height: 19px; border-radius: 6px; box-shadow: inset 0 1px 0 rgba(255,255,255,.4); }
.cp-space-char-action {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 13px; border-radius: var(--r-md); background: var(--surface-solid); border: 1px solid var(--line);
}
.cp-space-char-action > div { min-width: 0; }
.cp-space-char-action .hint { margin-top: 3px; }
.cp-space-narration { padding: 13px 15px; border-radius: var(--r-md); background: var(--accent-soft); }
.cp-space-narration p { margin-top: 5px; color: var(--text-2); font-size: var(--fs-body-sm); line-height: var(--lh-body); white-space: pre-wrap; }
.cp-space-events { padding: 13px 15px; border-radius: var(--r-md); background: var(--surface-2); }
.cp-space-events > b { display: block; margin-bottom: 8px; }
.cp-space-events > div { padding: 8px 0; border-top: 1px solid var(--line); }
.cp-space-events p { color: var(--text-2); font-size: var(--fs-body-sm); line-height: var(--lh-body); }
.cp-space-events small { display: block; margin-top: 3px; }
@media (max-width: 520px) {
  .cp-space3d-stage { min-height: 290px; height: 40vh; }
  .cp-space-char-action { align-items: stretch; flex-direction: column; }
  .cp-space-char-action .btn { width: 100%; }
  .cp-space3d-caption { align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) { .cp-space3d-spinner { animation: none; } }

/* 签名设置 */
.cp-sign-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  margin-bottom: 10px;
  border-radius: var(--r-md);
  background: var(--surface-2);
}
.cp-sign-form b { font-size: var(--fs-body-sm); font-weight: 650; }
.cp-sign-perm {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: var(--fs-caption);
  color: var(--text-2);
}
.cp-sign-form .input { background: var(--surface-solid); }

@media (min-width: 560px) {
  .cp-gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cp-char-card.cp-lane-b { margin-top: 0; }
  .cp-char-card:nth-child(3n+2) { margin-top: 34px; }
  .cp-feed { column-count: 3; }
}
@media (max-width: 360px) {
  .cp-diamond-wrap { width: 112px; height: 112px; }
  .cp-diamond-ring { width: 98px; height: 98px; }
  .cp-name-tag { max-width: 100px; font-size: 11px; }
  .cp-timer-clock { font-size: var(--fs-body); }
  .cp-photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ===== mcp.css ===== */
/* 小手机 · MCP 服务中心
 * iOS 黑白灰：磨砂卡片、圆角、线性图标；所有类名使用 mcp- 前缀。
 */

.mcp-body {
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  padding: 16px 16px calc(40px + env(safe-area-inset-bottom, 0px));
}

.mcp-body .hint { padding: 6px 4px 0; }

/* ---------- 顶部说明 ---------- */
.mcp-hero {
  background: var(--surface);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-1);
  padding: 16px;
  margin-bottom: 18px;
}
.mcp-hero-top { display: flex; align-items: center; gap: 12px; }
.mcp-hero .grow { flex: 1; min-width: 0; }
.mcp-hero-ic {
  width: 44px; height: 44px; flex: none;
  border-radius: 14px;
  background: var(--text); color: var(--bg);
  display: flex; align-items: center; justify-content: center;
}
.mcp-hero-title { font-size: var(--fs-body); font-weight: 620; letter-spacing: -.01em; }
.mcp-hero-sub { font-size: 11px; color: var(--text-3); margin-top: 3px; line-height: 1.5; }
.mcp-hero-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.mcp-badge {
  display: inline-flex; align-items: center;
  padding: 3px 9px; border-radius: var(--r-full);
  background: var(--surface-2); color: var(--text-2);
  font-size: 11px; line-height: 1.5;
  border: 1px solid var(--line);
}
.mcp-hero-note {
  margin-top: 10px; padding-top: 10px;
  border-top: 1px dashed var(--line);
  font-size: 11px; line-height: 1.65; color: var(--text-3);
}

/* ---------- 分区 ---------- */
.mcp-section-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; padding: 6px 4px 8px;
  font-size: var(--fs-caption); font-weight: 600;
  color: var(--text-2); letter-spacing: .04em;
}
.mcp-section-head:not(:first-child) { margin-top: 14px; }
.mcp-link-btn {
  display: inline-flex; align-items: center; gap: 2px;
  padding: 3px 8px; border-radius: var(--r-full);
  font-size: 11px; color: var(--text-2);
  background: var(--surface-2);
}
.mcp-inline-hint { font-size: 11px; color: var(--text-3); font-weight: 400; }
.mcp-spacer { flex: 1; }

.mcp-group {
  background: var(--surface-solid);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-1);
  overflow: hidden;
}
.mcp-empty-line {
  padding: 16px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-md);
  text-align: center;
  font-size: var(--fs-caption);
  line-height: 1.7;
  color: var(--text-3);
}
.mcp-empty-card {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 30px 20px; margin-bottom: 4px;
  background: var(--surface-solid);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-1);
  color: var(--text-3);
  font-size: var(--fs-caption); line-height: 1.7; text-align: center;
}
.mcp-empty-card .x-icon { opacity: .35; }

/* ---------- 服务卡片 ---------- */
.mcp-server-list { display: flex; flex-direction: column; gap: 10px; }
.mcp-server-card {
  background: var(--surface-solid);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-1);
  overflow: hidden;
  border: 1px solid transparent;
}
.mcp-server-main {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 14px 14px 8px;
  text-align: left;
}
.mcp-server-main:active { background: var(--surface-2); }
.mcp-server-info {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; gap: 3px;
}
.mcp-server-name {
  font-size: var(--fs-body-sm); font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.mcp-server-url {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10.5px; color: var(--text-3);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.mcp-server-meta {
  display: flex; align-items: center; flex-wrap: wrap; gap: 5px;
  padding: 0 14px 12px;
  font-size: 11px; color: var(--text-3);
}
.mcp-server-meta i { font-style: normal; opacity: .5; }
.mcp-error-line {
  margin: 0 14px 12px;
  padding: 8px 10px;
  border-radius: var(--r-sm);
  background: rgba(143, 58, 58, .08);
  color: #8f3a3a;
  font-size: 11px; line-height: 1.6;
  word-break: break-word;
}

/* 状态 */
.mcp-dot {
  width: 8px; height: 8px; border-radius: 50%; flex: none;
  background: var(--surface-3);
  border: 1px solid var(--line-strong);
}
.mcp-dot.is-ready { background: #1f1f22; border-color: #1f1f22; }
.mcp-dot.is-error { background: #8f3a3a; border-color: #8f3a3a; }
.mcp-dot.is-connecting { background: var(--text-3); border-color: var(--text-3); animation: mcp-pulse 1.1s ease-in-out infinite; }
.mcp-dot.is-paused { background: transparent; border-color: var(--text-3); }
@keyframes mcp-pulse { 0%,100% { opacity: .35; } 50% { opacity: 1; } }

.mcp-status {
  flex: none;
  font-size: 11px; color: var(--text-3);
  padding: 2px 7px; border-radius: var(--r-full);
  background: var(--surface-2);
}
.mcp-status.is-ready { color: var(--text); background: var(--surface-3); }
.mcp-status.is-error { color: #8f3a3a; background: rgba(143, 58, 58, .09); }
.mcp-status.is-paused { color: var(--text-3); }

.mcp-mini-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 28px; padding: 0 10px;
  border-radius: var(--r-full);
  border: 1px solid var(--line-strong);
  color: var(--text); background: transparent;
  font-size: 11px; white-space: nowrap;
}
.mcp-mini-btn:active { background: var(--surface-2); }
.mcp-mini-btn:disabled { opacity: .35; }

/* ---------- 表单 ---------- */
.mcp-form-card {
  background: var(--surface-solid);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-1);
  padding: 16px;
}
.mcp-form-card .field:last-of-type { margin-bottom: 14px; }
.mcp-json { min-height: 92px; font-size: 12px; line-height: 1.65; }
.mcp-form-row {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 10px;
}
.mcp-form-row > label {
  width: 52px; flex: none;
  font-size: var(--fs-caption); color: var(--text-2);
}
.mcp-select { flex: 1; min-width: 0; padding: 9px 12px; font-size: var(--fs-caption); }

/* ---------- 错误与提示 ---------- */
.mcp-error {
  margin: 8px 0;
  padding: 10px 12px;
  border-radius: var(--r-md);
  background: rgba(143, 58, 58, .08);
  border: 1px solid rgba(143, 58, 58, .18);
  color: #7d3030;
  font-size: 12px; line-height: 1.65;
  word-break: break-word;
  white-space: pre-wrap;
}
.mcp-note {
  margin: 8px 0 0;
  padding: 9px 11px;
  border-radius: var(--r-md);
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 12px; line-height: 1.65;
}

/* ---------- 详情 ---------- */
.mcp-detail-hero {
  background: var(--surface);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-1);
  padding: 14px;
  margin-bottom: 14px;
}
.mcp-detail-top { display: flex; align-items: center; gap: 7px; }
.mcp-detail-state { font-size: var(--fs-caption); font-weight: 600; color: var(--text-2); }
.mcp-detail-state.is-ready { color: var(--text); }
.mcp-detail-state.is-error { color: #8f3a3a; }
.mcp-detail-url {
  margin-top: 8px;
  font-size: 11px; line-height: 1.6;
  color: var(--text-2);
  word-break: break-all;
}
.mcp-detail-info {
  display: flex; flex-wrap: wrap; gap: 4px 12px;
  margin-top: 6px;
  font-size: 10.5px; color: var(--text-3);
}
.mcp-actions {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-top: 12px;
}
.mcp-danger-btn.btn.ghost { color: #8f3a3a; }

.mcp-stat-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
  margin-bottom: 6px;
}
.mcp-stat {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 12px 6px;
  background: var(--surface-solid);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-1);
}
.mcp-stat b { font-size: var(--fs-h3); font-weight: 650; letter-spacing: -.02em; }
.mcp-stat span { font-size: 11px; color: var(--text-3); }

.mcp-tool-row {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-solid);
}
.mcp-tool-row:last-child { border-bottom: none; }
.mcp-tool-row .grow { flex: 1; min-width: 0; }
.mcp-tool-name {
  font-size: var(--fs-body-sm); font-weight: 550;
  word-break: break-all;
}
.mcp-tool-desc {
  margin-top: 3px;
  font-size: 11px; color: var(--text-3); line-height: 1.55;
  word-break: break-word;
}

/* 角色权限 */
.mcp-perm-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}
.mcp-perm-row:last-child { border-bottom: none; }
.mcp-perm-row .grow { flex: 1; min-width: 0; }
.mcp-perm-name {
  font-size: var(--fs-body-sm); font-weight: 550;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.mcp-perm-sub { font-size: 11px; color: var(--text-3); margin-top: 2px; }

/* 调用卡片 */
.mcp-call-card {
  margin-top: 14px;
  padding: 14px;
  background: var(--surface-solid);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-1);
}
.mcp-call-title {
  display: flex; align-items: center; gap: 6px;
  margin-bottom: 12px;
  font-size: var(--fs-body-sm); font-weight: 600;
}
.mcp-call-card .mcp-json { min-height: 74px; margin-bottom: 8px; }
.mcp-call-card .btn.block { margin-top: 4px; }
.mcp-perm-state {
  display: flex; align-items: center; gap: 6px;
  padding: 7px 10px; margin-bottom: 8px;
  border-radius: var(--r-sm);
  background: var(--surface-2);
  color: var(--text-3);
  font-size: 11px; line-height: 1.5;
}
.mcp-perm-state.ok { color: var(--text-2); background: var(--surface-3); }

/* 日志 */
.mcp-log-list { display: flex; flex-direction: column; gap: 8px; }
.mcp-log {
  background: var(--surface-solid);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-1);
  overflow: hidden;
}
.mcp-log-head {
  display: flex; align-items: center; gap: 8px;
  width: 100%; padding: 11px 13px;
  text-align: left;
}
.mcp-log-mid, .mcp-log-mini { min-width: 0; }
.mcp-log-tool {
  flex: 1; min-width: 0;
  font-size: 12px; font-weight: 550;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.mcp-log-status { font-size: 10.5px; color: var(--text-3); flex: none; }
.mcp-log-time { font-size: 10.5px; color: var(--text-3); flex: none; font-variant-numeric: tabular-nums; }
.mcp-log-dot {
  width: 7px; height: 7px; border-radius: 50%; flex: none;
  background: #1f1f22;
}
.mcp-log-dot.error { background: #8f3a3a; }
.mcp-log-dot.success { background: #1f1f22; }
.mcp-log-body {
  padding: 0 13px 13px;
  border-top: 1px solid var(--line);
}
.mcp-log-label {
  margin: 10px 0 5px;
  font-size: 10px; color: var(--text-3);
  letter-spacing: .08em; text-transform: uppercase;
}
.mcp-log-full { font-size: 11px; color: var(--text-2); font-variant-numeric: tabular-nums; }

.mcp-log-mini {
  display: flex; align-items: center; gap: 8px;
  width: 100%; padding: 11px 14px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  background: var(--surface-solid);
}
.mcp-log-mini:last-child { border-bottom: none; }
.mcp-log-mini:active { background: var(--surface-2); }
.mcp-mini-tool {
  flex: 1; min-width: 0;
  font-size: 12px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.mcp-mini-status { font-size: 10.5px; color: var(--text-3); flex: none; }

/* ---------- 代码块与结果 ---------- */
.mcp-pre {
  margin: 0;
  padding: 11px 12px;
  background: #17171a;
  color: #d7d7db;
  border-radius: var(--r-md);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px; line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 280px;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}
.mcp-pre-lg { max-height: 52vh; }
.mcp-viewer-sub {
  margin-bottom: 8px;
  font-size: 11px; color: var(--text-3); line-height: 1.6;
  word-break: break-all;
}

/* ---------- 弹层内容 ---------- */
.mcp-confirm {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  margin-bottom: 6px;
}
.mcp-confirm-row {
  display: flex; align-items: baseline; gap: 12px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-solid);
  font-size: 12px;
}
.mcp-confirm-row:last-child { border-bottom: none; }
.mcp-confirm-row span { flex: none; width: 44px; color: var(--text-3); }
.mcp-confirm-row b { flex: 1; min-width: 0; font-weight: 600; word-break: break-all; }

.mcp-check-list { border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.mcp-check-row {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-solid);
  cursor: pointer;
}
.mcp-check-row:last-child { border-bottom: none; }
.mcp-check-row input {
  width: 17px; height: 17px; margin: 2px 0 0;
  accent-color: var(--text);
  flex: none;
}
.mcp-check-row .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.mcp-check-row b { font-size: 12px; font-weight: 600; word-break: break-all; }
.mcp-check-row small { font-size: 11px; color: var(--text-3); line-height: 1.55; }
.mcp-inline-btns { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }

.mcp-prompt-desc {
  padding: 10px 12px;
  background: var(--surface-2);
  border-radius: var(--r-md);
  font-size: 12px; line-height: 1.65; color: var(--text-2);
}
.mcp-args .field { margin-top: 12px; }
.mcp-prompt-result { margin-top: 12px; }

/* ---------- 小屏与 iPad ---------- */
@media (max-width: 360px) {
  .mcp-body { padding-left: 12px; padding-right: 12px; }
  .mcp-hero, .mcp-form-card, .mcp-call-card { padding: 12px; }
  .mcp-actions .btn { flex: 1; }
}
@media (min-width: 700px) {
  .mcp-body { padding-top: 22px; }
  .mcp-server-list { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  .mcp-stat { padding: 16px 8px; }
}

/* ===== wechat.css ===== */
/* ========== 群聊 / 线下模式 · iOS 黑白灰 ========== */

/* ---------- 多微信 XWechat ---------- */
.multi-current {
  margin: 14px 16px 4px;
  padding: 16px;
  background: var(--surface-solid);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-1);
}
.multi-current-label {
  font-size: var(--fs-caption);
  color: var(--text-3);
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.multi-current-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.multi-current-info {
  flex: 1;
  min-width: 0;
}
.multi-current-name {
  font-size: var(--fs-h3);
  font-weight: 650;
  color: var(--text);
}
.multi-current-no {
  font-size: var(--fs-caption);
  color: var(--text-3);
  margin-top: 2px;
}
.multi-badge {
  flex: none;
  font-size: 11px;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: var(--r-full);
  background: var(--surface-3);
  color: var(--text-2);
}
.multi-badge.active {
  background: var(--text);
  color: var(--bg);
}
.multi-acc-row.on {
  background: var(--surface-2);
}
.multi-acc-row.on .title {
  color: var(--text);
  font-weight: 600;
}

/* ---------- 群聊 XGroup ---------- */
.group-panel { min-width: 0; }
.group-panel-chat {
  position: absolute;
  inset: 0;
  z-index: 7;
  background: var(--bg);
}
.group-list-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 4px 10px;
  color: var(--text-3);
  font-size: var(--fs-caption);
  letter-spacing: .06em;
}
.group-list-title .btn {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  letter-spacing: normal;
}
.group-room {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}
.group-notice {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  font-size: var(--fs-caption);
  color: var(--text-2);
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
  line-height: 1.5;
}
.group-notice .x-icon {
  flex: none;
  opacity: .6;
}
.group-room-scroll {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.group-room-inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 14px 12px 16px;
}
.group-narration {
  text-align: center;
  font-size: var(--fs-caption);
  color: var(--text-3);
  padding: 4px 28px 12px;
  line-height: 1.6;
  font-style: italic;
}
.group-sender {
  font-size: 11px;
  color: var(--text-3);
  margin: 0 0 3px 2px;
}
.group-read-status {
  align-self: flex-end;
  margin: -1px 3px 0 0;
  font-size: 10px;
  line-height: 1.4;
  color: var(--text-3);
}
.group-recalled,
.group-interaction {
  width: fit-content;
  max-width: calc(100% - 40px);
  margin: 3px auto 12px;
  padding: 5px 11px;
  border-radius: var(--r-full);
  background: var(--surface-2);
  color: var(--text-3);
  font-size: 11px;
  line-height: 1.5;
  text-align: center;
  cursor: pointer;
}
.group-interaction {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  color: var(--text-2);
  animation: groupInteractionIn .28s ease;
}
.group-interaction.poke .x-icon { transform: rotate(45deg); }
.group-reveal-note {
  margin: -2px 0 8px;
  padding: 0 16px 0 46px;
  color: var(--text-3);
  font-size: 10px;
  line-height: 1.5;
}
.group-reply-error {
  flex: none;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  max-height: 116px;
  overflow-y: auto;
  padding: 9px 12px;
  border-top: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--text-2);
  font-size: var(--fs-caption);
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}
.group-reply-error > .x-icon { flex: none; margin-top: 2px; }
.group-reply-error > button {
  flex: none;
  display: flex;
  padding: 2px;
  color: var(--text-3);
}
@keyframes groupInteractionIn {
  0% { opacity: 0; transform: translateY(3px) scale(.96); }
  100% { opacity: 1; transform: none; }
}
.group-typing {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--text-3);
  padding: 6px 0 4px 46px;
}
.typing-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--text-3);
  animation: typingBounce 1.2s infinite ease-in-out;
}
.typing-dot:nth-child(2) { animation-delay: .15s; }
.typing-dot:nth-child(3) { animation-delay: .3s; }
@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: .4; }
  30% { transform: translateY(-4px); opacity: 1; }
}
.group-composer-wrap {
  flex: none;
  background: var(--surface);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border-top: 1px solid var(--line);
}
.group-composer {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 10px calc(9px + env(safe-area-inset-bottom, 0px));
}
.group-composer .input {
  flex: 1;
  min-width: 0;
  height: 40px;
  padding: 8px 13px;
  border-radius: var(--r-full);
  background: var(--surface-2);
}
.group-at-btn,
.group-interact-btn {
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--surface-3);
  color: var(--text);
  font-size: 18px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .16s ease;
}
.group-at-btn:active,
.group-interact-btn:active { transform: scale(.92); }
.group-mentions {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 8px 12px 0;
  scrollbar-width: none;
}
.group-mentions::-webkit-scrollbar { display: none; }
.group-mention-chip {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 180px;
  padding: 5px 9px;
  border-radius: var(--r-full);
  background: var(--surface-3);
  color: var(--text-2);
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.group-mention-chip span { flex: none; font-size: 14px; color: var(--text-3); }
.group-interaction-kinds {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 10px;
}
.group-interaction-kinds button {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface-2);
  color: var(--text-2);
}
.group-interaction-kinds button.on {
  border-color: var(--text);
  background: var(--text);
  color: var(--bg);
}
.group-action-list {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--r-lg);
  background: var(--surface-solid);
  box-shadow: var(--shadow-1);
}
@media (prefers-reduced-motion: reduce) {
  .group-interaction,
  .group-room .typing-dot { animation: none; }
}

/* ---------- 线下模式 XOffline ---------- */
.offline-pick-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.offline-pick-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 8px;
  background: var(--surface-solid);
  border-radius: var(--r-lg);
  border: 1.5px solid transparent;
  transition: border-color .18s ease, transform .16s ease;
}
.offline-pick-card:active { transform: scale(.97); }
.offline-pick-card.on {
  border-color: var(--text);
}
.offline-pick-name {
  font-size: var(--fs-body-sm);
  color: var(--text);
  font-weight: 550;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}
.offline-pick-check {
  position: absolute;
  top: 8px;
  right: 8px;
  color: var(--text);
}
.offline-scene-toolbar {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}
.offline-scene-toolbar .btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.offline-scene-manager {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.offline-scene-item {
  overflow: hidden;
  border: 1.5px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface-solid);
  transition: border-color .18s ease;
}
.offline-scene-item.on { border-color: var(--text); }
.offline-scene-select {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  padding: 12px 12px 8px;
  text-align: left;
}
.offline-scene-title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: var(--text);
  font-size: var(--fs-body-sm);
}
.offline-scene-title strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.offline-scene-desc {
  color: var(--text-3);
  font-size: var(--fs-caption);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.offline-source-tag {
  flex: none;
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: var(--r-full);
  background: var(--surface-3);
  color: var(--text-2);
  font-size: 10px;
  font-weight: 500;
  line-height: 1.4;
}
.offline-scene-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 0 10px 9px;
}
.offline-scene-actions button {
  padding: 4px 9px;
  border-radius: var(--r-full);
  background: var(--surface-2);
  color: var(--text-2);
  font-size: var(--fs-caption);
}
.offline-scene-actions button.danger { color: #8f3a3a; }
.offline-scene-empty {
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-lg);
}
.offline-scene-intro {
  margin-top: 10px;
  font-size: var(--fs-body-sm);
  line-height: 1.7;
  color: var(--text-2);
  padding: 12px 14px;
  background: var(--surface-2);
  border-radius: var(--r-md);
}
.offline-room {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}
.offline-scroll {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.offline-inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 16px 12px 16px;
}
.offline-narration {
  text-align: center;
  font-size: var(--fs-caption);
  color: var(--text-3);
  padding: 6px 24px 14px;
  line-height: 1.65;
  font-style: italic;
}
.offline-sender {
  font-size: 11px;
  color: var(--text-3);
  margin: 0 0 3px 2px;
}
.offline-composer {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px calc(9px + env(safe-area-inset-bottom, 0px));
  background: var(--surface);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border-top: 1px solid var(--line);
}
.offline-composer .input {
  flex: 1;
  min-width: 0;
  height: 40px;
  padding: 8px 13px;
  border-radius: var(--r-full);
  background: var(--surface-2);
}
.offline-scene-list {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--r-lg);
  background: var(--surface-solid);
  box-shadow: var(--shadow-1);
}
.offline-form-error {
  margin: 10px 0;
  padding: 10px 12px;
  border: 1px solid rgba(143, 58, 58, .25);
  border-radius: var(--r-md);
  background: rgba(143, 58, 58, .07);
  color: #8f3a3a;
  font-size: var(--fs-caption);
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}
.offline-ambient-input { min-height: 120px; }
.offline-ambient-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  color: var(--text);
}
.offline-ambient-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
}
.offline-ambient-list p {
  padding: 11px 13px;
  border-radius: var(--r-md);
  background: var(--surface-2);
  color: var(--text-2);
  font-size: var(--fs-body-sm);
  line-height: 1.65;
}

@media (min-width: 620px) {
  .offline-pick-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ========== 查手机 XSpy · iOS 黑白灰 ========== */
.spy-app .x-avatar { border-radius: 13px; }
.spy-app .empty.small { padding: 28px 16px; gap: 6px; font-size: var(--fs-caption); }

/* ---------- 首页：角色大卡片 ---------- */
.spy-home-head { padding: 18px 16px 4px; }
.spy-home-title { font-size: var(--fs-h3); font-weight: 650; letter-spacing: -.01em; color: var(--text); }
.spy-home-sub { margin-top: 4px; font-size: var(--fs-caption); color: var(--text-3); }
.spy-cards { display: flex; flex-direction: column; gap: 12px; padding: 12px 16px 8px; }
.spy-card {
  display: flex; align-items: center; gap: 14px; width: 100%;
  padding: 14px; text-align: left;
  background: var(--surface-solid); border-radius: var(--r-lg);
  box-shadow: var(--shadow-1);
  transition: transform .16s ease, box-shadow .16s ease;
}
.spy-card:active { transform: scale(.98); box-shadow: 0 1px 2px rgba(0, 0, 0, .05); }
.spy-card-main { flex: 1; min-width: 0; display: block; }
.spy-card-name {
  display: block; font-size: var(--fs-body); font-weight: 620; color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.spy-card-last {
  display: block; margin-top: 5px;
  font-size: var(--fs-caption); color: var(--text-3); line-height: 1.5;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.spy-card-side {
  flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 8px;
  color: var(--text-3);
}
.spy-card-time { font-size: 11px; color: var(--text-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.spy-home-tip { padding: 6px 18px 24px; }

/* ---------- 手机：来源与重新生成 ---------- */
.spy-phone { padding: 12px 16px 28px; }
.spy-banner {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; margin-bottom: 12px;
  border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--surface-2);
}
.spy-banner.local { background: transparent; border-style: dashed; border-color: var(--line-strong); }
.spy-banner-main { flex: 1; min-width: 0; display: block; }
.spy-banner-main b { display: block; font-size: var(--fs-body-sm); font-weight: 620; color: var(--text); }
.spy-banner-main small { display: block; margin-top: 3px; font-size: 11px; line-height: 1.5; color: var(--text-3); }
.spy-regen {
  flex: none; display: inline-flex; align-items: center; gap: 4px;
  height: 32px; padding: 0 12px; border-radius: var(--r-full);
  background: var(--text); color: var(--bg);
  font-size: var(--fs-caption); font-weight: 550;
  transition: opacity .18s ease, transform .16s ease;
}
.spy-regen:active { transform: scale(.95); }
.spy-regen:disabled { opacity: .45; }
.spy-banner.local .spy-regen {
  background: var(--surface-solid); color: var(--text);
  border: 1px solid var(--line-strong);
}

/* ---------- 手机：tab ---------- */
.spy-tabs {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px;
  padding: 4px; margin-bottom: 12px;
  background: var(--surface-3); border-radius: var(--r-full);
}
.spy-tabs button {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 8px 2px; border-radius: var(--r-full);
  font-size: 11px; color: var(--text-2);
  transition: background .18s ease, color .18s ease;
}
.spy-tabs button.on {
  background: var(--surface-solid); color: var(--text); font-weight: 600;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .06);
}

.spy-panel {
  background: var(--surface-solid);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-1);
  overflow: hidden;
}

/* ---------- 微信聊天列表 ---------- */
.spy-contact-row {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 12px 14px; text-align: left;
  background: var(--surface-solid);
  border-bottom: 1px solid var(--line);
  transition: background .16s ease;
}
.spy-contact-row:last-child { border-bottom: none; }
.spy-contact-row:active { background: var(--surface-2); }
.spy-contact-main { flex: 1; min-width: 0; display: block; }
.spy-contact-top { display: flex; align-items: baseline; gap: 8px; }
.spy-contact-top b {
  flex: 1; min-width: 0; font-size: var(--fs-body-sm); font-weight: 600; color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.spy-contact-top small { flex: none; font-size: 11px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.spy-contact-last {
  display: block; margin-top: 3px;
  font-size: var(--fs-caption); color: var(--text-3);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.spy-tag {
  flex: none; font-size: 10px; line-height: 1;
  padding: 4px 7px; border-radius: var(--r-full);
  background: var(--text); color: var(--bg);
}

/* ---------- 聊天气泡 ---------- */
.spy-thread-head {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px 8px 4px;
  border-bottom: 1px solid var(--line);
}
.spy-thread-title { flex: 1; min-width: 0; display: block; }
.spy-thread-title b {
  display: block; font-size: var(--fs-body-sm); font-weight: 620;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.spy-thread-title small { display: block; margin-top: 1px; font-size: 10px; color: var(--text-3); }
.spy-thread-body { padding: 14px 12px 8px; }
.spy-thread-body .msg-col { max-width: 70%; }
.spy-thread-note {
  text-align: center; font-size: 10px; color: var(--text-3);
  padding: 12px 0 6px;
}

/* ---------- 相册 ---------- */
.spy-album-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; padding: 12px; }
.spy-album {
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
  padding: 14px 12px; text-align: left;
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--r-md);
  transition: transform .16s ease, background .16s ease;
}
.spy-album:active { transform: scale(.97); background: var(--surface-3); }
.spy-album-emoji { font-size: 30px; line-height: 1.1; }
.spy-album-title {
  font-size: var(--fs-body-sm); font-weight: 600; color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%;
}
.spy-album-desc {
  font-size: 11px; line-height: 1.5; color: var(--text-3);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.spy-album-time { font-size: 10px; color: var(--text-3); font-variant-numeric: tabular-nums; }

/* ---------- 通话记录 / 备忘录 ---------- */
.spy-row {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 12px 14px; text-align: left;
  border-bottom: 1px solid var(--line);
  background: var(--surface-solid);
  transition: background .16s ease;
}
.spy-row:last-child { border-bottom: none; }
.spy-row:active { background: var(--surface-2); }
.spy-row-ic {
  flex: none; width: 34px; height: 34px; border-radius: 10px;
  background: var(--surface-3); color: var(--text-2);
  display: flex; align-items: center; justify-content: center;
}
.spy-row-main { flex: 1; min-width: 0; display: block; }
.spy-row-title { display: flex; align-items: baseline; gap: 8px; font-size: var(--fs-body-sm); font-weight: 600; color: var(--text); }
.spy-row-title small { font-size: 10px; font-weight: 400; color: var(--text-3); }
.spy-row-sub {
  display: block; margin-top: 3px;
  font-size: var(--fs-caption); color: var(--text-3);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.spy-row-time { flex: none; font-size: 11px; color: var(--text-3); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- 加载 ---------- */
.spy-loading {
  display: flex; align-items: center; gap: 10px;
  padding: 20px 16px; font-size: var(--fs-caption); color: var(--text-3);
}
.spy-spinner {
  width: 14px; height: 14px; flex: none; border-radius: 50%;
  border: 2px solid var(--line-strong); border-top-color: var(--text-2);
  animation: spySpin .8s linear infinite;
}
@keyframes spySpin { to { transform: rotate(360deg); } }

/* ---------- 详情抽屉 ---------- */
.spy-detail-emoji { font-size: 64px; line-height: 1.2; text-align: center; padding: 6px 0 14px; }
.spy-detail-title { font-size: var(--fs-h3); font-weight: 650; color: var(--text); margin-bottom: 8px; }
.spy-detail-text { font-size: var(--fs-body-sm); line-height: 1.7; color: var(--text-2); white-space: pre-wrap; }
.spy-detail-meta { margin-top: 12px; font-size: 11px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.spy-detail-rows { border-top: 1px solid var(--line); margin-top: 4px; }
.spy-detail-row {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 11px 0; border-bottom: 1px solid var(--line);
  font-size: var(--fs-body-sm);
}
.spy-detail-row .k { flex: none; width: 58px; font-size: var(--fs-caption); color: var(--text-3); }
.spy-detail-row .v { flex: 1; min-width: 0; color: var(--text); word-break: break-all; }

/* ===== life2.css ===== */
/* 小手机 · life2.css
 * 实景拍照 / QQ农场 / 捡手机 三个组件的样式。
 * iOS 黑白灰基调，复用 base.css 的 design tokens。
 */

/* ============================== 实景拍照 ============================== */
.cam-wrap {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cam-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: #000;
  box-shadow: var(--shadow-1);
}
.cam-stage.flash::after {
  content: '';
  position: absolute;
  inset: 0;
  background: #fff;
  animation: camFlash .18s ease-out;
  z-index: 5;
}
@keyframes camFlash {
  from { opacity: .85; }
  to { opacity: 0; }
}
.cam-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: #000;
}
.cam-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--text-3);
  background: var(--surface-2);
  text-align: center;
  padding: 20px;
}
.cam-placeholder .x-icon { opacity: .4; }
.cam-placeholder-text { font-size: var(--fs-body-sm); max-width: 240px; line-height: 1.5; }

.cam-filter-bar {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 10px;
  background: linear-gradient(to top, rgba(0,0,0,.55), transparent);
  z-index: 3;
}
.cam-filter-chip {
  padding: 6px 12px;
  border-radius: var(--r-full);
  background: rgba(255,255,255,.18);
  color: #fff;
  font-size: var(--fs-caption);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background .18s ease, transform .18s ease;
}
.cam-filter-chip.on { background: #fff; color: #111; }
.cam-filter-chip:active { transform: scale(.94); }

.cam-controls {
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 4px 0;
}
.cam-side-btn {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--surface-3);
  color: var(--text);
  display: inline-flex; align-items: center; justify-content: center;
  transition: transform .18s ease, background .18s ease;
}
.cam-side-btn:active { transform: scale(.92); background: var(--surface-2); }
.cam-shutter {
  width: 68px; height: 68px;
  border-radius: 50%;
  background: var(--text);
  border: 4px solid var(--surface-3);
  box-shadow: 0 0 0 2px var(--text);
  transition: transform .18s ease, opacity .18s ease;
}
.cam-shutter:active { transform: scale(.92); }
.cam-shutter:disabled { opacity: .35; }

.cam-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.cam-photo {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--r-sm);
  overflow: hidden;
  background: var(--surface-2);
}
.cam-photo-btn {
  display: block;
  width: 100%;
  height: 100%;
}
.cam-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cam-photo-meta {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 2px 4px;
  font-size: 10px;
  color: #fff;
  background: rgba(0,0,0,.5);
  text-align: center;
}
.cam-photo-del {
  position: absolute;
  top: 2px; right: 2px;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: rgba(0,0,0,.5);
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
}
.cam-preview {
  width: 100%;
  max-height: 60vh;
  object-fit: contain;
  border-radius: var(--r-md);
  margin-bottom: 12px;
}

/* ============================== QQ农场 ============================== */
.farm-wrap {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.farm-gold {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: var(--fs-body-sm);
  font-weight: 600;
  padding: 4px 12px;
  border-radius: var(--r-full);
  background: var(--surface-3);
  color: var(--text);
}
.farm-note {
  background: var(--surface-solid);
  border-radius: var(--r-lg);
  padding: 14px;
  box-shadow: var(--shadow-1);
}
.farm-note b { font-size: var(--fs-body-sm); }
.farm-note p { font-size: var(--fs-caption); color: var(--text-3); margin-top: 4px; line-height: 1.5; }

.farm-seeds {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.farm-seed {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 10px 4px;
  border-radius: var(--r-md);
  background: var(--surface-solid);
  border: 1px solid var(--line);
  font-size: var(--fs-caption);
  color: var(--text-2);
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}
.farm-seed small { color: var(--text-3); font-size: 11px; }
.farm-seed-emoji { font-size: 22px; line-height: 1; }
.farm-seed.on {
  border-color: var(--text);
  background: var(--accent-soft);
  color: var(--text);
}
.farm-seed:active { transform: scale(.96); }

.farm-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.farm-plot {
  background: var(--surface-solid);
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: var(--shadow-1);
  display: flex;
  flex-direction: column;
}
.farm-plot.empty { background: var(--surface-2); }
.farm-plot-inner {
  position: relative;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #b08d57 0%, #8a6a3d 100%);
}
.farm-plot.empty .farm-plot-inner { background: var(--surface-2); }
.farm-crop { font-size: 34px; line-height: 1; }
.farm-empty-hint { font-size: var(--fs-caption); color: var(--text-3); }
.farm-progress {
  position: absolute;
  left: 8px; right: 8px; bottom: 8px;
  height: 4px;
  border-radius: 2px;
  background: rgba(255,255,255,.3);
  overflow: hidden;
}
.farm-progress i {
  display: block;
  height: 100%;
  background: var(--text);
  transition: width .3s ease;
}
.farm-mature-tag {
  position: absolute;
  top: 6px; left: 6px;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: var(--r-full);
  background: var(--text);
  color: var(--bg);
}
.farm-remain {
  position: absolute;
  top: 6px; right: 6px;
  font-size: 10px;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,.5);
}
.farm-plot-actions {
  padding: 6px;
  display: flex;
  justify-content: center;
}

.farm-neighbors-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
}
.farm-neighbors {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.farm-neighbor {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px;
  background: var(--surface-solid);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-1);
}
.farm-neighbor.mature { border-left: 3px solid var(--text); }
.farm-neighbor.stolen { opacity: .5; }
.farm-neighbor-main { display: flex; flex-direction: column; gap: 2px; }
.farm-neighbor-main b { font-size: var(--fs-body-sm); }
.farm-neighbor-main small { font-size: var(--fs-caption); color: var(--text-3); }

/* ============================== 捡手机 ============================== */
.phone-wrap {
  display: flex;
  flex-direction: column;
  padding: 12px;
  gap: 12px;
}
.phone-tabs {
  margin: 0 -12px;
  padding: 0 12px;
}
.phone-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* 锁屏 */
.phone-lock {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 28px 24px 24px;
  gap: 10px;
}
.phone-lock-time {
  font-size: 64px;
  font-weight: 200;
  letter-spacing: -.02em;
  color: var(--text);
  line-height: 1;
}
.phone-lock-date {
  font-size: var(--fs-body-sm);
  color: var(--text-2);
}
.phone-lock-avatar {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: var(--surface-3);
  color: var(--text-2);
  display: flex; align-items: center; justify-content: center;
  margin: 12px 0 4px;
}
.phone-lock-hint {
  font-size: var(--fs-caption);
  color: var(--text-3);
}
.phone-dots {
  display: flex;
  gap: 16px;
  margin: 8px 0 4px;
}
.phone-dots span {
  width: 14px; height: 14px;
  border-radius: 50%;
  border: 1.5px solid var(--line-strong);
  transition: background .18s ease, border-color .18s ease;
}
.phone-dots span.on {
  background: var(--text);
  border-color: var(--text);
}
.phone-pwd-err {
  font-size: var(--fs-caption);
  color: #8a3a3a;
  min-height: 16px;
}
.phone-keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  width: 100%;
  max-width: 300px;
  margin-top: 8px;
}
.phone-key {
  height: 56px;
  border-radius: 50%;
  background: var(--surface-3);
  color: var(--text);
  font-size: var(--fs-h3);
  font-weight: 400;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .18s ease, transform .18s ease;
}
.phone-key:active { background: var(--surface-2); transform: scale(.94); }

/* 短信会话 */
.phone-thread-list { display: flex; flex-direction: column; gap: 8px; }
.phone-thread { display: flex; flex-direction: column; }
.phone-thread-title {
  font-size: var(--fs-body);
  font-weight: 600;
  text-align: center;
  margin-bottom: 8px;
}
.phone-msg-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  background: var(--surface-2);
  border-radius: var(--r-lg);
  min-height: 200px;
}
.phone-msg { display: flex; }
.phone-msg.other { justify-content: flex-start; }
.phone-bubble {
  max-width: 78%;
  padding: 10px 14px;
  border-radius: 18px;
  background: var(--surface-solid);
  color: var(--text);
  font-size: var(--fs-body-sm);
  line-height: 1.5;
  box-shadow: var(--shadow-1);
}

/* 相册 */
.phone-album {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.phone-album-tile {
  aspect-ratio: 1;
  border-radius: var(--r-md);
  background: var(--surface-solid);
  box-shadow: var(--shadow-1);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px;
  text-align: center;
}
.phone-album-emoji { font-size: 40px; line-height: 1; }
.phone-album-desc { font-size: var(--fs-caption); color: var(--text-2); line-height: 1.4; }

/* 通话记录 */
.phone-call-list { display: flex; flex-direction: column; gap: 8px; }
.phone-call-list .title.missed { color: #8a3a3a; }

/* 画像 */
.phone-profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.phone-profile-avatar { margin-bottom: 6px; }
.phone-profile-row {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  background: var(--surface-solid);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-1);
  font-size: var(--fs-body-sm);
}
.phone-profile-row span { color: var(--text-3); }
.phone-profile-row b { color: var(--text); font-weight: 600; }
.phone-secret {
  width: 100%;
  background: var(--surface-solid);
  border-radius: var(--r-lg);
  padding: 14px;
  box-shadow: var(--shadow-1);
  text-align: center;
}
.phone-secret-hide { color: var(--text-3); font-size: var(--fs-caption); margin-bottom: 10px; }
.phone-secret-text {
  color: var(--text);
  font-size: var(--fs-body-sm);
  line-height: 1.7;
  text-align: left;
  padding: 12px;
  background: var(--surface-2);
  border-radius: var(--r-md);
  margin-bottom: 10px;
}

.phone-clue-list {
  margin: 0;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: var(--fs-body-sm);
  color: var(--text);
  line-height: 1.6;
}

/* ============================== 一起读书（聊天内浮层） ============================== */
.reading-overlay {
  position: absolute;
  inset: 0;
  z-index: 55;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
}
.reading-library {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 16px 16px calc(28px + env(safe-area-inset-bottom, 0px));
}
.reading-intro {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: linear-gradient(135deg, var(--surface-solid), var(--surface-2));
  box-shadow: var(--shadow-1);
}
.reading-intro-mark {
  width: 50px;
  height: 58px;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px 14px 14px 8px;
  background: var(--text);
  color: var(--bg);
  box-shadow: 5px 5px 0 var(--surface-3);
}
.reading-intro b { display: block; font-size: var(--fs-body); line-height: var(--lh-sub); }
.reading-intro p { margin-top: 5px; color: var(--text-2); font-size: var(--fs-caption); line-height: 1.6; }
.reading-login-hint {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: var(--r-md);
  background: var(--surface-3);
  color: var(--text-2);
  font-size: var(--fs-caption);
  line-height: 1.6;
}
.reading-library > .hint { margin-top: 12px; }
.reading-library-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 24px 2px 12px;
}
.reading-library-head > div { display: flex; align-items: baseline; gap: 8px; }
.reading-library-head span { font-size: var(--fs-body); font-weight: 650; }
.reading-library-head small { color: var(--text-3); }
.reading-importing { margin: -4px 2px 12px; }
.reading-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 34px 20px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-lg);
  background: var(--surface-2);
  text-align: center;
}
.reading-empty-book {
  width: 94px;
  height: 116px;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 10px 18px 18px 10px;
  background: var(--surface-solid);
  color: var(--text-2);
  box-shadow: 7px 7px 0 var(--surface-3), var(--shadow-1);
  transition: transform .18s ease;
}
.reading-empty-book:active { transform: translateY(2px); }
.reading-empty-book span { font-size: var(--fs-caption); }
.reading-empty > b { font-size: var(--fs-body); }
.reading-empty > p { margin: 8px 0 18px; color: var(--text-3); font-size: var(--fs-caption); line-height: 1.8; }
.reading-book-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.reading-book-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface-solid);
  box-shadow: var(--shadow-1);
  transition: transform .18s ease, border-color .18s ease;
}
.reading-book-card:active { transform: scale(.985); }
.reading-book-open {
  width: 100%;
  min-height: 132px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 14px;
  text-align: left;
}
.reading-book-cover {
  width: 58px;
  height: 82px;
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 6px 11px 11px 6px;
  background: var(--surface-3);
  color: var(--text-2);
  box-shadow: 4px 4px 0 var(--accent-soft);
}
.reading-book-cover small { color: inherit; font-size: 9px; letter-spacing: .16em; }
.reading-book-main { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.reading-book-main > b {
  padding-right: 20px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: var(--fs-body-sm);
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.reading-book-main > small { margin-top: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reading-book-progress {
  height: 4px;
  margin-top: 15px;
  overflow: hidden;
  border-radius: var(--r-full);
  background: var(--surface-3);
}
.reading-book-progress i { display: block; height: 100%; border-radius: inherit; background: var(--text); }
.reading-book-meta { display: flex; justify-content: space-between; gap: 8px; margin-top: 6px; color: var(--text-3); font-size: 11px; }
.reading-book-delete { position: absolute; top: 7px; right: 6px; color: var(--text-3); }
.reading-storage-note { margin: 18px 8px 0; color: var(--text-3); font-size: var(--fs-caption); line-height: 1.7; text-align: center; }

.reading-reader-page .page-body { overflow: hidden; }
.reading-reader {
  width: 100%;
  height: 100%;
  min-height: 0;
  max-width: 820px;
  margin: 0 auto;
  padding: 12px 14px calc(12px + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.reading-partner {
  flex: none;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface-solid);
  box-shadow: var(--shadow-1);
}
.reading-partner-placeholder {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--surface-3);
  color: var(--text-3);
}
.reading-partner-main { min-width: 0; }
.reading-partner-main label { display: block; color: var(--text-3); font-size: 10px; line-height: 1.2; }
.reading-partner-main select {
  width: 100%;
  margin-top: 2px;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: var(--fs-body-sm);
  font-weight: 600;
}
.reading-invite-btn { white-space: nowrap; }
.reading-invite-status {
  grid-column: 2 / -1;
  color: var(--text-3);
  font-size: 11px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.reading-invite-status.warn { color: #8a5a2b; }
.reading-progressline {
  flex: none;
  padding: 0 4px;
}
.reading-progressline > div { display: flex; align-items: center; justify-content: space-between; color: var(--text-3); font-size: 11px; }
.reading-progressline b { color: var(--text-2); font-weight: 600; }
.reading-progressline input {
  width: 100%;
  height: 16px;
  margin: 2px 0 0;
  display: block;
  accent-color: var(--text);
  cursor: pointer;
}
.reading-paper {
  flex: 1;
  min-height: 120px;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 22px clamp(18px, 5vw, 40px);
  border: 1px solid var(--line);
  border-radius: 8px 20px 20px 8px;
  background: var(--surface-solid);
  box-shadow: 5px 5px 0 var(--surface-3), var(--shadow-1);
}
.reading-paper-head { display: flex; align-items: center; gap: 12px; color: var(--text-3); font-size: 10px; letter-spacing: .08em; }
.reading-paper-head span { max-width: 65%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reading-paper-head i { height: 1px; flex: 1; background: var(--line); }
.reading-paper h3 { margin: 18px 0 16px; font-size: var(--fs-h3); line-height: 1.45; overflow-wrap: anywhere; }
.reading-page-text {
  color: var(--text);
  font-family: "Songti SC", "STSong", "Noto Serif CJK SC", Georgia, serif;
  font-size: var(--fs-body);
  line-height: 1.9;
  letter-spacing: .025em;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.reading-paper-foot {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 30px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--text-3);
  font-size: 10px;
}
.reading-paper-foot span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reading-paper-foot span:last-child { flex: none; }
.reading-navigation { flex: none; display: flex; flex-direction: column; gap: 8px; }
.reading-chapter-select {
  width: 100%;
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  outline: none;
  background: var(--surface-2);
  color: var(--text-2);
  font-size: var(--fs-caption);
}
.reading-page-buttons { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.reading-page-buttons .btn { min-width: 100px; }
.reading-page-buttons > span { color: var(--text-3); font-size: var(--fs-caption); white-space: nowrap; }
.reading-discuss-button {
  min-height: 46px;
  flex: none;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 15px;
  border-radius: var(--r-full);
  background: var(--text);
  color: var(--bg);
  font-size: var(--fs-body-sm);
  font-weight: 600;
  box-shadow: var(--shadow-1);
  transition: transform .18s ease, opacity .18s ease;
}
.reading-discuss-button:active { transform: scale(.985); }
.reading-discuss-button:disabled { opacity: .4; }
.reading-discuss-button small { margin-left: auto; color: inherit; opacity: .65; font-weight: 400; }

.reading-discussion { display: flex; flex-direction: column; gap: 12px; }
.reading-quote {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface-2);
}
.reading-quote > div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.reading-quote b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--fs-caption); }
.reading-quote span { flex: none; color: var(--text-3); font-size: 11px; }
.reading-quote p {
  max-height: 160px;
  overflow-y: auto;
  padding: 12px;
  color: var(--text-2);
  font-family: "Songti SC", "STSong", Georgia, serif;
  font-size: var(--fs-caption);
  line-height: 1.75;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.reading-discussion-input { min-height: 88px; }
.reading-discussion-tip { margin-top: -6px; text-align: center; }
.reading-notes-head { display: flex; align-items: baseline; justify-content: space-between; margin-top: 8px; padding: 0 2px; }
.reading-notes-head span { font-size: var(--fs-body); font-weight: 650; }
.reading-notes-empty { padding: 24px 12px; color: var(--text-3); font-size: var(--fs-caption); text-align: center; }
.reading-note-card { padding: 14px; border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--line); }
.reading-note-card header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.reading-note-card header b { font-size: var(--fs-body-sm); }
.reading-note-card header span { color: var(--text-3); font-size: 10px; text-align: right; }
.reading-note-question { margin-top: 10px; color: var(--text-2); font-size: var(--fs-caption); line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.reading-note-reply { margin-top: 8px; font-size: var(--fs-body-sm); line-height: 1.75; white-space: pre-wrap; overflow-wrap: anywhere; }
.reading-note-locate { margin-top: 10px; color: var(--text-3); font-size: 11px; text-align: left; text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 560px) {
  .reading-book-grid { grid-template-columns: 1fr; }
  .reading-book-open { min-height: 118px; }
}
@media (max-width: 380px) {
  .reading-library { padding-left: 12px; padding-right: 12px; }
  .reading-intro { padding: 14px; gap: 12px; }
  .reading-intro-mark { width: 42px; height: 52px; }
  .reading-reader { padding-left: 10px; padding-right: 10px; gap: 8px; }
  .reading-partner { padding: 9px; gap: 8px; }
  .reading-invite-btn { padding: 0 9px; }
  .reading-page-buttons .btn { min-width: 88px; padding: 0 10px; }
  .reading-discuss-button small { display: none; }
}
@media (orientation: landscape) and (max-height: 620px) and (min-width: 560px) {
  .reading-reader-page .page-head { height: 48px; }
  .reading-reader {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 248px;
    grid-template-rows: auto auto minmax(0, 1fr) auto;
    gap: 8px 12px;
    max-width: none;
    padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px));
  }
  .reading-paper { grid-column: 1; grid-row: 1 / 5; min-height: 0; padding: 16px 22px; }
  .reading-paper h3 { margin: 10px 0; }
  .reading-paper-foot { margin-top: 18px; }
  .reading-partner {
    grid-column: 2;
    grid-row: 1;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 7px 9px;
    padding: 8px 10px;
  }
  .reading-invite-btn { grid-column: 1 / -1; width: 100%; min-height: 30px; }
  .reading-invite-status { grid-column: 1 / -1; max-height: 32px; overflow-y: auto; }
  .reading-progressline { grid-column: 2; grid-row: 2; }
  .reading-navigation { grid-column: 2; grid-row: 3; align-self: end; }
  .reading-page-buttons { flex-wrap: wrap; justify-content: center; gap: 6px; }
  .reading-page-buttons > span { order: -1; width: 100%; text-align: center; }
  .reading-page-buttons .btn { min-width: 96px; }
  .reading-discuss-button { grid-column: 2; grid-row: 4; min-height: 40px; padding: 0 12px; font-size: var(--fs-caption); }
  .reading-discuss-button small { display: none; }
}

/* ===== themes.css ===== */
/* 小手机 · 主题商店样式（图标包 / 动态壁纸 / 自定义组件）
 * 全部使用黑白灰，不引入彩色。
 */

/* ============================================================
 * 1. 图标包：根据 .xsj-stage.iconpack-xxx 切换桌面图标圆角与线条
 * ============================================================ */

/* 线性（默认）：细描边、柔和高光与克制的层次 */
.xsj-stage.iconpack-linear .app-tile,
.xsj-stage.iconpack-linear .dock .app-tile {
  border-radius: 17px;
}
.xsj-stage.iconpack-linear .desktop-grid .app-tile {
  background:
    radial-gradient(100% 75% at 18% 0%, rgba(255,255,255,.98), transparent 68%),
    linear-gradient(145deg, rgba(252,252,254,.96), rgba(231,232,237,.9));
  border-color: rgba(255,255,255,.86);
  box-shadow: inset 0 0 0 1px rgba(30,30,38,.035), 0 2px 4px rgba(25,25,32,.05), 0 10px 20px rgba(25,25,32,.08);
}
.xsj-stage.iconpack-linear .dock .app-tile {
  background: rgba(255,255,255,.34);
  border-color: rgba(255,255,255,.48);
  box-shadow: inset 0 1px rgba(255,255,255,.46);
}
.xsj-stage.iconpack-linear .app-tile::before {
  content: ""; position: absolute; left: 5px; right: 5px; top: 2px; height: 42%;
  border-radius: 14px 14px 50% 50%;
  background: linear-gradient(180deg, rgba(255,255,255,.5), transparent);
  pointer-events: none;
}
.xsj-stage.iconpack-linear .app-tile .x-icon,
.xsj-stage.iconpack-linear .dock .app-tile .x-icon {
  position: relative; z-index: 1;
  stroke-width: 1.45;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 1px 1px rgba(255,255,255,.32));
}
.xsj-root.theme-ink .xsj-stage.iconpack-linear .desktop-grid .app-tile,
.xsj-stage.iconpack-linear .desktop.wp-night .app-tile {
  background:
    radial-gradient(100% 75% at 18% 0%, rgba(255,255,255,.1), transparent 68%),
    linear-gradient(145deg, #303036, #202024);
  border-color: rgba(255,255,255,.12);
  color: #f2f2f5;
  box-shadow: inset 0 1px rgba(255,255,255,.05), 0 10px 22px rgba(0,0,0,.28);
}
.xsj-root.theme-ink .xsj-stage.iconpack-linear .dock .app-tile,
.xsj-stage.iconpack-linear .desktop.wp-night .dock .app-tile {
  background: rgba(255,255,255,.055);
  border-color: rgba(255,255,255,.09);
}

/* 玻璃：壁纸可透过的半透明材质、模糊与细边框 */
.xsj-stage.iconpack-glass .app-tile,
.xsj-stage.iconpack-glass .dock .app-tile {
  border-radius: 19px;
  background: linear-gradient(135deg, rgba(255,255,255,.5), rgba(255,255,255,.16));
  border: 1px solid rgba(255,255,255,.58);
  color: #29292f;
  box-shadow: inset 0 1px rgba(255,255,255,.52), inset 0 -1px rgba(255,255,255,.08), 0 10px 24px rgba(24,24,32,.13);
  backdrop-filter: saturate(155%) blur(16px);
  -webkit-backdrop-filter: saturate(155%) blur(16px);
  overflow: hidden;
}
.xsj-stage.iconpack-glass .dock .app-tile {
  background: linear-gradient(135deg, rgba(255,255,255,.34), rgba(255,255,255,.1));
  box-shadow: inset 0 1px rgba(255,255,255,.38), 0 5px 14px rgba(24,24,32,.08);
}
.xsj-stage.iconpack-glass .app-tile::before {
  content: ""; position: absolute; inset: 1px 1px auto;
  height: 46%; border-radius: 17px 17px 46% 46%;
  background: linear-gradient(180deg, rgba(255,255,255,.4), transparent);
  pointer-events: none;
}
.xsj-stage.iconpack-glass .app-tile .x-icon,
.xsj-stage.iconpack-glass .dock .app-tile .x-icon {
  position: relative; z-index: 1;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 1px 2px rgba(255,255,255,.4));
}
.xsj-root.theme-ink .xsj-stage.iconpack-glass .app-tile,
.xsj-stage.iconpack-glass .desktop.wp-night .app-tile {
  background: linear-gradient(135deg, rgba(132,132,150,.3), rgba(52,52,64,.18));
  border-color: rgba(255,255,255,.22);
  color: #f4f4f7;
  box-shadow: inset 0 1px rgba(255,255,255,.17), 0 10px 26px rgba(0,0,0,.3);
}
.xsj-root.theme-ink .xsj-stage.iconpack-glass .dock .app-tile,
.xsj-stage.iconpack-glass .desktop.wp-night .dock .app-tile {
  background: linear-gradient(135deg, rgba(255,255,255,.1), rgba(255,255,255,.035));
  border-color: rgba(255,255,255,.13);
}

/* 圆润：更大圆角、更粗线条 */
.xsj-stage.iconpack-rounded .app-tile {
  border-radius: 24px;
}
.xsj-stage.iconpack-rounded .dock .app-tile {
  border-radius: 18px;
}
.xsj-stage.iconpack-rounded .app-tile .x-icon,
.xsj-stage.iconpack-rounded .dock .app-tile .x-icon {
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* 像素：方块、硬边、粗线 */
.xsj-stage.iconpack-pixel .app-tile {
  border-radius: 4px;
}
.xsj-stage.iconpack-pixel .dock .app-tile {
  border-radius: 4px;
}
.xsj-stage.iconpack-pixel .app-tile .x-icon,
.xsj-stage.iconpack-pixel .dock .app-tile .x-icon {
  stroke-width: 2.6;
  stroke-linecap: butt;
  stroke-linejoin: miter;
}
.xsj-stage.iconpack-pixel .app-tile {
  border-width: 2px;
}

/* 手绘：不规则圆角、轻微旋转、笔触略粗 */
.xsj-stage.iconpack-handdrawn .app-tile {
  border-radius: 14px 20px 12px 22px / 20px 12px 22px 14px;
  border-width: 1.5px;
  border-style: solid;
}
.xsj-stage.iconpack-handdrawn .dock .app-tile {
  border-radius: 12px 16px 10px 18px;
}
.xsj-stage.iconpack-handdrawn .app-tile .x-icon,
.xsj-stage.iconpack-handdrawn .dock .app-tile .x-icon {
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.xsj-stage.iconpack-handdrawn .app-item:nth-child(odd) .app-tile {
  transform: rotate(-1.2deg);
}
.xsj-stage.iconpack-handdrawn .app-item:nth-child(even) .app-tile {
  transform: rotate(1.1deg);
}
.xsj-stage.iconpack-handdrawn .app-item:active .app-tile {
  transform: scale(.92) rotate(0);
}

/* 通用：图标预览（商店内） */
.pack-preview {
  display: grid;
  grid-template-columns: repeat(2, 36px);
  gap: 6px;
  padding: 8px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  flex: none;
}
.pack-preview .pp-tile {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: var(--surface-solid);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  box-shadow: var(--shadow-1);
}
.pack-preview.iconpack-linear { background: linear-gradient(145deg, #f2f2f5, #dedfe5); }
.pack-preview.iconpack-linear .pp-tile {
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(255,255,255,.96), rgba(232,233,238,.88));
  border-color: rgba(255,255,255,.9);
  color: #29292f;
  box-shadow: inset 0 0 0 1px rgba(30,30,38,.035), 0 5px 10px rgba(30,30,38,.08);
}
.pack-preview.iconpack-linear .pp-tile .x-icon { stroke-width: 1.45; }
.pack-preview.iconpack-glass {
  background:
    radial-gradient(circle at 18% 12%, rgba(255,255,255,.5), transparent 36%),
    linear-gradient(145deg, #a9aab3, #686973);
  border-color: rgba(255,255,255,.36);
}
.pack-preview.iconpack-glass .pp-tile {
  position: relative;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(255,255,255,.5), rgba(255,255,255,.14));
  border-color: rgba(255,255,255,.58);
  color: #29292f;
  box-shadow: inset 0 1px rgba(255,255,255,.5), 0 5px 12px rgba(20,20,28,.12);
  backdrop-filter: saturate(155%) blur(12px);
  -webkit-backdrop-filter: saturate(155%) blur(12px);
}
.pack-preview.iconpack-glass .pp-tile .x-icon { stroke-width: 1.4; }
.pack-preview.iconpack-rounded .pp-tile { border-radius: 18px; }
.pack-preview.iconpack-rounded .pp-tile .x-icon { stroke-width: 2.4; }
.pack-preview.iconpack-pixel .pp-tile { border-radius: 3px; border-width: 2px; }
.pack-preview.iconpack-pixel .pp-tile .x-icon { stroke-width: 2.6; stroke-linecap: butt; stroke-linejoin: miter; }
.pack-preview.iconpack-handdrawn .pp-tile { border-radius: 10px 16px 8px 18px; border-width: 1.5px; }
.pack-preview.iconpack-handdrawn .pp-tile:nth-child(odd) { transform: rotate(-2deg); }
.pack-preview.iconpack-handdrawn .pp-tile:nth-child(even) { transform: rotate(2deg); }
.pack-preview.iconpack-handdrawn .pp-tile .x-icon { stroke-width: 1.9; }

/* ============================================================
 * 2. 动态壁纸：纯 CSS 动画，直接作用于 .desktop 背景层
 *    （背景层在最底层，所有桌面内容自然绘制在其上）
 * ============================================================ */

/* 渐变流动 */
@keyframes dw-gradient-move {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
.xsj-stage.dw-gradient .desktop {
  background: linear-gradient(120deg,
    #ececf0, #d6d6dc, #bcbcc4, #e6e6ec, #ececf0);
  background-size: 300% 300%;
  animation: dw-gradient-move 14s ease infinite;
}
.xsj-root.theme-ink .xsj-stage.dw-gradient .desktop {
  background: linear-gradient(120deg,
    #17171a, #2a2a32, #3c3c46, #1e1e24, #17171a);
  background-size: 300% 300%;
  animation: dw-gradient-move 14s ease infinite;
}

/* 雨滴（双层不同密度） */
@keyframes dw-rain-fall {
  from { background-position: 0 0, 0 0; }
  to { background-position: 0 60px, 0 90px; }
}
.xsj-stage.dw-rain .desktop {
  background-color: #2f2f35;
  background-image:
    linear-gradient(180deg, rgba(255,255,255,0) 0%, rgba(255,255,255,.5) 50%, rgba(255,255,255,0) 100%),
    linear-gradient(180deg, rgba(255,255,255,0) 0%, rgba(255,255,255,.3) 50%, rgba(255,255,255,0) 100%);
  background-size: 2px 60px, 3px 90px;
  background-repeat: repeat;
  animation: dw-rain-fall 0.9s linear infinite;
}
.xsj-root.theme-ink .xsj-stage.dw-rain .desktop {
  background-color: #0f0f12;
  background-image:
    linear-gradient(180deg, rgba(255,255,255,0) 0%, rgba(210,210,220,.55) 50%, rgba(255,255,255,0) 100%),
    linear-gradient(180deg, rgba(255,255,255,0) 0%, rgba(180,180,195,.3) 50%, rgba(255,255,255,0) 100%);
  background-size: 2px 60px, 3px 90px;
  background-repeat: repeat;
  animation: dw-rain-fall 0.9s linear infinite;
}

/* 粒子 */
@keyframes dw-particles-float {
  from { background-position: 0 0, 40px 60px; }
  to { background-position: 0 -80px, 40px -60px; }
}
.xsj-stage.dw-particles .desktop {
  background-color: #26262c;
  background-image:
    radial-gradient(circle, rgba(255,255,255,.8) 1px, transparent 1.5px),
    radial-gradient(circle, rgba(255,255,255,.45) 1px, transparent 1.5px);
  background-size: 80px 80px, 120px 120px;
  animation: dw-particles-float 12s linear infinite;
}
/* 深色动态壁纸：强制浅色文字，避免深色背景上文字消失 */
.xsj-root.theme-mono .xsj-stage.dw-particles .desktop,
.xsj-root.theme-mono .xsj-stage.dw-rain .desktop {
  --desk-fg: #f4f5f7;
  --desk-fg-soft: rgba(244, 245, 247, .72);
  --dot: rgba(255, 255, 255, .34);
  --dot-active: #ffffff;
  --tile-bg: rgba(255, 255, 255, .14);
  --tile-border: rgba(255, 255, 255, .18);
  --tile-color: #f0f1f3;
  --glass-bg: rgba(20, 20, 24, .42);
  --glass-border: rgba(255, 255, 255, .12);
  --glass-text: #f2f3f5;
  --glass-text-2: rgba(242, 243, 245, .62);
  --dock-bg: rgba(20, 20, 24, .42);
  --dock-border: rgba(255, 255, 255, .12);
}
.xsj-root.theme-ink .xsj-stage.dw-particles .desktop {
  background-color: #0e0e11;
  background-image:
    radial-gradient(circle, rgba(220,220,230,.7) 1px, transparent 1.5px),
    radial-gradient(circle, rgba(180,180,195,.45) 1px, transparent 1.5px);
  background-size: 80px 80px, 120px 120px;
  animation: dw-particles-float 12s linear infinite;
}

/* 预览用的小舞台 */
.dw-preview {
  width: 84px;
  height: 64px;
  border-radius: var(--r-md);
  background: var(--surface-2);
  border: 1px solid var(--line);
  overflow: hidden;
  position: relative;
  flex: none;
}
.dp-off {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-3);
  font-size: var(--fs-caption);
  font-weight: 600;
}
.dp-stage {
  position: absolute;
  inset: 0;
}
.preview-dw.dw-gradient {
  background: linear-gradient(120deg, #e8e8ec, #c8c8d0, #e0e0e6, #ececf0, #e8e8ec);
  background-size: 300% 300%;
  animation: dw-gradient-move 14s ease infinite;
}
.preview-dw.dw-rain {
  background-color: #3a3a40;
  background-image:
    linear-gradient(180deg, rgba(255,255,255,0) 0%, rgba(255,255,255,.5) 50%, rgba(255,255,255,0) 100%);
  background-size: 2px 40px;
  animation: dw-rain-fall 0.9s linear infinite;
}
.preview-dw.dw-particles {
  background-color: #2c2c32;
  background-image:
    radial-gradient(circle, rgba(255,255,255,.8) 1px, transparent 1.5px),
    radial-gradient(circle, rgba(255,255,255,.5) 1px, transparent 1.5px);
  background-size: 40px 40px, 60px 60px;
  animation: dw-particles-float 8s linear infinite;
}

/* ============================================================
 * 3. 自定义桌面组件
 * ============================================================ */
.w-custom {
  grid-column: span 2;
  grid-row: span 2;
  background: var(--surface-solid);
  box-shadow: 0 8px 24px rgba(0,0,0,.1);
  display: flex;
  flex-direction: column;
  padding: 10px;
  gap: 6px;
}
.cu-photo {
  flex: 1;
  border-radius: var(--r-md);
  background-size: cover;
  background-position: center;
  background-color: var(--surface-3);
  position: relative;
  min-height: 80px;
}
.cu-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(0,0,0,.35);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .2s ease;
}
.cu-photo:hover .cu-arrow,
.cu-photo:active .cu-arrow { opacity: 1; }
.cu-arrow.left { left: 4px; }
.cu-arrow.right { right: 4px; }
.cu-arrow.right .x-icon { transform: rotate(180deg); }
.cu-cap {
  font-size: var(--fs-caption);
  color: var(--text-2);
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cu-dots {
  display: flex;
  justify-content: center;
  gap: 4px;
}
.cu-dots i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--text-3);
  opacity: .4;
}
.cu-dots i.on { opacity: 1; background: var(--text); }
.cu-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--text-3);
  font-size: var(--fs-caption);
}

/* ============================================================
 * 4. 主题商店界面布局
 * ============================================================ */
.tabs {
  display: flex;
  gap: 4px;
  padding: 8px 12px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  flex: none;
}
.tabs button {
  flex: 1;
  padding: 8px 0;
  font-size: var(--fs-body-sm);
  color: var(--text-2);
  border-radius: var(--r-sm);
  font-weight: 550;
  transition: background .18s ease, color .18s ease;
}
.tabs button.active {
  background: var(--text);
  color: var(--bg);
}

.pack-list,
.dw-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pack-card,
.dw-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--surface-solid);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-1);
  border: 2px solid transparent;
  transition: border-color .18s ease;
}
.pack-card.active,
.dw-card.active {
  border-color: var(--text);
}
.pack-info,
.dw-info {
  flex: 1;
  min-width: 0;
}
.pack-name,
.dw-name {
  font-size: var(--fs-body-sm);
  font-weight: 600;
}
.pack-desc,
.dw-desc {
  font-size: var(--fs-caption);
  color: var(--text-3);
  margin-top: 2px;
}

.custom-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.custom-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  background: var(--surface-solid);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-1);
}
.ci-thumb {
  width: 56px;
  height: 56px;
  border-radius: var(--r-md);
  background-size: cover;
  background-position: center;
  background-color: var(--surface-3);
  flex: none;
}
.ci-body {
  flex: 1;
  min-width: 0;
}
.ci-cap {
  padding: 8px 10px;
  font-size: var(--fs-body-sm);
}
.ci-meta {
  font-size: 10px;
  color: var(--text-3);
  margin-top: 4px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
}

/* ===== call.css ===== */
/* 小手机 · 语音通话遮罩 */
.call-overlay {
  position: fixed;
  inset: 0;
  z-index: 110;
  display: flex;
  justify-content: center;
  background: #0a0a0c;
  color: #f6f6f8;
}
.call-screen {
  position: relative;
  width: 100%;
  max-width: 760px;
  height: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  isolation: isolate;
}
.call-bg {
  position: absolute;
  inset: -48px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.call-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(28px) saturate(.7) brightness(.62);
  transform: scale(1.24);
}
.call-bg-letter {
  font-size: 40vmin;
  line-height: 1;
  font-weight: 700;
  color: rgba(255, 255, 255, .14);
  user-select: none;
}
.call-scrim {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 30%, rgba(22, 22, 26, .18) 0%, rgba(12, 12, 14, .66) 56%, rgba(4, 4, 6, .94) 100%);
}
.call-content {
  position: relative;
  z-index: 2;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: calc(24px + env(safe-area-inset-top, 0px)) 24px calc(24px + env(safe-area-inset-bottom, 0px));
  overflow-y: auto;
  overscroll-behavior: contain;
}
.call-top {
  flex: none;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .08);
  font-size: 11px;
  letter-spacing: .12em;
  color: rgba(255, 255, 255, .62);
}
.call-top-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .72);
}
.call-main {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding-bottom: 6px;
}
.call-avatar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}
.call-avatar .x-avatar {
  font-size: 48px;
  color: rgba(255, 255, 255, .86);
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .22);
  box-shadow: 0 18px 60px rgba(0, 0, 0, .45);
}
.call-avatar.ringing {
  animation: call-breathe 2.6s ease-in-out infinite;
}
.call-avatar.ringing::after {
  content: '';
  position: absolute;
  inset: -14px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .26);
  animation: call-ring 2s ease-out infinite;
}
.call-name {
  max-width: 86vw;
  font-size: 26px;
  font-weight: 600;
  letter-spacing: .01em;
  line-height: 1.3;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.call-status {
  min-height: 22px;
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: .04em;
  color: rgba(255, 255, 255, .68);
}
.call-status.timer {
  font-size: 17px;
  font-variant-numeric: tabular-nums;
  letter-spacing: .08em;
  color: rgba(255, 255, 255, .88);
}
.call-note {
  min-height: 16px;
  font-size: 11px;
  letter-spacing: .04em;
  color: rgba(255, 255, 255, .46);
}
.call-captions {
  flex: none;
  width: 100%;
  max-width: 420px;
  min-height: 72px;
  max-height: 156px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  margin-bottom: 10px;
}
.call-caption {
  max-width: 100%;
  padding: 7px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .09);
  border: 1px solid rgba(255, 255, 255, .07);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-size: 13px;
  line-height: 1.45;
  text-align: center;
  color: rgba(255, 255, 255, .82);
  word-break: break-word;
}
.call-caption:last-child {
  background: rgba(255, 255, 255, .16);
  color: #fff;
}
.call-caption.user {
  background: rgba(112, 142, 180, .2);
  border-color: rgba(150, 180, 215, .16);
}
.call-speaker {
  display: block;
  margin-bottom: 2px;
  font-size: 10px;
  color: rgba(255, 255, 255, .5);
}
.call-error {
  flex: none;
  width: 100%;
  max-width: 420px;
  max-height: 72px;
  overflow-y: auto;
  margin-bottom: 8px;
  padding: 8px 11px;
  border: 1px solid rgba(238, 128, 120, .3);
  border-radius: 10px;
  background: rgba(105, 32, 32, .55);
  color: #ffd8d4;
  font-size: 11px;
  line-height: 1.45;
  text-align: left;
  white-space: pre-wrap;
}
.call-audio {
  flex: none;
  width: 100%;
  max-width: 420px;
  height: 36px;
  margin-bottom: 8px;
  border-radius: 10px;
  opacity: .88;
}
.call-composer {
  flex: none;
  width: 100%;
  max-width: 420px;
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}
.call-input {
  flex: 1;
  min-width: 0;
  height: 42px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 999px;
  outline: none;
  background: rgba(255, 255, 255, .12);
  color: #fff;
  font-size: 13px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.call-input::placeholder { color: rgba(255, 255, 255, .45); }
.call-input:focus { border-color: rgba(255, 255, 255, .35); }
.call-input:disabled { opacity: .55; }
.call-send {
  flex: none;
  min-width: 62px;
  height: 42px;
  padding: 0 15px;
  border: none;
  border-radius: 999px;
  background: rgba(246, 246, 248, .94);
  color: #17171a;
  font-size: 12px;
  cursor: pointer;
}
.call-send:disabled { opacity: .42; cursor: default; }
.call-overlay .sheet { color: var(--text); }
.call-line-enter-active,
.call-line-leave-active {
  transition: opacity .24s ease, transform .24s ease;
}
.call-line-enter-from {
  opacity: 0;
  transform: translateY(8px);
}
.call-line-leave-to {
  opacity: 0;
  transform: translateY(-4px);
}
.call-actions {
  flex: none;
  width: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 34px;
  padding: 6px 0 4px;
}
.call-actions.incoming {
  gap: 62px;
}
.call-btn {
  width: 72px;
  padding: 0;
  border: none;
  background: none;
  color: #f6f6f8;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  letter-spacing: .02em;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.call-btn-ico {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: transform .16s ease, background .2s ease, color .2s ease;
}
.call-btn:active .call-btn-ico {
  transform: scale(.93);
}
.call-btn.active .call-btn-ico {
  background: #f2f2f4;
  color: #17171a;
  border-color: transparent;
}
.call-btn.danger .call-btn-ico {
  background: #bd3b35;
  border-color: transparent;
}
.call-btn.danger:active .call-btn-ico {
  background: #a5312c;
}
.call-btn.accept .call-btn-ico {
  background: #f2f2f4;
  color: #17171a;
  border-color: transparent;
}
.call-btn.decline .call-btn-ico {
  background: rgba(255, 255, 255, .16);
}
.call-svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.call-btn.hang .call-svg {
  transform: rotate(135deg);
}
@keyframes call-breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.025); }
}
@keyframes call-ring {
  0% { opacity: .55; transform: scale(.96); }
  75% { opacity: 0; transform: scale(1.16); }
  100% { opacity: 0; transform: scale(1.16); }
}
@media (max-height: 680px) {
  .call-avatar .x-avatar { width: 104px !important; height: 104px !important; }
  .call-avatar { margin-bottom: 6px; }
  .call-name { font-size: 22px; }
  .call-captions { min-height: 58px; margin-bottom: 8px; }
  .call-btn-ico { width: 56px; height: 56px; }
  .call-btn { width: 66px; }
  .call-actions { gap: 28px; }
}

/* ===== stickers.css ===== */
/* 小手机 · 表情包面板与管理页 */
.sticker-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
}
.sticker-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.sticker-panel-head strong {
  font-size: var(--fs-body-sm);
  font-weight: 620;
}
.sticker-panel-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px;
}
.sticker-panel-tools .chip {
  border: none;
  cursor: pointer;
}
.sticker-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  max-height: 42vh;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 2px 2px 6px;
}
.sticker-grid.board {
  grid-template-columns: repeat(auto-fill, minmax(82px, 1fr));
  max-height: none;
  overflow: visible;
  padding: 0;
}
.sticker-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  min-width: 0;
  padding: 6px 5px 5px;
  border: none;
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--text);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform .14s ease, background .16s ease;
}
.sticker-tile:active {
  transform: scale(.96);
  background: var(--surface-3);
}
.sticker-tile img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  border-radius: 8px;
  background: transparent;
}
.sticker-tile span {
  display: block;
  padding: 0 2px;
  font-size: 10px;
  line-height: 1.35;
  color: var(--text-2);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sticker-tile.board {
  background: var(--surface-solid);
  box-shadow: var(--shadow-1);
}
.sticker-tile .sticker-lock {
  position: absolute;
  top: 5px;
  left: 5px;
  padding: 1px 5px;
  border-radius: 999px;
  background: rgba(20, 20, 22, .56);
  color: #fff;
  font-size: 9px;
  line-height: 1.4;
  letter-spacing: .02em;
}
.sticker-del {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 24px;
  height: 24px;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(20, 20, 22, .66);
  color: #fff;
  cursor: pointer;
}
.sticker-del:active {
  background: #8f3a3a;
}
.sticker-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.sticker-toolbar .btn {
  gap: 6px;
}
.sticker-toolbar .btn.disabled {
  opacity: .5;
  pointer-events: none;
}
.sticker-import-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}
.sticker-import-actions .btn {
  gap: 6px;
}
.sticker-board-app .section {
  padding-bottom: 4px;
}
.sticker-board-app .section + .section {
  padding-top: 8px;
}
.sticker-board-app .hint {
  padding: 8px 4px 0;
}
