/* ============================================================
   AI 小手机 · style.css
   设计规范依据: docs/01-视觉设计文档.md (8pt 栅格 / 五主题 / 390×844 基准)
   主题: nuomi 糯米白 / zhimeng 织梦蓝 / sweetpink 甜粉盐 / coquette / glassy + custom 自定义
   ============================================================ */

/* ---------- Reset ---------- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
/* v179 修复：原来这个 body 规则提前闭合了，后面 10 条声明
   （color / background / user-select / tap-highlight / position:fixed / overflow-x:clip）
   全成了裸声明被解析器丢弃，紧跟的游离 } 还顺带废掉了下一条 html 规则。
   后果：文字回落纯黑、背景透明、整页可被选中、点击闪灰蓝高亮、横向溢出失去硬锁。 */
body {
  font-family: var(--font-default);
  font-size: 15px; line-height: var(--font-line);
  letter-spacing: var(--font-tracking);
  transition: font-family .3s ease, letter-spacing .3s ease;
  color: var(--text-1);
  background: #2b2b30;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  overflow: hidden;
  /* 移动端适配：根级尺寸约束 + 硬性禁止横向溢出（视觉层绝不超视口） */
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  overflow-x: clip;
}
html { width: 100%; height: 100%; overflow: clip; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
/* ---------- 字体切换器（v179.24：6 档 → 8 档，新增龙藏行楷 / 站酷快乐体）---------- */
[data-font="default"] { --font-active: var(--font-default); --font-tracking: 0; }
[data-font="serif"] { --font-active: var(--font-serif); --font-tracking: .02em; }
[data-font="hand"] { --font-active: var(--font-hand); --font-tracking: .01em; }
[data-font="longcang"] { --font-active: var(--font-longcang); --font-tracking: .02em; }
[data-font="kuaile"] { --font-active: var(--font-kuaile); --font-tracking: .01em; }
[data-font="rounded"] { --font-active: var(--font-rounded); --font-tracking: 0; }
[data-font="pixel"] { --font-active: var(--font-pixel); --font-tracking: .04em; }
[data-font="mono"] { --font-active: var(--font-mono-ui); --font-tracking: 0; }
body { font-family: var(--font-active); }
[data-font="pixel"] .btn, [data-font="pixel"] .capsule-btn, [data-font="pixel"] .set-row b,
[data-font="pixel"] .appearance-theme-name b, [data-font="pixel"] .w-card b,
[data-font="pixel"] .folder-card b, [data-font="pixel"] .page-banner { letter-spacing: 1px; }
[data-font="hand"] .set-row b, [data-font="hand"] .appearance-theme-name b,
[data-font="hand"] .w-card b, [data-font="hand"] .folder-card b { font-weight: 700; }
/* v179.24：两个新手写档也补上同样的标题加重（行楷/快乐体笔画细，标题不加重会看不清） */
[data-font="longcang"] .set-row b, [data-font="longcang"] .appearance-theme-name b,
[data-font="longcang"] .w-card b, [data-font="longcang"] .folder-card b { font-weight: 700; }
[data-font="kuaile"] .set-row b, [data-font="kuaile"] .appearance-theme-name b,
[data-font="kuaile"] .w-card b, [data-font="kuaile"] .folder-card b { font-weight: 700; }
img { -webkit-user-drag: none; }
::-webkit-scrollbar { width: 0; height: 0; }
:focus { outline: none; }
[user-selectable], .selectable { user-select: text; }

/* ---------- 设计 Token ---------- */
:root {
  --radius-xs: 6px;  --radius-sm: 10px; --radius-md: 16px;
  --radius-lg: 22px; --radius-xl: 28px; --radius-full: 9999px;
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px;
  --space-5: 20px; --space-6: 24px; --space-8: 32px; --space-10: 40px;
  --shadow-sm: 0 2px 8px rgba(0,0,0,.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.12);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-fast: 150ms; --dur-base: 250ms; --dur-slow: 400ms;
  /* 字体栈 — 6 种风格，由 JS 切换 data-font 属性 */
  --font-mono: "SF Mono", "JetBrains Mono", Consolas, monospace;
  --font-display: "SF Pro Display", -apple-system, "PingFang SC", sans-serif;
  /* ---------- 字体族映射 ----------
     v179.24 字体商城：带文件的 7 款都在 assets/fonts/f_<id>.css 里本地声明（安装时才挂），
     不再依赖 Google Fonts CDN —— 断网 / 换网络 / 国外访问都照常显示。
     三个拉丁字体（像素 / 等宽 / 圆体）本来就没有中文字形，
     中文必须显式回退到系统中文黑体栈，否则会掉到浏览器默认字体 ——
     表现就是「选了像素，中文那块看着跟没换一样」。
     --font-cjk 就是这条中文兜底栈，单独抽出来给这几档复用。 */
  --font-cjk: -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Heiti SC", sans-serif;
  --font-default: -apple-system, "SF Pro Text", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", serif;
  --font-hand: "Ma Shan Zheng", "ZCOOL XiaoWei", "Kaiti SC", "STKaiti", "KaiTi", cursive;
  --font-longcang: "Long Cang", "Ma Shan Zheng", "Kaiti SC", "STKaiti", cursive;
  --font-kuaile: "ZCOOL KuaiLe", "PingFang SC", "Hiragino Sans GB", sans-serif;
  --font-rounded: "Varela Round", "PingFang SC", "Hiragino Sans GB", sans-serif;
  --font-pixel: "Press Start 2P", "PingFang SC", "Hiragino Sans GB", "Courier New", monospace;
  --font-mono-ui: "JetBrains Mono", "SF Mono", "PingFang SC", Consolas, monospace;
  /* 字体度量（用于版式对齐） */
  --font-line: 1.5;
  --font-tracking: 0;
  /* 通用映射变量（由主题覆盖） */
  --accent-contrast: #fff;
  --sb-h: 47px;
  /* v171 Zone Glass 分区选色：默认跟随主题，用户自定义值由 #dyn-zg 覆盖 */
  --zg-topbar: var(--glass);
  --zg-bottombar: var(--dock-bg);
  --zg-nav: var(--bg);
  --zg-chatbg: transparent;
  --zg-bubble-me: var(--accent);
  --zg-bubble-me-contrast: var(--accent-contrast);
  --zg-bubble-tn: var(--card);
  --zg-sheet: var(--card);
  --zg-widget: var(--card);
}

/* ---------- 主题一：糯米白 nuomi（奶油少女风 · 低饱和） ---------- */
:root[data-theme="nuomi"] {
  --bg: #F7F5F2; --card: #FFFFFF; --card-alt: #FBF9F7;
  --text-1: #2A2528; --text-2: #9A9498; --text-3: #C9C5C8;
  --accent: #E8A0B8; --accent-soft: #F5E0E8; --accent-deep: #C87A92;
  --divider: #E5E5EA; --dock-bg: rgba(255,255,255,.72);
  --glass: rgba(255,255,255,.6); --mask: rgba(0,0,0,.4);
  /* v179.34 桌面壁纸图案层。下面这层是**纹理**，上面几层是色晕，
     两者缺一不可：只有色晕就是一片糊色（用户说的「不要纯色」）。
     第一版圆点用的是中性灰 #E0E0E0，铺在粉色主题上像一层脏点；
     改成粉调，两层间距互质（26 / 41）免得露出网格。 */
  --wallpaper:
    radial-gradient(circle, rgba(206,158,182,.20) 1.6px, transparent 2.1px) 0 0/26px 26px,
    radial-gradient(circle, rgba(232,160,184,.13) 1.2px, transparent 1.7px) 9px 13px/41px 41px,
    #F5F5F7;
  --icon-cont-w: 72px; --icon-radius: var(--radius-md); --icon-cont-bg: #fff;
  --panel-alpha: 1;
  --lock-blur: 20px;
}
/* ---------- 主题二：织梦蓝 zhimeng ---------- */
:root[data-theme="zhimeng"] {
  --bg: #EDF1F7; --card: #FFFFFF; --card-alt: #FDF8F3;
  --text-1: #1D2129; --text-2: #86909C; --text-3: #C9CDD4;
  --accent: #3B7CFF; --accent-soft: #E5EEFF; --accent-deep: #2B62D6;
  --accent-warm: #FF8F6B; --navy: #1E2A4A;
  --divider: #E5E6EB; --dock-bg: rgba(255,255,255,.65);
  --glass: rgba(255,255,255,.45); --mask: rgba(20,28,48,.4);
  /* v179.34 桌面壁纸图案层。下面这层是**纹理**，上面几层是色晕，
     两者缺一不可：只有色晕就是一片糊色（用户说的「不要纯色」）。
     这个主题原来只有 linear-gradient(#EDF1F7 → #E8EDF5)，
     两色每通道只差 5 级 —— 是七套里最接近纯色的一个。
     通透冷调的风格适合「细点阵 + 一道斜向光带」，不加几何硬线。 */
  --wallpaper:
    radial-gradient(circle, rgba(59,124,255,.13) 1.5px, transparent 2px) 0 0/28px 28px,
    radial-gradient(circle, rgba(59,124,255,.09) 1.2px, transparent 1.7px) 11px 7px/43px 43px,
    linear-gradient(118deg, transparent 34%, rgba(255,255,255,.55) 47%, transparent 60%),
    linear-gradient(180deg, #EDF1F7 0%, #E8EDF5 100%);
  --icon-cont-w: 60px; --icon-radius: 14px; --icon-cont-bg: #fff;
  --panel-alpha: 1;
  --lock-blur: 24px;
}
/* ---------- 主题三：甜粉盐 sweetpink（奶油少女风 · 低饱和粉色） ---------- */
:root[data-theme="sweetpink"] {
  --bg: #FBF6F8; --card: #FFFFFF; --card-alt: #F8EEF2;
  --text-1: #4A303C; --text-2: #9E7E8E; --text-3: #D8C4CE;
  --accent: #E8A8C4; --accent-soft: #F5E2EC; --accent-deep: #C86A8A;
  --bow: #FFB8D8;
  --divider: #F5D5E5; --dock-bg: rgba(255,255,255,.8);
  --glass: rgba(255,255,255,.55); --mask: rgba(74,44,58,.35);
  /* v179.34 桌面壁纸图案层。下面这层是**纹理**，上面几层是色晕，
     两者缺一不可：只有色晕就是一片糊色（用户说的「不要纯色」）。
     原来四个柔光圆斑是唯一的层次，色与色之间没有纹理，
     读出来是一团模糊的粉。补一层细点阵当「纸的肌理」。 */
  --wallpaper:
    radial-gradient(circle, rgba(232,168,196,.22) 1.6px, transparent 2.1px) 0 0/30px 30px,
    radial-gradient(circle at 12% 8%, rgba(255,184,216,.5) 0 46px, transparent 60px),
    radial-gradient(circle at 88% 22%, rgba(255,214,232,.6) 0 60px, transparent 76px),
    radial-gradient(circle at 20% 86%, rgba(255,214,232,.5) 0 40px, transparent 54px),
    radial-gradient(circle at 82% 78%, rgba(255,184,216,.4) 0 34px, transparent 48px),
    #FFF5F8;
  --icon-cont-w: 64px; --icon-radius: var(--radius-md); --icon-cont-bg: rgba(255,255,255,.65);
  --panel-alpha: 1;
  --lock-blur: 18px;
}
/* ---------- 用户自定义主题 ---------- */
:root[data-theme="custom"] {
  --bg: var(--user-bg, #F5F5F7); --card: var(--user-card, #FFFFFF);
  /* v179 修复：--card-alt 全站用了 28 处（.capsule-btn.plain / .card.soft …），
     7 个主题里唯独 custom 没定义 → 切到「我的主题」时这些次级面板直接变透明。 */
  --card-alt: var(--user-card-alt, #FBF9F7);
  --text-1: var(--user-text, #1A1A1A); --text-2: var(--user-text2, #8E8E93); --text-3: var(--user-text3, #C7C7CC);
  --accent: var(--user-accent, #FF6B8A); --accent-soft: var(--user-accent-soft, #FFE4EC);
  --accent-deep: var(--user-accent-deep, #E8557A);
  --divider: var(--user-divider, #E5E5EA); --dock-bg: var(--user-dock, rgba(255,255,255,.72));
  --glass: var(--user-glass, rgba(255,255,255,.6)); --mask: rgba(0,0,0,.4);
  --wallpaper: var(--user-wallpaper, radial-gradient(circle, #E0E0E0 2px, transparent 2.2px) 0 0/24px 24px, #F5F5F7);
  --icon-cont-w: 68px; --icon-radius: var(--radius-md); --icon-cont-bg: var(--user-iconbg, #fff);
  --lock-blur: 20px;
}
/* ---------- 主题五：Glassy — 毛玻璃 + 彩色渐变 SVG 图标 ---------- */
:root[data-theme="glassy"] {
  --bg: #F0F4FF; --card: rgba(255,255,255,.78); --card-alt: rgba(255,255,255,.5);
  --text-1: #1A1E2E; --text-2: #5A6082; --text-3: #ACB4CC;
  --accent: #5B7CFA; --accent-soft: #E6EDFF; --accent-deep: #3B5EE8;
  --accent-warm: #FF7A59;
  --divider: rgba(100,110,180,.13); --dock-bg: rgba(255,255,255,.52);
  --glass: rgba(255,255,255,.45); --mask: rgba(20,28,60,.35);
  /* v179.34 桌面壁纸图案层。下面这层是**纹理**，上面几层是色晕，
     两者缺一不可：只有色晕就是一片糊色（用户说的「不要纯色」）。
     毛玻璃主题，加一层很淡的点当磨砂颗粒 —— 玻璃本来就该有细微颗粒，
     纯色渐变读出来是「塑料渐变」而不是「玻璃」。 */
  --wallpaper:
    radial-gradient(circle, rgba(91,124,250,.11) 1.4px, transparent 1.9px) 0 0/22px 22px,
    radial-gradient(circle, rgba(140,160,255,.07) 1.1px, transparent 1.6px) 7px 11px/37px 37px,
    radial-gradient(ellipse at 20% 18%, rgba(140,160,255,.45) 0 120px, transparent 200px),
    radial-gradient(ellipse at 80% 12%, rgba(200,140,255,.35) 0 100px, transparent 180px),
    radial-gradient(ellipse at 50% 85%, rgba(100,200,255,.30) 0 140px, transparent 230px),
    radial-gradient(ellipse at 88% 70%, rgba(255,160,120,.25) 0 90px, transparent 160px),
    linear-gradient(160deg, #EDF1FF 0%, #F4EFFF 50%, #EFF8FF 100%);
  --icon-cont-w: 68px; --icon-radius: 18px; --icon-cont-bg: transparent;
  --panel-alpha: 1; --lock-blur: 28px;
  --shadow-sm: 0 2px 10px rgba(80,100,200,.10);
  --shadow-md: 0 4px 24px rgba(80,100,200,.14);
}
/* Glassy 全局毛玻璃卡片质感 */
[data-theme="glassy"] .widget,
[data-theme="glassy"] .card,
[data-theme="glassy"] .list-group,
[data-theme="glassy"] .w-card,
[data-theme="glassy"] .ws-card {
  background: rgba(255,255,255,.68);
  backdrop-filter: blur(18px) saturate(1.6);
  -webkit-backdrop-filter: blur(18px) saturate(1.6);
  border: 1px solid rgba(255,255,255,.9);
  box-shadow: 0 2px 14px rgba(80,100,200,.10), inset 0 1px 0 rgba(255,255,255,.8);
}
[data-theme="glassy"] .btn {
  background: rgba(91,124,250,.9);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(91,124,250,.4);
  color: #fff;
  box-shadow: 0 2px 10px rgba(91,124,250,.3), inset 0 1px 0 rgba(255,255,255,.25);
}
[data-theme="glassy"] .btn.secondary {
  background: rgba(255,255,255,.55);
  color: var(--accent);
  border: 1px solid rgba(91,124,250,.25);
  box-shadow: none;
}
/* Glassy SVG 图标容器 */
[data-theme="glassy"] .icon-cont {
  background: transparent !important;
  box-shadow: none !important;
  border: none !important;
  overflow: visible !important;
}
[data-theme="glassy"] .gi-cont svg,
[data-theme="glassy"] .gi-compact svg {
  display: block !important;
  width: 100%; height: 100%;
  border-radius: calc(var(--icon-radius) * 0.85);
  overflow: hidden;
  filter: drop-shadow(0 3px 8px rgba(0,0,0,.18)) drop-shadow(0 1px 2px rgba(0,0,0,.10));
  transition: filter var(--dur-fast) var(--ease-spring), transform var(--dur-fast) var(--ease-spring);
}
[data-theme="glassy"] .app-icon:active .gi-cont svg {
  filter: drop-shadow(0 1px 4px rgba(0,0,0,.14)) brightness(.92);
  transform: scale(.9);
}
/* Glassy compact icon（tabbar / 列表行） */
[data-theme="glassy"] .compact-icon.gi-compact {
  background: transparent;
}
[data-theme="glassy"] .compact-icon.gi-compact svg {
  border-radius: 6px;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,.18));
}
[data-theme="glassy"] .wx-tabbar button .compact-icon svg,
[data-theme="glassy"] .super-tabbar button .compact-icon svg {
  filter: grayscale(1) opacity(.45);
  transition: filter var(--dur-fast);
}
[data-theme="glassy"] .wx-tabbar button.on .compact-icon svg,
[data-theme="glassy"] .super-tabbar button.on .compact-icon svg {
  filter: none;
}
/* Glassy Dock 背景 */
[data-theme="glassy"] #dock {
  background: rgba(220,228,255,.62);
  border: 1px solid rgba(255,255,255,.85);
}
/* Glassy 桌面头部 */
[data-theme="glassy"] #home-deco { display: none; }
[data-theme="glassy"] .home-head { color: var(--accent-deep); }
/* Glassy icon label 颜色调暗一档 */
[data-theme="glassy"] .icon-label { color: #2A2E48; font-weight: 500; text-shadow: 0 1px 3px rgba(255,255,255,.8); }

/* ---------- 主题四：Coquette 黑粉（甜酷贴纸风：婴儿粉+纯黑+浅灰，细轮廓平涂） ---------- */
:root[data-theme="coquette"] {
  --bg: #FDF2F6; --card: #FFFFFF; --card-alt: #FCE9F0;
  --text-1: #141414; --text-2: #6E6E74; --text-3: #D9D9DE;
  --accent: #E84A7F; --accent-soft: #FFE3EC; --accent-deep: #141414;   /* 强调反转：主按钮黑底 */
  --bow: #E84A7F;
  --divider: #F0DCE4; --dock-bg: rgba(255,255,255,.85);
  --glass: rgba(255,255,255,.7); --mask: rgba(20,20,20,.4);
  /* v179.34 桌面壁纸图案层。下面这层是**纹理**，上面几层是色晕，
     两者缺一不可：只有色晕就是一片糊色（用户说的「不要纯色」）。
     三个斑的透明度只有 .14 / .05 / .10 —— .05 那层等于没画，
     整张壁纸实际上就是 linear-gradient(#FDF2F6 → #FBE8EF)，也是纯色。
     这个主题的调子是硬边 + 黑描边，配规整点阵比配柔光斑更贴。 */
  --wallpaper:
    radial-gradient(circle, rgba(232,74,127,.15) 1.5px, transparent 2px) 0 0/24px 24px,
    radial-gradient(circle at 14% 10%, rgba(232,74,127,.20) 0 60px, transparent 90px),
    radial-gradient(circle at 86% 26%, rgba(20,20,20,.07) 0 80px, transparent 110px),
    radial-gradient(circle at 22% 82%, rgba(232,74,127,.14) 0 70px, transparent 100px),
    linear-gradient(180deg, #FDF2F6 0%, #FBE8EF 100%);
  --icon-cont-w: 66px; --icon-radius: 16px; --icon-cont-bg: #fff;
  --panel-alpha: 1;
  --lock-blur: 16px;
}
/* Coquette 细轮廓贴纸质感：卡片黑描边、硬边小阴影（无渐变无厚阴影） */
[data-theme="coquette"] .widget,
[data-theme="coquette"] .w-card,
[data-theme="coquette"] .folder-card,
[data-theme="coquette"] .moment-card,
[data-theme="coquette"] .tr-card,
[data-theme="coquette"] .tr-entry,
[data-theme="coquette"] .cub-kcard,
[data-theme="coquette"] .story-book,
[data-theme="coquette"] .hot-item { border: 1.5px solid #141414; box-shadow: 2.5px 2.5px 0 rgba(20,20,20,.9); border-radius: 14px; }
[data-theme="coquette"] .btn { border: 1.5px solid #141414; box-shadow: 2px 2px 0 rgba(20,20,20,.85); border-radius: 12px; }
[data-theme="coquette"] .btn.primary, [data-theme="coquette"] .btn:not(.secondary):not(.small) { background: #141414; color: #FFE3EC; border-color: #141414; }
[data-theme="coquette"] .capsule-btn { border: 1.5px solid #141414; border-radius: 999px; }
[data-theme="coquette"] .icon-cont { border: 1.5px solid #141414 !important; box-shadow: 2px 2px 0 rgba(20,20,20,.55) !important; background: #fff !important; }
[data-theme="coquette"] .app-icon .icon-label { color: #141414; font-weight: 700; }
[data-theme="coquette"] .bubble.wx-blue { background: #141414; color: #FFE3EC; border: 1.5px solid #141414; }
[data-theme="coquette"] .bubble.wx-white { border: 1.5px solid #141414; box-shadow: 2px 2px 0 rgba(20,20,20,.35); }
[data-theme="coquette"] .page-banner { color: #141414; letter-spacing: 3px; }
[data-theme="coquette"] .page-banner .pb-heart { color: #E84A7F; }
[data-theme="coquette"] #home-deco span { filter: drop-shadow(1px 1px 0 rgba(20,20,20,.4)); }
[data-theme="coquette"] .w-game { background: #141414; border: 1.5px solid #141414; box-shadow: 3px 3px 0 rgba(232,74,127,.55); }
[data-theme="coquette"] .w-musicbox .vinyl { background: radial-gradient(circle, #E84A7F 0 15px, #141414 15px 16px, #1c1c1c 16px 100%); }
[data-theme="coquette"] .room-scene { border: 1.5px solid #141414; box-shadow: 3px 3px 0 rgba(20,20,20,.5); }
[data-theme="coquette"] .stat-chip, [data-theme="coquette"] .list-group { border: 1.5px solid #141414; }
[data-theme="coquette"] .sw-sky .sky-loc, [data-theme="coquette"] .sky-note { border: 1.5px solid #141414; }
[data-theme="coquette"] .icon-cont .emo { font-size: calc(var(--icon-cont-w) * .48); }
/* ---------- 主题六：像素小镇 pixel — 像素边框硬阴影 ---------- */
:root[data-theme="pixel"] {
  --bg: #FFF9F0; --card: #FFFFFF; --card-alt: #FFF3E0;
  --text-1: #5A3A28; --text-2: #8A6A55; --text-3: #C4A882;
  --accent: #FFB3C6; --accent-soft: #FFE0EA; --accent-deep: #D4688A;
  --accent-warm: #FFCD8A;
  --divider: #E8C8A0; --dock-bg: rgba(255,255,255,.85);
  --glass: rgba(255,255,255,.75); --mask: rgba(90,58,40,.4);
  --wallpaper:
  /* v179.34 桌面壁纸图案层。下面这层是**纹理**，上面几层是色晕，
     两者缺一不可：只有色晕就是一片糊色（用户说的「不要纯色」）。
     这个主题的网格就是它的本体（像素小镇），.10 太淡读不出来，
     提到 .15 —— 别再加别的纹理，像素风靠硬边不靠花。 */
    repeating-linear-gradient(0deg, rgba(180,130,90,.15) 0 1px, transparent 1px 12px),
    repeating-linear-gradient(90deg, rgba(180,130,90,.15) 0 1px, transparent 1px 12px),
    #FFF9F0;
  --icon-cont-w: 64px; --icon-radius: 0; --icon-cont-bg: #fff;
  --panel-alpha: 1; --lock-blur: 14px;
  --shadow-sm: 3px 3px 0 rgba(90,58,40,.18);
  --shadow-md: 4px 4px 0 rgba(90,58,40,.22);
  --shadow-lg: 6px 6px 0 rgba(90,58,40,.26);
}
[data-theme="pixel"] .widget,
[data-theme="pixel"] .w-card,
[data-theme="pixel"] .list-group,
[data-theme="pixel"] .folder-card,
[data-theme="pixel"] .moment-card,
[data-theme="pixel"] .tr-card,
[data-theme="pixel"] .tr-entry,
[data-theme="pixel"] .cub-kcard,
[data-theme="pixel"] .story-book,
[data-theme="pixel"] .hot-item,
[data-theme="pixel"] .room-scene,
[data-theme="pixel"] .stat-chip {
  border: 2.5px solid #5A3A28; box-shadow: var(--shadow-md); border-radius: 0;
}
[data-theme="pixel"] .btn { border: 2.5px solid #5A3A28; box-shadow: var(--shadow-sm); border-radius: 0; }
[data-theme="pixel"] .btn.primary, [data-theme="pixel"] .btn:not(.secondary) { background: #5A3A28; color: #FFF9F0; }
[data-theme="pixel"] .capsule-btn { border: 2px solid #5A3A28; border-radius: 0; }
[data-theme="pixel"] .icon-cont { border: 2.5px solid #5A3A28 !important; box-shadow: var(--shadow-sm) !important; border-radius: 0; background: #fff; }
[data-theme="pixel"] .app-icon .icon-label { color: #5A3A28; text-shadow: 1px 1px 0 rgba(255,255,255,.8); }
[data-theme="pixel"] .bubble.wx-blue { background: #5A3A28; color: #FFF9F0; }
[data-theme="pixel"] .bubble.wx-white { border: 2px solid #5A3A28; box-shadow: var(--shadow-sm); }
[data-theme="pixel"] .page-banner { color: #5A3A28; letter-spacing: 2px; }
[data-theme="pixel"] #home-deco span { filter: drop-shadow(2px 2px 0 rgba(90,58,40,.25)); }
[data-theme="pixel"] .room-scene { border: 2.5px solid #5A3A28; box-shadow: 4px 4px 0 rgba(90,58,40,.26); }
[data-theme="pixel"] .w-clock .wc-time { color: #D4688A; }
[data-theme="pixel"] .w-musicbox .vinyl { background: radial-gradient(circle, #FFB3C6 0 14px, #5A3A28 14px 16px, #3A2A1C 16px 100%); }
[data-theme="pixel"] .cub-scene, [data-theme="pixel"] .cub-scene2 { border-radius: 0; border: 2.5px solid #5A3A28; box-shadow: var(--shadow-md); }
[data-theme="pixel"] .cub-hot { border: 2px solid #5A3A28; border-radius: 0; background: #FFF9F0; }
[data-theme="pixel"] .cub-kcard { border: 2px solid #5A3A28; box-shadow: var(--shadow-sm); border-radius: 0; background: #fff; }

/* ---------- 主题七：星笺日记 diary — 情感手账 / 治愈系拟物 ---------- */
:root[data-theme="diary"] {
  --bg: #F5F0EB; --card: #FDFBF7; --card-alt: #FAF6E9;
  --text-1: #4A4A4A; --text-2: #8A8A8A; --text-3: #B8B4B0;
  --accent: #C4B5E0; --accent-soft: #E8D5E0; --accent-deep: #B8A9D9;
  --accent-warm: #D4A5B5;
  --gold: #D4AF37;
  --divider: #E8E4E0; --dock-bg: rgba(253,251,247,.82);
  --glass: rgba(253,251,247,.65); --mask: rgba(74,74,74,.4);
  --wallpaper:
  /* v179.34 桌面壁纸图案层。下面这层是**纹理**，上面几层是色晕，
     两者缺一不可：只有色晕就是一片糊色（用户说的「不要纯色」）。
     手账纸的横竖格，.08 淡到读不出来，提到 .14。 */
    linear-gradient(rgba(196,181,224,.14) 1px, transparent 1px) 0 0/20px 20px,
    linear-gradient(90deg, rgba(196,181,224,.14) 1px, transparent 1px) 0 0/20px 20px,
    radial-gradient(circle at 14% 10%, rgba(212,165,181,.22) 0 70px, transparent 90px),
    radial-gradient(circle at 86% 22%, rgba(196,181,224,.26) 0 90px, transparent 120px),
    radial-gradient(circle at 22% 82%, rgba(212,165,181,.18) 0 60px, transparent 80px),
    radial-gradient(circle at 78% 74%, rgba(212,175,55,.10) 0 50px, transparent 70px),
    linear-gradient(180deg, #F5F0EB 0%, #EDE7E2 100%);
  --icon-cont-w: 68px; --icon-radius: 18px; --icon-cont-bg: #FDFBF7;
  --panel-alpha: 1; --lock-blur: 18px;
  --shadow-sm: 0 2px 10px rgba(74,74,74,.06);
  --shadow-md: 0 4px 20px rgba(74,74,74,.08);
  --shadow-lg: 0 8px 32px rgba(74,74,74,.12);
}
[data-theme="diary"] .widget,
[data-theme="diary"] .w-card,
[data-theme="diary"] .list-group,
[data-theme="diary"] .folder-card,
[data-theme="diary"] .moment-card,
[data-theme="diary"] .tr-card,
[data-theme="diary"] .tr-entry,
[data-theme="diary"] .cub-kcard,
[data-theme="diary"] .story-book,
[data-theme="diary"] .hot-item {
  background: var(--card);
  border: 1px solid rgba(196,181,224,.35);
  box-shadow: 0 2px 14px rgba(74,74,74,.05), inset 0 1px 0 rgba(255,255,255,.8);
  border-radius: 20px;
}
[data-theme="diary"] .btn {
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent-deep) 100%);
  color: #fff;
  border: 1px solid rgba(184,169,217,.6);
  box-shadow: 0 2px 10px rgba(196,181,224,.3), inset 0 1px 0 rgba(255,255,255,.3);
  border-radius: 14px;
}
[data-theme="diary"] .btn.secondary {
  background: var(--card-alt);
  color: var(--accent-deep);
  border: 1px solid rgba(196,181,224,.4);
  box-shadow: none;
}
[data-theme="diary"] .capsule-btn {
  background: var(--card-alt);
  color: var(--text-1);
  border: 1px solid rgba(196,181,224,.3);
  border-radius: 999px;
}
[data-theme="diary"] .icon-cont {
  background: linear-gradient(135deg, #F5F0EB 0%, #E8D5E0 100%);
  border: 1px solid rgba(196,181,224,.4) !important;
  box-shadow: 0 3px 10px rgba(196,181,224,.2), inset 0 1px 0 rgba(255,255,255,.6) !important;
  border-radius: 18px;
}
[data-theme="diary"] .app-icon .icon-label { color: var(--text-1); }
[data-theme="diary"] .bubble.wx-blue { background: var(--accent-soft); color: var(--accent-deep); border: 1px solid rgba(196,181,224,.35); }
[data-theme="diary"] .bubble.wx-white { background: #fff; border: 1px solid rgba(196,181,224,.3); box-shadow: 0 2px 8px rgba(74,74,74,.04); }
[data-theme="diary"] .page-banner { color: var(--accent-deep); letter-spacing: 2px; }
[data-theme="diary"] .page-banner .pb-heart { color: var(--accent-warm); }
[data-theme="diary"] #home-deco span { filter: drop-shadow(1px 2px 4px rgba(196,181,224,.35)); }
[data-theme="diary"] .home-head { color: var(--accent-deep); }
[data-theme="diary"] .w-clock .wc-time { color: var(--accent-deep); }
[data-theme="diary"] .w-musicbox .vinyl { background: radial-gradient(circle, var(--accent) 0 15px, var(--card-alt) 15px 16px, var(--accent-soft) 16px 100%); }
[data-theme="diary"] .stat-chip,
[data-theme="diary"] .sw-sky .sky-loc,
[data-theme="diary"] .sky-note { border: 1px solid rgba(196,181,224,.4); background: var(--card); }
[data-theme="diary"] .room-scene { border: 1px solid rgba(196,181,224,.35); box-shadow: 0 4px 20px rgba(74,74,74,.06); border-radius: 20px; }
[data-theme="diary"] .cub-scene, [data-theme="diary"] .cub-scene2 { box-shadow: inset 0 -20px 34px rgba(196,181,224,.10), inset 0 12px 26px rgba(255,255,255,.4); }
[data-theme="diary"] .cub-hot { background: rgba(253,251,247,.85); border: 1px solid rgba(196,181,224,.4); box-shadow: 0 3px 10px rgba(74,74,74,.08); }
[data-theme="diary"] .cub-kcard { background: var(--card); border: 1px solid rgba(196,181,224,.35); box-shadow: 0 2px 12px rgba(74,74,74,.04); }
/* 星笺日记：记忆星 / 世界书 / 崽崽 等沉浸式深色模块 */
[data-theme="diary"] .w-moments .moment-card.mood-memory,
[data-theme="diary"] .story-book,
[data-theme="diary"] .cub3d-stage,
[data-theme="diary"] .cub-scene2 .cub-panel .cub-kcard {
  background: linear-gradient(160deg, #1A1628 0%, #2A1F38 40%, #120E20 100%);
  color: #E8E0F0;
  border: 1px solid rgba(196,181,224,.25);
  box-shadow: 0 4px 24px rgba(26,22,40,.35), inset 0 1px 0 rgba(255,255,255,.05);
}
[data-theme="diary"] .w-moments .moment-card.mood-memory .moment-name,
[data-theme="diary"] .story-book .sb-title,
[data-theme="diary"] .cub3d-bubble { color: #F0E8F8; }
[data-theme="diary"] .w-moments .moment-card.mood-memory small,
[data-theme="diary"] .story-book small,
[data-theme="diary"] .cub3d-bubble { color: #C8B8D8; }
/* 金色装饰 ✦ 与编号 01 02 */
[data-theme="diary"] .page-banner::before,
[data-theme="diary"] .appearance-title span { color: var(--gold); }
[data-theme="diary"] .appearance-subhead span:first-child,
[data-theme="diary"] .section-label,
[data-theme="diary"] .cub-section-label { color: var(--accent-deep); font-family: var(--font-mono); letter-spacing: 2px; font-size: 11px; }
[data-theme="diary"] .w-musicbox .eq i { background: linear-gradient(180deg, var(--accent), var(--accent-warm)); }
[data-theme="diary"] .w-char .wc-aff b { color: var(--accent-warm); }
[data-theme="diary"] .mp-tabbar button.on { color: var(--accent-deep); background: var(--accent-soft); }

/* ---------- 舞台 / 设备外框（桌面端） ---------- */
#stage {
  height: 100%; display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 20%, rgba(255,110,138,.12), transparent 40%),
    radial-gradient(circle at 80% 80%, rgba(59,124,255,.10), transparent 45%),
    #232327;
}
#device { position: relative; display: block; }
/* 移动端：壳平铺满屏（无 bezel），杜绝 481 断点的 390px 定宽在窄屏溢出 */
@media (max-width: 480px) {
  #device { width: 100%; height: 100%; padding: 0; border-radius: 0; background: none; box-shadow: none; }
  #device::before { display: none; }
  .dev-btn { display: none; }
}
.dev-btn { position: absolute; left: -3px; width: 3px; background: #3a3a3f; border-radius: 2px 0 0 2px; }
.dev-btn.vol-up { top: 150px; height: 56px; }
.dev-btn.vol-down { top: 214px; height: 56px; }
.dev-btn.power { left: auto; right: -3px; top: 180px; height: 84px; border-radius: 0 2px 2px 0; }
#phone {
  position: relative; width: 100vw; height: 100vh; height: 100dvh;
  overflow: hidden; background: var(--bg);
  transition: background var(--dur-slow) var(--ease-in-out);
}
@media (min-width: 481px) {
  #device {
    display: block;
    padding: 14px; border-radius: 56px;
    background: linear-gradient(145deg, #4a4a52, #232328 55%, #3d3d45);
    box-shadow: 0 30px 80px rgba(0,0,0,.55), inset 0 0 0 2px #17171a;
    /* v142 锁定真机比例：矮窗口整体等比缩放（--dev-scale 由 app.js 按视口计算），不再压扁高度 */
    transform: scale(var(--dev-scale, 1));
    transform-origin: center center;
  }
  #device::before { /* 摄像头装饰 */
    content: ""; position: absolute; top: 26px; left: 50%; transform: translateX(-50%);
    width: 84px; height: 24px; background: #101013; border-radius: 12px; z-index: 60;
  }
  #phone {
    width: 390px; height: 844px;
    border-radius: 44px; border: 3px solid #1c1c1f;
    box-shadow: inset 0 0 0 2px rgba(255,255,255,.06);
  }
}

/* ---------- 状态栏 ---------- */
#statusbar {
  position: absolute; top: 0; left: 0; right: 0; height: var(--sb-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 26px 0; z-index: 90; pointer-events: none;
  font-size: 15px; font-weight: 600; color: var(--text-1);
  font-variant-numeric: tabular-nums;
}
#phone.in-app #statusbar { color: var(--text-1); }
.sb-notch { width: 10px; height: 10px; border-radius: 50%; background: #101013; }
@media (max-width: 480px) { .sb-notch { display: none; } }
.sb-icons { display: flex; align-items: center; gap: 5px; }
.sb-signal { width: 18px; height: 12px; fill: currentColor; }
.sb-wifi { width: 16px; height: 12px; }
.sb-batt { position: relative; display: inline-block; width: 25px; height: 12px; border: 1.4px solid currentColor; border-radius: 4px; opacity: .9; }
.sb-batt i { position: absolute; top: 2px; left: 2px; bottom: 2px; width: 68%; background: currentColor; border-radius: 2px; }
.sb-batt::after { content: ""; position: absolute; right: -4px; top: 3.5px; width: 2.5px; height: 5px; background: currentColor; border-radius: 0 2px 2px 0; }

/* ---------- 屏幕切换 ---------- */
.screen {
  position: absolute; inset: 0; padding-top: var(--sb-h);
  opacity: 0; pointer-events: none;
  transform: scale(1.04);
  transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out);
  will-change: opacity, transform;
  overflow: hidden;
}
.screen.active { opacity: 1; pointer-events: auto; transform: scale(1); }

/* ---------- 锁屏 ---------- */
#lockscreen {
  display: flex; flex-direction: column; align-items: center;
  padding-bottom: 34px; z-index: 40;
}
#lockscreen::before {
  content: ""; position: absolute; inset: -40px; z-index: -1;
  background: var(--wallpaper); filter: blur(var(--lock-blur)) brightness(.72);
  transform: scale(1.1);
}
#lockscreen::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, rgba(0,0,0,.25) 0%, transparent 30%, transparent 60%, rgba(0,0,0,.35) 100%);
}
.lock-top { margin-top: 16px; color: #fff; opacity: .9; }
.lock-icon { width: 24px; height: 24px; }
.lock-date { margin-top: 26px; font-size: 13px; color: rgba(255,255,255,.85); text-shadow: 0 2px 8px rgba(0,0,0,.3); }
.lock-time {
  font-family: var(--font-display); font-size: 72px; font-weight: 700;
  letter-spacing: -2px; color: #fff; line-height: 1.05;
  font-variant-numeric: tabular-nums; text-shadow: 0 4px 24px rgba(0,0,0,.25), 0 0 40px rgba(255,255,255,.08);
}
.lock-notifs { width: 100%; padding: 26px 16px 0; display: flex; flex-direction: column; gap: 8px; overflow: hidden; }
.lock-notif {
  display: flex; gap: 10px; align-items: center; padding: 12px 14px;
  background: rgba(255,255,255,.28); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border-radius: var(--radius-md); color: #fff; animation: notif-in .4s var(--ease-out) both;
  box-shadow: 0 4px 16px rgba(0,0,0,.12), inset 0 1px 0 rgba(255,255,255,.2);
}
.lock-notif .n-icon { font-size: 22px; }
.lock-notif .n-body { flex: 1; min-width: 0; }
.lock-notif .n-title { font-size: 13px; font-weight: 600; }
.lock-notif .n-text { font-size: 13px; opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lock-notif .n-time { font-size: 11px; opacity: .7; align-self: flex-start; }
.lock-actions { margin-top: auto; display: flex; gap: 120px; }
.lock-btn {
  width: 48px; height: 48px; border-radius: 50%; font-size: 20px;
  background: rgba(255,255,255,.24); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  color: #fff; transition: transform var(--dur-fast) var(--ease-spring), background var(--dur-fast);
  box-shadow: 0 4px 12px rgba(0,0,0,.15), inset 0 1px 0 rgba(255,255,255,.25);
}
.lock-btn:active { transform: scale(.9); background: rgba(255,255,255,.4); }
.lock-hint { margin-top: 18px; font-size: 13px; color: rgba(255,255,255,.8); }
#lockscreen.unlocking { animation: unlock .45s var(--ease-in-out) forwards; }
@keyframes unlock { to { transform: translateY(-100%); opacity: 0; } }
@keyframes notif-in { from { opacity: 0; transform: translateY(-10px); } }

/* —— v166 锁屏钢琴小游戏 —— */
.lock-piano { position: absolute; inset: 0; z-index: 50; display: flex; flex-direction: column;
  background: linear-gradient(180deg, rgba(255,200,220,.92), rgba(240,170,200,.95)); backdrop-filter: blur(20px);
  padding: calc(var(--sb-h, 24px) + 12px) 14px 16px; animation: lpIn .4s cubic-bezier(.2,.9,.3,1.2); }
@keyframes lpIn { from { opacity: 0; transform: scale(.92); } }
.lp-header { display: flex; justify-content: space-between; align-items: center; color: #fff; text-shadow: 0 2px 6px rgba(0,0,0,.15); }
.lp-header b { font-size: 18px; }
.lp-close { width: 32px; height: 32px; border-radius: 50%; background: rgba(255,255,255,.3); color: #fff; font-size: 14px; }
.lp-songs { display: flex; gap: 6px; margin: 10px 0; flex-wrap: wrap; }
.lp-songs button { padding: 5px 12px; border-radius: 99px; background: rgba(255,255,255,.35); color: #fff;
  font-size: 12px; border: 1.5px solid transparent; transition: all .2s; }
.lp-songs button.on { background: rgba(255,255,255,.6); color: #d8688a; border-color: #fff; font-weight: 600; }
.lp-score { background: rgba(255,255,255,.5); border-radius: 12px; padding: 8px 12px; margin-bottom: 10px;
  color: #a04868; font-size: 12px; min-height: 48px; }
.lp-score b { font-size: 13px; }
.lp-notes { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.lp-notes span { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 6px;
  background: rgba(255,255,255,.4); font-size: 11px; color: #c05878; transition: all .15s; }
.lp-notes span.cur { background: #fff; color: #d8688a; transform: scale(1.2); box-shadow: 0 2px 8px rgba(216,104,138,.4); }
.lp-keys { flex: 1; display: flex; gap: 3px; align-items: stretch; min-height: 120px; }
.lp-key { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center;
  background: linear-gradient(180deg, #fff 0%, #fff 70%, #f0e0e8 100%); border-radius: 0 0 8px 8px;
  border: 1px solid rgba(200,150,170,.3); border-top: 3px solid #f0a8c0; padding-bottom: 8px; cursor: pointer;
  transition: transform .1s, box-shadow .2s; box-shadow: 0 2px 6px rgba(180,120,140,.2); }
.lp-key span { font-size: 13px; color: #d8688a; font-weight: 600; }
.lp-key.hit { transform: translateY(3px); box-shadow: 0 1px 3px rgba(180,120,140,.3); background: linear-gradient(180deg, #f8e0e8 0%, #f0d0d8 100%); }
.lp-controls { display: flex; gap: 8px; margin-top: 10px; }
.lp-controls button { flex: 1; padding: 8px; border-radius: 10px; font-size: 14px; font-weight: 600; }
.lp-play { background: #fff; color: #d8688a; }
.lp-stop { background: rgba(255,255,255,.4); color: #fff; }

/* —— v166 锁屏游戏切换器 —— */
.lock-games { position: absolute; inset: 0; z-index: 50; display: flex; flex-direction: column;
  background: linear-gradient(180deg, rgba(40,30,60,.92), rgba(20,15,35,.96)); backdrop-filter: blur(20px);
  padding: calc(var(--sb-h, 24px) + 12px) 16px 16px; animation: lpIn .4s cubic-bezier(.2,.9,.3,1.2); }
.lg-header { display: flex; justify-content: space-between; align-items: center; color: #fff; text-shadow: 0 2px 6px rgba(0,0,0,.3); }
.lg-header b { font-size: 18px; }
.lg-close { width: 32px; height: 32px; border-radius: 50%; background: rgba(255,255,255,.2); color: #fff; font-size: 14px; }
/* v179.30：两款时是 1fr 1fr，第三款进来后 2+1 断行、像漏了一张。
   auto-fit + minmax(92px, 1fr)：2 款 3 款都各占一行，加到第 4 款才会折。 */
.lg-grid { flex: 1; display: grid; grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)); gap: 14px; align-content: center; padding: 20px 0; }
.lg-card { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  border-radius: 20px; padding: 24px 12px; border: 1.5px solid rgba(255,255,255,.15);
  background: rgba(255,255,255,.06); color: #fff; transition: all .25s; }
.lg-card:active { transform: scale(.95); }
.lg-piano { background: linear-gradient(135deg, rgba(255,200,220,.15), rgba(240,170,200,.1)); border-color: rgba(255,200,220,.3); }
.lg-piano:active { background: linear-gradient(135deg, rgba(255,200,220,.3), rgba(240,170,200,.2)); }
.lg-lingzi { background: linear-gradient(135deg, rgba(180,160,255,.15), rgba(120,100,200,.1)); border-color: rgba(180,160,255,.3); }
.lg-lingzi:active { background: linear-gradient(135deg, rgba(180,160,255,.3), rgba(120,100,200,.2)); }
/* 月光钢琴：冷月白，跟前两张的暖粉/暖紫都错开 */
.lg-mp { background: linear-gradient(135deg, rgba(190,215,255,.16), rgba(90,130,190,.1)); border-color: rgba(190,215,255,.3); }
.lg-mp:active { background: linear-gradient(135deg, rgba(190,215,255,.32), rgba(90,130,190,.2)); }
.lg-icon { font-size: 48px; line-height: 1; filter: drop-shadow(0 4px 12px rgba(0,0,0,.3)); }
/* v179.30：第三张卡（月光钢琴）用的是描边 SVG。svg 不吃 font-size，
   不显式给宽高就会塌成默认的 300×150，把整张卡撑爆。 */
.lg-icon svg { width: 48px; height: 48px; display: block; }
.lg-name { font-size: 18px; font-weight: 700; }
.lg-desc { font-size: 12px; opacity: .7; }

/* —— v166 锁屏凌子桌宠（iframe 隔离） —— */
.lock-lingzi { position: absolute; inset: 0; z-index: 50; display: flex; flex-direction: column;
  background: #0f0c1a; padding: calc(var(--sb-h, 24px) + 8px) 0 0; animation: lpIn .4s cubic-bezier(.2,.9,.3,1.2); }
.ll-header { display: flex; justify-content: space-between; align-items: center; padding: 0 14px 8px;
  color: #e8e0ff; background: linear-gradient(180deg, rgba(30,20,50,.95), transparent); }
.ll-header b { font-size: 15px; text-shadow: 0 1px 4px rgba(0,0,0,.5); }
.ll-close { width: 30px; height: 30px; border-radius: 50%; background: rgba(255,255,255,.15); color: #fff; font-size: 13px; }
.ll-frame-wrap { flex: 1; overflow: hidden; position: relative; }
.ll-iframe { width: 100%; height: 100%; border: 0; display: block; }

/* ---- v179.30 月光钢琴的载入遮罩 ----
   盖在 .ll-frame-wrap 上（那层 position:relative + overflow:hidden，正好）。 */
.mp-load {
  position: absolute; inset: 0; z-index: 3;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  padding: 0 30px; text-align: center;
  background: rgba(10, 14, 28, .72); backdrop-filter: blur(6px);
  color: #e8f0ff; transition: opacity .28s ease;
}
.mp-load-t { font-size: 15px; font-weight: 700; letter-spacing: .04em; }
.mp-load-s { font-size: 12px; opacity: .72; line-height: 1.6; }
.mp-load-b { width: 132px; height: 3px; border-radius: 2px; background: rgba(255,255,255,.14); overflow: hidden; }
.mp-load-b > i { display: block; width: 40%; height: 100%; border-radius: 2px; background: linear-gradient(90deg, transparent, #bcd6ff, transparent); animation: mpSlide 1.25s linear infinite; }
@keyframes mpSlide { from { transform: translateX(-100%); } to { transform: translateX(340%); } }
/* 失败态：不再转圈，如实说是没打开、为什么 */
.mp-load.bad { background: rgba(28, 12, 16, .8); color: #ffd9dc; }
.mp-load.bad .mp-load-t { color: #ff8f9a; }

/* ---------- 桌面 ---------- */
#homescreen { display: flex; flex-direction: column; z-index: 10; }
#homescreen::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--wallpaper); transition: background var(--dur-slow);
}
.home-head {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 6px 22px 0; font-size: 11px; font-weight: 500;
  color: var(--text-2); letter-spacing: 1.5px; text-transform: uppercase;
}
[data-theme="zhimeng"] .home-head { color: var(--text-2); }
.home-head #home-greeting { color: var(--accent); font-weight: 700; }
#home-pages {
  flex: 1; display: flex; overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x mandatory; scrollbar-width: none; touch-action: pan-x;
}
#home-pages::-webkit-scrollbar { display: none; }
.home-page {
  min-width: 100%; scroll-snap-align: start;
  padding: 8px 16px 0; display: flex; flex-direction: column; gap: 14px;
  overflow: hidden; scrollbar-width: none; box-sizing: border-box; min-height: 0;
}
.home-page::-webkit-scrollbar { display: none; }
#homescreen { overflow: hidden; }
/* 一屏桌面密度：不裁切信息，压缩卡片/图标间距；上下滚动始终禁用 */
#homescreen .grid-pad { padding-top: 1px; padding-bottom: 0; }
#homescreen .page-banner { padding-top: 1px; padding-bottom: 5px; }
#homescreen .grid-pad .widget, #homescreen .grid-pad .w-card, #homescreen .grid-pad .folder-card { margin-bottom: 6px; }
#homescreen .w-row, #homescreen .w-duo, #homescreen .folder-duo { gap: 7px; }
#homescreen .icon-grid { gap: 7px 6px; padding-top: 0; }
#homescreen .app-icon { gap: 2px; }
#homescreen .icon-label { font-size: 10.5px; }
#homescreen .icon-cont { width: 46px; height: 46px; }
#homescreen .folder-card .icon-cont { width: 40px; height: 40px; }
#homescreen .folder-card .fc-grid { gap: 5px 3px; padding-top: 4px; }
#homescreen .folder-card .app-icon .icon-label { font-size: 9px; }
#homescreen .w-weather { padding: 6px 10px 5px; }
#homescreen .w-weather .ww-temp { font-size: 22px; }
#homescreen .w-weather .ww-cloud { font-size: 18px; }
#homescreen .w-weather .ww-hours { margin-top: 3px; padding-top: 3px; }
#homescreen .w-weather .ww-hours .h { font-size: 8px; }
#homescreen .w-weather .ww-hours .h b { font-size: 9px; }
#homescreen .w-weather .ww-hours .h .ic { font-size: 11px; }
#homescreen .w-weather .ww-meta { margin-top: 4px; font-size: 8px; }
#homescreen .w-weather .ww-city { margin-top: 3px; font-size: 9px; }
#homescreen .w-date { padding: 6px 10px 5px; }
#homescreen .w-date .wd-date { font-size: 14px; }
#homescreen .w-date .wd-week { font-size: 9px; margin-top: 1px; }
#homescreen .w-date .wd-todo { margin-top: 2px; padding-top: 2px; }
#homescreen .w-date .wd-mini-week { margin-top: 4px; }
#homescreen .w-date .wd-mini-week span { font-size: 7px; }
#homescreen .w-date .wd-mini-grid { margin-top: 1px; row-gap: 0; }
#homescreen .w-date .wd-mini-grid span { height: 18px; font-size: 8px; }
#homescreen .w-date .wd-mini-grid span b { width: 14px; height: 14px; font-size: 8px; }
#homescreen .w-diary { padding: 8px 10px 9px; }
#homescreen .w-diary .dj-body { margin-top: 4px; }
#homescreen .w-diary .dj-text p { -webkit-line-clamp: 2; line-height: 1.4; font-size: 12px; }
#homescreen .w-diary .dj-photo { flex-basis: 60px; height: 66px; }
#homescreen .w-duo { gap: 6px; }
#homescreen .w-duo .w-card { padding: 8px 10px; min-height: 72px; }
#homescreen .w-game { padding: 10px 12px; }
#homescreen .w-game .g-time { font-size: 27px; }
#homescreen .w-game .g-claw { font-size: 32px; top: 25px; }
#homescreen .w-musicbox { padding: 9px 10px; gap: 9px; }
#homescreen .w-musicbox .vinyl { width: 58px; height: 58px; flex-basis: 58px; }
#homescreen .w-marsh { padding: 8px 10px; }
#homescreen .w-marsh .ms-ava { width: 38px; height: 38px; flex-basis: 38px; font-size: 21px; border-radius: 12px; }
/* 3 页桌面均保持单屏；分页只做横向 snap，不建立纵向滚动容器 */
#homescreen .home-page { flex: 0 0 100%; }
#homescreen .home-mini-grid { grid-template-columns: repeat(4, 1fr); }
#homescreen .page-dots { flex: 0 0 auto; }
/* v119 页2：产品感排版 —— 三组合间距拉开，内部不变 */
/* 组合1（组件+应用）与音乐盒间距 */
#homescreen .p2-top { display: flex; gap: 8px; margin-top: 0; margin-bottom: 8px; align-items: stretch; }
/* v146 页2整页下移：与页1 同款顶距，实用工具不贴顶 */
#homescreen .p2-pad { padding-top: 24px; }
/* 2x2 方形应用组件 */
#homescreen .w-appfolder {
  flex: 0 0 48%; background: var(--card); border-radius: 20px;
  box-shadow: var(--shadow-sm); padding: 10px 8px 8px;
  display: flex; flex-direction: column; }
#homescreen .w-appfolder .af-head {
  display: flex; align-items: center; gap: 5px; padding: 0 4px 6px;
  border-bottom: 1px solid var(--divider); margin-bottom: 6px; }
#homescreen .w-appfolder .af-head .af-emoji { font-size: 14px; }
#homescreen .w-appfolder .af-head b { font-size: 11px; color: var(--text-2); letter-spacing: .5px; }
#homescreen .w-appfolder .af-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px 4px; flex: 1; }
#homescreen .w-appfolder .af-item {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  background: none; border: none; cursor: pointer; padding: 4px 2px; border-radius: 10px;
  transition: background .15s; }
#homescreen .w-appfolder .af-item:active { background: var(--accent-soft); }
#homescreen .w-appfolder .af-icon { font-size: 24px; }
/* v140: af-item 图标改用贴纸 PNG（与桌面 PNG 图标引擎同源，缺图时 pngIconKey 回退 home 贴纸） */
#homescreen .w-appfolder .af-icon { display: flex; align-items: center; justify-content: center; height: 34px; }
#homescreen .w-appfolder .af-icon img { width: 34px; height: 34px; object-fit: contain; display: block; }
#homescreen .w-appfolder .af-name { font-size: 9px; color: var(--text-3); white-space: nowrap; }
/* 组件旁 2x2 应用（覆写 icon-grid 为 2 列） */
#homescreen .af-side { flex: 1; display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 8px; padding: 0; align-content: center; }
#homescreen .af-side .app-icon .icon-cont { width: 46px; height: 46px; }
#homescreen .af-side .app-icon .icon-label { font-size: 10px; }
/* 音乐盒与上方/下方间距 */
#homescreen .p2-top + .w-musicbox { margin-top: 8px; }
#homescreen .w-musicbox + .icon-grid { margin-top: 8px; }
/* ========== v120 桌宠 (DeskPet) ========== */
.desk-pet {
  position: absolute; z-index: 3; cursor: grab; user-select: none;
  -webkit-user-select: none; touch-action: none;
  transition: transform .2s var(--ease-spring);
}
.desk-pet.dragging { cursor: grabbing; transition: none; z-index: 4; }
.desk-pet .dp-body {
  width: 108px; height: 108px; position: relative;
  filter: drop-shadow(0 3px 6px rgba(0,0,0,.15));
  animation: dpFloat 3s ease-in-out infinite;
  transform-origin: bottom center;
}
.desk-pet .dp-body img {
  width: 100%; height: 100%; object-fit: contain; object-position: bottom;
  pointer-events: none;
}
/* —— 折叠态：悬浮气泡 —— */
.desk-pet .dp-chip {
  width: 52px; height: 52px; border-radius: 50%; overflow: hidden;
  border: 2.5px solid var(--card); box-shadow: var(--shadow-md), 0 0 0 1.5px var(--divider);
  background: var(--accent-soft);
  animation: dpChipFloat 3.2s ease-in-out infinite;
  display: none; position: relative; cursor: pointer;
}
.desk-pet .dp-chip img {
  width: 100%; height: 100%; object-fit: cover; object-position: 50% 12%;
  pointer-events: none;   /* 取凌子头部：图上部 */
}
.desk-pet .dp-chip .dp-chip-dot {
  position: absolute; top: -2px; right: -2px; width: 12px; height: 12px;
  border-radius: 50%; background: var(--accent); border: 2px solid var(--card);
  animation: dpChipPulse 2s ease-in-out infinite;
}
.desk-pet.collapsed .dp-body,
.desk-pet.collapsed .dp-bubble,
.desk-pet.collapsed .dp-heart,
.desk-pet.collapsed .dp-zzz,
.desk-pet.collapsed .dp-hunger { display: none; }
.desk-pet.collapsed .dp-chip { display: block; }
.desk-pet.collapsed { transition: transform .25s var(--ease-spring); }
.desk-pet.collapsed.dragging .dp-chip { animation: none; }
/* —— v124 旅行态：凌子不在家，显示行囊标记 —— */
.desk-pet .dp-away {
  width: 52px; height: 52px; border-radius: 50%; overflow: visible;
  border: 2.5px solid var(--card); box-shadow: var(--shadow-md), 0 0 0 1.5px var(--divider);
  background: var(--accent-soft);
  animation: dpChipFloat 3.2s ease-in-out infinite;
  display: none; position: relative; cursor: pointer;
}
.desk-pet .dp-away span {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 100%; border-radius: 50%; font-size: 24px; line-height: 1;
}
.desk-pet .dp-away .dp-away-dot {
  position: absolute; top: -2px; right: -2px; width: 12px; height: 12px;
  border-radius: 50%; background: var(--accent); border: 2px solid var(--card);
  animation: dpChipPulse 2s ease-in-out infinite;
}
.desk-pet.away .dp-body,
.desk-pet.away .dp-chip,
.desk-pet.away .dp-hunger,
.desk-pet.away .dp-zzz { display: none; }
.desk-pet.away .dp-away { display: block; }
.desk-pet.away.dragging .dp-away { animation: none; }
/* —— v124 宠物app：旅行中舞台 —— */
.pet-stage-away { align-items: center; justify-content: center; }
.pet-stage-away .pta-wrap { text-align: center; padding: 20px 0; }
.pet-stage-away .pta-emoji { font-size: 64px; animation: dpFloat 3s ease-in-out infinite; }
.pet-stage-away .pta-wrap b { display: block; font-size: 16px; margin-top: 10px; color: var(--text-1); }
.pet-stage-away .pta-spot { font-size: 14px; color: var(--accent-deep); margin-top: 4px; }
.pet-stage-away .pta-eta { font-size: 12px; color: var(--text-3); margin-top: 2px; }
/* —— v124 旅行手账区块（宠物app底部） —— */
.pet-travel-log { padding: 10px 16px 4px; border-top: 1px solid var(--divider); margin-top: 8px; }
.pet-travel-log .ptl-card { background: var(--card); border: 1px solid var(--divider); border-radius: 12px; padding: 8px 10px; margin-bottom: 6px; }
.pet-travel-log .ptl-card p { font-size: 12.5px; color: var(--text-1); margin-top: 3px; line-height: 1.5; }
.pet-travel-log .ptl-gifts { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 2px; }
/* ========== v179.6 设置页：一次只显示一个分区 + 规整行组件 ==========
   原来这里是一排 .set-chips 横向 chip（v125 加的）。它是 sticky 的，
   但：只列了 12/14 个分区、全都长得一样没有选中态、横向条配纵向长页、
   一行 12 个还要横向滚 —— 等于没有。现在 chip 整条删除，
   导航收进右上角 ☰（见 app.js 的 settings.menu()）。 */

/* 页顶提示条：告诉人「你现在看到的是 14 个分区里的一个」，
   否则单分区视图会被误当成整页。 */
.set-bar {
  display: flex; align-items: baseline; gap: 9px;
  padding: 12px 16px 4px; user-select: none;
}
.set-bar b { font-size: 16px; font-weight: 700; letter-spacing: -.01em; color: var(--text-1); }
.set-bar span { font-size: 11px; color: var(--text-3); }

/* 只渲染选中的那个分区。用 display 而不是条件渲染，
   是为了让那些散在设置页代码里的 $('#xxx', body).onclick 绑定继续有效。 */
.set-sec { display: none; padding: 8px 14px 4px; }
.set-sec.on { display: block; }

/* ---------- v179.7 Grok 桥：单飞行闸 + 派单台账 ---------- */
/* 单飞行闸：桥的输入框是全局共享的，必须显式告诉用户"有一单在飞"，
   否则他会以为可以连点。连点会变成一段交错乱码且无法回滚。 */
.gb-lock {
  margin: 0 14px 10px; padding: 8px 12px; border-radius: var(--radius-md);
  font-size: 12px; font-weight: 600; color: var(--text-2);
  background: var(--accent-soft); border: 1px solid var(--divider);
}
.gb-lock.free { color: var(--text-3); background: transparent; }

.gb-job {
  margin: 0 14px 8px; padding: 10px 12px;
  border-radius: var(--radius-md); background: var(--bg);
  border: 1px solid var(--divider);
}
.gb-job-h {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 8px; margin-bottom: 5px;
}
.gb-job-h b { font-size: 12.5px; font-weight: 700; color: var(--text-1); }
.gb-job-h span { font-size: 10.5px; color: var(--text-3); flex: 0 0 auto; }
.gb-job p {
  margin: 0; font-size: 13px; line-height: 1.62; color: var(--text-2);
  overflow-wrap: anywhere;
}
/* 回执要和派单内容在视觉上分开，否则 500 字的单子会把回复挤到看不见 */
.gb-reply {
  margin-top: 7px !important; padding: 8px 10px; border-radius: var(--radius-sm);
  background: var(--card); color: var(--text-1) !important;
  border-left: 2px solid var(--accent);
}
.gb-err { margin-top: 6px !important; color: #e05a7a !important; font-size: 12px !important; }
.set-sec-h { font-size: 13px; color: var(--text-2); letter-spacing: 1px; margin: 0 4px 8px; font-weight: 600; }
.set-card {
  background: var(--card); border-radius: var(--radius-lg); padding: 0 14px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--divider);
}
.set-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--divider); }
.set-row:last-child { border-bottom: none; }
.set-row .set-main { flex: 1; min-width: 0; }
.set-row .set-main b { display: block; font-size: 14px; color: var(--text-1); font-weight: 600; }
.set-row .set-main small { display: block; font-size: 11.5px; color: var(--text-3); margin-top: 2px; line-height: 1.45; }
.set-row .switch { flex: 0 0 auto; }
.set-row.set-col { flex-direction: column; align-items: stretch; gap: 8px; }
.set-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--divider); }
.set-row:last-child { border-bottom: none; }
.set-row .set-main { flex: 1; min-width: 0; }
.set-row .set-main b { display: block; font-size: 14px; color: var(--text-1); font-weight: 600; }
.set-row .set-main small { display: block; font-size: 11.5px; color: var(--text-3); margin-top: 2px; line-height: 1.45; }
.set-row .switch { flex: 0 0 auto; }
.set-row.set-col { flex-direction: column; align-items: stretch; gap: 8px; }
.set-slider { display: flex; align-items: center; gap: 10px; }
.set-slider input[type="range"] { flex: 1; min-width: 0; }
.set-slider output { flex: 0 0 auto; min-width: 52px; text-align: right; font-size: 13px; font-weight: 700; color: var(--accent-deep); font-family: var(--font-mono); white-space: nowrap; }
/* 预设 · 互动指令列表行：标题与分类标签整行放下，不两字换行 */
.set-row.preset-row .set-main b,
.set-row.preset-row .set-main small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.set-row.preset-row .btn.small { padding: 0 8px; font-size: 12px; height: 30px; }
.set-field { padding: 10px 0; border-bottom: 1px solid var(--divider); }
.set-field:last-of-type { border-bottom: none; }
.set-field label { display: block; font-size: 11.5px; color: var(--text-3); margin-bottom: 6px; }
.set-field .input { width: 100%; }
.set-note { display: block; font-size: 11px; color: var(--text-3); padding: 8px 0 4px; line-height: 1.5; }
/* AI 气泡下的模型名标注 */
.wx-model-tag { display: block; font-size: 9.5px; color: var(--text-3); opacity: .75; margin: 3px 0 0 4px; font-family: var(--font-mono); }
/* ========== v126 记忆宫殿：floatphone 式角色选择封面 + 日期分组记忆流 ========== */
.mp-hero {
  margin: 12px 16px; padding: 26px 18px 20px; text-align: center;
  background: var(--card); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm);
  border: 1px solid var(--divider);
}
.mp-word { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.mp-word i {
  font-style: normal; font-family: 'Courier New', var(--font-mono); font-weight: 700;
  font-size: 26px; color: var(--text-2); transform: rotate(-8deg);
}
.mp-word i:nth-child(2n) { transform: rotate(10deg) translateY(4px); }
.mp-word i:nth-child(3n) { transform: rotate(-4deg) translateY(-3px); }
.mp-q { font-size: 17px; font-weight: 700; color: var(--text-1); letter-spacing: 1px; }
.mp-sub { font-size: 12px; color: var(--text-3); margin-top: 5px; }
.mp-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 14px 0 16px; }
.mp-chips button {
  border: 1.5px dashed var(--text-3); background: none; color: var(--text-3);
  font-size: 13px; padding: 6px 18px; border-radius: 99px; cursor: pointer; transition: all .2s;
}
.mp-chips button.on {
  border: 1.5px solid var(--text-1); background: var(--text-1); color: var(--card);
  font-weight: 700;
}
.mp-view {
  display: block; width: 78%; margin: 0 auto; padding: 12px 0;
  border: none; border-radius: 99px; background: var(--text-1); color: var(--card);
  font-size: 15px; font-weight: 700; letter-spacing: 2px; cursor: pointer;
  transition: transform .15s;
}
.mp-view:active { transform: scale(.97); }
.mp-foot { margin-top: 14px; font-size: 10.5px; color: var(--text-3); letter-spacing: 1.5px; line-height: 1.8; text-transform: uppercase; }
/* 记忆流：日期分组卡片 */
.mp-day {
  margin: 0 16px 12px; background: var(--card); border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm); padding: 12px 14px;
}
.mp-date { font-size: 12px; color: var(--text-2); letter-spacing: 2px; padding-bottom: 8px; border-bottom: 1px dashed var(--divider); }
.mp-tags { display: flex; align-items: center; gap: 6px; padding: 8px 0 4px; }
.mp-tags em { font-style: normal; font-size: 11px; background: var(--accent-soft); color: var(--accent-deep); padding: 2px 8px; border-radius: 6px; }
.mp-tags .mp-cnt { margin-left: auto; font-size: 11px; color: var(--text-3); }
.mp-rec { display: flex; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--divider); align-items: flex-start; }
.mp-rec:last-child { border-bottom: none; padding-bottom: 2px; }
.mp-rec span { flex: 0 0 auto; font-size: 15px; }
.mp-rec p { flex: 1; margin: 0; font-size: 13px; color: var(--text-1); line-height: 1.55; }
/* v127 记忆层底部导航（floatphone 式） */
.mp-tabbar {
  position: sticky; bottom: 0; z-index: 5; display: flex;
  background: var(--card); border-top: 1px solid var(--divider);
  padding: 6px 8px calc(8px + env(safe-area-inset-bottom));
  box-shadow: 0 -4px 16px rgba(0,0,0,.05);
}
.mp-tabbar button {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
  background: none; border: none; color: var(--text-3); cursor: pointer; padding: 4px 0;
}
.mp-tabbar button i { font-style: normal; font-size: 19px; }
.mp-tabbar button span { font-size: 11px; font-weight: 600; }
.mp-tabbar button.on { color: var(--accent-deep); }
/* 系统视图小链接行 */
.mp-sysrow { display: flex; gap: 8px; padding: 0 16px 8px; flex-wrap: wrap; }
.mp-sysrow button {
  border: 1px solid var(--divider); background: var(--card); color: var(--text-2);
  font-size: 11.5px; padding: 5px 12px; border-radius: 99px; cursor: pointer;
}
.mp-sysrow button.on { background: var(--accent-soft); color: var(--accent-deep); border-color: var(--accent); font-weight: 700; }
/* 钉选按钮 */
.mp-pin { flex: 0 0 auto; border: none; background: none; font-size: 14px; cursor: pointer; opacity: .35; padding: 2px 4px; }
.mp-pin.on { opacity: 1; }
/* 工作记忆状态卡 */
.mp-workcard {
  margin: 0 16px 10px; padding: 10px 14px; border-radius: var(--radius-md);
  background: var(--accent-soft); color: var(--text-1); font-size: 12.5px; line-height: 1.6;
}
.mp-workcard b { color: var(--accent-deep); font-family: var(--font-mono); }
/* ========== v130 组件商城 ========== */
.ws-stack .ws-widget { width: 100%; height: 132px; margin-bottom: 8px; }
.ws-widget {
  flex: 1; height: 122px; position: relative; cursor: pointer;
  background-size: contain; background-position: center; background-repeat: no-repeat;
  transition: transform .2s var(--ease-spring);
}
.ws-widget:active { transform: scale(.97); }
/* 情话便签内页 */
.ws-widget .ws-note {
  position: absolute; inset: 18% 16% 20% 18%; display: flex; align-items: center; justify-content: center;
}
.ws-widget .ws-note p {
  margin: 0; font-size: 12px; font-weight: 700; color: #9a7590; text-align: center; line-height: 1.6;
}
/* 复古镜框内页 */
.ws-widget .ws-mirror {
  position: absolute; left: 50%; top: 46%; transform: translate(-50%, -50%);
  width: 62px; height: 78px; border-radius: 50% 50% 48% 48% / 56% 56% 44% 44%;
  overflow: hidden; display: flex; align-items: center; justify-content: center;
  background: #fdeef5;
}
.ws-widget .ws-mirror img { width: 100%; height: 100%; object-fit: cover; }
.ws-widget .ws-mirror-empty { font-size: 9px; color: #c99ab0; text-align: center; padding: 0 4px; }
/* 手账内页 */
.ws-widget .ws-notebook {
  position: absolute; inset: 20% 18% 18% 22%; display: flex; flex-direction: column;
  align-items: flex-start; justify-content: center; gap: 2px;
}
.ws-widget .ws-notebook b { font-size: 17px; color: #6b5a52; letter-spacing: 1px; }
.ws-widget .ws-notebook span { font-size: 10px; color: #a08d84; }
.ws-widget .ws-notebook em {
  font-style: normal; font-size: 9.5px; color: #b0708a; margin-top: 4px;
  background: rgba(255,255,255,.6); border-radius: 6px; padding: 2px 6px;
  max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
/* 商城卡片 */
.wst-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 0 16px; }
.wst-card {
  background: var(--card); border-radius: var(--radius-md); box-shadow: var(--shadow-sm);
  padding: 10px; display: flex; flex-direction: column; gap: 8px;
}
.wst-preview {
  background: repeating-conic-gradient(var(--accent-soft) 0% 25%, var(--card) 0% 50%) 50% / 16px 16px;
  border-radius: 12px; padding: 10px 6px; display: flex; justify-content: center;
}
.wst-preview .ws-widget { flex: 0 0 100%; }
.wst-meta b { display: block; font-size: 13.5px; color: var(--text-1); }
.wst-meta span { display: block; font-size: 10.5px; color: var(--text-3); margin-top: 2px; line-height: 1.4; }
/* ========== v132 聊天辅助 ========== */
/* 引用回复条（输入框上方） */
.quote-bar {
  display: flex; align-items: center; gap: 8px; margin: 0 12px 4px;
  background: var(--card); border: 1px solid var(--divider); border-left: 3px solid var(--accent);
  border-radius: 10px; padding: 6px 10px; font-size: 12px; color: var(--text-2);
}
.quote-bar .qb-t { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.quote-bar button { border: none; background: none; color: var(--text-3); cursor: pointer; font-size: 13px; }
/* 气泡内引用条 */
.quote-chip {
  display: block; font-size: 11px; background: rgba(0,0,0,.06); border-left: 2.5px solid var(--accent);
  border-radius: 6px; padding: 3px 7px; margin-bottom: 4px; color: inherit; opacity: .85;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* 提示词查看器悬浮按钮 */
.pv-fab {
  position: absolute; right: 12px; bottom: 150px; z-index: 6;
  width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--divider);
  background: var(--card); box-shadow: var(--shadow-md); cursor: pointer; font-size: 16px;
  transition: transform .15s;
}
.pv-fab:active { transform: scale(.9); }
/* 提示词查看内容 */
.pv-block { margin: 8px 0; }
.pv-block b { display: block; font-size: 12px; color: var(--accent-deep); margin-bottom: 4px; }
.pv-block pre {
  margin: 0; white-space: pre-wrap; word-break: break-all; font-size: 11px; line-height: 1.6;
  background: var(--bg); border: 1px solid var(--divider); border-radius: 10px; padding: 10px;
  max-height: 300px; overflow-y: auto; color: var(--text-2); font-family: var(--font-mono);
}
/* 左对齐布局（Chatbox 式） */
.chat-feed.feed-list .wx-row { justify-content: flex-start; }
.chat-feed.feed-list .wx-row.me { flex-direction: row; }
.chat-feed.feed-list .wx-row .wx-av { display: none; }
.chat-feed.feed-list .wx-row .bubble { max-width: 88%; border-radius: 14px; }
.chat-feed.feed-list .wx-row.me .bubble { background: var(--accent-soft); color: var(--text-1); border: 1px solid var(--divider); }
.chat-feed.feed-list .wx-row.me .bubble.quote-chip, .chat-feed.feed-list .quote-chip { color: var(--text-2); }
/* 对话背景：气泡下加半透明底保证可读 */
.chat-wrap.has-bg { position: relative; }
.chat-wrap.has-bg .chat-feed { background: rgba(255,255,255,.18); }
/* 群聊工具箱按钮 */
.gc-tools {
  margin-left: auto; border: 1px solid var(--divider); background: var(--card);
  color: var(--text-2); font-size: 11px; padding: 3px 10px; border-radius: 99px; cursor: pointer;
}
@keyframes dpChipFloat { 0%,100% { transform: translateY(0) } 50% { transform: translateY(-4px) } }
@keyframes dpChipPulse { 0%,100% { transform: scale(1); opacity: 1 } 50% { transform: scale(1.25); opacity: .7 } }
.desk-pet .dp-bubble {
  position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%) scale(0);
  background: var(--card); border: 1.5px solid var(--divider); border-radius: 12px;
  padding: 4px 10px; font-size: 11px; color: var(--text-1); white-space: nowrap;
  box-shadow: var(--shadow-sm); opacity: 0;
  transition: transform .25s var(--ease-spring), opacity .2s;
  pointer-events: none;
}
.desk-pet .dp-bubble.visible { transform: translateX(-50%) scale(1); opacity: 1; }
.desk-pet .dp-heart {
  position: absolute; top: -8px; right: -4px; font-size: 14px;
  opacity: 0; transform: scale(0); pointer-events: none;
}
.desk-pet .dp-heart.show { animation: dpHeart 1.2s ease-out forwards; }
.desk-pet .dp-zzz {
  position: absolute; top: -4px; right: 0; font-size: 12px;
  opacity: 0; pointer-events: none;
}
.desk-pet .dp-zzz.show { animation: dpZzz 2s ease-in-out infinite; }
.desk-pet .dp-hunger {
  position: absolute; top: -4px; left: -4px; font-size: 10px;
  background: rgba(232,90,144,.15); border-radius: 8px; padding: 1px 5px;
  color: var(--accent-deep); pointer-events: none;
}
@keyframes dpFloat { 0%,100% { transform: translateY(0) } 50% { transform: translateY(-6px) } }
@keyframes dpPoke { 0% { transform: scale(1) rotate(0) } 30% { transform: scale(.85) rotate(-8deg) } 60% { transform: scale(1.1) rotate(4deg) } 100% { transform: scale(1) rotate(0) } }
@keyframes dpHeart { 0% { opacity: 0; transform: scale(0) translateY(0) } 30% { opacity: 1; transform: scale(1.2) translateY(-8px) } 100% { opacity: 0; transform: scale(.8) translateY(-24px) } }
@keyframes dpZzz { 0%,100% { opacity: 0; transform: translateY(0) } 50% { opacity: 1; transform: translateY(-8px) } }
.desk-pet.poked .dp-body { animation: dpPoke .4s ease-out; }
@media (max-width: 380px) {
  #homescreen .icon-cont { width: 43px; height: 43px; }
  #homescreen .folder-card .icon-cont { width: 36px; height: 36px; }
  #homescreen .grid-pad { padding-left: 8px; padding-right: 8px; }
}
/* 分页自适应：当内容被编排到新页时，仍只允许横向翻页 */
#home-pages > .home-page { flex: 0 0 100%; min-height: 0; height: 100%; }
#home-pages > .home-page > .grid-pad { width: 100%; min-height: 0; flex: 0 0 auto; }
/* 页1 组件垫：纵向弹性布局，让快捷行沉到页面下部。
   测量期不拉伸（避免干扰 paginate 溢出判断），分页完成后再加 .stretch。 */
#home-pages .p1-pad { display: flex; flex-direction: column; padding-top: 14px; }
#home-pages > .home-page > .grid-pad.p1-pad.stretch { flex: 1 1 auto; min-height: 0; }
/* v179 页1：把中间空档腾成桌宠的专属活动区。
   原 w-row 20 / w-diary 18 + 快捷行 14px 底内边距把空档挤到 ~90px（屏幕像素），
   108px 的桌宠放不下 → 压在「创作灵感 / 找 TA 聊聊」和快捷图标行上。
   现在收紧到 8/8 且快捷行贴底，空档 ≈ 160px（屏幕像素）≈ 127 布局px，
   刚好容纳桌宠 108px + 漂浮动画（dpFloat 只向上 translateY(-6px)）的余量。 */
#home-pages .p1-quick { margin-top: auto; padding: 6px 2px 0; }
/* v144 页1呼吸感：组件整体下移一行，快捷行 margin:auto 钉底。 */
#homescreen .p1-pad { padding-top: 24px; }
#homescreen .p1-pad .w-row { margin-bottom: 8px; }
#homescreen .p1-pad .w-diary { margin-bottom: 8px; }
#home-pages .p1-quick .icon-label { font-size: 12px; }
#home-pages { min-height: 0; overscroll-behavior: contain; }
/* 全屏层统一 width:100%，防止视口时序下 inset:0 量出超宽 */
#homescreen, .home-head, #home-deco, .page-dots, #applist, #appscreen, #notif-center, #callui, #twinphone, #overlay { max-width: 100vw; }
#phone, #phone > * { max-width: 100%; }
#homescreen #dock { flex: 0 0 76px; }
.page-dots button { width: 7px; height: 7px; padding: 0; border: 0; border-radius: 8px; background: var(--text-3); cursor: pointer; position: relative; }
.page-dots button::after { content: ''; position: absolute; inset: -7px -3px; }
.page-dots button.cur { width: 18px; background: var(--text-1); }
#home-deco img, .wx-sticker img, .sticker-pick img { image-rendering: auto; }
[data-theme="coquette"] #home-deco { inset: 0; display: block; }
[data-theme="coquette"] #home-deco img { filter: none; }
[data-theme="coquette"] .icon-cont canvas, [data-theme="coquette"] .icon-cont .emo { display: none; }
[data-theme="coquette"] .icon-cont svg { display: block; stroke: #141414; }
.page-dots { display: flex; justify-content: center; gap: 7px; padding: 8px 0 10px; }
.page-dots span { width: 6px; height: 6px; border-radius: var(--radius-full); background: var(--text-3); opacity: .6; transition: all var(--dur-base); }
.page-dots span.cur { width: 18px; background: var(--text-1); opacity: 1; }
[data-theme="nuomi"] .page-dots span.cur { border-radius: 3px; }

/* ---------- Widget ---------- */
.widget { background: var(--zg-widget); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); padding: 16px; }
.widget.w-clock { text-align: center; padding: 18px 16px 14px; }
.w-clock .wc-time { font-family: var(--font-display); font-size: 44px; font-weight: 700; letter-spacing: -1px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.w-clock .wc-date { font-size: 12px; letter-spacing: 3px; color: var(--text-2); margin-top: 2px; text-transform: uppercase; }
[data-theme="sweetpink"] .w-clock .wc-time { color: var(--accent-deep); }
.w-char { display: flex; align-items: center; gap: 12px; cursor: pointer; min-height: 88px; transition: transform var(--dur-fast) var(--ease-spring); }
.w-char:active { transform: scale(.98); }
.w-char .avatar {
  position: relative; width: 56px; height: 56px; border-radius: 50%;
  background: var(--accent-soft); display: flex; align-items: center; justify-content: center;
  font-size: 30px; flex-shrink: 0; border: 2px solid var(--card); box-shadow: var(--shadow-sm);
}
.w-char .online-dot { position: absolute; right: 1px; bottom: 1px; width: 13px; height: 13px; border-radius: 50%; background: #34c759; border: 2.5px solid var(--card); }
.w-char .wc-name { font-size: 17px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.w-char .wc-name .tag { font-size: 10px; font-weight: 700; color: #34c759; letter-spacing: 1px; }
.w-char .wc-mood { font-size: 13px; color: var(--text-2); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.w-char .wc-mood::before { content: "▶ "; font-size: 9px; color: var(--accent); }
.w-char .wc-aff { margin-left: auto; text-align: right; flex-shrink: 0; }
.w-char .wc-aff b { font-size: 18px; color: var(--accent); }
.w-char .wc-aff span { display: block; font-size: 10px; color: var(--text-2); }
.w-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.w-mini { display: flex; gap: 10px; align-items: center; }
.w-mini .wm-ico { font-size: 24px; }
.w-mini b { font-size: 15px; display: block; }
.w-mini span { font-size: 11px; color: var(--text-2); }
.w-music { display: flex; align-items: center; gap: 10px; }
.w-music .wm-cover { width: 44px; height: 44px; border-radius: 10px; background: linear-gradient(135deg, var(--accent), var(--accent-deep)); display: flex; align-items: center; justify-content: center; color: #fff; font-size: 20px; animation: spin 8s linear infinite; }
.w-music .wm-meta { flex: 1; min-width: 0; }
.w-music b { font-size: 14px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.w-music span { font-size: 11px; color: var(--text-2); }
.w-music .eq { display: flex; gap: 2px; align-items: flex-end; height: 16px; }
.w-music .eq i { width: 3px; background: var(--accent); border-radius: 2px; animation: eq .8s ease-in-out infinite; }
.w-music .eq i:nth-child(1) { height: 60%; animation-delay: 0s; }
.w-music .eq i:nth-child(2) { height: 100%; animation-delay: .2s; }
.w-music .eq i:nth-child(3) { height: 40%; animation-delay: .4s; }
@keyframes eq { 50% { transform: scaleY(.4); } }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 桌面图标网格 ---------- */
.icon-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px 16px; padding: 2px 4px; }
.app-icon { display: flex; flex-direction: column; align-items: center; gap: 6px; position: relative; border-radius: var(--radius-md); padding: 2px; }
.app-icon:active .icon-cont { transform: scale(.9); }
.icon-cont {
  width: var(--icon-cont-w); height: var(--icon-cont-w);
  background: var(--icon-cont-bg); border-radius: var(--icon-radius);
  box-shadow: var(--shadow-sm);
  display: flex; align-items: center; justify-content: center;
  transition: transform var(--dur-fast) var(--ease-spring);
  position: relative; overflow: hidden;
}
[data-theme="zhimeng"] .icon-cont { box-shadow: 0 1px 4px rgba(29,33,41,.05); }
[data-theme="sweetpink"] .icon-cont { backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.icon-cont .emo { font-size: calc(var(--icon-cont-w) * .5); line-height: 1; }
.icon-cont svg { width: 55%; height: 55%; }
[data-theme="zhimeng"] .icon-cont svg { width: 46%; height: 46%; stroke: var(--text-1); }
.icon-cont canvas { width: 60%; height: 60%; image-rendering: pixelated; }
[data-theme="zhimeng"] .icon-cont canvas { display: none; }
[data-theme="zhimeng"] .icon-cont svg { display: block; }
[data-theme="zhimeng"] .icon-cont .emo { display: none; }
[data-theme="nuomi"] .icon-cont svg, [data-theme="custom"] .icon-cont svg { display: none; }
[data-theme="nuomi"] .icon-cont .emo { display: none; }
[data-theme="nuomi"] .icon-cont canvas { display: block; }
[data-theme="sweetpink"] .icon-cont canvas, [data-theme="custom"] .icon-cont canvas { display: none; }
[data-theme="sweetpink"] .icon-cont .emo { display: block; }
[data-theme="custom"] .icon-cont .emo { display: block; }
/* Coquette：emoji 贴纸 + 白底黑描边容器（app.js 图标渲染同步支持） */
[data-theme="coquette"] .icon-cont canvas, [data-theme="coquette"] .icon-cont svg { display: none; }
[data-theme="coquette"] .icon-cont .emo { display: block; }
/* 实图贴纸图标引擎：有 stimg 时隐藏一切渲染层，只显示贴纸图（coquette=dark 系，sweetpink=pink 系） */
[data-theme="coquette"] .icon-cont .stimg, [data-theme="sweetpink"] .icon-cont .stimg { display: block; width: 100%; height: 100%; object-fit: contain; position: absolute; inset: 0; z-index: 3; }
[data-theme="coquette"] .icon-cont:has(.stimg) .emo,
[data-theme="coquette"] .icon-cont:has(.stimg) canvas,
[data-theme="coquette"] .icon-cont:has(.stimg) svg,
[data-theme="sweetpink"] .icon-cont:has(.stimg) .emo,
[data-theme="sweetpink"] .icon-cont:has(.stimg) canvas,
[data-theme="sweetpink"] .icon-cont:has(.stimg) svg { display: none; }
[data-theme="coquette"] .icon-cont:has(.stimg),
[data-theme="sweetpink"] .icon-cont:has(.stimg) { background: transparent !important; border: none !important; box-shadow: none !important; }
/* ---------- 主题商城 PNG 图标（唯一功能入口图标系统） ----------
   全主题统一：桌面/Dock/应用库/文件夹走 .icon-cont 内的贴纸 PNG；
   超级应用 tab、发现页、分类、工坊卡走 .compact-icon。
   主题个性保留在底板/阴影/材质上：coquette/sweetpink 透明贴纸，nuomi/zhimeng/custom 贴纸浮于底板。 */
.icon-cont .stimg { display: block; width: 100%; height: 100%; object-fit: contain; position: absolute; inset: 0; z-index: 3; user-select: none; -webkit-user-drag: none; }
[data-theme="nuomi"] .icon-cont:has(.stimg) .emo, [data-theme="nuomi"] .icon-cont:has(.stimg) canvas, [data-theme="nuomi"] .icon-cont:has(.stimg) svg,
[data-theme="zhimeng"] .icon-cont:has(.stimg) .emo, [data-theme="zhimeng"] .icon-cont:has(.stimg) canvas, [data-theme="zhimeng"] .icon-cont:has(.stimg) svg,
[data-theme="custom"] .icon-cont:has(.stimg) .emo, [data-theme="custom"] .icon-cont:has(.stimg) canvas, [data-theme="custom"] .icon-cont:has(.stimg) svg { display: none; }
.compact-icon { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; flex-shrink: 0; }
.compact-icon img { width: 100%; height: 100%; object-fit: contain; user-select: none; -webkit-user-drag: none; }
.list-row .lr-ico .compact-icon { width: 30px; height: 30px; }
.tb-cat .compact-icon { width: 42px; height: 42px; border-radius: 50%; background: var(--accent-soft); padding: 7px; box-sizing: border-box; }
.tb-good .pic .compact-icon { width: 72px; height: 72px; }
.ws-card .compact-icon { width: 52px; height: 52px; border-radius: var(--radius-md); background: var(--icon-cont-bg); box-shadow: var(--shadow-sm); }
[data-theme="coquette"] .ws-card .compact-icon, [data-theme="sweetpink"] .ws-card .compact-icon { background: transparent; box-shadow: none; }
.wx-tabbar button .compact-icon, .super-tabbar button .compact-icon { width: 22px; height: 22px; filter: grayscale(1); opacity: .5; transition: filter var(--dur-fast), opacity var(--dur-fast); }
.wx-tabbar button.on .compact-icon, .super-tabbar button.on .compact-icon { filter: none; opacity: 1; }
.icon-label { font-size: 13px; color: var(--text-1); max-width: 78px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
[data-theme="zhimeng"] .icon-label { font-size: 12px; }
.app-icon .badge { position: absolute; top: -2px; right: 6px; min-width: 18px; height: 18px; border-radius: var(--radius-full); background: var(--accent); color: #fff; font-size: 11px; font-weight: 600; display: flex; align-items: center; justify-content: center; padding: 0 5px; box-shadow: 0 0 10px var(--accent); }
.app-icon .dot-badge { position: absolute; top: 2px; right: 12px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent); }
/* 长按编辑抖动 */
.icon-editing .app-icon { animation: shake .35s infinite; }
.icon-editing .icon-cont::after {
  content: "✕"; position: absolute; top: -6px; left: -6px; width: 20px; height: 20px;
  background: #ff3b30; color: #fff; border-radius: 50%; font-size: 11px;
  display: flex; align-items: center; justify-content: center;
}
@keyframes shake { 0%,100% { transform: translate(0); } 25% { transform: translate(-1.5px, 1px) rotate(-1.2deg); } 75% { transform: translate(1.5px, -1px) rotate(1.2deg); } }

/* 桌面装饰（吉祥物/贴纸） */
.home-deco { position: absolute; right: 14px; bottom: 122px; display: flex; gap: 8px; pointer-events: none; opacity: .8; z-index: 5; font-size: 34px; filter: drop-shadow(0 4px 8px rgba(0,0,0,.12)); }
[data-theme="zhimeng"] .home-deco { display: none; }
.sticker-rain span { position: absolute; font-size: 20px; opacity: .55; animation: floaty 5s ease-in-out infinite; pointer-events: none; }
@keyframes floaty { 50% { transform: translateY(-8px) rotate(8deg); } }

/* ---------- Dock ---------- */
#dock {
  margin: 4px 14px calc(20px + env(safe-area-inset-bottom, 0px));
  height: 82px; border-radius: 26px;
  background: var(--zg-bottombar); backdrop-filter: blur(24px) saturate(1.6); -webkit-backdrop-filter: blur(24px) saturate(1.6);
  box-shadow: var(--shadow-md), inset 0 0 0 .5px rgba(255,255,255,.7);
  display: flex; align-items: center; justify-content: space-around; padding: 0 8px; z-index: 20;
}
#dock .app-icon .icon-label { display: none; }
#dock .icon-cont { width: 58px; height: 58px; }
[data-theme="zhimeng"] #dock .icon-cont { width: 50px; height: 50px; }

/* ---------- 应用库 ---------- */
#applist { background: var(--zg-nav); display: flex; flex-direction: column; }
#applist::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--wallpaper); filter: blur(30px) brightness(1.06); transform: scale(1.1); }
.applist-head { display: flex; align-items: center; gap: 8px; padding: 4px 12px 8px; }
.applist-head b { font-size: 20px; font-weight: 700; }
.applist-count { font-size: 12px; color: var(--text-2); letter-spacing: 1px; }
.applist-search { padding: 0 16px 8px; }
.applist-search input {
  width: 100%; height: 38px; border-radius: var(--radius-full); border: none;
  background: var(--glass); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  padding: 0 16px; font-size: 14px; color: var(--text-1);
}
.applist-search input::placeholder { color: var(--text-3); }
#applist-body { flex: 1; overflow-y: auto; padding: 4px 16px 40px; }
.al-cat { font-size: 13px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--text-2); margin: 18px 2px 10px; }
[data-theme="zhimeng"] .al-cat::before { content: attr(data-en) " "; color: var(--accent); }
.al-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px 6px; }
.al-grid .app-icon .icon-cont { width: 52px; height: 52px; }
.al-grid .icon-label { font-size: 11px; max-width: 64px; }

/* ---------- App 视口 ---------- */
#appscreen { background: var(--bg); display: flex; flex-direction: column; z-index: 30; }
#app-header {
  height: 52px; flex-shrink: 0; display: flex; align-items: center; gap: 6px; padding: 0 8px;
  background: var(--zg-topbar); backdrop-filter: blur(20px) saturate(1.5); -webkit-backdrop-filter: blur(20px) saturate(1.5);
  border-bottom: .5px solid var(--divider); z-index: 5;
}
.app-title-wrap { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 8px; }
#app-title { font-size: 17px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#app-sub { font-size: 11px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#app-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; position: relative; }
#app-body::-webkit-scrollbar { width: 0; }
.icon-btn {
  min-width: 44px; height: 44px; border-radius: var(--radius-md);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 20px; color: var(--text-1); transition: background var(--dur-fast), transform var(--dur-fast) var(--ease-spring);
}
.icon-btn:active { transform: scale(.88); background: var(--accent-soft); }

/* v179.49 「一起听」播放器按钮：把她画的贴纸放进去，替掉原来的 unicode 字形。
   尺寸按图的比例给 —— ◀◀ 是 114×73、▶▶ 是 113×73（都很扁），
   给正方形尺寸会被拉变形，所以这里用 width 定宽、height:auto。 */
.icon-btn.mu-ico img { display: block; width: 34px; height: auto; }
/* 播放/暂停那颗大圆钮：⏸ 图本身是自带粉底的整圆，铺满按钮刚好盖住 accent 底色，
   不会露出两层粉圈的边。 */
#mu-play img { display: block; width: 100%; height: 100%; object-fit: contain; border-radius: 50%; }

/* ---------- Home Indicator ---------- */
/* v179 修复：原来 ::after 把热区从 134×5 撑到 214×33，z-index:200 又压在所有 App 上面
   → 任何 App 底部那条带子里点一下就回主界面（用户反馈：很容易误触）。
   真实手机这块是 Home Indicator：点它没反应，必须【有意上滑】才回桌面。
   现在：bar 本身 pointer-events:none（不吃掉 App 自己的点击），
   返回改由 Home.init() 里注册的手势承担（见 app.js v179 注释）。 */
#homebar {
  position: absolute; bottom: 0; left: 50%;
  width: 134px; height: 5px; border-radius: 3px;
  background: var(--text-1); opacity: .85;
  z-index: 200; margin-bottom: 8px;
  pointer-events: none;
  transform: translateX(-50%);
  transition: width .18s cubic-bezier(.2,.9,.3,1.2), opacity .18s, background .18s;
}
/* 手势进行中：条变宽变亮，给"我正在返回"的确定感 */
#homebar.wb-armed { width: 168px; opacity: 1; background: var(--accent); }
#homebar.wb-armed-ready { width: 190px; opacity: 1; }

/* 底部安全操作区：只有这里的上滑手势会回主界面，视觉上几乎隐形 */
#homebar-zone {
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 30px;
  z-index: 199;
  pointer-events: none;
  touch-action: none;
}
/* 只有手势进行中才显形，平时不打扰（也不会吃掉 App 的点击） */
#homebar-zone.armed { pointer-events: auto; }
#homebar-hint {
  position: absolute; left: 50%; bottom: 30px;
  transform: translateX(-50%) translateY(6px);
  padding: 6px 14px; border-radius: 999px;
  background: rgba(20,16,24,.82); color: #fff;
  font-size: 11.5px; font-weight: 600; letter-spacing: .02em;
  white-space: nowrap; opacity: 0; pointer-events: none;
  transition: opacity .16s, transform .16s;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
#homebar-hint.on { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- 通知中心抽屉 ---------- */
#notif-center {
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  background: var(--glass); backdrop-filter: blur(28px) saturate(1.6); -webkit-backdrop-filter: blur(28px) saturate(1.6);
  transform: translateY(-105%); transition: transform var(--dur-slow) var(--ease-out);
  z-index: 150; padding: calc(var(--sb-h) + 10px) 16px 16px;
  display: flex; flex-direction: column; box-shadow: var(--shadow-lg);
}
#notif-center.open { transform: translateY(0); }
.notif-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.notif-head b { font-size: 16px; }

/* —— v166 控制中心：云朵卡片 + 滑块 + 快捷开关 —— */
#notif-controls { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.nc-cards { display: flex; gap: 8px; }
.nc-cloud { flex: 1; display: flex; align-items: center; gap: 8px; padding: 10px 14px;
  background: rgba(255,255,255,.12); backdrop-filter: blur(10px); border-radius: 24px 20px 22px 18px;
  border: 1px solid rgba(255,255,255,.15); }
.nc-cloud.nc-wifi { border-radius: 20px 24px 18px 22px; }
.nc-ico { font-size: 18px; }
.nc-cloud b { font-size: 13px; color: var(--text-1); }
.nc-cloud small { display: block; font-size: 10px; color: var(--text-3); }
.nc-sliders { display: flex; gap: 8px; }
.nc-slider { flex: 1; display: flex; align-items: center; gap: 6px; padding: 8px 12px;
  background: rgba(255,255,255,.1); border-radius: 16px; }
.nc-slider input[type=range] { flex: 1; height: 6px; -webkit-appearance: none; appearance: none;
  background: rgba(255,255,255,.2); border-radius: 3px; outline: none; }
.nc-slider input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px;
  border-radius: 50%; background: var(--accent); box-shadow: 0 2px 6px rgba(0,0,0,.2); cursor: pointer; }
.nc-val { font-size: 11px; color: var(--text-2); min-width: 18px; text-align: right; }
.nc-toggles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.nc-tog { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 4px;
  background: rgba(255,255,255,.1); border-radius: 16px; border: 1px solid rgba(255,255,255,.08);
  transition: all .2s; cursor: pointer; }
.nc-tog-ico { font-size: 18px; }
.nc-tog-lbl { font-size: 10px; color: var(--text-2); }
.nc-tog.on { background: var(--accent); border-color: var(--accent); }
.nc-tog.on .nc-tog-lbl { color: var(--accent-contrast); }
#notif-list { overflow-y: auto; flex: 1 1 auto; display: flex; flex-direction: column; gap: 8px; }
.notif-item {
  display: flex; gap: 10px; padding: 12px; border-radius: var(--radius-md);
  background: var(--card); box-shadow: var(--shadow-sm); animation: notif-in .3s var(--ease-out) both;
}
.notif-item .n-icon { width: 36px; height: 36px; border-radius: 9px; background: var(--accent-soft); display: flex; align-items: center; justify-content: center; font-size: 19px; flex-shrink: 0; }
.notif-item .n-body { flex: 1; min-width: 0; }
.notif-item .n-title { font-size: 13px; font-weight: 600; }
.notif-item .n-text { font-size: 13px; color: var(--text-2); }
.notif-item .n-time { font-size: 11px; color: var(--text-3); }
.empty-hint { text-align: center; color: var(--text-3); font-size: 13px; padding: 40px 20px; }
.empty-hint .big { font-size: 40px; display: block; margin-bottom: 10px; }
/* ============================================================
   组件库
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 44px; padding: 0 22px; border-radius: var(--radius-full);
  background: var(--accent); color: var(--accent-contrast);
  font-size: 15px; font-weight: 600;
  transition: transform var(--dur-fast) var(--ease-spring), filter var(--dur-fast), opacity var(--dur-fast);
}
.btn:active { transform: scale(.96); filter: brightness(1.06); }
.btn.secondary { background: transparent; color: var(--accent); box-shadow: inset 0 0 0 1.5px var(--accent); }
.btn.ghost { background: transparent; color: var(--accent); box-shadow: none; padding: 0 10px; }
.btn.small { height: 32px; padding: 0 14px; font-size: 13px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .4; pointer-events: none; }
.capsule-btn {
  height: 28px; padding: 0 12px; border-radius: var(--radius-full);
  background: var(--accent-soft); color: var(--accent-deep); font-size: 12px; font-weight: 600;
}
.capsule-btn.plain { background: var(--card-alt); color: var(--text-2); }
.card { background: var(--card); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); padding: 16px; margin-bottom: 12px; }
.card.soft { background: var(--card-alt); box-shadow: none; }
.list-row {
  display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 16px;
  background: var(--card); border-bottom: .5px solid var(--divider); cursor: pointer;
  transition: background var(--dur-fast);
}
.list-row:active { background: var(--card-alt); }
.list-row .lr-ico { width: 30px; text-align: center; font-size: 20px; flex-shrink: 0; }
.list-row .lr-title { flex: 1; font-size: 16px; min-width: 0; }
.list-row .lr-title small { display: block; font-size: 12px; color: var(--text-2); font-weight: 400; }
.list-row .lr-value { font-size: 14px; color: var(--text-2); display: flex; align-items: center; gap: 4px; }
.list-group { border-radius: var(--radius-md); overflow: hidden; margin: 0 16px 18px; box-shadow: var(--shadow-sm); }
.list-group-title { font-size: 13px; text-transform: uppercase; letter-spacing: 1.5px; color: var(--text-2); margin: 18px 20px 8px; }
.input, textarea.input {
  width: 100%; min-height: 44px; border-radius: var(--radius-sm);
  border: 1px solid var(--divider); background: var(--card);
  padding: 10px 14px; font-size: 15px; color: var(--text-1); transition: border var(--dur-fast);
}
.input:focus { border-color: var(--accent); }
textarea.input { resize: none; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; color: var(--text-2); margin-bottom: 6px; }
.pill-tabs { display: flex; gap: 8px; padding: 10px 16px; overflow-x: auto; scrollbar-width: none; flex-shrink: 0; }
.pill-tabs::-webkit-scrollbar { display: none; }
.pill-tabs button {
  height: 32px; padding: 0 16px; border-radius: var(--radius-full); white-space: nowrap;
  background: var(--card); color: var(--text-2); font-size: 13px; font-weight: 500; box-shadow: var(--shadow-sm);
  transition: all var(--dur-fast);
}
.pill-tabs button.on { background: var(--accent); color: var(--accent-contrast); font-weight: 600; }
.seg { display: flex; background: var(--card-alt); border-radius: var(--radius-sm); padding: 3px; margin: 0 16px 12px; }
.seg button { flex: 1; height: 30px; border-radius: 8px; font-size: 13px; color: var(--text-2); transition: all var(--dur-fast); }
.seg button.on { background: var(--card); color: var(--text-1); font-weight: 600; box-shadow: var(--shadow-sm); }
.slider-row { display: flex; align-items: center; gap: 12px; padding: 10px 16px; }
.slider-row label { font-size: 13px; color: var(--text-2); width: 76px; flex-shrink: 0; }
.slider-row output { font-size: 12px; color: var(--accent); width: 44px; text-align: right; font-variant-numeric: tabular-nums; }
input[type="range"] { flex: 1; appearance: none; -webkit-appearance: none; height: 4px; border-radius: 2px; background: var(--divider); }
input[type="range"]::-webkit-slider-thumb { appearance: none; -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 5px rgba(0,0,0,.25), 0 0 0 1px var(--divider); }
.switch { position: relative; width: 40px; height: 24px; flex-shrink: 0; }
.switch input { opacity: 0; width: 100%; height: 100%; position: absolute; z-index: 2; cursor: pointer; }
.switch i { position: absolute; inset: 0; border-radius: var(--radius-full); background: var(--divider); transition: background var(--dur-base); }
.switch i::after { content: ""; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.2); transition: transform var(--dur-base) var(--ease-spring); }
.switch input:checked + i { background: #34c759; }
.switch input:checked + i::after { transform: translateX(16px); }

/* 底部弹层 / 模态 / Toast */
#overlay { position: absolute; inset: 0; background: var(--mask); opacity: 0; pointer-events: none; transition: opacity var(--dur-base); z-index: 300; }
#overlay.show { opacity: 1; pointer-events: auto; }
#sheet {
  position: absolute; left: 0; right: 0; bottom: 0; max-height: 76%;
  background: var(--zg-sheet); border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  transform: translateY(105%); transition: transform var(--dur-slow) var(--ease-out);
  z-index: 310; display: flex; flex-direction: column; box-shadow: var(--shadow-lg);
}
#sheet.open { transform: translateY(0); }
.sheet-grip { width: 36px; height: 4px; border-radius: 2px; background: var(--divider); margin: 8px auto 2px; flex-shrink: 0; }
#sheet-body { overflow-y: auto; padding: 12px 16px calc(20px + env(safe-area-inset-bottom, 0px)); }
#modal { position: absolute; inset: 0; z-index: 320; display: flex; align-items: center; justify-content: center; padding: 32px; opacity: 0; pointer-events: none; transition: opacity var(--dur-base); background: var(--mask); }
#modal.open { opacity: 1; pointer-events: auto; }
.modal-card { width: 100%; max-width: 320px; background: var(--card); border-radius: var(--radius-lg); padding: 22px 18px; box-shadow: var(--shadow-lg); transform: scale(.92); transition: transform var(--dur-base) var(--ease-spring); max-height: 80%; overflow-y: auto; }
#modal.open .modal-card { transform: scale(1); }
.modal-card h3 { font-size: 17px; margin-bottom: 8px; }
.modal-card p { font-size: 14px; color: var(--text-2); margin-bottom: 16px; }
.modal-actions { display: flex; gap: 10px; }
.modal-actions .btn { flex: 1; height: 40px; }
#toast {
  position: absolute; top: calc(var(--sb-h) + 10px); left: 50%; transform: translate(-50%, -16px);
  background: rgba(20,20,24,.82); color: #fff; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  padding: 9px 18px; border-radius: var(--radius-full); font-size: 13px; z-index: 400;
  opacity: 0; pointer-events: none; transition: all var(--dur-base) var(--ease-out); max-width: 82%;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ============================================================
   聊天
   ============================================================ */
.chat-wrap { display: flex; flex-direction: column; height: 100%; }
/* v179.45 键盘弹出时把输入栏顶到键盘上方。
   .kb-root 是 position:absolute; bottom:0; z-index:260 的覆盖层（高 286px），
   原来它直接压在输入栏上 —— 键盘一开，整个输入栏看不见。
   这里给 .inputbar 加一个下边距 = 键盘高度（--kb-inset 由 Kb.openFor/close 写进 #phone）。
   .chat-feed 是 flex:1，边距一来消息区自动缩，底部消息不会被键盘顶掉。
   高度用 JS 量 .kb-root 的真实 offsetHeight，不写死 —— 小屏媒体查询里键盘是 262px。 */
.inputbar { margin-bottom: var(--kb-inset, 0px); transition: margin-bottom .2s var(--ease-out); }
.chat-sub { padding: 8px 16px; font-size: 11px; color: var(--text-3); font-family: var(--font-mono); text-align: center; }
.chat-feed { flex: 1; overflow-y: auto; padding: 8px 14px 12px; display: flex; flex-direction: column; gap: 10px; background: var(--zg-chatbg); }
/* v179.45 撤掉 v175 的「消息贴底」垫片。
   原来这里是 .chat-feed::before { content:''; display:block; margin-top:auto }，
   作用是把少量消息顶到输入栏上方（v175 刻意加的）。现在按要求改回：
   消息从昵称下方开始往下排；消息多了照旧 overflow-y 滚动。 */
.msg-row { display: flex; gap: 8px; max-width: 86%; animation: msg-in .22s var(--ease-out) both; }
.msg-row.me { align-self: flex-end; flex-direction: row-reverse; }
/* 本机头像方向约束：me 行头像必须出现在消息右侧（row-reverse 已保证，这里兜底非 flex 场景） */
.msg-row.me .msg-avatar { order: 2; }
.msg-row:not(.me) .msg-avatar { order: 0; }
/* 头像更换入口 */
.profile-hero .avatar { position: relative; }
.profile-hero .avatar .av-edit { position: absolute; right: -2px; bottom: -2px; width: 22px; height: 22px; border-radius: 50%; background: var(--card); box-shadow: var(--shadow-sm); font-size: 11px; display: flex; align-items: center; justify-content: center; }
.av-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; padding: 10px 6px 4px; }
.av-cell { aspect-ratio: 1; border-radius: 12px; background: var(--card-alt); font-size: 24px; display: flex; align-items: center; justify-content: center; cursor: pointer; border: 1.5px solid transparent; transition: transform var(--dur-fast) var(--ease-spring); }
.av-cell:active { transform: scale(.9); }
.av-cell.on { border-color: var(--accent); background: var(--accent-soft); }
@keyframes msg-in { from { opacity: 0; transform: translateY(8px); } }
.msg-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--accent-soft); display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
.msg-col { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.msg-name { font-size: 11px; color: var(--text-3); padding-left: 4px; }
.bubble {
  padding: 10px 14px; font-size: 15px; line-height: 1.55; word-break: break-word;
  background: var(--zg-bubble-tn); border-radius: 4px 18px 18px 18px; box-shadow: var(--shadow-sm);
  white-space: pre-wrap; user-select: text;
}
.msg-row.me .bubble { background: var(--zg-bubble-me); color: var(--zg-bubble-me-contrast); border-radius: 18px 4px 18px 18px; }
.bubble.narration {
  background: transparent; box-shadow: none; border-left: 3px solid var(--accent);
  border-radius: 0 10px 10px 0; padding: 6px 12px; font-style: italic; color: var(--text-2);
  font-size: 14px; margin-left: 6px;
}
.bubble.sysmsg { background: var(--card-alt); color: var(--text-2); font-size: 12px; align-self: center; border-radius: var(--radius-full); padding: 5px 14px; box-shadow: none; }
.bubble .mood-tag { display: inline-block; font-size: 10px; color: var(--accent-deep); background: var(--accent-soft); border-radius: 4px; padding: 1px 6px; margin-top: 6px; margin-right: 4px; }
.bubble .mood-tag.voice { cursor: pointer; }
.typing-dots { display: inline-flex; gap: 4px; padding: 4px 2px; }
.typing-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--text-3); animation: typing 1s infinite; }
.typing-dots i:nth-child(2) { animation-delay: .15s; } .typing-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes typing { 40% { transform: translateY(-4px); opacity: .4; } }
.stream-cursor { display: inline-block; width: 2px; height: 1em; background: var(--accent); vertical-align: -2px; margin-left: 1px; animation: blink .8s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.think-box { font-size: 11px; color: var(--text-2); padding-left: 6px; }
.think-box summary { cursor: pointer; list-style: none; color: var(--text-3); }
.think-box summary::before { content: "◌ "; }
.think-box pre { font-family: var(--font-mono); font-size: 11px; white-space: pre-wrap; background: var(--card-alt); border-radius: 8px; padding: 8px; margin-top: 4px; }
.inputbar {
  flex-shrink: 0; display: flex; align-items: flex-end; gap: 8px; padding: 8px 12px calc(10px + env(safe-area-inset-bottom, 0px));
  background: var(--glass); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-top: .5px solid var(--divider);
}
.inputbar .plus-btn { width: 36px; height: 36px; border-radius: 50%; background: var(--card); box-shadow: var(--shadow-sm); color: var(--text-2); flex-shrink: 0; display: flex; align-items: center; justify-content: center; transition: transform var(--dur-fast) var(--ease-spring); }
.inputbar .plus-btn:active { transform: scale(.88) rotate(90deg); }
.inputbar textarea {
  flex: 1; min-height: 36px; max-height: 120px; border-radius: 18px; border: none;
  background: var(--card); padding: 7px 14px; font-size: 15px; resize: none; box-shadow: var(--shadow-sm); line-height: 1.4;
}
.inputbar .send-btn {
  width: 36px; height: 36px; border-radius: 50%; background: var(--accent); color: var(--accent-contrast);
  font-size: 16px; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  transition: transform var(--dur-fast) var(--ease-spring), opacity var(--dur-fast);
}
.inputbar .send-btn:active { transform: scale(.86); }
.inputbar .send-btn[disabled] { opacity: .35; }
.narr-toggle { color: var(--text-2); background: var(--card); border-radius: var(--radius-full); padding: 0; width: 32px; height: 32px; box-shadow: var(--shadow-sm); flex-shrink: 0; align-self: center; display: flex; align-items: center; justify-content: center; }
.narr-toggle.on { background: var(--accent); color: var(--accent-contrast); }
.attach-menu { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 8px 0 4px; }
.attach-menu button { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; color: var(--text-2); padding: 8px 0; border-radius: var(--radius-md); }
.attach-menu button:active { background: var(--card-alt); }
.attach-menu .am-ico { font-size: 24px; }

/* ---------- 日历：月历网格 ---------- */
.cal-head { display: flex; align-items: center; justify-content: center; gap: 18px; padding: 14px 16px 6px; }
.cal-head b { font-size: 17px; }
.cal-nav { width: 30px; height: 30px; border-radius: 50%; background: var(--card-alt); color: var(--text-1); font-size: 16px; line-height: 1; }
.cal-week { display: grid; grid-template-columns: repeat(7, 1fr); padding: 6px 14px 2px; }
.cal-week span { text-align: center; font-size: 11px; color: var(--text-3); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); row-gap: 4px; padding: 0 14px 8px; }
.cal-grid span { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 44px; font-size: 13.5px; color: var(--text-1); position: relative; }
.cal-grid span.dim { color: var(--text-3); opacity: .55; }
.cal-grid span b { font-weight: 500; width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.cal-grid span.today b { background: var(--accent); color: #fff; font-weight: 700; }
.cal-grid span.sel b { box-shadow: inset 0 0 0 2px var(--accent-deep, var(--accent)); }
.cal-grid span .dot { position: absolute; bottom: 2px; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.cal-agenda-title { font-size: 13px; font-weight: 700; letter-spacing: 1px; color: var(--text-2); margin: 6px 20px 6px; }
.cal-agenda { flex: 1; min-height: 0; overflow-y: auto; padding-bottom: 8px; }
.cal-foot { flex: 0 0 auto; padding: 8px 16px calc(12px + env(safe-area-inset-bottom, 0px)); }
/* 页1 迷你月历组件 */
.wd-mini-week { display: grid; grid-template-columns: repeat(7, 1fr); margin-top: 8px; }
.wd-mini-week span { text-align: center; font-size: 9px; color: var(--text-3); }
.wd-mini-grid { display: grid; grid-template-columns: repeat(7, 1fr); row-gap: 1px; margin-top: 2px; }
.wd-mini-grid span { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 26px; font-size: 10.5px; color: var(--text-2); position: relative; }
.wd-mini-grid span.dim { color: var(--text-3); opacity: .5; }
.wd-mini-grid span b { font-weight: 500; width: 20px; height: 20px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.wd-mini-grid span.today b { background: var(--accent); color: #fff; font-weight: 700; }
.wd-mini-grid span i { position: absolute; bottom: 1px; width: 3px; height: 3px; border-radius: 50%; background: var(--accent); }
/* ---------- 相机 ---------- */
.cam-view {
  position: relative; flex: 1; min-height: 0; margin: 10px 12px 0;
  border-radius: 18px; overflow: hidden; background: linear-gradient(160deg,#20242e,#0e1016);
  display: flex; align-items: center; justify-content: center;
}
.cam-view video { width: 100%; height: 100%; object-fit: cover; background: #111; display: block; transform: translateZ(0); }
.cam-studio { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: linear-gradient(160deg,#3a3f52,#14171f); }
.cam-studio-emo { font-size: 96px; filter: drop-shadow(0 8px 20px rgba(0,0,0,.4)); }
.cam-hint {
  position: absolute; top: 12px; left: 50%; transform: translateX(-50%);
  font-size: 11px; color: #fff; background: rgba(0,0,0,.45);
  padding: 4px 12px; border-radius: 999px; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  white-space: nowrap;
}
.cam-grid3 {
  position: absolute; inset: 0; pointer-events: none; opacity: .25;
  background:
    linear-gradient(rgba(255,255,255,.5) .5px, transparent .5px) 0 0/100% 33.33%,
    linear-gradient(90deg, rgba(255,255,255,.5) .5px, transparent .5px) 0 0/33.33% 100%;
}
.cam-bar { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-around; padding: 12px 20px calc(14px + env(safe-area-inset-bottom, 0px)); background: #111; }
.cam-shutter {
  width: 62px; height: 62px; border-radius: 50%;
  border: 4px solid #fff; background: rgba(255,255,255,.28);
  box-shadow: 0 0 0 2px rgba(0,0,0,.35);
  transition: transform var(--dur-fast) var(--ease-spring);
}
.cam-shutter:active { transform: scale(.88); background: #fff; }
.cam-side { display: flex; flex-direction: column; align-items: center; gap: 2px; color: #ddd; font-size: 10px; min-width: 52px; }
.cam-side b { font-size: 15px; color: #fff; }

/* ---------- NPC 解锁提示气泡 ---------- */
.unlock-pill {
  display: flex; align-items: center; gap: 8px;
  background: var(--accent-soft); border: 1px solid var(--accent);
  border-radius: 14px; padding: 8px 12px; margin: 8px 0 4px; flex-wrap: wrap;
}
.unlock-icon { font-size: 18px; }
.unlock-text { flex: 1; font-size: 13px; color: var(--text-1); line-height: 1.4; min-width: 0; }
.unlock-btn {
  background: var(--accent); color: #fff; border: none; border-radius: 8px;
  padding: 4px 12px; font-size: 12px; font-weight: 600; cursor: pointer; flex-shrink: 0;
}
.unlock-btn-skip {
  background: none; border: 1px solid var(--divider); border-radius: 8px;
  padding: 4px 10px; font-size: 11px; color: var(--text-3); cursor: pointer; flex-shrink: 0;
}

/* ---------- 实例工作台 ---------- */
#wb-body .card { border-radius: 16px; }
[data-theme="glassy"] #wb-body .card { background: rgba(255,255,255,.68); backdrop-filter: blur(18px); border: 1px solid rgba(255,255,255,.9); }

/* ---------- NPC 私信（生活圈） ---------- */
.npc-inputbar {
  flex: 0 0 auto; display: flex; gap: 8px; padding: 8px 10px calc(8px + env(safe-area-inset-bottom, 0px));
  background: var(--card); border-top: .5px solid var(--divider);
}
.npc-inputbar input {
  flex: 1; height: 38px; border-radius: var(--radius-full); border: 1px solid var(--divider);
  background: var(--bg); padding: 0 14px; font-size: 14px; color: var(--text-1);
}
/* ---------- 顶部横幅推送（真实手机式） ---------- */
#n-banners {
  position: absolute; top: calc(var(--sb-h) + 4px); left: 8px; right: 8px;
  z-index: 90; display: flex; flex-direction: column; gap: 8px; pointer-events: none;
}
.n-banner {
  pointer-events: auto; cursor: pointer;
  display: flex; align-items: center; gap: 10px;
  background: rgba(250,250,252,.88); backdrop-filter: blur(20px) saturate(1.5); -webkit-backdrop-filter: blur(20px) saturate(1.5);
  border-radius: 20px; padding: 10px 14px;
  box-shadow: 0 8px 30px rgba(0,0,0,.16), inset 0 0 0 .5px rgba(255,255,255,.7);
  opacity: 0; transform: translateY(-24px) scale(.96);
  transition: opacity .24s var(--ease-out), transform .3s var(--ease-spring);
}
.n-banner.in { opacity: 1; transform: translateY(0) scale(1); }
.n-banner.out { opacity: 0; transform: translateY(-18px) scale(.97); }
.n-banner .n-icon { font-size: 24px; width: 34px; text-align: center; flex-shrink: 0; }
.n-banner .n-body { flex: 1; min-width: 0; }
.n-banner .n-title { font-size: 13px; font-weight: 700; color: #111; }
.n-banner .n-title small { font-weight: 500; font-size: 10px; color: #8a8a90; margin-left: 6px; }
.n-banner .n-text { font-size: 12px; color: #3a3a40; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.n-banner .n-go { font-size: 11px; color: var(--accent); font-weight: 600; flex-shrink: 0; }

/* ---------- 锁屏 PIN 密码 ---------- */
#pin-pad {
  position: absolute; inset: 0; z-index: 6;
  background: rgba(10,10,14,.82); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  display: flex; flex-direction: column; align-items: center; padding-top: 60px;
}
.pin-title { color: #fff; font-size: 15px; letter-spacing: 2px; margin-bottom: 18px; }
.pin-dots { display: flex; gap: 16px; margin-bottom: 24px; }
.pin-dots i { width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.7); transition: all .15s; }
.pin-dots i.on { background: #fff; }
.pin-keys { display: grid; grid-template-columns: repeat(3, 68px); gap: 14px; }
.pin-keys button {
  width: 68px; height: 68px; border-radius: 50%; border: none;
  background: rgba(255,255,255,.14); color: #fff; font-size: 24px; font-weight: 500;
  transition: background var(--dur-fast);
}
.pin-keys button:active { background: rgba(255,255,255,.32); }
.pin-keys span { visibility: hidden; }
#pin-cancel { margin-top: 18px; background: none; border: none; color: rgba(255,255,255,.75); font-size: 14px; }
#pin-pad.wrong .pin-dots i { border-color: #ff5d5d; background: rgba(255,93,93,.4); }
/* 手电筒点亮态 */
#lockscreen.torch-on { filter: brightness(1.22); }
#lock-torch.lit { background: #fff; box-shadow: 0 0 18px rgba(255,255,220,.9); }
/* 锁屏通知可点 */
.lock-notif { cursor: pointer; }
.lock-notif .n-title small { font-weight: 500; font-size: 10px; color: var(--text-3); margin-left: 6px; }
.lock-more { text-align: center; font-size: 12px; color: var(--text-2); padding: 8px 0 4px; cursor: pointer; }
/* 通知中心：逐条删除 + 来源 */
.notif-item { position: relative; cursor: pointer; transition: transform .2s, opacity .2s; }
.notif-item .n-title small { font-weight: 500; font-size: 10px; color: var(--text-3); margin-left: 6px; }
.notif-item .n-del {
  position: absolute; right: 34px; top: 50%; transform: translateY(-50%);
  border: none; background: none; color: var(--text-3); font-size: 13px; padding: 6px;
}
.notif-item .n-del:hover { color: var(--accent); }
.notif-item.swiping { transition: none; }

/* ---------- 时钟：秒表/计时器 ---------- */
.sw-display {
  font-family: var(--font-mono, monospace); font-size: 56px; font-weight: 200;
  text-align: center; letter-spacing: 2px; padding: 34px 0 10px; color: var(--text-1);
  font-variant-numeric: tabular-nums;
}
.sw-display.tm { font-size: 72px; font-weight: 100; }
.sw-track { height: 4px; border-radius: 2px; background: var(--divider); margin: 0 30px; overflow: hidden; }
.sw-track i { display: block; height: 100%; background: var(--accent); border-radius: 2px; transition: width .2s linear; }
.tb-cat b { font-size: 20px; display: block; }
.tb-cat span { font-size: 9px; color: var(--text-3); }

/* ---------- 小窝 3D 等距生活场景 ---------- */
.room3d-wrap { position: relative; margin: 10px 14px; }
.room3d {
  position: relative; width: 100%; height: 280px; overflow: hidden;
  border-radius: 16px 16px 8px 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,.12), inset 0 -2px 0 rgba(0,0,0,.05);
}
/* 后墙 */
.r3d-wall-b {
  position: absolute; top: 0; left: 0; right: 0; height: 42%;
  border-bottom: 2px solid rgba(0,0,0,.06);
  transition: background .5s;
}
/* 左墙 */
.r3d-wall-l {
  position: absolute; top: 0; left: 0; bottom: 0; width: 16%;
  background: linear-gradient(90deg, rgba(0,0,0,.06), transparent);
  pointer-events: none;
}
/* 地板 */
.r3d-floor {
  position: absolute; top: 42%; left: 0; right: 0; bottom: 0;
  transition: background .5s;
  background-image:
    linear-gradient(rgba(0,0,0,.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,0,.03) 1px, transparent 1px);
  background-size: 28px 28px;
}
/* 地毯 */
.r3d-rug {
  position: absolute; bottom: 8%; left: 15%; width: 50%; height: 40%;
  border-radius: 10px; opacity: .5; pointer-events: none;
}
/* 窗户 */
.r3d-window {
  position: absolute; top: 8%; right: 12%; width: 48px; height: 36px;
  background: linear-gradient(180deg, #B8D8E8, #D8E8F0); border-radius: 4px;
  border: 3px solid rgba(255,255,255,.8); overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.r3d-sky { font-size: 20px; }
/* 家具（等距 3D 块） */
.furn3d {
  position: absolute; width: 44px; height: 44px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  cursor: pointer; transition: transform .15s; z-index: 2;
}
.furn3d:hover { transform: scale(1.1); z-index: 5; }
.furn3d-emo { font-size: 28px; filter: drop-shadow(0 3px 4px rgba(0,0,0,.15)); }
.furn3d-name { font-size: 8px; color: var(--text-3); margin-top: 1px; text-align: center; }
.furn-book-badge { position: absolute; top: -4px; right: -4px; font-size: 12px; }
.furn-note { position: absolute; top: -4px; left: -4px; font-size: 11px; }
/* 生活痕迹发光 */
.furn-trace-glow {
  position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 10px var(--accent);
  animation: traceGlow 2.4s ease-in-out infinite;
}
@keyframes traceGlow { 0%,100% { opacity: .4; transform: translateX(-50%) scale(1); } 50% { opacity: 1; transform: translateX(-50%) scale(1.3); } }
/* 角色（崽崽）在房间 */
.r3d-char {
  position: absolute; left: 50%; bottom: 18%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; z-index: 4;
  animation: charIdle 3.6s ease-in-out infinite;
}
@keyframes charIdle { 0%,100% { transform:translateX(-50%) translateY(0); } 50% { transform:translateX(-50%) translateY(-4px); } }
.r3d-char-face { font-size: 36px; filter: drop-shadow(0 3px 5px rgba(0,0,0,.1)); }
.r3d-char-name { font-size: 9px; color: var(--text-2); margin-top: 2px; text-shadow: 0 1px 3px rgba(255,255,255,.8); }
/* 说话气泡 */
.room3d-speech {
  position: absolute; bottom: 55%; left: 50%; transform: translateX(-50%);
  background: var(--card); border-radius: 12px; padding: 6px 12px;
  font-size: 12px; color: var(--text-1); max-width: 80%;
  box-shadow: 0 4px 12px rgba(0,0,0,.1); z-index: 6;
}
/* 统计 + 操作 + 日志 */
.room3d-stats { display: flex; gap: 8px; padding: 8px 16px 4px; }
.room3d-actions { display: flex; gap: 8px; padding: 4px 16px; }
.room3d-log { padding: 6px 16px; font-size: 11px; color: var(--text-3); }
.room3d-log p { margin: 1px 0; }
/* 痕迹面板 */
.r3d-trace-panel {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: var(--card); border-radius: 12px 12px 0 0; padding: 12px 16px;
  box-shadow: 0 -4px 16px rgba(0,0,0,.1); z-index: 10;
}

/* ---------- 小窝 沉浸式画卷（可滑动场景探索） ---------- */
.room-scroll {
  margin: 10px 14px; border-radius: 18px; overflow: hidden;
  box-shadow: 0 8px 24px rgba(0,0,0,.1); position: relative;
}
.room-scroll-inner { position: relative; }
.rs-backdrop {
  position: absolute; inset: 0;
  background-image:
    radial-gradient(circle at 20% 80%, rgba(255,255,255,.06) 0 60px, transparent 80px),
    linear-gradient(180deg, rgba(0,0,0,.03) 0%, transparent 30%);
  pointer-events: none;
}
.rs-window {
  position: absolute; top: 6%; right: 10%;
  width: 52px; height: 38px; border-radius: 6px;
  background: linear-gradient(180deg, #B8D8E8, #D8E8F0);
  border: 3px solid rgba(255,255,255,.7);
  display: flex; align-items: center; justify-content: center;
  box-shadow: inset 0 0 12px rgba(0,0,0,.06);
}
.rs-sky { font-size: 20px; }
.rs-ghost-text {
  position: absolute; bottom: 60%; left: 6%;
  font-size: 48px; font-weight: 200; letter-spacing: 8px;
  color: rgba(255,255,255,.12); pointer-events: none; user-select: none;
}
.rs-char-float {
  position: absolute; bottom: 8%; left: 50%; transform: translateX(-50%);
  font-size: 36px; animation: rsCharFloat 3.6s ease-in-out infinite;
  filter: drop-shadow(0 3px 6px rgba(0,0,0,.1)); pointer-events: none; z-index: 2;
}
@keyframes rsCharFloat { 0%,100% { transform:translateX(-50%) translateY(0); } 50% { transform:translateX(-50%) translateY(-5px); } }
.rs-scene-cards {
  display: flex; gap: 10px; overflow-x: auto; padding: 10px 14px 14px;
  scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
  position: relative; z-index: 1;
}
.rs-scene-cards::-webkit-scrollbar { display: none; }
.scene-card {
  flex: 0 0 180px; scroll-snap-align: start;
  background: var(--card); border-radius: 16px; overflow: hidden;
  box-shadow: 0 4px 16px rgba(0,0,0,.08); cursor: pointer;
  transition: transform .18s var(--ease-spring);
}
.scene-card:active { transform: scale(.97); }
.scene-card .sc-visual {
  height: 72px; display: flex; align-items: center; justify-content: center;
  font-size: 42px; background: linear-gradient(160deg, var(--accent-soft), transparent);
}
.scene-card .sc-body { padding: 8px 10px 10px; }
.scene-card .sc-name { font-size: 13.5px; display: block; }
.scene-card .sc-trace {
  font-size: 11px; color: var(--text-3); margin-top: 4px; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.scene-card .sc-acts { display: flex; gap: 4px; margin-top: 6px; }
.scene-card .sc-acts .btn { padding: 3px 6px; font-size: 10.5px; }
/* 协商虚像卡片 */
.scene-card.furn-ghost { opacity: .55; border: 1.5px dashed var(--accent); }

/* ---------- 小窝 沉浸式画卷（可滑动场景探索） ---------- */
/* 暗色栖所覆盖（用户接 API 后或主动选择时） */
[data-room-theme="dark"] .room-scroll,
.room-scroll:has(.dwelling-stage) { background: none; }
.room-scroll:has(.dwelling-stage) .rs-backdrop,
.room-scroll:has(.dwelling-stage) .rs-window,
.room-scroll:has(.dwelling-stage) .rs-char-float,
.room-scroll:has(.dwelling-stage) .rs-scene-cards,
.room-scroll:has(.dwelling-stage) .rs-ghost-text { display: none; }

/* ===== 暗色栖所 ===== */
.dw-char-tabs {
  display: flex; gap: 0; padding: 0; overflow-x: auto;
  border-bottom: .5px solid rgba(255,255,255,.08);
}
.dw-char-tabs button {
  flex: 1; background: none; border: none; color: rgba(255,255,255,.4);
  padding: 10px 6px 8px; cursor: pointer; text-align: center;
  border-bottom: 2px solid transparent; transition: all .2s;
}
.dw-char-tabs button b { display: block; font-size: 14px; }
.dw-char-tabs button span { font-size: 9px; letter-spacing: 2px; text-transform: uppercase; opacity: .5; }
.dw-char-tabs button.on { color: #fff; border-bottom-color: var(--accent); }
.dw-room-tabs {
  display: flex; gap: 0; padding: 0; align-items: stretch;
  border-bottom: .5px solid rgba(255,255,255,.06); overflow-x: auto;
}
.dw-room-tabs button {
  background: none; border: none; color: rgba(255,255,255,.35);
  padding: 8px 14px; cursor: pointer; text-align: center;
  border-right: .5px solid rgba(255,255,255,.04);
  transition: all .2s;
}
.dw-room-tabs button b { display: block; font-size: 13px; }
.dw-room-tabs button span { font-size: 8px; letter-spacing: 2px; text-transform: uppercase; opacity: .4; }
.dw-room-tabs button.on { background: rgba(255,255,255,.06); color: #fff; }
.dw-icon-btn {
  background: rgba(255,255,255,.06); border: none; color: rgba(255,255,255,.5);
  font-size: 14px; padding: 6px 10px; border-radius: 8px; cursor: pointer;
}
.dw-icon-btn.dw-danger { color: #E84A7F; }
.dw-title { text-align: center; padding: 18px 0 6px; }
.dw-title b { font-size: 22px; font-weight: 300; letter-spacing: 8px; color: rgba(255,255,255,.85); display: block; }
/* 小窝整体暗色沉浸：去掉白色割裂，从顶栏到场景到面板统一暗调 */
#app-body:has(.dwelling-stage) { background: #0f0f1a; color: #e8e8f0; }
.dw-room-tabs { display: flex; align-items: center; gap: 6px; padding: 8px 12px; background: rgba(15,15,26,.7); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); flex-shrink: 0; }
.dw-room-tabs button { padding: 6px 11px; border-radius: 999px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.08); color: rgba(255,255,255,.45); font-size: 12px; cursor: pointer; }
.dw-room-tabs button b { display: block; font-size: 12px; }
.dw-room-tabs button span { display: block; font-size: 8px; letter-spacing: 1.5px; margin-top: 1px; color: rgba(255,255,255,.25); }
.dw-room-tabs button.on { background: rgba(255,255,255,.14); color: rgba(255,255,255,.92); border-color: rgba(255,255,255,.15); }
.dw-icon-btn { width: 30px; height: 30px; border-radius: 8px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.08); color: rgba(255,255,255,.5); font-size: 14px; cursor: pointer; display: grid; place-items: center; flex-shrink: 0; }
.dw-icon-btn.dw-danger { color: rgba(255,100,100,.6); }
.dw-icon-btn:active { background: rgba(255,255,255,.12); }
.dw-title { padding: 2px 16px 6px; color: rgba(255,255,255,.92); flex-shrink: 0; text-align: left; }
.dw-title b { font-size: 15px; font-weight: 500; letter-spacing: 2px; }
.dw-title span { font-size: 9px; letter-spacing: 3px; color: rgba(255,255,255,.2); text-transform: uppercase; margin-left: 4px; }
.dw-char-btn { color: rgba(255,255,255,.65); font-size: 11px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.08); border-radius: 999px; padding: 3px 10px 3px 6px; margin-left: 4px; cursor: pointer; }
.dw-char-btn:active { background: rgba(255,255,255,.12); }
/* 暗色舞台 */
.dwelling-stage {
  position: relative; flex: 1; min-height: 200px; margin: 0; overflow: hidden;
  background: linear-gradient(180deg, #1a1a2e 0%, #16213e 40%, #0f0f1a 100%);
}
.dwelling-stage::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .03;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.dw-ghost {
  position: absolute; left: 4%; top: 15%;
  font-size: 72px; font-weight: 100; letter-spacing: 14px;
  color: rgba(255,255,255,.035); pointer-events: none; user-select: none;
  writing-mode: vertical-rl; text-orientation: upright;
}
/* 发光标注点（放大 + 更精致光晕） */
.dwelling-points { position: absolute; inset: 0; pointer-events: none; }
.anno-point { position: absolute; display: flex; align-items: flex-start; gap: 0; cursor: pointer; pointer-events: auto; }
.anno-dot {
  width: 14px; height: 14px; border-radius: 50%; flex-shrink: 0;
  background: var(--accent, #E8A8C4); box-shadow: 0 0 18px var(--accent, #E8A8C4), 0 0 6px rgba(255,255,255,.45);
  margin-top: 3px; transition: transform .25s var(--ease-spring), box-shadow .25s;
}
.anno-point:active .anno-dot { transform: scale(1.25); box-shadow: 0 0 28px var(--accent, #E8A8C4), 0 0 10px rgba(255,255,255,.6); }
.anno-line { width: 14px; height: 1px; background: rgba(255,255,255,.26); margin-top: 10px; flex-shrink: 0; }
/* 线和文字之间留 6px。原来紧贴着，标注点看起来像「—沙发」，像删除线。 */
.anno-label { display: flex; flex-direction: column; margin-top: 0; margin-left: 6px; }
.anno-cn { font-size: 16px; font-weight: 600; color: rgba(255,255,255,.92); letter-spacing: 1px; text-shadow: 0 1px 6px rgba(0,0,0,.3); }
.anno-en { font-size: 9px; letter-spacing: 2.5px; color: rgba(255,255,255,.35); text-transform: uppercase; }
.anno-n { font-size: 9px; color: rgba(255,255,255,.2); font-family: var(--font-mono); }
.anno-trace {
  font-size: 11px; color: rgba(255,255,255,.5); line-height: 1.5;
  max-width: 190px; margin-top: 5px; padding-left: 2px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
/* 浮动按钮 */
.dw-fab {
  position: absolute; bottom: 14px; right: 14px;
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12);
  color: rgba(255,255,255,.7); font-size: 18px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all .2s; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.dw-fab:active { transform: scale(.9); background: rgba(255,255,255,.15); }
/* 底部物品清单面板（精致化） */
.dwelling-panel {
  position: relative; background: rgba(15,15,26,.88);
  backdrop-filter: blur(24px) saturate(1.2); -webkit-backdrop-filter: blur(24px) saturate(1.2);
  border-radius: 18px 18px 0 0; padding: 0; border-top: .5px solid rgba(255,255,255,.08);
  flex-shrink: 0;
}
.dw-panel-grip { width: 32px; height: 3.5px; border-radius: 2px; background: rgba(255,255,255,.18); margin: 10px auto 0; }
.dw-panel-header { display: flex; align-items: baseline; gap: 10px; padding: 10px 20px 6px; }
.dw-panel-num { font-family: var(--font-mono); font-size: 18px; font-weight: 400; color: rgba(255,255,255,.22); letter-spacing: 1px; }
.dw-panel-title { font-size: 18px; font-weight: 500; letter-spacing: 2px; color: rgba(255,255,255,.9); flex: 1; }
.dw-panel-count { font-size: 10px; color: rgba(255,255,255,.3); font-family: var(--font-mono); }
.dw-panel-items { padding: 4px 20px 18px; max-height: 260px; overflow-y: auto; }
.dw-item { padding: 10px 0; border-bottom: .5px solid rgba(255,255,255,.04); }
.dw-item:last-child { border-bottom: none; }
.dw-item-num { font-family: monospace; font-size: 11px; color: rgba(255,255,255,.2); margin-right: 10px; }
.dw-item-name { font-size: 15px; font-weight: 500; color: rgba(255,255,255,.8); display: inline; }
.dw-item-desc { font-size: 12.5px; color: rgba(255,255,255,.4); margin: 4px 0 0 0; line-height: 1.6; }
/* 隐藏日志 */
.dw-log { display: none; }

/* ---------- 通讯录（复刻微信）：搜索 + 字母分组 + 索引条 ---------- */
.ct-search {
  margin: 8px 14px 4px; height: 34px; border-radius: var(--radius-full);
  background: var(--card); display: flex; align-items: center; padding: 0 12px;
  font-size: 13px; color: var(--text-3);
}
.ct-search input { flex: 1; border: none; background: none; font-size: 13px; color: var(--text-1); outline: none; }
.ct-letter { font-size: 12px; font-weight: 700; color: var(--text-3); padding: 4px 16px 2px; background: var(--card-alt); }
.ct-index {
  position: absolute; right: 2px; top: 50%; transform: translateY(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 1px; z-index: 5;
}
.ct-index i { font-style: normal; font-size: 9px; color: var(--accent); padding: 0 4px; cursor: pointer; }
.ct-index i:active { color: var(--accent-deep, var(--accent)); }

/* ---------- 微博（复刻真实微博）：品牌栏 + 卡片流 + 操作栏 ---------- */
.wb-top {
  flex: 0 0 auto; display: flex; align-items: center; gap: 10px;
  padding: 10px 16px 8px; border-bottom: .5px solid var(--divider); background: var(--card);
}
.wb-logo {
  background: linear-gradient(135deg, #FF8200, #E6162D); color: #fff;
  font-size: 11px; font-weight: 800; padding: 3px 7px; border-radius: 8px; letter-spacing: 1px;
}
.wb-top b { font-size: 15px; flex: 1; }
.wb-search { cursor: pointer; }
#wb-body { padding-bottom: 20px; }
.wb-card { background: var(--card); padding: 12px 14px; border-bottom: .5px solid var(--divider); }
.wb-card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.wb-av { width: 38px; height: 38px; border-radius: 50%; background: var(--accent-soft); display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
.wb-who b { font-size: 14px; display: block; }
.wb-who span { font-size: 10.5px; color: var(--text-3); }
.wb-card-text { font-size: 14.5px; line-height: 1.6; white-space: pre-wrap; user-select: text; }
.wb-actions { display: flex; margin-top: 10px; border-top: .5px solid var(--divider); padding-top: 8px; }
.wb-actions button {
  flex: 1; border: none; background: none; font-size: 12.5px; color: var(--text-2);
  display: flex; align-items: center; justify-content: center; gap: 4px; padding: 4px 0;
}
.wb-actions button.on { color: #e6162d; font-weight: 700; }
.wb-comments { margin-top: 8px; background: var(--card-alt); border-radius: 8px; padding: 6px 10px; font-size: 12.5px; }
.wb-comments p { margin: 2px 0; line-height: 1.5; }
.wb-comments b { color: var(--accent-deep, var(--accent)); }

/* ---------- 小红书 / 抖音 / 哔哩哔哩：真实APP开关 + 模拟内容 ---------- */
.ra-top { display: flex; align-items: center; gap: 8px; padding: 10px 16px; border-bottom: .5px solid var(--divider); flex-shrink: 0; }
.ra-logo { font-size: 22px; }
.ra-top b { font-size: 16px; flex: 1; }
.ra-switch { display: flex; align-items: center; gap: 6px; cursor: pointer; user-select: none; }
.ra-switch input { display: none; }
.ra-track { width: 38px; height: 22px; border-radius: 99px; background: var(--divider); position: relative; transition: background .2s; }
.ra-track::after { content: ""; position: absolute; left: 2px; top: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .2s; }
.ra-switch input:checked ~ .ra-track { background: var(--accent); }
.ra-switch input:checked ~ .ra-track::after { transform: translateX(16px); }
.ra-label { font-size: 11px; color: var(--text-3); }
.ra-real { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 60px 20px; text-align: center; }
.ra-real-icon { font-size: 64px; }
.ra-real h3 { font-size: 18px; }
.ra-real p { font-size: 13px; color: var(--text-2); }
.ra-open-btn { max-width: 200px; }
.ra-real-tip { font-size: 11px; color: var(--text-3); }

/* 小红书 */
.xhs-tabs { display: flex; gap: 6px; padding: 10px 16px; overflow-x: auto; scrollbar-width: none; flex-shrink: 0; }
.xhs-tabs::-webkit-scrollbar { display: none; }
.xhs-tabs button { padding: 6px 14px; border-radius: 99px; background: var(--card); font-size: 13px; color: var(--text-2); border: none; cursor: pointer; white-space: nowrap; }
.xhs-tabs button.on { background: var(--accent); color: var(--accent-contrast); font-weight: 600; }
.xhs-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 0 12px 12px; }
.xhs-card { background: var(--card); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow-sm); }
/* v179.12：背景色由 JS 按标签派生（Social.cover），这里只管排版。
   首字用衬线体 + 半透明白，比一个孤零零的 emoji 像"封面"得多。 */
.xhs-cover {
  height: 120px; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, var(--accent-soft), transparent); }
.xhs-cover b {
  font-family: Georgia, 'Songti SC', serif; font-size: 46px; font-weight: 700;
  color: rgba(255,255,255,.82); text-shadow: 0 2px 10px rgba(0,0,0,.12);
  line-height: 1; user-select: none;
}
.xhs-title { font-size: 13px; font-weight: 500; padding: 6px 8px 2px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.xhs-author { display: flex; align-items: center; gap: 4px; padding: 0 8px; font-size: 11px; color: var(--text-3); }
.xhs-av { font-size: 14px; }
.xhs-stats { padding: 2px 8px 8px; font-size: 11px; color: var(--text-3); }

/* 抖音 */
.dy-tabs { display: flex; gap: 6px; padding: 10px 16px; overflow-x: auto; scrollbar-width: none; flex-shrink: 0; }
.dy-tabs::-webkit-scrollbar { display: none; }
.dy-tabs button { padding: 6px 14px; border-radius: 99px; background: var(--card); font-size: 13px; color: var(--text-2); border: none; cursor: pointer; white-space: nowrap; }
.dy-tabs button.on { background: var(--accent); color: var(--accent-contrast); font-weight: 600; }
.dy-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 0 12px 12px; }
.dy-card { background: var(--card); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow-sm); }
.dy-cover { height: 180px; display: flex; align-items: center; justify-content: center; font-size: 36px; color: rgba(255,255,255,.8); background: linear-gradient(180deg, #1a1a2e, #16213e); position: relative; }
.dy-dur { position: absolute; right: 6px; bottom: 6px; font-size: 10px; color: #fff; background: rgba(0,0,0,.5); border-radius: 4px; padding: 1px 4px; }
.dy-desc { font-size: 13px; padding: 6px 8px 2px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dy-author { display: flex; align-items: center; gap: 4px; padding: 0 8px; font-size: 11px; color: var(--text-3); }
.dy-av { font-size: 14px; }
.dy-stats { padding: 2px 8px 8px; font-size: 11px; color: var(--text-3); }

/* 哔哩哔哩 */
.bili-tabs { display: flex; gap: 6px; padding: 10px 16px; overflow-x: auto; scrollbar-width: none; flex-shrink: 0; }
.bili-tabs::-webkit-scrollbar { display: none; }
.bili-tabs button { padding: 6px 14px; border-radius: 99px; background: var(--card); font-size: 13px; color: var(--text-2); border: none; cursor: pointer; white-space: nowrap; }
.bili-tabs button.on { background: var(--accent); color: var(--accent-contrast); font-weight: 600; }
.bili-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 0 12px 12px; }
.bili-card { background: var(--card); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow-sm); }
.bili-cover { height: 100px; display: flex; align-items: center; justify-content: center; font-size: 40px; background: linear-gradient(160deg, #e8e8f0, #d0d0e8); position: relative; }
.bili-dur { position: absolute; right: 6px; bottom: 6px; font-size: 10px; color: #fff; background: rgba(0,0,0,.6); border-radius: 4px; padding: 1px 4px; }
.bili-dan { position: absolute; left: 6px; bottom: 6px; font-size: 10px; color: #fff; background: rgba(0,0,0,.6); border-radius: 4px; padding: 1px 4px; }
.bili-title { font-size: 13px; font-weight: 500; padding: 6px 8px 2px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bili-up { padding: 2px 8px 8px; font-size: 11px; color: var(--text-3); }

/* ---------- 生活家：淘宝式商品信息流 ---------- */
.prod-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 0 14px 12px; }
.prod-card { background: var(--card); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow-sm); cursor: pointer; }
.prod-card .pic { height: 84px; display: flex; align-items: center; justify-content: center; font-size: 40px; background: linear-gradient(160deg, var(--accent-soft), transparent); }
.prod-card .p-info { padding: 6px 8px 8px; }
.prod-card .p-info b { font-size: 12px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prod-card .p-price { color: #FF4D2E; font-weight: 800; font-size: 15px; margin: 2px 0; }
.prod-card .tiny { font-size: 9.5px; color: var(--text-3); }

/* ---------- 宠物（灵子立绘桌宠状态机） ---------- */
.pet-stage {
  flex: 1; min-height: 0; display: flex; align-items: flex-end; justify-content: center;
  position: relative; padding-bottom: 8px; cursor: pointer; user-select: none;
}
.pet-shadow {
  position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%);
  width: 110px; height: 16px; border-radius: 50%;
  background: radial-gradient(ellipse, rgba(0,0,0,.15), transparent 70%);
  animation: shadowBreath 3.4s ease-in-out infinite; pointer-events: none;
}
@keyframes shadowBreath { 0%,100% { width:110px; opacity:.15; } 50% { width:88px; opacity:.08; } }
.pet-body {
  position: relative; width: 220px; height: min(330px, 58%); margin-bottom: 12px;
  display: flex; align-items: flex-end; justify-content: center;
  transform-origin: 50% 100%; animation: petIdle 3.6s ease-in-out infinite;
}
.pet-body .pet-face { width: 100%; height: 100%; display: flex; align-items: flex-end; justify-content: center; }
.pet-body .pet-face img {
  max-height: 100%; max-width: 100%; object-fit: contain; object-position: bottom;
  filter: drop-shadow(0 8px 14px rgba(0,0,0,.14));
  transition: opacity .28s var(--ease-out);
}
.pet-body .pet-face img.swap { animation: petExprSwap .28s var(--ease-out); }
@keyframes petExprSwap { from { opacity: .25; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
.pet-bubble {
  position: absolute; top: 6px; left: 50%; transform: translateX(-50%) translateY(6px);
  background: var(--card); border: 1.5px solid var(--accent-soft);
  border-radius: 12px; padding: 4px 12px; font-size: 12px; color: var(--text-1);
  white-space: nowrap; box-shadow: 0 2px 8px rgba(0,0,0,.08);
  opacity: 0; transition: all .35s cubic-bezier(.34,1.56,.64,1); z-index: 5; pointer-events: none;
}
.pet-bubble.visible { opacity: 1; transform: translateX(-50%) translateY(0); }
.pet-bubble::after { content: ""; position: absolute; bottom: -6px; left: 50%; transform: translateX(-50%); border: 6px solid transparent; border-top-color: var(--accent-soft); }
.pet-zzz { position: absolute; top: 14px; right: 22px; font-size: 14px; color: var(--text-3); animation: petZzz 3s ease-out infinite; }
@keyframes petZzz { 0% { opacity:0; transform:translateY(0) scale(.5); } 30% { opacity:.75; transform:translateY(-14px) scale(1); } 100% { opacity:0; transform:translateY(-40px) scale(.8); } }
.pet-heart { position: absolute; top: 30px; left: 50%; font-size: 18px; opacity: 0; pointer-events: none; }
@keyframes petHeart { 0% { opacity:0; transform:translateX(-50%) scale(.5); } 20% { opacity:.9; transform:translateX(-50%) translateY(-18px) scale(1); } 100% { opacity:0; transform:translateX(-50%) translateY(-76px) scale(.8); } }
/* 状态动画 */
.pet-body.idle { animation: petIdle 3.6s ease-in-out infinite; }
@keyframes petIdle { 0%,100% { transform:translateY(0); } 50% { transform:translateY(-6px); } }
.pet-body.happy { animation: petHop .7s ease-in-out infinite; }
@keyframes petHop { 0%,100% { transform:translateY(0); } 40% { transform:translateY(-14px); } }
.pet-body.resting { animation: petRest 4.4s ease-in-out infinite; }
@keyframes petRest { 0%,100% { transform:translateY(0) rotate(-1deg); } 50% { transform:translateY(-3px) rotate(1deg); } }
.pet-body.sleeping { animation: petIdle 5.2s ease-in-out infinite; }
.pet-body.poked { animation: petPoke .8s ease-out; }
@keyframes petPoke { 0% { transform:translateY(0) rotate(0); } 25% { transform:translateY(-14px) rotate(-6deg); } 50% { transform:translateY(-18px) rotate(5deg); } 75% { transform:translateY(-6px) rotate(-2deg); } 100% { transform:translateY(0) rotate(0); } }
.pet-info { flex: 0 0 auto; padding: 6px 16px 4px; }
.pet-info b { font-size: 16px; display: flex; align-items: center; gap: 8px; }
.pet-outfit-tag { font-size: 10px; color: var(--text-2); font-weight: 500; background: var(--card-alt); border: 1px solid var(--divider); padding: 2px 8px; border-radius: var(--radius-full); }
.pet-meters { display: grid; grid-template-columns: 1fr 1fr; gap: 5px 16px; margin-top: 7px; }
.pet-meter { display: flex; align-items: center; gap: 7px; }
.pet-meter label { font-size: 10px; color: var(--text-3); width: 24px; flex-shrink: 0; }
.pet-meter .progress-bar { flex: 1; height: 5px; margin: 0; }
.pet-meter .progress-bar i.trust { background: linear-gradient(90deg, #d5aa3c, #c9973a); }
.pet-actions { flex: 0 0 auto; display: flex; gap: 10px; padding: 8px 16px calc(12px + env(safe-area-inset-bottom, 0px)); }
@media (max-height: 700px) {
  .pet-body { width: 190px; height: min(280px, 58%); }
}

/* ---------- 页面贴纸装饰（宠物舞台 / 日记等空旷界面） ---------- */
.pet-deco, .diary-deco { position: absolute; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.pet-deco img, .diary-deco img { position: absolute; opacity: .5; filter: saturate(.9); }
.pet-body, .diary-paper, #dy-new { position: relative; z-index: 1; }
.pet-deco img:nth-child(1) { top: 5%; right: 9%; width: 32px; transform: rotate(9deg); }
.pet-deco img:nth-child(2) { top: 14%; left: 7%; width: 46px; transform: rotate(-8deg); }
.pet-deco img:nth-child(3) { top: 42%; right: 5%; width: 28px; transform: rotate(-12deg); }
.pet-deco img:nth-child(4) { bottom: 8%; left: 7%; width: 38px; transform: rotate(7deg); }
.pet-deco img:nth-child(5) { bottom: 13%; right: 9%; width: 54px; transform: rotate(-6deg); }
.diary-deco img:nth-child(1) { top: 6px; right: 14px; width: 44px; transform: rotate(8deg); }
.diary-deco img:nth-child(2) { top: 96px; left: 6px; width: 38px; transform: rotate(-9deg); }
.diary-deco img:nth-child(3) { top: 190px; right: 20px; width: 46px; transform: rotate(-7deg); }
@media (max-height: 700px) {
  .pet-deco img { opacity: .32; }
  .pet-deco img:nth-child(2) { width: 38px; }
  .pet-deco img:nth-child(5) { width: 44px; }
}

/* ---------- 演示登录门（微博/论坛等社媒） ---------- */
/* v179 修复：原来只有 min-height:100%。#app-body 是 flex:1 + overflow-y:auto，
   子元素的百分比高度在这种链上不一定解析得出来（表现就是"不满窗"，
   内容贴在顶部、下方一大片空）。改成把 #app-body 本身变成 flex 容器，
   登录门用 flex:1 撑满，再做垂直居中 —— 各种滚动/缩放下都稳。 */
#app-body:has(> .login-gate) { display: flex; flex-direction: column; overflow: hidden; }
.login-gate {
  flex: 1; min-height: 100%; box-sizing: border-box;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 40px 28px calc(40px + env(safe-area-inset-bottom, 0px));
  background: var(--bg);
}
/* v179 修复：原来 .lg-logo 是 76×76 的圆角底，里面塞的 compactIcon 却按全局
   .compact-icon{width:24px;height:24px} 渲染 —— 图标缩在左上角，
   外面那圈底看起来就是"空了一块"（用户反馈：头像框跑偏、不满窗）。
   现在：框本身做 flex 居中，并强制内部图标 100% 铺满（含 glassy 主题的 svg）。 */
.login-gate .lg-logo {
  width: 76px; height: 76px; border-radius: 22px; overflow: hidden;
  box-shadow: var(--shadow-md); margin-bottom: 12px; background: var(--card);
  display: flex; align-items: center; justify-content: center;
  flex: 0 0 auto;
}
.login-gate .lg-logo img { width: 100%; height: 100%; object-fit: contain; }
.login-gate .lg-logo > .compact-icon,
.login-gate .lg-logo .gi-compact { width: 100%; height: 100%; display: flex; }
.login-gate .lg-logo .gi-compact svg { width: 100%; height: 100%; display: block; }
.login-gate h2 { font-size: 20px; }
.login-gate .lg-sub { font-size: 12px; color: var(--text-3); margin: 4px 0 22px; }
.login-gate .lg-form { width: 100%; display: flex; flex-direction: column; gap: 12px; }
.login-gate .lg-input {
  width: 100%; height: 46px; border-radius: var(--radius-md); border: 1px solid var(--divider);
  background: var(--card); padding: 0 16px; font-size: 14.5px; color: var(--text-1);
}
.login-gate .lg-input:focus { border-color: var(--accent); outline: none; }
.login-gate .lg-agree { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--text-3); user-select: none; }
.login-gate .lg-agree input { width: 14px; height: 14px; accent-color: var(--accent); }
.login-gate .lg-tip { text-align: center; font-size: 10.5px; color: var(--text-3); }

/* ============================================================
   朋友圈（复刻微信版面）/ 论坛 / 微博
   ============================================================ */
/* 整体容器 */
.mo-screen { flex: 1; min-height: 0; overflow-y: auto; background: var(--bg); }
/* 封面区 */
.mo-cover {
  position: relative; height: 220px; overflow: hidden;
  background: linear-gradient(160deg, var(--accent-deep, #c06) 0%, var(--accent) 60%, var(--accent-soft) 100%);
}
[data-theme="nuomi"] .mo-cover { background: linear-gradient(160deg,#e8c4d0,#f5dfe8,#fce8ee); }
[data-theme="zhimeng"] .mo-cover { background: linear-gradient(160deg,#1d3050,#2a4a80,#3a6ab0); }
[data-theme="sweetpink"] .mo-cover { background: linear-gradient(160deg,#f4b8cc,#f8d0e0,#fde8f0); }
[data-theme="coquette"] .mo-cover { background: linear-gradient(160deg,#1a1020,#2d1030,#3d1840); }
.mo-cover-bg { position: absolute; inset: 0; }
/* v175 没有自定义封面时的柔光装饰：别让 220px 空着 */
.mo-cover-deco { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.mo-cover-deco i { position: absolute; border-radius: 50%; background: rgba(255, 255, 255, .26); }
.mo-cover-deco i:nth-child(1) { width: 140px; height: 140px; left: -40px; top: -46px; }
.mo-cover-deco i:nth-child(2) { width: 72px; height: 72px; right: 16%; top: 22%; background: rgba(255, 255, 255, .18); }
.mo-cover-deco i:nth-child(3) { width: 210px; height: 210px; right: -70px; bottom: -96px; background: rgba(255, 255, 255, .13); }
.mo-cover-bottom {
  position: absolute; bottom: 16px; right: 14px;
  display: flex; align-items: flex-end; gap: 12px;
}
.mo-cover-name { color: rgba(255,255,255,.92); font-size: 16px; font-weight: 600; text-shadow: 0 1px 4px rgba(0,0,0,.3); }
.mo-cover-av {
  width: 64px; height: 64px; border-radius: 12px;
  background: rgba(255,255,255,.2); border: 3px solid rgba(255,255,255,.8);
  display: flex; align-items: center; justify-content: center; font-size: 34px;
  box-shadow: 0 4px 16px rgba(0,0,0,.2);
}
.mo-cam {
  position: absolute; bottom: 14px; right: 14px;
  /* 只在封面内右下角，昵称+头像同侧但在其上层 */
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,.18); border: none;
  color: rgba(255,255,255,.9); font-size: 18px;
  display: flex; align-items: center; justify-content: center;
  /* 叠在昵称/头像上方右侧（修正位置在封面右上角） */
  top: 14px; bottom: auto; cursor: pointer;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  transition: background var(--dur-fast);
}
.mo-cam:hover { background: rgba(255,255,255,.3); }
/* Feed 列表 */
.mo-feed { padding: 12px 0 32px; }
.mo-empty { text-align: center; padding: 48px 20px; color: var(--text-3); font-size: 14px; }
.mo-empty span { font-size: 36px; display: block; margin-bottom: 10px; }
/* 单条动态：左头像 + 右内容，仿微信左对齐布局 */
.mo-item {
  display: flex; gap: 12px; padding: 14px 14px 0;
  border-bottom: .5px solid var(--divider); padding-bottom: 14px;
}
.mo-av {
  width: 44px; height: 44px; border-radius: 8px; flex-shrink: 0;
  background: var(--accent-soft); display: flex; align-items: center; justify-content: center;
  font-size: 24px; align-self: flex-start;
}
.mo-body { flex: 1; min-width: 0; }
.mo-name { font-size: 15px; font-weight: 600; color: var(--accent-deep, var(--accent)); display: block; margin-bottom: 4px; }
.mo-text { font-size: 14.5px; line-height: 1.65; color: var(--text-1); white-space: pre-wrap; user-select: text; }
/* 图片网格 */
.mo-imgs { display: grid; gap: 3px; margin-top: 8px; border-radius: 6px; overflow: hidden; }
.mo-imgs.g1 { grid-template-columns: min(180px, 65%); }
.mo-imgs.g4 { grid-template-columns: repeat(2, 1fr); }
.mo-imgs.g9 { grid-template-columns: repeat(3, 1fr); }
.mo-img {
  aspect-ratio: 1; border-radius: 4px; display: flex; align-items: center; justify-content: center;
  font-size: 32px; color: rgba(255,255,255,.85); position: relative; overflow: hidden;
  background: var(--card-alt);
}
.mo-imgs.g1 .mo-img { aspect-ratio: 4/3; font-size: 52px; }
.mo-img.pending { font-size: 12px; color: var(--text-3); }
.mo-img::after { content: attr(data-cap); position: absolute; bottom: 0; left: 0; right: 0; font-size: 10px; padding: 8px 5px 3px; background: linear-gradient(transparent, rgba(0,0,0,.45)); color: #fff; pointer-events: none; }
/* 元信息行：时间 + 待刷到提示 + 操作按钮 */
.mo-meta { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.mo-time { font-size: 11px; color: var(--text-3); flex: 1; }
.mo-pending { font-size: 11px; color: var(--accent); }
.mo-menu-btn {
  font-size: 13px; color: var(--text-2); padding: 2px 6px;
  background: var(--card-alt); border-radius: var(--radius-sm); border: none;
  line-height: 1; cursor: pointer; letter-spacing: 1px;
  transition: background var(--dur-fast);
}
.mo-menu-btn:hover { background: var(--divider); }
/* 点赞行 */
.mo-likes {
  font-size: 13px; color: var(--accent); margin-top: 6px;
  background: var(--card-alt); border-radius: 4px; padding: 4px 8px;
  display: flex; align-items: center; gap: 3px; flex-wrap: wrap;
}
/* v179.74 点赞头像（用户/实例/NPC 换过图后显示真实头像，无图退 emoji） */
.mo-like-av {
  width: 20px; height: 20px; border-radius: 50%; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 14px; line-height: 1; flex-shrink: 0;
  background: var(--accent-soft);
}
/* 操作弹出 */
.mo-actions {
  display: flex; gap: 0; margin-top: 6px;
  background: var(--text-1); border-radius: 6px; overflow: hidden;
  box-shadow: 0 4px 14px rgba(0,0,0,.2);
}
.mo-actions button {
  flex: 1; font-size: 13px; padding: 7px 14px;
  color: var(--bg); background: none; border: none; cursor: pointer;
  transition: background var(--dur-fast);
}
.mo-actions button:hover { background: rgba(255,255,255,.1); }
.mo-actions button.on { color: #fc8181; }
/* 评论区 */
.mo-comments {
  margin-top: 6px; background: var(--card-alt); border-radius: 6px;
  padding: 6px 8px; font-size: 13px; line-height: 1.55;
}
.mo-comments p { margin: 0 0 3px; }
.mo-comments p:last-child { margin: 0; }
.mo-comments b { color: var(--accent-deep, var(--accent)); font-weight: 600; }
.forum-post { background: var(--card); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); padding: 14px 16px; margin: 0 14px 12px; cursor: pointer; }
.forum-post .fp-tag { display: inline-block; font-size: 10px; padding: 2px 8px; border-radius: 4px; background: var(--accent-soft); color: var(--accent-deep); margin-right: 6px; font-weight: 600; }
.forum-post h4 { font-size: 15.5px; margin: 6px 0 4px; }
.forum-post .fp-excerpt { font-size: 13px; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.forum-post .fp-meta { font-size: 11px; color: var(--text-3); margin-top: 8px; display: flex; gap: 12px; }
.hot-item { display: flex; gap: 10px; align-items: baseline; padding: 12px 16px; border-bottom: .5px solid var(--divider); background: var(--card); }
.hot-item .rank { font-family: var(--font-mono); font-weight: 700; color: var(--accent); width: 22px; flex-shrink: 0; }
.hot-item .rank.top { font-size: 17px; }
.hot-item b { font-size: 15px; flex: 1; font-weight: 500; }
.hot-item em { font-style: normal; font-size: 11px; color: var(--text-3); }

/* ============================================================
   查手机（数字孪生终端）
   ============================================================ */
#twinphone {
  position: absolute; inset: 0; z-index: 250; background: #111;
  transform: scale(.3); opacity: 0; pointer-events: none; border-radius: var(--radius-md);
  transition: transform var(--dur-slow) cubic-bezier(0.32,0.72,0,1), opacity var(--dur-slow);
  overflow: hidden; display: flex; flex-direction: column;
}
#twinphone.open { transform: scale(1); opacity: 1; pointer-events: auto; border-radius: 0; }
.twin-status { height: var(--sb-h); display: flex; align-items: flex-end; justify-content: space-between; padding: 0 24px 6px; color: #fff; font-size: 13px; font-weight: 600; }
.twin-owner { text-align: center; color: rgba(255,255,255,.9); padding: 6px 0 2px; font-size: 12px; }
.twin-owner b { font-size: 15px; display: block; }
.twin-body { flex: 1; overflow-y: auto; background: #F2F2F7; }
.twin-head-bar { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: rgba(255,255,255,.85); backdrop-filter: blur(12px); position: sticky; top: 0; z-index: 3; }
.twin-head-bar .back { font-size: 22px; color: #007aff; }
.twin-head-bar b { font-size: 17px; }
.twin-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; padding: 18px 12px; }
.twin-app { display: flex; flex-direction: column; align-items: center; gap: 5px; }
.twin-app .ti { width: 58px; height: 58px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 28px; color: #fff; box-shadow: 0 4px 10px rgba(0,0,0,.12); }
.twin-app span { font-size: 11px; color: #1c1c1e; }
.twin-app.locked .ti { filter: grayscale(1) brightness(.9); }
.twin-app.locked span::after { content: " 🔒"; }
.twin-list-cell { display: flex; gap: 12px; padding: 12px 16px; background: #fff; border-bottom: .5px solid #E5E5EA; align-items: center; }
.twin-list-cell .ico { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 20px; background: #F2F2F7; flex-shrink: 0; }
.twin-list-cell .body { flex: 1; min-width: 0; }
.twin-list-cell b { font-size: 14px; display: block; }
.twin-list-cell span { font-size: 12px; color: #8E8E93; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.twin-list-cell .amt { font-size: 14px; font-weight: 600; }
.twin-section-title { font-size: 12px; color: #6D6D72; padding: 14px 16px 6px; text-transform: uppercase; }
.twin-photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; padding: 2px; }
.twin-photo { aspect-ratio: 1; border-radius: 2px; display: flex; align-items: center; justify-content: center; font-size: 30px; color: rgba(255,255,255,.9); position: relative; }
.twin-photo::after { content: attr(data-cap); position: absolute; bottom: 0; left: 0; right: 0; font-size: 9px; padding: 12px 4px 3px; background: linear-gradient(transparent, rgba(0,0,0,.5)); color: #fff; }
.twin-chat-bubble { max-width: 75%; padding: 8px 12px; border-radius: 14px; font-size: 13.5px; margin: 4px 16px; background: #E9E9EB; width: fit-content; }
.twin-chat-bubble.right { background: #007aff; color: #fff; margin-left: auto; }
.twin-gen-loading { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 60px 0; color: #8E8E93; gap: 10px; }
.twin-gen-loading .emo { font-size: 40px; animation: floaty 1.6s ease-in-out infinite; }
.twin-mind { margin: 10px 14px; padding: 10px 12px; background: #FFF8E6; border-radius: 10px; font-size: 12px; color: #8a6d3b; border: 1px dashed #e8d9a8; }

/* ============================================================
   线下 / 见面 · 视觉小说引擎
   ============================================================ */
.mt-wrap { display: flex; flex-direction: column; height: 100%; background: #1a1a2e; }
.scene-chips { display: flex; gap: 8px; overflow-x: auto; padding: 10px 12px; scrollbar-width: none; background: rgba(20,20,38,.92); flex-shrink: 0; z-index: 5; }
.scene-chips::-webkit-scrollbar { display: none; }
.scene-chips button { padding: 6px 14px; border-radius: 99px; background: rgba(255,255,255,.1); font-size: 13px; color: rgba(255,255,255,.7); white-space: nowrap; border: 1px solid transparent; transition: all .25s; }
.scene-chips button.on { background: rgba(255,180,210,.28); color: #ffd0e0; border-color: rgba(255,180,210,.5); }

/* —— 舞台 —— */
.mt-stage { position: relative; flex: 1; min-height: 280px; overflow: hidden; }
.mt-stage.fade-in { animation: mtSceneIn .5s ease; }
@keyframes mtSceneIn { 0% { opacity: .45; transform: scale(.97) translateY(6px); filter: blur(3px); } 100% { opacity: 1; transform: none; filter: none; } }
.mt-back { position: absolute; top: 10px; left: 10px; z-index: 10; width: 34px; height: 34px; border-radius: 50%;
  background: rgba(0,0,0,.45); color: #fff; border: none; font-size: 20px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); transition: background .2s; }
.mt-back:active { background: rgba(0,0,0,.65); transform: scale(.94); }
.mt-bg { position: absolute; inset: 0; transition: opacity .8s ease; }
.mt-vignette { position: absolute; inset: 0; pointer-events: none; z-index: 3;
  background: radial-gradient(ellipse at 50% 55%, transparent 45%, rgba(0,0,0,.4) 100%); }

/* —— 场景背景：咖啡馆 —— */
.mt-bg.mt-cafe { background:
  radial-gradient(ellipse at 50% 0%, rgba(255,220,160,.5) 0%, transparent 55%),
  radial-gradient(ellipse at 20% 40%, rgba(255,180,100,.2) 0%, transparent 35%),
  linear-gradient(180deg, #2a1a0e 0%, #4a2e18 25%, #6a4220 50%, #8a5a30 70%, #3a200e 100%); }
.mt-bg.mt-cafe::before { content: ''; position: absolute; top: 6%; left: 10%; width: 34%; height: 42%;
  background: linear-gradient(180deg, rgba(255,240,200,.6), rgba(255,220,160,.25)); border-radius: 4px;
  box-shadow: 0 0 50px rgba(255,220,160,.35), inset 0 0 20px rgba(255,240,200,.2); border: 8px solid #1a0a04;
  animation: mtFlicker 4s ease-in-out infinite; }
.mt-bg.mt-cafe::after { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 35%;
  background: linear-gradient(180deg, transparent, rgba(20,10,4,.7));
  box-shadow: inset 0 20px 40px rgba(255,200,140,.08); }
@keyframes mtFlicker { 0%,100% { opacity: 1; } 50% { opacity: .92; } }

/* —— 场景背景：家里 —— */
.mt-bg.mt-home { background:
  radial-gradient(ellipse at 70% 25%, rgba(255,200,140,.55) 0%, transparent 45%),
  radial-gradient(ellipse at 30% 60%, rgba(255,180,120,.2) 0%, transparent 40%),
  linear-gradient(180deg, #3a2a1a 0%, #5a4228 35%, #7a5a38 60%, #4a3220 100%); }
.mt-bg.mt-home::before { content: ''; position: absolute; bottom: 8%; right: 6%; width: 42%; height: 35%;
  background: linear-gradient(160deg, #8a6e48, #6a5238); border-radius: 18px 18px 8px 8px;
  box-shadow: 0 10px 40px rgba(0,0,0,.5), inset 0 -8px 16px rgba(0,0,0,.2); }
.mt-bg.mt-home::after { content: '🪑'; position: absolute; bottom: 10%; left: 10%; font-size: 52px; opacity: .35;
  filter: drop-shadow(0 6px 12px rgba(0,0,0,.4)); }

/* —— 场景背景：雨夜街头 —— */
.mt-bg.mt-rain { background:
  radial-gradient(ellipse at 28% 18%, rgba(255,220,120,.4) 0%, transparent 38%),
  radial-gradient(ellipse at 75% 50%, rgba(100,150,220,.15) 0%, transparent 45%),
  linear-gradient(180deg, #08101e 0%, #14223a 35%, #1e3050 60%, #080d1a 100%); }
.mt-bg.mt-rain::before { content: ''; position: absolute; top: 12%; left: 20%; width: 10px; height: 10px;
  background: #ffe080; border-radius: 50%; box-shadow: 0 0 40px 16px rgba(255,220,120,.55), 0 0 80px 24px rgba(255,200,100,.2); }
.mt-bg.mt-rain::after { content: ''; position: absolute; inset: 0;
  background: repeating-linear-gradient(100deg, transparent 0 6px, rgba(180,200,230,.18) 6px 7px);
  animation: mtRain .5s linear infinite; }
@keyframes mtRain { from { transform: translateY(-10px); } to { transform: translateY(0); } }

/* —— 场景背景：旧教室 —— */
.mt-bg.mt-school { background:
  radial-gradient(ellipse at 50% 30%, rgba(200,230,180,.15) 0%, transparent 50%),
  linear-gradient(180deg, #1e2e1e 0%, #2e4a2e 35%, #4a6a4a 60%, #2a3a2a 100%); }
.mt-bg.mt-school::before { content: ''; position: absolute; top: 8%; left: 12%; right: 12%; height: 40%;
  background: linear-gradient(180deg, #121e12, #1e2e1e); border: 10px solid #5a3a1a; border-radius: 4px;
  box-shadow: 0 6px 20px rgba(0,0,0,.4), inset 0 0 30px rgba(200,220,180,.05); }
.mt-bg.mt-school::after { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 38%;
  background: linear-gradient(180deg, transparent, rgba(80,60,30,.65));
  box-shadow: inset 0 10px 30px rgba(200,220,180,.06); }

/* —— 场景背景：海边 —— */
.mt-bg.mt-sea { background:
  radial-gradient(ellipse at 50% 15%, rgba(255,240,200,.3) 0%, transparent 40%),
  linear-gradient(180deg, #5ab8d8 0%, #3a9ec8 25%, #2a7aa8 48%, #c8b888 52%, #e8d8a8 72%, #a88858 100%); }
.mt-bg.mt-sea::before { content: ''; position: absolute; top: 26%; left: 0; right: 0; height: 5px;
  background: rgba(255,255,255,.7); animation: mtWave 3s ease-in-out infinite;
  filter: blur(1px); }
.mt-bg.mt-sea::after { content: ''; position: absolute; top: 32%; left: 0; right: 0; height: 3px;
  background: rgba(255,255,255,.4); animation: mtWave 3s ease-in-out infinite reverse; filter: blur(1px); }
@keyframes mtWave { 0%,100% { transform: translateY(0); } 50% { transform: translateY(8px); } }

.mt-stage .scene-label { position: absolute; top: 12px; left: 12px; z-index: 4; font-size: 11px;
  color: rgba(255,255,255,.92); background: rgba(0,0,0,.4); padding: 4px 12px; border-radius: 99px; backdrop-filter: blur(6px); }

/* —— 立绘（像素风 chibi SVG） —— */
.mt-sprite { position: absolute; bottom: -6px; z-index: 4; width: 48%; max-width: 210px;
  filter: brightness(.55) saturate(.75); transition: filter .4s ease, left .45s cubic-bezier(.2,.9,.3,1.3), transform .4s ease;
  pointer-events: none; }
.mt-sprite.on { filter: brightness(1) saturate(1.06) drop-shadow(0 8px 16px rgba(0,0,0,.35)); }
[data-theme="diary"] .mt-sprite.on { filter: brightness(1) saturate(1.08) drop-shadow(0 6px 18px rgba(196,181,224,.45)); }
.mt-sp-ai { right: 0; }
.mt-sp-user { left: -52%; }
.mt-sp-user.in { left: 0; }
.mt-chibi { width: 100%; height: auto; display: block; overflow: visible;
  animation: mtBreathe 3.6s ease-in-out infinite; }
.mt-sprite.react .mt-chibi { animation: mtReact .4s ease; }
@keyframes mtBreathe { 50% { transform: translateY(-5px); } }
@keyframes mtReact { 0%,100% { transform: scale(1); } 50% { transform: scale(1.08) translateY(-6px); } }

/* —— 旁白 —— */
.mt-narr { position: absolute; inset: 0; z-index: 6; display: flex; align-items: center; justify-content: center; padding: 20px 28px;
  font-style: italic; font-size: 15px; line-height: 1.8; color: rgba(255,255,255,.92); text-align: center; text-shadow: 0 2px 8px rgba(0,0,0,.6);
  background: rgba(0,0,0,.3); backdrop-filter: blur(2px); animation: mtNarrIn .5s ease; transition: opacity .8s ease; }
.mt-narr.out { opacity: 0; }
@keyframes mtNarrIn { from { opacity: 0; } to { opacity: 1; } }

/* —— 视觉小说对话框 —— */
.mt-dialog { position: relative; flex-shrink: 0; background: rgba(18,18,32,.96); backdrop-filter: blur(16px);
  border-top: 1px solid rgba(255,180,210,.25); padding: 14px 18px 16px; min-height: 92px; cursor: pointer; z-index: 7;
  box-shadow: 0 -4px 20px rgba(0,0,0,.3); }
.mt-dlg-name { font-size: 14px; font-weight: 700; margin-bottom: 6px; }
.mt-dlg-name.ai { color: #f0a8c0; }
.mt-dlg-name.me { color: #f4b8c8; }
.mt-dlg-text { font-size: 15px; line-height: 1.7; color: rgba(255,255,255,.92); min-height: 24px; }
.mt-dlg-next { position: absolute; right: 18px; bottom: 12px; color: rgba(255,255,255,.6); font-size: 12px; animation: mtBlink 1s ease-in-out infinite; }
@keyframes mtBlink { 50% { opacity: .3; } }

.meet-actions { display: flex; gap: 8px; flex-wrap: wrap; padding: 8px 12px; background: rgba(18,18,32,.94); flex-shrink: 0; z-index: 7; }
.meet-actions .capsule-btn { background: rgba(255,255,255,.1); color: rgba(255,255,255,.85); border: 1px solid rgba(255,180,210,.25); transition: opacity .2s, transform .15s; cursor: pointer; }
.meet-actions .capsule-btn:active { transform: scale(.95); }
.meet-actions .capsule-btn:disabled { opacity: .45; cursor: not-allowed; }

/* ============================================================
   2.5D 小屋
   ============================================================ */
.room-stage { height: 330px; display: flex; align-items: center; justify-content: center; overflow: hidden; position: relative; margin-top: 6px; }
.room-iso {
  width: 242px; height: 242px; transform: rotateX(55deg) rotateZ(45deg);
  transform-style: preserve-3d; position: relative;
}
.room-floor {
  position: absolute; inset: 0; display: grid; grid-template-columns: repeat(5, 1fr); grid-template-rows: repeat(5, 1fr);
  background: linear-gradient(135deg, #f7e8d5, #efd9bd); border: 3px solid #e3c9a4; border-radius: 6px;
  box-shadow: 22px 22px 0 rgba(132,94,60,.16);
}
.room-floor .cell { border: .5px dashed rgba(180,140,95,.25); position: relative; }
.room-wall { position: absolute; background: linear-gradient(#fdf4e7, #f3e2c8); border: 3px solid #e3c9a4; }
.room-wall.back { width: 242px; height: 110px; top: -110px; left: -3px; transform-origin: bottom; transform: rotateX(-90deg); border-bottom: none; }
.room-wall.left { width: 110px; height: 242px; top: -3px; left: -110px; transform-origin: right; transform: rotateY(90deg); border-left: none; }
.furn { position: absolute; width: 44px; height: 44px; display: flex; align-items: flex-end; justify-content: center; font-size: 26px; z-index: 5; cursor: pointer; }
.furn::before { content: ""; position: absolute; bottom: 0; width: 80%; height: 12px; background: rgba(90,60,30,.18); border-radius: 50%; filter: blur(2px); }
.furn span { position: relative; z-index: 2; animation: floaty 4s ease-in-out infinite; }
.room-char {
  position: absolute; width: 40px; height: 40px; font-size: 30px; z-index: 8;
  display: flex; align-items: flex-end; justify-content: center; cursor: pointer;
  transition: left 1.1s var(--ease-in-out), top 1.1s var(--ease-in-out);
  transform: translateZ(24px);
}
.room-char::before { content: ""; position: absolute; bottom: -2px; width: 70%; height: 10px; background: rgba(90,60,30,.22); border-radius: 50%; filter: blur(2px); }
.room-char .emo { position: relative; z-index: 2; animation: bounce-walk 1.1s ease-in-out infinite; }
@keyframes bounce-walk { 50% { transform: translateY(-5px); } }
.room-speech { position: absolute; top: 8px; left: 50%; transform: translateX(-50%); background: rgba(15,15,26,.75); border-radius: 16px; box-shadow: 0 4px 16px rgba(0,0,0,.2); padding: 8px 14px; font-size: 13px; z-index: 20; white-space: nowrap; max-width: 88%; overflow: hidden; text-overflow: ellipsis; animation: notif-in .3s var(--ease-out); color: #e8e8f0; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid rgba(255,255,255,.06); }
.room-stats { display: flex; gap: 8px; padding: 8px 16px; }
.stat-chip { flex: 1; background: var(--card); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); text-align: center; padding: 10px 4px; }
.stat-chip b { font-size: 17px; display: block; color: var(--accent-deep); }
.stat-chip span { font-size: 11px; color: var(--text-2); }
.room-log { margin: 6px 16px; background: var(--card); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); padding: 10px 14px; font-size: 12.5px; color: var(--text-2); max-height: 120px; overflow-y: auto; }
.room-log p { margin-bottom: 4px; }
.room-log p::before { content: "· "; color: var(--accent); }

/* ============================================================
   通话
   ============================================================ */
#callui {
  position: absolute; inset: 0; z-index: 260; display: none; flex-direction: column; align-items: center;
  padding-top: calc(var(--sb-h) + 18px); color: #fff;
  background: linear-gradient(165deg, #2b2233 0%, #41304b 45%, #26202e 100%);
}
#callui::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(120% 55% at 50% 0%, rgba(255, 126, 179, .16), transparent 62%),
    radial-gradient(90% 45% at 5% 100%, rgba(126, 148, 255, .12), transparent 60%);
}
#callui > * { position: relative; z-index: 1; }
/* 权限/降级提示条 */
.call-banner {
  width: min(340px, calc(100% - 28px)); margin: 0 0 8px;
  background: rgba(255, 214, 102, .14); border: 1px solid rgba(255, 214, 102, .34);
  color: #ffe9b0; border-radius: 12px; padding: 8px 10px;
  font-size: 12px; line-height: 1.5;
  display: flex; gap: 8px; align-items: center; justify-content: space-between;
}
.call-banner[hidden] { display: none; }
.call-banner button {
  flex-shrink: 0; border: 0; background: rgba(255, 255, 255, .92); color: #4a3a12;
  font-size: 11px; font-weight: 600; padding: 5px 9px; border-radius: 8px; cursor: pointer;
}
.call-video-grid { position: relative; width: 100%; flex: 1; min-height: 170px; margin-top: 6px; overflow: hidden; background: #17131c; }
.call-video-grid video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.call-video-grid .call-remote {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(80% 60% at 50% 42%, rgba(255, 255, 255, .08), rgba(0, 0, 0, .42));
}
.call-remote .call-avatar { margin-bottom: 0; }
.cv-net {
  position: absolute; top: 12px; right: 14px; z-index: 4;
  display: inline-flex; align-items: center; gap: 5px;
  background: rgba(0, 0, 0, .38); border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 99px; padding: 4px 9px; font-size: 11px; color: rgba(255, 255, 255, .88);
  backdrop-filter: blur(6px);
}
.cv-net i { width: 6px; height: 6px; border-radius: 50%; background: #5ee08a; box-shadow: 0 0 6px rgba(94, 224, 138, .9); animation: cvNet 1.8s ease-in-out infinite; }
@keyframes cvNet { 50% { opacity: .35; } }
.cv-top {
  position: absolute; top: 0; left: 0; right: 96px; z-index: 4;
  padding: 12px 4px 26px 16px;
  background: linear-gradient(rgba(0, 0, 0, .5), transparent);
  text-align: left; pointer-events: none;
}
.cv-top .call-name { font-size: 18px; font-weight: 600; text-shadow: 0 1px 6px rgba(0, 0, 0, .5); }
.cv-top .call-state { margin-top: 2px; font-size: 12px; }
.call-video-grid .call-sub {
  position: absolute; left: 14px; right: calc(28% + 24px); bottom: 14px; z-index: 4;
  margin: 0; max-width: none; min-height: 0; text-align: left;
  font-size: 13.5px; line-height: 1.6;
  text-shadow: 0 1px 6px rgba(0, 0, 0, .65);
}
.call-video-grid #call-local {
  position: absolute; top: auto; left: auto; bottom: 12px; right: 12px; width: 28%; height: 26%;
  border-radius: 12px; border: 2px solid rgba(255, 255, 255, .55);
  object-fit: cover; z-index: 3; background: #0d0b10;
}
.cv-camoff {
  position: absolute; bottom: 12px; right: 12px; width: 28%; height: 26%;
  border-radius: 12px; border: 2px dashed rgba(255, 255, 255, .35);
  background: rgba(10, 8, 12, .72); z-index: 4;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  font-size: 20px; color: rgba(255, 255, 255, .8);
}
.cv-camoff[hidden] { display: none; }
.cv-camoff small { font-size: 10px; opacity: .8; }
#callui.open { display: flex; animation: fade-in .3s var(--ease-out); }
@keyframes fade-in { from { opacity: 0; } }
.call-avatar { position: relative; width: 132px; height: 132px; border-radius: 50%; background: rgba(255,255,255,.12); display: flex; align-items: center; justify-content: center; font-size: 66px; margin-bottom: 20px; }
.call-avatar::before, .call-avatar::after { content: ""; position: absolute; inset: -14px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.25); animation: ring-pulse 2.2s ease-out infinite; }
.call-avatar::after { animation-delay: 1.1s; }
@keyframes ring-pulse { from { transform: scale(.92); opacity: .8; } to { transform: scale(1.35); opacity: 0; } }
.call-avatar.speaking { box-shadow: 0 0 0 6px rgba(255,255,255,.08), 0 0 44px rgba(255,126,179,.5); }
.call-name { font-size: 24px; font-weight: 600; }
/* 语音通话：内容在剩余空间里垂直居中，控制栏始终贴底 */
.call-voice-body {
  flex: 1 1 auto; min-height: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding-top: 8px;
}
.call-state { font-size: 13px; opacity: .75; margin-top: 6px; font-variant-numeric: tabular-nums; }
.call-sub { margin-top: 12px; max-width: 320px; text-align: center; font-size: 15px; line-height: 1.7; min-height: 54px; color: rgba(255,255,255,.92); user-select: text; }
/* 打字插话条：没麦克风/不方便说话时的兜底通路 */
.call-typebar {
  display: flex; gap: 8px; align-items: center;
  width: min(340px, calc(100% - 28px)); padding-top: 12px;
}
.call-typebar input {
  flex: 1; min-width: 0; height: 36px; border: 1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.1); border-radius: 99px; padding: 0 14px;
  color: #fff; font-size: 13px; outline: none;
}
.call-typebar input::placeholder { color: rgba(255,255,255,.45); }
.call-typebar button {
  flex-shrink: 0; border: 0; height: 36px; padding: 0 14px; border-radius: 99px;
  background: rgba(255,255,255,.92); color: #2b2233; font-size: 13px; font-weight: 600; cursor: pointer;
}
/* 控制栏：栅格排布，避免 flex 换行后参差不齐 */
.call-controls {
  margin-top: auto;
  display: grid; grid-template-columns: repeat(var(--cc-cols, 6), minmax(0, 1fr));
  gap: 14px 6px; justify-items: center; align-items: start;
  width: min(384px, 100%); margin-left: auto; margin-right: auto;
  padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 22px);
}
.call-controls.cols-4 { --cc-cols: 4; gap: 14px 10px; }
.call-cbtn {
  width: 54px; height: 54px; border-radius: 50%; background: rgba(255,255,255,.14);
  font-size: 21px; display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(8px); transition: background var(--dur-fast), transform var(--dur-fast), opacity var(--dur-fast);
}
.call-cbtn:active { transform: scale(.94); }
.call-cbtn.on { background: #fff; color: #26202e; }
.call-cbtn.is-off { opacity: .38; }
.call-cbtn.hang { background: #ff3b30; box-shadow: 0 4px 16px rgba(255, 59, 48, .35); }
.call-cbtn-wrap { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 11px; opacity: .88; white-space: nowrap; }
/* 群视频：我这一格上真实画面 */
.gcall-tile .g-self { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; opacity: .92; }
.gcall-tile .g-av, .gcall-tile .g-name, .gcall-tile .g-mic { position: relative; z-index: 1; }

/* ============================================================
   小游戏
   ============================================================ */
.game-arena { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 16px; }
.rps-hands { display: flex; align-items: center; gap: 24px; margin: 18px 0; }
.rps-hand { font-size: 64px; width: 90px; height: 90px; display: flex; align-items: center; justify-content: center; background: var(--card); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); }
.rps-hand.shake { animation: shake .4s 2; }
.rps-hand.ai { transform: rotate(180deg); }
.rps-vs { font-size: 13px; color: var(--text-3); font-weight: 700; }
.rps-opts { display: flex; gap: 14px; }
.rps-opts button { width: 64px; height: 64px; border-radius: 18px; background: var(--card); box-shadow: var(--shadow-sm); font-size: 30px; transition: transform var(--dur-fast) var(--ease-spring); }
.rps-opts button:active { transform: scale(.88); }
.gomoku-board { display: grid; grid-template-columns: repeat(15, 1fr); width: min(92vw, 330px); height: min(92vw, 330px); background: #e8c88f; border-radius: 8px; padding: 5px; box-shadow: var(--shadow-md); }
.gk-cell { position: relative; border: .5px solid rgba(120,80,30,.28); cursor: pointer; }
.gk-cell.star::after { content: ""; position: absolute; left: 50%; top: 50%; width: 5px; height: 5px; background: #7a5a28; border-radius: 50%; transform: translate(-50%,-50%); }
.gk-stone { position: absolute; inset: 12%; border-radius: 50%; }
.gk-stone.b { background: radial-gradient(circle at 32% 30%, #5a5a5a, #0c0c0c 68%); box-shadow: 0 2px 4px rgba(0,0,0,.4); }
.gk-stone.w { background: radial-gradient(circle at 32% 30%, #fff, #d8d8d8 70%); box-shadow: 0 2px 4px rgba(0,0,0,.3); }
.gk-stone.last { box-shadow: 0 0 0 2.5px var(--accent); }
.wheel-wrap { position: relative; width: 280px; height: 280px; margin: 10px auto; }
.wheel {
  width: 100%; height: 100%; border-radius: 50%; position: relative;
  transition: transform 4.2s cubic-bezier(0.15, 0.9, 0.25, 1);
  box-shadow: 0 10px 30px rgba(0,0,0,.2), inset 0 0 0 6px rgba(255,255,255,.75);
  overflow: hidden;
}
.wheel-pointer { position: absolute; top: -8px; left: 50%; transform: translateX(-50%); z-index: 3; font-size: 28px; filter: drop-shadow(0 3px 4px rgba(0,0,0,.3)); }
.wheel-item { position: absolute; left: 50%; top: 50%; transform-origin: 0 0; font-size: 13px; font-weight: 600; color: #fff; white-space: nowrap; text-shadow: 0 1px 2px rgba(0,0,0,.3); }
.game-banner { font-size: 15px; font-weight: 600; text-align: center; min-height: 26px; }
.game-score { display: flex; gap: 10px; }
.game-score span { background: var(--card); box-shadow: var(--shadow-sm); border-radius: var(--radius-md); padding: 6px 14px; font-size: 13px; color: var(--text-2); }
.game-score b { color: var(--accent-deep); font-size: 16px; }

/* ============================================================
   剧场 / 阅读器
   ============================================================ */
.theater-card { display: flex; gap: 14px; margin: 0 16px 12px; background: var(--card); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); overflow: hidden; cursor: pointer; }
.theater-cover { width: 100px; min-height: 118px; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 38px; flex-shrink: 0; }
.theater-info { padding: 14px 14px 12px 0; display: flex; flex-direction: column; }
.theater-info h4 { font-size: 16px; }
.theater-info .en { font-size: 10px; letter-spacing: 2px; color: var(--text-3); text-transform: uppercase; margin: 2px 0 6px; }
.theater-info p { font-size: 12.5px; color: var(--text-2); flex: 1; }
.theater-info .act-tag { font-size: 11px; color: var(--accent-deep); font-weight: 600; }
.reader-bg { position: absolute; inset: 0; opacity: .16; z-index: 0; }
.reader { position: relative; z-index: 1; padding: 20px 20px 120px; }
.reader .r-scene { font-size: 12px; color: var(--text-3); letter-spacing: 1px; text-transform: uppercase; margin-bottom: 4px; }
.reader .r-narr { font-style: italic; color: var(--text-2); line-height: 1.9; margin: 10px 0; user-select: text; }
.reader .r-dlg { margin: 12px 0; line-height: 1.7; user-select: text; }
.reader .r-dlg b { color: var(--accent-deep); }
.reader .r-dlg.choice { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }
.reader .r-dlg.choice button { text-align: left; padding: 13px 16px; border-radius: var(--radius-md); background: var(--card); box-shadow: var(--shadow-sm); font-size: 14.5px; border-left: 3px solid var(--accent); animation: notif-in .3s var(--ease-out) both; }
.reader .r-dlg.choice button:nth-child(2) { animation-delay: .08s; } .reader .r-dlg.choice button:nth-child(3) { animation-delay: .16s; }
.fic-paper { background: var(--card); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); margin: 0 16px 14px; padding: 20px 18px; }
.fic-paper h2 { font-size: 18px; margin-bottom: 4px; }
.fic-paper .fic-meta { font-size: 11px; color: var(--text-3); margin-bottom: 12px; }
.fic-paper p { font-size: 14.5px; line-height: 2; text-indent: 2em; margin-bottom: 10px; user-select: text; }
.fic-chapter-tabs { display: flex; gap: 6px; overflow-x: auto; padding: 10px 16px; scrollbar-width: none; }
.fic-chapter-tabs::-webkit-scrollbar { display: none; }

/* ============================================================
   情侣空间 / 日记 / 关系网
   ============================================================ */
.couple-wall {
  position: relative; height: 340px; margin: 12px 16px; border-radius: var(--radius-lg);
  background: repeating-linear-gradient(45deg, #fdf3f7 0 14px, #fceaf2 14px 28px);
  box-shadow: var(--shadow-sm); overflow: hidden;
}
.love-note { position: absolute; width: 108px; padding: 10px; font-size: 12px; line-height: 1.5; box-shadow: 0 6px 14px rgba(0,0,0,.1); transform: rotate(var(--rot, 0deg)); cursor: grab; user-select: none; }
.love-note b { display: block; font-size: 10px; opacity: .65; margin-bottom: 4px; }
.love-note::before { content: ""; position: absolute; top: -6px; left: 50%; transform: translateX(-50%); width: 26px; height: 10px; background: rgba(255,255,255,.55); border-radius: 2px; box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.couple-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 0 16px 12px; }
.couple-stat { background: var(--card); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); text-align: center; padding: 14px 6px; }
.couple-stat b { font-size: 20px; color: var(--accent-deep); display: block; }
.couple-stat span { font-size: 11px; color: var(--text-2); }
.diary-paper { background: repeating-linear-gradient(#fff, #fff 30px, #f3e9ef 31px); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); margin: 0 16px 14px; padding: 20px 18px; line-height: 31px; }
.diary-paper .d-head { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-2); margin-bottom: 8px; }
.diary-paper textarea { width: 100%; border: none; background: transparent; line-height: 31px; font-size: 14.5px; resize: none; min-height: 124px; color: var(--text-1); }
.relnet-wrap { position: relative; height: 380px; margin: 10px 16px; background: var(--card); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); overflow: hidden; }
.relnet-wrap canvas { position: absolute; inset: 0; }
.rel-node { position: absolute; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 3px; cursor: pointer; z-index: 2; transition: filter var(--dur-fast); }
.rel-node .av { width: 52px; height: 52px; border-radius: 50%; background: var(--accent-soft); display: flex; align-items: center; justify-content: center; font-size: 26px; border: 3px solid var(--card); box-shadow: var(--shadow-sm); }
.rel-node.me .av { border-color: var(--accent); }
.rel-node span { font-size: 11px; background: var(--card); padding: 1px 8px; border-radius: var(--radius-full); box-shadow: var(--shadow-sm); }
.rel-node:active { filter: brightness(1.08); }

/* ============================================================
   工坊 / 档案 / 设置 / 其他
   ============================================================ */
.ws-card { display: flex; gap: 12px; margin: 0 16px 12px; background: var(--card); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); padding: 12px; align-items: center; }
.ws-card .icon-cont { width: 52px; height: 52px; flex-shrink: 0; }
.ws-card .body { flex: 1; min-width: 0; }
.ws-card b { font-size: 14.5px; display: block; }
.ws-card p { font-size: 12px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ws-card .meta { font-size: 10px; color: var(--text-3); margin-top: 2px; }
.profile-hero { text-align: center; padding: 26px 20px 18px; background: linear-gradient(160deg, var(--accent-soft), transparent 70%); }
.profile-hero .avatar { width: 84px; height: 84px; margin: 0 auto 10px; border-radius: 50%; background: var(--card); box-shadow: var(--shadow-md); display: flex; align-items: center; justify-content: center; font-size: 44px; }
.profile-hero .name { font-size: 20px; font-weight: 700; }
.profile-hero .lv-badge { display: inline-block; margin-top: 6px; font-size: 11px; font-weight: 700; color: var(--accent-contrast); background: var(--accent); border-radius: var(--radius-full); padding: 3px 12px; }
.heart-points { font-size: 40px; font-weight: 800; color: var(--accent-deep); font-variant-numeric: tabular-nums; }
.xp-bar { height: 8px; border-radius: 4px; background: var(--divider); overflow: hidden; margin: 10px auto 0; max-width: 260px; }
.xp-bar i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--accent), var(--accent-deep)); transition: width .6s var(--ease-out); }
.ach-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px 6px; padding: 6px 16px; text-align: center; }
.ach-cell .a-ico { font-size: 30px; }
.ach-cell.locked { filter: grayscale(1); opacity: .4; }
.ach-cell span { font-size: 10px; color: var(--text-2); display: block; margin-top: 4px; }
.theme-pick { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; padding: 4px 16px 16px; }
.theme-card { border-radius: var(--radius-lg); padding: 14px; box-shadow: var(--shadow-sm); border: 2.5px solid transparent; cursor: pointer; transition: transform var(--dur-fast) var(--ease-spring); }
.theme-card:active { transform: scale(.96); }
.theme-card.on { border-color: var(--accent); }
.theme-card .swatches { display: flex; gap: 6px; margin: 8px 0; }
.theme-card .swatches i { width: 22px; height: 22px; border-radius: 50%; border: 2px solid #fff; box-shadow: var(--shadow-sm); }
.theme-card b { font-size: 14px; }
.theme-card span { font-size: 11px; opacity: .7; display: block; }
.theme-card.nuomi { background: #F5F5F7; color: #1A1A1A; }
.theme-card.zhimeng { background: #EDF1F7; color: #1D2129; }
.theme-card.sweetpink { background: #FFF5F8; color: #4A2C3A; }
.theme-card.custom { background: var(--card); }
.qa-bubble { max-width: 88%; margin: 0 16px 10px; padding: 12px 14px; border-radius: var(--radius-md); background: var(--card); box-shadow: var(--shadow-sm); font-size: 14px; line-height: 1.7; user-select: text; }
.qa-bubble.me { background: var(--accent); color: var(--accent-contrast); margin-left: auto; }
.qa-bubble .who { font-size: 11px; opacity: .6; margin-bottom: 4px; }
.kv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 0 16px 12px; }
.kv-cell { background: var(--card); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); padding: 12px; text-align: center; }
.kv-cell b { font-size: 19px; display: block; color: var(--accent-deep); }
.kv-cell span { font-size: 11px; color: var(--text-2); }
.wb-entry { background: var(--card); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); padding: 12px 14px; margin: 0 16px 10px; }
.wb-entry .keys { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.wb-entry .keys em { font-style: normal; font-size: 11px; background: var(--accent-soft); color: var(--accent-deep); border-radius: 4px; padding: 2px 8px; }
.grid-pad { padding: 12px 16px; }
.row-flex { display: flex; align-items: center; gap: 10px; }
.grow { flex: 1; min-width: 0; }
.muted { color: var(--text-2); font-size: 12.5px; }
.tiny { color: var(--text-3); font-size: 11px; }
.center { text-align: center; }
.mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; } .mb8 { margin-bottom: 8px; }
.notice { margin: 12px 16px; padding: 10px 14px; border-radius: var(--radius-md); background: var(--accent-soft); color: var(--accent-deep); font-size: 12.5px; line-height: 1.6; }
.progress-bar { height: 7px; border-radius: 4px; background: var(--divider); overflow: hidden; }
.progress-bar i { display: block; height: 100%; background: var(--accent); border-radius: 4px; transition: width .5s var(--ease-out); }
.song-row { display: flex; align-items: center; gap: 12px; padding: 11px 16px; background: var(--card); border-bottom: .5px solid var(--divider); }
.song-row .cover { width: 42px; height: 42px; border-radius: 9px; display: flex; align-items: center; justify-content: center; font-size: 20px; color: #fff; flex-shrink: 0; }
.song-row b { font-size: 14px; display: block; }
.song-row span { font-size: 12px; color: var(--text-2); }
.song-row .dur { margin-left: auto; font-size: 11px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.player-wrap { padding: 14px 20px; text-align: center; }
.player-cover { width: 190px; height: 190px; margin: 8px auto 16px; border-radius: 22px; display: flex; align-items: center; justify-content: center; font-size: 74px; color: #fff; box-shadow: var(--shadow-lg); animation: breathe 4s ease-in-out infinite; }
.lyrics { height: 120px; overflow: hidden; position: relative; margin: 8px 24px; }
.lyrics p { font-size: 14px; color: var(--text-3); line-height: 40px; transition: all .4s; height: 40px; }
.lyrics p.on { color: var(--accent-deep); font-weight: 700; font-size: 16px; }
.danmaku-slot { position: relative; height: 30px; overflow: hidden; margin: 6px 0; }
.danmaku-item { position: absolute; left: 100%; white-space: nowrap; font-size: 12.5px; color: var(--accent-deep); background: var(--card); border-radius: var(--radius-full); padding: 3px 12px; box-shadow: var(--shadow-sm); animation: danmaku 9s linear; }
@keyframes danmaku { to { left: -130%; } }
.watch-screen { margin: 10px 16px; border-radius: var(--radius-lg); aspect-ratio: 16/9; background: #14141c; display: flex; align-items: center; justify-content: center; color: #8a8aa0; font-size: 44px; position: relative; overflow: hidden; }
.watch-bar { display: flex; align-items: center; gap: 10px; margin: 0 16px 10px; }
.watch-bar .w-time { font-size: 11px; color: var(--text-2); font-variant-numeric: tabular-nums; }

/* 通用加载骨架 */
.skeleton { border-radius: var(--radius-md); background: linear-gradient(100deg, var(--card-alt) 40%, var(--card) 50%, var(--card-alt) 60%); background-size: 200% 100%; animation: ske 1.2s infinite; }
@keyframes ske { to { background-position: -200% 0; } }
.ai-loading { display: flex; gap: 8px; padding: 20px; align-items: center; justify-content: center; color: var(--text-3); font-size: 13px; }
.ai-loading .emo { font-size: 22px; animation: floaty 1.4s ease-in-out infinite; }

/* App 打开动画
   v179 修复：原来只有 from 帧 + fill-mode:both，且 JS 侧用 void offsetWidth 反复重排来重启动画。
   实测：动画经常不落到自然态 —— #appscreen 的 transform 长期停在 scale(.3)，
   整个 App 缩成中间一小块、#app-body 宽度从 298px 塌到 89px，界面看起来像「应用坏了」。

   正确做法：进入动画只负责「进入」那一瞬，结束态交给 CSS 自然值。
   · fill-mode: backwards（仅前向延迟时套用 from），不用 both
   · 显式写 to 帧回到自然值
   · .screen 基础态是 scale(1.04)，.active 时是 scale(1) */
#appscreen.zoom-open { animation: app-open .34s cubic-bezier(0.32,0.72,0,1) backwards; }
@keyframes app-open {
  from { opacity: .4; transform: scale(.3); border-radius: 40px; }
  to   { opacity: 1;   transform: scale(1);  border-radius: 0;   }
}

/* 动效偏好 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* PWA 安装提示 */
#install-tip {
  position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%);
  background: rgba(20,20,24,.86); color: #fff; backdrop-filter: blur(8px);
  border-radius: var(--radius-full); padding: 11px 20px; font-size: 13.5px; z-index: 999;
  box-shadow: var(--shadow-lg);
}

/* ============================================================
   参考图复刻：少女甜系 · 治愈桌面主题（三页主屏）
   页1 主屏空间：天气+日期待办 / 日记手账 / 创作灵感·探索世界
   页2 生活工具：文件夹卡（名牌）/ 大图标 / 棉花糖悬浮件
   页3 娱乐社交：游戏时长黑卡 / 游戏厅·私密盒 / 心动音乐盒
   ============================================================ */

/* ---------- 甜粉壁纸：云朵感渐变 ---------- */
:root[data-theme="sweetpink"] {
  --wallpaper:
    radial-gradient(ellipse 120px 46px at 18% 6%, rgba(255,255,255,.9), transparent 70%),
    radial-gradient(ellipse 90px 36px at 78% 12%, rgba(255,255,255,.75), transparent 70%),
    radial-gradient(ellipse 140px 50px at 62% 92%, rgba(255,255,255,.8), transparent 70%),
    radial-gradient(circle at 10% 30%, rgba(255,190,216,.55) 0 90px, transparent 130px),
    radial-gradient(circle at 92% 44%, rgba(255,205,228,.5) 0 110px, transparent 150px),
    radial-gradient(circle at 30% 74%, rgba(255,205,228,.45) 0 80px, transparent 120px),
    linear-gradient(180deg, #FBDCE4 0%, #FCE9EE 46%, #F9E3EA 100%);
}

/* ---------- 桌面悬浮装饰（蝴蝶结/爱心/星星/云） ---------- */
[data-theme="sweetpink"] .home-deco { inset: 0; display: block; font-size: 16px; opacity: 1; filter: none; }
#home-deco { pointer-events: none; }
#home-deco span { position: absolute; opacity: .85; filter: drop-shadow(0 2px 4px rgba(232,90,144,.18)); animation: deco-float 6s ease-in-out infinite; }
#home-deco span:nth-child(2) { animation-delay: -2s; }
#home-deco span:nth-child(3) { animation-delay: -4s; }
#home-deco span:nth-child(4) { animation-duration: 8s; }
@keyframes deco-float { 0%,100% { transform: translateY(0) rotate(-6deg); } 50% { transform: translateY(-8px) rotate(6deg); } }

/* ---------- 页面横幅（♥ 生活工具 🎀） ---------- */
.page-banner {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 6px 0 14px; font-size: 16px; font-weight: 700; color: var(--text-1);
  letter-spacing: 2px;
}
.page-banner .pb-heart { color: var(--accent-deep); font-size: 12px; }
.page-banner .pb-bow { font-size: 15px; }
.page-banner .pb-line { flex: 0 0 34px; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--accent)); opacity: .5; }
.page-banner .pb-line.r { transform: scaleX(-1); }

/* ---------- 双列组件行 ---------- */
.w-row { display: grid; grid-template-columns: 1.35fr 1fr; gap: 12px; }
.w-row > .widget { margin: 0; }
.grid-pad .widget { margin: 0 0 12px; }
.grid-pad { padding: 2px 14px 0; }
.grid-pad .w-row, .grid-pad .w-duo, .grid-pad .folder-duo, .grid-pad .icon-grid { margin: 0 0 12px; }
.grid-pad .icon-grid:last-child { margin-bottom: 24px; }

/* ---------- 天气卡 ---------- */
.w-weather { padding: 14px 16px 12px; cursor: pointer; position: relative; overflow: hidden; }
.w-weather:active { transform: scale(.98); }
.w-weather .ww-top { display: flex; align-items: flex-start; justify-content: space-between; }
.w-weather .ww-temp { font-family: var(--font-display); font-size: 40px; font-weight: 700; line-height: 1; letter-spacing: -1px; color: var(--text-1); }
.w-weather .ww-temp i { font-style: normal; font-size: 20px; vertical-align: 18px; color: var(--text-2); }
.w-weather .ww-cond { font-size: 12px; color: var(--text-2); margin-top: 4px; }
.w-weather .ww-cloud { font-size: 34px; filter: drop-shadow(0 4px 8px rgba(232,90,144,.2)); animation: deco-float 5s ease-in-out infinite; }
.w-weather .ww-meta { display: flex; gap: 10px; margin-top: 8px; font-size: 10.5px; color: var(--text-2); }
.w-weather .ww-meta b { color: var(--text-1); font-weight: 600; }
.w-weather .ww-city { display: flex; align-items: center; gap: 4px; margin-top: 6px; font-size: 11px; font-weight: 600; color: var(--accent-deep); }
.w-weather .ww-hours { display: flex; justify-content: space-between; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--divider); }
.w-weather .ww-hours .h { text-align: center; font-size: 10px; color: var(--text-2); }
.w-weather .ww-hours .h b { display: block; font-size: 11px; color: var(--text-1); margin-top: 2px; }
.w-weather .ww-hours .h .ic { font-size: 14px; }

/* ---------- 日期待办卡 ---------- */
.w-date { padding: 14px 14px 12px; cursor: pointer; display: flex; flex-direction: column; }
.w-date:active { transform: scale(.98); }
.w-date .wd-date { font-size: 20px; font-weight: 800; color: var(--text-1); letter-spacing: .5px; }
.w-date .wd-week { font-size: 11px; color: var(--text-2); margin-top: 2px; }
.w-date .wd-sweet { margin-top: 8px; }
.w-date .wd-sweet .lab { display: flex; justify-content: space-between; font-size: 10px; color: var(--text-2); }
.w-date .wd-sweet .lab b { color: var(--accent-deep); }
.w-date .bar { height: 7px; border-radius: 4px; background: var(--accent-soft); margin-top: 4px; overflow: hidden; }
.w-date .bar i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--accent), var(--accent-deep)); transition: width .6s var(--ease-out); }
.w-date .wd-weeks { display: flex; justify-content: space-between; margin-top: 8px; font-size: 9px; color: var(--text-3); }
.w-date .wd-weeks b { color: var(--accent-deep); }
.w-date .wd-dates { display: flex; justify-content: space-between; margin-top: 5px; font-size: 10px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.w-date .wd-dates .today { width: 16px; height: 16px; margin: -2px auto 0; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center; font-size: 9px; }
.w-date .wd-todo { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--divider); font-size: 10.5px; color: var(--text-2); }
.w-date .wd-todo .t { display: flex; align-items: center; gap: 5px; margin-top: 4px; white-space: nowrap; overflow: hidden; }
.w-date .wd-todo .t i { flex: 0 0 auto; width: 10px; height: 10px; border: 1.5px solid var(--accent); border-radius: 50%; font-style: normal; }
.w-date .wd-todo .t.done i { background: var(--accent); }
.w-date .wd-todo .t.done span { text-decoration: line-through; opacity: .6; }

/* ---------- 日记手账卡 ---------- */
.w-diary { position: relative; padding: 16px 16px 18px; cursor: pointer; overflow: hidden; }
.w-diary:active { transform: scale(.98); }
.w-diary .dj-title { display: flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 800; color: var(--text-1); }
.w-diary .dj-title .hb { color: var(--accent-deep); font-size: 12px; }
.w-diary .dj-bow { position: absolute; top: -6px; right: 14px; font-size: 26px; transform: rotate(12deg); filter: drop-shadow(0 3px 5px rgba(232,90,144,.25)); }
.w-diary .dj-body { display: flex; gap: 12px; margin-top: 10px; align-items: center; }
.w-diary .dj-text { flex: 1; min-width: 0; }
.w-diary .dj-text .dj-date { font-size: 10px; color: var(--accent-deep); font-weight: 700; letter-spacing: 1px; }
.w-diary .dj-text p { margin-top: 6px; font-size: 12px; line-height: 1.75; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.w-diary .dj-photo { flex: 0 0 92px; height: 104px; background: #fff; border-radius: 6px; padding: 5px 5px 14px;
  box-shadow: 0 6px 16px rgba(232,90,144,.22); transform: rotate(5deg); position: relative; }
.w-diary .dj-photo::before { content: "♡"; position: absolute; top: -9px; left: 50%; transform: translateX(-50%);
  width: 26px; height: 14px; background: rgba(255,184,216,.85); border-radius: 3px; font-size: 9px; color: #fff;
  display: flex; align-items: center; justify-content: center; }
.w-diary .dj-photo .ph { width: 100%; height: 100%; border-radius: 4px;
  background: linear-gradient(180deg, #FCD9E4 0%, #F5B8CC 42%, #E891AC 68%, #C96F8E 100%); position: relative; overflow: hidden; }
.w-diary .dj-photo .ph::after { content: ""; position: absolute; left: 18%; right: 18%; bottom: 18%; height: 3px; border-radius: 3px; background: rgba(255,255,255,.85); box-shadow: 0 -12px 0 -0.5px rgba(255,255,255,.65), 0 -26px 0 -1px rgba(255,255,255,.4); }
.w-diary .dj-photo .ph::before { content: "☀"; position: absolute; top: 16%; left: 50%; transform: translateX(-50%); color: #fff; font-size: 15px; opacity: .95; }
.w-diary .dj-cat { position: absolute; right: -3px; bottom: -3px; font-size: 16px; transform: scaleX(-1); z-index: 2; filter: drop-shadow(0 2px 3px rgba(0,0,0,.12)); }

/* ---------- 迷你双卡（创作灵感 / 探索世界） ---------- */
.w-duo { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.w-card { position: relative; background: var(--card); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm);
  padding: 14px; overflow: hidden; cursor: pointer; min-height: 88px; }
.w-card:active { transform: scale(.98); }
.w-card b { font-size: 14px; color: var(--text-1); display: block; }
.w-card .sub { font-size: 10.5px; color: var(--text-2); margin-top: 4px; line-height: 1.5; }
.w-card .wc-ico { position: absolute; right: 10px; bottom: 10px; font-size: 26px; }
.w-card .wc-cat { position: absolute; right: 8px; top: 8px; font-size: 15px; opacity: .9; }
.w-card.tinted { background: linear-gradient(135deg, #FFF 62%, var(--accent-soft)); }

/* ---------- 游戏时长黑卡 ---------- */
.w-game { position: relative; background: linear-gradient(135deg, #23232A 0%, #15151A 60%, #201A22 100%);
  color: #fff; border-radius: 22px; padding: 18px 16px 22px; overflow: visible; cursor: pointer;
  box-shadow: 0 10px 24px rgba(21,21,26,.35); }
.w-game:active { transform: scale(.985); }
.w-game .g-title { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 700; }
.w-game .g-title .pad { color: var(--accent); font-size: 15px; }
.w-game .g-title .cls { margin-left: auto; color: rgba(255,255,255,.4); font-size: 11px; }
.w-game .g-sub { margin-top: 10px; font-size: 11px; color: rgba(255,255,255,.65); }
.w-game .g-time { font-family: var(--font-display); font-size: 34px; font-weight: 800; color: #FF7EB3; line-height: 1.15; letter-spacing: -.5px; text-shadow: 0 0 18px rgba(255,126,179,.35); }
.w-game .g-beat { margin-top: 4px; font-size: 11px; color: rgba(255,255,255,.8); }
.w-game .g-beat b { color: #FF9EC2; }
.w-game .g-bar { margin-top: 10px; height: 6px; border-radius: 4px; background: rgba(255,255,255,.14); overflow: hidden; }
.w-game .g-bar i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, #FF7EB3, #FF9EC2); box-shadow: 0 0 8px rgba(255,126,179,.6); }
.w-game .g-claw { position: absolute; right: 10px; top: 34px; font-size: 46px; transform: rotate(8deg); filter: drop-shadow(0 4px 10px rgba(0,0,0,.4)); }
.w-game .g-hearts { position: absolute; right: 14px; bottom: 8px; font-size: 11px; color: #FF7EB3; letter-spacing: 3px; opacity: .8; }

/* ---------- 心动音乐盒（唱片机） ---------- */
.w-musicbox { display: flex; align-items: center; gap: 14px; padding: 16px; cursor: pointer; position: relative; overflow: hidden; }
.w-musicbox:active { transform: scale(.985); }
.w-musicbox .vinyl { flex: 0 0 84px; width: 84px; height: 84px; border-radius: 50%; position: relative;
  background:
    radial-gradient(circle, #FF7EB3 0 16px, #E85A90 16px 17px, #1A1A1E 17px 100%);
  box-shadow: 0 6px 16px rgba(26,26,30,.3), inset 0 0 0 2px rgba(255,255,255,.06);
  animation: spin 9s linear infinite paused; }
.w-musicbox.playing .vinyl { animation-play-state: running; }
.w-musicbox .vinyl::before { content: ""; position: absolute; inset: 22px; border-radius: 50%;
  background: repeating-radial-gradient(circle, transparent 0 2px, rgba(255,255,255,.05) 2px 3px); }
.w-musicbox .vinyl::after { content: "♥"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 14px; }
.w-musicbox .vinyl .arm { position: absolute; right: -6px; top: -8px; width: 4px; height: 40px; border-radius: 3px;
  background: linear-gradient(180deg, #C9CDD4, #8A8A92); transform: rotate(28deg); transform-origin: top right; box-shadow: 0 2px 4px rgba(0,0,0,.25); }
.w-musicbox .vinyl .arm::before { content: ""; position: absolute; top: -5px; left: -3px; width: 10px; height: 10px; border-radius: 50%; background: #FF9EC2; }
.w-musicbox .mb-meta { flex: 1; min-width: 0; }
.w-musicbox .mb-title { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 800; color: var(--text-1); }
.w-musicbox .mb-title .note { color: var(--accent-deep); }
.w-musicbox .mb-song { margin-top: 4px; font-size: 12px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.w-musicbox .mb-song b { color: var(--accent-deep); }
.w-musicbox .mb-ctl { display: flex; gap: 14px; margin-top: 10px; align-items: center; }
.w-musicbox .mb-ctl span { font-size: 13px; color: var(--text-2); }
.w-musicbox .mb-ctl .play { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  color: #fff; display: flex; align-items: center; justify-content: center; font-size: 13px; box-shadow: 0 4px 10px rgba(232,90,144,.35); }
/* v179.49：桌面音乐盒的 ⏮/⏭ 换成她的 ◀◀/▶▶。整块 widget 只有两行高，
   图给 15px —— 再大就把下面「和 xx 一起 · 在微信里听」那句挤出去了。 */
.w-musicbox .mb-ctl img { display: block; width: 15px; height: auto; }
/* v179.58：中间播放键换成她画的 st_pink13（自带粉圆底+白边）。
   原来的渐变底必须拿掉，不然粉圆外面再套一圈渐变，两层粉打架。 */
.w-musicbox .mb-ctl .play.has-img { background: none; box-shadow: none; }
.w-musicbox .mb-ctl .play.has-img img { width: 34px; height: 34px; border-radius: 50%; }
.w-musicbox .mb-with { position: absolute; top: 14px; right: 14px; font-size: 10px; color: var(--text-2); background: var(--accent-soft); border-radius: 10px; padding: 3px 8px; }

/* ---------- 棉花糖悬浮件 ---------- */
.w-marsh { display: flex; align-items: center; gap: 12px; padding: 14px 16px; cursor: pointer; position: relative; }
.w-marsh:active { transform: scale(.985); }
.w-marsh .ms-ava { flex: 0 0 52px; width: 52px; height: 52px; border-radius: 18px; background: var(--accent-soft);
  display: flex; align-items: center; justify-content: center; font-size: 28px; position: relative; }
.w-marsh .ms-ava .dot { position: absolute; right: 2px; bottom: 2px; width: 11px; height: 11px; border-radius: 50%; background: #34c759; border: 2px solid #fff; }
.w-marsh .ms-body { flex: 1; min-width: 0; }
.w-marsh .ms-title { font-size: 13.5px; font-weight: 800; color: var(--text-1); display: flex; align-items: center; gap: 6px; }
.w-marsh .ms-title .pin { font-size: 11px; }
.w-marsh .ms-text { margin-top: 4px; font-size: 12px; line-height: 1.6; color: var(--text-2); }
.w-marsh .ms-close { flex: 0 0 auto; width: 20px; height: 20px; border-radius: 50%; background: var(--divider); color: var(--text-2);
  font-size: 11px; display: flex; align-items: center; justify-content: center; }

/* ---------- 文件夹卡片（带名牌） ---------- */
.folder-card { background: var(--card); border-radius: 22px; box-shadow: var(--shadow-sm); padding: 0 0 12px; overflow: hidden; }
.folder-card .fc-plate { position: relative; margin: 10px 12px 4px; border-radius: 14px 14px 4px 4px;
  background: linear-gradient(180deg, var(--accent-soft), #FFEFF5); border: 1.5px solid rgba(232,90,144,.18);
  padding: 7px 12px 7px 30px; display: flex; align-items: center; gap: 6px; cursor: pointer; }
.folder-card .fc-plate::before { content: "🎀"; position: absolute; left: 9px; top: 50%; transform: translateY(-50%); font-size: 13px; }
.folder-card .fc-plate b { font-size: 12.5px; color: var(--text-1); letter-spacing: 1px; }
.folder-card .fc-plate .fc-cat { margin-left: auto; font-size: 13px; }
.folder-card .fc-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px 6px; padding: 8px 12px 0; }
.folder-card .app-icon .icon-label { font-size: 10px; margin-top: 5px; }
.folder-card .app-icon .icon-cont { border-radius: 15px; }
[data-theme="sweetpink"] .folder-card .app-icon .icon-cont { background: var(--accent-soft); }

/* ---------- 大图标（指南针/查手机 位） ---------- */
.app-icon.hero .icon-cont { width: 84px; height: 84px; border-radius: 26px; }
.app-icon.hero .icon-label { font-size: 12px; font-weight: 600; }
.hero-row { display: flex; align-items: flex-start; justify-content: space-around; padding: 6px 0 2px; }
.hero-row .app-icon { width: auto; }

/* ---------- 图标标签加重（参考图黑色粗标签） ---------- */
.app-icon .icon-label { font-weight: 600; }

/* ---------- 双列文件夹布局 ---------- */
.folder-duo { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: start; }
.folder-duo .folder-card { padding-bottom: 10px; }
.folder-duo .fc-grid { grid-template-columns: repeat(2, 1fr); }
.folder-duo .app-icon { transform: scale(.92); transform-origin: top center; }

/* ---------- 甜粉主题组件微调 ---------- */
[data-theme="sweetpink"] .widget,
[data-theme="sweetpink"] .w-card,
[data-theme="sweetpink"] .folder-card { box-shadow: 0 6px 18px rgba(232,90,144,.10), 0 1px 3px rgba(232,90,144,.08); border: 1px solid rgba(255,255,255,.8); }
[data-theme="sweetpink"] .grid-pad .widget,
[data-theme="sweetpink"] .grid-pad .w-card,
[data-theme="sweetpink"] .grid-pad .folder-card { border: 1px solid rgba(255,255,255,.8); }
[data-theme="sweetpink"] .page-banner { color: #E85A90; }
[data-theme="sweetpink"] .app-icon .icon-label { color: #7A4A5E; }
[data-theme="nuomi"] .page-banner,
[data-theme="zhimeng"] .page-banner { color: var(--text-1); }
[data-theme="nuomi"] .page-banner .pb-heart,
[data-theme="zhimeng"] .page-banner .pb-heart { color: var(--accent); }
[data-theme="nuomi"] .w-game { border-radius: 4px; }
[data-theme="nuomi"] .folder-card { border-radius: 6px; }
[data-theme="nuomi"] .folder-card .fc-plate { border-radius: 4px 4px 2px 2px; }
[data-theme="nuomi"] .w-diary .dj-photo { border-radius: 2px; }
[data-theme="zhimeng"] .w-game { border-radius: 18px; }
[data-theme="zhimeng"] .w-game .g-time { color: #FF8F6B; text-shadow: none; }
[data-theme="zhimeng"] .w-game .g-bar i { background: linear-gradient(90deg, #3B7CFF, #6B9CFF); box-shadow: none; }
[data-theme="zhimeng"] .w-musicbox .vinyl { background: radial-gradient(circle, #3B7CFF 0 16px, #2B62D6 16px 17px, #1E2A4A 17px 100%); animation-play-state: paused; }

/* ---------- 复刻迭代补丁 ---------- */
/* 图标引擎：甜粉/自定义主题只显示 emoji（此前 svg 未隐藏导致双图标） */
[data-theme="sweetpink"] .icon-cont svg, [data-theme="custom"] .icon-cont svg { display: none; }
/* 行内文件夹卡：2×2 网格（参考图样式），避免 4 列被裁 */
.w-row .fc-grid { grid-template-columns: repeat(2, 1fr); }
/* 双列文件夹名牌防换行 */
.folder-duo .fc-plate { padding: 6px 8px 6px 26px; }
.folder-duo .fc-plate b { font-size: 11.5px; letter-spacing: 0; white-space: nowrap; }
.folder-duo .fc-plate .fc-cat { font-size: 12px; }
/* 装饰避开顶栏 */
[data-theme="sweetpink"] .home-deco span:first-child { top: 86px !important; }
/* 编排台卡片（P0） */
.orch-card .row-flex { flex-wrap: wrap; gap: 4px; }
.orch-card .row-flex b { white-space: nowrap; margin-right: 2px; }
.orch-card .capsule-btn { font-size: 9px; padding: 2px 7px; flex: 0 0 auto; letter-spacing: 0; white-space: nowrap; }

/* ============================================================
   微信风格聊天（参考截图复刻：蓝右白左气泡/系统灰条/时间条/九宫格）
   ============================================================ */
#app-sub { display: block; font-size: 10.5px; opacity: .75; line-height: 1.2; }
.wx-list { padding: 2px 0 24px; }
.wx-item { display: flex; align-items: center; gap: 10px; padding: 11px 14px; cursor: pointer; background: var(--card); border-bottom: 1px solid var(--divider); }
.wx-item:active { background: var(--card-alt); }
/* 微信搜索栏 */
.wx-search-bar { margin: 10px 14px 6px; padding: 9px 14px; background: var(--card-alt); border-radius: 99px;
  font-size: 13px; color: var(--text-3); text-align: center; cursor: pointer; }
.wx-search-bar:active { background: var(--divider); }
/* 微信特殊行（新朋友 / 群聊） */
.wx-special { display: flex; align-items: center; gap: 10px; padding: 12px 14px; cursor: pointer;
  background: var(--card); border-bottom: 1px solid var(--divider); }
.wx-special:active { background: var(--card-alt); }
.wx-special-ico { width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center;
  justify-content: center; font-size: 16px; flex: 0 0 auto; }
.wx-special-name { flex: 1; min-width: 0; font-size: 15px; color: var(--text-1); font-weight: 500;
  display: flex; align-items: center; gap: 6px; }
.wx-special-name .wx-badge { margin-left: 0; }
.wx-special-arrow { font-size: 16px; color: var(--text-3); flex: 0 0 auto; }
/* 微信好友分组标题 */
.wx-list-hd { font-size: 12px; color: var(--text-3); padding: 10px 14px 6px;
  background: var(--bg); font-weight: 500; }
/* 微信字母索引 */
.wx-letter { font-size: 11px; color: var(--text-3); padding: 6px 14px 3px;
  background: var(--bg); font-weight: 600; letter-spacing: 1px; }
.wx-index { position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 2px; z-index: 5; }
.wx-index i { font-size: 9px; color: var(--accent-deep); width: 14px; height: 14px;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  font-style: normal; font-weight: 500; border-radius: 50%; }
.wx-index i:active { background: var(--accent-soft); }
.wx-av { width: 42px; height: 42px; border-radius: 10px; background: var(--accent-soft); display: flex; align-items: center; justify-content: center; font-size: 22px; flex: 0 0 auto; }
.wx-av.big { width: 48px; height: 48px; font-size: 26px; border-radius: 12px; }
.wx-mid { flex: 1; min-width: 0; }
.wx-mid b { font-size: 15.5px; color: var(--text-1); display: block; }
.wx-mid span { font-size: 12px; color: var(--text-2); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.wx-right { text-align: right; flex: 0 0 auto; }
.wx-right time { font-size: 10.5px; color: var(--text-3); display: block; }
.wx-badge { display: inline-flex; min-width: 16px; height: 16px; padding: 0 4px; margin-top: 4px; background: #fa5151; color: #fff; border-radius: 8px; font-size: 10px; font-style: normal; align-items: center; justify-content: center; }
.wx-time { text-align: center; margin: 12px 0 4px; font-size: 10.5px; color: var(--text-3); }
.wx-sys { margin: 8px auto 4px; background: var(--divider); color: var(--text-2); border-radius: 8px; padding: 5px 12px; max-width: 84%; width: max-content; text-align: center; font-size: 10.5px; line-height: 1.5; }
.wx-row { display: flex; gap: 8px; margin: 9px 12px; }
/* 本机（me）消息：头像固定在消息右侧（DOM 顺序 col→av + justify-end，不用 reverse 以免语义混乱） */
.wx-row.me { justify-content: flex-end; }
.wx-col { max-width: 76%; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.wx-row.me .wx-col { align-items: flex-end; }
.bubble.wx-blue { background: #1989FA; color: #fff; border-radius: 12px; border-top-right-radius: 3px; padding: 9px 12px; font-size: 14.5px; line-height: 1.55; }
.bubble.wx-white { background: var(--zg-bubble-tn); color: var(--text-1); border-radius: 12px; border-top-left-radius: 3px; padding: 9px 12px; font-size: 14.5px; line-height: 1.55; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.wx-ack { font-size: 9px; color: var(--text-3); align-self: flex-end; margin: 0 0 2px 4px; }
.bubble.wx-rp { display: flex; gap: 9px; align-items: center; background: linear-gradient(135deg, #FA9D3B, #F77B2F); color: #fff; border-radius: 12px; padding: 10px 12px; min-width: 158px; }
.wx-rp .rp-ico { font-size: 24px; }
.wx-rp .rp-body b { display: block; font-size: 13.5px; }
.wx-rp .rp-body span { font-size: 10.5px; opacity: .85; }
.bubble.wx-card { background: var(--card); color: var(--text-1); border-radius: 12px; padding: 9px 12px; min-width: 156px; }
.bubble.wx-card b { font-size: 13.5px; display: block; }
.wx-locmap { height: 52px; border-radius: 8px; margin-top: 6px; background: linear-gradient(135deg, #D9ECFF, #B7DBFF); display: flex; align-items: center; justify-content: center; font-size: 22px; }
.bubble.wx-voice { display: flex; align-items: flex-end; gap: 2.5px; padding: 10px 12px; min-width: 72px; }
.wx-voice .vwave { width: 3px; background: var(--accent); border-radius: 2px; animation: eq .8s ease-in-out infinite; }
.wx-voice .vwave:nth-child(1) { height: 7px; }
.wx-voice .vwave:nth-child(2) { height: 12px; animation-delay: .15s; }
.wx-voice .vwave:nth-child(3) { height: 9px; animation-delay: .3s; }
.bubble.wx-photo { width: 122px; height: 122px; border-radius: 12px; background: linear-gradient(135deg, var(--accent), var(--accent-deep)); display: flex; flex-direction: column; align-items: center; justify-content: center; color: #fff; }
.wx-photo span { font-size: 34px; }
.wx-photo small { font-size: 10px; margin-top: 4px; opacity: .92; max-width: 104px; text-align: center; }
.wx-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px 8px; padding: 10px 4px 6px; }
.wx-grid button { background: none; border: none; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 11px; color: var(--text-2); cursor: pointer; }
.wxg-ico { width: 52px; height: 52px; border-radius: 15px; background: var(--accent-soft); color: var(--accent-deep); box-shadow: var(--shadow-sm); display: flex; align-items: center; justify-content: center; transition: transform var(--dur-fast) var(--ease-spring); }
.wx-grid button:active .wxg-ico { transform: scale(.9); }
/* v150 工具箱贴纸图标（素材包水彩自带卡底，容器透明化） */
.wxg-ico.has-img { background: none; box-shadow: none; }
.wxg-ico .wxi-img { width: 48px; height: 48px; object-fit: contain; display: block; }

/* v179.38 聊天图标动画帧：两张 img 叠在一起，CSS 切 opacity。
   不用 JS 定时器换 src —— 那样每次换帧都要重新解码图片，而且定时器
   在 sheet 关闭 / 页面切换时忘了清就是泄漏。CSS 动画没这些问题。 */
.wxg-ico.wxg-anim { position: relative; }
.wxg-ico.wxg-anim .wxi-img { position: absolute; inset: 0; margin: auto; }
.wxg-ico.wxg-anim .wxi-img + .wxi-img { animation: wxg-frame 1.5s steps(1, end) infinite; }
@keyframes wxg-frame { 0%, 49.99% { opacity: 0; } 50%, 100% { opacity: 1; } }
/* 系统里关了动效就只停第一帧，不要硬动 */
@media (prefers-reduced-motion: reduce) {
  .wxg-ico.wxg-anim .wxi-img + .wxi-img { animation: none; opacity: 0; }
}
.wx-search { background: var(--card); border-radius: 10px; padding: 9px 12px; color: var(--text-2); display: flex; gap: 6px; }
.wx-search input { border: none; background: none; outline: none; flex: 1; color: var(--text-1); font-size: 13.5px; }
.wx-add { padding: 10px 14px; }
.wx-add-card { margin-top: 14px; background: var(--card); border-radius: 14px; padding: 4px 14px 6px; }
.wx-add-cap { font-size: 11.5px; color: var(--text-2); padding: 11px 0 7px; border-bottom: 1px solid var(--divider); }
.wx-add-row { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--divider); cursor: pointer; }
.wx-add-row:last-child { border-bottom: none; }
.wx-letter { width: 40px; height: 40px; border-radius: 8px; background: var(--card-alt); color: var(--text-3); font-size: 18px; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.wx-add-row b { display: block; font-size: 15px; color: var(--text-1); }
.wx-add-row span { font-size: 12px; color: var(--text-2); }

/* ============================================================
   共养崽崽（PRD v2.0 富视觉端口 · 暖橙米白治愈系）
   ============================================================ */
.cub-root { min-height: 100%; background: linear-gradient(180deg, #F8F0EB 0%, #F6E3D5 100%); border-radius: var(--radius-lg); padding: 12px; --cub-orange: #D4875A; --cub-pink: #F5C6C6; }
.cub-top { display: flex; align-items: center; gap: 6px; color: #5A3A28; font-size: 13px; flex-wrap: wrap; }
.cub-coin { background: #fff; border-radius: 10px; padding: 3px 8px; font-size: 12px; color: #B07038; }
.cub-tabs { display: flex; gap: 6px; margin: 10px 0; }
.cub-tabs button { flex: 1; border: none; background: #fff; border-radius: 12px; padding: 8px 0; font-size: 12.5px; color: #8A6A55; cursor: pointer; }
.cub-tabs button.on { background: var(--cub-orange); color: #fff; font-weight: 700; }
.cub-stage { position: relative; background: linear-gradient(180deg, #FBEFE7, #F7DFC8); border-radius: 18px; padding: 34px 0 18px; display: flex; flex-direction: column; align-items: center; }
/* 新版崽崽 SVG 渲染 */
.cub3d-stage { position: relative; background: linear-gradient(180deg, #FFF5EB, #F5DFC8); border-radius: 20px; padding: 20px 0 14px; display: flex; flex-direction: column; align-items: center; }
/* —— 2.5D 房间舞台：远虚化 / 中景清晰 / 近景大虚化 + 可探索热点 —— */
.cub-scene { position: relative; overflow: hidden; border-radius: 20px; height: 336px; padding: 0; display: block;
  box-shadow: inset 0 -20px 34px rgba(120, 80, 50, .14), inset 0 12px 26px rgba(255, 255, 255, .38); }
.cub-room { position: absolute; inset: 0; z-index: 0; }
.cub-room-svg { width: 100%; height: 100%; display: block; }
.cub-scene .cub3d { position: absolute; left: 50%; bottom: 54px; transform: translateX(-58%); z-index: 2;
  width: 168px; height: 193px; cursor: pointer; animation: cub3dBreath 3.4s ease-in-out infinite; }
.cub-scene .cub3d:active { transform: translateX(-58%) scale(.96); }
.cub-room-hots { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.cub-hot { position: absolute; pointer-events: auto; border: none; cursor: pointer;
  background: rgba(255, 255, 255, .42); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  border-radius: 12px; padding: 4px 7px; font-size: 15px; line-height: 1;
  box-shadow: 0 3px 10px rgba(120, 80, 50, .18); transition: transform .2s, background .2s; }
.cub-hot i { display: block; font-style: normal; font-size: 8.5px; color: #6A4A34; margin-top: 2px; letter-spacing: .5px; }
.cub-hot:active { transform: scale(.9); background: rgba(255, 255, 255, .72); }
.cub-hot.tap { animation: cubHotTap .5s ease; }
@keyframes cubHotTap { 0% { transform: scale(1); } 35% { transform: scale(1.18) rotate(-4deg); } 100% { transform: scale(1); } }
.cub-scene .cub3d-bubble { position: absolute; left: 12px; right: 12px; bottom: 10px; z-index: 4; margin: 0;
  background: rgba(255, 255, 255, .94); }
.cub-scene .cub3d-bubble::before { display: none; }
.cub3d-bubble.pop { animation: cubBubblePop .4s ease; }
@keyframes cubBubblePop { 0% { transform: translateY(6px) scale(.94); opacity: .4; } 100% { transform: none; opacity: 1; } }
.cub-scene2 { position: relative; overflow: hidden; border-radius: 20px; padding: 0;
  box-shadow: inset 0 -18px 30px rgba(120, 80, 50, .12); }
.cub-scene2 .cub-room { position: absolute; inset: 0; z-index: 0; }
.cub-scene2 .cub-room-hots { z-index: 3; }
.cub-scene2 .cub-panel { position: relative; z-index: 2; padding: 14px 12px; display: flex; flex-direction: column; gap: 10px; }
.cub-scene2 .cub-kcard { background: rgba(255, 255, 255, .94); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.cub3d { width: 180px; height: 180px; cursor: pointer; animation: cub3dBreath 3.4s ease-in-out infinite; transition: transform .2s; }
.cub3d:active { transform: scale(.95); }
.cub3d svg { width: 100%; height: 100%; }
.cub3d-bubble {
  margin-top: 10px; background: #FFF; border-radius: 14px; padding: 8px 14px;
  font-size: 13px; color: #5A3A28; max-width: 88%; text-align: center;
  box-shadow: 0 4px 14px rgba(212, 135, 90, .18); position: relative;
}
.cub3d-bubble::before { content: ""; position: absolute; top: -8px; left: 50%; transform: translateX(-50%); border: 5px solid transparent; border-bottom-color: #FFF; }
@keyframes cub3dBreath { 0%,100% { transform: scale(1); } 50% { transform: scale(1.03); } }
@keyframes cubPoke { 0% { transform: scale(1) rotate(0); } 30% { transform: scale(1.08) rotate(-3deg); } 60% { transform: scale(.96) rotate(3deg); } 100% { transform: scale(1) rotate(0); } }
/* 眨眼动画（只对普通眼睛生效） */
.cub-svg .eyes-open { animation: cubBlink 4.5s ease-in-out infinite; transform-origin: 100px 100px; }
@keyframes cubBlink { 0%, 92%, 100% { opacity: 1; transform: scaleY(1); } 95% { opacity: 0; transform: scaleY(.1); } }
/* 尾巴摇摆 */
.cub-tail { animation: cubTail 2.8s ease-in-out infinite; transform-origin: 168px 145px; }
@keyframes cubTail { 0%,100% { transform: rotate(0); } 50% { transform: rotate(12deg); } }
.cub-blob { position: relative; width: 110px; height: 104px; background: #fff; border-radius: 48% 48% 46% 46%; box-shadow: 0 10px 22px rgba(212, 135, 90, .25), inset 0 -6px 0 rgba(0, 0, 0, .03); animation: cub-breathe 3.2s ease-in-out infinite; cursor: pointer; }
.cub-blob.bouncy { animation: cub-breathe 3.2s ease-in-out infinite, cub-bounce 2.4s ease-in-out infinite; }
.cub-blob:active { animation: cub-shake .3s; }
.cub-ant { position: absolute; top: -10px; left: 50%; transform: translateX(-50%); width: 12px; height: 12px; background: var(--cub-pink); border-radius: 50%; box-shadow: 0 -5px 0 -2px #E8AFAF; }
.cub-eye { position: absolute; top: 40px; left: 30px; width: 11px; height: 14px; background: #3A2A22; border-radius: 50%; transition: transform .4s var(--ease-out); }
.cub-eye.r { left: auto; right: 30px; }
.cub-blush { position: absolute; top: 62px; width: 14px; height: 7px; background: var(--cub-pink); border-radius: 50%; opacity: .85; }
.cub-blush.l { left: 18px; }
.cub-blush.r { right: 18px; }
.cub-mouth { position: absolute; top: 70px; left: 50%; transform: translateX(-50%); width: 12px; height: 6px; border: 2px solid #3A2A22; border-top: none; border-radius: 0 0 10px 10px; }
@keyframes cub-breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.045); } }
@keyframes cub-bounce { 0%, 100% { translate: 0 0; } 40% { translate: 0 -7px; } }
@keyframes cub-shake { 25% { rotate: -4deg; } 75% { rotate: 4deg; } }
.cub-bubble { margin-top: 12px; background: #fff; border-radius: 14px; padding: 9px 14px; font-size: 13px; color: #5A3A28; max-width: 88%; text-align: center; box-shadow: 0 4px 12px rgba(212, 135, 90, .15); }
.cub-desire { display: flex; gap: 6px; align-items: center; margin-top: 10px; background: #fff; border-radius: 12px; padding: 8px 10px; font-size: 12px; color: #5A3A28; flex-wrap: wrap; }
.cub-desire span { flex: 1 0 100%; color: #B07038; }
.cub-desire button { border: 1px solid var(--cub-orange); background: none; color: var(--cub-orange); border-radius: 10px; padding: 4px 9px; font-size: 11px; cursor: pointer; }
.cub-bars { margin-top: 10px; background: #fff; border-radius: 14px; padding: 10px 12px; }
.cub-bar { display: flex; align-items: center; gap: 8px; font-size: 11px; color: #8A6A55; margin: 5px 0; }
.cub-bar span { width: 52px; flex: 0 0 auto; }
.cub-bar .cb { flex: 1; height: 7px; background: #F2E4D8; border-radius: 4px; overflow: hidden; }
.cub-bar .cb i { display: block; height: 100%; border-radius: 4px; }
.cub-bar .y { background: #F7C948; }
.cub-bar .p { background: #F5A8BE; }
.cub-bar .g { background: #7BC97B; }
.cub-bar .r { background: #F08A7A; }
.cub-bar .o { background: var(--cub-orange); }
.cub-bar b { width: 30px; text-align: right; font-size: 11px; color: #5A3A28; }
.cub-acts { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.cub-acts button { flex: 1 0 30%; border: none; background: #fff; border-radius: 12px; padding: 10px 0; font-size: 12.5px; color: #5A3A28; cursor: pointer; box-shadow: 0 2px 8px rgba(212, 135, 90, .12); }
.cub-acts button:active { transform: scale(.97); }
.cub-kit { display: flex; flex-direction: column; gap: 10px; }
.cub-kcard { background: #fff; border-radius: 14px; padding: 12px 14px; color: #5A3A28; font-size: 13px; }
.cub-stock { font-size: 12px; color: #8A6A55; margin: 6px 0; }
.cub-btn { border: none; background: var(--cub-orange); color: #fff; border-radius: 10px; padding: 8px 14px; font-size: 12.5px; cursor: pointer; }
.cub-mem { display: flex; flex-direction: column; gap: 8px; }
.cub-ev { background: #fff; border-radius: 12px; padding: 8px 12px; font-size: 12.5px; color: #5A3A28; }
.cub-ev .tiny { color: #B07038; }
.cub-diary { background: #fff; border-radius: 12px; padding: 10px 12px; font-size: 12.5px; color: #5A3A28; }
.cub-diary p { margin: 6px 0; line-height: 1.7; }
.cub-diary button { border: 1px solid var(--cub-orange); background: none; color: var(--cub-orange); border-radius: 8px; padding: 3px 8px; font-size: 11px; margin-right: 6px; cursor: pointer; }
.cub-diary button:disabled { opacity: .5; cursor: default; }
.cub-tabs.sub { margin: 0 0 8px; }
.cub-tabs.sub button { padding: 6px 0; font-size: 11.5px; }

/* ============================================================
   P2 孪生终端：夜OWL深色布局 / 常驻Dock / NPC未读角标 / 归档相片
   ============================================================ */
#twinphone.twin-dark { background: linear-gradient(180deg, #17171D, #101014); }
#twinphone.twin-dark .twin-owner b { color: #E8E8F0; }
#twinphone.twin-dark .twin-body { background: transparent; }
#twinphone.twin-dark .twin-list-cell { background: #23232B; color: #E8E8F0; }
#twinphone.twin-dark .twin-list-cell .body span { color: #9A9AA8; }
#twinphone.twin-dark .twin-section-title { color: #9A9AA8; }
#twinphone.twin-dark .twin-gen-loading { color: #C8C8D8; }
#twinphone.twin-dark .twin-mind { color: #9A9AA8; }
.twin-badge { position: absolute; top: -4px; right: 6px; min-width: 17px; height: 17px; padding: 0 4px; background: #fa5151; color: #fff; border-radius: 9px; font-size: 10px; font-style: normal; display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 2px 6px rgba(0,0,0,.25); }
.twin-list-cell .twin-badge { position: static; margin-right: 6px; }
.twin-dock { display: flex; justify-content: center; gap: 18px; margin: 6px 0 10px; padding: 10px 14px; border-radius: 18px; background: rgba(255,255,255,.18); backdrop-filter: blur(6px); width: max-content; margin-left: auto; margin-right: auto; }
#twinphone.twin-dark .twin-dock { background: rgba(255,255,255,.07); }
.twin-dock .twin-app { width: 62px; }
.twin-photo.arch { background: linear-gradient(135deg, #E8A0A8, #B5657E) !important; }
.twin-photo.arch::after { content: "归档"; position: absolute; bottom: 4px; right: 6px; font-size: 9px; color: rgba(255,255,255,.85); }
.twin-photo { position: relative; }

/* ============================================================
   P3 栖所拓扑：物品便签角标 / 双向批注面板 / 痕迹回放高亮
   ============================================================ */
.furn-note { position: absolute; top: -7px; right: -2px; font-size: 11px; font-style: normal; background: var(--card); border-radius: 50%; width: 17px; height: 17px; display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-sm); }
.furn-replay { animation: furn-replay 1.2s var(--ease-in-out) 2; }
.furn-replay span { position: relative; z-index: 2; }
@keyframes furn-replay { 0%, 100% { filter: none; } 50% { filter: drop-shadow(0 0 8px rgba(232,90,144,.85)); transform: translateX(0) translateY(-3px); } }
.nest-notes { display: flex; flex-direction: column; gap: 8px; margin: 8px 0 4px; }
.nest-note { border-radius: 12px; padding: 9px 12px; font-size: 13px; line-height: 1.5; }
.nest-note b { font-size: 12px; margin-right: 6px; }
.nest-note time { float: right; font-size: 10px; opacity: .6; }
.nest-note.user { background: var(--accent-soft); }
.nest-note.inst { background: var(--card-alt); }
[data-theme="sweetpink"] .nest-note.user { background: var(--accent-soft); }
[data-theme="sweetpink"] .nest-note.inst { background: #fff; }
/* 物品叙事（六大模块参考 §2.4：可触摸的小故事） */
.item-story { background: var(--card-alt); border-left: 3px solid var(--accent); border-radius: 0 12px 12px 0; padding: 10px 12px; margin: 8px 0 4px; font-size: 13px; line-height: 1.8; color: var(--text-2); font-style: italic; }
.item-story p { margin: 0; }

/* ============================================================
   P4 协商：横幅 / 实例虚像 / 三选一面板
   ============================================================ */
.nest-nego { display: flex; align-items: center; gap: 8px; margin: 8px 12px 0; padding: 10px 12px; background: linear-gradient(135deg, var(--accent-soft), transparent); border: 1px dashed var(--accent); border-radius: 12px; font-size: 12.5px; color: var(--text-1); flex-wrap: wrap; }
.nest-nego .btn { margin-left: auto; }
.furn-ghost { position: absolute; width: 44px; height: 44px; display: flex; align-items: flex-end; justify-content: center; z-index: 4; cursor: help; }
.furn-ghost span { font-size: 26px; opacity: .38; filter: grayscale(.4); animation: floaty 4s ease-in-out infinite; }
.furn-ghost i { position: absolute; bottom: -16px; left: 50%; transform: translateX(-50%); font-style: normal; font-size: 9px; white-space: nowrap; color: var(--accent-deep); background: var(--card); border-radius: 8px; padding: 1px 7px; box-shadow: var(--shadow-sm); opacity: .9; }
.nego-opts { display: flex; gap: 8px; margin-top: 10px; }
.nego-opts .btn { font-size: 12px; padding: 10px 8px; }
@media (max-width: 400px) { .nego-opts { flex-direction: column; } }

/* ============================================================
   P4+ 场景化小屋（Helen's Pixel Home 理念）：温馨像素房间
   墙纸+窗户光线+地毯+成套家具长在场景里；四房间各配色
   ============================================================ */
.room-tabs { display: flex; gap: 6px; padding: 10px 12px 0; }
.room-tabs button { flex: 1; border: none; background: var(--card); border-radius: 12px; padding: 8px 0; font-size: 12.5px; color: var(--text-2); cursor: pointer; box-shadow: var(--shadow-sm); }
.room-tabs button.on { background: var(--accent); color: #fff; font-weight: 700; }
.room-scene {
  position: relative; margin: 10px 12px 0; height: 300px; border-radius: 16px;
  overflow: hidden; box-shadow: inset 0 0 0 3px rgba(120, 80, 60, .18), 0 6px 18px rgba(120, 80, 60, .12);
  image-rendering: pixelated;
}
/* 墙：竖条纹壁纸 + 幽灵字 + 窗户光源 */
.rs-wall { position: absolute; inset: 0 0 42% 0; transition: background var(--dur-slow); overflow: hidden; }
.rs-wall::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(90deg, rgba(255,255,255,.14) 0 10px, transparent 10px 22px); }
.rs-ghostword { position: absolute; top: 6px; left: 50%; transform: translateX(-50%); font-family: var(--font-display); font-weight: 800; font-size: 34px; letter-spacing: 8px; color: rgba(120, 80, 70, .10); pointer-events: none; }
.rs-window {
  position: absolute; right: 8%; top: 14%; width: 56px; height: 64px; border-radius: 8px;
  background: linear-gradient(180deg, #FFE9C8 0%, #FFD9E8 55%, #FBC8D8 100%);
  border: 4px solid rgba(255,255,255,.75); box-shadow: 0 0 26px rgba(255, 232, 200, .85), inset 0 0 10px rgba(255,255,255,.6);
}
.rs-window::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent 47%, rgba(255,255,255,.85) 47% 53%, transparent 53%), linear-gradient(180deg, transparent 47%, rgba(255,255,255,.85) 47% 53%, transparent 53%); }
/* 地板：木纹横条 + 花瓣地毯 */
.rs-floor { position: absolute; left: 0; right: 0; bottom: 0; height: 42%; transition: background var(--dur-slow); background-image: repeating-linear-gradient(180deg, rgba(255,255,255,.09) 0 14px, transparent 14px 28px); }
.rs-rug { position: absolute; left: 50%; bottom: 8%; transform: translateX(-50%); width: 62%; height: 52%; border-radius: 50% 46% 52% 48%; box-shadow: inset 0 0 0 4px rgba(255,255,255,.5), 0 2px 8px rgba(120,80,60,.15); }
/* 家具：长在场景里（百分比定位），带底座阴影 */
.rs-items { position: absolute; inset: 0; }
.rs-items .furn { position: absolute; width: 46px; height: 46px; transform: translate(-50%, -70%); cursor: pointer; }
.rs-items .furn span { display: flex; align-items: flex-end; justify-content: center; font-size: 30px; filter: drop-shadow(0 3px 2px rgba(90, 55, 40, .28)); }
.rs-items .furn::before { content: ""; position: absolute; bottom: 2px; width: 74%; height: 8px; background: rgba(90, 60, 40, .22); border-radius: 50%; filter: blur(2px); }
.rs-items .furn-note { top: -8px; right: -4px; }
/* 场景角色：站在地毯上，可戳 */
.rs-char { position: absolute; left: 50%; bottom: 12%; transform: translateX(-50%); cursor: pointer; text-align: center; z-index: 6; }
.rs-char span { display: inline-block; font-size: 40px; filter: drop-shadow(0 4px 3px rgba(90, 55, 40, .3)); animation: breathe 3.2s ease-in-out infinite; }
.rs-char .rs-char-name { display: block; font-style: normal; font-size: 9px; color: rgba(90, 55, 40, .55); margin-top: 1px; }
.rs-char:active span { animation: cub-shake .3s; }
/* 说话气泡（场景内） */
.room-scene .room-speech { position: absolute; left: 50%; bottom: 6px; transform: translateX(-50%); max-width: 92%; white-space: normal; text-align: center; font-size: 12px; line-height: 1.55; color: #e8e8f0; background: rgba(15,15,26,.75); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid rgba(255,255,255,.06); border-radius: 12px; padding: 8px 12px; }
/* 房间配色微调（data-room） */
.room-scene[data-room="bedroom"] .rs-window { background: linear-gradient(180deg, #E8DDFF 0%, #F6C9E8 60%, #F2BBDD 100%); }
.room-scene[data-room="kitchen"] .rs-window { background: linear-gradient(180deg, #FFF3D6 0%, #FFE3B8 60%, #FBD9A8 100%); }
.room-scene[data-room="study"] .rs-window { background: linear-gradient(180deg, #E3E0FF 0%, #D8D4F6 60%, #CFC8F0 100%); }

/* ============================================================
   P5 共创故事：纸质书页感 + 双作者段落 + 大纲卡
   ============================================================ */
.story-head { display: flex; align-items: center; gap: 8px; padding: 14px 16px 6px; font-size: 15px; flex-wrap: wrap; }
.story-empty { text-align: center; padding: 44px 20px 12px; color: var(--text-2); font-size: 13.5px; line-height: 1.8; }
.story-empty .big { font-size: 52px; display: block; margin-bottom: 8px; }
.story-propose { margin: 14px 16px; background: linear-gradient(135deg, var(--accent-soft), transparent); border: 1px dashed var(--accent); border-radius: 14px; padding: 14px; font-size: 13.5px; line-height: 1.7; }
.story-arc { margin: 8px 16px; background: var(--card); border-radius: 12px; padding: 10px 14px; box-shadow: var(--shadow-sm); }
.story-arc b { font-size: 13.5px; color: var(--text-1); display: block; }
.story-arc span { font-size: 12px; color: var(--text-2); }
.story-title-edit { display: flex; align-items: center; gap: 8px; margin: 10px 16px; font-size: 13px; color: var(--text-2); }
.story-title-edit .input { flex: 1; }
.story-book { margin: 10px 16px; background: var(--card); border-radius: 14px; padding: 14px 16px; box-shadow: var(--shadow-sm); border-top: 4px solid var(--accent); }
.story-book b { font-size: 16px; display: block; margin-bottom: 6px; font-family: var(--font-display); }
.story-book.done { border-top-color: #C9A86A; background: linear-gradient(180deg, #FFFDF6, var(--card)); }
.story-para { margin: 10px 0; padding: 10px 12px; border-radius: 10px; font-size: 13px; line-height: 1.85; white-space: pre-wrap; }
.story-para i { display: block; font-style: normal; font-size: 10px; opacity: .6; margin-bottom: 3px; }
.story-para.user { background: var(--accent-soft); }
.story-para.inst { background: var(--card-alt); border-left: 3px solid var(--accent); }
.story-waiting { background: var(--card); border-radius: 12px; padding: 12px 14px; font-size: 13px; color: var(--text-2); display: flex; align-items: center; justify-content: space-between; animation: breathe 2.6s ease-in-out infinite; }
/* 书房书架上的书（成书回流） */
.furn-book-badge { position: absolute; top: -6px; left: -6px; font-size: 10px; background: #C9A86A; color: #fff; border-radius: 8px; padding: 1px 5px; box-shadow: var(--shadow-sm); }

/* ============================================================
   P6 互动娱乐：天气窗 / 你画我猜 / 旅行手账
   ============================================================ */
/* 天气窗：全屏画布 + 玻璃面板（Cormorant 衬线由系统字体降级） */
.sky-wrap { position: relative; height: calc(100vh - 140px); min-height: 420px; border-radius: 0 0 0 0; overflow: hidden; }
.sky-wrap canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.sky-ov { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between; padding: 12px; pointer-events: none; }
.sky-loc { background: rgba(0,0,0,.18); backdrop-filter: blur(14px); border: 1px solid rgba(255,255,255,.08); border-radius: 12px; padding: 8px 14px; color: #f0ece4; align-self: flex-start; }
.sky-loc b { font-size: 20px; font-weight: 400; letter-spacing: 1px; display: block; }
.sky-loc span { font-size: 10.5px; opacity: .6; }
.sky-center { text-align: center; color: #f0ece4; }
.sky-center b { font-size: 76px; font-weight: 300; letter-spacing: -2px; text-shadow: 0 2px 30px rgba(0,0,0,.35); display: block; line-height: 1; }
.sky-center i { font-style: italic; font-size: 15px; opacity: .75; letter-spacing: 2px; }
.sky-center span { font-size: 10.5px; opacity: .5; display: block; margin-top: 3px; }
.sky-meta { display: flex; gap: 10px; justify-content: space-between; flex-wrap: wrap; }
.sky-meta > div { background: rgba(0,0,0,.18); backdrop-filter: blur(14px); border: 1px solid rgba(255,255,255,.08); border-radius: 10px; padding: 6px 10px; color: #f0ece4; flex: 1; text-align: center; }
.sky-meta span { font-size: 8.5px; text-transform: uppercase; letter-spacing: 1.5px; opacity: .55; display: block; }
.sky-meta b { font-size: 12.5px; font-variant-numeric: tabular-nums; }
.sky-note { background: rgba(0,0,0,.24); backdrop-filter: blur(14px); border-radius: 10px; padding: 7px 12px; color: #f0ece4; font-size: 11px; text-align: center; opacity: .9; }
/* 你画我猜 */
.dg-canvas-wrap { display: flex; justify-content: center; padding: 10px 0 4px; }
.dg-canvas-wrap canvas { background: #fffafc; border-radius: 14px; box-shadow: var(--shadow-md); touch-action: none; cursor: crosshair; max-width: 92%; }
.dg-result { margin: 10px 16px; border-radius: 12px; padding: 12px 14px; font-size: 13.5px; line-height: 1.7; }
.dg-result.win { background: var(--accent-soft); }
.dg-result.lose { background: var(--card); }
/* 旅行手账 */
.tr-head { padding: 14px 16px 6px; display: flex; flex-direction: column; gap: 2px; }
.tr-head b { font-size: 16px; }
.tr-card { margin: 6px 16px; background: var(--card); border-radius: 14px; padding: 12px 14px; box-shadow: var(--shadow-sm); }
.tr-now { display: flex; flex-direction: column; gap: 3px; }
.tr-emoji { font-size: 26px; }
.tr-skip { font-size: 14px; font-weight: 700; color: var(--text-2); }
.tr-last { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--divider); font-size: 11.5px; color: var(--text-2); }
.tr-entry { margin: 8px 16px; background: var(--card); border-radius: 12px; padding: 10px 14px; box-shadow: var(--shadow-sm); }
.tr-day { font-size: 13.5px; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.tr-day time { margin-left: auto; font-size: 10px; color: var(--text-3); font-weight: 400; }
.tr-post { font-size: 12.5px; line-height: 1.7; color: var(--text-2); font-style: italic; margin: 6px 0; }
.tr-finds { display: flex; flex-wrap: wrap; gap: 6px; }
.tr-finds em { font-style: normal; font-size: 11px; background: var(--accent-soft); border-radius: 10px; padding: 3px 9px; color: var(--accent-deep); }
/* 天气窗城市降级输入条 */
.sky-citybar { display: flex; align-items: center; gap: 8px; margin-top: 8px; background: rgba(0,0,0,.24); backdrop-filter: blur(14px); border-radius: 10px; padding: 7px 10px; pointer-events: auto; }
.sky-citybar input { flex: 1; border: none; background: none; outline: none; color: #f0ece4; font-size: 12px; }
.sky-citybar input::placeholder { color: rgba(240,236,228,.45); }
/* 崽崽成就墙 + 等待信（little-cub-home §10/§5.18） */
.cub-achwall { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 6px; }
.cub-ach { background: var(--accent-soft); border-radius: 10px; padding: 7px 9px; }
.cub-ach b { font-size: 11.5px; color: #5A3A28; display: block; }
.cub-ach span { font-size: 9.5px; color: #8A6A55; }
.cub-ach:not(.got) { opacity: .55; }
/* 免扣贴纸：选择器 + 贴纸消息（assets/stickers 实图） */
.sticker-pick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; padding: 12px; }
.sticker-pick button { background: none; border: none; cursor: pointer; padding: 0; }
.sticker-pick img { width: 100%; max-width: 72px; transition: transform var(--dur-fast) var(--ease-spring); }
.sticker-pick button:active img { transform: scale(.88) rotate(-4deg); }
/* v147 表情包：➕ 商店入口 / 删除角标 */
.sticker-pick .st-add-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; aspect-ratio: 1; max-width: 72px; width: 100%; font-size: 24px; color: var(--accent-deep, #B45B79); background: var(--card, #fff); border-radius: 14px; border: 1.5px dashed #E8A0B8; }
.sticker-pick .st-add-tile small { font-size: 10px; color: var(--text-3, #999); }
.sticker-pick .st-manage { position: relative; }
.sticker-pick .st-manage .st-del { position: absolute; top: -6px; right: -4px; width: 20px; height: 20px; border-radius: 50%; background: #E84A7F; color: #fff; font-size: 11px; font-style: normal; display: flex; align-items: center; justify-content: center; box-shadow: 0 1px 4px rgba(20,20,20,.25); }

/* ---- v176 微信表情页：分类 EMOJI 库 ---- */
.emo-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 2px 16px 8px; }
.emo-head b { font-size: 15px; color: var(--text-1); }
.emo-head span { font-size: 11px; color: var(--text-3); }
.emo-tabs {
  display: flex; gap: 4px; overflow-x: auto; padding: 0 10px 8px;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.emo-tabs::-webkit-scrollbar { display: none; }
.emo-tabs button {
  flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 3px;
  min-width: 54px; padding: 8px 6px 7px; border-radius: 13px; border: 1px solid transparent;
  background: transparent; color: var(--text-3); cursor: pointer;
  transition: background var(--dur-fast), border-color var(--dur-fast), transform var(--dur-fast);
}
.emo-tabs button i { font-style: normal; font-size: 18px; line-height: 1; }
.emo-tabs button span { font-size: 10px; letter-spacing: .3px; white-space: nowrap; }
.emo-tabs button:active { transform: scale(.92); }
.emo-tabs button.on {
  background: var(--card); border-color: var(--divider); color: var(--text-1);
  box-shadow: var(--shadow-sm);
}
.emo-body { max-height: 46vh; overflow-y: auto; overscroll-behavior: contain; }
.emo-grid {
  display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px;
  padding: 2px 10px 14px;
}
.emo-grid button {
  aspect-ratio: 1; border: none; background: transparent; border-radius: 11px;
  font-size: 22px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--dur-fast), transform var(--dur-fast);
}
.emo-grid button:active {
  background: var(--accent-soft, rgba(255, 176, 208, .32));
  transform: scale(.84);
}
.emo-empty {
  padding: 30px 14px; text-align: center;
  font-size: 12px; line-height: 1.8; color: var(--text-3);
}
/* v148 情侣空间悬浮气泡（朋友圈页，可拖动点开）；v149 换爱心锁贴纸 */
#couple-bubble { position: absolute; right: 14px; top: 46%; width: 58px; height: 58px; display: flex; align-items: center; justify-content: center; cursor: grab; z-index: 30; touch-action: none; user-select: none; -webkit-user-select: none; background: none; }
#couple-bubble img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 4px 10px rgba(20,20,20,.28)); pointer-events: none; }
#couple-bubble:active { cursor: grabbing; }
/* v149 朋友圈封面可点换 + 相机发图 */
.mo-cover-bg { cursor: pointer; }
.mo-cover-bg img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mo-cover-cam { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 36px; height: 36px; border-radius: 50%; background: rgba(0,0,0,.3); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 17px; backdrop-filter: blur(2px); }
.mo-img.imgdata img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: inherit; }
.mov-img { max-width: 84vw; max-height: 62vh; border-radius: 8px; display: block; box-shadow: 0 8px 30px rgba(0,0,0,.5); }
/* v151 通讯录右上角添加朋友 */
.ct-add-ico { position: relative; display: inline-flex; align-items: center; font-size: 17px; line-height: 1; }
.ct-add-ico i { position: absolute; right: -8px; top: -5px; font-style: normal; font-size: 11px; color: var(--accent-deep, #B45B79); font-weight: 700; }
.moc-thumb { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--card, #fff); }
.moc-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.moc-thumb i { position: absolute; top: 2px; right: 2px; width: 18px; height: 18px; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; font-size: 10px; font-style: normal; display: flex; align-items: center; justify-content: center; }
.sticker-pick .moc-add { display: flex; align-items: center; justify-content: center; aspect-ratio: 1; max-width: 72px; width: 100%; font-size: 24px; color: var(--accent-deep, #B45B79); background: var(--card, #fff); border-radius: 10px; border: 1.5px dashed #E8A0B8; }
.bubble.wx-sticker { background: none !important; box-shadow: none !important; border: none !important; padding: 0 !important; }
.bubble.wx-sticker img { width: 92px; display: block; filter: drop-shadow(0 3px 6px rgba(20,20,20,.18)); }
/* 桌面实图贴纸装饰 */
#home-deco img { position: absolute; opacity: .92; filter: drop-shadow(0 3px 5px rgba(20,20,20,.16)); animation: deco-float 6s ease-in-out infinite; pointer-events: none; }

/* ===== IA v2 超级应用底部 TabBar（微信/生活家/手账本等） ===== */
.wx-tabbar, .super-tabbar { flex: 0 0 auto; display: flex; border-top: 1px solid var(--divider); background: var(--card); padding: 4px 0 calc(6px + env(safe-area-inset-bottom, 0px)); }
/* ---------- 超级应用固定壳：底栏永远钉在底部，内容区独立滚动 ---------- */
#app-body.tabbed { display: flex; flex-direction: column; overflow: hidden; }
#app-body.tabbed .wx-sub {
  flex: 1 1 0% !important; min-height: 0 !important;
  display: flex !important; flex-direction: column !important; overflow: hidden !important;
}
#app-body.tabbed .wx-page {
  flex: 1 1 0% !important; min-height: 0 !important;
  overflow-y: auto !important; overscroll-behavior: contain;
}
#app-body.tabbed .wx-page.noscroll { overflow: hidden !important; display: flex !important; flex-direction: column !important; }
#app-body.tabbed .wx-page.noscroll > .chat-wrap { flex: 1; min-height: 0; }
.wx-tabbar button, .super-tabbar button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 1px; background: none; border: none; color: var(--text-2); font-size: 10px; padding: 2px 0; }
.wx-tabbar button span, .super-tabbar button span { font-size: 20px; line-height: 1.2; }
.wx-tabbar button i, .super-tabbar button i { font-style: normal; }
.wx-tabbar button.on, .super-tabbar button.on { color: var(--accent); }
/* 淘宝式购物首页 */
.tb-search { display: flex; align-items: center; gap: 8px; margin: 10px 14px 8px; background: var(--card); border-radius: 999px; padding: 8px 14px; color: var(--text-3); font-size: 13px; }
.tb-banners { display: flex; gap: 8px; margin: 0 14px 10px; }
.tb-banner { flex: 1; border-radius: 14px; padding: 12px; color: #fff; font-size: 13px; font-weight: 700; min-height: 64px; display: flex; flex-direction: column; justify-content: center; }
.tb-cats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin: 0 14px 12px; }
.tb-cat { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 10.5px; color: var(--text-2); }
.tb-cat span { width: 44px; height: 44px; border-radius: 50%; background: var(--accent-soft); display: flex; align-items: center; justify-content: center; font-size: 21px; }
.tb-goods { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 0 14px 20px; }
.tb-good { background: var(--card); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow-sm); }
.tb-good .pic { height: 110px; display: flex; align-items: center; justify-content: center; font-size: 44px; }
.tb-good .info { padding: 8px 10px 10px; }
.tb-good .info b { font-size: 13.5px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-good .info .price { color: #FF4D2E; font-weight: 800; font-size: 15px; }
.tb-good .info .price i { font-style: normal; font-size: 11px; }
.tb-good .info .sold { font-size: 10px; color: var(--text-3); }
/* 丰巢式快递 */
.fc-code { margin: 14px 16px; background: var(--card); border-radius: 16px; padding: 16px; text-align: center; box-shadow: var(--shadow-sm); }
.fc-code b { font-size: 34px; letter-spacing: 8px; font-family: var(--font-mono); color: var(--accent-deep); }
.fc-pick { display: flex; gap: 10px; margin: 0 16px 12px; }
.fc-pick button { flex: 1; background: var(--accent); color: #fff; border: none; border-radius: 12px; padding: 10px 0; font-size: 13px; font-weight: 600; }
.kd-item { display: flex; gap: 12px; margin: 0 14px 10px; background: var(--card); border-radius: 14px; padding: 12px; box-shadow: var(--shadow-sm); }
.kd-item .st { width: 44px; height: 44px; border-radius: 12px; background: var(--accent-soft); display: flex; align-items: center; justify-content: center; font-size: 21px; flex-shrink: 0; }
.kd-item .mid { flex: 1; min-width: 0; }
.kd-item .mid b { font-size: 14px; }
.kd-item .mid .track { font-size: 12px; color: var(--text-2); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kd-item .mid .no { font-size: 10px; color: var(--text-3); margin-top: 2px; font-family: var(--font-mono); }
.kd-item .arr { font-size: 12px; color: var(--accent); font-weight: 600; flex-shrink: 0; }

/* 浏览器 UI（IA v2 复刻移动浏览器） */
.br-topbar { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: var(--card); border-bottom: 1px solid var(--divider); }
.br-url { flex: 1; background: var(--card-alt); border-radius: 999px; padding: 7px 14px; font-size: 13px; color: var(--text-2); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* v179.43：地址栏从只读 span 变成真输入框 */
.br-addr { width: 100%; background: none; border: none; outline: none; color: var(--text-1); font-size: 13px; text-align: center; }
.br-addr::placeholder { color: var(--text-2); }
/* 搜索引擎切换条 */
.br-engbar { display: flex; align-items: center; gap: 6px; padding: 0 16px 4px; overflow-x: auto; }
.br-engbar > span { font-size: 11px; color: var(--text-2); flex: 0 0 auto; }
.br-engbar button { flex: 0 0 auto; font-size: 11px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--divider); background: var(--card); color: var(--text-2); }
.br-engbar button.on { border-color: var(--accent); color: var(--accent); }
/* 跳转结果页 */
.br-result { padding: 18px 16px 8px; }
.br-result-ico { font-size: 34px; text-align: center; }
.br-result h3 { margin: 6px 0 4px; text-align: center; font-size: 15px; color: var(--text-1); }
.br-result-url { word-break: break-all; text-align: center; font-size: 11px; color: var(--text-2); padding: 0 8px 10px; }
.br-result-kv { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-2); padding: 6px 0; border-top: 1px solid var(--divider); }
.br-result-kv b { color: var(--text-1); font-weight: 600; }
.br-result-btns { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 0 4px; }
/* 内嵌网页 */
.br-embedbar { display: flex; align-items: center; gap: 8px; padding: 6px 12px; background: var(--card-alt); }
.br-embed-url { flex: 1; font-size: 11px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.br-frame { width: 100%; height: 100%; border: 0; background: #fff; }
.br-tabbar { flex: 0 0 auto; display: flex; border-top: 1px solid var(--divider); background: var(--card); padding: 4px 0 calc(6px + env(safe-area-inset-bottom, 0px)); }
.br-tabbar button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 1px; background: none; border: none; color: var(--text-2); font-size: 10px; }
.br-tabbar button span { font-size: 20px; }
.br-tabbar button i { font-style: normal; }
.br-tabbar button.on { color: var(--accent); }
.br-search { margin: 12px 16px; }
.br-search input { width: 100%; background: var(--card); border: 1px solid var(--divider); border-radius: 999px; padding: 10px 16px; font-size: 14px; color: var(--text-1); }

/* 状态栏通知小圆点（IA v2） */
.sb-dot { width: 7px; height: 7px; border-radius: 50%; background: #FF3B30; margin-left: 4px; animation: notif-pulse 1.6s ease-in-out infinite; }
@keyframes notif-pulse { 50% { opacity: .45; } }

/* ---- 小窝暗色覆写：让面板/协商/日志在暗底上可读 ---- */
#app-body:has(.dwelling-stage) .nest-nego { background: rgba(255,255,255,.08); border-color: rgba(232,168,196,.35); color: #e0dde6; }
#app-body:has(.dwelling-stage) .nest-nego .btn { background: rgba(255,255,255,.12); color: #f0f0f8; }
#app-body:has(.dwelling-stage) .dw-panel-items .dw-item b { color: rgba(255,255,255,.9); }
#app-body:has(.dwelling-stage) .dw-panel-items .dw-item p { color: rgba(255,255,255,.5); }
#app-body:has(.dwelling-stage) .dw-panel-items .dw-item-num { color: rgba(255,255,255,.22); }
#app-body:has(.dwelling-stage) .dw-log { color: rgba(255,255,255,.35); }

/* ============================================================
   v133 群聊 · 语音条 / 卡片消息 / 群语音·视频通话
   ============================================================ */
/* 群语音条：声波条用 currentColor，我方/对方气泡都成立；点按回放时跳动 */
.msg-row .bubble.gc-voice { display: flex; align-items: center; gap: 8px; min-width: 66px; cursor: pointer; }
.gc-voice .gcv-bars { display: flex; align-items: center; gap: 2.5px; height: 14px; }
.gc-voice .gcv-bars i { width: 3px; border-radius: 2px; background: currentColor; opacity: .85; height: 6px; transform-origin: center; }
.gc-voice .gcv-bars i:nth-child(2) { height: 11px; }
.gc-voice .gcv-bars i:nth-child(3) { height: 8px; }
.gc-voice.on .gcv-bars i { animation: gcv-eq .7s ease-in-out infinite; }
.gc-voice.on .gcv-bars i:nth-child(2) { animation-delay: .12s; }
.gc-voice.on .gcv-bars i:nth-child(3) { animation-delay: .24s; }
@keyframes gcv-eq { 0%, 100% { transform: scaleY(.55); } 50% { transform: scaleY(1.5); } }
.gc-voice b { font-size: 12px; font-variant-numeric: tabular-nums; opacity: .8; }
/* 红包 / 投票卡片消息：统一卡片底，不随我方气泡变色 */
.msg-row .bubble.gc-card { background: var(--card); color: var(--text-1); border-radius: 14px; box-shadow: 0 1px 2px rgba(0, 0, 0, .05); width: 218px; max-width: 100%; padding: 11px 12px; }
.gc-rp { display: flex; gap: 10px; align-items: center; }
.gc-rp .rp-ico { font-size: 26px; }
.gc-rp b { display: block; font-size: 13.5px; }
.gc-rp span { font-size: 11px; color: var(--text-3); }
.gc-vote .vq { display: block; font-size: 13px; margin-bottom: 8px; }
.gcv-row { display: flex; align-items: center; gap: 8px; margin: 7px 0; font-size: 11.5px; }
.gcv-label { width: 54px; flex-shrink: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gcv-track { flex: 1; height: 8px; background: var(--divider); border-radius: 4px; overflow: hidden; }
.gcv-track i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-deep)); border-radius: 4px; transition: width .6s var(--ease-out); }
.gcv-row > b { width: 36px; text-align: right; color: var(--text-3); font-size: 10.5px; font-weight: 600; }
/* 工具箱分组小标题 */
.gc-sec { margin: 10px 0 2px; padding-left: 4px; font-size: 10.5px; letter-spacing: 1px; color: var(--text-3); }
/* 群通话：成员瓷砖网格（语音 = 圆头像格子；视频 = 画面格子） */
.gcall-wrap { width: 100%; max-width: 340px; display: flex; flex-direction: column; align-items: center; }
.gcall-title { font-size: 17px; font-weight: 600; }
.gcall-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; width: 100%; margin-top: 16px; }
.gcall-tile { position: relative; border-radius: 16px; background: rgba(255, 255, 255, .07); padding: 14px 8px 10px; display: flex; flex-direction: column; align-items: center; gap: 6px; opacity: .4; transition: opacity .45s var(--ease-out); }
.gcall-tile.joined { opacity: 1; }
.gcall-tile .g-av { width: 52px; height: 52px; border-radius: 50%; background: rgba(255, 255, 255, .14); display: flex; align-items: center; justify-content: center; font-size: 27px; }
.gcall-tile .g-name { font-size: 11.5px; color: rgba(255, 255, 255, .88); max-width: 92%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gcall-tile .g-mic { position: absolute; top: 8px; right: 10px; font-size: 12px; opacity: .85; }
.gcall-tile.speaking { opacity: 1; }
.gcall-tile.speaking .g-av { box-shadow: 0 0 0 4px rgba(255, 255, 255, .16), 0 0 30px rgba(255, 126, 179, .45); }
.gcall-tile.speaking::after { content: ""; position: absolute; inset: 0; border-radius: 16px; border: 1.5px solid rgba(255, 255, 255, .4); animation: gcall-glow 1.2s ease-in-out infinite; }
@keyframes gcall-glow { 0%, 100% { opacity: .35; } 50% { opacity: .95; } }
/* 视频模式：瓷砖变画面格子（信号条 + 底部名字条），本地演示无需摄像头 */
.gcall-grid.video .gcall-tile { padding: 0; min-height: 118px; justify-content: flex-end; overflow: hidden; background: linear-gradient(160deg, rgba(255, 255, 255, .18), rgba(255, 255, 255, .04)); }
.gcall-grid.video .gcall-tile .g-av { width: 46px; height: 46px; font-size: 23px; margin-bottom: -30px; z-index: 1; background: rgba(0, 0, 0, .3); }
.gcall-grid.video .gcall-tile .g-name { width: 100%; text-align: center; background: rgba(0, 0, 0, .38); padding: 4px 0 5px; border-radius: 0 0 15px 15px; }
.gcall-grid.video .gcall-tile .g-sig { position: absolute; top: 8px; left: 10px; display: flex; gap: 2.5px; align-items: flex-end; height: 11px; }
.gcall-grid.video .gcall-tile .g-sig i { width: 3px; background: #7ee787; border-radius: 1px; }
.gcall-grid.video .gcall-tile .g-sig i:nth-child(1) { height: 5px; }
.gcall-grid.video .gcall-tile .g-sig i:nth-child(2) { height: 8px; }
.gcall-grid.video .gcall-tile .g-sig i:nth-child(3) { height: 11px; }
.gcall-grid.video .gcall-tile:not(.joined) .g-sig i { background: rgba(255, 255, 255, .3); }
.gcall-sub { margin-top: 14px; min-height: 50px; max-width: 300px; text-align: center; font-size: 14px; line-height: 1.65; color: rgba(255, 255, 255, .92); }
.gcall-sub b { color: #ffd9ea; }

/* ============ v137 圆桌 · Bell Tower ============ */
.bt-stage {
  position: relative;
  height: 168px;
  overflow: hidden;
  background:
    radial-gradient(ellipse 90% 60% at 50% 38%, #f7d8a8 0%, #d59a78 26%, #6a4d6e 60%, #2a1f3a 100%);
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.bt-sky {
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 22% 18%, rgba(255,236,176,.32) 0%, transparent 22%),
    radial-gradient(circle at 78% 10%, rgba(255,221,236,.18) 0%, transparent 18%),
    radial-gradient(ellipse at 50% 90%, rgba(0,0,0,.45) 0%, transparent 50%);
  z-index: 1;
}
.bt-tower {
  position: absolute;
  width: 96px; height: auto;
  left: 50%; bottom: 0;
  transform: translateX(-50%);
  z-index: 2;
  filter: drop-shadow(0 4px 14px rgba(0,0,0,.4));
}
/* v179：本段（3556-3907）是被后面 v137b 区整体覆盖的死代码。
   仍然同步了 btClockGlow 的改法，免得有人只改到这份、生以为生效了。 */
.bt-tower .bt-clockface {
  filter: drop-shadow(0 0 9px rgba(247,233,192,.55));
  animation: btClockGlow 3.6s ease-in-out infinite;
}
.bt-petal-layer {
  position: absolute; inset: 0; z-index: 3; pointer-events: none; overflow: hidden;
}
.bt-petal {
  position: absolute; top: -10px; width: 8px; height: 8px;
  background: radial-gradient(circle, #ffd6e3 0%, #f5a8c4 60%, #d97aa3 100%);
  border-radius: 60% 40% 60% 40% / 50% 60% 40% 50%;
  opacity: .85;
  animation: btPetalFall linear infinite;
  box-shadow: 0 1px 4px rgba(217,122,163,.4);
}
@keyframes btPetalFall {
  0%   { transform: translateY(-10px) rotate(0deg); opacity: 0; }
  10%  { opacity: .85; }
  100% { transform: translateY(180px) translateX(40px) rotate(360deg); opacity: 0; }
}
.bt-banner {
  position: absolute;
  left: 14px; bottom: 10px;
  z-index: 4;
  color: rgba(255,255,255,.92);
  text-shadow: 0 1px 6px rgba(0,0,0,.45);
  pointer-events: none;
  max-width: calc(100% - 110px);
}
.bt-banner-topic {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #fff5d8;
}
.bt-banner-host {
  font-size: 11px;
  opacity: .82;
  margin-top: 2px;
  letter-spacing: .5px;
}
/* 席位行 */
.bt-seats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 12px 6px;
  background: linear-gradient(180deg, rgba(247,217,168,.12), transparent);
  border-bottom: 1px solid rgba(0,0,0,.05);
}
.bt-seat, .bt-seat-add {
  flex: 0 0 calc(50% - 4px);
  min-width: 0;
  position: relative;
  background: rgba(255,255,255,.78);
  border: 1px solid rgba(0,0,0,.06);
  border-radius: 14px;
  padding: 10px 10px 8px 12px;
  box-shadow: 0 2px 6px rgba(80,40,80,.06);
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: default;
}
.bt-seat-num {
  position: absolute; top: 4px; left: 6px;
  font-size: 9px; color: #a07a4a;
  font-family: ui-monospace, Consolas, monospace;
  letter-spacing: .05em;
}
.bt-seat-av {
  width: 34px; height: 34px;
  font-size: 22px;
  display: grid; place-items: center;
  background: linear-gradient(160deg, #fff5e1, #f0d9b3);
  border-radius: 50%;
  flex: 0 0 auto;
}
.bt-seat-name {
  flex: 1;
  font-size: 13.5px;
  font-weight: 600;
  color: #4a3a2a;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.bt-seat-mode {
  font-size: 9.5px;
  color: #8a7458;
  letter-spacing: .04em;
  position: absolute;
  bottom: 4px; left: 56px;
}
.bt-seat-x {
  flex: 0 0 auto;
  width: 22px; height: 22px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,.06);
  color: #7a5a3a;
  font-size: 11px;
  cursor: pointer;
}
.bt-seat-x:active { background: rgba(217,122,163,.3); }
.bt-seat-add {
  background: rgba(255,255,255,.4);
  border: 1.5px dashed rgba(122,90,42,.35);
  color: #8a6a3a;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  min-height: 56px;
}
.bt-seat-add:active { background: rgba(247,217,168,.4); }
/* 对话流 */
#bt-feed { padding: 8px 12px 16px; }
.bt-empty {
  padding: 28px 16px;
  text-align: center;
  color: #a08a6a;
  font-size: 13px;
  line-height: 1.7;
  background: rgba(255,255,255,.5);
  border: 1px dashed rgba(122,90,42,.25);
  border-radius: 14px;
  margin: 16px 0;
}
.bt-sys {
  text-align: center;
  font-size: 11px;
  color: #a08770;
  padding: 6px 0;
  letter-spacing: .04em;
}
.bt-msg {
  display: flex;
  gap: 8px;
  margin: 10px 0;
  align-items: flex-start;
}
.bt-msg.me { flex-direction: row-reverse; }
.bt-msg-av {
  flex: 0 0 32px;
  width: 32px; height: 32px;
  font-size: 20px;
  display: grid; place-items: center;
  background: linear-gradient(160deg, #fff5e1, #f0d9b3);
  border-radius: 50%;
  border: 1px solid rgba(217,122,163,.2);
}
.bt-msg.me .bt-msg-av {
  background: linear-gradient(160deg, #c5e3ff, #8ab8e0);
  border-color: rgba(122,163,217,.3);
}
.bt-msg-body {
  flex: 1;
  min-width: 0;
  max-width: calc(100% - 50px);
  background: rgba(255,255,255,.85);
  border: 1px solid rgba(0,0,0,.05);
  border-radius: 12px;
  padding: 7px 10px 8px;
  box-shadow: 0 1px 4px rgba(80,40,80,.04);
}
.bt-msg.me .bt-msg-body {
  background: linear-gradient(160deg, #c5e3ff, #a5c8e8);
  border-color: rgba(122,163,217,.25);
}
.bt-msg-name {
  font-size: 11px;
  color: #a08770;
  margin-bottom: 2px;
  letter-spacing: .04em;
  font-weight: 600;
}
.bt-msg.me .bt-msg-name { color: #4a6a8a; }
.bt-msg-text {
  font-size: 14px;
  color: #3a2a1a;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}
.bt-thinking {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0;
  padding: 4px 0;
  opacity: .7;
}
.bt-thinking-dots {
  display: inline-flex; gap: 3px;
}
.bt-thinking-dots i {
  width: 5px; height: 5px;
  background: #b8a78a;
  border-radius: 50%;
  animation: btThink 1.2s ease-in-out infinite;
}
.bt-thinking-dots i:nth-child(2) { animation-delay: .2s; }
.bt-thinking-dots i:nth-child(3) { animation-delay: .4s; }
@keyframes btThink {
  0%,100% { opacity: .3; transform: translateY(0); }
  50%     { opacity: 1; transform: translateY(-3px); }
}
/* 添加席位 弹层内的角色行 */
.bt-add-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 6px;
  border-bottom: 1px solid rgba(0,0,0,.05);
}
.bt-add-row:last-child { border-bottom: none; }
.bt-av-mini {
  flex: 0 0 28px;
  width: 28px; height: 28px;
  font-size: 17px;
  display: grid; place-items: center;
  background: linear-gradient(160deg, #fff5e1, #f0d9b3);
  border-radius: 50%;
}
.bt-name-mini {
  flex: 0 0 64px;
  font-size: 13px;
  font-weight: 600;
  color: #4a3a2a;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.bt-mode-sel {
  flex: 1;
  min-width: 0;
  font-size: 12px;
  padding: 5px 6px;
  border: 1px solid rgba(0,0,0,.12);
  border-radius: 8px;
  background: #fff;
  color: #3a2a1a;
}
.bt-mode-mini {
  font-size: 10px;
  color: #8a7458;
  padding: 2px 6px;
  background: rgba(0,0,0,.04);
  border-radius: 99px;
}
/* 邀请函 / 发券 sheet */
.bt-invite { padding: 4px 4px 0; }
.bt-invite-card {
  background: linear-gradient(160deg, #f7e9c0 0%, #e8c98a 60%, #c89a5a 100%);
  border: 1px solid #8a5a22;
  border-radius: 14px;
  padding: 18px 16px;
  color: #3a2a1a;
  box-shadow: 0 6px 18px rgba(122,90,42,.18);
  position: relative;
}
.bt-invite-card::before {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1px dashed rgba(58,42,26,.4);
  border-radius: 10px;
  pointer-events: none;
}
.bt-invite-kicker {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 10.5px;
  letter-spacing: .28em;
  color: #5a3a1a;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.bt-invite-host {
  font-size: 16px;
  font-weight: 700;
  color: #2a1a0a;
  margin-bottom: 4px;
  letter-spacing: .04em;
}
.bt-invite-topic {
  font-size: 13px;
  color: #5a3a1a;
  margin-bottom: 12px;
}
.bt-invite-seats {
  font-size: 12px;
  color: #3a2a1a;
  padding: 8px 10px;
  background: rgba(255,255,255,.35);
  border-radius: 8px;
  margin-bottom: 8px;
}
.bt-invite-tip {
  font-size: 11.5px;
  color: #4a3a1a;
  line-height: 1.55;
  margin-top: 8px;
}
.bt-invite-url {
  margin: 12px 0 10px;
}
.bt-invite-url textarea {
  width: 100%;
  min-height: 60px;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 11px;
  padding: 8px;
  border: 1px solid rgba(0,0,0,.12);
  border-radius: 8px;
  background: #faf6ec;
  color: #3a2a1a;
  resize: none;
  word-break: break-all;
}
.bt-invite-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 6px;
}
.bt-invite-actions .btn { min-width: 100px; }

/* ============ v138 两人小屋 · Cozy Room ============ */
.coz-stage {
  position: relative;
  margin: 10px 12px 6px;
  height: 300px;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(90,60,30,.14);
  transition: filter .8s ease;
  --wall: #f7ecd8;
  --wall2: #f0e0c4;
  --floor: #d9a86a;
  --floor2: #c9985a;
  --wood: #b98850;
  --wood2: #a5743f;
  --quilt: #fdf6ea;
  --sky1: #aee2f7;
  --sky2: #d8f2fd;
  --grass: #8fc86a;
}
.coz-stage.night {
  --wall: #4a4262;
  --wall2: #3d3752;
  --floor: #6b5a48;
  --floor2: #5c4d3c;
  --wood: #5c4a36;
  --wood2: #4c3d2c;
  --quilt: #cfc8e0;
  --sky1: #1d2447;
  --sky2: #2a3260;
  --grass: #2f5233;
}
.coz-stage.dark { filter: brightness(.62) saturate(.85); }

/* —— 墙 —— */
.coz-wall {
  position: absolute; left: 0; right: 0; top: 0; height: 56%;
  background: linear-gradient(180deg, var(--wall), var(--wall2));
  transition: background .8s ease;
}
.coz-wall::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 8px;
  background: var(--wood2); opacity: .5;
}

/* —— 窗与窗外花园 —— */
.coz-window {
  position: absolute; left: 16px; top: 14px;
  width: 118px; height: 96px;
  background: #fff;
  border-radius: 12px;
  padding: 5px;
  box-shadow: 0 3px 10px rgba(90,60,30,.18);
}
.coz-win-sky {
  position: absolute; left: 5px; right: 5px; top: 5px; height: 46px;
  border-radius: 8px 8px 0 0;
  background: linear-gradient(180deg, var(--sky1), var(--sky2));
  transition: background .8s ease;
  overflow: hidden;
}
.coz-stage.night .coz-win-sky::after {
  content: ''; position: absolute; right: 12px; top: 8px;
  width: 14px; height: 14px; border-radius: 50%;
  background: #fdf3c8; box-shadow: 0 0 10px #fdf3c8;
}
.coz-win-grass {
  position: absolute; left: 5px; right: 5px; bottom: 5px; height: 40px;
  border-radius: 0 0 8px 8px;
  background: var(--grass);
  transition: background .8s ease;
  overflow: hidden;
}
.coz-win-grass i {
  position: absolute; font-style: normal;
}
.coz-win-grass i::before { content: '🌼'; font-size: 9px; }
.coz-win-grass i:nth-child(1) { left: 12%; bottom: 4px; }
.coz-win-grass i:nth-child(2) { left: 46%; bottom: 8px; }
.coz-win-grass i:nth-child(3) { left: 76%; bottom: 3px; }
.coz-win-frame {
  position: absolute; left: 50%; top: 5px; bottom: 5px; width: 4px;
  transform: translateX(-50%);
  background: #fff;
}

/* —— 挂画 —— */
.coz-pic {
  position: absolute;
  width: 34px; height: 34px;
  background: #fff;
  border-radius: 8px;
  display: grid; place-items: center;
  font-size: 16px;
  box-shadow: 0 2px 6px rgba(90,60,30,.15);
}
.coz-pic1 { right: 108px; top: 18px; }
.coz-pic2 { right: 62px; top: 52px; }

/* —— 书架 —— */
.coz-shelf {
  position: absolute; right: 12px; top: 12px;
  width: 72px;
  background: var(--wood);
  border-radius: 8px;
  padding: 5px;
  display: flex; flex-direction: column; gap: 4px;
  box-shadow: 0 3px 8px rgba(90,60,30,.2);
  transition: background .8s ease;
}
.coz-shelf-row {
  display: flex; gap: 2px; justify-content: space-around;
  background: var(--wood2);
  border-radius: 5px;
  padding: 5px 3px;
  font-size: 13px;
  transition: background .8s ease;
}

/* —— 地板 —— */
.coz-floor {
  position: absolute; left: 0; right: 0; bottom: 0; height: 44%;
  background:
    repeating-linear-gradient(90deg, var(--floor) 0 34px, var(--floor2) 34px 36px);
  transition: background .8s ease;
}

/* —— 床 —— */
.coz-bed {
  position: absolute; left: 18px; bottom: 12px;
  width: 232px; height: 96px;
}
.coz-head {
  position: absolute; left: 0; top: -12px;
  width: 12px; height: 104px;
  background: var(--wood);
  border-radius: 6px 6px 0 0;
  transition: background .8s ease;
}
.coz-bedfoot {
  position: absolute; right: 0; top: 8px;
  width: 10px; height: 84px;
  background: var(--wood);
  border-radius: 0 0 6px 6px;
  transition: background .8s ease;
}
.coz-mattress {
  position: absolute; left: 10px; right: 8px; top: 0; bottom: 0;
  background: linear-gradient(180deg, #fff, #f3ead9);
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(90,60,30,.18);
}
.coz-person {
  position: absolute;
  left: 22px; bottom: 34px;
  width: 44px; height: 44px;
  z-index: 2;
  cursor: pointer;
  transition: transform .3s ease;
}
.coz-person.me { left: 74px; cursor: default; }
.coz-av {
  width: 44px; height: 44px;
  font-size: 26px;
  display: grid; place-items: center;
  background: linear-gradient(160deg, #fff5e1, #f0d9b3);
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.8);
  box-shadow: 0 2px 6px rgba(90,60,30,.2);
  transition: filter .6s ease;
}
.coz-stage.night .coz-av { filter: brightness(.85); }
.coz-zzz {
  position: absolute; right: -6px; top: -12px;
  font-size: 13px;
  display: none;
  animation: cozZzz 2.4s ease-in-out infinite;
}
.coz-stage.night .coz-zzz { display: block; }
@keyframes cozZzz {
  0%   { transform: translate(0, 0) scale(.8); opacity: 0; }
  30%  { opacity: 1; }
  100% { transform: translate(8px, -14px) scale(1.1); opacity: 0; }
}
.coz-quilt {
  position: absolute;
  left: 12px; right: 6px; bottom: 0;
  height: 52px;
  background: linear-gradient(180deg, var(--quilt), #efe6d2);
  border-radius: 12px 12px 8px 8px;
  border: 2px solid rgba(255,255,255,.65);
  box-shadow: 0 -3px 6px rgba(90,60,30,.08);
  z-index: 3;
  transition: background .8s ease;
}
/* 戳一戳 / 思考 / 翻身 */
.coz-person.poke { animation: cozPoke .5s ease; }
@keyframes cozPoke {
  0%,100% { transform: translateX(0); }
  25% { transform: translateX(-3px) rotate(-4deg); }
  60% { transform: translateX(3px) rotate(3deg); }
}
.coz-person.thinking .coz-av::after {
  content: '💭';
  position: absolute; top: -14px; left: 50%;
  transform: translateX(-50%);
  font-size: 14px;
  animation: cozThink 1.2s ease-in-out infinite;
}
@keyframes cozThink {
  0%,100% { transform: translate(-50%, 0); opacity: .6; }
  50%     { transform: translate(-50%, -4px); opacity: 1; }
}
.coz-person.turn { animation: cozTurn .8s ease; }
@keyframes cozTurn {
  0%,100% { transform: translateX(0); }
  40% { transform: translateX(10px) rotate(6deg); }
}

/* —— 场景气泡 —— */
.coz-bubble {
  position: absolute;
  left: 34px; top: 40%;
  max-width: 62%;
  z-index: 10;
  background: #fff;
  border-radius: 14px;
  padding: 8px 12px;
  font-size: 13px;
  line-height: 1.5;
  color: #4a3a2a;
  box-shadow: 0 4px 14px rgba(90,60,30,.22);
  border: 1.5px solid #f0dfc0;
}
.coz-bubble::before {
  content: '';
  position: absolute;
  left: 18px; bottom: -7px;
  width: 12px; height: 12px;
  background: #fff;
  border-left: 1.5px solid #f0dfc0;
  border-bottom: 1.5px solid #f0dfc0;
  transform: rotate(-45deg);
}
.coz-bubble.me {
  background: linear-gradient(160deg, #d8ecff, #bcdcf7);
  border-color: rgba(120,163,217,.4);
  left: auto; right: 34px;
}
.coz-bubble.me::before {
  left: auto; right: 18px;
  background: #d8ecff;
  transform: rotate(45deg);
  border: none;
  border-right: 1.5px solid rgba(120,163,217,.4);
  border-bottom: 1.5px solid rgba(120,163,217,.4);
}
.coz-bubble.pop { animation: cozBubblePop .4s cubic-bezier(.2,.9,.3,1.4); }
@keyframes cozBubblePop {
  0%   { opacity: 0; transform: translateY(10px) scale(.85); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* —— 床头柜 + 台灯 —— */
.coz-nighstand {
  position: absolute; left: 262px; bottom: 12px;
  width: 46px; height: 44px;
  background: var(--wood);
  border-radius: 8px;
  box-shadow: 0 3px 8px rgba(90,60,30,.2);
  transition: background .8s ease;
}
.coz-lamp {
  position: absolute; left: 50%; bottom: 100%;
  transform: translateX(-50%);
  width: 44px; height: 56px;
  background: none; border: none; cursor: pointer;
  padding: 0;
}
.coz-lamp-shade {
  position: absolute; left: 50%; bottom: 22px;
  transform: translateX(-50%);
  width: 30px; height: 18px;
  background: #f6d78d;
  border-radius: 14px 14px 4px 4px;
  border: 2px solid #d9a94a;
  transition: background .5s ease;
}
.coz-lamp-glow {
  position: absolute; left: 50%; bottom: -6px;
  transform: translateX(-50%);
  width: 84px; height: 84px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,214,140,.55) 0%, rgba(255,200,120,.22) 38%, transparent 68%);
  filter: blur(2px);
  animation: cozLampBreath 3.4s ease-in-out infinite;
  transition: opacity .5s ease;
}
.coz-stage.dark .coz-lamp-glow { opacity: 0; animation: none; }
.coz-stage.dark .coz-lamp-shade { background: #b0a488; border-color: #8d8368; }
@keyframes cozLampBreath {
  0%,100% { opacity: .85; transform: translateX(-50%) scale(1); }
  50%     { opacity: 1;   transform: translateX(-50%) scale(1.12); }
}

/* —— 圆桌茶几 —— */
.coz-table {
  position: absolute; right: 18px; bottom: 16px;
  width: 74px; height: 26px;
  background: var(--wood);
  border-radius: 50%;
  box-shadow: 0 4px 8px rgba(90,60,30,.2);
  transition: background .8s ease;
}
.coz-table::after {
  content: ''; position: absolute; left: 50%; bottom: -12px;
  transform: translateX(-50%);
  width: 12px; height: 14px;
  background: var(--wood2);
  transition: background .8s ease;
}
.coz-tea, .coz-flower {
  position: absolute; font-size: 15px;
}
.coz-tea { left: 12px; top: -8px; }
.coz-flower { right: 12px; top: -10px; }

/* —— 顶部提示 —— */
.coz-hint {
  position: absolute; left: 50%; top: 8px;
  transform: translateX(-50%);
  z-index: 12;
  background: rgba(255,255,255,.85);
  backdrop-filter: blur(6px);
  border-radius: 99px;
  padding: 4px 14px;
  font-size: 11px;
  color: #7a5a3a;
  box-shadow: 0 2px 8px rgba(90,60,30,.14);
  white-space: nowrap;
}
.coz-stage.night .coz-hint { background: rgba(40,36,64,.85); color: #e8dff5; }

/* —— v179.24 字体商城 ——
   原来的 .appearance-font-* 六按钮列表已随面板重写删除（CSS 也一并清掉，避免留下死规则）。
   每张卡的字体名与样张用该字体自己渲染（行内 font-family），所以"看得见的差别"是真的；
   未安装的字体其 @font-face 不在 DOM 里，样张会如实掉回系统字体 —— 这也是真的。 */
.fstore-stat { display: flex; gap: 8px; padding: 4px 12px 12px; }
.fstore-stat > span { flex: 1; min-width: 0; padding: 10px 8px; background: var(--card); border: 1.5px solid var(--divider); border-radius: 14px; text-align: center; }
.fstore-stat b { display: block; font-size: 17px; color: var(--text-1); font-weight: 700; line-height: 1.2; }
.fstore-stat small { display: block; font-size: 10.5px; color: var(--text-3); margin-top: 2px; }

.fstore-subhead, .fstore-group-head { padding: 10px 14px 6px; display: flex; align-items: baseline; gap: 8px; }
.fstore-subhead { font-size: 11px; letter-spacing: .14em; color: var(--text-3); text-transform: uppercase; }
.fstore-subhead span { font-size: 10.5px; letter-spacing: 0; color: var(--accent-deep); }
.fstore-group-head { flex-direction: column; align-items: flex-start; gap: 2px; }
.fstore-group-head b { font-size: 13.5px; color: var(--text-1); font-weight: 700; }
.fstore-group-head small { font-size: 11px; color: var(--text-3); line-height: 1.45; }

.fstore-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 0 12px 6px; }
.fstore-grid.favs { padding-bottom: 10px; }

.fstore-card { position: relative; display: flex; flex-direction: column; padding: 11px 11px 10px; background: var(--card); border: 1.5px solid var(--divider); border-radius: 16px; transition: border-color .25s, box-shadow .25s; }
.fstore-card.on { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.fstore-card:not(.installed) { background: var(--card-alt); }

.fstore-main { display: block; width: 100%; text-align: left; padding: 0 22px 0 0; }
.fstore-name { display: block; min-width: 0; }
.fstore-name b { display: block; font-size: 19px; line-height: 1.25; color: var(--text-1); word-break: break-word; }
/* v179.27 价格徽标：贴在字体名右边，不挤占预览行。
   免费 / 已拥有 用中性色，「要收钱」用强调色，
   买不起的卡片整张压暗一点（.short），一眼能看出来这张点不动。 */
.fstore-price {
  display: inline-block; vertical-align: middle; margin-left: 7px;
  font-size: 11px; font-style: normal; font-weight: 700; line-height: 1.5;
  padding: 1px 7px; border-radius: 999px;
  color: var(--accent); background: var(--accent-soft);
  border: 1px solid transparent; white-space: nowrap;
}
.fstore-price.free { color: var(--text-3); background: var(--card-alt); font-weight: 600; }
.fstore-card.owned .fstore-price { color: #2f7d4f; background: rgba(64,160,90,.15); }
.fstore-fam { display: block; font-size: 9.5px; color: var(--text-3); margin-top: 3px; font-family: var(--font-mono); letter-spacing: .02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fstore-sample { display: block; font-size: 12.5px; color: var(--text-2); margin-top: 7px; line-height: 1.4; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.fstore-fav { position: absolute; top: 8px; right: 8px; width: 26px; height: 26px; display: flex; align-items: center; justify-content: center; color: var(--text-3); }
.fstore-fav svg { width: 16px; height: 16px; }
.fstore-fav.on { color: var(--accent); }

.fstore-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-top: 9px; }
.fstore-tag { font-size: 9.5px; line-height: 1.6; padding: 1px 6px; border-radius: 999px; white-space: nowrap; }
.fstore-tag.ok { color: #2f7d4f; background: rgba(64,160,90,.14); }
.fstore-tag.wait { color: #a2762c; background: rgba(210,150,40,.16); }
.fstore-tag.cjk { color: var(--text-3); background: var(--card-alt); }
.fstore-tag.latin { color: #7a6ab0; background: rgba(122,106,176,.14); }
.fstore-tag.paid { color: var(--accent); background: var(--accent-soft); }
.fstore-tag.own { color: #2f7d4f; background: rgba(64,160,90,.16); }
/* 余额不足：整卡压暗 + 红边，让「这张现在买不起」不用读字就知道 */
.fstore-card.short { border-color: rgba(200,110,110,.5); }
.fstore-card.short .fstore-sample { opacity: .62; }
.fstore-card.short .fstore-act.primary { background: var(--card-alt); color: var(--text-3); }
.fstore-short { display: block; margin-top: 3px; color: #c26a6a; font-weight: 700; }
.fstore-size { font-size: 9.5px; color: var(--text-3); font-family: var(--font-mono); margin-left: auto; white-space: nowrap; }

.fstore-note { font-size: 10.5px; color: var(--text-3); line-height: 1.45; margin-top: 6px; }
/* 定价说明：把 6 款的钱和合计全列出来，别让人猜 */
.fstore-buynote {
  margin: 2px 0 12px; padding: 9px 11px; border-radius: 12px;
  background: var(--card-alt); font-size: 10.5px; line-height: 1.75; color: var(--text-2);
}
.fstore-buynote small { color: var(--text-3); }
.fstore-stat span.wallet b { color: var(--accent); }
.fstore-acts { display: flex; gap: 6px; margin-top: 9px; }
.fstore-act { flex: 1; padding: 6px 4px; font-size: 11.5px; border-radius: 10px; background: var(--card-alt); color: var(--text-2); text-align: center; }
.fstore-act.primary { background: var(--accent); color: var(--accent-contrast); }
.fstore-act.primary:active { opacity: .82; }
.fstore-act[disabled] { opacity: .42; cursor: default; }

.fstore .appearance-footnote code { font-family: var(--font-mono); font-size: 10px; background: var(--card-alt); padding: 1px 4px; border-radius: 5px; }
/* —— 底部说明 —— */
.coz-footnote {
  text-align: center;
  font-size: 11px;
  color: #a08a6a;
  padding: 2px 0 6px;
}

/* ============ v166 两人小屋 · 像素等距（参考图风） ============ */
.coz3-wrap { display: flex; flex-direction: column; height: 100%; background: #fde8ee; transition: background .8s ease; }
.coz3-stage.fade-in { animation: cozRoomIn .5s ease; }
@keyframes cozRoomIn { 0% { opacity: .5; transform: scale(.96) translateY(8px); filter: blur(4px); } 100% { opacity: 1; transform: none; filter: none; } }
.coz3-wrap.night { background: #1c1630; }
.coz3-rooms { display: flex; gap: 6px; padding: 8px 10px; flex-shrink: 0; background: rgba(255,255,255,.6); }
.coz3-wrap.night .coz3-rooms { background: rgba(30,26,50,.7); }
.coz3-rooms button { flex: 1; padding: 7px 4px; border-radius: 10px; background: rgba(255,255,255,.5);
  transition: background .25s, transform .15s, opacity .25s; cursor: pointer;
  font-size: 12px; color: #8a6a4a; border: 1.5px solid transparent; transition: all .2s; }
.coz3-rooms button:active { transform: scale(.94); }
.coz3-rooms button:disabled { opacity: .55; cursor: not-allowed; }
.coz3-wrap.night .coz3-rooms button { background: rgba(255,255,255,.08); color: rgba(255,255,255,.6); }
.coz3-rooms button.on { background: #f0a8c0; color: #fff; box-shadow: 0 2px 8px rgba(240,168,192,.4); }
.coz3-wrap.night .coz3-rooms button.on { background: #8a78b8; box-shadow: 0 2px 8px rgba(138,120,184,.4); }
.coz3-stage { position: relative; flex: 1; min-height: 260px; overflow: hidden; }
.coz3-stage canvas { display: block; width: 100%; height: 100%; }
.coz3-bubble { position: absolute; left: 50%; top: 28%; transform: translateX(-50%); max-width: 72%; z-index: 10;
  background: #fff; border-radius: 14px; padding: 8px 14px; font-size: 13px; line-height: 1.5; color: #4a3a2a;
  box-shadow: 0 4px 16px rgba(0,0,0,.2); border: 1.5px solid #f0dfc0; }
.coz3-bubble.me { background: linear-gradient(160deg, #d8ecff, #bcdcf7); border-color: rgba(120,163,217,.4); color: #2a4a6a; }
.coz3-bubble.pop { animation: cozBubblePop .4s cubic-bezier(.2,.9,.3,1.4); }
.coz3-hint { position: absolute; left: 50%; top: 8px; transform: translateX(-50%); z-index: 12;
  background: rgba(255,255,255,.85); backdrop-filter: blur(6px); border-radius: 99px; padding: 4px 14px;
  font-size: 11px; color: #7a5a3a; box-shadow: 0 2px 8px rgba(0,0,0,.12); white-space: nowrap; }
.coz3-wrap.night .coz3-hint { background: rgba(40,36,64,.85); color: #e8dff5; }
.coz3-controls { position: absolute; right: 10px; bottom: 10px; z-index: 11; display: flex; flex-direction: column; gap: 6px; }
.coz3-ctrl { width: 40px; height: 40px; border-radius: 12px; background: rgba(255,255,255,.7); border: 1.5px solid rgba(0,0,0,.08);
  font-size: 18px; cursor: pointer; transition: all .25s; box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.coz3-wrap.night .coz3-ctrl { background: rgba(30,26,50,.7); border-color: rgba(255,255,255,.1); }
.coz3-ctrl.on { background: #f0a8c0; border-color: #f0a8c0; box-shadow: 0 2px 12px rgba(240,168,192,.5); }
.coz3-wrap.night .coz3-ctrl.on { background: #8a78b8; border-color: #8a78b8; }
.coz3-footnote { text-align: center; font-size: 11px; color: #a08a6a; padding: 4px 0 6px; flex-shrink: 0; }
.coz3-wrap.night .coz3-footnote { color: #6a5a8a; }

/* ============ v139 竞品对齐批 ============ */

/* —— P0-2 朋友圈全屏图片轮播 —— */
.mo-viewer {
  position: fixed; inset: 0; z-index: 999;
  background: rgba(8, 8, 14, .94);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  animation: movFade .25s ease;
}
@keyframes movFade { from { opacity: 0; } to { opacity: 1; } }
.mov-x {
  position: absolute; top: 18px; right: 20px;
  width: 38px; height: 38px; border-radius: 50%;
  border: none; background: rgba(255,255,255,.12);
  color: #fff; font-size: 16px; cursor: pointer;
}
.mov-cap { color: rgba(255,255,255,.85); font-size: 13px; margin-bottom: 16px; letter-spacing: .04em; }
.mov-stage {
  flex: 1; width: 100%;
  display: grid; place-items: center;
  font-size: clamp(120px, 46vw, 240px);
  cursor: pointer;
}
.mov-emo { display: inline-block; filter: drop-shadow(0 12px 40px rgba(0,0,0,.5)); }
.mov-emo.slide { animation: movSlide .3s cubic-bezier(.2,.9,.3,1.3); }
@keyframes movSlide {
  0%   { transform: scale(.86); opacity: .4; }
  100% { transform: scale(1);   opacity: 1; }
}
.mov-nav { display: flex; align-items: center; gap: 16px; padding: 14px 0 26px; }
.mov-nav button {
  width: 42px; height: 42px; border-radius: 50%;
  border: none; background: rgba(255,255,255,.14);
  color: #fff; font-size: 20px; cursor: pointer;
}
.mov-nav button:active { background: rgba(255,255,255,.3); }
.mov-dots { display: flex; gap: 6px; }
.mov-dots i {
  width: 6px; height: 6px; border-radius: 50%;
  background: rgba(255,255,255,.3); transition: all .25s;
}
.mov-dots i.on { background: #fff; width: 16px; border-radius: 99px; }

/* —— P1-3 表情包市场 —— */
.st-market {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 10px; padding: 8px 16px 20px;
}
.st-cell {
  background: #fff; border: 1px solid rgba(0,0,0,.06);
  border-radius: 14px; padding: 8px;
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  cursor: pointer; transition: transform .25s ease;
}
.st-cell:active { transform: scale(.96); }
.st-cell img { width: 100%; height: 74px; object-fit: contain; }
.st-cell b { font-size: 11px; color: #6a5a4a; font-weight: 600; }
.st-fav-btn { font-size: 10px; color: #b09a7a; padding: 2px 8px; border-radius: 99px; background: rgba(0,0,0,.04); }
.st-fav-btn.on { color: #e05a8a; background: rgba(224,90,138,.1); }
.st-fav-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.st-fav { background: #fff; border: 1px solid rgba(0,0,0,.06); border-radius: 12px; padding: 6px; cursor: pointer; }
.st-fav img { width: 100%; height: 54px; object-fit: contain; }

/* —— P1-1 通话悬浮窗 · v172 精修：头像+在线点+时长，可拖动贴边半透明 —— */
.call-float {
  position: absolute; top: 64px; right: 12px; z-index: 210;
  background: rgba(30, 34, 44, .92); color: #fff;
  border-radius: 99px; padding: 5px 12px 5px 5px;
  font-size: 12px; font-weight: 600;
  display: flex; align-items: center; gap: 7px;
  box-shadow: 0 6px 18px rgba(0,0,0,.3);
  cursor: grab; user-select: none; touch-action: none;
  transition: left .22s var(--ease-out), opacity .2s;
  animation: cfIn .35s cubic-bezier(.2,.9,.3,1.4);
}
.call-float:active { cursor: grabbing; }
.call-float .cf-av {
  width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
  background: rgba(255,255,255,.16);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; line-height: 1;
}
.call-float .cf-dot {
  width: 7px; height: 7px; border-radius: 50%; background: #5ee08a;
  box-shadow: 0 0 6px rgba(94, 224, 138, .9);
  animation: cvNet 1.6s ease-in-out infinite;
}
.call-float.docked { opacity: .5; }
.call-float.docked:hover, .call-float.docked:active { opacity: 1; }
@keyframes cfIn { from { transform: scale(.5); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.call-float::after {
  content: ''; position: absolute; inset: -6px; border-radius: 99px;
  border: 1.5px solid rgba(120, 220, 150, .6);
  animation: cfRing 2s ease-out infinite;
}
@keyframes cfRing {
  0%   { transform: scale(.9); opacity: .8; }
  100% { transform: scale(1.25); opacity: 0; }
}

/* —— P1-2 气泡皮肤 —— */
.chat-feed[data-skin="paper"] .bubble.wx-blue,
.chat-feed[data-skin="paper"] .bubble.me { background: #fbf3e0 !important; color: #5a4632 !important; border: 1px solid #e8d9b8; border-radius: 4px 14px 14px 14px !important; }
.chat-feed[data-skin="paper"] .bubble.wx-white { background: #fffdf7 !important; color: #5a4632 !important; border: 1px dashed #d9c8a8; }
.chat-feed[data-skin="glass"] .bubble.wx-blue,
.chat-feed[data-skin="glass"] .bubble.me { background: rgba(120,170,255,.28) !important; backdrop-filter: blur(6px); border: 1px solid rgba(255,255,255,.5) !important; }
.chat-feed[data-skin="glass"] .bubble.wx-white { background: rgba(255,255,255,.4) !important; backdrop-filter: blur(6px); border: 1px solid rgba(255,255,255,.65) !important; }
.chat-feed[data-skin="night"] .bubble.wx-blue,
.chat-feed[data-skin="night"] .bubble.me { background: #3a4a66 !important; color: #dce8ff !important; }
.chat-feed[data-skin="night"] .bubble.wx-white { background: #2a2f3a !important; color: #d5dae2 !important; }
.chat-feed[data-skin="candy"] .bubble.wx-blue,
.chat-feed[data-skin="candy"] .bubble.me { background: linear-gradient(135deg,#ffb6d9,#ff8fc2) !important; color: #fff !important; border-radius: 18px 18px 4px 18px !important; }
.chat-feed[data-skin="candy"] .bubble.wx-white { background: linear-gradient(135deg,#d4f5e8,#b8ecd8) !important; color: #2a6a55 !important; border-radius: 18px 18px 18px 4px !important; }

/* —— P2-1 自定义 emoji 图标 —— */
.custom-icon {
  display: grid; place-items: center;
  width: 56px; height: 56px;
  background: linear-gradient(160deg, #fff, #f0e8f8);
  border-radius: 22%;
  box-shadow: 0 4px 10px rgba(100, 70, 130, .18);
}
.custom-icon .custom-ico { font-size: 34px; line-height: 1; }

/* —— P0-4 懒加载 + P0-3 摘要框 —— */
.chat-loadmore {
  text-align: center; font-size: 11px; color: var(--accent-deep, #8a7ab8);
  background: rgba(138, 122, 184, .08);
  border: 1px dashed rgba(138, 122, 184, .3);
  border-radius: 99px;
  margin: 8px auto 4px; padding: 5px 14px;
  width: fit-content; cursor: pointer;
  transition: background .2s ease;
}
.chat-loadmore:active { background: rgba(138, 122, 184, .18); }
.chat-sum-box {
  background: #fff; border: 1px solid rgba(0,0,0,.07);
  border-radius: 12px; padding: 10px 12px;
  max-height: 260px; overflow-y: auto;
}
.chat-sum-box p { font-size: 13.5px; line-height: 1.7; color: #4a3a2a; margin: 0 0 6px; }
.chat-sum-box p:last-child { margin-bottom: 0; }

/* —— P2-2 低端机降级：关掉循环装饰动画 —— */
.low-power .bt-star,
.low-power .bt-petal,
.low-power .bt-lantern-glow,
.low-power .bt-lantern-body,
.low-power .bt-tower-window,
.low-power .bt-clockface,   /* v179 修复：此前漏了它，而它恰是钟楼最贵的一条动画 */
.low-power .coz-lamp-glow,
.low-power .coz-zzz,
.low-power .call-float::after { animation: none !important; }
.low-power .bt-star { opacity: .5; }
.low-power .bt-petal { display: none; }
.low-power .bt-lantern-glow { opacity: .7; }

/* ============ v137b 圆桌 · Bell Tower 视觉/互动升级 ============ */

/* —— 舞台：更高，更深邃 —— */
.bt-stage {
  position: relative;
  height: 196px;
  overflow: hidden;
  background:
    radial-gradient(ellipse 90% 60% at 50% 42%, #f7d8a8 0%, #d59a78 26%, #6a4d6e 60%, #2a1f3a 100%);
  border-bottom: 1px solid rgba(255,255,255,.06);
}

/* —— 星空层 —— */
.bt-stars {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  overflow: hidden;
}
.bt-star {
  position: absolute;
  background: radial-gradient(circle, #fff8e0 0%, rgba(255,248,224,.6) 50%, transparent 75%);
  border-radius: 50%;
  animation: btTwinkle ease-in-out infinite;
}
@keyframes btTwinkle {
  0%,100% { opacity: .25; transform: scale(1); }
  50%     { opacity: 1;   transform: scale(1.4); }
}

/* —— 地平线雾霭 —— */
.bt-mist {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 56px;
  z-index: 3;
  pointer-events: none;
  background:
    linear-gradient(180deg,
      transparent 0%,
      rgba(255, 220, 200, .25) 35%,
      rgba(180, 140, 180, .55) 80%,
      rgba(80, 60, 100, .85) 100%);
  filter: blur(2px);
}

/* —— 钟楼钟面：柔和呼吸 + 指针动 —— */
.bt-tower { z-index: 2; }
.bt-tower .bt-clockface {
  filter: drop-shadow(0 0 6px rgba(247,233,192,.45));
  animation: btClockGlow 3.6s ease-in-out infinite;
}
.bt-tower .bt-clock-h,
.bt-tower .bt-clock-m {
  transform-origin: 60px 66px;
  transform-box: fill-box;
}
.bt-tower-window {
  animation: btWindowGlow 4s ease-in-out infinite;
}
@keyframes btWindowGlow {
  0%,100% { fill: rgba(247,200,140,0); }
  50%     { fill: rgba(247,200,140,.4); }
}
/* v179 修复：原来这里补间的是 filter: drop-shadow 的模糊半径。
   filter 不是可合成属性 —— 每一帧都要重新光栅化整个 SVG 滤镜子树；
   而父 .bt-tower 自己还带一层 drop-shadow(0 4px 14px rgba(0,0,0,.4))，两层嵌套代价翻倍。
   改成：滤镜半径写死在一个中间值，动画只改 opacity（可合成属性，纯 GPU 合成、不触发重绘）。
   观感几乎不变（同样是一涨一落的呼吸感），开销降一个数量级。 */
.bt-tower .bt-clockface { filter: drop-shadow(0 0 9px rgba(247,233,192,.55)); }
@keyframes btClockGlow {
  0%,100% { opacity: .74; }
  50%     { opacity: 1;   }
}

/* —— 灯笼 —— */
.bt-lantern {
  position: absolute;
  left: 50%; bottom: 12px;
  transform: translateX(-50%);
  width: 40px; height: 60px;
  z-index: 4;
  pointer-events: none;
}
.bt-lantern-glow {
  position: absolute;
  left: 50%; bottom: -8px;
  transform: translateX(-50%);
  width: 90px; height: 90px;
  background: radial-gradient(circle, rgba(255,200,140,.55) 0%, rgba(255,180,120,.25) 30%, transparent 65%);
  border-radius: 50%;
  animation: btLanternPulse 3.2s ease-in-out infinite;
  filter: blur(3px);
}
.bt-lantern-hang {
  position: absolute;
  left: 50%; top: 0;
  transform: translateX(-50%);
  width: 1px; height: 18px;
  background: linear-gradient(180deg, transparent, #cbb98a);
}
.bt-lantern-body {
  position: absolute;
  left: 50%; bottom: 0;
  transform: translateX(-50%);
  font-size: 22px;
  filter: drop-shadow(0 0 6px rgba(255,180,120,.85));
  animation: btLanternSway 4s ease-in-out infinite;
  transform-origin: 50% 0;
}
@keyframes btLanternPulse {
  0%,100% { opacity: .85; transform: translateX(-50%) scale(1); }
  50%     { opacity: 1;   transform: translateX(-50%) scale(1.15); }
}
@keyframes btLanternSway {
  0%,100% { transform: translateX(-50%) rotate(-3deg); }
  50%     { transform: translateX(-50%) rotate(3deg); }
}

/* —— 花瓣更小更优雅 —— */
.bt-petal-layer {
  position: absolute; inset: 0; z-index: 3; pointer-events: none; overflow: hidden;
}
.bt-petal {
  position: absolute; top: -10px; width: 6px; height: 6px;
  background: radial-gradient(circle, #ffd6e3 0%, #f5a8c4 60%, #d97aa3 100%);
  border-radius: 60% 40% 60% 40% / 50% 60% 40% 50%;
  opacity: .75;
  animation: btPetalFall linear infinite;
  box-shadow: 0 1px 4px rgba(217,122,163,.4);
}
@keyframes btPetalFall {
  0%   { transform: translateY(-10px) translateX(0) rotate(0deg); opacity: 0; }
  10%  { opacity: .85; }
  50%  { transform: translateY(95px) translateX(20px) rotate(180deg); }
  100% { transform: translateY(210px) translateX(-15px) rotate(360deg); opacity: 0; }
}

/* —— 钟声脉冲（整个舞台金色闪）—— */
.bt-bell-pulse {
  position: absolute;
  left: 50%; top: 36%;
  transform: translate(-50%, -50%);
  width: 220px; height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(247,233,192,.55) 0%, transparent 70%);
  opacity: 0;
  pointer-events: none;
  z-index: 5;
}
.bt-bell-pulse.bt-ring {
  animation: btBellRing 1.4s ease-out;
}
@keyframes btBellRing {
  0%   { opacity: 0;   transform: translate(-50%, -50%) scale(.35); }
  20%  { opacity: .9;  transform: translate(-50%, -50%) scale(.55); }
  100% { opacity: 0;   transform: translate(-50%, -50%) scale(1.8); }
}

/* —— 推门仪式 —— */
.bt-door-overlay {
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 196px;
  z-index: 50;
  pointer-events: none;
  overflow: hidden;
  opacity: 0;
}
.bt-door-overlay.bt-door-show { opacity: 1; }
.bt-door-left, .bt-door-right {
  position: absolute; top: 0; bottom: 0; width: 50%;
  background:
    linear-gradient(180deg, #5a3a1a 0%, #3a2a1a 60%, #2a1a0a 100%);
  box-shadow: inset 0 0 18px rgba(0,0,0,.4), inset 0 0 40px rgba(80,40,0,.4);
  transition: transform 1.2s cubic-bezier(.7,.1,.3,1);
}
.bt-door-left  { left: 0;  border-right: 2px solid #8a5a22; transform: translateX(0); }
.bt-door-right { right: 0; border-left:  2px solid #8a5a22; transform: translateX(0); }
.bt-door-overlay.bt-door-show .bt-door-left  { transform: translateX(-92%); }
.bt-door-overlay.bt-door-show .bt-door-right { transform: translateX(92%); }
.bt-door-text {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  color: #f7e9c0;
  font-size: 14px;
  letter-spacing: 1px;
  padding: 10px 18px;
  background: rgba(58,42,26,.85);
  border: 1px solid #8a5a22;
  border-radius: 99px;
  text-shadow: 0 0 8px rgba(247,200,140,.6);
  opacity: 0;
  transition: opacity .4s .7s;
}
.bt-door-overlay.bt-door-show .bt-door-text { opacity: 1; }

/* —— 席位卡：通道色边 + 发言脉冲 + 思考光晕 —— */
.bt-seats {
  display: flex; flex-wrap: wrap; gap: 8px;
  padding: 10px 12px 8px;
  background: linear-gradient(180deg, rgba(247,217,168,.14), transparent);
  border-bottom: 1px solid rgba(0,0,0,.05);
}
.bt-seat {
  position: relative;
  flex: 0 0 calc(50% - 4px);
  background: rgba(255,255,255,.82);
  border: 1px solid rgba(0,0,0,.06);
  border-radius: 14px;
  padding: 10px 10px 8px 14px;
  box-shadow: 0 2px 6px rgba(80,40,80,.06);
  display: flex; align-items: center; gap: 8px;
  transition: transform .35s cubic-bezier(.2,.9,.3,1.4), box-shadow .35s ease, border-color .35s ease;
  animation: btSeatIn .5s cubic-bezier(.2,.9,.3,1.4);
  overflow: hidden;
}
@keyframes btSeatIn {
  0%   { transform: scale(.7) translateY(8px); opacity: 0; }
  100% { transform: scale(1)   translateY(0);   opacity: 1; }
}
.bt-seat-instance { border-left: 3px solid #f7a868; }
.bt-seat-npc      { border-left: 3px solid #7ec07e; }
.bt-seat-router  { border-left: 3px solid #b58cd8; }
.bt-seat:hover { transform: translateY(-2px); box-shadow: 0 6px 14px rgba(80,40,80,.12); }

/* 发言脉冲：整个席位放大+发光 */
.bt-seat-speaking {
  animation: btSeatSpeak 1.4s ease-out;
  box-shadow: 0 0 0 0 rgba(247,233,192,.6), 0 6px 20px rgba(247,200,140,.45);
}
@keyframes btSeatSpeak {
  0%   { transform: scale(1);    box-shadow: 0 0 0 0 rgba(247,233,192,.6); }
  35%  { transform: scale(1.05); box-shadow: 0 0 0 10px rgba(247,233,192,0); }
  100% { transform: scale(1);    box-shadow: 0 0 0 0 rgba(247,233,192,0); }
}
/* 思考态：头像光晕 */
.bt-seat-thinking .bt-seat-pulse {
  opacity: 1;
  animation: btSeatPulse 1.2s ease-in-out infinite;
}
.bt-seat-thinking { border-color: rgba(247,200,140,.5); }
.bt-seat-pulse {
  position: absolute;
  left: 12px; top: 50%;
  transform: translateY(-50%);
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 2px solid rgba(247,200,140,.6);
  opacity: 0;
  pointer-events: none;
}
@keyframes btSeatPulse {
  0%   { transform: translateY(-50%) scale(.8); opacity: .8; }
  100% { transform: translateY(-50%) scale(1.6); opacity: 0; }
}

/* 席位号 + 头像 + 名字 (沿用) */
.bt-seat-num { position: absolute; top: 4px; left: 6px; font-size: 9px; color: #a07a4a; font-family: ui-monospace, Consolas, monospace; letter-spacing: .05em; }
.bt-seat-av {
  position: relative;
  width: 36px; height: 36px;
  font-size: 22px;
  display: grid; place-items: center;
  background: linear-gradient(160deg, #fff5e1, #f0d9b3);
  border-radius: 50%;
  flex: 0 0 auto;
  z-index: 1;
}
.bt-seat-name { flex: 1; font-size: 13.5px; font-weight: 600; color: #4a3a2a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bt-seat-mode { font-size: 9.5px; color: #8a7458; letter-spacing: .04em; position: absolute; bottom: 4px; left: 58px; }
.bt-seat-x { flex: 0 0 auto; width: 22px; height: 22px; border-radius: 50%; border: none; background: rgba(0,0,0,.06); color: #7a5a3a; font-size: 11px; cursor: pointer; transition: background .2s ease; }
.bt-seat-x:active { background: rgba(217,122,163,.3); }
.bt-seat-add {
  flex: 0 0 calc(50% - 4px);
  background: rgba(255,255,255,.4);
  border: 1.5px dashed rgba(122,90,42,.35);
  color: #8a6a3a;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  min-height: 58px;
  border-radius: 14px;
  transition: background .25s ease, transform .25s ease;
}
.bt-seat-add:hover { background: rgba(247,217,168,.4); }
.bt-seat-add:active { transform: scale(.97); }

/* —— 对话流：入场动画 + 通道色—— */
#bt-feed { padding: 8px 12px 16px; }
.bt-empty {
  padding: 28px 16px;
  text-align: center;
  color: #a08a6a;
  font-size: 13px;
  line-height: 1.7;
  background: rgba(255,255,255,.5);
  border: 1px dashed rgba(122,90,42,.25);
  border-radius: 14px;
  margin: 16px 0;
  animation: btFadeIn .6s ease;
}
.bt-sys {
  text-align: center;
  font-size: 11px;
  color: #a08770;
  padding: 6px 0;
  letter-spacing: .04em;
}
.bt-msg {
  display: flex;
  gap: 8px;
  margin: 10px 0;
  align-items: flex-start;
  animation: btMsgIn .45s cubic-bezier(.2,.9,.3,1.4);
}
@keyframes btMsgIn {
  0%   { opacity: 0; transform: translateY(8px) scale(.96); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
.bt-msg.me { flex-direction: row-reverse; }
.bt-msg-av {
  flex: 0 0 32px;
  width: 32px; height: 32px;
  font-size: 20px;
  display: grid; place-items: center;
  background: linear-gradient(160deg, #fff5e1, #f0d9b3);
  border-radius: 50%;
  border: 1px solid rgba(217,122,163,.2);
}
.bt-msg.me .bt-msg-av {
  background: linear-gradient(160deg, #c5e3ff, #8ab8e0);
  border-color: rgba(122,163,217,.3);
}
.bt-msg-body {
  flex: 1; min-width: 0;
  max-width: calc(100% - 50px);
  background: rgba(255,255,255,.88);
  border: 1px solid rgba(0,0,0,.06);
  border-radius: 12px;
  padding: 8px 11px 9px;
  box-shadow: 0 2px 6px rgba(80,40,80,.05), inset 0 1px 0 rgba(255,255,255,.8);
  position: relative;
}
.bt-msg-body::before {
  content: '';
  position: absolute;
  left: -6px; top: 10px;
  width: 8px; height: 8px;
  background: inherit;
  border-left: 1px solid rgba(0,0,0,.06);
  border-bottom: 1px solid rgba(0,0,0,.06);
  transform: rotate(45deg);
}
.bt-msg.me .bt-msg-body {
  background: linear-gradient(160deg, #c5e3ff, #a5c8e8);
  border-color: rgba(122,163,217,.25);
}
.bt-msg.me .bt-msg-body::before {
  left: auto; right: -6px;
  background: linear-gradient(160deg, #c5e3ff, #a5c8e8);
  border-left: none; border-bottom: none;
  border-right: 1px solid rgba(122,163,217,.25);
  border-top: 1px solid rgba(122,163,217,.25);
}
.bt-msg-instance .bt-msg-body { background: linear-gradient(160deg, #fff0e0, #ffd9b8); border-color: rgba(217,142,80,.25); }
.bt-msg-instance .bt-msg-body::before { background: linear-gradient(160deg, #fff0e0, #ffd9b8); border-left-color: rgba(217,142,80,.25); border-bottom-color: rgba(217,142,80,.25); }
.bt-msg-npc .bt-msg-body       { background: linear-gradient(160deg, #e8f7e0, #c8e8b8); border-color: rgba(80,160,80,.25); }
.bt-msg-npc .bt-msg-body::before { background: linear-gradient(160deg, #e8f7e0, #c8e8b8); border-left-color: rgba(80,160,80,.25); border-bottom-color: rgba(80,160,80,.25); }
.bt-msg-router .bt-msg-body    { background: linear-gradient(160deg, #f0e0f7, #d8b8e8); border-color: rgba(160,80,200,.25); }
.bt-msg-router .bt-msg-body::before { background: linear-gradient(160deg, #f0e0f7, #d8b8e8); border-left-color: rgba(160,80,200,.25); border-bottom-color: rgba(160,80,200,.25); }
.bt-msg-name { font-size: 11px; color: #a08770; margin-bottom: 2px; letter-spacing: .04em; font-weight: 600; }
.bt-msg.me .bt-msg-name { color: #4a6a8a; }
.bt-msg-text { font-size: 14px; color: #3a2a1a; line-height: 1.55; white-space: pre-wrap; word-break: break-word; }

.bt-thinking-msg .bt-msg-body {
  background: rgba(255,255,255,.55);
  border-style: dashed;
}
.bt-thinking-msg .bt-thinking-dots {
  display: inline-flex; gap: 4px; padding: 4px 2px;
}
.bt-thinking-msg .bt-thinking-dots i {
  width: 6px; height: 6px;
  background: #b8a78a;
  border-radius: 50%;
  animation: btThink 1.2s ease-in-out infinite;
}
.bt-thinking-msg .bt-thinking-dots i:nth-child(2) { animation-delay: .2s; }
.bt-thinking-msg .bt-thinking-dots i:nth-child(3) { animation-delay: .4s; }
@keyframes btThink {
  0%,100% { opacity: .3; transform: translateY(0); }
  50%     { opacity: 1; transform: translateY(-3px); }
}
/* ========== v179 钟楼体验三件套 ========== */

/* —— 打字机：正在逐字输出的那一条，光标跟随最后一个字 —— */
.bt-msg-text.bt-typing-on::after {
  content: '';
  display: inline-block;
  width: 2px; height: 1em;
  margin-left: 2px;
  vertical-align: -2px;
  background: #c08a4a;
  animation: btCaret .7s steps(1) infinite;
}
@keyframes btCaret { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }

/* —— 席位轮次状态：pending / thinking / speaking / done ——
   圆桌最核心的悬念是"这一轮还剩几个人没开口"，这四态就是把它画出来。 */
.bt-seat[data-state="pending"] { border-color: rgba(247,200,140,.45); }
.bt-seat[data-state="pending"] .bt-seat-av { animation: btSeatPending 2.2s ease-in-out infinite; }
@keyframes btSeatPending {
  0%, 100% { transform: scale(1);    opacity: 1;   }
  50%      { transform: scale(1.06); opacity: .82; }
}
.bt-seat[data-state="thinking"] { border-color: rgba(247,200,140,.75); }
.bt-seat[data-state="speaking"] {
  border-color: #e8a94a;
  box-shadow: 0 0 0 2px rgba(232,169,74,.28), 0 6px 16px rgba(180,120,40,.18);
}
.bt-seat[data-state="done"] { opacity: .78; }
.bt-seat[data-state="done"] .bt-seat-av { filter: saturate(.85); }

.bt-seat-mark {
  position: absolute;
  top: 4px; right: 26px;
  font-size: 11px; line-height: 1;
  color: #b8813a;
  font-weight: 700;
  pointer-events: none;
}
.bt-seat[data-state="speaking"] .bt-seat-mark { color: #e8a94a; animation: btMarkPulse .9s ease-in-out infinite; }
.bt-seat[data-state="done"] .bt-seat-mark { color: #6aa06a; }
@keyframes btMarkPulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.28); } }

/* —— 新消息提示胶囊：用户往上翻时才出现，不再被强行拽回底部 —— */
.bt-jump {
  position: absolute;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  z-index: 6;
  display: inline-flex; align-items: center; gap: 4px;
  padding: 5px 13px;
  border: 1px solid rgba(184,129,58,.35);
  border-radius: 999px;
  background: rgba(255,252,245,.94);
  color: #8a6236;
  font-size: 11.5px; font-weight: 600;
  box-shadow: 0 3px 12px rgba(120,80,30,.18);
  cursor: pointer;
  animation: btJumpIn .22s cubic-bezier(.2,.9,.3,1.2) both;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.bt-jump:active { transform: translateX(-50%) scale(.95); }
.bt-jump b { font-weight: 800; color: #b8813a; }
@keyframes btJumpIn {
  from { opacity: 0; transform: translate(-50%, 8px) scale(.9); }
  to   { opacity: 1; transform: translate(-50%, 0)   scale(1);  }
}

/* 降级：低电量/低端机与「减少动态效果」偏好下不做逐字与呼吸，只留静态 */
.low-power .bt-msg-text.bt-typing-on::after,
.low-power .bt-seat[data-state="pending"] .bt-seat-av,
.low-power .bt-seat[data-state="speaking"] .bt-seat-mark,
.low-power .bt-jump { animation: none; }
.low-power .bt-jump { transform: translateX(-50%); }
@media (prefers-reduced-motion: reduce) {
  .bt-msg-text.bt-typing-on::after,
  .bt-seat[data-state="pending"] .bt-seat-av,
  .bt-seat[data-state="speaking"] .bt-seat-mark,
  .bt-jump { animation: none; }
  .bt-jump { transform: translateX(-50%); }
}

/* ========== v179.4 工作台：单列 + 导航在右上角 ☰ ==========
   v179.2 曾经做过左侧导航栏，实机看过后用户改了主意：
   「工作站不要做在左边导航栏…把左侧的功能导航栏换到三道杠里就好」。
   于是侧栏整套撤掉，导航统一由 ☰ 承担（app.js 里 workbench.menu() 注册）。
   保留的诉求：概览页仍然压在一屏内，进来不用下滑翻找。 */

.wb-single {
  flex: 1; min-height: 0;
  display: flex; flex-direction: column;
  overflow: hidden;
}
.wb-hd {
  flex: 0 0 auto;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px 9px;
  border-bottom: 1px solid var(--divider);
  background: var(--zg-topbar, var(--card));
  -webkit-backdrop-filter: blur(20px) saturate(1.5);
  backdrop-filter: blur(20px) saturate(1.5);
}
.wb-hd .atmo-ava {
  flex: 0 0 auto;
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; line-height: 1;
  background: var(--accent-soft);
}
.wb-hd-t { min-width: 0; }
.wb-hd-t b { display: block; font-size: 16.5px; font-weight: 700; letter-spacing: -.01em; }
.wb-hd-t small { display: block; font-size: 10.5px; color: var(--text-3); margin-top: 1px; }
.wb-content {
  flex: 1; min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px));
}
.wb-content::-webkit-scrollbar { width: 0; }

/* —— 概览页 —— */
/* —— 通用 ☰ 菜单 / 工作台导航（都用这一套） —— */
.umb-head { padding: 4px 6px 10px; }
.umb-head b { display: block; font-size: 17px; font-weight: 700; letter-spacing: -.01em; }
.umb-head small { display: block; font-size: 11.5px; color: var(--text-3); margin-top: 2px; }
.umb-list { display: flex; flex-direction: column; }
.umb-i {
  display: flex; align-items: center; gap: 11px;
  width: 100%; padding: 11px 14px;
  border: none; background: transparent;
  color: var(--text-1); font-size: 14.5px; text-align: left;
  cursor: pointer;
}
.umb-i i { width: 22px; text-align: center; font-style: normal; font-size: 16px; flex: 0 0 auto; }
.umb-i:active { background: var(--bg); }
.umb-i[disabled] { cursor: default; }
.umb-i.mb-app {
  cursor: default; padding-bottom: 9px;
  border-bottom: 1px solid var(--divider);
  margin-bottom: 3px;
  font-weight: 700; font-size: 15px;
}
.umb-i.mb-nav.on { color: var(--accent); font-weight: 600; }
.umb-i.mb-nav.on i { transform: scale(1.08); }
.umb-i.mb-home { color: var(--text-2); }
.umb-div { height: 1px; background: var(--divider); margin: 4px 14px; }
/* 分组小标题：没有它，「全局」和「常用 App」混在一列就分不清哪条是什么 */
.umb-sub {
  padding: 10px 16px 3px; font-size: 10.5px; font-weight: 700;
  letter-spacing: .1em; color: var(--text-3); user-select: none;
}
.umb-sub:first-child { padding-top: 2px; }

.wb-stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--divider);
  border-bottom: 1px solid var(--divider);
}
.wb-stat {
  background: var(--card);
  padding: 11px 4px 10px;
  text-align: center;
}
.wb-stat b {
  display: block; font-size: 17px; font-weight: 700; line-height: 1.1;
  font-variant-numeric: tabular-nums;
  color: var(--text-1);
}
.wb-stat span { display: block; font-size: 9.5px; color: var(--text-3); margin-top: 3px; }

.wb-quick {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 7px;
  padding: 12px 12px 4px;
}
.wb-quick-b {
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 10px 2px 8px;
  border: 1px solid var(--divider);
  border-radius: 13px;
  background: var(--card);
  color: var(--text-1);
  font-size: 10.5px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform var(--dur-fast);
}
.wb-quick-b:active { transform: scale(.95); }
.wb-quick-b i { font-size: 19px; font-style: normal; line-height: 1; }
.wb-quick-b em {
  position: absolute; top: 5px; right: 7px;
  min-width: 14px; height: 14px; padding: 0 3px;
  border-radius: 7px; background: #e8556d; color: #fff;
  font-size: 9px; font-style: normal; font-weight: 700; line-height: 14px;
}

.wb-card {
  margin: 10px 12px 0;
  padding: 12px 13px;
  border-radius: 14px;
  background: var(--card);
  border: 1px solid var(--divider);
  box-shadow: var(--shadow-sm);
}
.wb-card-hd {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 9px;
}
.wb-card-hd b { font-size: 13.5px; font-weight: 700; }
.wb-card-hd span { font-size: 10px; color: var(--text-3); letter-spacing: .04em; }
.wb-card-p { margin: 0; font-size: 12px; line-height: 1.7; color: var(--text-2); }
.wb-idea-row {
  display: flex; align-items: center; gap: 11px;
  margin-bottom: 11px;
}
.wb-idea-row > i { font-size: 30px; font-style: normal; line-height: 1; }
.wb-idea-row > div { min-width: 0; }
.wb-idea-row b { display: block; font-size: 14px; font-weight: 700; }
.wb-idea-row small {
  display: block; font-size: 11px; color: var(--text-2); line-height: 1.6; margin-top: 2px;
}
.wb-card .list-group { margin: 0; box-shadow: none; }
.wb-tip {
  margin: 12px 12px 0;
  padding: 10px 12px;
  border-radius: 11px;
  background: var(--accent-soft);
  color: var(--text-2);
  font-size: 11px; line-height: 1.75;
}
.wb-tip b { color: var(--text-1); }
.wb-content .atmo-empty { padding: 26px 20px; }
.wb-content .atmo-card { margin-left: 12px; margin-right: 12px; }
.wb-content .list-group-title { margin-left: 14px; }

/* 低电量/低端机：概览页快捷入口不需要动效（v179.4 侧栏已撤） */
.low-power .wb-quick-b { transition: none; }

/* ========== v179.3 踩坑账本 ========== */
.wr-head {
  padding: 16px 18px 12px;
  background: linear-gradient(180deg, rgba(196,150,96,.14), transparent);
}
.wr-head-t b { display: block; font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
.wr-head-t small { display: block; font-size: 11.5px; color: var(--text-3); margin-top: 3px; }

.wr-who { display: flex; gap: 7px; padding: 2px 14px 10px; overflow-x: auto; }
.wr-who::-webkit-scrollbar { height: 0; }
.wr-who-b {
  position: relative; flex: 0 0 auto;
  padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--divider); background: var(--card);
  color: var(--text-2); font-size: 12px; cursor: pointer;
  white-space: nowrap;
}
.wr-who-b.on { background: var(--accent-soft); color: var(--text-1); font-weight: 600; border-color: transparent; }
.wr-who-b em {
  display: inline-block; min-width: 15px; height: 15px; margin-left: 4px; padding: 0 4px;
  border-radius: 8px; background: #e8556d; color: #fff;
  font-size: 9.5px; font-style: normal; font-weight: 700; line-height: 15px; text-align: center;
}

.wr-note {
  margin: 0 14px 12px; padding: 11px 13px;
  border-radius: 12px; background: rgba(196,150,96,.1);
  border-left: 3px solid rgba(196,150,96,.5);
  font-size: 11.5px; line-height: 1.75; color: var(--text-2);
}
.wr-note b { color: var(--text-1); }

.wr-item {
  margin: 0 14px 10px; padding: 12px 13px;
  border-radius: 13px; background: var(--card);
  border: 1px solid var(--divider); box-shadow: var(--shadow-sm);
}
.wr-item.done { opacity: .58; }
.wr-item-hd { display: flex; align-items: center; gap: 7px; margin-bottom: 6px; }
.wr-item-hd b { font-size: 13.5px; font-weight: 700; }
.wr-sev { font-size: 8px; letter-spacing: 1px; font-style: normal; }
.wr-sev[data-s="1"] { color: #9bb98f; }
.wr-sev[data-s="2"] { color: #c3b478; }
.wr-sev[data-s="3"] { color: #d9a05b; }
.wr-sev[data-s="4"] { color: #d97b5b; }
.wr-sev[data-s="5"] { color: #e8556d; }
.wr-n { margin-left: auto; font-size: 10.5px; color: var(--text-3); white-space: nowrap; }
.wr-mistake { margin: 0; font-size: 12.5px; line-height: 1.7; color: var(--text-1); }
.wr-rule {
  margin: 5px 0 0; padding: 5px 9px; border-radius: 8px;
  background: var(--accent-soft); color: var(--text-1);
  font-size: 11.5px; line-height: 1.6;
}
.wr-item-ft { display: flex; align-items: center; gap: 10px; margin-top: 9px; }
.wr-when { font-size: 10.5px; color: var(--text-3); }
.wr-acked { margin-left: auto; font-size: 11px; color: #6aa06a; font-weight: 600; }

.wr-fixed { padding: 4px 18px 0; font-size: 11px; color: var(--text-3); text-align: center; }

.wr-sev-pick { display: flex; gap: 5px; }
.wr-sev-pick button {
  flex: 1; padding: 7px 2px; border-radius: 8px;
  border: 1px solid var(--divider); background: var(--card);
  color: var(--text-2); font-size: 11.5px; cursor: pointer;
}
.wr-sev-pick button.on { background: var(--accent-soft); color: var(--text-1); font-weight: 600; border-color: transparent; }

/* ========== v179.3 笔友：通讯录 + 通信记录 ========== */
.pp-hero {
  display: flex; align-items: center; gap: 10px;
  padding: 15px 16px 11px;
  background: linear-gradient(180deg, rgba(120,160,200,.14), transparent);
}
.pp-hero-t { flex: 1; min-width: 0; }
.pp-hero-t b { display: block; font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
.pp-hero-t small { display: block; font-size: 11.5px; color: var(--text-3); margin-top: 3px; }
.pp-chan {
  flex: 0 0 auto; padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--divider); background: var(--card);
  color: var(--text-1); font-size: 12px; font-weight: 600; cursor: pointer;
}
.pp-chan:active { transform: scale(.96); }
.pp-unread {
  margin: 0 16px 8px; padding: 6px 12px; border-radius: 9px;
  background: #e8556d; color: #fff; font-size: 11.5px; font-weight: 600;
  display: inline-block;
}
.pp-dot {
  display: inline-block; min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 8px; background: #e8556d; color: #fff;
  font-size: 10px; font-style: normal; font-weight: 700; line-height: 16px; text-align: center;
}

/* —— 会话头 —— */
.pp-top {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 10px; border-bottom: 1px solid var(--divider);
  background: var(--zg-topbar, var(--card));
  flex: 0 0 auto;
  -webkit-backdrop-filter: blur(20px) saturate(1.5);
  backdrop-filter: blur(20px) saturate(1.5);
}
.pp-top-who { flex: 1; min-width: 0; text-align: center; }
.pp-top-who b { display: block; font-size: 15px; font-weight: 600; }
.pp-top-who small { display: block; font-size: 10.5px; color: var(--text-3); margin-top: 1px; }

/* —— 通信正文 —— */
.pp-thread {
  flex: 1; min-height: 0; overflow-y: auto;
  -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
  padding: 14px 14px 6px;
  display: flex; flex-direction: column; gap: 12px;
  background:
    repeating-linear-gradient(180deg, transparent 0 27px, rgba(140,150,170,.07) 27px 28px);
}
.pp-thread::-webkit-scrollbar { width: 0; }
.pp-msg { max-width: 86%; }
.pp-msg.me { align-self: flex-end; text-align: right; }
.pp-msg.peer { align-self: flex-start; }
.pp-bubble {
  display: inline-block; text-align: left;
  padding: 10px 13px; border-radius: 15px;
  font-size: 13.5px; line-height: 1.85; white-space: pre-wrap; word-break: break-word;
}
.pp-msg.peer .pp-bubble {
  background: var(--card); color: var(--text-1);
  border: 1px solid var(--divider);
  border-top-left-radius: 5px;
  box-shadow: var(--shadow-sm);
}
.pp-msg.me .pp-bubble {
  background: var(--accent-soft); color: var(--text-1);
  border-top-right-radius: 5px;
}
.pp-msg time { display: block; margin-top: 3px; font-size: 10px; color: var(--text-3); }
.pp-compose { flex: 0 0 auto; padding: 8px 14px calc(10px + env(safe-area-inset-bottom, 0px)); }

/* —— 通道选择 —— */
.pp-chans { display: flex; flex-direction: column; gap: 6px; padding: 4px 12px; }
.pp-chans button {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  padding: 10px 12px; border-radius: 11px; text-align: left;
  border: 1px solid var(--divider); background: var(--card);
  color: var(--text-1); cursor: pointer;
}
.pp-chans button.on { border-color: var(--accent); background: var(--accent-soft); }
.pp-chans b { font-size: 13px; font-weight: 600; }
.pp-chans small { font-size: 11px; color: var(--text-2); line-height: 1.5; }

@keyframes btFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ===================== v167 见面 · 视觉小说化（场景原画/氛围粒子/涌现开场） ===================== */
.mt-wrap{background:#0d0a12}
.mt-sub{color:rgba(240,230,250,.55);text-shadow:none}
.mt-stage{position:relative;overflow:hidden;background:#16101d}
.mt-bg{position:absolute;inset:0;background-size:cover;background-position:center;opacity:0;transition:opacity 1s ease;z-index:0}
.mt-bg.on{opacity:1}
.mt-bg.top{z-index:1}
.mt-bg::after{content:'';position:absolute;inset:0;background:linear-gradient(180deg,rgba(18,10,24,.04) 52%,rgba(18,10,24,.45) 88%)}
/* v179.81 双人背景空白帧：聊天停顿时两人同框的场景图（盖在场景底图上、立绘之下） */
.mt-duo{position:absolute;inset:0;background-size:cover;background-position:center;opacity:0;transition:opacity 1.2s ease;z-index:1;pointer-events:none}
.mt-duo.on{opacity:1}
.mt-duo::after{content:'';position:absolute;inset:0;background:linear-gradient(180deg,rgba(18,10,24,.04) 52%,rgba(18,10,24,.45) 88%)}
.mt-bg.mt-cafe{background-color:#e8c9a8;background-image:url("assets/meet/cafe.jpg");animation:mt-kb 26s ease-in-out infinite alternate}
.mt-bg.mt-home{background-color:#e0b894;background-image:url("assets/meet/home.jpg");animation:mt-kb 30s ease-in-out infinite alternate}
.mt-bg.mt-rain{background-color:#2a3a58;background-image:url("assets/meet/rain.jpg");animation:mt-kb 34s ease-in-out infinite alternate}
.mt-bg.mt-school{background-color:#e8c088;background-image:url("assets/meet/school.jpg");animation:mt-kb 28s ease-in-out infinite alternate}
.mt-bg.mt-sea{background-color:#a8cfe8;background-image:url("assets/meet/sea.jpg");animation:mt-kb 32s ease-in-out infinite alternate}
@keyframes mt-kb{from{transform:scale(1.02) translate(0,0)}to{transform:scale(1.1) translate(-1.4%,1%)}}
.mt-light{position:absolute;inset:0;z-index:2;pointer-events:none;background:radial-gradient(90% 58% at 68% 10%,rgba(255,244,214,.2),transparent 65%);mix-blend-mode:screen}
.mt-night{position:absolute;inset:0;z-index:3;pointer-events:none;background:linear-gradient(180deg,rgba(14,18,52,.66),rgba(8,10,30,.52));opacity:0;transition:opacity 1.4s ease}
.mt-night.on{opacity:1}
.mt-vignette{position:absolute;inset:0;z-index:4;pointer-events:none;background:radial-gradient(125% 92% at 50% 42%,transparent 56%,rgba(8,5,14,.52))}
.mt-fx{position:absolute;inset:0;z-index:5;pointer-events:none}
.mt-sprite{z-index:6;animation:mt-breathe 3.6s ease-in-out infinite;transform-origin:50% 100%;transition:opacity .4s,filter .4s}
.mt-sprite.user{animation-delay:1.3s}
@keyframes mt-breathe{0%,100%{transform:translateY(0) scale(1)}50%{transform:translateY(-2.5px) scale(1.016)}}
.mt-sprite.react{animation:mt-pop .8s ease}
.mt-sprite svg{filter:drop-shadow(0 10px 18px rgba(16,6,18,.45))}
.mt-scenes{background:linear-gradient(180deg,rgba(22,15,28,.88),rgba(13,10,19,.94));backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border-top:1px solid rgba(255,255,255,.09)}
.mt-scenes button{background:rgba(255,255,255,.07);border:1px solid rgba(255,255,255,.13);color:#cdbdd8;border-radius:999px;padding:6px 13px;font-size:12px;transition:.25s}
.mt-scenes button.on{background:linear-gradient(135deg,#ffb3c8,#c9a0ff);color:#2a1830;border-color:transparent;box-shadow:0 3px 12px rgba(255,170,200,.35)}
.mt-scenes button:not(.on):active{transform:scale(.94)}
.mt-dialog{background:linear-gradient(180deg,rgba(26,18,34,.82),rgba(13,9,21,.93));backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px);border-top:1px solid rgba(255,255,255,.15);padding:18px 16px 12px;position:relative}
#mt-dlg-name{position:absolute;top:-13px;left:14px;background:linear-gradient(135deg,#4a3560,#2a1e3a);color:#ffd9e8;font-size:11px;padding:4px 14px;border-radius:999px;border:1px solid rgba(255,255,255,.22);box-shadow:0 4px 12px rgba(0,0,0,.4);letter-spacing:1px}
#mt-dlg{color:#f5eef9;text-shadow:0 1px 4px rgba(0,0,0,.55);font-size:14px;line-height:1.9;letter-spacing:.3px}
#mt-dlg-next{color:#ffd9e8;animation:mt-bob 1s ease-in-out infinite}
.mt-narr{background:linear-gradient(180deg,rgba(10,7,15,.85),rgba(16,10,22,.8));backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);color:#e8ddf2;border-top:1px solid rgba(255,220,180,.25);border-bottom:1px solid rgba(255,220,180,.25);letter-spacing:1px;text-shadow:0 1px 6px rgba(0,0,0,.6)}
.meet-actions{background:rgba(18,12,24,.9);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border:1px solid rgba(255,255,255,.1);box-shadow:0 8px 24px rgba(0,0,0,.4)}
.meet-actions .btn{background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.14);color:#e8dcf0;box-shadow:none}
.meet-actions .btn:active{transform:scale(.95)}
.meet-actions .btn.danger{background:rgba(232,74,111,.16);border-color:rgba(232,74,111,.35);color:#ff9db8}
.mt-input{background:linear-gradient(180deg,rgba(22,15,28,.9),rgba(13,10,19,.95));border-top:1px solid rgba(255,255,255,.09);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px)}
.mt-input input{background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.14);color:#f2eaf8;border-radius:999px}
.mt-input input::placeholder{color:rgba(240,230,250,.4)}
.mt-input .btn{background:linear-gradient(135deg,#ffb3c8,#c9a0ff);color:#2a1830;border:none;border-radius:999px;box-shadow:0 3px 10px rgba(255,170,200,.3)}
.mt-wrap .dx-back{z-index:20;text-shadow:0 1px 6px rgba(0,0,0,.5)}

/* ===================== v167 两人小屋 · 睡眠闭环/碎碎念/行走 ===================== */
.coz3-stage{position:relative}
.coz3-sleepmask{position:absolute;inset:0;z-index:8;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;background:radial-gradient(120% 100% at 50% 30%,rgba(16,18,46,.72),rgba(8,10,28,.9));backdrop-filter:blur(3px);-webkit-backdrop-filter:blur(3px);animation:coz3-fadein 1.2s ease}
.coz3-sleepmask[hidden]{display:none}
.coz3-sleepmask .ms-txt{font-size:30px;letter-spacing:14px;color:#f2e9ff;text-shadow:0 2px 18px rgba(180,160,255,.6);text-indent:14px}
.coz3-sleepmask .ms-sub{font-size:12px;color:rgba(226,216,250,.65);letter-spacing:2px}
.coz3-sleepmask .btn{margin-top:14px;background:rgba(255,255,255,.12);border:1px solid rgba(255,255,255,.28);color:#f2e9ff;border-radius:999px;padding:8px 22px}
@keyframes coz3-fadein{from{opacity:0}to{opacity:1}}
.coz3-fab button{position:relative}
#coz3-mbadge{position:absolute;top:-4px;right:-4px;min-width:16px;height:16px;padding:0 4px;border-radius:999px;background:#E84A7F;color:#fff;font-size:10px;font-style:normal;line-height:16px;text-align:center;box-shadow:0 2px 6px rgba(232,74,127,.5)}
#coz3-mbadge[hidden]{display:none}
.msheet{padding:4px 2px 8px}
.ms-title{font-size:16px;font-weight:700;color:#3a2a3a;letter-spacing:1px}
.ms-sub{font-size:11px;color:#9a8aa0;margin:4px 0 12px}
.mrow{display:flex;align-items:baseline;gap:10px;padding:9px 4px;border-bottom:1px dashed rgba(120,90,110,.18)}
.mrow i{font-style:normal;font-size:11px;color:#b090b8;font-family:ui-monospace,monospace;flex:none}
.mrow span{font-size:13px;color:#4a3a48;line-height:1.6}
.mempty{padding:26px 0;text-align:center;color:#b0a0b0;font-size:12px}
.coz3-bubble{max-width:62%;white-space:normal;word-break:break-word}


/* ---------- v167 日历 cv2 · 周计划 ---------- */
#app-body:has(.cv2) { background: linear-gradient(180deg, #F4F2EE 0%, #ECE9E4 100%); }
.cv2 { min-height: 100%; padding-bottom: 110px; position: relative; }
.cv2-hero { padding: 22px 22px 4px; display: flex; align-items: flex-end; justify-content: space-between; }
.cv2-hero .cv2-title b { display: block; font-family: var(--font-display); font-size: 30px; font-weight: 800; letter-spacing: -.01em; color: #22222A; }
.cv2-hero .cv2-title span { display: block; font-family: Georgia, serif; font-size: 10px; letter-spacing: .38em; color: #9A97A8; text-transform: uppercase; margin-top: 4px; }
.cv2-avatars { display: flex; }
.cv2-avatars .cav { width: 34px; height: 34px; border-radius: 50%; border: 2.5px solid #fff; display: flex; align-items: center; justify-content: center; font-size: 16px; margin-left: -9px; box-shadow: 0 3px 8px rgba(60,60,90,.14); background: #fff; }
.cv2-weekrow { display: flex; align-items: center; padding: 18px 16px 0; gap: 6px; }
.cv2-weekrow .wk-nav { width: 32px; height: 32px; border-radius: 50%; border: none; background: rgba(255,255,255,.85); box-shadow: 0 2px 8px rgba(60,60,90,.1); font-size: 14px; color: #55555F; cursor: pointer; flex-shrink: 0; }
.cv2-week { flex: 1; display: flex; justify-content: space-between; }
.cv2-day { flex: 1; border: none; background: none; cursor: pointer; text-align: center; padding: 7px 0 9px; border-radius: 16px; position: relative; }
.cv2-day i { display: block; font-style: normal; font-size: 9.5px; letter-spacing: .14em; color: #9A97A8; }
.cv2-day u { display: inline-flex; text-decoration: none; width: 30px; height: 30px; margin-top: 4px; border-radius: 50%; align-items: center; justify-content: center; font-size: 14px; font-weight: 600; color: #33333C; font-variant-numeric: tabular-nums; }
.cv2-day.today u { background: #22222A; color: #fff; box-shadow: 0 6px 14px rgba(34,34,42,.3); }
.cv2-day.sel:not(.today) u { background: rgba(34,34,42,.09); }
.cv2-day .has { position: absolute; left: 50%; bottom: 4px; transform: translateX(-50%); width: 4px; height: 4px; border-radius: 50%; background: #C9894A; }
.cv2-count { margin: 16px 20px 0; background: rgba(255,255,255,.8); border-radius: 18px; padding: 14px 18px; display: flex; align-items: center; box-shadow: 0 6px 16px rgba(60,60,90,.07); }
.cv2-count .n { font-family: var(--font-display); font-size: 26px; font-weight: 800; color: #22222A; }
.cv2-count .t { margin-left: 12px; font-size: 11px; letter-spacing: .2em; color: #9A97A8; }
.cv2-count .t b { display: block; font-size: 12.5px; letter-spacing: .1em; color: #55555F; font-weight: 600; }
.cv2-count .mtg { margin-left: auto; border: none; background: none; cursor: pointer; font-size: 10.5px; letter-spacing: .16em; color: #8A87A0; padding: 6px 2px; }
.cv2-agenda { padding: 14px 20px 0; }
.cv2-daytag { font-family: Georgia, serif; font-size: 10px; letter-spacing: .3em; color: #9A97A8; text-transform: uppercase; margin: 4px 2px 12px; display: flex; align-items: center; gap: 10px; }
.cv2-daytag::after { content: ""; flex: 1; height: .5px; background: rgba(60,60,90,.1); }
.cv2-ev { display: flex; gap: 13px; background: rgba(255,255,255,.88); border-radius: 18px; padding: 14px 16px; margin-bottom: 10px; box-shadow: 0 5px 14px rgba(60,60,90,.06); align-items: flex-start; position: relative; overflow: hidden; }
.cv2-ev::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3.5px; background: var(--ev-c, #8A87D0); }
.cv2-ev .tm { flex-shrink: 0; font-variant-numeric: tabular-nums; font-size: 12.5px; font-weight: 700; color: #22222A; background: rgba(34,34,42,.05); border-radius: 10px; padding: 6px 10px; letter-spacing: .03em; }
.cv2-ev .tx { flex: 1; min-width: 0; font-size: 13.5px; line-height: 1.65; color: #33333C; padding-top: 5px; }
.cv2-ev .del { border: none; background: none; color: #C6C4D0; font-size: 15px; cursor: pointer; padding: 4px; }
.cv2-empty { text-align: center; padding: 34px 20px; color: #B0AEBE; font-size: 12px; letter-spacing: .14em; line-height: 2.1; }
.cv2-fab { position: sticky; bottom: 24px; margin: -80px 20px 24px auto; width: 56px; height: 56px; border-radius: 50%; border: none; background: #22222A; color: #fff; font-size: 24px; cursor: pointer; box-shadow: 0 12px 28px rgba(34,34,42,.35); z-index: 9; transition: transform .18s; display: flex; align-items: center; justify-content: center; }
.cv2-fab:active { transform: scale(.88) rotate(90deg); }
.cv2-monthwrap { margin: 14px 20px 0; background: rgba(255,255,255,.85); border-radius: 20px; padding: 14px 12px 16px; box-shadow: 0 6px 16px rgba(60,60,90,.07); }
.cv2-monthwrap .cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.cv2-monthwrap .cal-grid .cw { font-size: 9px; color: #B0AEBE; letter-spacing: .1em; padding: 4px 0; }
.cv2-monthwrap .cal-grid .cd { border: none; background: none; font-size: 12.5px; color: #44444E; padding: 7px 0; border-radius: 50%; cursor: pointer; position: relative; font-variant-numeric: tabular-nums; }
.cv2-monthwrap .cal-grid .cd.dim { color: #CFCEDA; }
.cv2-monthwrap .cal-grid .cd.today { background: #22222A; color: #fff; font-weight: 700; }
.cv2-monthwrap .cal-grid .cd.sel:not(.today) { background: rgba(34,34,42,.09); }
.cv2-monthwrap .cal-grid .cd .has { position: absolute; left: 50%; bottom: 3px; transform: translateX(-50%); width: 4px; height: 4px; border-radius: 50%; background: #C9894A; }
.cv2-monthwrap .cal-grid .cd.today .has { background: #E8B86D; }

/* ---------- ④ 世界书 v2 · 档案卷宗 ---------- */
#app-body.wba-root { background: #F2EFE8; }
.wba { min-height: 100%; padding-bottom: 108px; background-image: linear-gradient(rgba(90,80,60,.045) 1px, transparent 1px), linear-gradient(90deg, rgba(90,80,60,.045) 1px, transparent 1px); background-size: 26px 26px; position: relative; }
.wba-head { padding: 24px 22px 6px; display: flex; align-items: baseline; gap: 12px; }
.wba-head b { font-family: var(--font-display); font-size: 27px; font-weight: 800; letter-spacing: .06em; color: #1E1C18; }
.wba-head span { font-family: Georgia, serif; font-size: 10px; letter-spacing: .4em; color: #A39880; text-transform: uppercase; }
.wba-pills { display: flex; gap: 8px; padding: 12px 20px 4px; overflow-x: auto; }
.wba-pill { display: inline-flex; align-items: center; gap: 7px; border: 1px solid #1E1C18; background: #1E1C18; color: #F2EFE8; border-radius: 20px; padding: 8px 15px; font-size: 12px; letter-spacing: .06em; white-space: nowrap; }
.wba-pill .tg { font-size: 11px; opacity: .8; }
.wba-pill i { font-style: normal; font-family: Georgia, serif; font-size: 9px; letter-spacing: .14em; opacity: .65; }
.wba-add { border: 1px dashed #A39880; color: #6E6650; background: none; border-radius: 20px; padding: 8px 15px; font-size: 12px; cursor: pointer; white-space: nowrap; }
.wba-cards { padding: 14px 18px 0; columns: 1; }
.wba-card { background: #FBF9F3; border: 1px solid rgba(90,80,60,.18); border-radius: 6px; padding: 16px 16px 12px; margin-bottom: 14px; box-shadow: 0 4px 0 rgba(90,80,60,.08), 0 10px 22px rgba(90,80,60,.08); position: relative; break-inside: avoid; }
.wba-card::before { content: ""; position: absolute; top: -8px; left: 50%; transform: translateX(-50%) rotate(-1.5deg); width: 64px; height: 16px; background: rgba(196,178,130,.4); border-radius: 1px; }
.wba-card .wh-top { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.wba-card .wh-ref { font-family: Georgia, serif; font-size: 9px; letter-spacing: .18em; color: #A39880; }
.wba-card .wh-keys { display: flex; flex-wrap: wrap; gap: 5px; flex: 1; }
.wba-card .wh-key { font-size: 10px; letter-spacing: .1em; color: #7A2E2E; border: .5px solid rgba(122,46,46,.45); border-radius: 3px; padding: 2.5px 7px; background: rgba(122,46,46,.05); }
.wba-card .wh-text { font-size: 13px; line-height: 1.9; color: #33302A; white-space: pre-wrap; }
.wba-card .wh-foot { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding-top: 10px; border-top: .5px dashed rgba(90,80,60,.3); }
.wba-barcode { flex: 1; height: 22px; background: repeating-linear-gradient(90deg, #2A2822 0 2px, transparent 2px 4px, #2A2822 4px 5px, transparent 5px 9px, #2A2822 9px 12px, transparent 12px 14px); opacity: .8; }
.wba-card .wh-del { border: .5px solid rgba(122,46,46,.5); background: none; color: #7A2E2E; font-size: 10px; letter-spacing: .18em; padding: 4px 10px; cursor: pointer; border-radius: 2px; }
.wba-char { background: #1E1C18; color: #EDE8DB; border: none; }
.wba-char::before { background: rgba(196,178,130,.55); }
.wba-char .wh-top { align-items: center; }
.wba-char .wc-av { width: 52px; height: 52px; border-radius: 4px; background: rgba(237,232,219,.1); border: 1px solid rgba(237,232,219,.25); display: flex; align-items: center; justify-content: center; font-size: 27px; }
.wba-char .wc-nm b { display: block; font-size: 16px; letter-spacing: .18em; }
.wba-char .wc-nm span { display: block; font-family: Georgia, serif; font-size: 8.5px; letter-spacing: .3em; color: rgba(237,232,219,.45); margin-top: 4px; text-transform: uppercase; }
.wba-char .wh-text { color: rgba(237,232,219,.8); }
.wba-char .wh-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
.wba-char .wh-tags u { text-decoration: none; font-size: 10px; letter-spacing: .1em; color: #D8C89A; border: .5px solid rgba(216,200,154,.4); padding: 2.5px 8px; border-radius: 3px; }
.wba-char .wh-foot { border-top-color: rgba(237,232,219,.2); }
.wba-char .wba-barcode { background: repeating-linear-gradient(90deg, #EDE8DB 0 2px, transparent 2px 4px, #EDE8DB 4px 5px, transparent 5px 9px, #EDE8DB 9px 12px, transparent 12px 14px); opacity: .55; }
.wba-empty { text-align: center; padding: 52px 30px; color: #A39880; font-size: 12px; letter-spacing: .16em; line-height: 2.3; }
.wba-empty .stamp { display: inline-block; border: 1.5px solid rgba(122,46,46,.5); color: #7A2E2E; border-radius: 4px; padding: 6px 16px; font-size: 13px; letter-spacing: .34em; transform: rotate(-4deg); margin-bottom: 16px; }
.wba-actions { position: sticky; bottom: 0; margin: -70px 0 0; display: flex; gap: 10px; padding: 12px 18px 26px; background: linear-gradient(180deg, transparent, #F2EFE8 34%); }
.wba-actions button { flex: 1; border: none; cursor: pointer; border-radius: 4px; padding: 14px 0; font-size: 12.5px; letter-spacing: .3em; font-weight: 700; }
.wba-actions .act-create { background: #1E1C18; color: #F2EFE8; box-shadow: 0 8px 20px rgba(30,28,24,.28); }
.wba-actions .act-gen { background: #FBF9F3; color: #1E1C18; border: 1px solid rgba(30,28,24,.55) !important; }
/* 世界书所在超级应用壳：底栏一并卷宗化 */
#app-body.tabbed:has(.wba) { background: #F2EFE8; }
.wx-page:has(.wba) { background: #F2EFE8; }

/* ===================== v179.60 世界书 · 人物设定模块 ===================== */
.wba-card .wh-edit { margin-left: auto; flex-shrink: 0; border: 1px solid rgba(30,28,24,.5); background: none; color: #1E1C18; font-size: 11px; letter-spacing: .06em; padding: 5px 10px; cursor: pointer; border-radius: 3px; }
.wba-char .wh-edit { color: #EDE8DB; border-color: rgba(237,232,219,.45); }
.wba-card .wh-sub { font-size: 12px; line-height: 1.8; color: #6E6650; margin-top: 8px; }
.wba-card .wh-sub em { font-style: normal; display: inline-block; font-size: 9px; letter-spacing: .16em; color: #A39880; margin-right: 6px; }
.wba-char .wh-sub { color: rgba(237,232,219,.72); }
.wba-char .wh-sub em { color: #D8C89A; }
.wba-card .wh-empty { font-size: 12px; color: #A39880; letter-spacing: .06em; margin: 0; }
.wba-char .wh-empty { color: rgba(237,232,219,.45); }
.wh-cat-title { display: flex; align-items: center; gap: 8px; font-size: 12px; letter-spacing: .3em; color: #7A2E2E; margin: 6px 4px 8px; font-weight: 700; }
.wh-cat-title i { font-style: normal; font-family: Georgia, serif; font-size: 9px; color: #A39880; letter-spacing: .1em; }

/* ===================== v167.1 见面 · 夜间可读性修正 ===================== */
.mt-night{background:linear-gradient(180deg,rgba(14,18,52,.48),rgba(8,10,30,.38))}
.mt-sprite{opacity:.62;filter:brightness(.88)}
.mt-sprite.on{opacity:1;filter:none}
.mt-sprite.on::after{content:'';position:absolute;left:-32%;right:-32%;top:-12%;bottom:-6%;background:radial-gradient(52% 52% at 50% 64%,rgba(255,238,214,.26),transparent 72%);z-index:-1;pointer-events:none;border-radius:50%}

/* ===================== v168 两人小屋 · 3D 粉屿小屋 iframe 壳 ===================== */
.coz4-wrap{display:flex;flex-direction:column}
.coz4-stage{flex:1;position:relative;overflow:hidden;background:#f6e3ec}
.coz4-frame{position:absolute;inset:0;width:100%;height:100%;border:0;display:block}

/* ===================== v167.2 见面 · 旁白层显隐修正 + 背景尺寸修正 ===================== */
.mt-narr{opacity:0;pointer-events:none;animation:none}
.mt-narr.show{opacity:1}
.mt-narr:empty{display:none}
.mt-bg.mt-cafe,.mt-bg.mt-home,.mt-bg.mt-rain,.mt-bg.mt-school,.mt-bg.mt-sea{background-size:cover;background-position:center}

/* ===================== v167.3 见面 · 立绘替换 ===================== */
.mt-portrait{width:100%;display:block;filter:drop-shadow(0 10px 22px rgba(16,6,18,.5))}
.mt-sprite{overflow:visible}
.mt-sprite svg{display:none}

/* ===================== v157.1 见面移植自 C：布局修正 + 约会引擎 ===================== */
.mt-stage { min-height: 320px; }
.mt-sprite.ai { left: 0 !important; width: 52% !important; bottom: 0 !important; }
.mt-sprite.user { right: 0 !important; left: auto !important; width: 52% !important; bottom: 0 !important; z-index: 7; }
.mt-portrait { object-fit: cover; object-position: center top; }
/* v179.80 单立绘切帧：谁说话谁出镜（另一方完全退场），半身大图侧位适配竖屏
   说话者侧位 68% 宽 × 27vh 高裁切窗，图片放大到 50vh 顶对齐，
   露出「头顶→腰部」约 54% 区域；非说话者 opacity:0 完全隐藏 ——
   竖屏不再出现两人重叠的"人鬼情未了"，也放得下 */
.mt-sprite.ai, .mt-sprite.user { width: 68% !important; max-width: none !important; height: 27vh; overflow: hidden;
  opacity: 0; transition: opacity .38s ease; }
.mt-sprite.ai { left: 0 !important; }
.mt-sprite.user { right: 0 !important; left: auto !important; z-index: 7; }
.mt-sprite.ai img.mt-portrait, .mt-sprite.user img.mt-portrait {
  width: auto; height: 50vh; max-height: none; max-width: none;
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
}
.mt-sprite:not(.on) { pointer-events: none; }
.mt-sprite { opacity: 0; filter: saturate(1.05) drop-shadow(0 10px 18px rgba(16,6,18,.42)); }
.mt-sprite.on { opacity: 1; filter: brightness(1.06) saturate(1.1) drop-shadow(0 12px 22px rgba(16,6,18,.5)); }
.mt-sprite.on::after { content: ''; position: absolute; left: -26%; right: -26%; top: -10%; bottom: -4%; background: radial-gradient(52% 52% at 50% 62%, rgba(255,240,216,.30), transparent 72%); z-index: -1; pointer-events: none; border-radius: 50%; }
.mt-night { background: linear-gradient(180deg, rgba(14,18,52,.38), rgba(8,10,30,.28)); }
.mt-vignette { background: radial-gradient(130% 96% at 50% 44%, transparent 66%, rgba(8,5,14,.34)); }
.mt-dialog { background: linear-gradient(180deg, rgba(43,32,56,.94), rgba(26,19,36,.97)); border-top: 1px solid rgba(255,255,255,.22); padding-top: 20px; }
#mt-dlg-name { background: linear-gradient(135deg,#6d4a8f,#3a2854); color: #ffe9f4; font-size: 12px; padding: 5px 16px; border: 1px solid rgba(255,255,255,.35); }
#mt-dlg { color: #faf3fd; font-size: 14.5px; text-shadow: 0 1.5px 5px rgba(0,0,0,.7); }
.mt-scenes { background: linear-gradient(180deg, rgba(36,27,46,.92), rgba(22,16,30,.96)); }
.mt-scenes button { color: #e3d6ee; }
.meet-actions { background: rgba(32,24,42,.92); border-color: rgba(255,255,255,.16); }
.meet-actions .btn { color: #f0e6f8; }
.mt-input input { color: #f5eef9; }
.mt-date-btn { background: linear-gradient(135deg, #ffd9e8, #d8c6ff) !important; color: #4a2a54 !important; font-weight: 700; border-color: transparent !important; box-shadow: 0 3px 12px rgba(255,170,200,.4); }
.mt-dateplan { margin: 8px 14px 0; padding: 9px 14px; background: linear-gradient(135deg, rgba(255,217,232,.95), rgba(216,198,255,.92)); border-radius: 14px; font-size: 12.5px; color: #4a2a54; cursor: pointer; box-shadow: 0 4px 14px rgba(200,120,200,.35); animation: mtDlgIn .4s ease; }
.mt-dateplan b { color: #8a2a5a; }
.mt-dateplan:active { transform: scale(.98); }
.mt-datewrap { position: fixed; inset: 0; z-index: 400; display: flex; flex-direction: column; transform: translateY(102%); transition: transform var(--dur-slow) var(--ease-out); }
.mt-datewrap.show { transform: translateY(0); }
.mt-datestage { position: relative; flex: 1 1 auto; overflow: hidden; background: #14101c; cursor: pointer; }
.mt-datestage::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,8,20,.06) 50%, rgba(10,8,20,.5) 92%); pointer-events: none; }
.dt-top { position: absolute; top: 0; left: 0; right: 0; z-index: 3; display: flex; justify-content: space-between; align-items: center; padding: calc(var(--sb-h) + 8px) 14px 10px; background: linear-gradient(180deg, rgba(10,8,20,.55), transparent); }
.dt-top b { color: #ffd9e8; font-size: 14px; letter-spacing: 1px; text-shadow: 0 1px 6px rgba(0,0,0,.6); }
.dt-top button { background: rgba(255,255,255,.16); color: #fff; border: none; border-radius: 999px; padding: 5px 14px; font-size: 12px; cursor: pointer; backdrop-filter: blur(6px); }
.dt-bottom { position: absolute; left: 10px; right: 10px; bottom: 12px; z-index: 3; background: linear-gradient(180deg, rgba(26,18,34,.88), rgba(13,9,21,.94)); border: 1px solid rgba(255,255,255,.18); border-radius: 16px; padding: 14px 16px 12px; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); min-height: 64px; }
#dt-who { position: absolute; top: -12px; left: 14px; background: linear-gradient(135deg, #6d4a8f, #3a2854); color: #ffe9f4; font-size: 11px; padding: 4px 14px; border-radius: 999px; border: 1px solid rgba(255,255,255,.25); letter-spacing: 1px; }
#dt-dlg { color: #f8f1fc; font-size: 14px; line-height: 1.85; letter-spacing: .3px; display: block; }
#dt-next { color: #ffd9e8; position: absolute; right: 14px; bottom: 10px; animation: mt-bob 1s ease-in-out infinite; }
.dt-hint { position: absolute; right: 14px; bottom: 96px; z-index: 3; font-size: 10.5px; color: rgba(255,255,255,.85); background: rgba(10,8,20,.5); backdrop-filter: blur(6px); padding: 4px 11px; border-radius: 999px; }
.dt-input { flex: 0 0 auto; display: flex; gap: 8px; padding: 10px 12px; background: rgba(13,10,19,.94); border-top: 1px solid rgba(255,255,255,.12); }
.dt-input input { flex: 1; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16); border-radius: 999px; padding: 9px 16px; color: #f5eef9; font-size: 13.5px; outline: none; }
.dt-input .btn { border-radius: 999px; padding: 0 18px; }

/* ===================== v157.1 见面移植自 C：布局修正 + 约会引擎 ===================== */
.mt-stage { min-height: 320px; }
/* ===================== v179.7 见面 · 沉浸感层 =====================
   放在文件末尾，靠源码顺序压过前面那三代叠着的 .mt-* 规则。
   （v179.7 顺手删掉了 38 行【逐字节重复粘贴】的 v167.1 见面块。）
   --------------------------------------------------------------- */

/* ---------- 台词记录条 ----------
   原来只有 .mt-dialog 这一行，上一句说完就消失，整个见面像老虎机。
   这里在舞台和对话框之间给一条可滚动的记录：新句在最下面、旧句压暗，
   往上翻还能看到刚才说了什么。 */
.mt-transcript {
  flex: 0 1 auto; min-height: 0; max-height: 28vh;
  overflow-y: auto; overscroll-behavior: contain;
  padding: 12px 16px 4px;
  display: flex; flex-direction: column; gap: 7px;
  background: linear-gradient(180deg, rgba(12,8,18,0), rgba(12,8,18,.32) 42%);
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 24px);
  mask-image: linear-gradient(180deg, transparent 0, #000 24px);
}
.mt-transcript::-webkit-scrollbar { width: 0; }
.mt-line {
  font-size: 12.5px; line-height: 1.66; color: rgba(238,228,248,.72);
  animation: mtLineIn .34s var(--ease-out) both;
  overflow-wrap: anywhere; flex: 0 0 auto;
}
/* 越靠上的越淡，做出"往回忆里沉"的感觉 */
.mt-line:nth-child(1) { opacity: .2; }
.mt-line:nth-child(2) { opacity: .3; }
.mt-line:nth-child(3) { opacity: .42; }
.mt-line:nth-child(4) { opacity: .55; }
.mt-line:nth-last-child(2) { opacity: .82; }
.mt-line b {
  display: inline-block; margin-right: 7px; padding: 1px 7px;
  border-radius: 999px; font-size: 10.5px; font-weight: 700;
  background: rgba(255,255,255,.1); color: rgba(255,255,255,.72);
  vertical-align: 1px;
}
.mt-line.ai b { background: linear-gradient(135deg,#ffb3c8,#c9a0ff); color: #2a1830; }
.mt-line.me  { color: rgba(226,236,255,.74); }
.mt-line.me b { background: rgba(160,196,255,.22); color: #d8e6ff; }
.mt-line.n {
  color: rgba(214,198,232,.66); font-style: italic; font-size: 12px;
  padding-left: 9px; border-left: 2px solid rgba(255,190,215,.28);
}
.mt-line.n b { display: none; }
@keyframes mtLineIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }

/* ---------- 定场字幕 ----------
   进场景先把画面交代清楚（时间、地点、气味），再淡出交给对话。
   这是让"读文字"变成"到现场"最省力的一步。 */
.mt-cap {
  position: absolute; left: 0; right: 0; top: 17%; z-index: 7;
  display: flex; flex-direction: column; align-items: center; gap: 9px;
  padding: 0 26px; text-align: center; pointer-events: none;
  opacity: 0; transition: opacity .8s ease, transform .8s ease;
  transform: translateY(8px);
}
.mt-cap.show { opacity: 1; transform: none; }
.mt-cap b {
  font-size: 15px; font-weight: 700; letter-spacing: .32em; text-indent: .32em;
  color: #ffe4ee; text-shadow: 0 2px 14px rgba(0,0,0,.9), 0 0 26px rgba(255,180,210,.4);
}
.mt-cap b::before, .mt-cap b::after {
  content: ''; display: inline-block; vertical-align: middle;
  width: 22px; height: 1px; margin: 0 12px;
  background: linear-gradient(90deg, transparent, rgba(255,220,236,.75));
}
.mt-cap b::after { background: linear-gradient(270deg, transparent, rgba(255,220,236,.75)); }
.mt-cap span {
  font-size: 12.5px; line-height: 1.85; letter-spacing: .04em;
  color: rgba(248,236,248,.82); text-shadow: 0 1px 10px rgba(0,0,0,.95);
}

/* ---------- 说话人镜头 ----------
   谁说话谁轻微推近。用独立的 scale 属性而不是 transform ——
   .mt-sprite 上有 mt-breathe 动画在写 transform，
   写 transform 会被动画整个覆盖掉（独立属性先于 transform 合成）。 */
.mt-sprite { transition: scale .55s var(--ease-out), opacity .45s ease, filter .45s ease; }
.mt-stage.speak-ai   .mt-sprite.ai   { scale: 1.055; }
.mt-stage.speak-user .mt-sprite.user { scale: 1.055; }
.mt-stage.speak-ai   .mt-sprite.user { scale: .965; }
.mt-stage.speak-user .mt-sprite.ai   { scale: .965; }
.mt-stage.speak-ai   .mt-sprite.ai::after,
.mt-stage.speak-user .mt-sprite.user::after { opacity: 1; }
/* 说话时舞台整体再暗一点点，把注意力收到那个人身上 */
.mt-stage::after {
  content: ''; position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background: radial-gradient(76% 62% at 50% 52%, transparent 52%, rgba(8,4,14,.42));
  opacity: 0; transition: opacity .55s ease;
}
.mt-stage.speak-ai::after, .mt-stage.speak-user::after { opacity: 1; }

/* ---------- 环境音开关 ---------- */
.mt-amb {
  flex: 0 0 auto; width: 34px; height: 34px; align-self: center;
  border-radius: 50%; border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.07); color: #e6d8f0;
  font-size: 15px; line-height: 1; cursor: pointer; transition: all .18s;
}
.mt-amb:active { transform: scale(.9); }
.mt-amb.off { opacity: .48; }

/* ===================== v179.8 两人小屋 · 房屋 HUD + 扩建 =====================
   --------------------------------------------------------------- */

/* ---------- 房屋状态条 ----------
   原来这个位置是「和你一起住：🙂阿深 🙂凌子」一行（已删）。
   现在放真正有用的信息：房子多大 / 扩建到哪 / 现在在哪间。 */
.coz3-hud {
  flex: 0 0 auto; padding: 8px 12px 6px;
  background: linear-gradient(180deg, #fff4f7, #ffe9f0);
  border-bottom: 1px solid rgba(214, 148, 172, .22);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.coz3-wrap.night .coz3-hud {
  background: linear-gradient(180deg, rgba(38,32,60,.96), rgba(26,21,44,.96));
  border-bottom-color: rgba(255,255,255,.08);
}

.coz3-hud-top { display: flex; align-items: center; gap: 8px; }
.coz3-house {
  flex: 0 0 auto; display: inline-flex; align-items: baseline; gap: 5px;
  border: 1px solid rgba(214,148,172,.32); background: rgba(255,255,255,.72);
  color: #a8526f; font-size: 13px; font-weight: 700; letter-spacing: .02em;
  padding: 4px 11px; border-radius: 999px; cursor: pointer; transition: all .18s;
}
.coz3-house b { font-size: 10.5px; font-weight: 700; opacity: .62; letter-spacing: .06em; }
.coz3-house:active { transform: scale(.94); }
.coz3-wrap.night .coz3-house {
  background: rgba(255,255,255,.08); color: #ffd6e4; border-color: rgba(255,255,255,.16);
}

/* 扩建进度条：极细一条，不喧宾夺主 —— 它是状态，不是装饰 */
.coz3-xpwrap {
  flex: 1 1 auto; min-width: 40px; height: 4px; border-radius: 999px;
  background: rgba(180,130,150,.2); overflow: hidden;
}
.coz3-xpwrap i {
  display: block; height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, #ffb3c8, #c9a0ff);
  transition: width .6s var(--ease-out);
}
.coz3-wrap.night .coz3-xpwrap { background: rgba(255,255,255,.12); }

.coz3-xptxt {
  flex: 0 0 auto; font-size: 10.5px; color: #b08095; white-space: nowrap;
  max-width: 44%; overflow: hidden; text-overflow: ellipsis;
}
.coz3-wrap.night .coz3-xptxt { color: rgba(230,214,240,.62); }

/* ---------- 房间切换 ---------- */
.coz3-roombar { display: flex; gap: 6px; margin-top: 7px; overflow-x: auto; }
.coz3-roombar::-webkit-scrollbar { display: none; }
.coz3-room {
  flex: 0 0 auto; padding: 4px 11px; border-radius: 999px;
  border: 1px solid rgba(214,148,172,.24); background: rgba(255,255,255,.55);
  color: #9c6478; font-size: 11.5px; font-weight: 600; cursor: pointer;
  white-space: nowrap; transition: all .18s;
}
.coz3-room.on {
  background: linear-gradient(135deg, #f0a8c0, #c9a0ff);
  color: #fff; border-color: transparent;
  box-shadow: 0 2px 8px rgba(200,140,190,.35);
}
.coz3-room:not(.on):active { transform: scale(.94); }
.coz3-wrap.night .coz3-room {
  background: rgba(255,255,255,.07); color: rgba(230,214,240,.66);
  border-color: rgba(255,255,255,.12);
}
.coz3-wrap.night .coz3-room.on {
  background: linear-gradient(135deg, #8a78b8, #b07fd0);
  box-shadow: 0 2px 8px rgba(138,120,184,.4);
}

/* ---------- FAB 里扩建解锁的「一起做的事」 ---------- */
.coz3-act {
  position: relative; width: 46px; height: 46px; border-radius: 50%;
  border: 1.5px solid rgba(240,168,192,.4); background: rgba(255,255,255,.8);
  font-size: 19px; line-height: 1; cursor: pointer;
  box-shadow: 0 3px 10px rgba(200,140,170,.22);
  transition: transform .18s;
}
.coz3-act:active { transform: scale(.9); }
.coz3-wrap.night .coz3-act {
  background: rgba(40,34,64,.8); border-color: rgba(255,255,255,.14);
  box-shadow: 0 3px 10px rgba(0,0,0,.3);
}

/* ---------- 扩建面板 ---------- */
.xz-row {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 2px; border-bottom: 1px solid rgba(160,130,145,.14);
  opacity: .55;
}
.xz-row.got { opacity: 1; }
.xz-row.next {
  opacity: 1; border-radius: 12px;
  background: linear-gradient(135deg, rgba(255,217,232,.6), rgba(216,198,255,.5));
}
.xz-lv {
  flex: 0 0 auto; min-width: 34px; text-align: center;
  font-size: 11px; font-weight: 700; letter-spacing: .04em;
  padding: 3px 0; border-radius: 8px;
  background: rgba(255,255,255,.6); color: #a8526f;
}
.xz-body { flex: 1 1 auto; min-width: 0; }
.xz-body b { display: block; font-size: 13.5px; font-weight: 700; color: #6d4257; }
.xz-body small { display: block; margin-top: 2px; font-size: 11px; color: #a8829a; }
.xz-rooms { display: inline-block; margin-left: 6px; font-size: 11px; letter-spacing: .1em; }
.xz-mark { flex: 0 0 auto; width: 22px; text-align: center; font-size: 13px; color: #c78aa4; }
.xz-row.got .xz-mark { color: #6fbf8f; }
.xz-row.next .xz-mark { color: #c86fa8; }
.xz-ways { margin-top: 12px; padding-top: 10px; border-top: 1px solid rgba(160,130,145,.16); }
.xz-ways b { display: block; font-size: 12px; color: #6d4257; margin-bottom: 5px; }
.xz-ways span { display: block; font-size: 11.5px; line-height: 1.75; color: #a8829a; }

/* ===================== v179.10 商城 · 商品图标（描边 SVG，不用 emoji） =====================
   LineIcon.svg() 输出的 <svg> 只有 viewBox，没有 width/height ——
   不给尺寸会退化成 300×150，把整行 list-row 撑爆。这些是唯一需要补尺寸的地方。
   --------------------------------------------------------------- */

/* 商品图标：.lr-ico 原本是 30px 宽 + 20px 字号来放 emoji，现在装 22px 的线稿 */
.list-row .lr-ico > svg {
  width: 22px; height: 22px;
  display: block; margin: 0 auto;      /* .lr-ico 是 flex 项，auto 居中 */
  color: var(--accent);
}

/* 标题栏的购物袋 */
.grid-pad.row-flex > b > svg {
  width: 16px; height: 16px;
  display: inline-block; vertical-align: -3px; margin-right: 6px;
  color: var(--accent);
}

/* 金币角标：原来是 🪙 emoji，现在是一枚双环币 + 数字 */
.cub-coin {
  display: inline-flex; align-items: center; gap: 4px;
}
.cub-coin > svg { width: 12px; height: 12px; flex: 0 0 auto; color: currentColor; }

/* 右侧价格位 / 已拥有对勾 */
.list-row .lr-value > svg { width: 15px; height: 15px; flex: 0 0 auto; }
.list-row .lr-value > svg[data-owned] { color: #6fbf8f; }

/* ===================== v179.11 爸爸的卡片 ===================== */

/* 卡片行：比普通 list-row 更"纸"一点 —— 它是张便条，不是一条商品 */
.list-row.cub-card {
  background: linear-gradient(135deg, rgba(255,252,244,.9), rgba(255,246,232,.9));
  border: 1px dashed rgba(176,112,56,.34);
  border-radius: 12px;
  margin: 6px 14px;
  padding: 2px 4px;
}
.list-row.cub-card .lr-title { font-size: 14.5px; line-height: 1.7; color: #6d4a30; }
.list-row.cub-card .lr-title small { color: #a98a6a; font-size: 11px; }
/* 折角阴影，暗示"塞在东西里" */
.list-row.cub-card::after {
  content: ''; position: absolute; right: 0; bottom: 0;
  border-width: 0 0 10px 10px; border-style: solid;
  border-color: transparent transparent rgba(176,112,56,.13) transparent;
  border-bottom-right-radius: 12px;
}
.list-row.cub-card { position: relative; }

/* 商城 notice 现在是两句话（妈妈一行、爸爸一行），给点行距 */
.notice { line-height: 1.85; }

/* ===================== v179.12 小红书 · 真的能用了 ===================== */

/* 顶部分类下面那行：篇数 + 三个视图 + 写笔记 */
.xhs-sub {
  display: flex; align-items: center; gap: 6px;
  padding: 0 14px 8px; font-size: 11.5px; color: var(--text-3); flex-shrink: 0;
}
.xhs-sub span { flex: 0 0 auto; }
.xhs-sub button {
  flex: 0 0 auto; border: none; background: rgba(127,127,127,.12);
  color: var(--text-2); font-size: 11.5px; padding: 4px 10px;
  border-radius: 99px; cursor: pointer; transition: all .16s;
}
.xhs-sub button:active { transform: scale(.94); }
.xhs-sub button.primary {
  margin-left: auto; background: var(--accent); color: var(--accent-contrast); font-weight: 600;
}

/* 卡片：作者是"你的实例"时给个标记，让人一眼分清真人和自己人 */
/* v179.12：原来只有 margin-left，标签右边没留白，
   微博卡片里「你的实例」直接和后面的时间粘成「你的实例1:28 · 来自小手机」。 */
.xhs-inst {
  font-style: normal; color: var(--accent); font-size: 10.5px;
  margin-left: 3px; margin-right: 6px;
}
.xhs-stats { display: flex; gap: 10px; }
.xhs-stats .on { color: var(--accent); font-weight: 600; }

/* ---------- 笔记详情 ---------- */
.xhs-detail { max-height: 78vh; overflow-y: auto; overscroll-behavior: contain; padding-bottom: 8px; }
.xhd-cover {
  height: 168px; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, #ffeef3, #f3e8ff);
}
.xhd-cover b {
  font-family: Georgia, 'Songti SC', serif; font-size: 76px; font-weight: 700;
  color: rgba(255,255,255,.85); text-shadow: 0 3px 16px rgba(0,0,0,.12);
  line-height: 1; user-select: none;
}
.xhd-title { font-size: 17px; font-weight: 700; line-height: 1.45; padding: 14px 16px 0; }
.xhd-author {
  display: flex; align-items: center; gap: 7px; padding: 10px 16px 0;
  font-size: 13px; color: var(--text-2);
}
.xhd-author b { font-weight: 600; }
.xhd-inst { font-style: normal; font-size: 10.5px; color: var(--accent); }
.xhd-follow {
  margin-left: auto; border: 1px solid var(--accent); color: var(--accent);
  background: transparent; font-size: 11.5px; padding: 4px 12px;
  border-radius: 99px; cursor: pointer;
}
.xhd-body {
  padding: 12px 16px 0; font-size: 14.5px; line-height: 1.85;
  color: var(--text-1); white-space: pre-wrap; overflow-wrap: anywhere;
}
.xhd-tags {
  display: flex; gap: 10px; padding: 10px 16px 0;
  font-size: 11.5px; color: var(--text-3);
}
.xhd-tags span:first-child { color: var(--accent); }
.xhd-acts {
  display: flex; gap: 18px; padding: 12px 16px;
  border-top: 1px solid var(--divider); margin-top: 12px;
  font-size: 13px; color: var(--text-2);
}
.xhd-acts button { border: none; background: none; color: inherit; font-size: 13px; cursor: pointer; padding: 0; }
.xhd-acts button.on { color: var(--accent); font-weight: 700; }
.xhd-acts button.danger { margin-left: auto; color: #e05a7a; }

/* 评论：实例的评论要能看出来（不然分不清是真人还是 TA） */
.xhd-cmts { padding: 0 16px; max-height: 190px; overflow-y: auto; }
.xhd-cm { display: flex; gap: 8px; padding: 9px 0; border-top: 1px solid var(--divider); }
.xhd-cm:first-child { border-top: none; }
.xhd-cav { font-size: 17px; flex: 0 0 auto; }
.xhd-cm b { font-size: 12.5px; color: var(--text-2); }
/* v179.89 社媒评论区楼中楼前缀「回复 X」——跟朋友圈 .mo-cm-re 同一形态 */
.xhd-cm-re {
  font-size: 11px; font-weight: 500; color: var(--text-3);
  padding: 0 3px;
}
.xhd-cm-re + b { color: var(--text-2); font-weight: 600; }
.xhd-cm p { margin: 2px 0 0; font-size: 13.5px; line-height: 1.7; color: var(--text-1); overflow-wrap: anywhere; }
.xhd-cm.inst b::after {
  content: '你的实例'; margin-left: 6px; font-size: 10px; font-weight: 400;
  color: var(--accent); background: var(--accent-soft); padding: 1px 6px; border-radius: 99px;
}
.xhd-cempty { padding: 18px 0; text-align: center; font-size: 12.5px; color: var(--text-3); }
.xhd-input {
  position: sticky; bottom: 0; display: flex; gap: 8px;
  padding: 10px 16px; background: var(--card); border-top: 1px solid var(--divider);
}
.xhd-input input {
  flex: 1; border: 1px solid var(--divider); background: var(--bg);
  border-radius: 99px; padding: 9px 14px; font-size: 13px; color: var(--text-1); outline: none;
}
.xhd-input button {
  border: none; background: var(--accent); color: var(--accent-contrast);
  font-size: 12.5px; font-weight: 600; padding: 0 16px; border-radius: 99px; cursor: pointer;
}

/* ===================== v179.12 抖音 · 竖屏沉浸流 ===================== */
.dy-sub, .bili-sub {
  display: flex; align-items: center; gap: 6px;
  padding: 0 14px 8px; font-size: 11.5px; color: var(--text-3); flex-shrink: 0;
}
.dy-sub button, .bili-sub button {
  flex: 0 0 auto; border: none; background: rgba(127,127,127,.12);
  color: var(--text-2); font-size: 11.5px; padding: 4px 10px;
  border-radius: 99px; cursor: pointer; transition: all .16s;
}
.dy-sub button:active, .bili-sub button:active { transform: scale(.94); }
.dy-sub button.primary { margin-left: auto; background: var(--accent); color: var(--accent-contrast); font-weight: 600; }
.bili-sub .bili-wallet {
  margin-left: auto; color: #b8860b; font-weight: 700; font-size: 11.5px;
}

/* 竖屏单列：抖音的灵魂是"一屏一条" */
.dy-flow { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.dy-slide {
  position: relative; margin: 0 0 10px; border-radius: 14px; overflow: hidden;
  background: var(--card); box-shadow: var(--shadow-sm); cursor: pointer;
}
/* v179.12 限高：3/4 在这台小手机上比整屏还高，作者/文案/统计会被顶到可视区外。
   max-height 生效时宽度仍撑满，于是封面变成一块"扁一点的视频画面"，
   反而更像短视频的取景框。 */
.dy-slide-cover {
  position: relative; aspect-ratio: 3 / 4; max-height: 50vh;
  display: flex; align-items: center; justify-content: center;
}
.dy-slide-cover b {
  font-family: Georgia, 'Songti SC', serif; font-size: 72px; font-weight: 700;
  color: rgba(255,255,255,.84); text-shadow: 0 3px 16px rgba(0,0,0,.14);
  line-height: 1; user-select: none;
}
.dy-slide-dur {
  position: absolute; right: 8px; bottom: 8px; font-size: 10.5px; color: #fff;
  background: rgba(0,0,0,.5); border-radius: 5px; padding: 2px 7px;
}
.dy-slide-info { padding: 9px 12px 11px; }
.dy-slide-author { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--text-2); }
.dy-fol { font-style: normal; font-size: 10px; color: var(--accent); background: var(--accent-soft); padding: 1px 6px; border-radius: 99px; }
.dy-slide-desc {
  margin: 5px 0 0; font-size: 13px; line-height: 1.6; color: var(--text-1);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.dy-slide-stats { display: flex; gap: 12px; margin-top: 7px; font-size: 11px; color: var(--text-3); }
.dy-slide-stats .on { color: var(--accent); font-weight: 700; }

/* 视频详情 */
.dy-detail { max-height: 80vh; overflow-y: auto; overscroll-behavior: contain; }
.dyd-cover {
  position: relative; aspect-ratio: 3 / 4; max-height: 38vh;
  display: flex; align-items: center; justify-content: center;
}
.dyd-cover b {
  font-family: Georgia, 'Songti SC', serif; font-size: 88px; font-weight: 700;
  color: rgba(255,255,255,.85); line-height: 1; user-select: none;
}
.dyd-dur { position: absolute; right: 10px; bottom: 10px; font-size: 11px; color: #fff; background: rgba(0,0,0,.5); border-radius: 5px; padding: 2px 8px; }
.dyd-author { display: flex; align-items: center; gap: 7px; padding: 12px 16px 0; font-size: 13px; color: var(--text-2); }
.dyd-author button {
  margin-left: auto; border: 1px solid var(--accent); color: var(--accent);
  background: transparent; font-size: 11.5px; padding: 4px 12px; border-radius: 99px; cursor: pointer;
}
.dyd-desc { padding: 10px 16px 0; font-size: 14.5px; line-height: 1.8; color: var(--text-1); overflow-wrap: anywhere; }
.dyd-acts { display: flex; gap: 18px; padding: 12px 16px; border-top: 1px solid var(--divider); margin-top: 12px; font-size: 13px; color: var(--text-2); }
.dyd-acts button { border: none; background: none; color: inherit; font-size: 13px; cursor: pointer; padding: 0; }
.dyd-acts button.on { color: var(--accent); font-weight: 700; }
.dyd-acts button.danger { margin-left: auto; color: #e05a7a; }
.dyd-cmts { padding: 0 16px; max-height: 180px; overflow-y: auto; }

/* ===================== v179.12 B站 · 播放页 + 弹幕 + 三连 ===================== */
.bili-cover {
  position: relative; aspect-ratio: 16 / 10;
  display: flex; align-items: center; justify-content: center;
}
.bili-cover b {
  font-family: Georgia, 'Songti SC', serif; font-size: 40px; font-weight: 700;
  color: rgba(255,255,255,.84); line-height: 1; user-select: none;
}

.bili-detail { max-height: 82vh; overflow-y: auto; overscroll-behavior: contain; }
.bd-player { position: relative; background: #14101c; overflow: hidden; }
.bd-cover { position: relative; aspect-ratio: 16 / 10; display: flex; align-items: center; justify-content: center; }
.bd-cover b {
  font-family: Georgia, 'Songti SC', serif; font-size: 62px; font-weight: 700;
  color: rgba(255,255,255,.85); line-height: 1; user-select: none;
}
.bd-dur {
  position: absolute; right: 10px; bottom: 10px; z-index: 3; font-size: 11px; color: #fff;
  background: rgba(0,0,0,.5); border-radius: 5px; padding: 2px 8px;
}
/* 弹幕层：飘过去的每一行都是实时生成的，不是预录 */
/* --bdw = 弹幕层宽度（JS 每次投放前量），-100% 是弹幕自身宽度。
   原来写 -100vw，用的是整页宽，弹幕在层内就飞过头了。 */
.bd-danlayer {
  position: absolute; inset: 0; z-index: 2; pointer-events: none; overflow: hidden;
  --bdw: 100vw; font-size: 13px;
}
.bd-dan {
  position: absolute; left: 100%; white-space: nowrap;
  font-size: 1em; font-weight: 600; color: #fff;
  text-shadow: 0 1px 3px rgba(0,0,0,.95), 0 0 8px rgba(0,0,0,.6);
  animation: bdDanFly linear forwards;
}
.bd-dan.inst { color: #ffd9e8; }
@keyframes bdDanFly {
  from { transform: translateX(0); }
  to   { transform: translateX(calc(-1 * var(--bdw) - 100%)); }
}

.bd-title { padding: 12px 16px 0; font-size: 16px; font-weight: 700; line-height: 1.5; }
.bd-up { display: flex; align-items: center; gap: 7px; padding: 10px 16px 0; font-size: 12.5px; color: var(--text-2); }
.bd-up button {
  border: 1px solid var(--accent); color: var(--accent); background: transparent;
  font-size: 11.5px; padding: 4px 12px; border-radius: 99px; cursor: pointer;
}
.bd-stat { margin-left: auto; font-size: 11px; color: var(--text-3); }
.bd-intro { padding: 10px 16px 0; font-size: 13.5px; line-height: 1.8; color: var(--text-2); overflow-wrap: anywhere; }
.bd-acts { display: flex; gap: 10px; padding: 12px 16px; border-top: 1px solid var(--divider); margin-top: 12px; }
.bd-acts button {
  flex: 1; border: 1px solid var(--divider); background: var(--card);
  color: var(--text-2); font-size: 12.5px; padding: 8px 0; border-radius: 99px; cursor: pointer;
  transition: all .16s;
}
.bd-acts button.on { border-color: var(--accent); color: var(--accent); font-weight: 700; background: var(--accent-soft); }
.bd-acts button:active { transform: scale(.95); }

/* ===================== v179.12 微博 · 迁到社交引擎 ===================== */
/* 副行：条数 / 关注 / 我的 / 催 TA 更新（和 .xhs-sub 同一套语言） */
.wb-sub {
  display: flex; align-items: center; gap: 6px;
  padding: 0 14px 8px; font-size: 11.5px; color: var(--text-3); flex-shrink: 0;
}
.wb-sub button {
  flex: 0 0 auto; border: none; background: rgba(127,127,127,.12);
  color: var(--text-2); font-size: 11.5px; padding: 4px 10px;
  border-radius: 99px; cursor: pointer; transition: all .16s;
}
.wb-sub button:active { transform: scale(.94); }
.wb-sub button.on { background: var(--accent); color: var(--accent-contrast); font-weight: 600; }
.wb-sub button.primary {
  margin-left: auto; background: var(--accent); color: var(--accent-contrast); font-weight: 600;
}

/* 转发帖引用的原帖：没有它，转完就看不出在转什么 */
.wb-quote {
  margin: 6px 12px 0; padding: 7px 10px;
  background: rgba(127,127,127,.1); border-radius: 8px;
  font-size: 12.5px; line-height: 1.6; color: var(--text-3); overflow-wrap: anywhere;
}

/* 详情页：正文不截断（原列表用 line-clamp 是为了省地方，详情要能看全） */
.wb-who b { margin-right: 2px; }
.wb-who span { margin-left: 6px; }

.wb-detail { max-height: 80vh; }
.wb-detail .wb-full { white-space: pre-wrap; padding-bottom: 2px; }
.wb-detail .wb-quote { margin-left: 16px; margin-right: 16px; }

/* ===================== v179.19 锁屏游戏 + 重做的钢琴 ===================== */

/* 游戏占满锁屏：不是 sheet 弹层，是锁屏自己的一层 */
.lk-game {
  position: absolute; inset: 0; z-index: 60;
  display: flex; flex-direction: column;
  padding: calc(var(--sb-h, 24px) + 6px) 12px 12px;
  background: linear-gradient(170deg, #2b2038 0%, #1a1428 55%, #120e1e 100%);
  animation: lkGameIn .32s cubic-bezier(.2,.9,.3,1.05);
}
@keyframes lkGameIn { from { opacity: 0; transform: scale(1.03); } to { opacity: 1; transform: none; } }

.lk-game-bar {
  flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between;
  gap: 8px; padding: 2px 2px 8px;
}
.lk-game-bar b { color: #f2ecff; font-size: 15px; letter-spacing: .04em; }
.lk-game-bar button {
  border: 1px solid rgba(255,255,255,.16); background: rgba(255,255,255,.07);
  color: #efe6ff; font-size: 11.5px; padding: 5px 11px; border-radius: 99px; cursor: pointer;
  transition: all .16s;
}
.lk-game-bar button:active { transform: scale(.94); background: rgba(255,255,255,.14); }

/* ---- 模式 / 歌曲 ---- */
.lp-modes, .lp-songs { flex: 0 0 auto; display: flex; gap: 5px; flex-wrap: wrap; }
.lp-modes { margin-bottom: 6px; }
.lp-songs { margin-bottom: 6px; }
.lp-modes button, .lp-songs button {
  border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.05);
  color: #ded4f2; font-size: 11.5px; padding: 5px 11px; border-radius: 99px; cursor: pointer;
  transition: all .16s;
}
.lp-modes button { font-weight: 600; }
.lp-modes button.on { background: #ffb3cd; color: #4a2338; border-color: transparent; }
.lp-songs button.on { background: rgba(255,255,255,.2); color: #fff; border-color: rgba(255,255,255,.4); }
.lp-modes button:active, .lp-songs button:active { transform: scale(.94); }

/* ---- HUD：分数 / 连击 / 进度 ---- */
.lp-hud {
  flex: 0 0 auto; display: flex; align-items: center; gap: 10px;
  padding: 2px 4px 8px; color: #e8dcff; font-size: 12px;
}
.lp-hud-score { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; min-width: 44px; }
.lp-hud-combo { color: #ffb3cd; font-size: 11.5px; min-width: 62px; }
.lp-hud-combo b { font-size: 15px; font-weight: 700; }
.lp-hud-prog {
  flex: 1; height: 4px; border-radius: 99px; overflow: hidden;
  background: rgba(255,255,255,.12);
}
.lp-hud-prog i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #ffb3cd, #b39dff); transition: width .1s linear; }

/* ---- 轨道：音符从右滚到左，左端是判定线 ---- */
.lp-track {
  position: relative; flex: 1 1 auto; min-height: 96px; overflow: hidden;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02));
  border: 1px solid rgba(255,255,255,.08);
}
.lp-hitline {
  position: absolute; left: 0; top: 0; bottom: 0; width: 3px; z-index: 2;
  background: linear-gradient(180deg, transparent, #ffb3cd 18%, #ffb3cd 82%, transparent);
  box-shadow: 0 0 12px rgba(255,179,205,.7);
}
.lp-lane { position: absolute; inset: 0; }
.lp-note {
  position: absolute; top: 50%; width: 12px; height: 46px; margin-top: -23px;
  border-radius: 4px; z-index: 1;
  background: linear-gradient(180deg, #fff, #ffd8e6);
  box-shadow: 0 2px 8px rgba(255,179,205,.5);
}
.lp-note.dark { background: linear-gradient(180deg, #c9b6ff, #8f79d8); box-shadow: 0 2px 8px rgba(150,120,255,.5); }
.lp-judge {
  position: absolute; left: 14px; top: 6px; z-index: 3;
  font-size: 15px; font-weight: 800; letter-spacing: .06em;
  opacity: 0; transform: translateY(-4px); transition: opacity .12s, transform .12s;
  pointer-events: none;
}
.lp-judge.on { opacity: 1; transform: none; }
.lp-judge.perfect { color: #ffd7e6; text-shadow: 0 0 14px rgba(255,140,180,.9); }
.lp-judge.good    { color: #c9f5d8; text-shadow: 0 0 12px rgba(120,220,160,.7); }
.lp-judge.bad, .lp-judge.miss { color: #ffb0a0; text-shadow: 0 0 12px rgba(255,120,90,.6); }

/* ---- 琴键：真实黑白分组（2-3 布局），不是均分 ---- */
.lp-keys {
  flex: 0 0 auto; position: relative; height: 116px; margin-top: 8px;
  border-radius: 0 0 12px 12px; overflow: hidden;
}
.lp-wkey {
  position: relative; float: left; width: 12.5%; height: 100%;
  border: none; border-right: 1px solid #b9aec6;
  background: linear-gradient(180deg, #fff 0%, #faf7fd 72%, #e7dff0 100%);
  cursor: pointer; padding: 0; transition: transform .07s, background .12s;
  display: flex; align-items: flex-end; justify-content: center; padding-bottom: 6px;
}
.lp-wkey span { font-size: 9.5px; color: #a294b6; }
.lp-bkey {
  position: absolute; top: 0; width: 18px; height: 62%; z-index: 3;
  border: none; border-radius: 0 0 4px 4px; padding: 0; cursor: pointer;
  background: linear-gradient(180deg, #4a3f5c 0%, #221c2e 88%, #171220 100%);
  box-shadow: 0 3px 6px rgba(0,0,0,.45);
  transition: transform .07s, background .12s;
}
.lp-wkey.kbd, .lp-bkey.kbd { transform: scaleY(.94); }
.lp-wkey.hit { background: linear-gradient(180deg, #ffeaf2 0%, #ffd0e0 70%, #f3bfd2 100%); }
.lp-bkey.hit { background: linear-gradient(180deg, #7a6a94 0%, #4a3f5c 88%); }
.lp-wkey.bad { background: linear-gradient(180deg, #ffe4de 0%, #ffcfc5 100%); }
.lp-bkey.bad { background: linear-gradient(180deg, #8a5a52 0%, #5a3833 100%); }
.lp-wkey:active, .lp-bkey:active { transform: scaleY(.96); }

/* 演示模式没有成绩，分数栏藏起来（免得看到 0 分误会） */
.lp-hud.demo .lp-hud-score { display: none; }

/* ---- 底部提示 / 结算 ---- */
.lp-foot {
  flex: 0 0 auto; margin-top: 8px; min-height: 30px;
  font-size: 11.5px; line-height: 1.6; color: #b9aecb;
}
.lp-foot.done {
  color: #ffe6f0; background: rgba(255,179,205,.1);
  border: 1px solid rgba(255,179,205,.22); border-radius: 10px; padding: 6px 10px;
}
.lp-foot b { color: #ffb3cd; }

/* 旧的锁屏钢琴 / 游戏选择器样式已被这版整体替换，
   .lock-piano / .lock-games / .lp-header / .lp-score / .lp-notes 等不再有对应 DOM。 */

/* ===================== v179.19 锁屏组块化 =====================
   照《手机主题设计组块化布局规范》§1，把锁屏从上到下分成明确组块，
   从根源上避免"纯背景 + 零散图标"：
     ① 顶部状态栏组   5%   锁头图标
     ② 核心信息组    20%   大号时间 + 日期星期 + 天气（一个完整区块）
     ③ 互动彩蛋组    15%   可戳的软萌主体 + 隐藏小游戏入口（双击呼出）
     ⑤ 底部功能栏组  10%   手电筒 / 相机 + 解锁提示
   （④ 应用图标组是主屏幕的，锁屏不放） */

/* 锁屏改成 flex 列布局，各组块各占自己的比例 */
#lockscreen {
  display: flex; flex-direction: column; align-items: center;
  padding: calc(var(--sb-h, 24px) + 4px) 0 14px;
}
#lockscreen .lock-top { flex: 0 0 auto; }
#lockscreen .lock-info { flex: 0 0 auto; text-align: center; }
#lockscreen .lock-notifs { flex: 0 1 auto; width: 100%; overflow-y: auto; }
#lockscreen .lock-play { flex: 1 1 auto; }
#lockscreen .lock-actions { flex: 0 0 auto; margin-top: auto; }
#lockscreen .lock-hint { flex: 0 0 auto; margin-top: 10px; }

/* ---- ② 核心信息组：三者合成一个区块，而不是散着的两行 ---- */
.lock-info { text-align: center; margin-top: 4px; }
.lock-info .lock-date {
  font-size: 14px; font-weight: 500; color: rgba(255,255,255,.86);
  letter-spacing: .04em; text-shadow: 0 2px 8px rgba(0,0,0,.22);
}
.lock-info .lock-time { margin-top: 2px; }
/* 天气：文档要求它在核心信息组内。没取到真实天气就不显示，不编 */
.lock-wx {
  margin-top: 6px; display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px; border-radius: 99px;
  background: rgba(255,255,255,.18);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  font-size: 12px; color: rgba(255,255,255,.92);
  text-shadow: 0 1px 4px rgba(0,0,0,.2);
  min-height: 24px;
}
.lock-wx:empty, .lock-wx[data-none="1"] { display: none; }
.lock-wx-txt { white-space: nowrap; }

/* ---- ③ 互动彩蛋组 ----
   justify-content 用 center 而不是 flex-end：彩蛋组占的是 flex:1 那一大块，
   推到底会让主体贴着提示文字和底栏，而信息组和底栏之间空出一大片。
   居中之后主体落在空当里，视觉上才是"这一组"。 */
.lock-play {
  position: relative; width: 100%; min-height: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; padding: 4px 0 10px;
  -webkit-tap-highlight-color: transparent;
}
/* 纯 CSS 的软萌主体：一只趴着的小云。
   没有用 emoji —— 文档要"软糯治愈 + 可戳的视觉暗示"，
   emoji 既不受主题控制也跨平台不一致。 */
.lk-creature {
  position: relative; width: 104px; height: 84px;
  background: linear-gradient(170deg, #fff 0%, #ffeef4 62%, #ffe0ea 100%);
  border-radius: 52px 52px 44px 44px / 46px 46px 40px 40px;
  box-shadow: 0 10px 24px rgba(120,60,90,.22), inset 0 -6px 14px rgba(255,160,190,.28);
  cursor: pointer;
  animation: lkBreathe 3.4s ease-in-out infinite;
  transition: transform .18s cubic-bezier(.2,1.4,.4,1);
}
.lk-creature::after {           /* 地面投影 */
  content: ''; position: absolute; left: 50%; bottom: -9px;
  width: 62px; height: 9px; margin-left: -31px;
  background: radial-gradient(ellipse, rgba(120,60,90,.22), transparent 70%);
  animation: lkShadow 3.4s ease-in-out infinite;
}
@keyframes lkBreathe {
  0%, 100% { transform: translateY(0) scale(1); }
  50%      { transform: translateY(-4px) scale(1.025); }
}
@keyframes lkShadow {
  0%, 100% { transform: scaleX(1); opacity: .85; }
  50%      { transform: scaleX(.86); opacity: .55; }
}
/* 耳朵 */
.lk-ear {
  position: absolute; top: -12px; width: 26px; height: 26px;
  background: linear-gradient(170deg, #fff, #ffdfe9);
  border-radius: 50% 50% 46% 46%;
  box-shadow: inset 0 -3px 6px rgba(255,150,180,.3);
}
.lk-ear-l { left: 8px; transform: rotate(-16deg); }
.lk-ear-r { right: 8px; transform: rotate(16deg); }
/* 眼睛：平时是两道弧（眯着笑），被戳/眨眼时变圆点 */
.lk-eye {
  position: absolute; top: 34px; width: 9px; height: 9px;
  border-radius: 50%; background: #6b4356;
  box-shadow: 0 1px 0 rgba(255,255,255,.5);
  transition: height .12s ease, border-radius .12s ease;
}
.lk-eye-l { left: 30px; }
.lk-eye-r { right: 30px; }
.lk-creature.blink .lk-eye { height: 2px; border-radius: 2px; }
.lk-creature.blink2 .lk-eye { height: 2px; border-radius: 2px; }
/* 腮红 */
.lk-cheek {
  position: absolute; top: 46px; width: 15px; height: 8px;
  border-radius: 50%; background: rgba(255,138,168,.34);
  filter: blur(1.5px);
}
.lk-cheek-l { left: 17px; }
.lk-cheek-r { right: 17px; }
/* 被戳：压扁 + 晃一下 */
.lk-creature.poke { animation: none; transform: scale(1.12, .84) translateY(6px); }
.lk-creature.wiggle { animation: lkWiggle .5s ease; }
@keyframes lkWiggle {
  0%   { transform: rotate(0) scale(1.05, .92); }
  30%  { transform: rotate(-7deg) scale(1.04, .95); }
  60%  { transform: rotate(7deg) scale(1.04, .95); }
  100% { transform: rotate(0) scale(1); }
}
/* 提示语：点了之后才换文案，暴露双击 */
.lk-tip {
  font-size: 11.5px; color: rgba(255,255,255,.78);
  letter-spacing: .05em; text-shadow: 0 1px 4px rgba(0,0,0,.25);
  transition: opacity .2s;
}
.lk-tip.dim { opacity: .45; }
/* 右上角隐藏入口：低调的小圆点，鼠标移上去才显形 */
.lk-secret {
  position: absolute; top: 4px; right: 10px;
  width: 22px; height: 22px; padding: 0;
  border: none; border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, rgba(255,255,255,.85), rgba(255,255,255,.28));
  box-shadow: 0 1px 5px rgba(0,0,0,.18);
  opacity: .3; cursor: pointer;
  transition: opacity .2s, transform .2s;
}
.lk-secret:hover, .lk-secret:focus-visible { opacity: .9; transform: scale(1.15); outline: none; }
.lk-secret.on { opacity: .95; animation: lkSecretPulse 1.8s ease-in-out infinite; }
@keyframes lkSecretPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,255,255,.5); }
  50%      { box-shadow: 0 0 0 7px rgba(255,255,255,0); }
}

/* ===================== v179.17 小窝 · 栖所化 ===================== */

/* ---- 房间底部引言区（文档 §2.7.2）----
   压在舞台最下缘，一行小字。内容异步填，没填上之前不占视觉重量。 */
.dw-roomline {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 18px 16px 10px;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,.34) 60%);
  pointer-events: none;
}
.dw-roomline i {
  display: block; text-align: center;
  font-size: 11.5px; line-height: 1.6; letter-spacing: .03em;
  color: rgba(255,255,255,.78);
  text-shadow: 0 1px 4px rgba(0,0,0,.6);
  font-style: normal;
  min-height: 1em;
}

/* ---- 线稿图标按钮（换换家里的东西）---- */
.dw-icon-btn .dw-ico { display: block; width: 17px; height: 17px; }
.dw-icon-btn .dw-ico > svg { width: 100%; height: 100%; display: block; }
.dw-icon-btn:disabled { opacity: .45; cursor: default; }

/* ---- 标注点：可拖 ----
   touch-action:none 是关键 —— 不加的话手指在标注点上拖动会被当成滚动页面。 */
.anno-point { touch-action: none; }
.anno-point.dragging { z-index: 9; }
.anno-point.dragging .anno-dot { transform: scale(1.35); }
.anno-point.dragging .anno-line { opacity: .3; }
.anno-point.dragging .anno-label { opacity: .65; }

/* ===================== v179.17 小窝 · 栖所化的第三层：物品 ===================== */

/* ---- 家具面板里的物品区 ---- */
.nest-things { margin: 0 4px 6px; border-radius: 12px; overflow: hidden; border: 1px solid var(--divider); }
.nest-thing {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 9px 11px; cursor: pointer;
  border-bottom: 1px solid var(--divider);
  transition: background .16s;
}
.nest-thing:last-child { border-bottom: none; }
.nest-thing:active { background: var(--accent-soft); }
.nest-thing b { font-size: 13.5px; font-weight: 600; color: var(--text-1); flex: 0 0 auto; }
.nest-thing span {
  flex: 1; min-width: 0; font-size: 12px; line-height: 1.55; color: var(--text-3);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.nest-thing i {
  flex: 0 0 auto; font-style: normal; font-size: 10px;
  color: var(--text-3); background: rgba(127,127,127,.12);
  padding: 2px 7px; border-radius: 99px;
}
.nest-thing i.fresh { color: var(--accent); background: var(--accent-soft); }

/* ---- 物品故事页 ---- */
.thing-where {
  margin: -2px 0 8px; font-size: 11px; color: var(--text-3);
  letter-spacing: .04em;
}
/* preview 是"外观与细节"，用等宽斜体衬底，像物品上贴的一张小标签 */
.thing-preview {
  margin: 0 0 12px; padding: 9px 12px;
  background: var(--bg); border-left: 2px solid var(--accent);
  border-radius: 0 8px 8px 0;
  font-size: 13px; line-height: 1.7; color: var(--text-2);
}
/* 模型写的叙事 HTML 落在这里（已过白名单净化） */
.thing-story {
  padding: 4px 2px 2px;
  font-size: 14px; line-height: 1.85; color: var(--text-1);
}
.thing-story p { margin: 0 0 10px; }
.thing-story h4 {
  margin: 0 0 10px; font-size: 15px; font-weight: 700; color: var(--text-1);
  letter-spacing: .02em;
}
.thing-story h5 { margin: 0 0 8px; font-size: 13.5px; font-weight: 600; color: var(--text-2); }
.thing-story blockquote {
  margin: 0 0 10px; padding: 6px 0 6px 12px;
  border-left: 2px solid var(--accent);
  color: var(--text-2); font-size: 13.5px;
}
.thing-story hr {
  margin: 14px 0; border: none; height: 1px;
  background: linear-gradient(90deg, transparent, var(--divider) 18%, var(--divider) 82%, transparent);
}
.thing-story ul, .thing-story ol { margin: 0 0 10px; padding-left: 20px; }
.thing-story li { margin: 3px 0; }
.thing-story em { font-style: italic; color: var(--text-2); }
.thing-story strong { font-weight: 700; color: var(--text-1); }
.thing-story .tiny { font-size: 11.5px; color: var(--text-3); }

/* ---- 底部清单面板：物品行 ---- */
.dw-item { cursor: pointer; }
.dw-item.told .dw-item-name i {
  font-style: normal; font-size: 9.5px; margin-left: 6px;
  color: var(--text-3); background: rgba(127,127,127,.12);
  padding: 1px 6px; border-radius: 99px;
}
/* 痕迹行要和「东西」行分得开。
   原来只有 opacity:.62，截图上看就是「第 3 件东西」——
   面板头写着「2 件东西」下面却列出三行，读者会以为计数错了。
   改成：虚线分隔 + 不再编号 + 挂一个「痕迹」小标。 */
.dw-item.trace {
  opacity: .6;
  margin-top: 2px; padding-top: 11px;
  border-top: 1px dashed rgba(255,255,255,.11);
  border-bottom: none;
}
.dw-item.trace .dw-item-name { font-weight: 500; }
.dw-item.trace .dw-item-num {
  font-size: 0;                 /* 把 pad2 的编号藏掉 */
  margin-right: 8px;
  display: inline-block; vertical-align: 1px;
  padding: 1px 6px; border-radius: 99px;
  border: 1px solid rgba(255,255,255,.16);
  color: rgba(255,255,255,.36);
  font-family: var(--font-mono);
}
.dw-item.trace .dw-item-num::before { content: '痕迹'; font-size: 8.5px; letter-spacing: .12em; }

/* ---- 舞台标注点：选中态 ---- */
.anno-point { cursor: pointer; }
.anno-point.sel .anno-dot {
  box-shadow: 0 0 0 3px var(--accent), 0 0 14px var(--accent);
  transform: scale(1.25);
}
.anno-point.sel .anno-label { border-color: var(--accent); color: var(--accent); }

/* ============================================================
   v154 崽崽 · 景深卧室 + 2.5D 女宝宝立绘
   ============================================================ */
.cub-room {
  position: relative; height: min(46vh, 380px); min-height: 240px;
  border-radius: 20px; overflow: hidden; cursor: pointer;
  background: #f3e7d8; box-shadow: var(--shadow-md);
  --ambient: 1;
}
.cub-room .cr-bg {
  position: absolute; inset: 0;
  background: url('assets/cub/cub-room.jpg') center 32% / cover no-repeat;
  transform: scale(1.02);
  transition: filter .8s ease;
}
/* 远景薄雾：制造进深（顶部远处更亮更雾） */
.cub-room .cr-fog {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(255,244,232,.34) 0%, rgba(255,244,232,0) 30%, rgba(120,72,40,.10) 78%, rgba(120,72,40,.20) 100%);
}
/* 近景地板光斑：窗光洒在地板上 */
.cub-room .cr-floorlight {
  position: absolute; left: 30%; right: 8%; bottom: 0; height: 34%;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 100%, rgba(255,236,190,.5), rgba(255,236,190,0) 70%);
  mix-blend-mode: screen;
}
.cub-room.night .cr-bg { filter: brightness(.55) saturate(.9); }
.cub-room.night .cr-floorlight { background: radial-gradient(ellipse at 30% 100%, rgba(255,214,140,.42), rgba(255,214,140,0) 70%); }
/* 女宝宝立绘：站在地板带上，bottom 百分比定位 + 行走过渡 */
.cr-baby {
  position: absolute; left: 45%; bottom: 14%;
  width: 92px; z-index: 5;
  transition: left 1.1s cubic-bezier(.22,.9,.3,1), bottom 1.1s cubic-bezier(.22,.9,.3,1);
  will-change: left, bottom;
  cursor: pointer;
}
.cr-baby img {
  width: 100%; display: block;
  filter: drop-shadow(0 6px 6px rgba(90,50,20,.28));
  animation: crBreathe 3.4s ease-in-out infinite;
  image-rendering: auto;
}
.cr-baby.flip img { transform: scaleX(-1); }
.cr-baby.walking img { animation: crBreathe 3.4s ease-in-out infinite, crStep .5s ease-in-out infinite; }
.cr-baby.poked img { animation: crPoke .6s ease-out; }
.cr-baby.sleepy .cr-zzz { display: block; }
.cr-zzz {
  position: absolute; right: -6px; top: -14px; font-size: 14px; display: none;
  animation: crZzz 2.4s ease-in-out infinite;
}
@keyframes crBreathe { 0%,100% { transform: scale(1); } 50% { transform: scale(1.028); } }
@keyframes crStep { 0%,100% { transform: translateY(0) rotate(0); } 30% { transform: translateY(-4px) rotate(-2deg); } 60% { transform: translateY(0) rotate(2deg); } }
@keyframes crPoke { 0% { transform: scale(1); } 30% { transform: scale(1.09) rotate(-3deg); } 60% { transform: scale(.96) rotate(3deg); } 100% { transform: scale(1); } }
@keyframes crZzz { 0% { transform: translate(0,0) scale(.8); opacity: 0; } 30% { opacity: 1; } 100% { transform: translate(8px,-14px) scale(1.1); opacity: 0; } }
/* 台词气泡：跟随崽崽上方 */
.cr-bubble {
  position: absolute; left: 50%; top: 12%; transform: translateX(-50%);
  z-index: 6; max-width: 76%;
  background: rgba(255,255,255,.94); border-radius: 14px; padding: 8px 14px;
  font-size: 13px; color: #5A3A28; text-align: center;
  box-shadow: 0 4px 14px rgba(90,50,20,.22);
}
.cr-bubble.pop { animation: crBubblePop .4s cubic-bezier(.2,.9,.3,1.3); }
@keyframes crBubblePop { from { opacity: 0; transform: translateX(-50%) translateY(8px) scale(.9); } to { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); } }
.cr-hint {
  position: absolute; right: 10px; top: 10px; z-index: 6;
  font-size: 10.5px; color: rgba(90,58,40,.85);
  background: rgba(255,255,255,.8); backdrop-filter: blur(6px);
  padding: 4px 10px; border-radius: 999px;
}
.cub-room.night .cr-hint { background: rgba(40,30,50,.72); color: #f2e3c8; }

/* ---- v158.1 视差/热点/名牌/页头/场景横幅 ---- */
.cub-root { --radius-soft: 16px; }
.cub-root-head { display: flex; align-items: center; gap: 8px; padding: 2px 4px 8px; color: #5A3A28; font-size: 13.5px; }
.cub-root-head b { font-size: 14.5px; }
.cub-daytag { font-size: 10.5px; color: #B07038; background: #FBEEDF; border-radius: 999px; padding: 2px 9px; }
.cub-clock { font-size: 11px; color: #B07038; font-variant-numeric: tabular-nums; }
.cub-room { --px: 0px; --py: 0px; will-change: transform; }
.cub-room .cr-bg { inset: -12px; transform: translate3d(calc(var(--px) * .35), calc(var(--py) * .35), 0) scale(1.02); transition: transform .18s ease-out; }
.cub-room .cr-mid { position: absolute; inset: -8px; pointer-events: none; background: linear-gradient(105deg, rgba(255,255,255,.16) 0%, rgba(255,255,255,0) 22%), radial-gradient(60% 34% at 62% 30%, rgba(255,236,200,.30), transparent 70%); transform: translate3d(calc(var(--px) * .65), calc(var(--py) * .65), 0); transition: transform .18s ease-out; mix-blend-mode: screen; }
.cub-room .cr-fog { transform: translate3d(calc(var(--px) * .15), calc(var(--py) * .15), 0); }
.cub-room.night .cr-mid { background: linear-gradient(105deg, rgba(180,200,255,.10) 0%, rgba(180,200,255,0) 22%), radial-gradient(60% 34% at 62% 30%, rgba(255,214,140,.22), transparent 70%); }
.cr-hotspot { position: absolute; z-index: 4; border-radius: 14px; cursor: pointer; transition: background .25s ease, box-shadow .25s ease; display: grid; place-items: center; }
.cr-hotspot i { font-style: normal; font-size: 15px; opacity: .5; transform: none; transition: .3s ease; filter: drop-shadow(0 2px 3px rgba(0,0,0,.4)); }
.cr-hotspot:hover, .cr-hotspot:active { background: rgba(255,244,220,.18); box-shadow: inset 0 0 0 1.5px rgba(255,244,220,.45); }
.cr-hotspot.ping { animation: crPing .55s ease; }
@keyframes crPing { 30% { box-shadow: inset 0 0 0 3px rgba(255,220,160,.8); } }
.cr-tag { position: absolute; left: 50%; top: -20px; transform: translateX(-50%); font-size: 10px; color: #fff; background: rgba(90,58,40,.55); padding: 2px 9px; border-radius: 999px; white-space: nowrap; backdrop-filter: blur(3px); pointer-events: none; }
.cub-room.night .cr-tag { background: rgba(30,22,44,.6); }
.cub-roomscene { position: relative; height: 88px; border-radius: 16px; overflow: hidden; margin-bottom: 10px; display: flex; align-items: flex-end; padding: 10px 14px; box-shadow: inset 0 0 0 1px rgba(120,72,40,.12); }
.cub-kit-scene { background: linear-gradient(118deg, #FBE7CE 0%, #F6D3B8 55%, #EFC4A4 100%); }
.cub-kit-scene::after { content: ''; position: absolute; inset: 0; background: radial-gradient(40% 60% at 84% 30%, rgba(255,255,255,.5), transparent 70%), radial-gradient(52% 80% at 12% 100%, rgba(140,84,40,.20), transparent 72%); }
.cub-stu-scene { background: linear-gradient(118deg, #E7E2F4 0%, #D9D2EE 55%, #C8BFDF 100%); }
.cub-stu-scene::after { content: ''; position: absolute; inset: 0; background: radial-gradient(40% 60% at 84% 26%, rgba(255,244,214,.55), transparent 70%), radial-gradient(52% 80% at 12% 100%, rgba(84,62,120,.18), transparent 72%); }
.crs-tag { position: relative; z-index: 1; font-size: 12px; font-weight: 700; color: #5A3A28; background: rgba(255,255,255,.85); border-radius: 999px; padding: 3px 11px; backdrop-filter: blur(4px); }
.crs-sub { position: relative; z-index: 1; margin-left: auto; font-size: 10.5px; color: rgba(90,58,40,.75); font-style: italic; }
.cub-bars { border: 1px solid rgba(212,135,90,.14); }
.cub-bar .cb { height: 8px; border-radius: 5px; background: #F4E7DB; box-shadow: inset 0 1px 2px rgba(120,72,40,.12); }
.cub-bar .cb i { box-shadow: inset 0 -1.5px 0 rgba(0,0,0,.10), 0 1px 2px rgba(212,135,90,.25); transition: width .5s var(--ease-out); }
.cub-acts button { border: 1px solid rgba(212,135,90,.14); background: linear-gradient(180deg, #fff, #FDF6EE); transition: transform .15s ease, box-shadow .2s ease; }
.cub-acts button:hover { box-shadow: 0 4px 14px rgba(212,135,90,.22); }


/* ===================== v162 微信化聊天输入栏 ===================== */
.inputbar.wx-like {
  gap: 8px;
  padding: 7px 10px calc(8px + env(safe-area-inset-bottom, 0px));
  background: #F3F3F3;
  border-top: 1px solid #E0E0E0;
  backdrop-filter: none; -webkit-backdrop-filter: none;
  align-items: flex-end;
}
.inputbar.wx-like .plus-btn {
  width: 30px; height: 30px; border-radius: 6px;
  background: transparent; box-shadow: none; color: #7A7A7A;
  margin-bottom: 4px;
}
.inputbar.wx-like .plus-btn:active { transform: scale(.9); background: #E8E8E8; }
.inputbar.wx-like textarea {
  flex: 1; background: #FFFFFF; border: none; border-radius: 5px;
  min-height: 34px; max-height: 132px;
  padding: 8px 10px; font-size: 15.5px; line-height: 1.4;
  color: #191919; box-shadow: none;
  resize: none;
}
.inputbar.wx-like textarea:focus { box-shadow: none; }
.inputbar.wx-like .send-btn {
  width: auto; min-width: 56px; height: 32px; border-radius: 5px;
  background: #EDEDED; color: #B2B2B2;
  margin-bottom: 4px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 12px;
  transition: background .2s ease, color .2s ease;
}
.inputbar.wx-like .send-btn:active { transform: none; }
/* 有内容时变绿（JS 加 .ready） */
.inputbar.wx-like .send-btn.ready { background: #07C160; color: #fff; }
/* 群聊副标题微信化 */
.chat-sub {
  font-size: 12px; color: #9A9A9A;
  padding: 8px 14px 6px;
  background: #EDEDED;
  text-align: center;
}
/* 微信群 ⊕ 面板：白底九宫格 */
.wx-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px 6px;
  padding: 18px 10px 22px;
  background: #F7F7F7;
}
[data-theme] .wx-grid { background: #F7F7F7; }
.wx-grid button {
  border: none; background: transparent;
  display: grid; place-items: center; gap: 6px;
  cursor: pointer; padding: 4px 0;
}
.wx-grid button:active { transform: scale(.92); }
.wx-grid .wxg-ico {
  width: 52px; height: 52px; border-radius: 14px;
  background: #FFFFFF; box-shadow: 0 1px 4px rgba(0,0,0,.08);
  display: grid; place-items: center; font-size: 24px; color: #5A5A5A;
  overflow: hidden;
}
.wx-grid .wxg-ico.has-img { background: #FFFFFF; }
.wx-grid .wxg-ico .wxi-img { width: 52px; height: 52px; object-fit: cover; border-radius: 14px; }
.wx-grid button span:last-child { font-size: 11.5px; color: #666; }
/* 深色主题回退：保持微信白面板（聊天场景本身浅色） */

/* ===== v169 崽崽聊天窗 & 实例快捷窗 & 通话崽崽插话 ===== */
.cub-chat-head { font-weight: 700; font-size: 14px; color: #5A3A28; padding: 2px 4px 8px; text-align: center; }
.cub-chat-feed { height: 42vh; max-height: 340px; overflow-y: auto; background: #FFF9F2; border: 1px solid rgba(212,135,90,.14); border-radius: 14px; padding: 10px; display: flex; flex-direction: column; }
.cub-chat-row { display: flex; align-items: flex-end; gap: 6px; margin: 5px 0; }
.cub-chat-row.me { justify-content: flex-end; }
.cub-chat-ava { font-size: 17px; width: 24px; text-align: center; flex: none; }
.cub-chat-bub { max-width: 74%; background: #fff; border: 1px solid rgba(212,135,90,.14); border-radius: 12px 12px 12px 3px; padding: 7px 10px; font-size: 13px; line-height: 1.55; color: #4A3222; box-shadow: 0 2px 6px rgba(212,135,90,.10); word-break: break-word; }
.cub-chat-row.me .cub-chat-bub { background: linear-gradient(135deg, #FFD9E6, #FFC9DC); border-color: transparent; border-radius: 12px 12px 3px 12px; }
.cub-chat-input { display: flex; gap: 8px; margin-top: 10px; }
.cub-chat-input input { flex: 1; border: 1px solid rgba(212,135,90,.24); border-radius: 12px; padding: 9px 12px; font-size: 13px; background: #fff; color: #4A3222; outline: none; min-width: 0; }
.cub-chat-input button { border: none; background: linear-gradient(135deg, #F5A8BE, #E88AA8); color: #fff; border-radius: 12px; padding: 0 16px; font-size: 13px; font-weight: 600; cursor: pointer; flex: none; }
.cub-qc-feed { height: 40vh; max-height: 320px; background: #FFF9F2; border: 1px solid rgba(212,135,90,.14); border-radius: 14px; }
.cub-qc-calls { display: flex; gap: 8px; margin-top: 10px; }
.cub-qc-calls button { flex: 1; border: 1px solid rgba(212,135,90,.16); background: linear-gradient(180deg, #fff, #FDF6EE); color: #5A3A28; border-radius: 12px; padding: 10px 0; font-size: 13px; font-weight: 600; cursor: pointer; }
.cub-qc-calls button:active { transform: scale(.97); }
.call-cub { position: relative; margin: 10px auto 0; width: min(344px, calc(100% - 28px)); background: rgba(28,20,16,.58); color: #fff; font-size: 13px; padding: 9px 15px; border-radius: 16px; text-align: center; line-height: 1.5; z-index: 6; animation: cubpop .25s ease; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.call-cub b { color: #ffd9ea; margin-right: 4px; }
@keyframes cubpop { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* ===== v169.2 三间景深房间：坐桌前景 / 睡眠 / 跑跳 / 房间动作 ===== */
.cr-bg.cr-svg, .cr-mid.cr-svg { background: none; }
.cr-lsvg { width: 100%; height: 100%; display: block; }
.cub-room.kit { background: #f6e2c4; }
.cub-room.stu { background: #e2dcf2; }
.cub-room.night .cr-mid.cr-svg { filter: brightness(.78) saturate(.9); }
/* 前景层（餐桌）：盖在崽崽下半身 → "乖乖坐在桌后等饭" */
.cr-front { position: absolute; inset: 0; z-index: 6; pointer-events: none; }
/* 坐姿：轻轻晃腿等待 */
.cr-baby.sitting img { animation: crSit 2.8s ease-in-out infinite; }
@keyframes crSit { 0%,100% { transform: translateY(0) rotate(0); } 30% { transform: translateY(-3px) rotate(-1.4deg); } 65% { transform: translateY(-1px) rotate(1.2deg); } }
/* 睡着：房间再压暗 + 月亮 */
.cub-room.sleeping .cr-bg { filter: brightness(.5) saturate(.82); }
.cub-room.sleeping .cr-mid { background: linear-gradient(105deg, rgba(150,170,255,.08) 0%, rgba(150,170,255,0) 22%), radial-gradient(60% 34% at 62% 30%, rgba(180,190,255,.16), transparent 70%); }
.cr-moon { position: absolute; right: 12%; top: 12%; font-size: 22px; z-index: 6; filter: drop-shadow(0 0 10px rgba(255,240,200,.8)); animation: crMoon 4s ease-in-out infinite; }
@keyframes crMoon { 0%,100% { opacity: .85; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-4px); } }
/* 书房蹦跳 */
.cr-baby.hop img { animation: crHop .55s ease-out !important; }
@keyframes crHop { 0% { transform: translateY(0) scale(1,1); } 35% { transform: translateY(-16px) scale(.96,1.05); } 70% { transform: translateY(0) scale(1.04,.94); } 100% { transform: translateY(0) scale(1,1); } }
/* 喂饭爱心 */
.cr-baby.fed::after { content: '💕'; position: absolute; top: -18px; left: 50%; font-size: 18px; transform: translateX(-50%); animation: fedFloat 1.5s ease-out forwards; pointer-events: none; }
@keyframes fedFloat { 0% { opacity: 0; transform: translateX(-50%) translateY(6px) scale(.7); } 25% { opacity: 1; } 100% { opacity: 0; transform: translateX(-50%) translateY(-26px) scale(1.15); } }
/* 房间内动作行 / 全局动作行 */
.cub-acts.room { display: flex; gap: 7px; margin-top: 8px; }
.cub-acts.room button { flex: 1; border: 1px solid rgba(212,135,90,.14); background: linear-gradient(180deg, #fff, #FDF6EE); border-radius: 12px; padding: 10px 0; font-size: 13px; color: #5A3A28; cursor: pointer; box-shadow: 0 2px 8px rgba(212,135,90,.12); }
.cub-acts.room button.pri { background: linear-gradient(135deg, #F0A8C4, #E88AA8); color: #fff; border-color: transparent; font-weight: 600; }
.cub-acts.room button:active { transform: scale(.97); }
.cub-acts.global { margin-top: 8px; }
.cub-acts.global button { flex: 1 0 21%; font-size: 12px; padding: 9px 0; }
.cub-stockline { margin-top: 8px; font-size: 11.5px; color: #8A6448; background: #FFF9F2; border: 1px solid rgba(212,135,90,.14); border-radius: 12px; padding: 8px 12px; text-align: center; }
.stu-panel { margin-top: 8px; }
/* ===== v170 火漆信封（交换日记·慢信） ===== */
.xd-env { position: relative; margin: 0 16px 14px; padding: 18px 16px 14px; border-radius: 12px;
  background: linear-gradient(150deg, #f6e8cf 0%, #ecd9b4 55%, #e3cca0 100%); cursor: pointer; overflow: hidden;
  box-shadow: 0 6px 18px rgba(120,80,30,.18), inset 0 0 0 1px rgba(160,110,50,.25);
  transition: transform .35s ease, opacity .35s ease; }
.xd-env::before { content: ''; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(45deg, rgba(255,255,255,.12) 0 2px, transparent 2px 7px); }
.xd-flap { position: absolute; left: 0; top: 0; width: 100%; height: 46%;
  background: linear-gradient(180deg, #f9eed9, #e9d3a8); clip-path: polygon(0 0, 100% 0, 50% 100%);
  transform-origin: top center; transition: transform .5s ease; box-shadow: 0 2px 6px rgba(140,90,30,.15); }
.xd-env.opening .xd-flap { transform: rotateX(155deg); }
.xd-env.opening { transform: scale(.96); opacity: .35; }
.xd-seal { position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%); width: 44px; height: 44px; border-radius: 50%;
  background: radial-gradient(circle at 32% 30%, #d2454f, #9c2231 70%); color: #ffe9e2; z-index: 2;
  display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 700;
  box-shadow: 0 3px 8px rgba(120,20,30,.4), inset 0 0 0 2px rgba(255,220,210,.25); }
.xd-env.opening .xd-seal { animation: xdSeal .5s ease forwards; }
@keyframes xdSeal { to { transform: translate(-50%, -62%) rotate(-18deg) scale(.35); opacity: 0; } }
.xd-addr { display: flex; justify-content: space-between; align-items: baseline; margin-top: 58px; font-family: KaiTi, serif; }
.xd-addr b { color: #6b4a22; }
.xd-addr span { color: #a8895a; font-size: 12px; }
.xd-hint { margin-top: 6px; font-size: 12px; color: #b08d5e; }
.xd-wax { color: #b08d5e; }
/* 黑蜡彩蛋信 */
.xd-env.egg { background: linear-gradient(150deg, #2b2436 0%, #1d1728 60%, #141020 100%);
  box-shadow: 0 8px 22px rgba(30,15,60,.5), inset 0 0 0 1px rgba(190,150,255,.2); }
.xd-env.egg::before { background: repeating-linear-gradient(45deg, rgba(190,160,255,.07) 0 2px, transparent 2px 7px); }
.xd-env.egg .xd-flap { background: linear-gradient(180deg, #3a2f4d, #241c36); }
.xd-env.egg .xd-seal { background: radial-gradient(circle at 32% 30%, #7b5cff, #2c1e56 70%); color: #e6dcff;
  box-shadow: 0 3px 10px rgba(90,50,200,.5), inset 0 0 0 2px rgba(200,180,255,.25); }
.xd-env.egg .xd-addr b { color: #cdbdf5; }
.xd-env.egg .xd-addr span, .xd-env.egg .xd-hint { color: #9b8ac2; }
.xd-egg-paper { background: linear-gradient(180deg, #241c36, #1a1428) !important; }
.xd-egg-paper p { color: #e6dcff; }
.xd-egg-paper .d-head b { color: #cdbdf5; }
.xd-egg-paper .d-head span { color: #9b8ac2; }
/* ===== v170 日记书架（立体书脊） ===== */
.dy-shelf { padding: 4px 18px 18px; }
.dy-row { display: flex; align-items: flex-end; justify-content: center; gap: 8px; padding: 14px 4px 0; }
.dy-plank { height: 12px; margin: 0 -6px; border-radius: 0 0 8px 8px;
  background: linear-gradient(180deg, #C99A6B 0%, #A97A4E 55%, #8C6140 100%);
  box-shadow: 0 8px 14px -6px rgba(120,70,30,.45), inset 0 1px 0 rgba(255,235,200,.5); }
.dy-spine { position: relative; flex: 0 0 38px; height: var(--h, 170px); border-radius: 3px 6px 6px 3px;
  cursor: pointer; transform: perspective(700px) rotateY(-13deg) rotate(var(--tilt, 0deg)); transform-origin: bottom center;
  transition: transform .35s ease, box-shadow .35s ease; box-shadow: 4px 6px 10px -3px rgba(80,50,20,.35); }
.dy-spine:hover { transform: perspective(700px) rotateY(-3deg) translateY(-10px) rotate(0deg); z-index: 3; }
.dy-spine::after { content: ''; position: absolute; inset: 0 auto 0 0; width: 8px; border-radius: 3px 0 0 3px;
  background: linear-gradient(90deg, rgba(255,255,255,.38), rgba(255,255,255,0)); }
.dy-spine b { position: absolute; top: 14px; left: 50%; transform: translateX(-50%);
  writing-mode: vertical-rl; font-size: 11px; letter-spacing: 2px; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.35); white-space: nowrap; }
.dy-spine i { position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%);
  writing-mode: vertical-rl; font-style: normal; font-size: 9px; color: #fff; opacity: .75;
  white-space: nowrap; max-height: 42%; overflow: hidden; }
.dy-clip { position: absolute; top: -9px; left: 50%; width: 13px; height: 30px; z-index: 4;
  transform: translateX(-50%) rotate(-7deg); border: 2.5px solid #A7ADBB; border-radius: 6px;
  background: rgba(255,255,255,.14); box-shadow: 0 1px 2px rgba(0,0,0,.25); }
.dy-clip::before { content: ''; position: absolute; top: 4px; left: 2px; right: 2px; bottom: 4px; border: 1.5px solid #A7ADBB; border-radius: 4px; }
/* 6 种封面花纹 */
.dy-c1 { background: linear-gradient(160deg, #C96F5E, #A34A3E); }
.dy-c2 { background: radial-gradient(circle at 6px 6px, rgba(255,255,255,.22) 2px, transparent 2.5px) 0 0/13px 13px, linear-gradient(160deg, #5E7FC9, #3E56A3); }
.dy-c3 { background: repeating-linear-gradient(45deg, rgba(255,255,255,.15) 0 6px, transparent 6px 12px), linear-gradient(160deg, #4F9E7A, #2F7256); }
.dy-c4 { background: linear-gradient(160deg, #3A3550, #221E36); }
.dy-c4::before { content: ''; position: absolute; inset: 0; border-radius: inherit;
  background: radial-gradient(circle at 8px 10px, rgba(255,255,255,.7) 1px, transparent 1.6px) 0 0/23px 27px,
              radial-gradient(circle at 16px 23px, rgba(255,255,255,.45) 1px, transparent 1.6px) 0 0/23px 27px; }
.dy-c5 { background: repeating-linear-gradient(0deg, rgba(255,255,255,.13) 0 2px, transparent 2px 9px),
  repeating-linear-gradient(90deg, rgba(255,255,255,.13) 0 2px, transparent 2px 9px), linear-gradient(160deg, #C9A25E, #A37E3E); }
.dy-c6 { background: linear-gradient(160deg, #B85E86, #8E3E62); }

/* ============================================================
   v171 Zone Glass 分区选色
   ============================================================ */
.zg-list { display: flex; flex-direction: column; gap: 8px; padding: 0 16px; }
.zg-row {
  display: flex; align-items: center; gap: 12px; padding: 11px 14px;
  background: var(--card); border-radius: var(--radius-md); box-shadow: var(--shadow-sm);
  cursor: pointer; border: 1.5px solid transparent; transition: transform var(--dur-fast) var(--ease-spring);
}
.zg-row:active { transform: scale(.97); }
.zg-row .zg-name { flex: 1; min-width: 0; }
.zg-row .zg-name b { font-size: 14px; display: block; }
.zg-row .zg-name small { font-size: 11px; color: var(--text-3); }
.zg-swatch {
  width: 46px; height: 32px; border-radius: 9px; border: 1.5px solid var(--divider); flex-shrink: 0;
  background-image: linear-gradient(45deg, #e2e2e6 25%, transparent 25%, transparent 75%, #e2e2e6 75%),
    linear-gradient(45deg, #e2e2e6 25%, transparent 25%, transparent 75%, #e2e2e6 75%);
  background-size: 10px 10px; background-position: 0 0, 5px 5px; background-color: #fff;
  position: relative; overflow: hidden;
}
.zg-swatch i { position: absolute; inset: 0; border-radius: 7px; }
.zg-tag { font-size: 10px; color: var(--text-3); letter-spacing: 1px; flex-shrink: 0; }
/* 取色面板（HSV） */
.zg-pick { padding: 4px 2px 8px; }
.zg-pick-title { display: flex; align-items: baseline; gap: 8px; margin: 2px 2px 12px; }
.zg-pick-title b { font-size: 16px; }
.zg-pick-title em { font-style: normal; font-family: var(--font-mono); font-size: 12px; color: var(--text-2); margin-left: auto; text-transform: uppercase; }
.zg-sv, .zg-hue { position: relative; border-radius: var(--radius-sm); overflow: hidden; touch-action: none; cursor: crosshair; }
.zg-sv { height: 168px; }
.zg-hue { height: 20px; margin-top: 12px; border-radius: var(--radius-full); }
.zg-sv canvas, .zg-hue canvas { display: block; width: 100%; height: 100%; }
.zg-cursor {
  position: absolute; width: 18px; height: 18px; border-radius: 50%;
  border: 2.5px solid #fff; box-shadow: 0 0 0 1.5px rgba(0,0,0,.35), 0 2px 6px rgba(0,0,0,.3);
  transform: translate(-50%, -50%); pointer-events: none;
}
.zg-preview {
  margin: 14px 0 12px; height: 54px; border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center; gap: 10px;
  font-size: 17px; font-weight: 700; letter-spacing: 2px; border: 1.5px solid var(--divider);
}
.zg-preview small { font-size: 11px; font-weight: 400; letter-spacing: 0; opacity: .75; }
.zg-sl { display: flex; align-items: center; gap: 10px; }
.zg-sl input[type="range"] { flex: 1; accent-color: var(--accent); }
.zg-sl output { font-family: var(--font-mono); font-size: 12px; color: var(--text-2); min-width: 40px; text-align: right; }
.zg-note { padding: 10px 18px 2px; font-size: 11px; color: var(--text-3); line-height: 1.6; }

/* ---------- v171 真语音闭环 · v172 控制栏改栅格排布（旧 flex 换行规则已废） ---------- */
.inputbar .mic-btn {
  width: 38px; height: 38px; flex-shrink: 0; border-radius: var(--radius-full);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text-2); background: transparent; transition: all var(--dur-fast);
}
.inputbar .mic-btn.on {
  background: #F53F3F; color: #fff; transform: scale(1.08);
  box-shadow: 0 0 0 6px rgba(245,63,63,.18); animation: mic-pulse 1.1s ease-in-out infinite;
}
@keyframes mic-pulse { 50% { box-shadow: 0 0 0 11px rgba(245,63,63,.10); } }
/* ===================== v179.19 小窝：组块溢出 / 幽灵大字 / 图标尺寸 =====================
   放在文件末尾是为了压过前面那两条 .dw-room-tabs 旧规则（L1901 / L1923）。 */

/* ---- 房间栏：pill 组横滑，操作按钮组固定 ----
   原来 4 个 pill（约 300px）+ 3 个按钮（90px）挤在同一行，父级 overflow-x:auto，
   右边「摆家具 / 清理」两个按钮被裁到屏幕外 —— 看得到、点不到。 */
.dw-roombar {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; flex-shrink: 0;
  background: rgba(15,15,26,.7);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.dw-roombar .dw-room-tabs {
  flex: 1 1 auto; min-width: 0;          /* min-width:0 是关键：不给它就撑爆父容器 */
  display: flex; align-items: center; gap: 6px;
  overflow-x: auto; overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;                  /* 细屏不显示滚动条，省地方 */
  background: none; border: none; padding: 0;
}
.dw-roombar .dw-room-tabs::-webkit-scrollbar { display: none; }
.dw-roombar .dw-room-tabs {
  -webkit-mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 14px), transparent 100%);
          mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 14px), transparent 100%);
}
.dw-roombar .dw-room-tabs button {
  flex: 0 0 auto;                          /* 不许被压扁，横向滚而不是挤 */
  white-space: nowrap;
  padding: 6px 9px; border-radius: 999px;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.08);
  color: rgba(255,255,255,.62); font-size: 12px; line-height: 1.25;
  cursor: pointer; transition: all .16s;
}
.dw-roombar .dw-room-tabs button.on {
  background: rgba(255,255,255,.2); color: #fff; border-color: rgba(255,255,255,.3);
}
.dw-roombar .dw-room-tabs button:active { transform: scale(.95); }
.dw-roombar .dw-room-tabs button b { display: block; font-size: 13px; font-weight: 600; }
/* 英文副标只给【当前选中】的那个房间显示。
   4 个都显示的话光 pill 就要 256px，而 pill 组只剩 ~198px（三个操作按钮占掉 100px），
   右边那个会被硬切掉半个字，看着像 bug。收起来之后 4 个放得下。 */
.dw-roombar .dw-room-tabs button span { display: none; }
.dw-roombar .dw-room-tabs button.on span {
  display: block; font-size: 8.5px; letter-spacing: .09em; opacity: .55;
}
/* 按钮组：不参与滚动，永远在 */
.dw-room-acts { display: flex; gap: 5px; flex: 0 0 auto; }
.dw-room-acts .dw-icon-btn {
  width: 30px; height: 30px; flex: 0 0 auto; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.08);
  color: rgba(255,255,255,.5); cursor: pointer; padding: 0;
}
.dw-room-acts .dw-icon-btn:active { background: rgba(255,255,255,.14); }
.dw-room-acts .dw-icon-btn .dw-ico { display: block; width: 17px; height: 17px; }
.dw-room-acts .dw-icon-btn .dw-ico > svg { width: 100%; height: 100%; display: block; }

/* ---- 幽灵大字 ----
   竖排交给 writing-mode: vertical-rl，HTML 那边已经不再逐字 <br>。
   72px × 6 个字母在 min-height:200px 的舞台上根本放不下，会被 overflow:hidden
   裁成中间几个字母，看着像乱码。压到 40px 并去掉 letter-spacing，才完整放得下。 */
/* 原来在 left:5%，正好压在 FURN_SPOTS 那几个左侧槽位的标注点上，看着像重影。
   挪到右侧：标注点槽位偏左，右侧空着。 */
.dw-ghost {
  position: absolute; right: 5%; left: auto; top: 12%;
  font-size: 40px; font-weight: 100; letter-spacing: 2px; line-height: 1;
  color: rgba(255,255,255,.045);
  pointer-events: none; user-select: none;
  writing-mode: vertical-rl; text-orientation: upright;
  max-height: 76%;
  overflow: hidden;
}

/* ---- 替掉 emoji 之后必须给的图标尺寸 ----
   LineIcon.svg() 输出不带 width/height（它靠 CSS 定尺寸），
   新加的 p_move / p_trash / p_scale / p_spark / p_clock 都要在这里给尺寸。 */
.dw-fab .dw-ico { display: block; width: 21px; height: 21px; }
.dw-fab .dw-ico > svg { width: 100%; height: 100%; display: block; }
.nest-nego .dw-ico {
  display: inline-block; width: 14px; height: 14px; vertical-align: -2px;
}
.nest-nego .dw-ico > svg { width: 100%; height: 100%; display: block; }
/* 仲裁面板的标题和两个按钮 */
.nest-nego-panel .dw-ico, .dw-panel h3 .dw-ico { }
#ng-adopt .dw-ico, #ng-defer .dw-ico, #ng-self .dw-ico {
  display: inline-block; width: 14px; height: 14px; vertical-align: -2px;
}
#ng-adopt .dw-ico > svg, #ng-defer .dw-ico > svg, #ng-self .dw-ico > svg {
  width: 100%; height: 100%; display: block;
}
/* 仲裁面板 h3 里的天平：跟着字号走 */
h3 .dw-ico {
  display: inline-block; width: 1em; height: 1em; vertical-align: -.12em;
}
h3 .dw-ico > svg { width: 100%; height: 100%; display: block; }

/* ---- 底部引言区给右下角 FAB 让位 ----
   引言区是 absolute 铺满底边的，长句会钻到 FAB 底下。 */
.dw-roomline { padding-right: 66px; }
/* ===================== v179.20 生图接进全项目 ===================== */

/* ---- 小窝：房间图当舞台背景 ----
   .dwelling-stage 自己的渐变保留做底，图没铺满/加载失败也不难看。
   压一层暗色蒙版，不然家具标注点和文字会糊在图上看不清。 */
.dw-roomimg {
  position: absolute; inset: 0; z-index: 0;
  background-size: cover; background-position: center; background-repeat: no-repeat;
  pointer-events: none;
  display: none;                 /* 显隐用 display，别用 opacity（见上面那段说明） */
}
/* 淡入用一次性 animation 而不是 transition：animation 跑完就停在终值，
   不会像 transition 那样在某些环境里卡在起始值。 */
/* 淡入放弃了：animation 的 fill-mode 在这套环境里也不可靠（实测 opacity 停在 0）。
   显隐用 display 就够。图铺上去是瞬时的，反而更像「换了一张墙纸」。 */
.dw-roomimg.on { display: block; opacity: 1; }
@keyframes dwRoomFade { from { opacity: 0; } to { opacity: 1; } }
.dwelling-stage::after {
  content: ''; position: absolute; inset: 0; z-index: 1;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(10,10,22,.42) 0%, rgba(10,10,22,.18) 45%, rgba(10,10,22,.55) 100%);
  display: none;                 /* 同上：显隐用 display */
}
.dwelling-stage:has(.dw-roomimg.on)::after { display: block; }
/* 标注点、引言区、FAB 都要压在图上面 */
.dwelling-points, .dw-roomline, .dw-fab, .dw-ghost { z-index: 2; }

/* ---- 画图按钮的忙态 ---- */
.dw-icon-btn.busy { opacity: .45; pointer-events: none; }
.dw-icon-btn.busy .dw-ico { animation: dwPaintSpin 1.1s linear infinite; }
@keyframes dwPaintSpin { to { transform: rotate(360deg); } }

/* ---- 实例头像：接了生图之后，头像可以是真图 ----
   原来头像只有 emoji/文字占位。c.avatarImg 有值就走 <img>。 */
.av-with-img { position: relative; overflow: hidden; }
.av-with-img > img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---- 朋友圈 / 微博的"生图中"占位 ----
   骨架本来就有（m.images[].pending），这里给它一个真的等待态：转圈 + 阶段文案 */
.mo-img.pending, .wb-img.pending {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  background: linear-gradient(135deg, rgba(255,255,255,.10), rgba(255,255,255,.04));
  color: rgba(255,255,255,.6); font-size: 11px; letter-spacing: .04em;
}
.mo-img.pending::before {
  content: ''; width: 12px; height: 12px; border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,.25); border-top-color: rgba(255,255,255,.8);
  animation: dwPaintSpin .8s linear infinite;
}

/* ---- 锁屏壁纸 ----
   注意 z-index：这里原来写 -1，结果图铺上去但被 #lockscreen 自己的背景盖住了
   （.screen 是 stacking context，-1 会掉到它背景后面）。
   改成 0，再把锁屏的各个组块抬到 1 —— 这样图在最底、组块在图上。 */
/* v179.25 修复：这里原来写的是 position: relative。
   它把 .screen 的 position: absolute 覆盖掉了（ID 选择器压过 class），
   于是锁屏从绝对定位掉回普通流，inset:0 失效，高度塌成内容高 ——
   表现就是「锁屏只占半屏」。实测 #phone 高 844px，锁屏只有 692px。
   position: absolute 同样能建立定位上下文给下面的 #lock-wall 用，所以改回来即可，
   壁纸层和组块抬 z-index 的逻辑不受影响。 */
#lockscreen { position: absolute; }
#lock-wall {
  position: absolute; inset: 0; z-index: 0;
  background-size: cover; background-position: center;
  pointer-events: none;
  /* 用 display 切换，不靠 opacity。
     实测：把 transition 挂在 opacity 上时，这套图在某些环境里会永远停在 opacity:0
     —— class 有 .on、backgroundImage 也设了、getAnimations() 是空的、没有任何报错，
     但 getComputedStyle 一直读到 0，等于"图铺了但看不见"。
     为了淡入这种锦上添花的东西赌浏览器行为不值得，所以改成显隐切换。 */
  display: none;
}
#lock-wall.on { display: block; }
/* 锁屏的组块全都要压在壁纸之上 */
#lockscreen > .lock-top,
#lockscreen > .lock-info,
#lockscreen > .lock-notifs,
#lockscreen > .lock-play,
#lockscreen > .lock-actions,
#lockscreen > .lock-hint { position: relative; z-index: 1; }
/* ================= v179.22 · AI 生图：设置页缩略图 + 通话大头像 ================= */
/* .pic-thumb 这条 v179.20 就已经在用（_picCard 里包着生成结果），但样式一直忘了写 ——
   结果缩略图以原始尺寸（512x512 起）直接落进设置卡片，把整张卡片撑开、
   手机上滚动都费劲。功能在、图在、就是没人写样式，所以也就没人发现。 */
.set-card.pic-card { padding: 10px 12px; margin: 0 0 10px; }
.pic-thumb {
  width: 62px; height: 62px; flex: 0 0 62px;
  border-radius: 12px; overflow: hidden;
  background: var(--divider);
}
.pic-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.pic-thumb.empty { background: none; border: 1px dashed var(--divider); }

/* 通话页大头像：外层 .call-avatar 是 132px 的圆，img 铺满并按 cover 裁，
   不能让它把圆环撑破；没生成图时外层照旧显示原来的头像符号。 */
.call-av-img {
  display: block; width: 100%; height: 100%;
  border-radius: 50%; object-fit: cover;
}
/* ================= v179.22 · 角色想给动态配图 =================
   v179.20 写了 .mo-img.pending / .wb-img.pending 两个等待态，但没有任何代码
   设过 pending，也没有 .wb-img 的本体样式 —— 骨架摆着，功能没接。
   这一段把两端补齐：角色想配图时动态上出现一个小牌子，你点「配一张」才真画。 */

/* 那个小请求弹窗里的「角色想画的画面」 */
.pic-ask-shot {
  margin: 10px 0 8px; padding: 10px 12px;
  border-left: 3px solid var(--accent); border-radius: 4px;
  background: var(--card-alt); color: var(--text-1);
  font-size: 13.5px; line-height: 1.65;
}
/* 选择器要压过 .modal-card p（0,1,1）—— 否则这段说明会变成 14px 正文，
   而它本来就该是脚注那么小 */
.modal-card .pic-ask-note {
  margin: 0 0 14px; color: var(--text-3);
  font-size: 11.5px; line-height: 1.7;
}

/* 动态上的「TA 想配张图」小牌子：就是个按钮，要能点、能聚焦、长得不像图 */
.mo-img.ask, .wb-img.ask {
  flex-direction: column; gap: 3px;
  border: 1px dashed var(--accent);
  background: linear-gradient(135deg, rgba(255,126,179,.10), rgba(255,126,179,.04)) !important;
  color: var(--accent); font-size: 11.5px; font-weight: 600;
  letter-spacing: .02em; cursor: pointer;
  padding: 4px;
}
.mo-img.ask:active, .wb-img.ask:active { transform: scale(.97); }
/* 徽标上的 data-cap 渐变小字条会盖住文字，这里去掉 */
.mo-img.ask::after, .wb-img.ask::after { content: none; }

/* ---- 微博图片块（.wb-img.pending 早就有了，本体样式一直缺）---- */
.wb-imgs { margin-top: 8px; display: grid; gap: 4px; grid-template-columns: min(210px, 72%); }
.wb-img {
  aspect-ratio: 4/3; border-radius: 6px; overflow: hidden; position: relative;
  display: flex; align-items: center; justify-content: center;
  font-size: 40px; color: rgba(255,255,255,.85); background: var(--card-alt);
}
.wb-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wb-img::after {
  content: attr(data-cap); position: absolute; bottom: 0; left: 0; right: 0;
  font-size: 10px; padding: 10px 6px 4px; color: #fff; pointer-events: none;
  background: linear-gradient(transparent, rgba(0,0,0,.45));
}
/* ================= v179.24 · 组件商城（真商店） =================
   原来这页只有 3 个组件、背景写死在代码里、免费无限加，预览跟桌面长得一模一样
   （因为就是同一个 html()），所以「实时预览」四个字是假的。
   这一版：皮肤买断走钱包、电量按真实电量换 8 档插画、每个组件独立透明度、瀑布流。 */

.wst-bar {
  margin: 0 16px 10px; padding: 8px 12px; border-radius: 10px;
  background: var(--card); border: 1px solid var(--divider);
  font-size: 12px; color: var(--text-2);
}

/* 瀑布流：CSS columns 才是真瀑布流（grid 只能靠高度差错落，
   现在这 4 个组件卡片高度一样、grid 下看不出错落；加到十几个组件就会分出来）。
   break-inside: avoid 保证一张卡不会被拦腰截断。 */
.wst-grid {
  columns: 2;
  column-gap: 10px;
  padding: 0 16px;
}
.wst-card {
  background: var(--card); border: 1px solid var(--divider);
  border-radius: 12px; padding: 10px;
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
  page-break-inside: avoid;
  margin-bottom: 10px;
  display: inline-block;
  width: 100%;
}
.wst-card.on { border-color: var(--accent); }
.wst-preview {
  position: relative; border-radius: 8px; overflow: hidden;
  background: var(--card-alt); margin-bottom: 8px;
}
.wst-preview .ws-widget { position: relative; }
.wst-meta b { display: block; font-size: 13px; color: var(--text-1); }
.wst-meta span { display: block; font-size: 11px; color: var(--text-3); margin-top: 2px; line-height: 1.45; }

/* 每个组件一条独立透明度 */
.wst-op {
  display: flex; align-items: center; gap: 6px;
  margin: 8px 0; font-size: 11px; color: var(--text-3);
}
.wst-op label { flex: 0 0 auto; }
.wst-op input[type="range"] { flex: 1; min-width: 0; accent-color: var(--accent); }
.wst-op output { flex: 0 0 34px; text-align: right; color: var(--text-2); font-variant-numeric: tabular-nums; }

/* 皮肤小按钮：一排可点的底板缩略图 */
.wst-skinrow {
  display: flex; gap: 5px; overflow-x: auto; padding-bottom: 6px;
  margin-bottom: 8px; scrollbar-width: none;
}
.wst-skinrow::-webkit-scrollbar { display: none; }
.wst-skin {
  flex: 0 0 auto; width: 50px; padding: 3px; cursor: pointer;
  background: var(--card-alt); border: 1px solid var(--divider);
  border-radius: 8px; text-align: center;
}
.wst-skin i {
  display: block; width: 100%; height: 30px; border-radius: 5px;
  background: var(--divider) center/cover no-repeat;
}
.wst-skin span {
  display: block; font-size: 9px; color: var(--text-2); margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.wst-skin em {
  display: block; font-style: normal; font-size: 9px;
  color: var(--text-3); font-variant-numeric: tabular-nums;
}
.wst-skin.on { border-color: var(--accent); background: var(--accent-soft); }
.wst-skin.on em { color: var(--accent); font-weight: 600; }
/* 没买到的：不是灰掉就完事，右下角写「差多少钱」 */
.wst-skin.locked i { opacity: .45; }
.wst-skin.locked em { color: #c8899c; }
.wst-skin:active { transform: scale(.95); }

.wst-note {
  margin: 12px 16px 0; padding: 10px 12px; border-radius: 10px;
  background: var(--card-alt); color: var(--text-3);
  font-size: 11px; line-height: 1.7;
}

/* 电量：模拟条 + 8 档插画带 */
.wst-battbox {
  margin: 10px 16px 18px; padding: 12px; border-radius: 12px;
  background: var(--card); border: 1px solid var(--divider);
}
.wst-batt-label { font-size: 12px; color: var(--text-2); margin-bottom: 8px; }
.wst-batt-label b { color: var(--accent); font-variant-numeric: tabular-nums; }
.wst-battbox input[type="range"] { width: 100%; accent-color: var(--accent); }
.wst-battbox input[type="range"]:disabled { opacity: .45; }
.wst-battstrip {
  display: flex; gap: 4px; margin-top: 10px;
}
.wst-battstrip i {
  flex: 1; height: 40px; border-radius: 6px; opacity: .35;
  background: var(--divider) center/contain no-repeat;
  transition: opacity .18s ease, transform .18s ease;
}
.wst-battstrip i.on {
  opacity: 1; transform: scale(1.06);
  box-shadow: 0 0 0 2px var(--accent);
}

/* 桌面上那个电量组件本体 */
.ws-widget .ws-batt {
  position: relative; width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
}
.ws-batt-art {
  width: 74%; height: 88%; object-fit: contain;
}
.ws-batt-num {
  position: absolute; left: 0; right: 0; bottom: 12px; text-align: center;
  font-size: 13px; font-weight: 700; color: var(--accent);
  font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 3px rgba(0,0,0,.35);
}
/* 「真电量 / 模拟」必须标出来 —— 模拟的不能装成是真的 */
.ws-batt-tag {
  position: absolute; right: 6px; top: 6px;
  font-size: 9px; padding: 1px 5px; border-radius: 6px;
  background: rgba(0,0,0,.35); color: #fff;
}

/* v179.41 满电特效帧：爱心星光叠在电量面板上轻闪 */
.ws-batt-full {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: contain; pointer-events: none;
  animation: ws-batt-spark 1.6s ease-in-out infinite;
}
@keyframes ws-batt-spark {
  0%, 100% { opacity: .35; transform: scale(.96); }
  50% { opacity: .9; transform: scale(1.04); }
}

/* v179.41 组件皮肤双帧动画：coquette/envelope 用 .ws-anim::before/::after
   两个背景层交替透明度（帧URL由 html() 内联的 --sf0/--sf1 提供，走当前组件风格） */
.ws-widget { position: relative; }
.ws-widget.ws-anim::before,
.ws-widget.ws-anim::after {
  content: ''; position: absolute; inset: 0; z-index: 0;
  background-size: 100% 100%; pointer-events: none;
}
.ws-widget.ws-anim::before { background-image: var(--sf0); animation: ws-skin-fade-a 2.4s ease-in-out infinite; }
.ws-widget.ws-anim::after  { background-image: var(--sf1); animation: ws-skin-fade-b 2.4s ease-in-out infinite; }
.ws-widget.ws-anim > * { position: relative; z-index: 1; }
@keyframes ws-skin-fade-a { 0%, 48% { opacity: 1; } 50%, 100% { opacity: 0; } }
@keyframes ws-skin-fade-b { 0%, 48% { opacity: 0; } 50%, 100% { opacity: 1; } }

/* v179.41 组件风格选择器行 */
.wst-stylebar {
  display: flex; align-items: center; gap: 6px;
  margin: 0 16px 10px; padding: 8px 12px; border-radius: 10px;
  background: var(--card); border: 1px solid var(--divider);
}
.wst-stylebar > span { font-size: 12px; color: var(--text-2); margin-right: 2px; }
.wst-style {
  flex: 0 0 auto; padding: 5px 12px; cursor: pointer;
  font-size: 12px; color: var(--text-2);
  background: var(--card-alt); border: 1px solid var(--divider);
  border-radius: 8px;
}
.wst-style.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.wst-style:active { transform: scale(.95); }

/* ============ v179.63 线下电影化 ============ */
/* 透明立绘呈现：地面阴影 + 轮廓光 + 切换淡入 */
.mt-sprite img.mt-portrait {
  width: 100%; height: auto; object-fit: contain;
  filter: drop-shadow(0 14px 22px rgba(0,0,0,.42)) drop-shadow(0 0 0 rgba(0,0,0,0));
  transition: opacity .15s ease, filter .3s ease;
  opacity: 0;
}
.mt-sprite img.mt-portrait.in { opacity: 1; }
.mt-sprite.on img.mt-portrait {
  filter: drop-shadow(0 16px 26px rgba(0,0,0,.5)) drop-shadow(0 0 18px rgba(255,220,180,.18));
}
/* 立绘底部地面接触阴影 */
.mt-sprite::after {
  content:''; position:absolute; left:12%; right:12%; bottom:-8px; height:22px;
  background: radial-gradient(52% 100% at 50% 100%, rgba(0,0,0,.34), transparent 72%);
  z-index:-1; pointer-events:none;
}
/* 情绪粒子 */
.mt-burst {
  position:absolute; z-index:8; pointer-events:none;
  animation: mtBurst 1.1s ease-out forwards;
  text-shadow: 0 2px 8px rgba(0,0,0,.35);
}
@keyframes mtBurst {
  0% { transform: translateY(0) scale(.6); opacity: 0; }
  18% { opacity: 1; }
  100% { transform: translateY(-64px) scale(1.15); opacity: 0; }
}
/* 礼物飞入 */
.mt-gift {
  position:absolute; z-index:8; left:50%; top:24%; font-size:30px;
  animation: mtGift 1.4s ease-out forwards; pointer-events:none;
  text-shadow: 0 4px 12px rgba(0,0,0,.4);
}
@keyframes mtGift {
  0% { transform: translate(-50%, 60px) scale(.3); opacity: 0; }
  35% { opacity: 1; }
  70% { transform: translate(-50%, -26px) scale(1); opacity: 1; }
  100% { transform: translate(-50%, -70px) scale(1.05); opacity: 0; }
}
/* 全屏 CG 彩蛋 */
.mt-cg {
  position: fixed; inset: 0; z-index: 60;
  display: flex; align-items: center; justify-content: center;
  background: rgba(4,2,10,.86);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  animation: mtCgIn .5s ease both;
}
.mt-cg.out { animation: mtCgOut .45s ease both; }
@keyframes mtCgIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes mtCgOut { from { opacity: 1; } to { opacity: 0; } }
.mt-cg-bg { position:absolute; inset:0; background: radial-gradient(90% 70% at 50% 40%, rgba(60,36,90,.55), transparent 75%); }
.mt-cg-img {
  max-width: 78vw; max-height: 66vh; object-fit: contain;
  filter: drop-shadow(0 24px 60px rgba(0,0,0,.7)) saturate(1.06);
  animation: mtCgImg .8s .15s ease both;
}
@keyframes mtCgImg { from { transform: translateY(26px) scale(.94); opacity: 0; } to { transform: none; opacity: 1; } }
.mt-cg-cap {
  position:absolute; left: 50%; bottom: 14%; transform: translateX(-50%);
  width: 86%; max-width: 460px; text-align: center; color: #f3e8ff;
  padding: 14px 18px; border-radius: 14px;
  background: linear-gradient(180deg, rgba(24,14,40,.82), rgba(12,6,24,.92));
  border: 1px solid rgba(255,210,160,.28);
  box-shadow: 0 12px 40px rgba(0,0,0,.5);
  animation: mtCgCap 1s .55s ease both;
}
.mt-cg-cap b { display:block; font-size: 15px; letter-spacing: 4px; color: #ffd9a8; margin-bottom: 6px; }
.mt-cg-cap span { display:block; font-size: 13px; line-height: 1.7; color: #d9c8ee; }
@keyframes mtCgCap { from { transform: translate(-50%, 18px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }
.mt-cg-keep {
  position:absolute; left:50%; bottom: 5.5%; transform: translateX(-50%);
  padding: 8px 22px; border-radius: 20px; font-size: 13px;
  color: #1a0f26; background: linear-gradient(135deg, #ffd9a8, #ffb98a);
  border: none; cursor: pointer; font-weight: 700;
  box-shadow: 0 8px 24px rgba(255,190,120,.35);
  animation: mtCgCap 1s .8s ease both;
}
.mt-cg-keep:disabled { opacity: .7; }
.mt-cg-hint {
  position:absolute; right: 14px; bottom: 6px; font-size: 11px;
  color: rgba(255,255,255,.35); animation: mtCgCap 1s 1s ease both;
}

/* 场景电影感色调（v179.63） */
.mt-bg.mt-cafe { filter: saturate(1.06) sepia(.08) brightness(1.01); }
.mt-bg.mt-rain { filter: saturate(.86) hue-rotate(-8deg) brightness(.92) contrast(1.04); }
.mt-bg.mt-school { filter: saturate(1.03) sepia(.16) brightness(1.0); }
.mt-bg.mt-sea { filter: saturate(1.1) brightness(1.04); }
.mt-bg.mt-home { filter: saturate(1.04) sepia(.1) brightness(1.02); }

/* v179.63 fix：立绘默认可见，仅切换时短暂隐藏过渡 */
.mt-sprite img.mt-portrait { opacity: 1; }
.mt-sprite img.mt-portrait.swap { opacity: 0; }
