/**
 * 家事通 公共样式表 (jst-common.css)
 * 从 page-controller.js 中提取的跨页面公共样式
 * 包含：CSS变量/主题系统、页面容器、Tab栏、骨架屏、Toast、
 *       下拉刷新、空状态、分享按钮、深色模式适配等通用组件样式
 */

/* ============================================================
   一、CSS 变量（主题系统）
   - 定义全局颜色、间距、阴影等设计令牌
   - 支持亮色/暗色模式切换
   ============================================================ */
:root {
  --jst-bg: #ffffff;
  --jst-bg-secondary: #f5f5f5;
  --jst-card: #ffffff;
  --jst-card-hover: #f7f7f7;
  --jst-text: #1a1a1a;
  --jst-text-secondary: #666666;
  --jst-text-tertiary: #999999;
  --jst-border: #e5e5e5;
  --jst-primary: #07C160;
  --jst-primary-light: rgba(7,193,96,0.12);
  --jst-primary-dark: #06ad56;
  --jst-theme: #07C160;
  --jst-theme-light: #e8f5e9;
  --jst-overlay: rgba(0,0,0,0.5);
  --jst-shadow: 0 2px 8px rgba(0,0,0,0.08);
  --jst-input-bg: #f9f9f9;
  --jst-text-on-theme: #ffffff;
  --jst-danger: #ff4d4f;
  --jst-danger-bg: #FFF5F5;
  --jst-warning: #FF9800;
  --jst-warning-bg: #FFF8E1;
  --jst-success: #4CAF50;
  --jst-success-bg: #F1F8E9;
}

:root.jst-dark {
  --jst-bg: #1a1a2e;
  --jst-bg-secondary: #0f3460;
  --jst-card: #16213e;
  --jst-card-hover: #1a2744;
  --jst-text: #e0e0e0;
  --jst-text-secondary: #a0a0a0;
  --jst-text-tertiary: #707070;
  --jst-border: #2a2a4a;
  --jst-primary: #7c83ff;
  --jst-primary-light: rgba(124,131,255,0.15);
  --jst-primary-dark: #5a62e0;
  --jst-theme: #07C160;
  --jst-theme-light: #1a3a1f;
  --jst-overlay: rgba(0,0,0,0.6);
  --jst-shadow: rgba(0,0,0,0.3);
  --jst-input-bg: #1e2d4a;
  --jst-text-on-theme: #ffffff;
  --jst-danger: #ff6b6b;
  --jst-danger-bg: #2d1a1a;
  --jst-warning: #ffd43b;
  --jst-warning-bg: #2d2a1a;
  --jst-success: #51cf66;
  --jst-success-bg: #1a2d1a;
}

/* ============================================================
   二、页面容器
   - 全屏固定定位的主容器
   - 包含内容区域和底部Tab栏
   ============================================================ */
#jst-page-container {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 5000;
  background: var(--jst-bg);
  display: none;
  flex-direction: column;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  color: var(--jst-text);
  padding-top: env(safe-area-inset-top, 0);
}

#jst-page-container.active {
  display: flex;
}

/* 页面内容区域 */
#jst-page-content {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  position: relative;
}

/* ============================================================
   三、Tab内容容器（五页面切换）
   - 每个Tab对应一个绝对定位的容器
   - 支持淡入淡出 + 上移动画的切换效果
   ============================================================ */
#jst-genealogy-container,
#jst-chats-container,
#jst-services-container,
#jst-heritage-container,
#jst-profile-container {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  display: none;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  will-change: transform, opacity;
  background: var(--jst-bg-secondary, #f5f5f5);
}

/* 统一页面内容最大宽度，确保各页面显示一致 */
#jst-genealogy-container > *,
#jst-chats-container > *,
#jst-services-container > *,
#jst-heritage-container > *,
#jst-profile-container > * {
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
}

#jst-genealogy-container.active,
#jst-chats-container.active,
#jst-services-container.active,
#jst-heritage-container.active,
#jst-profile-container.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   四、骨架屏（加载占位）
   - 页面首次加载时显示的占位动画
   - 渐变闪烁效果提示用户正在加载
   ============================================================ */
.jst-skeleton-screen {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--jst-bg);
  z-index: 10;
  padding: 16px;
  display: none;
}

.jst-skeleton-screen.active {
  display: block;
}

.jst-skeleton-item {
  background: linear-gradient(90deg, var(--jst-border) 25%, var(--jst-bg-secondary) 50%, var(--jst-border) 75%);
  background-size: 200% 100%;
  animation: jstSkeletonPulse 1.5s ease-in-out infinite;
  border-radius: 6px;
  margin-bottom: 12px;
}

@keyframes jstSkeletonPulse {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ============================================================
   五、底部Tab栏
   - 五个Tab：消息、家族、服务、传承、我的
   - 支持角标显示未读消息数
   - 适配安全区域（iPhone底部）
   ============================================================ */
#jst-tab-bar {
  display: flex;
  align-items: center;
  justify-content: space-around;
  height: 56px;
  background: var(--jst-card);
  border-top: 1px solid var(--jst-border);
  padding-bottom: env(safe-area-inset-bottom, 0);
  flex-shrink: 0;
}

/* Tab栏响应式 - 宽屏居中 */
@media (min-width: 768px) {
  #jst-tab-bar {
    max-width: 600px;
    margin: 0 auto;
  }
}
@media (min-width: 1024px) {
  #jst-tab-bar {
    max-width: 800px;
  }
}
@media (min-width: 1440px) {
  #jst-tab-bar {
    max-width: 1000px;
  }
}

.jst-tab-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  height: 100%;
  cursor: pointer;
  transition: opacity 0.15s;
  -webkit-tap-highlight-color: transparent;
  position: relative;
  background: transparent;
  border: none;
  outline: none;
}

.jst-tab-item:focus-visible {
  outline: 2px solid var(--jst-theme);
  outline-offset: -2px;
}

.jst-tab-item:active {
  opacity: 0.7;
}

.jst-tab-icon {
  font-size: 22px;
  line-height: 1;
  margin-bottom: 2px;
}

.jst-tab-label {
  font-size: 10px;
  color: var(--jst-text-tertiary);
  font-weight: 500;
}

.jst-tab-item.active .jst-tab-label {
  color: var(--jst-theme);
  font-weight: 600;
}

/* Tab角标（未读消息数） */
.jst-tab-badge {
  position: absolute;
  top: 6px;
  right: calc(50% - 22px);
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  background: #ff3b30;
  color: #fff;
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  font-weight: 600;
}

.jst-tab-badge.hidden {
  display: none;
}

/* ============================================================
   六、返回Expo按钮
   - 左上角的关闭按钮，用于返回原版App界面
   ============================================================ */
#jst-back-expo {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 5001;
  width: 32px;
  height: 32px;
  border-radius: 16px;
  background: var(--jst-overlay);
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 16px;
  display: none;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}

#jst-back-expo:focus-visible {
  outline: 2px solid var(--jst-theme);
  outline-offset: 2px;
}

#jst-page-container.active ~ #jst-back-expo {
  display: flex;
}

/* ============================================================
   七、全局Toast提示
   - 顶部弹出的轻量级消息提示
   - 支持 success / error / info / warning 四种类型
   - 自动消失，不阻断用户操作
   ============================================================ */
.jst-global-toast {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 99999;
  display: flex;
  justify-content: center;
  pointer-events: none;
  padding-top: 12px;
}

.jst-global-toast-inner {
  padding: 10px 20px;
  border-radius: 20px;
  font-size: 14px;
  color: #fff;
  font-weight: 500;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  transform: translateY(-60px);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  max-width: 80vw;
  word-break: break-all;
  display: flex;
  align-items: center;
  gap: 6px;
}

.jst-global-toast-inner.show {
  transform: translateY(0);
}

/* Toast类型颜色 */
.jst-global-toast--success {
  background: #07C160;
}

.jst-global-toast--error {
  background: #FF4D4F;
}

.jst-global-toast--info {
  background: #1890FF;
}

.jst-global-toast--warning {
  background: #FF9800;
}

/* ============================================================
   八、下拉刷新
   - 触摸下拉触发刷新操作
   - 包含刷新指示器和旋转加载动画
   ============================================================ */
.jst-pull-refresh {
  position: relative;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.jst-pull-refresh-indicator {
  position: absolute;
  top: -50px;
  left: 0;
  right: 0;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: var(--jst-text-tertiary);
  transition: opacity 0.2s;
}

.jst-pull-refresh-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid var(--jst-border);
  border-top-color: var(--jst-theme);
  border-radius: 50%;
  animation: jstSpin 0.8s linear infinite;
  margin-right: 8px;
}

@keyframes jstSpin {
  to { transform: rotate(360deg); }
}

/* ============================================================
   九、空状态
   - 列表或内容为空时显示的占位组件
   - 包含图标、标题、描述文字和操作按钮
   ============================================================ */
.jst-empty-state-v2 {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}

.jst-empty-state-v2-icon {
  font-size: 64px;
  margin-bottom: 16px;
  opacity: 0.6;
}

.jst-empty-state-v2-title {
  font-size: 16px;
  color: var(--jst-text-secondary);
  font-weight: 500;
  margin-bottom: 8px;
}

.jst-empty-state-v2-desc {
  font-size: 13px;
  color: var(--jst-text-tertiary);
  margin-bottom: 20px;
}

.jst-empty-state-v2-btn {
  background: var(--jst-theme);
  color: #fff;
  border: none;
  padding: 8px 24px;
  border-radius: 20px;
  font-size: 14px;
  cursor: pointer;
  font-weight: 500;
}

.jst-empty-state-v2-btn:focus-visible {
  outline: 2px solid var(--jst-theme);
  outline-offset: 2px;
}

.jst-empty-state-v2-btn:active {
  opacity: 0.8;
}


/* ============================================================
   十、分享按钮
   - 用于分享到微信或家族群的通用按钮组件
   ============================================================ */
.jst-share-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 14px;
  border-radius: 16px;
  background: var(--jst-theme-light);
  color: var(--jst-theme);
  border: 1px solid var(--jst-theme);
  font-size: 13px;
  cursor: pointer;
  font-weight: 500;
  transition: opacity 0.15s, transform 0.15s;
}

.jst-share-btn:focus-visible {
  outline: 2px solid var(--jst-theme);
  outline-offset: 2px;
}

.jst-share-btn:active {
  opacity: 0.8;
  transform: scale(0.96);
}

/* ============================================================
   十一、主题切换按钮
   - 用于在亮色/暗色/自动模式之间切换的按钮
   ============================================================ */
.jst-theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 16px;
  background: var(--jst-bg-secondary);
  color: var(--jst-text-secondary);
  border: 1px solid var(--jst-border);
  font-size: 13px;
  cursor: pointer;
  transition: opacity 0.15s;
}

.jst-theme-toggle:focus-visible {
  outline: 2px solid var(--jst-theme);
  outline-offset: 2px;
}

.jst-theme-toggle:active {
  opacity: 0.7;
}

/* ============================================================
   十二、深色模式适配（各页面通用组件）
   - 对页面头部、卡片、列表项、输入框等通用组件
   - 进行深色模式下的颜色覆盖
   ============================================================ */
.jst-dark .jst-page-header {
  background: var(--jst-card);
  border-bottom: 1px solid var(--jst-border);
  color: var(--jst-text);
}

.jst-dark .jst-card {
  background: var(--jst-card);
  box-shadow: var(--jst-shadow);
}

.jst-dark .jst-list-item {
  background: var(--jst-card);
  border-bottom: 1px solid var(--jst-border);
}

.jst-dark .jst-input {
  background: var(--jst-bg-secondary);
  color: var(--jst-text);
  border: 1px solid var(--jst-border);
}

.jst-dark .jst-input::placeholder {
  color: var(--jst-text-tertiary);
}

/* ============================================================
   十三、减少动画（尊重用户系统偏好）
   - 当用户在系统中设置了"减少动画"时
   - 将所有动画和过渡效果缩短到最小
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================================
   十三.5、长辈模式（适老化）
   - 全局放大字体 + 按钮热区 + 高对比度
   - 通过 body.jst-elder-mode 类名激活
   ============================================================ */
.jst-elder-mode {
  font-size: 17px !important;
  line-height: 1.6 !important;
}
.jst-elder-mode button,
.jst-elder-mode [role="button"],
.jst-elder-mode .jst-svc-tab,
.jst-elder-mode .jst-collab-core-tab,
.jst-elder-mode .jst-collab-more-btn {
  min-height: 50px !important;
  min-width: 50px !important;
  font-size: 16px !important;
  padding: 12px 18px !important;
}
.jst-elder-mode input,
.jst-elder-mode textarea,
.jst-elder-mode select {
  font-size: 16px !important;
  padding: 12px 16px !important;
  min-height: 50px !important;
}
.jst-elder-mode .jst-chat-item {
  padding: 14px 16px !important;
}
.jst-elder-mode .jst-bottom-nav {
  height: 64px !important;
}
.jst-elder-mode .jst-bottom-nav button {
  font-size: 14px !important;
}
.jst-elder-mode .jst-msg-bubble {
  font-size: 16px !important;
  padding: 12px 16px !important;
}
.jst-elder-mode .jst-toast {
  font-size: 16px !important;
  padding: 14px 22px !important;
}
.jst-elder-mode .jst-chatroom-header {
  min-height: 56px !important;
}
.jst-elder-mode .jst-msg-card-rule,
.jst-elder-mode .jst-msg-card-milestone,
.jst-elder-mode .jst-msg-card-notice,
.jst-elder-mode .jst-msg-card-album,
.jst-elder-mode .jst-msg-card-feed,
.jst-elder-mode .jst-msg-task-pending,
.jst-elder-mode .jst-msg-task-done {
  font-size: 15px !important;
  padding: 12px 18px !important;
}
/* 高对比度模式 */
.jst-elder-mode.jst-dark {
  --jst-text: #ffffff;
  --jst-text-secondary: #cccccc;
  --jst-bg: #0d0d0d;
  --jst-bg-secondary: #1a1a1a;
}
.jst-elder-mode .jst-elder-voice-btn {
  display: flex !important;
}
/* 语音播报按钮（长辈模式专用） */
.jst-elder-voice-btn {
  display: none;
  align-items: center;
  gap: 4px;
  background: #07C160;
  color: #fff;
  border: none;
  border-radius: 20px;
  padding: 8px 16px;
  font-size: 14px;
  cursor: pointer;
  position: fixed;
  bottom: 100px;
  right: 16px;
  z-index: 9999;
  box-shadow: 0 4px 16px rgba(7,193,96,0.3);
}

/* ============================================================
   十四、家族事务页面组件
   - 喜庆料理模板卡片、任务卡片、联系人卡片
   - 弹窗表单组件
   ============================================================ */

/* 区域头部 */
.jst-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  border-bottom: 1px solid var(--jst-border);
}

.jst-section-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--jst-text);
}

.jst-section-add-btn {
  background: var(--jst-theme);
  color: #fff;
  border: none;
  padding: 6px 14px;
  border-radius: 16px;
  font-size: 13px;
  cursor: pointer;
  font-weight: 500;
}

/* 任务分类区域 */
.jst-task-category {
  padding: 16px;
  border-bottom: 1px solid var(--jst-border);
}

.jst-task-category-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--jst-text);
  margin-bottom: 8px;
}

.jst-task-category-desc {
  font-size: 13px;
  color: var(--jst-text-secondary);
  margin-bottom: 12px;
}

/* 喜庆模板卡片 */
.jst-funeral-template-card {
  background: var(--jst-card);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 10px;
  box-shadow: var(--jst-shadow);
}

