/* ===== AI客脉 · 全局组件规范 v1.1（audit-2026 S0）===== */
/* 来源：design-reference/audit-2026/00-global-components.html */
/* 注意：不与 trx-* 转写页样式冲突；底栏 Tab 仍由 02-layout.css 的 .tab-bar 控制 */

/* ----- 顶栏 Nav（补充 nav-header，兼容 nav-bar）----- */
/* 与收集箱一致：透明顶栏透出页面奶油底，勿再用 --color-card 白底 */
.nav-header,
.page > .nav-header {
  display: flex;
  align-items: center;
  height: 52px;
  padding: 0 16px;
  background: transparent;
  border-bottom: none;
}
.nav-header .nav-title,
.nav-bar .nav-title {
  flex: 1;
  text-align: center;
  font-size: 17px;
  font-weight: 600;
  color: var(--color-text-primary);
}
.nav-header .nav-back,
.nav-bar .nav-back {
  font-size: 24px;
  font-weight: 300;
  line-height: 1;
  width: auto;
  height: auto;
  padding: 4px;
  margin-left: -4px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-text-primary);
  flex-shrink: 0;
}
.nav-header .nav-action,
.nav-bar .nav-action {
  width: auto;
  height: auto;
  font-size: 26px;
  font-weight: 400;
  line-height: 1;
  padding: 4px 8px;
  color: var(--color-brand);
  background: none;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
}
.nav-header .nav-spacer,
.nav-bar .nav-spacer {
  width: 36px;
  flex-shrink: 0;
}
.nav-header .nav-actions,
.nav-bar .nav-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  flex-wrap: nowrap;
}
.nav-bar .nav-actions {
  gap: 12px;
}
.nav-action-text {
  font-size: 14px;
  color: var(--color-brand);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 0;
  font-weight: 500;
}

/* ----- 页面内 Tab（区别于底部 .tab-bar）----- */
.page-tab-bar {
  display: flex;
  background: var(--color-card);
  border-bottom: 1px solid var(--color-border-light);
  position: sticky;
  top: 52px;
  z-index: 99;
  flex-shrink: 0;
}
.page-tab-bar .page-tab-item {
  flex: 1;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--color-text-secondary);
  background: none;
  border: none;
  cursor: pointer;
  position: relative;
  font-weight: 500;
}
.page-tab-bar .page-tab-item.active {
  color: var(--color-brand);
  font-weight: 600;
}
.page-tab-bar .page-tab-item.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 2px;
  background: var(--color-brand);
  border-radius: 1px;
}

/* ----- 卡片 ----- */
.gc-card {
  background: var(--color-card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 16px;
  margin-bottom: 12px;
}
.gc-card-bordered {
  background: var(--color-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  padding: 14px 16px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: border-color 0.15s;
}
.gc-card-bordered:active { border-color: var(--color-brand); }

/* ----- 标签 Chip / 状态 ----- */
.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 28px;
  padding: 0 8px;
  background: var(--color-border-light);
  border-radius: 6px;
  font-size: 12px;
  color: var(--color-text-secondary);
  max-width: 120px;
}
.tag-chip-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tag-chip-del {
  font-size: 14px;
  color: var(--color-text-tertiary);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}
.tag-status {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
}
.tag-status-new     { background: #F3F4F6; color: #6B7280; }
.tag-status-viewed  { background: #DBEAFE; color: #1D4ED8; }
.tag-status-done    { background: #D1FAE5; color: #065F46; }
.tag-status-process { background: #FEF3C7; color: #92400E; }
.tag-status-failed  { background: #FEE2E2; color: #991B1B; }

/* ----- 空状态（兼容现有 empty-state-* 类名）----- */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 32px;
  text-align: center;
  min-height: 240px;
  color: var(--color-text-tertiary);
}
.empty-icon,
.empty-state-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.4;
}
.empty-title,
.empty-state-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text-secondary);
  margin-bottom: 6px;
}
.empty-desc,
.empty-state-desc {
  font-size: 13px;
  color: var(--color-text-tertiary);
  line-height: 1.5;
  margin-bottom: 20px;
}
.empty .empty-state-icon { margin-bottom: 12px; }

/* ----- Loading ----- */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.88);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 999;
}
.loading-spinner {
  width: 28px;
  height: 28px;
  border: 3px solid var(--color-border-light);
  border-top-color: var(--color-brand);
  border-radius: 50%;
  animation: gc-spin 0.7s linear infinite;
  margin-bottom: 12px;
}
@keyframes gc-spin { to { transform: rotate(360deg); } }
.loading-text {
  font-size: 14px;
  color: var(--color-text-secondary);
  font-weight: 500;
}
.loading-subtext {
  font-size: 12px;
  color: var(--color-text-tertiary);
  margin-top: 4px;
}
.loading-inline {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

/* ----- 失败状态 ----- */
.failed-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 50px 32px;
  text-align: center;
  min-height: 320px;
}
.failed-icon { font-size: 40px; margin-bottom: 16px; }
.failed-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: 6px;
}
.failed-desc {
  font-size: 13px;
  color: var(--color-text-tertiary);
  line-height: 1.5;
  margin-bottom: 20px;
  max-width: 260px;
}

