/* ============ 主题变量 ============ */
:root {
  --accent: #1f6feb;
  --accent-hover: #1558c0;
  --accent-soft: rgba(31, 111, 235, 0.12);
  --accent-soft-2: rgba(31, 111, 235, 0.15);
  --accent-glow: rgba(31, 111, 235, 0.25);

  --bg-app: #ffffff;
  --bg-card: #ffffff;
  --bg-card-2: #f8f9fa;
  --bg-input: rgba(255, 255, 255, 0.95);
  --bg-topbar: rgba(255, 255, 255, 0.72);
  --bg-tabbar: rgba(255, 255, 255, 0.72);
  --bg-bubble-ai: #e9e9eb;
  --bg-bubble-user: var(--accent);
  --bg-quote: rgba(240, 240, 245, 0.9);
  --bg-quote-bar: rgba(240, 240, 245, 0.95);
  --bg-tool: #f8f9fa;
  --bg-avatar: #f2f3f5;

  --text-main: #1f2329;
  --text-sub: #5a5f68;
  --text-dim: #8a8f99;
  --text-dim-2: #a8adb6;
  --text-disabled: #c4c9d0;

  --border: #eceef1;
  --border-2: #e0e3e8;
  --border-3: #f2f3f5;
  --divider: #eceef1;

  --toast-bg: rgba(0, 0, 0, 0.75);
  --modal-overlay: rgba(0, 0, 0, 0.4);
  --bubble-menu-bg: rgba(40, 40, 40, 0.95);
}

/* ============ 深色模式（仿微信暗色）============ */
[data-theme="dark"] {
  --bg-app: #191919;
  --bg-card: #252525;
  --bg-card-2: #2c2c2c;
  --bg-input: rgba(44, 44, 44, 0.95);
  --bg-topbar: rgba(37, 37, 37, 0.85);
  --bg-tabbar: rgba(37, 37, 37, 0.85);
  --bg-bubble-ai: #2c2c2c;
  --bg-bubble-user: var(--accent);
  --bg-quote: rgba(60, 60, 60, 0.6);
  --bg-quote-bar: rgba(60, 60, 60, 0.7);
  --bg-tool: #232323;
  --bg-avatar: #2c2c2c;

  --text-main: #e6e6e6;
  --text-sub: #b8b8b8;
  --text-dim: #8a8a8a;
  --text-dim-2: #6e6e6e;
  --text-disabled: #555555;

  --border: #2c2c2c;
  --border-2: #3a3a3a;
  --border-3: #2c2c2c;
  --divider: #2c2c2c;

  --toast-bg: rgba(255, 255, 255, 0.15);
  --modal-overlay: rgba(0, 0, 0, 0.6);
  --bubble-menu-bg: rgba(60, 60, 60, 0.95);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  height: 100%;
  overflow: hidden;
  position: fixed;
  width: 100%;
  margin: 0;
  padding: 0;
  background: var(--bg-app);
}

body {
  font-family: ...;
  background: var(--bg-app);
  color: var(--text-main);
}

#app {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  max-width: 780px;
  margin: 0 auto;
  background: var(--bg-app);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 1;
  transition: height .25s cubic-bezier(0.4, 0, 0.2, 1), top .25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============ Tab 内容区 ============ */
.tab-content {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}
.tab-panel {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}
.tab-panel[hidden] { display: none; }

.panel-placeholder {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #8a8f99;
  font-size: 14px;
}

/* ============ 顶部身份栏 ============ */
.topbar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-topbar);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  position: relative;
  z-index: 2;
  transition: background .2s ease, border-color .2s ease;
}

