/* ============================================
   育儿助手 — 元宝风格 AI 对话应用
   设计方向：温暖编辑风格 × 沉浸式对话
   ============================================ */

:root {
  /* 色彩系统 */
  --cream: #FAF5EF;
  --cream-deep: #F0E8DC;
  --cream-dark: #E5D9C5;
  --sage: #E8EFE5;
  --sage-deep: #C5D5C0;
  --forest: #4A6741;
  --forest-deep: #3A5333;
  --terracotta: #C17F59;
  --terracotta-light: #F5E6DC;
  --ink: #2C2416;
  --ink-soft: #7A7263;
  --ink-light: #A8A090;
  --white: #FFFFFF;
  --danger: #D65A5A;
  --danger-bg: #FDF0EC;

  /* 圆角 */
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-xl: 28px;

  /* 阴影 */
  --shadow-sm: 0 1px 3px rgba(44, 36, 22, 0.06);
  --shadow-md: 0 4px 16px rgba(44, 36, 22, 0.08);
  --shadow-lg: 0 8px 32px rgba(44, 36, 22, 0.12);
  --shadow-sidebar: 4px 0 32px rgba(44, 36, 22, 0.15);

  /* 过渡 */
  --ease-out: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; overflow: hidden; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--cream); color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
.hidden { display: none !important; }
.view { height: 100%; }
#app-view { position: relative; overflow: hidden; }

/* ==================== 登录页 ==================== */
#login-view {
  display: flex; align-items: center; justify-content: center;
  background: var(--cream);
  background-image:
    radial-gradient(ellipse at 20% 80%, rgba(193, 127, 89, 0.06) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(74, 103, 65, 0.05) 0%, transparent 60%);
}
.login-card {
  width: calc(100% - 48px); max-width: 360px;
  background: var(--white); border-radius: var(--radius-xl);
  padding: 40px 32px; box-shadow: var(--shadow-lg);
  text-align: center;
}
.login-logo { font-size: 56px; margin-bottom: 16px; line-height: 1; }
.login-card h1 { font-size: 26px; font-weight: 700; color: var(--ink); margin-bottom: 8px; letter-spacing: -0.3px; }
.login-sub { font-size: 14px; color: var(--ink-soft); margin-bottom: 28px; line-height: 1.6; }
.code-input {
  text-align: center; font-size: 22px; letter-spacing: 10px;
  font-weight: 600; text-transform: uppercase; font-family: "SF Mono", "Menlo", monospace;
}

/* ==================== 通用组件 ==================== */
.input {
  width: 100%; padding: 12px 16px;
  border: 1.5px solid var(--cream-deep); border-radius: var(--radius-md);
  font-size: 16px; background: var(--white); color: var(--ink);
  outline: none; transition: border 0.2s; font-family: inherit;
}
.input:focus { border-color: var(--forest); }
.btn {
  border: none; border-radius: var(--radius-md); padding: 12px 20px;
  font-size: 16px; cursor: pointer; font-weight: 600;
  transition: all 0.15s; font-family: inherit;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--forest); color: #fff; }
.btn-primary:active { background: var(--forest-deep); }
.btn-outline { background: var(--white); border: 1.5px solid var(--cream-dark); color: var(--ink); }
.btn-block { width: 100%; margin-top: 14px; }
.error-text { color: var(--danger); font-size: 14px; margin-top: 12px; text-align: center; }

/* ==================== 侧边栏 ==================== */
.sidebar-overlay {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(44, 36, 22, 0.35);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  opacity: 0; transition: opacity 0.3s var(--ease-out);
}
.sidebar-overlay.show { opacity: 1; }

.sidebar {
  position: fixed; top: 0; left: 0; bottom: 0;
  width: 82%; max-width: 340px; z-index: 60;
  transform: translateX(-100%);
  transition: transform 0.35s var(--ease-out);
  will-change: transform;
}
.sidebar.show { transform: translateX(0); }
.sidebar-inner {
  height: 100%; display: flex; flex-direction: column;
  background: var(--white);
  box-shadow: var(--shadow-sidebar);
  padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom) 0;
}