/* ----- Toast（覆盖 app.css 底部样式，对齐设计稿顶部）----- */
#toast {
  top: calc(52px + 8px);
  bottom: auto;
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  padding: 10px 20px;
  border-radius: var(--radius-md);
  background: rgba(31, 41, 55, 0.92);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  z-index: 9999;
  max-width: calc(100% - 32px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
#toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
#toast.toast-success { background: var(--color-success); }
#toast.toast-error { background: var(--color-error); }

/* ----- 确认弹窗 ----- */
.gc-dialog-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10010;
  background: rgba(15, 23, 42, 0.45);
  pointer-events: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.gc-dialog-overlay.open { display: flex; pointer-events: auto; }
.gc-dialog {
  width: 100%;
  max-width: 300px;
  background: var(--color-card);
  border-radius: var(--radius-lg);
  padding: 24px 20px 20px;
  text-align: center;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.18);
}
.gc-dialog-icon { font-size: 40px; margin-bottom: 12px; }
.gc-dialog-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--color-text-primary);
  margin-bottom: 8px;
}
.gc-dialog-desc {
  font-size: 14px;
  color: var(--color-text-secondary);
  line-height: 1.5;
  margin-bottom: 20px;
}
.gc-dialog-actions {
  display: flex;
  gap: 10px;
}
.gc-dialog-btn {
  flex: 1;
  height: 44px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border: none;
}
.gc-dialog-btn.cancel {
  background: var(--color-border-light);
  color: var(--color-text-secondary);
}
.gc-dialog-btn.confirm {
  background: var(--color-brand);
  color: #fff;
}
.gc-dialog-btn.danger {
  background: var(--color-error);
  color: #fff;
}

/* ----- P3 空态/失败态操作按钮 ----- */
.gc-empty-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 20px;
  background: var(--color-brand);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.gc-failed-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}
.gc-failed-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  font-family: inherit;
}
.gc-failed-btn.secondary {
  background: var(--color-bg);
  color: var(--color-text-secondary);
}
.gc-failed-btn.primary {
  background: var(--color-brand);
  color: #fff;
}

