/* =========================================================
   膳益康 · AI 健康陪伴  —  概念原型样式
   ========================================================= */

*,
*::before,
*::after { box-sizing: border-box; }

:root {
  --jade-900: #083b32;
  --jade-800: #0b4a3e;
  --jade-700: #0f5c4d;
  --jade-600: #147a64;
  --jade-500: #1c9478;
  --jade-300: #7fc7b3;
  --mint-50: #eef7f2;
  --mint-100: #e2f1ea;
  --cream: #faf7f1;
  --sand: #f2eadc;
  --apricot: #f0a35e;
  --apricot-soft: #fbe8d4;
  --coral: #df6a55;
  --coral-soft: #fbe3dd;
  --lilac: #ece7f8;
  --sky: #e4f0f8;
  --ink: #1d2a25;
  --muted: #6d7d75;
  --muted-2: #93a29a;
  --line: rgba(15, 92, 77, 0.1);
  --card: #ffffff;
  --shadow-sm: 0 2px 10px rgba(18, 63, 52, 0.05);
  --shadow-md: 0 12px 32px rgba(18, 63, 52, 0.09);
  --shadow-lg: 0 30px 70px rgba(10, 45, 37, 0.22);
  --r-lg: 24px;
  --r-md: 18px;
  --r-sm: 13px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
}

html,
body {
  height: 100%;
  margin: 0;
}

body {
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(900px 620px at 12% 8%, #dfeee6 0%, rgba(223, 238, 230, 0) 62%),
    radial-gradient(800px 600px at 92% 88%, #f6e3cd 0%, rgba(246, 227, 205, 0) 58%),
    linear-gradient(150deg, #f3efe6 0%, #eae5da 100%);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

button,
input,
select,
textarea {
  font-family: inherit;
  color: inherit;
}

button {
  border: 0;
  background: none;
  cursor: pointer;
  padding: 0;
}

h1, h2, h3, h4, p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
li { list-style: none; }
a { color: inherit; text-decoration: none; }
svg { display: block; }

/* 让所有内联图标默认使用描边，而不是被填充成黑块 */
svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ic {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------------- 舞台 & 桌面说明 ---------------- */

.stage {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(40px, 7vw, 96px);
  padding: 28px 32px;
}

.brand-panel {
  width: 370px;
  flex: 0 0 auto;
  animation: fadeUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.brand-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--jade-700);
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(15, 92, 77, 0.12);
  padding: 7px 12px;
  border-radius: 999px;
  margin-bottom: 22px;
}

.brand-eyebrow .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--apricot);
  box-shadow: 0 0 0 4px rgba(240, 163, 94, 0.18);
}

.brand-panel h1 {
  font-size: 44px;
  line-height: 1.08;
  letter-spacing: -0.02em;
  font-weight: 800;
  color: var(--jade-900);
}

.brand-panel h1 span {
  display: block;
  margin-top: 8px;
  font-size: 23px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--jade-600);
}

.brand-lede {
  margin-top: 20px;
  font-size: 14.5px;
  line-height: 1.85;
  color: #53655d;
}

.brand-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.brand-tags span {
  font-size: 11.5px;
  color: var(--jade-700);
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid rgba(15, 92, 77, 0.13);
  padding: 6px 11px;
  border-radius: 999px;
}

.try-box {
  margin-top: 28px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  border-radius: 20px;
  padding: 18px 20px;
  box-shadow: 0 18px 40px rgba(20, 60, 49, 0.07);
}

.try-box b {
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--jade-700);
}

.try-box ol {
  counter-reset: step;
  margin-top: 12px;
  display: grid;
  gap: 11px;
}

.try-box li {
  counter-increment: step;
  position: relative;
  padding-left: 30px;
  font-size: 13px;
  line-height: 1.6;
  color: #47584f;
}

.try-box li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--jade-700);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.brand-foot {
  margin-top: 22px;
  font-size: 11.5px;
  line-height: 1.7;
  color: #84948c;
}

.brand-foot b { color: var(--jade-700); font-weight: 600; }

/* ---------------- 手机外壳 ---------------- */

