/* ============ 百草云膳坊 · 全站样式 ============ */
:root {
  --primary: #2d6a4f;          /* 墨绿主色 */
  --primary-light: #52b788;
  --primary-dark: #1b4332;
  --primary-soft: #d8f3dc;
  --accent: #0077b6;           /* 科技青蓝点缀 */
  --accent-light: #caf0f8;
  --gold: #c9a227;             /* 烫金点缀 */
  --warm: #c77d4f;
  --text-1: #1b2d2a;
  --text-2: #4a5d5a;
  --text-3: #8a9995;
  --bg: #f6faf7;
  --surface: #ffffff;
  --border: #e5ede8;
  --danger: #c84f4f;
  --shadow-sm: 0 2px 8px rgba(27, 67, 50, 0.06);
  --shadow-md: 0 8px 24px rgba(27, 67, 50, 0.08);
  --shadow-lg: 0 16px 40px rgba(27, 67, 50, 0.12);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --container-max: 480px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Source Han Sans CN", sans-serif;
  background: linear-gradient(180deg, #e8f3ec 0%, #f6faf7 300px);
  color: var(--text-1);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

a { color: var(--primary); text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
img { max-width: 100%; display: block; }

/* ============ 骨架：移动优先，中央 480px 容器（模拟小程序尺寸） ============ */
.app {
  max-width: var(--container-max);
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg);
  box-shadow: var(--shadow-lg);
  padding-bottom: 72px;
  position: relative;
  overflow-x: hidden;
}

/* ============ 顶部导航 ============ */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  padding: 16px 20px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.topbar .logo {
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.topbar .logo::before {
  content: '';
  width: 28px;
  height: 28px;
  background: rgba(255,255,255,0.15);
  border-radius: 50%;
  display: inline-block;
  position: relative;
}
.topbar .logo::after {
  content: 'Y';
  position: absolute;
  left: 26px;
  top: 16px;
  color: var(--gold);
  font-weight: 800;
  font-size: 18px;
}
.topbar .back {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.15);
  border-radius: 50%;
  color: white;
  font-size: 18px;
}
.topbar .title {
  flex: 1;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.5px;
}
.topbar .actions {
  display: flex;
  gap: 8px;
}
.topbar .actions button {
  color: white;
  font-size: 18px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ============ 内容区 ============ */
.page {
  padding: 16px 20px 20px;
}
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 20px 0 12px;
}
.section-title h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-1);
}
.section-title .more {
  color: var(--text-3);
  font-size: 13px;
}