/* ----- P3 操作菜单 Sheet ----- */
.gc-action-sheet {
  position: fixed;
  inset: 0;
  z-index: 10002;
  display: none;
  align-items: flex-end;
  justify-content: center;
  pointer-events: none;
}
.gc-action-sheet.open { display: flex; pointer-events: auto; }
.gc-action-sheet-mask {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
}
.gc-action-sheet-panel {
  position: relative;
  width: 100%;
  max-width: 420px;
  background: var(--color-card);
  border-radius: 20px 20px 0 0;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  transform: translateY(0);
}
.gc-action-sheet-handle {
  width: 36px;
  height: 4px;
  border-radius: 2px;
  background: var(--color-border);
  margin: 10px auto 8px;
}
.gc-action-sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px 12px;
  border-bottom: 1px solid var(--color-border-light);
}
.gc-action-sheet-title {
  font-size: 15px;
  font-weight: 700;
}
.gc-action-sheet-close {
  font-size: 22px;
  color: var(--color-text-tertiary);
  background: none;
  border: none;
  cursor: pointer;
  line-height: 1;
}
.gc-action-sheet-body {
  padding: 8px 0;
  max-height: min(72dvh, 560px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.gc-action-option {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 16px;
  border: none;
  background: none;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  border-bottom: 1px solid var(--color-border-light);
}
.gc-action-option:last-child { border-bottom: none; }
.gc-action-option:active { background: var(--color-bg); }
.gc-action-option-icon { font-size: 20px; width: 32px; text-align: center; flex-shrink: 0; }
.gc-action-option-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.gc-action-option-text { font-size: 14px; color: var(--color-text-primary); line-height: 1.35; }
.gc-action-option-desc {
  font-size: 12px;
  line-height: 1.35;
  color: var(--color-text-tertiary);
}
.gc-action-option-check {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--color-brand);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.gc-action-option-check--empty {
  background: transparent;
  border: 2px solid var(--color-border);
}
.gc-action-option--selected {
  background: var(--color-brand-light, #DBEAFE);
}
.gc-action-option--selected .gc-action-option-text {
  color: var(--color-brand-dark, #2563EB);
  font-weight: 600;
}
.gc-action-option--selected .gc-action-option-desc {
  color: var(--color-brand-dark, #2563EB);
  opacity: 0.85;
}
.gc-action-option--danger .gc-action-option-text { color: var(--color-error); }
.gc-action-sheet-cancel {
  display: block;
  width: calc(100% - 32px);
  margin: 8px 16px 12px;
  padding: 12px;
  background: var(--color-bg);
  border: none;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.share-sheet-panel .share-sheet-handle,
.share-sheet-panel .gc-sheet-handle {
  width: 36px;
  height: 4px;
  border-radius: 2px;
  background: var(--color-border);
  margin: 10px auto 4px;
}

/* ----- 固定底栏双按钮 ----- */
.bottom-actions {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  display: flex;
  gap: 10px;
  padding: 10px 16px;
  padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  z-index: 200;
}

/* ----- 列表项 ----- */
.list-item {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  background: var(--color-card);
  border-bottom: 1px solid var(--color-border-light);
  cursor: pointer;
  gap: 12px;
}
.list-item:last-child { border-bottom: none; }
.list-item-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--color-border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.list-item-body { flex: 1; min-width: 0; }
.list-item-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.list-item-sub {
  font-size: 12px;
  color: var(--color-text-tertiary);
  margin-top: 2px;
}
.list-item-arrow {
  font-size: 16px;
  color: var(--color-text-tertiary);
  flex-shrink: 0;
}

/* ===== C-1 · 悟空问候行（速记 / 案例库 / 跟进共用壳；页差异覆盖）===== */
.shorthand-greeting,
#page-case-list .case-list-greeting,
#page-customers .follow-list-greeting {
  display: flex;
  align-items: center;
  min-height: 44px;
}
.shorthand-greeting {
  gap: 0;
  padding: 4px 0 2px;
}
#page-case-list .case-list-greeting {
  gap: 0;
  padding: 4px 16px 2px;
}
#page-customers .follow-list-greeting {
  gap: 10px;
  padding: 6px 16px 4px;
}

.shorthand-greeting__fixed,
#page-case-list .case-list-greeting__fixed,
#page-customers .follow-list-greeting__fixed {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  min-width: 0;
}
.shorthand-greeting__fixed,
#page-case-list .case-list-greeting__fixed {
  gap: 10px;
  padding-right: 12px;
}
#page-customers .follow-list-greeting__fixed {
  gap: 8px;
}

