/* AI 花の心思 - 样式表
   配色方案：
   - 主色 橙红: #E64A19 -> #FF7043
   - 背景 奶油白: #FFF5F0
   - 文字 可可棕: #3E2723
   - 点缀 琥珀金: #FFB300
   - 分隔 浅桃: #FFCCBC
*/

:root {
  --primary: #E64A19;
  --primary-light: #FF7043;
  --primary-gradient: linear-gradient(135deg, #E64A19, #FF7043);
  --bg: #FFF5F0;
  --text: #3E2723;
  --accent: #FFB300;
  --divider: #FFCCBC;
  --white: #FFFFFF;
  --shadow: 0 4px 20px rgba(230, 74, 25, 0.1);
  --shadow-hover: 0 8px 30px rgba(230, 74, 25, 0.2);
  --radius: 16px;
  --radius-sm: 8px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  min-height: 100dvh;  /* 动态视口：适配手机浏览器工具栏收/放，避免遮挡底部导航 */
}

/* ========== 头部 ========== */
.header {
  background: var(--primary-gradient);
  color: var(--white);
  padding: 60px 20px 50px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.header::before {
  content: "🌿";
  position: absolute;
  font-size: 120px;
  opacity: 0.15;
  top: -20px;
  left: -20px;
  transform: rotate(-15deg);
}

.header::after {
  content: "🌸";
  position: absolute;
  font-size: 100px;
  opacity: 0.15;
  bottom: -30px;
  right: -10px;
  transform: rotate(20deg);
}

.header h1 {
  font-size: 42px;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: 2px;
}

/* 恬谧智家 LOGO（2026-08-10 常总提供，登录页竖版） */
.login-logo {
  width: 170px;
  max-width: 60%;
  height: auto;
  margin-bottom: 10px;
  background: #fff;
  border-radius: 16px;
  padding: 10px 14px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.15);
  display: inline-block;
}

/* 登录页 slogan：从夹层中救出，放大加粗 */
.login-header .subtitle {
  font-size: 18px;
  font-weight: 600;
  opacity: 1;
  color: #fff;
  letter-spacing: 4px;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.15);
  margin-top: 0;
}

.header .subtitle {
  font-size: 16px;
  opacity: 0.95;
  font-weight: 300;
  letter-spacing: 3px;
}

/* ========== 主容器 ========== */
.container {
  max-width: 1080px;
  margin: -30px auto 60px;
  padding: 0 20px;
  position: relative;
  z-index: 1;
}

/* ========== 功能卡片 ========== */
.card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 32px;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
  transition: box-shadow 0.3s ease;
}

.card:hover {
  box-shadow: var(--shadow-hover);
}

.card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--divider);
}

.card-icon {
  width: 48px;
  height: 48px;
  background: var(--primary-gradient);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

.card-title {
  font-size: 22px;
  font-weight: 600;
  color: var(--text);
}

.card-desc {
  font-size: 14px;
  color: #8d6e63;
  margin-top: 2px;
}

/* ========== 表单元素 ========== */
.form-group {
  margin-bottom: 16px;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--text);
}

input[type="number"],
select,
textarea {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid var(--divider);
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-family: inherit;
  color: var(--text);
  background: var(--bg);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input[type="number"]:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(230, 74, 25, 0.1);
}

textarea {
  resize: vertical;
  min-height: 80px;
}

/* ========== 按钮 ========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: var(--primary-gradient);
  color: var(--white);
  box-shadow: 0 4px 12px rgba(230, 74, 25, 0.3);
}

.btn-primary:hover {
  box-shadow: 0 6px 18px rgba(230, 74, 25, 0.4);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-ghost {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-ghost:hover {
  background: rgba(230, 74, 25, 0.05);
}

/* ========== 识别功能 ========== */
.upload-zone {
  border: 2px dashed var(--divider);
  border-radius: var(--radius);
  padding: 40px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
  margin-bottom: 16px;
}

.upload-zone:hover {
  border-color: var(--primary);
  background: rgba(230, 74, 25, 0.03);
}

.upload-zone.has-image {
  padding: 16px;
}

.upload-zone p {
  color: #8d6e63;
  font-size: 14px;
  margin-top: 8px;
}

.upload-zone .icon {
  font-size: 48px;
  opacity: 0.6;
}

#preview {
  max-width: 100%;
  max-height: 300px;
  border-radius: var(--radius-sm);
  display: none;
  margin: 0 auto;
}

#preview.show {
  display: block;
}

.result-box {
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-top: 16px;
  display: none;
}

.result-box.show {
  display: block;
}

.result-box .plant-name {
  font-size: 20px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 4px;
}

.result-box .confidence {
  font-size: 13px;
  color: #8d6e63;
  margin-bottom: 8px;
}

.result-box .health {
  font-size: 15px;
  padding: 6px 12px;
  border-radius: 20px;
  display: inline-block;
}

.health-good {
  background: #E8F5E9;
  color: #2E7D32;
}

.health-warn {
  background: #FFF3E0;
  color: #EF6C00;
}

.health-bad {
  background: #FFEBEE;
  color: #C62828;
}

/* 识别结果 · 针对性养护意见 */
.care-advice-box {
  margin-top: 12px;
  padding: 14px 16px;
  background: #F1F8E9;
  border-radius: var(--radius-sm);
  border-left: 3px solid #66BB6A;
}
.care-advice-label {
  font-size: 14px;
  font-weight: 600;
  color: #2E7D32;
  margin-bottom: 6px;
}
.care-advice-text {
  font-size: 14px;
  line-height: 1.6;
  color: #33691E;
  white-space: pre-wrap;
}

/* ========== 建议卡片 ========== */
.advice-box {
  display: none;
  margin-top: 16px;
}

.advice-box.show {
  display: block;
}

.advice-status {
  font-size: 18px;
  font-weight: 600;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
}

.status-healthy {
  background: #E8F5E9;
  color: #2E7D32;
}

.status-watch {
  background: #FFF3E0;
  color: #EF6C00;
}

.status-alert {
  background: #FFEBEE;
  color: #C62828;
}

.action-list {
  list-style: none;
  padding: 0;
  margin-bottom: 12px;
}

.action-item {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
}

.action-high {
  background: #FFEBEE;
  border-left: 4px solid #C62828;
}

.action-medium {
  background: #FFF3E0;
  border-left: 4px solid #EF6C00;
}

.action-low {
  background: #FFFDE7;
  border-left: 4px solid #F9A825;
}

.action-priority {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  color: white;
  flex-shrink: 0;
}