/* ============ 首页 Hero ============ */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  margin: -16px -20px 20px;
  padding: 20px 20px 32px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  right: -40px;
  top: -40px;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(255,255,255,0.12) 0%, transparent 70%);
  border-radius: 50%;
}
.hero-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 6px;
}
.hero-sub {
  font-size: 13px;
  opacity: 0.85;
  margin-bottom: 16px;
}
.hero-card {
  background: rgba(255,255,255,0.95);
  color: var(--text-1);
  border-radius: var(--radius-lg);
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-md);
  margin-top: 16px;
}
.hero-card .icon {
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, var(--primary-soft), white);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  flex-shrink: 0;
}
.hero-card .text {
  flex: 1;
}
.hero-card .t1 {
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.hero-card .t1 .pill {
  background: var(--accent);
  color: white;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 8px;
  font-weight: 600;
  letter-spacing: 0.5px;
}
.hero-card .t2 {
  font-size: 13px;
  color: var(--text-2);
}
.hero-card .arrow {
  color: var(--primary);
  font-size: 20px;
}

/* ============ 服务入口九宫格 ============ */
.grid-entries {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 18px 12px;
  box-shadow: var(--shadow-sm);
}
.entry {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-2);
}
.entry-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: white;
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
}
.entry-icon.alt { background: linear-gradient(135deg, #4da8c9, var(--accent)); }
.entry-icon.gold { background: linear-gradient(135deg, #e3b84a, var(--gold)); }
.entry-icon.warm { background: linear-gradient(135deg, #e09971, var(--warm)); }

/* ============ 数据看板横条 ============ */
.stat-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 14px 0;
  margin: 16px 0;
  box-shadow: var(--shadow-sm);
}
.stat-strip .stat {
  text-align: center;
  border-right: 1px solid var(--border);
}
.stat-strip .stat:last-child { border-right: none; }
.stat-strip .num {
  font-size: 20px;
  font-weight: 800;
  color: var(--primary);
}
.stat-strip .num span { color: var(--accent); }
.stat-strip .label {
  font-size: 12px;
  color: var(--text-3);
  margin-top: 2px;
}

/* ============ 卡片 ============ */
.card {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 12px;
}
.card-row {
  display: flex;
  gap: 12px;
  align-items: center;
}
.card-cover {
  width: 90px;
  height: 90px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary-soft), white);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  font-size: 38px;
}
.card-content h4 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
}
.card-content .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 6px;
}
.card-content .tag {
  font-size: 11px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  padding: 2px 8px;
  border-radius: 10px;
}
.card-content .tag.alt { background: var(--accent-light); color: var(--accent); }
.card-content .desc {
  font-size: 12px;
  color: var(--text-3);
  line-height: 1.5;
}
.card-content .price {
  color: var(--warm);
  font-weight: 700;
  font-size: 16px;
  margin-top: 6px;
}
.card-content .price s {
  color: var(--text-3);
  font-weight: 400;
  font-size: 12px;
  margin-left: 4px;
}

/* ============ 菜谱卡横滑 ============ */
.scroll-row {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin: 0 -20px;
  padding-left: 20px;
  padding-right: 20px;
  scrollbar-width: none;
}
.scroll-row::-webkit-scrollbar { display: none; }
.recipe-mini {
  flex-shrink: 0;
  width: 140px;
  background: var(--surface);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.recipe-mini .cover {
  height: 100px;
  background: linear-gradient(135deg, var(--primary-soft), var(--accent-light));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 44px;
}
.recipe-mini .info {
  padding: 8px 10px 10px;
}
.recipe-mini .name {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 4px;
}
.recipe-mini .sub {
  font-size: 11px;
  color: var(--text-3);
}

/* ============ 按钮 ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 24px;
  border-radius: 50px;
  font-size: 15px;
  font-weight: 600;
  transition: transform 0.15s, box-shadow 0.15s;
}
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  color: white;
  box-shadow: 0 4px 12px rgba(45, 106, 79, 0.3);
}
.btn-accent {
  background: linear-gradient(135deg, #52afd0, var(--accent));
  color: white;
  box-shadow: 0 4px 12px rgba(0, 119, 182, 0.3);
}
.btn-outline {
  background: white;
  color: var(--primary);
  border: 1.5px solid var(--primary);
}
.btn-ghost {
  background: transparent;
  color: var(--text-2);
}
.btn-block {
  width: 100%;
  padding: 14px;
  border-radius: 14px;
}

/* ============ 底部 Tabbar ============ */
.tabbar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--container-max);
  background: white;
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  z-index: 100;
  padding-bottom: env(safe-area-inset-bottom);
}
.tabbar a {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 9px 0 8px;
  color: var(--text-3);
  font-size: 11px;
  gap: 2px;
}
.tabbar a .tab-icon {
  font-size: 22px;
  line-height: 1;
}
.tabbar a.active { color: var(--primary); }
.tabbar a.active .tab-icon { transform: scale(1.06); }

/* ============ 测评题卡 ============ */
.progress-bar {
  background: var(--border);
  height: 6px;
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 6px;
}
.progress-bar .fill {
  background: linear-gradient(90deg, var(--primary-light), var(--primary));
  height: 100%;
  width: 0;
  transition: width 0.3s;
}
.progress-label {
  font-size: 12px;
  color: var(--text-3);
  margin-bottom: 24px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px 10px;
}