.topbar .ai-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--bg-avatar);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex-shrink: 0;
  cursor: pointer;
  overflow: hidden;
  transition: transform .15s;
}
.topbar .ai-avatar:hover { transform: scale(1.05); }
.topbar .ai-avatar img {
  width: 100%; height: 100%; object-fit: cover;
}
.topbar .ai-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.topbar .ai-name-row { display: flex; align-items: baseline; gap: 8px; }
.topbar .ai-name { font-weight: 600; font-size: 15px; color: var(--text-main); }
.topbar .ai-model { font-size: 11px; color: var(--text-dim); }
.topbar .ai-status-row { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-dim); }
.topbar .status-dot { width: 6px; height: 6px; border-radius: 50%; background: #4caf50; flex-shrink: 0; }

/* ============ 聊天背景独立层（不随键盘缩） ============ */
.chat-bg-layer {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  max-width: 780px;
  margin: 0 auto;
  background-repeat: no-repeat;
  background-position: 50% 50%;
  background-size: cover;
  background-color: var(--bg-app);
  z-index: 0;
  pointer-events: none;
  transform: translateZ(0);
  -webkit-backface-visibility: hidden;
}
.chat-bg-layer[hidden] { display: none; }

/* ============ 消息区 ============ */
.messages {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bubble {
  max-width: 65%;
  width: fit-content;
  padding: 7px 12px;
  border-radius: 20px;
  line-height: 1.3;
  font-size: 15px;
  word-break: break-word;
  animation: fadeIn .18s ease;
  transition: background .2s ease, color .2s ease;
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* ============ 消息时间戳 ============ */
.bubble-time {
  font-size: 11px;
  color: var(--text-dim-2);
  margin-top: -4px;
  margin-bottom: 2px;
  padding: 0 6px;
  user-select: none;
  animation: fadeIn .18s ease;
}
.bubble-time.user { align-self: flex-end; }
.bubble-time.assistant { align-self: flex-start; }
/* ============ 气泡上的引用显示 ============ */
.bubble-quote {
  align-self: flex-start;
  max-width: 65%;
  background: var(--bg-quote);
  border-left: 2px solid #b8bcc4;
  border-radius: 6px;
  padding: 4px 8px;
  margin-bottom: 4px;
  display: flex;
  flex: 0 0 auto;
  min-height: 0;
  overflow: hidden;
  transition: background .2s ease;
}
.bubble-quote.user { align-self: flex-end; }

.bubble-quote-text {
  display: block;
  font-size: 11px;
  color: var(--text-dim);
  line-height: 1.5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1 1 auto;
  min-width: 0;
}

.bubble.user {
  align-self: flex-end;
  background: var(--bg-bubble-user);
  color: #fff;
  border-bottom-right-radius: 4px;
  word-break: normal;
  overflow-wrap: anywhere;
}
.bubble.assistant {
  align-self: flex-start;
  background: var(--bg-bubble-ai);
  color: var(--text-main);
  border-bottom-left-radius: 4px;
}
.bubble.assistant p { margin: 0 0 8px; }
.bubble.assistant p:last-child { margin-bottom: 0; }
.bubble.user p { margin: 0; }
.bubble.assistant pre {
  background: #1f2329; color: #e6e6e6; padding: 10px;
  border-radius: 8px; overflow-x: auto; font-size: 13px;
}
.bubble.assistant code {
  background: rgba(0,0,0,.06); padding: 1px 5px;
  border-radius: 4px; font-size: .92em;
}
.bubble.assistant pre code { background: transparent; padding: 0; }
.bubble.assistant ul, .bubble.assistant ol { margin: 4px 0; padding-left: 20px; }

.cursor::after {
  content: "▋";
  color: var(--text-dim);
  animation: blink 1s steps(2) infinite;
  margin-left: 1px;
}
@keyframes blink { 50% { opacity: 0; } }

.tool-note {
  align-self: flex-start;
  font-size: 12px;
  color: var(--text-dim);
  background: var(--bg-tool);
  border: 1px dashed var(--border-2);
  padding: 4px 10px;
  border-radius: 8px;
}

/* ============ Thinking 折叠块 ============ */
.thinking-block {
  margin-bottom: 8px;
  border-left: 3px solid #d0d5dd;
  padding-left: 10px;
}
.thinking-header {
  color: var(--text-dim);
  font-size: 12px;
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 4px;
}
.thinking-header:hover { color: var(--text-sub); }
.thinking-toggle {
  display: inline-block;
  transition: transform 0.15s;
  font-size: 10px;
}
.thinking-block.expanded .thinking-toggle { transform: rotate(90deg); }
.thinking-content {
  display: none;
  margin-top: 6px;
  color: var(--text-dim);
  font-size: 12px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}
.thinking-block.expanded .thinking-content { display: block; }

/* 「思考中…」加载提示 */
.thinking-loading {
  color: var(--text-dim);
  font-size: 12px;
  animation: blinkSlow 1.5s ease-in-out infinite;
}
@keyframes blinkSlow {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* 正文容器 */
.bubble-content { /* 默认样式 */ }

/* ============ 输入动画（三点） ============ */
.typing-indicator {
  display: inline-flex;
  align-items: baseline;
  color: var(--text-dim);
  font-size: 14px;
}
.typing-indicator .typing-name { color: var(--text-sub); }
.typing-indicator .typing-label { margin-left: 4px; }
.typing-indicator .dot {
  display: inline-block;
  animation: typingDot 1.2s infinite;
  opacity: 0.3;
}
.typing-indicator .dot-1 { animation-delay: 0s; }
.typing-indicator .dot-2 { animation-delay: 0.2s; }
.typing-indicator .dot-3 { animation-delay: 0.4s; }
@keyframes typingDot {
  0%, 60%, 100% { opacity: 0.3; }
  30% { opacity: 1; }
}

/* ============ 输入框 ============ */
.composer {
  position: relative;
  flex: 0 0 auto;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 8px 12px;
  padding-bottom: calc(4px + env(safe-area-inset-bottom));
  background: transparent;
  border-top: none;
}

#input {
  flex: 1;
  resize: none;
  border: 1px solid var(--border-2);
  border-radius: 22px;
  padding: 10px 16px;
  font-size: 15px;
  font-family: inherit;
  line-height: 1.4;
  max-height: 120px;
  outline: none;
  transition: border-color .15s, background .2s ease, color .2s ease;
  background: #ffffff;
  color: #1f2329;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.10);
}
#input:focus { border-color: var(--border-2); }
#input::placeholder { color: #8a8f99; }
#sendBtn {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border-2);
  background: #ffffff;
  color: #1f2329;
  border-radius: 50%;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.10);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background .15s, color .15s, border-color .15s;
}
#sendBtn:hover {
  background: #f2f3f5;
}
#sendBtn:disabled {
  background: #f2f3f5;
  color: #c4c9d0;
  cursor: not-allowed;
  box-shadow: none;
}