.priority-high { background: #C62828; }
.priority-medium { background: #EF6C00; }
.priority-low { background: #F9A825; }

.action-reason {
  flex: 1;
}

.tips-box {
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 14px;
  color: #5d4037;
  font-style: italic;
  border-left: 4px solid var(--accent);
}

.tips-box::before {
  content: "💡 ";
  font-style: normal;
}

/* ========== 聊天窗口 ========== */
.chat-container {
  display: flex;
  flex-direction: column;
  height: 500px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.msg {
  max-width: 75%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 15px;
  line-height: 1.5;
  word-wrap: break-word;
}

.msg-user {
  background: var(--primary-gradient);
  color: var(--white);
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

.msg-fairy {
  background: var(--white);
  color: var(--text);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
  box-shadow: 0 2px 8px rgba(230, 74, 25, 0.08);
}

.msg-typing {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 10px 14px;
  background: var(--white);
  border-radius: 16px;
  align-self: flex-start;
  box-shadow: 0 2px 8px rgba(230, 74, 25, 0.08);
}

.msg-typing span {
  width: 8px;
  height: 8px;
  background: #bdbdbd;
  border-radius: 50%;
  animation: typing 1.4s infinite;
}

.msg-typing span:nth-child(2) { animation-delay: 0.2s; }
.msg-typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-6px); opacity: 1; }
}

.chat-input-area {
  display: flex;
  gap: 10px;
  padding: 12px 16px;
  background: var(--white);
  border-top: 2px solid var(--divider);
}

.chat-input-area textarea {
  flex: 1;
  resize: none;
  min-height: 44px;
  max-height: 100px;
  padding: 10px 14px;
  border: 2px solid var(--divider);
  border-radius: 22px;
  font-size: 15px;
  font-family: inherit;
  background: var(--bg);
  transition: border-color 0.2s ease;
}

.chat-input-area textarea:focus {
  outline: none;
  border-color: var(--primary);
}

.send-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  padding: 0;
  font-size: 20px;
  flex-shrink: 0;
}

/* L2.3 语音按钮（按住说话） */
.voice-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  padding: 0;
  font-size: 18px;
  flex-shrink: 0;
  background: var(--primary);
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
  user-select: none;
}
.voice-btn.recording {
  background: #2e7d32;
  transform: scale(1.15);
  box-shadow: 0 0 0 6px rgba(46, 125, 50, 0.25);
  animation: voicePulse 1.2s ease-in-out infinite;
}
.voice-btn.processing {
  background: #9e9e9e;
  animation: none;
}
@keyframes voicePulse {
  0%, 100% { box-shadow: 0 0 0 6px rgba(46, 125, 50, 0.25); }
  50%      { box-shadow: 0 0 0 12px rgba(46, 125, 50, 0.12); }
}
.voice-hint {
  position: fixed;
  bottom: 90px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(33, 33, 33, 0.92);
  color: #fff;
  padding: 8px 18px;
  border-radius: 20px;
  font-size: 13px;
  z-index: 9999;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.voice-hint.show { opacity: 1; }
.voice-hint::before {
  content: "🎤 ";
}
/* TTS 音频播放条（仙子回复下方） */
.voice-player {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  padding: 4px 8px;
  background: rgba(230, 74, 25, 0.08);
  border-radius: 12px;
  font-size: 12px;
  color: var(--primary);
}
.voice-player audio { height: 28px; }

.session-info {
  font-size: 12px;
  color: #8d6e63;
  margin-bottom: 8px;
  padding: 0 4px;
}

/* ========== 花选择器（对话页） ========== */
.flower-selector {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 10px 4px 8px;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}
.flower-selector::-webkit-scrollbar {
  height: 4px;
}
.flower-selector::-webkit-scrollbar-thumb {
  background: var(--divider);
  border-radius: 2px;
}
.flower-chip {
  flex-shrink: 0;
  padding: 6px 14px;
  border: 1.5px solid var(--divider);
  background: var(--white);
  color: var(--text);
  border-radius: 18px;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.1s;
}
.flower-chip:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.flower-chip:active {
  transform: scale(0.96);
}
.flower-chip.active {
  background: #E64A19;
  color: #fff;
  border-color: #E64A19;
  box-shadow: 0 2px 8px rgba(230, 74, 25, 0.3);
}
.chat-target-info {
  font-size: 12px;
  color: #8d6e63;
  padding: 0 4px 10px;
}

/* ========== 加载动画 ========== */
.loading {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: var(--white);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ========== 页脚 ========== */
.footer {
  text-align: center;
  padding: 20px;
  color: #8d6e63;
  font-size: 13px;
}

/* 页脚横版 LOGO（2026-08-10） */
.footer-logo {
  height: 22px;
  width: auto;
  display: block;
  margin: 0 auto 6px;
}

/* ========== 响应式 ========== */
@media (max-width: 768px) {
  .header {
    padding: 40px 16px 30px;
  }

  .header h1 {
    font-size: 32px;
  }

  .card {
    padding: 24px 20px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .chat-container {
    height: 400px;
  }

  /* 内容区底部留出 Tab 栏高度 + 安全区 */
  .container {
    padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
  }
}

/* ========== 视图切换（SPA） ========== */
.view {
  display: none;
}

.view.active {
  display: block;
}

/* ========== 顶部导航 ========== */
.navbar {
  background: var(--primary-gradient);
  color: var(--white);
  padding: 0 24px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 10px rgba(230, 74, 25, 0.2);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-brand {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 1px;
  cursor: pointer;
}

/* 顶部导航 LOGO（2026-08-10 常总要求：大尺寸） */
.nav-logo {
  height: 44px;
  width: auto;
  display: block;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
}

.nav-link {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  padding: 6px 4px;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.nav-link:hover,
.nav-link.active {
  color: var(--white);
  border-bottom-color: var(--accent);
}

.nav-user {
  font-size: 13px;
  opacity: 0.9;
}

.nav-logout {
  padding: 4px 14px !important;
  font-size: 13px !important;
  color: var(--white) !important;
  border-color: rgba(255, 255, 255, 0.7) !important;
}

.nav-logout:hover {
  background: rgba(255, 255, 255, 0.15) !important;
}

/* ========== 底部 Tab 导航栏（拇指可达） ========== */
.tabbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: calc(56px + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: var(--white);
  box-shadow: 0 -2px 12px rgba(230, 74, 25, 0.12);
  display: flex;
  z-index: 200;
  border-top: 1px solid var(--divider);
}

.tab-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  text-decoration: none;
  color: #8d6e63;
  font-size: 11px;
  min-height: 48px;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.15s;
}

.tab-icon {
  font-size: 22px;
  line-height: 1;
}

.tab-label {
  font-size: 10px;
  font-weight: 500;
}

.tab-item.active {
  color: var(--primary);
}

.tab-item:active {
  background: rgba(230, 74, 25, 0.06);
}

/* 顶部页标题（移动端显示，桌面端隐藏） */
.nav-page-title {
  display: none;
  font-size: 17px;
  font-weight: 600;
  color: var(--white);
  flex: 1;
  text-align: center;
}

/* 返回箭头（二级页显示） */
.nav-back {
  display: none;
  color: var(--white);
  font-size: 22px;
  cursor: pointer;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
}

@media (max-width: 768px) {
  /* 移动端：保留品牌 LOGO（充满导航栏），隐藏页标题 */
  .nav-brand { display: block; }
  .nav-logo {
    height: 52px;
    margin: -2px 0 -6px;  /* 破框：顶部收在栏内，底部探入内容区（生长感） */
  }
  .nav-page-title { display: none; }
  .nav-back { display: flex; }
  /* 顶部导航精简（保持原高度） */
  .navbar {
    height: 50px;
    padding: 0 8px;
  }
  .nav-links { gap: 6px; }
  .nav-user { display: none; }
}

/* ========== 登录/注册页 ========== */
.login-header {
  padding: 50px 20px 44px;
}

.login-container {
  margin-top: -16px;
  max-width: 420px;
}

.auth-card {
  padding: 28px 28px 32px;
}

.auth-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  border-bottom: 2px solid var(--divider);
}

.auth-tab {
  flex: 1;
  padding: 10px;
  background: transparent;
  border: none;
  font-size: 16px;
  font-weight: 600;
  color: #8d6e63;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: color 0.2s, border-color 0.2s;
}

.auth-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.auth-form input {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid var(--divider);
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-family: inherit;
  color: var(--text);
  background: var(--bg);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.auth-form input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(230, 74, 25, 0.1);
}

.auth-submit {
  width: 100%;
  margin-top: 8px;
}

.auth-tip {
  margin-top: 12px;
  font-size: 13px;
  text-align: center;
  min-height: 18px;
}

.auth-tip.error {
  color: #C62828;
}

.auth-tip.success {
  color: #2E7D32;
}

/* ========== 页面标题栏 ========== */
.page-title-bar {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  margin: 32px 0 20px;
}

.page-title-bar h2 {
  font-size: 26px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.page-add-btn {
  font-size: 26px;
  font-weight: 700;
  padding: 14px 34px;
}

/* ========== 植物列表网格 ========== */
.plant-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

/* ========== 方案A：顶部汇总条（2026-08-10 常总拍板，通用层） ========== */
.plant-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 16px;
  max-width: 480px;
}
.plant-summary-item {
  background: var(--white);
  border-radius: 14px;
  padding: 12px 8px;
  text-align: center;
  box-shadow: var(--shadow);
}
.plant-summary-item .ps-icon {
  font-size: 20px;
  margin-bottom: 2px;
}
.plant-summary-item .ps-num {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}
.plant-summary-item .ps-num.ps-warn {
  color: #e65100;
}
.plant-summary-item .ps-num.ps-good {
  color: #2e7d32;
}
.plant-summary-item .ps-label {
  font-size: 11px;
  color: #8d6e63;
  margin-top: 2px;
  white-space: nowrap;
}

.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: #8d6e63;
  font-size: 15px;
}

.plant-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  border: 2px solid transparent;
}

.plant-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  border-color: var(--divider);
}