.q-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 28px 22px;
  box-shadow: var(--shadow-md);
  margin-bottom: 20px;
  animation: q-fade-in 0.35s ease-out;
}
@keyframes q-fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.q-card.is-animating { animation: q-fade-in 0.35s ease-out; }
.q-card.slide-right { animation: q-slide-right 0.32s ease-out; }
.q-card.slide-left  { animation: q-slide-left  0.32s ease-out; }
@keyframes q-slide-right {
  from { opacity: 0; transform: translateX(28px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes q-slide-left {
  from { opacity: 0; transform: translateX(-28px); }
  to   { opacity: 1; transform: translateX(0); }
}
.q-num {
  font-size: 13px;
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 2px;
  margin-bottom: 10px;
}
.q-text {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.45;
  margin-bottom: 22px;
  min-height: 52px;
}
.q-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.q-option {
  display: block;
  padding: 13px 16px;
  background: var(--bg);
  border: 1.5px solid transparent;
  border-radius: 12px;
  font-size: 15px;
  color: var(--text-1);
  cursor: pointer;
  transition: all 0.15s;
  text-align: left;
  width: 100%;
}
.q-option:hover { border-color: var(--primary-light); }
.q-option.selected {
  background: var(--primary-soft);
  border-color: var(--primary);
  color: var(--primary-dark);
  font-weight: 600;
}
.q-actions {
  display: flex;
  gap: 12px;
}
.q-actions .btn { flex: 1; }

/* ============ 测评结果 ============ */
.result-hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  margin: -16px -20px 20px;
  padding: 24px 20px 32px;
  text-align: center;
  position: relative;
}
.result-hero h2 { font-size: 18px; font-weight: 500; margin-bottom: 8px; opacity: 0.9; }
.result-hero .main-type {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: 2px;
  margin-bottom: 4px;
}
.result-hero .desc { font-size: 13px; opacity: 0.85; }

.result-types {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}
.type-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.type-bar:last-child { margin-bottom: 0; }
.type-bar .name {
  width: 66px;
  font-size: 13px;
  color: var(--text-2);
}
.type-bar .track {
  flex: 1;
  background: var(--bg);
  height: 10px;
  border-radius: 5px;
  overflow: hidden;
}
.type-bar .track .bar {
  height: 100%;
  border-radius: 5px;
  background: linear-gradient(90deg, var(--primary-light), var(--primary));
  transition: width 0.6s;
}
.type-bar .score {
  width: 40px;
  text-align: right;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
}

.advice-card {
  background: linear-gradient(135deg, var(--primary-soft), white);
  border-radius: var(--radius-md);
  padding: 18px;
  margin-bottom: 16px;
}
.advice-card h4 {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--primary-dark);
  margin-bottom: 10px;
  font-size: 15px;
}
.advice-card ul {
  list-style: none;
  padding-left: 0;
}
.advice-card li {
  padding: 4px 0 4px 20px;
  position: relative;
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.6;
}
.advice-card li::before {
  content: '◆';
  position: absolute;
  left: 0;
  top: 4px;
  color: var(--primary-light);
  font-size: 10px;
}

/* ============ 食材包详情 ============ */
.product-cover {
  background: linear-gradient(135deg, var(--primary-soft), var(--accent-light));
  height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 110px;
  margin: -16px -20px 0;
  position: relative;
}
.product-cover .badge {
  position: absolute;
  top: 16px;
  right: 16px;
  background: var(--warm);
  color: white;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 12px;
  font-weight: 600;
}
.product-meta {
  padding: 20px 4px 10px;
}
.product-meta .name {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 6px;
}
.product-meta .price-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 10px;
}
.product-meta .price-now {
  color: var(--warm);
  font-size: 28px;
  font-weight: 800;
}
.product-meta .price-now::before {
  content: '¥';
  font-size: 18px;
  margin-right: 2px;
}
.product-meta .price-origin {
  color: var(--text-3);
  font-size: 14px;
  text-decoration: line-through;
}
.product-meta .sales {
  color: var(--text-3);
  font-size: 12px;
  margin-left: auto;
}