.shorthand-greeting__fig,
#page-case-list .case-list-greeting__fig,
#page-customers .follow-list-greeting__fig {
  width: 32px;
  height: 44px;
  flex-shrink: 0;
  overflow: hidden;
  border-radius: 8px;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  line-height: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  appearance: none;
  -webkit-appearance: none;
}
.shorthand-greeting__fig,
#page-case-list .case-list-greeting__fig {
  background: linear-gradient(180deg, var(--c-cream, #FFEFC2), rgba(255, 239, 194, 0.3));
  border: 1px solid rgba(255, 184, 0, 0.1);
}
#page-customers .follow-list-greeting__fig {
  border: none;
  background: transparent;
}

.shorthand-greeting__fig video,
.shorthand-greeting__video,
#page-case-list .case-list-greeting__fig video,
#page-case-list .case-list-greeting__video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
  mix-blend-mode: multiply;
  display: block;
  pointer-events: none;
  background: transparent;
  animation: wukong-greeting-idle 4s ease-in-out infinite;
}
#page-customers .follow-list-greeting__fig video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  pointer-events: none;
}
@keyframes wukong-greeting-idle {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-2px); }
}
@media (prefers-reduced-motion: reduce) {
  .shorthand-greeting__fig video,
  .shorthand-greeting__video,
  #page-case-list .case-list-greeting__fig video,
  #page-case-list .case-list-greeting__video {
    animation: none;
  }
}

.shorthand-greeting__words,
#page-case-list .case-list-greeting__words,
#page-customers .follow-list-greeting__words {
  font-weight: 500;
  color: var(--text-s, var(--color-text-secondary));
  white-space: nowrap;
}
.shorthand-greeting__words {
  font-size: var(--size-sm, 13px);
  max-width: none;
  line-height: 1.4;
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.shorthand-greeting__words.is-switching {
  opacity: 0;
  transform: translateY(-4px);
}
#page-case-list .case-list-greeting__words {
  font-size: var(--size-sm, 13px);
  line-height: 1.4;
}
#page-customers .follow-list-greeting__words {
  font-size: 13px;
}

.shorthand-greeting__scroll,
#page-case-list .case-list-greeting__scroll,
#page-customers .follow-list-greeting__scroll {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.shorthand-greeting__scroll::-webkit-scrollbar,
#page-case-list .case-list-greeting__scroll::-webkit-scrollbar,
#page-customers .follow-list-greeting__scroll::-webkit-scrollbar {
  display: none;
}
.shorthand-greeting__scroll {
  gap: 6px;
  -webkit-overflow-scrolling: touch;
  padding: 2px 0;
}
#page-case-list .case-list-greeting__scroll {
  gap: 8px;
  -webkit-overflow-scrolling: touch;
  padding: 2px 0;
}
#page-customers .follow-list-greeting__scroll {
  gap: 6px;
}

.shorthand-greeting__rem,
#page-case-list .case-list-greeting__rem,
#page-customers .follow-list-greeting__rem {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
  border: none;
  box-shadow: var(--card-shadow, var(--shadow-card));
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.shorthand-greeting__rem:active,
#page-case-list .case-list-greeting__rem:active,
#page-customers .follow-list-greeting__rem:active {
  transform: scale(0.95);
}
.shorthand-greeting__rem {
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--bg-card, var(--color-card));
}
#page-case-list .case-list-greeting__rem {
  padding: 5px 12px;
  border-radius: 12px;
  background: var(--bg-card, var(--color-card));
}
#page-customers .follow-list-greeting__rem {
  padding: 6px 10px;
  border-radius: 12px;
  background: var(--bg-card, #fff);
}