.plant-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.plant-card-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--primary-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  flex-shrink: 0;
}

.plant-card-name {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
}

.plant-card-species {
  font-size: 13px;
  color: #8d6e63;
  margin-top: 2px;
}

.plant-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.meta-tag {
  font-size: 12px;
  padding: 3px 10px;
  background: var(--bg);
  border-radius: 12px;
  color: #5d4037;
}

.plant-card-actions {
  display: flex;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--divider);
}

.plant-card-actions .btn {
  flex: 1;
  padding: 6px 10px;
  font-size: 13px;
}

.btn-danger {
  background: transparent;
  color: #C62828;
  border: 2px solid #C62828;
}

.btn-danger:hover {
  background: rgba(198, 40, 40, 0.05);
}

/* ========== 一花一世界：心情标签 & 性格化问候 ========== */
.plant-card-mood {
  margin-top: 6px;
  line-height: 1;
}

.mood-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 500;
  padding: 2px 10px;
  border-radius: 12px;
  background: rgba(255, 179, 0, 0.18);
  color: #BF360C;
  white-space: nowrap;
}

.plant-card-greeting {
  position: relative;
  font-size: 14px;
  line-height: 1.55;
  color: #6D4C41;
  font-style: italic;
  background: var(--bg);
  padding: 10px 16px 10px 14px;
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--accent);
  margin-bottom: 14px;
}

/* 用伪元素加引号，营造"花在说话"的感觉 */
.plant-card-greeting::before {
  content: "\201C";  /* 左双引号 " */
  font-size: 22px;
  font-weight: 700;
  font-style: normal;
  color: var(--accent);
  margin-right: 4px;
  vertical-align: -3px;
}

.plant-card-greeting::after {
  content: "\201D";  /* 右双引号 " */
  font-size: 22px;
  font-weight: 700;
  font-style: normal;
  color: var(--accent);
  margin-left: 4px;
  vertical-align: -3px;
}

/* ========== 详情页 ========== */
.back-bar {
  margin: 24px 0 4px;
}

.back-link {
  color: var(--primary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
}

.back-link:hover {
  text-decoration: underline;
}

.detail-hero {
  background: var(--white);
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.detail-avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: var(--primary-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 44px;
  flex-shrink: 0;
}

.detail-title {
  font-size: 26px;
  font-weight: 700;
  color: var(--text);
}

.detail-subtitle {
  font-size: 14px;
  color: #8d6e63;
  margin-top: 4px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.detail-section {
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}

.detail-section h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--divider);
  color: var(--text);
}

.species-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}

.info-item {
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}

.info-item .info-label {
  font-size: 12px;
  color: #8d6e63;
  margin-bottom: 2px;
}

.info-item .info-value {
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
}

/* 健康看板占位（A4 接入） */
.health-board-placeholder {
  text-align: center;
  padding: 30px 20px;
  color: #8d6e63;
  font-size: 14px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  border: 2px dashed var(--divider);
}

/* 上报表单 */
.report-form {
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 18px;
  border: 1px solid var(--divider);
}

.report-form-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 12px;
}

.report-form input,
.report-form select {
  width: 100%;
  padding: 10px 12px;
  border: 2px solid var(--divider);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  background: var(--white);
}

.report-form input:focus,
.report-form select:focus {
  outline: none;
  border-color: var(--primary);
}

.report-actions {
  display: flex;
  gap: 10px;
  margin-top: 4px;
}

.report-actions .btn {
  flex: 1;
}

/* ========== 养护记录 & 时间线 ========== */
.care-actions {
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 18px;
  border: 1px solid var(--divider);
}

.care-action-buttons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.action-btn {
  padding: 12px 10px !important;
  font-size: 15px !important;
  font-weight: 600;
  background: var(--white) !important;
  color: var(--text) !important;
  border: 2px solid var(--divider) !important;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
}

.action-btn:hover {
  border-color: var(--primary) !important;
  color: var(--primary) !important;
  transform: translateY(-1px);
}

/* 时间线 */
.timeline {
  border-left: 3px solid var(--divider);
  padding-left: 20px;
  margin-left: 8px;
}