.sidebar-header {
  padding: 52px 20px 20px;
  border-bottom: 1px solid var(--cream-deep);
}
.sidebar-family {
  font-size: 20px; font-weight: 700; color: var(--ink);
  letter-spacing: -0.3px;
}

.sidebar-babies {
  flex: 1; overflow-y: auto; padding: 8px 0;
  -webkit-overflow-scrolling: touch;
}
.sidebar-baby-group { margin-bottom: 4px; }
.sidebar-baby-header {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 20px; font-size: 16px; font-weight: 600;
  color: var(--ink); cursor: default;
}
.sidebar-baby-avatar { font-size: 28px; line-height: 1; }
.sidebar-topic {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 20px 12px 52px; font-size: 15px;
  color: var(--ink-soft); cursor: pointer;
  transition: all 0.15s; border: none; background: none;
  width: 100%; text-align: left; font-family: inherit;
}
.sidebar-topic:hover, .sidebar-topic:active { background: var(--sage); color: var(--ink); }
.sidebar-topic .topic-emoji { font-size: 16px; width: 24px; text-align: center; flex-shrink: 0; }
.sidebar-topic-placeholder {
  padding: 10px 20px 10px 52px; font-size: 13px;
  color: var(--ink-light); font-style: italic;
}

.sidebar-footer {
  padding: 12px 16px; border-top: 1px solid var(--cream-deep);
  display: flex; gap: 8px;
}
.sidebar-action {
  flex: 1; padding: 10px 12px; border: none; background: none;
  font-size: 13px; color: var(--ink-soft); cursor: pointer;
  border-radius: var(--radius-sm); font-family: inherit; text-align: center;
  transition: background 0.15s;
}
.sidebar-action:active { background: var(--cream-deep); }

/* ==================== 主聊天区 ==================== */
.chat-container {
  height: 100%; display: flex; flex-direction: column;
  transition: opacity 0.3s;
  touch-action: pan-y; overscroll-behavior: contain;
}

/* 顶栏 */
.chat-header {
  display: flex; align-items: center; gap: 12px;
  padding: calc(env(safe-area-inset-top) + 8px) 16px 10px;
  background: var(--cream); position: sticky; top: 0; z-index: 10;
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}
.chat-header.scrolled { border-bottom-color: var(--cream-deep); }

.menu-btn {
  width: 38px; height: 38px; border: none; background: var(--white);
  border-radius: 50%; cursor: pointer; display: flex; align-items: center;
  justify-content: center; box-shadow: var(--shadow-sm);
  transition: all 0.2s; flex-shrink: 0;
}
.menu-btn:active { transform: scale(0.94); background: var(--cream-deep); }
.menu-icon {
  width: 18px; height: 14px;
  background: linear-gradient(var(--ink) 0 0) 0 0 / 100% 2px no-repeat,
              linear-gradient(var(--ink) 0 0) 0 50% / 100% 2px no-repeat,
              linear-gradient(var(--ink) 0 0) 0 100% / 60% 2px no-repeat;
  border-radius: 1px;
}
/* 返回首页按钮 */
.back-home-btn {
  width: 32px; height: 32px; border: none; border-radius: 8px;
  background: none; font-size: 18px; cursor: pointer; color: var(--ink);
  display: flex; align-items: center; justify-content: center;
}
.back-home-btn:active { background: var(--cream-deep); }


.chat-context { flex: 1; }
.context-label {
  font-size: 15px; font-weight: 600; color: var(--ink);
}

/* 消息区域 */
.chat-messages {
  flex: 1; overflow-y: auto; padding: 8px 16px 16px;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}

/* 欢迎消息 */
.welcome {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; padding: 64px 24px; text-align: center;
}
.welcome-icon { font-size: 56px; margin-bottom: 12px; line-height: 1; }
.welcome h2 { font-size: 22px; font-weight: 700; color: var(--ink); margin-bottom: 8px; }
.welcome p { font-size: 14px; color: var(--ink-soft); line-height: 1.8; }