/* ============ 底部 Tab Bar ============ */
/* 悬浮胶囊 Tab Bar */
.tabbar-floating {
  position: absolute;
  left: 50%;
  bottom: calc(12px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px;
  background: var(--bg-tabbar);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 32px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
  transition: opacity .2s, transform .2s, background .2s ease;
}

/* 聊天 / 日记 / 日历页时隐藏 */
.tabbar-floating.hidden-in-chat {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(20px);
}
.tab-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 6px 16px;
  border: none;
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
  border-radius: 22px;
  -webkit-tap-highlight-color: transparent;
  transition: background .15s, color .15s, transform .1s;
}
.tab-btn:active {
  transform: scale(0.92);
}
.tab-btn.active {
  background: var(--accent-soft);
  color: var(--accent);
}
.tab-btn:hover { color: var(--text-main); }
.tab-btn .tab-icon { font-size: 20px; line-height: 1; }
.tab-btn .tab-label { font-size: 11px; }

/* ============ 设置页 ============ */
.settings-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  padding-bottom: 80px;
}

.settings-group {
  background: var(--bg-card);
  border-radius: 12px;
  padding: 4px 0;
  margin-bottom: 16px;
  border: 1px solid var(--border);
  transition: background .2s ease, border-color .2s ease;
}

.settings-group-title {
  padding: 10px 16px 4px;
  font-size: 12px;
  color: var(--text-dim);
  font-weight: 500;
}

.settings-row {
  display: flex;
  align-items: center;
  padding: 10px 16px;
  gap: 12px;
  border-top: 1px solid var(--border-3);
}
.settings-group .settings-row:first-of-type { border-top: none; }

.settings-row label {
  flex: 0 0 80px;
  color: var(--text-sub);
  font-size: 14px;
}

.settings-row input[type="text"],
.settings-row input[type="date"] {
  flex: 1;
  border: 1px solid var(--border-2);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text-main);
  outline: none;
  background: var(--bg-input);
  transition: border-color .15s, background .2s ease, color .2s ease;
}
.settings-row input:focus { border-color: var(--accent); }

.settings-hint {
  padding: 4px 16px 10px;
  font-size: 12px;
  color: var(--text-dim-2);
  line-height: 1.5;
}

/* 头像上传 */
.avatar-upload {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
}
.avatar-preview {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  background: var(--bg-avatar);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  overflow: hidden;
  flex-shrink: 0;
  transition: background .2s ease;
}
.avatar-preview img {
  width: 100%; height: 100%; object-fit: cover;
}
.avatar-upload-btn {
  border: 1px solid var(--border-2);
  background: var(--bg-card);
  color: var(--text-main);
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
  transition: border-color .15s, background .15s, color .15s;
}
.avatar-upload-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.avatar-upload-btn:disabled {
  color: var(--text-disabled);
  border-color: var(--border);
  cursor: not-allowed;
}

/* 主动消息开关 */
.switch {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 26px;
  flex-shrink: 0;
}
.switch input { opacity: 0; width: 0; height: 0; }
.switch-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: #d0d5dd;
  border-radius: 26px;
  transition: background .2s;
}
.switch-slider::before {
  content: "";
  position: absolute;
  height: 20px; width: 20px;
  left: 3px; top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform .2s;
}
.switch input:checked + .switch-slider {
  background: var(--accent);
}
.switch input:checked + .switch-slider::before {
  transform: translateX(20px);
}

