/* 云枢 · 国风雾堇紫（柔和堇紫 + 浅米白 · 治愈毛玻璃）
   改这里统一换肤。
   ============================================================ */

/* ===== 系统字体栈（跟随设备系统字体，不引入外部字体文件） =====
   system-ui / -apple-system / BlinkMacSystemFont 兜底全平台，
   HarmonyOS Sans SC 优先鸿蒙，PingFang SC 优先 iOS/macOS，
   Roboto 优先安卓，Noto Sans CJK SC 兜底中日韩。
   不使用外部 Web 字体，避免加载闪烁和额外体积。 */
:root {
  --font-display: system-ui, -apple-system, BlinkMacSystemFont, "HarmonyOS Sans SC", "PingFang SC", "Roboto", "Noto Sans CJK SC", sans-serif;
  /* 雾堇紫（主色 — 柔和低饱和的堇紫） */
  --primary: #8C7AA6;
  --primary-light: #A892C2;
  --primary-deep: #66517F;
  --primary-soft: #ECE7F4;
  --primary-glow: rgba(140,122,166,.20);

  /* 暖陶金（点缀 — 低饱和暖金，保留国风暖意） */
  --gold: #C7A98C;
  --gold-light: #DCC6B0;
  --gold-deep: #9C7B5E;
  --gold-soft: #F5EDE4;

  /* 纸墨系（背景/文字 — 浅米白，让毛玻璃透出柔和底色） */
  color-scheme: light;            /* 2026-08-12：改 light dark→light，阻止微信 X5/Chromium 深色模式对页面强制反色滤镜（会导致硬编码浅底+浅字看不清）；prefers-color-scheme 媒体查询仍生效，深色系统下走下方自己的深色令牌 */
  --bg: #FFFFFF;                  /* 白底（页面主色；浅色模式=纯白，深色模式见下方媒体查询） */
  --bg-card: rgba(255, 253, 250, 0.55);    /* 所有卡片统一半透明（毛玻璃） */
  --bg-card-solid: #FBF8F3;                 /* 极少数需要实底的场景 */
  --ink: #34303A;
  --ink-soft: #5C5566;
  --muted: #9A92A4;
  --line: rgba(140,122,166,.22);
  --line-strong: rgba(140,122,166,.34);

  /* 辅色 — 柔和国风系 */
  --rose: #C4889A;        /* 柔陶红 */
  --teal: #7FA0A0;        /* 山水青 */
  --amber: #C9A98C;       /* 琥珀 */

  /* 半径 & 阴影（大圆角 + 柔阴影） */
  --radius: 22px;
  --radius-sm: 16px;
  --radius-xs: 12px;
  --shadow-card: 0 4px 20px rgba(102,81,127,.08);
  --shadow-elevated: 0 12px 40px rgba(102,81,127,.14);
  --shadow-gold: 0 6px 20px rgba(199,169,140,.20);
  --maxw: 480px;
  /* 内页标题栏高度（2026-08-06 改版：透明 + 自适应矮栏，与 #modHead/#wyModuleHead 占位恒等） */
  --ph-h: calc(44px + var(--safe-top));
}

/* 系统深色模式：仅切换基础令牌；装饰性紫色（顶部条/抽屉标题/主按钮）保持不变 */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121118;                        /* 深色背景（近黑带极淡紫调） */
    --bg-card: rgba(255, 255, 255, 0.06); /* 深色毛玻璃卡片 */
    --bg-card-solid: #1E1B26;
    --ink: #ECE9F1;
    --ink-soft: #C7C2D2;
    --muted: #938DA0;
    --line: rgba(255, 255, 255, 0.12);
    --line-strong: rgba(255, 255, 255, 0.20);
  }
}

/* ============================================================
   全局移动端兼容基础样式（v1 · 2026-08-02 新增）
   ------------------------------------------------------------
   目标：iOS / 安卓 / 华为鸿蒙(ArkWeb) / 折叠屏 自适应兼容。
   原则：本块置于业务样式之前，优先级低于原有业务样式；
        仅补充兼容默认值，不覆盖既有布局/配色/字体。
   ============================================================ */
/* 安全区变量声明（供 .safe-top-wrap / .safe-bottom-wrap 及业务规则引用） */
html {
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  /* 以视口宽度的 1/37.5 作为 1rem 基准（375 设计稿下 1rem=10px）。
     说明：本项目业务样式全用 px，无 rem 布局依赖，故不会改变现有尺寸，
     仅为未来 rem 适配预留基准，并作为鸿蒙/iOS 字体缩放的兜底。 */
  font-size: calc(100vw / 37.5);
  -webkit-text-size-adjust: 100%;   /* 禁止鸿蒙、iOS 自动放大字体 */
  text-size-adjust: 100%;
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent; /* 消除鸿蒙、iOS 点击灰色高亮 */
}
body {
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;               /* 禁止横向滚动条 */
}
img {
  max-width: 100%;
  display: block;
  object-fit: contain;             /* 图片等比例缩放，禁止拉伸变形 */
}
button, input, textarea, select {
  font-family: inherit;             /* 输入框/按钮继承字体，避免 iOS 异形字体 */
}
/* 底部悬浮/操作栏避让底部手势导航条：给元素加 class="safe-bottom-wrap" */
.safe-bottom-wrap { padding-bottom: var(--safe-bottom); }
/* 顶部导航/标题头避让状态栏、挖孔：给元素加 class="safe-top-wrap" */
.safe-top-wrap { padding-top: var(--safe-top); }

/* ===== 基础 ===== */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
/* 整页锁 100vh：html + body 都不滚，只有内部主滚动区滚
   （同时预防 html 自身 overflow:visible 在 body 内容超出时把页面整体滚走）
   首页例外：home-page 用自然流布局，html/body 正常滚 */