.jst-funeral-template-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--jst-text);
  margin-bottom: 4px;
}

.jst-funeral-template-region {
  font-size: 12px;
  color: var(--jst-text-secondary);
  margin-bottom: 6px;
}

.jst-funeral-template-progress {
  font-size: 13px;
  color: var(--jst-theme);
  margin-bottom: 10px;
}

.jst-funeral-template-btn {
  background: var(--jst-theme-light);
  color: var(--jst-theme);
  border: 1px solid var(--jst-theme);
  padding: 6px 16px;
  border-radius: 14px;
  font-size: 13px;
  cursor: pointer;
}

.jst-funeral-add-btn {
  width: 100%;
  background: var(--jst-bg-secondary);
  color: var(--jst-text-secondary);
  border: 1px dashed var(--jst-border);
  padding: 12px;
  border-radius: 10px;
  font-size: 14px;
  cursor: pointer;
  margin-top: 8px;
}

/* 任务卡片 */
.jst-task-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--jst-card);
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 8px;
  box-shadow: var(--jst-shadow);
  transition: transform 0.2s, box-shadow 0.2s;
}

.jst-task-card:active {
  transform: scale(0.98);
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

.jst-task-card-done {
  opacity: 0.6;
}

.jst-task-card-emoji {
  font-size: 24px;
  flex-shrink: 0;
}

.jst-task-card-info {
  flex: 1;
  min-width: 0;
}

.jst-task-card-name {
  font-size: 15px;
  font-weight: 500;
  color: var(--jst-text);
  margin-bottom: 4px;
}

.jst-task-card-desc {
  font-size: 13px;
  color: var(--jst-text-secondary);
  margin-bottom: 4px;
}

.jst-task-card-meta {
  font-size: 12px;
  color: var(--jst-text-tertiary);
}

/* 联系人 */
.jst-contact-group {
  padding: 12px 16px;
}

.jst-contact-group-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--jst-text-secondary);
  margin-bottom: 8px;
  padding-left: 4px;
}

.jst-contact-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--jst-card);
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 8px;
  box-shadow: var(--jst-shadow);
}

.jst-contact-emoji {
  font-size: 28px;
  flex-shrink: 0;
}

.jst-contact-info {
  flex: 1;
  min-width: 0;
}

.jst-contact-name {
  font-size: 15px;
  font-weight: 500;
  color: var(--jst-text);
  margin-bottom: 2px;
}

.jst-contact-phone {
  font-size: 13px;
  color: var(--jst-theme);
  margin-bottom: 2px;
}

.jst-contact-note {
  font-size: 12px;
  color: var(--jst-text-tertiary);
}

.jst-contact-call-btn {
  background: var(--jst-theme);
  color: #fff;
  border: none;
  padding: 6px 14px;
  border-radius: 14px;
  font-size: 13px;
  cursor: pointer;
  flex-shrink: 0;
}

/* 弹窗 */
.jst-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.jst-modal-panel {
  background: var(--jst-card);
  border-radius: 16px;
  padding: 20px;
  width: 100%;
  max-width: 400px;
  max-height: 80vh;
  overflow-y: auto;
}

.jst-modal-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--jst-text);
  margin-bottom: 4px;
}

.jst-modal-subtitle {
  font-size: 13px;
  color: var(--jst-text-secondary);
  margin-bottom: 16px;
}

.jst-modal-label {
  font-size: 13px;
  color: var(--jst-text-secondary);
  margin-bottom: 6px;
  margin-top: 12px;
}

.jst-modal-input,
.jst-modal-textarea,
.jst-modal-select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--jst-border);
  border-radius: 8px;
  background: var(--jst-bg);
  color: var(--jst-text);
  font-size: 14px;
  box-sizing: border-box;
}

.jst-modal-input:focus,
.jst-modal-textarea:focus,
.jst-modal-select:focus {
  outline: 2px solid var(--jst-theme);
  outline-offset: -2px;
}

.jst-modal-btn-row {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.jst-modal-btn {
  flex: 1;
  padding: 10px;
  border-radius: 10px;
  font-size: 14px;
  cursor: pointer;
  border: none;
  font-weight: 500;
}

.jst-modal-btn-cancel {
  background: var(--jst-bg-secondary);
  color: var(--jst-text-secondary);
}

.jst-modal-btn-confirm {
  background: var(--jst-theme);
  color: #fff;
}

/* 更多页面折叠面板 */
.jst-more-section {
  margin-bottom: 8px;
  background: var(--jst-card);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--jst-shadow);
}

.jst-more-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  cursor: pointer;
  user-select: none;
  transition: background 0.2s;
}

.jst-more-header:active {
  background: var(--jst-bg-secondary);
}

.jst-more-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--jst-text);
}

.jst-more-arrow {
  font-size: 12px;
  color: var(--jst-text-secondary);
  transition: transform 0.2s;
}

.jst-more-content {
  padding: 0 16px 16px;
  animation: slideDown 0.2s ease;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 喜庆事项列表 */
.jst-funeral-item-list {
  margin: 12px 0;
}

.jst-funeral-item-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--jst-border);
}

.jst-funeral-item-row.done {
  opacity: 0.5;
}

.jst-funeral-item-row.done .jst-funeral-item-name {
  text-decoration: line-through;
}

.jst-funeral-item-text {
  flex: 1;
}

.jst-funeral-item-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--jst-text);
  margin-bottom: 2px;
}

.jst-funeral-item-desc {
  font-size: 12px;
  color: var(--jst-text-secondary);
}

/* 空状态 */
.jst-empty-text {
  text-align: center;
  padding: 20px;
  color: var(--jst-text-tertiary);
  font-size: 14px;
}