.color-picker {
  flex: 1;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.color-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--border-2);
  cursor: pointer;
  padding: 0;
  transition: border-color .15s;
}
.color-btn.default {
  font-size: 11px;
  color: var(--text-dim);
  background: var(--bg-card);
  width: auto;
  border-radius: 16px;
  padding: 0 12px;
}
.color-btn.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft-2);
}

.settings-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 4px;
}
#saveSettingsBtn {
  border: none;
  background: var(--accent);
  color: #fff;
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 15px;
  cursor: pointer;
  font-weight: 500;
}
#saveSettingsBtn:hover { background: var(--accent-hover); }
.settings-tip { color: #4caf50; font-size: 13px; }
.settings-tip.error { color: #e53935; }


/* ============ 日期分隔条 ============ */
.day-divider {
  align-self: center;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-dim-2);
  font-size: 12px;
  margin: 8px 0 4px;
  user-select: none;
  width: 100%;
}

.day-divider::before,
.day-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--divider);
  min-width: 24px;
}

/* ============ 资料卡弹层 ============ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: var(--modal-overlay);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  animation: overlayFadeIn .15s ease;
}
.modal-overlay[hidden] { display: none; }
@keyframes overlayFadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal-card {
  position: relative;
  background: var(--bg-card);
  border-radius: 16px;
  padding: 28px 24px 20px;
  width: 100%;
  max-width: 360px;
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
  animation: cardPopIn .18s ease;
  transition: background .2s ease;
}
@keyframes cardPopIn {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

.modal-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: var(--text-dim);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s, color .15s;
}
.modal-close:hover { background: var(--bg-avatar); color: var(--text-main); }

/* 资料卡头像 */
.profile-avatar-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
}
.profile-avatar {
  width: 88px;
  height: 88px;
  border-radius: 16px;
  background: var(--bg-avatar);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 44px;
  overflow: hidden;
  transition: background .2s ease;
}
.profile-avatar img {
  width: 100%; height: 100%; object-fit: cover;
}
.profile-avatar-edit {
  border: 1px solid var(--border-2);
  background: var(--bg-card);
  color: var(--text-sub);
  font-size: 12px;
  padding: 4px 12px;
  border-radius: 14px;
  cursor: pointer;
  font-family: inherit;
  transition: border-color .15s, color .15s;
}
.profile-avatar-edit:hover { border-color: var(--accent); color: var(--accent); }

/* 资料卡字段 */
.profile-field {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-3);
}
.profile-field label {
  flex: 0 0 48px;
  font-size: 13px;
  color: var(--text-dim);
}
.profile-field input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 15px;
  font-family: inherit;
  color: var(--text-main);
  padding: 4px 0;
  background: transparent;
}
.profile-field input:focus { border-bottom: 1px solid var(--accent); }

/* 统计 */
.profile-stats {
  margin: 16px 0 12px;
  padding: 12px;
  background: var(--bg-card-2);
  border-radius: 10px;
  font-size: 13px;
  color: var(--text-sub);
  transition: background .2s ease;
}
.profile-stat-line {
  padding: 3px 0;
  line-height: 1.5;
}
.profile-stat-line:empty { display: none; }

/* 操作按钮 */
.profile-actions {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}
.profile-action-btn {
  flex: 1;
  border: none;
  background: var(--accent);
  color: #fff;
  padding: 11px 16px;
  border-radius: 10px;
  font-size: 14px;
  cursor: pointer;
  font-weight: 500;
  font-family: inherit;
  transition: background .15s;
}
.profile-action-btn:hover { background: var(--accent-hover); }
.profile-action-btn.danger {
  background: var(--bg-card);
  color: #e53935;
  border: 1px solid #f5c6c6;
}
.profile-action-btn.danger:hover {
  background: rgba(229, 57, 53, 0.08);
  border-color: #e53935;
}

/* ============ 移动端 ============ */
@media (max-width: 600px) {
  .profile-actions {
    flex-direction: column;
  }
  .bubble { max-width: 72%; }
  .bubble-quote { max-width: 72%; }
  .messages { padding: 12px; }
   .topbar { padding: 8px 12px; }
  .modal-card { max-width: 100%; }
}

/* ============ System Prompt 全屏编辑器 ============ */
.editor-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg-app);
  z-index: 1100;
  display: flex;
  flex-direction: column;
  max-width: 780px;
  margin: 0 auto;
  transition: background .2s ease;
}
.editor-overlay[hidden] { display: none; }

.editor-header {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-card);
  transition: background .2s ease, border-color .2s ease;
}