/* 上下文提示条 */
.context-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 16px; margin: 0 4px 8px;
  background: var(--white); border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm); font-size: 14px; color: var(--ink);
}
.context-bar .ctx-emoji { font-size: 20px; }
.context-bar .ctx-label { font-weight: 600; }
.context-bar .ctx-close {
  margin-left: auto; border: none; background: none;
  font-size: 16px; color: var(--ink-light); cursor: pointer; padding: 4px;
  line-height: 1;
}

/* 消息气泡 */
.msg-group {
  display: flex; gap: 10px; margin-bottom: 20px;
  animation: msgIn 0.3s var(--ease-out);
}
@keyframes msgIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.msg-group.user { flex-direction: row-reverse; }
.msg-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0; line-height: 1;
}
.msg-avatar.ai { background: var(--sage-deep); }
.msg-avatar.user { background: var(--terracotta-light); }

.msg-body { max-width: 78%; }
.msg-label { font-size: 12px; color: var(--ink-soft); margin-bottom: 4px; padding: 0 4px; }
.msg-bubble {
  padding: 12px 16px; font-size: 15px; line-height: 1.7;
  border-radius: var(--radius-lg); word-break: break-word; white-space: pre-wrap;
}
.msg-bubble.ai {
  background: var(--sage); color: var(--ink);
  border-bottom-left-radius: 6px;
}
.msg-bubble.user {
  background: var(--white); color: var(--ink);
  border-bottom-right-radius: 6px; box-shadow: var(--shadow-sm);
}
.msg-bubble.ai p, .msg-bubble.user p { margin: 4px 0; }
.msg-bubble.ai strong, .msg-bubble.user strong { color: var(--forest); }
.msg-bubble.ai ul, .msg-bubble.ai ol { margin: 6px 0 0 18px; }
.msg-bubble.ai li { margin: 3px 0; }

.msg-time {
  font-size: 11px; color: var(--ink-light); margin-top: 6px;
  padding: 0 4px;
}
.msg-group.user .msg-time { text-align: right; }

/* AI 思考中 */
.msg-thinking .msg-bubble.ai {
  display: flex; align-items: center; gap: 6px; color: var(--ink-soft);
  font-style: italic;
}
.thinking-dots {
  display: inline-flex; gap: 3px; align-items: center;
}
.thinking-dots span {
  width: 5px; height: 5px; border-radius: 50%; background: var(--ink-light);
  animation: dotPulse 1.4s infinite both;
}
.thinking-dots span:nth-child(2) { animation-delay: 0.2s; }
.thinking-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes dotPulse {
  0%, 80%, 100% { opacity: 0.3; transform: scale(0.8); }
  40% { opacity: 1; transform: scale(1); }
}

/* AI 错误 */
.msg-error .msg-bubble.ai {
  background: var(--danger-bg); color: var(--danger);
}

/* ==================== 输入区 ==================== */
.chat-input-area {
  padding: 8px 12px calc(env(safe-area-inset-bottom) + 8px);
  background: var(--cream);
}
.chat-input-row {
  display: flex; align-items: flex-end; gap: 8px;
  background: var(--white); border-radius: var(--radius-xl);
  padding: 6px 6px 6px 14px; box-shadow: var(--shadow-md);
  border: 1.5px solid var(--cream-deep);
  transition: border-color 0.2s;
}
.chat-input-row:focus-within { border-color: var(--forest); }

.mode-btn {
  width: 34px; height: 34px; border: none; border-radius: 50%;
  font-size: 17px; cursor: pointer; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s;
}
.mode-btn.ask { background: var(--sage-deep); }
.mode-btn.log { background: var(--terracotta-light); }

.chat-input {
  flex: 1; border: none; outline: none; font-size: 16px;
  padding: 8px 0; resize: none; font-family: inherit;
  line-height: 1.5; max-height: 120px; background: transparent;
  color: var(--ink);
}
.chat-input::placeholder { color: var(--ink-light); }

.mic-btn {
  width: 34px; height: 34px; border: none; border-radius: 50%;
  background: var(--cream-deep); color: var(--ink-soft); cursor: pointer;
  flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  transition: all 0.15s;
}
.mic-btn:active { transform: scale(0.94); }
.mic-btn.listening {
  background: var(--danger); color: #fff;
  animation: micPulse 1.2s ease-in-out infinite;
}
@keyframes micPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(214, 90, 90, 0.4); }
  50% { box-shadow: 0 0 0 8px rgba(214, 90, 90, 0); }
}