.spec-list {
  list-style: none;
  padding: 8px 0;
}
.spec-list li {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px dashed var(--border);
  font-size: 13px;
  color: var(--text-2);
}
.spec-list li:last-child { border-bottom: none; }
.spec-list li::before { content: '•'; color: var(--primary-light); margin-right: 6px; }

/* ============ 底部操作栏 ============ */
.bottom-bar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--container-max);
  background: white;
  border-top: 1px solid var(--border);
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  display: flex;
  gap: 10px;
  align-items: center;
  z-index: 90;
}
.bottom-bar .icon-btn {
  width: 46px;
  height: 46px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-2);
  font-size: 11px;
  border-radius: 10px;
}
.bottom-bar .icon-btn .i { font-size: 18px; margin-bottom: 2px; }
.bottom-bar .btn { flex: 1; padding: 13px; border-radius: 14px; font-size: 14px; }

/* ============ 购物车 ============ */
.cart-list {
  margin: 0 -4px;
}
.cart-item {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 10px;
  display: flex;
  gap: 12px;
  align-items: center;
  box-shadow: var(--shadow-sm);
}
.cart-item .check {
  width: 22px;
  height: 22px;
  border: 2px solid var(--primary);
  border-radius: 50%;
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
}
.cart-item .cover {
  width: 72px;
  height: 72px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary-soft), var(--accent-light));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  flex-shrink: 0;
}
.cart-item .info { flex: 1; min-width: 0; }
.cart-item .info h4 { font-size: 14px; margin-bottom: 4px; }
.cart-item .info .price { color: var(--warm); font-weight: 700; font-size: 15px; }
.cart-item .qty {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}
.qty button {
  width: 22px;
  height: 22px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 14px;
  color: var(--text-2);
  background: white;
}
.qty span { font-size: 13px; min-width: 18px; text-align: center; }

.checkout-bar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--container-max);
  background: white;
  border-top: 1px solid var(--border);
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 90;
}
.checkout-bar .total {
  flex: 1;
}
.checkout-bar .total .lbl { font-size: 12px; color: var(--text-3); }
.checkout-bar .total .amt { font-size: 22px; font-weight: 800; color: var(--warm); }
.checkout-bar .total .amt::before { content: '¥'; font-size: 14px; margin-right: 2px; }

/* ============ 结算页 ============ */
.section-block {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
}
.block-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-1);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.address-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.address-row .pin {
  width: 30px;
  height: 30px;
  background: var(--primary-soft);
  color: var(--primary);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}
.address-row .info { flex: 1; }
.address-row .info .line1 { font-size: 14px; font-weight: 600; margin-bottom: 2px; }
.address-row .info .line2 { font-size: 12px; color: var(--text-3); }
.address-row .arrow { color: var(--text-3); }

.order-item {
  display: flex;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--border);
}
.order-item:last-child { border-bottom: none; }
.order-item .cover-sm {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--primary-soft), var(--accent-light));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}
.order-item .info { flex: 1; }
.order-item .info h5 { font-size: 13px; font-weight: 500; }
.order-item .info .qty-tag { font-size: 12px; color: var(--text-3); }
.order-item .price { font-size: 14px; color: var(--warm); font-weight: 600; }

.kv-list { margin: 0; padding: 0; list-style: none; }
.kv-list li {
  display: flex;
  justify-content: space-between;
  padding: 7px 0;
  font-size: 13px;
  color: var(--text-2);
}
.kv-list li.total {
  border-top: 1px solid var(--border);
  padding-top: 10px;
  margin-top: 5px;
  color: var(--warm);
  font-weight: 700;
  font-size: 15px;
}