.editor-back-btn,
.editor-save-btn {
  border: none;
  background: transparent;
  color: var(--accent);
  font-size: 15px;
  cursor: pointer;
  padding: 6px 4px;
  font-family: inherit;
  border-radius: 6px;
}
.editor-back-btn:hover { background: var(--bg-avatar); }
.editor-save-btn {
  font-weight: 600;
  padding: 6px 14px;
  background: var(--accent);
  color: #fff;
  border-radius: 8px;
}
.editor-save-btn:hover { background: var(--accent-hover); }
.editor-save-btn:disabled {
  background: var(--text-disabled);
  cursor: not-allowed;
}

.editor-title {
  flex: 1;
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-main);
}

.editor-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  padding-bottom: calc(24px + env(safe-area-inset-bottom));
}

.editor-tip {
  color: #4caf50;
  font-size: 13px;
  min-height: 18px;
  margin-bottom: 8px;
}
.editor-tip.error { color: #e53935; }

.editor-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 16px;
  transition: background .2s ease, border-color .2s ease;
}

.editor-section-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 4px;
}

.editor-section-hint {
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.5;
  margin-bottom: 10px;
}

.editor-textarea {
  width: 100%;
  min-height: 240px;
  border: 1px solid var(--border-2);
  border-radius: 10px;
  padding: 12px;
  font-size: 14px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  line-height: 1.6;
  color: var(--text-main);
  background: var(--bg-input);
  resize: vertical;
  outline: none;
  transition: border-color .15s, background .2s ease, color .2s ease;
  box-sizing: border-box;
}
.editor-textarea:focus { border-color: var(--accent); }

.editor-prompt-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.editor-small-btn {
  border: 1px solid var(--border-2);
  background: var(--bg-card);
  color: var(--text-sub);
  font-size: 13px;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  transition: border-color .15s, color .15s;
}
.editor-small-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.editor-prompt-state {
  font-size: 12px;
  color: var(--text-dim-2);
}

/* ============ 昵称管理 ============ */
.nickname-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
  min-height: 28px;
}

.nickname-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 14px;
  padding: 4px 6px 4px 12px;
  font-size: 13px;
  line-height: 1.2;
}

.nickname-tag-remove {
  border: none;
  background: transparent;
  color: var(--accent);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
  border-radius: 50%;
  opacity: 0.6;
  transition: opacity .15s, background .15s;
}
.nickname-tag-remove:hover {
  opacity: 1;
  background: var(--accent-soft);
}

.nickname-empty {
  color: var(--text-dim-2);
  font-size: 13px;
  padding: 2px 0;
}

.nickname-add-row {
  display: flex;
  gap: 8px;
}

.nickname-input {
  flex: 1;
  border: 1px solid var(--border-2);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text-main);
  background: var(--bg-input);
  outline: none;
  transition: border-color .15s, background .2s ease, color .2s ease;
}
.nickname-input:focus { border-color: var(--accent); }

.nickname-add-btn {
  border: none;
  background: var(--accent);
  color: #fff;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  font-family: inherit;
  transition: background .15s;
}
.nickname-add-btn:hover { background: var(--accent-hover); }
.nickname-add-btn:disabled {
  background: var(--text-disabled);
  cursor: not-allowed;
}

/* 资料卡按钮多了，改小一点间距 */
.profile-actions {
  flex-wrap: wrap;
}
.profile-action-btn {
  min-width: 0;
}

