/* ===== 全局重置 & 变量 ===== */
:root {
  --green-primary: #2d7d46;
  --green-light: #4caf72;
  --green-bg: #f0f7f2;
  --blue: #2196f3;
  --orange: #ff9800;
  --purple: #9c27b0;
  --red: #f44336;
  --yellow: #ffc107;
  --text-primary: #1a2e1e;
  --text-secondary: #5a7a62;
  --border: #d4e8da;
  --card-shadow: 0 2px 12px rgba(45,125,70,0.10);
  --header-h: 56px;
  --tab-h: 64px;
  --sidenav-w: 90px;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

html, body {
  width: 100%; height: 100%;
  overflow: hidden;
  font-family: -apple-system, 'PingFang SC', 'Helvetica Neue', sans-serif;
  background: var(--green-bg);
  color: var(--text-primary);
  user-select: none;
}

/* ===== 启动屏 ===== */
#splash-screen {
  position: fixed; inset: 0;
  background: linear-gradient(145deg, #1a5c2e 0%, #2d7d46 50%, #4caf72 100%);
  display: flex; align-items: center; justify-content: center;
  z-index: 9999;
  transition: opacity 0.6s ease;
}
.splash-content { text-align: center; color: white; }
.splash-icon { font-size: 80px; animation: pulse 1.5s infinite; }
.splash-content h1 { font-size: 42px; font-weight: 700; margin: 16px 0 8px; letter-spacing: 4px; }
.splash-content p { font-size: 18px; opacity: 0.85; }
.splash-loader {
  margin: 32px auto 0;
  width: 50px; height: 4px;
  background: rgba(255,255,255,0.3);
  border-radius: 2px; overflow: hidden;
}
.splash-loader div {
  width: 40%; height: 100%;
  background: white; border-radius: 2px;
  animation: loading 1.2s ease infinite;
}
@keyframes loading { 0% { transform: translateX(-100%); } 100% { transform: translateX(350%); } }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.1); } }

/* ===== App 骨架 ===== */
#app {
  width: 100%; height: 100vh;
  display: flex; flex-direction: column;
  overflow: hidden;
  position: fixed; inset: 0;
}
.hidden { display: none !important; }