.timeline-day {
  margin-bottom: 24px;
}

.timeline-day:last-child {
  margin-bottom: 0;
}

.timeline-date {
  font-size: 14px;
  font-weight: 700;
  color: var(--primary);
  margin-left: -20px;
  padding: 2px 10px;
  background: rgba(230, 74, 25, 0.08);
  border-radius: 12px;
  display: inline-block;
  margin-bottom: 12px;
}

.timeline-events {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.timeline-item {
  position: relative;
  background: var(--white);
  border: 1px solid var(--divider);
  border-radius: var(--radius-sm);
  padding: 12px 14px 12px 46px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -32px;
  top: 18px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--primary);
  border: 3px solid var(--white);
  box-shadow: 0 0 0 2px var(--primary);
}

.timeline-icon {
  position: absolute;
  left: 12px;
  top: 12px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
}

.timeline-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
}

.timeline-type {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.timeline-time {
  font-size: 12px;
  color: #8d6e63;
  flex-shrink: 0;
}

.timeline-note {
  font-size: 13px;
  color: #5d4037;
  margin-top: 4px;
  padding-left: 2px;
}

/* ========== C1 传感器趋势图 ========== */
.sensor-chart {
  background: var(--white);
  border-radius: 12px;
  padding: 16px;
  box-shadow: var(--shadow);
}
.sensor-chart-legend {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text);
}
.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}
.legend-dot.soil { background: #2196F3; }
.legend-dot.temp { background: #FF5722; }
.sensor-latest {
  margin-left: auto;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
}
.sensor-svg {
  width: 100%;
  height: auto;
  display: block;
}
.sensor-svg .grid-line {
  stroke: #F0E0D8;
  stroke-width: 1;
  stroke-dasharray: 3,3;
}
.sensor-svg .axis-label {
  font-size: 10px;
  fill: #8D6E63;
}
.sensor-svg .line-soil {
  stroke: #2196F3;
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.sensor-svg .line-temp {
  stroke: #FF5722;
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-linecap: round;
  stroke-dasharray: 4,2;
}
.sensor-svg .dot-soil { fill: #2196F3; }
.sensor-svg .dot-temp { fill: #FF5722; }
.sensor-chart-info {
  font-size: 12px;
  color: #8D6E63;
  text-align: center;
  margin-top: 6px;
}

/* ========== C2 执行器日志 ========== */
.actuator-log-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.actuator-log-item {
  display: flex;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--white);
  border-left: 3px solid var(--accent);
  box-shadow: 0 1px 6px rgba(0,0,0,0.04);
}
.actuator-log-item.log-success { border-left-color: #4CAF50; }
.actuator-log-item.log-failed { border-left-color: #F44336; }
.actuator-log-icon {
  font-size: 20px;
  line-height: 1;
  flex-shrink: 0;
}
.actuator-log-body { flex: 1; min-width: 0; }
.actuator-log-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.actuator-log-time {
  font-size: 12px;
  color: #8D6E63;
}
.actuator-log-detail {
  font-size: 13px;
  color: #5D4037;
  margin-top: 2px;
}

/* ========== 弹窗 ========== */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(62, 39, 35, 0.5);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal.show {
  display: flex;
}

.modal-content {
  width: 100%;
  max-width: 440px;
  margin: 0;
  padding: 0;
  animation: modalIn 0.2s ease;
}

@keyframes modalIn {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 2px solid var(--divider);
}

.modal-header h3 {
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
}

.modal-close {
  background: transparent;
  border: none;
  font-size: 28px;
  color: #8d6e63;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  width: 32px;
  height: 32px;
}

.modal-close:hover {
  color: var(--primary);
}

.modal-body {
  padding: 24px;
}

.modal-body input,
.modal-body select {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid var(--divider);
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-family: inherit;
  color: var(--text);
  background: var(--bg);
}

.modal-body input:focus,
.modal-body select:focus {
  outline: none;
  border-color: var(--primary);
}

/* ========== D1 通知铃铛 ========== */
.notif-bell {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.notif-bell-btn {
  background: transparent;
  border: none;
  font-size: 20px;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 50%;
  transition: background 0.2s, transform 0.15s;
  line-height: 1;
}

.notif-bell-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: scale(1.1);
}

.notif-badge {
  position: absolute;
  top: -2px;
  right: -4px;
  background: #C62828;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  box-shadow: 0 0 0 2px var(--primary);
  animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

.notif-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 340px;
  max-height: 420px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: 0 10px 40px rgba(62, 39, 35, 0.2);
  z-index: 300;
  overflow: hidden;
  flex-direction: column;
  border: 1px solid var(--divider);
}

.notif-dropdown.show {
  display: flex;
}

.notif-dropdown-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 2px solid var(--divider);
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.notif-read-all {
  background: transparent;
  border: none;
  color: var(--primary);
  font-size: 13px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
}

.notif-read-all:hover {
  background: rgba(230, 74, 25, 0.08);
}

.notif-dropdown-body {
  overflow-y: auto;
  flex: 1;
}

.notif-empty {
  padding: 40px 20px;
  text-align: center;
  color: #8d6e63;
  font-size: 14px;
}

.notif-item {
  display: flex;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--divider);
  cursor: pointer;
  position: relative;
  transition: background 0.15s;
}

.notif-item:hover {
  background: rgba(230, 74, 25, 0.04);
}

.notif-item.unread {
  background: rgba(255, 179, 0, 0.06);
}

.notif-item.read {
  opacity: 0.7;
}

.notif-icon {
  font-size: 18px;
  flex-shrink: 0;
  width: 28px;
  text-align: center;
}

.notif-body {
  flex: 1;
  min-width: 0;
}

.notif-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
}

.notif-body-text {
  font-size: 13px;
  color: #8d6e63;
  line-height: 1.4;
  margin-bottom: 4px;
  word-break: break-word;
}

.notif-meta {
  display: flex;
  gap: 10px;
  font-size: 12px;
  color: #bcaaa4;
}

.notif-plant {
  color: var(--primary);
}

.notif-unread-dot {
  position: absolute;
  top: 14px;
  right: 10px;
  width: 8px;
  height: 8px;
  background: var(--primary);
  border-radius: 50%;
}

/* ========== D2 详情页分享按钮 ========== */
.detail-share-btn {
  align-self: flex-start;
  padding: 8px 16px !important;
  font-size: 13px !important;
  white-space: nowrap;
}

/* ========== D2 分享卡片 ========== */
.share-card-modal {
  max-width: 480px;
}

.share-actions {
  display: flex;
  gap: 12px;
  margin-top: 18px;
}

.share-actions .btn {
  flex: 1;
}

.share-card {
  background: linear-gradient(135deg, #FFF8F3 0%, #FFEBE0 100%);
  border-radius: var(--radius);
  padding: 28px 24px;
  border: 2px solid var(--divider);
  position: relative;
  overflow: hidden;
}

.share-card::before {
  content: "🌿";
  position: absolute;
  font-size: 80px;
  opacity: 0.08;
  top: -10px;
  right: -10px;
  transform: rotate(15deg);
}

.share-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
}

.share-card-avatar {
  width: 56px;
  height: 56px;
  background: var(--primary-gradient);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(230, 74, 25, 0.3);
}

.share-card-name {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
}

.share-card-species {
  font-size: 13px;
  color: #8d6e63;
}

.share-card-days {
  font-size: 15px;
  color: var(--text);
  background: rgba(255, 179, 0, 0.15);
  padding: 8px 14px;
  border-radius: 20px;
  display: inline-block;
  margin-bottom: 18px;
  position: relative;
  z-index: 1;
}

.share-card-days strong {
  color: var(--primary);
  font-size: 18px;
}

.share-card-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 18px;
  position: relative;
  z-index: 1;
}

.share-stat {
  background: var(--white);
  border-radius: var(--radius-sm);
  padding: 14px 8px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(230, 74, 25, 0.08);
}

.share-stat-num {
  font-size: 24px;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.2;
}

.share-stat-label {
  font-size: 12px;
  color: #8d6e63;
  margin-top: 4px;
}

.share-card-latest {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.7);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text);
  margin-bottom: 14px;
  position: relative;
  z-index: 1;
}

.share-card-health {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  text-align: center;
  margin-bottom: 14px;
  position: relative;
  z-index: 1;
}

.share-health-good {
  background: rgba(56, 142, 60, 0.12);
  color: #2E7D32;
}

.share-health-warn {
  background: rgba(255, 152, 0, 0.15);
  color: #E65100;
}

.share-health-neutral {
  background: rgba(141, 110, 99, 0.12);
  color: #5D4037;
}

.share-card-footer {
  text-align: center;
  font-size: 12px;
  color: #bcaaa4;
  padding-top: 12px;
  border-top: 1px dashed var(--divider);
  position: relative;
  z-index: 1;
}

/* ================================================================
   花友圈：动态列表 + 卡片 + Tab + 花园页
   ================================================================ */
.social-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  background: var(--white);
  padding: 6px;
  border-radius: 999px;
  box-shadow: var(--shadow);
}
.social-tab {
  flex: 1;
  padding: 10px 14px;
  background: transparent;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: #8d6e63;
  transition: all 0.2s;
  font-family: inherit;
}
.social-tab:hover { color: var(--primary); background: rgba(230, 74, 25, 0.06); }
.social-tab.active {
  color: #fff;
  background: var(--primary-gradient);
  box-shadow: 0 2px 8px rgba(230, 74, 25, 0.3);
}