/* ============ 背景图选择器 ============ */
.bg-picker {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bg-color-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.bg-image-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.bg-preview {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  background: var(--bg-avatar);
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
  border: 1px solid var(--border);
}

.bg-clear-btn {
  border: 1px solid #f5c6c6;
  background: var(--bg-card);
  color: #e53935;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
  transition: background .15s;
}
.bg-clear-btn:hover {
  background: rgba(229, 57, 53, 0.08);
}

/* ============ 工具调用折叠块 ============ */
.tool-block {
  align-self: flex-start;
  max-width: 88%;
  font-size: 12px;
  border: 1px dashed var(--border-2);
  border-radius: 8px;
  background: var(--bg-tool);
  overflow: hidden;
  transition: background .2s ease, border-color .2s ease;
}

.tool-block-header {
  padding: 5px 10px;
  color: var(--text-dim);
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 6px;
}

.tool-block-header:hover {
  color: var(--text-sub);
}

.tool-block-toggle {
  display: inline-block;
  transition: transform .15s;
  font-size: 10px;
}

.tool-block.expanded .tool-block-toggle {
  transform: rotate(90deg);
}

.tool-block-content {
  display: none;
  padding: 6px 10px 8px;
  border-top: 1px dashed var(--border-2);
  color: var(--text-dim);
  line-height: 1.6;
}

.tool-block.expanded .tool-block-content {
  display: block;
}

.tool-block-line {
  padding: 2px 0;
  word-break: break-all;
}


.editor-prompt-actions .editor-save-btn {
  padding: 6px 14px;
  font-size: 14px;
}

/* ============ 背景区块（设置页） ============ */
.bg-section {
  padding: 10px 16px;
  border-top: 1px solid var(--border-3);
}

.bg-section:first-of-type {
  border-top: 1px solid var(--border-3);
}

.bg-section-title {
  font-size: 13px;
  color: var(--text-sub);
  margin-bottom: 8px;
  font-weight: 500;
}

.bg-section-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.bg-thumb {
  width: 80px;
  height: 48px;
  border-radius: 8px;
  background-color: var(--bg-avatar);
  background-size: cover;
  background-position: center;
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.bg-section-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.bg-edit-btn {
  border: 1px solid var(--border-2);
  background: var(--bg-card);
  color: var(--text-main);
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
  transition: border-color .15s, color .15s;
}
.bg-edit-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.bg-edit-btn:disabled {
  color: var(--text-disabled);
  border-color: var(--border);
  cursor: not-allowed;
}

/* ============ 背景位置调整（全屏） ============ */
.bg-editor-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #1a1a1a;
  z-index: 1200;
  display: flex;
  flex-direction: column;
  max-width: 780px;
  margin: 0 auto;
}
.bg-editor-overlay[hidden] { display: none; }

.bg-editor-fake-topbar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: var(--bg-topbar);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 2;
}
.fake-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--bg-avatar);
  flex-shrink: 0;
}
.fake-info { display: flex; flex-direction: column; gap: 6px; flex: 1; }
.fake-name {
  width: 90px; height: 12px;
  background: #d0d5dd;
  border-radius: 6px;
}
.fake-status {
  width: 60px; height: 10px;
  background: var(--border-2);
  border-radius: 5px;
}

.bg-editor-stage {
  flex: 1 1 auto;
  min-height: 0;
  position: relative;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  z-index: 1;
}
.bg-editor-stage:active { cursor: grabbing; }

.bg-editor-image {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  max-width: 780px;
  margin: 0 auto;
  background-size: cover;
  background-position: 50% 50%;
  background-repeat: no-repeat;
  pointer-events: none;
  will-change: transform, background-position;
}

.bg-editor-fake-composer {
  flex: 0 0 auto;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 10px 12px;
  padding-bottom: calc(10px + env(safe-area-inset-bottom));
  background: var(--bg-topbar);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 2;
}
.fake-input {
  flex: 1;
  height: 40px;
  border-radius: 20px;
  background: var(--bg-input);
  border: 1px solid var(--border-2);
}
.fake-send {
  background: var(--accent);
  color: #fff;
  padding: 10px 18px;
  border-radius: 20px;
  font-size: 15px;
  font-weight: 500;
  pointer-events: none;
}

.bg-editor-actions {
  flex: 0 0 auto;
  display: flex;
  gap: 10px;
  padding: 12px 16px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom));
  background: #1a1a1a;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  z-index: 3;
}
.bg-editor-btn {
  flex: 1;
  border: none;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 15px;
  font-family: inherit;
  cursor: pointer;
  font-weight: 500;
  transition: background .15s;
}
.bg-editor-btn.cancel {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}
.bg-editor-btn.cancel:hover {
  background: rgba(255, 255, 255, 0.2);
}
.bg-editor-btn.save {
  background: var(--accent);
  color: #fff;
}
.bg-editor-btn.save:hover {
  background: var(--accent-hover);
}

/* ============ 输入框左侧 + 更多按钮 ============ */
.composer-plus-btn {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border-2);
  background: var(--bg-input);
  color: var(--text-sub);
  border-radius: 50%;
  font-size: 22px;
  font-weight: 400;
  line-height: 1;
  cursor: pointer;
  font-family: inherit;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  transition: border-color .15s, color .15s, background .15s;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.composer-plus-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}


/* ============ + 更多弹出菜单（独立悬浮胶囊） ============ */
.plus-menu {
  position: fixed;
  z-index: 1050;
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  gap: 10px;
  background: transparent;
  pointer-events: none;
}
.plus-menu[hidden] { display: none; }

.plus-capsule {
  pointer-events: auto;
  width: 46px;
  height: 46px;
  border: none;
  border-radius: 50%;
  background: var(--bg-input);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: var(--text-sub);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  transition: background .15s, color .15s, transform .15s, opacity .2s;
  opacity: 0;
  transform: translateY(10px) scale(0.85);
  animation: capsulePop .22s cubic-bezier(.2, .8, .3, 1.2) forwards;
}