/* ============ 支付成功 ============ */
.success-page {
  text-align: center;
  padding: 60px 20px 40px;
}
.success-icon {
  width: 88px;
  height: 88px;
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  box-shadow: 0 12px 32px rgba(45, 106, 79, 0.3);
  color: white;
  font-size: 46px;
}
.success-page h1 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
}
.success-page .amt {
  font-size: 28px;
  color: var(--warm);
  font-weight: 800;
  margin: 12px 0 20px;
}
.success-page .amt::before { content: '¥'; font-size: 16px; margin-right: 2px; }
.success-page .tip {
  color: var(--text-3);
  font-size: 13px;
  margin-bottom: 28px;
  line-height: 1.7;
}
.success-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}
.success-actions .btn { min-width: 110px; padding: 10px 20px; font-size: 14px; }
.auto-jump {
  margin-top: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  font-size: 12px;
  color: var(--text-3);
  background: var(--primary-soft);
  border-radius: 16px;
}
.auto-jump #cd-sec {
  color: var(--primary);
  font-weight: 700;
  font-size: 14px;
  min-width: 14px;
  display: inline-block;
  text-align: center;
}
.auto-jump-cancel {
  border: none;
  background: none;
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  cursor: pointer;
}
.auto-jump-cancel:hover { background: rgba(78, 107, 82, 0.15); }

/* ============ 订单详情 ============ */
.order-status-bar {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  margin: -16px -20px 16px;
  padding: 22px 20px;
}
.order-status-bar .s1 { font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.order-status-bar .s2 { font-size: 12px; opacity: 0.85; }

.timeline {
  padding-left: 12px;
  position: relative;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: var(--border);
}
.timeline .node {
  position: relative;
  padding-left: 20px;
  padding-bottom: 18px;
  font-size: 13px;
}
.timeline .node::before {
  content: '';
  position: absolute;
  left: -4px;
  top: 3px;
  width: 12px;
  height: 12px;
  background: var(--border);
  border-radius: 50%;
  border: 3px solid white;
}
.timeline .node.done::before {
  background: var(--primary);
}
/* 当前进行中：第一个未完成节点脉动提示 */
.timeline .node:not(.done) + .node:not(.done) { }  /* marker: only first undone gets the pulse via adjacent rule below */
.timeline .node.done ~ .node:not(.done):first-of-type,
.timeline .node:not(.done):first-child { }  /* no-op for legacy browsers */
.timeline .node.current::before {
  background: var(--accent);
  box-shadow: 0 0 0 0 var(--accent);
  animation: timeline-pulse 1.6s ease-out infinite;
}
.timeline .node.current .t { color: var(--accent); }
.chip-current {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 8px;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  border-radius: 8px;
  vertical-align: middle;
  animation: chip-breath 1.6s ease-in-out infinite;
}
@keyframes chip-breath {
  0%,100% { opacity: 1; transform: scale(1); }
  50%     { opacity: 0.75; transform: scale(0.96); }
}
@keyframes timeline-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(217, 126, 92, 0.55); }
  70%  { box-shadow: 0 0 0 10px rgba(217, 126, 92, 0); }
  100% { box-shadow: 0 0 0 0 rgba(217, 126, 92, 0); }
}
.timeline .node .t { font-weight: 600; margin-bottom: 2px; }
.timeline .node .d { color: var(--text-3); font-size: 12px; }

/* ============ 个人中心 ============ */
.profile-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  margin: -16px -20px 0;
  padding: 24px 20px 64px;
  position: relative;
}
.profile-header .user {
  display: flex;
  align-items: center;
  gap: 14px;
}
.profile-header .avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  border: 2px solid rgba(255,255,255,0.3);
}
.profile-header .name { font-size: 17px; font-weight: 600; margin-bottom: 4px; }
.profile-header .member {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(255,255,255,0.2);
  padding: 2px 10px;
  border-radius: 10px;
  font-size: 11px;
}