.send-btn {
  width: 38px; height: 38px; border: none; border-radius: 50%;
  background: var(--forest); color: #fff; cursor: pointer;
  flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  transition: all 0.15s;
}
.send-btn:active { transform: scale(0.92); background: var(--forest-deep); }
.send-btn:disabled { opacity: 0.4; }

/* 按住说话按钮 */
.hold-record-btn {
  flex: 1; height: 42px; border: none; border-radius: var(--radius-md);
  background: var(--white); color: var(--ink);
  font-size: 16px; font-weight: 600; cursor: pointer;
  border: 1.5px solid var(--cream-deep);
  font-family: inherit; transition: all 0.15s;
}
.hold-record-btn:active, .hold-record-btn.recording {
  background: var(--forest); color: #fff; border-color: var(--forest);
}

/* 录音波纹覆盖层 */
.wave-overlay {
  position: fixed; bottom: 120px; left: 50%; transform: translateX(-50%);
  width: 280px; background: rgba(44,36,22,.9); border-radius: var(--radius-lg);
  padding: 20px 24px; text-align: center; z-index: 100;
  backdrop-filter: blur(10px);
}
.wave-bars {
  display: flex; justify-content: center; align-items: flex-end;
  gap: 4px; height: 40px;
}
.wave-bars span {
  width: 4px; border-radius: 2px; background: var(--terracotta);
  animation: waveAnim 1s ease-in-out infinite;
  animation-delay: calc(var(--i, 0) * 0.1s);
}
.wave-bars span:nth-child(1) { --i: 0; animation-delay: 0s; height: 10px; }
.wave-bars span:nth-child(2) { --i: 1; animation-delay: 0.1s; height: 20px; }
.wave-bars span:nth-child(3) { --i: 2; animation-delay: 0.2s; height: 30px; }
.wave-bars span:nth-child(4) { --i: 3; animation-delay: 0.3s; height: 18px; }
.wave-bars span:nth-child(5) { --i: 4; animation-delay: 0.4s; height: 32px; }
.wave-bars span:nth-child(6) { --i: 5; animation-delay: 0.5s; height: 22px; }
.wave-bars span:nth-child(7) { --i: 6; animation-delay: 0.6s; height: 36px; }
.wave-bars span:nth-child(8) { --i: 7; animation-delay: 0.7s; height: 26px; }
.wave-bars span:nth-child(9) { --i: 8; animation-delay: 0.8s; height: 14px; }
.wave-bars span:nth-child(10) { --i: 9; animation-delay: 0.9s; height: 28px; }
@keyframes waveAnim {
  0%, 100% { transform: scaleY(0.4); opacity: 0.3; }
  50% { transform: scaleY(1.2); opacity: 1; }
}
.wave-hint {
  color: rgba(255,255,255,.7); font-size: 13px; margin-top: 12px;
}

/* 识别中转圈 */
.inline-spinner {
  position: fixed; display: flex; gap: 4px; align-items: center;
  z-index: 50;
}
.inline-spinner .sp-dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--forest);
  animation: spPulse 1s ease-in-out infinite;
}
.inline-spinner .sp-dot:nth-child(2) { animation-delay: 0.2s; }
.inline-spinner .sp-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes spPulse {
  0%, 80%, 100% { opacity: 0.2; transform: scale(0.7); }
  40% { opacity: 1; transform: scale(1.2); }
}

/* ==================== 空状态 ==================== */
.empty-chat {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; padding: 80px 24px; text-align: center;
  color: var(--ink-soft);
}
.empty-chat .empty-icon { font-size: 40px; margin-bottom: 12px; opacity: 0.6; }
.empty-chat p { font-size: 14px; line-height: 1.6; }