.plus-capsule:hover {
  background: var(--accent-soft);
  color: var(--accent);
  transform: scale(1.08);
}
.plus-capsule:active {
  transform: scale(0.95);
}

.plus-capsule:nth-child(1) { animation-delay: .04s; }
.plus-capsule:nth-child(2) { animation-delay: .08s; }
.plus-capsule:nth-child(3) { animation-delay: .12s; }
.plus-capsule:nth-child(4) { animation-delay: .16s; }

@keyframes capsulePop {
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ============ 资料卡昵称区 ============ */
.profile-nicknames {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 24px;
  align-items: center;
}
.profile-nicknames:empty::before {
  content: '（没有备注）';
  color: var(--text-dim-2);
  font-size: 13px;
}
.profile-nickname-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 12px;
  padding: 3px 5px 3px 10px;
  font-size: 12px;
  line-height: 1.2;
}
.profile-nickname-tag-remove {
  border: none;
  background: transparent;
  color: var(--accent);
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
  border-radius: 50%;
  opacity: 0.6;
}
.profile-nickname-tag-remove:hover {
  opacity: 1;
  background: var(--accent-soft);
}

.profile-nickname-add {
  display: flex;
  gap: 6px;
  margin-top: 6px;
  margin-bottom: 4px;
}
.profile-nickname-add input {
  flex: 1;
  border: 1px solid var(--border-2);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 13px;
  font-family: inherit;
  color: var(--text-main);
  background: var(--bg-input);
  outline: none;
}
.profile-nickname-add input:focus {
  border-color: var(--accent);
}
.profile-nickname-add button {
  border: none;
  background: var(--accent);
  color: #fff;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  font-family: inherit;
  transition: background .15s;
}
.profile-nickname-add button:hover {
  background: var(--accent-hover);
}

/* ============ 长按气泡：禁用原生选中 ============ */
.bubble {
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}
.bubble.assistant {
  cursor: default;
}


/* ============ 主页 ============ */

.home-welcome {
  text-align: center;
  font-size: 26px;
  font-weight: 600;
  color: var(--text-main);
  letter-spacing: 1px;
  margin: 8px 0 24px;
  font-style: italic;
  animation: welcomeFadeIn .6s ease;
}
@keyframes welcomeFadeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 大卡片 */
.home-hero {
  background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-card-2) 100%);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px 20px 24px;
  text-align: center;
  box-shadow: 0 4px 20px var(--accent-soft-2);
  margin-bottom: 24px;
  animation: heroSlideIn .5s ease;
  transition: background .2s ease, border-color .2s ease;
}
@keyframes heroSlideIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.home-hero-avatars {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 12px;
}
.home-hero-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--bg-avatar);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}
.home-hero-avatar img {
  width: 100%; height: 100%; object-fit: cover;
}
.home-hero-heart {
  font-size: 20px;
  color: #ff7ba0;
  animation: heartBeat 1.6s ease-in-out infinite;
}
@keyframes heartBeat {
  0%, 100% { transform: scale(1); }
  25% { transform: scale(1.15); }
  50% { transform: scale(1); }
  75% { transform: scale(1.1); }
}

.home-hero-names {
  display: flex;
  justify-content: center;
  gap: 76px;
  margin-bottom: 20px;
}
.home-hero-name {
  font-size: 14px;
  color: var(--text-sub);
  font-weight: 500;
  max-width: 80px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-hero-days {
  font-size: 52px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.1;
  margin-bottom: 4px;
  letter-spacing: -1px;
}

.home-hero-label {
  font-size: 13px;
  color: var(--text-dim);
  letter-spacing: 2px;
}

/* 方块网格 */
.home-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  animation: gridFadeIn .6s ease .15s backwards;
}
@keyframes gridFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.home-tile {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px 8px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  font-family: inherit;
  transition: transform .12s, box-shadow .15s, border-color .15s, background .2s ease;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.03);
}
.home-tile:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 16px var(--accent-soft-2);
  transform: translateY(-2px);
}
.home-tile:active {
  transform: scale(0.96);
}

.home-tile-icon {
  font-size: 28px;
  line-height: 1;
}
.home-tile-label {
  font-size: 12px;
  color: var(--text-sub);
  font-weight: 500;
}

.home-tile-placeholder {
  opacity: 0.55;
}
.home-tile-placeholder .home-tile-label {
  color: var(--text-dim-2);
}

/* ============ 顶部栏返回按钮（小图标） ============ */
.topbar-back-icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: var(--text-sub);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background .15s, color .15s;
  font-family: inherit;
}
.topbar-back-icon:hover {
  background: var(--accent-soft);
  color: var(--accent);
}
.topbar-back-icon:active {
  background: var(--accent-soft-2);
}