/* ===== 顶部导航 ===== */
.app-header {
  height: var(--header-h);
  background: linear-gradient(90deg, #1a5c2e, #2d7d46);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
  flex-shrink: 0;
  z-index: 100;
}
.header-left { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.header-icon { font-size: 22px; flex-shrink: 0; }
.header-title { color: white; font-size: 18px; font-weight: 700; letter-spacing: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex-shrink: 0; }
.header-right {
  display: flex; align-items: center; gap: 12px;
  color: rgba(255,255,255,0.9); font-size: 13px; flex-shrink: 0;
}
.sensor-status { display: flex; align-items: center; gap: 5px; }
.header-icon-btn {
  background: rgba(255,255,255,0.18);
  border: none; cursor: pointer;
  font-size: 18px; line-height: 1;
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s;
  flex-shrink: 0;
}
.header-icon-btn:active { background: rgba(255,255,255,0.35); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot.online { background: #76ff03; box-shadow: 0 0 6px #76ff03; animation: blink 2s infinite; }
.dot.offline { background: #f44336; }
.dot.warn { background: #ffc107; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

/* ===== 主体布局：header下面的区域 ===== */
.layout-body {
  flex: 1;
  display: flex;
  overflow: hidden;
  position: relative;
}

/* ===== 左侧导航（平板横屏） ===== */
.side-nav {
  display: none; /* 默认隐藏，横屏时显示 */
  flex-direction: column;
  width: var(--sidenav-w);
  background: white;
  border-right: 1px solid var(--border);
  padding: 12px 0;
  flex-shrink: 0;
  overflow-y: auto;
  z-index: 50;
}
.nav-btn {
  display: flex; flex-direction: column; align-items: center;
  padding: 14px 8px;
  border: none; background: none; cursor: pointer;
  color: #999; gap: 4px;
  transition: all 0.2s;
  width: 100%;
}
.nav-btn.active { color: var(--green-primary); background: var(--green-bg); }
.nav-btn.active .nav-icon { transform: scale(1.15); }
.nav-icon { font-size: 26px; transition: transform 0.2s; }
.nav-label { font-size: 13px; font-weight: 700; white-space: nowrap; letter-spacing: 0.2px; }

/* ===== 底部Tab（手机/竖屏） ===== */
.tab-nav {
  height: var(--tab-h);
  background: white;
  display: flex;
  border-top: 1px solid var(--border);
  box-shadow: 0 -2px 10px rgba(0,0,0,0.06);
  flex-shrink: 0;
}
.tab-btn {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  border: none; background: none; cursor: pointer;
  color: #999; transition: all 0.2s;
  gap: 3px; padding: 8px 4px; min-width: 0;
}
.tab-btn.active { color: var(--green-primary); }
.tab-btn.active .tab-icon { transform: scale(1.15); }
.tab-icon { font-size: 22px; transition: transform 0.2s; flex-shrink: 0; }
.tab-label { font-size: 11px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 确保所有tab-btn都是竖排布局 */
.tab-btn { flex-direction: column !important; }
.tab-btn[data-tab="mylog"] { flex-direction: column !important; }

/* ===== 页面内容区 ===== */
.page-content {
  flex: 1;
  overflow: hidden;
  position: relative;
}
.page {
  position: absolute; inset: 0;
  display: none; flex-direction: column;
  overflow: hidden;
}
.page.active { display: flex; }
.page-scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 16px;
  -webkit-overflow-scrolling: touch;
}
.page-scroll::-webkit-scrollbar { width: 4px; }
.page-scroll::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

/* ===== 通用组件 ===== */
.page-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.page-title { font-size: 20px; font-weight: 700; color: var(--text-primary); }

.section-card {
  background: white; border-radius: 16px;
  padding: 16px; margin-bottom: 16px;
  box-shadow: var(--card-shadow);
}
.section-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 14px;
}
.section-header h3 { font-size: 15px; font-weight: 600; }
.btn-link { background: none; border: none; color: var(--green-primary); font-size: 13px; cursor: pointer; }

/* Buttons */
.btn-primary {
  background: var(--green-primary); color: white; border: none;
  padding: 10px 20px; border-radius: 10px;
  font-size: 14px; font-weight: 600; cursor: pointer;
  transition: all 0.2s; white-space: nowrap;
}
.btn-primary:active { transform: scale(0.96); background: #1a5c2e; }
.btn-secondary {
  background: var(--green-bg); color: var(--green-primary);
  border: 1.5px solid var(--border);
  padding: 10px 20px; border-radius: 10px;
  font-size: 14px; font-weight: 600; cursor: pointer;
}
.full-btn { width: 100%; padding: 14px; font-size: 16px; }
.btn-icon {
  background: none; border: none; font-size: 14px;
  color: var(--green-primary); cursor: pointer;
  padding: 6px 10px; border-radius: 8px; border: 1px solid var(--border);
}

/* ===== 总览页 ===== */
.welcome-banner {
  background: linear-gradient(135deg, #1a5c2e, #4caf72);
  border-radius: 16px; padding: 18px 20px;
  margin-bottom: 16px;
  display: flex; justify-content: space-between; align-items: center;
  color: white;
}
.welcome-text h2 { font-size: 20px; margin-bottom: 4px; }
.welcome-text p { font-size: 13px; opacity: 0.8; }
.welcome-plant { font-size: 50px; }

/* 风光照横幅 */
.hero-banner {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  margin-bottom: 16px;
  height: 180px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.18);
}
.hero-slides { position: absolute; inset: 0; }
.hero-slide {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.2s ease;
}
.hero-slide.active { opacity: 1; }
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.05) 0%,
    rgba(0,0,0,0.12) 50%,
    rgba(10,40,18,0.65) 100%
  );
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 16px 18px 12px;
}
.hero-text { color: #fff; }
.hero-text h2 { font-size: 20px; font-weight: 700; text-shadow: 0 1px 6px rgba(0,0,0,0.4); margin-bottom: 2px; }
.hero-text p { font-size: 12px; opacity: 0.88; text-shadow: 0 1px 4px rgba(0,0,0,0.35); }
.hero-text .banner-sub { font-size: 11px; opacity: 0.75; margin-top: 2px; letter-spacing: 0.5px; }
.hero-dots {
  display: flex; gap: 6px; margin-top: 8px;
}
.hero-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: rgba(255,255,255,0.45);
  cursor: pointer; transition: background .3s;
}
.hero-dot.active { background: #fff; width: 18px; border-radius: 3px; }

@media (orientation: landscape) and (min-width: 768px) {
  .hero-banner { height: 200px; }
}

.stats-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 10px; margin-bottom: 16px;
}
.stat-card {
  background: white; border-radius: 14px;
  padding: 14px; display: flex; align-items: center; gap: 12px;
  box-shadow: var(--card-shadow);
}
.stat-card.green { border-left: 4px solid #4caf50; }
.stat-card.blue { border-left: 4px solid #2196f3; }
.stat-card.orange { border-left: 4px solid #ff9800; }
.stat-card.purple { border-left: 4px solid #9c27b0; }
.stat-icon { font-size: 28px; }
.stat-val { font-size: 20px; font-weight: 700; }
.stat-label { font-size: 11px; color: var(--text-secondary); margin-top: 2px; }

/* 总览两列布局 */
.two-col-layout {
  display: flex; flex-direction: column; gap: 0;
}

/* Alerts */
.alert-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 12px; border-radius: 10px;
  margin-bottom: 8px; font-size: 13px;
}
.alert-item.warn { background: #fff8e1; color: #e65100; }
.alert-item.info { background: #e3f2fd; color: #1565c0; }
.alert-item.ok { background: #e8f5e9; color: #2e7d32; }
.alert-icon { font-size: 16px; flex-shrink: 0; }

/* 任务迷你列表 */
.task-item-mini {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 0; border-bottom: 1px solid var(--border);
}
.task-item-mini:last-child { border-bottom: none; }
.task-type-badge {
  padding: 3px 10px; border-radius: 20px;
  font-size: 12px; font-weight: 600;
  background: var(--green-bg); color: var(--green-primary);
  white-space: nowrap;
}

/* Plant Grid */
.plant-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
}
.plant-thumb {
  background: var(--green-bg); border-radius: 12px;
  padding: 12px 6px; text-align: center;
  cursor: pointer; transition: all 0.2s;
  border: 1.5px solid transparent;
}
.plant-thumb:active { transform: scale(0.95); }
.plant-emoji { font-size: 30px; margin-bottom: 4px; }
.plant-name { font-size: 12px; font-weight: 600; margin-bottom: 3px; }
.plant-status { font-size: 10px; padding: 2px 6px; border-radius: 10px; display: inline-block; }
.plant-status.ok { background: #e8f5e9; color: #2e7d32; }
.plant-status.warn { background: #fff3e0; color: #e65100; }
.plant-status.add { background: #e3f2fd; color: #1565c0; }

/* ===== 定位标签 ===== */
.hero-top-bar {
  display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: auto; padding-bottom: 6px;
}
.online-badge {
  position: relative;
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(0,0,0,0.5); backdrop-filter: blur(4px);
  color: #fff; font-size: 13px; padding: 8px 16px;
  border-radius: 24px; user-select: none;
  border: 1px solid rgba(74,222,128,0.4);
  box-shadow: 0 2px 10px rgba(0,0,0,0.25);
}
.online-badge b {
  font-weight: 800; font-size: 19px; line-height: 1; color: #4ade80;
  font-variant-numeric: tabular-nums;
}
.online-badge.bump b { animation: online-bump .45s ease; }
@keyframes online-bump {
  0% { transform: scale(1); }
  40% { transform: scale(1.4); }
  100% { transform: scale(1); }
}
.online-delta {
  position: absolute; right: 10px; top: -4px;
  font-size: 12px; font-weight: 800; color: #4ade80;
  text-shadow: 0 1px 3px rgba(0,0,0,0.7);
  animation: online-delta-fly 1.6s ease forwards;
  pointer-events: none;
}
.online-delta.down { color: #fda4af; }
@keyframes online-delta-fly {
  0% { opacity: 0; transform: translateY(6px); }
  20% { opacity: 1; }
  100% { opacity: 0; transform: translateY(-18px); }
}
.online-dot {
  width: 9px; height: 9px; border-radius: 50%; background: #4ade80;
  box-shadow: 0 0 0 0 rgba(74,222,128,0.6);
  animation: online-pulse 2s infinite;
}
@keyframes online-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(74,222,128,0.55); }
  70%  { box-shadow: 0 0 0 8px rgba(74,222,128,0); }
  100% { box-shadow: 0 0 0 0 rgba(74,222,128,0); }
}
.online-text { display: inline-flex; align-items: baseline; gap: 4px; }
.hero-location {
  display: inline-flex; align-items: center; gap: 4px;
  background: rgba(0,0,0,0.38); backdrop-filter: blur(4px);
  color: #fff; font-size: 11px; padding: 4px 10px;
  border-radius: 20px; cursor: pointer; user-select: none;
  transition: background .2s;
}
.hero-location:active { background: rgba(0,0,0,0.55); }
.loc-icon { font-size: 13px; }

/* ===== 物候观察页 ===== */
.pheno-timeline {
  display: flex; gap: 6px; margin: 10px 0 4px;
}
.pheno-season {
  flex: 1; border-radius: 10px; padding: 8px 6px; min-height: 60px;
}
.pheno-season.spring  { background: #fce4ec; }
.pheno-season.summer  { background: #e8f5e9; }
.pheno-season.autumn  { background: #fff3e0; }
.pheno-season.winter  { background: #e3f2fd; }
.pheno-season > span  { font-size: 11px; font-weight: 700; color: #666; display: block; margin-bottom: 5px; }
.season-events { display: flex; flex-wrap: wrap; gap: 4px; }
.season-tag {
  font-size: 10px; color: #fff; padding: 2px 6px; border-radius: 10px;
  white-space: nowrap;
}

.pheno-card {
  display: flex; border-radius: 12px; overflow: hidden;
  background: #fff; box-shadow: 0 1px 6px rgba(0,0,0,0.08);
  margin-bottom: 10px;
}
.pheno-card-left {
  width: 52px; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.pheno-emoji { font-size: 24px; }
.pheno-card-body { flex: 1; padding: 10px 12px; min-width: 0; }
.pheno-card-top {
  display: flex; align-items: center; gap: 6px; margin-bottom: 4px;
}
.pheno-plant-name { font-size: 15px; font-weight: 600; color: #1a2e1a; }
.pheno-type-tag {
  font-size: 11px; color: #fff; padding: 2px 8px; border-radius: 10px;
}
.pheno-del {
  margin-left: auto; background: none; border: none; cursor: pointer;
  font-size: 14px; padding: 2px 4px; opacity: 0.5;
}
.pheno-del:active { opacity: 1; }
.pheno-date { font-size: 12px; color: #888; margin-bottom: 4px; }
.pheno-desc { font-size: 13px; color: #444; line-height: 1.5; }

/* 带真实图片的 plant-thumb */
.plant-thumb-img-wrap {
  width: 52px; height: 52px; border-radius: 50%; overflow: hidden;
  margin: 0 auto 4px; border: 2px solid var(--green-light);
}
.plant-thumb-img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}

/* ===== 任务页 ===== */
.filter-tabs {
  display: flex; gap: 8px; margin-bottom: 16px;
  overflow-x: auto; padding-bottom: 4px;
}
.filter-tabs::-webkit-scrollbar { display: none; }
.filter-btn {
  padding: 7px 16px; border-radius: 20px;
  border: 1.5px solid var(--border);
  background: white; color: var(--text-secondary);
  font-size: 13px; cursor: pointer; white-space: nowrap; transition: all 0.2s;
}
.filter-btn.active { background: var(--green-primary); color: white; border-color: var(--green-primary); }

.task-list { display: flex; flex-direction: column; gap: 12px; }
.task-card {
  background: white; border-radius: 14px; padding: 14px;
  box-shadow: var(--card-shadow); cursor: pointer; transition: all 0.2s;
  border-left: 4px solid var(--green-light);
}
.task-card.status-done { border-left-color: #9e9e9e; opacity: 0.8; }
.task-card.status-active { border-left-color: var(--blue); }
.task-card:active { transform: scale(0.98); }
.task-card-header {
  display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 8px;
}
.task-card-title { font-size: 15px; font-weight: 700; }
.task-status-tag { font-size: 11px; padding: 3px 10px; border-radius: 20px; font-weight: 600; white-space: nowrap; }
.tag-open { background: #e8f5e9; color: #2e7d32; }
.tag-active { background: #e3f2fd; color: #1565c0; }
.tag-done { background: #f5f5f5; color: #757575; }
.task-card-meta { display: flex; gap: 10px; flex-wrap: wrap; font-size: 12px; color: var(--text-secondary); margin-bottom: 8px; }
.task-card-desc { font-size: 13px; color: #666; margin-bottom: 10px; }
.task-card-footer { display: flex; justify-content: space-between; align-items: center; }
.task-points { font-size: 13px; color: #ff9800; font-weight: 600; }
.task-action-btn { padding: 6px 14px; border-radius: 20px; border: none; cursor: pointer; font-size: 13px; font-weight: 600; }
.btn-claim { background: var(--green-primary); color: white; }
.btn-qr { background: var(--blue); color: white; }
.btn-done-tag { background: #f5f5f5; color: #999; }

/* ===== 监控页 ===== */
.monitor-status { display: flex; align-items: center; gap: 6px; font-size: 16px; color: var(--text-secondary); }
.sensor-nodes { display: flex; gap: 8px; margin-bottom: 16px; overflow-x: auto; padding-bottom: 4px; }
.sensor-nodes::-webkit-scrollbar { display: none; }
.node-btn {
  padding: 8px 16px; border-radius: 20px; border: 1.5px solid var(--border);
  background: white; font-size: 18px; font-weight: 600;
  cursor: pointer; white-space: nowrap; transition: all 0.2s; color: var(--text-secondary);
}
.node-btn.active { background: var(--green-primary); color: white; border-color: var(--green-primary); }

.monitor-gauges { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.gauge-card {
  background: white; border-radius: 14px; padding: 14px;
  display: flex; align-items: center; justify-content: space-between;
  box-shadow: var(--card-shadow);
}
.gauge-info {
  display: flex; flex-direction: column; justify-content: center;
  flex: 1; padding-right: 12px;
}
.gauge-circle {
  position: relative; width: 80px; height: 80px; flex-shrink: 0;
}
.gauge-circle svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.gauge-bg { fill: none; stroke: #f0f0f0; stroke-width: 8; }
.gauge-fill { fill: none; stroke-width: 8; stroke-linecap: round; transition: stroke-dashoffset 1s ease; }
.moisture-fill { stroke: #2196f3; }
.ec-fill { stroke: #4caf50; }
.ph-fill { stroke: #9c27b0; }
.temp-fill { stroke: #ff9800; }
.gauge-value {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-size: 28px; font-weight: 700;
}
.gauge-label { font-size: 22px; font-weight: 600; color: var(--text-primary); }
.gauge-range { font-size: 18px; color: var(--text-secondary); margin-top: 3px; }

/* 大号监测卡片：四个分两行，文字图标放大 */
.monitor-gauges-large { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.monitor-gauges-large .gauge-card {
  background: white; border-radius: 16px; padding: 20px;
  display: flex; align-items: center; justify-content: space-between;
  box-shadow: var(--card-shadow); min-height: 180px;
}
.monitor-gauges-large .gauge-info {
  display: flex; flex-direction: column; justify-content: center;
  flex: 1; padding-right: 14px; gap: 8px;
}
.monitor-gauges-large .gauge-label-big {
  font-size: 44px; font-weight: 800; color: var(--text-primary); line-height: 1;
}
.monitor-gauges-large .gauge-label-sub {
  font-size: 20px; color: var(--text-secondary); font-weight: 600;
}
.monitor-gauges-large .gauge-circle-wrap {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.monitor-gauges-large .gauge-circle {
  position: relative; width: 140px; height: 140px; flex-shrink: 0;
}
.monitor-gauges-large .gauge-circle svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.monitor-gauges-large .gauge-value {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-size: 52px; font-weight: 800;
}
.monitor-gauges-large .gauge-range-below {
  font-size: 18px; color: var(--text-secondary); font-weight: 600; white-space: nowrap;
}
.monitor-gauges-large .moisture-fill + .gauge-value { color: #2196f3; }
.monitor-gauges-large .ec-fill + .gauge-value { color: #4caf50; }
.monitor-gauges-large .ph-fill + .gauge-value { color: #9c27b0; }
.monitor-gauges-large .temp-fill + .gauge-value { color: #ff9800; }

.chart-card { background: white; border-radius: 14px; padding: 14px; margin-bottom: 16px; box-shadow: var(--card-shadow); }
.chart-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.chart-header h3 { font-size: 20px; font-weight: 600; }
.chart-legend { display: flex; gap: 10px; font-size: 12px; color: var(--text-secondary); align-items: center; }
.legend-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.legend-dot.blue { background: #2196f3; }
.legend-dot.green { background: #4caf50; }
.legend-dot.orange { background: #ff9800; }

.table-wrap { overflow-x: auto; }
.sensor-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.sensor-table th, .sensor-table td { padding: 9px 8px; text-align: center; border-bottom: 1px solid var(--border); white-space: nowrap; }
.sensor-table th { background: var(--green-bg); color: var(--text-secondary); font-weight: 600; font-size: 12px; }
.status-online { color: #2e7d32; font-weight: 600; }
.status-offline { color: #c62828; }

/* ===== 树医生页 ===== */
.doctor-nav { display: flex; gap: 8px; margin-bottom: 16px; }
.doc-nav-btn {
  flex: 1; padding: 10px 6px; border-radius: 12px;
  border: 1.5px solid var(--border); background: white;
  font-size: 12px; font-weight: 600; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  color: var(--text-secondary); transition: all 0.2s;
}
.doc-nav-btn span { font-size: 20px; }
.doc-nav-btn.active { background: var(--green-primary); color: white; border-color: var(--green-primary); }
.doc-panel { display: none; }
.doc-panel.active { display: block; }

/* AI Chat */
.ai-chat-container {
  background: white; border-radius: 14px;
  box-shadow: var(--card-shadow); overflow: hidden;
  display: flex; flex-direction: column;
  /* 动态高度：全屏减头部减doc导航 */
  height: calc(100vh - var(--header-h) - var(--tab-h) - 150px);
  min-height: 360px;
}
.ai-chat-msgs {
  flex: 1; overflow-y: auto; padding: 14px;
  display: flex; flex-direction: column; gap: 10px;
  -webkit-overflow-scrolling: touch;
}
.msg { display: flex; gap: 8px; align-items: flex-start; }
.ai-msg { flex-direction: row; }
.user-msg { 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; background: var(--green-bg);
}
.user-msg .msg-avatar { background: #e3f2fd; }
.msg-bubble {
  max-width: 78%; padding: 10px 13px; border-radius: 14px;
  font-size: 14px; line-height: 1.6; background: var(--green-bg); color: var(--text-primary);
}
.user-msg .msg-bubble { background: var(--green-primary); color: white; border-radius: 14px 14px 4px 14px; }
.ai-msg .msg-bubble { border-radius: 14px 14px 14px 4px; }

.quick-questions { display: flex; flex-wrap: wrap; gap: 8px; padding: 4px 0 6px; }
.quick-q {
  padding: 6px 12px; border-radius: 20px;
  border: 1.5px solid var(--border); background: white;
  font-size: 12px; cursor: pointer; color: var(--green-primary); transition: all 0.2s;
}
.quick-q:active { background: var(--green-primary); color: white; }

.ai-input-area { padding: 10px 14px; border-top: 1px solid var(--border); background: white; }
.ai-input-wrap { display: flex; gap: 8px; align-items: flex-end; }
.ai-input-wrap textarea {
  flex: 1; border: 1.5px solid var(--border); border-radius: 10px;
  padding: 9px 12px; font-size: 14px; resize: none;
  font-family: inherit; background: var(--green-bg); outline: none;
  user-select: text;
}
.ai-send-btn {
  background: var(--green-primary); color: white; border: none;
  padding: 9px 16px; border-radius: 10px; font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.ai-upload-hint { display: flex; align-items: center; gap: 10px; margin-top: 7px; }
.hint-text { font-size: 12px; color: var(--text-secondary); }

.typing-dots span {
  display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  background: var(--green-primary); animation: typing 1.2s infinite; margin: 0 2px;
}
.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typing { 0%, 80%, 100% { transform: scale(0.7); opacity: 0.5; } 40% { transform: scale(1); opacity: 1; } }

/* 养树指引 */
.guide-search { margin-bottom: 16px; }
.guide-search input {
  width: 100%; padding: 11px 16px; border-radius: 12px;
  border: 1.5px solid var(--border); font-size: 14px; outline: none;
  background: white; user-select: text;
}
.guide-list { display: flex; flex-direction: column; gap: 12px; }
.guide-card {
  background: white; border-radius: 14px; padding: 14px;
  box-shadow: var(--card-shadow); cursor: pointer; transition: all 0.2s;
}
.guide-card:active { transform: scale(0.98); }
.guide-card-header { display: flex; gap: 12px; align-items: center; margin-bottom: 8px; }
.guide-emoji { font-size: 36px; }
.guide-card-title { font-size: 16px; font-weight: 700; }
.guide-card-tag {
  font-size: 12px; padding: 2px 10px; border-radius: 20px;
  background: var(--green-bg); color: var(--green-primary);
  font-weight: 600; margin-top: 4px; display: inline-block;
}
.guide-card-summary { font-size: 13px; color: #666; line-height: 1.6; }

/* 专家 */
.expert-banner {
  background: linear-gradient(135deg, #1a5c2e, #4caf72);
  border-radius: 14px; padding: 16px;
  display: flex; gap: 14px; align-items: center;
  margin-bottom: 16px; color: white;
}
.expert-banner-img { font-size: 50px; }
.expert-banner-text h3 { font-size: 18px; margin-bottom: 4px; }
.expert-banner-text p { font-size: 13px; opacity: 0.85; }
.expert-list { display: flex; flex-direction: column; gap: 14px; }

/* 新版专家卡片 */
.expert-card-full {
  background: white; border-radius: 16px; padding: 16px;
  box-shadow: var(--card-shadow); display: flex; flex-direction: column; gap: 10px;
}
.expert-card-top { display: flex; gap: 14px; align-items: flex-start; }
.expert-avatar-wrap { position: relative; flex-shrink: 0; }
.expert-avatar { font-size: 44px; line-height: 1; }
.expert-online-dot {
  position: absolute; bottom: 2px; right: 2px;
  width: 12px; height: 12px; border-radius: 50%; border: 2px solid white;
}
.dot-online { background: #2e7d32; }
.dot-offline { background: #9e9e9e; }
.expert-info { flex: 1; min-width: 0; }
.expert-name-row { display: flex; align-items: center; gap: 8px; margin-bottom: 3px; flex-wrap: wrap; }
.expert-name { font-size: 17px; font-weight: 700; }
.expert-status-badge { font-size: 11px; padding: 2px 8px; border-radius: 20px; }
.badge-online { background: #e8f5e9; color: #2e7d32; }
.badge-offline { background: #f5f5f5; color: #9e9e9e; }
.expert-title-line { font-size: 13px; font-weight: 600; color: var(--green-primary); margin-bottom: 3px; }
.expert-org { font-size: 12px; color: #666; margin-bottom: 2px; }
.expert-qualification { font-size: 12px; color: #888; margin-bottom: 5px; }
.expert-tags { display: flex; gap: 5px; flex-wrap: wrap; }
.expert-tag { font-size: 11px; padding: 2px 7px; border-radius: 20px; background: var(--green-bg); color: var(--green-primary); }
.expert-experience { font-size: 12px; color: #555; line-height: 1.5; padding: 8px 10px; background: var(--green-bg); border-radius: 8px; }
.expert-schedule { font-size: 12px; color: #e65100; font-weight: 600; }
.expert-actions-full { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.btn-call {
  padding: 10px 8px; border-radius: 10px; border: none; font-size: 12px; font-weight: 600;
  cursor: pointer; text-align: center; line-height: 1.4; text-decoration: none;
  display: block; transition: opacity 0.2s;
}
.btn-call:active { opacity: 0.75; }
.btn-call small { font-weight: 400; font-size: 10px; display: block; margin-top: 2px; opacity: 0.85; }
.btn-call-phone { background: #e8f5e9; color: #1b5e20; }
.btn-call-wechat { background: #e3f2fd; color: #0d47a1; }
.btn-call-msg { background: var(--green-bg); color: var(--green-primary); }
/* 兼容旧版 */
.expert-card { background: white; border-radius: 14px; padding: 14px; box-shadow: var(--card-shadow); display: flex; gap: 12px; align-items: center; }
.expert-actions { display: flex; flex-direction: column; gap: 6px; flex-shrink: 0; }
.expert-msg-form { display: flex; flex-direction: column; gap: 10px; }
.expert-msg-form input, .expert-msg-form textarea {
  width: 100%; padding: 11px 14px; border: 1.5px solid var(--border); border-radius: 10px;
  font-size: 14px; outline: none; font-family: inherit; background: var(--green-bg);
  user-select: text;
}
.expert-msg-form textarea { resize: none; }

/* AI对话头部 */
.ai-chat-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; background: white; border-bottom: 1px solid var(--border);
  border-radius: 14px 14px 0 0; flex-shrink: 0;
}
.ai-chat-title { font-weight: 700; font-size: 15px; color: var(--green-primary); }
.ai-chat-actions { display: flex; gap: 8px; }
.ai-header-btn {
  padding: 5px 10px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--green-bg); color: var(--text-primary); font-size: 12px; cursor: pointer;
}
.ai-header-btn:active { background: var(--border); }
/* 流式输出光标动画 */
.ai-streaming::after { content: '▌'; animation: blink 0.7s infinite; color: var(--green-primary); }
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: 0; } }
/* 宽弹窗 */
.modal-box-wide { max-width: 560px; width: 96vw; }



/* ===== 管理页 ===== */
.admin-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px; }
.admin-card {
  background: white; border-radius: 14px; padding: 14px 10px;
  text-align: center; box-shadow: var(--card-shadow); cursor: pointer; transition: all 0.2s;
}
.admin-card:active { transform: scale(0.95); }
.admin-icon { font-size: 32px; margin-bottom: 6px; }
.admin-label { font-size: 13px; font-weight: 700; margin-bottom: 3px; }
.admin-desc { font-size: 11px; color: var(--text-secondary); }

.log-list { display: flex; flex-direction: column; gap: 6px; }
.log-item { display: flex; gap: 10px; font-size: 13px; padding: 8px 0; border-bottom: 1px solid var(--border); align-items: flex-start; }
.log-item:last-child { border-bottom: none; }
.log-time { color: var(--text-secondary); white-space: nowrap; flex-shrink: 0; font-size: 12px; }
.log-icon { flex-shrink: 0; }

/* ===== 密码锁 ===== */
.lock-box { max-width: 340px; text-align: center; }
.lock-icon { font-size: 50px; margin-bottom: 10px; }
.lock-box h3 { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.lock-box p { font-size: 14px; color: var(--text-secondary); margin-bottom: 18px; }
.lock-box input {
  width: 100%; padding: 13px 16px; font-size: 18px; text-align: center;
  border: 2px solid var(--border); border-radius: 12px; outline: none;
  background: var(--green-bg); letter-spacing: 4px;
  user-select: text;
}
.lock-box input:focus { border-color: var(--green-primary); }
.pwd-err { color: var(--red); font-size: 13px; margin-top: 8px; }
.lock-btns { display: flex; gap: 12px; margin-top: 18px; }
.lock-btns button { flex: 1; }

/* ===== 弹窗 ===== */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.5);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000; padding: 16px;
}
.modal-box {
  background: white; border-radius: 18px;
  width: 100%; max-width: 520px; max-height: 90vh;
  display: flex; flex-direction: column; overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.qr-modal { max-width: 420px; }
.modal-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 20px; border-bottom: 1px solid var(--border);
}
.modal-header h3 { font-size: 17px; font-weight: 700; }
.modal-close { background: none; border: none; font-size: 20px; cursor: pointer; color: #999; padding: 4px 8px; }
.modal-body { padding: 18px 20px; overflow-y: auto; -webkit-overflow-scrolling: touch; flex: 1; }
.modal-body.center { text-align: center; }
.modal-footer { padding: 14px 20px; border-top: 1px solid var(--border); display: flex; gap: 10px; justify-content: flex-end; }

/* Forms */
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; color: var(--text-secondary); margin-bottom: 5px; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: 10px 13px; border: 1.5px solid var(--border); border-radius: 10px;
  font-size: 14px; outline: none; font-family: inherit;
  background: var(--green-bg); color: var(--text-primary); transition: border-color 0.2s;
  user-select: text;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: var(--green-primary); }
.form-row { display: flex; gap: 12px; }
.form-row .form-group { flex: 1; }

.type-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.type-btn {
  padding: 7px 13px; border-radius: 20px; border: 1.5px solid var(--border);
  background: white; cursor: pointer; font-size: 13px; transition: all 0.2s; color: var(--text-secondary);
}
.type-btn.active { background: var(--green-primary); color: white; border-color: var(--green-primary); }

/* QR Code */
.qrcode-wrap {
  display: flex; align-items: center; justify-content: center;
  padding: 16px; background: white; border-radius: 14px;
  margin: 8px auto; width: fit-content;
}
.qr-layout { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.center-qr { justify-content: center; }
.qr-task-name { font-size: 17px; font-weight: 700; margin: 8px 0 5px; }
.qr-hint { font-size: 13px; color: var(--text-secondary); }
.qr-info { font-size: 13px; color: var(--text-secondary); margin-top: 8px; line-height: 1.8; }
.qr-detail { flex: 1; min-width: 160px; }

.info-text { font-size: 14px; color: #666; margin-bottom: 14px; line-height: 1.6; }
.alert-info { background: #e3f2fd; color: #1565c0; padding: 10px 13px; border-radius: 10px; font-size: 13px; margin-top: 8px; }

/* Expert Call */
.expert-call-avatar { font-size: 72px; margin-bottom: 8px; }
.expert-call-name { font-size: 20px; font-weight: 700; margin-bottom: 6px; }
.expert-call-status { color: var(--red); font-size: 14px; font-weight: 600; }
.call-btns { display: flex; gap: 10px; justify-content: center; margin-top: 18px; flex-wrap: wrap; }
.call-btn { padding: 11px 20px; border-radius: 12px; border: none; font-size: 14px; font-weight: 600; cursor: pointer; }
.call-btn.video { background: var(--green-primary); color: white; }
.call-btn.voice { background: var(--blue); color: white; }
.call-btn.msg { background: var(--orange); color: white; }

/* ===== 使用说明页 ===== */
.help-hero { text-align: center; padding: 28px 16px 20px; }
.help-hero-icon { font-size: 52px; margin-bottom: 10px; }
.help-hero h2 { font-size: 22px; font-weight: 800; color: var(--green-dark); margin: 0 0 4px; }
.help-hero-sub { color: #888; font-size: 14px; margin: 0; }

.help-section { padding: 0 16px 8px; margin-bottom: 4px; }
.help-section-title { font-size: 15px; font-weight: 700; color: var(--green-dark); margin: 0 0 12px; padding-bottom: 6px; border-bottom: 2px solid var(--green-light); }

/* 步骤列表 */
.help-steps { display: flex; flex-direction: column; gap: 12px; }
.help-step { display: flex; gap: 14px; align-items: flex-start; background: white; border-radius: 12px; padding: 14px; box-shadow: 0 1px 6px rgba(0,0,0,.06); }
.step-num { width: 30px; height: 30px; min-width: 30px; border-radius: 50%; background: var(--green-primary); color: white; font-size: 14px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.step-title { font-size: 14px; font-weight: 700; color: #222; margin-bottom: 4px; }
.step-desc { font-size: 13px; color: #555; line-height: 1.55; }
.step-desc code { background: #f0f4f0; border-radius: 4px; padding: 1px 5px; font-size: 12px; color: #2e7d32; font-family: monospace; }

/* 功能卡片 */
.help-cards { display: flex; flex-direction: column; gap: 10px; }
.help-card { display: flex; gap: 14px; align-items: flex-start; background: white; border-radius: 12px; padding: 14px; box-shadow: 0 1px 6px rgba(0,0,0,.06); }
.help-card-icon { font-size: 28px; min-width: 36px; text-align: center; }
.help-card-title { font-size: 14px; font-weight: 700; color: #222; margin-bottom: 4px; }
.help-card-desc { font-size: 13px; color: #555; line-height: 1.55; }

/* FAQ */
.faq-list { display: flex; flex-direction: column; gap: 8px; }
.faq-item { background: white; border-radius: 12px; overflow: hidden; box-shadow: 0 1px 6px rgba(0,0,0,.06); cursor: pointer; }
.faq-q { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; font-size: 14px; font-weight: 600; color: #222; }
.faq-arrow { font-size: 20px; color: #aaa; transition: transform .25s; line-height: 1; }
.faq-item.open .faq-arrow { transform: rotate(90deg); }
.faq-a { display: none; padding: 0 16px 14px; font-size: 13px; color: #555; line-height: 1.65; border-top: 1px solid #f0f0f0; padding-top: 12px; }
.faq-a code { background: #f0f4f0; border-radius: 4px; padding: 1px 5px; font-size: 12px; color: #2e7d32; font-family: monospace; }
.faq-item.open .faq-a { display: block; }

/* 文件树 */
.help-file-tree { background: white; border-radius: 12px; padding: 16px; box-shadow: 0 1px 6px rgba(0,0,0,.06); }
.file-tree-item { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid #f5f5f5; }
.file-tree-item:last-child { border-bottom: none; }
.file-tree-item.indent { padding-left: 18px; }
.file-icon { font-size: 16px; min-width: 22px; text-align: center; }
.file-name { font-size: 13px; font-weight: 600; color: #2e7d32; font-family: monospace; min-width: 180px; }
.file-desc { font-size: 12px; color: #888; }

/* 版本信息 */
.help-version-box { background: linear-gradient(135deg, #e8f5e9 0%, #f1f8e9 100%); border-radius: 12px; padding: 18px; text-align: center; margin-top: 8px; }

/* ===== 硬件实装方案 ===== */
.hw-block {
  background: white; border-radius: 14px;
  padding: 16px; margin-bottom: 14px;
  box-shadow: 0 1px 8px rgba(0,0,0,.07);
}
.hw-block-title {
  font-size: 15px; font-weight: 700; color: #1a3c1a;
  margin-bottom: 12px; display: flex; align-items: center; gap: 6px;
}
.hw-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.hw-table {
  width: 100%; border-collapse: collapse; font-size: 12.5px;
  min-width: 420px;
}
.hw-table thead tr { background: #e8f5e9; }
.hw-table th {
  padding: 9px 10px; text-align: left; font-weight: 700;
  color: #2e7d32; white-space: nowrap; font-size: 12px;
}
.hw-table td {
  padding: 9px 10px; border-bottom: 1px solid #f0f0f0;
  color: #333; line-height: 1.5;
}
.hw-table tr:last-child td { border-bottom: none; }
.hw-table tr.hw-recommended { background: #f9fff5; }
.hw-sub { font-size: 11px; color: #888; }
.hw-badge {
  display: inline-block; padding: 2px 8px; border-radius: 10px;
  font-size: 11px; font-weight: 700; white-space: nowrap;
}
.hw-badge.best { background: #ff9800; color: white; }
.hw-badge.good { background: #4caf50; color: white; }
.hw-badge.alt  { background: #90a4ae; color: white; }
.hw-tip {
  margin-top: 10px; padding: 10px 12px;
  background: #fffde7; border-left: 3px solid #ffc107;
  border-radius: 0 8px 8px 0; font-size: 12.5px; color: #555; line-height: 1.6;
}

/* 通信供电卡片 */
.hw-cards-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
}
.hw-info-card {
  background: #f7faf7; border-radius: 10px;
  padding: 12px; border: 1px solid #e0ede0;
}
.hw-info-icon { font-size: 22px; margin-bottom: 5px; }
.hw-info-title { font-size: 13px; font-weight: 700; color: #2e7d32; margin-bottom: 4px; }
.hw-info-desc { font-size: 12px; color: #555; line-height: 1.5; }

/* 架构图 */
.hw-arch {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.arch-layer {
  width: 100%; background: #f7faf7; border-radius: 10px;
  padding: 10px 12px; border: 1px solid #e0ede0;
}
.arch-layer-label {
  font-size: 11px; font-weight: 700; color: #888;
  margin-bottom: 8px; text-transform: uppercase; letter-spacing: 1px;
}
.arch-nodes { display: flex; gap: 8px; flex-wrap: wrap; }
.arch-node {
  flex: 1; min-width: 70px; text-align: center;
  padding: 8px 6px; border-radius: 8px;
  font-size: 11px; line-height: 1.6; color: #333;
}
.arch-node small { font-size: 10px; color: #888; display: block; }
.arch-node.sensor   { background: #e3f2fd; }
.arch-node.gateway  { background: #e8f5e9; }
.arch-node.platform { background: #fff3e0; }
.arch-node.app      { background: #fce4ec; }
.arch-arrow {
  font-size: 12px; color: #aaa; font-weight: 600;
  padding: 2px 0; letter-spacing: 1px;
}



/* ===== 植物图鉴页 ===== */
.plants-hero {
  position: relative;
  padding: 28px 20px 22px;
  background: linear-gradient(135deg, #1a5c2e 0%, #2d7d46 60%, #388e3c 100%);
  overflow: hidden;
  margin-bottom: 0;
}
.plants-hero-bg {
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M40 20c0-8-6-14-14-14s-14 6-14 14 6 14 14 14 14-6 14-14zm-6 0c0 4.4-3.6 8-8 8s-8-3.6-8-8 3.6-8 8-8 8 3.6 8 8z'/%3E%3C/g%3E%3C/svg%3E");
}
.plants-hero-content { position: relative; z-index: 1; color: white; }
.plants-hero-content h2 { font-size: 22px; font-weight: 800; margin: 0 0 6px; letter-spacing: 1px; }
.plants-hero-content p { font-size: 13px; opacity: 0.85; line-height: 1.5; margin: 0; }

/* 筛选栏 */
.plants-filter-bar {
  display: flex; flex-direction: column; gap: 10px;
  padding: 14px 16px 10px;
  background: white;
  border-bottom: 1px solid var(--border);
}
.plants-search-wrap input {
  width: 100%; padding: 10px 14px; border-radius: 22px;
  border: 1.5px solid var(--border); font-size: 14px;
  background: var(--green-bg); outline: none;
}
.plants-search-wrap input:focus { border-color: var(--green-primary); }
.plants-type-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.plant-type-btn {
  padding: 6px 14px; border-radius: 20px; border: 1.5px solid var(--border);
  background: white; font-size: 13px; font-weight: 600; cursor: pointer;
  color: var(--text-secondary); transition: all .2s;
}
.plant-type-btn.active {
  background: var(--green-primary); color: white; border-color: var(--green-primary);
}

/* 统计栏 */
.plants-stats-bar {
  display: flex; align-items: center; justify-content: space-around;
  background: white; padding: 12px 8px;
  border-bottom: 1px solid var(--border);
}
.ps-item { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.ps-num { font-size: 22px; font-weight: 800; color: var(--green-primary); line-height: 1; }
.ps-label { font-size: 11px; color: #999; }
.ps-divider { width: 1px; height: 32px; background: var(--border); }

/* 植物卡片网格 */
.plant-cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  padding: 14px 12px 80px;
}
@media (min-width: 480px) {
  .plant-cards-grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 768px) {
  .plant-cards-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1100px) {
  .plant-cards-grid { grid-template-columns: repeat(4, 1fr); }
}
.plant-detail-card {
  background: white; border-radius: 14px;
  padding: 0; box-shadow: var(--card-shadow);
  cursor: pointer; transition: transform .2s, box-shadow .2s;
}
.plant-detail-card:active { transform: scale(0.97); }

/* 卡片图片区域 */
.pdc-img-wrap {
  width: 100%; height: 130px; overflow: hidden;
  border-radius: 10px 10px 0 0; background: #e8f5e9;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 0;
}
.pdc-img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform .3s;
}
.plant-detail-card:hover .pdc-img { transform: scale(1.05); }
.pdc-img-empty { background: linear-gradient(135deg, #e8f5e9 0%, #f1f8e9 100%); }
.pdc-emoji-fallback { font-size: 52px; line-height: 1; }

/* 卡片内容区 */
.pdc-body { padding: 10px 12px 12px; }
.pdc-row1 { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.pdc-info { flex: 1; }
.pdc-name { font-size: 16px; font-weight: 800; color: var(--text-primary); }
.pdc-cat { font-size: 11px; color: #999; margin-top: 2px; }
.pdc-resilience { text-align: center; flex-shrink: 0; }
.pdc-res-num { font-size: 20px; font-weight: 800; line-height: 1; }
.pdc-res-label { font-size: 10px; color: #999; }
.pdc-badges { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 8px; }
.plant-badge {
  padding: 2px 8px; border-radius: 10px; font-size: 11px; font-weight: 600;
}
.plant-badge.disease { background: #e8f5e9; color: #2e7d32; }
.plant-badge.pest { background: #fff3e0; color: #e65100; }
.pdc-features {
  font-size: 12px; color: #666; line-height: 1.5; margin-bottom: 8px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.pdc-footer { display: flex; justify-content: space-between; align-items: center; }
.pdc-habitat { font-size: 11px; color: #aaa; flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.pdc-more { font-size: 11px; color: var(--green-primary); font-weight: 600; white-space: nowrap; margin-left: 4px; }

.plant-empty { text-align: center; padding: 60px 20px; color: #aaa; font-size: 15px; grid-column: 1/-1; }

/* 分页控件 */
.plant-pagination { grid-column: 1/-1; padding: 16px 12px 8px; }
.pp-wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; }
.pp-btn {
  padding: 6px 12px; border: 1px solid #e0e0e0; border-radius: 8px;
  background: #fff; color: var(--text-secondary); font-size: 13px; cursor: pointer;
  transition: all 0.2s;
}
.pp-btn:hover { background: var(--green-primary); color: #fff; border-color: var(--green-primary); }
.pp-btn.active { background: var(--green-primary); color: #fff; border-color: var(--green-primary); font-weight: 700; }
.pp-ellipsis { color: #bbb; padding: 0 4px; line-height: 30px; }
.pp-info { font-size: 12px; color: #aaa; margin-left: 8px; }



/* 植物详情弹窗内容 */
.guide-detail-block { margin-bottom: 14px; background: var(--green-bg); border-radius: 10px; padding: 12px; }
.guide-block-title { font-size: 13px; font-weight: 700; color: var(--green-primary); margin-bottom: 6px; }
.guide-block-content { font-size: 13px; color: #444; line-height: 1.6; }
.res-level {
  display: inline-block; padding: 3px 12px; border-radius: 12px; font-size: 13px; font-weight: 700;
}
.res-level.res-excellent { background: #e8f5e9; color: #1b5e20; }
.res-level.res-good { background: #e3f2fd; color: #0d47a1; }
.res-level.res-medium { background: #fff3e0; color: #e65100; }
.res-level.res-weak { background: #fce4ec; color: #880e4f; }

/* 植物详情弹窗大图 */
.pdc-modal-img-wrap {
  width: 100%; height: 200px; overflow: hidden;
  border-radius: 12px; margin-bottom: 14px;
}
.pdc-modal-img {
  width: 100%; height: 100%; object-fit: cover;
}
.pdc-modal-emoji-banner {
  font-size: 72px; text-align: center; padding: 16px 0;
  background: linear-gradient(135deg, #e8f5e9 0%, #f1f8e9 100%);
  border-radius: 12px; margin-bottom: 14px;
}
.pdc-modal-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 12px; margin-bottom: 16px;
}

/* 韧性主题 Banner 补充样式 */
.resilience-banner {
  background: linear-gradient(135deg, #1b5e20 0%, #2d7d46 50%, #43a047 100%) !important;
}
.resilience-mission {
  background: linear-gradient(135deg, #f1f8e9 0%, #e8f5e9 100%);
  border: 1.5px solid #c8e6c9;
  border-radius: 14px; padding: 16px; margin: 0 0 12px;
}
.mission-title { font-size: 16px; font-weight: 800; color: #1b5e20; margin-bottom: 8px; }
.mission-desc { font-size: 13px; color: #444; line-height: 1.7; margin-bottom: 12px; }
.mission-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.mission-btn {
  padding: 8px 14px; border-radius: 20px; border: none;
  background: var(--green-primary); color: white;
  font-size: 13px; font-weight: 600; cursor: pointer;
}
.carbon-list { display: flex; flex-direction: column; gap: 10px; }
.carbon-item { display: flex; align-items: center; gap: 10px; }
.carbon-icon { font-size: 20px; }
.carbon-label { flex: 1; font-size: 13px; color: #444; }
.carbon-val { font-size: 13px; font-weight: 700; color: var(--green-primary); }
.version-title { font-size: 15px; font-weight: 700; color: var(--green-dark); margin-bottom: 6px; }
.version-info { font-size: 12px; color: #666; margin: 3px 0; }

/* 平板横屏：帮助页两列布局 */
@media (orientation: landscape) and (min-width: 768px) {
  .help-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  .help-steps { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
}

/* Toast */
.toast {
  position: fixed; bottom: calc(var(--tab-h) + 16px); left: 50%; transform: translateX(-50%);
  background: rgba(0,0,0,0.8); color: white;
  padding: 11px 22px; border-radius: 30px; font-size: 14px;
  z-index: 9000; transition: opacity 0.3s; white-space: nowrap; max-width: 90vw;
}

/* ===== 横屏平板/触屏一体机适配 ===== */
@media (orientation: landscape) and (min-width: 768px) {
  /* 显示侧边导航，隐藏底部Tab */
  .side-nav { display: flex; }
  .tab-nav { display: none; }

  /* Toast位置 */
  .toast { bottom: 20px; }

  /* 导航按钮触控区放大 */
  .nav-btn { min-height: 52px; }

  /* AI聊天高度重算 */
  .ai-chat-container {
    height: calc(100vh - var(--header-h) - 150px);
  }

  /* ===== 总览 ===== */
  .stats-grid { grid-template-columns: repeat(4, 1fr); gap: 12px; }
  .two-col-layout { flex-direction: row; gap: 16px; }
  .two-col-layout > div { flex: 1; }

  /* ===== 植物图鉴 ===== */
  .plant-cards-grid { grid-template-columns: repeat(5, 1fr); }

  /* ===== 巡护任务 ===== */
  .task-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .task-card { margin-bottom: 0; }

  /* ===== 低碳行动（默认已横屏双列，这里微调） ===== */
  .carbon-stats-row { grid-template-columns: repeat(4, 1fr); }
  /* 认养网格横屏时展示更多列 */
  .plant-adopt-grid { grid-template-columns: repeat(3, 1fr); }

  /* ===== 秘境探索 ===== */
  .explore-feed { grid-template-columns: repeat(2, 1fr); }
  /* 秘境探索页左右布局：左发布 右feed */
  .explore-landscape-wrap {
    display: flex; gap: 14px; align-items: flex-start;
  }
  .explore-left-col { width: 360px; flex-shrink: 0; }
  .explore-right-col { flex: 1; min-width: 0; }
  .explore-left-col { width: 360px; flex-shrink: 0; }
  .explore-right-col { flex: 1; min-width: 0; }

  /* ===== 守护日志 ===== */
  .mylog-points-row { grid-template-columns: repeat(3, 1fr); }
  .my-trees-grid { grid-template-columns: repeat(3, 1fr); }
  /* 守护日志上下布局：统一竖排格式 */
  .mylog-vertical-wrap {
    display: flex; flex-direction: column; gap: 12px;
  }
  .mylog-section {
    display: flex; flex-direction: column; gap: 12px;
  }
  /* 兼容旧类名 */
  .mylog-landscape-wrap {
    display: flex; flex-direction: column; gap: 12px;
  }
  .mylog-left-col { width: 100%; }
  .mylog-right-col { width: 100%; }

  /* ===== 生境监测 ===== */
  .monitor-gauges { grid-template-columns: repeat(4, 1fr); }
  .monitor-gauges-large { grid-template-columns: 1fr 1fr; }
  .sensor-nodes { flex-wrap: nowrap; }

  /* ===== 通用：表单输入触控高度 ===== */
  input[type="text"], input[type="password"], input[type="number"],
  input[type="date"], select, textarea {
    min-height: 42px; font-size: 14px;
  }
  .btn-primary, .btn-secondary { min-height: 42px; }
  .filter-btn, .node-btn { min-height: 40px; padding: 8px 16px; }
}

/* ===== 植物图鉴：胁迫分类 ===== */
.plants-stress-tabs {
  display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px;
}
.plant-stress-btn {
  padding: 7px 16px; border-radius: 20px; border: 2px solid #e0e0e0;
  background: white; color: #555; font-size: 14px; font-weight: 600;
  cursor: pointer; transition: all .2s;
}
.plant-stress-btn.active {
  background: var(--green-primary); color: white; border-color: var(--green-primary);
}
.plant-badge.abiotic { background: #e3f2fd; color: #1565c0; }
.plant-badge.flagship { background: #fff8e1; color: #f57f17; }

/* ===== 低碳行动页 ===== */

/* 横屏时page-scroll内边距减小，充分利用宽度 */
.carbon-page-scroll { padding: 12px 16px; }

/* 紧凑版 Hero（横屏不占太多高度） */
.carbon-hero {
  display: flex; align-items: center; gap: 14px;
  background: linear-gradient(135deg, #1b5e20, #4caf50);
  border-radius: 16px; padding: 14px 20px;
  margin-bottom: 12px; color: white;
}
.carbon-hero-icon { font-size: 36px; flex-shrink: 0; }
.carbon-hero-title { font-size: 20px; font-weight: 800; line-height: 1.2; }
.carbon-hero-sub { font-size: 13px; opacity: 0.85; margin-top: 3px; }

/* 统计4宫格 */
.carbon-stats-row {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px;
  margin-bottom: 12px;
}
.carbon-stat-card {
  background: white; border-radius: 14px; padding: 14px 10px;
  text-align: center; box-shadow: var(--card-shadow);
  border: 1px solid #e8f5e9; transition: transform .15s;
}
.carbon-stat-card:hover { transform: translateY(-2px); }
.cs-icon { font-size: 22px; margin-bottom: 5px; }
.cs-num { font-size: 20px; font-weight: 800; line-height: 1.2; }
.cs-num.green { color: #2d7d46; }
.cs-num.blue { color: #1565c0; }
.cs-num.orange { color: #e65100; }
.cs-num.purple { color: #6a1b9a; }
.cs-label { font-size: 11px; color: #888; margin-top: 4px; }

/* 横屏主体双列网格 */
.carbon-landscape-grid {
  display: flex; gap: 14px; align-items: flex-start;
}
.carbon-col {
  flex: 1; display: flex; flex-direction: column; gap: 12px; min-width: 0;
}
/* 双列中的card去掉默认margin-bottom，由gap控制 */
.carbon-col-card { margin-bottom: 0 !important; }

/* 行动数据列表：分割线风格 */
.carbon-full-list { display: flex; flex-direction: column; }
.carbon-item-full {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 4px;
  border-bottom: 1px solid #f0f0f0;
}
.carbon-item-full:last-child { border-bottom: none; }
.carbon-icon-lg { font-size: 24px; width: 32px; text-align: center; flex-shrink: 0; }
.carbon-item-body { flex: 1; min-width: 0; }
.carbon-item-label { font-size: 13px; color: #444; font-weight: 600; }
.carbon-item-val { font-size: 16px; font-weight: 800; color: var(--green-primary); margin-top: 2px; }
.carbon-edit-btn {
  padding: 5px 10px; border-radius: 16px; border: 1.5px solid var(--green-primary);
  background: transparent; color: var(--green-primary); font-size: 12px;
  font-weight: 700; cursor: pointer; white-space: nowrap; flex-shrink: 0;
  transition: background .2s, color .2s; min-height: 36px;
}
.carbon-edit-btn:hover { background: var(--green-primary); color: white; }

/* 任务打卡 */
.carbon-tasks { display: flex; flex-direction: column; gap: 8px; }
.carbon-task-item {
  display: flex; align-items: center; gap: 12px;
  border-radius: 12px; padding: 12px 14px;
  cursor: pointer; transition: background .2s;
  border: 1.5px solid #e8f5e9; background: #fafffe;
  min-height: 48px; /* 触屏友好 */
}
.carbon-task-item.done { background: #f1faf2; border-color: #c8e6c9; }
.carbon-check { font-size: 18px; flex-shrink: 0; }
.carbon-task-label { flex: 1; font-size: 14px; color: #333; }
.carbon-task-item.done .carbon-task-label { color: #888; text-decoration: line-through; }
.carbon-task-pts {
  font-size: 12px; font-weight: 700; color: #ff9800;
  background: #fff3e0; padding: 2px 8px; border-radius: 10px;
  white-space: nowrap;
}

/* 认养树种网格 */
.plant-adopt-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
}
.adopt-tree-card {
  background: #f7faf7; border-radius: 12px; padding: 12px 6px;
  text-align: center; cursor: pointer; border: 1.5px solid transparent;
  transition: border-color .2s, transform .15s; min-height: 80px;
}
.adopt-tree-card:hover { border-color: var(--green-primary); transform: translateY(-2px); }
.adopt-emoji { font-size: 28px; }
.adopt-name { font-size: 12px; font-weight: 700; color: #333; margin-top: 5px; }
.adopt-loc { font-size: 10px; color: #999; margin-top: 1px; }
.adopt-count {
  font-size: 10px; color: var(--green-primary); font-weight: 600;
  margin-top: 4px; background: #e8f5e9; border-radius: 8px; padding: 1px 5px;
  display: inline-block;
}

/* 申请认养表单 */
.adopt-form-inner { padding: 2px 0; }
.full-btn { width: 100%; min-height: 44px; font-size: 15px; }

/* ===== 秘境探索 ===== */
/* 默认竖屏：单列 */
.explore-landscape-wrap { display: flex; flex-direction: column; gap: 12px; }
.explore-left-col, .explore-right-col { width: 100%; }
/* 默认竖屏：单列 - 已统一为竖排 */
.mylog-vertical-wrap { display: flex; flex-direction: column; gap: 12px; }
.mylog-section { display: flex; flex-direction: column; gap: 12px; }

.explore-post-form { padding: 4px 0; }
.explore-upload-area {
  width: 100%; height: 160px; border: 2px dashed #c8e6c9; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; background: #f9fbe7; color: #666; text-align: center;
  font-size: 14px; transition: border-color .2s;
}
.explore-upload-area:hover { border-color: var(--green-primary); }
.upload-placeholder { font-size: 14px; color: #aaa; line-height: 1.8; }

.explore-filter { display: flex; gap: 6px; flex-wrap: wrap; }
.explore-feed {
  display: flex; flex-direction: column; gap: 14px; margin-top: 8px;
}
.explore-post-card {
  background: #f9f9f9; border-radius: 14px; padding: 14px;
  border: 1px solid #f0f0f0;
}
.explore-post-header { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.explore-avatar { font-size: 28px; }
.explore-username { font-size: 14px; font-weight: 700; color: #333; }
.explore-time { font-size: 11px; color: #999; margin-top: 2px; }
.explore-post-img-area {
  font-size: 80px; text-align: center; background: #f0f4e8;
  border-radius: 10px; padding: 12px; margin-bottom: 10px; line-height: 1;
}
.explore-post-title { font-size: 16px; font-weight: 800; color: #222; margin-bottom: 6px; }
.explore-post-desc { font-size: 13px; color: #555; line-height: 1.7; margin-bottom: 8px; }
.explore-post-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.explore-tag { background: #e8f5e9; color: #2d7d46; padding: 3px 10px; border-radius: 12px; font-size: 12px; font-weight: 600; }
.explore-post-actions { display: flex; gap: 10px; border-top: 1px solid #eee; padding-top: 10px; }
.explore-action-btn {
  padding: 6px 12px; border-radius: 20px; border: 1.5px solid #e0e0e0;
  background: white; color: #555; font-size: 13px; cursor: pointer;
}
.explore-action-btn:hover { border-color: var(--green-primary); color: var(--green-primary); }

/* ===== 守护日志 ===== */
.my-trees-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 8px;
}
.my-tree-card {
  background: #f9f9f9; border-radius: 14px; padding: 14px;
  display: flex; gap: 12px; align-items: flex-start;
  border: 2px solid transparent;
}
.my-tree-card.healthy { border-color: #c8e6c9; }
.my-tree-card.attention { border-color: #ffe0b2; }
.my-tree-card.add-tree {
  align-items: center; justify-content: center; flex-direction: column;
  border: 2px dashed #c8e6c9; cursor: pointer; background: #f1f8e9;
}
.my-tree-emoji { font-size: 36px; }
.my-tree-info { flex: 1; }
.my-tree-name { font-size: 15px; font-weight: 800; color: #222; }
.my-tree-loc { font-size: 12px; color: #888; margin: 3px 0; }
.my-tree-date { font-size: 11px; color: #aaa; }
.my-tree-status { font-size: 12px; font-weight: 700; margin-top: 4px; }
.my-tree-status.healthy { color: #2d7d46; }
.my-tree-status.attention { color: #f57c00; }
.my-tree-lastcheck { font-size: 11px; color: #aaa; text-align: right; flex-shrink: 0; }
.add-tree-icon { font-size: 28px; color: #aaa; }
.add-tree-text { font-size: 12px; color: #aaa; text-align: center; margin-top: 4px; }

.mylog-timeline { display: flex; flex-direction: column; gap: 0; }
.timeline-item { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 1px dashed #f0f0f0; }
.timeline-dot { font-size: 20px; flex-shrink: 0; width: 32px; text-align: center; }
.timeline-body { flex: 1; }
.timeline-date { font-size: 11px; color: #aaa; }
.timeline-title { font-size: 14px; font-weight: 700; color: #222; margin: 2px 0; }
.timeline-desc { font-size: 12px; color: #666; line-height: 1.6; }
.timeline-pts { font-size: 12px; font-weight: 700; color: #ff9800; margin-top: 4px; }

.mylog-tasks { display: flex; flex-direction: column; gap: 8px; }
.mylog-task-item {
  display: flex; align-items: center; gap: 10px;
  background: #f5f5f5; border-radius: 10px; padding: 10px 14px;
}
.mylog-task-item.done { background: #e8f5e9; }
.mylog-task-status { font-size: 16px; }
.mylog-task-info { flex: 1; }
.mylog-task-title { font-size: 14px; font-weight: 700; color: #222; }
.mylog-task-meta { font-size: 11px; color: #888; margin-top: 2px; }
.mylog-task-pts { font-size: 12px; font-weight: 700; color: #ff9800; }

.mylog-points-row {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px;
}
.mylog-points-card {
  background: #f5f5f5; border-radius: 12px; padding: 14px; text-align: center;
}
.mp-num { font-size: 26px; font-weight: 800; color: var(--green-primary); }
.mp-label { font-size: 12px; color: #888; margin-top: 4px; }

.mylog-badges { display: flex; gap: 10px; flex-wrap: wrap; }
.badge-item {
  background: linear-gradient(135deg,#fff8e1,#fffde7);
  border: 1.5px solid #ffe082; border-radius: 12px;
  padding: 10px 14px; text-align: center; min-width: 80px;
}
.badge-emoji { font-size: 28px; }
.badge-name { font-size: 12px; font-weight: 700; color: #e65100; margin-top: 4px; }
.badge-desc { font-size: 10px; color: #aaa; }

/* ===== 管理案例 ===== */
.case-card {
  position: relative; background: #f9f9f9; border-radius: 14px;
  padding: 14px; margin-bottom: 12px; cursor: pointer;
  border: 1.5px solid #f0f0f0; transition: border-color .2s;
}
.case-card:hover { border-color: var(--green-primary); }
.case-flag {
  position: absolute; top: -10px; right: 12px;
  background: #f44336; color: white; font-size: 11px; font-weight: 700;
  padding: 3px 10px; border-radius: 10px;
}
.case-header { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 8px; }
.case-emoji { font-size: 32px; flex-shrink: 0; }
.case-info { flex: 1; }
.case-title { font-size: 15px; font-weight: 800; color: #222; }
.case-meta { font-size: 12px; color: #888; margin: 3px 0; }
.case-tags { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 4px; }
.case-tag { background: #e8f5e9; color: #2d7d46; padding: 2px 8px; border-radius: 8px; font-size: 11px; font-weight: 600; }
.case-summary { font-size: 13px; color: #555; line-height: 1.6; margin-bottom: 8px; }
.case-footer { display: flex; gap: 12px; align-items: center; font-size: 12px; color: #aaa; }
.case-author { margin-left: auto; font-style: italic; }


/* 竖屏手机额外适配 */
@media (max-width: 480px) {
  .admin-grid { grid-template-columns: repeat(2, 1fr); }
  .qr-layout { flex-direction: column; align-items: center; }
  
  /* Header 手机优化 */
  .header-right {
    gap: 6px;
    font-size: 11px;
  }
  .header-weather {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 50px;
    flex-shrink: 0;
  }
  .sensor-status {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 80px;
    flex-shrink: 0;
  }
  #sensor-label {
    display: none;
  }
  .header-time {
    font-size: 10px;
    min-width: 0;
  }
  /* 手机端也显示个人中心按钮，但简化显示 */
  .user-avatar-btn {
    display: flex !important;
    padding: 6px !important;
    width: 36px;
    height: 36px;
    border-radius: 50%;
  }
  .user-avatar-btn #user-avatar-name {
    display: none; /* 手机端隐藏用户名，只显示图标 */
  }
  
  /* 守护日志手机适配（已为竖排，仅调整内部元素） */
  .mylog-section {
    gap: 10px;
  }
  
  /* 我的树木卡片：手机上改为单列 */
  .my-trees-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .my-tree-card {
    flex-direction: column;
    gap: 8px;
    padding: 10px;
    min-height: auto;
  }
  
  .my-tree-emoji {
    font-size: 28px;
  }
  
  .my-tree-info {
    width: 100%;
  }
  
  .my-tree-name {
    font-size: 13px;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
  }
  
  .my-tree-loc {
    font-size: 11px;
  }
  
  .my-tree-date {
    font-size: 10px;
  }
}

/* ===== 视频通话全屏界面 ===== */
.video-call-screen {
  position: fixed; inset: 0;
  background: #0a0f0a;
  z-index: 8000;
  display: flex; flex-direction: column;
}

/* 远端视频（专家画面，背景层） */
.remote-video-wrap {
  position: absolute; inset: 0;
  background: linear-gradient(145deg, #0d1a0d, #1a2e1a);
  overflow: hidden;
}
.remote-video {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}

/* 远端无视频时的占位 */
.remote-placeholder {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 16px; transition: opacity 0.8s;
  background: linear-gradient(145deg, #0d1a0d 0%, #122112 50%, #1a2e1a 100%);
}
.rp-avatar { font-size: 100px; filter: drop-shadow(0 4px 20px rgba(0,0,0,0.6)); }
.rp-name { font-size: 26px; font-weight: 700; color: white; letter-spacing: 2px; }
.rp-status {
  display: flex; align-items: center; gap: 10px;
  font-size: 16px; color: rgba(255,255,255,0.75);
}

/* 本地摄像头小窗（右下角） */
.local-video-wrap {
  position: absolute; right: 16px; bottom: 110px;
  width: 130px; height: 170px;
  border-radius: 16px; overflow: hidden;
  border: 2px solid rgba(255,255,255,0.3);
  box-shadow: 0 8px 30px rgba(0,0,0,0.6);
  background: #111;
  z-index: 10;
  cursor: move;
}
.local-video { width: 100%; height: 100%; object-fit: cover; display: block; }
.local-placeholder {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 40px; color: rgba(255,255,255,0.3);
  background: #1a1a1a;
}

/* 顶部信息栏 */
.call-top-bar {
  position: absolute; top: 0; left: 0; right: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: 48px 20px 16px;
  background: linear-gradient(to bottom, rgba(0,0,0,0.7), transparent);
  z-index: 20; pointer-events: none;
}
.call-expert-info { display: flex; align-items: center; gap: 12px; }
.call-expert-info span:first-child { font-size: 18px; font-weight: 700; color: white; }
.call-timer { font-size: 14px; color: rgba(255,255,255,0.7); font-family: monospace; letter-spacing: 1px; }
.call-quality { display: flex; align-items: center; color: rgba(255,255,255,0.8); }
.signal-dot {
  display: inline-block; width: 4px; margin: 0 1px;
  border-radius: 2px; background: rgba(255,255,255,0.3);
}
.signal-dot.s1 { height: 10px; background: #76ff03; }
.signal-dot.s2 { height: 16px; background: #76ff03; }
.signal-dot.s3 { height: 22px; background: #76ff03; }

/* 底部控制栏 */
.call-controls {
  position: absolute; bottom: 0; left: 0; right: 0;
  display: flex; align-items: center; justify-content: center;
  gap: 20px; padding: 20px 20px 40px;
  background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
  z-index: 20;
}
.ctrl-btn {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  background: rgba(255,255,255,0.18); backdrop-filter: blur(8px);
  border: none; border-radius: 50%; padding: 0;
  width: 64px; height: 64px; cursor: pointer;
  transition: all 0.2s; color: white;
  justify-content: center;
}
.ctrl-btn:active { transform: scale(0.92); }
.ctrl-btn.ctrl-active { background: rgba(255,255,255,0.45); }
.ctrl-hangup {
  background: #f44336 !important;
  width: 72px; height: 72px;
  box-shadow: 0 4px 20px rgba(244,67,54,0.6);
}
.ctrl-hangup:active { background: #c62828 !important; }
.ctrl-icon { font-size: 22px; line-height: 1; }
.ctrl-label { font-size: 10px; opacity: 0.85; font-weight: 600; }

/* 呼叫等待动画 */
.call-ringing-overlay {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  background: linear-gradient(145deg, #0a150a 0%, #0f1f0f 50%, #152415 100%);
  z-index: 30;
  gap: 12px;
}
.ringing-rings {
  position: absolute;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
}
.ring {
  position: absolute;
  border-radius: 50%;
  border: 2px solid rgba(76,175,114,0.35);
  animation: ringExpand 2.4s ease-out infinite;
}
.ring.r1 { width: 120px; height: 120px; animation-delay: 0s; }
.ring.r2 { width: 180px; height: 180px; animation-delay: 0.6s; }
.ring.r3 { width: 240px; height: 240px; animation-delay: 1.2s; }
@keyframes ringExpand {
  0% { transform: scale(0.8); opacity: 0.8; }
  100% { transform: scale(1.8); opacity: 0; }
}
.ringing-avatar { font-size: 90px; z-index: 1; filter: drop-shadow(0 0 30px rgba(76,175,114,0.4)); }
.ringing-name { font-size: 24px; font-weight: 700; color: white; letter-spacing: 2px; z-index: 1; }
.ringing-org { font-size: 14px; color: rgba(255,255,255,0.6); z-index: 1; }
.ringing-label { font-size: 16px; color: rgba(255,255,255,0.5); z-index: 1; animation: fadeInOut 1.5s ease-in-out infinite; }
@keyframes fadeInOut { 0%, 100% { opacity: 0.4; } 50% { opacity: 1; } }
.ringing-actions { z-index: 1; margin-top: 16px; }
.ringing-cancel {
  padding: 14px 36px; background: #f44336;
  border: none; border-radius: 40px;
  color: white; font-size: 16px; font-weight: 700;
  cursor: pointer; box-shadow: 0 4px 20px rgba(244,67,54,0.5);
  transition: all 0.2s;
}
.ringing-cancel:active { transform: scale(0.95); background: #c62828; }

/* 呼叫中状态点 */
.call-ring-dot {
  display: inline-block; width: 10px; height: 10px;
  border-radius: 50%; background: #76ff03;
  box-shadow: 0 0 8px #76ff03;
  animation: blink 1s infinite; margin-right: 6px;
}

/* 演示模式提示 */
.call-demo-tip {
  position: absolute; top: 100px; left: 50%; transform: translateX(-50%);
  z-index: 25; pointer-events: auto;
}
.demo-tip-box {
  background: rgba(0,0,0,0.75); backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 16px; padding: 20px 24px; text-align: center; color: white;
  min-width: 220px;
}

/* TRTC配置弹窗 */
.trtc-cfg-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 9500;
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.trtc-cfg-box {
  background: white; border-radius: 18px;
  width: 100%; max-width: 480px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
  overflow: hidden;
}
.trtc-cfg-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 20px; border-bottom: 1px solid var(--border);
}
.trtc-cfg-header h3 { font-size: 17px; font-weight: 700; }
.trtc-cfg-header button { background: none; border: none; font-size: 20px; cursor: pointer; color: #999; }
.trtc-cfg-body { padding: 18px 20px; }
.trtc-cfg-footer { padding: 14px 20px; border-top: 1px solid var(--border); display: flex; gap: 10px; justify-content: flex-end; }
.trtc-cfg-tip {
  background: #e3f2fd; border-radius: 10px; padding: 10px 13px;
  font-size: 12px; color: #1565c0; line-height: 1.7; margin-bottom: 14px;
}
.trtc-cfg-tip a { color: #1565c0; }

/* 视频通话按钮 */
.btn-call-video { background: linear-gradient(135deg, #1a5c2e, #2d7d46); color: white; font-size: 13px; }
.btn-call-video:active { opacity: 0.85; }
.btn-call-offline { background: #f5f5f5 !important; color: #bbb !important; cursor: not-allowed; }

/* 横屏大屏：本地窗口可以大一点 */
@media (orientation: landscape) and (min-width: 768px) {
  .local-video-wrap { width: 200px; height: 150px; bottom: 100px; right: 24px; }
  .ctrl-btn { width: 72px; height: 72px; }
  .ctrl-hangup { width: 80px; height: 80px; }
  .ctrl-icon { font-size: 26px; }
  .ctrl-label { font-size: 12px; }
  .call-controls { gap: 28px; padding-bottom: 50px; }
  .ringing-avatar { font-size: 120px; }
  .ringing-name { font-size: 32px; }
}

/* ===== 用户头像/登录按钮 ===== */
.user-avatar-btn {
  display: flex; align-items: center; gap: 5px;
  background: rgba(255,255,255,0.18); border-radius: 20px;
  padding: 5px 10px 5px 8px; cursor: pointer; transition: .2s;
  font-size: 18px; color: white; position: relative;
}
.user-avatar-btn:hover { background: rgba(255,255,255,0.28); }
.user-dropdown {
  position: absolute; top: calc(var(--header-h) - 2px); right: 50px;
  background: white; border-radius: 14px; min-width: 200px;
  box-shadow: 0 8px 30px rgba(0,0,0,.18); z-index: 500;
  overflow: hidden; border: 1px solid #eee;
}
.user-menu-info {
  padding: 16px 16px 10px; border-bottom: 1px solid #f0f0f0;
}
.user-menu-item {
  display: block; width: 100%; padding: 12px 16px; text-align: left;
  background: none; border: none; font-size: 14px; cursor: pointer;
  color: #333; transition: .15s; font-family: inherit;
}
.user-menu-item:hover { background: #f5f5f5; }
.user-menu-item.primary { color: var(--green-primary); font-weight: 600; background: #f0fff4; }
.user-menu-item.primary:hover { background: #e0f7e9; }

/* ===== 韧性诊断页面 ===== */
.doctor-nav {
  display: flex; gap: 8px; margin-bottom: 20px; overflow-x: auto;
  padding: 0 12px; -webkit-overflow-scrolling: touch;
}
.doc-nav-btn {
  padding: 10px 16px; border: 1.5px solid #ddd; border-radius: 12px;
  background: #f9f9f9; color: #666; font-size: 14px; cursor: pointer;
  white-space: nowrap; transition: .2s; font-weight: 500;
}
.doc-nav-btn:hover { border-color: var(--green-primary); }
.doc-nav-btn.active {
  border-color: var(--green-primary); background: var(--green-primary);
  color: white;
}
.doc-nav-btn span { margin-right: 4px; }

/* AI 诊断面板 */
.ai-chat-container {
  display: flex; flex-direction: column;
  background: white; border-radius: 14px;
  box-shadow: 0 2px 8px rgba(0,0,0,.06); overflow: hidden;
  height: calc(100vh - 250px); max-height: 600px;
}
.ai-chat-header {
  padding: 14px 16px; border-bottom: 1px solid #f0f0f0;
  display: flex; justify-content: space-between; align-items: center;
  background: #f9f9f9;
}
.ai-chat-title { font-weight: 600; font-size: 15px; color: #333; }
.ai-chat-actions { display: flex; gap: 8px; }
.ai-header-btn {
  padding: 6px 12px; font-size: 12px; background: white;
  border: 1px solid #ddd; border-radius: 8px; cursor: pointer;
  color: #666; transition: .2s;
}
.ai-header-btn:hover { background: #f5f5f5; }

/* 聊天消息区域 */
.ai-chat-msgs {
  flex: 1; overflow-y: auto; padding: 16px;
  display: flex; flex-direction: column; gap: 12px;
  -webkit-overflow-scrolling: touch;
}
.msg {
  display: flex; gap: 8px; margin-bottom: 8px;
}
.msg.ai-msg { justify-content: flex-start; }
.msg.user-msg { justify-content: flex-end; }
.msg-avatar {
  font-size: 24px; min-width: 32px; text-align: center; line-height: 32px;
}
.msg-bubble {
  max-width: 70%; padding: 10px 14px; border-radius: 10px;
  line-height: 1.5; font-size: 14px; word-wrap: break-word;
}
.ai-msg .msg-bubble {
  background: #f0f0f0; color: #333;
}
.user-msg .msg-bubble {
  background: var(--green-primary); color: white;
}

/* 快速问题按钮 */
.quick-questions {
  display: flex; flex-wrap: wrap; gap: 8px;
  padding: 12px 0;
}
.quick-q {
  padding: 8px 12px; font-size: 12px;
  border: 1px solid #ddd; border-radius: 8px;
  background: white; cursor: pointer; color: #666;
  transition: .2s; white-space: nowrap;
}
.quick-q:hover {
  border-color: var(--green-primary); color: var(--green-primary);
  background: #f0fff4;
}

/* AI 输入区域 */
.ai-input-area {
  padding: 12px 16px; border-top: 1px solid #f0f0f0;
  background: #fafafa;
}
.ai-input-wrap {
  display: flex; gap: 8px; margin-bottom: 10px;
}
.ai-input-wrap textarea {
  flex: 1; padding: 10px 12px; border: 1.5px solid #ddd;
  border-radius: 8px; font-size: 14px; font-family: inherit;
  outline: none; resize: none; transition: .2s;
  max-height: 80px;
}
.ai-input-wrap textarea:focus {
  border-color: var(--green-primary);
}
.ai-send-btn {
  padding: 10px 16px; background: var(--green-primary);
  color: white; border: none; border-radius: 8px;
  font-size: 14px; font-weight: 600; cursor: pointer;
  transition: .2s;
}
.ai-send-btn:hover { opacity: 0.9; }
.ai-send-btn:active { opacity: 0.8; }

.ai-upload-hint {
  font-size: 12px; color: #999;
  display: flex; gap: 8px; align-items: center;
}
.btn-icon {
  padding: 6px 12px; font-size: 12px; background: white;
  border: 1px solid #ddd; border-radius: 6px; cursor: pointer;
  color: #666;
}
.btn-icon:hover { background: #f5f5f5; }

/* 养护指引面板 */
.guide-search {
  margin-bottom: 16px;
}
.guide-search input {
  width: 100%; padding: 10px 14px; border: 1.5px solid #ddd;
  border-radius: 10px; font-size: 14px; outline: none;
}
.guide-search input:focus { border-color: var(--green-primary); }
.guide-list {
  display: grid; gap: 12px;
}
.guide-item {
  padding: 14px; background: white; border-radius: 10px;
  border: 1px solid #f0f0f0; cursor: pointer; transition: .2s;
}
.guide-item:hover {
  border-color: var(--green-primary); box-shadow: 0 2px 8px rgba(26,122,62,.1);
}
.guide-item-title { font-weight: 600; margin-bottom: 4px; }
.guide-item-desc { font-size: 13px; color: #666; line-height: 1.6; }

/* 专家面板 */
.expert-banner {
  display: flex; gap: 16px; padding: 16px; background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
  border-radius: 12px; margin-bottom: 16px; align-items: center;
}
.expert-banner-img { font-size: 48px; }
.expert-banner-text h3 { margin-bottom: 4px; color: #1a7a3e; }
.expert-banner-text p { font-size: 13px; color: #2d7d46; }

.expert-list {
  display: grid; gap: 12px; margin-bottom: 16px;
}
.expert-card {
  padding: 14px; background: white; border: 1px solid #f0f0f0;
  border-radius: 10px; display: flex; gap: 12px; align-items: center;
}
.expert-avatar { font-size: 40px; }
.expert-info { flex: 1; }
.expert-name { font-weight: 600; margin-bottom: 2px; }
.expert-title { font-size: 12px; color: #666; }
.expert-action { display: flex; gap: 6px; }
.expert-action button {
  padding: 6px 12px; font-size: 12px; border: 1px solid #ddd;
  border-radius: 6px; cursor: pointer; background: white; color: #666;
}
.expert-action button:hover { background: #f5f5f5; }

.expert-msg-form {
  display: flex; flex-direction: column; gap: 10px;
}
.expert-msg-form input, .expert-msg-form textarea {
  padding: 12px 14px; border: 1.5px solid #ddd; border-radius: 10px;
  font-size: 14px; font-family: inherit; outline: none;
}
.expert-msg-form input:focus, .expert-msg-form textarea:focus {
  border-color: var(--green-primary);
}

/* 医生页面其他 */
.doc-panel {
  display: none;
}
.doc-panel.active {
  display: block;
}

/* 登录提示样式 */
.login-hint {
  background: #fff3cd; border-left: 4px solid #ffc107;
  padding: 8px 12px; margin-bottom: 10px;
  font-size: 12px; color: #856404; border-radius: 4px;
}

/* ===== 管理后台升级样式 ===== */
.admin-highlight {
  border: 2px solid var(--green-light) !important;
  background: linear-gradient(135deg, #f0fff4, #e8f5e9) !important;
}
.admin-panel {
  background: white; border-radius: 14px; margin-bottom: 16px;
  box-shadow: var(--card-shadow); overflow: hidden;
}
.admin-panel-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; background: linear-gradient(135deg, #2d7d46, #4caf72);
  color: white;
}
.admin-panel-header h3 { font-size: 16px; font-weight: 700; }
.panel-close-btn {
  background: rgba(255,255,255,.2); border: none; color: white;
  padding: 5px 12px; border-radius: 8px; cursor: pointer; font-size: 13px; font-family: inherit;
}
.editor-toolbar {
  display: flex; gap: 10px; padding: 12px 16px;
  border-bottom: 1px solid #f0f0f0; align-items: center;
}
.editor-search {
  flex: 1; padding: 9px 13px; border: 1.5px solid #e0e0e0; border-radius: 10px;
  font-size: 14px; outline: none; transition: .2s;
}
.editor-search:focus { border-color: var(--green-primary); }
.plant-edit-list {
  max-height: 420px; overflow-y: auto; padding: 8px;
}
.plant-edit-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 8px;
  border-radius: 10px; transition: .15s; cursor: pointer;
}
.plant-edit-item:hover { background: #f5f5f5; }
.pei-photo {
  width: 48px; height: 48px; border-radius: 8px; object-fit: cover;
  background: #e8f5e9; display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex-shrink: 0; overflow: hidden;
}
.pei-photo img { width: 100%; height: 100%; object-fit: cover; }
.pei-info { flex: 1; min-width: 0; }
.pei-name { font-size: 14px; font-weight: 600; color: #1a2e1e; }
.pei-meta { font-size: 11px; color: #888; margin-top: 2px; }
.pei-edit-btn {
  background: var(--green-bg); border: 1.5px solid var(--green-light);
  color: var(--green-primary); border-radius: 8px; padding: 5px 12px;
  font-size: 12px; cursor: pointer; white-space: nowrap; font-family: inherit;
}
/* 页面内容编辑 */
.page-edit-sections { padding: 12px 16px; display: flex; flex-direction: column; gap: 14px; }
.page-edit-block { background: #fafafa; border-radius: 10px; padding: 12px; }
.peb-title { font-size: 13px; font-weight: 600; color: #444; margin-bottom: 8px; }
.edit-textarea {
  width: 100%; border: 1.5px solid #e0e0e0; border-radius: 8px;
  padding: 9px 11px; font-size: 13px; resize: vertical; outline: none;
  font-family: inherit; transition: .2s;
}
.edit-textarea:focus { border-color: var(--green-primary); }
.edit-input {
  width: 100%; border: 1.5px solid #e0e0e0; border-radius: 8px;
  padding: 9px 11px; font-size: 13px; outline: none; font-family: inherit; transition: .2s;
}
.edit-input:focus { border-color: var(--green-primary); }
.btn-save-inline {
  margin-top: 8px; padding: 7px 18px; background: var(--green-primary); color: white;
  border: none; border-radius: 8px; font-size: 13px; cursor: pointer; font-family: inherit;
}
.banner-upload-row { display: flex; gap: 8px; flex-wrap: wrap; }
.banner-upload-btn {
  padding: 9px 14px; background: #f0fff4; border: 1.5px dashed #4caf50;
  border-radius: 9px; font-size: 12px; color: var(--green-primary); cursor: pointer;
}
/* 植物编辑弹窗 */
.modal-wide { max-width: 740px; width: 95vw; }
.plant-form-grid { display: flex; gap: 16px; }
.plant-photo-col { width: 200px; flex-shrink: 0; }
.plant-fields-col { flex: 1; display: flex; flex-direction: column; gap: 10px; }
.photo-upload-area {
  width: 200px; height: 200px; border: 2px dashed #c8e6c9; border-radius: 12px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  cursor: pointer; overflow: hidden; background: #f9fbe7; transition: .2s;
}
.photo-upload-area:hover { border-color: var(--green-primary); }
.plant-fields-col .form-group { margin: 0; }
.plant-fields-col textarea { min-height: 56px; resize: vertical; }
.btn-danger {
  background: #fff3f3; color: #e53935; border: 1.5px solid #ffcdd2;
  border-radius: 8px; padding: 9px 16px; font-size: 14px; cursor: pointer; font-family: inherit;
}
@media (max-width: 600px) {
  .plant-form-grid { flex-direction: column; }
  .plant-photo-col { width: 100%; }
  .photo-upload-area { width: 100%; height: 160px; }
}
/* ===== 使用指南：设备切换 ===== */
.help-device-tabs {
  display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap;
}
.help-device-tab {
  padding: 10px 18px; border-radius: 20px; border: 2px solid #e0e0e0;
  background: white; font-size: 13px; cursor: pointer; font-family: inherit;
  color: #666; transition: .2s; font-weight: 500;
}
.help-device-tab.active {
  border-color: var(--green-primary); color: var(--green-primary);
  background: #f0fff4; font-weight: 700;
}
.help-mode-content { display: block; }
.help-mode-content.hidden { display: none !important; }
.help-mode-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: 20px; font-size: 13px;
  font-weight: 600; margin-bottom: 16px;
}
.help-mode-badge.kiosk {
  background: linear-gradient(135deg, #1a2e1e, #2d7d46);
  color: white;
}
.help-mode-badge.personal {
  background: linear-gradient(135deg, #1565c0, #1e88e5);
  color: white;
}

/* ===== 用户管理面板 ===== */
.user-management-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px;
}
.user-management-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px;
  background: #f8f9fa;
  border-radius: 12px;
  border: 1px solid #e8e8e8;
}
.user-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.user-account {
  font-weight: 700;
  color: #1a7a3e;
  font-size: 15px;
}
.user-nickname {
  color: #666;
  font-size: 13px;
}
.user-points {
  color: #e65100;
  font-size: 13px;
  font-weight: 600;
}
.user-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.user-empty {
  text-align: center;
  color: #999;
  padding: 30px;
}
.btn-small {
  padding: 6px 12px;
  border: none;
  border-radius: 8px;
  font-size: 12px;
  cursor: pointer;
  font-weight: 600;
  transition: opacity 0.2s;
}
.btn-small:hover { opacity: 0.85; }
.btn-small.btn-edit {
  background: linear-gradient(135deg, #1a7a3e, #2ecc71);
  color: white;
}
.btn-small.btn-danger {
  background: #f5f5f5;
  color: #d32f2f;
  border: 1px solid #ffcdd2;
}
.btn-small.btn-danger:hover {
  background: #d32f2f;
  color: white;
}

/* ===== 首页签到 ===== */
.checkin-card {
  background: linear-gradient(135deg, #fff8e1 0%, #ffecb3 100%);
  border: 2px dashed #ffa000;
  border-radius: 16px;
  padding: 16px 20px;
  margin: 12px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.checkin-info h4 {
  color: #e65100;
  margin: 0 0 6px 0;
  font-size: 16px;
}
.checkin-info p {
  color: #666;
  margin: 0;
  font-size: 13px;
  line-height: 1.4;
}
.checkin-btn {
  background: linear-gradient(135deg, #ff8f00, #ffb300);
  color: white;
  border: none;
  border-radius: 12px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(255, 143, 0, 0.3);
}
.checkin-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
  box-shadow: none;
}
.checkin-btn.checked {
  background: linear-gradient(135deg, #1a7a3e, #2ecc71);
}


/* ===== 全部功能宫格 ===== */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.feature-item {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; padding: 14px 4px;
  background: #f6faf7; border: 1px solid #e4efe7; border-radius: 12px;
  cursor: pointer; font-family: inherit; transition: all 0.2s; min-width: 0;
}
.feature-item:hover { background: #e8f5ec; border-color: #bfe0ca; }
.feature-item:active { transform: scale(0.94); background: #e8f5ec; }
.fi-icon { font-size: 24px; line-height: 1; }
.fi-label { font-size: 12px; font-weight: 600; color: #1a5c2e; white-space: nowrap; }

@media (max-width: 480px) {
  .feature-grid { gap: 8px; }
  .feature-item { padding: 12px 2px; }
  .fi-icon { font-size: 22px; }
  .fi-label { font-size: 11px; }
}

/* ===== 「更多」底部弹层 ===== */
.sheet-overlay {
  position: fixed; inset: 0; z-index: 8500;
  background: rgba(0,0,0,0.45);
  display: flex; align-items: flex-end;
}
.sheet-overlay.hidden { display: none !important; }
.more-sheet {
  width: 100%; background: #fff;
  border-radius: 20px 20px 0 0;
  padding: 12px 16px calc(var(--tab-h) + 20px);
  max-height: 72vh; overflow-y: auto;
  animation: sheetUp 0.25s ease;
  box-shadow: 0 -8px 30px rgba(0,0,0,0.25);
}
@keyframes sheetUp { from { transform: translateY(60px); opacity: 0.5; } to { transform: none; opacity: 1; } }
.more-sheet-handle { width: 40px; height: 4px; border-radius: 2px; background: #ddd; margin: 0 auto 10px; }
.more-sheet-title { font-size: 16px; font-weight: 700; color: #1a5c2e; margin-bottom: 6px; }
.more-group { font-size: 12px; color: #999; font-weight: 600; margin: 14px 2px 8px; }

/* ===== 手机竖屏：语音悬浮球避让底部 Tab 栏（需比 voice-assistant.css 优先级更高） ===== */
@media (orientation: portrait), (max-width: 767.98px) {
  body #voice-assistant-widget { bottom: calc(var(--tab-h) + 16px) !important; }
}