.profile-stats {
  background: white;
  border-radius: var(--radius-md);
  padding: 16px;
  margin: -40px 0 16px;
  box-shadow: var(--shadow-md);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.profile-stats .stat {
  text-align: center;
  color: var(--text-2);
  font-size: 12px;
}
.profile-stats .stat .num {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
  display: block;
  margin-bottom: 2px;
}

.menu-list {
  background: var(--surface);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin-bottom: 12px;
}
.menu-item {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  color: var(--text-1);
}
.menu-item:last-child { border-bottom: none; }
.menu-item .mi {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--primary-soft);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  margin-right: 12px;
}
.menu-item .menu-name { flex: 1; }
.menu-item .arrow { color: var(--text-3); }

.footer-tip {
  text-align: center;
  font-size: 11px;
  color: var(--text-3);
  padding: 12px;
  line-height: 1.6;
}

/* ============ 小组件 ============ */
.chip {
  display: inline-block;
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 10px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  margin-right: 6px;
}

.empty {
  text-align: center;
  padding: 60px 0;
  color: var(--text-3);
}
.empty .ico { font-size: 60px; opacity: 0.3; margin-bottom: 10px; }


/* ======== 食材包 SVG 封面 (自动生成) ======== */
.card-cover .pack-svg-inner, .cover-big .pack-svg-inner {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
}
.pack-svg-wrap {
  width: 100%; height: 100%;
  display: flex; align-items: stretch; justify-content: stretch;
  border-radius: inherit;
  overflow: hidden;
}
.pack-svg-wrap svg { width: 100%; height: 100%; display: block; border-radius: inherit; }
/* ======== Hero QR 演示扫码卡 ======== */
.hero-qr-card {
  margin-top: 14px;
  padding: 14px 16px;
  background: rgba(255,255,255,0.92);
  border-radius: 14px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 4px 16px rgba(44,95,45,0.08);
  border: 1px solid rgba(44,95,45,0.10);
}
.hero-qr-img {
  width: 84px; height: 84px;
  border-radius: 10px;
  background: #fff;
  padding: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
  flex-shrink: 0;
}
.hero-qr-text { flex: 1; min-width: 0; }
.hero-qr-t1 { font-size: 14px; font-weight: 700; color: var(--primary); margin-bottom: 2px; }
.hero-qr-t2 { font-size: 12px; color: var(--text-2); line-height: 1.5; margin-bottom: 4px; }
.hero-qr-t3 { font-size: 11px; color: var(--text-3); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
@media (max-width: 420px) {
  .hero-qr-card { flex-direction: column; text-align: center; }
  .hero-qr-text { text-align: center; }
}

/* ======== 今日节气推荐卡（网页）======== */
.jq-card {
  background: linear-gradient(135deg, #FFF7E8 0%, #FFEFD5 100%);
  border-radius: 16px;
  padding: 14px 16px;
  margin-bottom: 16px;
  border: 1px solid #E8D3A8;
  box-shadow: 0 4px 16px rgba(195, 163, 99, .12);
  cursor: pointer;
  transition: transform .15s;
}
.jq-card:hover { transform: translateY(-1px); }
.jq-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.jq-badge { background: #C3A363; color: #fff; padding: 3px 10px; border-radius: 14px; font-size: 11px; font-weight: 600; }
.jq-date { font-size: 11px; color: #8B6914; font-weight: 500; }
.jq-title { font-size: 16px; font-weight: 700; color: #5A4A1E; margin-bottom: 6px; }
.jq-desc { font-size: 12px; color: #6B5A33; line-height: 1.6; margin-bottom: 10px; }
.jq-ingredients { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.jq-chip { background: rgba(195, 163, 99, 0.22); color: #6B4C0A; padding: 3px 10px; border-radius: 12px; font-size: 11px; }
.jq-cta {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 8px;
  border-top: 1px dashed rgba(195, 163, 99, 0.35);
}
.jq-cta-t { font-size: 12px; font-weight: 600; color: #5A4A1E; }
.jq-cta-arrow { font-size: 13px; color: #C3A363; font-weight: 700; }

/* ======== 响应式断点（375 / 768 核对）======== */

/* 小屏手机（iPhone SE / 360px 宽 Android） */
@media (max-width: 380px) {
  :root {
    --container-max: 100vw;
  }
  .topbar { padding: 14px 14px 12px; }
  .topbar .logo { font-size: 16px; }
  .topbar .title { font-size: 15px; }
  .page, .hero { padding-left: 14px; padding-right: 14px; }
  .hero-title { font-size: 19px; }
  .hero-sub { font-size: 12px; }
  .hero-card { padding: 12px 14px; gap: 10px; }
  .hero-card .icon { width: 40px; height: 40px; font-size: 22px; }
  .hero-card .t1 { font-size: 14px; }
  .hero-card .t2 { font-size: 11px; }
  .stat-strip .stat .num { font-size: 22px; }
  .stat-strip .stat .label { font-size: 10px; }
  .grid-entries { grid-template-columns: repeat(4, 1fr); gap: 8px; }
  .entry { font-size: 11px; }
  .entry-icon { width: 36px; height: 36px; font-size: 18px; }
  .section-title h3 { font-size: 14px; }
  .card { padding: 14px 14px; }
  .card-row { gap: 10px; }
  .card-cover { width: 72px; height: 72px; font-size: 28px; }
  .card-content h4 { font-size: 14px; }
  .card-content .desc { font-size: 11px; }
  .recipe-mini { width: 124px; }
  .recipe-mini .cover { height: 88px; font-size: 38px; }
  .q-card { padding: 20px 16px; }
  .q-text { font-size: 15px; }
  .q-option { padding: 10px 12px; font-size: 13px; }
  .result-hero { padding: 22px 18px; }
  .jq-title { font-size: 15px; }
  .jq-desc { font-size: 11px; }
  .jq-chip { font-size: 10px; padding: 2px 8px; }
}

/* 中等手机/平板竖屏（<= 500px）：保持 100% 宽度 */
@media (max-width: 500px) {
  .app {
    box-shadow: none;
    max-width: 100%;
  }
  .tabbar, .action-bar, .compact-action-bar {
    max-width: 100%;
    left: 0;
    transform: none;
  }
}

/* 中屏平板（iPad 竖屏 768px）：保持 480px 居中手机视觉容器，但增加环境阴影与留白 */
@media (min-width: 768px) and (max-width: 1023px) {
  body {
    background: linear-gradient(180deg, #F0EBD8 0%, #E8E2CE 100%);
    padding: 24px 0;
  }
  .app {
    border-radius: 24px;
    overflow: hidden;
    min-height: calc(100vh - 48px);
    box-shadow: 0 20px 60px rgba(44, 95, 45, 0.18),
                0 4px 12px rgba(0, 0, 0, 0.06);
  }
}

/* 桌面（>= 1024px）：手机容器 + 居中大号阴影，拟真 "手机里的 app" */
@media (min-width: 1024px) {
  body {
    background:
      radial-gradient(ellipse at center top, rgba(44, 95, 45, 0.06), transparent 70%),
      linear-gradient(180deg, #F5F2EB 0%, #E8E2CE 100%);
    padding: 40px 0;
  }
  .app {
    border-radius: 32px;
    overflow: hidden;
    min-height: calc(100vh - 80px);
    box-shadow:
      0 40px 80px rgba(44, 95, 45, 0.20),
      0 10px 24px rgba(0, 0, 0, 0.08);
  }
}

/* 尊重用户动画偏好 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* 打印样式（答辩时若想打印页面截图） */
@media print {
  body { background: white; padding: 0; }
  .app { box-shadow: none; max-width: none; width: 100%; }
  .tabbar, .topbar .actions button { display: none; }
}