html { overflow: hidden; height: 100vh; height: 100dvh; scrollbar-gutter: stable; }
@supports not (scrollbar-gutter: stable) {
  /* 旧版浏览器兜底：强制始终保留滚动条槽位 */
  html { overflow-y: hidden; }
}
.home-page, .home-page html {
  overflow: auto; height: auto;
}
body {
  font-family: var(--font-display);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

/* ============================================================
   🎨 统一 UI 设计系统（v1 · 2026-07-30 锁版）
   ------------------------------------------------------------
   所有页面必须用这 7 个核心类，不要再写内联 padding/margin，
   不要自己魔数。改了这里的样式等于改了全站。
   ------------------------------------------------------------
   .ui-page      页面容器（统一左右 16px 边距 + 滚动）
   .ui-header    内页标题头（返回 + 居中标题 + 右侧操作）
   .ui-search    搜索框（输入 + 右侧紫色搜索按钮）
   .ui-input     文本输入框（统一高度/圆角/边框）
   .ui-card      毛玻璃半透明卡片
   .ui-action    长按/左滑触发的置顶/删除菜单
   .ui-tabbar    底部菜单
   ============================================================ */

/* ----- UI 令牌（这里改 = 全站改） ----- */
:root {
  --pad-x: 16px;          /* 全站左右内边距（页面边距标准） */
  --pad-y: 12px;          /* 通用上下内边距 */
  --gap: 10px;            /* 通用元素间距 */
  --input-h: 44px;        /* 输入框统一高度 */
  --tabbar-h: 68px;       /* 底部菜单统一高度（已加高，图标/文字同步放大） */
  --header-h: 52px;       /* 内页标题头统一高度 */
  --search-h: 40px;       /* 搜索框统一高度 */
  --card-blur: 22px;      /* 毛玻璃模糊半径 */

  /* ===== 悬浮圆形按钮统一规范（rpx 语义，2026-08-07 第五版） =====
     纯 H5（嵌微信 webview）浏览器不原生识别 rpx 单位，故用 CSS 变量模拟：
     750rpx = 视口宽；大屏/折叠屏展开时以 480 封顶，按钮不膨胀、跨机型视觉一致。
     第五版：直径 85rpx / 图标 36rpx / 离底 240rpx（物理底边基准）/ 离右 70rpx / 多钮间距 12rpx。
     离底 240rpx = 约 120px（375px 视口），既保证 dock 高的云枢页（dock ~180-200px）按钮不撞 dock，
     也让其他页面按钮距屏幕底留出适度呼吸空间。全部页面统一走本变量，禁止页面自写。 */
  --rpx: calc(min(100vw, 480px) / 750);
  --fab-size: calc(85 * var(--rpx));                       /* 外圆直径 85rpx */
  --fab-icon: calc(36 * var(--rpx));                       /* 内部图标 36rpx */
  --fab-gap: calc(12 * var(--rpx));                        /* 多钮同屏间距 12rpx */
  --fab-bottom: calc(240 * var(--rpx));                    /* 离物理底 240rpx（不加 safe-area，基准=屏幕最底端） */
  --fab-right: calc(70 * var(--rpx));                      /* 离右 70rpx（向左偏移，不贴右缘） */
  --fab-clear: calc(var(--fab-bottom) + var(--fab-size) + var(--fab-gap)); /* 内容避让基准：单钮簇上缘 */

  /* ============================================================
     【全局 UI 强制统一标准 · 2026-08-07 大改版】
     所有页面/组件必须走这套变量，禁止页面内自写魔法数字。
     - 左右外边距统一 16px
     - 底部手势安全边距统一 34px（在 safe-area 之上再叠加）
     - 卡片 / 弹窗 / 输入框：圆角 16px、内边距 16px
     - 按钮 / 胶囊 / 图标：尺寸、圆角、配色、动效全站一致
     ============================================================ */
  --page-pad: 16px;                                    /* 左右外边距（全站统一） */
  --gesture-safe: 34px;                                /* 底部手势条安全边距 */
  --bottom-safe: calc(var(--gesture-safe) + var(--safe-bottom)); /* 实际底部留白 = 34px + 机型安全区 */
  --radius-card: 16px;                                 /* 卡片/弹窗/输入框统一圆角 */
  --radius-pill: 999px;                                /* 胶囊全圆角 */
  --card-pad: 16px;                                    /* 卡片/弹窗统一内边距 */
  --gap-sm: 8px;
  --gap-md: 12px;
  --gap-lg: 16px;
  /* 按钮体系 */
  --btn-h: 44px;                                       /* 主按钮高度（触控友好 ≥44px） */
  --btn-h-sm: 34px;                                    /* 次级按钮高度 */
  --btn-radius: var(--radius-card);
  /* 胶囊体系（云枢首页快捷胶囊栏 / 标签） */
  --chip-h: 32px;
  --chip-pad-x: 14px;
  --chip-radius: var(--radius-pill);
  --chip-font: 13px;
  /* 图标按钮体系（顶部导航左右图标） */
  --icon-btn: 36px;                                    /* 点击热区 */
  --icon-size: 22px;                                   /* 图标本体 */
  --nav-icon-inset: var(--page-pad);                   /* 顶部导航图标距屏幕边距 */
  /* 统一过渡曲线（premium 手感） */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-fast: .18s;
  --dur: .28s;
  --dur-slow: .38s;
  /* 遮罩 */
  --mask-bg: rgba(24, 20, 32, .42);
}

/* ----- 1. .ui-page 页面容器 ----- */
.ui-page {
  flex: 1 1 0; min-height: 0;
  overflow-y: auto; overflow-x: hidden;
  padding-left: var(--pad-x); padding-right: var(--pad-x);
  box-sizing: border-box;
  -webkit-overflow-scrolling: touch;
}
.ui-page--home { padding: 0; }    /* 首页用自然流，padding 由内部 section 决定 */

/* ----- 2. .ui-header 内页标题头 ----- */
.ui-header {
  flex: 0 0 auto;
  min-height: calc(var(--header-h) + var(--safe-top));
  height: calc(var(--header-h) + var(--safe-top));
  display: flex; align-items: center; gap: 10px;
  padding: var(--safe-top) var(--pad-x) 0;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom: 1px solid var(--line);
  position: relative; z-index: 5;
}
.ui-header__back {
  width: 34px; height: 34px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; background: rgba(255,255,255,.5);
  color: var(--primary-deep); flex-shrink: 0;
}
.ui-header__back svg { width: 18px; height: 18px; }
.ui-header__title {
  flex: 1 1 0; min-width: 0;
  text-align: center;
  font-size: 16px; font-weight: 600; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ui-header__action {
  width: 34px; height: 34px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; background: rgba(255,255,255,.5);
  color: var(--primary-deep); flex-shrink: 0;
}
.ui-header__action svg { width: 18px; height: 18px; }

/* ----- 3. .ui-search 搜索框（截图样式：浅米色实底 + 右侧紫色圆形搜索按钮） ----- */
.ui-search {
  display: flex; align-items: center; gap: 6px;
  height: var(--search-h);
  padding: 0 5px 0 14px;
  background: #F7F4EE;
  border: 1px solid rgba(140,122,166,.10);
  border-radius: 999px;
  box-sizing: border-box;
  transition: border-color .2s, box-shadow .2s;
}
.ui-search:focus-within {
  border-color: rgba(140,122,166,.32);
  box-shadow: 0 0 0 3px rgba(140,122,166,.08);
}
.ui-search__input {
  flex: 1 1 0; min-width: 0;
  border: 0; outline: 0; background: transparent;
  font: inherit; color: var(--ink);
  height: 100%;
  padding: 0 2px;
}
.ui-search__input::placeholder { color: var(--muted); }
.ui-search__btn {
  flex: 0 0 auto;
  width: 30px; height: 30px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; padding: 0; cursor: pointer;
  border-radius: 50%;
  background: var(--primary); color: #fff;
  transition: background .15s, transform .15s;
}
.ui-search__btn:hover { background: var(--primary-deep); }
.ui-search__btn:active { transform: scale(.92); }
.ui-search__btn svg { width: 15px; height: 15px; fill: currentColor; }

/* ----- 3b. 全局搜索组件 v1（2026-08-06）：放大镜图标 + 弹窗输入 -----
   替代占一整行的 .ui-search 输入框，列表页只留 34px 图标，点开弹窗搜索。
   行业资讯 / 历史聊天 统一复用。 */
.ui-search-icon {
  flex: 0 0 auto;
  width: 32px; height: 32px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid rgba(140,122,166,.22); padding: 0; cursor: pointer;
  border-radius: 50%;
  background: #F7F4EE; color: var(--primary-deep);
  transition: background .15s, color .15s, transform .15s, border-color .15s;
  -webkit-tap-highlight-color: transparent;
}
.ui-search-icon svg { width: 17px; height: 17px; }
.ui-search-icon:active { transform: scale(.9); }
/* 有生效关键词时高亮，提示用户当前是过滤状态 */
.ui-search-icon.is-active {
  background: var(--primary); color: #fff; border-color: transparent;
  box-shadow: 0 2px 8px rgba(140,122,166,.32);
}
/* 列表页把放大镜图标靠右排，取代旧版整行 .ui-search 输入框的位置 */
.list-searchbar { display: flex; justify-content: flex-end; align-items: center; padding: 8px var(--pad-x); }
/* 列表页：分类标签 + 搜索图标同行（标签靠左、搜索靠右，不单独占行） */
.tabs-row {
  display: flex; align-items: center; gap: 10px;
  padding: 0 14px;
}
.tabs-row .tabs {
  flex: 1 1 auto; min-width: 0;
  padding-left: 0; padding-right: 0;
}
.tabs-row .ui-search-icon { flex: 0 0 auto; }

.ui-search-mask {
  position: fixed; inset: 0; z-index: 3000;
  display: flex; align-items: flex-start; justify-content: center;
  padding: 22vh 20px 0;
  background: rgba(20,18,15,.42);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  opacity: 0; transition: opacity .2s ease;
}
.ui-search-mask.show { opacity: 1; }
.ui-search-box {
  width: 100%; max-width: 340px;
  background: var(--bg-card-solid, #fff);
  border-radius: 18px;
  box-shadow: 0 18px 48px rgba(60,48,80,.28);
  padding: 18px 18px 14px;
  transform: translateY(-10px) scale(.97);
  transition: transform .22s cubic-bezier(.16,1,.3,1);
}
.ui-search-mask.show .ui-search-box { transform: translateY(0) scale(1); }
.ui-search-box__title {
  font-size: 15px; font-weight: 700; color: var(--ink);
  letter-spacing: 1px; text-align: center; margin-bottom: 12px;
}
.ui-search-box__field {
  display: flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 10px 0 12px;
  background: #F7F4EE;
  border: 1px solid rgba(140,122,166,.14);
  border-radius: 999px;
}
.ui-search-box__field:focus-within {
  border-color: rgba(140,122,166,.4);
  box-shadow: 0 0 0 3px rgba(140,122,166,.09);
}
.ui-search-box__ico { display: inline-flex; color: var(--muted); }
.ui-search-box__ico svg { width: 16px; height: 16px; }
.ui-search-box__input {
  flex: 1 1 0; min-width: 0; height: 100%;
  border: 0; outline: 0; background: transparent;
  font: inherit; font-size: 14px; color: var(--ink);
  -webkit-appearance: none;
}
.ui-search-box__input::-webkit-search-cancel-button { display: none; }
.ui-search-box__clear {
  flex: 0 0 auto; width: 22px; height: 22px; border: 0; padding: 0; cursor: pointer;
  border-radius: 50%; background: rgba(140,122,166,.12); color: var(--muted);
  font-size: 15px; line-height: 1;
}
.ui-search-box__actions { display: flex; gap: 10px; margin-top: 14px; }
.ui-search-box__btn {
  flex: 1; height: 38px; border: 0; cursor: pointer;
  font: inherit; font-size: 14px; font-weight: 600; letter-spacing: 1px;
  border-radius: 999px;
  transition: background .15s, transform .12s;
}
.ui-search-box__btn:active { transform: scale(.97); }
.ui-search-box__btn.is-main { background: var(--primary); color: #fff; }
.ui-search-box__btn.is-ghost { background: rgba(140,122,166,.10); color: var(--ink-soft); }

/* ----- 3c. 全局长按多选组件 v1（2026-08-06）-----
   长按 2 秒进入多选，顶部浮出「全选 / 删除 / 取消」条；条目左侧出现勾选圈。
   云枢对话、投笺信件等空间紧张的列表统一复用。 */
.lps-bar {
  position: fixed; left: 50%; transform: translateX(-50%) translateY(-120%);
  top: calc(env(safe-area-inset-top, 0px) + 8px);
  width: calc(100% - 24px); max-width: calc(var(--maxw) - 24px);
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px;
  background: rgba(255,255,255,.94);
  -webkit-backdrop-filter: blur(14px) saturate(180%); backdrop-filter: blur(14px) saturate(180%);
  border: 1px solid rgba(140,122,166,.18);
  border-radius: 14px;
  box-shadow: 0 8px 26px rgba(60,48,80,.18);
  z-index: 2500;
  opacity: 0; pointer-events: none;
  transition: transform .26s cubic-bezier(.16,1,.3,1), opacity .2s ease;
}
.lps-bar.show { transform: translateX(-50%) translateY(0); opacity: 1; pointer-events: auto; }
.lps-bar__count { flex: 1; text-align: center; font-size: 12.5px; color: var(--ink-soft); white-space: nowrap; }
.lps-bar__btn {
  flex: 0 0 auto; height: 30px; padding: 0 12px; border: 0; cursor: pointer;
  font: inherit; font-size: 13px; font-weight: 600;
  border-radius: 999px; background: var(--primary); color: #fff;
  transition: transform .12s, opacity .15s;
}
.lps-bar__btn:active { transform: scale(.94); }
.lps-bar__btn.is-danger { background: #C3272B; }
.lps-bar__btn.is-ghost { background: rgba(140,122,166,.12); color: var(--ink-soft); }
/* 多选态：条目左侧让出勾选圈的位置 */
.lps-mode [class*="lps-item"],
.lps-mode .lps-target { position: relative; }
.lps-mode .lps-target::before {
  content: ''; position: absolute; left: 4px; top: 50%; transform: translateY(-50%);
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid rgba(140,122,166,.5); background: #fff;
  z-index: 5; transition: background .15s, border-color .15s;
}
.lps-mode .lps-target { padding-left: 30px !important; }
.lps-mode .lps-target.lps-on::before {
  background: var(--primary); border-color: var(--primary);
  box-shadow: inset 0 0 0 2px #fff;
}
.lps-mode .lps-target.lps-on { background: rgba(140,122,166,.07); }
/* 长按多选：兼容云枢对话行(.msg-row-ai)与投笺信笺行(.slide-row) */
.lps-mode .slide-row,
.lps-mode .msg-row-ai { position: relative; }
.lps-mode .slide-row.lps-on::after,
.lps-mode .msg-row-ai.lps-on::after {
  content: '✓'; position: absolute; left: 6px; top: 6px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--primary); color: #fff; font-size: 12px; line-height: 18px; text-align: center;
  z-index: 6; box-shadow: 0 1px 3px rgba(60,48,80,.3);
}
.lps-mode .slide-row.lps-on,
.lps-mode .msg-row-ai.lps-on { background: rgba(140,122,166,.07); }

/* ----- 4. .ui-input 文本输入框（统一复用聊天栏截图样式：白色底 + 18px 圆角矩形 + 38px 高） ----- */
.ui-input {
  display: block; width: 100%;
  height: 38px;
  padding: 0 14px;
  font: inherit; color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  outline: 0;
  box-sizing: border-box;
  transition: border-color .2s, box-shadow .2s;
}
.ui-input:focus {
  border-color: rgba(140,122,166,.32);
  box-shadow: 0 0 0 3px rgba(140,122,166,.08);
}
.ui-input::placeholder { color: var(--muted); }
textarea.ui-input {
  height: auto; min-height: 96px;
  padding: 10px 14px; line-height: 1.6;
  border-radius: 18px; resize: vertical;
}

/* ----- 4a. .ui-chat-bar 聊天输入栏（标准组件 · 两行布局）
   行1：输入框（自动向上扩展 1→2→3 行）
   行2：左对齐 表情+图片 | 右对齐 麦克风+发送（缩小版）
   这是全平台统一的"聊天输入框组件"，其他页面可复用 .ui-input 类 ----- */
.ui-chat-bar {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(var(--tabbar-h, 68px) + 14px + env(safe-area-inset-bottom, 0px));
  width: 100%; max-width: var(--maxw);
  display: flex; flex-direction: column; gap: 9px;
  padding: 9px var(--pad-x);
  background: var(--bg);       /* 不透明（用户要求） */
  border-top: 1px solid var(--line);
  z-index: 15;
  box-sizing: border-box;
}
/* iframe 内嵌模式（云枢/行业资讯/抒箴）：无底部导航栏，输入栏贴最底端 */
.embed-mode .ui-chat-bar {
  bottom: env(safe-area-inset-bottom, 0px);
}
/* 聊天面板全屏打开时（历史聊天面板），输入条直接贴底 */
body:has(.chat-panel.show) .ui-chat-bar {
  bottom: 0;
}
/* 第一行：输入框 —— 默认 36px，可向上扩展到 2-3 行（max 84px ≈ 3 行 × 28 line-height） */
.ui-chat-bar__row { width: 100%; }
.ui-chat-bar__row > .ui-input {
  width: 100%; height: 54px;
  resize: none; overflow: hidden;
  -ms-overflow-style: none; scrollbar-width: none;
  line-height: 54px;
  font-size: 14px;
}
.ui-chat-bar__row > textarea.ui-input {
  height: auto; min-height: 54px; max-height: 126px;
  line-height: 1.4; padding: 8px 12px;
  transition: height .12s ease;
}
/* 第二行：左对齐工具按钮组 + 右对齐功能按钮组 */
.ui-chat-bar__tools {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%;
  height: 48px;
}
.ui-chat-bar__tools-left,
.ui-chat-bar__tools-right {
  display: flex; align-items: center; gap: 4px;
}
.ui-chat-bar__tool {
  flex: 0 0 auto; width: 36px; height: 36px;   /* 输入组件整体压缩（原 48px） */
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; padding: 0; cursor: pointer;
  background: transparent; color: var(--ink-soft);
  border-radius: 50%;
  transition: background .15s, color .15s, transform .15s;
}
.ui-chat-bar__tool:hover { background: rgba(140,122,166,.10); color: var(--primary); }
.ui-chat-bar__tool:active { transform: scale(.92); }
.ui-chat-bar__tool svg { width: 20px; height: 20px; fill: none; stroke: currentColor; }
/* 发送按钮 */
.ui-chat-bar__send {
  flex: 0 0 auto; height: 36px;   /* 输入组件整体压缩（原 48px） */
  padding: 0 16px;
  border: 0; cursor: pointer; font: inherit; font-size: 14px; font-weight: 500;
  background: var(--primary); color: #fff;
  border-radius: 999px;
  transition: background .15s, transform .15s;
}
.ui-chat-bar__send:hover { background: var(--primary-deep); }
.ui-chat-bar__send:active { transform: scale(.96); }
.ui-chat-bar__send:disabled { background: var(--muted); cursor: not-allowed; }
/* 表情按钮激活态 */
.ui-chat-bar__tool.is-active { background: rgba(140,122,166,.16); color: var(--primary); }

/* 表情选择面板：绝对浮于输入栏上方，实色不透明（挂靠相对定位的 .ui-chat-bar） */
.emoji-panel {
  position: absolute; bottom: calc(100% + 6px); left: var(--pad-x); right: var(--pad-x);
  display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px;
  padding: 8px;
  background: var(--bg);                 /* 不透明 */
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 8px 30px rgba(40,30,60,.18);
  z-index: 9999;                          /* 置于所有弹窗之上 */
  max-height: 180px; overflow-y: auto;
}
.emoji-panel[hidden] { display: none; }
.emoji-panel__btn {
  border: 0; background: transparent; cursor: pointer;
  font-size: 22px; line-height: 1; padding: 6px 0; border-radius: 8px;
  transition: background .12s, transform .12s;
}
.emoji-panel__btn:hover { background: rgba(140,122,166,.12); transform: scale(1.18); }
.emoji-panel__btn:active { transform: scale(.92); }

/* 附件类型选择菜单（点击 + 弹出，二选一） */
.attach-menu {
  position: absolute; bottom: calc(100% + 6px); left: var(--pad-x);
  display: flex; flex-direction: column; gap: 2px;
  padding: 6px; min-width: 140px;
  background: var(--bg);                 /* 不透明，与表情面板一致 */
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 8px 30px rgba(40,30,60,.18);
  z-index: 20;
}
.attach-menu[hidden] { display: none; }
.attach-menu__item {
  display: flex; align-items: center; gap: 10px;
  width: 100%; border: 0; background: transparent; cursor: pointer;
  padding: 10px 12px; border-radius: 10px;
  font: inherit; font-size: 14px; color: var(--ink); text-align: left;
  transition: background .12s, transform .12s;
}
.attach-menu__item:hover { background: rgba(140,122,166,.10); }
.attach-menu__item:active { transform: scale(.98); }
.attach-menu__ico { font-size: 18px; flex: 0 0 auto; line-height: 1; }

/* 待发送附件预览 */
.attach-preview {
  display: flex; flex-wrap: wrap; gap: 8px;
  width: 100%; padding: 2px 0;
}
.attach-preview[hidden] { display: none; }
.attach-thumb, .attach-file {
  position: relative; display: inline-flex; align-items: center;
  border: 1px solid var(--line); border-radius: 10px;
  background: rgba(140,122,166,.06); overflow: hidden;
}
.attach-thumb { width: 56px; height: 56px; }
.attach-thumb__img { width: 100%; height: 100%; object-fit: cover; display: block; }
.attach-file { padding: 8px 10px; gap: 8px; max-width: 200px; }
.attach-file__ico { font-size: 20px; flex: 0 0 auto; }
.attach-file__meta { display: flex; flex-direction: column; min-width: 0; }
.attach-file__name { font-size: 12px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.attach-file__size { font-size: 10px; color: var(--muted); }
.attach-remove {
  position: absolute; top: -6px; right: -6px;
  width: 18px; height: 18px; line-height: 16px; text-align: center;
  border: 0; border-radius: 50%; cursor: pointer;
  background: #C3272B; color: #fff; font-size: 13px; padding: 0;
  box-shadow: 0 1px 4px rgba(0,0,0,.3);
}
.attach-remove:hover { background: #a51f23; }

/* 消息气泡内的附件 */
.msg-attachments { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.msg-att--img { max-width: 160px; border-radius: 10px; overflow: hidden; }
.msg-att--img img { width: 100%; display: block; border-radius: 10px; }
.msg-att--file {
  display: flex; align-items: center; gap: 8px; max-width: 220px;
  padding: 8px 10px; border-radius: 10px;
  background: rgba(140,122,166,.10); border: 1px solid var(--line);
}
.msg-att--file .msg-att-ico { font-size: 20px; flex: 0 0 auto; }
.msg-att--file .msg-att-meta { display: flex; flex-direction: column; min-width: 0; }
.msg-att--file .msg-att-name { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msg-att--file .msg-att-size { font-size: 10px; opacity: .7; }


/* ----- 4b. .ui-input-bar 左输入 + 右发送 ----- */
.ui-input-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 0;
}
.ui-input-bar .ui-input { flex: 1 1 0; min-width: 0; }
.ui-input-bar__send {
  flex: 0 0 auto;
  height: var(--input-h);
  padding: 0 18px;
  border: 0; cursor: pointer; font: inherit; font-weight: 500;
  background: var(--primary); color: #fff;
  border-radius: var(--radius-xs);
  transition: background .15s, transform .15s;
}
.ui-input-bar__send:hover { background: var(--primary-deep); }
.ui-input-bar__send:active { transform: scale(.96); }
.ui-input-bar__send:disabled { background: var(--muted); cursor: not-allowed; }

/* ----- 5. .ui-card 毛玻璃半透明卡片 ----- */
.ui-card {
  background: var(--bg-card);
  backdrop-filter: blur(var(--card-blur)) saturate(180%);
  -webkit-backdrop-filter: blur(var(--card-blur)) saturate(180%);
  border: 1px solid rgba(255,255,255,.6);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 14px 16px;
  box-sizing: border-box;
}
.ui-card--flat { padding: 0; }
.ui-card--tight { padding: 8px 12px; }

/* ----- 6. .ui-action 长按/左滑操作菜单 ----- */
.ui-action { display: block; position: relative; overflow: hidden; }
.ui-action__row { display: block; transition: transform .25s ease; will-change: transform; }
.ui-action__body { position: relative; z-index: 2; background: var(--bg); }
.ui-action__menu {
  position: absolute; top: 0; right: -120px; height: 100%;
  display: flex; align-items: stretch; z-index: 1;
  transition: right .25s ease;
}
.ui-action--open .ui-action__row { transform: translateX(-100px); }
.ui-action--open .ui-action__menu { right: 0; }
.ui-action__btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 50px; height: 100%;
  border: 0; padding: 0; cursor: pointer;
  color: #fff; font-size: 13px;
}
.ui-action__btn--top { background: var(--primary); }
.ui-action__btn--del { background: var(--rose); }
.ui-action__btn:active { filter: brightness(.9); }

/* ----- 7. .ui-tabbar 底部菜单 ----- */
.ui-tabbar {
  flex: 0 0 var(--tabbar-h);
  height: var(--tabbar-h);
  display: flex; align-items: stretch;
  background: var(--bg);   /* 跟随系统深浅：浅色=纯白，深色=近黑 */
  backdrop-filter: blur(var(--card-blur)) saturate(200%);
  -webkit-backdrop-filter: blur(var(--card-blur)) saturate(200%);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.ui-tabbar__item {
  flex: 1 1 0; min-width: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; cursor: pointer;
  color: var(--muted); font-size: 11px;
  background: transparent; border: 0; padding: 0;
}
.ui-tabbar__item--active { color: var(--primary-deep); }
.ui-tabbar__item svg { width: 20px; height: 20px; fill: currentColor; }
/* 所有内页锁 100vh：头部/底部固定不动，中间内容区自己滚 */
body:not(.home-page) {
  overflow: hidden;
  height: 100vh;
  height: 100dvh;
}
/* 详情页（notice/form）：用 html 作滚动容器，解除 body/app 固定锁 */
html.notice-body-html, html.form-detail-html {
  overflow-y: auto !important;
  min-height: 100dvh;
}
body.notice-body, body.form-detail-page {
  overflow: visible !important;
  height: auto !important;
}
body.notice-body .app, body.form-detail-page .app {
  height: auto !important;
  min-height: auto !important;
  max-height: none !important;
  overflow: visible !important;
  display: block !important;
  flex: none !important;
}
a { color: inherit; text-decoration: none; }
.app {
  max-width: var(--maxw); margin: 0 auto;
  background: var(--bg);   /* 浅色=纯白，深色=近黑（不再用淡紫渐变） */
}
/* 内页（非首页）：flex column 锁定 100vh，内部主区自己滚 */
.home-page .app {
  /* 首页改为固定布局：顶部 header + 可滚动内容区 + 底部菜单，全部固定不随 body 滚 */
  height: 100vh; height: 100dvh; overflow: hidden;
  display: flex; flex-direction: column;
  padding-bottom: 0;
}
body:not(.home-page) .app {
  height: 100vh; height: 100dvh; overflow: hidden;
  display: flex; flex-direction: column;
}
.center { text-align: center; }
.muted { color: var(--muted); font-size: 13px; }

/* 雾霭底纹：已去除（背景改为纯色，浅色=纯白，深色=近黑，跟随系统） */
body::before {
  content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  opacity: 1;
  background: transparent;
}

/* ===== 顶部品牌条（雾堇紫玻璃条） ===== */
.topbar {
  background: linear-gradient(160deg, var(--primary-deep) 0%, var(--primary) 55%, var(--primary-light) 100%);
  color: #fff; padding: 14px 16px 18px;
  border-radius: 0 0 22px 22px;
  position: relative; overflow: hidden;
  display: flex; align-items: center;
  box-shadow: 0 6px 26px rgba(102,81,127,.28);
}
.topbar::after {
  content: ''; position: absolute; right: -10px; top: -20px;
  width: 100px; height: 100px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 50%;
}
.topbar::before {
  content: ''; position: absolute; left: 30%; bottom: -20px;
  width: 60px; height: 60px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 50%;
}
.brand { display: flex; align-items: baseline; gap: 10px; position: relative; z-index: 1; }
.brand .logo { font-size: 24px; font-weight: 700; letter-spacing: 6px; }
.brand .sub { font-size: 11px; opacity: .85; letter-spacing: 2px; }
.page-title {
  flex: 1; text-align: center; font-size: 17px; font-weight: 600; color: #fff;
  position: relative; z-index: 1;
}
.topbar-back {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; color: #fff; text-decoration: none;
  position: relative; z-index: 1; opacity: .85; flex-shrink: 0;
}
.topbar-back:hover { opacity: 1; }


/* ===== 卡片 ===== */
.card {
  background: var(--bg-card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-card);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  padding: 16px; margin: 12px;
}
.card h3 { margin: 0 0 4px; font-size: 17px; }


/* ===== 内页统一标题头（page-header · 国风雾堇紫） =====
   与首页卡片同调：紫粉渐变 + 透白云朵 + 底部大圆弧波浪造型
   主标大字号、副标小字号，文字水平居中，整段垂直居中
   底部用 SVG mask 削出大圆弧（参考稿：先一道深紫连绵山丘，再米白底） */
.page-header {
  /* 全局统一标题头 full-bleed：position:fixed 脱离 .app（overflow:hidden）的裁剪，
     直接撑满整个视口宽 → 左右零白条；同时 .app 可保持 overflow:hidden（不产生横向滚动容器，
     右滑手势不再"拖拽跟随页面位移"）。#modHead/#wyModuleHead 已用 min-height 占位补偿。 */
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 40;
  width: auto;
  margin: 0;
  overflow: visible;           /* 不再裁剪（原 mask 波浪已移除） */
  padding: calc(8px + var(--safe-top)) 16px 8px;   /* 自适应矮栏：上下仅留 8px，压缩多余空白 */
  min-height: var(--ph-h);     /* 与 #modHead 占位恒等，零空隙；内容更高时自动撑开 */
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  color: var(--ink);           /* 透明栏上用墨色字（深浅主题自适应） */
  background: transparent;     /* 完全透明，无紫波浪/无背景图案 */
  box-shadow: none;
  border-bottom: 1px solid var(--line);   /* 细分隔线（结构线，非背景图案） */
  -webkit-mask-image: none;
          mask-image: none;
}
/* 标题栏占位：floatHead 模式下 #modHead 为空（悬浮按钮 fixed 不占流），min-height 降为 0 */
#modHead,
#wyModuleHead {
  min-height: 0;
  flex-shrink: 0;
}

/* ===== 悬浮返回/搜索按钮（裸图标·无圈·右下角 fixed） ===== */
.float-back-btn,
.float-search-btn {
  position: fixed;
  bottom: var(--fab-bottom);
  right: var(--fab-right);
  z-index: 45;
  width: auto;
  height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rpx;
  background: none;
  border: none;
  box-shadow: none;
  color: var(--ink);
  font-size: 0;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, opacity 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}
/* 搜索悬浮钮：位于返回钮正上方；返回钮放大至 64rpx 后，上方间距抬至 76rpx 避免重叠 */
.float-search-btn {
  bottom: calc(var(--fab-bottom) + 76rpx);
}
.float-back-btn:hover,
.float-back-btn:active,
.float-search-btn:hover,
.float-search-btn:active {
  transform: scale(0.9);
  opacity: 0.65;
}
.float-back-btn svg,
.float-search-btn svg {
  width: var(--fab-icon);
  height: var(--fab-icon);
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
/* 返回钮图标：放大一倍（约 64rpx）+ 夹角更大（SVG 左箭头，90° 开口），醒目且统一 */
.float-back-btn svg {
  width: calc(64 * var(--rpx));
  height: calc(64 * var(--rpx));
  stroke-width: 2.6;
}
/* 暗色主题适配 */
@media (prefers-color-scheme: dark) {
  .float-back-btn,
  .float-search-btn {
    color: #e0e0e0;
  }
}
/* ===== 非首页子页面控件：顶部工具条固定，返回钮已移至右下角（左侧不再需要让位） ===== */
/* 行业资讯：分类栏 + 搜索框 → 顶部通栏 */
body.zhaoce-body .zhaoce-toolbar {
  position: fixed;
  top: calc(10px + var(--safe-top));
  left: 12px;
  right: 12px;
  z-index: 44;
  padding: 0;
  height: 36px;
  background: var(--bg);
  border-radius: 8px;
}
body.zhaoce-body .zhaoce-grid { padding-top: calc(var(--safe-top) + 8px); }

/* 预约报名登记页：分类栏 + 搜索框 → 顶部通栏 */
body.forms-page .tabs-row {
  position: fixed;
  top: calc(10px + var(--safe-top));
  left: 12px;
  right: 12px;
  z-index: 44;
  padding: 0;
  height: 36px;
  background: var(--bg);
  border-radius: 8px;
}
body.forms-page .note-grid { padding-top: calc(var(--safe-top) + 8px); }

/* 通知公告页：分类栏 + 搜索框 → 顶部通栏 */
body.notices-page .tabs-row {
  position: fixed;
  top: calc(10px + var(--safe-top));
  left: 12px;
  right: 12px;
  z-index: 44;
  padding: 0;
  height: 36px;
  background: var(--bg);
  border-radius: 8px;
}
body.notices-page .note-grid { padding-top: calc(var(--safe-top) + 8px); }

/* ===== 全局多悬浮按钮垂直堆叠规则（右下角） =====
   任意页面 ≥2 个悬浮圆钮：以返回钮为基准锚点（离物理底 120rpx / 离右 60rpx），
   其余按钮沿正上方依次垂直排列、水平完全对齐（统一贴 right:60rpx），相邻间距 12rpx。
   示例：好友列表 返回→搜索→三横（column-reverse：HTML 首个子元素 search 贴近返回钮）。 */
.wy-friends-search-row {
  position: fixed;
  bottom: calc(var(--fab-bottom) + var(--fab-size) + var(--fab-gap));
  right: var(--fab-right);
  z-index: 44;
  display: flex;
  flex-direction: column-reverse;   /* 垂直堆叠：首个按钮（搜索）在下方贴近返回钮 */
  align-items: flex-end;            /* 水平右对齐，与返回钮贴齐 right:60rpx */
  gap: var(--fab-gap);
}
/* 通讯录/搜索/添加 三按钮统一圆形样式 */
.wy-friends-action-btn {
  position: relative;
  flex: 0 0 var(--fab-size);
  width: var(--fab-size); height: var(--fab-size);
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; cursor: pointer;
  background: rgba(255,255,255,.88); backdrop-filter: blur(8px);
  border: 1px solid rgba(140,122,166,.16);
  color: var(--primary-deep);
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
  -webkit-tap-highlight-color: transparent;
  padding: 0;
}
.wy-friends-action-btn svg { width: var(--fab-icon); height: var(--fab-icon); stroke: currentColor; fill: none; stroke-width: 1.8; }
.wy-friends-action-btn:active { background: rgba(140,122,166,.12); color: var(--primary); }
/* 三横「更多」按钮右上角角标：仅统计待处理好友申请 */
.wy-more-badge {
  position: absolute; top: -3px; right: -3px;
  min-width: 16px; height: 16px; padding: 0 4px;
  background: #E74C3C; color: #fff; border-radius: 8px;
  font-size: 10px; font-weight: 700; line-height: 16px;
  text-align: center; white-space: nowrap; pointer-events: none;
  box-shadow: 0 0 0 2px var(--bg-card-solid);
}
/* 好友内容区：顶距悬浮返回按钮（36px高）+ 余量 */
#tabFriends .wy-fixed-top { padding-top: calc(52px + var(--safe-top)); }

/* 投笺：表单内容整体下移避开悬浮返回按钮（按钮 top:10px+safe-top + 36px height） */
#tabToujian .wy-fixed-top { padding-top: calc(52px + var(--safe-top)); }

/* ===== 历史聊天枢纽页：未读红点 / 添加下拉 / 小按钮 / 分区头 / 批量编辑 / 全局搜索 ===== */
/* 未读红点 / 数字角标（好友申请 / 投笺 / 聊天记录共用） */
.tab-dot {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 999px; background: #ff4d4f; color: #fff;
  font-size: 11px; font-weight: 600; line-height: 1; vertical-align: middle;
}
/* 可展开区块箭头旋转（toggleSection 切换 .open 类） */
.contacts-expander.open .ce-arrow { transform: rotate(90deg); }
/* 添加图标下拉小弹窗 */
.wy-add-menu {
  position: absolute; top: 44px; right: 0;
  background: var(--bg-card-solid); border: 1px solid var(--line);
  border-radius: 12px; box-shadow: 0 8px 28px rgba(0,0,0,.16);
  padding: 6px; display: none; flex-direction: column;
  min-width: 142px; z-index: 60;
}
.wy-add-menu.show { display: flex; }
.wy-add-menu button {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border: none; background: transparent;
  border-radius: 8px; cursor: pointer; color: var(--ink);
  font-size: 14px; text-align: left; width: 100%;
}
.wy-add-menu button:active { background: var(--primary-soft); }
.wy-add-menu button svg { width: 18px; height: 18px; stroke: var(--primary-deep); fill: none; stroke-width: 1.8; flex-shrink: 0; }
.wy-add-menu button span { flex: 1; }
/* 小按钮（标签管理 / 编辑） */
.wy-hub-mini {
  flex: 0 0 auto; margin-left: 10px;
  padding: 4px 12px; font-size: 12px; line-height: 1.4;
  color: var(--primary); background: var(--primary-soft);
  border: 1px solid var(--line); border-radius: 999px;
  cursor: pointer; white-space: nowrap; -webkit-tap-highlight-color: transparent;
}
.wy-hub-mini:active { background: var(--primary); color: #fff; }
/* 投笺条目（整行可点） */
.wy-hub-link { cursor: pointer; }
.ce-sub { color: var(--muted); font-size: 12px; margin-left: 10px; }
.ce-arrow--static { font-size: 18px; }
/* 聊天记录已改为可折叠 contacts-expander（复用 .ce-head），原 .wy-hub-sechead / .wy-chat-title 规则于 2026-08-07 移除，避免与好友条目间出现双分割线 */
/* 聊天记录批量编辑操作条 */
.wy-cbatch-bar { display: flex; align-items: center; gap: 8px; padding: 10px 0; }
.wy-cbatch-btn {
  padding: 6px 14px; border-radius: 999px; font-size: 13px;
  border: 1px solid var(--line); background: var(--bg-card); color: var(--ink);
  cursor: pointer; white-space: nowrap; -webkit-tap-highlight-color: transparent;
}
.wy-cbatch-btn:active { background: var(--primary-soft); }
.wy-cbatch-btn.is-danger { color: #fff; background: #ff4d4f; border-color: #ff4d4f; }
.wy-cbatch-btn.is-ghost { color: var(--muted); }
.wy-cbatch-count { flex: 1; font-size: 13px; color: var(--muted); }
/* 聊天记录列表容器 */
.wy-chatlist { padding-bottom: 120px; }
/* 批量编辑态：左侧空心勾选圈 */
.wy-chatlist.cbatch-mode .slide-row { position: relative; padding-left: 32px; }
.wy-chatlist.cbatch-mode .slide-row::before {
  content: ''; position: absolute; left: 8px; top: 50%; transform: translateY(-50%);
  width: 18px; height: 18px; box-sizing: border-box;
  border: 1.5px solid var(--muted); border-radius: 50%; background: transparent;
}
.wy-chatlist.cbatch-mode .slide-row.cb-on::before { background: var(--primary); border-color: var(--primary); }
.wy-chatlist.cbatch-mode .slide-row.cb-on::after {
  content: ''; position: absolute; left: 13px; top: 50%;
  width: 5px; height: 9px; border: solid #fff; border-width: 0 2px 2px 0;
  transform: translateY(-60%) rotate(45deg);
}
.wy-chatlist.cbatch-mode .slide-actions { display: none; }
/* 女性头像兜底（搜索结果 / 好友头像） */
.av.female { background: var(--rose); }
/* 全局搜索结果弹层（好友 / 聊天记录 / 群聊） */
.wysr-mask { position: fixed; inset: 0; z-index: 300; background: rgba(28,26,22,.45); backdrop-filter: blur(2px); display: none; align-items: stretch; justify-content: center; }
.wysr-mask.show { display: flex; }
.wysr-panel { width: 100%; max-width: 480px; margin: auto; background: var(--bg-card-solid); display: flex; flex-direction: column; max-height: 86vh; overflow: hidden; animation: modalIn .25s cubic-bezier(.25,.46,.45,.94); }
.wysr-head { display: flex; align-items: center; gap: 8px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.wysr-head h3 { flex: 1; font-size: 16px; font-weight: 600; color: var(--ink); margin: 0; }
.wysr-head .back-btn { font-size: 24px; color: var(--muted); cursor: pointer; line-height: 1; width: 40px; }
.wysr-body { padding: 8px 12px 16px; overflow-y: auto; flex: 1; }
.wysr-sec { margin-top: 6px; }
.wysr-sec__t { font-size: 12px; color: var(--muted); padding: 8px 4px 4px; font-weight: 600; }
.wysr-row { display: flex; align-items: center; gap: 10px; padding: 10px 6px; border-radius: 10px; cursor: pointer; }
.wysr-row:active { background: var(--primary-soft); }
.wysr-meta { flex: 1; min-width: 0; }
.wysr-meta .n { font-size: 15px; color: var(--ink); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wysr-meta .d { font-size: 12px; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wysr-empty { padding: 40px 20px; text-align: center; color: var(--muted); font-size: 14px; }

/* 暗色主题适配 */
@media (prefers-color-scheme: dark) {
  body.zhaoce-body .zhaoce-toolbar,
  body.forms-page .tabs-row,
  body.notices-page .tabs-row {
    background: var(--bg);
  }
}
/* ===== 右上角控件栏胶囊标签统一精简（可容纳4个，多出横向滚动） ===== */
body.zhaoce-body .zhaoce-toolbar .tab,
body.forms-page .tabs-row .tab,
body.notices-page .tabs-row .tab {
  padding: 3px 10px;
  font-size: 11.5px;
}
body.zhaoce-body .zhaoce-toolbar .tabs,
body.forms-page .tabs-row .tabs,
body.notices-page .tabs-row .tabs {
  gap: 5px;
  padding: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
/* ===== 控件重排结束 ===== */

/* 远景柔光光晕 */
.page-header::before {
  content: '';
  position: absolute; left: 50%; top: -10px;
  transform: translateX(-50%);
  width: 70%; height: 46px;    /* 随标题栏减半（原 90px） */
  background: radial-gradient(ellipse at center, rgba(255,255,255,0.45) 0%, rgba(255,255,255,0) 70%);
  pointer-events: none;
  z-index: 1;
}
/* 主标+副标 内容层（单行居中，左右留白避免与返回/操作按钮重叠） */
.page-header .ph-content {
  position: relative;
  z-index: 3;
  width: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 0;
  padding: 0 48px;
}
.page-header .ph-main {
  margin: 0;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 1px;
  line-height: 1.3;
  color: var(--ink);
  text-shadow: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* 单行「主/副」双色：主 ink 加粗、分隔符与副标 muted */
.page-header .ph-m { color: var(--ink); font-weight: 700; }
.page-header .ph-sep { color: var(--muted); margin: 0 3px; font-weight: 400; font-size: 13px; }
.page-header .ph-s { color: var(--muted); font-weight: 500; font-size: 13px; }
/* 内页标题栏左上角返回按钮（透明墨色，垂直居中） */
.page-header .ph-back {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  color: var(--ink);
  font-size: 26px; line-height: 1;
  font-weight: 300;
  text-decoration: none;
  background: transparent;
  border: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform .15s ease, opacity .15s ease;
}
.page-header .ph-back:active {
  transform: translateY(-50%) scale(.92);
  opacity: .55;
}

.page-brand {
  text-align: center; padding: 14px 0 0;
  font-size: 12px; color: var(--muted); letter-spacing: 2px; opacity: .5;
}

/* ===== 按钮 ===== */
.btn {
  display: block; width: 100%; border: none; cursor: pointer;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff; font-size: 16px; padding: 13px; border-radius: var(--radius-xs);
  letter-spacing: 3px; transition: transform .15s ease, box-shadow .15s ease;
  font-family: inherit; font-weight: 600;
  box-shadow: 0 4px 16px var(--primary-glow);
}
.btn:active { transform: scale(.98); }
.btn.gold {
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: #fff; box-shadow: var(--shadow-gold);
}
.btn.ghost {
  background: transparent; color: var(--primary);
  border: 1px solid var(--line-strong); box-shadow: none;
}
.btn.sm {
  width: auto; display: inline-block; padding: 7px 16px;
  font-size: 13px; letter-spacing: 1px;
}
/* 全站统一品牌渐变按钮（替代页面内联渐变，保证视觉一致） */
.btn-grad {
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #66517F, #A892C2);
  color: #fff; border: none; cursor: pointer;
  font-family: inherit; font-weight: 600;
  border-radius: 8px; padding: 8px 16px; font-size: 13px;
  box-shadow: 0 2px 8px rgba(102, 81, 127, .25);
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn-grad:active { transform: scale(.95); }
.btn:disabled { opacity: .5; }

/* ===== 统一返回按钮 ===== */
.back-btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 2px; height: 40px; min-width: 40px; padding: 0 10px;
  border: none; border-radius: 8px; background: transparent;
  color: var(--primary); font-size: 24px; line-height: 1;
  font-family: inherit; cursor: pointer; text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  transition: background-color .15s, transform .12s, color .12s;
  box-sizing: border-box; flex-shrink: 0;
}
.back-btn:active {
  background: rgba(90,107,74,.08);
  transform: scale(.96);
}
/* 页面标题头内的返回键：白色、绝对定位左上角（在紫渐变背景上可见） */
.page-header .back-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  left: 12px;
  z-index: 10;
  color: var(--ink);
  font-size: 28px;
  width: 40px; height: 40px;
  border-radius: 50%;
}
.page-header .back-btn:active {
  background: rgba(140,122,166,.12);
}
/* ===== 输入控件 ===== */
.field { margin: 14px 0; }
.field label {
  display: block; font-size: 13px; color: var(--ink-soft);
  margin-bottom: 6px; font-weight: 500; letter-spacing: .5px;
}
/* .field 内的 input/textarea 自动套用 .ui-input 样式（无需手写 class）
   排除 file/hidden/checkbox/radio 等特殊控件 —— 全部复用聊天栏 .ui-input 样式 */
.field input:not([type=file]):not([type=hidden]):not([type=checkbox]):not([type=radio]),
.field select,
.field textarea {
  display: block; width: 100%;
  height: 38px;
  padding: 0 14px;
  font: inherit; color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  box-sizing: border-box;
  font-family: inherit;
}
.field textarea { height: auto; min-height: 96px; padding: 10px 14px; line-height: 1.6; resize: vertical; border-radius: 18px; }
.field input:not([type=file]):not([type=hidden]):focus,
.field textarea:focus,
.field select:focus {
  border-color: rgba(140,122,166,.32);
  box-shadow: 0 0 0 3px rgba(140,122,166,.08);
}
.field .req { color: var(--rose); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* 便签编辑（修籍-备忘录面板）—— 走 .ui-input 统一样式 */
.memo-edit-title {
  display: block; width: 100%;
  font-size: 22px; font-weight: 700;
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 4px 0 8px;
  color: var(--ink);
  outline: none;
}
.memo-edit-title:focus { box-shadow: none; border: 0; }
.memo-edit-content {
  display: block; width: 100%;
  font-size: 15px; line-height: 1.7;
  background: transparent;
  border: 0; border-radius: 0;
  padding: 6px 0;
  color: var(--ink);
  resize: none;
  outline: none;
  min-height: 200px;
  font-family: inherit;
}
.memo-edit-content:focus { box-shadow: none; border: 0; }
.memo-edit-toolbar {
  display: flex; gap: 20px; align-items: center;
  padding: 10px 20px 14px;
  border-top: 1px solid var(--line);
  background: var(--bg);
}
.memo-edit-toolbar span[title] {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 10px;
  transition: background .12s;
}
.memo-edit-toolbar span[title]:active { background: rgba(140,122,166,.10); }

/* .input-with-icon 修籍字段容器：左侧图标 + 右侧输入框 —— 复用聊天栏 .ui-input 样式 */
.input-with-icon {
  display: flex; align-items: center; gap: 8px;
  height: 38px;
  padding: 0 14px 0 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-sizing: border-box;
  transition: border-color .2s, box-shadow .2s;
}
.input-with-icon:focus-within {
  border-color: rgba(140,122,166,.32);
  box-shadow: 0 0 0 3px rgba(140,122,166,.08);
}
.input-with-icon .field-ico {
  flex: 0 0 auto; width: 18px; height: 18px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--ink-soft);
}
.input-with-icon .field-ico svg { width: 18px; height: 18px; /* 不设 fill，保留 SVG 内联的 fill/stroke 属性 */ }
.input-with-icon > input {
  flex: 1 1 0; min-width: 0;
  border: 0; outline: 0; background: transparent;
  font: inherit; color: var(--ink);
  height: 100%;
  padding: 0;
}
.input-with-icon > input[readonly] { color: var(--ink-soft); }
.dorm-row { display: flex; align-items: center; gap: 6px; }
.dorm-row select { flex: 0 0 90px; }
.dorm-row .dfix { color: var(--muted); font-size: 13px; white-space: nowrap; }
.dorm-row input { flex: 1; min-width: 0; text-align: center; }
.counselor-box {
  background: var(--gold-soft); border: 1px solid var(--gold-light);
  border-radius: var(--radius-xs); padding: 10px 12px;
  font-size: 13px; color: var(--ink); margin: 4px 0 0; display: none;
}
.counselor-box.show { display: block; }
.counselor-box b { color: var(--gold-deep); }

/* ===== 首页（雾堇紫 · 治愈柔和） ===== */
.home-head { padding: 34px 18px 10px; position: relative; overflow: hidden; }
.home-head::after {
  content: ''; position: absolute; top: -46px; right: -34px;
  width: 170px; height: 170px; border-radius: 50%;
  background: radial-gradient(circle, var(--primary-glow), transparent 70%);
  pointer-events: none;
}
/* 首页顶部：三行结构（左对齐日期 / 右对齐品牌大字 / 右对齐副标）【压缩版】 */
.home-head {
  position: relative;
  padding: 10px 20px 4px;
}
/* 第一行：日期（年月日 + 星期 + 农历，整体水平居中、左右对称） */
.hh-date-row {
  display: flex;
  align-items: center;             /* 垂直居中 */
  justify-content: center;         /* 水平居中：整行作为一个整体居中摆放 */
  text-align: center;
  gap: 8px;
  margin-bottom: 1px;
  min-height: 38px;
  padding: 4px 14px;               /* 去掉已删除汉堡遗留的 52px 内缩，改为对称小留白，修正偏右 */
}
.hh-date {
  font-size: 12px; color: var(--primary); letter-spacing: .5px; font-weight: 500;
  display: inline-flex; align-items: center; justify-content: center;
  text-align: center; line-height: 1.3;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  max-width: 100%;
  white-space: nowrap;
}
.hh-date .st { color: var(--primary-deep); font-weight: 700; margin-left: 4px; }
/* 第二行：品牌"云枢"图片（瘦金体已栅格化，右对齐固定造型）【压缩版】 */
.hh-brand {
  display: block;
  height: 46px;
  width: auto;
  margin: 0 auto 2px;  /* 居中；与日期行间距压缩 */
  filter: drop-shadow(0 2px 4px rgba(140,122,166,.18));
}
/* 第三行：副标（居中，与日期同紫色）【压缩版】 */
.hh-sub {
  text-align: center;
  font-size: 11.5px; color: var(--primary); letter-spacing: 2.5px;
  opacity: 1;
  margin-bottom: 2px;
  line-height: 1.4;
}
/* 云朵装饰（左上和右上）保留 */
.home-head::after {
  content: '';
  position: absolute; left: -10px; top: 78px;
  width: 60px; height: 22px;
  background: radial-gradient(ellipse 22px 12px at 18px 14px, rgba(255,255,255,.85), transparent 60%),
              radial-gradient(ellipse 26px 14px at 38px 12px, rgba(255,255,255,.75), transparent 65%),
              radial-gradient(ellipse 14px 8px at 56px 16px, rgba(255,255,255,.7), transparent 70%);
  border-radius: 30px;
  filter: blur(.4px);
  opacity: .9;
  pointer-events: none;
  z-index: 0;
}
.home-head .cloud-2 {
  position: absolute; right: -8px; top: 88px;
  width: 70px; height: 20px;
  background: radial-gradient(ellipse 18px 10px at 12px 14px, rgba(255,255,255,.78), transparent 60%),
              radial-gradient(ellipse 28px 14px at 40px 12px, rgba(255,255,255,.7), transparent 65%);
  border-radius: 30px;
  filter: blur(.4px);
  opacity: .85;
  pointer-events: none;
  z-index: 0;
}

/* 首页内容滚动容器：从紫色问候卡片到底部菜单栏上方，独立纵向滚动 */
.home-scroll {
  flex: 1 1 0;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: calc(var(--tabbar-h, 68px) + env(safe-area-inset-bottom, 0px));
}
.home-scroll::-webkit-scrollbar { display: none; }

/* 首页"问候语 + 每日名言"白底卡片（底部菜单已有 4 模块入口，故此处不重复卡片）【压缩版2：再减高一档】 */
.home-modules {
  position: relative;
  margin: 8px 12px 10px; padding: 8px 14px 10px;
  /* 紫色渐变底（与快捷卡片同款） */
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-deep) 100%);
  border: 1px solid rgba(102,81,127,.35);
  border-radius: var(--radius);
  box-shadow: 0 6px 18px rgba(102,81,127,.22);
  overflow: hidden;
  color: #fff;
}
.home-modules::before { content: none; }
.home-modules .hm-greet {
  font-family: var(--font-display);
  font-size: 14px; font-weight: 600; letter-spacing: 1.5px;
  color: #fff; padding: 0 2px 2px;
  display: flex; align-items: baseline; gap: 4px;
  justify-content: flex-start;     /* 【左对齐】问好文字整行靠左 */
}
.home-modules .hm-greet .greet-time { font-weight: 700; color: #fff; }
.home-modules .hm-greet .greet-name { font-weight: 500; color: rgba(255,255,255,.92); }
.home-modules .hm-greet .wave {
  display: inline-block; margin-left: 4px;
  animation: hm-wave 1.4s ease-in-out infinite;
  transform-origin: 70% 70%;
}
@keyframes hm-wave {
  0%, 60%, 100% { transform: rotate(0deg); }
  10%, 30% { transform: rotate(14deg); }
  20%, 40% { transform: rotate(-8deg); }
}
/* 每日名言区（替换原 4 模块卡位）【压缩版2：再减高一档】 */
.home-modules .hm-quote {
  position: relative;
  display: flex; gap: 0; align-items: flex-start;
  justify-content: center;         /* 【水平居中】名言块整体居中 */
  padding: 8px 8px 6px;
  border-top: 1px solid rgba(255,255,255,.45);
  margin-top: 1px;
  min-height: 46px;
}
/* 装饰符号「」已隐藏（用户要求去掉） */
.home-modules .hm-q-mark { display: none; }
.home-modules .hm-q-body {
  flex: 1 1 auto; min-width: 0;
}
.home-modules .hm-q-content {
  font-family: var(--font-display); /* 【统一字号/字体】与署名破折号完全一致 */
  font-size: 13px; line-height: 1.6;
  letter-spacing: .5px;
  color: rgba(255,255,255,.94);
  font-weight: 500;
  text-align: center;              /* 【水平居中】名言正文居中 */
}
.home-modules .hm-q-author {
  margin-top: 2px;                 /* 【紧贴】作者行紧随名言正文之后 */
  font-family: var(--font-display); /* 【统一字号/字体】与名言正文完全一致 */
  font-size: 13px; letter-spacing: .5px;
  text-align: right;               /* 【右对齐】署名整体靠右排版 */
  color: rgba(255,255,255,.82);
  font-weight: 500;
}
/* 旧 4 卡片相关样式（已不使用，保留以防外部引用报错，无视觉影响） */
.home-modules .hm-body { display: none; }

/* 首页快捷功能（活动报名/预约登记）— 后台暂未填充内容，已隐藏 */
#quickGrid { display: none !important; }

/* 首页快捷功能（深紫渐变小卡片，仅标题）— 样式保留，待后台填充后可恢复显示 */
.quick-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
  padding: 0 14px; margin: 12px 0 4px;
}
.quick-card {
  position: relative; display: flex; align-items: center; justify-content: center;
  padding: 18px 14px; min-height: 56px;
  text-decoration: none; text-align: center;
  color: #FFF;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-deep) 100%);
  border: 1px solid rgba(102,81,127,.35);
  border-radius: var(--radius-sm);
  box-shadow: 0 6px 18px rgba(102,81,127,.22);
  transition: transform .18s ease, box-shadow .18s ease;
}
.quick-card:active { transform: scale(.98); box-shadow: 0 2px 10px rgba(102,81,127,.28); }
.quick-card .quick-title {
  font-size: 15px; font-weight: 600; letter-spacing: 2px;
  color: #FFF;
  text-shadow: 0 1px 2px rgba(102,81,127,.3);
}
.home-section-title {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px; font-weight: 600; color: var(--muted);
  padding: 12px 16px 2px; letter-spacing: 2px;
}
/* 第一个区块标题（预约/报名/登记）：轮播图下方留出适度间距 */
.home-section-title:first-of-type {
  padding-top: 12px;
}
/* 「通知公告」胶囊紧跟在预约列表之后：与预约区等距 */
.booking-list ~ .home-section-title {
  padding-top: 12px;
}
.section-pill {
  display: inline-flex; align-items: center;
  padding: 3px 14px;
  border: 1px solid var(--primary);
  border-radius: 999px;
  font-size: 12px; font-weight: 600;
  color: var(--primary-deep);
  background: rgba(216, 198, 232, .18);
  letter-spacing: 1.5px;
}
.more-link {
  font-size: 12px; color: var(--primary); text-decoration: none;
  opacity: 1; font-weight: 600; letter-spacing: 1px;
  transition: opacity .15s;
}
.more-link:hover { opacity: .7; }

/* 英雄 banner */
.hero-banner {
  margin: 10px 14px 0; padding: 24px 20px;
  background: linear-gradient(145deg, var(--primary-deep), var(--primary), #3F5A9E);
  border-radius: var(--radius); position: relative; overflow: hidden;
  cursor: pointer; box-shadow: 0 8px 28px rgba(26,40,71,.2);
  border: 1px solid rgba(255,255,255,.06);
}
.hero-deco {
  position: absolute; top: -30px; right: -20px; width: 140px; height: 140px;
  border: 1px solid rgba(255,255,255,.07); border-radius: 50%;
}
.hero-deco::before {
  content: ""; position: absolute; bottom: -20px; left: 20px;
  width: 60px; height: 60px;
  border: 1px solid rgba(255,255,255,.05); border-radius: 50%;
}
.hero-content { position: relative; z-index: 1; color: #fff; }
.hero-title {
  font-family: 'STKaiti','KaiTi','楷体',serif;
  font-size: 22px; font-weight: 400; letter-spacing: 3px; margin-bottom: 6px;
}
.hero-sub { font-size: 12px; opacity: .85; max-width: 80%; }
.hero-pill {
  display: inline-block; margin-top: 12px; padding: 4px 14px;
  background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.1);
  border-radius: 14px; font-size: 11px; letter-spacing: 1px;
}

/* 通知公告大卡 */
.notice-banner {
  margin: 14px; padding: 14px 18px;
  background: linear-gradient(135deg, var(--gold-soft), #FFF2D6);
  border-radius: var(--radius); display: flex; align-items: center;
  justify-content: space-between; cursor: pointer;
  box-shadow: var(--shadow-card); border: 1px solid var(--gold-light);
}
.nb-left { display: flex; align-items: center; gap: 12px; }
.nb-icon {
  width: 44px; height: 44px; border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: #fff; display: flex; align-items: center; justify-content: center;
}
.nb-icon svg { width: 22px; height: 22px; }
.nb-title { font-size: 16px; font-weight: 700; color: var(--ink); letter-spacing: 1px; }
.nb-sub { font-size: 11px; color: var(--muted); margin-top: 2px; }
.nb-arrow { font-size: 24px; color: var(--muted); }

/* 首页快捷入口：单行横条 */
.nb-row {
  display: flex; align-items: center; gap: 14px;
  margin: 0 14px; padding: 16px 18px; border-radius: var(--radius);
  background: linear-gradient(135deg, #FAF6ED 0%, #F5EEDB 100%);
  color: var(--ink); text-decoration: none;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--gold-light);
}
.nb-row.home-action { display: none; }
.nb-row .nb-icon {
  width: 44px; height: 44px; border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: #fff; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.nb-row .nb-icon svg { width: 22px; height: 22px; }
.nb-row .nb-text { flex: 1; min-width: 0; }
.nb-row .nb-title { font-size: 17px; font-weight: 700; letter-spacing: 1px; }
.nb-row .nb-sub { font-size: 12px; color: var(--muted); margin-top: 4px; }
.nb-row .ha-arrow {
  font-size: 24px; color: var(--gold); margin-left: auto;
}
@media (max-width: 480px) {
  .nb-row { padding: 18px 20px; }
  .nb-row .nb-title { font-size: 18px; }
  .nb-row .nb-sub { font-size: 13px; }
}

/* 首页功能模块网格见 .home-modules（“首页”区块统一样式，已迁至上方） */

/* 精选内容/动态列表 */
.featured-list, .activity-list { padding: 0 14px; }
.fi-card {
  background: var(--bg-card); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 12px 14px; margin-bottom: 8px;
  box-shadow: var(--shadow-card);
}
.fi-cat {
  display: inline-block; font-size: 10px; color: var(--gold-deep);
  background: var(--gold-soft); padding: 2px 8px; border-radius: 10px;
  margin-bottom: 6px; letter-spacing: 1px;
}
.fi-title { font-size: 15px; font-weight: 600; color: var(--ink); }
.fi-summary { font-size: 12px; color: var(--muted); margin-top: 4px; }
.fi-time { font-size: 11px; color: var(--muted); margin-top: 6px; }

.ai-item {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg-card); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 10px 12px; margin-bottom: 8px;
  box-shadow: var(--shadow-card);
}
.ai-avatar {
  width: 36px; height: 36px; border-radius: 50%; color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 600; flex-shrink: 0;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
}
.ai-avatar.female { background: linear-gradient(135deg, var(--rose), #D4A29E); }
.ai-meta { flex: 1; min-width: 0; }
.ai-name { font-size: 13px; font-weight: 600; color: var(--ink); }
.ai-last { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ai-time { font-size: 10px; color: var(--muted); flex-shrink: 0; }

/* 底部导航 */
.bottom-nav {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: 0; width: 100%; max-width: var(--maxw);
  /* 跟随系统深浅：浅色=纯白，深色=近黑；与系统设置一致匹配 */
  background: var(--bg);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--line); display: flex; z-index: 20;
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.bottom-nav a {
  flex: 1; text-align: center; padding: 5px 2px; color: var(--muted);   /* 再压缩：7px→5px */
  text-decoration: none; font-size: 12px; display: flex; flex-direction: column;
  align-items: center; gap: 2px;
}
.bottom-nav a svg { width: 28px; height: 28px; }
.bottom-nav a.active { color: var(--primary); }
.bottom-nav a.active .nav-label { font-weight: 600; }
/* 首页专属：底部导航图标/文字适度缩小，热区与导航栏高度不变（仅首页，不影响其他页面） */
body.home-page .bottom-nav a { min-height: 56px; justify-content: center; }
body.home-page .bottom-nav a svg { width: 24px; height: 24px; }
body.home-page .nav-label { font-size: 11px; }

/* 导航图标右上角未读角标 */
.nav-badge {
  position: absolute; top: 2px; right: 2px;
  min-width: 18px; height: 18px; padding: 0 5px;
  background: #E74C3C; color: #fff; border-radius: 9px;
  font-size: 11px; font-weight: 700; line-height: 18px;
  text-align: center; white-space: nowrap; pointer-events: none;
}
.bottom-nav a { position: relative; }

/* 分类 tabs */
.tabs {
  display: flex; gap: 8px; overflow-x: auto;
  padding: 4px 14px 10px; -webkit-overflow-scrolling: touch;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex: 0 0 auto; padding: 7px 14px; border-radius: 999px; font-size: 13px;
  background: var(--bg-card); border: 1px solid var(--line);
  color: var(--muted); cursor: pointer; white-space: nowrap;
}
.tab.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff; border-color: transparent;
}

/* 列表页统一：单行流式布局（完全对齐行业资讯·资讯列表：左日期 + 缩略图 + 右标题） */
.note-grid { display: flex; flex-direction: column; gap: 6px; padding: 4px var(--pad-x) 12px; }
.note-card {
  align-self: start;  /* 卡片不拉伸，按内容自适应高度（关键：不被 799 行的 display:flex 覆盖） */
  background: transparent; border: none; border-radius: 0; overflow: hidden;
  cursor: pointer; display: flex; flex-direction: column;
  text-decoration: none; color: inherit;
}
.note-card:active { opacity: .85; }
.note-cover {
  height: 110px; display: flex; align-items: center; justify-content: center;
  font-size: 40px; color: #fff;
}
.note-body { padding: 10px 11px 12px; }
.note-title {
  font-size: 14px; font-weight: 600; line-height: 1.4; color: var(--ink);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.note-cat {
  display: inline-block; margin-top: 8px; font-size: 11px; color: var(--gold-deep);
  background: var(--gold-soft); border-radius: 999px; padding: 2px 9px;
}

/* ===== 行业资讯文章卡片：大图 + 日期方块 + 标题 ===== */

/* 行业资讯加载态：数据到位前隐藏标签/搜索/内容区，显示居中加载指示器，消除"闪空白" */
/* 行业资讯：隐藏空骨架，数据到位后淡入 —— 消除「空白中间页」闪烁 */
body.zhaoce-body .app {
  opacity: 0;
  transition: opacity .25s ease;
}
body.zhaoce-body .app.zhaoce-ready {
  opacity: 1;
}

/* 行业资讯工具栏：分类 + 搜索图标同一行（2026-08-06）
   分类整体下移 10px，避免压在标题栏波浪弧线上；搜索图标排在分类之后。 */
.zhaoce-toolbar {
  display: flex; align-items: center; gap: 8px;
  padding: 10px var(--pad-x) 8px;
}
.zhaoce-toolbar .tabs {
  flex: 1 1 auto; min-width: 0;
  padding: 0;                 /* 内边距交给 .zhaoce-toolbar 统一控制 */
}
.zhaoce-toolbar .ui-search-icon { margin-left: 2px; background: transparent; }

/* ===== 首页模块视图（SPA 原地切换，替代独立页面跳转） ===== */
.module-view {
  position: fixed; inset: 0; z-index: 80;
  display: flex; flex-direction: column;
  background: var(--bg);
  max-width: var(--maxw); margin: 0 auto;
  transform: translateX(100%);
  opacity: 0;
  pointer-events: none;
  transition: transform .28s cubic-bezier(.16,1,.3,1), opacity .2s ease;
  box-sizing: border-box;
}
.module-view.open {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}
.mv-head {
  position: sticky; top: 0; z-index: 2;
  display: flex; align-items: center; gap: 8px;
  height: var(--header-h, 52px);
  padding: 0 6px;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.mv-back {
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 26px; line-height: 1; color: var(--primary-deep);
  background: transparent; border: 0; cursor: pointer; border-radius: 50%;
  margin-left: -4px;
}
.mv-back:active { background: rgba(140,122,166,.12); }
.mv-title {
  font-size: 17px; font-weight: 600; color: var(--ink);
  font-family: var(--font-display, inherit); letter-spacing: 1px;
}
.mv-body {
  flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
}

/* 模块视图内嵌 iframe（云枢 原地滑动，零白屏，样式作用域独立） */
.module-frame {
  width: 100%; height: 100%; border: 0; display: block;
  background: var(--bg);
}
/* iframe 模块：隐藏父级模块视图自带顶栏（由子页自身顶栏充当标题与返回） */
.module-view.no-head .mv-head { display: none; }
.module-view.no-head .mv-body { overflow: hidden; padding-bottom: 0; }
/* 内嵌模式：隐藏子页底栏（避免 iframe 内再次导航离开），顶栏保留作标题/返回 */
body.embed-mode .bottom-nav { display: none !important; }

/* 行业资讯新闻列表：单列纵向流式布局（参考图：左日期 + 中缩略图 + 右标题） */
.zhaoce-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 4px var(--pad-x) 12px;
}
.zhaoce-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 4px;
  background: transparent;
  border: none;
  border-radius: 0;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}
.zhaoce-card:active { opacity: .7; }

/* 左侧日期区块（紫色大数字 + 月年） */
.zhaoce-date {
  flex: 0 0 auto;
  width: 36px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.15;
}
.zhaoce-date-day {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
  font-family: inherit;
  line-height: 1.1;
}
.zhaoce-date-my {
  font-size: 9px;
  color: var(--primary);
  margin-top: 0;
  letter-spacing: 0;
}

/* 中间图片缩略图（固定尺寸圆角） */
.zhaoce-cover-wrap {
  flex: 0 0 auto;
  width: 72px;
  height: 52px;
  border-radius: 7px;
  overflow: hidden;
  background: var(--primary-soft);
}
.zhaoce-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.zhaoce-cover-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  color: #fff;
}

/* 右侧标题文字 */
.zhaoce-title {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
  color: var(--ink);
  word-break: break-word;
}

/* ===== 详情页统一头部（通知 / 表单） ===== */
.detail-head { text-align: left; }
/* 详情页返回按钮独立一行（杜绝长标题被固定按钮遮挡） */
.detail-back-row {
  padding: calc(10px + var(--safe-top)) 12px 4px;
}
.detail-back-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,0.85); backdrop-filter: blur(8px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1); color: var(--ink);
  text-decoration: none; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
/* 修籍「正在修改」提示条（统一类，替代两处重复内联样式） */
.ui-edit-banner {
  background: var(--primary-soft);
  border: 1px solid var(--primary);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 10px;
  font-size: 13px;
  color: var(--primary);
}
.detail-back-btn svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
/* 详情页顶部统一两行布局：行1 返回+搜索 / 行2 分类胶囊（仅换行，组件外观不变） */
.detail-top-bar {
  display: flex; align-items: center; justify-content: flex-end;
  gap: 8px; padding: calc(10px + var(--safe-top)) 12px 6px;
}
.detail-cats {
  display: flex; gap: 8px; overflow-x: auto;
  padding: 2px 14px 10px; -webkit-overflow-scrolling: touch;
}
.detail-cats::-webkit-scrollbar { display: none; }
.detail-title {
  margin: calc(8px + var(--safe-top)) 18px 8px; font-size: 22px; font-weight: 700; color: var(--ink); line-height: 1.4;
}
.detail-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0;
  padding: 4px 18px 14px; font-size: 13px; color: var(--muted);
  border-bottom: 1px solid var(--line);
}
.detail-tag {
  display: inline-block; padding: 3px 10px; background: rgba(140,122,166,.1);
  color: var(--primary); border-radius: 10px; font-size: 12px; letter-spacing: 1px;
}
.detail-meta span + span { margin-left: 4px; }
/* 详情页元信息行：紫色胶囊 + 发布者 + 发布时间 同一行，下方分割线 */
.detail-meta-row {
  display: flex; align-items: center; flex-wrap: wrap;
  padding: 8px 18px 12px; font-size: 13px; color: var(--muted);
  border-bottom: 1px solid var(--line);
}
.detail-capsule {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--primary); color: #fff;
  border-radius: 999px; padding: 2px 9px;   /* 2026-08-12 缩小，保证与发布人/时间同行 */
  font-size: 11px; font-weight: 600; letter-spacing: .5px; white-space: nowrap;
}
.detail-capsule + .detail-by { margin-left: 1em; }   /* 胶囊后空 1 字位置放发布者 */
.detail-by + .detail-at { margin-left: .8em; }        /* 再空 0.8 字位置放发布时间 */
.detail-meta-row .detail-by, .detail-meta-row .detail-at { white-space: nowrap; }
/* 详情页正文：图显示区域固定、统一 */
.detail-body img, .form-detail-desc img {
  display: block; width: 100%; max-width: 100%; height: auto;
  border-radius: 12px; margin: 12px 0;
}
/* 表单描述富文本（与管理端编辑器一致）基础排版 */
.form-detail-desc p { margin: 6px 0; line-height: 1.7; }
.form-detail-desc ul, .form-detail-desc ol { margin: 6px 0; padding-left: 1.6em; }
.form-detail-desc li { margin: 3px 0; }
.form-detail-desc blockquote { margin: 8px 0; padding: 8px 12px; border-left: 3px solid var(--primary); background: rgba(46,67,116,.05); color: var(--muted); border-radius: 0 8px 8px 0; }
/* 表单「问题」（字段）显示区域统一：整行、统一输入框样式 */
.ap-field { display: block; margin-bottom: 14px; border-bottom: 1px solid var(--line); padding-bottom: 14px; }
.ap-field:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
.ap-field > label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 8px; color: var(--ink); }
/* 文本输入框/下拉/多行：清晰线框（2026-08-12 v2 加强边框可见性） */
.ap-field input[type=text], .ap-field input[type=number], .ap-field input[type=tel],
.ap-field input[type=email], .ap-field input[type=date], .ap-field input[type=time],
.ap-field input[type=datetime-local], .ap-field select, .ap-field textarea {
  width: 100%; box-sizing: border-box; padding: 10px 12px;
  border: 1.5px solid var(--line-strong); border-radius: 10px;
  font-size: 15px; background: var(--bg); color: var(--ink); font-family: inherit;
  outline: none;
}
.ap-field input[type=text]:focus, .ap-field input[type=number]:focus, .ap-field input[type=tel]:focus,
.ap-field input[type=email]:focus, .ap-field input[type=date]:focus, .ap-field input[type=time]:focus,
.ap-field input[type=datetime-local]:focus, .ap-field select:focus, .ap-field textarea:focus {
  border-color: var(--primary);
}
.ap-field textarea { resize: vertical; }
/* 选项区域（单选/复选）：独立线框，与可填写输入区明确区分（2026-08-12 v2）
   v3：垂直 gap 8px→4px，横向 gap 收紧，布局更紧凑（2026-08-12） */
.ap-opts {
  border: 1.5px solid var(--line-strong); border-radius: 10px;
  padding: 8px 12px; background: var(--bg);
  display: flex; flex-direction: column; gap: 4px;
}
.ap-opts--h { flex-direction: row; flex-wrap: wrap; gap: 6px 14px; }
.ap-opts .opt { display: inline-flex; align-items: center; font-size: 14px; color: var(--ink); }
.ap-opts .opt input { margin-right: 5px; }
.ap-opts .ui-input { margin-top: 2px; }
/* 行业资讯/通知文章正文：行距完全交由后台富文本（不在前端强制），
   保证「后台怎么编辑，手机上就怎么显示」。仅兜底字体/颜色继承。 */

/* 朋友圈动态 */
.moment, .moment-card {
  background: var(--bg-card); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 14px; margin: 12px;
  box-shadow: var(--shadow-card);
}
.moment-top, .mc-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.avatar, .mc-avatar {
  width: 42px; height: 42px; border-radius: 50%; flex: 0 0 42px;
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 600;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
}
/* 聊天记录列表：头像应为正方形，覆盖 .avatar 的圆形默认值；时间戳需顶到页面最右边缘 */
.wy-chatlist .avatar { border-radius: 0; aspect-ratio: 1 / 1; }
.wy-chatlist .friend.slide-row { padding-right: 0; }
.wy-chatlist .slide-content { width: 100%; }
.avatar.female, .mc-avatar.female { background: linear-gradient(135deg, var(--rose), #D4A29E); }
.moment-name, .mc-name { font-size: 15px; font-weight: 600; }
.moment-time, .mc-time { font-size: 12px; color: var(--muted); }
.moment-text, .mc-content {
  margin: 10px 2px 0; font-size: 15px; line-height: 1.7;
  white-space: pre-wrap; word-break: break-word; color: var(--ink);
}
.moment-cover, .mc-image { height: 150px; border-radius: 12px; margin-top: 10px; }
.moment-actions {
  display: flex; gap: 18px; margin-top: 12px; padding-top: 10px;
  border-top: 1px solid var(--line);
}
.moment-actions button {
  background: none; border: none; cursor: pointer;
  font-size: 13px; color: var(--muted); display: flex; align-items: center;
  gap: 5px; font-family: inherit;
}
.moment-actions button.liked { color: var(--rose); }

/* 评论区 */
.comment-list {
  margin-top: 10px; background: var(--bg); border-radius: var(--radius-xs);
  padding: 8px 10px;
}
.comment-list .c-item { font-size: 13px; margin: 4px 0; line-height: 1.5; }
.comment-list .c-item b { color: var(--primary); }
.comment-list .c-item .reply-to { color: var(--muted); }
.comment-input { display: flex; gap: 8px; margin-top: 8px; }
.comment-input input {
  flex: 1; padding: 8px 10px; border: 1px solid var(--line-strong);
  border-radius: 10px; font-size: 14px; background: var(--bg);
}
.comment-input button {
  padding: 8px 14px; border: none; border-radius: 10px;
  background: var(--primary); color: #fff; font-size: 13px; cursor: pointer;
}

/* 发布器 */
.composer {
  background: var(--bg-card); border: 1px solid var(--line);
  border-radius: var(--radius-sm); box-shadow: var(--shadow-card);
  padding: 14px; margin: 12px;
}
.composer textarea {
  width: 100%; border: none; resize: none; outline: none;
  font-size: 15px; line-height: 1.6; background: transparent;
  font-family: inherit; color: var(--ink); min-height: 80px;
}
.composer .tools { display: flex; gap: 14px; padding: 8px 0; color: var(--primary); font-size: 13px; }
.composer-bar { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; }

/* ===== 旧聊天模块 ===== */
.wy-tabs {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 0;
  width: 100%; max-width: var(--maxw);
  background: rgba(255,253,247,.85); backdrop-filter: blur(12px);
  border-top: 1px solid var(--line); display: flex; z-index: 20;
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.wy-tabs a {
  position: relative; flex: 1; text-align: center; padding: 10px 2px;
  color: var(--muted); font-size: 12px;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.wy-tabs a.active { color: var(--primary); }
.wy-tabs a svg { width: 26px; height: 26px; }
.wy-tabs .wy-back {
  flex: 0 0 44px; padding: 0;
  justify-content: center;
}
.wy-tabs .wy-back svg { width: 22px; height: 22px; color: var(--muted); }

/* ===== 旧聊天模块重构：隐藏底部菜单栏 ===== */
.wy-tabs { display: none !important; }

/* ===== 云枢/行业资讯/通知详情：与旧聊天模块一致，移除底部菜单栏（仅限这些页，不影响其他页） ===== */
body.zhishu-body .bottom-nav,
body.zhaoce-body .bottom-nav,
body.notice-body .bottom-nav { display: none !important; }

/* ===== 云枢：输入栏贴底固定 + 内容区从输入栏上缘向上堆叠 ===== */
body.zhishu-body .app {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  height: 100vh;
  overflow: hidden;
}
/* 云枢：快捷词胶囊 + 输入栏合并为贴底 dock（dock 固定，输入栏在 dock 内为静态流） */
body.zhishu-body .zhishu-dock {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: 0; width: 100%; max-width: var(--maxw); z-index: 50;
  background: var(--bg);
  border-top: 1px solid var(--line);
  display: flex; flex-direction: column;
}
/* 快捷词胶囊：贴在输入框上方（最多两行，超出滚动） */
body.zhishu-body .zhishu-chips {
  padding: 7px var(--pad-x) 2px;
  max-height: 62px; overflow-y: auto; -webkit-overflow-scrolling: touch;
}
body.zhishu-body .zhishu-chips .chip { padding: 2px 9px; font-size: 11px; }
/* 云枢输入栏：在 dock 内为静态流，底部留白减 70%（仅保留安全区 30% + 极小内边距） */
body.zhishu-body .ui-chat-bar {
  position: static; left: auto; transform: none; bottom: auto;
  width: 100%; max-width: none;
  padding: 4px var(--pad-x) calc(2px + env(safe-area-inset-bottom, 0px) * 0.3);
  z-index: auto;
}
/* 云枢内容区留出 dock 空间(输入栏 ~60 + skill 行 ~40),避免最后一条消息被遮挡。
   原 154px 偏大致移动端下方大片空白(V1.4.1 调为 100px,移动端 composer+skill bar 实际总高) */
body.zhishu-body .zhishu-scroll {
  padding-bottom: calc(100px + env(safe-area-inset-bottom, 0px) * 0.3);
}

/* ===== #268 云枢新首页：汉堡抽屉 + 三点菜单 + 胶囊栏 + 新输入框 ===== */
.zs-header {
  flex: 0 0 auto;
  display: flex; align-items: center; gap: 10px;
  padding: calc(env(safe-area-inset-top, 0px) + 8px) var(--pad-x) 8px;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.zs-header__icon {
  flex: 0 0 auto; width: 38px; height: 38px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; background: transparent; color: var(--ink); cursor: pointer;
  border-radius: 50%; transition: background .15s, transform .15s;
}
.zs-header__icon:hover { background: rgba(140,122,166,.10); }
.zs-header__icon:active { transform: scale(.92); }
.zs-header__icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; }
.zs-header__icon svg[fill="currentColor"] { fill: currentColor; stroke: none; }
.zs-header__title { flex: 1 1 auto; min-width: 0; text-align: center; }
.zs-header__greet { font-size: 12px; color: var(--muted); line-height: 1.3; }
.zs-header__name { font-size: 15px; font-weight: 600; color: var(--ink); line-height: 1.3; }

/* 胶囊栏：横向滚动快捷提问 */
.zs-capsules {
  flex: 0 0 auto;
  display: flex; gap: 8px;
  padding: 8px var(--pad-x) 6px;
  overflow-x: auto; overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}
.zs-capsules::-webkit-scrollbar { display: none; }
.zs-capsules .chip {
  flex: 0 0 auto; white-space: nowrap;
  padding: 6px 14px; font-size: 13px; border-radius: 999px;
  background: color-mix(in srgb, var(--primary) 8%, var(--bg-card));
  color: var(--primary); border: 1px solid var(--line);
  transition: background .15s, transform .12s;
}
.zs-capsules .chip:active { transform: scale(.95); background: color-mix(in srgb, var(--primary) 16%, var(--bg-card)); }
/* 双类型胶囊视觉区分：跳转型带箭头前缀，提问型带问号前缀（后台配置 type=jump/ask） */
.zs-capsules .chip[data-type="jump"]::before { content: '↗ '; opacity: .65; }
.zs-capsules .chip[data-type="ask"]::before  { content: '? '; opacity: .55; font-weight: 700; }

/* 新输入框：玻璃质感升级（保留标准 .ui-chat-bar 结构） */
body.zhishu-body .zhishu-dock { border-top: 0; }
body.zhishu-body .ui-chat-bar.zhishu-new-input {
  background: color-mix(in srgb, var(--bg-card) 94%, transparent);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 6px 22px rgba(40,30,60,.10);
  backdrop-filter: blur(8px);
}
body.zhishu-body .ui-chat-bar.zhishu-new-input .ui-input { background: transparent; }

/* 三点菜单：右侧滑出弹窗（遮罩 + 平滑动画），仅「清空对话 / 对话记录 / 帮助中心」 */
/* ---- 云枢首页：品牌标题（位于滚动容器顶部，随内容一起纵向滚动） ---- */
.zs-hero {
  padding: calc(env(safe-area-inset-top, 0px) + 18px) var(--pad-x) 6px;
  text-align: center;
}
.zs-hero__title {
  font-size: 28px; font-weight: 700;
  line-height: 1.2; letter-spacing: .04em;
  font-family: 'STKaiti', 'KaiTi', '楷体', 'STXingkai', '行楷', 'Songti SC', 'SimSun', serif;
  color: var(--primary-deep);
  text-shadow: 0 1px 0 rgba(140,122,166,.08);
}
.zs-hero__logo,
.ui-drawer__brand-title-logo {
  display: block;
  width: auto;
  height: auto;
  object-fit: contain;
  -webkit-user-drag: none;
  user-select: none;
  pointer-events: none;
}
/* 抽屉品牌 LOGO + 版本号：横向排列，版本号在 LOGO 右侧空 1 汉字，下沿对齐 */
.ui-drawer__brand-logo-row {
  display: inline-flex;
  align-items: flex-end;
  gap: 1em;
}
.ui-drawer__brand-ver {
  font-size: 11px; line-height: 1; font-weight: 700;
  color: #fff; background: var(--primary-deep);
  padding: 2px 5px; border-radius: 7px;
  border: 1px solid #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.18);
  letter-spacing: .03em;
  font-family: var(--font-display, system-ui, sans-serif);
  white-space: nowrap;
}
.zs-hero__subtitle {
  font-size: 11px; color: var(--muted); line-height: 1.3;
  letter-spacing: .04em; margin-top: 4px;
  max-width: calc(100vw - 140px);
  margin-left: auto; margin-right: auto;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}


/* ============================================================
 * 左侧抽屉（豆包风：搜索框 → 身份行 → 单列列表 → 底部用户区）
 * 旧版 .zs-drawer 九宫格已下线，类名统一 .ui-drawer；
 * 打开态仍用 .show（全局手势 / 返回键判定依赖此类名，勿改）。
 * ============================================================ */
.ui-drawer-mask {
  display: none; position: fixed; inset: 0; z-index: 130;
  background: rgba(28,26,22,.42);
  animation: zs-fade .18s ease;
}
.ui-drawer-mask.show { display: block; }
@keyframes zs-fade { from { opacity: 0; } to { opacity: 1; } }

.ui-drawer {
  position: fixed; top: 0; left: 0; bottom: 0; z-index: 131;
  width: min(80vw, 320px);
  background: var(--bg);
  border-radius: 0 20px 20px 0;
  box-shadow: 8px 0 30px rgba(40,30,60,.16);
  transform: translateX(-100%);
  transition: transform .28s cubic-bezier(.22,1,.36,1);
  display: flex; flex-direction: column;
  overflow: hidden;               /* 滚动交给内部 __nav，头尾固定 */
}
.ui-drawer.show { transform: translateX(0); }
/* 抽屉展开时锁背景滚动（防止穿透滚动） */
body.drawer-locked { overflow: hidden !important; }

/* ① 搜索框 */
.ui-drawer__search {
  flex: none;
  display: flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 14px;
  margin: calc(env(safe-area-inset-top, 0px) + 10px) 16px 4px;
  background: var(--primary-soft);
  border-radius: var(--radius-pill, 999px);
  color: var(--muted);
}
.ui-drawer__search-ico { display: inline-flex; flex: none; }
.ui-drawer__search-ico svg { width: 20px; height: 20px; }
.ui-drawer__search input {
  flex: 1; min-width: 0;
  border: 0; background: transparent; outline: none;
  font: inherit; font-size: 16px;   /* 16px：iOS 聚焦不缩放页面 */
  color: var(--ink);
}
.ui-drawer__search input::placeholder { color: var(--muted); }
.ui-drawer__search input::-webkit-search-cancel-button { -webkit-appearance: none; }

/* ② 当前身份行 */
.ui-drawer__brand {
  flex: none;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px;
  padding: 10px 16px 6px;
}
.ui-drawer__brand-title {
  font-size: 26px; font-weight: 700; line-height: 1.2;
  letter-spacing: .05em;
  color: var(--primary-deep);
  font-family: 'STKaiti', 'KaiTi', '楷体', 'STXingkai', '行楷', 'Songti SC', 'SimSun', serif;
  text-shadow: 0 1px 0 rgba(140,122,166,.08);
}
.ui-drawer__brand-sub {
  font-size: 11px; color: var(--muted); line-height: 1.3;
  letter-spacing: .04em;
  text-align: center;
  max-width: 240px;
}
/* 品牌块下方的问候 + 名言（紫色线框布局） */
.ui-drawer__greet {
  flex: none;
  display: flex; flex-direction: column; gap: 4px;
  margin: 4px 12px 10px; padding: 10px 14px;
  border: 1px solid var(--primary); border-radius: 10px;
  background: transparent;
}
.ui-drawer__greet-text {
  font-size: 15px; font-weight: 500; color: var(--ink);
  text-align: left;
}
.ui-drawer__greet-divider {
  height: 1px; background: var(--primary); opacity: .35;
  margin: 1px 0 2px;
}
.ui-drawer__greet-quote {
  font-size: 13px; color: var(--primary-deep); line-height: 1.55;
  text-align: center;
  padding: 1px 0;
  word-break: break-word;
}
.ui-drawer__greet-author {
  font-size: 13px; color: var(--primary-deep);
  text-align: right;
}

/* ③ 单列菜单 */
.ui-drawer__nav { flex: 1; overflow-y: auto; padding: 4px 8px 12px; -webkit-overflow-scrolling: touch; }
.ui-drawer__group-title { padding: 12px 12px 4px; font-size: 12px; font-weight: 500; color: var(--muted); }
.ui-drawer__sep { height: 1px; margin: 8px 12px; background: var(--line); }
.ui-drawer__item {
  display: flex; align-items: center; gap: 12px; width: 100%;
  height: 44px; padding: 0 12px;
  border: 0; border-radius: var(--radius-xs);
  background: transparent; color: var(--ink);
  font: inherit; font-size: 15px; text-align: left;
  cursor: pointer;
  transition: background .15s ease;
}
.ui-drawer__item:hover { background: color-mix(in srgb, var(--primary) 6%, transparent); }
.ui-drawer__item:active { background: color-mix(in srgb, var(--primary) 12%, transparent); }
.ui-drawer__item.is-active { background: color-mix(in srgb, var(--primary) 10%, transparent); color: var(--primary-deep); font-weight: 500; }
.ui-drawer__item-ico { display: inline-flex; flex: none; color: var(--muted); }
.ui-drawer__item.is-active .ui-drawer__item-ico { color: var(--primary); }
.ui-drawer__item-ico svg { width: 20px; height: 20px; }
.ui-drawer__item-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* 退出登录（抽屉末尾条目）：图标红色微调，其余与普通条目完全一致 */
.ui-drawer__item--logout .ui-drawer__item-ico { color: var(--danger, #d9534f); }
.ui-drawer__item--logout .ui-drawer__item-label { color: var(--danger, #d9534f); }
/* 退出登录二次确认弹窗 */
.ys-modal-mask {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(17, 24, 39, .5);
  display: flex; align-items: center; justify-content: center;
  padding: 24px; box-sizing: border-box;
}
.ys-modal {
  width: 100%; max-width: 300px;
  background: #fff; border-radius: 16px;
  padding: 22px 20px 18px; box-sizing: border-box;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .18);
  animation: ysModalPop .18s ease;
}
@keyframes ysModalPop { from { transform: scale(.94); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.ys-modal__title { font-size: 16px; font-weight: 600; color: var(--ink); text-align: center; }
.ys-modal__body { font-size: 14px; color: var(--ink-soft); text-align: center; margin: 10px 0 18px; line-height: 1.6; }
.ys-modal__actions { display: flex; gap: 10px; }
.ys-modal__btn {
  flex: 1; height: 40px; border-radius: 10px; border: 0; cursor: pointer;
  font: inherit; font-size: 15px; transition: opacity .15s ease;
}
.ys-modal__btn:active { opacity: .8; }
.ys-modal__btn--ghost { background: var(--bg, #f2f4f8); color: var(--ink); }
.ys-modal__btn--danger { background: #d9534f; color: #fff; }
.ys-modal__btn:disabled { opacity: .6; cursor: default; }
/* 抽屉全局搜索结果 */
.ui-drawer__results { flex: 1; overflow-y: auto; padding: 4px 8px 12px; -webkit-overflow-scrolling: touch; }
.ui-drawer__result {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 11px 8px; border: 0; background: transparent; cursor: pointer;
  text-align: left; font: inherit; color: var(--ink);
  border-bottom: 1px solid var(--line);
}
.ui-drawer__result:active { background: var(--primary-soft, #f1ecfa); }
.ui-drawer__result-ico { display: inline-flex; flex: none; color: var(--muted); }
.ui-drawer__result-ico svg { width: 20px; height: 20px; }
.ui-drawer__result-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ui-drawer__result-label { font-size: 15px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ui-drawer__result-sub { font-size: 12px; color: var(--muted); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ui-drawer__result-cat {
  flex: none; font-size: 11px; color: var(--primary); background: var(--primary-soft, #f1ecfa);
  padding: 2px 8px; border-radius: 999px;
}
.ui-drawer__item-badge {
  flex: none; margin-left: 4px; padding: 1px 6px;
  background: #E54D42; color: #fff; border-radius: 999px;
  font-size: 10px; line-height: 1.5; font-weight: 600;
}
.ui-drawer__item-badge.tj-num { min-width: 17px; text-align: center; padding: 1px 4px; }
.ui-drawer__item-badge[hidden] { display: none; }
.ui-drawer__item-chevron { display: inline-flex; flex: none; color: var(--muted); opacity: .55; }
.ui-drawer__item-chevron svg { width: 16px; height: 16px; }
.ui-drawer__empty { padding: 24px 12px; text-align: center; font-size: 13px; color: var(--muted); }

/* ④ 底部用户区 */
.ui-drawer__footer {
  flex: none;
  display: flex; align-items: center; gap: 4px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line);
}
.ui-drawer__me {
  flex: 1; min-width: 0;
  display: flex; align-items: center; gap: 10px;
  padding: 6px 8px;
  border: 0; border-radius: var(--radius-xs);
  background: transparent; color: var(--ink);
  font: inherit; text-align: left; cursor: pointer;
  transition: background .15s ease;
}
.ui-drawer__me:active { background: color-mix(in srgb, var(--primary) 10%, transparent); }
.ui-drawer__me-avatar {
  width: 36px; height: 36px; border-radius: 50%; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--primary-soft); color: var(--primary-deep);
  font-size: 15px; font-weight: 500;
  background-size: cover; background-position: center;
}
.ui-drawer__me-avatar.has-img { color: transparent; }
.ui-drawer__me-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.ui-drawer__me-name { font-size: 15px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ui-drawer__me-sub { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ui-drawer__footer-btn {
  position: relative; flex: none;
  width: 40px; height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: 50%;
  background: transparent; color: var(--muted);
  cursor: pointer;
  transition: background .15s ease;
}
.ui-drawer__footer-btn:active { background: color-mix(in srgb, var(--primary) 12%, transparent); }
.ui-drawer__footer-btn svg { width: 20px; height: 20px; }
.ui-drawer__badge {
  position: absolute; top: 8px; right: 8px;
  width: 8px; height: 8px; border-radius: 50%;
  background: #D9534F; border: 2px solid var(--bg);
}

/* ==================================================================
 * 豆包风首页组件（云枢 zhishu.html）
 * 顶栏 / 药丸栏 / 输入胶囊 / 附件预览 / 加号面板 / 空态问候
 * Token 沿用现有 --primary / --bg / --ink / --muted / --line / --radius
 * ================================================================== */

/* ---- 悬浮按钮 ui-fab（汉堡；三点菜单已下线） ---- */
.ui-fab {
  position: fixed; top: 14px; z-index: 11;
  width: 40px; height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: 50%;
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  color: var(--ink); cursor: pointer; -webkit-tap-highlight-color: transparent;
  box-shadow: 0 2px 8px rgba(0,0,0,.04);
  transition: background .15s ease, transform .15s ease;
}
.ui-fab:active { background: var(--bg); transform: scale(.94); }
.ui-fab svg { width: 20px; height: 20px; }
.ui-fab--left  { left: 12px; }
.ui-fab--right { right: 12px; }

/* ---- ② 快捷药丸栏 ui-quickbar ---- */
.ui-quickbar {
  flex: none;
  display: flex; gap: 6px; overflow-x: auto; -webkit-overflow-scrolling: touch;
  padding: 8px 12px 2px;
  scrollbar-width: none;
  background: var(--bg);
}
.ui-quickbar::-webkit-scrollbar { display: none; }
.ui-quickbar[hidden] { display: none; }

/* V1.4.1:AI 问答页 skill 行与上方 chips 行左对齐;
   仅去掉「skill」前缀标签的胶囊外框,保留「写作咖」「公文排版」等技能药丸样式 */
#zsSkillBar {
  justify-content: flex-start;   /* 左对齐,与上方 chips 行一致 */
  flex-wrap: wrap;
  gap: 8px;
  padding: 6px 12px 4px 0;       /* 左 padding 置 0,对齐 chips 内容区(其父 .ui-dock 已有 12px 左 padding) */
}

.ui-pill {
  flex: none;
  display: inline-flex; align-items: center; gap: 3px;
  height: 28px; padding: 0 10px;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--bg); color: var(--ink);
  font-size: 12px; white-space: nowrap; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: border-color .15s ease, background .15s ease;
}
.ui-pill:active { border-color: var(--primary); background: var(--primary-soft); }
.ui-pill__ico {
  display: inline-flex; flex: none; align-items: center;
  color: var(--primary);
}
.ui-pill__ico svg { width: 14px; height: 14px; }
.ui-pill__label { overflow: hidden; text-overflow: ellipsis; max-width: 100px; }

/* 云枢页技能药丸栏前导「skill」标签：纯文本提示,不带胶囊外框 */
.zs-skill-label {
  flex: none;
  display: inline-flex; align-items: center;
  height: 28px; padding: 0 4px 0 0;
  color: #111;
  font-size: 12px; font-weight: 500; letter-spacing: .5px; line-height: 1;
  -webkit-tap-highlight-color: transparent;
}

/* ---- ③ 输入胶囊 ui-dock ---- */
.ui-dock {
  flex: none;
  display: flex; flex-direction: column; gap: 0;
  padding: 4px 12px calc(6px + env(safe-area-inset-bottom, 0px));
  background: var(--bg);
  z-index: 5;
}
/* 附件预览条 */
.ui-attach {
  display: flex; gap: 8px; overflow-x: auto; -webkit-overflow-scrolling: touch;
  padding: 6px 2px 2px; scrollbar-width: none;
}
.ui-attach::-webkit-scrollbar { display: none; }
.ui-attach[hidden] { display: none; }
.ui-attach__item {
  flex: none; position: relative;
  width: 64px; height: 64px; border-radius: var(--radius-xs); overflow: hidden;
  background: #F5F4F7;
}
.ui-attach__item img { width: 100%; height: 100%; object-fit: cover; }
.ui-attach__del {
  position: absolute; top: 2px; right: 2px;
  width: 20px; height: 20px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 0; background: rgba(0,0,0,.45); color: #fff;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.ui-attach__del svg { width: 12px; height: 12px; stroke: #fff; }

/* @提及文档能力 chip（紫调 token，仿 WorkBuddy 提及样式） */
.zs-mention-chip {
  flex: none;
  display: inline-flex; align-items: center;
  max-width: 56%;
  margin-right: 6px;
  padding: 4px 10px;
  border-radius: 14px;
  background: var(--primary-soft);
  color: var(--primary-deep);
  font-size: 14px; font-weight: 600; line-height: 1.2;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
  user-select: none; -webkit-user-select: none;
}
.zs-mention-chip[hidden] { display: none; }
.zs-mention-chip:active { background: var(--primary-glow); }
/* chip 出现后让文本框收缩到剩余宽度，与 chip 并排 */
.ui-composer__field.has-chip .ui-composer__input {
  flex: 1 1 auto; width: auto; min-width: 0;
}

/* 文档附件预览块（区别于图片缩略图）：小方形、纵向布局，无紫色背景 */
.ui-attach__item--doc {
  width: 64px; height: 64px;
  flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  padding: 4px 2px; box-sizing: border-box;
  background: transparent;
  border-radius: 6px;
}
.ui-attach__item--doc .ui-attach__doc-ico {
  flex: none; width: 18px; height: 18px; color: var(--primary);
}
.ui-attach__item--doc .ui-attach__doc-meta {
  display: flex; flex-direction: column; align-items: center; min-width: 0; line-height: 1.2;
  width: 100%; gap: 0;
}
.ui-attach__item--doc .ui-attach__doc-name {
  font-size: 11px; font-weight: 500; color: var(--ink);
  max-width: 100%;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ui-attach__item--doc .ui-attach__doc-size { font-size: 10px; color: var(--muted); }
.ui-attach__item--doc .ui-attach__del { background: rgba(0,0,0,.45); top: 0; right: 0; }

/* 输入行：相机 | [语音/输入] | 切换 | 加号/发送 */
.ui-composer {
  display: flex; align-items: center; gap: 4px;
  min-height: 50px;             /* 多行输入时随内容增高 */
  padding: 5px 6px;
  border-radius: 25px;           /* 半圆药丸 */
  background: #F3F2F5;          /* 极浅灰底（比 F5F4F7 稍深一点，更有存在感） */
  /* ⛔ 无边框、无阴影、无毛玻璃 —— 设计师硬规则 */
}
.ui-composer.is-sending { opacity .55; pointer-events: none; }

/* 左侧相机按钮 */
.ui-composer__btn {
  flex: none; width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: 50%; background: transparent; color: var(--muted);
  cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: color .15s ease;
}
.ui-composer__btn:active { background: rgba(0,0,0,.06); }
.ui-composer__btn svg { width: 20px; height: 20px; }
.ui-composer__btn--send { color: var(--primary); }
.ui-composer__btn--send:active { background: rgba(140,122,166,.1); }

/* 中间输入区：语音按钮 ⇄ 文本框（多行时随文本框增高） */
.ui-composer__field {
  flex: 1; min-width: 0;
  display: flex; align-items: center;
  min-height: 36px;
}
.ui-composer__voice {
  flex: 1; min-width: 0;
  display: flex; align-items: center; justify-content: center;
  height: 100%;
  border: 0; border-radius: 18px; background: transparent;
  font-size: 15px; color: var(--muted);
  padding: 0; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
/* 键盘态下隐藏语音文字 */
.ui-composer.is-typing .ui-composer__voice { display: none; }

.ui-composer__input {
  width: 100%;
  border: 0; border-radius: 18px; background: transparent;
  font-size: 16px;              /* iOS 不缩放的关键 */
  line-height: 22px;
  color: var(--ink); padding: 9px 8px;
  resize: none; outline: none;
  font-family: inherit;
  box-sizing: border-box;
  /* 单行垂直居中（40-22=18 → 上下各 9px），多行向上扩展至 120px（≈4 行）后内部滚动 */
  min-height: 40px; max-height: 120px;
  overflow-y: hidden;
}
.ui-composer__input::placeholder { color: var(--muted); }
/* 默认语音态隐藏文本框 */
.ui-composer__input { display: none; }
.ui-composer.is-typing .ui-composer__input { display: block; }

/* 右侧操作区：切换键始终可见，加号与发送互斥 */
#modeBtn svg { width: 20px; height: 20px; }
#modeBtn svg[hidden] { display: none !important; }
#plusBtn[hidden], #sendBtn[hidden] { display: none !important; }

/* ---- ④ 加号面板 ui-sheet ---- */
.ui-sheet-mask {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(28,26,22,.45);
  backdrop-filter: blur(2px);
  opacity: 0; visibility: hidden;
  transition: opacity .25s ease, visibility .25s ease;
}
.ui-sheet-mask.show { opacity: 1; visibility: visible; }

.ui-sheet {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 201;
  background: var(--bg);
  border-radius: 18px 18px 0 0;
  padding: 16px 16px 0;
  transform: translateY(100%);
  transition: transform .28s cubic-bezier(.32,.72,0,1);
  box-shadow: 0 -4px 30px rgba(0,0,0,.08);
}
.ui-sheet.show { transform: translateY(0); }
.ui-sheet[aria-hidden="true"] { display: none; }
.ui-sheet.show[aria-hidden="false"] { display: block; }

.ui-sheet__grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px 8px;
  padding-bottom: 12px;
}
.ui-sheet__item {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  border: 0; background: transparent; color: var(--ink);
  font-size: 12px; cursor: pointer; padding: 4px 0;
  -webkit-tap-highlight-color: transparent;
}
.ui-sheet__item:active { color: var(--primary); }
.ui-sheet__ico {
  width: 52px; height: 52px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  background: #F5F4F7; color: var(--ink);
  transition: background .15s ease;
}
.ui-sheet__item:active .ui-sheet__ico { background: var(--primary-soft); }
.ui-sheet__ico svg { width: 26px; height: 26px; }
.ui-sheet__label { font-size: 12px; color: var(--muted); }
.ui-sheet__cancel {
  display: block; width: 100%;
  padding: 13px 0; margin-bottom: env(safe-area-inset-bottom, 0px);
  border: 0; border-top: 1px solid var(--line);
  background: transparent; color: var(--muted);
  font-size: 15px; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.ui-sheet__cancel:active { color: var(--ink); }

/* ---- ④-b 文档弹窗：拖拽区 + 备注提示（加号面板「文档」入口） ---- */
.zs-docup { max-width: 340px; padding: 18px; }
.zs-docup__head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.zs-docup__title { font-size: 17px; font-weight: 600; color: var(--ink); }
.zs-docup__close {
  width: 30px; height: 30px; flex: 0 0 30px; padding: 0;
  display: flex; align-items: center; justify-content: center;
  border: 0; border-radius: 50%; background: transparent; color: var(--muted);
  cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.zs-docup__close:active { background: var(--bg); color: var(--ink); }
.zs-docup__close svg { width: 18px; height: 18px; }

/* ---- ④-c 对话记忆设置弹窗：开关行 + 清除按钮 + 说明文案 ---- */
.zs-memory { max-width: 340px; padding: 18px; }
.zs-memory__body { display: flex; flex-direction: column; gap: 14px; }
.zs-memory__row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  font-size: 15px; color: var(--ink);
}
.zs-memory__switch .cp-switch__track { background: var(--line-strong, #ccc); }
.zs-memory__switch input:checked + .cp-switch__track { background: #2ecc71; }
.zs-memory__clear {
  width: 100%; padding: 11px 0; border: 0; border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff; font-size: 15px; cursor: pointer;
  -webkit-tap-highlight-color: transparent; transition: opacity .15s ease;
}
.zs-memory__clear:active { opacity: .82; }
.zs-memory__tip {
  font-size: 12px; color: var(--muted); line-height: 1.7;
  text-align: left; margin: 0;
}
.zs-docup__zone {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 26px 16px; border-radius: 14px; text-align: center;
  border: 1.5px dashed var(--line); background: var(--bg);
  cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: border-color .16s ease, background .16s ease;
}
.zs-docup__zone:active,
.zs-docup__zone.is-over { border-color: var(--primary); background: var(--primary-soft); }
.zs-docup__zone:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.zs-docup__zico {
  width: 46px; height: 46px; border-radius: 13px;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-card-solid); color: var(--primary);
  box-shadow: 0 1px 4px rgba(28,26,22,.06);
}
.zs-docup__zico svg { width: 24px; height: 24px; }
.zs-docup__ztitle { font-size: 15px; font-weight: 600; color: var(--ink); }
.zs-docup__zsub { font-size: 13px; color: var(--muted); }
.zs-docup__zlink { color: var(--primary); margin-left: 2px; }
.zs-docup__tips { margin: 14px 0 0; padding: 0; list-style: none; }
.zs-docup__tips li {
  position: relative; padding-left: 12px; margin-top: 6px;
  font-size: 12.5px; line-height: 1.6; color: var(--muted);
}
.zs-docup__tips li::before {
  content: ''; position: absolute; left: 2px; top: 8px;
  width: 4px; height: 4px; border-radius: 50%;
  background: currentColor; opacity: .45;
}
/* 上传弹窗底部零存储提示（技能网关动态填充） */
.zs-docup__tip { margin: 12px 0 4px; font-size: 12px; line-height: 1.6; color: var(--muted); }
/* 已选文件卡片（直接显示在弹窗内，避免用户只看 toast） */
.zs-docup__file {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; margin: 12px 0;
  border-radius: 12px; background: var(--primary-soft);
  border: 1px solid var(--primary); color: var(--ink);
}
.zs-docup__file-ico { flex: none; color: var(--primary); }
.zs-docup__file-ico svg { width: 22px; height: 22px; }
.zs-docup__file-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.zs-docup__file-name { font-size: 14px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zs-docup__file-size { font-size: 12px; color: var(--muted); }
.zs-docup__file-del {
  flex: none; width: 26px; height: 26px; border-radius: 50%;
  border: 0; background: rgba(0,0,0,.08); color: var(--ink);
  font-size: 18px; line-height: 1; cursor: pointer;
}
.zs-docup__file-del:active { background: rgba(0,0,0,.15); }
/* 开始处理按钮高亮引导 */
.zs-doc__btn--pulse { animation: btnPulse 1.6s ease-in-out infinite; }
@keyframes btnPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(47, 111, 237, .45); }
  50% { box-shadow: 0 0 0 8px rgba(47, 111, 237, 0); }
}

/* ---- ⑤ 空态问候区（对话为空时显示） ---- */
.zs-empty-state {
  display: flex; flex-direction: column; align-items: center;
  padding: 48px 28px 24px; text-align: center;
}
.zs-empty-greet { font-size: 20px; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.zs-empty-sub { font-size: 14px; color: var(--muted); line-height: 1.5; max-width: 260px; }

/* ---- ⑥ AI 消息无气泡（豆包风：AI 回复直接展示文字，不套圆角气泡） ---- */
body.zs-doubao .msg-row-ai:not(.me) .ai-bubble.ai {
  background: #F3F2F5 !important;
  padding: 12px 14px !important;
  border: none !important; border-radius: 12px !important;
  color: var(--ink) !important;
  font-size: 15px !important;
  line-height: 1.7 !important;
  max-width: 100% !important;
  white-space: pre-wrap !important;
}
/* 用户消息保持原气泡样式不变 */
body.zs-doubao .msg-row-ai:not(.me) .ai-avatar { display: none; }  /* AI 头像也隐藏，更干净 */

/* AI 回复底部操作行：复制按钮 + 参考资料（紫色） */
.ai-answer-footer {
  display: flex; align-items: center; gap: 16px;
  margin: 4px 0 14px 0; padding: 0;
}
.ai-copy-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; padding: 0;
  border: 0; border-radius: 6px;
  background: transparent; color: var(--primary);
  cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: background .15s ease;
}
.ai-copy-btn:active { background: var(--primary-soft); }
.ai-source-tag { font-size: 12px; color: var(--primary); }
/* 结果底栏「下载 Word」按钮固定在右下角 */
.ai-doc-dl { margin-left: auto; }
/* 文档型技能 footer：文字提示独占一行（左对齐），第二行才是按钮 */
.ai-answer-footer--doc {
  flex-direction: column; align-items: flex-start; gap: 6px;
}
.ai-answer-footer--doc .ai-doc-actions {
  display: inline-flex; align-items: center; gap: 16px;
}
.ai-answer-footer--doc .ai-doc-actions .ai-doc-dl { margin-left: 0; }
/* 图片识别标记：用青绿与「参考资料」紫区分，提示本次回答基于图片中抠出的文字 */
.ai-ocr-tag { color: #1f9d6b; font-weight: 500; }

/* ---- ⑦ body 布局（豆包首页：内部滚动，dock 固定底） ---- */
body.zhishu-body.zs-doubao {
  overflow: hidden;             /* 外层不滚 */
  height: 100dvh; height: 100vh;
}
body.zhishu-body.zs-doubao > .app {
  display: flex; flex-direction: column;
  height: 100dvh; height: 100vh;       /* 严格视口高 */
  overflow: hidden;
}
body.zhishu-body.zs-doubao .zhishu-scroll {
  flex: 1; min-height: 0;
  overflow-y: auto; overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}
/* 其它豆包风页面：body 自身滚动 */
html.ys-scroll, body.ys-scroll,
body.profile-body, body.page-body, body.ct-body {
  overflow-y: auto !important; overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  height: auto !important; min-height: 100dvh;
}
/* 上面三个页面 .app 不再锁视口高，由 body 承担滚动 */
body.profile-body .app, body.page-body .app, body.ct-body .app {
  height: auto !important;
  overflow: visible !important;
  display: block !important;
}

/* ===== 群聊弹窗（建群 / 群详情 / 邀请好友） ===== */
.g-modal-mask {
  position: fixed; inset: 0; z-index: 120;
  background: rgba(28,26,22,.45);   /* 与全站弹窗遮罩统一 */
  backdrop-filter: blur(2px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.g-modal {
  width: 100%; max-width: 360px;
  background: var(--bg-card-solid);
  border-radius: var(--radius);   /* 与全站弹窗圆角统一（22px） */
  box-shadow: 0 12px 40px rgba(0,0,0,.22);
  display: flex; flex-direction: column;
  max-height: 82vh;
  overflow: hidden;
  animation: modalIn .25s cubic-bezier(.25,.46,.45,.94);
}
.g-modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-bottom: 1px solid var(--line);
}
.g-modal-head .ct { font-size: 16px; font-weight: 600; color: var(--ink); }
.g-modal-head .g-close {
  background: transparent; border: none; color: var(--muted);
  cursor: pointer; font-size: 16px; line-height: 1; padding: 4px; border-radius: 4px;
}
.g-modal-head .g-close:hover { background: var(--primary-soft); }
.g-modal-body { padding: 14px 16px; overflow-y: auto; flex: 1; }
.g-modal-foot { padding: 12px 16px; border-top: 1px solid var(--line); }
.g-modal-foot .btn, .g-modal-body .btn { border: none; }
.g-friend { user-select: none; -webkit-user-select: none; }
.g-friend .av { flex-shrink: 0; }

/* 旧聊天模块页内容区补足底栏消失后的底部安全距 */
body:not(.home-page) .app.wuyan-app { padding-bottom: env(safe-area-inset-bottom, 0); }


.friend {
  display: flex; align-items: center; gap: 10px;
  background: transparent; border: none; border-bottom: 1px solid var(--line);
  border-radius: 0; padding: 10px 16px; margin: 0;
  cursor: pointer; box-shadow: none;
}
.friend:active { transform: scale(.99); }
.friend .meta { flex: 1; min-width: 0; }
.friend .fname { font-size: 15px; font-weight: 600; }
.friend .flast {
  font-size: 12px; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.friend .ftime { font-size: 11px; color: var(--muted); }
.friend .badge {
  min-width: 18px; height: 18px; background: var(--rose); color: #fff;
  border-radius: 9px; font-size: 11px; display: flex; align-items: center;
  justify-content: center; padding: 0 5px;
}
.friend .arrow { color: var(--muted); font-size: 20px; }

/* 聊天面板 */
/* 好友详情面板：与 chat-panel 同款 fixed 全屏浮层，默认隐藏，.show 时弹出 */
.friend-detail {
  position: fixed; inset: 0; max-width: var(--maxw); margin: 0 auto;
  background: var(--bg); z-index: 100; display: none; flex-direction: column;
}
/* 好友资料面板打开时，强制隐藏右上角三个图标按钮 */
.friend-detail.show ~ .wy-friends-search-row,
body:has(.friend-detail.show) .wy-friends-search-row { display: none !important; }
.friend-detail.show { display: flex; }

.chat-panel {
  position: fixed; inset: 0; max-width: var(--maxw); margin: 0 auto;
  background: var(--bg); z-index: 100; display: none; flex-direction: column;   /* z-index 提升：全屏面板盖过标题栏(fixed z-40)，避免输入区被遮挡 */
}
.chat-panel.show { display: flex; }
.chat-head {
  display: flex; align-items: center; padding: calc(14px + var(--safe-top)) 16px 14px;
  background: var(--bg-card); border-bottom: 1px solid var(--line);
}
.chat-head .ct { flex: 1; text-align: center; font-size: 16px; font-weight: 600; }
.chat-msgs { flex: 1; overflow-y: auto; padding: 14px 12px; }
.msg-row { display: flex; gap: 8px; margin: 12px 0; align-items: flex-start; }
.msg-row.me { flex-direction: row-reverse; }
.msg-row .msg-avatar {
  width: 36px; height: 36px; border-radius: 6px; flex: 0 0 36px; overflow: hidden;
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
}
.msg-row .msg-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.msg-row .msg-avatar.female { background: linear-gradient(135deg, var(--rose), #D4A29E); }
/* 消息头像统一（投笺匿名聊天：本人"我"字、对方性别图标，方形） */
.msg-row .msg-avatar .av-me,
.msg-row .msg-avatar .av-sex {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; color: #fff;
}
.msg-row .msg-avatar .av-me { background: linear-gradient(135deg, #66517F, #8C7AA6); }
.msg-row .msg-avatar .av-sex--f { background: linear-gradient(135deg, #C4889A, #D4A29E); }
.msg-row .msg-avatar .av-sex--m { background: linear-gradient(135deg, #7A93C4, #A2B4D9); }
/* 群聊头部：群头像（方形块）+ 群名（人数），点击查看群详情/成员 */
.chat-head .ct { display: flex; align-items: center; gap: 6px; min-width: 0; }
.chat-head .g-head-av {
  width: 26px; height: 26px; flex: 0 0 26px;
  border-radius: 6px;
  background: linear-gradient(135deg, #A892C2, #8C7AA6);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 14px; line-height: 1;
}
.chat-head .g-head-name {
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font-size: 16px; font-weight: 600; color: var(--ink);
}
.msg-row .msg-body { max-width: 70%; }
#chatMsgs.multi-select .msg-row.me .msg-body { max-width: 62%; }
.msg-row .msg-time {
  font-size: 11px; color: var(--muted); margin: 2px 4px; text-align: center;
}
.msg-row.me .msg-time { text-align: right; }

/* 聊天时间分隔线（居中显示，类似微信）：在消息组之间插入，1分钟内不重复 */
.chat-time-divider {
  text-align: center;
  font-size: 11px;
  color: var(--muted);
  padding: 8px 0 4px;
  line-height: 1;
  user-select: none;
  -webkit-user-select: none;
}
/* 云枢 AI 对话中的时间分隔线（复用相同样式） */
.zhishu-scroll .chat-time-divider,
#chatBox .chat-time-divider {
  text-align: center;
  font-size: 11px;
  color: var(--muted);
  padding: 10px 0 6px;
  line-height: 1;
  user-select: none;
  -webkit-user-select: none;
}

.bubble {
  padding: 10px 13px; border-radius: 14px; font-size: 14px;
  line-height: 1.5; word-break: break-word;
}
.bubble.me {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff; border-bottom-right-radius: 4px;
}
.bubble.other {
  background: var(--bg-card); border: 1px solid var(--line);
  border-bottom-left-radius: 4px;
}
.msg-status { font-size: 11px; color: var(--muted); margin-top: 2px; text-align: right; }
/* 旧聊天模块聊天详情：复用标准 .ui-chat-bar。
   面板本身已是全屏 fixed flex 浮层，故覆盖为相对定位、留在 flex 流中贴底，
   避免与 .ui-chat-bar 默认 fixed 产生双重 fixed 错位 */
.chat-panel .ui-chat-bar {
  position: relative; left: auto; right: auto; bottom: auto; transform: none;
  width: 100%; max-width: none;
  border-top: 1px solid var(--line);
  padding: 4px var(--pad-x) calc(2px + env(safe-area-inset-bottom, 0px) * 0.3);
}

/* ===== 投笺 ===== */
/* 投笺 compose：标题/副标题在左，投递按钮在右（去掉常驻输入框，改为弹窗输入） */
.tj-compose {
  background: var(--bg-card);
  border-radius: var(--radius-sm); padding: 10px 14px; color: var(--ink);
  border: 1px solid var(--line);
  display: flex; align-items: center; gap: 10px;
}
.tj-compose__hint { flex: 1; min-width: 0; }
.tj-compose h4 { margin: 0 0 1px; font-size: 14px; color: var(--ink); }
.tj-compose p { margin: 0; font-size: 11px; color: var(--muted); }
.tj-deliver-btn {
  flex: 0 0 auto; padding: 9px 22px; border: none; cursor: pointer;
  background: linear-gradient(135deg, var(--primary), var(--primary-light)); color: #fff;
  border-radius: 999px; font-size: 14px; font-weight: 600;
  box-shadow: 0 3px 10px var(--primary-glow); -webkit-tap-highlight-color: transparent;
  transition: transform .12s;
}
.tj-deliver-btn:active { transform: scale(.96); }

/* 投递弹窗 */
.tj-compose-mask {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(28,26,22,.45); backdrop-filter: blur(2px);
  display: none; align-items: center; justify-content: center;
  padding: calc(20px + var(--safe-top)) calc(20px + var(--safe-right)) calc(20px + var(--safe-bottom)) calc(20px + var(--safe-left));
}
.tj-compose-mask.show { display: flex; }
.tj-compose-pop {
  width: 100%; max-width: 340px; background: var(--bg-card-solid);
  border-radius: 18px; padding: 16px; box-shadow: var(--shadow-elevated);
  animation: modalIn .25s cubic-bezier(.25,.46,.45,.94);
}
.tj-compose-pop__head { font-size: 16px; font-weight: 600; color: var(--ink); margin-bottom: 12px; text-align: center; }
.tj-compose-pop textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 12px;
  padding: 10px 12px; font-size: 14px; resize: none; min-height: 96px;
  font-family: inherit; outline: none; background: var(--bg); color: var(--ink);
  box-sizing: border-box;
}
.tj-compose-pop__actions { display: flex; gap: 10px; margin-top: 12px; }
.tj-compose-pop__actions .btn { flex: 1; justify-content: center; }
/* 投笺输入区：文字域进一步压扁（默认单行 28px，多行上限降低） */
.tj-compose .ui-chat-bar { padding: 4px 0; gap: 4px; }
.tj-compose .ui-chat-bar__row textarea { min-height: 28px !important; max-height: 48px !important; }
.tj-compose textarea {
  width: 100%; border: none; border-radius: var(--radius-xs);
  padding: 8px 10px; font-size: 13px; resize: none; min-height: 28px;
  font-family: inherit; outline: none; background: var(--bg-card-solid);
  color: var(--ink);
}

/* 匿名聊天（投笺）头像：方形 + 性别底色 + 居中（原 .tj-avatar 无样式 → 显示为裸文字） */
.tj-avatar {
  width: 36px; height: 36px; flex: 0 0 36px; border-radius: 6px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, #9A92A4, #C2BBD0);
}
.tj-avatar.female-peer, .tj-avatar.female-me { background: linear-gradient(135deg, #C4889A, #D4A29E); }
.tj-avatar.male-peer, .tj-avatar.male-me { background: linear-gradient(135deg, #7A93C4, #A2B4D9); }

/* 首页问候卡：问候行靠左、名言正文居中、作者行右对齐（紧贴名言末尾） */
.home-modules { text-align: center; }
.home-modules .hm-greet { justify-content: flex-start; }
.home-modules .hm-q-content { text-align: center; }
.home-modules .hm-q-author { text-align: right; }

/* 备忘录编辑弹窗：提醒状态「已提醒 / 日期」分两行 */
.memo-edit .memo-notif-date { display: block; font-size: 11px; opacity: .85; }
.tj-compose textarea::placeholder { color: var(--muted); }
.tj-compose .row { display: flex; justify-content: flex-end; margin-top: 8px; }
.tj-compose .row button {
  background: linear-gradient(135deg, var(--primary), var(--primary-light)); color: #fff; border: none;
  border-radius: var(--radius-xs); padding: 8px 20px;
  font-size: 14px; cursor: pointer; font-weight: 600;
}
.tj-actions { display: flex; gap: 10px; margin: 14px 0; }
.tj-actions button {
  flex: 1; padding: 12px; border: 1px solid var(--line-strong);
  background: var(--bg-card); border-radius: var(--radius-xs);
  font-size: 14px; color: var(--primary); cursor: pointer;
  font-family: inherit; transition: background .15s;
}
.tj-actions button:hover { background: var(--primary-soft); }
.tj-note {
  background: var(--bg-card); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 14px; margin: 10px 0;
  font-size: 14px; line-height: 1.6;
}
.tj-note .tj-meta { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); margin-top: 10px; }
.tj-reply { margin: 8px 0 0; padding: 8px 10px; background: var(--bg); border-radius: var(--radius-xs); font-size: 13px; }

/* 投笺“正在飞来”过渡动画 */
.tj-flying {
  display: flex; align-items: center; justify-content: center;
  gap: 6px; padding: 22px 14px; color: var(--muted); font-size: 15px;
}
.tj-flying .dots {
  display: inline-flex; align-items: center; gap: 4px;
}
.tj-flying .dots i {
  display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  background: var(--gold); opacity: .2;
  animation: dotLight 2s infinite ease-in-out;
}
.tj-flying .dots i:nth-child(1) { animation-delay: 0s; }
.tj-flying .dots i:nth-child(2) { animation-delay: .333s; }
.tj-flying .dots i:nth-child(3) { animation-delay: .666s; }
.tj-flying .dots i:nth-child(4) { animation-delay: 1s; }
.tj-flying .dots i:nth-child(5) { animation-delay: 1.333s; }
.tj-flying .dots i:nth-child(6) { animation-delay: 1.666s; }
@keyframes dotLight {
  0%, 100% { opacity: .2; transform: scale(.85); }
  16.67% { opacity: 1; transform: scale(1.15); box-shadow: 0 0 6px var(--gold); }
}
.tj-received-tip {
  text-align: center; color: var(--primary); font-size: 15px;
  font-weight: 600; margin-bottom: 12px; letter-spacing: 2px;
}
.section-title {
  font-size: 14px; font-weight: 600; color: var(--ink);
  margin: 16px 14px 4px; letter-spacing: 1px;
}

/* ===== 云枢 ===== */
/* 旧 .ask-bar 样式已合并进 .ui-chat-bar（L209-247），HTML 内已无 .ask-bar 引用 */

/* ===== 通用页面滚动区 =====
   所有内页统一「外层 fixed + 内层 scroll」布局：body + .app 锁死 100vh，
   页面主内容区设为可滚动 flex 子项，撑满 modHead 和 bottom-nav/ui-chat-bar 之间的可视空间。
   这样 modHead（标题头）+ 任意副标题/tabs + bottom-nav 永远固定不动。 */
.zhishu-scroll,
.note-grid,
.zhaoce-grid,
.friend-feed,
.blocks-grid,
[data-page-scroll] {
  flex: 1; min-height: 0;
  overflow-y: auto; overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  /* 底部留白 = 导航高度 + 余量，确保内容不被更高的固定底栏遮挡 */
  padding-bottom: calc(var(--tabbar-h) + 12px);
}
/* ===== wuyan.html 嵌套滚动 =====
   .tab-pane 自己是 flex column 容器（不滚），其内部 wy-fixed-top + wy-scroll 实现嵌套滚动。
   .tab-pane 自身需要 flex:1 让它撑满 modHead 和 wy-tabs 之间的可视空间。 */
.tab-pane { flex: 1 1 0; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.wy-fixed-top { flex: 0 0 auto; }
.wy-scroll {
  flex: 1 1 0; min-height: 0;
  overflow-y: auto; overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}
.zhishu-scroll {
  padding: 12px var(--pad-x); padding-bottom: 150px;     /* 底部留 150px 给紧凑版 .ui-chat-bar（输入框36+gap6+工具行32+padding12 ≈ 86px + bottom 70px） */
}
/* .note-grid / .friend-feed 已用上面的统一选择器加上 flex:1+overflow:auto，原有的 display:grid 等布局在 .note-grid/.friend-feed 自身规则里 */
.chips { display: flex; flex-wrap: wrap; gap: 5px; padding: 2px 0 4px 0; }
.chip {
  background: var(--primary-soft); color: var(--primary);
  border: 1px solid var(--line); border-radius: 999px;
  padding: 3px 9px; font-size: 11.5px; line-height: 1.5; cursor: pointer;
}
.msg-row-ai { display: flex; gap: 10px; margin: 14px 0; align-items: flex-start; }
.msg-row-ai.me { flex-direction: row-reverse; }
.ai-avatar {
  width: 38px; height: 38px; border-radius: 50%; flex: 0 0 38px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 12px; font-weight: 700;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
}
.ai-avatar.user { background: linear-gradient(135deg, var(--gold), var(--gold-deep)); }
.ai-bubble {
  max-width: 72%; padding: 12px 14px; border-radius: 16px;
  font-size: 14px; line-height: 1.6; white-space: pre-wrap; word-break: break-word;
}
.ai-bubble.ai {
  background: var(--bg-card); border: 1px solid var(--line);
  border-bottom-left-radius: 4px;
}
.ai-bubble.me {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff; border-bottom-right-radius: 4px;
}
/* 技能进度行（progress）：与正文 token 分离；正文到达时整块被移除，仅含 wordId 时切为完成态 */
.ai-bubble .ai-progress { color: var(--ink-soft); font-size: 13px; line-height: 1.55; }
.ai-bubble .ai-progress--done { color: var(--primary, #4a7c59); font-weight: 600; }
.ai-bubble .ai-content { display: block; }
/* 知识库回答的资料来源（溯源）：气泡下方浅色脚注，增强可信度 */
.ai-source {
  margin: 2px 0 10px 52px;
  padding: 7px 11px;
  font-size: 11.5px; line-height: 1.5;
  color: var(--ink-soft);
  background: rgba(140, 122, 166, 0.08);
  background: color-mix(in srgb, var(--primary) 8%, var(--bg-card));
  border-left: 3px solid var(--primary);
  border-radius: 0 10px 10px 0;
  max-width: calc(100% - 52px);
  word-break: break-word;
}
.ai-source__label {
  display: inline-block;
  margin-right: 4px;
  font-weight: 600;
  color: var(--primary-deep, var(--primary));
  white-space: nowrap;
}
.ai-source__list { opacity: 0.95; }

/* ===== 弹窗（玻璃态） ===== */
.modal-mask {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(28,26,22,.45);
  backdrop-filter: blur(2px);
  display: none; align-items: center; justify-content: center;
  padding: calc(20px + var(--safe-top)) calc(20px + var(--safe-right)) calc(20px + var(--safe-bottom)) calc(20px + var(--safe-left));
}
.modal-mask.show { display: flex; }
.modal {
  width: 100%; max-width: var(--maxw);
  background: var(--bg-card-solid); border-radius: var(--radius);
  max-height: 84vh; max-height: 84dvh; overflow-y: auto; padding: 20px;
  box-shadow: var(--shadow-elevated), 0 0 0 1px rgba(255,255,255,.5) inset;
  animation: modalIn .25s cubic-bezier(.25,.46,.45,.94);
}
.modal .m-close {
  float: right; font-size: 22px; color: var(--muted);
  cursor: pointer; width: 32px; height: 32px; text-align: center;
  line-height: 30px; border-radius: 50%; transition: background .15s;
}
.modal .m-close:hover { background: var(--bg); }
.modal .m-cat {
  display: inline-block; font-size: 12px; color: var(--gold-deep);
  background: var(--gold-soft); border-radius: 999px; padding: 2px 10px;
}
.modal .m-title { font-size: 19px; font-weight: 700; margin: 10px 0; }
.modal .m-body {
  font-size: 15px; line-height: 1.8; white-space: pre-wrap;
}

/* 批量操作模式选择弹窗：两个等大选项 + 取消 */
.bc-opt {
  display: flex; align-items: center; gap: 12px; width: 100%;
  text-align: left; background: var(--bg-card); border: 1px solid var(--line);
  border-radius: 12px; padding: 12px 14px; margin: 8px 0; cursor: pointer;
  transition: background .15s, transform .1s, border-color .15s;
}
.bc-opt:hover { background: var(--bg); border-color: var(--primary-glow); }
.bc-opt:active { transform: scale(.99); }
.bc-opt__ic {
  width: 34px; height: 34px; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  border-radius: 9px; background: var(--primary-glow); color: #8C7AA6;
}
.bc-opt__ic svg { width: 20px; height: 20px; }
.bc-opt__txt { display: flex; flex-direction: column; gap: 2px; }
.bc-opt__t { font-size: 15px; font-weight: 600; color: var(--ink); }
.bc-opt__d { font-size: 12px; color: var(--muted); }

/* ===== 启动页 ===== */
.splash-screen {
  position: fixed; inset: 0; max-width: var(--maxw); margin: 0 auto;
  background: linear-gradient(170deg, var(--primary-deep) 0%, var(--primary) 40%, var(--primary-light) 100%);
  color: #fff; z-index: 100;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 40px;
}
/* 印章 logo（2026-08-14 移除：替换为透明 PNG logo 图片，与下方 h1 合并由 .splash-logo 承载） */
.splash-screen .splash-logo {
  height: 40px;           /* 接近原 h1 38px 字号的视觉尺寸 */
  width: auto;
  margin-bottom: 30px;    /* 与原 .logo-box 下边距一致 */
  display: block;
  /* 强制白色：brightness(0) 把非透明像素压到黑，invert(1) 反为白；透明像素 alpha 不变仍透出紫色背景 */
  filter: brightness(0) invert(1);
}
.splash-screen h1 { font-family: var(--font-display); font-size: 38px; font-weight: 400; letter-spacing: 10px; margin: 0 0 8px; }
.splash-screen .tagline { font-size: 14px; opacity: .85; letter-spacing: 3px; margin-bottom: 40px; }
.splash-screen .start-btn {
  width: 220px; padding: 14px; border-radius: 999px; border: 1px solid rgba(255,255,255,.3);
  background: rgba(255,255,255,.12); color: #fff; font-size: 16px;
  font-weight: 600; cursor: pointer; backdrop-filter: blur(4px);
  transition: background .2s;
}
.splash-screen .start-btn:hover { background: rgba(255,255,255,.2); }

/* ===== 登录页 ===== */
.login-page { min-height: 100vh; min-height: 100dvh; background: var(--bg); }
.login-top {
  background: linear-gradient(160deg, var(--primary-deep), var(--primary), var(--primary-light));
  border-radius: 0 0 32px 32px; padding: 50px 24px 50px;
  color: #fff; text-align: center; position: relative; z-index: 1;
}
/* LOGO + 迭代版本号：横向排列，版本号在 LOGO 右侧空 1 汉字，下沿对齐 */
.login-logo-wrap { margin: 0 0 8px; display: inline-flex; align-items: flex-end; gap: 1em; }
.login-logo {
  display: block;
  width: 132px;
  height: auto;
}
/* 迭代版本号：位于 LOGO 之后，大小约为 LOGO 高度的 1/3，下沿与 LOGO 对齐 */
.login-ver {
  position: static;
  font-size: 20px; line-height: 1; font-weight: 700;
  color: #fff; background: var(--primary-deep);
  padding: 2px 6px; border-radius: 8px;
  border: 1.5px solid #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,.3);
  letter-spacing: .03em;
  font-family: var(--font-display, system-ui, sans-serif);
  white-space: nowrap;
}
.login-top p { margin: 0; font-size: 13px; opacity: .85; }
.login-card {
  background: var(--bg-card); border-radius: var(--radius);
  margin: 24px 16px 20px; padding: 24px 20px;
  box-shadow: var(--shadow-elevated);
  position: relative; z-index: 2;
}
.login-tabs { display: flex; gap: 24px; margin-bottom: 20px; }
.login-tabs span {
  font-size: 16px; color: var(--muted); padding-bottom: 6px; cursor: pointer;
}
.login-tabs span.active {
  color: var(--primary); border-bottom: 3px solid var(--primary); font-weight: 600;
}
.login-input {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg); border-radius: var(--radius-xs);
  padding: 12px 14px; margin-bottom: 14px; border: 1px solid var(--line);
}
.login-input svg { width: 20px; height: 20px; color: var(--muted); flex: 0 0 20px; }
.login-input input { flex: 1; border: none; background: transparent; font-size: 15px; outline: none; color: var(--ink); }
.login-more {
  display: flex; align-items: center; gap: 12px;
  margin: 24px 0; color: var(--muted); font-size: 12px;
}
.login-more::before, .login-more::after {
  content: ""; flex: 1; height: 1px; background: var(--line);
}
.login-social { display: flex; justify-content: center; gap: 30px; }
.login-social .so {
  width: 44px; height: 44px; border-radius: 50%; background: var(--bg);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.login-social .so svg { width: 24px; height: 24px; }

/* ===== 轻提示 ===== */
/* 基础：右上角悬浮；警告级（限流/封禁/重要提醒）：中央居中 + 强调色 + 警示图标 */
.toast {
  position: fixed; left: 50%; top: calc(20px + var(--safe-top)); transform: translateX(-50%);
  background: rgba(0,0,0,.9); color: #fff; padding: 10px 18px;
  border-radius: 10px; font-size: 13px; z-index: 10000;
  opacity: 0; transition: opacity .2s;
  box-shadow: 0 8px 30px rgba(0,0,0,.35), 0 0 0 1px rgba(255,255,255,.12) inset;
  max-width: 86vw; word-break: break-word;
  text-shadow: 0 1px 2px rgba(0,0,0,.45);
  -webkit-font-smoothing: antialiased;
}
.toast.show { opacity: 1; }
/* 警告级（v9.23 限流提示必须显眼前置）：中央 + 高 z-index + 强调渐变背景 + 警示图标 */
.toast.toast--warn {
  top: 50%; left: 50%; transform: translate(-50%, -50%);
  z-index: 9999;
  display: flex; align-items: center; gap: 8px;
  background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
  color: #fff;
  padding: 14px 22px;
  font-size: 15px; font-weight: 600;
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(217, 119, 6, .35), 0 4px 12px rgba(0, 0, 0, .18);
  min-width: 200px; max-width: 88vw;
  text-align: center;
  animation: toastWarnIn .2s ease;
}
.toast.toast--warn .toast__icn {
  display: inline-flex; align-items: center; justify-content: center;
  flex: none;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .22);
}
.toast.toast--warn .toast__txt { line-height: 1.4; }
@keyframes toastWarnIn { from { transform: translate(-50%, -50%) scale(.92); opacity: 0; } to { transform: translate(-50%, -50%) scale(1); opacity: 1; } }

/* ===== 封面色板 ===== */
.g1 { background: linear-gradient(135deg, var(--primary), var(--primary-light)); }
.g2 { background: linear-gradient(135deg, var(--rose), #D4A29E); }
.g3 { background: linear-gradient(135deg, #6B7BA0, #8B9DC4); }
.g4 { background: linear-gradient(135deg, var(--gold), var(--gold-light)); }
.g5 { background: linear-gradient(135deg, var(--teal), #78B5B5); }

/* ===== 首页朋友圈（纯白） ===== */
.friend-feed { padding: 0; }
.friend-item {
  padding: 12px 14px 0; border-bottom: 1px solid var(--line);
  background: transparent;
}
.friend-item:last-child { border-bottom: none; }
.friend-row { display: flex; gap: 10px; align-items: flex-start; }
.friend-av {
  width: 38px; height: 38px; border-radius: 6px; flex-shrink: 0;
  background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 600;
}
.friend-av.female { background: var(--rose); }
/* shuzhen.html 用的 class 是 .av（不是 .friend-av）—— 别名兜底，防止被内部图片撑爆 */
.av {
  width: 38px; height: 38px; border-radius: 6px; flex-shrink: 0;
  background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 600;
  overflow: hidden;
}
.av.female { background: var(--rose); }
.av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.friend-body { flex: 1; min-width: 0; padding-bottom: 12px; }
.friend-name { font-size: 14px; color: var(--primary); font-weight: 600; }
.friend-text {
  font-size: 14px; color: var(--ink); line-height: 1.6;
  margin: 4px 0 6px; white-space: pre-wrap; word-break: break-word;
}
/* 抒箴：点赞人名 + 评论字号与动态正文一致（14px），不再比正文大一级 */
.friend-interact { font-size: 14px; line-height: 1.6; }
.like-row { font-size: 14px; line-height: 1.6; color: var(--ink); }
.cmmt-row { font-size: 14px; line-height: 1.6; color: var(--ink); word-break: break-word; }
.cmmt-row .cn { font-size: 14px; font-weight: 600; color: var(--primary); }
.cmmt-row .to { font-size: 14px; color: var(--muted); }
.friend-time {
  font-size: 11px; color: var(--muted); margin-top: 4px;
  display: flex; align-items: center; gap: 10px;
}
.friend-time .action-right { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; }
.friend-time .time-left { display: inline-flex; align-items: center; gap: 4px; }
.friend-time .vis-icon { display: inline-flex; }
.friend-time .vis-icon svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.friend-time .op-btn {
  background: none; border: none; cursor: pointer; color: var(--muted);
  font-size: 12px; padding: 0 6px; line-height: 1;
}
.friend-time .like-pill {
  display: inline-flex; align-items: center; gap: 2px;
  background: none; color: var(--muted);
  border: none; border-radius: 0;
  padding: 0; font-size: 12px; cursor: pointer; line-height: 1;
}
.friend-time .like-pill.liked { color: var(--rose); }
.friend-time .like-pill .like-icon { font-size: 14px; }
.friend-time .like-pill .like-num { font-size: 12px; }
.friend-time .op-dots {
  background: none; border: none; cursor: pointer; color: var(--muted);
  padding: 0 2px; display: inline-flex; align-items: center; line-height: 1;
}
.friend-time .op-dots svg { width: 18px; height: 18px; fill: currentColor; }

/* 抒箴 · 三点操作菜单（赞/评论） */
.op-menu-mask {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(0, 0, 0, 0.35);
  animation: opFadeIn .15s ease;
}
.op-menu {
  position: absolute;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 6px 24px rgba(40, 32, 50, 0.18);
  min-width: 110px; overflow: hidden;
}
.op-menu .menu-item {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px; font-size: 14px; color: var(--ink);
  cursor: pointer; transition: background .15s;
}
.op-menu .menu-item + .menu-item { border-top: 1px solid var(--line); }
.op-menu .menu-item:active { background: var(--primary-soft); }
.op-menu .menu-item .ico {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; color: var(--primary);
}
.op-menu .menu-item .ico svg { width: 16px; height: 16px; fill: currentColor; }
@keyframes opFadeIn { from { opacity: 0; } to { opacity: 1; } }
.friend-grid { display: grid; gap: 4px; margin: 6px 0; max-width: 240px; }
.friend-grid.n1 { grid-template-columns: 1fr; max-width: 200px; }
.friend-grid.n2, .friend-grid.n3,
.friend-grid.n4, .friend-grid.n5, .friend-grid.n6,
.friend-grid.n7, .friend-grid.n8, .friend-grid.n9 { grid-template-columns: 1fr 1fr 1fr; }
.friend-grid .g-img {
  aspect-ratio: 1; background: var(--bg); border-radius: 4px;
  background-size: cover; background-position: center; cursor: pointer;
}
.friend-grid.n1 .g-img { max-height: 200px; }
/* 通知公告：无边框紧凑列表（去掉外框和行间分隔线） */
.notices-top {
  margin: 0 14px 14px;
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
}
.notice-line {
  display: flex; justify-content: space-between; align-items: center;
  padding: 4px 16px;
  color: var(--ink-soft); text-decoration: none; transition: background .15s;
}
.notice-line:hover { background: var(--bg); }
.notice-line .nl-title {
  flex: 1; min-width: 0; font-size: 12.5px; font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  color: var(--primary-deep);
}
.notice-line .nl-time {
  margin-left: 12px; color: var(--muted); font-size: 11px; white-space: nowrap;
}

/* 预约/报名/登记：无边框紧凑列表 */
/* 预约/报名/登记列表：整体收紧（用户反馈"胶囊框与条目之间空太多"）
   上间距 16px→6px、下间距 36px→14px、字号 14→12.5px */
.booking-list {
  margin: 0 14px 4px;
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
}
.booking-line {
  display: flex; justify-content: space-between; align-items: center;
  padding: 4px 16px;
  color: var(--ink-soft); text-decoration: none;
  transition: background .15s;
}
.booking-line:active { background: rgba(140,122,166,.06); }
.booking-line .bl-title {
  flex: 1; min-width: 0; font-size: 12.5px; font-weight: 500;
  line-height: 1.5;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  color: var(--primary-deep);
}
.booking-line .bl-time {
  margin-left: 12px; color: var(--muted); font-size: 11px; white-space: nowrap;
}

/* 紧急：中国红（仅预约/报名模块保留该逻辑，通知公告/行业资讯已移除） */
.booking-line.urgent .bl-title {
  color: #C3272B;
}
.booking-line.urgent .bl-time {
  color: #C3272B; opacity: .75;
}
.urgent-dot {
  display: inline-block;
  color: #C3272B;
  font-size: 10px;
  margin-right: 6px;
  transform: translateY(-1px);
}

/* ===== 首页三类模块统一文章条目（时间+缩略图居左，标题居右；参照行业资讯列表规范） ===== */
.ha-list {
  margin: 0 14px 14px;
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
}
.ha-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 4px;
  background: transparent;
  border: none;
  border-radius: 0;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}
.ha-row:active { opacity: .7; }
/* 左侧日期区块（紫色大数字 + 月年） */
.ha-date {
  flex: 0 0 auto;
  width: 36px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.15;
}
.ha-day {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.1;
}
.ha-my {
  font-size: 9px;
  color: var(--primary);
  letter-spacing: 0;
}
/* 中间缩略图（固定尺寸圆角，无图时占位） */
.ha-cover {
  flex: 0 0 auto;
  width: 72px;
  height: 52px;
  border-radius: 7px;
  overflow: hidden;
  background: var(--primary-soft);
}
.ha-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.ha-cover-ph {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 2px;
  color: #7B5BB0;
  background: linear-gradient(135deg, #E7DEF2, #D6C9E8);
}
/* 详情页封面图：自适应宽、等比例不拉伸、与上下文字保留间距 */
.detail-cover {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
  margin: 12px 0 4px;
}
/* 右侧标题（完整展示，可换行，不截断） */
.ha-title {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
  color: var(--ink);
  word-break: break-word;
}
/* 置顶标识：标题前小徽标（后台置顶项） */
.top-badge {
  display: inline-block;
  flex: 0 0 auto;
  margin-right: 6px;
  padding: 2px 6px;
  font-size: 11px;
  line-height: 1.4;
  font-weight: 700;
  color: #fff;
  background: var(--primary);
  border-radius: 4px;
  vertical-align: middle;
}

/* ===== 轮播 ===== */
/* ===== 接待日 ===== */
.ap-tabs { display: flex; gap: 6px; padding: 0 14px; margin: 10px 0; }
.ap-tab {
  flex: 1; text-align: center; padding: 10px 0;
  background: var(--bg-card); border: 1px solid var(--line);
  border-radius: var(--radius-sm); color: var(--muted);
  text-decoration: none; font-size: 14px; font-weight: 600;
}
.ap-tab.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff; border-color: transparent;
}
.ap-pane { padding: 0 14px; }
.ap-field { margin-bottom: 14px; }
.ap-field label {
  display: block; font-size: 13px; color: var(--ink); margin-bottom: 6px; font-weight: 600;
}
/* .ap-field 内 input/select/textarea 自动套用 .ui-input 样式（排除 file/checkbox/radio）—— 全部复用聊天栏 .ui-input 样式 */
.ap-field input:not([type=file]):not([type=checkbox]):not([type=radio]),
.ap-field select,
.ap-field textarea {
  display: block; width: 100%;
  height: 38px;
  padding: 0 14px;
  font: inherit; color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  box-sizing: border-box;
  font-family: inherit;
}
.ap-field textarea { height: auto; min-height: 96px; padding: 10px 14px; line-height: 1.6; resize: vertical; border-radius: 18px; }
.ap-field input:not([type=file]):not([type=checkbox]):not([type=radio]):focus,
.ap-field textarea:focus,
.ap-field select:focus {
  border-color: rgba(140,122,166,.32);
  box-shadow: 0 0 0 3px rgba(140,122,166,.08);
}
.ap-tip { font-size: 11px; color: var(--muted); text-align: center; margin: 10px 0 0; }
.ap-card {
  background: var(--bg-card); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 14px; margin-bottom: 10px;
  box-shadow: var(--shadow-card);
}
.ap-c-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 8px; }
.ap-c-time { font-size: 15px; font-weight: 600; color: var(--ink); }
.ap-c-status {
  display: inline-block; margin-top: 4px; font-size: 11px;
  padding: 2px 8px; border-radius: 10px; background: rgba(0,0,0,.05);
  color: var(--muted);
}
.ap-c-status.approved { background: var(--primary-soft); color: var(--primary); }
.ap-c-status.rejected { background: rgba(193,117,107,.1); color: var(--rose); }
.ap-c-status.done { background: rgba(80,142,142,.1); color: var(--teal); }
.ap-c-date { font-size: 11px; color: var(--muted); }
.ap-c-topic { font-size: 13px; color: var(--ink); line-height: 1.6; }

/* ===== 后台 ===== */
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
table.tbl th, table.tbl td { padding: 8px 6px; border-bottom: 1px solid var(--line); text-align: left; }
table.tbl th { color: var(--muted); font-weight: 500; }
table.tbl tbody tr:hover { background: rgba(140,122,166,.05); }
/* 名言专用表格：紧凑 + 状态徽标 */
table.q-list-tbl tbody tr { transition: background .15s; }
table.q-list-tbl td { vertical-align: middle; }
table.q-list-tbl td:nth-child(3),
table.q-list-tbl td:nth-child(4) { text-align: center; }
table.q-list-tbl td:nth-child(5) { white-space: nowrap; }
table.q-list-tbl td:nth-child(5) .btn { padding: 3px 8px; font-size: 12px; }
.stat-row { display: flex; gap: 10px; flex-wrap: wrap; }
.stat {
  flex: 1; min-width: 90px; background: var(--bg-card);
  border: 1px solid var(--line); border-radius: 12px;
  padding: 12px; text-align: center;
}
.stat .num { font-size: 22px; font-weight: 700; color: var(--primary); }
.stat .lab { font-size: 12px; color: var(--muted); }
.tag { display: inline-block; font-size: 11px; padding: 2px 8px; border-radius: 999px; background: var(--primary-soft); color: var(--primary); }
.tag.gray { background: #EEEDEA; color: var(--muted); }
.tag.ok { background: #e8f8ee; color: #1a8a4f; border: 1px solid #b9eccb; }
.tag.off { background: #fdecec; color: #c0392b; border: 1px solid #f6c9c9; }
.badge-ok { color: var(--primary); }
.badge-no { color: var(--rose); }
.admin-tabs { display: flex; gap: 6px; padding: 0 12px 8px; overflow-x: auto; }
.admin-tabs button {
  flex: 0 0 auto; padding: 8px 14px; border: 1px solid var(--line);
  background: var(--bg-card); border-radius: 999px;
  font-size: 13px; color: var(--muted); cursor: pointer; white-space: nowrap;
}
.admin-tabs button.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff; border-color: transparent;
}
.admin-pane { display: none; }
.admin-pane.show { display: block; }
.sw-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; background: rgba(193,117,107,.08);
  color: var(--rose); border-radius: 14px; font-size: 12px;
}
.sw-chip a { cursor: pointer; opacity: .7; font-size: 14px; line-height: 1; }
.sw-chip a:hover { opacity: 1; }

/* ===== 首页功能入口 ===== */
.banner-card {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: var(--radius); margin: 12px; padding: 20px; color: #fff;
  box-shadow: var(--shadow-gold);
}
.banner-card h2 { margin: 0 0 6px; font-size: 20px; letter-spacing: 2px; }
.banner-card p { margin: 0; font-size: 13px; opacity: .85; }
.remind-bar {
  background: var(--gold-soft); border: 1px solid var(--gold-light);
  border-radius: var(--radius-sm); margin: 12px; padding: 12px 14px;
  display: flex; align-items: center; gap: 10px;
  color: var(--gold-deep); font-size: 14px;
}
.remind-bar svg { flex: 0 0 22px; }
.modules { padding: 4px 12px; }
.mod-card {
  position: relative; display: flex; align-items: center; gap: 14px;
  background: var(--bg-card); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 14px; margin: 10px 0;
  cursor: pointer; box-shadow: var(--shadow-card);
  transition: transform .15s ease;
  overflow: hidden;
}
.mod-card:active { transform: scale(.99); }
.mod-card .ic {
  width: 46px; height: 46px; border-radius: 14px; flex: 0 0 46px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff; display: flex; align-items: center; justify-content: center;
}
.mod-card .ic svg { width: 24px; height: 24px; }
.mod-card .t { font-size: 18px; font-weight: 700; letter-spacing: 2px; }
.mod-card .d { font-size: 12px; color: var(--muted); margin-top: 3px; margin-left: 2px; }
.mod-card .arrow { margin-left: auto; color: var(--muted); font-size: 20px; }

/* ===== 动画 ===== */
@keyframes modalIn {
  from { transform: scale(.92); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
@keyframes up {
  from { transform: translateY(20px); opacity: .6; }
  to { transform: translateY(0); opacity: 1; }
}


/* ============================================================
   手机端适配（≤480px）
   — 统一放大字号 / 工具栏 / 触控元素，弹窗改为底部抽屉
   （仅影响手机宽度，桌面端 480 居中窄版保持原样）
   ============================================================ */
@media (max-width: 480px) {
  html { font-size: 16.5px; }
  body { font-size: 16px; line-height: 1.65; }

  .app { padding-bottom: calc(env(safe-area-inset-bottom, 0px)); }

  /* 工具栏：放大图标、文字、点击高度 */
  .bottom-nav { padding-bottom: calc(env(safe-area-inset-bottom, 0) + 1px); }
  .bottom-nav a {
    padding: 14px 2px 3px; gap: 2px; font-size: 15px;
  }
  .bottom-nav a svg { width: 34px; height: 34px; }
  .nav-label { font-size: 14px; }
  /* 首页专属缩放（仅 home-page 生效，其他页面保持原尺寸） */
  body.home-page .bottom-nav a { min-height: 71px; justify-content: center; }
  body.home-page .bottom-nav a svg { width: 28px; height: 28px; }
  body.home-page .nav-label { font-size: 12px; }

  /* 旧聊天模块聊天工具栏已统一为 .ui-chat-bar 标准组件，图标尺寸见 .ui-chat-bar__tool */
  .ui-chat-bar__tool svg { width: 22px !important; height: 22px !important; }

  /* 按钮 / 表单元素：触控友好 */
  .btn { min-height: 48px; font-size: 16px; padding: 13px 20px; }
  button { font-size: 16px; }
  input, textarea, select {
    font-size: 16px; min-height: 46px; padding: 12px 14px;
  }

  /* 列表 / 卡片：加大点击区与间距 */
  .friend-item, .nb-card, .mod-card { padding: 14px 16px; }
  .friend-item { margin: 8px 12px; }

  /* 通用弹窗 → 底部上滑抽屉 */
  .modal-mask { padding: 0; align-items: flex-end; justify-content: center; }
  .modal {
    width: 100%; max-width: 100%;
    border-radius: 22px 22px 0 0;
    max-height: 90vh;
    padding: 22px 18px calc(22px + env(safe-area-inset-bottom, 0));
    animation: sheetUp .3s cubic-bezier(.25,.46,.45,.94);
  }
  .modal .m-title { font-size: 20px; }
  .modal .m-body { font-size: 16px; }
}

@keyframes sheetUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

/* ============================================================
   内页排版回退修复（恢复国风改版前稳定、好用的布局）
   只修内页被一刀切破坏的通用组件，不影响首页样式。
   ============================================================ */


.zhishu-topbar { padding: 6px 14px 0; display: flex; align-items: center; gap: 8px; }   /* 下移 6px：不贴标题栏弧线 */
/* 清空按钮：移到右侧页边（AI 智能答疑胶囊右侧） */
.zhishu-topbar .zh-clear {
  order: 2; margin-left: auto; flex-shrink: 0;
}
.zhishu-topbar .chips { order: 1; flex: 1 1 auto; min-width: 0; }
/* 快捷词胶囊：更小 + 最多两行（超出隐藏），避免盖住标题栏图 */
.zhishu-topbar .chip {
  padding: 2px 7px; font-size: 10.5px; line-height: 1.4;
}
.zhishu-topbar .chips {
  max-height: 40px; overflow: hidden;   /* 固定最多两行 */
  gap: 4px;
}
.topbar-row { display: flex; align-items: center; gap: 10px; }
/* 清空按钮：单独一行，靠左（跟下方头像左缘视觉对齐 ≈ 14px） */
.zh-clear {
  display: inline-block;
  font-size: 13px; color: var(--muted); white-space: nowrap;
  padding: 2px 0 0 0; margin: 0 0 0 2px;
  cursor: pointer;
}

/* 云枢：发送/语音按钮 —— 已合并进 .ui-chat-bar__tool / .ui-chat-bar__send */
/* ===== 弹窗默认隐藏 =====
   shuzhen/wuyan 等页面有几个内嵌弹窗容器（cmt-modal-mask / lightbox / chat-panel），
   它们本来要 JS 显示时才改 display:block，但在 flex column 布局下默认 display:block 会撑高 body，
   配合 body{overflow:hidden} 时不会真滚，但会把布局偏移 ~100~200px。统一默认隐藏。
   注：completionModal 用 .modal-mask.show（已有自己的样式），不在此规则内。 */
.cmt-modal-mask:not(.show), .chat-panel:not(.show), .friend-detail:not(.show), .yn-confirm-mask, #bindWechatMask, .section-panel:not(.show), .memo-mask:not(.show), #sPanel:not(.show) { display: none !important; }
/* .lightbox 默认隐藏（无 .show 时）；.show 时全屏居中显示图片 */
.lightbox { display: none !important; }
.lightbox.show {
  display: flex !important;
  position: fixed; inset: 0;
  align-items: center; justify-content: center;
  background: rgba(0, 0, 0, 0.92);
  z-index: 100;
  cursor: zoom-out;
}
.lightbox .close-lb {
  position: absolute;
  top: calc(16px + var(--safe-top));
  right: calc(16px + var(--safe-right));
  width: 38px; height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  border: none;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  z-index: 101;
  display: flex; align-items: center; justify-content: center;
}
.lightbox #lbImg {
  max-width: 92vw;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 6px;
  cursor: default;
}
.chat-panel.show, .friend-detail.show, .section-panel.show, .memo-mask.show { display: flex !important; }

/* ===== 修籍：全屏子面板（桌面端收窄为手机宽度居中） ===== */
.section-panel {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: var(--bg);
  flex-direction: column;
  width: 480px;
  max-width: 100%;
  margin: 0 auto;
  overflow-x: hidden;
}
.sp-head {
  min-height: calc(var(--header-h) + var(--safe-top));
  height: calc(var(--header-h) + var(--safe-top));
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--safe-top) var(--pad-x) 0;
  background: var(--bg-card-solid);
  border-bottom: 1px solid var(--line);
  flex: 0 0 auto;
}
.sp-head .back-btn {
  width: 40px;
  font-size: 26px;
  color: var(--ink);
  cursor: pointer;
  line-height: 1;
}
.sp-head .ct {
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
}
.sp-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  width: 100%;
  padding-bottom: 16px;
}
/* .memo-mask 全屏遮罩基础样式（备忘录编辑弹窗共用） */
.memo-mask {
  position: fixed; inset: 0; z-index: 200;   /* 必须高于 .xiijii-drawer(91)，否则编辑弹窗被抽屉遮挡 */
  background: rgba(28,26,22,.45);
  backdrop-filter: blur(2px);
  display: none;                        /* 默认隐藏，.show 时 flex */
  align-items: center; justify-content: center;
  padding: calc(20px + var(--safe-top)) calc(20px + var(--safe-right)) calc(20px + var(--safe-bottom)) calc(20px + var(--safe-left));
}
.yn-confirm-mask { display: flex !important; }  /* ynConfirm 自己管理 display */

/* ===== 抒箴：评论弹窗（居中悬浮，纯文字 + 表情） ===== */
.cmt-modal-mask.show {
  display: flex !important;
  position: fixed; inset: 0;
  align-items: center; justify-content: center;
  background: rgba(28,26,22,.45);
  backdrop-filter: blur(2px);
  padding: calc(20px + var(--safe-top)) calc(20px + var(--safe-right)) calc(20px + var(--safe-bottom)) calc(20px + var(--safe-left));
  z-index: 60;
}
.cmt-modal {
  width: 100%; max-width: 360px;
  background: var(--bg-card-solid);
  border-radius: var(--radius);
  box-shadow: var(--shadow-elevated), 0 0 0 1px rgba(255,255,255,.5) inset;
  overflow: hidden;
  animation: modalIn .25s cubic-bezier(.25,.46,.45,.94);
}
.cmt-modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-bottom: 1px solid var(--line);
}
.cmt-modal-head .ct { font-size: 16px; font-weight: 600; color: var(--ink); }
.cmt-modal-head .close {
  font-size: 22px; line-height: 1; color: var(--muted);
  cursor: pointer; width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; transition: background .15s;
}
.cmt-modal-head .close:hover { background: var(--bg); }
.cmt-modal-body { padding: 14px 16px; }
.cmt-modal-body textarea {
  width: 100%; min-height: 84px; resize: none;
  border: 1px solid var(--line); border-radius: 12px;
  padding: 10px 12px; font-size: 15px; line-height: 1.5;
  background: var(--bg); color: var(--ink);
  font-family: inherit; box-sizing: border-box;
}
.cmt-modal-body textarea:focus { outline: none; border-color: var(--primary); }
.cmt-modal-foot {
  display: flex; align-items: center; gap: 10px;
  padding: 4px 16px 14px;
  overflow: visible;                /* 防止表情面板被裁切 */
}
.cmt-modal-foot .send-btn {
  margin-left: auto; padding: 9px 22px; border: none; border-radius: 999px;
  background: var(--primary); color: #fff; font-size: 15px; font-weight: 600;
  cursor: pointer; transition: opacity .15s, transform .1s;
}
.cmt-modal-foot .send-btn:active { transform: scale(.96); }
.friend-header {
  flex: 0 0 auto;                  /* 让 friend-header 按内容自然高度，不抢占滚动区 */
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  position: relative; z-index: 5;
}
.fh-icon { display: inline-flex; cursor: pointer; color: var(--primary); }
.fh-icon svg { width: 26px; height: 26px; }
/* 抒箴：三点更多按钮（标题栏下一行、靠右；纯透明悬浮，仅图标自身区域，无整行底色/色块/分割线） */
/* 抒箴：标题栏右上角悬浮三点按钮 —— 固定定位、脱离文档流、零布局占位、完全透明，
   只占用图标自身 34px 范围；不生成整行白色底条、不挤压/遮挡动态列表、不影响滑动。 */
.shz-toolbar {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 6px);
  right: 8px;
  width: 34px;
  height: 34px;
  z-index: 45;            /* 高于 fixed 标题栏(z:40)，但低于弹窗遮罩(z:199) */
  pointer-events: none;   /* 容器不拦截滑动，仅内部图标本身可点 */
}
.shz-more-btn {
  position: absolute;
  inset: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  color: var(--ink);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  background: transparent;
  border: none;
  border-radius: 0;
  pointer-events: auto;   /* 仅图标自身接收点击 */
  transition: opacity .15s;
}
.shz-more-btn:active { opacity: .5; }
.shz-more-btn svg { width: 20px; height: 20px; display: block; }

/* 抒箴标题栏：三点弹出的操作菜单 */
.shz-header-popup-mask {
  position: fixed; inset: 0; z-index: 199;
  background: rgba(0,0,0,.25);
}
.shz-header-popup {
  position: absolute;
  top: 60px;            /* 兜底；实际由 JS 按三点按钮位置动态定位 */
  right: 8px;
  min-width: 140px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,.15), 0 1px 3px rgba(0,0,0,.08);
  overflow: hidden;
  z-index: 200;
}
.shz-header-popup-item {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px;
  font-size: 14px; color: var(--ink);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background .12s;
}
.shz-header-popup-item:active { background: #f5f5f5; }
.shz-header-popup-item svg { width: 18px; height: 18px; flex-shrink: 0; color: var(--muted); }
.shz-header-popup-item + .shz-header-popup-item {
  border-top: 1px solid #f0f0f0;
}
/* 旧聊天模块：搜索框 */
.contacts-search input {
  width: 100%; box-sizing: border-box;
  border: 1px solid var(--line); border-radius: 999px;
  padding: 8px 14px; font-size: 14px; background: #fff;
  outline: none;
}

/* 修籍：个人中心恢复头像+信息+功能网格 */
.profile-top {
  display: flex; align-items: center; gap: 14px;
  padding: 20px 16px; position: relative;
}
.profile-av {
  width: 64px; height: 64px; border-radius: 0;      /* 彻底方形（原 14px 圆角 → 8px 圆角 → 现 0 真方形） */
  overflow: hidden; flex-shrink: 0;
  background: var(--primary-soft); color: var(--primary-deep);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; font-weight: 600;
}
.profile-av img { width: 100%; height: 100%; object-fit: cover; border-radius: 0; }
.profile-info { flex: 1; min-width: 0; }
.profile-name { font-size: 17px; font-weight: 600; color: var(--ink); }
.profile-meta { font-size: 13px; color: var(--muted); margin-top: 5px; }
.profile-meta span { margin-right: 10px; }

/* 修籍：学号/工号 + 姓名 + 班级/部门 合并为单个「胶囊框」（只读身份区） */
.id-capsule {
  background: linear-gradient(135deg, rgba(140,122,166,.10), rgba(199,169,140,.10));
  border: 1px solid rgba(140,122,166,.18);
  border-radius: 18px;
  padding: 6px 16px;
  margin: 4px 0 14px;
  box-shadow: 0 2px 10px rgba(140,122,166,.06);
}
.id-cap-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 9px 0;
}
.id-cap-row + .id-cap-row { border-top: 1px dashed rgba(140,122,166,.16); }
.id-cap-label { flex: 0 0 auto; font-size: 13px; color: var(--muted); letter-spacing: .3px; }
.id-cap-val {
  flex: 1 1 auto; min-width: 0; text-align: right;
  font-size: 15px; font-weight: 600; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* 修籍：胶囊框内可编辑字段（性别 / 联系方式）—— 与只读值同款右对齐内联样式，不破坏淡框 */
.id-cap-val .id-cap-input {
  display: block;
  width: 100%;
  border: none;
  background: transparent;
  text-align: right;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  padding: 0;
  margin: 0;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}
.id-cap-val select.id-cap-input { text-align-last: right; padding-right: 4px; }
.id-cap-val .id-cap-input::placeholder { color: var(--muted); font-weight: 400; }
/* 修籍：胶囊框内个性签名（多行块，保持淡框分隔风格） */
.id-cap-block {
  padding: 9px 0;
  border-top: 1px dashed rgba(140,122,166,.16);
}
.id-cap-block .id-cap-label { display: block; margin-bottom: 6px; }
.id-cap-textarea {
  display: block;
  width: 100%;
  box-sizing: border-box;
  border: 1px solid rgba(140,122,166,.25);
  background: rgba(255,255,255,.55);
  border-radius: 12px;
  padding: 8px 10px;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink);
  resize: vertical;
  min-height: 64px;
  outline: none;
}
.id-cap-textarea:focus { border-color: var(--primary); }
.id-cap-textarea::placeholder { color: var(--muted); }
.profile-edit-btn {
  position: absolute; right: 16px; top: 22px;
  border: 1px solid var(--line); border-radius: 999px;
  padding: 4px 12px; font-size: 13px; color: var(--ink-soft);
  cursor: pointer;
}
.blocks-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 9px 16px;            /* 行间距二次调整：当前 3px → 3 倍 = 9px（仅放大两行图标之间垂直空白），列间距不变 */
  align-content: start;     /* 行不再被拉伸铺满，消除两行间大片空白 */
  flex: 0 0 auto;           /* 取消与滚动列表同组的 flex:1 撑高，页面整体紧凑 */
  padding: 8px var(--pad-x) calc(var(--tabbar-h) + 10px);  /* 上下间距微调，底部仍避让固定导航 */
}
.block-cell {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  cursor: pointer;
}
.block-icon {
  width: 52px; height: 52px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  background: var(--primary-soft);
  color: var(--primary);
}
.block-icon svg {
  width: 27px; height: 27px;
}
.block-name { font-size: 12px; color: var(--ink); line-height: 1.2; }

/* 旧聊天模块 / 投笺：左滑或长按展开「置顶 / 删除」
   关键：.slide-row 必须 position:relative + overflow:hidden，
   按钮容器 .slide-actions 默认用 inline style right:-120px 藏在行外被裁掉，
   之前国风改版误删了这一组样式，导致按钮直接以普通流显示而出框。 */
.slide-row { position: relative; overflow: hidden; }
.slide-content { position: relative; z-index: 2; }
.slide-actions {
  position: absolute; top: 0; right: -140px; height: 100%;
  display: flex; z-index: 1;
  width: 140px;
}
.slide-actions button {
  flex: 1;
  border: none; color: #fff; font-size: 13px; line-height: 1.2;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0 4px;
}
.slide-actions .act-top { background: var(--primary); }
.slide-actions .act-del { background: #E5484D; }

/* ===== 旧聊天模块 4 tab 容器：统一 16px 左右内边距（修复顶边问题） =====
   之前 .wy-fixed-top / .wy-scroll 没设 padding-left/right，导致：
   - 搜索框 (.contacts-search 容器) 顶到屏幕边
   - 「+ 添加好友」按钮 width:100% 顶到两边
   - 通讯录管理行、新的朋友/群聊/标签/联系人、所有联系人名字 都顶着屏幕边
   - chat tab 卡片也因为 wy-scroll 缺 padding 看着局促
   现统一用 14px 横向内边距（和搜索框 input 自身 padding 14px 视觉对齐）。
   注：HTML 内联 style="padding:0 12px" 的个别容器优先级更高，本规则只兜底。 */
.wy-fixed-top,
.wy-scroll {
  padding-left: 14px;
  padding-right: 14px;
  box-sizing: border-box;
}

/* ===== 旧聊天模块 · 好友/通讯录列表样式 ===== */
.contacts-bar { margin: 0; }
.contacts-manage {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 0; font-size: 15px; color: var(--ink);
  border-bottom: 1px solid var(--line); cursor: pointer;
}
.contacts-manage .icn { font-size: 16px; }
.contacts-manage .arrow {
  margin-left: auto; color: var(--muted); font-size: 18px;
}

/* ===== 通讯录管理（全屏批量操作面板） ===== */
.batch-mgr {
  position: fixed; inset: 0; z-index: 50;
  background: var(--bg); display: none;
  flex-direction: column; overflow: hidden;
}
.batch-mgr.show { display: flex; }
.batch-mgr-head {
  display: flex; align-items: center; gap: 12px;
  padding: calc(14px + var(--safe-top)) var(--pad-x) 14px;
  background: var(--bg-card); border-bottom: 1px solid var(--line);
}
.batch-mgr-head h3 { font-size: 17px; font-weight: 600; color: var(--ink); margin: 0; flex: 1; text-align: center; }
.batch-mgr-head .back-btn { font-size: 28px; cursor: pointer; color: var(--ink); padding: 4px 8px; }
.batch-mgr-actions {
  display: flex; align-items: center; gap: 8px;
  padding: 10px var(--pad-x); background: var(--bg-card);
  border-bottom: 1px solid var(--line);
}
.ba-btn {
  padding: 6px 14px; border-radius: 999px; font-size: 13px;
  cursor: pointer; white-space: nowrap; transition: opacity .15s;
}
.ba-btn.primary { background: var(--primary); color: #fff; }
.ba-btn.danger { background: #C4889A; color: #fff; }
.ba-btn:active { opacity: .75; }
.batch-mgr-side {
  display: flex; gap: 6px; padding: 10px var(--pad-x);
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  background: var(--bg-card); border-bottom: 1px solid var(--line);
}
.s-item {
  padding: 6px 14px; border-radius: 999px; font-size: 13px;
  cursor: pointer; white-space: nowrap; background: var(--bg);
  color: var(--muted); border: 1px solid var(--line); transition: all .15s;
}
.s-item.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.s-count { margin-left: 4px; font-size: 11px; opacity: .7; }
.batch-mgr-list { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 8px var(--pad-x); }
.b-item {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 8px; border-radius: 12px; cursor: pointer;
  transition: background .15s;
}
.b-item:active { background: var(--bg-card); }
.b-item.selected { background: var(--primary-soft); }
.b-radio {
  width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid var(--line); flex-shrink: 0;
  display: flex; align-items: center; justify-content:center;
  transition: all .15s;
}
.b-item.selected .b-radio {
  border-color: var(--primary); background: var(--primary);
}
.b-item.selected .b-radio::after {
  content: ''; width: 8px; height: 8px; border-radius: 50%;
  background: #fff;
}
.b-item .av {
  width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 600; color: #fff;
  background: var(--primary-soft); color: var(--primary);
}
.b-item .av.female { background: #FCE4EC; color: #C4889A; }
.b-item .meta { min-width: 0; }
.b-item .meta .n { font-size: 15px; font-weight: 500; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.b-item .meta .desc { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* 批量操作底栏（仅在批量模式下显示） */
.batch-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 10px var(--pad-x); background: var(--bg-card);
  border-top: 1px solid var(--line);
}

.contacts-expander { /* border-bottom 移除：聊天记录下方的冗余下划线，2026-08-07 */ }
/* 可展开区块内的行列表项（群聊/新的朋友等）：头像 + 标题 + 箭头 恒一行 */
.ce-sub-row {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 4px; cursor: pointer;
  min-width: 0;
}
.ce-sub-row:active { background: var(--primary-soft); }
.ce-sub-row .av { flex-shrink: 0; }
.ce-sub-row .meta { flex: 1; min-width: 0; }
.ce-sub-row .meta .n {
  font-size: 15px; color: var(--ink); font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ce-sub-row .meta .desc { font-size: 12px; color: var(--muted); margin-top: 2px; }
.ce-sub-row .ce-arrow { flex-shrink: 0; color: var(--muted); font-size: 18px; }
.ce-head {
  display: flex; align-items: center;
  padding: 7px 0; font-size: 15px; color: var(--ink);
  cursor: pointer;
}
.ce-arrow {
  display: inline-block; color: var(--muted); font-size: 16px;
  transition: transform .2s;
}
.contacts-expander[data-open="1"] .ce-arrow { transform: rotate(90deg); }
.ce-name { flex: 1; margin-left: 8px; }
.ce-count {
  margin-left: auto; font-size: 13px; color: var(--muted);
  min-width: 20px; text-align: right;
}

.tag-filter-bar {
  display: flex; flex-wrap: wrap; gap: 8px;
  padding: 8px 0 10px;
}
.tf-chip {
  display: inline-flex; align-items: center;
  padding: 5px 12px; border-radius: 999px;
  font-size: 13px; color: var(--ink);
  background: var(--bg-card); border: 1px solid var(--line);
  cursor: pointer; white-space: nowrap;
}
.tf-chip.active {
  background: var(--primary); color: #fff; border-color: var(--primary);
}
.tf-chip.add { color: var(--primary); border-style: dashed; }

.contacts-group {
  font-size: 12px; font-weight: 700; color: var(--muted);
  padding: 6px 0 2px; margin-bottom: 2px;
}
.contacts-row {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 0; border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.contacts-row .av {
  width: 34px; height: 34px; border-radius: 7px; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 13px; font-weight: 500;
  background: #8C7AA6; flex: 0 0 34px;
}
.contacts-row .av.female { background: #C4889A; }
.contacts-row .meta { flex: 1; min-width: 0; }
.contacts-row .n {
  font-size: 14px; font-weight: 600; color: var(--ink);
  display: flex; align-items: center; gap: 5px;
}
.contacts-row .n .tag {
  display: inline-block; font-size: 10px; color: var(--primary);
  background: var(--primary-soft); padding: 0 5px;
  border-radius: 6px; font-weight: 500; line-height: 16px;
}
.contacts-row .org {
  font-size: 11px; color: var(--muted); margin-top: 1px;
}

/* ===== 自定义是/否确认弹窗（精准居中，无浏览器标题栏） ===== */
.yn-confirm-mask {
  position: fixed; inset: 0;
  background: rgba(28, 26, 22, 0.45);   /* 与全站弹窗遮罩统一 */
  backdrop-filter: blur(2px);
  z-index: 9999;
  /* 精准垂直水平居中：flex + center */
  display: flex; align-items: center; justify-content: center;
  padding: calc(20px + var(--safe-top)) calc(20px + var(--safe-right)) calc(20px + var(--safe-bottom)) calc(20px + var(--safe-left));
  animation: ynFadeIn .15s ease;
}
@keyframes ynFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.yn-confirm-box {
  min-width: 260px; max-width: 320px;
  background: #FFFFFF;
  border-radius: 18px;
  box-shadow: 0 12px 40px rgba(40, 32, 50, .25);
  padding: 24px 22px 18px;
  text-align: center;
  animation: ynPop .2s cubic-bezier(.25, .8, .3, 1.2);
}
@keyframes ynPop {
  from { transform: scale(.92); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}
.yn-confirm-msg {
  font-size: 15px;
  color: #34303A;
  line-height: 1.6;
  margin-bottom: 22px;
  word-break: break-word;
  white-space: pre-line;   /* 支持 \n 多行说明（帮助中心等） */
  text-align: left;
}
.yn-confirm-actions {
  display: flex; gap: 10px; justify-content: center;
}
.yn-confirm-btn {
  flex: 1; min-width: 90px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #FFFFFF;
  color: var(--ink-soft);
  font-size: 14px;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.yn-confirm-btn.yn-cancel:hover { background: var(--primary-soft); }
.yn-confirm-btn.yn-ok {
  background: var(--primary);
  color: #FFFFFF;
  border-color: var(--primary);
}
.yn-confirm-btn.yn-ok:hover { background: var(--primary-deep); border-color: var(--primary-deep); }
.yn-confirm-btn.yn-danger { background: #E55; color: #fff; border-color: #E55; }
.yn-confirm-btn.yn-danger:hover { background: #C44; border-color: #C44; }

/* ============================================================
   移动端安全区避让补充（v1 · 2026-08-02）
   ------------------------------------------------------------
   针对好友详情全屏页（.fd-* 原无样式）：顶部避让状态栏/挖孔，
   底部避让手势导航条。env() 在无安全区设备上为 0，不影响原有布局。
   ============================================================ */
/* 好友资料页：补全内部组件样式（此前 .fd-* 内部类无 CSS → 排版混乱） */
.fd-head {
  display: flex; align-items: center; gap: 8px;
  padding: calc(var(--safe-top) + 10px) 12px 12px;
  background: var(--bg-card); border-bottom: 1px solid var(--line);
}
.fd-head .back-btn {
  width: 34px; height: 34px; display: flex; align-items: center; justify-content: center;
  font-size: 26px; color: var(--ink); cursor: pointer; border-radius: 50%;
  -webkit-tap-highlight-color: transparent; border: none; background: transparent;
}
.fd-head .back-btn:active { background: rgba(0,0,0,.06); }
.fd-head .ct { flex: 1; text-align: center; font-size: 17px; font-weight: 600; color: var(--ink); }
.fd-head .fd-more { position: relative; width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; font-size: 22px; color: var(--ink); cursor: pointer; border-radius: 50%; -webkit-tap-highlight-color: transparent; }
.fd-more-menu { position: absolute; top: 38px; right: 4px; background: var(--bg-card-solid); border-radius: 12px; box-shadow: var(--shadow-elevated); overflow: hidden; z-index: 5; display: none; }
.fd-more-menu.show { display: block; }
.fd-more-menu > div { padding: 12px 22px; font-size: 14px; color: var(--ink); white-space: nowrap; cursor: pointer; }
.fd-more-menu > div:active { background: var(--primary-soft); }

.fd-body { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding-bottom: 10px; }

.fd-top {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 22px 16px 18px; background: var(--bg-card);
  border-bottom: 8px solid var(--line-soft, #f1eef5);
}
.fd-av {
  width: 76px; height: 76px; border-radius: 50%; overflow: hidden;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 30px; font-weight: 600; margin-bottom: 12px;
}
.fd-av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fd-name-row { display: flex; align-items: center; gap: 10px; }
.fd-name { font-size: 19px; font-weight: 700; color: var(--ink); }
.fd-edit { font-size: 13px; color: var(--primary); cursor: pointer; }
.fd-meta { margin-top: 12px; width: 100%; max-width: 320px; }
.fd-row { display: flex; align-items: center; font-size: 13px; padding: 4px 0; }
.fd-row > span:first-child { color: var(--muted); width: 52px; flex-shrink: 0; text-align: left; }
.fd-row > b { font-weight: 500; color: var(--ink); }

.fd-card { margin: 10px 12px; background: var(--bg-card); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow-card); }
.fd-card-title { font-size: 13px; color: var(--muted); padding: 12px 16px 4px; }
.fd-list { display: flex; flex-direction: column; }
.fd-li { display: flex; align-items: center; gap: 8px; padding: 13px 16px; cursor: pointer; border-top: 1px solid var(--line); }
.fd-li:first-child { border-top: none; }
.fd-li > span:first-child { font-size: 14px; color: var(--ink); }
.fd-val { margin-left: auto; font-size: 14px; color: var(--muted); max-width: 55%; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fd-arrow { color: var(--muted); font-size: 18px; }

.fd-bottom {
  display: flex; gap: 12px;
  padding: 12px 16px calc(var(--safe-bottom) + 12px);
  background: var(--bg-card); border-top: 1px solid var(--line);
}
.fd-act {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 12px; border-radius: 12px; border: none; cursor: pointer;
  background: linear-gradient(135deg, var(--primary), var(--primary-light)); color: #fff;
  font-size: 15px; font-weight: 600; box-shadow: 0 3px 10px var(--primary-glow);
  -webkit-tap-highlight-color: transparent;
}
.fd-act:active { transform: scale(.98); }
.fd-act svg { width: 18px; height: 18px; }


/* ===== 「选择谁可以看」弹窗（抒箴发表动态） ===== */
.vis-mask {
  position: fixed; inset: 0;
  z-index: 70;                            /* 高于 cmt-modal-mask(60) */
  background: rgba(28,26,22,.45);
  backdrop-filter: blur(2px);
  display: flex; align-items: center; justify-content: center;
  padding: calc(20px + var(--safe-top)) calc(20px + var(--safe-right)) calc(20px + var(--safe-bottom)) calc(20px + var(--safe-left));
}
.vis-panel {
  width: 100%; max-width: 320px;
  background: var(--bg-card-solid);
  border-radius: var(--radius);
  box-shadow: var(--shadow-elevated), 0 0 0 1px rgba(255,255,255,.5) inset;
  overflow: hidden;
  animation: modalIn .25s cubic-bezier(.25,.46,.45,.94);
}
.vis-title {
  font-size: 16px; font-weight: 600; color: var(--ink);
  padding: 16px 20px 12px; text-align: center;
}
.vis-list { padding: 4px 12px; }
.vis-opt {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 12px; border-radius: 12px;
  cursor: pointer; transition: background .15s;
  -webkit-tap-highlight-color: transparent;
}
.vis-opt:active, .vis-opt.selected { background: var(--primary-soft); }
.vis-radio {
  width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid var(--line); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  transition: all .15s;
}
.vis-radio.on {
  border-color: var(--primary); background: var(--primary);
}
.vis-radio.on::after {
  content: ''; width: 9px; height: 9px; border-radius: 50%; background: #fff;
}
.vis-label {
  font-size: 15px; color: var(--ink); font-weight: 500;
}
.vis-actions {
  display: flex; gap: 10px; padding: 12px 16px 18px;
  justify-content: flex-end;
}
.vis-btn {
  padding: 9px 22px; border-radius: 999px; font-size: 14px;
  font-weight: 500; cursor: pointer; border: none; transition: opacity .15s;
}
.vis-btn-cancel {
  background: var(--bg); color: var(--muted); border: 1px solid var(--line);
}
.vis-btn-confirm {
  background: var(--primary); color: #fff;
}
.vis-btn:active { opacity: .75; }

/* 批量操作栏：.show 时覆盖内联 display:none */
.batch-bar.show { display: flex !important; }

/* ===== 通用弹窗组件：.memo-modal（清空确认 / 绑定微信 / 个人资料编辑 共用） =====
   之前这些类完全没有 CSS 定义，导致弹窗是裸 HTML 浮在遮罩上 */
.memo-modal {
  width: 92%; max-width: 360px;
  max-height: calc(100vh - 40px); max-height: calc(100dvh - 40px);
  background: var(--bg-card-solid);
  border-radius: var(--radius);
  box-shadow: var(--shadow-elevated), 0 0 0 1px rgba(255,255,255,.5) inset;
  overflow: hidden auto;
  -webkit-overflow-scrolling: touch;
  animation: modalIn .25s cubic-bezier(.25,.46,.45,.94);
}
.memo-modal-head {
  font-size: 16px; font-weight: 600; color: var(--ink);
  padding: 16px 18px 10px;
  text-align: center;
  letter-spacing: 1px;
}
.memo-modal-body {
  padding: 12px 18px 16px;
}
.memo-modal-body .field label {
  font-size: 13px; color: var(--ink-soft); margin-bottom: 5px;
  display: block; font-weight: 500;
}
.memo-modal-body .field input {
  display: block; width: 100%; height: 38px;
  padding: 0 14px; border: 1px solid var(--line);
  border-radius: 18px; background: #fff;
  font: inherit; color: var(--ink); box-sizing: border-box;
  outline: none; transition: border-color .2s, box-shadow .2s;
}
.memo-modal-body .field input:focus {
  border-color: rgba(140,122,166,.32);
  box-shadow: 0 0 0 3px rgba(140,122,166,.08);
}
.memo-modal-actions {
  display: flex; align-items: center; justify-content: flex-end;
  gap: 10px; padding: 8px 18px 16px;
}
.memo-btn-cancel {
  padding: 7px 18px; border-radius: 999px; font-size: 14px;
  font-weight: 500; cursor: pointer; border: none; transition: opacity .15s;
  background: var(--bg); color: var(--muted); border: 1px solid var(--line);
}
.memo-btn-cancel:active { opacity: .7; }
.memo-btn-save {
  padding: 7px 22px; border-radius: 999px; font-size: 14px;
  font-weight: 600; cursor: pointer; border: none; transition: opacity .15s;
  background: var(--primary); color: #fff;
}
.memo-btn-save:active { opacity: .8; }

/* ===== 备忘录编辑弹窗容器（.memo-edit）之前无容器样式 ===== */
.memo-edit {
  width: 100%; max-width: 420px;
  max-height: 85vh;
  background: var(--bg-card-solid);
  border-radius: var(--radius);
  box-shadow: var(--shadow-elevated), 0 0 0 1px rgba(255,255,255,.5) inset;
  overflow: hidden;
  display: flex; flex-direction: column;
  animation: modalIn .25s cubic-bezier(.25,.46,.45,.94);
}
.memo-edit-head {
  display: flex; align-items: center; gap: 4px;
  padding: 12px 16px; min-height: 48px;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
  background: var(--bg-card-solid);
}
.memo-back {
  font-size: 28px; color: var(--ink); cursor: pointer;
  line-height: 1; padding-right: 8px;
}
.memo-act {
  transition: opacity .15s;
}
.memo-act:active { opacity: .6; }
.memo-edit-meta {
  flex-shrink: 0;
}
.memo-edit-body {
  flex: 1; overflow-y: auto;
  padding: 4px 18px 8px;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.memo-imgs-preview,
.memo-atts-preview {
  display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px;
}

/* ===== 修籍/备忘录等面板：强制手机竖版布局（内容区兜底约束） ===== */
.sp-body > *,
.sp-body #formArea,
.sp-body #actionArea,
.sp-body .card {
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
  box-sizing: border-box;
}
/* 富文本（用户公约/关于我们等后台发布内容）内的图片/表格自适应，禁止撑破窄列 */
.sp-body img,
.sp-body table,
.sp-body video {
  max-width: 100%;
  height: auto;
}

/* ===== 通讯录列表项（mate-row 及其子元素样式补齐，之前缺失导致裸堆） ===== */
.mate-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 4px;
  border-bottom: 1px solid var(--line);
  background: transparent;
}
.mate-row:last-child { border-bottom: none; }
.mav {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 18px;
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(140,122,166,.25);
}
.mmeta {
  flex: 1 1 auto;
  min-width: 0;
}
.mname {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.minfo {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mcall {
  flex: 0 0 auto;
  font-size: 12px;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  white-space: nowrap;
}


/* ============================================================
  悬浮按钮右下角化：底部内容避让（2026-08-07 全局规则，页面禁止自写样式）
  按钮簇固定于右下角：返回钮 离底120rpx/离右40rpx；旧聊天模块「搜索+更多」在其上方 12rpx。
  以下各页滚动容器按按钮簇最高点上缘留出底部内边距，保证列表/正文不被遮挡。
  云枢因底部有 dock 快捷词 + 输入栏（约 154px），返回钮抬至输入区上方。
============================================================ */
body.zhaoce-body .zhaoce-grid,
body.forms-page .note-grid,
body.notices-page .note-grid {
  /* 2 钮垂直堆叠：返回+搜索，簇顶 = 返回底 + 搜索高 + 间隔 + 呼吸 */
  padding-bottom: calc(var(--fab-bottom) + var(--fab-size) * 2 + var(--fab-gap) + 12px);
}
body.wuyan-body .wy-scroll {
  /* 3 钮垂直堆叠：返回+搜索+三横，簇顶 = 120 + 3×72 + 2×12 (rpx)，再留 12px 呼吸 */
  padding-bottom: calc(var(--fab-bottom) + var(--fab-size) * 3 + var(--fab-gap) * 2 + 12px);
}
/* 云枢：dock（提示词+输入框+工具栏+安全区≈180px）会遮挡与其它页同坐标的悬浮返回钮，轻微抬升避开 */
body.zhishu-body #floatBackBtn {
  bottom: calc(var(--fab-bottom) + 100px);
}
body.zhishu-body .zhishu-scroll {
  padding-bottom: calc(100px + var(--fab-clear));
}

/* ============================================================
  修籍子面板：移除内置标题栏后的布局补位（2026-08-07）
  ① 顶部补 safe-top 间距（原 .sp-head 高度），内容上移不出现空白；
  ② 底部为右下角全局悬浮返回钮留避让，最后内容不被遮挡；
  ③ 面板(.section-panel z:50)打开时，全局返回钮提至其上(z:60)方可点击。
============================================================ */
.sp-body {
  padding-top: calc(var(--safe-top) + 12px);
  padding-bottom: calc(var(--fab-clear) + 80px);
}
body:has(.section-panel.show) #floatBackBtn { z-index: 60; }

/* ============================================================
   ██  大改版 · 全局统一组件层（2026-08-07）  ██
   「全站 UI 强制统一」落地实现。新页面一律使用 u-* 类。
     · 左右外边距 16px（--page-pad）
     · 底部手势安全边距 34px（--gesture-safe）
     · 卡片/弹窗/输入框：圆角 16px + 内边距 16px
     · 按钮/胶囊/图标：尺寸圆角配色动效全局统一
     · 全机型自适应，禁止死像素
   ============================================================ */

/* ---------- 1. 页面骨架 ---------- */
.u-page {
  min-height: 100dvh;
  display: flex; flex-direction: column;
  background: var(--bg);
  box-sizing: border-box;
}
.u-pad { padding-left: var(--page-pad); padding-right: var(--page-pad); }
.u-safe-bottom { padding-bottom: var(--bottom-safe); }

/* 顶部导航：标题绝对居中，左右图标边距统一 */
.u-nav {
  position: relative; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  height: 52px; padding-top: var(--safe-top);
  box-sizing: content-box; background: var(--bg);
}
.u-nav__title {
  font-size: 17px; font-weight: 600; color: var(--ink); letter-spacing: .3px;
  max-width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.u-nav__left, .u-nav__right {
  position: absolute; top: var(--safe-top); height: 52px;
  display: flex; align-items: center; gap: var(--gap-sm);
}
.u-nav__left  { left:  var(--nav-icon-inset); }
.u-nav__right { right: var(--nav-icon-inset); }

/* ---------- 2. 图标按钮（热区 36px / 图标 22px） ---------- */
.u-icon-btn {
  width: var(--icon-btn); height: var(--icon-btn);
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; padding: 0; background: transparent;
  border-radius: var(--radius-pill); color: var(--ink); cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
.u-icon-btn:active { background: var(--primary-soft); transform: scale(.92); }
.u-icon-btn svg { width: var(--icon-size); height: var(--icon-size); display: block; }

/* ---------- 3. 按钮 ---------- */
.u-btn {
  height: var(--btn-h); padding: 0 20px;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 0; border-radius: var(--btn-radius);
  font-size: 15px; font-weight: 600; font-family: inherit;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out), opacity var(--dur-fast);
}
.u-btn:active { transform: scale(.97); }
.u-btn--primary {
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  color: #fff; box-shadow: 0 4px 14px var(--primary-glow);
}
.u-btn--ghost { background: var(--primary-soft); color: var(--primary-deep); }
.u-btn--line  { background: transparent; color: var(--ink-soft); box-shadow: inset 0 0 0 1px var(--line); }
.u-btn--sm    { height: var(--btn-h-sm); padding: 0 14px; font-size: 13px; }
.u-btn--block { width: 100%; }
.u-btn[disabled] { opacity: .45; pointer-events: none; }

/* ---------- 4. 胶囊 ---------- */
.u-chip {
  height: var(--chip-h); padding: 0 var(--chip-pad-x);
  display: inline-flex; align-items: center; gap: 5px; flex: 0 0 auto;
  border: 0; border-radius: var(--chip-radius);
  background: var(--primary-soft); color: var(--primary-deep);
  font-size: var(--chip-font); font-family: inherit; line-height: 1;
  white-space: nowrap; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform var(--dur-fast) var(--ease-out), background var(--dur-fast);
}
.u-chip:active { transform: scale(.94); background: var(--primary-light); color: #fff; }
/* 横向滑动胶囊栏（隐藏滚动条） */
.u-chipbar {
  display: flex; gap: var(--gap-sm);
  overflow-x: auto; overflow-y: hidden;
  padding: 0 var(--page-pad) 8px;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.u-chipbar::-webkit-scrollbar { display: none; }

/* ---------- 5. 卡片 ---------- */
.u-card {
  background: var(--bg-card-solid);
  border-radius: var(--radius-card);
  padding: var(--card-pad);
  box-shadow: var(--shadow-card);
  box-sizing: border-box;
}

/* ---------- 6. 输入框 ---------- */
.u-input, .u-textarea {
  width: 100%; box-sizing: border-box;
  padding: 12px var(--card-pad);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--bg-card-solid);
  color: var(--ink); font-size: 15px; font-family: inherit; outline: none;
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
}
.u-textarea { min-height: 120px; resize: none; line-height: 1.6; }
.u-input:focus, .u-textarea:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px var(--primary-glow);
}
.u-input::placeholder, .u-textarea::placeholder { color: var(--muted); }

/* ---------- 7. 遮罩 ---------- */
.u-mask {
  position: fixed; inset: 0; z-index: 900;
  background: var(--mask-bg);
  opacity: 0; pointer-events: none;
  transition: opacity var(--dur) var(--ease-out);
  -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
}
.u-mask.show { opacity: 1; pointer-events: auto; }

/* ---------- 8. 空态 ---------- */
.u-empty { padding: 60px var(--page-pad); text-align: center; color: var(--muted); font-size: 14px; }
.u-empty__icon { font-size: 40px; opacity: .5; margin-bottom: 10px; }

/* ---------- 9. 列表行 ---------- */
.u-row {
  display: flex; align-items: center; gap: var(--gap-md);
  padding: 14px var(--card-pad);
  background: var(--bg-card-solid);
  border-radius: var(--radius-card);
  cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: transform var(--dur-fast) var(--ease-out), background var(--dur-fast);
}
.u-row:active { transform: scale(.99); background: var(--primary-soft); }
.u-row__main { flex: 1 1 auto; min-width: 0; }
.u-row__title {
  font-size: 15px; font-weight: 600; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.u-row__sub {
  font-size: 12px; color: var(--muted); margin-top: 3px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.u-row__dot { flex: 0 0 auto; width: 8px; height: 8px; border-radius: 50%; background: var(--rose); }

/* ---------- 10. 状态徽标 ---------- */
.u-badge {
  display: inline-flex; align-items: center;
  height: 22px; padding: 0 9px; border-radius: var(--radius-pill);
  font-size: 11px; font-weight: 600; flex: 0 0 auto;
}
.u-badge--pending { background: #FFF1E0; color: #B8763A; }
.u-badge--read    { background: var(--primary-soft); color: var(--primary-deep); }
.u-badge--done    { background: #E4F2EC; color: #3F7A62; }
@media (prefers-color-scheme: dark) {
  .u-badge--pending { background: rgba(184,118,58,.18); color: #E5B282; }
  .u-badge--read    { background: rgba(140,122,166,.22); color: #C7B8DE; }
  .u-badge--done    { background: rgba(63,122,98,.20); color: #8FC4AC; }
}

/* ============================================================
   #269 投笺·动态星图（宇宙背景 + 漂浮光点 + 性能自适应）
   设计：深色宇宙基调，canvas 全屏星图，玻璃质感输入栏与底部抽屉。
   无论系统明暗模式，本页固定深色（星图必须暗底才出彩）。
   ============================================================ */
body.toujian-page {
  background: #eee8ff;
  color: #3a3550;
  overflow: hidden;
  height: 100dvh;
  -webkit-tap-highlight-color: transparent;
}
body.toujian-page .app { min-height: 100dvh; position: relative; z-index: 1; }
body.toujian-page #modHead { position: static; }

.tj-canvas {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  z-index: 0;
  display: block;
  background:
    radial-gradient(120% 80% at 20% 10%, #141a3a 0%, rgba(20,26,58,0) 55%),
    radial-gradient(120% 90% at 85% 90%, #1a1230 0%, rgba(26,18,48,0) 55%),
    linear-gradient(180deg, #070a18 0%, #05060f 60%, #04040c 100%);
  touch-action: none;
}

/* 顶部：返回钮由 floatHead 注入；这里只放标题与「我的笺」 */
.tj-topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20;
  display: flex; align-items: center; justify-content: center;
  padding: calc(env(safe-area-inset-top, 0px) + 14px) 16px 12px;
  pointer-events: none;
}
.tj-title { text-align: center; pointer-events: none; }
.tj-title__main {
  font-size: 18px; font-weight: 700; letter-spacing: 3px;
  background: linear-gradient(90deg, #cfe0ff, #b9a7ff 60%, #8fd4ff);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: 0 0 18px rgba(150,170,255,.25);
}
.tj-title__sub { font-size: 11px; opacity: .55; margin-top: 2px; letter-spacing: 1px; }
.tj-mine {
  position: fixed; top: calc(env(safe-area-inset-top, 0px) + 10px); right: 14px; z-index: 25;
  display: inline-flex; align-items: center; gap: 5px;
  height: 36px; padding: 0 14px; border-radius: 999px;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16);
  color: #dfe5ff; font-size: 13px; backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px); cursor: pointer;
}
.tj-mine:active { transform: scale(.96); }
.tj-mine svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; }

/* 空态提示 */
.tj-hint {
  position: fixed; left: 0; right: 0; top: 42%; z-index: 12;
  text-align: center; padding: 0 28px; pointer-events: none;
  opacity: 0; transition: opacity .5s ease;
}
.tj-hint.show { opacity: 1; }
.tj-hint__t { font-size: 15px; color: #c8d2ff; font-weight: 600; }
.tj-hint__s { font-size: 12px; color: #8b93c0; margin-top: 8px; line-height: 1.6; }

/* 底部输入栏（放飞一封）—— 玻璃质感 */
.tj-compose {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  padding: 10px 12px calc(env(safe-area-inset-bottom, 0px) + 10px);
  background: linear-gradient(180deg, rgba(5,6,15,0) 0%, rgba(8,10,22,.72) 38%, rgba(10,12,28,.92) 100%);
}
.tj-compose__box {
  display: flex; align-items: flex-end; gap: 9px;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 18px; padding: 8px 8px 8px 14px;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 8px 30px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.08);
}
.tj-compose textarea {
  flex: 1; min-height: 22px; max-height: 110px; resize: none;
  border: 0; outline: 0; background: transparent; color: #f1f3ff;
  font-size: 15px; line-height: 1.5; padding: 4px 0; font-family: inherit;
}
.tj-compose textarea::placeholder { color: rgba(200,208,240,.45); }
.tj-send {
  flex: 0 0 auto; height: 38px; padding: 0 18px; border: 0; border-radius: 14px;
  font-size: 14px; font-weight: 700; color: #0a0c1a; cursor: pointer;
  background: linear-gradient(135deg, #b9c6ff, #9ad0ff);
  box-shadow: 0 4px 14px rgba(140,170,255,.35);
}
.tj-send:disabled { opacity: .4; box-shadow: none; cursor: not-allowed; }
.tj-send:active:not(:disabled) { transform: scale(.95); }
.tj-quota {
  text-align: center; font-size: 11px; color: #8b93c0; margin-top: 7px; letter-spacing: .5px;
}
.tj-quota b { color: #b9c6ff; font-weight: 700; }

/* 底部抽屉（笺详情 / 列表）通用 */
.tj-sheet-mask {
  position: fixed; inset: 0; z-index: 50; background: rgba(2,3,10,.55);
  opacity: 0; visibility: hidden; transition: opacity .28s ease, visibility .28s;
  backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px);
}
.tj-sheet-mask.show { opacity: 1; visibility: visible; }
.tj-sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 51;
  max-height: 82dvh; display: flex; flex-direction: column;
  background: rgba(16,18,34,.96);
  border-top: 1px solid rgba(255,255,255,.12);
  border-radius: 22px 22px 0 0;
  transform: translateY(100%); transition: transform .32s cubic-bezier(.16,1,.3,1);
  box-shadow: 0 -10px 40px rgba(0,0,0,.5);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
}
.tj-sheet.show { transform: translateY(0); }
.tj-sheet__grip { width: 40px; height: 4px; border-radius: 2px; background: rgba(255,255,255,.22); margin: 10px auto 4px; }
.tj-sheet__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 4px 18px 10px; border-bottom: 1px solid rgba(255,255,255,.07);
}
.tj-sheet__title { font-size: 15px; font-weight: 700; color: #eaf0ff; }
.tj-sheet__close {
  width: 30px; height: 30px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255,255,255,.08); color: #cdd5ff; font-size: 18px; line-height: 1;
}
.tj-sheet__close:active { transform: scale(.92); }
.tj-sheet__body { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 16px 18px; }

/* 笺详情 */
.tj-note {
  font-size: 17px; line-height: 1.75; color: #f3f5ff; letter-spacing: .3px;
  white-space: pre-wrap; word-break: break-word;
}
.tj-note__meta { font-size: 11px; color: #8b93c0; margin-top: 10px; display: flex; gap: 10px; align-items: center; }
.tj-note__mine { color: #9ad0ff; }
.tj-replies { margin-top: 16px; display: flex; flex-direction: column; gap: 10px; }
.tj-reply {
  padding: 11px 13px; border-radius: 14px; font-size: 14px; line-height: 1.6;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.07);
  color: #e3e8ff; white-space: pre-wrap; word-break: break-word;
}
.tj-reply.mine { background: rgba(150,170,255,.14); border-color: rgba(150,170,255,.28); }
.tj-reply__meta { font-size: 10px; color: #7c84b0; margin-top: 6px; }
.tj-reply-empty { font-size: 13px; color: #7c84b0; text-align: center; padding: 14px 0; }
.tj-sheet__compose { padding: 10px 14px calc(env(safe-area-inset-bottom,0px) + 12px); border-top: 1px solid rgba(255,255,255,.08); }
.tj-sheet__compose .tj-compose__box { background: rgba(255,255,255,.06); }

/* 我的笺 / 她的信 列表 */
.tj-list { display: flex; flex-direction: column; gap: 10px; }
.tj-item {
  padding: 13px 14px; border-radius: 14px; cursor: pointer;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08);
}
.tj-item:active { background: rgba(255,255,255,.1); }
.tj-item__content {
  font-size: 14px; line-height: 1.55; color: #e6eaff;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  white-space: pre-wrap;
}
.tj-item__meta { font-size: 11px; color: #8b93c0; margin-top: 7px; display: flex; gap: 10px; }
.tj-item__badge { color: #9ad0ff; }
.tj-list-empty { text-align: center; color: #7c84b0; font-size: 13px; padding: 30px 0; }

/* 确保返回钮在星图之上 */
.toujian-page .float-back-btn { z-index: 80; }

@media (max-width: 360px) {
  .tj-title__main { font-size: 16px; letter-spacing: 2px; }
  .tj-compose textarea { font-size: 14px; }
}

/* ============================================================
 * #271 旧聊天模块通讯录化 · 合规说明条
 * 旧聊天模块顶部固定说明：本模块为通讯录，站内不提供一对一私聊。
 * ============================================================ */
.wy-notice {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 4px 12px 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--primary-soft, rgba(140, 122, 166, .1));
  border: 1px solid rgba(140, 122, 166, .18);
}

.wy-notice__ic {
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  aspect-ratio: 1 / 1;
  margin-top: 1px;
  border-radius: 50%;
  background: var(--primary, #8C7AA6);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  font-style: italic;
  line-height: 16px;
  text-align: center;
}

.wy-notice__tx {
  flex: 1;
  min-width: 0;
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted, #7a7280);
}

.wy-notice__tx b {
  color: var(--primary, #8C7AA6);
  font-weight: 600;
}

/* ============================================================
   消息中心（#272）
   ============================================================ */
.msg-page { background: var(--bg, #fff); }
.msg-topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(env(safe-area-inset-top) + 14px) 16px 8px;
}
.msg-title { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: 1px; color: var(--ink); }
.msg-readall {
  border: 1px solid var(--line-strong, #e4dfe9); background: transparent;
  color: var(--primary, #8C7AA6); font: inherit; font-size: 13px;
  padding: 6px 14px; border-radius: 16px; cursor: pointer;
}
.msg-readall:active { transform: scale(.96); }
.msg-list { padding: 4px 12px 30px; }
.msg-item {
  display: flex; align-items: center; gap: 12px;
  background: var(--bg-card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-card);
  padding: 12px 14px; margin-bottom: 10px; cursor: pointer;
  transition: transform .12s ease;
}
.msg-item:active { transform: scale(.99); }
.msg-item.is-unread { border-color: rgba(140,122,166,.4); }
.msg-item__ic {
  flex: 0 0 40px; width: 40px; height: 40px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center; font-size: 20px;
  background: rgba(140,122,166,.12);
}
.msg-type--admin_push { background: rgba(99,140,255,.14); }
.msg-type--toujian_reply { background: rgba(255,158,122,.16); }
.msg-type--complaint_status { background: rgba(120,200,140,.16); }
.msg-item__main { flex: 1 1 auto; min-width: 0; }
.msg-item__row1 { display: flex; align-items: center; gap: 6px; }
.msg-item__title {
  flex: 1 1 auto; min-width: 0;
  font-size: 15px; font-weight: 600; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.msg-unread {
  flex: 0 0 8px; width: 8px; height: 8px; border-radius: 50%;
  background: var(--primary, #8C7AA6);
}
.msg-item__preview {
  font-size: 13px; color: var(--muted); margin-top: 3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.msg-item__time { font-size: 12px; color: var(--muted); margin-top: 4px; }
.msg-del {
  flex: 0 0 auto; align-self: flex-start;
  border: none; background: transparent; color: var(--muted);
  font: inherit; font-size: 12px; padding: 4px 6px; border-radius: 8px; cursor: pointer;
}
.msg-del:active { background: rgba(0,0,0,.05); }
.msg-empty, .cp-empty {
  text-align: center; color: var(--muted); padding: 46px 20px;
}
.msg-empty__ic, .cp-empty__ic { font-size: 40px; margin-bottom: 10px; }

/* ============================================================
   建议与监督（#272）
   ============================================================ */
.cp-page { background: var(--bg, #fff); }
.cp-topbar { padding: calc(env(safe-area-inset-top) + 14px) 16px 4px; }
.cp-title { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: 1px; color: var(--ink); }
.cp-tabs {
  display: flex; gap: 8px; padding: 12px 16px 4px;
}
.cp-tab {
  flex: 1 1 0; border: 1px solid var(--line-strong, #e4dfe9); background: transparent;
  color: var(--muted); font: inherit; font-size: 14px; font-weight: 600;
  padding: 9px 0; border-radius: 14px; cursor: pointer; transition: all .18s ease;
}
.cp-tab.is-active {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff; border-color: transparent; box-shadow: 0 3px 12px var(--primary-glow);
}
.cp-tab-badge {
  display: inline-block; margin-left: 5px; padding: 1px 6px;
  background: #E54D42; color: #fff; border-radius: 999px;
  font-size: 10px; line-height: 1.5; font-weight: 600; vertical-align: 1px;
}
.cp-tab-badge[hidden] { display: none; }
.cp-form { display: block; }
.cp-label {
  display: block; font-size: 13px; color: var(--muted);
  margin: 14px 2px 6px; font-weight: 600;
}
.cp-label:first-child { margin-top: 4px; }
.cp-textarea { height: 132px; padding: 12px 14px; line-height: 1.6; resize: none; }
.cp-counter { text-align: right; font-size: 12px; color: var(--muted); margin-top: 4px; }
.cp-switch-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 16px; font-size: 13px; color: var(--muted); line-height: 1.5;
}
.cp-switch { position: relative; flex: 0 0 auto; display: inline-flex; }
.cp-switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.cp-switch__track {
  width: 44px; height: 26px; border-radius: 13px;
  background: var(--line-strong, #ccc); transition: background .2s ease;
  display: flex; align-items: center; padding: 2px; box-sizing: border-box;
}
.cp-switch__thumb {
  width: 22px; height: 22px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s ease;
}
.cp-switch input:checked + .cp-switch__track { background: linear-gradient(135deg, var(--primary), var(--primary-light)); }
.cp-switch input:checked + .cp-switch__track .cp-switch__thumb { transform: translateX(18px); }

.cp-list { padding: 6px 12px 30px; }
.cp-item {
  display: flex; align-items: center; gap: 12px;
  background: var(--bg-card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-card);
  padding: 13px 14px; margin-bottom: 10px; cursor: pointer;
  transition: transform .12s ease;
}
.cp-item:active { transform: scale(.99); }
.cp-item__main { flex: 1 1 auto; min-width: 0; }
.cp-item__title {
  font-size: 15px; font-weight: 600; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cp-item__time { font-size: 12px; color: var(--muted); margin-top: 4px; }
.cp-badge {
  flex: 0 0 auto; font-size: 12px; font-weight: 600; padding: 4px 10px;
  border-radius: 12px; white-space: nowrap;
}
.cp-badge--pending { color: #b07a16; background: rgba(245,180,60,.18); }
.cp-badge--read { color: #3a6ad0; background: rgba(90,140,255,.16); }
.cp-badge--done { color: #2e9b54; background: rgba(90,200,130,.18); }

/* 详情抽屉 */
.cp-sheet-mask {
  position: fixed; inset: 0; background: rgba(0,0,0,.15);  /* 极浅蒙版：避免 sheet 在某些环境下被渲成"暗灰" */
  opacity: 0; visibility: hidden; transition: opacity .25s ease, visibility .25s;
  z-index: 200;   /* 必须高于全局抽屉 ui-drawer(z:130/131)，否则被其遮罩盖住 */
}
.cp-sheet-mask.show { opacity: 1; visibility: visible; }
.cp-sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 201;
  background: #FFFFFF;   /* 纯白：弹窗必须不透明 + 不受蒙版色调影响 */
  /* 去掉 backdrop-filter blur(20px) —— blur 会把后面蒙版黑色模糊提亮，叠加实底仍显灰 */
  border-top-left-radius: 20px; border-top-right-radius: 20px;
  box-shadow: 0 -8px 30px rgba(0,0,0,.16);
  transform: translateY(100%); transition: transform .28s cubic-bezier(.16,1,.3,1);
  max-height: 82vh; overflow-y: auto; padding-bottom: calc(env(safe-area-inset-bottom) + 16px);
}
.cp-sheet.show { transform: translateY(0); }
.cp-sheet__handle {
  width: 38px; height: 4px; border-radius: 2px; background: var(--line-strong, #ccc);
  margin: 8px auto 4px;
}
.cp-sheet__body { padding: 6px 20px 12px; }
.cp-detail__head { display: flex; align-items: center; gap: 10px; }
.cp-detail__title { flex: 1 1 auto; font-size: 18px; font-weight: 700; color: var(--ink); }
.cp-detail__meta { font-size: 12px; color: var(--muted); margin: 8px 0 12px; }
.cp-detail__content {
  font-size: 15px; line-height: 1.7; color: var(--ink);
  white-space: pre-wrap; word-break: break-word;
}
.cp-detail__reply {
  margin-top: 16px; background: var(--primary-soft, #ECE7F4);   /* 改为实色（浅紫），不再用 rgba 8% 避免某些环境渲成灰色 */
  border-radius: var(--radius); padding: 12px 14px;
}
.cp-detail__reply--none { color: var(--muted); font-size: 13px; background: transparent; padding: 8px 0; }
.cp-detail__reply-h { font-size: 13px; font-weight: 600; color: var(--primary); margin-bottom: 6px; display: flex; align-items: baseline; gap: 8px; }
.cp-detail__reply-time { font-size: 11px; font-weight: 400; color: var(--muted); }
.cp-detail__reply-b { font-size: 14px; line-height: 1.6; color: var(--ink); white-space: pre-wrap; }

/* ============================================================
   修籍 · 个人中心快捷入口（#272）
   ============================================================ */
.profile-links {
  margin: 14px 12px 0; background: var(--bg-card);
  border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-card); overflow: hidden;
}
.profile-links a {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; color: var(--ink); text-decoration: none;
  font-size: 15px; border-bottom: 1px solid var(--line);
}
.profile-links a:last-child { border-bottom: none; }
.profile-links a:active { background: rgba(0,0,0,.03); }
.profile-links .pl-ic { margin-right: 10px; }
.profile-links .pl-arrow { color: var(--muted); font-size: 18px; }
.profile-links .pl-left { display: flex; align-items: center; }

/* ============================================================
   新版全局 UI 统一层（#287 · Normalization Layer）
   —— 放在样式表最末，统一收口全站视觉规范，消除新旧代码割裂。
   规范：左右 16px 边距 / 底部 34px 手势安全 / 卡片·弹窗·输入框 16px 圆角 + 16px 内边距
        按钮·胶囊·图标复用全局组件 / 尺寸走 rpx 令牌，折叠屏自适应
   原则：只统一「视觉一致性属性」（边距·圆角·安全区），不改 display/flex 等布局属性，
        避免覆盖破坏既有排版。
   ============================================================ */

/* —— 1. 页面左右边距统一 16px（首页自然流除外） —— */
.ui-page:not(.ui-page--home),
.page-body,
.app > .container,
.list-wrap,
.form-wrap {
  padding-left: var(--page-pad);
  padding-right: var(--page-pad);
}

/* —— 2. 底部手势安全区：34px + 机型安全区，滚动容器统一留白 ——
   注意：.ui-chat-bar 等 fixed 底部条自身 bottom 已含 safe-area，
        此处不叠加 padding-bottom，避免双倍留白。 */
.ui-page:not(.ui-page--home),
.page-body,
.list-wrap,
.scroll-area {
  padding-bottom: max(var(--bottom-safe), var(--gesture-safe));
}
.page-footer-bar,
.sticky-actions {
  padding-bottom: calc(8px + var(--safe-bottom));
}

/* —— 3. 卡片：16px 圆角 + 16px 内边距 —— */
.ui-card,
.card,
.list-card,
.info-card,
.section-card {
  border-radius: var(--radius-card);
}
/* 仅对「无内层结构」的通用卡片补内边距，带 __head/__body 子结构的保持原样 */
.ui-card:not(:has(> [class*="__head"])):not(:has(> [class*="__body"])) {
  padding: var(--page-pad);
}

/* —— 4. 输入框/文本域/下拉：16px 圆角 —— */
.ui-input,
input[type="text"],
input[type="password"],
input[type="number"],
input[type="tel"],
input[type="date"],
input[type="search"],
textarea,
select {
  border-radius: var(--radius-card);
}
/* 搜索框与胶囊型输入保持全圆角（不被上面规则拉平） */
.ui-search,
.ui-search input,
.chip,
.zs-capsules .chip,
input.pill,
.pill-input {
  border-radius: var(--radius-pill);
}

/* —— 5. 弹窗/浮层：16px 圆角 + 16px 内边距 —— */
.modal-box,
.sheet,
.sheet__panel,
.memo-modal,
.yn-confirm-box,
.zs-more-panel,
.tj-sheet,
.cp-detail {
  border-radius: var(--radius-card) var(--radius-card) 0 0;
}
.modal-box,
.memo-modal,
.yn-confirm-box {
  border-radius: var(--radius-card);
}
/* 从底部升起的面板：顶部圆角 + 底部手势安全 */
.sheet__panel,
.tj-sheet {
  padding-bottom: max(var(--bottom-safe), var(--gesture-safe));
}

/* —— 6. 按钮统一：圆角走全局令牌，最小触控 44px —— */
.btn,
button.btn,
.ui-action {
  border-radius: var(--btn-radius);
  min-height: 44px;
}
.btn.sm { min-height: 34px; }
.btn.pill,
.btn.chip { border-radius: var(--radius-pill); }

/* —— 7. 折叠屏 / 大屏自适应：内容列居中，不铺满超宽屏 —— */
@media (min-width: 600px) {
  body > .app,
  body > .ui-page,
  .page-body {
    max-width: var(--maxw);
    margin-left: auto;
    margin-right: auto;
  }
}
/* 折叠屏展开态（横向空间充裕）：左右边距按 rpx 微放大，避免内容贴边 */
@media (min-width: 700px) {
  .ui-page,
  .page-body {
    padding-left: calc(40 * var(--rpx));
    padding-right: calc(40 * var(--rpx));
  }
}

/* —— 8. 图标按钮统一触控尺寸（复用全局 rpx 令牌） —— */
.icon-btn,
.ui-chat-bar__tool,
.zs-icon-btn {
  min-width: 44px;
  min-height: 44px;
}

/* —— 9. 长文本防溢出（全站兜底，折叠屏窄列不撑破） —— */
.ui-card,
.list-row,
.detail-body,
.cp-detail__content {
  word-break: break-word;
  overflow-wrap: anywhere;
}

/* —— 10. 各模块列表/详情容器：左右边距归一 16px + 底部手势安全 34px ——
   （原 12px / 18px 等历史硬编码值统一收口，消除页面间边距不一致） */
.cp-list,
.msg-list,
.note-grid,
.zhaoce-grid,
.forms-list,
.notices-list {
  padding-left: var(--page-pad);
  padding-right: var(--page-pad);
  padding-bottom: max(var(--bottom-safe), var(--gesture-safe));
}
.detail-title { margin-left: var(--page-pad); margin-right: var(--page-pad); }
.detail-meta,
.detail-body,
.form-detail-desc,
.notice-body-text { padding-left: var(--page-pad); padding-right: var(--page-pad); }
.tj-sheet__body { padding-left: var(--page-pad); padding-right: var(--page-pad); }
.profile-top { padding-left: var(--page-pad); padding-right: var(--page-pad); }

/* —— 11. 详情页正文底部安全留白（避免最后一行贴住手势条） ——
   只作用于内部滚动区，不加在 .app（.app 是 100dvh + overflow:hidden 的骨架容器）。 */
.notice-body,
.detail-scroll { padding-bottom: max(var(--bottom-safe), var(--gesture-safe)); }

/* —— 后台：投诉流转 状态胶囊 + 状态选择 + 处理反馈弹窗（2026-08-10） —— */
.cp-status-pill {
  display: inline-block; padding: 4px 14px; border-radius: 999px;
  font-size: 12px; font-weight: 600; cursor: pointer; border: 1px solid var(--primary);
  color: var(--primary); background: #fff; transition: all .15s;
}
.cp-status-pill.is-done {
  background: var(--primary); color: #fff;
}
.cp-status-pill:active { opacity: .75; }
.cp-pick-btn {
  flex: 1; padding: 10px 0; border-radius: 10px; font-size: 14px; font-weight: 600;
  cursor: pointer; border: 1px solid var(--line); background: #fff; color: var(--muted); transition: all .15s;
}
.cp-pick-btn.is-cur { border-color: var(--primary); color: var(--primary); background: var(--primary-soft, #ECE7F4); }
.cp-pick-btn:active { opacity: .75; }
.memo-btn-ghost {
  padding: 7px 18px; border-radius: 999px; font-size: 14px; font-weight: 500;
  cursor: pointer; transition: opacity .15s; border: 1px solid var(--primary);
  background: #fff; color: var(--primary);
}
.memo-btn-ghost:active { opacity: .7; }

/* —— 后台：投诉详情弹窗 + 匿名溯源小字（2026-08-10） —— */
.cp-anon-trace { font-size: 11px; color: #8C7AA6; }
.cp-det-row { display: flex; gap: 10px; padding: 7px 0; border-bottom: 1px dashed var(--line); font-size: 13px; line-height: 1.6; }
.cp-det-row:last-of-type { border-bottom: none; }
.cp-det-lab { flex: none; width: 72px; color: var(--muted); }
.cp-det-reply { background: var(--primary-soft, #ECE7F4); border-radius: 8px; padding: 10px; margin-top: 4px; }

/* —— 后台：投诉列表紧凑化（2026-08-10） —— */
.cp-col-pill, .cp-col-time, .cp-col-act { white-space: nowrap; }
.cp-col-time { font-size: 11px; color: var(--muted); }
.cp-col-act .btn.sm { font-size: 11px; padding: 3px 8px; }
.cp-status-pill { padding: 2px 10px; font-size: 11px; }
.cp-repl-tag {
  display: inline-block; margin-left: 6px; padding: 0 6px;
  border-radius: 999px; font-size: 10px; line-height: 1.6; font-weight: 600; vertical-align: 1px; white-space: nowrap;
}
.cp-repl-tag--ok { background: #E3F2E5; color: #2E7D32; }
.cp-repl-tag--draft { background: #FFF3E0; color: #B7791F; }

/* —— 后台：消息推送人群选择器（2026-08-10） —— */
.msg-tab-btn {
  padding: 5px 16px; border-radius: 999px; border: 1px solid var(--line);
  background: #fff; color: var(--muted); font-size: 13px; cursor: pointer; transition: all .15s;
}
.msg-tab-btn.is-active { border-color: var(--primary); color: var(--primary); background: var(--primary-soft, #ECE7F4); font-weight: 600; }
.msg-tab-btn:active { opacity: .75; }

/* —— 推送人群选择器：名单折叠按钮（2026-08-10） —— */
.push-fold-btn {
  display: inline-block; padding: 2px 10px; margin: 2px 0;
  border-radius: 999px; border: 1px dashed var(--primary);
  background: #fff; color: var(--primary); font-size: 11px; cursor: pointer; transition: all .15s;
}
.push-fold-btn:hover { background: var(--primary-soft, #ECE7F4); }
.push-fold-btn:active { opacity: .7; }

/* ---- 文档改稿面板（上传文档 → 模式选择 → 本地零存储处理） ---- */
.zs-doc__head { padding: 4px 2px 10px; }
.zs-doc__title { font-size: 16px; font-weight: 600; color: var(--ink); }
.zs-doc__sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.zs-doc__file {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 10px 12px; margin-bottom: 12px; background: #F5F4F7; border-radius: 10px;
}
.zs-doc__fname { font-size: 14px; font-weight: 500; color: var(--ink); max-width: 62%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zs-doc__fmeta { font-size: 12px; color: var(--muted); }
.zs-doc__seg { display: flex; gap: 8px; margin-bottom: 12px; }
.zs-doc__seg-btn {
  flex: 1; padding: 10px 0; border: 1px solid var(--line); border-radius: 10px;
  background: var(--bg); color: var(--muted); font-size: 14px; cursor: pointer;
  -webkit-tap-highlight-color: transparent; transition: all .15s ease;
}
.zs-doc__seg-btn.is-active { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); font-weight: 600; }
.zs-doc__instr { margin-bottom: 12px; }
.zs-doc__instr-input {
  width: 100%; box-sizing: border-box; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 10px; font-size: 14px; color: var(--ink);
  resize: vertical; font-family: inherit; line-height: 1.5;
}
.zs-doc__instr-input:focus { outline: none; border-color: var(--primary); }
.zs-doc__preview {
  max-height: 120px; overflow-y: auto; padding: 10px 12px; margin-bottom: 14px;
  background: #F5F4F7; border-radius: 10px; font-size: 12px; color: var(--muted);
  line-height: 1.6; white-space: pre-wrap; word-break: break-word;
}
.zs-doc__actions { display: flex; gap: 10px; padding-bottom: env(safe-area-inset-bottom, 0px); }
.zs-doc__btn {
  flex: 1; padding: 13px 0; border: 0; border-radius: 12px; font-size: 15px; cursor: pointer;
  -webkit-tap-highlight-color: transparent; transition: opacity .15s ease;
}
.zs-doc__btn--ghost { background: #F5F4F7; color: var(--ink); }
.zs-doc__btn--primary { background: var(--primary); color: #fff; font-weight: 600; }
.zs-doc__btn:active { opacity: .88; }

/* 输入框下方的「文档润色 / 文档排版」按钮行 */
.zs-docbar { display: flex; gap: 10px; padding: 8px 2px 2px; }
.zs-docbtn {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 0; border: 1px solid var(--line); border-radius: 12px;
  background: var(--bg); color: var(--ink); font-size: 14px; cursor: pointer;
  -webkit-tap-highlight-color: transparent; transition: all .15s ease;
}
.zs-docbtn svg { width: 18px; height: 18px; color: var(--primary); }
.zs-docbtn:active { background: var(--primary-soft); border-color: var(--primary); }

/* 上传窗口内的「点击选择文档」触发区 */
.zs-doc__pick {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  width: 100%; padding: 22px 12px; margin-bottom: 12px;
  border: 1.5px dashed var(--line); border-radius: 12px; background: #F5F4F7;
  color: var(--primary); cursor: pointer; -webkit-tap-highlight-color: transparent; transition: all .15s ease;
}
.zs-doc__pick svg { width: 28px; height: 28px; }
.zs-doc__pick-title { font-size: 15px; font-weight: 600; color: var(--ink); }
.zs-doc__pick-sub { font-size: 12px; color: var(--muted); }
.zs-doc__pick:active { border-color: var(--primary); background: var(--primary-soft); }

/* ============================================================
   深色模式可读性补强（2026-08-12，务必置于文件末尾——同特异性+!important 规则按定义顺序，后者胜）
   ------------------------------------------------------------
   云枢首页豆包风气泡/输入条背景硬编码 #F3F2F5（!important），
   深色模式下文字变浅色（--ink=#ECE9F1）→ 浅底浅字看不清。
   此块定义在业务规则之后，同特异性下覆盖生效。
   ============================================================ */
@media (prefers-color-scheme: dark) {
  body.zs-doubao .msg-row-ai:not(.me) .ai-bubble.ai {
    background: #1E1B26 !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    color: #ECE9F1 !important;
  }
  .ui-composer {
    background: var(--bg-card-solid) !important;
    border-color: var(--line) !important;
  }
}

/* 文档改稿组件深色模式补强（2026-08-14，置于文件末尾） */
@media (prefers-color-scheme: dark) {
  .zs-docbtn {
    background: #211E29 !important;
    border-color: rgba(255, 255, 255, 0.16) !important;
    color: #ECE9F1 !important;
  }
  .zs-docbtn:active { background: rgba(255, 255, 255, 0.08) !important; }
  .zs-doc__pick {
    background: #211E29 !important;
    border-color: rgba(255, 255, 255, 0.16) !important;
  }
  .zs-doc__pick .zs-doc__pick-title { color: #ECE9F1 !important; }
  .zs-doc__pick .zs-doc__pick-sub { color: #B9B4C7 !important; }
  .zs-doc__file, .zs-doc__preview, .zs-doc__btn--ghost {
    background: #211E29 !important;
  }
  .zs-doc__fname { color: #ECE9F1 !important; }
  .zs-doc__btn--ghost { color: #ECE9F1 !important; }
}

/* 文档能力 chip / 附件 / 提示深色模式补强（2026-08-17，置于末尾） */
@media (prefers-color-scheme: dark) {
  .zs-mention-chip { background: rgba(140,122,166,.22); color: #ECE9F1; }
  .zs-mention-chip:active { background: rgba(140,122,166,.34); }
  .ui-attach__item--doc { background: transparent; }
  .ui-attach__item--doc .ui-attach__doc-name { color: #ECE9F1; }
  .ui-attach__item--doc .ui-attach__doc-ico { color: #C9BFE0; }
}

/* 文档弹窗深色模式补强（2026-08-17，置于末尾） */
@media (prefers-color-scheme: dark) {
  .zs-docup__title, .zs-docup__ztitle { color: #ECE9F1; }
  .zs-docup__zsub, .zs-docup__tips li { color: #B9B4C7; }
  .zs-docup__zone {
    background: #211E29;
    border-color: rgba(255, 255, 255, 0.18);
  }
  .zs-docup__zone:active,
  .zs-docup__zone.is-over {
    background: rgba(140, 122, 166, 0.22);
    border-color: #A491C4;
  }
  .zs-docup__zico { background: #2A2633; color: #C9BFE0; box-shadow: none; }
  .zs-docup__zlink { color: #C9BFE0; }
  .zs-docup__close { color: #B9B4C7; }
  .zs-docup__close:active { background: rgba(255, 255, 255, 0.08); color: #ECE9F1; }
}

/* ---------- 全站禁用左滑返回手势（2026-08-28） ----------
   各模块均有独立返回按钮，不再依赖左滑手势返回，避免误触。
   overscroll-behavior-x:none 可根治安卓/鸿蒙 WebView 的横向 overscroll 返回；
   iOS 系统级边缘侧滑前端无法 100% 禁用，仅能缓解。 */
html, body { overscroll-behavior-x: none; }