/* ============ 顶部栏带返回（日记/日历） ============ */
.topbar-with-back {
  display: flex;
  align-items: center;
  gap: 12px;
}
.topbar-back-btn {
  flex-shrink: 0;
  border: none;
  background: transparent;
  color: var(--accent);
  font-size: 15px;
  cursor: pointer;
  padding: 6px 4px;
  border-radius: 6px;
  font-family: inherit;
}
.topbar-back-btn:hover { background: var(--accent-soft); }
.topbar-back-title {
  flex: 1;
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-main);
}
.topbar-back-spacer {
  flex-shrink: 0;
  width: 56px;
}

/* ============ 通用 toast ============ */
.copy-toast {
  position: fixed;
  bottom: 30%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--toast-bg);
  color: #fff;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  z-index: 2000;
  pointer-events: none;
  animation: toastIn .2s ease;
}
@keyframes toastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(6px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ============ 长按气泡菜单（复制 / 引用） ============ */
.bubble-menu {
  position: fixed;
  z-index: 1500;
  display: flex;
  background: var(--bubble-menu-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-radius: 12px;
  padding: 4px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.3);
  animation: bubbleMenuIn .12s ease;
}
@keyframes bubbleMenuIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}
.bubble-menu-btn {
  border: none;
  background: transparent;
  color: #fff;
  font-size: 14px;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
}
.bubble-menu-btn:hover { background: rgba(255, 255, 255, 0.12); }
.bubble-menu-btn + .bubble-menu-btn {
  border-left: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 0;
}

/* ============ 引用条（输入框上方） ============ */
.quote-bar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  margin: 0 12px 4px;
  background: var(--bg-quote-bar);
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  font-size: 12px;
  color: var(--text-sub);
  animation: fadeIn .15s ease;
  transition: background .2s ease;
}
.quote-bar[hidden] { display: none; }
.quote-bar-text {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.quote-bar-close {
  border: none;
  background: transparent;
  color: var(--text-dim);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
  border-radius: 50%;
}
.quote-bar-close:hover { background: var(--accent-soft); }

/* ============ AI 气泡下方小图标（复制 / 引用） ============ */
.bubble-actions {
  align-self: flex-start;
  display: flex;
  gap: 4px;
  margin-top: -4px;
  margin-bottom: 2px;
  opacity: 0;
  transition: opacity .15s;
}
.bubble.assistant:hover + .bubble-actions,
.bubble-actions:hover {
  opacity: 1;
}
@media (hover: none) {
  .bubble-actions { opacity: 0.6; }
}
.bubble-action-btn {
  border: none;
  background: transparent;
  color: var(--text-dim-2);
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color .15s, background .15s;
}
.bubble-action-btn:hover {
  color: var(--accent);
  background: var(--accent-soft);
}

/* ============ AI 分段气泡紧凑 ============ */
.bubble.assistant.grouped {
  margin-top: -6px;
}

/* ============ 气泡下方小图标缩小 ============ */
.bubble-actions {
  gap: 2px;
  margin-top: -6px;
  margin-bottom: 0;
}
.bubble-action-btn {
  padding: 2px;
}
.bubble-action-btn svg {
  width: 12px;
  height: 12px;
}

/* ============ 深色模式下的特例修正 ============ */
[data-theme="dark"] .bubble.assistant pre {
  background: #111;
}

[data-theme="dark"] #input {
  background: #000000;
  color: #e6e6e6;
  border-color: #2c2c2c;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
}
[data-theme="dark"] #input::placeholder { color: #6e6e6e; }
[data-theme="dark"] #input:focus { border-color: #3a3a3a; }

[data-theme="dark"] #sendBtn {
  background: #000000;
  color: #e6e6e6;
  border-color: #2c2c2c;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
}
[data-theme="dark"] #sendBtn:hover {
  background: #1a1a1a;
}
[data-theme="dark"] #sendBtn:disabled {
  background: #1a1a1a;
  color: #555555;
}

[data-theme="dark"] .bubble.assistant code {
  background: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .switch-slider {
  background: #4a4a4a;
}

[data-theme="dark"] .fake-name {
  background: #4a4a4a;
}

[data-theme="dark"] .thinking-block {
  border-left-color: #444;
}

[data-theme="dark"] .bubble-quote {
  border-left-color: var(--text-dim-2);
}

[data-theme="dark"] .profile-action-btn.danger {
  background: var(--bg-card);
  color: #ff6b6b;
  border-color: #5a2a2a;
}

[data-theme="dark"] .bg-clear-btn {
  border-color: #5a2a2a;
  color: #ff6b6b;
}

[data-theme="dark"] .home-tile-placeholder .home-tile-label {
  color: var(--text-dim-2);
}