/* ==================== 选择模式 ==================== */
.select-dot {
  width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid var(--ink-light); flex-shrink: 0;
  align-self: center; margin-right: 2px;
  cursor: pointer; transition: all 0.15s;
  display: flex; align-items: center; justify-content: center;
  animation: dotIn 0.2s var(--ease-out);
}
@keyframes dotIn {
  from { transform: scale(0); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.select-dot.checked {
  background: var(--forest); border-color: var(--forest);
}
.select-dot.checked::after {
  content: ''; width: 8px; height: 5px;
  border-left: 2px solid #fff; border-bottom: 2px solid #fff;
  transform: rotate(-45deg) translateY(-1px);
}
.msg-group.user .select-dot { order: 2; margin-right: 0; margin-left: 2px; }

/* 底部操作栏 */
.action-bar {
  position: fixed; bottom: 0; left: 50%; transform: translate(-50%, 100%);
  width: 100%; max-width: 640px; z-index: 70;
  display: flex; gap: 8px; padding: 12px 16px calc(env(safe-area-inset-bottom) + 12px);
  background: var(--white); border-top: 1px solid var(--cream-deep);
  box-shadow: 0 -4px 20px rgba(44,36,22,.1);
  transition: transform 0.3s var(--ease-out);
}
.action-bar.show { transform: translate(-50%, 0); }

.act-btn {
  flex: 1; padding: 12px 8px; border: none; border-radius: var(--radius-md);
  font-size: 14px; font-weight: 600; cursor: pointer; font-family: inherit;
  transition: all 0.15s;
}
.act-btn:active { transform: scale(0.96); }
.copy-btn { background: var(--sage); color: var(--forest); }
.memory-btn { background: var(--terracotta-light); color: var(--terracotta); }
.delete-btn { background: var(--danger-bg); color: var(--danger); }
.cancel-btn { background: var(--cream-deep); color: var(--ink-soft); }

/* Toast 提示 */
.toast {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(0.8);
  background: rgba(44,36,22,.85); color: #fff; padding: 12px 24px;
  border-radius: var(--radius-md); font-size: 14px; z-index: 200;
  pointer-events: none; opacity: 0; transition: all 0.25s;
}
.toast.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }

/* 长按弹出菜单 */
.popup-menu {
  position: absolute; z-index: 100; background: var(--white);
  border-radius: var(--radius-md); box-shadow: 0 4px 20px rgba(0,0,0,.15);
  padding: 4px; min-width: 150px;
}
.popup-item {
  display: block; width: 100%; padding: 12px 16px; border: none;
  background: none; font-size: 14px; color: var(--ink); cursor: pointer;
  text-align: left; border-radius: var(--radius-sm); font-family: inherit;
}
.popup-item:active { background: var(--cream-deep); }
.popup-highlight { color: var(--forest); font-weight: 600; }

/* 多选取消栏 */
.cancel-bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 80;
  padding: calc(env(safe-area-inset-top) + 6px) 16px 6px;
  background: var(--white); border-bottom: 1px solid var(--cream-deep);
  display: flex; align-items: center;
  transform: translateY(-100%); transition: transform 0.3s;
}
.cancel-bar.show { transform: translateY(0); }
.cancel-bar button {
  border: none; background: none; font-size: 15px; color: var(--ink);
  cursor: pointer; padding: 4px 8px; font-family: inherit;
}

/* 快捷频道选择 */
.quick-select-row {
  display: flex; gap: 8px; padding: 8px 16px 4px;
}
.quick-select-bar {
  display: flex; gap: 8px; padding: 8px 16px; background: var(--cream);
  border-top: 1px solid var(--cream-deep);
}
.quick-select-bar .quick-select { flex: 1; }
.quick-select {
  flex: 1; padding: 8px 12px; border: 1px solid var(--cream-deep);
  border-radius: var(--radius-sm); font-size: 14px; background: var(--white);
  color: var(--ink); font-family: inherit;
}

/* 滑动返回动画 */
#chat-view {
  position: relative; z-index: 10;
  transition: transform 0.3s ease; touch-action: pan-y;
  overflow: hidden;
}