.shorthand-greeting__rem--accent,
#page-case-list .case-list-greeting__rem--accent,
#page-customers .follow-list-greeting__rem--accent {
  background: var(--c-accent-bg, rgba(74,158,142,0.07));
}
.shorthand-greeting__rem--urgent,
#page-case-list .case-list-greeting__rem--urgent,
#page-customers .follow-list-greeting__rem--urgent {
  background: rgba(232, 77, 61, 0.06);
}
.shorthand-greeting__rem--info,
#page-case-list .case-list-greeting__rem--info,
#page-customers .follow-list-greeting__rem--info {
  background: rgba(59,130,246,0.05);
}

.shorthand-greeting__rem-dot,
#page-case-list .case-list-greeting__rem-dot,
#page-customers .follow-list-greeting__rem-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.shorthand-greeting__rem-dot--accent,
#page-case-list .case-list-greeting__rem-dot--accent,
#page-customers .follow-list-greeting__rem-dot--accent {
  background: var(--c-accent, #4A9E8E);
}
.shorthand-greeting__rem-dot--urgent,
#page-case-list .case-list-greeting__rem-dot--urgent,
#page-customers .follow-list-greeting__rem-dot--urgent {
  background: var(--c-red, #E84C3D);
}
.shorthand-greeting__rem-dot--info,
#page-case-list .case-list-greeting__rem-dot--info,
#page-customers .follow-list-greeting__rem-dot--info {
  background: var(--c-blue, #3B82F6);
}

.shorthand-greeting__rem-num,
#page-case-list .case-list-greeting__rem-num,
#page-customers .follow-list-greeting__rem-num {
  font-weight: 600;
  color: var(--text-p, var(--color-text-primary));
}
.shorthand-greeting__rem-num,
#page-customers .follow-list-greeting__rem-num {
  font-size: 12px;
}
#page-case-list .case-list-greeting__rem-num {
  font-size: var(--size-xs, 12px);
}

.shorthand-greeting__rem-label,
#page-case-list .case-list-greeting__rem-label,
#page-customers .follow-list-greeting__rem-label {
  font-size: 11px;
  color: var(--text-s, var(--color-text-secondary));
}