.device-wrap {
  flex: 0 0 auto;
  position: relative;
  animation: fadeUp 0.9s 0.08s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.device-wrap::before {
  content: "";
  position: absolute;
  inset: 8% -6% -4% -6%;
  background: radial-gradient(closest-side, rgba(20, 122, 100, 0.16), transparent 72%);
  filter: blur(30px);
  z-index: 0;
}

.device {
  position: relative;
  z-index: 1;
  width: 392px;
  height: min(844px, calc(100dvh - 48px));
  background: linear-gradient(160deg, #22302b, #0c1411 55%, #1a2621);
  border-radius: 54px;
  padding: 10px;
  box-shadow:
    var(--shadow-lg),
    inset 0 0 0 1.5px rgba(255, 255, 255, 0.12),
    inset 0 0 0 5px rgba(0, 0, 0, 0.55);
}

.device::after {
  content: "";
  position: absolute;
  top: 148px;
  right: -2px;
  width: 3px;
  height: 62px;
  background: #1d2a25;
  border-radius: 0 3px 3px 0;
  opacity: 0.75;
}

.screen {
  position: relative;
  width: 100%;
  height: 100%;
  background: var(--cream);
  border-radius: 45px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  isolation: isolate;
}

/* ---------------- 状态栏 ---------------- */

.status-bar {
  flex: 0 0 auto;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 26px;
  font-size: 13px;
  font-weight: 600;
  color: var(--jade-900);
  letter-spacing: 0.02em;
  background: transparent;
  position: relative;
  z-index: 30;
}

.status-icons {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--jade-900);
}

.status-icons svg { fill: currentColor; stroke: none; }

/* ---------------- 应用容器 ---------------- */

.app {
  flex: 1 1 auto;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 100px;
  position: relative;
  z-index: 5;
}

.app::-webkit-scrollbar { display: none; }

.page {
  display: none;
  padding: 0 18px 26px;
  min-height: 100%;
}

.page.is-active {
  display: block;
  animation: pageIn 0.36s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes pageIn {
  from { opacity: 0; transform: translateY(9px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------------- 首页 Hero ---------------- */

.hero {
  position: relative;
  margin: 0 -18px;
  padding: 6px 20px 58px;
  background:
    radial-gradient(120% 90% at 88% -10%, rgba(240, 163, 94, 0.28), transparent 54%),
    radial-gradient(90% 80% at 0% 100%, rgba(28, 148, 120, 0.5), transparent 60%),
    linear-gradient(155deg, #0a463b 0%, #0f5c4d 45%, #157a63 100%);
  border-radius: 0 0 34px 34px;
  color: #fff;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  width: 210px;
  height: 210px;
  right: -70px;
  top: -80px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 0 0 34px rgba(255, 255, 255, 0.045),
    0 0 0 74px rgba(255, 255, 255, 0.03);
}

.hero::after {
  content: "";
  position: absolute;
  right: 26px;
  bottom: 52px;
  width: 96px;
  height: 54px;
  background:
    radial-gradient(ellipse at 30% 80%, rgba(255, 255, 255, 0.2) 0 30%, transparent 31%),
    radial-gradient(ellipse at 62% 70%, rgba(255, 255, 255, 0.13) 0 26%, transparent 27%);
  opacity: 0.9;
  transform: rotate(-6deg);
}

.hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 2;
}

.brand-mini {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-mark {
  width: 38px;
  height: 38px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.26);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
  letter-spacing: -0.04em;
}

.brand-name {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.brand-sub {
  font-size: 9.5px;
  color: rgba(255, 255, 255, 0.66);
  margin-top: 2px;
  letter-spacing: 0.04em;
}

.points-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 30px;
  padding: 0 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffe9cf;
  font-size: 11.5px;
  font-weight: 600;
  backdrop-filter: blur(4px);
}

.points-pill svg { width: 13px; height: 13px; fill: #ffce8f; stroke: none; }

.hello {
  position: relative;
  z-index: 2;
  margin-top: 24px;
}

.hello .today {
  font-size: 10.5px;
  letter-spacing: 0.14em;
  color: rgba(255, 255, 255, 0.56);
  margin-bottom: 8px;
}

.hello h1 {
  font-size: 25px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

.hello p {
  margin-top: 8px;
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.72);
  letter-spacing: 0.01em;
}

/* ---------------- 健康卡 ---------------- */

.health-card {
  position: relative;
  z-index: 3;
  margin-top: -42px;
  background: var(--card);
  border-radius: var(--r-lg);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 15px;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(255, 255, 255, 0.7);
}

.ring {
  --p: 80;
  width: 86px;
  height: 86px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: conic-gradient(var(--jade-500) calc(var(--p) * 1%), #e8f0eb 0);
  display: grid;
  place-items: center;
  position: relative;
  transition: background 0.6s ease;
}

.ring::after {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: 50%;
  background: #fff;
  box-shadow: inset 0 1px 4px rgba(15, 92, 77, 0.06);
}

.ring-inner {
  position: relative;
  z-index: 2;
  text-align: center;
  line-height: 1;
}

.ring-inner b {
  display: block;
  font-size: 25px;
  font-weight: 700;
  color: var(--jade-800);
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.ring-inner span {
  display: block;
  margin-top: 4px;
  font-size: 9px;
  color: var(--muted-2);
  letter-spacing: 0.1em;
}

.health-info { flex: 1 1 auto; min-width: 0; }

.health-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  font-weight: 700;
  color: var(--jade-900);
}

.trend {
  font-size: 9.5px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--mint-100);
  color: var(--jade-600);
}

.health-info > p {
  font-size: 10.5px;
  color: var(--muted);
  margin-top: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mini-stats {
  display: flex;
  gap: 14px;
  margin-top: 12px;
}

.mini-stats div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mini-stats b {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--jade-800);
  font-variant-numeric: tabular-nums;
}

.mini-stats span {
  font-size: 8.5px;
  color: var(--muted-2);
  letter-spacing: 0.04em;
}

/* ---------------- 通用区块 ---------------- */

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 24px 2px 12px;
}

.section-head h2 {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--jade-900);
}

.section-head .link {
  font-size: 10.5px;
  color: var(--muted-2);
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.section-head .link svg { width: 12px; height: 12px; }

.section-sub {
  font-size: 10.5px;
  color: var(--muted-2);
  margin: -6px 2px 12px;
}

/* ---------------- 快捷工具 ---------------- */

.tool-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.tool {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 2px 10px;
  border-radius: var(--r-md);
  background: #fff;
  border: 1px solid rgba(15, 92, 77, 0.06);
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.tool:active { transform: scale(0.95); }

.tool-ico {
  width: 40px;
  height: 40px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  font-size: 19px;
  line-height: 1;
}

.tool-ico.mint { background: var(--mint-100); }
.tool-ico.peach { background: var(--apricot-soft); }
.tool-ico.lilac { background: var(--lilac); }
.tool-ico.sky { background: var(--sky); }
.tool-ico.sand { background: #f6efdf; }
.tool-ico.rose { background: var(--coral-soft); }

.tool b {
  font-size: 10.5px;
  font-weight: 600;
  color: #2b3b34;
  letter-spacing: 0.01em;
}

.tool small {
  font-size: 8px;
  color: var(--muted-2);
  transform: scale(0.96);
}

/* ---------------- 今日膳益 ---------------- */

.tip-card {
  position: relative;
  margin-top: 6px;
  border-radius: var(--r-lg);
  padding: 16px 17px;
  background:
    radial-gradient(120% 150% at 100% 0%, rgba(255, 255, 255, 0.7), transparent 55%),
    linear-gradient(135deg, #f7ecd9 0%, #f3e3cb 100%);
  border: 1px solid rgba(240, 163, 94, 0.28);
  overflow: hidden;
}

.tip-card::after {
  content: "🌿";
  position: absolute;
  right: -6px;
  bottom: -16px;
  font-size: 74px;
  opacity: 0.16;
  transform: rotate(-12deg);
}

.tip-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #9a6428;
  background: rgba(255, 255, 255, 0.6);
  padding: 4px 8px;
  border-radius: 999px;
}

.tip-card h3 {
  font-size: 14.5px;
  margin-top: 9px;
  color: #5a3a18;
  letter-spacing: 0.01em;
}

.tip-card p {
  position: relative;
  z-index: 1;
  font-size: 11.5px;
  line-height: 1.72;
  color: #7a5a35;
  margin-top: 6px;
  max-width: 88%;
}

.tip-card .tip-link {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-top: 10px;
  font-size: 10.5px;
  font-weight: 600;
  color: #8a5620;
}

/* ---------------- 心情趋势 ---------------- */

.trend-card {
  background: #fff;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  padding: 15px 16px 12px;
}

.trend-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.trend-top b { font-size: 12.5px; color: var(--jade-900); }
.trend-top span { font-size: 9.5px; color: var(--muted-2); }

.bars {
  height: 76px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 7px;
  margin-top: 14px;
  padding-top: 4px;
}

.bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  height: 100%;
  justify-content: flex-end;
}

.bar {
  width: 100%;
  max-width: 20px;
  border-radius: 6px 6px 3px 3px;
  background: linear-gradient(180deg, #b9ded0, #e5f2ec);
  transition: height 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  min-height: 6px;
}

.bar-col.today .bar {
  background: linear-gradient(180deg, var(--jade-500), var(--jade-600));
  box-shadow: 0 4px 10px rgba(20, 122, 100, 0.24);
}

.bar-col span {
  font-size: 8px;
  color: var(--muted-2);
  letter-spacing: 0.02em;
}

.mood-check {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed rgba(15, 92, 77, 0.12);
}

.mood-check > span {
  font-size: 10px;
  color: var(--muted);
  margin-right: 2px;
  white-space: nowrap;
}

.mood-btn {
  flex: 1;
  height: 34px;
  border-radius: 11px;
  background: #f7f9f7;
  font-size: 17px;
  display: grid;
  place-items: center;
  transition: transform 0.15s ease, background 0.2s ease, box-shadow 0.2s ease;
  filter: grayscale(0.35);
}

.mood-btn:active { transform: scale(0.9); }
.mood-btn.is-on {
  background: var(--mint-100);
  box-shadow: inset 0 0 0 1.5px var(--jade-300);
  filter: none;
  transform: translateY(-2px);
}

/* ---------------- 文章卡片 ---------------- */

.article-scroll {
  display: flex;
  gap: 11px;
  overflow-x: auto;
  margin: 0 -18px;
  padding: 2px 18px 6px;
  scrollbar-width: none;
}

.article-scroll::-webkit-scrollbar { display: none; }

.article-card {
  flex: 0 0 214px;
  background: #fff;
  border-radius: var(--r-md);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  text-align: left;
  transition: transform 0.18s ease;
}

.article-card:active { transform: scale(0.97); }

.article-cover {
  height: 92px;
  position: relative;
  display: grid;
  place-items: center;
  font-size: 38px;
  overflow: hidden;
}

.article-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(80% 80% at 80% 10%, rgba(255, 255, 255, 0.4), transparent 60%);
}

.article-cover .cover-tag {
  position: absolute;
  left: 9px;
  top: 9px;
  z-index: 2;
  font-size: 8px;
  font-weight: 600;
  color: #fff;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(6px);
  padding: 3px 7px;
  border-radius: 999px;
  letter-spacing: 0.04em;
}

.cover-1 { background: linear-gradient(140deg, #cfe6cf, #9dc9a8); }
.cover-2 { background: linear-gradient(140deg, #cfe0f2, #a9c3e2); }
.cover-3 { background: linear-gradient(140deg, #f6ddc0, #eabf91); }
.cover-4 { background: linear-gradient(140deg, #f3cfc8, #e6a99f); }

.article-body { padding: 10px 11px 12px; }

.article-body h4 {
  font-size: 12px;
  line-height: 1.5;
  font-weight: 600;
  color: #26352e;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 36px;
}

.article-meta {
  margin-top: 7px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 8.5px;
  color: var(--muted-2);
}

.article-meta i,
.article-meta .dot {
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: currentColor;
  display: inline-block;
  flex: 0 0 auto;
}

/* ---------------- 公益活动 ---------------- */

.activity-card {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  background:
    radial-gradient(120% 120% at 100% 0%, rgba(240, 163, 94, 0.35), transparent 55%),
    linear-gradient(135deg, #0d4f43, #146d5a);
  color: #fff;
  padding: 17px;
  box-shadow: 0 14px 30px rgba(13, 79, 67, 0.18);
}

.activity-card::after {
  content: "🤝";
  position: absolute;
  right: -8px;
  bottom: -18px;
  font-size: 82px;
  opacity: 0.16;
  transform: rotate(-10deg);
}

.activity-card .act-label {
  font-size: 8.5px;
  letter-spacing: 0.14em;
  color: rgba(255, 255, 255, 0.62);
}

.activity-card h3 {
  font-size: 16px;
  margin-top: 7px;
  letter-spacing: 0.01em;
}

.activity-card p {
  font-size: 10.5px;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 5px;
}

.act-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
  position: relative;
  z-index: 2;
}

.act-meta {
  display: flex;
  gap: 10px;
  font-size: 9px;
  color: rgba(255, 255, 255, 0.68);
}

.act-meta span { display: inline-flex; align-items: center; gap: 3px; }
.act-meta svg { width: 11px; height: 11px; }

.act-btn {
  height: 30px;
  padding: 0 14px;
  border-radius: 999px;
  background: #fff;
  color: var(--jade-800);
  font-size: 10.5px;
  font-weight: 700;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.16);
}

.act-btn.is-done {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  box-shadow: none;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

/* ---------------- 实验室 ---------------- */

.lab-scroll {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  margin: 0 -18px;
  padding: 2px 18px 6px;
  scrollbar-width: none;
}

.lab-scroll::-webkit-scrollbar { display: none; }

.lab-card {
  flex: 0 0 152px;
  padding: 13px;
  border-radius: var(--r-md);
  background: #fff;
  border: 1px dashed rgba(15, 92, 77, 0.22);
  text-align: left;
  position: relative;
}

.lab-card .lab-badge {
  position: absolute;
  right: 9px;
  top: 9px;
  font-size: 7.5px;
  color: #9a6428;
  background: var(--apricot-soft);
  padding: 2px 5px;
  border-radius: 4px;
  letter-spacing: 0.04em;
}

.lab-card .lab-ico { font-size: 23px; }

.lab-card h4 {
  margin-top: 10px;
  font-size: 11.5px;
  font-weight: 600;
  color: #2b3b34;
}

.lab-card p {
  margin-top: 4px;
  font-size: 9px;
  line-height: 1.55;
  color: var(--muted-2);
}

/* ---------------- 底部导航 ---------------- */

.tabbar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 78px;
  display: flex;
  align-items: flex-start;
  justify-content: space-around;
  padding: 8px 10px 0;
  background: #fff;
  backdrop-filter: blur(18px);
  border-top: 1px solid rgba(15, 92, 77, 0.08);
  z-index: 40;
}

.tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding-top: 6px;
  color: #a6b3ac;
  font-size: 9px;
  letter-spacing: 0.03em;
  transition: color 0.2s ease;
}

.tab svg {
  width: 22px;
  height: 22px;
  stroke-width: 1.7;
}

.tab.is-active { color: var(--jade-600); font-weight: 600; }
.tab.is-active svg { stroke-width: 2.1; }

.tab.scan-tab {
  position: relative;
  padding-top: 0;
  flex: 0 0 62px;
}

.scan-fab {
  width: 52px;
  height: 52px;
  border-radius: 19px;
  background: linear-gradient(150deg, var(--jade-500), var(--jade-700));
  display: grid;
  place-items: center;
  color: #fff;
  box-shadow: 0 8px 18px rgba(20, 122, 100, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.28);
  transform: translateY(-14px);
  border: 3px solid #fff;
}

.scan-fab svg { width: 23px; height: 23px; stroke-width: 1.9; }
.tab.scan-tab span { margin-top: -10px; }

/* ---------------- 通用卡片 & 按钮 ---------------- */

.card {
  background: #fff;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

.btn-primary {
  width: 100%;
  height: 46px;
  border-radius: 15px;
  background: linear-gradient(135deg, var(--jade-600), var(--jade-800));
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 8px 20px rgba(15, 92, 77, 0.22);
  transition: transform 0.15s ease, opacity 0.2s ease;
}

.btn-primary:active { transform: scale(0.975); }
.btn-primary:disabled { opacity: 0.45; box-shadow: none; }

.btn-ghost {
  height: 42px;
  padding: 0 18px;
  border-radius: 13px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--jade-700);
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.btn-text {
  font-size: 11px;
  color: var(--muted);
  padding: 8px;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 8.5px;
  padding: 3px 7px;
  border-radius: 999px;
  background: var(--mint-50);
  color: var(--jade-600);
  border: 1px solid rgba(28, 148, 120, 0.1);
  white-space: nowrap;
}

.tag.warm { background: #fdf1e4; color: #a66a2a; border-color: rgba(240, 163, 94, 0.18); }
.tag.rose { background: var(--coral-soft); color: #b34c3a; border-color: rgba(223, 106, 85, 0.14); }
.tag.grey { background: #f4f5f4; color: var(--muted); border-color: transparent; }

/* ---------------- 页面头部 ---------------- */

.page-head {
  padding: 8px 2px 16px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.page-head .ph-left { flex: 1; min-width: 0; }

.page-head h1 {
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--jade-900);
}

.page-head p {
  margin-top: 5px;
  font-size: 10.5px;
  color: var(--muted);
  line-height: 1.6;
}

.icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--jade-700);
  flex: 0 0 auto;
}

.icon-btn svg { width: 17px; height: 17px; }

/* ---------------- 陪伴页 ---------------- */

.page-chat .chat-shell {
  display: flex;
  flex-direction: column;
  height: calc(100% - 2px);
}

.chat-head {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 6px 2px 12px;
}

.avatar {
  width: 42px;
  height: 42px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 700;
  font-size: 17px;
  background: linear-gradient(145deg, var(--jade-500), var(--jade-800));
  box-shadow: 0 6px 14px rgba(20, 122, 100, 0.2);
  flex: 0 0 auto;
  letter-spacing: -0.02em;
}

.chat-head h1 {
  font-size: 16px;
  color: var(--jade-900);
  font-weight: 700;
}

.chat-head .status {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 9.5px;
  color: var(--muted);
  margin-top: 3px;
}

.online-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #46b581;
  box-shadow: 0 0 0 3px rgba(70, 181, 129, 0.14);
}

.safety-strip {
  display: flex;
  align-items: center;
  gap: 7px;
  background: #fdf6ea;
  border: 1px solid rgba(240, 163, 94, 0.22);
  color: #8d642e;
  border-radius: 11px;
  padding: 8px 10px;
  font-size: 8.8px;
  line-height: 1.5;
}

.safety-strip svg { width: 13px; height: 13px; flex: 0 0 auto; }

.mood-row {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 12px 0 8px;
  padding: 8px 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.mood-row > span {
  font-size: 9.5px;
  color: var(--muted);
  margin-right: 3px;
  white-space: nowrap;
}

.mood-row .mood-btn { height: 28px; font-size: 15px; border-radius: 8px; }

.chat-list {
  flex: 1 1 auto;
  min-height: 220px;
  max-height: 372px;
  overflow-y: auto;
  padding: 8px 2px 6px;
  scrollbar-width: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chat-list::-webkit-scrollbar { display: none; }

.msg {
  display: flex;
  gap: 7px;
  align-items: flex-end;
  animation: msgIn 0.28s ease both;
  max-width: 100%;
}

@keyframes msgIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.msg .mini-avatar {
  width: 24px;
  height: 24px;
  border-radius: 8px;
  background: linear-gradient(145deg, var(--jade-500), var(--jade-800));
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  margin-bottom: 2px;
}

.bubble {
  max-width: 82%;
  padding: 10px 12px;
  border-radius: 15px 15px 15px 5px;
  background: #fff;
  border: 1px solid var(--line);
  font-size: 11.5px;
  line-height: 1.72;
  color: #35453d;
  box-shadow: var(--shadow-sm);
}

.bubble b { color: var(--jade-800); font-weight: 600; }

.bubble .question {
  display: block;
  margin-top: 7px;
  color: var(--jade-700);
  font-weight: 500;
}

.msg.user {
  justify-content: flex-end;
}

.msg.user .bubble {
  border-radius: 15px 15px 5px 15px;
  background: linear-gradient(140deg, var(--jade-600), var(--jade-800));
  color: #fff;
  border: 0;
  box-shadow: 0 6px 14px rgba(15, 92, 77, 0.16);
}

.chat-action {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 9px;
  margin-right: 5px;
  font-size: 10px;
  font-weight: 600;
  color: var(--jade-700);
  background: var(--mint-50);
  border: 1px solid rgba(28, 148, 120, 0.16);
  border-radius: 999px;
  padding: 5px 10px;
}

.crisis-card {
  background: #fff7f4;
  border: 1px solid rgba(223, 106, 85, 0.22);
  border-radius: 12px;
  padding: 11px;
  margin-top: 2px;
}

.crisis-card b { color: #a64634; font-size: 11.5px; }
.crisis-card p { font-size: 10.5px; line-height: 1.7; color: #6b4a42; margin-top: 5px; }

.crisis-card a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 34px;
  margin-top: 9px;
  border-radius: 10px;
  background: #b84d3a;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
}

.crisis-card .tiny { font-size: 8.6px; color: #9c7a72; }

.typing {
  display: inline-flex;
  gap: 3px;
  align-items: center;
  height: 14px;
}

.typing i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #9fb6ab;
  animation: blink 1.2s infinite;
}

.typing i:nth-child(2) { animation-delay: 0.16s; }
.typing i:nth-child(3) { animation-delay: 0.32s; }

@keyframes blink {
  0%, 60%, 100% { opacity: 0.25; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-2px); }
}

.quick-chips {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 8px 0 6px;
  scrollbar-width: none;
}

.quick-chips::-webkit-scrollbar { display: none; }

.quick-chip {
  flex: 0 0 auto;
  font-size: 9.5px;
  color: var(--jade-700);
  background: #fff;
  border: 1px solid rgba(15, 92, 77, 0.12);
  padding: 7px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

.quick-chip:active { background: var(--mint-100); }

.chat-tools {
  display: flex;
  gap: 6px;
  padding: 2px 0 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.chat-tools::-webkit-scrollbar { display: none; }

.chat-tool {
  flex: 1 0 auto;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 8.8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
  padding: 6px 8px;
  border-radius: 9px;
  white-space: nowrap;
}

.chat-tool svg { width: 12px; height: 12px; }

.chat-input-row {
  display: flex;
  align-items: center;
  gap: 7px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 5px 5px 5px 13px;
  box-shadow: 0 6px 18px rgba(15, 61, 51, 0.05);
}

.chat-input-row input {
  flex: 1;
  border: 0;
  outline: 0;
  font-size: 11.5px;
  background: transparent;
  min-width: 0;
  padding: 9px 0;
}

.chat-input-row input::placeholder { color: #a7b5ae; }

.send-btn {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(140deg, var(--jade-500), var(--jade-700));
  color: #fff;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  transition: opacity 0.2s ease;
}

.send-btn:disabled { opacity: 0.45; }
.send-btn svg { width: 18px; height: 18px; }

/* ---------------- 识养页 ---------------- */

.scan-zone {
  position: relative;
  border-radius: var(--r-lg);
  background:
    radial-gradient(120% 100% at 50% 0%, #f2faf6 0%, #ffffff 60%);
  border: 1.5px dashed rgba(28, 148, 120, 0.35);
  padding: 24px 18px 20px;
  text-align: center;
  overflow: hidden;
}

.scan-zone::before,
.scan-zone::after {
  content: "";
  position: absolute;
  width: 26px;
  height: 26px;
  border-color: rgba(28, 148, 120, 0.4);
  border-style: solid;
}

.scan-zone::before {
  left: 12px;
  top: 12px;
  border-width: 2px 0 0 2px;
  border-radius: 8px 0 0 0;
}

.scan-zone::after {
  right: 12px;
  bottom: 12px;
  border-width: 0 2px 2px 0;
  border-radius: 0 0 8px 0;
}

.scan-visual {
  width: 74px;
  height: 74px;
  margin: 0 auto 12px;
  border-radius: 24px;
  background: linear-gradient(145deg, var(--mint-100), #d7ece3);
  display: grid;
  place-items: center;
  color: var(--jade-600);
  position: relative;
}

.scan-visual svg { width: 32px; height: 32px; stroke-width: 1.6; }

.scan-visual::after {
  content: "";
  position: absolute;
  inset: -7px;
  border-radius: 29px;
  border: 1px solid rgba(28, 148, 120, 0.16);
}

.scan-zone h3 {
  font-size: 14px;
  color: var(--jade-900);
  letter-spacing: 0.01em;
}

.scan-zone p {
  font-size: 9.8px;
  color: var(--muted-2);
  margin-top: 5px;
  line-height: 1.6;
}

.scan-zone .btn-primary { margin-top: 16px; height: 44px; }

.sample-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.sample-row::-webkit-scrollbar { display: none; }
.sample-row > span { font-size: 9px; color: var(--muted-2); white-space: nowrap; }

.sample-chip {
  flex: 0 0 auto;
  font-size: 9px;
  color: #43544b;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 9px;
  white-space: nowrap;
}

.sample-chip:active { background: var(--mint-50); }

.hint-card {
  margin-top: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 13px;
  display: flex;
  gap: 9px;
}

.hint-card .hi {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: var(--sky);
  display: grid;
  place-items: center;
  font-size: 14px;
  flex: 0 0 auto;
}

.hint-card b { font-size: 10.5px; color: var(--jade-900); display: block; }
.hint-card p { font-size: 9.2px; color: var(--muted); line-height: 1.65; margin-top: 3px; }

.scan-section-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--jade-900);
  margin: 16px 2px 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.scan-section-title::before {
  content: "";
  width: 3px;
  height: 11px;
  border-radius: 2px;
  background: var(--apricot);
}

.product-head {
  display: flex;
  gap: 11px;
  align-items: center;
}

.product-thumb {
  width: 62px;
  height: 62px;
  border-radius: 18px;
  background: #f7f2e7;
  display: grid;
  place-items: center;
  font-size: 31px;
  flex: 0 0 auto;
  border: 1px solid rgba(0, 0, 0, 0.03);
}

.product-head h3 { font-size: 14.5px; color: var(--jade-900); }
.product-head p { font-size: 9.5px; color: var(--muted-2); margin-top: 3px; }
.product-head .tag { margin-top: 6px; }

.score-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed rgba(15, 92, 77, 0.1);
}

.score-ring {
  --s: 60;
  --sc: #e2a33c;
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background: conic-gradient(var(--sc) calc(var(--s) * 1%), #eef1ef 0);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  position: relative;
}

.score-ring::after {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  background: #fff;
}

.score-ring div { position: relative; z-index: 2; text-align: center; line-height: 1; }
.score-ring b { font-size: 21px; color: #3c4a43; font-variant-numeric: tabular-nums; }
.score-ring span { display: block; font-size: 7.5px; color: var(--muted-2); margin-top: 3px; }

.score-text { flex: 1; }
.score-text b { font-size: 13px; color: var(--jade-900); }
.score-text p { font-size: 9.6px; line-height: 1.65; color: var(--muted); margin-top: 4px; }

.nutri-list { display: grid; gap: 9px; }

.nutri-row {
  display: grid;
  grid-template-columns: 44px 1fr 74px;
  align-items: center;
  gap: 8px;
}

.nutri-name { font-size: 10px; color: #43544b; }

.nutri-track {
  height: 7px;
  border-radius: 999px;
  background: #f0f3f1;
  overflow: hidden;
}

.nutri-fill {
  height: 100%;
  border-radius: 999px;
  background: #6fbf9f;
  transition: width 0.5s ease;
}

.nutri-fill.mid { background: #e5b45a; }
.nutri-fill.high { background: #df7a63; }

.nutri-val {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  font-size: 9.5px;
  color: #43544b;
  font-variant-numeric: tabular-nums;
}

.nutri-val b { font-weight: 600; }
.nutri-dot { width: 6px; height: 6px; border-radius: 50%; background: #6fbf9f; flex: 0 0 auto; }
.nutri-dot.mid { background: #e5b45a; }
.nutri-dot.high { background: #df7a63; }

.ai-note {
  background: linear-gradient(145deg, #f2faf6, #eaf5f0);
  border: 1px solid rgba(28, 148, 120, 0.12);
  border-radius: var(--r-md);
  padding: 13px;
  margin-top: 12px;
}

.ai-note .an-head {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 9.5px;
  font-weight: 700;
  color: var(--jade-700);
  letter-spacing: 0.06em;
}

.ai-note .an-head svg { width: 13px; height: 13px; }

.ai-note p, .ai-note li {
  font-size: 10px;
  line-height: 1.75;
  color: #3f5a4e;
}

.ai-note ul { margin-top: 7px; display: grid; gap: 4px; }
.ai-note li { position: relative; padding-left: 11px; }
.ai-note li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--jade-300);
}

.verdict-box {
  border-radius: var(--r-md);
  padding: 12px 13px;
  margin-top: 10px;
  background: #fdf7ee;
  border: 1px solid rgba(240, 163, 94, 0.2);
}

.verdict-box b { font-size: 10.5px; color: #8a5a23; }
.verdict-box p { font-size: 10px; line-height: 1.7; color: #7b603f; margin-top: 4px; }

.alt-row { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }

.correct-box {
  margin-top: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 0 13px;
}

.correct-box summary {
  list-style: none;
  cursor: pointer;
  padding: 12px 0;
  font-size: 10px;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.correct-box summary::-webkit-details-marker { display: none; }
.correct-box summary svg { width: 13px; height: 13px; transition: transform 0.2s ease; }
.correct-box[open] summary svg { transform: rotate(180deg); }

.correct-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding-bottom: 13px;
}

.correct-field label {
  display: block;
  font-size: 8.5px;
  color: var(--muted-2);
  margin-bottom: 4px;
}

.correct-field input {
  width: 100%;
  height: 34px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: #fafbfa;
  padding: 0 9px;
  font-size: 11px;
  outline: none;
}

.correct-field input:focus { border-color: var(--jade-300); background: #fff; }

.scan-actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}

.scan-actions .btn-primary { flex: 1; height: 44px; }
.scan-actions .btn-ghost { flex: 0 0 auto; height: 44px; }

/* ---------------- 食谱页 ---------------- */

.form-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 16px;
  box-shadow: var(--shadow-sm);
}

.form-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  color: var(--jade-900);
  margin-bottom: 12px;
}

.form-title .step-no {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--jade-700);
  color: #fff;
  font-size: 8px;
  display: grid;
  place-items: center;
}

.seg {
  display: flex;
  gap: 4px;
  background: #f4f7f5;
  border-radius: 12px;
  padding: 4px;
}

.seg button {
  flex: 1;
  height: 32px;
  border-radius: 9px;
  font-size: 10.5px;
  color: var(--muted);
  transition: all 0.18s ease;
  white-space: nowrap;
}

.seg button.is-on {
  background: #fff;
  color: var(--jade-700);
  font-weight: 600;
  box-shadow: 0 2px 7px rgba(15, 61, 51, 0.09);
}

.field-label {
  display: block;
  font-size: 9px;
  color: var(--muted-2);
  margin: 12px 0 6px;
  letter-spacing: 0.02em;
}

.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.field {
  position: relative;
}

.field input,
.field select {
  width: 100%;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fbfcfb;
  padding: 0 11px;
  font-size: 12px;
  outline: none;
  appearance: none;
  transition: border-color 0.18s ease, background 0.18s ease;
}

.field input:focus,
.field select:focus { border-color: var(--jade-300); background: #fff; }

.field .unit {
  position: absolute;
  right: 11px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 9px;
  color: var(--muted-2);
  pointer-events: none;
}

.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%236d7d75' stroke-width='1.4' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
  padding-right: 24px;
}

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }

.chip {
  font-size: 9.5px;
  color: var(--muted);
  background: #fbfcfb;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 9px;
  transition: all 0.16s ease;
}

.chip.is-on {
  background: var(--mint-100);
  border-color: var(--jade-300);
  color: var(--jade-700);
  font-weight: 600;
}

.form-card .btn-primary { margin-top: 16px; }

.result-hero {
  margin-top: 16px;
  border-radius: var(--r-lg);
  padding: 18px;
  background:
    radial-gradient(100% 120% at 100% 0%, rgba(240, 163, 94, 0.32), transparent 55%),
    linear-gradient(145deg, #0c4b3f, #13725d);
  color: #fff;
  position: relative;
  overflow: hidden;
}

.result-hero::after {
  content: "";
  position: absolute;
  right: -30px;
  top: -40px;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 0 0 24px rgba(255, 255, 255, 0.04);
}

.result-hero .rh-label {
  font-size: 9px;
  letter-spacing: 0.14em;
  color: rgba(255, 255, 255, 0.6);
}

.result-hero .rh-kcal {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-top: 6px;
}

.result-hero .rh-kcal b {
  font-size: 38px;
  font-weight: 700;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.result-hero .rh-kcal span { font-size: 11px; color: rgba(255, 255, 255, 0.65); }

.rh-meta {
  display: flex;
  gap: 6px;
  margin-top: 12px;
  position: relative;
  z-index: 2;
  flex-wrap: wrap;
}

.rh-meta span {
  font-size: 8.5px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 4px 7px;
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.82);
}

.rh-note {
  margin-top: 12px;
  font-size: 9px;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.6;
  position: relative;
  z-index: 2;
}

.macro-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 13px;
  margin-top: 10px;
}

.macro-row {
  display: grid;
  grid-template-columns: 30px 1fr 54px;
  align-items: center;
  gap: 7px;
  margin-top: 8px;
}

.macro-row:first-child { margin-top: 0; }
.macro-row > span { font-size: 9px; color: var(--muted); }
.macro-row > b { font-size: 9.5px; color: #43544b; text-align: right; font-variant-numeric: tabular-nums; }

.macro-track { height: 6px; border-radius: 999px; background: #f0f3f1; overflow: hidden; }
.macro-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, #8dcbb5, #1c9478); }
.macro-fill.fat { background: linear-gradient(90deg, #f3c987, #e5a64b); }
.macro-fill.carb { background: linear-gradient(90deg, #b9cfe8, #7fa7d2); }

.meal-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 13px;
  margin-top: 9px;
  box-shadow: var(--shadow-sm);
}

.meal-top {
  display: flex;
  align-items: flex-start;
  gap: 9px;
}

.meal-ico {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: #f8f3e8;
  display: grid;
  place-items: center;
  font-size: 20px;
  flex: 0 0 auto;
}

.meal-top h4 {
  font-size: 12px;
  color: #26352e;
  font-weight: 600;
  line-height: 1.35;
}

.meal-top .meal-sub {
  font-size: 8.5px;
  color: var(--muted-2);
  margin-top: 3px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.meal-kcal {
  margin-left: auto;
  text-align: right;
  flex: 0 0 auto;
}

.meal-kcal b { font-size: 13px; color: var(--jade-700); font-variant-numeric: tabular-nums; }
.meal-kcal span { display: block; font-size: 7.5px; color: var(--muted-2); margin-top: 1px; }

.meal-tags { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 8px; }

.meal-ing {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed rgba(15, 92, 77, 0.1);
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
}

.meal-ing span { font-size: 8.8px; color: var(--muted); }
.meal-ing b { color: #53655d; font-weight: 500; }

.meal-steps {
  margin-top: 6px;
}

.meal-steps summary {
  list-style: none;
  font-size: 8.8px;
  color: var(--jade-600);
  cursor: pointer;
  padding: 5px 0 2px;
}

.meal-steps summary::-webkit-details-marker { display: none; }
.meal-steps p { font-size: 9.2px; line-height: 1.7; color: var(--muted); padding: 3px 0 2px; }

.week-strip {
  display: flex;
  gap: 5px;
  margin-top: 9px;
}

.week-day {
  flex: 1;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--line);
  padding: 7px 2px;
  text-align: center;
}

.week-day.is-today { background: var(--mint-50); border-color: rgba(28, 148, 120, 0.24); }
.week-day span { font-size: 7.5px; color: var(--muted-2); display: block; }
.week-day b { font-size: 9px; color: #43544b; display: block; margin-top: 3px; font-variant-numeric: tabular-nums; }
.week-day i { font-size: 10px; font-style: normal; display: block; margin-top: 2px; }

.result-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.result-actions .btn-primary { flex: 1; height: 44px; }
.result-actions .btn-ghost { flex: 0 0 auto; height: 44px; }

.fridge-card {
  margin-top: 18px;
  background: linear-gradient(145deg, #f7f3e9, #fbf8f1);
  border: 1px solid rgba(240, 163, 94, 0.2);
  border-radius: var(--r-lg);
  padding: 15px;
}

.fridge-card h3 {
  font-size: 12.5px;
  color: #6b4720;
  display: flex;
  align-items: center;
  gap: 5px;
}

.fridge-card > p {
  font-size: 9.2px;
  color: #94744e;
  margin-top: 4px;
  line-height: 1.6;
}

.fridge-input {
  display: flex;
  gap: 6px;
  margin-top: 10px;
}

.fridge-input input {
  flex: 1;
  height: 38px;
  border-radius: 10px;
  border: 1px solid rgba(240, 163, 94, 0.28);
  background: rgba(255, 255, 255, 0.8);
  padding: 0 10px;
  font-size: 10.5px;
  outline: none;
  min-width: 0;
}

.fridge-input button {
  flex: 0 0 auto;
  height: 38px;
  padding: 0 13px;
  border-radius: 10px;
  background: #9a6b31;
  color: #fff;
  font-size: 10px;
  font-weight: 600;
}

.fridge-result { margin-top: 10px; display: grid; gap: 6px; }

.fridge-item {
  background: rgba(255, 255, 255, 0.75);
  border-radius: 10px;
  padding: 9px 10px;
  border: 1px solid rgba(240, 163, 94, 0.14);
}

.fridge-item b { font-size: 10.5px; color: #5f421f; }
.fridge-item p { font-size: 8.8px; color: #8a6d48; margin-top: 3px; line-height: 1.55; }

/* ---------------- 我的 ---------------- */

.profile-card {
  background:
    radial-gradient(100% 120% at 100% 0%, rgba(240, 163, 94, 0.3), transparent 58%),
    linear-gradient(145deg, #0d4e42, #146f5b);
  border-radius: var(--r-lg);
  padding: 18px;
  color: #fff;
  position: relative;
  overflow: hidden;
  box-shadow: 0 14px 30px rgba(13, 78, 66, 0.18);
}

.profile-card::after {
  content: "";
  position: absolute;
  right: -24px;
  bottom: -48px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 0 0 26px rgba(255, 255, 255, 0.035);
}

.profile-top { display: flex; align-items: center; gap: 12px; }

.profile-avatar {
  width: 56px;
  height: 56px;
  border-radius: 19px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.24);
  display: grid;
  place-items: center;
  font-size: 23px;
  font-weight: 700;
  flex: 0 0 auto;
}

.profile-top h2 { font-size: 17px; font-weight: 700; }
.profile-top .p-sub { font-size: 9.5px; color: rgba(255, 255, 255, 0.62); margin-top: 4px; }

.profile-badges { display: flex; gap: 5px; margin-top: 7px; flex-wrap: wrap; }
.profile-badges span {
  font-size: 7.5px;
  color: rgba(255, 255, 255, 0.84);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
  padding: 3px 6px;
  border-radius: 999px;
}

.profile-stats {
  display: flex;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.13);
  position: relative;
  z-index: 2;
}

.profile-stats div {
  flex: 1;
  text-align: center;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.profile-stats div:last-child { border-right: 0; }
.profile-stats b { display: block; font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; }
.profile-stats span { display: block; font-size: 8px; color: rgba(255, 255, 255, 0.55); margin-top: 3px; }

.health-file {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 14px;
  margin-top: 14px;
}

.hf-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.hf-head h3 { font-size: 12px; color: var(--jade-900); }
.hf-head button { font-size: 9px; color: var(--jade-600); }

.hf-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.hf-grid div { text-align: center; }
.hf-grid b { display: block; font-size: 13px; color: var(--jade-800); font-variant-numeric: tabular-nums; }
.hf-grid span { display: block; font-size: 7.5px; color: var(--muted-2); margin-top: 3px; }

.badge-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
}

.badge-item {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 10px 4px 8px;
  text-align: center;
}

.badge-item .b-ico {
  width: 36px;
  height: 36px;
  margin: 0 auto 5px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 17px;
  background: linear-gradient(145deg, #fbf0dc, #f6e3c4);
}

.badge-item span { font-size: 7.5px; color: var(--muted); display: block; }
.badge-item.locked { opacity: 0.45; filter: grayscale(1); }

.menu-list {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
}

.menu-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 13px;
  border-bottom: 1px solid rgba(15, 92, 77, 0.06);
  text-align: left;
  font-size: 11px;
  color: #35453d;
}

.menu-item:last-child { border-bottom: 0; }
.menu-item:active { background: #fafcfb; }
.menu-item .m-ico { width: 24px; height: 24px; display: grid; place-items: center; color: var(--jade-600); }
.menu-item .m-ico svg { width: 17px; height: 17px; }
.menu-item .m-arrow { margin-left: auto; color: #c3cec8; }
.menu-item .m-arrow svg { width: 14px; height: 14px; }

.disclaimer {
  margin: 16px 4px 0;
  font-size: 8.5px;
  line-height: 1.75;
  color: #9aa8a1;
  text-align: center;
}

.disclaimer b { color: #7f9088; font-weight: 600; }

/* ---------------- 底部弹层 ---------------- */

.sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 34, 28, 0.42);
  backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.26s ease;
  z-index: 70;
}

.sheet-backdrop.is-open { opacity: 1; pointer-events: auto; }

.sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: 84%;
  background: var(--cream);
  border-radius: 26px 26px 0 0;
  transform: translateY(104%);
  visibility: hidden;
  pointer-events: none;
  transition: transform 0.36s cubic-bezier(0.22, 1, 0.36, 1), visibility 0s 0.36s;
  z-index: 80;
  display: flex;
  flex-direction: column;
  box-shadow: 0 -18px 50px rgba(9, 30, 25, 0.18);
}

.sheet.is-open {
  transform: translateY(0);
  visibility: visible;
  pointer-events: auto;
  transition: transform 0.36s cubic-bezier(0.22, 1, 0.36, 1);
}

.sheet-handle {
  width: 34px;
  height: 4px;
  border-radius: 999px;
  background: #d8e1dc;
  margin: 9px auto 0;
  flex: 0 0 auto;
}

.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px 10px;
  flex: 0 0 auto;
}

.sheet-head h2 { font-size: 15px; color: var(--jade-900); font-weight: 700; }

.sheet-close {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #eef2ef;
  display: grid;
  place-items: center;
  color: var(--muted);
}

.sheet-close svg { width: 14px; height: 14px; }

.sheet-body {
  padding: 0 18px 26px;
  overflow-y: auto;
  scrollbar-width: none;
}

.sheet-body::-webkit-scrollbar { display: none; }

.sheet-body h3 {
  font-size: 12px;
  color: var(--jade-900);
  margin: 14px 0 7px;
}

.sheet-body p {
  font-size: 10.5px;
  line-height: 1.8;
  color: #53655d;
}

.sheet-body .muted { color: var(--muted-2); font-size: 9px; }

.sheet-list { display: grid; gap: 8px; margin-top: 4px; }

.sheet-tool {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 11px;
}

.sheet-tool .st-ico {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--mint-50);
  display: grid;
  place-items: center;
  font-size: 16px;
  flex: 0 0 auto;
}

.sheet-tool b { font-size: 10.5px; color: #2f4037; display: block; }
.sheet-tool p { font-size: 9px; color: var(--muted-2); line-height: 1.6; margin-top: 3px; }

.code-block {
  background: #0f2721;
  color: #cfe9df;
  border-radius: 12px;
  padding: 12px;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 8.8px;
  line-height: 1.75;
  overflow-x: auto;
  margin-top: 8px;
  white-space: pre;
}

.code-block .c-key { color: #f0b97c; }
.code-block .c-str { color: #9ed9b8; }
.code-block .c-com { color: #6f9488; }

.arch {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 10px 0;
}

.arch div {
  flex: 1;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 6px;
  text-align: center;
  font-size: 8.5px;
  color: #45564d;
  line-height: 1.4;
}

.arch div b { display: block; color: var(--jade-700); font-size: 9.5px; margin-bottom: 2px; }
.arch span { color: var(--muted-2); font-size: 10px; }

.sheet-actions { display: flex; gap: 8px; margin-top: 14px; }
.sheet-actions .btn-primary { flex: 1; height: 44px; }
.sheet-actions .btn-ghost { flex: 0 0 auto; height: 44px; }

/* 测评 */

.quiz-q {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 11px;
  margin-top: 8px;
}

.quiz-q p { font-size: 10.5px; color: #35453d; }
.quiz-q .q-no { color: var(--jade-500); font-weight: 700; margin-right: 3px; }

.quiz-opts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-top: 8px; }

.quiz-opt {
  height: 28px;
  border-radius: 7px;
  background: #f6f8f6;
  font-size: 8.5px;
  color: var(--muted);
}

.quiz-opt.is-on { background: var(--jade-700); color: #fff; font-weight: 600; }

.quiz-result {
  margin-top: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  text-align: center;
}

.quiz-result .qr-score {
  font-size: 30px;
  font-weight: 700;
  color: var(--jade-700);
  font-variant-numeric: tabular-nums;
}

.quiz-result .qr-level { font-size: 11px; font-weight: 600; color: var(--jade-800); margin-top: 2px; }
.quiz-result p { font-size: 9.5px; color: var(--muted); margin-top: 6px; }

/* ---------------- 文章阅读 ---------------- */

.article-view {
  position: absolute;
  inset: 0;
  background: var(--cream);
  z-index: 90;
  transform: translateX(100%);
  visibility: hidden;
  transition: transform 0.36s cubic-bezier(0.22, 1, 0.36, 1), visibility 0s 0.36s;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.article-view.is-open {
  transform: translateX(0);
  visibility: visible;
  transition: transform 0.36s cubic-bezier(0.22, 1, 0.36, 1);
}

.article-nav {
  flex: 0 0 auto;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  background: rgba(250, 247, 241, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(15, 92, 77, 0.06);
  z-index: 2;
}

.article-nav .an-back {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  color: var(--jade-800);
}

.article-nav .an-back svg { width: 17px; height: 17px; }
.article-nav span { font-size: 10px; color: var(--muted-2); letter-spacing: 0.06em; }

.article-scroll-body {
  flex: 1;
  overflow-y: auto;
  padding: 0 22px 40px;
  scrollbar-width: none;
}

.article-scroll-body::-webkit-scrollbar { display: none; }

.article-hero {
  margin: 6px -22px 18px;
  height: 168px;
  display: grid;
  place-items: center;
  font-size: 66px;
  position: relative;
  overflow: hidden;
}

.article-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(0, 0, 0, 0.12));
}

.article-kicker {
  font-size: 9px;
  letter-spacing: 0.16em;
  color: var(--jade-600);
  font-weight: 600;
}

.article-title {
  font-size: 23px;
  line-height: 1.4;
  font-weight: 700;
  color: var(--jade-900);
  margin-top: 8px;
  letter-spacing: -0.01em;
}

.article-byline {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(15, 92, 77, 0.1);
  font-size: 9px;
  color: var(--muted-2);
}

.article-byline .by-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--jade-700);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 9px;
  font-weight: 700;
}

.article-content p {
  font-size: 12.5px;
  line-height: 2.05;
  color: #3c4c44;
  margin-top: 15px;
  letter-spacing: 0.01em;
}

.article-content h3 {
  font-size: 15px;
  color: var(--jade-900);
  margin-top: 24px;
  padding-left: 10px;
  border-left: 3px solid var(--apricot);
  line-height: 1.4;
}

.article-content .quote {
  margin-top: 16px;
  padding: 13px 15px;
  background: var(--mint-50);
  border-radius: 12px;
  font-size: 11.5px;
  line-height: 1.9;
  color: var(--jade-800);
}

.article-content ul { margin-top: 10px; display: grid; gap: 7px; }

.article-content li {
  font-size: 11.5px;
  line-height: 1.8;
  color: #3c4c44;
  padding-left: 16px;
  position: relative;
}

.article-content li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 9px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--jade-300);
}

.article-end {
  margin-top: 26px;
  padding-top: 16px;
  border-top: 1px dashed rgba(15, 92, 77, 0.15);
}

.article-end .ae-tip {
  font-size: 9px;
  color: var(--muted-2);
  line-height: 1.8;
  text-align: center;
}

.article-end .btn-primary { margin-top: 12px; height: 44px; font-size: 11.5px; }

/* ---------------- 呼吸弹层 ---------------- */

.breath-modal {
  position: absolute;
  inset: 0;
  z-index: 95;
  background: rgba(7, 33, 27, 0.92);
  backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.breath-modal.is-open { opacity: 1; pointer-events: auto; }

.breath-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  display: grid;
  place-items: center;
}

.breath-close svg { width: 15px; height: 15px; }

.breath-kicker { font-size: 9px; letter-spacing: 0.2em; color: rgba(255, 255, 255, 0.45); }

.breath-title { font-size: 18px; font-weight: 600; margin-top: 6px; }

.breath-stage {
  width: 230px;
  height: 230px;
  display: grid;
  place-items: center;
  position: relative;
  margin: 26px 0;
}

.breath-circle {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #7ad3b3, #1c9478 60%, #0d5c4a);
  box-shadow: 0 0 60px rgba(97, 208, 172, 0.28);
  transform: scale(0.9);
  transition: transform 4s cubic-bezier(0.4, 0, 0.3, 1);
  display: grid;
  place-items: center;
  position: relative;
  z-index: 2;
}

.breath-circle::after {
  content: "";
  position: absolute;
  inset: 16px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.breath-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 0 18px rgba(255, 255, 255, 0.025), 0 0 0 40px rgba(255, 255, 255, 0.015);
}

.breath-phase {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: #eafff6;
}

.breath-count {
  position: absolute;
  bottom: 18px;
  font-size: 9px;
  color: rgba(255, 255, 255, 0.55);
  letter-spacing: 0.1em;
}

.breath-hint {
  font-size: 10.5px;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.8;
  text-align: center;
  max-width: 260px;
}

.breath-btn {
  margin-top: 22px;
  height: 44px;
  padding: 0 30px;
  border-radius: 999px;
  background: #fff;
  color: var(--jade-800);
  font-size: 12px;
  font-weight: 700;
}

/* ---------------- 扫描动画 ---------------- */

.scan-overlay {
  position: absolute;
  inset: 0;
  z-index: 92;
  background: #101b17;
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.24s ease;
}

.scan-overlay.is-open { opacity: 1; pointer-events: auto; }

.scan-camera {
  flex: 1;
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
  background:
    radial-gradient(70% 60% at 50% 40%, rgba(72, 124, 106, 0.35), transparent 70%),
    linear-gradient(160deg, #17251f, #0c1511);
}

.scan-camera img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.55;
  filter: saturate(0.8) brightness(0.75);
}

.scan-frame {
  width: 250px;
  height: 250px;
  position: relative;
  z-index: 2;
}

.scan-frame::before,
.scan-frame::after,
.scan-frame i::before,
.scan-frame i::after {
  content: "";
  position: absolute;
  width: 34px;
  height: 34px;
  border-color: #8fe0c2;
  border-style: solid;
}

.scan-frame::before { left: 0; top: 0; border-width: 2px 0 0 2px; border-radius: 9px 0 0 0; }
.scan-frame::after { right: 0; top: 0; border-width: 2px 2px 0 0; border-radius: 0 9px 0 0; }
.scan-frame i::before { left: 0; bottom: 0; border-width: 0 0 2px 2px; border-radius: 0 0 0 9px; }
.scan-frame i::after { right: 0; bottom: 0; border-width: 0 2px 2px 0; border-radius: 0 0 9px 0; }

.scan-line {
  position: absolute;
  left: 8px;
  right: 8px;
  height: 2px;
  background: linear-gradient(90deg, transparent, #9ff0d2 20%, #eafff7 50%, #9ff0d2 80%, transparent);
  box-shadow: 0 0 16px rgba(126, 235, 198, 0.9);
  top: 8px;
  animation: scanMove 1.7s ease-in-out infinite;
  border-radius: 999px;
}

@keyframes scanMove {
  0%, 100% { top: 8px; opacity: 0.5; }
  50% { top: calc(100% - 10px); opacity: 1; }
}

.scan-product-emoji {
  position: absolute;
  font-size: 76px;
  z-index: 1;
  filter: drop-shadow(0 12px 26px rgba(0, 0, 0, 0.4));
}

.scan-panel {
  flex: 0 0 auto;
  background: #101b17;
  padding: 20px 22px calc(24px + env(safe-area-inset-bottom));
  color: #fff;
}

.scan-panel h3 { font-size: 14px; font-weight: 600; }
.scan-panel > p { font-size: 9px; color: rgba(255, 255, 255, 0.4); margin-top: 3px; }

.scan-steps { margin-top: 14px; display: grid; gap: 8px; }

.scan-step {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.3);
  transition: color 0.25s ease;
}

.scan-step .ss-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  transition: all 0.25s ease;
}

.scan-step.done { color: rgba(255, 255, 255, 0.72); }
.scan-step.done .ss-dot { background: #65c6a5; box-shadow: 0 0 0 3px rgba(101, 198, 165, 0.14); }
.scan-step.active { color: #b9f0dc; }
.scan-step.active .ss-dot {
  background: #b9f0dc;
  box-shadow: 0 0 0 4px rgba(185, 240, 220, 0.16);
  animation: pulse 1s infinite;
}

@keyframes pulse {
  50% { box-shadow: 0 0 0 8px rgba(185, 240, 220, 0.04); }
}

/* ---------------- Toast ---------------- */

.toast {
  position: absolute;
  left: 50%;
  bottom: 96px;
  transform: translate(-50%, 10px);
  background: rgba(17, 42, 34, 0.94);
  color: #fff;
  font-size: 10.5px;
  line-height: 1.5;
  padding: 9px 14px;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  transition: all 0.26s ease;
  z-index: 120;
  max-width: 82%;
  text-align: center;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(8px);
}

.toast.is-show { opacity: 1; transform: translate(-50%, 0); }

/* ---------------- 工具类 ---------------- */

.is-hidden { display: none !important; }

.fade-in { animation: pageIn 0.4s ease both; }

.spacer-8 { height: 8px; }
.spacer-16 { height: 16px; }

/* ---------------- 采购清单 ---------------- */

.shop-list {
  margin-top: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}

.shop-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(15, 92, 77, 0.06);
  font-size: 10.5px;
  color: #35453d;
  cursor: pointer;
}

.shop-row:last-child { border-bottom: 0; }

.shop-row input {
  width: 14px;
  height: 14px;
  accent-color: var(--jade-600);
  flex: 0 0 auto;
}

.shop-row span { flex: 1; }

.shop-row b {
  font-weight: 600;
  color: var(--jade-700);
  font-variant-numeric: tabular-nums;
}

.shop-row:has(input:checked) span {
  text-decoration: line-through;
  color: var(--muted-2);
}

/* ---------------- 响应式 ---------------- */

@media (max-width: 980px) {
  .stage { gap: 28px; padding: 20px; }
  .brand-panel { width: 320px; }
  .brand-panel h1 { font-size: 36px; }
}

@media (max-width: 900px) {
  body { background: var(--cream); }
  .stage {
    padding: 0;
    min-height: 100dvh;
    display: block;
  }
  .brand-panel { display: none; }
  .device-wrap { width: 100%; height: 100dvh; }
  .device-wrap::before { display: none; }
  .device {
    width: 100%;
    height: 100dvh;
    border-radius: 0;
    padding: 0;
    background: var(--cream);
    box-shadow: none;
  }
  .device::after { display: none; }
  .screen {
    border-radius: 0;
    height: 100dvh;
    padding-top: env(safe-area-inset-top);
  }
  .status-bar { display: none; }
  .app { padding-top: 8px; padding-bottom: calc(92px + env(safe-area-inset-bottom)); }
  .tabbar {
    height: calc(74px + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom);
  }
  .hero { padding-top: 14px; }
  .toast { bottom: calc(92px + env(safe-area-inset-bottom)); }
  .chat-list { max-height: 38vh; min-height: 180px; }
  .sheet { max-height: 88%; }
  .sheet-body { padding-bottom: calc(26px + env(safe-area-inset-bottom)); }
  .article-view { padding-top: env(safe-area-inset-top); }
  .breath-close { top: calc(18px + env(safe-area-inset-top)); }
}

@media (max-width: 380px) {
  .tool b { font-size: 9.5px; }
  .tool small { display: none; }
  .health-card { gap: 10px; padding: 13px; }
  .ring { width: 76px; height: 76px; }
  .mini-stats { gap: 9px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