/* 侧边栏添加子频道按钮 */
.add-topic-btn {
  width: 22px; height: 22px; border: 1px dashed var(--ink-light);
  border-radius: 50%; background: none; color: var(--ink-soft);
  font-size: 14px; cursor: pointer; margin-left: 6px;
  display: inline-flex; align-items: center; justify-content: center;
  line-height: 1; padding: 0;
}
.add-topic-btn:active { background: var(--cream-deep); }

/* 记忆查看 */
#memory-view {
  height: 100%; display: flex; flex-direction: column; overflow: hidden;
  background: var(--cream);
}
#memory-view .chat-header { flex-shrink: 0; }
.mem-baby-select {
  padding: 4px 8px; border: 1px solid var(--cream-deep); border-radius: var(--radius-sm);
  font-size: 13px; background: var(--white); color: var(--ink); font-family: inherit;
}
.mem-content {
  flex: 1; overflow-y: auto; padding: 16px;
}
.mem-section { margin-bottom: 24px; }
.mem-section-title {
  font-size: 15px; color: var(--forest); margin-bottom: 10px; padding-bottom: 6px;
  border-bottom: 1px solid var(--cream-deep);
}
.mem-entry {
  background: var(--cream); border-radius: var(--radius-md); padding: 12px;
  margin-bottom: 10px;
}
.mem-entry-header { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.mem-entry-key {
  font-size: 12px; color: var(--terracotta); font-weight: 600;
  background: var(--terracotta-light); padding: 2px 8px; border-radius: 10px;
}
.mem-entry-content {
  font-size: 14px; color: var(--ink); line-height: 1.6; white-space: pre-wrap;
}
.mem-entry-actions { margin-top: 8px; display: flex; gap: 8px; }
.mem-edit-btn, .mem-del-btn {
  padding: 4px 12px; border: 1px solid var(--ink-light); border-radius: var(--radius-sm);
  font-size: 12px; cursor: pointer; background: var(--white); font-family: inherit;
}
.mem-del-btn { border-color: var(--danger); color: var(--danger); }
.mem-edit-input {
  width: 100%; padding: 8px; border: 1px solid var(--forest); border-radius: var(--radius-sm);
  font-size: 14px; font-family: inherit; resize: vertical;
}
.mem-empty { text-align: center; color: var(--ink-soft); padding: 40px; font-size: 14px; }
.mem-loading { text-align: center; color: var(--ink-soft); padding: 40px; }

/* AI 记忆建议按钮 */
.mem-suggest-btn {
  margin-top: 8px; padding: 6px 14px; border: 1px dashed var(--forest);
  border-radius: var(--radius-md); background: var(--sage);
  color: var(--forest); font-size: 13px; cursor: pointer; font-family: inherit;
}
.mem-suggest-btn.saved { border-style: solid; background: var(--forest); color: #fff; }

/* ==================== 首页 Google 风格 ==================== */
.home-input-area {
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 20px; max-width: 500px; margin: 0 auto; width: 100%; z-index: 5;
  background: var(--cream);
}
.home-logo { font-size: 56px; margin-bottom: 8px; }
.home-title { font-size: 22px; color: var(--ink); font-weight: 700; margin-bottom: 20px; }
.home-quick-row {
  display: flex; gap: 10px; margin-bottom: 16px; width: 100%;
}
.home-select {
  flex: 1; padding: 10px 14px; border: 1px solid #dadce0; border-radius: 24px;
  font-size: 14px; background: #fff; color: var(--ink); font-family: inherit;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.home-input-wrapper {
  width: 100%; position: relative;
  border: 1px solid #dadce0; border-radius: 28px;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
  padding: 8px 48px 8px 18px; background: #fff;
}
.home-input-wrapper:focus-within {
  box-shadow: 0 3px 12px rgba(0,0,0,.12); border-color: var(--forest);
}
.home-input {
  width: 100%; border: none; outline: none; font-size: 16px; resize: none;
  font-family: inherit; line-height: 1.5; color: var(--ink); background: none;
}
.home-send-btn {
  position: absolute; right: 10px; bottom: 10px;
  width: 36px; height: 36px; border: none; border-radius: 50%;
  background: var(--forest); color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.home-send-btn:active { background: var(--forest-deep); transform: scale(.95); }
