/* ═══════════════════════════════════════════
   XBiao shared.css — 公共样式 V6.0.0
   ═══════════════════════════════════════════ */

/* ═══════════════════════════════════════════
   V7.0 Base Tokens — single source of truth
   Teal default (overridden by :root[data-accent] below),
   plus page-level tokens that used to be copy-pasted inline.
   ═══════════════════════════════════════════ */
:root {
  /* palette (fallback before accent applies) */
  --teal-700: #0f766e; --teal-600: #0d9488; --teal-500: #14b8a6;
  --teal-400: #2dd4bf; --teal-200: #99f6e4; --teal-100: #ccfbf1; --teal-050: #f0fdfa;
  --ink: #0f3d3a; --muted: #5f7d7a;
  --glass: rgba(255,255,255,.62); --glass-strong: rgba(255,255,255,.82);
  --stroke: rgba(255,255,255,.9); --stroke-teal: rgba(var(--teal-rgb),.16);
  --shadow-sm: 0 4px 18px rgba(var(--teal-rgb),.08); --shadow-md: 0 14px 44px rgba(var(--teal-rgb),.14);
  --radius: 20px; --radius-lg: 28px;
  /* page-level tokens previously inlined on every page */
  --bg-page: linear-gradient(180deg, #f6fdfb 0%, #eefaf7 100%);
  --card-bg: var(--glass); --card-bg-accent: linear-gradient(135deg, rgba(var(--teal-rgb),.95), rgba(255,255,255,.75));
  --card-border: var(--stroke); --card-border-accent: rgba(var(--teal-rgb),.35);
  --card-shadow-accent: 0 10px 30px rgba(var(--teal-rgb),.16);
  --toast-bg: rgba(15,61,58,.88); --overlay-bg: rgba(15,61,58,.35);
  --skeleton-base: rgba(var(--teal-rgb),.4); --skeleton-shine: rgba(255,255,255,.8);
  --sheet-bg: rgba(255,255,255,.92); --sheet-handle: rgba(var(--teal-rgb),.3);
  --fab-bg: var(--teal-600); --fab-shadow: 0 8px 28px rgba(var(--teal-rgb),.4);
  --backdrop: rgba(15,61,58,.35);
  --input-bg: rgba(255,255,255,.82); --send-bg: var(--teal-600);
  --empty-dash: rgba(var(--teal-rgb),.18);
}
[data-theme="dark"] {
  --ink: #e2ece9; --muted: #7da09b;
  --glass: rgba(15,34,34,.65); --glass-strong: rgba(15,34,34,.85);
  --stroke: rgba(var(--teal-rgb),.15); --stroke-teal: rgba(var(--teal-rgb),.2);
  --shadow-sm: 0 4px 18px rgba(0,0,0,.25); --shadow-md: 0 14px 44px rgba(0,0,0,.35);
  --card-bg: rgba(15,34,34,.65); --card-bg-accent: linear-gradient(135deg, rgba(var(--teal-rgb),.25), rgba(15,34,34,.7));
  --card-border: rgba(var(--teal-rgb),.18); --card-border-accent: rgba(var(--teal-rgb),.35);
  --card-shadow-accent: 0 10px 30px rgba(0,0,0,.3);
  --toast-bg: rgba(15,34,34,.92); --overlay-bg: rgba(0,0,0,.55);
  --skeleton-base: rgba(var(--teal-rgb),.12); --skeleton-shine: rgba(var(--teal-rgb),.25);
  --sheet-bg: rgba(13,40,37,.94); --sheet-handle: rgba(var(--teal-rgb),.35);
  --backdrop: rgba(0,0,0,.55);
  --input-bg: rgba(13,40,37,.72); --empty-dash: rgba(var(--teal-rgb),.25);
  /* dark surface ladder (V7) — replaces scattered hardcoded rgba(15,34,34,.x) */
  --surface-input: rgba(15,34,34,.7); /* form inputs */
  --surface-dim:   rgba(15,34,34,.5);   /* tables / subtle wells */
  --surface-soft:  rgba(15,34,34,.62);  /* default card/panel */
  --surface:       rgba(15,34,34,.72);  /* buttons / raised panels */
  --surface-tint:  rgba(15,34,34,.78);  /* tips / feedback */
  --surface-raise: rgba(15,34,34,.82);  /* hovered / main cards */
  --surface-bar:   rgba(15,34,34,.88);  /* header / footer / tabbar */
  --surface-solid: rgba(15,34,34,.9);   /* primary buttons */
  --surface-modal: rgba(15,34,34,.92);  /* modals / icp-card */
}

/* ── Bottom Tab Bar ── */
.tab-bar {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0;
  z-index: 100;
  background: var(--glass-strong, rgba(255,255,255,.82));
  backdrop-filter: blur(24px) saturate(1.6);
  -webkit-backdrop-filter: blur(24px) saturate(1.6);
  border-top: 1px solid var(--stroke, rgba(255,255,255,.9));
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.tab-bar-inner {
  display: flex; align-items: center; justify-content: space-around;
  height: 56px;
}
.tab-item {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; flex: 1; height: 100%;
  text-decoration: none; color: var(--muted, #5f7d7a);
  font-size: 10px; font-weight: 500;
  transition: color .2s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  min-height: 44px;
  position: relative;
}
.tab-item .tab-icon {
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px;
  transition: background .2s, transform .2s;
}
.tab-item .tab-icon svg {
  width: 22px; height: 22px;
  stroke: currentColor; fill: none;
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.tab-item.active { color: var(--teal-600, #0d9488); }
.tab-item.active .tab-icon {
  background: rgba(var(--teal-rgb),.12);
  transform: scale(1.08);
}
[data-theme="dark"] .tab-item.active { color: var(--teal-400, #2dd4bf); }
[data-theme="dark"] .tab-item.active .tab-icon { background: rgba(var(--teal-rgb),.15); }

/* ── App Icon Grid ── */
.app-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px 10px;
  padding: 0 8px;
}
.app-icon-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  text-decoration: none;
  color: var(--ink, #0f3d3a);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.app-icon-card .icon-wrap {
  width: 60px; height: 60px;
  border-radius: 15px;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
  background: rgba(var(--teal-rgb),.1);
  color: var(--teal-700);
  box-shadow: none;
  transition: transform .2s cubic-bezier(.22,1,.36,1);
  position: relative;
  overflow: hidden;
}
.app-icon-card .icon-wrap::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,.25) 0%, transparent 50%);
  border-radius: inherit;
  pointer-events: none;
}
.app-icon-card .icon-wrap:active { transform: scale(.88); }
@media (hover: hover) {
  .app-icon-card:hover .icon-wrap { transform: translateY(-2px) scale(1.05); box-shadow: 0 6px 20px rgba(var(--teal-rgb),.35); }
}
.app-icon-card .label {
  font-size: 11px;
  text-align: center;
  line-height: 1.3;
  max-width: 76px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}
.app-icon-card .label-sub {
  font-size: 10px;
  color: var(--muted, #5f7d7a);
  margin-top: -2px;
}

/* ── Search Box (Google style) ── */
.search-box {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--glass-strong, rgba(255,255,255,.82));
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border: 1.5px solid var(--stroke-teal, rgba(var(--teal-rgb),.16));
  border-radius: 28px;
  padding: 0 18px;
  height: 52px;
  box-shadow: 0 4px 20px rgba(var(--teal-rgb),.1);
  transition: border-color .25s, box-shadow .25s;
}
.search-box:focus-within {
  border-color: var(--teal-500, #14b8a6);
  box-shadow: 0 4px 24px rgba(var(--teal-rgb),.2);
}
.search-box .search-icon {
  flex-shrink: 0;
  color: var(--muted, #5f7d7a);
  font-size: 18px;
  transition: color .2s;
}
.search-box:focus-within .search-icon { color: var(--teal-500, #14b8a6); }
.search-box input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 15px;
  color: var(--ink, #0f3d3a);
  outline: none;
  font-family: inherit;
  min-width: 0;
}
.search-box input::placeholder {
  color: var(--muted, #5f7d7a);
  opacity: .7;
}

/* ── Search Results ── */
.search-results {
  margin-top: 14px;
  display: none;
}
.search-results.show { display: block; }
.search-result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 14px;
  text-decoration: none;
  color: var(--ink, #0f3d3a);
  transition: background .15s;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
}
.search-result-item:active { background: rgba(var(--teal-rgb),.08); }
.search-result-item .sr-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  background: rgba(var(--teal-rgb),.1);
  color: var(--teal-700);
  flex-shrink: 0;
}
.search-result-item .sr-info { flex: 1; min-width: 0; }
.search-result-item .sr-name { font-size: 14px; font-weight: 600; }
.search-result-item .sr-desc { font-size: 12px; color: var(--muted, #5f7d7a); margin-top: 2px; }
.search-result-item .sr-arrow { color: var(--muted, #5f7d7a); font-size: 14px; }

/* ── Section Title ── */
.section-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted, #5f7d7a);
  margin: 20px 0 12px;
  letter-spacing: .5px;
}

/* ── Profile Page ── */
.profile-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 0 20px;
}
.profile-avatar {
  width: 72px; height: 72px;
  border-radius: 20px;
  display: flex; align-items: center; justify-content: center;
  font-size: 30px; font-weight: 700; color: #fff;
  background: var(--teal-600);
  box-shadow: 0 8px 24px rgba(var(--teal-rgb),.35);
  margin-bottom: 12px;
}
.profile-name { font-size: 18px; font-weight: 700; }
.profile-email { font-size: 13px; color: var(--muted, #5f7d7a); margin-top: 4px; }

.profile-section {
  background: linear-gradient(135deg, rgba(var(--teal-rgb),.10), rgba(255,255,255,.72));
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border: 1px solid rgba(var(--teal-rgb),.18);
  border-radius: 16px;
  padding: 4px 0;
  margin-bottom: 14px;
  box-shadow: 0 4px 18px rgba(var(--teal-rgb),.08);
}
.profile-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  text-decoration: none;
  color: var(--ink, #0f3d3a);
  font-size: 14px;
  cursor: pointer;
  transition: background .15s;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
  font-family: inherit;
  -webkit-tap-highlight-color: transparent;
}
.profile-item:active { background: rgba(var(--teal-rgb),.06); }
.profile-item .pi-icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  background: rgba(var(--teal-rgb),.1);
  flex-shrink: 0;
}
[data-theme="dark"] .profile-item .pi-icon { background: rgba(var(--teal-rgb),.12); }
.profile-item .pi-label { flex: 1; }
.profile-item .pi-value { font-size: 13px; color: var(--muted, #5f7d7a); max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-item .pi-arrow { color: var(--muted, #5f7d7a); font-size: 14px; }
.profile-item.danger { color: #ef4444; }
.profile-item.danger .pi-icon { background: rgba(239,68,68,.1); color: #ef4444; }

/* ── Password Modal ── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: var(--overlay-bg, rgba(15,61,58,.35));
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: none; align-items: center; justify-content: center;
  padding: 20px;
}
.modal-overlay.show { display: flex; }
.modal-card {
  position: relative;
  background: var(--glass-strong, rgba(255,255,255,.82));
  backdrop-filter: blur(26px) saturate(1.5);
  -webkit-backdrop-filter: blur(26px) saturate(1.5);
  border: 1px solid var(--stroke, rgba(255,255,255,.9));
  border-radius: var(--radius-lg, 28px);
  padding: 28px 24px 24px;
  width: 100%; max-width: 360px;
  box-shadow: var(--shadow-md, 0 14px 44px rgba(var(--teal-rgb),.14));
  animation: fadeInUp .3s ease;
}
.modal-card h3 { font-size: 16px; font-weight: 700; margin-bottom: 18px; text-align: center; }
.modal-card .field { margin-bottom: 14px; }
.modal-card .field label { display: block; font-size: 12px; font-weight: 600; color: var(--muted, #5f7d7a); margin-bottom: 6px; }
.modal-card .field input {
  width: 100%; padding: 11px 14px;
  border: 1.5px solid var(--stroke-teal, rgba(var(--teal-rgb),.16));
  border-radius: 12px;
  background: rgba(255,255,255,.7);
  font-size: 14px; color: var(--ink, #0f3d3a);
  outline: none; font-family: inherit;
  transition: border-color .2s;
}
.modal-card .field input:focus { border-color: var(--teal-500, #14b8a6); }
[data-theme="dark"] .modal-card {
  background: rgba(13,40,37,.95);
  border-color: rgba(var(--teal-rgb),.18);
  box-shadow: 0 14px 44px rgba(0,0,0,.45);
}
[data-theme="dark"] .modal-card h3 { color: var(--ink); }
[data-theme="dark"] .modal-card .field input {
  background: rgba(15,34,34,.6);
  color: var(--ink);
  border-color: rgba(var(--teal-rgb),.2);
}
[data-theme="dark"] .modal-card .field input:focus { border-color: var(--teal-400); }
[data-theme="dark"] .modal-actions .btn-cancel {
  background: rgba(var(--teal-rgb),.1);
  color: var(--muted);
}
[data-theme="dark"] .modal-actions .btn-confirm {
  background: var(--teal-600);
  box-shadow: 0 4px 12px rgba(0,0,0,.3);
}
.modal-actions { display: flex; gap: 10px; margin-top: 18px; }
.modal-actions button {
  flex: 1; padding: 11px;
  border: none; border-radius: 12px;
  font-size: 14px; font-weight: 600;
  cursor: pointer;
  transition: transform .15s;
  min-height: 44px;
  -webkit-tap-highlight-color: transparent;
}
.modal-actions .btn-cancel {
  background: rgba(var(--teal-rgb),.08);
  color: var(--muted, #5f7d7a);
}
.modal-actions .btn-confirm {
  background: var(--teal-600);
  color: #fff;
  box-shadow: 0 4px 12px rgba(var(--teal-rgb),.3);
}
.modal-actions button:active { transform: scale(.96); }
.modal-msg { font-size: 13px; text-align: center; margin-top: 10px; min-height: 20px; }

@media (max-width: 640px) {
  .tab-bar { display: block; }
  body { padding-bottom: calc(56px + env(safe-area-inset-bottom, 0px)); }
  footer { display: none !important; }
}

/* ── SVG Icon Compatibility (replaces emoji) ── */
.ic { display: inline-flex; align-items: center; justify-content: center; vertical-align: -3px; }
svg.luc { color: inherit; display: inline-block; vertical-align: middle; }
.app-icon-card .icon-wrap svg.luc { width: 30px; height: 30px; color: #fff; }
.search-box .search-icon svg.luc { width: 18px; height: 18px; }
.search-result-item .sr-icon svg.luc { width: 22px; height: 22px; color: #fff; }
.profile-item .pi-icon svg.luc { width: 18px; height: 18px; }
.profile-item .pi-icon { font-size: 0; }
.qm-icon svg.luc { width: 16px; height: 16px; }
.fab svg.luc { width: 22px; height: 22px; }
.empty-icon svg.luc { width: 36px; height: 36px; }
.status-icon svg.luc { width: 14px; height: 14px; }
.icp-icon svg.luc { width: 24px; height: 24px; color: #fff; }
.logo svg.luc { width: 28px; height: 28px; color: #fff; }

/* ── Workbench V2.3.0 ── */
.workbench { margin-bottom: 10px; }
.wb-greeting {
  font-size: 18px; font-weight: 700; color: var(--ink, #0f3d3a);
  margin: 4px 0 4px; line-height: 1.3;
}
.wb-progress {
  font-size: 13px; color: var(--muted, #5f7d7a); margin-bottom: 14px;
}
.wb-card {
  background: var(--card-bg, rgba(255,255,255,.62));
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border: 1px solid var(--card-border, rgba(255,255,255,.9));
  border-radius: 16px;
  padding: 14px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm, 0 4px 18px rgba(var(--teal-rgb),.08));
}
.wb-card-head {
  display: flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 700; color: var(--ink, #0f3d3a);
  margin-bottom: 10px;
}
.wb-card-head .ic { color: var(--teal-600, #0d9488); }
[data-theme="dark"] .wb-card-head .ic { color: var(--teal-400, #2dd4bf); }
.wb-todo-add { display: flex; gap: 8px; margin-bottom: 10px; }
.wb-todo-add input {
  flex: 1; min-width: 0; padding: 10px 12px;
  border: 1.5px solid var(--stroke-teal, rgba(var(--teal-rgb),.16));
  border-radius: 12px; background: rgba(255,255,255,.7);
  font-size: 14px; color: var(--ink, #0f3d3a); outline: none; font-family: inherit;
}
.wb-todo-add input:focus { border-color: var(--teal-500, #14b8a6); }
.wb-todo-add button {
  border: none; border-radius: 12px; padding: 0 16px;
  background: var(--teal-600);
  color: #fff; font-size: 14px; font-weight: 600; cursor: pointer; min-height: 42px;
  -webkit-tap-highlight-color: transparent;
}
.wb-todo-list { display: flex; flex-direction: column; gap: 6px; }
.wb-todo-item {
  display: flex; align-items: flex-start; gap: 10px;
  background: rgba(var(--teal-rgb),.05);
  border-radius: 10px; padding: 10px 12px;
}
.wb-todo-check { display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; width: 20px; height: 20px; }
.wb-todo-check input { display: none; }
.wb-todo-check span {
  width: 20px; height: 20px; border-radius: 6px;
  border: 2px solid var(--teal-500, #14b8a6);
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .15s;
}
.wb-todo-check input:checked + span { background: var(--teal-500, #14b8a6); }
.wb-todo-text { flex: 1; min-width: 0; font-size: 14px; color: var(--ink, #0f3d3a); line-height: 1.4; }
.wb-todo-done { opacity: .5; text-decoration: line-through; }
.wb-todo-detail { font-size: 12px; color: var(--muted, #5f7d7a); margin-top: 2px; }
.wb-todo-del {
  border: none; background: transparent; color: var(--muted, #5f7d7a);
  font-size: 16px; line-height: 1; padding: 0 2px; cursor: pointer; flex-shrink: 0;
}
.wb-empty { font-size: 13px; color: var(--muted, #5f7d7a); padding: 6px 0; }
.wb-empty a { color: var(--teal-600, #0d9488); font-weight: 600; }
.wb-schedule-list { display: flex; flex-direction: column; gap: 8px; }
.wb-sched-item {
  display: flex; align-items: center; gap: 10px;
  font-size: 14px; color: var(--ink, #0f3d3a);
}
.wb-sched-time {
  flex-shrink: 0; min-width: 46px; text-align: center;
  background: rgba(var(--teal-rgb),.1); color: var(--teal-700, #0f766e);
  border-radius: 8px; padding: 4px 6px; font-size: 12px; font-weight: 600;
}
[data-theme="dark"] .wb-sched-time { color: var(--teal-400, #2dd4bf); background: rgba(var(--teal-rgb),.12); }
.wb-driving-line { font-size: 14px; color: var(--ink, #0f3d3a); margin-bottom: 6px; }
.wb-driving-link {
  display: inline-block; margin-top: 4px; color: var(--teal-600, #0d9488);
  font-weight: 700; text-decoration: none; font-size: 14px;
}
[data-theme="dark"] .wb-driving-link { color: var(--teal-400, #2dd4bf); }

.workbench-guest { margin: 6px 0 14px; }
.wb-guest-card {
  background: var(--card-bg, rgba(255,255,255,.62));
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border: 1px solid var(--card-border, rgba(255,255,255,.9));
  border-radius: 18px;
  padding: 22px 18px;
  text-align: center;
  box-shadow: var(--shadow-sm, 0 4px 18px rgba(var(--teal-rgb),.08));
}
.wb-guest-title { font-size: 17px; font-weight: 700; color: var(--ink, #0f3d3a); margin-bottom: 6px; }
.wb-guest-desc { font-size: 13px; color: var(--muted, #5f7d7a); margin-bottom: 16px; }
.wb-guest-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 42px; padding: 0 22px; margin: 0 4px;
  border-radius: 12px; text-decoration: none; font-size: 14px; font-weight: 600;
  background: var(--teal-600);
  color: #fff; box-shadow: 0 4px 12px rgba(var(--teal-rgb),.3);
}
.wb-guest-btn.ghost {
  background: rgba(var(--teal-rgb),.08); color: var(--teal-700, #0f766e);
  box-shadow: none;
}
[data-theme="dark"] .wb-card,
[data-theme="dark"] .wb-guest-card {
  background: rgba(13,40,37,.85);
  border-color: rgba(var(--teal-rgb),.18);
}
[data-theme="dark"] .wb-todo-add input {
  background: rgba(15,34,34,.6);
  color: var(--ink);
  border-color: rgba(var(--teal-rgb),.2);
}
[data-theme="dark"] .wb-todo-item { background: rgba(var(--teal-rgb),.08); }
[data-theme="dark"] .wb-guest-btn.ghost { color: var(--teal-400, #2dd4bf); background: rgba(var(--teal-rgb),.12); }

/* ── V3.0 Bot Card ── */
.wb-bot-card {
  display: flex; align-items: center; gap: 12px;
  background: linear-gradient(135deg, rgba(var(--teal-rgb),.12), rgba(var(--teal-rgb),.06));
}
.wb-bot-avatar {
  width: 48px; height: 48px; border-radius: 16px; flex-shrink: 0;
  background: rgba(var(--teal-rgb),.12);
  color: var(--teal-700); font-size: 24px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: none;
}
.wb-bot-info { flex: 1; min-width: 0; }
.wb-bot-name { font-size: 16px; font-weight: 800; color: var(--ink, #0f3d3a); }
.wb-bot-desc { font-size: 12px; color: var(--muted, #5f7d7a); margin-top: 2px; }
.wb-bot-btn {
  flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center;
  min-height: 38px; padding: 0 14px; border-radius: 12px; text-decoration: none;
  font-size: 13px; font-weight: 700; color: #fff;
  background: var(--teal-600);
  box-shadow: 0 4px 12px rgba(var(--teal-rgb),.3);
}
[data-theme="dark"] .wb-bot-card { background: rgba(var(--teal-rgb),.1); border-color: rgba(var(--teal-rgb),.2); }

/* ═══════════════════════════════════════════
   XBiao Design System V3.1
   Themes: blue / teal / obsidian / amber / porcelain
   ═══════════════════════════════════════════ */

/* Default / ZJU Blue */
:root[data-accent="blue"],
:root:not([data-accent]) {
  --teal-rgb: 30,120,200;
  --teal: var(--teal-500);
  --teal-bright: var(--teal-400);
  --brand: var(--teal-400);
  --brand-dark: var(--teal-500);
  --teal-700: #0b4a8f;
  --teal-600: #155e9b;
  --teal-500: #1e78c8;
  --teal-400: #5aa2e8;
  --teal-200: #c3dcf7;
  --teal-100: #e3f0fd;
  --teal-050: #f2f8ff;
  --ink: #0b2447;
  --muted: #5f7d9c;
  --glass: rgba(255,255,255,.6);
  --glass-strong: rgba(255,255,255,.82);
  --stroke: rgba(255,255,255,.9);
  --stroke-teal: rgba(30,120,200,.18);
  --shadow-sm: 0 4px 18px rgba(11,74,143,.08);
  --shadow-md: 0 14px 44px rgba(11,74,143,.14);
}
html[data-accent="blue"] body,
html:not([data-accent]) body {
  background-color: #eef6ff;
  background-image: linear-gradient(180deg, rgba(255,255,255,.78), rgba(255,255,255,.35)), url('/assets/bg/blue.svg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}
html[data-theme="dark"][data-accent="blue"] body,
html[data-theme="dark"]:not([data-accent]) body {
  background-color: #081a2e;
  background-image: linear-gradient(180deg, rgba(8,26,46,.2), rgba(8,26,46,.65)), url('/assets/bg/obsidian.svg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

/* Teal */
:root[data-accent="teal"] {
  --teal-rgb: 13,148,136;
  --teal: var(--teal-500);
  --teal-bright: var(--teal-400);
  --brand: var(--teal-400);
  --brand-dark: var(--teal-500);
  --teal-700: #0f766e;
  --teal-600: #0d9488;
  --teal-500: #14b8a6;
  --teal-400: #2dd4bf;
  --teal-200: #99f6e4;
  --teal-100: #ccfbf1;
  --teal-050: #f0fdfa;
  --ink: #0f3d3a;
  --muted: #5f7d7a;
  --stroke-teal: rgba(var(--teal-rgb),.16);
  --shadow-sm: 0 4px 18px rgba(var(--teal-rgb),.08);
  --shadow-md: 0 14px 44px rgba(var(--teal-rgb),.14);
}
html[data-accent="teal"] body {
  background-color: #f0fdfa;
  background-image: linear-gradient(180deg, rgba(255,255,255,.78), rgba(255,255,255,.35)), url('/assets/bg/teal.svg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}
html[data-theme="dark"][data-accent="teal"] body {
  background-color: #0a1f1c;
  background-image: linear-gradient(180deg, rgba(10,31,28,.2), rgba(10,31,28,.65)), url('/assets/bg/obsidian.svg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

/* Obsidian */
:root[data-accent="obsidian"] {
  --teal-rgb: 75,85,99;
  --teal: var(--teal-500);
  --teal-bright: var(--teal-400);
  --brand: var(--teal-400);
  --brand-dark: var(--teal-500);
  --teal-700: #374151;
  --teal-600: #1f2937;
  --teal-500: #4b5563;
  --teal-400: #9ca3af;
  --teal-200: #d1d5db;
  --teal-100: #e5e7eb;
  --teal-050: #f9fafb;
  --ink: #0b1220;
  --muted: #6b7280;
  --glass: rgba(255,255,255,.55);
  --glass-strong: rgba(255,255,255,.8);
  --stroke: rgba(255,255,255,.9);
  --stroke-teal: rgba(31,41,55,.18);
  --shadow-sm: 0 4px 18px rgba(17,24,39,.1);
  --shadow-md: 0 14px 44px rgba(17,24,39,.16);
}
html[data-accent="obsidian"] body {
  background-color: #f9fafb;
  background-image: linear-gradient(180deg, rgba(255,255,255,.78), rgba(255,255,255,.35)), url('/assets/bg/obsidian.svg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}
html[data-theme="dark"][data-accent="obsidian"] body {
  background-color: #111827;
  background-image: linear-gradient(180deg, rgba(17,24,39,.2), rgba(17,24,39,.65)), url('/assets/bg/obsidian.svg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

/* Amber */
:root[data-accent="amber"] {
  --teal-rgb: 245,158,11;
  --teal: var(--teal-500);
  --teal-bright: var(--teal-400);
  --brand: var(--teal-400);
  --brand-dark: var(--teal-500);
  --teal-700: #b45309;
  --teal-600: #d97706;
  --teal-500: #f59e0b;
  --teal-400: #fbbf24;
  --teal-200: #fde68a;
  --teal-100: #fef3c7;
  --teal-050: #fffbeb;
  --ink: #451a03;
  --muted: #92610f;
  --glass: rgba(255,255,255,.58);
  --glass-strong: rgba(255,255,255,.82);
  --stroke: rgba(255,255,255,.9);
  --stroke-teal: rgba(245,158,11,.22);
  --shadow-sm: 0 4px 18px rgba(245,158,11,.12);
  --shadow-md: 0 14px 44px rgba(245,158,11,.18);
}
html[data-accent="amber"] body {
  background-color: #fffbeb;
  background-image: linear-gradient(180deg, rgba(255,255,255,.8), rgba(255,255,255,.4)), url('/assets/bg/amber.svg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}
html[data-theme="dark"][data-accent="amber"] body {
  background-color: #1c1202;
  background-image: linear-gradient(180deg, rgba(28,18,2,.2), rgba(28,18,2,.65)), url('/assets/bg/obsidian.svg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

/* Porcelain */
:root[data-accent="porcelain"] {
  --teal-rgb: 100,116,139;
  --teal: var(--teal-500);
  --teal-bright: var(--teal-400);
  --brand: var(--teal-400);
  --brand-dark: var(--teal-500);
  --teal-700: #64748b;
  --teal-600: #475569;
  --teal-500: #94a3b8;
  --teal-400: #cbd5e1;
  --teal-200: #e2e8f0;
  --teal-100: #f1f5f9;
  --teal-050: #f8fafc;
  --ink: #0f172a;
  --muted: #64748b;
  --glass: rgba(255,255,255,.62);
  --glass-strong: rgba(255,255,255,.85);
  --stroke: rgba(255,255,255,.9);
  --stroke-teal: rgba(100,116,139,.16);
  --shadow-sm: 0 4px 18px rgba(15,23,42,.06);
  --shadow-md: 0 14px 44px rgba(15,23,42,.1);
}
html[data-accent="porcelain"] body {
  background-color: #f8fafc;
  background-image: linear-gradient(180deg, rgba(255,255,255,.85), rgba(255,255,255,.5)), url('/assets/bg/porcelain.svg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}
html[data-theme="dark"][data-accent="porcelain"] body {
  background-color: #111827;
  background-image: linear-gradient(180deg, rgba(17,24,39,.2), rgba(17,24,39,.65)), url('/assets/bg/obsidian.svg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

/* Shared glass helpers */
.glass-card {
  background: var(--glass, rgba(255,255,255,.6));
  backdrop-filter: blur(24px) saturate(1.6);
  -webkit-backdrop-filter: blur(24px) saturate(1.6);
  border: 1px solid var(--stroke, rgba(255,255,255,.9));
  border-radius: var(--radius-lg, 24px);
  box-shadow: var(--shadow-md, 0 14px 44px rgba(var(--teal-rgb),.14));
}
.accent-select {
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid var(--stroke-teal, rgba(var(--teal-rgb),.16));
  background: var(--glass-strong, rgba(255,255,255,.82));
  color: var(--ink, #0f3d3a);
  border-radius: 12px;
  padding: 6px 28px 6px 12px;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  min-height: 36px;
  outline: none;
}
[data-theme="dark"] .accent-select {
  background: var(--surface);
  color: var(--ink);
  border-color: rgba(var(--teal-rgb),.2);
}

/* ── Typography & Text Clarity V3.1 ── */
html {
  -webkit-text-size-adjust: 100%;
  color-scheme: light dark;
}
body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  letter-spacing: 0.1px;
}
.hero h1,
.brand-title,
.wb-greeting,
.wb-bot-name,
.card .name,
.section-title,
.profile-name {
  font-weight: 700;
  letter-spacing: 0.2px;
  text-shadow: none;
}
[data-theme="dark"] .hero h1,
[data-theme="dark"] .brand-title,
[data-theme="dark"] .wb-greeting,
[data-theme="dark"] .wb-bot-name,
[data-theme="dark"] .card .name,
[data-theme="dark"] .section-title,
[data-theme="dark"] .profile-name {
  text-shadow: 0 1px 2px rgba(0,0,0,.35);
}
.bubble,
.card,
.wb-card,
.wb-guest-card,
.profile-section,
.panel,
.modal-card {
  text-shadow: none;
}
/* Make muted text readable on image backgrounds */
.muted,
.hero p,
.card .desc,
.wb-bot-desc,
.wb-progress,
.wb-empty,
.profile-email {
  color: var(--muted);
  -webkit-font-smoothing: antialiased;
}

/* ── Global Mobile & Interaction Polish V3.1 ── */
button,
a,
input,
textarea,
select {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
@media (max-width: 640px) {
  body {
    font-size: 15px;
    line-height: 1.6;
  }
  .hero h1 {
    font-size: 20px;
    letter-spacing: 0.2px;
  }
  .bubble {
    font-size: 14px;
    line-height: 1.6;
  }
  button,
  a.btn,
  .wb-guest-btn,
  .wb-bot-btn,
  .send-btn,
  .plus-btn {
    min-height: 44px;
  }
}

/* ═══════════════════════════════════════════
   Dark Theme Tokens V3.3 (high contrast)
   ═══════════════════════════════════════════ */
:root[data-theme="dark"]:not([data-accent]),
:root[data-theme="dark"][data-accent="blue"] {
  --teal-700: #a9cdfa;
  --teal-600: #8fbfef;
  --teal-500: #5aa3e8;
  --teal-400: #8fc0ff;
  --teal-200: #cfe5ff;
  --teal-100: #e3f0fd;
  --teal-050: #0b2447;
  --ink: #eaf3fc;
  --muted: #9db8d8;
  --stroke-teal: rgba(90,163,232,.32);
}
:root[data-theme="dark"][data-accent="teal"] {
  --teal-700: #8ff0e2;
  --teal-600: #5ce3d0;
  --teal-500: #2dd4bf;
  --teal-400: #5eead4;
  --teal-200: #99f6e4;
  --teal-100: #ccfbf1;
  --teal-050: #0a1f1c;
  --ink: #e6f7f3;
  --muted: #8ab4af;
  --stroke-teal: rgba(45,212,191,.3);
}
:root[data-theme="dark"][data-accent="obsidian"] {
  --teal-700: #d1d5db;
  --teal-600: #c7ccd6;
  --teal-500: #9ca3af;
  --teal-400: #cbd5e1;
  --teal-200: #e5e7eb;
  --teal-100: #f3f4f6;
  --teal-050: #111827;
  --ink: #f3f4f6;
  --muted: #9ca3af;
  --stroke-teal: rgba(156,163,175,.3);
}
:root[data-theme="dark"][data-accent="amber"] {
  --teal-700: #fcd34d;
  --teal-600: #fbbf24;
  --teal-500: #f59e0b;
  --teal-400: #fbbf24;
  --teal-200: #fde68a;
  --teal-100: #fef3c7;
  --teal-050: #1c1202;
  --ink: #fef3c7;
  --muted: #d9a94a;
  --stroke-teal: rgba(245,158,11,.32);
}
:root[data-theme="dark"][data-accent="porcelain"] {
  --teal-700: #cbd5e1;
  --teal-600: #cbd5e1;
  --teal-500: #94a3b8;
  --teal-400: #cbd5e1;
  --teal-200: #e2e8f0;
  --teal-100: #f1f5f9;
  --teal-050: #0f172a;
  --ink: #f1f5f9;
  --muted: #94a3b8;
  --stroke-teal: rgba(148,163,184,.3);
}

/* Dark-mode icon/text contrast */
[data-theme="dark"] .pi-icon,
[data-theme="dark"] .sr-icon,
[data-theme="dark"] .qm-icon,
[data-theme="dark"] .status-icon,
[data-theme="dark"] .empty-icon,
[data-theme="dark"] .wb-card-head .ic {
  color: var(--teal-400) !important;
}
[data-theme="dark"] .pi-value,
[data-theme="dark"] .sr-desc,
[data-theme="dark"] .muted,
[data-theme="dark"] .profile-email,
[data-theme="dark"] .wb-progress,
[data-theme="dark"] .wb-empty {
  color: var(--muted) !important;
}

/* Dark-mode teal-rgb (light accents) */
:root[data-theme="dark"]:not([data-accent]),
:root[data-theme="dark"][data-accent="blue"] { --teal-rgb: 90,163,232; }
:root[data-theme="dark"][data-accent="teal"] { --teal-rgb: 45,212,191; }
:root[data-theme="dark"][data-accent="obsidian"] { --teal-rgb: 156,163,175; }
:root[data-theme="dark"][data-accent="amber"] { --teal-rgb: 251,191,36; }
:root[data-theme="dark"][data-accent="porcelain"] { --teal-rgb: 148,163,184; }

/* ── Adaptive Icon Sizes V3.4 ── */
.app-icon-card .icon-wrap svg.luc { width: 32px; height: 32px; }
.search-result-item .sr-icon svg.luc { width: 24px; height: 24px; }
.profile-item .pi-icon svg.luc { width: 20px; height: 20px; }
.qm-icon svg.luc { width: 18px; height: 18px; }
.status-icon svg.luc { width: 16px; height: 16px; }
.empty-icon svg.luc { width: 40px; height: 40px; }
.fab svg.luc { width: 24px; height: 24px; }
.icp-icon svg.luc { width: 26px; height: 26px; }
.logo svg.luc { width: 30px; height: 30px; }
.back-btn svg { width: 22px; height: 22px; }
@media (max-width: 640px) {
  .app-icon-card .icon-wrap svg.luc { width: 30px; height: 30px; }
  .profile-item .pi-icon svg.luc { width: 20px; height: 20px; }
  .qm-icon svg.luc { width: 18px; height: 18px; }
}

/* ── ZJU 灿若星辰灯 decorative element ── */
body::before {
  content: "";
  position: fixed;
  top: 8%;
  right: 4%;
  width: 300px;
  height: 360px;
  background: url('/assets/bg/zju-lantern.svg') no-repeat center / contain;
  opacity: .35;
  pointer-events: none;
  z-index: 0;
  filter: saturate(.9);
}
[data-theme="dark"] body::before {
  opacity: .22;
}
@media (max-width: 640px) {
  body::before {
    width: 180px;
    height: 216px;
    top: 4%;
    right: 2%;
    opacity: .22;
  }
}

/* ── ZJU 紫金港校门背景（半透明黑白） ── */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  background: url('/assets/bg/zju-gate.png') no-repeat center bottom / 78% auto;
  opacity: .4;
  pointer-events: none;
  z-index: 0;
  filter: grayscale(1) contrast(1.1) brightness(.62);
  -webkit-mask-image: radial-gradient(closest-side, rgba(0,0,0,1) 25%, rgba(0,0,0,.55) 60%, rgba(0,0,0,0) 88%);
  mask-image: radial-gradient(closest-side, rgba(0,0,0,1) 25%, rgba(0,0,0,.55) 60%, rgba(0,0,0,0) 88%);
}
[data-theme="dark"] body::after {
  opacity: .28;
}
@media (max-width: 640px) {
  body::after {
    opacity: .34;
    background-position: center bottom;
    background-size: 120% auto;
  }
}

/* Keep content above decorative layer */
main,
.page,
.auth-card,
.login-card,
.register-card,
.icp-card,
.modal-card {
  position: relative;
  z-index: 1;
}

/* ═══════════════════════════════════════════
   Dark Mode Global Surfaces V3.4 (no light blocks)
   ═══════════════════════════════════════════ */
[data-theme="dark"] body,
[data-theme="dark"] main,
[data-theme="dark"] .page {
  background-color: transparent !important;
}
[data-theme="dark"] input,
[data-theme="dark"] textarea,
[data-theme="dark"] select {
  background: var(--surface-input) !important;
  color: var(--ink) !important;
  border-color: rgba(var(--teal-rgb),.25) !important;
}
[data-theme="dark"] input::placeholder,
[data-theme="dark"] textarea::placeholder {
  color: var(--muted) !important;
}
[data-theme="dark"] .panel,
[data-theme="dark"] .card,
[data-theme="dark"] .preset,
[data-theme="dark"] .sheet,
[data-theme="dark"] .modal,
[data-theme="dark"] .modal-card,
[data-theme="dark"] .profile-section,
[data-theme="dark"] .msg .bubble,
[data-theme="dark"] .chat-input,
[data-theme="dark"] .cron-edit-row,
[data-theme="dark"] .ce-advanced,
[data-theme="dark"] .ce-advanced input,
[data-theme="dark"] .cron-edit-row input,
[data-theme="dark"] .option,
[data-theme="dark"] .knowledge-card,
[data-theme="dark"] .q-card {
  background: var(--surface-soft) !important;
  color: var(--ink) !important;
  border-color: rgba(var(--teal-rgb),.18) !important;
}
[data-theme="dark"] .btn.secondary,
[data-theme="dark"] .ghost-btn,
[data-theme="dark"] .pill,
[data-theme="dark"] .ce-freq .pill,
[data-theme="dark"] .badge,
[data-theme="dark"] .empty-action {
  background: rgba(var(--teal-rgb),.14) !important;
  color: var(--teal-400) !important;
  border-color: rgba(var(--teal-rgb),.22) !important;
}
[data-theme="dark"] table,
[data-theme="dark"] th,
[data-theme="dark"] td {
  background: var(--surface-dim) !important;
  color: var(--ink) !important;
  border-color: rgba(var(--teal-rgb),.16) !important;
}
[data-theme="dark"] .tab,
[data-theme="dark"] .tab:not(.active) {
  background: transparent !important;
  color: var(--muted) !important;
}

/* ── Dark Mode Hard Surfaces & Buttons V3.5 ── */
[data-theme="dark"] header,
[data-theme="dark"] footer,
[data-theme="dark"] .desktop-sidebar,
[data-theme="dark"] .topbar,
[data-theme="dark"] .tab-bar {
  background: var(--surface-bar) !important;
  border-color: rgba(var(--teal-rgb),.16) !important;
  color: var(--ink) !important;
}
[data-theme="dark"] button:not(.btn-run):not(.send-btn):not(.submit):not(.primary):not(.tab.active):not(.wb-todo-add button):not(.wb-guest-btn),
[data-theme="dark"] a.btn:not(.wb-guest-btn):not(.wb-bot-btn):not(.btn-run),
[data-theme="dark"] .icon-btn,
[data-theme="dark"] .btn:not(.btn-run):not(.send-btn):not(.submit):not(.primary):not(.btn-confirm),
[data-theme="dark"] .btn-mini,
[data-theme="dark"] .quick-chip,
[data-theme="dark"] .logout-btn,
[data-theme="dark"] .ghost-btn,
[data-theme="dark"] .back-btn {
  background: var(--surface) !important;
  color: var(--teal-400) !important;
  border-color: rgba(var(--teal-rgb),.22) !important;
}

/* ── Dark Mode Highlight/Tip/Feedback V3.7 ── */
[data-theme="dark"] .tip,
[data-theme="dark"] .feedback,
[data-theme="dark"] .feedback.right,
[data-theme="dark"] .feedback.wrong,
[data-theme="dark"] .option.correct,
[data-theme="dark"] .option.wrong {
  background: var(--surface-tint) !important;
  border-color: rgba(var(--teal-rgb),.25) !important;
  color: var(--ink) !important;
}
[data-theme="dark"] .tip strong,
[data-theme="dark"] .knowledge-card strong,
[data-theme="dark"] .q-card strong {
  color: var(--teal-400) !important;
}

/* ── Global Light Text Feather Shadow V3.8 ── */
[data-theme="dark"] body,
[data-theme="dark"] p,
[data-theme="dark"] span,
[data-theme="dark"] a,
[data-theme="dark"] button,
[data-theme="dark"] input,
[data-theme="dark"] textarea,
[data-theme="dark"] select,
[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4,
[data-theme="dark"] li,
[data-theme="dark"] td,
[data-theme="dark"] th {
  text-shadow: 0 1px 3px rgba(0,0,0,.68), 0 0 10px rgba(0,0,0,.38);
}
[data-theme="dark"] .tip strong,
[data-theme="dark"] .knowledge-card strong,
[data-theme="dark"] .q-card strong {
  text-shadow: 0 0 4px rgba(0,0,0,.85), 0 2px 5px rgba(0,0,0,.72);
}

/* ── Announcement theme adaptation V3.9 ── */
.announce {
  background: var(--glass-strong, rgba(255,255,255,.82)) !important;
  color: var(--ink) !important;
  border-color: rgba(var(--teal-rgb),.22) !important;
}
[data-theme="dark"] .announce {
  background: var(--surface-bar) !important;
  color: var(--ink) !important;
  border-color: rgba(var(--teal-rgb),.22) !important;
}

/* ═══════════════════════════════════════════
   Contrast Rule V4.0: dark bg -> light text, light bg -> dark text
   ═══════════════════════════════════════════ */
:root:not([data-theme="dark"]) .panel,
:root:not([data-theme="dark"]) .card,
:root:not([data-theme="dark"]) .announce,
:root:not([data-theme="dark"]) .search-box,
:root:not([data-theme="dark"]) .profile-section,
:root:not([data-theme="dark"]) .modal-card,
:root:not([data-theme="dark"]) .option,
:root:not([data-theme="dark"]) .knowledge-card,
:root:not([data-theme="dark"]) .q-card {
  color: var(--ink) !important;
}
[data-theme="dark"] .panel,
[data-theme="dark"] .card,
[data-theme="dark"] .announce,
[data-theme="dark"] .profile-section,
[data-theme="dark"] .modal-card,
[data-theme="dark"] .option,
[data-theme="dark"] .knowledge-card,
[data-theme="dark"] .q-card,
[data-theme="dark"] .bubble.assistant,
[data-theme="dark"] .chat-input {
  background: var(--surface) !important;
  color: var(--ink) !important;
}
/* Primary buttons in dark mode: dark tinted background + light text (no gray/gradient) */
[data-theme="dark"] .btn,
[data-theme="dark"] .btn-run,
[data-theme="dark"] .send-btn,
[data-theme="dark"] .btn-confirm,
[data-theme="dark"] .wb-bot-btn,
[data-theme="dark"] .wb-guest-btn,
[data-theme="dark"] .tab.active,
[data-theme="dark"] .submit {
  background: var(--surface-solid) !important;
  color: var(--teal-400) !important;
  border-color: rgba(var(--teal-rgb),.3) !important;
  box-shadow: none !important;
}

/* ═══════════════════════════════════════════
   Common Icon & Surface Aesthetic V4.3
   Light: tinted icon blocks, not heavy dark blocks.
   Dark: dark tinted blocks + light icons.
   ═══════════════════════════════════════════ */
:root:not([data-theme="dark"]) .app-icon-card .icon-wrap,
:root:not([data-theme="dark"]) .search-result-item .sr-icon,
:root:not([data-theme="dark"]) .wb-bot-avatar,
:root:not([data-theme="dark"]) .card .icon,
:root:not([data-theme="dark"]) .card-icon,
:root:not([data-theme="dark"]) .icon-wrap,
:root:not([data-theme="dark"]) .icon-btn {
  background: rgba(var(--teal-rgb),.1) !important;
  color: var(--teal-700) !important;
  box-shadow: none !important;
}
[data-theme="dark"] .app-icon-card .icon-wrap,
[data-theme="dark"] .search-result-item .sr-icon,
[data-theme="dark"] .wb-bot-avatar,
[data-theme="dark"] .card .icon,
[data-theme="dark"] .card-icon,
[data-theme="dark"] .icon-wrap,
[data-theme="dark"] .icon-btn {
  background: rgba(var(--teal-rgb),.15) !important;
  color: var(--teal-400) !important;
  box-shadow: none !important;
}
/* Keep card surfaces light glass in light mode, dark glass in dark mode */
:root:not([data-theme="dark"]) .card,
:root:not([data-theme="dark"]) .panel,
:root:not([data-theme="dark"]) .profile-section {
  background: var(--glass-strong, rgba(255,255,255,.82)) !important;
  color: var(--ink) !important;
  border-color: rgba(var(--teal-rgb),.14) !important;
}
[data-theme="dark"] .card,
[data-theme="dark"] .panel,
[data-theme="dark"] .profile-section {
  background: var(--surface-raise) !important;
  color: var(--ink) !important;
  border-color: rgba(var(--teal-rgb),.18) !important;
}

/* ── ICP Modal Theme Fix V4.5 ── */
[data-theme="dark"] .icp-card {
  background: var(--surface-modal) !important;
  border-color: rgba(var(--teal-rgb),.22) !important;
  color: var(--ink) !important;
  box-shadow: 0 14px 44px rgba(0,0,0,.4) !important;
}
[data-theme="dark"] .icp-card h2 {
  color: var(--ink) !important;
}
[data-theme="dark"] .icp-card p {
  color: var(--muted) !important;
}
[data-theme="dark"] .icp-card .icp-icon {
  background: rgba(var(--teal-rgb),.18) !important;
  color: var(--teal-400) !important;
  box-shadow: none !important;
}
[data-theme="dark"] .icp-card .icp-close {
  background: var(--surface-solid) !important;
  color: var(--teal-400) !important;
  border: 1px solid rgba(var(--teal-rgb),.28) !important;
}

/* ── Assistant Advice Card V4.6 ── */
.wb-advice-card {
  border-left: 3px solid var(--teal-500);
}
.wb-advice-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--teal-600);
  letter-spacing: .4px;
  margin-bottom: 6px;
  text-transform: uppercase;
}
.wb-advice-text {
  font-size: 14px;
  line-height: 1.65;
  color: var(--ink);
}
[data-theme="dark"] .wb-advice-label {
  color: var(--teal-400);
}

/* ── Theme Toggle Icon Contrast Fix V5.3 ── */
#themeToggle {
  color: var(--teal-700) !important;
}
[data-theme="dark"] #themeToggle {
  color: var(--teal-400) !important;
}
.theme-toggle,
.header-btn#themeToggle,
.btn#themeToggle,
.icon-btn#themeToggle,
.ghost-btn#themeToggle {
  color: var(--teal-700) !important;
}
[data-theme="dark"] .theme-toggle,
[data-theme="dark"] .header-btn#themeToggle,
[data-theme="dark"] .btn#themeToggle,
[data-theme="dark"] .icon-btn#themeToggle,
[data-theme="dark"] .ghost-btn#themeToggle {
  color: var(--teal-400) !important;
}

/* ═══ V5.3.2 统一对话气泡配色 ═══ */
.bubble.user,
.msg.me .bubble {
  background: var(--teal-600) !important;
  color: #111 !important;
  border-color: rgba(var(--teal-rgb),.2) !important;
}
.bubble.assistant,
.msg.bot .bubble {
  background: #ffffff !important;
  color: #111 !important;
  border-color: rgba(var(--teal-rgb),.15) !important;
}
[data-accent="obsidian"] .bubble.user,
[data-accent="obsidian"] .msg.me .bubble,
[data-accent="porcelain"] .bubble.user,
[data-accent="porcelain"] .msg.me .bubble {
  background: #0d9488 !important;
  color: #111 !important;
}
.chat-bubble-mine {
  background: var(--teal-600) !important;
  color: #111 !important;
  border: 1px solid rgba(var(--teal-rgb),.2) !important;
}
.chat-bubble-theirs {
  background: #ffffff !important;
  color: #111 !important;
  border: 1px solid rgba(var(--teal-rgb),.15) !important;
}
[data-accent="obsidian"] .chat-bubble-mine,
[data-accent="porcelain"] .chat-bubble-mine {
  background: #0d9488 !important;
  color: #111 !important;
}

/* ═══════════════════════════════════════════
   XBiao Visual Upgrade V6.0
   Typography hierarchy · Breathing spacing · Card depth · Spring motion
   Design language: glass + theme-preserving premium polish
   ═══════════════════════════════════════════ */

/* ── V6.0 Spring Motion System (never layout-triggering) ── */
:root {
  --spring: cubic-bezier(.22,1,.36,1);
  --spring-soft: cubic-bezier(.34,1.2,.4,1);
}
.app-icon-card .icon-wrap,
.app-icon-card .label,
.wb-card,
.wb-guest-card,
.profile-section,
.search-box,
.card,
.panel,
.bubble,
.q-card,
.knowledge-card,
.modal-card,
.icp-card,
.tab-item .tab-icon,
button,
a.btn,
.wb-guest-btn,
.wb-bot-btn,
.wb-todo-add button {
  transition-timing-function: var(--spring);
}

/* ── V6.0 A. Typography Hierarchy ── */
.hero h1 { font-weight: 800; letter-spacing: .4px; }
.wb-greeting { font-weight: 800; letter-spacing: .2px; }
.wb-card-head { font-weight: 800; letter-spacing: .2px; }
.wb-bot-name { font-weight: 800; }
.card .name, .profile-name, .section-title { font-weight: 700; letter-spacing: .3px; }
.hero h1 { font-size: clamp(22px, 6vw, 28px); }
.wb-greeting { font-size: 19px; }
.wb-card-head { font-size: 15px; }
.wb-progress { font-size: 13.5px; }
.section-title { font-size: 13.5px; letter-spacing: 1px; }
@media (max-width: 640px) {
  .hero h1 { font-size: 22px; }
}

/* ── V6.0 B. Breathing Spacing ── */
.workbench { margin-bottom: 8px; }
.wb-card { padding: 18px 18px 16px; margin-bottom: 14px; }
.wb-guest-card { padding: 28px 20px 24px; }
.profile-section { padding: 6px 0; margin-bottom: 16px; }
.search-box { height: 54px; }
.section-title { margin: 26px 0 14px; }
main, .page { padding-left: 20px; padding-right: 20px; }

/* ── V6.0 C. Card Depth (inner highlight + soft ambient shadow) ── */
.wb-card,
.wb-guest-card,
.profile-section,
.card,
.panel,
.search-box,
.modal-card,
.glass-card {
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.55),
    0 6px 24px rgba(var(--teal-rgb),.07),
    0 2px 6px rgba(var(--teal-rgb),.04) !important;
}
[data-theme="dark"] .wb-card,
[data-theme="dark"] .wb-guest-card,
[data-theme="dark"] .profile-section,
[data-theme="dark"] .card,
[data-theme="dark"] .panel,
[data-theme="dark"] .search-box,
[data-theme="dark"] .modal-card,
[data-theme="dark"] .glass-card {
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.06),
    0 8px 28px rgba(0,0,0,.16),
    0 2px 8px rgba(0,0,0,.1) !important;
}

/* Card hover lift (desktop only — no touch conflict) */
@media (hover: hover) {
  .wb-card, .profile-section, .card, .panel, .search-box {
    transition: transform .45s var(--spring), box-shadow .45s var(--spring);
  }
  .wb-card:hover, .profile-section:hover, .card:hover, .panel:hover, .search-box:hover {
    transform: translateY(-2px);
  }
}

/* ── V6.0 D. Micro-motion (transform/opacity only) ── */
.app-icon-card .icon-wrap { transition: transform .4s var(--spring-soft), box-shadow .4s var(--spring); }
.app-icon-card:active .icon-wrap { transform: scale(.9); }
@media (hover: hover) {
  .app-icon-card:hover .icon-wrap { transform: translateY(-3px) scale(1.06); box-shadow: 0 10px 26px rgba(var(--teal-rgb),.4); }
  .app-icon-card:hover .icon-wrap::after { transform: translateY(-2px); }
}
.app-icon-card .icon-wrap::after { transition: transform .4s var(--spring); }
button:active, .wb-guest-btn:active, .wb-bot-btn:active, .wb-todo-add button:active, .add-btn:active { transform: scale(.96); }
.tab-item .tab-icon { transition: transform .35s var(--spring-soft), background .25s; }
.tab-item:active .tab-icon { transform: scale(.9); }

/* Entry reveal animation — driven by shared.js IntersectionObserver */
.js-reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .7s var(--spring), transform .7s var(--spring);
  will-change: opacity, transform;
}
.js-reveal.js-reveal-in {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .js-reveal { opacity: 1; transform: none; transition: none; }
}

/* ── V6.0 E. Detail polish ── */
/* Bottom tab active pill */
.tab-item.active .tab-icon {
  border-radius: 10px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.5), 0 4px 12px rgba(var(--teal-rgb),.18);
}
[data-theme="dark"] .tab-item.active .tab-icon { box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 4px 12px rgba(0,0,0,.25); }
/* Search focus glow */
.search-box:focus-within {
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.55),
    0 0 0 3px rgba(var(--teal-rgb),.12),
    0 8px 26px rgba(var(--teal-rgb),.16) !important;
}
[data-theme="dark"] .search-box:focus-within {
  box-shadow: 0 0 0 3px rgba(var(--teal-rgb),.2), 0 8px 26px rgba(0,0,0,.3) !important;
}
/* Avatar / logo glass highlight */
.profile-avatar,
.wb-bot-avatar,
.logo {
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.25),
    0 8px 22px rgba(var(--teal-rgb),.32);
}
/* Section eyebrow micro-style */
.wb-advice-label { letter-spacing: .8px; }
/* Rounded harmony */
.wb-card, .wb-guest-card, .profile-section, .card, .panel { border-radius: 18px; }
.app-icon-card .icon-wrap { border-radius: 17px; }
/* Todo item refinement */
.wb-todo-item { border-radius: 12px; padding: 11px 13px; transition: background .25s; }
.wb-todo-item:active { background: rgba(var(--teal-rgb),.09); }
/* Empty state icon presence */
.empty-icon { opacity: .9; filter: drop-shadow(0 4px 10px rgba(var(--teal-rgb),.18)); }

/* Banned-pattern guard: no harsh drop shadows on text, only soft feather */
[data-theme="dark"] body, [data-theme="dark"] p, [data-theme="dark"] span, [data-theme="dark"] h1, [data-theme="dark"] h2, [data-theme="dark"] h3 {
  text-shadow: 0 1px 2px rgba(0,0,0,.5);
}

/* ==================== V6.1 模型设置弹窗 ==================== */
.llm-overlay {
  position: fixed; inset: 0; z-index: 1200;
  display: flex; align-items: center; justify-content: center;
  background: rgba(10,25,24,.45); backdrop-filter: blur(6px);
  padding: 16px;
}
.llm-modal {
  width: 100%; max-width: 440px; max-height: 92vh; overflow: auto;
  background: var(--card-bg, rgba(255,255,255,.92));
  border: 1px solid var(--stroke-teal, rgba(13,148,136,.25));
  border-radius: 20px; box-shadow: 0 20px 60px rgba(0,0,0,.22);
  color: var(--ink, #0f3d3a);
}
[data-theme="dark"] .llm-modal { background: rgba(24,30,28,.92); }
.llm-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px 12px; border-bottom: 1px solid var(--stroke-teal, rgba(13,148,136,.2));
}
.llm-head h3 { margin: 0; font-size: 17px; font-weight: 800; }
.llm-close {
  border: none; background: rgba(var(--teal-rgb),.12); color: var(--teal-700,#0f766e);
  width: 30px; height: 30px; border-radius: 50%; cursor: pointer; font-size: 14px; line-height: 1;
}
.llm-body { padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; }
.llm-label { font-size: 12px; font-weight: 700; color: var(--muted, #5f7d7a); margin-top: 6px; letter-spacing: .3px; }
.llm-input {
  width: 100%; padding: 11px 13px; border-radius: 12px;
  border: 1.5px solid var(--stroke-teal, rgba(13,148,136,.3));
  background: var(--input-bg, rgba(255,255,255,.8)); color: var(--ink, #0f3d3a);
  font-size: 14px; outline: none; box-sizing: border-box;
}
.llm-input:focus { border-color: var(--teal, #0d9488); box-shadow: 0 0 0 3px rgba(var(--teal-rgb),.14); }
.llm-current {
  padding: 11px 13px; border-radius: 12px; font-size: 13px; font-weight: 700;
  background: rgba(var(--teal-rgb),.1); color: var(--teal-700,#0f766e);
}
.llm-current-user { background: rgba(220,38,38,.08); color: #b91c1c; }
.llm-tip { font-size: 12px; color: var(--muted, #5f7d7a); line-height: 1.5; margin: 2px 0 4px; }
.llm-guide-link {
  font-size: 13px; font-weight: 700; text-decoration: none; margin: 4px 0 2px;
  color: var(--teal-700,#0f766e); display: inline-block; padding: 6px 12px;
  border-radius: 999px; background: rgba(var(--teal-rgb),.08); border: 1px solid rgba(var(--teal-rgb),.22);
  transition: background .2s, transform .15s;
}
.llm-guide-link:hover { background: rgba(var(--teal-rgb),.16); }
.llm-guide-link:active { transform: scale(.97); }
/* 建议使用自带 API 提醒弹窗（毛玻璃） */
.llm-remind-overlay { z-index: 1300; background: rgba(8,20,19,.5); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.llm-remind-modal { max-width: 360px; }
.llm-remind-text { font-size: 14px; line-height: 1.65; color: var(--ink,#0f3d3a); padding: 4px 0 6px; }
.llm-remind-norepeat { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 13px; color: var(--muted,#5f7d7a); cursor: pointer; }
.llm-remind-norepeat input { width: 16px; height: 16px; min-height: 0; accent-color: var(--teal,#0d9488); }
.llm-msg { font-size: 13px; min-height: 18px; margin-top: 4px; }
.llm-msg-ok { color: #15803d; }
.llm-msg-err { color: #b91c1c; }
.llm-msg-warn { color: #b45309; }
.llm-msg-info { color: var(--muted, #5f7d7a); }
.llm-chip {
  display: inline-block; margin: 3px; padding: 5px 10px; border-radius: 999px; cursor: pointer;
  background: rgba(var(--teal-rgb),.1); color: var(--teal-700,#0f766e); font-size: 12px;
  border: 1px solid rgba(var(--teal-rgb),.25); max-width: 100%; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; vertical-align: middle;
}
.llm-chip:active { transform: scale(.96); }
.llm-models { margin-top: 2px; }
.llm-foot {
  display: flex; align-items: center; gap: 8px; padding: 12px 18px 16px;
  border-top: 1px solid var(--stroke-teal, rgba(13,148,136,.2));
}
.llm-btn {
  border: none; border-radius: 999px; padding: 10px 16px; font-size: 13px; font-weight: 700;
  cursor: pointer; transition: transform .15s, box-shadow .2s; flex-shrink: 0;
}
.llm-btn:active { transform: scale(.96); }
.llm-btn-primary { background: var(--teal, #0d9488); color: #fff; box-shadow: 0 6px 16px rgba(var(--teal-rgb),.3); }
.llm-btn-ghost { background: rgba(var(--teal-rgb),.12); color: var(--teal-700,#0f766e); }
.llm-btn-danger { background: rgba(220,38,38,.1); color: #b91c1c; }
@media (max-width: 640px) {
  .llm-modal { max-width: 100%; }
}

/* ==================== V6.1.2 编辑日程毛玻璃弹窗 ==================== */
.task-overlay {
  position: fixed; inset: 0; z-index: 1250;
  display: flex; align-items: center; justify-content: center;
  background: rgba(10,25,24,.45); backdrop-filter: blur(6px);
  padding: 16px;
}
.task-modal {
  width: 100%; max-width: 420px; max-height: 92vh; overflow: auto;
  background: var(--card-bg, rgba(255,255,255,.92));
  border: 1px solid var(--stroke-teal, rgba(13,148,136,.25));
  border-radius: 20px; box-shadow: 0 20px 60px rgba(0,0,0,.22);
  color: var(--ink, #0f3d3a);
}
[data-theme="dark"] .task-modal { background: rgba(24,30,28,.92); }
.task-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px 12px; border-bottom: 1px solid var(--stroke-teal, rgba(13,148,136,.2));
}
.task-head h3 { margin: 0; font-size: 17px; font-weight: 800; }
.task-close {
  border: none; background: rgba(var(--teal-rgb),.12); color: var(--teal-700,#0f766e);
  width: 30px; height: 30px; border-radius: 50%; cursor: pointer; font-size: 14px; line-height: 1;
}
.task-body { padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; }
.task-label { font-size: 12px; font-weight: 700; color: var(--muted, #5f7d7a); margin-top: 6px; letter-spacing: .3px; }
.task-input {
  width: 100%; padding: 11px 13px; border-radius: 12px;
  border: 1.5px solid var(--stroke-teal, rgba(13,148,136,.3));
  background: var(--input-bg, rgba(255,255,255,.8)); color: var(--ink, #0f3d3a);
  font-size: 14px; outline: none; box-sizing: border-box;
}
.task-input:focus { border-color: var(--teal, #0d9488); box-shadow: 0 0 0 3px rgba(var(--teal-rgb),.14); }
.task-row { display: flex; gap: 10px; }
.task-msg { font-size: 13px; min-height: 18px; margin-top: 4px; color: #b91c1c; }
.task-foot {
  display: flex; align-items: center; gap: 8px; padding: 12px 18px 16px;
  border-top: 1px solid var(--stroke-teal, rgba(13,148,136,.2));
}
.task-btn {
  border: none; border-radius: 999px; padding: 10px 16px; font-size: 13px; font-weight: 700;
  cursor: pointer; transition: transform .15s, box-shadow .2s; flex-shrink: 0;
}
.task-btn:active { transform: scale(.96); }
.task-btn-primary { background: var(--teal, #0d9488); color: #fff; box-shadow: 0 6px 16px rgba(var(--teal-rgb),.3); }
.task-btn-ghost { background: rgba(var(--teal-rgb),.12); color: var(--teal-700,#0f766e); }
@media (max-width: 640px) { .task-modal { max-width: 100%; } }

/* ═══════════════════════════════════════════
   XBiao Motion System V7.0
   Tokens · Tab transitions · Press physics · Feedback
   ═══════════════════════════════════════════ */

/* ── F0 Motion tokens: single source for timing/easing/rise ── */
:root {
  --dur-fast: 120ms;
  --dur-base: 200ms;
  --dur-slow: 340ms;
  --dur-enter: 460ms;
  --ease-spring: cubic-bezier(.22,1,.36,1);
  --ease-enter: cubic-bezier(.16,1,.3,1);
  --ease-exit: cubic-bezier(.4,0,1,1);
  --rise: 8px;
  --rise-md: 16px;
  --rise-lg: 24px;
}

/* ── V7.2 移动端安全兜底：底部按钮永远可点（设备无关，高度由 shared.js 实测；V7.2.5 起留白再加冗余量，彻底避免内容贴住 tab 栏） ── */
@media (max-width: 640px) {
  /* 1. tab 栏提到最高层，防止任何内容/弹层残留遮挡 */
  .tab-bar { z-index: 1000; }
  /* 2. 滚动容器底部统一用实测变量留安全余量 + 12px 冗余空白，内容滚到底也不被 tab 栏盖住 */
  main, .page, body, #mainScroll, [id$="Scroll"], .content-area, .tab-content {
    padding-bottom: calc(var(--xb-tab-h, 88px) + env(safe-area-inset-bottom, 0px) + 12px) !important;
  }
  /* 2b. 锚点滚动/跳转也留出 tab 栏空间，避免滚到目标位置仍被遮挡 */
  main, .page, body, html {
    scroll-padding-bottom: calc(var(--xb-tab-h, 88px) + env(safe-area-inset-bottom, 0px) + 12px);
  }
  /* 3. 禁止 iOS 点击延迟/幽灵点击 */
  .tab-bar .tab-item { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
  /* 4. 输入法弹起时 fixed 定位异常兜底：用 100dvh 替代 100vh */
  .page, .desktop-sidebar { height: 100dvh; }
}

.tab-content { --tab-dir: 1; }
.tab-content.tab-enter {
  animation: tabEnter var(--dur-enter) var(--ease-enter) both;
}
.tab-content.tab-leave {
  animation: tabLeave calc(var(--dur-enter) * .55) var(--ease-exit) both;
}
@keyframes tabEnter {
  from { opacity: 0; transform: translateX(calc(var(--tab-dir, 1) * var(--rise-lg))) scale(.985); }
  to   { opacity: 1; transform: translateX(0) scale(1); }
}
@keyframes tabLeave {
  from { opacity: 1; transform: translateX(0) scale(1); }
  to   { opacity: 0; transform: translateX(calc(var(--tab-dir, 1) * -14px)) scale(.99); }
}

/* ── F1 Sliding Tab indicator (bottom bar) ──
   shared.js 计算宽度 100%/n 并注入 --ti 序号 */
.tab-bar-inner {
  position: relative;
}
.tab-indicator {
  position: absolute;
  top: 6px;
  bottom: 6px;
  left: 0;
  width: 25%;
  border-radius: 14px;
  background: rgba(var(--teal-rgb), .14);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 4px 12px rgba(var(--teal-rgb), .12);
  transform: translateX(calc(var(--ti, 0) * 100%));
  transition: transform var(--dur-slow) var(--ease-spring), background .3s;
  pointer-events: none;
  z-index: 0;
}
[data-theme="dark"] .tab-indicator {
  background: rgba(var(--teal-rgb), .18);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 4px 12px rgba(0,0,0,.22);
}
.tab-bar-inner .tab-item { position: relative; z-index: 1; }

/* ── F2 Unified press physics (transform only, spring) ── */
button:active:not(:disabled),
a[href]:active,
.card:active,
.app-icon-card:active,
.tab-item:active,
.wb-todo-add button:active,
.send-btn:active:not(:disabled),
.plus-btn:active {
  transform: scale(.97);
  transition-duration: var(--dur-fast);
}
/* icon / fab / avatar get a deeper tactile dip */
.app-icon-card:active .icon-wrap,
.tab-item:active .tab-icon,
.icon-btn:active,
.theme-toggle:active,
.user-avatar:active,
.ghost-btn:active,
.back-btn:active {
  transform: scale(.9);
  transition-duration: var(--dur-fast);
}

/* ── F2 Checkbox stroke-draw (workbench todo / reminder) ── */
.wb-todo-check span,
.rm-check span {
  position: relative;
  overflow: hidden;
}
.wb-todo-check span svg,
.rm-check span svg {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 12px;
  height: 12px;
  fill: none;
  stroke: #fff;
  stroke-width: 3.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 24;
  stroke-dashoffset: 24;
  transition: stroke-dashoffset .28s var(--ease-enter);
  pointer-events: none;
}
.wb-todo-check input:checked + span svg,
.rm-check input:checked + span svg {
  stroke-dashoffset: 0;
}
/* completed item gives a tiny settle bounce */
.wb-todo-item.wb-just-done { animation: donePop .38s var(--ease-spring); }
@keyframes donePop {
  0%   { transform: scale(1); }
  45%  { transform: scale(1.02); }
  100% { transform: scale(1); }
}

/* ── F6 Reduced motion: collapse everything to static/opacity-only ── */
@media (prefers-reduced-motion: reduce) {
  .tab-content.tab-enter,
  .tab-content.tab-leave { animation: none !important; }
  .tab-indicator { transition: none !important; }
  .wb-todo-item.wb-just-done,
  .done-pop { animation: none !important; }
  .btn-loading::after,
  .typing i { animation: none !important; }
  button:active:not(:disabled),
  a[href]:active,
  .card:active,
  .app-icon-card:active,
  .tab-item:active { transform: none !important; transition-duration: 0ms !important; }
}

/* ── F2 Button loading state ── */
.btn-loading {
  position: relative;
  color: transparent !important;
  pointer-events: none;
}
.btn-loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 18px;
  height: 18px;
  margin: -9px 0 0 -9px;
  border-radius: 50%;
  border: 2px solid rgba(var(--teal-rgb), .3);
  border-top-color: currentColor;
  animation: xbSpin .7s linear infinite;
}
.btn-loading.btn-solid::after { border-color: rgba(255,255,255,.35); border-top-color: #fff; }
@keyframes xbSpin { to { transform: rotate(360deg); } }

/* ═══════════════════════════════════════════
   XBiao Base Layer V7.0 — Decorative background
   Single source for .bg-deco / .deco / .d1-.d3 / .ring / .dots
   (previously copy-pasted verbatim into every page)
   ═══════════════════════════════════════════ */
.bg-deco { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.deco { position: absolute; border-radius: 50%; filter: blur(72px); }
.d1 { width: 480px; height: 480px; top: -170px; left: -130px; background: radial-gradient(circle, rgba(var(--teal-rgb),.42), transparent 70%); }
.d2 { width: 400px; height: 400px; bottom: -150px; right: -110px; background: radial-gradient(circle, rgba(var(--teal-rgb),.5), transparent 70%); }
.d3 { width: 240px; height: 240px; top: 36%; left: 60%; background: radial-gradient(circle, rgba(var(--teal-rgb),.95), transparent 70%); }
.ring { width: 360px; height: 360px; top: 10%; right: 5%; border: 1.6px dashed rgba(20,184,166,.26); filter: none; }
.dots { position: absolute; width: 130px; height: 130px; top: 22%; left: 10%; background-image: radial-gradient(rgba(var(--teal-rgb),.38) 1.6px, transparent 1.6px); background-size: 15px 15px; filter: none; opacity: .55; }

/* ═══════════════════════════════════════════
   XBiao F3 — Scroll-driven motion
   Deco parallax (transform-only) + count-up numbers
   ═══════════════════════════════════════════ */
.bg-deco .deco,
.bg-deco .ring,
.bg-deco .dots {
  will-change: transform;
}
.js-count { font-variant-numeric: tabular-nums; }
@media (prefers-reduced-motion: reduce) {
  .bg-deco .deco,
  .bg-deco .ring,
  .bg-deco .dots { will-change: auto; }
}

/* ═══════════════════════════════════════════
   XBiao V7.0 — 首页工作台时间轴（今日日程+提醒可视化）
   ═══════════════════════════════════════════ */
.wb-tl-summary {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: 12.5px; color: var(--muted, #5f7d7a);
  padding: 2px 0 10px;
}
.wb-timeline {
  display: flex; flex-direction: column;
  margin-top: 6px;
}
.wb-tl-item {
  display: flex; align-items: stretch; gap: 10px;
  padding: 7px 0;
  position: relative;
}
.wb-tl-time {
  flex-shrink: 0; width: 44px;
  font-size: 12px; font-weight: 600; color: var(--muted, #5f7d7a);
  padding-top: 12px; text-align: right;
  font-variant-numeric: tabular-nums;
}
.wb-tl-line {
  position: relative; flex-shrink: 0; width: 12px;
  display: flex; justify-content: center;
}
.wb-tl-line::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 2px;
  margin-left: -1px;
  background: rgba(var(--teal-rgb), .18);
}
.wb-tl-item:first-child .wb-tl-line::before { top: 14px; }
.wb-tl-item:last-child .wb-tl-line::before { bottom: auto; height: 24px; }
.wb-tl-line i {
  position: relative; z-index: 1; margin-top: 14px;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--teal-500, #14b8a6);
  box-shadow: 0 0 0 3px rgba(var(--teal-rgb), .18);
}
.wb-tl-line.done i { background: #16a34a; box-shadow: 0 0 0 3px rgba(22,163,74,.15); }
.wb-tl-body {
  flex: 1; min-width: 0;
  display: flex; align-items: flex-start; gap: 8px;
  background: rgba(var(--teal-rgb), .05);
  border-radius: 12px; padding: 8px 10px;
  border: 1px solid rgba(var(--teal-rgb), .1);
}
.wb-tl-body .wb-todo-text { flex: 1; min-width: 0; font-size: 13.5px; line-height: 1.45; }
.wb-tl-bell { flex-shrink: 0; font-size: 15px; margin-top: 1px; }
.wb-tl-body .wb-todo-check { margin-top: 1px; }
/* 超出时默认截断，点击"显示全部"展开 */
.wb-timeline .wb-tl-item:nth-child(n+9) { display: none; }
.wb-timeline.wb-tl-show-all .wb-tl-item:nth-child(n+9) { display: flex; }
.wb-timeline-toggle { text-align: center; margin-top: 8px; }
.wb-timeline-toggle button {
  padding: 7px 16px; border: 1px solid rgba(var(--teal-rgb), .3); border-radius: 999px;
  background: rgba(var(--teal-rgb), .08); color: var(--teal-700, #0f766e);
  font-size: 12.5px; font-weight: 600; cursor: pointer;
}
[data-theme="dark"] .wb-timeline-toggle button { color: var(--teal-400, #2dd4bf); }
.wb-timeline-toggle button:active { transform: scale(.96); }
.planner-card { padding: 18px; }

/* ═══════════════════════════════════════════
   XBiao V7.0 — 助手 agent 化气泡（thinking / tool）
   ═══════════════════════════════════════════ */
.bubble.thinking {
  align-self: flex-start;
  background: rgba(var(--teal-rgb), .07);
  color: var(--muted, #5f7d7a);
  border: 1px dashed rgba(var(--teal-rgb), .28);
  font-style: italic;
  font-size: 12.5px;
}
.bubble.tool {
  align-self: flex-start;
  min-width: 0;
  font-size: 13px;
}
.bubble.tool .tool-row { display: flex; align-items: flex-start; gap: 8px; }
.bubble.tool .tool-ico { flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; background: rgba(var(--teal-rgb), .12); margin-top: 1px; }
.bubble.tool.ok { border-color: rgba(22,163,74,.3); }
.bubble.tool.fail { border-color: rgba(220,38,38,.35); }
.bubble.tool .tool-title { font-weight: 700; color: var(--ink, #0f3d3a); font-size: 13px; }
.bubble.tool .tool-detail { font-size: 12px; color: var(--muted, #5f7d7a); margin-top: 2px; white-space: pre-wrap; }
.bubble.tool .tool-collapse {
  display: inline-block; margin-top: 5px; font-size: 11.5px; color: var(--teal-600, #0d9488);
  cursor: pointer; opacity: .75;
}
.bubble.tool .tool-collapse:hover { opacity: 1; }
.bubble.tool .tool-full { display: none; font-size: 11.5px; color: var(--muted, #5f7d7a); margin-top: 4px; white-space: pre-wrap; word-break: break-all; }
.bubble.tool.expanded .tool-full { display: block; }
.bubble.tool.expanded .tool-collapse { display: none; }
[data-theme="dark"] .bubble.tool { background: rgba(13,40,37,.92); }
[data-theme="dark"] .bubble.thinking { background: rgba(var(--teal-rgb), .1); color: #8ab4af; }

/* ═══════════════════════════════════════════
   XBiao V7.2 — 全站质感升级层
   Premium glass · layered color shadows · dimensional icons
   Safe-area (iPhone notch / home bar) + mobile comfort
   ═══════════════════════════════════════════ */
:root {
  /* ── safe-area (iPhone 非矩形屏幕) ── */
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --sal: env(safe-area-inset-left, 0px);
  --sar: env(safe-area-inset-right, 0px);
  /* ── layered shadows (ambient + contact + hue tint) ── */
  --shadow-sm: 0 1px 2px rgba(17,24,39,.04), 0 6px 18px rgba(var(--teal-rgb),.08);
  --shadow-md: 0 2px 6px rgba(17,24,39,.05), 0 14px 40px rgba(var(--teal-rgb),.14);
  --shadow-lg: 0 4px 12px rgba(17,24,39,.08), 0 22px 56px rgba(var(--teal-rgb),.2);
  --glow: 0 0 0 3px rgba(var(--teal-rgb),.14), 0 10px 28px rgba(var(--teal-rgb),.22);
  /* ── semantic status colors ── */
  --ok: #16a34a; --ok-bg: rgba(22,163,74,.1);
  --warn: #d97706; --warn-bg: rgba(217,119,6,.1);
  --danger: #dc2626; --danger-bg: rgba(220,38,38,.1);
}
/* body 顶部/左右安全区：桌面 env()=0 无影响，iPhone 全屏 PWA 时避让刘海/横条 */
body {
  padding-top: var(--sat);
  padding-left: var(--sal);
  padding-right: var(--sar);
}
/* 柔和环境光晕层（不遮挡内容，z-index 置于 .page 之下） */
body::before {
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(1200px 620px at 82% -12%, rgba(var(--teal-rgb),.10), transparent 62%),
    radial-gradient(860px 520px at -10% 34%, rgba(var(--teal-rgb),.12), transparent 58%),
    radial-gradient(700px 420px at 50% 110%, rgba(var(--teal-rgb),.06), transparent 60%);
}
[data-theme="dark"] body::before {
  background:
    radial-gradient(1200px 620px at 82% -12%, rgba(var(--teal-rgb),.14), transparent 62%),
    radial-gradient(860px 520px at -10% 34%, rgba(var(--teal-rgb),.16), transparent 58%),
    radial-gradient(700px 420px at 50% 110%, rgba(0,0,0,.35), transparent 62%);
}
body::after { display: none; }

/* ── V7.2 glass recipe：统一通透玻璃 + 内高光 + 顶部光线 ── */
.wb-card, .wb-guest-card, .profile-section, .card, .panel, .search-box,
.modal-card, .icp-card, .glass-card, .planner-card, .sheet, .rm-item {
  backdrop-filter: blur(26px) saturate(1.8);
  -webkit-backdrop-filter: blur(26px) saturate(1.8);
}
.wb-card, .wb-guest-card, .profile-section, .card:not(.main), .panel, .glass-card, .planner-card {
  background: linear-gradient(160deg, rgba(255,255,255,.78), rgba(255,255,255,.52));
  border-color: rgba(255,255,255,.85);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.7),
    inset 0 -1px 0 rgba(255,255,255,.12),
    0 2px 8px rgba(31,41,55,.04),
    0 12px 32px rgba(var(--teal-rgb),.10);
}
[data-theme="dark"] .wb-card,
[data-theme="dark"] .wb-guest-card,
[data-theme="dark"] .profile-section,
[data-theme="dark"] .card:not(.main),
[data-theme="dark"] .panel,
[data-theme="dark"] .glass-card,
[data-theme="dark"] .planner-card {
  background: linear-gradient(160deg, rgba(15,34,34,.78), rgba(15,34,34,.58));
  border-color: rgba(var(--teal-rgb),.2);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.08),
    0 2px 8px rgba(0,0,0,.16),
    0 14px 36px rgba(0,0,0,.32);
}
/* 强调卡保留主题渐变但增强层次 */
.card.main {
  background: linear-gradient(150deg, rgba(var(--teal-rgb),.2), rgba(var(--teal-rgb),.05));
  border-color: rgba(var(--teal-rgb),.3);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.5), 0 2px 8px rgba(31,41,55,.04), 0 14px 36px rgba(var(--teal-rgb),.16);
}
[data-theme="dark"] .card.main {
  background: linear-gradient(150deg, rgba(var(--teal-rgb),.28), rgba(var(--teal-rgb),.1));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 14px 36px rgba(0,0,0,.32);
}
/* hover 上浮增强（仅桌面，避免触摸冲突） */
@media (hover: hover) {
  .wb-card:hover, .profile-section:hover, .card:hover, .panel:hover, .search-box:hover, .glass-card:hover {
    transform: translateY(-3px);
    box-shadow:
      inset 0 1px 0 rgba(255,255,255,.7),
      0 6px 16px rgba(31,41,55,.06),
      0 18px 44px rgba(var(--teal-rgb),.18);
  }
  [data-theme="dark"] .wb-card:hover, [data-theme="dark"] .profile-section:hover,
  [data-theme="dark"] .card:hover, [data-theme="dark"] .panel:hover,
  [data-theme="dark"] .search-box:hover, [data-theme="dark"] .glass-card:hover {
    box-shadow:
      inset 0 1px 0 rgba(255,255,255,.1),
      0 6px 16px rgba(0,0,0,.2),
      0 20px 48px rgba(0,0,0,.4);
  }
}

/* ── V7.2 图标立体化：对角渐变 + 内高光 + 底部投影 ── */
.card .icon, .app-icon-card .icon-wrap, .wb-bot-avatar, .profile-avatar, .logo, .icp-card .icp-icon,
.sr-icon, .pi-icon, .qm-icon, .wb-sched-time {
  background-image: linear-gradient(145deg, rgba(255,255,255,.22), rgba(255,255,255,0) 42%), linear-gradient(135deg, var(--teal-500), var(--teal-700));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.38), inset 0 -1px 0 rgba(0,0,0,.08), 0 6px 16px rgba(var(--teal-rgb),.3);
  color: #fff;
}
[data-theme="dark"] .card .icon, [data-theme="dark"] .app-icon-card .icon-wrap,
[data-theme="dark"] .wb-bot-avatar, [data-theme="dark"] .profile-avatar,
[data-theme="dark"] .logo, [data-theme="dark"] .icp-card .icp-icon {
  background-image: linear-gradient(145deg, rgba(255,255,255,.14), rgba(255,255,255,0) 42%), linear-gradient(135deg, var(--teal-600), var(--teal-700));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 6px 16px rgba(0,0,0,.3);
}
.app-icon-card .icon-wrap { background-color: var(--teal-600); }
/* 主按钮：渐变 + 内高光 */
.btn.primary, .wb-guest-btn, .wb-bot-btn, .wb-todo-add button, .add-btn, .send-btn,
.pc-primary, .planner-compose button, .atab.active, .icp-card .icp-close {
  background-image: linear-gradient(145deg, var(--teal-500), var(--teal-700));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.28), 0 6px 18px rgba(var(--teal-rgb),.34);
}
[data-theme="dark"] .btn.primary, [data-theme="dark"] .wb-guest-btn, [data-theme="dark"] .wb-bot-btn,
[data-theme="dark"] .wb-todo-add button, [data-theme="dark"] .add-btn, [data-theme="dark"] .send-btn,
[data-theme="dark"] .pc-primary, [data-theme="dark"] .planner-compose button,
[data-theme="dark"] .atab.active, [data-theme="dark"] .icp-card .icp-close {
  box-shadow: inset 0 1px 0 rgba(255,255,255,.14), 0 6px 18px rgba(0,0,0,.32);
}
.search-box:focus-within {
  border-color: var(--teal-400);
  box-shadow: var(--glow);
}
[data-theme="dark"] .search-box:focus-within { box-shadow: 0 0 0 3px rgba(var(--teal-rgb),.2), 0 10px 30px rgba(0,0,0,.35); }

/* ── V7.2 桌面侧边栏 active 指示条 ── */
@media (min-width: 641px) {
  .desktop-sidebar .tab-item.active::before {
    content: ""; position: absolute; left: 0; top: 22%; bottom: 22%; width: 3px;
    border-radius: 999px; background: var(--teal-500);
    box-shadow: 0 0 10px rgba(var(--teal-rgb),.65);
  }
  .desktop-sidebar .tab-item.active { box-shadow: inset 0 1px 0 rgba(255,255,255,.35); }
}

/* ── V7.2 底部 tab 安全区 + 激活胶囊质感 ── */
.tab-bar { padding-bottom: var(--sab); }
.tab-bar-inner { padding-top: max(0px, env(safe-area-inset-top, 0px) * 0); }
.tab-item.active .tab-icon {
  box-shadow: inset 0 1px 0 rgba(255,255,255,.55), 0 4px 12px rgba(var(--teal-rgb),.22);
}
[data-theme="dark"] .tab-item.active .tab-icon {
  box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 4px 12px rgba(0,0,0,.28);
}

/* ── V7.2 时间轴 / 列表条目玻璃化 ── */
.wb-tl-body {
  background: linear-gradient(160deg, rgba(255,255,255,.62), rgba(255,255,255,.34));
  border-color: rgba(var(--teal-rgb),.14);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.5);
}
[data-theme="dark"] .wb-tl-body {
  background: linear-gradient(160deg, rgba(15,34,34,.6), rgba(15,34,34,.42));
  border-color: rgba(var(--teal-rgb),.18);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
}
.wb-todo-item, .planner-step, .rm-item { background: rgba(var(--teal-rgb),.05); }

/* ── V7.2 移动端舒适性：图标网格窄屏 3 列 + 不溢出 ── */
@media (max-width: 520px) {
  .app-grid { grid-template-columns: repeat(3, 1fr); gap: 14px 8px; }
  .app-icon-card .icon-wrap { width: 58px; height: 58px; flex-shrink: 0; }
  .app-icon-card .label { max-width: 84px; }
  .card { padding: 14px 14px; }
  .card .icon { width: 48px; height: 48px; min-width: 48px; }
  .card .text-group { min-width: 0; }
  .card .name, .card .desc { overflow-wrap: break-word; }
}

/* ── V7.2 强制阴影覆盖（V6 层 box-shadow 带 !important，这里同权覆盖） ── */
.wb-card, .wb-guest-card, .profile-section, .card, .panel, .search-box,
.modal-card, .icp-card, .glass-card, .planner-card, .sheet {
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.7),
    inset 0 -1px 0 rgba(255,255,255,.12),
    0 2px 8px rgba(31,41,55,.04),
    0 12px 32px rgba(var(--teal-rgb),.10) !important;
}
[data-theme="dark"] .wb-card,
[data-theme="dark"] .wb-guest-card,
[data-theme="dark"] .profile-section,
[data-theme="dark"] .card,
[data-theme="dark"] .panel,
[data-theme="dark"] .search-box,
[data-theme="dark"] .modal-card,
[data-theme="dark"] .icp-card,
[data-theme="dark"] .glass-card,
[data-theme="dark"] .planner-card,
[data-theme="dark"] .sheet {
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.08),
    0 2px 8px rgba(0,0,0,.16),
    0 14px 36px rgba(0,0,0,.32) !important;
}
.card.main {
  box-shadow: inset 0 1px 0 rgba(255,255,255,.5), 0 2px 8px rgba(31,41,55,.04), 0 14px 36px rgba(var(--teal-rgb),.16) !important;
}
[data-theme="dark"] .card.main {
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 14px 36px rgba(0,0,0,.32) !important;
}
@media (hover: hover) {
  .wb-card:hover, .profile-section:hover, .card:hover, .panel:hover, .search-box:hover, .glass-card:hover {
    box-shadow:
      inset 0 1px 0 rgba(255,255,255,.7),
      0 6px 16px rgba(31,41,55,.06),
      0 18px 44px rgba(var(--teal-rgb),.18) !important;
  }
  [data-theme="dark"] .wb-card:hover, [data-theme="dark"] .profile-section:hover,
  [data-theme="dark"] .card:hover, [data-theme="dark"] .panel:hover,
  [data-theme="dark"] .search-box:hover, [data-theme="dark"] .glass-card:hover {
    box-shadow:
      inset 0 1px 0 rgba(255,255,255,.1),
      0 6px 16px rgba(0,0,0,.2),
      0 20px 48px rgba(0,0,0,.4) !important;
  }
}
.card .icon, .app-icon-card .icon-wrap, .wb-bot-avatar, .profile-avatar, .logo,
.icp-card .icp-icon, .sr-icon, .pi-icon, .qm-icon {
  box-shadow: inset 0 1px 0 rgba(255,255,255,.38), inset 0 -1px 0 rgba(0,0,0,.08), 0 6px 16px rgba(var(--teal-rgb),.3) !important;
}
[data-theme="dark"] .card .icon, [data-theme="dark"] .app-icon-card .icon-wrap,
[data-theme="dark"] .wb-bot-avatar, [data-theme="dark"] .profile-avatar,
[data-theme="dark"] .logo, [data-theme="dark"] .icp-card .icp-icon {
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 6px 16px rgba(0,0,0,.3) !important;
}

/* ── V7.2 图标渐变强制覆盖（V4.3 层对图标块用 background+box-shadow !important，这里同权覆盖） ── */
:root:not([data-theme="dark"]) .app-icon-card .icon-wrap,
:root:not([data-theme="dark"]) .search-result-item .sr-icon,
:root:not([data-theme="dark"]) .wb-bot-avatar,
:root:not([data-theme="dark"]) .card .icon,
:root:not([data-theme="dark"]) .icon-wrap,
:root:not([data-theme="dark"]) .icon-btn,
:root:not([data-theme="dark"]) .profile-avatar,
:root:not([data-theme="dark"]) .logo,
:root:not([data-theme="dark"]) .icp-card .icp-icon,
:root:not([data-theme="dark"]) .pi-icon,
:root:not([data-theme="dark"]) .qm-icon {
  background-image: linear-gradient(145deg, rgba(255,255,255,.22), rgba(255,255,255,0) 42%), linear-gradient(135deg, var(--teal-500), var(--teal-700)) !important;
  background-color: var(--teal-600) !important;
  color: #fff !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.38), inset 0 -1px 0 rgba(0,0,0,.08), 0 6px 16px rgba(var(--teal-rgb),.3) !important;
}
[data-theme="dark"] .app-icon-card .icon-wrap,
[data-theme="dark"] .search-result-item .sr-icon,
[data-theme="dark"] .wb-bot-avatar,
[data-theme="dark"] .card .icon,
[data-theme="dark"] .icon-wrap,
[data-theme="dark"] .icon-btn,
[data-theme="dark"] .profile-avatar,
[data-theme="dark"] .logo,
[data-theme="dark"] .icp-card .icp-icon,
[data-theme="dark"] .pi-icon,
[data-theme="dark"] .qm-icon {
  background-image: linear-gradient(145deg, rgba(255,255,255,.14), rgba(255,255,255,0) 42%), linear-gradient(135deg, var(--teal-600), var(--teal-700)) !important;
  background-color: var(--teal-700) !important;
  color: var(--teal-400) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 6px 16px rgba(0,0,0,.3) !important;
}

/* ── V7.2 卡片玻璃背景强制覆盖（V4.3 对 .card/.panel/.profile-section 用 background !important） ── */
:root:not([data-theme="dark"]) .card:not(.main),
:root:not([data-theme="dark"]) .panel,
:root:not([data-theme="dark"]) .profile-section,
:root:not([data-theme="dark"]) .glass-card,
:root:not([data-theme="dark"]) .planner-card,
:root:not([data-theme="dark"]) .search-box {
  background: linear-gradient(160deg, rgba(255,255,255,.78), rgba(255,255,255,.52)) !important;
  color: var(--ink) !important;
  border-color: rgba(255,255,255,.85) !important;
}
[data-theme="dark"] .card:not(.main),
[data-theme="dark"] .panel,
[data-theme="dark"] .profile-section,
[data-theme="dark"] .glass-card,
[data-theme="dark"] .planner-card,
[data-theme="dark"] .search-box {
  background: linear-gradient(160deg, rgba(15,34,34,.78), rgba(15,34,34,.58)) !important;
  color: var(--ink) !important;
  border-color: rgba(var(--teal-rgb),.2) !important;
}

/* ── V7.2 强调卡 .card.main 强制渐变覆盖 ── */
:root:not([data-theme="dark"]) .card.main {
  background: linear-gradient(150deg, rgba(var(--teal-rgb),.2), rgba(var(--teal-rgb),.05)) !important;
  color: var(--ink) !important;
  border-color: rgba(var(--teal-rgb),.3) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.5), 0 2px 8px rgba(31,41,55,.04), 0 14px 36px rgba(var(--teal-rgb),.16) !important;
}
[data-theme="dark"] .card.main {
  background: linear-gradient(150deg, rgba(var(--teal-rgb),.28), rgba(var(--teal-rgb),.1)) !important;
  color: var(--ink) !important;
  border-color: rgba(var(--teal-rgb),.28) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 14px 36px rgba(0,0,0,.32) !important;
}

/* ── V7.2 细节修复：空态时间轴竖线隐藏 + 对比度 + 重复 Logo ── */
.wb-timeline:has(.wb-empty) .wb-tl-line,
.wb-timeline:empty ~ * .wb-tl-line { display: none; }
/* 空态时不渲染竖线（无 .wb-tl-item 时整条线不可见） */
.wb-timeline:not(:has(.wb-tl-item)) .wb-tl-line { display: none; }
/* 辅助文字对比度提升（跨主题统一加深一档） */
:root:not([data-theme="dark"]) {
  --muted-strong: #4b6574;
}
[data-theme="dark"] { --muted-strong: #9db8b3; }
.wb-progress, .wb-empty, .wb-todo-detail, .planner-note, .ps-detail,
.section-title, .desc, .brand-en, .wb-bot-desc, .profile-email,
.rm-detail, .wb-guest-desc, .sheet-header h3 span, .muted {
  color: var(--muted-strong, var(--muted)) !important;
}
footer, .footer {
  color: #7d96a4 !important;
}
[data-theme="dark"] footer, [data-theme="dark"] .footer { color: #7da09b !important; }
footer a { color: var(--teal-600) !important; }
[data-theme="dark"] footer a { color: var(--teal-400) !important; }
/* 桌面端隐藏顶部重复品牌（侧边栏已有 Logo） */
@media (min-width: 641px) {
  body.has-sidebar header .brand, .desktop-sidebar ~ header .brand { display: none; }
}
/* 侧边栏与内容区层级分隔加强 */
@media (min-width: 641px) {
  .desktop-sidebar {
    border-right: 1px solid rgba(var(--teal-rgb),.14);
    box-shadow: inset -1px 0 0 rgba(255,255,255,.45), 12px 0 40px rgba(var(--teal-rgb),.07);
  }
  [data-theme="dark"] .desktop-sidebar {
    border-right: 1px solid rgba(var(--teal-rgb),.16);
    box-shadow: inset -1px 0 0 rgba(255,255,255,.04), 12px 0 40px rgba(0,0,0,.3);
  }
}

/* ── V7.2 移动端细节：隐藏常驻滚动条 + 副标题对比度 ── */
@media (max-width: 640px) {
  ::-webkit-scrollbar { width: 0 !important; height: 0 !important; }
  .home-hero-sub, #homeHeroSub, .wb-tl-summary, .hero p {
    color: var(--muted-strong, #4b6574) !important;
  }
}

/* ═══════════════════════════════════════════
   V7.2.1 移动端布局修正（真实手机视口）
   1) 去除 .page 双倍内边距 → header/tab 贴边铺满
   2) 顶部 tab 胶囊等分填满一行，不再左对齐留白/横向溢出
   3) 图标深浅关系修正：小图标恢复浅色调，深色大图标块用白图标
   ═══════════════════════════════════════════ */
@media (max-width: 640px) {
  .page {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  .assistant-tabs {
    display: flex !important;
    gap: 6px !important;
    padding: 8px 10px 0 !important;
    overflow-x: hidden !important;
  }
  .assistant-tabs .atab {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    padding: 8px 4px !important;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    justify-content: center;
    border-radius: 999px;
  }
}
/* 小图标恢复浅色 tint 风格（V4.3 语义：浅底深图标 / 深底浅图标） */
:root:not([data-theme="dark"]) .search-result-item .sr-icon,
:root:not([data-theme="dark"]) .pi-icon,
:root:not([data-theme="dark"]) .qm-icon,
:root:not([data-theme="dark"]) .icon-btn,
:root:not([data-theme="dark"]) .wb-sched-time {
  background: rgba(var(--teal-rgb), .1) !important;
  background-image: none !important;
  color: var(--teal-700) !important;
  box-shadow: none !important;
}
[data-theme="dark"] .search-result-item .sr-icon,
[data-theme="dark"] .pi-icon,
[data-theme="dark"] .qm-icon,
[data-theme="dark"] .icon-btn,
[data-theme="dark"] .wb-sched-time {
  background: rgba(var(--teal-rgb), .15) !important;
  background-image: none !important;
  color: var(--teal-400) !important;
  box-shadow: none !important;
}
/* 深色模式大图标块：白图标保证对比度（避免 teal-400 叠渐变发糊） */
[data-theme="dark"] .card .icon,
[data-theme="dark"] .app-icon-card .icon-wrap,
[data-theme="dark"] .wb-bot-avatar,
[data-theme="dark"] .profile-avatar,
[data-theme="dark"] .logo,
[data-theme="dark"] .icp-card .icp-icon {
  color: #fff !important;
}

/* ── V7.3 Codex 式：工具运行中气泡 ── */
.bubble.tool.running { border-color: rgba(var(--teal-rgb), .35); }
.bubble.tool.running .tool-ico { background: rgba(var(--teal-rgb), .18); animation: xbToolPulse 1.1s ease-in-out infinite; }
.bubble.tool.running .tool-title { color: var(--teal-600, #0d9488); }
[data-theme="dark"] .bubble.tool.running .tool-title { color: var(--teal-400, #2dd4bf); }
@keyframes xbToolPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .45; transform: scale(.86); }
}