/* ===== Phase D1 · 双 FAB + 工作台 Sheet（替代 5 键底栏）===== */
.fab-group {
  position: fixed;
  /* + 上移约半颗按钮高（46/2），避免贴死右下角难点 */
  bottom: calc(var(--safe-bottom, env(safe-area-inset-bottom, 0px)) + 39px);
  right: 14px;
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  z-index: 1000;
  pointer-events: none;
}
body.dual-fab-visible .fab-group:not(.fab-group--hidden),
html.dual-fab-visible .fab-group:not(.fab-group--hidden) {
  display: flex;
}
.fab-group.fab-group--hidden {
  display: none !important;
}
.fab-group .fab-mic,
.fab-group .fab-nav {
  pointer-events: auto;
}
/* 产品决定：去掉右下角话筒，仅保留 + 工作台入口 */
.fab-mic,
#fabMic {
  display: none !important;
}
.fab-mic {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--c-blue, #3B82F6);
  border: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.3);
  padding: 0;
  color: #fff;
  -webkit-tap-highlight-color: transparent;
}
.fab-mic:active { transform: scale(0.9); }
.fab-mic svg {
  width: 22px;
  height: 22px;
  fill: #fff;
  display: block;
}
/* D3：录音中 🎤 变红，● 暂隐 */
.fab-mic.is-recording {
  background: var(--c-red, #E84C3D);
  box-shadow: 0 4px 16px rgba(232, 76, 61, 0.35);
}
.fab-group.is-recording .fab-nav,
.fab-nav.is-hidden-by-rec {
  display: none !important;
}
.fab-nav {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--text-p, #2c2c2c);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
  padding: 0;
  transition: transform 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.fab-nav:active { transform: scale(0.9); }
.fab-nav.open { transform: rotate(45deg); }
.fab-nav svg {
  width: 20px;
  height: 20px;
  stroke: #fff;
  stroke-width: 2;
  fill: none;
  display: block;
}

.fab-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.25);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  z-index: 1005;
}
.fab-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.fab-sheet {
  position: fixed;
  left: 50%;
  transform: translateX(-50%) translateY(100%);
  bottom: 0;
  width: 100%;
  max-width: 420px;
  background: var(--bg-card, #fff);
  border-radius: 18px 18px 0 0;
  padding: 12px 16px calc(16px + var(--safe-bottom, env(safe-area-inset-bottom, 0px)));
  transition: transform 0.3s ease-out;
  z-index: 1010;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.08);
  box-sizing: border-box;
  max-height: min(86vh, 640px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.fab-sheet.open {
  transform: translateX(-50%) translateY(0);
}
.fab-sheet__handle {
  width: 36px;
  height: 4px;
  background: var(--divider, #f0ede8);
  border-radius: 2px;
  margin: 0 auto 14px;
}
.fab-sheet__title {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-s, #9CA3AF);
  letter-spacing: 0.04em;
  margin-bottom: 8px;
  padding: 0 4px;
}
.fab-sheet__divider {
  height: 1px;
  background: var(--divider, #f0ede8);
  margin: 10px 4px;
}
.fab-sheet__row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 4px;
  border-radius: 10px;
  cursor: pointer;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
  font-family: inherit;
  font-size: 14px;
  color: var(--text-p, #2c2c2c);
  -webkit-tap-highlight-color: transparent;
}
.fab-sheet__row:active { background: var(--bg-page, #f5f3f0); }
.fab-sheet__row--wukong .fab-sheet__icon {
  background: rgba(255, 184, 0, 0.1);
}
.fab-sheet__icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-page, #f5f3f0);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.fab-sheet__label { font-weight: 500; }
.fab-sheet__hint {
  font-size: 11px;
  color: var(--text-t, #B0AEA5);
  margin-top: 1px;
}
.fab-sheet__grid {
  display: flex;
  gap: 6px;
  margin-bottom: 4px;
}
.fab-sheet__grid-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 4px;
  border: none;
  background: var(--bg-page, #f5f3f0);
  cursor: pointer;
  border-radius: 10px;
  font-family: inherit;
  transition: background 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.fab-sheet__grid-btn:active { background: var(--divider, #f0ede8); }
.fab-sheet__grid-icon { font-size: 20px; line-height: 1; }
.fab-sheet__grid-label {
  font-size: 10px;
  color: var(--text-s, #9CA3AF);
  font-weight: 500;
}

/* D2：页专属快捷默认隐藏，由 dual-fab.js 按 data-fab-ctx 显隐 */
#fabSheet[data-fab-ctx] [data-fab-ctx][hidden] {
  display: none !important;
}
/* 案例 / 速记 ctx：无录音行 / 录入五宫格 / 竖排工作台；横格工作台由 data-fab-ctx 显 */
#fabSheet[data-fab-ctx="cases"] .fab-sheet__hide-on-cases,
#fabSheet[data-fab-ctx="shorthand"] .fab-sheet__hide-on-cases {
  display: none !important;
}
.fab-sheet__grid--workbench {
  margin-top: 2px;
  margin-bottom: 8px;
}
.fab-sheet__grid--workbench .fab-sheet__grid-label {
  font-size: 10px;
  white-space: nowrap;
}

/* D3a：页内 FAB 退役，统一全局双 FAB */
#page-wx-inbox .wx-inbox-fab,
#page-memo .memo-fab,
#page-memo.today-focus .memo-fab,
#page-memo .fab-menu,
#page-memo .fab-overlay,
#page-memo.today-focus .fab-menu,
#page-memo.today-focus .fab-overlay {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}