/* 动态卡片 */
.posts-feed {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.post-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s;
}
.post-card:hover { box-shadow: var(--shadow-hover); }

.post-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  cursor: pointer;
}
.post-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
  overflow: hidden;
  position: relative;
}
.post-avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.post-avatar .avatar-emoji { position: relative; z-index: 1; }

.post-author-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.post-author {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}
.post-time {
  font-size: 12px;
  color: #bcaaa4;
  margin-top: 2px;
}
.vis-badge {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  background: rgba(141, 110, 99, 0.15);
  color: #5D4037;
}
.vis-badge.vis-friends { background: rgba(33, 150, 243, 0.12); color: #1565C0; }

.follow-btn {
  padding: 5px 14px !important;
  font-size: 12px !important;
  white-space: nowrap;
}

/* 一花一世界快照行 */
.post-snapshot-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
  cursor: pointer;
}
.plant-snapshot {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 179, 0, 0.14);
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 13px;
}
.ps-emoji { font-size: 16px; }
.ps-nick { font-weight: 500; color: #BF360C; }
.ps-mood { color: #8d6e63; font-size: 12px; }
.card-type-tag {
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(255,200,200), rgba(255,230,200));
  color: #BF360C;
  font-weight: 500;
}

.post-text {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
  margin-bottom: 12px;
}
.post-photo {
  width: 100%;
  max-height: 360px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  border: 2px solid var(--divider);
}

/* ===== 一期补丁：发动态图片上传 ===== */
.photo-upload-area {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.photo-upload-btn {
  border: 2px dashed var(--divider);
  border-radius: var(--radius-sm);
  padding: 10px 18px;
  color: var(--primary);
}
.photo-preview-wrap {
  position: relative;
  display: inline-block;
}
.photo-thumb {
  width: 96px;
  height: 96px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 2px solid var(--divider);
}
.photo-remove-btn {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #e53935;
  color: #fff;
  border: none;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0,0,0,.2);
}

/* ===== 任务3：分享落地页 ===== */
.share-hero {
  text-align: center;
  padding: 14px 0 18px;
}
.share-brand {
  display: inline-block;
  padding: 6px 16px;
  background: var(--primary-gradient);
  color: #fff;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 10px rgba(230, 74, 25, 0.25);
}
.share-content-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  margin-bottom: 18px;
}
.share-cta-card {
  padding: 22px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  background: linear-gradient(160deg, #fffaf5 0%, #ffffff 60%, #fff5ec 100%);
  border: 1px solid #ffe4c9;
}
.share-cta-card h3 {
  margin: 0 0 8px;
  font-size: 17px;
  color: var(--text);
}
.share-cta-coin {
  display: inline-block;
  padding: 4px 14px;
  background: linear-gradient(90deg, #ffd36b, #ffae3e);
  color: #5c3a00;
  font-weight: 700;
  font-size: 13px;
  border-radius: 999px;
  margin-bottom: 12px;
  box-shadow: 0 2px 6px rgba(255, 174, 62, 0.35);
}
.share-form-box h4 {
  margin: 0 0 12px;
  font-size: 14px;
  color: var(--text);
}
.share-success-tip {
  padding: 10px 14px;
  background: var(--success-bg);
  color: var(--success-text);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  font-size: 14px;
}
.share-invite-info {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  margin-bottom: 14px;
}
.share-invite-info .invite-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--primary-gradient);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex-shrink: 0;
  color: #fff;
}
.share-invite-info .invite-name { font-weight: 600; color: var(--text); }
.share-invite-info .invite-meta { font-size: 12px; color: #8d6e63; }
.share-card-badge {
  display: inline-block;
  padding: 3px 10px;
  background: #fff1e8;
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
  border-radius: 999px;
  margin-bottom: 8px;
}
.share-snapshot {
  padding: 12px 14px;
  background: linear-gradient(135deg, #fff8f1 0%, #fcefe2 100%);
  border-radius: var(--radius-sm);
  margin: 10px 0 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid #ffe4c9;
}
.share-snapshot .snap-emoji {
  font-size: 30px;
  background: #fff;
  border-radius: 12px;
  padding: 6px 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}
.share-snapshot .snap-info { flex: 1; }
.share-snapshot .snap-name { font-weight: 600; color: var(--text); }
.share-snapshot .snap-mood { font-size: 12px; color: #8d6e63; }
.share-hidden {
  padding: 14px;
  background: #fff8f1;
  color: #8d6e63;
  border-radius: var(--radius-sm);
  text-align: center;
  font-size: 13px;
  margin-bottom: 14px;
  border: 1px dashed #ffd0a8;
}

.post-actions {
  display: flex;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--divider);
}
.post-action-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: #8d6e63;
  transition: all 0.15s;
  font-family: inherit;
}
.post-action-btn:hover {
  background: rgba(230, 74, 25, 0.08);
  color: var(--primary);
}
.post-action-btn.active { color: var(--primary); }
.post-action-btn.active .like-icon { color: #E53935; }
.like-count, .comment-count { font-weight: 500; }

/* 评论区 */
.post-comments {
  margin-top: 12px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 14px;
}
.comments-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
}
.comment-item {
  font-size: 13px;
  line-height: 1.5;
  padding: 6px 0;
  border-bottom: 1px dashed var(--divider);
}
.comment-item:last-child { border-bottom: none; }
.comment-author {
  font-weight: 600;
  color: var(--primary);
  margin-right: 6px;
}
.comment-reply-arrow {
  color: #bcaaa4;
  font-size: 12px;
  margin: 0 2px;
}
.comment-reply-to {
  font-weight: 600;
  color: var(--primary);
  opacity: 0.75;
  margin-right: 6px;
}
.comment-text { color: var(--text); }
.comment-reply-btn {
  margin-left: 8px;
  padding: 0 6px;
  font-size: 11px;
  color: #8d6e63;
  background: none;
  border: 1px solid var(--divider);
  border-radius: 8px;
  cursor: pointer;
  vertical-align: middle;
}

/* ========== 三期 · 仪式感日历卡片 ========== */
.seasonal-card-box {
  margin-bottom: 16px;
}
.seasonal-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 18px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 50%, #f0fdfa 100%);
  border: 1px solid #bbf7d0;
  box-shadow: 0 2px 8px rgba(34, 197, 94, 0.08);
}
.seasonal-card.is-holiday {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 50%, #fef9c3 100%);
  border-color: #fcd34d;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.12);
}
.seasonal-card-emoji {
  font-size: 32px;
  flex-shrink: 0;
  line-height: 1;
  margin-top: 2px;
}
.seasonal-card-body {
  flex: 1;
  min-width: 0;
}
.seasonal-card-tag {
  display: inline-block;
  padding: 2px 10px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 999px;
  margin-bottom: 6px;
  background: #dcfce7;
  color: #166534;
}
.seasonal-card.is-holiday .seasonal-card-tag {
  background: #fef3c7;
  color: #92400e;
}
.seasonal-card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}
.seasonal-card-content {
  font-size: 13px;
  color: #555;
  line-height: 1.6;
  margin-bottom: 8px;
}
.seasonal-card-share-btn {
  display: inline-block;
  padding: 5px 14px;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  background: var(--primary);
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: opacity 0.2s;
}
.seasonal-card-share-btn:hover { opacity: 0.85; }
.seasonal-card-share-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.comment-reply-btn:hover {
  color: var(--primary);
  border-color: var(--primary);
}
.comment-time {
  float: right;
  color: #bcaaa4;
  font-size: 11px;
}
.comments-empty {
  text-align: center;
  padding: 10px 0;
  color: #bcaaa4;
  font-size: 12px;
}
.comment-form {
  display: flex;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--divider);
}
.comment-input {
  flex: 1;
  padding: 8px 12px;
  border: 2px solid var(--divider);
  border-radius: var(--radius-sm);
  background: var(--white);
  font-family: inherit;
  font-size: 13px;
}
.comment-input:focus {
  outline: none;
  border-color: var(--primary);
}
.btn-sm { padding: 6px 14px !important; font-size: 13px !important; }