/* 服务位置标签 */
.jst-svc-loc-tag {
  display: inline-block;
  background: var(--jst-theme-light, #e0f7fa);
  color: var(--jst-theme, #00838f);
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 8px;
  margin-left: 6px;
  vertical-align: middle;
  font-weight: 500;
}

/* ============================================================
   十五、AI融合模块样式 (从 ai-fusion.js 提取)
   - AI助手浮窗、聊天面板、消息气泡、按钮等
   ============================================================ */

#jst-ai-fab { position: fixed; right: 20px; bottom: 90px; z-index: 10000; width: 56px; height: 56px; border-radius: 28px; background: linear-gradient(135deg, #07C160, #05a34a); border: none; cursor: grab; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 16px rgba(7,193,96,0.4); transition: transform 0.2s, box-shadow 0.2s; font-size: 26px; line-height: 1; touch-action: none; user-select: none; }
#jst-ai-fab:hover { transform: scale(1.1); box-shadow: 0 6px 20px rgba(7,193,96,0.5); }
#jst-ai-fab:active { transform: scale(0.95); cursor: grabbing; }
#jst-ai-fab.dragging { transition: none; cursor: grabbing; }
#jst-ai-fab .pulse { position: absolute; width: 100%; height: 100%; border-radius: 50%; border: 2px solid #07C160; animation: jst-pulse 2s infinite; }
@keyframes jst-pulse { 0% { transform: scale(1); opacity: 0.8; } 100% { transform: scale(1.5); opacity: 0; } }
#jst-ai-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.4); z-index: 10001; opacity: 0; transition: opacity 0.2s; pointer-events: none; }
#jst-ai-overlay.open { opacity: 1; pointer-events: auto; }
#jst-ai-panel { position: fixed; bottom: 0; left: 0; right: 0; height: 80vh; max-height: 640px; min-height: 400px; background: var(--jst-card, #fff); z-index: 10002; border-radius: 20px 20px 0 0; box-shadow: 0 -4px 24px rgba(0,0,0,0.15); transform: translateY(100%); transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1); display: flex; flex-direction: column; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif; padding-bottom: env(safe-area-inset-bottom, 0); }
#jst-ai-panel.open { transform: translateY(0); }
.jst-ai-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--jst-border, #eee); flex-shrink: 0; }
.jst-ai-header-left { display: flex; align-items: center; gap: 12px; }
.jst-ai-header-emoji { font-size: 32px; }
.jst-ai-header-title { font-size: 18px; font-weight: 700; color: var(--jst-text, #333); }
.jst-ai-header-sub { font-size: 12px; color: var(--jst-theme, #07C160); margin-top: 2px; font-weight: 500; }
.jst-ai-close { width: 32px; height: 32px; border-radius: 16px; background: var(--jst-bg-secondary, #f5f5f5); border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 16px; color: var(--jst-text-secondary, #666); transition: background 0.15s; }
.jst-ai-close:hover { background: var(--jst-border, #e8e8e8); }
.jst-ai-messages { flex: 1; overflow-y: auto; padding: 12px 16px; -webkit-overflow-scrolling: touch; }
.jst-ai-msg { max-width: 85%; padding: 12px 14px; border-radius: 16px; margin-bottom: 10px; font-size: 14px; line-height: 1.6; word-break: break-word; white-space: pre-wrap; animation: jst-msg-in 0.3s ease-out; }
@keyframes jst-msg-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.jst-ai-msg.user { margin-left: auto; background: var(--jst-theme, #07C160); color: #fff; border-bottom-right-radius: 4px; }
.jst-ai-msg.ai { margin-right: auto; background: var(--jst-bg-secondary, #f5f5f5); color: var(--jst-text, #333); border-bottom-left-radius: 4px; }
.jst-ai-msg .time { font-size: 11px; opacity: 0.6; margin-top: 4px; text-align: right; }
.jst-ai-input-area { display: flex; align-items: flex-end; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--jst-border, #eee); flex-shrink: 0; }
.jst-ai-input { flex: 1; border: 1px solid var(--jst-border, #ddd); border-radius: 20px; padding: 10px 16px; font-size: 14px; resize: none; max-height: 80px; outline: none; font-family: inherit; transition: border-color 0.2s; background: var(--jst-bg, #fff); color: var(--jst-text, #333); }
.jst-ai-input:focus { border-color: var(--jst-theme, #07C160); }
.jst-ai-send { background: #ccc; color: #fff; border: none; border-radius: 20px; padding: 10px 20px; font-size: 14px; font-weight: 500; cursor: pointer; transition: all 0.2s; }
.jst-ai-send.active { background: var(--jst-theme, #07C160); }
.jst-ai-send:hover { opacity: 0.9; }
.jst-ai-scenes { padding: 12px 16px; border-top: 1px solid var(--jst-border, #eee); flex-shrink: 0; }
.jst-ai-scenes-title { font-size: 12px; color: var(--jst-text-tertiary, #999); margin-bottom: 8px; }
.jst-ai-scenes-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.jst-ai-scene { background: var(--jst-bg-secondary, #f8f8f8); border-radius: 12px; padding: 10px 4px; text-align: center; cursor: pointer; transition: all 0.15s; border: 1px solid transparent; }
.jst-ai-scene:hover { background: var(--jst-bg-secondary, #f0f0f0); border-color: var(--jst-theme, #07C160); }
.jst-ai-scene-emoji { font-size: 22px; display: block; margin-bottom: 2px; }
.jst-ai-scene-text { font-size: 11px; color: var(--jst-text, #333); }
.jst-ai-loading { display: flex; align-items: center; gap: 8px; padding: 12px; color: var(--jst-text-tertiary, #999); font-size: 13px; }
.jst-ai-loading-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--jst-theme, #07C160); animation: jst-loading 1.4s infinite ease-in-out both; }
.jst-ai-loading-dot:nth-child(1) { animation-delay: -0.32s; }
.jst-ai-loading-dot:nth-child(2) { animation-delay: -0.16s; }
@keyframes jst-loading { 0%, 80%, 100% { transform: scale(0); } 40% { transform: scale(1); } }
.jst-ai-clear { font-size: 11px; color: var(--jst-text-tertiary, #999); background: none; border: none; cursor: pointer; padding: 4px 8px; text-decoration: underline; }
.jst-ai-clear:hover { color: var(--jst-theme, #07C160); }

/* 立即联系按钮 */
.jst-ai-contact-btn { display: inline-block; background: #07C160; color: #fff; border: none; border-radius: 14px; padding: 4px 14px; font-size: 12px; font-weight: 500; cursor: pointer; margin-top: 4px; transition: opacity 0.15s, transform 0.15s; }
.jst-ai-contact-btn:hover { opacity: 0.9; transform: scale(1.03); }
.jst-ai-contact-btn:active { transform: scale(0.97); }

/* 快捷操作按钮 */
.jst-ai-quick-actions { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.jst-ai-quick-btn { display: inline-block; background: #e8f5e9; color: #2e7d32; border: 1px solid #c8e6c9; border-radius: 16px; padding: 4px 12px; font-size: 12px; font-weight: 500; cursor: pointer; transition: all 0.15s; white-space: nowrap; }
.jst-ai-quick-btn:hover { background: #c8e6c9; border-color: #a5d6a7; transform: scale(1.03); }
.jst-ai-quick-btn:active { transform: scale(0.97); background: #a5d6a7; }

/* 内联按钮（AI回复中的可点击按钮） */
.jst-ai-inline-btn { display: inline-block; background: #e3f2fd; color: #1565c0; border: 1px solid #bbdefb; border-radius: 14px; padding: 3px 10px; font-size: 12px; font-weight: 500; cursor: pointer; transition: all 0.15s; margin: 2px 2px; vertical-align: middle; }
.jst-ai-inline-btn:hover { background: #bbdefb; border-color: #90caf9; transform: scale(1.03); }
.jst-ai-inline-btn:active { transform: scale(0.97); background: #90caf9; }
.jst-ai-inline-nav-btn { background: #e8f5e9; color: #2e7d32; border-color: #c8e6c9; }
.jst-ai-inline-nav-btn:hover { background: #c8e6c9; border-color: #a5d6a7; }
.jst-ai-inline-share-btn { background: #fff3e0; color: #e65100; border-color: #ffe0b2; }
.jst-ai-inline-share-btn:hover { background: #ffe0b2; border-color: #ffcc80; }

/* 引导式服务流程按钮 */
.jst-ai-guide-btn { display: inline-block; background: #07C160; color: #fff; border: 1px solid #06AD56; border-radius: 16px; padding: 5px 14px; font-size: 13px; font-weight: 600; cursor: pointer; transition: all 0.2s; margin: 3px 3px; vertical-align: middle; box-shadow: 0 1px 3px rgba(7,193,96,0.3); }
.jst-ai-guide-btn:hover { background: #06AD56; border-color: #059A4C; transform: scale(1.05); box-shadow: 0 2px 6px rgba(7,193,96,0.4); }
.jst-ai-guide-btn:active { transform: scale(0.95); background: #059A4C; }
.jst-ai-guide-confirm-btn { background: #07C160; padding: 6px 20px; font-size: 14px; }
.jst-ai-guide-confirm-btn:hover { background: #06AD56; }
.jst-ai-guide-modify-btn { background: #e3f2fd; color: #1565c0; border-color: #bbdefb; box-shadow: 0 1px 3px rgba(21,101,192,0.2); }
.jst-ai-guide-modify-btn:hover { background: #bbdefb; border-color: #90caf9; }
.jst-ai-guide-cancel-btn { background: #f5f5f5; color: #999; border-color: #e0e0e0; box-shadow: none; }
.jst-ai-guide-cancel-btn:hover { background: #e0e0e0; border-color: #ccc; }

/* 家族管家快捷入口 */
.jst-ai-manager-bar { display: flex; gap: 8px; padding: 8px 16px; border-top: 1px solid var(--jst-border, #eee); overflow-x: auto; flex-shrink: 0; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.jst-ai-manager-bar::-webkit-scrollbar { display: none; }
.jst-ai-manager-btn { display: flex; align-items: center; gap: 4px; background: var(--jst-theme-light, #e8f5e9); border: 1px solid var(--jst-border, #a5d6a7); border-radius: 16px; padding: 6px 12px; font-size: 12px; color: var(--jst-theme, #2e7d32); font-weight: 500; cursor: pointer; transition: all 0.15s; white-space: nowrap; flex-shrink: 0; }
.jst-ai-manager-btn:hover { background: linear-gradient(135deg, var(--jst-theme-light), var(--jst-bg-secondary)); transform: scale(1.03); box-shadow: 0 2px 8px rgba(46,125,50,0.2); }
.jst-ai-manager-btn:active { transform: scale(0.97); }
.jst-ai-manager-btn .emoji { font-size: 14px; }

/* 语音输入按钮 */
.jst-ai-voice-btn { width: 36px; height: 36px; border-radius: 18px; background: #f5f5f5; border: 1px solid #ddd; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 16px; transition: all 0.15s; flex-shrink: 0; }
.jst-ai-voice-btn:hover { background: #e8f5e9; border-color: #a5d6a7; }
.jst-ai-voice-btn.recording { background: #ff5252; border-color: #ff5252; color: #fff; animation: jst-voice-pulse 1s infinite; }
@keyframes jst-voice-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.1); } }

/* 快捷指令菜单 */
.jst-ai-slash-menu { position: absolute; bottom: 100%; left: 16px; right: 16px; background: #fff; border: 1px solid #ddd; border-radius: 12px; box-shadow: 0 -4px 16px rgba(0,0,0,0.1); padding: 8px 0; z-index: 100; max-height: 200px; overflow-y: auto; display: none; }
.jst-ai-slash-menu.open { display: block; }
.jst-ai-slash-item { display: flex; align-items: center; gap: 8px; padding: 8px 16px; cursor: pointer; transition: background 0.15s; font-size: 14px; }
.jst-ai-slash-item:hover { background: #f0f0f0; }
.jst-ai-slash-item .cmd { color: #07C160; font-weight: 600; min-width: 50px; }
.jst-ai-slash-item .desc { color: #999; font-size: 12px; }

/* 一键操作按钮增强 */
.jst-ai-action-bar { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.jst-ai-action-btn { display: inline-flex; align-items: center; gap: 4px; background: #07C160; color: #fff; border: none; border-radius: 14px; padding: 5px 14px; font-size: 12px; font-weight: 500; cursor: pointer; transition: all 0.15s; white-space: nowrap; }
.jst-ai-action-btn:hover { opacity: 0.9; transform: scale(1.03); box-shadow: 0 2px 8px rgba(7,193,96,0.3); }
.jst-ai-action-btn:active { transform: scale(0.97); }

/* 任务完成标记 */
.jst-ai-task-item { display: flex; align-items: center; gap: 8px; padding: 4px 0; cursor: pointer; transition: opacity 0.15s; }
.jst-ai-task-item:hover { opacity: 0.8; }
.jst-ai-task-checkbox { width: 16px; height: 16px; border: 2px solid #07C160; border-radius: 4px; display: flex; align-items: center; justify-content: center; font-size: 10px; color: #fff; flex-shrink: 0; }
.jst-ai-task-checkbox.checked { background: #07C160; }
.jst-ai-task-text { flex: 1; }
.jst-ai-task-text.completed { text-decoration: line-through; opacity: 0.6; }
@media (max-width: 400px) { .jst-ai-scenes-grid { grid-template-columns: repeat(3, 1fr); } #jst-ai-panel { height: 85vh; } }

/* ===== AI面板响应式布局 ===== */
@media (min-width: 768px) {
  #jst-ai-panel { max-height: 80vh; }
}
@media (min-width: 1024px) {
  #jst-ai-panel { max-height: 85vh; }
}
@media (min-width: 1440px) {
  #jst-ai-panel { max-height: 90vh; }
}

/* AI弹窗系统样式 */
.jst-ai-popup-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.5); z-index: 20000; display: flex; align-items: center; justify-content: center; padding: 16px; animation: jst-popup-fadein 0.2s ease; }
@keyframes jst-popup-fadein { from { opacity: 0; } to { opacity: 1; } }
.jst-ai-popup { background: #fff; border-radius: 16px; box-shadow: 0 8px 32px rgba(0,0,0,0.2); width: 100%; max-width: 420px; max-height: 85vh; overflow: hidden; display: flex; flex-direction: column; animation: jst-popup-slideup 0.25s cubic-bezier(0.32, 0.72, 0, 1); }
@keyframes jst-popup-slideup { from { transform: translateY(30px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.jst-ai-popup-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid #eee; flex-shrink: 0; }
.jst-ai-popup-title { font-size: 17px; font-weight: 700; color: #333; }
.jst-ai-popup-close { width: 32px; height: 32px; border-radius: 16px; background: #f5f5f5; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 20px; color: #666; line-height: 1; transition: background 0.15s; }
.jst-ai-popup-close:hover { background: #e8e8e8; }
.jst-ai-popup-body { padding: 16px 20px; overflow-y: auto; flex: 1; }
.jst-ai-popup-footer { display: flex; gap: 10px; padding: 12px 20px 16px; border-top: 1px solid #eee; flex-shrink: 0; }
.jst-ai-popup-footer button { flex: 1; padding: 10px 16px; border-radius: 10px; font-size: 14px; font-weight: 600; cursor: pointer; transition: all 0.15s; border: none; }
.jst-ai-popup-cancel { background: #f5f5f5; color: #666; }
.jst-ai-popup-cancel:hover { background: #e8e8e8; }
.jst-ai-popup-confirm { background: #07C160; color: #fff; }
.jst-ai-popup-confirm:hover { background: #06a854; transform: scale(1.02); }
.jst-ai-popup-confirm:active { transform: scale(0.98); }

/* 弹窗表单样式 */
.jst-ai-form-group { margin-bottom: 14px; }
.jst-ai-form-group:last-child { margin-bottom: 0; }
.jst-ai-form-label { display: block; font-size: 13px; color: #555; margin-bottom: 5px; font-weight: 500; }
.jst-ai-required { color: #ff5252; }
.jst-ai-form-input, .jst-ai-form-select, .jst-ai-form-textarea { width: 100%; padding: 10px 12px; border: 1px solid #ddd; border-radius: 10px; font-size: 14px; font-family: inherit; outline: none; transition: border-color 0.2s, box-shadow 0.2s; box-sizing: border-box; }
.jst-ai-form-input:focus, .jst-ai-form-select:focus, .jst-ai-form-textarea:focus { border-color: #07C160; box-shadow: 0 0 0 3px rgba(7,193,96,0.1); }
.jst-ai-form-textarea { resize: vertical; min-height: 60px; }
.jst-ai-radio-group { display: flex; gap: 16px; }
.jst-ai-radio-label { display: flex; align-items: center; gap: 6px; font-size: 14px; color: #333; cursor: pointer; }
.jst-ai-radio-label input[type="radio"] { width: 18px; height: 18px; accent-color: #07C160; cursor: pointer; }

/* ============================================================
   十六、家族传承频道样式 (heritage-page.js)
   - 绿色主题 #07C160
   - 卡片式布局，圆角12px，阴影统一
   - 响应式布局（手机480px -> 电脑1000px）
   ============================================================ */

/* 传承页面容器 */
#jst-heritage-container {
  background: var(--jst-bg-secondary, #f8f9fa);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
}

/* 顶部横幅 */
.jst-heritage-header {
  background: linear-gradient(135deg, #07C160 0%, #05a050 100%);
  color: #fff;
  padding: 24px 16px 20px;
  text-align: center;
}

.jst-heritage-header-inner {
  max-width: 600px;
  margin: 0 auto;
}

.jst-heritage-header-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 4px;
}

.jst-heritage-header-subtitle {
  font-size: 14px;
  opacity: 0.9;
}

/* 统计卡片 */
.jst-heritage-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  padding: 16px;
  max-width: 600px;
  margin: 0 auto;
}

.jst-heritage-stat-card {
  background: var(--jst-card, #fff);
  border-radius: 12px;
  padding: 14px 8px;
  text-align: center;
  box-shadow: var(--jst-shadow, 0 2px 8px rgba(0,0,0,0.08));
}

.jst-heritage-stat-num {
  font-size: 22px;
  font-weight: 700;
  color: var(--jst-theme, #07C160);
  margin-bottom: 4px;
}

.jst-heritage-stat-label {
  font-size: 11px;
  color: var(--jst-text-secondary, #666);
}

/* 快捷入口 */
.jst-heritage-quick-actions {
  padding: 0 16px 16px;
  max-width: 600px;
  margin: 0 auto;
}

.jst-heritage-quick-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--jst-text, #333);
  margin-bottom: 12px;
}

.jst-heritage-quick-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.jst-heritage-quick-item {
  background: var(--jst-card, #fff);
  border-radius: 12px;
  padding: 16px 8px;
  text-align: center;
  box-shadow: var(--jst-shadow, 0 2px 8px rgba(0,0,0,0.08));
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}

.jst-heritage-quick-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.jst-heritage-quick-item:active {
  transform: scale(0.97);
}

.jst-heritage-quick-icon {
  font-size: 28px;
  margin-bottom: 6px;
}

.jst-heritage-quick-label {
  font-size: 12px;
  color: var(--jst-text-secondary, #666);
  font-weight: 500;
}

/* 内容区块 */
.jst-heritage-section {
  padding: 0 16px 16px;
  max-width: 600px;
  margin: 0 auto;
}

.jst-heritage-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.jst-heritage-section-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--jst-text, #333);
}

.jst-heritage-section-more {
  font-size: 13px;
  color: var(--jst-theme, #07C160);
  cursor: pointer;
}

/* 技能卡片 */
.jst-heritage-skill-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.jst-heritage-skill-card {
  background: var(--jst-card, #fff);
  border-radius: 12px;
  padding: 14px;
  box-shadow: var(--jst-shadow, 0 2px 8px rgba(0,0,0,0.08));
  cursor: pointer;
  transition: transform 0.15s;
}

.jst-heritage-skill-card:hover {
  transform: translateY(-1px);
}

.jst-heritage-skill-card:active {
  transform: scale(0.98);
}

.jst-heritage-skill-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.jst-heritage-skill-avatar {
  font-size: 32px;
  flex-shrink: 0;
}

.jst-heritage-skill-info {
  flex: 1;
  min-width: 0;
}

.jst-heritage-skill-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--jst-text, #333);
  margin-bottom: 2px;
}

.jst-heritage-skill-meta {
  font-size: 12px;
  color: var(--jst-text-secondary, #666);
}

.jst-heritage-skill-status {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 500;
  flex-shrink: 0;
}

.jst-heritage-skill-desc {
  font-size: 13px;
  color: var(--jst-text-secondary, #666);
  line-height: 1.5;
  margin-bottom: 8px;
}

.jst-heritage-skill-footer {
  display: flex;
  gap: 12px;
  font-size: 12px;
  color: var(--jst-text-tertiary, #999);
}

/* 碎片列表 */
.jst-heritage-fragment-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.jst-heritage-fragment-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--jst-card, #fff);
  border-radius: 10px;
  padding: 12px;
  box-shadow: var(--jst-shadow, 0 2px 8px rgba(0,0,0,0.08));
}

.jst-heritage-fragment-icon {
  font-size: 20px;
  flex-shrink: 0;
}

.jst-heritage-fragment-content {
  flex: 1;
  min-width: 0;
}

.jst-heritage-fragment-text {
  font-size: 13px;
  color: var(--jst-text, #333);
  margin-bottom: 6px;
  line-height: 1.5;
}

.jst-heritage-fragment-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}

.jst-heritage-tag {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 8px;
  background: var(--jst-theme-light, #e8f5e9);
  color: var(--jst-theme, #07C160);
}

.jst-heritage-tag-small {
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--jst-bg-secondary, #f5f5f5);
  color: var(--jst-text-secondary, #666);
}

.jst-heritage-fragment-status {
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 6px;
  font-weight: 500;
}

/* ============================================================
   任务消息样式（消息页面与事务联动）
   ============================================================ */
.jst-msg-task-wrap {
  cursor: pointer;
  transition: all 0.2s ease;
}
.jst-msg-task-wrap:hover {
  transform: scale(1.02);
}
.jst-msg-task-pending {
  background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
  border: 1px solid #90caf9;
  color: #1565c0;
  padding: 8px 14px;
  border-radius: 16px;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 80%;
  word-break: break-word;
  cursor: pointer; transition: transform 0.15s, box-shadow 0.15s;
}
.jst-msg-task-pending:active { transform: scale(0.98); }
.jst-msg-task-done {
  background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
  border: 1px solid #a5d6a7;
  color: #2e7d32;
  padding: 8px 14px;
  border-radius: 16px;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 80%;
  word-break: break-word;
  cursor: pointer; transition: transform 0.15s, box-shadow 0.15s;
}
.jst-msg-task-done:active { transform: scale(0.98); }
.jst-msg-task-icon {
  font-size: 16px;
  flex-shrink: 0;
}
.jst-msg-task-text {
  flex: 1;
}
.jst-msg-task-action {
  background: var(--jst-primary, #07C160);
  color: #fff;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.2s ease;
}
.jst-msg-task-action:hover {
  background: var(--jst-primary-dark, #06ad56);
  transform: scale(1.05);
}
.jst-msg-task-action:active {
  transform: scale(0.95);
}

/* 系统消息卡片类型样式 */
.jst-msg-card-rule {
  background: linear-gradient(135deg,#fff3e0 0%,#ffe0b2 100%);
  border: 1px solid #ffb74d; color: #e65100;
  padding: 8px 14px; border-radius: 16px; font-size: 13px;
  display: inline-flex; align-items: center; gap: 6px;
  max-width: 80%; word-break: break-word;
  cursor: pointer; transition: transform 0.15s, box-shadow 0.15s;
}
.jst-msg-card-rule:active { transform: scale(0.98); }
.jst-msg-card-milestone {
  background: linear-gradient(135deg,#e8eaf6 0%,#c5cae9 100%);
  border: 1px solid #9fa8da; color: #283593;
  padding: 8px 14px; border-radius: 16px; font-size: 13px;
  display: inline-flex; align-items: center; gap: 6px;
  max-width: 80%; word-break: break-word;
  cursor: pointer; transition: transform 0.15s, box-shadow 0.15s;
}
.jst-msg-card-milestone:active { transform: scale(0.98); }
.jst-msg-card-notice {
  background: linear-gradient(135deg,#fce4ec 0%,#f8bbd0 100%);
  border: 1px solid #f48fb1; color: #c62828;
  padding: 8px 14px; border-radius: 16px; font-size: 13px;
  display: inline-flex; align-items: center; gap: 6px;
  max-width: 80%; word-break: break-word;
  cursor: pointer; transition: transform 0.15s, box-shadow 0.15s;
}
.jst-msg-card-notice:active { transform: scale(0.98); }
.jst-msg-card-album {
  background: linear-gradient(135deg,#e0f7fa 0%,#b2ebf2 100%);
  border: 1px solid #4dd0e1; color: #00695c;
  padding: 8px 14px; border-radius: 16px; font-size: 13px;
  display: inline-flex; align-items: center; gap: 6px;
  max-width: 80%; word-break: break-word;
  cursor: pointer; transition: transform 0.15s, box-shadow 0.15s;
}
.jst-msg-card-album:active { transform: scale(0.98); }
.jst-msg-card-feed {
  background: linear-gradient(135deg,#f3e5f5 0%,#e1bee7 100%);
  border: 1px solid #ba68c8; color: #6a1b9a;
  padding: 8px 14px; border-radius: 16px; font-size: 13px;
  display: inline-flex; align-items: center; gap: 6px;
  max-width: 80%; word-break: break-word;
  cursor: pointer; transition: transform 0.15s, box-shadow 0.15s;
}
.jst-msg-card-feed:active { transform: scale(0.98); }
/* 深色模式适配 */
.jst-dark .jst-msg-card-rule {
  background: linear-gradient(135deg,#3e2723 0%,#4e342e 100%);
  border-color: #8d6e63; color: #ffcc80;
}
.jst-dark .jst-msg-card-milestone {
  background: linear-gradient(135deg,#1a237e 0%,#283593 100%);
  border-color: #5c6bc0; color: #c5cae9;
}
.jst-dark .jst-msg-card-notice {
  background: linear-gradient(135deg,#880e4f 0%,#ad1457 100%);
  border-color: #f06292; color: #f8bbd0;
}
.jst-dark .jst-msg-card-album {
  background: linear-gradient(135deg,#004d40 0%,#00695c 100%);
  border-color: #4db6ac; color: #b2dfdb;
}
.jst-dark .jst-msg-card-feed {
  background: linear-gradient(135deg,#4a148c 0%,#6a1b9a 100%);
  border-color: #ab47bc; color: #e1bee7;
}
.jst-dark .jst-msg-task-pending {
  background: linear-gradient(135deg, #1a237e 0%, #283593 100%);
  border-color: #5c6bc0; color: #90caf9;
}
.jst-dark .jst-msg-task-done {
  background: linear-gradient(135deg, #1b5e20 0%, #2e7d32 100%);
  border-color: #66bb6a; color: #a5d6a7;
}

/* 图片全屏预览 */
.jst-img-preview-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.92);
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: jstFadeIn 0.2s ease;
  cursor: zoom-out;
}
.jst-img-preview-full {
  max-width: 95vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 4px;
  cursor: default;
}
.jst-img-preview-close {
  position: absolute;
  top: 12px; right: 16px;
  color: #fff;
  font-size: 28px;
  cursor: pointer;
  width: 40px; height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  transition: background 0.2s;
}
.jst-img-preview-close:hover {
  background: rgba(255,255,255,0.3);
}

/* 碎片页面 */
.jst-heritage-fragments {
  padding: 16px;
  max-width: 600px;
  margin: 0 auto;
}

.jst-heritage-fragment-actions {
  margin-bottom: 12px;
}

.jst-heritage-fragment-filters {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.jst-heritage-filter {
  font-size: 12px;
  padding: 4px 12px;
  border-radius: 12px;
  background: var(--jst-card, #fff);
  color: var(--jst-text-secondary, #666);
  cursor: pointer;
  border: 1px solid var(--jst-border, #e5e5e5);
  transition: all 0.15s;
}

.jst-heritage-filter.active {
  background: var(--jst-theme, #07C160);
  color: #fff;
  border-color: var(--jst-theme, #07C160);
}

.jst-heritage-fragment-list-full {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.jst-heritage-fragment-card {
  background: var(--jst-card, #fff);
  border-radius: 12px;
  padding: 14px;
  box-shadow: var(--jst-shadow, 0 2px 8px rgba(0,0,0,0.08));
}

.jst-heritage-fragment-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.jst-heritage-fragment-type {
  font-size: 12px;
  color: var(--jst-text-secondary, #666);
}

.jst-heritage-fragment-status-badge {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 500;
}

.jst-heritage-fragment-card-body {
  font-size: 14px;
  color: var(--jst-text, #333);
  line-height: 1.6;
  margin-bottom: 10px;
}

.jst-heritage-fragment-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.jst-heritage-fragment-card-actions {
  display: flex;
  gap: 6px;
}

/* 归档页面 */
.jst-heritage-archive {
  padding: 16px;
  max-width: 600px;
  margin: 0 auto;
}

.jst-heritage-archive-header {
  margin-bottom: 12px;
}

.jst-heritage-pending-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.jst-heritage-pending-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--jst-card, #fff);
  border-radius: 10px;
  padding: 12px;
  box-shadow: var(--jst-shadow, 0 2px 8px rgba(0,0,0,0.08));
}

.jst-heritage-pending-text {
  flex: 1;
  font-size: 13px;
  color: var(--jst-text, #333);
}

.jst-heritage-category-filters {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.jst-heritage-archive-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.jst-heritage-archive-card {
  background: var(--jst-card, #fff);
  border-radius: 12px;
  padding: 14px;
  box-shadow: var(--jst-shadow, 0 2px 8px rgba(0,0,0,0.08));
  cursor: pointer;
  transition: transform 0.15s;
}

.jst-heritage-archive-card:hover {
  transform: translateY(-1px);
}

.jst-heritage-archive-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.jst-heritage-archive-cat {
  font-size: 12px;
  color: var(--jst-theme, #07C160);
  font-weight: 500;
}

.jst-heritage-archive-cred {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  background: var(--jst-theme-light, #e8f5e9);
  color: var(--jst-theme, #07C160);
}

.jst-heritage-archive-card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--jst-text, #333);
  margin-bottom: 8px;
}

.jst-heritage-archive-card-chain {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--jst-text-secondary, #666);
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.jst-heritage-archive-card-footer {
  display: flex;
  gap: 12px;
  font-size: 12px;
  color: var(--jst-text-tertiary, #999);
}

/* 展示页面 */
.jst-heritage-showcase {
  padding: 16px;
  max-width: 600px;
  margin: 0 auto;
}

.jst-heritage-showcase-filters {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.jst-heritage-showcase-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.jst-heritage-showcase-card {
  background: var(--jst-card, #fff);
  border-radius: 12px;
  padding: 14px;
  box-shadow: var(--jst-shadow, 0 2px 8px rgba(0,0,0,0.08));
  cursor: pointer;
  transition: transform 0.15s;
}

.jst-heritage-showcase-card:hover {
  transform: translateY(-1px);
}

.jst-heritage-showcase-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.jst-heritage-showcase-avatar {
  font-size: 40px;
  flex-shrink: 0;
}

.jst-heritage-showcase-inheritor {
  flex: 1;
  min-width: 0;
}

.jst-heritage-showcase-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--jst-text, #333);
}

.jst-heritage-showcase-skill {
  font-size: 13px;
  color: var(--jst-text-secondary, #666);
}

.jst-heritage-showcase-status {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 500;
  flex-shrink: 0;
}

.jst-heritage-showcase-body {
  margin-bottom: 10px;
}

.jst-heritage-showcase-cat {
  font-size: 12px;
  color: var(--jst-theme, #07C160);
  margin-bottom: 4px;
}

.jst-heritage-showcase-desc {
  font-size: 13px;
  color: var(--jst-text-secondary, #666);
  line-height: 1.5;
}

.jst-heritage-showcase-works {
  margin-top: 8px;
  font-size: 12px;
  color: var(--jst-text-secondary, #666);
}

.jst-heritage-showcase-work-label {
  font-weight: 500;
}

.jst-heritage-showcase-footer {
  display: flex;
  gap: 12px;
  font-size: 12px;
  color: var(--jst-text-tertiary, #999);
  border-top: 1px solid var(--jst-border, #f0f0f0);
  padding-top: 10px;
}

/* 技能详情弹窗 */
.jst-heritage-detail-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.jst-heritage-detail-avatar {
  font-size: 48px;
  flex-shrink: 0;
}

.jst-heritage-detail-info {
  flex: 1;
  min-width: 0;
}

.jst-heritage-detail-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--jst-text, #333);
  margin-bottom: 2px;
}

.jst-heritage-detail-inheritor {
  font-size: 13px;
  color: var(--jst-text-secondary, #666);
  margin-bottom: 2px;
}

.jst-heritage-detail-cat {
  font-size: 12px;
  color: var(--jst-theme, #07C160);
}

.jst-heritage-detail-status {
  font-size: 11px;
  padding: 2px 10px;
  border-radius: 10px;
  font-weight: 500;
  flex-shrink: 0;
}

.jst-heritage-detail-section {
  margin-bottom: 16px;
}

.jst-heritage-detail-section-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--jst-text, #333);
  margin-bottom: 8px;
}

.jst-heritage-detail-content {
  font-size: 14px;
  color: var(--jst-text-secondary, #666);
  line-height: 1.7;
}

.jst-heritage-detail-chain {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.jst-heritage-chain-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: var(--jst-text, #333);
  text-align: center;
  flex: 1;
}

.jst-heritage-chain-avatar {
  font-size: 28px;
}

.jst-heritage-chain-arrow {
  font-size: 18px;
  color: var(--jst-theme, #07C160);
  font-weight: 700;
}

.jst-heritage-detail-reviews {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.jst-heritage-review-item {
  background: var(--jst-bg-secondary, #f8f9fa);
  border-radius: 10px;
  padding: 10px 12px;
}

.jst-heritage-review-user {
  font-size: 13px;
  font-weight: 500;
  color: var(--jst-text, #333);
  margin-bottom: 4px;
}

.jst-heritage-review-user span {
  color: #FF9800;
}

.jst-heritage-review-text {
  font-size: 13px;
  color: var(--jst-text-secondary, #666);
}

/* 管理页面 */
.jst-heritage-manage {
  padding: 16px;
  max-width: 600px;
  margin: 0 auto;
}

.jst-heritage-manage-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.jst-heritage-manage-stat {
  background: var(--jst-card, #fff);
  border-radius: 12px;
  padding: 14px 8px;
  text-align: center;
  box-shadow: var(--jst-shadow, 0 2px 8px rgba(0,0,0,0.08));
}

.jst-heritage-manage-stat-num {
  font-size: 20px;
  font-weight: 700;
  color: var(--jst-theme, #07C160);
  margin-bottom: 4px;
}

.jst-heritage-manage-stat-label {
  font-size: 11px;
  color: var(--jst-text-secondary, #666);
}

.jst-heritage-manage-actions {
  margin-bottom: 16px;
}

.jst-heritage-manage-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.jst-heritage-manage-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--jst-card, #fff);
  border-radius: 10px;
  padding: 12px;
  box-shadow: var(--jst-shadow, 0 2px 8px rgba(0,0,0,0.08));
}

.jst-heritage-manage-item-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--jst-text, #333);
  margin-bottom: 2px;
}

.jst-heritage-manage-item-meta {
  font-size: 12px;
  color: var(--jst-text-secondary, #666);
}

.jst-heritage-manage-item-status {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 500;
  flex-shrink: 0;
}

.jst-heritage-application-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.jst-heritage-application-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--jst-card, #fff);
  border-radius: 10px;
  padding: 12px;
  box-shadow: var(--jst-shadow, 0 2px 8px rgba(0,0,0,0.08));
}

.jst-heritage-application-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--jst-text, #333);
  margin-bottom: 2px;
}

.jst-heritage-application-meta {
  font-size: 12px;
  color: var(--jst-text-secondary, #666);
}

.jst-heritage-application-status {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 500;
  flex-shrink: 0;
}

/* 空状态 */
.jst-heritage-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
}

.jst-heritage-empty-icon {
  font-size: 48px;
  margin-bottom: 12px;
  opacity: 0.5;
}

.jst-heritage-empty-title {
  font-size: 15px;
  color: var(--jst-text-secondary, #666);
  font-weight: 500;
  margin-bottom: 4px;
}

.jst-heritage-empty-desc {
  font-size: 13px;
  color: var(--jst-text-tertiary, #999);
}

/* 底部导航 */
.jst-heritage-bottom-nav {
  display: flex;
  align-items: center;
  justify-content: space-around;
  height: 52px;
  background: var(--jst-card, #fff);
  border-top: 1px solid var(--jst-border, #e5e5e5);
  position: sticky;
  bottom: 0;
  z-index: 10;
}

.jst-heritage-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  height: 100%;
  cursor: pointer;
  background: transparent;
  border: none;
  outline: none;
  transition: opacity 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.jst-heritage-nav-item.active .jst-heritage-nav-label {
  color: var(--jst-theme, #07C160);
  font-weight: 600;
}

.jst-heritage-nav-icon {
  font-size: 20px;
  line-height: 1;
  margin-bottom: 2px;
}

.jst-heritage-nav-label {
  font-size: 10px;
  color: var(--jst-text-tertiary, #999);
}

/* 通用按钮 */
.jst-heritage-btn-primary {
  background: var(--jst-theme, #07C160);
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.15s;
}

.jst-heritage-btn-primary:hover {
  opacity: 0.9;
}

.jst-heritage-btn-primary:active {
  transform: scale(0.97);
}

.jst-heritage-btn-small {
  background: var(--jst-bg-secondary, #f5f5f5);
  color: var(--jst-text-secondary, #666);
  border: 1px solid var(--jst-border, #e5e5e5);
  padding: 4px 10px;
  border-radius: 10px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s;
}

.jst-heritage-btn-small:hover {
  background: var(--jst-theme-light, #e8f5e9);
  color: var(--jst-theme, #07C160);
  border-color: var(--jst-theme, #07C160);
}

.jst-heritage-btn-cancel {
  background: var(--jst-bg-secondary, #f5f5f5);
  color: var(--jst-text-secondary, #666);
  border: none;
  padding: 10px 20px;
  border-radius: 10px;
  font-size: 14px;
  cursor: pointer;
  flex: 1;
}

.jst-heritage-btn-confirm {
  background: var(--jst-theme, #07C160);
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 10px;
  font-size: 14px;
  cursor: pointer;
  flex: 1;
  font-weight: 500;
}

/* 弹窗 */
.jst-heritage-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 20000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: jst-popup-fadein 0.2s ease;
}

.jst-heritage-modal {
  background: var(--jst-card, #fff);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
  width: 100%;
  max-width: 420px;
  max-height: 85vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: jst-popup-slideup 0.25s cubic-bezier(0.32, 0.72, 0, 1);
}

.jst-heritage-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--jst-border, #eee);
  flex-shrink: 0;
}

.jst-heritage-modal-header h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  color: var(--jst-text, #333);
}

.jst-heritage-modal-close {
  width: 32px;
  height: 32px;
  border-radius: 16px;
  background: var(--jst-bg-secondary, #f5f5f5);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--jst-text-secondary, #666);
  line-height: 1;
  transition: background 0.15s;
}

.jst-heritage-modal-close:hover {
  background: var(--jst-border, #e8e8e8);
}

.jst-heritage-modal-body {
  padding: 16px 20px;
  overflow-y: auto;
  flex: 1;
}

.jst-heritage-modal-footer {
  display: flex;
  gap: 10px;
  padding: 12px 20px 16px;
  border-top: 1px solid var(--jst-border, #eee);
  flex-shrink: 0;
}

/* 表单 */
.jst-heritage-form-group {
  margin-bottom: 14px;
}

.jst-heritage-form-group label {
  display: block;
  font-size: 13px;
  color: var(--jst-text-secondary, #555);
  margin-bottom: 5px;
  font-weight: 500;
}

.jst-heritage-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.jst-heritage-input,
.jst-heritage-textarea,
.jst-heritage-select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--jst-border, #ddd);
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
  background: var(--jst-bg, #fff);
  color: var(--jst-text, #333);
}

.jst-heritage-input:focus,
.jst-heritage-textarea:focus,
.jst-heritage-select:focus {
  border-color: var(--jst-theme, #07C160);
  box-shadow: 0 0 0 3px rgba(7,193,96,0.1);
}

.jst-heritage-textarea {
  resize: vertical;
  min-height: 80px;
}

.jst-heritage-type-selector {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.jst-heritage-type-option {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 10px;
  background: var(--jst-bg-secondary, #f5f5f5);
  cursor: pointer;
  font-size: 14px;
  border: 2px solid transparent;
  transition: all 0.15s;
}

.jst-heritage-type-option:has(input:checked) {
  border-color: var(--jst-theme, #07C160);
  background: var(--jst-theme-light, #e8f5e9);
}

.jst-heritage-type-option input[type="radio"] {
  accent-color: var(--jst-theme, #07C160);
}

.jst-heritage-chain-inputs {
  display: flex;
  align-items: center;
  gap: 6px;
}

.jst-heritage-chain-inputs .jst-heritage-input {
  flex: 1;
  text-align: center;
}

.jst-heritage-chain-inputs span {
  color: var(--jst-theme, #07C160);
  font-weight: 700;
  font-size: 16px;
}

/* 响应式布局 */
@media (min-width: 768px) {
  .jst-heritage-stats,
  .jst-heritage-quick-actions,
  .jst-heritage-section,
  .jst-heritage-fragments,
  .jst-heritage-archive,
  .jst-heritage-showcase,
  .jst-heritage-manage {
    max-width: 720px;
  }
}

@media (min-width: 1024px) {
  .jst-heritage-stats,
  .jst-heritage-quick-actions,
  .jst-heritage-section,
  .jst-heritage-fragments,
  .jst-heritage-archive,
  .jst-heritage-showcase,
  .jst-heritage-manage {
    max-width: 900px;
  }
}

@media (min-width: 1440px) {
  .jst-heritage-stats,
  .jst-heritage-quick-actions,
  .jst-heritage-section,
  .jst-heritage-fragments,
  .jst-heritage-archive,
  .jst-heritage-showcase,
  .jst-heritage-manage {
    max-width: 1000px;
  }
}

/* ===== AI模块深色模式 ===== */
.jst-dark .jst-ai-popup { background: var(--jst-card, #1e1e1e); border-color: var(--jst-border, #333); }
.jst-dark .jst-ai-popup-header { background: var(--jst-bg-secondary, #2a2a2a); border-bottom-color: var(--jst-border, #333); }
.jst-dark .jst-ai-popup-header h3 { color: var(--jst-text, #e0e0e0); }
.jst-dark .jst-ai-popup-body { background: var(--jst-card, #1e1e1e); }
.jst-dark .jst-ai-message { color: var(--jst-text, #ddd); }
.jst-dark .jst-ai-message-user { background: var(--jst-theme, #07C160); color: #fff; }
.jst-dark .jst-ai-input-wrap { background: var(--jst-bg-secondary, #2a2a2a); border-color: var(--jst-border, #333); }
.jst-dark .jst-ai-input-wrap input,
.jst-dark .jst-ai-input-wrap textarea { background: var(--jst-bg-secondary, #2a2a2a); color: var(--jst-text, #ddd); border-color: var(--jst-border, #333); }
.jst-dark .jst-ai-input-wrap input::placeholder,
.jst-dark .jst-ai-input-wrap textarea::placeholder { color: var(--jst-text-tertiary, #666); }
.jst-dark .jst-ai-quick-btn { background: var(--jst-bg-secondary, #2a2a2a); color: var(--jst-text, #ccc); border-color: var(--jst-border, #333); }
.jst-dark .jst-ai-quick-btn:hover { background: var(--jst-border, #333); }
.jst-dark .jst-ai-inline-btn { background: var(--jst-bg-secondary, #2a2a2a); color: var(--jst-theme, #07C160); border-color: var(--jst-theme, #07C160); }
.jst-dark .jst-ai-slash-menu { background: var(--jst-card, #1e1e1e); border-color: var(--jst-border, #333); box-shadow: 0 8px 32px rgba(0,0,0,0.4); }
.jst-dark .jst-ai-slash-item { color: var(--jst-text, #ccc); }
.jst-dark .jst-ai-slash-item:hover { background: var(--jst-bg-secondary, #2a2a2a); }
.jst-dark .jst-ai-voice-btn { background: var(--jst-bg-secondary, #2a2a2a); border-color: var(--jst-border, #333); color: var(--jst-text, #ccc); }
.jst-dark .jst-ai-form-label { color: var(--jst-text-secondary, #aaa); }
.jst-dark .jst-ai-form-input { background: var(--jst-bg-secondary, #2a2a2a); color: var(--jst-text, #ddd); border-color: var(--jst-border, #333); }
.jst-dark .jst-ai-radio-label { color: var(--jst-text, #ccc); }
.jst-dark .jst-ai-suggestion { background: var(--jst-bg-secondary, #2a2a2a); color: var(--jst-text, #ccc); border-color: var(--jst-border, #333); }
.jst-dark #jst-ai-panel { background: var(--jst-bg, #121212); }
.jst-dark #jst-ai-panel .jst-ai-panel-header { background: var(--jst-bg-secondary, #1e1e1e); border-bottom-color: var(--jst-border, #333); }
.jst-dark .jst-ai-send-btn { background: var(--jst-theme, #07C160); }
.jst-dark .jst-ai-send-btn:disabled { background: var(--jst-border, #333); }

@media (max-width: 480px) {
  .jst-heritage-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .jst-heritage-quick-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .jst-heritage-detail-chain {
    flex-direction: column;
    gap: 12px;
  }
  .jst-heritage-chain-arrow {
    transform: rotate(90deg);
  }
  .jst-heritage-chain-inputs {
    flex-direction: column;
  }
  .jst-heritage-chain-inputs span {
    transform: rotate(90deg);
  }
}

/* ============================================================
   十七、UI动画与微交互系统 (v51)
   - 概览卡片、成员卡片、页面过渡、按钮反馈
   - 空状态、骨架屏、加载动画
   ============================================================ */

/* ----- 通用动画关键帧 ----- */
@keyframes jstFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes jstSlideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes jstSlideDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes jstScaleIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes jstBounceIn {
  0% { opacity: 0; transform: scale(0.3); }
  50% { transform: scale(1.05); }
  70% { transform: scale(0.9); }
  100% { opacity: 1; transform: scale(1); }
}

@keyframes jstPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

@keyframes jstShimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes jstSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ----- 淡入动画类 ----- */
.jst-animate-fade-in {
  animation: jstFadeIn 0.4s ease-out forwards;
}

.jst-animate-slide-up {
  animation: jstSlideUp 0.5s ease-out forwards;
}

.jst-animate-slide-down {
  animation: jstSlideDown 0.4s ease-out forwards;
}

.jst-animate-scale-in {
  animation: jstScaleIn 0.35s ease-out forwards;
}

.jst-animate-bounce-in {
  animation: jstBounceIn 0.5s ease-out forwards;
}

/* 交错动画延迟 */
.jst-animate-delay-1 { animation-delay: 0.1s; opacity: 0; }
.jst-animate-delay-2 { animation-delay: 0.2s; opacity: 0; }
.jst-animate-delay-3 { animation-delay: 0.3s; opacity: 0; }
.jst-animate-delay-4 { animation-delay: 0.4s; opacity: 0; }
.jst-animate-delay-5 { animation-delay: 0.5s; opacity: 0; }

/* ----- 首页概览卡片 ----- */
.jst-overview-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  padding: 0 16px 16px;
  max-width: 600px;
  margin: 0 auto;
}

.jst-overview-card {
  background: var(--jst-card, #fff);
  border-radius: 14px;
  padding: 14px 8px;
  text-align: center;
  box-shadow: var(--jst-shadow, 0 2px 8px rgba(0,0,0,0.08));
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
}

.jst-overview-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--card-color, var(--jst-theme, #07C160));
  opacity: 0.7;
}

.jst-overview-card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.jst-overview-card:active {
  transform: translateY(-2px) scale(0.98);
}

.jst-overview-card-icon {
  font-size: 26px;
  margin-bottom: 6px;
  display: block;
}

.jst-overview-card-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--jst-text, #333);
  margin-bottom: 2px;
  line-height: 1.2;
}

.jst-overview-card-label {
  font-size: 12px;
  color: var(--jst-text-secondary, #666);
  font-weight: 500;
}

/* ----- 成员卡片悬停效果 ----- */
.jst-member-card {
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
}

.jst-member-card::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 5px;
  height: 5px;
  background: rgba(7,193,96,0.3);
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0);
  opacity: 0;
  transition: transform 0.5s, opacity 0.5s;
  pointer-events: none;
}

.jst-member-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

.jst-member-card:active::after {
  transform: translate(-50%, -50%) scale(40);
  opacity: 1;
  transition: transform 0.3s, opacity 0.3s;
}

.jst-member-card-avatar {
  transition: transform 0.3s ease;
}

.jst-member-card:hover .jst-member-card-avatar {
  transform: scale(1.08);
}

/* 成员卡片操作提示 */
.jst-member-card-actions {
  display: flex;
  gap: 4px;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.2s, transform 0.2s;
}

.jst-member-card:hover .jst-member-card-actions {
  opacity: 1;
  transform: translateY(0);
}

.jst-member-card-action-btn {
  width: 28px;
  height: 28px;
  border-radius: 14px;
  border: none;
  background: var(--jst-bg-secondary, #f5f5f5);
  color: var(--jst-text-secondary, #666);
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.jst-member-card-action-btn:hover {
  background: var(--jst-theme, #07C160);
  color: #fff;
  transform: scale(1.1);
}

.jst-member-card-action-btn:active {
  transform: scale(0.95);
}

/* ----- 新版族谱树竖向布局样式 ----- */
.jst-tree-wrapper { position: relative; overflow: auto; background: #f5f5f5; border-radius: 12px; min-height: 400px; transition: transform 0.2s ease; }
.jst-tree-inner { padding: 24px 16px 40px; display: flex; flex-direction: column; align-items: center; gap: 32px; transition: transform 0.2s ease; }
.jst-gen-section { display: flex; flex-direction: column; align-items: center; width: 100%; }
.jst-gen-pill { display: inline-block; padding: 6px 20px; background: #e8f5e9; color: #07C160; font-size: 14px; font-weight: 700; border-radius: 20px; margin-bottom: 20px; letter-spacing: 1px; }
.jst-gen-units { display: flex; flex-direction: column; align-items: center; gap: 24px; width: 100%; }
.jst-family-unit { display: flex; flex-direction: column; align-items: center; }
.jst-couple-row { display: flex; align-items: center; gap: 0; }
.jst-spouse-connector { display: flex; align-items: center; position: relative; width: 48px; justify-content: center; }
.jst-spouse-connector::before { content: ''; position: absolute; top: 50%; left: 0; right: 0; height: 2px; background: #07C160; }
.jst-heart-icon { position: relative; z-index: 1; font-size: 16px; background: #f5f5f5; padding: 0 4px; line-height: 1; }
.jst-parent-down-line { width: 2px; height: 28px; background: #07C160; margin: 0 auto; }
.jst-children-row { display: flex; align-items: flex-start; gap: 24px; position: relative; }
.jst-child-branch { display: flex; flex-direction: column; align-items: center; position: relative; }
.jst-child-up-line { width: 2px; height: 20px; background: #07C160; }
.jst-tree-card { display: flex; flex-direction: column; align-items: center; width: 100px; padding: 16px 10px 12px; background: #ffffff; border: 1.5px solid #f0f0f0; border-radius: 14px; cursor: pointer; transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.25s ease; box-shadow: 0 2px 10px rgba(0,0,0,0.05); position: relative; overflow: hidden; }
.jst-tree-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,0.12); border-color: #07C160; }
.jst-tree-card:active { transform: scale(0.97); }
.jst-tree-card.expanded { width: 100%; max-width: 320px; transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1); box-shadow: 0 4px 16px rgba(0,0,0,0.1); }
.jst-tree-card-avatar-wrap { position: relative; display: inline-block; margin-bottom: 8px; }
.jst-tree-card-emoji { font-size: 40px; width: 56px; height: 56px; display: flex; align-items: center; justify-content: center; background: #f9f9f9; border-radius: 50%; }
.jst-tree-card-name { font-size: 13px; font-weight: 700; color: #333; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 80px; text-align: center; }
.jst-tree-card-age { font-size: 11px; color: #999; margin-top: 2px; }
.jst-tree-card-deceased { font-size: 10px; color: #bbb; margin-top: 2px; }
.jst-tree-card .jst-card-actions { display: flex; gap: 4px; margin-top: 8px; opacity: 0; transition: opacity 0.2s; }
.jst-tree-card:hover .jst-card-actions { opacity: 1; }
.jst-tree-card .jst-card-detail { display: none; width: 100%; margin-top: 12px; padding-top: 12px; border-top: 1px solid #f0f0f0; }
.jst-tree-card.expanded .jst-card-detail { display: block; }

/* ----- 工具栏样式 ----- */
.jst-tree-toolbar { display: flex; gap: 8px; margin-bottom: 12px; }
.jst-toolbar-btn { padding: 8px 14px; background: #ffffff; border: 1px solid #e0e0e0; border-radius: 10px; cursor: pointer; font-size: 13px; transition: all 0.2s; display: flex; align-items: center; gap: 4px; box-shadow: 0 1px 4px rgba(0,0,0,0.04); }
.jst-toolbar-btn:hover { border-color: #07C160; background: #f0f9f0; }
.jst-toolbar-btn:active { transform: scale(0.97); }

/* ----- 全屏模式样式 ----- */
.jst-fullscreen-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: #f5f5f5; z-index: 9999; overflow: auto; animation: jstFullscreenIn 0.3s ease; }
@keyframes jstFullscreenIn { from { opacity: 0; } to { opacity: 1; } }
.jst-fullscreen-close { position: fixed; top: 16px; right: 16px; width: 44px; height: 44px; border-radius: 50%; border: 1px solid #ddd; background: #ffffff; font-size: 20px; cursor: pointer; z-index: 10001; box-shadow: 0 2px 8px rgba(0,0,0,0.15); display: flex; align-items: center; justify-content: center; transition: all 0.2s; }
.jst-fullscreen-close:hover { background: #fff0f0; border-color: #e74c3c; color: #e74c3c; }
.jst-fullscreen-content { width: 100%; min-height: 100vh; padding: 16px; box-sizing: border-box; }

/* ----- 下载菜单样式 ----- */
.jst-download-menu { position: fixed; background: #ffffff; border: 1px solid #e0e0e0; border-radius: 12px; padding: 6px; box-shadow: 0 8px 24px rgba(0,0,0,0.12); z-index: 10000; min-width: 200px; animation: jstMenuFadeIn 0.2s ease; }
@keyframes jstMenuFadeIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
.jst-download-item { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 8px; cursor: pointer; transition: background 0.15s; font-size: 14px; color: #333; }
.jst-download-item:hover { background: #f0f9f0; }
.jst-download-item:active { background: #e0f0e0; }
.jst-download-icon { font-size: 18px; flex-shrink: 0; }
.jst-download-text { font-size: 13px; }

/* ----- AI浮窗全屏模式可见性 ----- */
#jst-ai-fab { z-index: 10002 !important; }

/* ----- 按钮微交互 ----- */
.jst-btn-primary,
.jst-btn-secondary,
.jst-share-btn,
.jst-theme-toggle {
  position: relative;
  overflow: hidden;
}

.jst-btn-primary::after,
.jst-btn-secondary::after,
.jst-share-btn::after,
.jst-theme-toggle::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 5px;
  height: 5px;
  background: rgba(255,255,255,0.4);
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0);
  opacity: 0;
  transition: transform 0.4s, opacity 0.4s;
  pointer-events: none;
}

.jst-btn-primary:active::after,
.jst-btn-secondary:active::after,
.jst-share-btn:active::after,
.jst-theme-toggle:active::after {
  transform: translate(-50%, -50%) scale(30);
  opacity: 1;
  transition: transform 0.2s, opacity 0.2s;
}

/* 按钮点击缩放 */
.jst-btn-click-scale {
  transition: transform 0.15s ease;
}

.jst-btn-click-scale:active {
  transform: scale(0.95);
}

/* ----- 页面切换过渡动画 ----- */
.jst-page-transition-enter {
  animation: jstSlideUp 0.35s ease-out forwards;
}

.jst-page-transition-exit {
  animation: jstFadeIn 0.2s ease-out reverse forwards;
}

/* 内容区域滑入 */
.jst-content-slide-in {
  animation: jstSlideUp 0.4s ease-out forwards;
}

/* ----- 空状态增强 ----- */
.jst-empty-state-v2 {
  animation: jstFadeIn 0.5s ease-out;
}

.jst-empty-state-v2-icon {
  animation: jstBounceIn 0.6s ease-out 0.1s both;
}

.jst-empty-state-v2-title {
  animation: jstSlideUp 0.4s ease-out 0.2s both;
}

.jst-empty-state-v2-desc {
  animation: jstSlideUp 0.4s ease-out 0.3s both;
}

.jst-empty-state-v2-btn {
  animation: jstScaleIn 0.35s ease-out 0.4s both;
  transition: transform 0.2s, box-shadow 0.2s;
}

.jst-empty-state-v2-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(7,193,96,0.3);
}

/* ----- 骨架屏增强 ----- */
.jst-skeleton-item {
  background: linear-gradient(90deg, var(--jst-border) 25%, var(--jst-bg-secondary) 50%, var(--jst-border) 75%);
  background-size: 200% 100%;
  animation: jstShimmer 1.5s ease-in-out infinite;
}

/* ----- 列表项滑入动画 ----- */
.jst-list-item-animate {
  animation: jstSlideUp 0.35s ease-out forwards;
  opacity: 0;
}

.jst-list-item-animate:nth-child(1) { animation-delay: 0.05s; }
.jst-list-item-animate:nth-child(2) { animation-delay: 0.1s; }
.jst-list-item-animate:nth-child(3) { animation-delay: 0.15s; }
.jst-list-item-animate:nth-child(4) { animation-delay: 0.2s; }
.jst-list-item-animate:nth-child(5) { animation-delay: 0.25s; }
.jst-list-item-animate:nth-child(6) { animation-delay: 0.3s; }
.jst-list-item-animate:nth-child(7) { animation-delay: 0.35s; }
.jst-list-item-animate:nth-child(8) { animation-delay: 0.4s; }

/* ----- 加载旋转器 ----- */
.jst-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--jst-border, #e5e5e5);
  border-top-color: var(--jst-theme, #07C160);
  border-radius: 50%;
  animation: jstSpin 0.8s linear infinite;
}

.jst-spinner-sm {
  width: 14px;
  height: 14px;
  border-width: 1.5px;
}

.jst-spinner-lg {
  width: 32px;
  height: 32px;
  border-width: 3px;
}

/* ----- 徽章/标签动画 ----- */
.jst-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: #ff5252;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  animation: jstScaleIn 0.3s ease-out;
}

.jst-badge-pulse {
  animation: jstPulse 2s ease-in-out infinite;
}

/* ----- Toast通知动画 ----- */
.jst-toast-enter {
  animation: jstSlideDown 0.3s ease-out forwards;
}

.jst-toast-exit {
  animation: jstSlideUp 0.2s ease-out reverse forwards;
}

/* ----- 图片加载占位 ----- */
.jst-img-placeholder {
  background: linear-gradient(90deg, var(--jst-bg-secondary) 25%, var(--jst-border) 50%, var(--jst-bg-secondary) 75%);
  background-size: 200% 100%;
  animation: jstShimmer 1.5s ease-in-out infinite;
  border-radius: 8px;
}

/* ----- 搜索框焦点动画 ----- */
.jst-search-input {
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.jst-search-input:focus {
  transform: scale(1.01);
  box-shadow: 0 0 0 3px rgba(7,193,96,0.15);
}

/* ----- 卡片通用悬停 ----- */
.jst-card-hover {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.jst-card-hover:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.1);
}

/* ----- Tab栏图标动画 ----- */
.jst-tab-item .jst-tab-icon {
  transition: transform 0.2s ease;
}

.jst-tab-item.active .jst-tab-icon {
  transform: scale(1.1);
}

.jst-tab-item:active .jst-tab-icon {
  transform: scale(0.9);
}

/* ----- 进度条动画 ----- */
.jst-progress-bar {
  height: 4px;
  background: var(--jst-bg-secondary, #f5f5f5);
  border-radius: 2px;
  overflow: hidden;
}

.jst-progress-bar-fill {
  height: 100%;
  background: var(--jst-theme, #07C160);
  border-radius: 2px;
  transition: width 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ----- 浮动操作按钮 ----- */
.jst-fab {
  position: fixed;
  right: 20px;
  bottom: 90px;
  width: 56px;
  height: 56px;
  border-radius: 28px;
  background: var(--jst-theme, #07C160);
  color: #fff;
  border: none;
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(7,193,96,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s, box-shadow 0.2s;
  z-index: 100;
}

.jst-fab:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 24px rgba(7,193,96,0.5);
}

.jst-fab:active {
  transform: scale(0.95);
}

/* ----- 深色模式适配 ----- */
.jst-dark .jst-overview-card {
  background: var(--jst-card, #2d2d2d);
  box-shadow: var(--jst-shadow, 0 2px 8px rgba(0,0,0,0.3));
}

.jst-dark .jst-overview-card:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

.jst-dark .jst-member-card-action-btn {
  background: var(--jst-bg-secondary, #333);
  color: var(--jst-text-secondary, #999);
}

.jst-dark .jst-member-card-action-btn:hover {
  background: var(--jst-theme, #07C160);
  color: #fff;
}

.jst-dark .jst-spinner {
  border-color: var(--jst-border, #3d3d3d);
  border-top-color: var(--jst-theme, #07C160);
}

.jst-dark .jst-img-placeholder {
  background: linear-gradient(90deg, var(--jst-bg-secondary) 25%, var(--jst-border) 50%, var(--jst-bg-secondary) 75%);
}

/* ----- 响应式 ----- */
@media (max-width: 480px) {
  .jst-overview-cards {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    padding: 0 12px 12px;
  }
  .jst-overview-card {
    padding: 12px 6px;
  }
  .jst-overview-card-icon {
    font-size: 22px;
  }
  .jst-overview-card-value {
    font-size: 18px;
  }
}

@media (min-width: 768px) {
  .jst-overview-cards {
    max-width: 720px;
  }
}

@media (min-width: 1024px) {
  .jst-overview-cards {
    max-width: 900px;
  }
}

/* 按钮点击反馈微交互 */
.jst-btn,
.jst-sub-tab,
.jst-tab-item {
  transition: transform 0.1s ease, box-shadow 0.1s ease, opacity 0.15s;
}
.jst-btn:active,
.jst-sub-tab:active,
.jst-tab-item:active {
  transform: scale(0.96);
}

/* 空状态页面动画 */
.jst-empty-state {
  animation: jstFadeIn 0.5s ease-out;
}

/* 响应式优化：小屏幕适配 */
@media (max-width: 640px) {
  .jst-couple-row {
    flex-direction: column;
    align-items: center;
  }
  .jst-spouse-connector {
    transform: rotate(90deg);
    margin: 4px 0;
  }
  .jst-tree-card {
    width: 140px;
    min-width: 140px;
  }
}

/* ===== 自定义弹窗 ===== */
.jst-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
  opacity: 1;
  transition: opacity 0.2s ease;
}
.jst-modal-overlay.show {
  opacity: 1;
}
.jst-modal-box {
  background: var(--jst-card, #fff);
  border-radius: 14px;
  width: 100%;
  max-width: 320px;
  padding: 24px 20px 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
  transform: scale(0.92);
  transition: transform 0.2s ease;
}
.jst-modal-overlay.show .jst-modal-box {
  transform: scale(1);
}
.jst-modal-title {
  font-size: 17px;
  font-weight: 600;
  text-align: center;
  margin-bottom: 12px;
  color: var(--jst-text, #333);
}
.jst-modal-body {
  font-size: 14px;
  color: var(--jst-text-secondary, #666);
  text-align: center;
  margin-bottom: 20px;
  line-height: 1.6;
}
.jst-modal-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--jst-border, #e5e5e5);
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 16px;
  background: var(--jst-bg, #f9f9f9);
  color: var(--jst-text, #333);
  outline: none;
}
.jst-modal-input:focus {
  border-color: var(--jst-primary, #07C160);
}
.jst-modal-btns {
  display: flex;
  gap: 8px;
  justify-content: center;
}
.jst-modal-btn {
  flex: 1;
  padding: 10px 0;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: background 0.15s;
}
.jst-modal-btn.cancel {
  background: var(--jst-bg-secondary, #f5f5f5);
  color: var(--jst-text, #333);
}
.jst-modal-btn.cancel:hover {
  background: var(--jst-border, #e5e5e5);
}
.jst-modal-btn.confirm {
  background: var(--jst-primary, #07C160);
  color: #fff;
}
.jst-modal-btn.confirm:hover {
  background: var(--jst-primary-dark, #06ad56);
}
.jst-modal-btn.danger {
  background: var(--jst-danger, #f44336);
  color: #fff;
}
.jst-modal-btn.danger:hover {
  background: #d32f2f;
}

/* ============================================================
   全局动画优化
   ============================================================ */

/* 列表项进场动画 */
@keyframes jstFadeSlideUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.jst-list-item {
  animation: jstFadeSlideUp 0.25s ease both;
}
.jst-list-item:nth-child(1) { animation-delay: 0s; }
.jst-list-item:nth-child(2) { animation-delay: 0.02s; }
.jst-list-item:nth-child(3) { animation-delay: 0.04s; }
.jst-list-item:nth-child(4) { animation-delay: 0.06s; }
.jst-list-item:nth-child(5) { animation-delay: 0.08s; }
.jst-list-item:nth-child(n+6) { animation-delay: 0.10s; }

/* 底部Tab指示器 */
.jst-tab-bar::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--jst-primary, #07C160);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

/* 按钮点击效果 */
.jst-ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  transform: scale(0);
  animation: jstRipple 0.4s ease-out;
  pointer-events: none;
}
@keyframes jstRipple {
  to { transform: scale(2.5); opacity: 0; }
}

/* 搜索框聚焦 */
.jst-search-input {
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}
.jst-search-input:focus {
  box-shadow: 0 0 0 3px rgba(7,193,96,0.15);
  border-color: var(--jst-primary, #07C160);
}

/* Toast弹入弹出优化 */
.jst-global-toast-inner {
  transition: opacity 0.3s ease, transform 0.3s ease;
  transform: translateY(-20px);
}
.jst-global-toast-inner.show {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   十八、暗色模式全面适配（新增组件）
   - 聊天相关、我的页面、协作平台、通用组件
   - 骨架屏、滚动条、选中高亮、transition过渡
   ============================================================ */

/* ----- 暗色模式骨架屏 ----- */
.jst-dark .jst-skeleton-item {
  background: linear-gradient(90deg, #2a2a4a 25%, #1e1e3a 50%, #2a2a4a 75%);
  background-size: 200% 100%;
  animation: jstShimmer 1.5s ease-in-out infinite;
}

.jst-dark .jst-img-placeholder {
  background: linear-gradient(90deg, #2a2a4a 25%, #1e1e3a 50%, #2a2a4a 75%);
  background-size: 200% 100%;
  animation: jstShimmer 1.5s ease-in-out infinite;
}

/* ----- 暗色模式滚动条 ----- */
.jst-dark ::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.jst-dark ::-webkit-scrollbar-track {
  background: #1a1a2e;
}

.jst-dark ::-webkit-scrollbar-thumb {
  background: #3a3a5a;
  border-radius: 3px;
}

.jst-dark ::-webkit-scrollbar-thumb:hover {
  background: #4a4a6a;
}

/* ----- 暗色模式选中/高亮 ----- */
.jst-dark ::selection {
  background: rgba(124,131,255,0.3);
  color: #fff;
}

.jst-dark ::-moz-selection {
  background: rgba(124,131,255,0.3);
  color: #fff;
}

/* ----- 聊天相关组件暗色适配 ----- */
.jst-dark .jst-chat-input-wrap {
  background: var(--jst-bg-secondary, #0f3460);
  border-top-color: var(--jst-border, #2a2a4a);
}

.jst-dark .jst-chat-input-wrap input,
.jst-dark .jst-chat-input-wrap textarea {
  background: var(--jst-input-bg, #1e2d4a);
  color: var(--jst-text, #e0e0e0);
  border-color: var(--jst-border, #2a2a4a);
}

.jst-dark .jst-chat-input-wrap input::placeholder,
.jst-dark .jst-chat-input-wrap textarea::placeholder {
  color: var(--jst-text-tertiary, #707070);
}

.jst-dark .jst-quick-reply-bar {
  background: var(--jst-bg-secondary, #0f3460);
  border-top-color: var(--jst-border, #2a2a4a);
}

.jst-dark .jst-quick-reply-bar .jst-quick-reply-item {
  background: var(--jst-card, #16213e);
  color: var(--jst-text, #e0e0e0);
  border-color: var(--jst-border, #2a2a4a);
}

.jst-dark .jst-quick-reply-bar .jst-quick-reply-item:hover {
  background: var(--jst-card-hover, #1a2744);
  border-color: var(--jst-primary, #7c83ff);
  color: var(--jst-primary, #7c83ff);
}

.jst-dark .jst-msg-bubble {
  color: var(--jst-text, #e0e0e0);
}

.jst-dark .jst-msg-bubble.user {
  background: var(--jst-theme, #07C160);
  color: #fff;
}

/* 消息已读/送达状态样式 */
.jst-msg-read-status {
  font-size: 11px;
  margin-left: 4px;
  vertical-align: middle;
}
.jst-msg-read-status.unread {
  color: #999;
}
.jst-msg-read-status.delivered {
  color: #999;
}
.jst-msg-read-status.read {
  color: #07C160;
}
.jst-msg-read-status.sending {
  color: #999;
  animation: jst-pulse-send 1s ease-in-out infinite;
}
@keyframes jst-pulse-send {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}
.jst-read-count {
  font-size: 11px;
  color: #07C160;
  margin-left: 4px;
}
/* 消息时间 */
.jst-msg-time {
  font-size: 11px;
  color: #999;
  margin-top: 3px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.jst-dark .jst-msg-bubble.other {
  background: var(--jst-card, #16213e);
  color: var(--jst-text, #e0e0e0);
}

.jst-dark .jst-chat-list-item {
  background: var(--jst-card, #16213e);
  border-bottom-color: var(--jst-border, #2a2a4a);
}

.jst-dark .jst-chat-list-item:hover,
.jst-dark .jst-chat-list-item:active {
  background: var(--jst-card-hover, #1a2744);
}

/* ----- 我的页面相关组件暗色适配 ----- */
.jst-dark .jst-profile-user-card {
  background: linear-gradient(135deg, #1a2744 0%, #16213e 50%, #0f3460 100%);
  color: var(--jst-text, #e0e0e0);
}

.jst-dark .jst-profile-user-card .jst-profile-name {
  color: var(--jst-text, #e0e0e0);
}

.jst-dark .jst-profile-user-card .jst-profile-desc {
  color: var(--jst-text-secondary, #a0a0a0);
}

.jst-dark .jst-quick-grid {
  background: var(--jst-card, #16213e);
}

.jst-dark .jst-quick-grid-item {
  background: transparent;
  color: var(--jst-text, #e0e0e0);
}

.jst-dark .jst-quick-grid-item:hover {
  background: var(--jst-card-hover, #1a2744);
}

.jst-dark .jst-quick-grid-item .jst-grid-icon {
  color: var(--jst-primary, #7c83ff);
}

.jst-dark .jst-data-panel {
  background: var(--jst-card, #16213e);
  box-shadow: var(--jst-shadow);
}

.jst-dark .jst-data-panel .jst-data-value {
  color: var(--jst-text, #e0e0e0);
}

.jst-dark .jst-data-panel .jst-data-label {
  color: var(--jst-text-secondary, #a0a0a0);
}

.jst-dark .jst-profile-menu-item {
  background: var(--jst-card, #16213e);
  border-bottom-color: var(--jst-border, #2a2a4a);
  color: var(--jst-text, #e0e0e0);
}

.jst-dark .jst-profile-menu-item:hover,
.jst-dark .jst-profile-menu-item:active {
  background: var(--jst-card-hover, #1a2744);
}

.jst-dark .jst-profile-menu-item .jst-menu-icon {
  color: var(--jst-text-secondary, #a0a0a0);
}

.jst-dark .jst-profile-menu-item .jst-menu-arrow {
  color: var(--jst-text-tertiary, #707070);
}

.jst-dark .jst-badge-panel {
  background: var(--jst-card, #16213e);
  box-shadow: var(--jst-shadow);
}

.jst-dark .jst-badge-panel .jst-badge-title {
  color: var(--jst-text, #e0e0e0);
}

.jst-dark .jst-badge-panel .jst-badge-desc {
  color: var(--jst-text-secondary, #a0a0a0);
}

/* ----- 协作平台相关组件暗色适配 ----- */
.jst-dark .jst-phase-card {
  background: var(--jst-card, #16213e);
  border-color: var(--jst-border, #2a2a4a);
  box-shadow: var(--jst-shadow);
}

.jst-dark .jst-phase-card:hover {
  background: var(--jst-card-hover, #1a2744);
}

.jst-dark .jst-phase-card .jst-phase-title {
  color: var(--jst-text, #e0e0e0);
}

.jst-dark .jst-phase-card .jst-phase-desc {
  color: var(--jst-text-secondary, #a0a0a0);
}

.jst-dark .jst-task-row {
  background: var(--jst-card, #16213e);
  border-bottom-color: var(--jst-border, #2a2a4a);
  color: var(--jst-text, #e0e0e0);
}

.jst-dark .jst-task-row:hover,
.jst-dark .jst-task-row:active {
  background: var(--jst-card-hover, #1a2744);
}

.jst-dark .jst-task-row .jst-task-name {
  color: var(--jst-text, #e0e0e0);
}

.jst-dark .jst-task-row .jst-task-meta {
  color: var(--jst-text-secondary, #a0a0a0);
}

.jst-dark .jst-drag-handle {
  color: var(--jst-text-tertiary, #707070);
  cursor: grab;
}

.jst-dark .jst-drag-handle:hover {
  color: var(--jst-primary, #7c83ff);
}

.jst-dark .jst-drag-handle:active {
  cursor: grabbing;
}

/* ----- 通用弹窗暗色适配 ----- */
.jst-dark .jst-modal-overlay {
  background: rgba(0,0,0,0.7);
}

.jst-dark .jst-modal-box {
  background: var(--jst-card, #16213e);
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}

.jst-dark .jst-modal-title {
  color: var(--jst-text, #e0e0e0);
}

.jst-dark .jst-modal-body {
  color: var(--jst-text-secondary, #a0a0a0);
}

.jst-dark .jst-modal-input {
  background: var(--jst-input-bg, #1e2d4a);
  color: var(--jst-text, #e0e0e0);
  border-color: var(--jst-border, #2a2a4a);
}

.jst-dark .jst-modal-input::placeholder {
  color: var(--jst-text-tertiary, #707070);
}

.jst-dark .jst-modal-input:focus {
  border-color: var(--jst-primary, #7c83ff);
  box-shadow: 0 0 0 3px var(--jst-primary-light, rgba(124,131,255,0.15));
}

.jst-dark .jst-modal-btn.cancel {
  background: var(--jst-bg-secondary, #0f3460);
  color: var(--jst-text-secondary, #a0a0a0);
}

.jst-dark .jst-modal-btn.cancel:hover {
  background: var(--jst-card-hover, #1a2744);
}

.jst-dark .jst-modal-btn.confirm {
  background: var(--jst-primary, #7c83ff);
  color: #fff;
}

.jst-dark .jst-modal-btn.confirm:hover {
  background: var(--jst-primary-dark, #5a62e0);
}

.jst-dark .jst-modal-btn.danger {
  background: var(--jst-danger, #ff6b6b);
  color: #fff;
}

.jst-dark .jst-modal-btn.danger:hover {
  background: #e05555;
}

/* ----- 弹窗面板（家族事务）暗色适配 ----- */
.jst-dark .jst-modal-panel {
  background: var(--jst-card, #16213e);
}

.jst-dark .jst-modal-input,
.jst-dark .jst-modal-textarea,
.jst-dark .jst-modal-select {
  background: var(--jst-input-bg, #1e2d4a);
  color: var(--jst-text, #e0e0e0);
  border-color: var(--jst-border, #2a2a4a);
}

.jst-dark .jst-modal-input::placeholder,
.jst-dark .jst-modal-textarea::placeholder {
  color: var(--jst-text-tertiary, #707070);
}

/* ----- Toast暗色适配 ----- */
.jst-dark .jst-toast {
  background: var(--jst-card, #16213e);
  color: var(--jst-text, #e0e0e0);
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
  border: 1px solid var(--jst-border, #2a2a4a);
}

/* ----- 表格暗色适配 ----- */
.jst-dark .jst-table,
.jst-dark table.jst-table {
  background: var(--jst-card, #16213e);
  border-color: var(--jst-border, #2a2a4a);
}

.jst-dark .jst-table th,
.jst-dark table.jst-table th {
  background: var(--jst-bg-secondary, #0f3460);
  color: var(--jst-text, #e0e0e0);
  border-bottom-color: var(--jst-border, #2a2a4a);
}

.jst-dark .jst-table td,
.jst-dark table.jst-table td {
  color: var(--jst-text-secondary, #a0a0a0);
  border-bottom-color: var(--jst-border, #2a2a4a);
}

.jst-dark .jst-table tr:hover td,
.jst-dark table.jst-table tr:hover td {
  background: var(--jst-card-hover, #1a2744);
}

/* ----- 输入框通用暗色适配 ----- */
.jst-dark .jst-input,
.jst-dark input.jst-input,
.jst-dark textarea.jst-input,
.jst-dark select.jst-input {
  background: var(--jst-input-bg, #1e2d4a);
  color: var(--jst-text, #e0e0e0);
  border-color: var(--jst-border, #2a2a4a);
}

.jst-dark .jst-input:focus,
.jst-dark input.jst-input:focus,
.jst-dark textarea.jst-input:focus,
.jst-dark select.jst-input:focus {
  border-color: var(--jst-primary, #7c83ff);
  box-shadow: 0 0 0 3px var(--jst-primary-light, rgba(124,131,255,0.15));
}

.jst-dark .jst-input::placeholder,
.jst-dark input.jst-input::placeholder,
.jst-dark textarea.jst-input::placeholder {
  color: var(--jst-text-tertiary, #707070);
}

/* ----- 按钮暗色适配 ----- */
.jst-dark .jst-btn-primary {
  background: var(--jst-primary, #7c83ff);
  color: #fff;
}

.jst-dark .jst-btn-primary:hover {
  background: var(--jst-primary-dark, #5a62e0);
}

.jst-dark .jst-btn-secondary {
  background: var(--jst-bg-secondary, #0f3460);
  color: var(--jst-text, #e0e0e0);
  border-color: var(--jst-border, #2a2a4a);
}

.jst-dark .jst-btn-secondary:hover {
  background: var(--jst-card-hover, #1a2744);
}

/* ----- 族谱树组件暗色适配 ----- */
.jst-dark .jst-tree-wrapper {
  background: var(--jst-bg, #1a1a2e);
}

.jst-dark .jst-tree-card {
  background: var(--jst-card, #16213e);
  border-color: var(--jst-border, #2a2a4a);
}

.jst-dark .jst-tree-card:hover {
  border-color: var(--jst-primary, #7c83ff);
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

.jst-dark .jst-tree-card .jst-card-detail {
  border-top-color: var(--jst-border, #2a2a4a);
}

.jst-dark .jst-tree-card-name {
  color: var(--jst-text, #e0e0e0);
}

.jst-dark .jst-tree-card-age {
  color: var(--jst-text-secondary, #a0a0a0);
}

.jst-dark .jst-tree-card-deceased {
  color: var(--jst-text-tertiary, #707070);
}

.jst-dark .jst-tree-card-emoji {
  background: var(--jst-bg-secondary, #0f3460);
}

.jst-dark .jst-gen-pill {
  background: rgba(124,131,255,0.15);
  color: var(--jst-primary, #7c83ff);
}

.jst-dark .jst-heart-icon {
  background: var(--jst-bg, #1a1a2e);
}

.jst-dark .jst-spouse-connector::before {
  background: var(--jst-primary, #7c83ff);
}

.jst-dark .jst-parent-down-line,
.jst-dark .jst-child-up-line {
  background: var(--jst-primary, #7c83ff);
}

/* ----- 工具栏暗色适配 ----- */
.jst-dark .jst-toolbar-btn {
  background: var(--jst-card, #16213e);
  border-color: var(--jst-border, #2a2a4a);
  color: var(--jst-text, #e0e0e0);
}

.jst-dark .jst-toolbar-btn:hover {
  border-color: var(--jst-primary, #7c83ff);
  background: var(--jst-card-hover, #1a2744);
}

/* ----- 下载菜单暗色适配 ----- */
.jst-dark .jst-download-menu {
  background: var(--jst-card, #16213e);
  border-color: var(--jst-border, #2a2a4a);
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

.jst-dark .jst-download-item {
  color: var(--jst-text, #e0e0e0);
}

.jst-dark .jst-download-item:hover {
  background: var(--jst-card-hover, #1a2744);
}

.jst-dark .jst-download-item:active {
  background: var(--jst-bg-secondary, #0f3460);
}

/* ----- 全屏模式暗色适配 ----- */
.jst-dark .jst-fullscreen-overlay {
  background: var(--jst-bg, #1a1a2e);
}

.jst-dark .jst-fullscreen-close {
  background: var(--jst-card, #16213e);
  border-color: var(--jst-border, #2a2a4a);
  color: var(--jst-text, #e0e0e0);
}

.jst-dark .jst-fullscreen-close:hover {
  background: var(--jst-danger, #ff6b6b);
  border-color: var(--jst-danger, #ff6b6b);
  color: #fff;
}

/* ----- AI弹窗表单暗色适配补充 ----- */
.jst-dark .jst-ai-popup {
  background: var(--jst-card, #16213e);
}

.jst-dark .jst-ai-popup-header {
  background: var(--jst-bg-secondary, #0f3460);
  border-bottom-color: var(--jst-border, #2a2a4a);
}

.jst-dark .jst-ai-popup-title {
  color: var(--jst-text, #e0e0e0);
}

.jst-dark .jst-ai-popup-close {
  background: var(--jst-bg-secondary, #0f3460);
  color: var(--jst-text-secondary, #a0a0a0);
}

.jst-dark .jst-ai-popup-close:hover {
  background: var(--jst-card-hover, #1a2744);
}

.jst-dark .jst-ai-popup-footer {
  border-top-color: var(--jst-border, #2a2a4a);
}

.jst-dark .jst-ai-popup-cancel {
  background: var(--jst-bg-secondary, #0f3460);
  color: var(--jst-text-secondary, #a0a0a0);
}

.jst-dark .jst-ai-popup-cancel:hover {
  background: var(--jst-card-hover, #1a2744);
}

.jst-dark .jst-ai-guide-cancel-btn {
  background: var(--jst-bg-secondary, #0f3460);
  color: var(--jst-text-secondary, #a0a0a0);
  border-color: var(--jst-border, #2a2a4a);
}

.jst-dark .jst-ai-guide-cancel-btn:hover {
  background: var(--jst-card-hover, #1a2744);
  border-color: var(--jst-text-tertiary, #707070);
}

.jst-dark .jst-ai-guide-modify-btn {
  background: var(--jst-primary-light, rgba(124,131,255,0.15));
  color: var(--jst-primary, #7c83ff);
  border-color: var(--jst-primary, #7c83ff);
}

.jst-dark .jst-ai-guide-modify-btn:hover {
  background: rgba(124,131,255,0.25);
}

.jst-dark .jst-ai-inline-btn {
  background: var(--jst-primary-light, rgba(124,131,255,0.15));
  color: var(--jst-primary, #7c83ff);
  border-color: rgba(124,131,255,0.3);
}

.jst-dark .jst-ai-inline-btn:hover {
  background: rgba(124,131,255,0.25);
  border-color: var(--jst-primary, #7c83ff);
}

.jst-dark .jst-ai-quick-btn {
  background: var(--jst-primary-light, rgba(124,131,255,0.15));
  color: var(--jst-primary, #7c83ff);
  border-color: rgba(124,131,255,0.3);
}

.jst-dark .jst-ai-quick-btn:hover {
  background: rgba(124,131,255,0.25);
  border-color: var(--jst-primary, #7c83ff);
}

.jst-dark .jst-ai-slash-menu {
  background: var(--jst-card, #16213e);
  border-color: var(--jst-border, #2a2a4a);
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}

.jst-dark .jst-ai-slash-item {
  color: var(--jst-text, #e0e0e0);
}

.jst-dark .jst-ai-slash-item:hover {
  background: var(--jst-card-hover, #1a2744);
}

.jst-dark .jst-ai-slash-item .cmd {
  color: var(--jst-primary, #7c83ff);
}

.jst-dark .jst-ai-slash-item .desc {
  color: var(--jst-text-tertiary, #707070);
}

/* ----- AI语音按钮暗色适配 ----- */
.jst-dark .jst-ai-voice-btn {
  background: var(--jst-bg-secondary, #0f3460);
  border-color: var(--jst-border, #2a2a4a);
  color: var(--jst-text-secondary, #a0a0a0);
}

.jst-dark .jst-ai-voice-btn:hover {
  background: var(--jst-card-hover, #1a2744);
  border-color: var(--jst-primary, #7c83ff);
}

.jst-dark .jst-ai-voice-btn.recording {
  background: var(--jst-danger, #ff6b6b);
  border-color: var(--jst-danger, #ff6b6b);
  color: #fff;
}

/* ============================================================
   表单验证样式
   ============================================================ */
.jst-input-error {
  border-color: #ff4d4f !important;
  background-color: #fff2f0 !important;
  box-shadow: 0 0 0 2px rgba(255, 77, 79, 0.15) !important;
}
.jst-input-error:focus {
  border-color: #ff4d4f !important;
  box-shadow: 0 0 0 3px rgba(255, 77, 79, 0.2) !important;
}
.jst-input-valid {
  border-color: #07C160 !important;
  background-color: #f6ffed !important;
}
.jst-input-valid:focus {
  border-color: #07C160 !important;
  box-shadow: 0 0 0 3px rgba(7, 193, 96, 0.15) !important;
}
.jst-input-error-msg {
  color: #ff4d4f;
  font-size: 12px;
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
  animation: jstShake 0.3s ease;
}
.jst-input-error-msg::before {
  content: '⚠️';
}
@keyframes jstShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-4px); }
  40% { transform: translateX(4px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

/* 表单验证深色模式适配 */
.jst-dark .jst-input-error {
  border-color: #ff6b6b !important;
  background-color: rgba(255, 77, 79, 0.1) !important;
  box-shadow: 0 0 0 2px rgba(255, 77, 79, 0.2) !important;
}
.jst-dark .jst-input-valid {
  border-color: #07C160 !important;
  background-color: rgba(7, 193, 96, 0.1) !important;
}

/* ----- 折叠面板暗色适配 ----- */
.jst-dark .jst-more-section {
  background: var(--jst-card, #16213e);
  box-shadow: var(--jst-shadow);
}

.jst-dark .jst-more-header:active {
  background: var(--jst-card-hover, #1a2744);
}

.jst-dark .jst-more-title {
  color: var(--jst-text, #e0e0e0);
}

.jst-dark .jst-more-arrow {
  color: var(--jst-text-tertiary, #707070);
}

/* ----- 分享/主题切换按钮暗色适配 ----- */
.jst-dark .jst-share-btn {
  background: var(--jst-primary-light, rgba(124,131,255,0.15));
  color: var(--jst-primary, #7c83ff);
  border-color: var(--jst-primary, #7c83ff);
}

.jst-dark .jst-theme-toggle {
  background: var(--jst-bg-secondary, #0f3460);
  color: var(--jst-text-secondary, #a0a0a0);
  border-color: var(--jst-border, #2a2a4a);
}

/* ----- 搜索框暗色适配 ----- */
.jst-dark .jst-search-input,
.jst-dark input.jst-search-input {
  background: var(--jst-input-bg, #1e2d4a);
  color: var(--jst-text, #e0e0e0);
  border-color: var(--jst-border, #2a2a4a);
}

.jst-dark .jst-search-input::placeholder,
.jst-dark input.jst-search-input::placeholder {
  color: var(--jst-text-tertiary, #707070);
}

.jst-dark .jst-search-input:focus,
.jst-dark input.jst-search-input:focus {
  border-color: var(--jst-primary, #7c83ff);
  box-shadow: 0 0 0 3px var(--jst-primary-light, rgba(124,131,255,0.15));
}

/* ----- 任务卡片暗色适配 ----- */
.jst-dark .jst-task-card {
  background: var(--jst-card, #16213e);
  box-shadow: var(--jst-shadow);
}

.jst-dark .jst-task-card:active {
  box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

.jst-dark .jst-task-card-name {
  color: var(--jst-text, #e0e0e0);
}

.jst-dark .jst-task-card-desc {
  color: var(--jst-text-secondary, #a0a0a0);
}

.jst-dark .jst-task-card-meta {
  color: var(--jst-text-tertiary, #707070);
}

/* ----- 联系人卡片暗色适配 ----- */
.jst-dark .jst-contact-card {
  background: var(--jst-card, #16213e);
  box-shadow: var(--jst-shadow);
}

.jst-dark .jst-contact-name {
  color: var(--jst-text, #e0e0e0);
}

.jst-dark .jst-contact-note {
  color: var(--jst-text-tertiary, #707070);
}

.jst-dark .jst-contact-group-title {
  color: var(--jst-text-secondary, #a0a0a0);
}

/* ----- 概览卡片暗色适配补充 ----- */
.jst-dark .jst-overview-card-value {
  color: var(--jst-text, #e0e0e0);
}

.jst-dark .jst-overview-card-label {
  color: var(--jst-text-secondary, #a0a0a0);
}

/* ----- 传承页面弹窗暗色适配 ----- */
.jst-dark .jst-heritage-modal-overlay {
  background: rgba(0,0,0,0.7);
}

.jst-dark .jst-heritage-modal {
  background: var(--jst-card, #16213e);
}

.jst-dark .jst-heritage-modal-header {
  border-bottom-color: var(--jst-border, #2a2a4a);
}

.jst-dark .jst-heritage-modal-header h3 {
  color: var(--jst-text, #e0e0e0);
}

.jst-dark .jst-heritage-modal-close {
  background: var(--jst-bg-secondary, #0f3460);
  color: var(--jst-text-secondary, #a0a0a0);
}

.jst-dark .jst-heritage-modal-close:hover {
  background: var(--jst-card-hover, #1a2744);
}

.jst-dark .jst-heritage-modal-footer {
  border-top-color: var(--jst-border, #2a2a4a);
}

.jst-dark .jst-heritage-input,
.jst-dark .jst-heritage-textarea,
.jst-dark .jst-heritage-select {
  background: var(--jst-input-bg, #1e2d4a);
  color: var(--jst-text, #e0e0e0);
  border-color: var(--jst-border, #2a2a4a);
}

.jst-dark .jst-heritage-input::placeholder,
.jst-dark .jst-heritage-textarea::placeholder {
  color: var(--jst-text-tertiary, #707070);
}

.jst-dark .jst-heritage-form-group label {
  color: var(--jst-text-secondary, #a0a0a0);
}

.jst-dark .jst-heritage-type-option {
  background: var(--jst-bg-secondary, #0f3460);
  color: var(--jst-text, #e0e0e0);
}

.jst-dark .jst-heritage-type-option:has(input:checked) {
  background: var(--jst-primary-light, rgba(124,131,255,0.15));
  border-color: var(--jst-primary, #7c83ff);
}

/* ----- 传承页面底部导航暗色适配 ----- */
.jst-dark .jst-heritage-bottom-nav {
  background: var(--jst-card, #16213e);
  border-top-color: var(--jst-border, #2a2a4a);
}

.jst-dark .jst-heritage-nav-label {
  color: var(--jst-text-tertiary, #707070);
}

.jst-dark .jst-heritage-nav-item.active .jst-heritage-nav-label {
  color: var(--jst-theme, #07C160);
}

/* ============================================================
   十九、暗色模式transition过渡
   - 确保主题切换时颜色变化平滑
   ============================================================ */

/* 容器和页面级别 */
#jst-page-container,
#jst-genealogy-container,
#jst-chats-container,
#jst-services-container,
#jst-heritage-container,
#jst-profile-container,
#jst-page-content {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* 卡片类组件 */
.jst-card,
.jst-task-card,
.jst-contact-card,
.jst-funeral-template-card,
.jst-overview-card,
.jst-heritage-skill-card,
.jst-heritage-fragment-item,
.jst-heritage-fragment-card,
.jst-heritage-pending-item,
.jst-heritage-archive-card,
.jst-heritage-showcase-card,
.jst-heritage-manage-item,
.jst-heritage-application-item,
.jst-heritage-stat-card,
.jst-heritage-manage-stat,
.jst-heritage-quick-item,
.jst-more-section,
.jst-modal-box,
.jst-modal-panel,
.jst-phase-card,
.jst-data-panel,
.jst-badge-panel,
.jst-profile-user-card,
.jst-quick-grid,
.jst-tree-card,
.jst-download-menu,
.jst-heritage-modal,
.jst-skeleton-screen {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* 列表项和行 */
.jst-list-item,
.jst-chat-list-item,
.jst-task-row,
.jst-profile-menu-item,
.jst-funeral-item-row,
.jst-download-item,
.jst-heritage-pending-item,
.jst-heritage-manage-item,
.jst-heritage-application-item {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* 输入框 */
.jst-input,
input.jst-input,
textarea.jst-input,
select.jst-input,
.jst-modal-input,
.jst-modal-textarea,
.jst-modal-select,
.jst-search-input,
input.jst-search-input,
.jst-chat-input-wrap input,
.jst-chat-input-wrap textarea,
.jst-heritage-input,
.jst-heritage-textarea,
.jst-heritage-select,
.jst-ai-form-input,
.jst-ai-form-select,
.jst-ai-form-textarea,
.jst-ai-input {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* 按钮 */
.jst-btn-primary,
.jst-btn-secondary,
.jst-share-btn,
.jst-theme-toggle,
.jst-modal-btn,
.jst-section-add-btn,
.jst-contact-call-btn,
.jst-empty-state-v2-btn,
.jst-heritage-btn-primary,
.jst-heritage-btn-small,
.jst-heritage-btn-cancel,
.jst-heritage-btn-confirm,
.jst-toolbar-btn,
.jst-ai-quick-btn,
.jst-ai-inline-btn,
.jst-ai-guide-btn,
.jst-ai-action-btn,
.jst-ai-voice-btn {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, opacity 0.15s ease, transform 0.15s ease;
}

/* 标题和文字 */
.jst-section-title,
.jst-task-category-title,
.jst-task-card-name,
.jst-contact-name,
.jst-modal-title,
.jst-profile-name,
.jst-phase-title,
.jst-overview-card-value,
.jst-overview-card-label,
.jst-tree-card-name,
.jst-heritage-section-title,
.jst-heritage-detail-title,
.jst-heritage-skill-name,
.jst-heritage-archive-card-title,
.jst-heritage-showcase-name,
.jst-heritage-popup-title,
.jst-heritage-manage-item-name,
.jst-heritage-application-name,
.jst-heritage-pending-text {
  transition: color 0.3s ease;
}

/* 区域头部和边框 */
.jst-section-header,
.jst-task-category,
.jst-pull-refresh-indicator,
.jst-ai-header,
.jst-ai-input-area,
.jst-ai-scenes,
.jst-heritage-header,
.jst-heritage-section-header,
.jst-more-header,
.jst-modal-overlay,
.jst-heritage-modal-overlay,
.jst-heritage-modal-header,
.jst-heritage-modal-footer,
.jst-heritage-bottom-nav,
.jst-chat-input-wrap,
.jst-quick-reply-bar {
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

/* Tab栏 */
#jst-tab-bar,
.jst-tab-item,
.jst-tab-label,
.jst-tab-badge,
.jst-tab-icon,
.jst-heritage-nav-item,
.jst-heritage-nav-label,
.jst-heritage-nav-icon {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* 标签和徽章 */
.jst-heritage-tag,
.jst-heritage-tag-small,
.jst-heritage-filter,
.jst-svc-loc-tag,
.jst-badge,
.jst-gen-pill,
.jst-heritage-status,
.jst-heritage-fragment-status,
.jst-heritage-fragment-status-badge,
.jst-heritage-showcase-status,
.jst-heritage-detail-status,
.jst-heritage-manage-item-status,
.jst-heritage-application-status,
.jst-heritage-archive-cred {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* 进度条 */
.jst-progress-bar,
.jst-progress-bar-fill {
  transition: background-color 0.3s ease;
}

/* FAB和浮窗 */
#jst-ai-fab,
.jst-fab,
.jst-fullscreen-close {
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

/* AI面板 */
#jst-ai-panel,
#jst-ai-overlay,
.jst-ai-close,
.jst-ai-send,
.jst-ai-scene,
.jst-ai-manager-btn,
.jst-ai-contact-btn {
  transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1), background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, opacity 0.3s ease;
}

/* ============================================================
   全局UI微交互与动画打磨
   - 页面切换过渡、按钮按压反馈、卡片悬浮、骨架屏组件
   - 列表项入场、下拉刷新提示、回到顶部按钮
   ============================================================ */

/* ----- 页面切换过渡动画 ----- */
.jst-page-exit {
  opacity: 0 !important;
  transform: translateY(10px) !important;
  transition: opacity 0.2s ease-out, transform 0.2s ease-out !important;
}

.jst-page-enter {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.2s ease-out, transform 0.2s ease-out;
}

.jst-page-enter.jst-page-enter-active {
  opacity: 1;
  transform: translateY(0);
}

/* ----- 按钮按压反馈（统一） ----- */
.jst-btn-press {
  transition: transform 0.1s ease, opacity 0.15s ease;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.jst-btn-press:active {
  transform: scale(0.96);
  opacity: 0.85;
  transition: all 0.1s;
}

/* 为所有 button 元素添加按压反馈 */
button.jst-btn-press,
button:not(.jst-fab):not(.jst-modal-btn):not(.jst-no-press) {
  transition: transform 0.1s ease, opacity 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}
button.jst-btn-press:active,
button:not(.jst-fab):not(.jst-modal-btn):not(.jst-no-press):active {
  transform: scale(0.96);
  opacity: 0.85;
  transition: all 0.1s;
}

/* 聊天列表项按压 */
.jst-chat-item,
.jst-chat-list-item {
  transition: transform 0.1s ease, opacity 0.15s ease, background-color 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}
.jst-chat-item:active,
.jst-chat-list-item:active {
  transform: scale(0.98);
  opacity: 0.85;
}

/* 菜单项按压 */
.jst-menu-item,
.jst-action-item,
.jst-dropdown-item {
  transition: transform 0.1s ease, opacity 0.15s ease, background-color 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}
.jst-menu-item:active,
.jst-action-item:active,
.jst-dropdown-item:active {
  transform: scale(0.98);
  opacity: 0.85;
}

/* ----- 卡片悬浮效果（增强） ----- */
.jst-card-hover {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.jst-card-hover:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.08);
}
.jst-card-hover:active {
  transform: scale(0.98);
  transition: all 0.1s;
}

/* ----- 通用骨架屏组件 ----- */
.jst-skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: jstSkeletonLoading 1.5s ease-in-out infinite;
  border-radius: 4px;
}
@keyframes jstSkeletonLoading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.jst-skeleton-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: jstSkeletonLoading 1.5s ease-in-out infinite;
}
.jst-skeleton-text {
  height: 14px;
  margin: 8px 0;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: jstSkeletonLoading 1.5s ease-in-out infinite;
  border-radius: 4px;
}
.jst-skeleton-text-short {
  width: 60%;
}
.jst-skeleton-title {
  height: 20px;
  width: 40%;
  margin-bottom: 12px;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: jstSkeletonLoading 1.5s ease-in-out infinite;
  border-radius: 4px;
}
.jst-skeleton-card {
  height: 120px;
  border-radius: 12px;
  margin-bottom: 12px;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: jstSkeletonLoading 1.5s ease-in-out infinite;
}

/* ----- 列表项入场动画 ----- */
.jst-list-enter {
  animation: jstListSlideIn 0.3s ease-out forwards;
  opacity: 0;
}
@keyframes jstListSlideIn {
  from { opacity: 0; transform: translateX(-10px); }
  to { opacity: 1; transform: translateX(0); }
}

/* ----- 下拉刷新提示 ----- */
.jst-pull-indicator {
  text-align: center;
  padding: 12px;
  color: var(--jst-text-secondary, #999);
  font-size: 13px;
  transition: transform 0.3s;
}

/* ----- 回到顶部按钮 ----- */
.jst-scroll-top-btn {
  position: fixed;
  right: 20px;
  bottom: 90px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--jst-card, #ffffff);
  color: var(--jst-theme, #07C160);
  border: 1px solid var(--jst-border, #e5e5e5);
  box-shadow: 0 2px 12px rgba(0,0,0,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  transform: scale(0.8);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
  -webkit-tap-highlight-color: transparent;
}
.jst-scroll-top-btn.visible {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
}
.jst-scroll-top-btn:active {
  transform: scale(0.9);
  opacity: 0.85;
  transition: all 0.1s;
}
.jst-scroll-top-btn svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