/* ===== 花园页（TA 的花园） */
.garden-hero { padding: 28px; }
.garden-hero-row {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.garden-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--primary-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  flex-shrink: 0;
  box-shadow: var(--shadow);
}
.garden-name-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.garden-name {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
}
.garden-badge {
  background: rgba(255, 179, 0, 0.18);
  color: #BF360C;
  padding: 3px 10px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 500;
}
.garden-bio {
  font-size: 14px;
  color: #8d6e63;
  margin-bottom: 16px;
}
.garden-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
  gap: 10px;
  max-width: 520px;
}
.gs-item {
  text-align: center;
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 10px 6px;
}
.gs-num {
  font-size: 20px;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.1;
}
.gs-label {
  font-size: 11px;
  color: #8d6e63;
  margin-top: 2px;
}
.garden-actions-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.garden-privacy {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 13px;
  color: #5D4037;
}
.garden-privacy label { font-size: 13px; margin: 0; }
.garden-privacy select.form-group {
  width: auto;
  min-width: 180px;
  margin: 0;
  padding: 6px 10px;
  font-size: 13px;
}

.garden-section { margin-bottom: 24px; }
.garden-section-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin: 12px 4px 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--divider);
}

/* TA 的植物 */
.garden-plants {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}
.gp-card {
  background: var(--white);
  border-radius: var(--radius-sm);
  padding: 14px 10px;
  text-align: center;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 0.2s;
}
.gp-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.gp-emoji { font-size: 32px; margin-bottom: 6px; }
.gp-name { font-size: 14px; font-weight: 600; color: var(--text); }
.gp-species { font-size: 11px; color: #8d6e63; margin-top: 2px; }

/* 访客列表 */
.garden-visitors {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 10px;
}
.gv-item {
  background: var(--white);
  border-radius: var(--radius-sm);
  padding: 14px 10px;
  text-align: center;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 0.15s;
}
.gv-item:hover { transform: translateY(-2px); }
.gv-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary-gradient);
  margin: 0 auto 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}
.gv-name { font-size: 13px; font-weight: 500; color: var(--text); }
.gv-time { font-size: 11px; color: #bcaaa4; margin-top: 2px; }

.garden-posts { display: flex; flex-direction: column; gap: 12px; }

/* ===== 一期补丁：多图上传预览 + 多图展示 ===== */
.photo-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.photo-thumb-item {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.photo-thumb-item img.photo-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.photo-thumb-item .photo-remove-btn {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(0,0,0,0.65);
  color: #fff;
  border: none;
  font-size: 12px;
  line-height: 20px;
  text-align: center;
  cursor: pointer;
  padding: 0;
}
.post-photos {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0;
}
.post-photos .post-photo {
  max-width: 100%;
  border-radius: 10px;
  display: block;
}

/* ============================================================ */
/* ========== 移动端体验优化（任务2/3/4 合并） ========== */
/* 适用：max-width:768px，桌面端不受影响 */
/* ============================================================ */

/* --- 任务4：按钮按压反馈（全局 active 态） --- */
.btn:active:not(:disabled) {
  transform: scale(0.96);
  opacity: 0.85;
}
.tab-item:active,
.nav-link:active,
.social-tab:active,
.notif-bell-btn:active,
.modal-close:active,
.back-link:active {
  opacity: 0.6;
}

/* --- 下拉刷新指示器（任务4） --- */
.pull-refresh-tip {
  position: fixed;
  top: 56px;
  left: 0;
  right: 0;
  text-align: center;
  padding: 10px;
  background: rgba(255, 245, 240, 0.95);
  color: #8d6e63;
  font-size: 13px;
  z-index: 90;
  display: none;
}

@media (max-width: 768px) {

  /* --- 任务2：单列流式布局 --- */
  /* 植物列表：方案A 双列卡片网格（2026-08-10 常总拍板） */
  .plant-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  /* 方案A：紧凑卡片样式 */
  .plant-card-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 14px 8px 12px;
    gap: 4px;
  }
  .plant-card-grid .plant-card-avatar {
    width: 52px;
    height: 52px;
    font-size: 26px;
    margin-bottom: 4px;
  }
  .plant-card-grid .plant-card-name {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
  }
  .plant-card-grid .plant-card-species {
    font-size: 11px;
    margin-top: 0;
  }
  .plant-card-grid .plant-card-mood {
    margin-top: 2px;
  }
  .plant-card-grid .plant-card-mood .mood-tag {
    font-size: 11px;
  }
  /* 花园植物：单列 */
  .garden-plants {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  /* 花园统计：保持自适应 */

  /* --- 任务2：点按目标 ≥44px + 输入框 ≥44px/16px --- */
  input[type="text"], input[type="number"], input[type="tel"],
  input[type="password"], input[type="email"],
  select, textarea {
    min-height: 44px;
    font-size: 16px !important;  /* 防 iOS 聚焦放大 */
  }
  .chat-input-area textarea {
    min-height: 44px;
    font-size: 16px !important;
  }
  .modal-body input,
  .modal-body select {
    min-height: 44px;
    font-size: 16px !important;
  }
  /* 按钮 ≥44px 高 */
  .btn {
    min-height: 44px;
    padding: 10px 20px;
  }
  .send-btn {
    width: 44px;
    height: 44px;
  }
  /* 弹窗关闭按钮 ≥44px */
  .modal-close {
    width: 44px;
    height: 44px;
    font-size: 26px;
  }
  /* 通知铃铛按钮 ≥44px */
  .notif-bell-btn {
    min-width: 44px;
    min-height: 44px;
    font-size: 20px;
  }
  /* 花友圈子 Tab ≥44px */
  .social-tab {
    min-height: 44px;
    font-size: 13px;
  }

  /* --- 任务2：弹窗底部弹出（bottom sheet 风格） --- */
  .modal {
    align-items: flex-end;
    padding: 0;
  }
  .modal-content {
    max-width: 100%;
    width: 100%;
    border-radius: 20px 20px 0 0;
    animation: sheetUp 0.25s ease;
    max-height: 90dvh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  @keyframes sheetUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
  }

  /* --- 任务2：对话页输入区固定底部（Tab 上方） --- */
  .chat-container {
    height: calc(100vh - 50px - 56px - env(safe-area-inset-bottom, 0px));
    display: flex;
    flex-direction: column;
  }
  .chat-messages {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .chat-input-area {
    position: sticky;
    bottom: 0;
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  }
  /* 消息气泡最大宽度 80% */
  .chat-msg .bubble {
    max-width: 80%;
  }

  /* --- 任务2：卡片全宽 + 间距统一 --- */
  .plant-card,
  .post-card,
  .share-cta-card {
    width: 100%;
    border-radius: 12px;
  }
  .page-title-bar {
    flex-wrap: wrap;
    gap: 8px;
  }
  .page-add-btn {
    min-height: 40px;
    font-size: 14px;
  }

  /* --- 任务3：安全区适配 --- */
  body {
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  .footer {
    padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  }

  /* --- 任务2：图片缩略图 3 列 --- */
  .upload-thumbs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
  }
  .photo-thumb-item {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
  }
  /* 动态图片：智能自适应（1张全宽 / 2张各半 / 3+张三列），替代固定 3 列 grid 防乱排 */
  .post-photos {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
  }
  .post-photos .post-photo {
    width: 100%;
    height: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    margin-bottom: 0;
    max-height: none;
    cursor: pointer;
  }
  /* 只有 1 张图：全宽，不限比例 */
  .post-photos:has(.post-photo:only-child) {
    grid-template-columns: 1fr;
  }
  .post-photos:has(.post-photo:only-child) .post-photo {
    aspect-ratio: auto;
    max-height: 360px;
  }
  /* 只有 2 张图：各占一半 */
  .post-photos:has(.post-photo:nth-child(2):last-child) {
    grid-template-columns: repeat(2, 1fr);
  }

  /* 登录页移动端：LOGO 再收紧 */
  .login-header {
    padding: 30px 16px 20px;
  }
  .login-logo {
    width: 140px;
    padding: 8px 12px;
    margin-bottom: 8px;
  }
  .login-header .subtitle {
    font-size: 15px;
    letter-spacing: 3px;
    margin-top: 0;
  }
  .auth-tabs {
    gap: 0;
  }
  .auth-tab {
    min-height: 44px;
    font-size: 15px;
  }

  /* --- 任务2：分享落地页单列 --- */
  .share-hero {
    padding: 24px 16px;
  }
  .share-form-box {
    padding: 16px;
  }

  /* 防止横向滚动（全局溢出隐藏） */
  .container, .view.active {
    overflow-x: hidden;
  }
  html, body {
    overflow-x: hidden;
    width: 100%;
  }

  /* --- 军师复测修复①：顶部导航已有页标题，隐藏页面内重复大标题 --- */
  .page-title-bar h2 {
    display: none;
  }
  .page-title-bar {
    margin: 16px 0 12px;
  }

  /* --- 军师复测修复②：节气卡片文字完整换行（防截断） --- */
  .seasonal-card-content {
    word-break: break-word;
    overflow-wrap: break-word;
  }
  .seasonal-card {
    align-items: stretch;
  }
  .seasonal-card-body {
    min-width: 0;
    flex: 1;
  }
}
@media (min-width: 769px) {
  /* 桌面端 flex 两列：仅非移动端生效，避免覆盖移动端 grid 3列 */
  .post-photos .post-photo:not(:only-child) {
    width: calc(50% - 3px);
    object-fit: cover;
  }
}

/* 移动端：多图紧挨展示（去掉边框，缩紧间距） */
@media (max-width: 768px) {
  .post-photos {
    gap: 4px;
  }
  .post-photos .post-photo {
    border: none;
    border-radius: 8px;
    margin-bottom: 0;
  }
  /* 单图（无容器）也统一：去边框、收紧下方留白 */
  .post-card > .post-photo {
    border: none;
    border-radius: 8px;
    margin-bottom: 8px;
  }
}

/* ========== 图片预览 Lightbox ========== */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-mask {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.88);
}
.lightbox-img {
  position: relative;
  max-width: 92vw;
  max-height: 82vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
  z-index: 1;
}
.lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }
.lightbox-counter {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  color: #fff;
  font-size: 14px;
  background: rgba(0, 0, 0, 0.5);
  padding: 4px 14px;
  border-radius: 999px;
}
/* 移动端：切换按钮靠边、图片更大 */
@media (max-width: 768px) {
  .lightbox-img {
    max-width: 96vw;
    max-height: 78vh;
  }
  .lightbox-prev { left: 8px; }
  .lightbox-next { right: 8px; }
}


/* ========== 方案C：花园墙瀑布流（2026-08-10 常总拍板，替代方案A双列网格） ========== */
/* 容器：CSS columns 瀑布流；桌面3列，移动端2列（媒体查询内） */
.plant-grid {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  max-width: 1080px;
  margin: 0 auto;
}
.plant-col {
  flex: 1;
  min-width: 0;
}

/* 花园墙卡片 v3（拍立得照片墙）：顶部性格色块 + 底部白色内容区
   瀑布感来自色块高度三档大差异（30px起步），像挂满画作的墙 */
.plant-card.plant-card-wall {
  break-inside: avoid;
  margin-bottom: 14px;
  border: none;
  border-radius: 16px;
  background: #FFFFFF;
  box-shadow: 0 4px 14px rgba(120, 80, 60, 0.10);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}
.plant-card.plant-card-wall:hover {
  transform: translateY(-4px);
  border-color: transparent;
  box-shadow: 0 10px 26px rgba(120, 80, 60, 0.18);
}

/* 顶部性格色块（渐变由 JS 内联提供）：拍立得的"照片"区 */
.pwall-photo {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px 8px 0 0;  /* 小圆角：拍立得照片感 */
  overflow: hidden;
}
/* 色块三档高度：差异40-80px，一眼看出是设计（非bug） */
.plant-card.plant-card-wall .h-short { height: 96px; }
.plant-card.plant-card-wall .h-tall  { height: 176px; }
.plant-card.plant-card-wall .h-mid   { height: 136px; }

/* 右上角柔光装饰：让每张卡片像被阳光照着 */
.pwall-glow {
  position: absolute;
  top: -34px;
  right: -34px;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.40);
  filter: blur(20px);
  pointer-events: none;
}

/* 色块里的 emoji：白色圆形底托，像挂在照片墙上的小画 */
.pwall-emoji {
  font-size: 44px;
  line-height: 1;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 50%;
  width: 74px;
  height: 74px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  filter: none;
}

/* 底部白色内容区 */
.pwall-info {
  padding: 10px 8px 12px;
  text-align: center;
}
.pwall-name {
  font-size: 14px;
  font-weight: 700;
  color: #3E2723;
  line-height: 1.3;
}
.pwall-species {
  font-size: 11px;
  color: rgba(62, 39, 35, 0.60);
  margin-top: 2px;
}
.pwall-mood {
  margin-top: 6px;
}

/* 高卡片的性格问候语：斜体小字，像花在说话 */
.pwall-greeting {
  margin-top: 6px;
  font-size: 11px;
  line-height: 1.5;
  color: rgba(62, 39, 35, 0.68);
  font-style: italic;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 心情标签：半透明白底胶囊，与彩色卡片协调 */
.mood-tag-wall {
  background: rgba(230, 74, 25, 0.10);
  color: #BF360C;
  font-size: 11px;
  padding: 3px 12px;
  border-radius: 999px;
  border: 1px solid rgba(230, 74, 25, 0.15);
}

/* ========== 顶部汇总条：与花园墙同语言（柔和彩色渐变卡片） ========== */
.plant-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));  /* minmax(0,1fr)：防止内容撑宽溢出 */
  gap: 10px;
  margin-bottom: 16px;
  max-width: 480px;
}
.plant-summary-item {
  border-radius: 14px;
  padding: 12px 8px;
  text-align: center;
  box-shadow: 0 3px 10px rgba(120, 80, 60, 0.08);
}
/* 三项各配柔和渐变：暖橙（共X盆）/ 水蓝（需浇水）/ 嫩绿（心情不错） */
.plant-summary-item:nth-child(1) { background: linear-gradient(135deg, #FFF3E6, #FFE3C9); }
.plant-summary-item:nth-child(2) { background: linear-gradient(135deg, #EAF4FD, #D7EBFB); }
.plant-summary-item:nth-child(3) { background: linear-gradient(135deg, #EAF7EA, #D4EDD2); }
.plant-summary-item .ps-icon { font-size: 20px; margin-bottom: 2px; }
.plant-summary-item .ps-num { font-size: 22px; font-weight: 700; line-height: 1.2; }
.plant-summary-item:nth-child(1) .ps-num { color: #E65100; }
.plant-summary-item:nth-child(2) .ps-num { color: #1565C0; }
.plant-summary-item:nth-child(3) .ps-num { color: #2E7D32; }
.plant-summary-item .ps-label { font-size: 11px; color: rgba(62, 39, 35, 0.65); margin-top: 2px; white-space: nowrap; }

/* ========== 花园墙 · 移动端适配（390px 手机优先） ========== */
@media (max-width: 768px) {
  .plant-grid {
    display: flex;
    gap: 10px;
  }
  .plant-card.plant-card-wall {
    margin-bottom: 10px;
    border-radius: 14px;
  }
  /* 移动端色块三档高度：差异40-80px */
  .plant-card.plant-card-wall .h-short { height: 84px; }
  .plant-card.plant-card-wall .h-tall  { height: 164px; }
  .plant-card.plant-card-wall .h-mid   { height: 124px; }
  .pwall-emoji { font-size: 38px; width: 64px; height: 64px; }
  .pwall-name { font-size: 13px; }
  .pwall-species { font-size: 10px; }
  .pwall-mood { margin-top: 5px; }
  .mood-tag-wall { font-size: 11px; padding: 3px 10px; color: #BF360C; }
  .pwall-info { padding: 8px 6px 10px; }
  /* 汇总条三项同宽紧凑 */
  .plant-summary { gap: 8px; }
  .plant-summary-item { padding: 10px 4px; }
  .plant-summary-item .ps-num { font-size: 19px; }
  .plant-summary-item .ps-label { font-size: 10px; }
}

/* ========== 花园墙 · 桌面端（>768px）：双列 masonry，卡片更宽更从容 ========== */
@media (min-width: 769px) {
  .plant-grid {
    gap: 18px;
  }
  .plant-card.plant-card-wall .h-short { height: 110px; }
  .plant-card.plant-card-wall .h-tall  { height: 190px; }
  .plant-card.plant-card-wall .h-mid   { height: 150px; }
  .pwall-emoji { font-size: 46px; width: 80px; height: 80px; }
  .pwall-name { font-size: 15px; }
}
